self-bench 0.3.2 → 0.3.3

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.
Files changed (107) hide show
  1. package/.dockerignore +0 -1
  2. package/Dockerfile +2 -1
  3. package/README.md +101 -177
  4. package/bun.lock +12 -12
  5. package/compose.yaml +4 -4
  6. package/dist/api.d.ts.map +1 -1
  7. package/dist/api.js +40 -2
  8. package/dist/api.js.map +1 -1
  9. package/dist/artifacts.d.ts +0 -1
  10. package/dist/artifacts.d.ts.map +1 -1
  11. package/dist/artifacts.js +0 -3
  12. package/dist/artifacts.js.map +1 -1
  13. package/dist/build-metadata.js +1 -1
  14. package/dist/cli.js +8 -0
  15. package/dist/cli.js.map +1 -1
  16. package/dist/codex-review.d.ts +2 -1
  17. package/dist/codex-review.d.ts.map +1 -1
  18. package/dist/codex-review.js +26 -22
  19. package/dist/codex-review.js.map +1 -1
  20. package/dist/config.d.ts +0 -1
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +0 -2
  23. package/dist/config.js.map +1 -1
  24. package/dist/contracts.d.ts +1 -1
  25. package/dist/contracts.d.ts.map +1 -1
  26. package/dist/eval-main.js +2 -2
  27. package/dist/evaluate.d.ts.map +1 -1
  28. package/dist/evaluate.js +12 -7
  29. package/dist/evaluate.js.map +1 -1
  30. package/dist/provenance.d.ts +0 -1
  31. package/dist/provenance.d.ts.map +1 -1
  32. package/dist/provenance.js.map +1 -1
  33. package/dist/reaudit-main.js +9 -6
  34. package/dist/reaudit-main.js.map +1 -1
  35. package/dist/repair-main.js +7 -4
  36. package/dist/repair-main.js.map +1 -1
  37. package/dist/review/assets/index-CZ3G759O.js +1568 -0
  38. package/dist/review/assets/index-DgSLzX8l.css +1 -0
  39. package/dist/review/assets/{mojo-Blby8dQK.js → mojo-DJz3ZmWd.js} +1 -1
  40. package/dist/review/assets/typst-BUadGCkm.js +1 -0
  41. package/dist/review/index.html +2 -2
  42. package/dist/sandbox-repair.bundle.js +8 -7
  43. package/dist/sandbox-repair.js +7 -7
  44. package/dist/sandbox-repair.js.map +1 -1
  45. package/dist/sandbox-review.bundle.js +29 -25
  46. package/dist/sandbox-review.js +5 -3
  47. package/dist/sandbox-review.js.map +1 -1
  48. package/dist/sandbox-validation-repair.bundle.js +9 -9
  49. package/dist/sandbox-validation-repair.js +11 -9
  50. package/dist/sandbox-validation-repair.js.map +1 -1
  51. package/dist/subscription-auth.d.ts +12 -1
  52. package/dist/subscription-auth.d.ts.map +1 -1
  53. package/dist/subscription-auth.js +16 -16
  54. package/dist/subscription-auth.js.map +1 -1
  55. package/dist/{activities.d.ts → temporal/activities.d.ts} +2 -3
  56. package/dist/temporal/activities.d.ts.map +1 -0
  57. package/dist/{activities.js → temporal/activities.js} +44 -33
  58. package/dist/temporal/activities.js.map +1 -0
  59. package/dist/{temporal.d.ts → temporal/connection.d.ts} +2 -2
  60. package/dist/temporal/connection.d.ts.map +1 -0
  61. package/dist/{temporal.js → temporal/connection.js} +1 -1
  62. package/dist/temporal/connection.js.map +1 -0
  63. package/dist/{worker-main.d.ts.map → temporal/worker-main.d.ts.map} +1 -1
  64. package/dist/{worker-main.js → temporal/worker-main.js} +5 -9
  65. package/dist/temporal/worker-main.js.map +1 -0
  66. package/dist/{workflow.d.ts → temporal/workflow.d.ts} +1 -1
  67. package/dist/temporal/workflow.d.ts.map +1 -0
  68. package/dist/temporal/workflow.js.map +1 -0
  69. package/docs/evaluations.md +13 -12
  70. package/docs/operations.md +10 -19
  71. package/package.json +6 -6
  72. package/src/api.ts +40 -2
  73. package/src/artifacts.ts +0 -4
  74. package/src/cli.ts +9 -0
  75. package/src/codex-review.ts +63 -54
  76. package/src/config.ts +0 -3
  77. package/src/contracts.ts +0 -5
  78. package/src/eval-main.ts +2 -2
  79. package/src/evaluate.ts +13 -8
  80. package/src/provenance.ts +0 -1
  81. package/src/reaudit-main.ts +9 -6
  82. package/src/repair-main.ts +7 -4
  83. package/src/sandbox-repair.ts +7 -11
  84. package/src/sandbox-review.ts +5 -3
  85. package/src/sandbox-validation-repair.ts +13 -10
  86. package/src/subscription-auth.ts +30 -17
  87. package/src/{activities.ts → temporal/activities.ts} +45 -40
  88. package/src/{temporal.ts → temporal/connection.ts} +1 -1
  89. package/src/{worker-main.ts → temporal/worker-main.ts} +5 -9
  90. package/src/{workflow.ts → temporal/workflow.ts} +10 -10
  91. package/dist/activities.d.ts.map +0 -1
  92. package/dist/activities.js.map +0 -1
  93. package/dist/extensions/review.d.ts +0 -3
  94. package/dist/extensions/review.d.ts.map +0 -1
  95. package/dist/extensions/review.js +0 -44
  96. package/dist/extensions/review.js.map +0 -1
  97. package/dist/review/assets/index-Dq-6DFzI.css +0 -1
  98. package/dist/review/assets/index-DurW_RD7.js +0 -1567
  99. package/dist/review/assets/typst-DHCkPAjA.js +0 -1
  100. package/dist/temporal.d.ts.map +0 -1
  101. package/dist/temporal.js.map +0 -1
  102. package/dist/worker-main.js.map +0 -1
  103. package/dist/workflow.d.ts.map +0 -1
  104. package/dist/workflow.js.map +0 -1
  105. package/src/extensions/review.ts +0 -54
  106. /package/dist/{worker-main.d.ts → temporal/worker-main.d.ts} +0 -0
  107. /package/dist/{workflow.js → temporal/workflow.js} +0 -0
@@ -0,0 +1,1568 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-DlhNcFeZ.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/chapel-DTp_pixX.js","assets/c-BIGW1oBm.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-BMRokrvK.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-DXfck5VN.js","assets/ruby-C0TQ7zu5.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-TyuKm33G.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DqcFQ5yU.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-BWmVpMyf.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-2-FPmUDs.js","assets/haxe-CfZj7gIn.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-5Bft2YPA.js","assets/r-Cf5RLm7j.js","assets/just-Cwhn7H3k.js","assets/perl-B9cMNwum.js","assets/latex-D5pSuvFb.js","assets/tex-D96PA37w.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-D1_yUvq7.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/org-DM6o9KBp.js","assets/ini-BEwlwnbL.js","assets/make-CHLpvVh8.js","assets/php-Csjmro_R.js","assets/vb-Cu-pLBUe.js","assets/clojure-P80f7IUj.js","assets/objective-c-DXmwc3jG.js","assets/docker-BcOcwvcX.js","assets/go-C27-OAKa.js","assets/groovy-gcz8RCvz.js","assets/raku-DXvB9xmW.js","assets/rust-B1yitclQ.js","assets/scala-CqE71os6.js","assets/csharp-DSvCPggb.js","assets/dart-bE4Kk8sk.js","assets/ocaml-C0hk2d4L.js","assets/zig-VOosw3JB.js","assets/xsl-CtQFsRM5.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/rst-bs7f0vWN.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Cjom0U5J.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/ts-tags-D351s5mN.js","assets/twig-27uCiNez.js","assets/typst-BUadGCkm.js","assets/bat-CickPsom.js","assets/bibtex-CHM0blh-.js","assets/jsonc-Des-eS-w.js","assets/log-2UxHyX5q.js","assets/powershell-BmBUJMz7.js","assets/swift-C2oV4EkX.js","assets/verilog-nZwndyjY.js","assets/system-verilog-0hqHdDBg.js","assets/vue-BqiEGhQt.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
2
+ (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function a(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(s){if(s.ep)return;s.ep=!0;const u=a(s);fetch(s.href,u)}})();function CS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gc={exports:{}},Br={};var vg;function AS(){if(vg)return Br;vg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:t,type:l,key:f,ref:s!==void 0?s:null,props:u}}return Br.Fragment=n,Br.jsx=a,Br.jsxs=a,Br}var _g;function TS(){return _g||(_g=1,Gc.exports=AS()),Gc.exports}var Z=TS(),jc={exports:{}},he={};var yg;function xS(){if(yg)return he;yg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function b(k){return k===null||typeof k!="object"?null:(k=y&&k[y]||k["@@iterator"],typeof k=="function"?k:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,O={};function L(k,$,J){this.props=k,this.context=$,this.refs=O,this.updater=J||E}L.prototype.isReactComponent={},L.prototype.setState=function(k,$){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,$,"setState")},L.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function A(){}A.prototype=L.prototype;function w(k,$,J){this.props=k,this.context=$,this.refs=O,this.updater=J||E}var z=w.prototype=new A;z.constructor=w,T(z,L.prototype),z.isPureReactComponent=!0;var V=Array.isArray;function U(){}var j={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function W(k,$,J){var ie=J.ref;return{$$typeof:t,type:k,key:$,ref:ie!==void 0?ie:null,props:J}}function F(k,$){return W(k.type,$,k.props)}function K(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function Q(k){var $={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(J){return $[J]})}var ee=/\/+/g;function oe(k,$){return typeof k=="object"&&k!==null&&k.key!=null?Q(""+k.key):$.toString(36)}function fe(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(U,U):(k.status="pending",k.then(function($){k.status==="pending"&&(k.status="fulfilled",k.value=$)},function($){k.status==="pending"&&(k.status="rejected",k.reason=$)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function M(k,$,J,ie,ce){var ve=typeof k;(ve==="undefined"||ve==="boolean")&&(k=null);var Ce=!1;if(k===null)Ce=!0;else switch(ve){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(k.$$typeof){case t:case n:Ce=!0;break;case v:return Ce=k._init,M(Ce(k._payload),$,J,ie,ce)}}if(Ce)return ce=ce(k),Ce=ie===""?"."+oe(k,0):ie,V(ce)?(J="",Ce!=null&&(J=Ce.replace(ee,"$&/")+"/"),M(ce,$,J,"",function(qe){return qe})):ce!=null&&(K(ce)&&(ce=F(ce,J+(ce.key==null||k&&k.key===ce.key?"":(""+ce.key).replace(ee,"$&/")+"/")+Ce)),$.push(ce)),1;Ce=0;var $e=ie===""?".":ie+":";if(V(k))for(var pe=0;pe<k.length;pe++)ie=k[pe],ve=$e+oe(ie,pe),Ce+=M(ie,$,J,ve,ce);else if(pe=b(k),typeof pe=="function")for(k=pe.call(k),pe=0;!(ie=k.next()).done;)ie=ie.value,ve=$e+oe(ie,pe++),Ce+=M(ie,$,J,ve,ce);else if(ve==="object"){if(typeof k.then=="function")return M(fe(k),$,J,ie,ce);throw $=String(k),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function Y(k,$,J){if(k==null)return k;var ie=[],ce=0;return M(k,ie,"","",function(ve){return $.call(J,ve,ce++)}),ie}function te(k){if(k._status===-1){var $=k._result;$=$(),$.then(function(J){(k._status===0||k._status===-1)&&(k._status=1,k._result=J)},function(J){(k._status===0||k._status===-1)&&(k._status=2,k._result=J)}),k._status===-1&&(k._status=0,k._result=$)}if(k._status===1)return k._result.default;throw k._result}var ue=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},be={map:Y,forEach:function(k,$,J){Y(k,function(){$.apply(this,arguments)},J)},count:function(k){var $=0;return Y(k,function(){$++}),$},toArray:function(k){return Y(k,function($){return $})||[]},only:function(k){if(!K(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return he.Activity=g,he.Children=be,he.Component=L,he.Fragment=a,he.Profiler=s,he.PureComponent=w,he.StrictMode=l,he.Suspense=c,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,he.__COMPILER_RUNTIME={__proto__:null,c:function(k){return j.H.useMemoCache(k)}},he.cache=function(k){return function(){return k.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(k,$,J){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var ie=T({},k.props),ce=k.key;if($!=null)for(ve in $.key!==void 0&&(ce=""+$.key),$)!ne.call($,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&$.ref===void 0||(ie[ve]=$[ve]);var ve=arguments.length-2;if(ve===1)ie.children=J;else if(1<ve){for(var Ce=Array(ve),$e=0;$e<ve;$e++)Ce[$e]=arguments[$e+2];ie.children=Ce}return W(k.type,ce,ie)},he.createContext=function(k){return k={$$typeof:f,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},he.createElement=function(k,$,J){var ie,ce={},ve=null;if($!=null)for(ie in $.key!==void 0&&(ve=""+$.key),$)ne.call($,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ce[ie]=$[ie]);var Ce=arguments.length-2;if(Ce===1)ce.children=J;else if(1<Ce){for(var $e=Array(Ce),pe=0;pe<Ce;pe++)$e[pe]=arguments[pe+2];ce.children=$e}if(k&&k.defaultProps)for(ie in Ce=k.defaultProps,Ce)ce[ie]===void 0&&(ce[ie]=Ce[ie]);return W(k,ve,ce)},he.createRef=function(){return{current:null}},he.forwardRef=function(k){return{$$typeof:h,render:k}},he.isValidElement=K,he.lazy=function(k){return{$$typeof:v,_payload:{_status:-1,_result:k},_init:te}},he.memo=function(k,$){return{$$typeof:m,type:k,compare:$===void 0?null:$}},he.startTransition=function(k){var $=j.T,J={};j.T=J;try{var ie=k(),ce=j.S;ce!==null&&ce(J,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(U,ue)}catch(ve){ue(ve)}finally{$!==null&&J.types!==null&&($.types=J.types),j.T=$}},he.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},he.use=function(k){return j.H.use(k)},he.useActionState=function(k,$,J){return j.H.useActionState(k,$,J)},he.useCallback=function(k,$){return j.H.useCallback(k,$)},he.useContext=function(k){return j.H.useContext(k)},he.useDebugValue=function(){},he.useDeferredValue=function(k,$){return j.H.useDeferredValue(k,$)},he.useEffect=function(k,$){return j.H.useEffect(k,$)},he.useEffectEvent=function(k){return j.H.useEffectEvent(k)},he.useId=function(){return j.H.useId()},he.useImperativeHandle=function(k,$,J){return j.H.useImperativeHandle(k,$,J)},he.useInsertionEffect=function(k,$){return j.H.useInsertionEffect(k,$)},he.useLayoutEffect=function(k,$){return j.H.useLayoutEffect(k,$)},he.useMemo=function(k,$){return j.H.useMemo(k,$)},he.useOptimistic=function(k,$){return j.H.useOptimistic(k,$)},he.useReducer=function(k,$,J){return j.H.useReducer(k,$,J)},he.useRef=function(k){return j.H.useRef(k)},he.useState=function(k){return j.H.useState(k)},he.useSyncExternalStore=function(k,$,J){return j.H.useSyncExternalStore(k,$,J)},he.useTransition=function(){return j.H.useTransition()},he.version="19.2.7",he}var bg;function nf(){return bg||(bg=1,jc.exports=xS()),jc.exports}var tn=nf();const _t=CS(tn);var $c={exports:{}},Gr={},qc={exports:{}},Fc={};var Sg;function LS(){return Sg||(Sg=1,(function(t){function n(M,Y){var te=M.length;M.push(Y);e:for(;0<te;){var ue=te-1>>>1,be=M[ue];if(0<s(be,Y))M[ue]=Y,M[te]=be,te=ue;else break e}}function a(M){return M.length===0?null:M[0]}function l(M){if(M.length===0)return null;var Y=M[0],te=M.pop();if(te!==Y){M[0]=te;e:for(var ue=0,be=M.length,k=be>>>1;ue<k;){var $=2*(ue+1)-1,J=M[$],ie=$+1,ce=M[ie];if(0>s(J,te))ie<be&&0>s(ce,J)?(M[ue]=ce,M[ie]=te,ue=ie):(M[ue]=J,M[$]=te,ue=$);else if(ie<be&&0>s(ce,te))M[ue]=ce,M[ie]=te,ue=ie;else break e}}return Y}function s(M,Y){var te=M.sortIndex-Y.sortIndex;return te!==0?te:M.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var c=[],m=[],v=1,g=null,y=3,b=!1,E=!1,T=!1,O=!1,L=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function z(M){for(var Y=a(m);Y!==null;){if(Y.callback===null)l(m);else if(Y.startTime<=M)l(m),Y.sortIndex=Y.expirationTime,n(c,Y);else break;Y=a(m)}}function V(M){if(T=!1,z(M),!E)if(a(c)!==null)E=!0,U||(U=!0,Q());else{var Y=a(m);Y!==null&&fe(V,Y.startTime-M)}}var U=!1,j=-1,ne=5,W=-1;function F(){return O?!0:!(t.unstable_now()-W<ne)}function K(){if(O=!1,U){var M=t.unstable_now();W=M;var Y=!0;try{e:{E=!1,T&&(T=!1,A(j),j=-1),b=!0;var te=y;try{t:{for(z(M),g=a(c);g!==null&&!(g.expirationTime>M&&F());){var ue=g.callback;if(typeof ue=="function"){g.callback=null,y=g.priorityLevel;var be=ue(g.expirationTime<=M);if(M=t.unstable_now(),typeof be=="function"){g.callback=be,z(M),Y=!0;break t}g===a(c)&&l(c),z(M)}else l(c);g=a(c)}if(g!==null)Y=!0;else{var k=a(m);k!==null&&fe(V,k.startTime-M),Y=!1}}break e}finally{g=null,y=te,b=!1}Y=void 0}}finally{Y?Q():U=!1}}}var Q;if(typeof w=="function")Q=function(){w(K)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,oe=ee.port2;ee.port1.onmessage=K,Q=function(){oe.postMessage(null)}}else Q=function(){L(K,0)};function fe(M,Y){j=L(function(){M(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(M){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var te=y;y=Y;try{return M()}finally{y=te}},t.unstable_requestPaint=function(){O=!0},t.unstable_runWithPriority=function(M,Y){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var te=y;y=M;try{return Y()}finally{y=te}},t.unstable_scheduleCallback=function(M,Y,te){var ue=t.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?ue+te:ue):te=ue,M){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=te+be,M={id:v++,callback:Y,priorityLevel:M,startTime:te,expirationTime:be,sortIndex:-1},te>ue?(M.sortIndex=te,n(m,M),a(c)===null&&M===a(m)&&(T?(A(j),j=-1):T=!0,fe(V,te-ue))):(M.sortIndex=be,n(c,M),E||b||(E=!0,U||(U=!0,Q()))),M},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(M){var Y=y;return function(){var te=y;y=Y;try{return M.apply(this,arguments)}finally{y=te}}}})(Fc)),Fc}var Eg;function wS(){return Eg||(Eg=1,qc.exports=LS()),qc.exports}var Yc={exports:{}},gt={};var Cg;function RS(){if(Cg)return gt;Cg=1;var t=nf();function n(c){var m="https://react.dev/errors/"+c;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+c+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(c,m,v){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:c,containerInfo:m,implementation:v}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(c,m){if(c==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,gt.createPortal=function(c,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(n(299));return u(c,m,null,v)},gt.flushSync=function(c){var m=f.T,v=l.p;try{if(f.T=null,l.p=2,c)return c()}finally{f.T=m,l.p=v,l.d.f()}},gt.preconnect=function(c,m){typeof c=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,l.d.C(c,m))},gt.prefetchDNS=function(c){typeof c=="string"&&l.d.D(c)},gt.preinit=function(c,m){if(typeof c=="string"&&m&&typeof m.as=="string"){var v=m.as,g=h(v,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?l.d.S(c,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:b}):v==="script"&&l.d.X(c,{crossOrigin:g,integrity:y,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},gt.preinitModule=function(c,m){if(typeof c=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=h(m.as,m.crossOrigin);l.d.M(c,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&l.d.M(c)},gt.preload=function(c,m){if(typeof c=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,g=h(v,m.crossOrigin);l.d.L(c,v,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},gt.preloadModule=function(c,m){if(typeof c=="string")if(m){var v=h(m.as,m.crossOrigin);l.d.m(c,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else l.d.m(c)},gt.requestFormReset=function(c){l.d.r(c)},gt.unstable_batchedUpdates=function(c,m){return c(m)},gt.useFormState=function(c,m,v){return f.H.useFormState(c,m,v)},gt.useFormStatus=function(){return f.H.useHostTransitionStatus()},gt.version="19.2.7",gt}var Ag;function kS(){if(Ag)return Yc.exports;Ag=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Yc.exports=RS(),Yc.exports}var Tg;function DS(){if(Tg)return Gr;Tg=1;var t=wS(),n=nf(),a=kS();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)i+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var i=e,r=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(r=i.return),e=i.return;while(e)}return i.tag===3?r:null}function f(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function h(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function c(e){if(u(e)!==e)throw Error(l(188))}function m(e){var i=e.alternate;if(!i){if(i=u(e),i===null)throw Error(l(188));return i!==e?null:e}for(var r=e,o=i;;){var d=r.return;if(d===null)break;var p=d.alternate;if(p===null){if(o=d.return,o!==null){r=o;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===r)return c(d),e;if(p===o)return c(d),i;p=p.sibling}throw Error(l(188))}if(r.return!==o.return)r=d,o=p;else{for(var _=!1,C=d.child;C;){if(C===r){_=!0,r=d,o=p;break}if(C===o){_=!0,o=d,r=p;break}C=C.sibling}if(!_){for(C=p.child;C;){if(C===r){_=!0,r=p,o=d;break}if(C===o){_=!0,o=p,r=d;break}C=C.sibling}if(!_)throw Error(l(189))}}if(r.alternate!==o)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?e:i}function v(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=v(e),i!==null)return i;e=e.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),w=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case L:return"Profiler";case O:return"StrictMode";case V:return"Suspense";case U:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case w:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case z:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case j:return i=e.displayName||null,i!==null?i:oe(e.type)||"Memo";case ne:i=e._payload,e=e._init;try{return oe(e(i))}catch{}}return null}var fe=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ue=[],be=-1;function k(e){return{current:e}}function $(e){0>be||(e.current=ue[be],ue[be]=null,be--)}function J(e,i){be++,ue[be]=e.current,e.current=i}var ie=k(null),ce=k(null),ve=k(null),Ce=k(null);function $e(e,i){switch(J(ve,i),J(ce,e),J(ie,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?Vm(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=Vm(i),e=Bm(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(ie),J(ie,e)}function pe(){$(ie),$(ce),$(ve)}function qe(e){e.memoizedState!==null&&J(Ce,e);var i=ie.current,r=Bm(i,e.type);i!==r&&(J(ce,e),J(ie,r))}function Be(e){ce.current===e&&($(ie),$(ce)),Ce.current===e&&($(Ce),Hr._currentValue=te)}var nn,Rt;function rt(e){if(nn===void 0)try{throw Error()}catch(r){var i=r.stack.trim().match(/\n( *(at )?)/);nn=i&&i[1]||"",Rt=-1<r.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+nn+e+Rt}var bn=!1;function ct(e,i){if(!e||bn)return"";bn=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(i){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(P){var H=P}Reflect.construct(e,[],q)}else{try{q.call()}catch(P){H=P}e.call(q.prototype)}}else{try{throw Error()}catch(P){H=P}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(P){if(P&&H&&typeof P.stack=="string")return[P.stack,H.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=o.DetermineComponentFrameRoot(),_=p[0],C=p[1];if(_&&C){var x=_.split(`
5
+ `),I=C.split(`
6
+ `);for(d=o=0;o<x.length&&!x[o].includes("DetermineComponentFrameRoot");)o++;for(;d<I.length&&!I[d].includes("DetermineComponentFrameRoot");)d++;if(o===x.length||d===I.length)for(o=x.length-1,d=I.length-1;1<=o&&0<=d&&x[o]!==I[d];)d--;for(;1<=o&&0<=d;o--,d--)if(x[o]!==I[d]){if(o!==1||d!==1)do if(o--,d--,0>d||x[o]!==I[d]){var B=`
7
+ `+x[o].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=o&&0<=d);break}}}finally{bn=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?rt(r):""}function Xa(e,i){switch(e.tag){case 26:case 27:case 5:return rt(e.type);case 16:return rt("Lazy");case 13:return e.child!==i&&i!==null?rt("Suspense Fallback"):rt("Suspense");case 19:return rt("SuspenseList");case 0:case 15:return ct(e.type,!1);case 11:return ct(e.type.render,!1);case 1:return ct(e.type,!0);case 31:return rt("Activity");default:return""}}function Xi(e){try{var i="",r=null;do i+=Xa(e,r),r=e,e=e.return;while(e);return i}catch(o){return`
8
+ Error generating stack: `+o.message+`
9
+ `+o.stack}}var Ls=Object.prototype.hasOwnProperty,ws=t.unstable_scheduleCallback,Rs=t.unstable_cancelCallback,ty=t.unstable_shouldYield,ny=t.unstable_requestPaint,kt=t.unstable_now,iy=t.unstable_getCurrentPriorityLevel,_f=t.unstable_ImmediatePriority,yf=t.unstable_UserBlockingPriority,pl=t.unstable_NormalPriority,ay=t.unstable_LowPriority,bf=t.unstable_IdlePriority,ry=t.log,ly=t.unstable_setDisableYieldValue,Qa=null,Dt=null;function $n(e){if(typeof ry=="function"&&ly(e),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(Qa,e)}catch{}}var Ot=Math.clz32?Math.clz32:uy,oy=Math.log,sy=Math.LN2;function uy(e){return e>>>=0,e===0?32:31-(oy(e)/sy|0)|0}var ml=256,gl=262144,vl=4194304;function bi(e){var i=e&42;if(i!==0)return i;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _l(e,i,r){var o=e.pendingLanes;if(o===0)return 0;var d=0,p=e.suspendedLanes,_=e.pingedLanes;e=e.warmLanes;var C=o&134217727;return C!==0?(o=C&~p,o!==0?d=bi(o):(_&=C,_!==0?d=bi(_):r||(r=C&~e,r!==0&&(d=bi(r))))):(C=o&~p,C!==0?d=bi(C):_!==0?d=bi(_):r||(r=o&~e,r!==0&&(d=bi(r)))),d===0?0:i!==0&&i!==d&&(i&p)===0&&(p=d&-d,r=i&-i,p>=r||p===32&&(r&4194048)!==0)?i:d}function Za(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function cy(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Sf(){var e=vl;return vl<<=1,(vl&62914560)===0&&(vl=4194304),e}function ks(e){for(var i=[],r=0;31>r;r++)i.push(e);return i}function Ka(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dy(e,i,r,o,d,p){var _=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var C=e.entanglements,x=e.expirationTimes,I=e.hiddenUpdates;for(r=_&~r;0<r;){var B=31-Ot(r),q=1<<B;C[B]=0,x[B]=-1;var H=I[B];if(H!==null)for(I[B]=null,B=0;B<H.length;B++){var P=H[B];P!==null&&(P.lane&=-536870913)}r&=~q}o!==0&&Ef(e,o,0),p!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=p&~(_&~i))}function Ef(e,i,r){e.pendingLanes|=i,e.suspendedLanes&=~i;var o=31-Ot(i);e.entangledLanes|=i,e.entanglements[o]=e.entanglements[o]|1073741824|r&261930}function Cf(e,i){var r=e.entangledLanes|=i;for(e=e.entanglements;r;){var o=31-Ot(r),d=1<<o;d&i|e[o]&i&&(e[o]|=i),r&=~d}}function Af(e,i){var r=i&-i;return r=(r&42)!==0?1:Ds(r),(r&(e.suspendedLanes|i))!==0?0:r}function Ds(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Os(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Tf(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:cg(e.type))}function xf(e,i){var r=Y.p;try{return Y.p=e,i()}finally{Y.p=r}}var qn=Math.random().toString(36).slice(2),dt="__reactFiber$"+qn,St="__reactProps$"+qn,Qi="__reactContainer$"+qn,Ms="__reactEvents$"+qn,fy="__reactListeners$"+qn,hy="__reactHandles$"+qn,Lf="__reactResources$"+qn,Wa="__reactMarker$"+qn;function Ns(e){delete e[dt],delete e[St],delete e[Ms],delete e[fy],delete e[hy]}function Zi(e){var i=e[dt];if(i)return i;for(var r=e.parentNode;r;){if(i=r[Qi]||r[dt]){if(r=i.alternate,i.child!==null||r!==null&&r.child!==null)for(e=Xm(e);e!==null;){if(r=e[dt])return r;e=Xm(e)}return i}e=r,r=e.parentNode}return null}function Ki(e){if(e=e[dt]||e[Qi]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Ja(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function Wi(e){var i=e[Lf];return i||(i=e[Lf]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function lt(e){e[Wa]=!0}var wf=new Set,Rf={};function Si(e,i){Ji(e,i),Ji(e+"Capture",i)}function Ji(e,i){for(Rf[e]=i,e=0;e<i.length;e++)wf.add(i[e])}var py=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]*$"),kf={},Df={};function my(e){return Ls.call(Df,e)?!0:Ls.call(kf,e)?!1:py.test(e)?Df[e]=!0:(kf[e]=!0,!1)}function yl(e,i,r){if(my(i))if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var o=i.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+r)}}function bl(e,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+r)}}function Sn(e,i,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(i,r,""+o)}}function Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Of(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function gy(e,i,r){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,p=o.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return d.call(this)},set:function(_){r=""+_,p.call(this,_)}}),Object.defineProperty(e,i,{enumerable:o.enumerable}),{getValue:function(){return r},setValue:function(_){r=""+_},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function Is(e){if(!e._valueTracker){var i=Of(e)?"checked":"value";e._valueTracker=gy(e,i,""+e[i])}}function Mf(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var r=i.getValue(),o="";return e&&(o=Of(e)?e.checked?"true":"false":e.value),e=o,e!==r?(i.setValue(e),!0):!1}function Sl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var vy=/[\n"\\]/g;function Gt(e){return e.replace(vy,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function zs(e,i,r,o,d,p,_,C){e.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.type=_:e.removeAttribute("type"),i!=null?_==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+Bt(i)):e.value!==""+Bt(i)&&(e.value=""+Bt(i)):_!=="submit"&&_!=="reset"||e.removeAttribute("value"),i!=null?Hs(e,_,Bt(i)):r!=null?Hs(e,_,Bt(r)):o!=null&&e.removeAttribute("value"),d==null&&p!=null&&(e.defaultChecked=!!p),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.name=""+Bt(C):e.removeAttribute("name")}function Nf(e,i,r,o,d,p,_,C){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),i!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||i!=null)){Is(e);return}r=r!=null?""+Bt(r):"",i=i!=null?""+Bt(i):r,C||i===e.value||(e.value=i),e.defaultValue=i}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=C?e.checked:!!o,e.defaultChecked=!!o,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.name=_),Is(e)}function Hs(e,i,r){i==="number"&&Sl(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function ea(e,i,r,o){if(e=e.options,i){i={};for(var d=0;d<r.length;d++)i["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=i.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&o&&(e[r].defaultSelected=!0)}else{for(r=""+Bt(r),i=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,o&&(e[d].defaultSelected=!0);return}i!==null||e[d].disabled||(i=e[d])}i!==null&&(i.selected=!0)}}function If(e,i,r){if(i!=null&&(i=""+Bt(i),i!==e.value&&(e.value=i),r==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=r!=null?""+Bt(r):""}function zf(e,i,r,o){if(i==null){if(o!=null){if(r!=null)throw Error(l(92));if(fe(o)){if(1<o.length)throw Error(l(93));o=o[0]}r=o}r==null&&(r=""),i=r}r=Bt(i),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o),Is(e)}function ta(e,i){if(i){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=i;return}}e.textContent=i}var _y=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 Hf(e,i,r){var o=i.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":o?e.setProperty(i,r):typeof r!="number"||r===0||_y.has(i)?i==="float"?e.cssFloat=r:e[i]=(""+r).trim():e[i]=r+"px"}function Uf(e,i,r){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||i!=null&&i.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var d in i)o=i[d],i.hasOwnProperty(d)&&r[d]!==o&&Hf(e,d,o)}else for(var p in i)i.hasOwnProperty(p)&&Hf(e,p,i[p])}function Us(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yy=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"]]),by=/^[\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 El(e){return by.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function En(){}var Ps=null;function Vs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var na=null,ia=null;function Pf(e){var i=Ki(e);if(i&&(e=i.stateNode)){var r=e[St]||null;e:switch(e=i.stateNode,i.type){case"input":if(zs(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),i=r.name,r.type==="radio"&&i!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Gt(""+i)+'"][type="radio"]'),i=0;i<r.length;i++){var o=r[i];if(o!==e&&o.form===e.form){var d=o[St]||null;if(!d)throw Error(l(90));zs(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(i=0;i<r.length;i++)o=r[i],o.form===e.form&&Mf(o)}break e;case"textarea":If(e,r.value,r.defaultValue);break e;case"select":i=r.value,i!=null&&ea(e,!!r.multiple,i,!1)}}}var Bs=!1;function Vf(e,i,r){if(Bs)return e(i,r);Bs=!0;try{var o=e(i);return o}finally{if(Bs=!1,(na!==null||ia!==null)&&(uo(),na&&(i=na,e=ia,ia=na=null,Pf(i),e)))for(i=0;i<e.length;i++)Pf(e[i])}}function er(e,i){var r=e.stateNode;if(r===null)return null;var o=r[St]||null;if(o===null)return null;r=o[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(l(231,i,typeof r));return r}var Cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gs=!1;if(Cn)try{var tr={};Object.defineProperty(tr,"passive",{get:function(){Gs=!0}}),window.addEventListener("test",tr,tr),window.removeEventListener("test",tr,tr)}catch{Gs=!1}var Fn=null,js=null,Cl=null;function Bf(){if(Cl)return Cl;var e,i=js,r=i.length,o,d="value"in Fn?Fn.value:Fn.textContent,p=d.length;for(e=0;e<r&&i[e]===d[e];e++);var _=r-e;for(o=1;o<=_&&i[r-o]===d[p-o];o++);return Cl=d.slice(e,1<o?1-o:void 0)}function Al(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function Tl(){return!0}function Gf(){return!1}function Et(e){function i(r,o,d,p,_){this._reactName=r,this._targetInst=d,this.type=o,this.nativeEvent=p,this.target=_,this.currentTarget=null;for(var C in e)e.hasOwnProperty(C)&&(r=e[C],this[C]=r?r(p):p[C]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Tl:Gf,this.isPropagationStopped=Gf,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Tl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Tl)},persist:function(){},isPersistent:Tl}),i}var Ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=Et(Ei),nr=g({},Ei,{view:0,detail:0}),Sy=Et(nr),$s,qs,ir,Ll=g({},nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ys,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ir&&(ir&&e.type==="mousemove"?($s=e.screenX-ir.screenX,qs=e.screenY-ir.screenY):qs=$s=0,ir=e),$s)},movementY:function(e){return"movementY"in e?e.movementY:qs}}),jf=Et(Ll),Ey=g({},Ll,{dataTransfer:0}),Cy=Et(Ey),Ay=g({},nr,{relatedTarget:0}),Fs=Et(Ay),Ty=g({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),xy=Et(Ty),Ly=g({},Ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wy=Et(Ly),Ry=g({},Ei,{data:0}),$f=Et(Ry),ky={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dy={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"},Oy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function My(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=Oy[e])?!!i[e]:!1}function Ys(){return My}var Ny=g({},nr,{key:function(e){if(e.key){var i=ky[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Al(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ys,charCode:function(e){return e.type==="keypress"?Al(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Al(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Iy=Et(Ny),zy=g({},Ll,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qf=Et(zy),Hy=g({},nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ys}),Uy=Et(Hy),Py=g({},Ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vy=Et(Py),By=g({},Ll,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Gy=Et(By),jy=g({},Ei,{newState:0,oldState:0}),$y=Et(jy),qy=[9,13,27,32],Xs=Cn&&"CompositionEvent"in window,ar=null;Cn&&"documentMode"in document&&(ar=document.documentMode);var Fy=Cn&&"TextEvent"in window&&!ar,Ff=Cn&&(!Xs||ar&&8<ar&&11>=ar),Yf=" ",Xf=!1;function Qf(e,i){switch(e){case"keyup":return qy.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var aa=!1;function Yy(e,i){switch(e){case"compositionend":return Zf(i);case"keypress":return i.which!==32?null:(Xf=!0,Yf);case"textInput":return e=i.data,e===Yf&&Xf?null:e;default:return null}}function Xy(e,i){if(aa)return e==="compositionend"||!Xs&&Qf(e,i)?(e=Bf(),Cl=js=Fn=null,aa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ff&&i.locale!=="ko"?null:i.data;default:return null}}var Qy={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 Kf(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!Qy[e.type]:i==="textarea"}function Wf(e,i,r,o){na?ia?ia.push(o):ia=[o]:na=o,i=vo(i,"onChange"),0<i.length&&(r=new xl("onChange","change",null,r,o),e.push({event:r,listeners:i}))}var rr=null,lr=null;function Zy(e){Nm(e,0)}function wl(e){var i=Ja(e);if(Mf(i))return e}function Jf(e,i){if(e==="change")return i}var eh=!1;if(Cn){var Qs;if(Cn){var Zs="oninput"in document;if(!Zs){var th=document.createElement("div");th.setAttribute("oninput","return;"),Zs=typeof th.oninput=="function"}Qs=Zs}else Qs=!1;eh=Qs&&(!document.documentMode||9<document.documentMode)}function nh(){rr&&(rr.detachEvent("onpropertychange",ih),lr=rr=null)}function ih(e){if(e.propertyName==="value"&&wl(lr)){var i=[];Wf(i,lr,e,Vs(e)),Vf(Zy,i)}}function Ky(e,i,r){e==="focusin"?(nh(),rr=i,lr=r,rr.attachEvent("onpropertychange",ih)):e==="focusout"&&nh()}function Wy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wl(lr)}function Jy(e,i){if(e==="click")return wl(i)}function eb(e,i){if(e==="input"||e==="change")return wl(i)}function tb(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Mt=typeof Object.is=="function"?Object.is:tb;function or(e,i){if(Mt(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var r=Object.keys(e),o=Object.keys(i);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var d=r[o];if(!Ls.call(i,d)||!Mt(e[d],i[d]))return!1}return!0}function ah(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rh(e,i){var r=ah(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=i&&o>=i)return{node:r,offset:i-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ah(r)}}function lh(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?lh(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function oh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=Sl(e.document);i instanceof e.HTMLIFrameElement;){try{var r=typeof i.contentWindow.location.href=="string"}catch{r=!1}if(r)e=i.contentWindow;else break;i=Sl(e.document)}return i}function Ks(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var nb=Cn&&"documentMode"in document&&11>=document.documentMode,ra=null,Ws=null,sr=null,Js=!1;function sh(e,i,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Js||ra==null||ra!==Sl(o)||(o=ra,"selectionStart"in o&&Ks(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),sr&&or(sr,o)||(sr=o,o=vo(Ws,"onSelect"),0<o.length&&(i=new xl("onSelect","select",null,i,r),e.push({event:i,listeners:o}),i.target=ra)))}function Ci(e,i){var r={};return r[e.toLowerCase()]=i.toLowerCase(),r["Webkit"+e]="webkit"+i,r["Moz"+e]="moz"+i,r}var la={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionrun:Ci("Transition","TransitionRun"),transitionstart:Ci("Transition","TransitionStart"),transitioncancel:Ci("Transition","TransitionCancel"),transitionend:Ci("Transition","TransitionEnd")},eu={},uh={};Cn&&(uh=document.createElement("div").style,"AnimationEvent"in window||(delete la.animationend.animation,delete la.animationiteration.animation,delete la.animationstart.animation),"TransitionEvent"in window||delete la.transitionend.transition);function Ai(e){if(eu[e])return eu[e];if(!la[e])return e;var i=la[e],r;for(r in i)if(i.hasOwnProperty(r)&&r in uh)return eu[e]=i[r];return e}var ch=Ai("animationend"),dh=Ai("animationiteration"),fh=Ai("animationstart"),ib=Ai("transitionrun"),ab=Ai("transitionstart"),rb=Ai("transitioncancel"),hh=Ai("transitionend"),ph=new Map,tu="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(" ");tu.push("scrollEnd");function an(e,i){ph.set(e,i),Si(i,[e])}var Rl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},jt=[],oa=0,nu=0;function kl(){for(var e=oa,i=nu=oa=0;i<e;){var r=jt[i];jt[i++]=null;var o=jt[i];jt[i++]=null;var d=jt[i];jt[i++]=null;var p=jt[i];if(jt[i++]=null,o!==null&&d!==null){var _=o.pending;_===null?d.next=d:(d.next=_.next,_.next=d),o.pending=d}p!==0&&mh(r,d,p)}}function Dl(e,i,r,o){jt[oa++]=e,jt[oa++]=i,jt[oa++]=r,jt[oa++]=o,nu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function iu(e,i,r,o){return Dl(e,i,r,o),Ol(e)}function Ti(e,i){return Dl(e,null,null,i),Ol(e)}function mh(e,i,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var d=!1,p=e.return;p!==null;)p.childLanes|=r,o=p.alternate,o!==null&&(o.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(d=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,d&&i!==null&&(d=31-Ot(r),e=p.hiddenUpdates,o=e[d],o===null?e[d]=[i]:o.push(i),i.lane=r|536870912),p):null}function Ol(e){if(50<kr)throw kr=0,fc=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var sa={};function lb(e,i,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,i,r,o){return new lb(e,i,r,o)}function au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function An(e,i){var r=e.alternate;return r===null?(r=Nt(e.tag,i,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=i,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,i=e.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function gh(e,i){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,i=r.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function Ml(e,i,r,o,d,p){var _=0;if(o=e,typeof e=="function")au(e)&&(_=1);else if(typeof e=="string")_=dS(e,r,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=Nt(31,r,i,d),e.elementType=W,e.lanes=p,e;case T:return xi(r.children,d,p,i);case O:_=8,d|=24;break;case L:return e=Nt(12,r,i,d|2),e.elementType=L,e.lanes=p,e;case V:return e=Nt(13,r,i,d),e.elementType=V,e.lanes=p,e;case U:return e=Nt(19,r,i,d),e.elementType=U,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w:_=10;break e;case A:_=9;break e;case z:_=11;break e;case j:_=14;break e;case ne:_=16,o=null;break e}_=29,r=Error(l(130,e===null?"null":typeof e,"")),o=null}return i=Nt(_,r,i,d),i.elementType=e,i.type=o,i.lanes=p,i}function xi(e,i,r,o){return e=Nt(7,e,o,i),e.lanes=r,e}function ru(e,i,r){return e=Nt(6,e,null,i),e.lanes=r,e}function vh(e){var i=Nt(18,null,null,0);return i.stateNode=e,i}function lu(e,i,r){return i=Nt(4,e.children!==null?e.children:[],e.key,i),i.lanes=r,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var _h=new WeakMap;function $t(e,i){if(typeof e=="object"&&e!==null){var r=_h.get(e);return r!==void 0?r:(i={value:e,source:i,stack:Xi(i)},_h.set(e,i),i)}return{value:e,source:i,stack:Xi(i)}}var ua=[],ca=0,Nl=null,ur=0,qt=[],Ft=0,Yn=null,dn=1,fn="";function Tn(e,i){ua[ca++]=ur,ua[ca++]=Nl,Nl=e,ur=i}function yh(e,i,r){qt[Ft++]=dn,qt[Ft++]=fn,qt[Ft++]=Yn,Yn=e;var o=dn;e=fn;var d=32-Ot(o)-1;o&=~(1<<d),r+=1;var p=32-Ot(i)+d;if(30<p){var _=d-d%5;p=(o&(1<<_)-1).toString(32),o>>=_,d-=_,dn=1<<32-Ot(i)+d|r<<d|o,fn=p+e}else dn=1<<p|r<<d|o,fn=e}function ou(e){e.return!==null&&(Tn(e,1),yh(e,1,0))}function su(e){for(;e===Nl;)Nl=ua[--ca],ua[ca]=null,ur=ua[--ca],ua[ca]=null;for(;e===Yn;)Yn=qt[--Ft],qt[Ft]=null,fn=qt[--Ft],qt[Ft]=null,dn=qt[--Ft],qt[Ft]=null}function bh(e,i){qt[Ft++]=dn,qt[Ft++]=fn,qt[Ft++]=Yn,dn=i.id,fn=i.overflow,Yn=e}var ft=null,Ue=null,xe=!1,Xn=null,Yt=!1,uu=Error(l(519));function Qn(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cr($t(i,e)),uu}function Sh(e){var i=e.stateNode,r=e.type,o=e.memoizedProps;switch(i[dt]=e,i[St]=o,r){case"dialog":Ee("cancel",i),Ee("close",i);break;case"iframe":case"object":case"embed":Ee("load",i);break;case"video":case"audio":for(r=0;r<Or.length;r++)Ee(Or[r],i);break;case"source":Ee("error",i);break;case"img":case"image":case"link":Ee("error",i),Ee("load",i);break;case"details":Ee("toggle",i);break;case"input":Ee("invalid",i),Nf(i,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Ee("invalid",i);break;case"textarea":Ee("invalid",i),zf(i,o.value,o.defaultValue,o.children)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||i.textContent===""+r||o.suppressHydrationWarning===!0||Um(i.textContent,r)?(o.popover!=null&&(Ee("beforetoggle",i),Ee("toggle",i)),o.onScroll!=null&&Ee("scroll",i),o.onScrollEnd!=null&&Ee("scrollend",i),o.onClick!=null&&(i.onclick=En),i=!0):i=!1,i||Qn(e,!0)}function Eh(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:ft=ft.return}}function da(e){if(e!==ft)return!1;if(!xe)return Eh(e),xe=!0,!1;var i=e.tag,r;if((r=i!==3&&i!==27)&&((r=i===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Lc(e.type,e.memoizedProps)),r=!r),r&&Ue&&Qn(e),Eh(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ue=Ym(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ue=Ym(e)}else i===27?(i=Ue,ui(e.type)?(e=Oc,Oc=null,Ue=e):Ue=i):Ue=ft?Qt(e.stateNode.nextSibling):null;return!0}function Li(){Ue=ft=null,xe=!1}function cu(){var e=Xn;return e!==null&&(xt===null?xt=e:xt.push.apply(xt,e),Xn=null),e}function cr(e){Xn===null?Xn=[e]:Xn.push(e)}var du=k(null),wi=null,xn=null;function Zn(e,i,r){J(du,i._currentValue),i._currentValue=r}function Ln(e){e._currentValue=du.current,$(du)}function fu(e,i,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,o!==null&&(o.childLanes|=i)):o!==null&&(o.childLanes&i)!==i&&(o.childLanes|=i),e===r)break;e=e.return}}function hu(e,i,r,o){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var p=d.dependencies;if(p!==null){var _=d.child;p=p.firstContext;e:for(;p!==null;){var C=p;p=d;for(var x=0;x<i.length;x++)if(C.context===i[x]){p.lanes|=r,C=p.alternate,C!==null&&(C.lanes|=r),fu(p.return,r,e),o||(_=null);break e}p=C.next}}else if(d.tag===18){if(_=d.return,_===null)throw Error(l(341));_.lanes|=r,p=_.alternate,p!==null&&(p.lanes|=r),fu(_,r,e),_=null}else _=d.child;if(_!==null)_.return=d;else for(_=d;_!==null;){if(_===e){_=null;break}if(d=_.sibling,d!==null){d.return=_.return,_=d;break}_=_.return}d=_}}function fa(e,i,r,o){e=null;for(var d=i,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var _=d.alternate;if(_===null)throw Error(l(387));if(_=_.memoizedProps,_!==null){var C=d.type;Mt(d.pendingProps.value,_.value)||(e!==null?e.push(C):e=[C])}}else if(d===Ce.current){if(_=d.alternate,_===null)throw Error(l(387));_.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Hr):e=[Hr])}d=d.return}e!==null&&hu(i,e,r,o),i.flags|=262144}function Il(e){for(e=e.firstContext;e!==null;){if(!Mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ri(e){wi=e,xn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ht(e){return Ch(wi,e)}function zl(e,i){return wi===null&&Ri(e),Ch(e,i)}function Ch(e,i){var r=i._currentValue;if(i={context:i,memoizedValue:r,next:null},xn===null){if(e===null)throw Error(l(308));xn=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else xn=xn.next=i;return r}var ob=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){i.aborted=!0,e.forEach(function(r){return r()})}},sb=t.unstable_scheduleCallback,ub=t.unstable_NormalPriority,Qe={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pu(){return{controller:new ob,data:new Map,refCount:0}}function dr(e){e.refCount--,e.refCount===0&&sb(ub,function(){e.controller.abort()})}var fr=null,mu=0,ha=0,pa=null;function cb(e,i){if(fr===null){var r=fr=[];mu=0,ha=_c(),pa={status:"pending",value:void 0,then:function(o){r.push(o)}}}return mu++,i.then(Ah,Ah),i}function Ah(){if(--mu===0&&fr!==null){pa!==null&&(pa.status="fulfilled");var e=fr;fr=null,ha=0,pa=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function db(e,i){var r=[],o={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){o.status="fulfilled",o.value=i;for(var d=0;d<r.length;d++)(0,r[d])(i)},function(d){for(o.status="rejected",o.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),o}var Th=M.S;M.S=function(e,i){sm=kt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&cb(e,i),Th!==null&&Th(e,i)};var ki=k(null);function gu(){var e=ki.current;return e!==null?e:Ie.pooledCache}function Hl(e,i){i===null?J(ki,ki.current):J(ki,i.pool)}function xh(){var e=gu();return e===null?null:{parent:Qe._currentValue,pool:e}}var ma=Error(l(460)),vu=Error(l(474)),Ul=Error(l(542)),Pl={then:function(){}};function Lh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wh(e,i,r){switch(r=e[r],r===void 0?e.push(i):r!==i&&(i.then(En,En),i=r),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,kh(e),e;default:if(typeof i.status=="string")i.then(En,En);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(o){if(i.status==="pending"){var d=i;d.status="fulfilled",d.value=o}},function(o){if(i.status==="pending"){var d=i;d.status="rejected",d.reason=o}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,kh(e),e}throw Oi=i,ma}}function Di(e){try{var i=e._init;return i(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Oi=r,ma):r}}var Oi=null;function Rh(){if(Oi===null)throw Error(l(459));var e=Oi;return Oi=null,e}function kh(e){if(e===ma||e===Ul)throw Error(l(483))}var ga=null,hr=0;function Vl(e){var i=hr;return hr+=1,ga===null&&(ga=[]),wh(ga,e,i)}function pr(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function Bl(e,i){throw i.$$typeof===y?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function Dh(e){function i(D,R){if(e){var N=D.deletions;N===null?(D.deletions=[R],D.flags|=16):N.push(R)}}function r(D,R){if(!e)return null;for(;R!==null;)i(D,R),R=R.sibling;return null}function o(D){for(var R=new Map;D!==null;)D.key!==null?R.set(D.key,D):R.set(D.index,D),D=D.sibling;return R}function d(D,R){return D=An(D,R),D.index=0,D.sibling=null,D}function p(D,R,N){return D.index=N,e?(N=D.alternate,N!==null?(N=N.index,N<R?(D.flags|=67108866,R):N):(D.flags|=67108866,R)):(D.flags|=1048576,R)}function _(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function C(D,R,N,G){return R===null||R.tag!==6?(R=ru(N,D.mode,G),R.return=D,R):(R=d(R,N),R.return=D,R)}function x(D,R,N,G){var le=N.type;return le===T?B(D,R,N.props.children,G,N.key):R!==null&&(R.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ne&&Di(le)===R.type)?(R=d(R,N.props),pr(R,N),R.return=D,R):(R=Ml(N.type,N.key,N.props,null,D.mode,G),pr(R,N),R.return=D,R)}function I(D,R,N,G){return R===null||R.tag!==4||R.stateNode.containerInfo!==N.containerInfo||R.stateNode.implementation!==N.implementation?(R=lu(N,D.mode,G),R.return=D,R):(R=d(R,N.children||[]),R.return=D,R)}function B(D,R,N,G,le){return R===null||R.tag!==7?(R=xi(N,D.mode,G,le),R.return=D,R):(R=d(R,N),R.return=D,R)}function q(D,R,N){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=ru(""+R,D.mode,N),R.return=D,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case b:return N=Ml(R.type,R.key,R.props,null,D.mode,N),pr(N,R),N.return=D,N;case E:return R=lu(R,D.mode,N),R.return=D,R;case ne:return R=Di(R),q(D,R,N)}if(fe(R)||Q(R))return R=xi(R,D.mode,N,null),R.return=D,R;if(typeof R.then=="function")return q(D,Vl(R),N);if(R.$$typeof===w)return q(D,zl(D,R),N);Bl(D,R)}return null}function H(D,R,N,G){var le=R!==null?R.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return le!==null?null:C(D,R,""+N,G);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case b:return N.key===le?x(D,R,N,G):null;case E:return N.key===le?I(D,R,N,G):null;case ne:return N=Di(N),H(D,R,N,G)}if(fe(N)||Q(N))return le!==null?null:B(D,R,N,G,null);if(typeof N.then=="function")return H(D,R,Vl(N),G);if(N.$$typeof===w)return H(D,R,zl(D,N),G);Bl(D,N)}return null}function P(D,R,N,G,le){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return D=D.get(N)||null,C(R,D,""+G,le);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case b:return D=D.get(G.key===null?N:G.key)||null,x(R,D,G,le);case E:return D=D.get(G.key===null?N:G.key)||null,I(R,D,G,le);case ne:return G=Di(G),P(D,R,N,G,le)}if(fe(G)||Q(G))return D=D.get(N)||null,B(R,D,G,le,null);if(typeof G.then=="function")return P(D,R,N,Vl(G),le);if(G.$$typeof===w)return P(D,R,N,zl(R,G),le);Bl(R,G)}return null}function ae(D,R,N,G){for(var le=null,Le=null,re=R,_e=R=0,Te=null;re!==null&&_e<N.length;_e++){re.index>_e?(Te=re,re=null):Te=re.sibling;var we=H(D,re,N[_e],G);if(we===null){re===null&&(re=Te);break}e&&re&&we.alternate===null&&i(D,re),R=p(we,R,_e),Le===null?le=we:Le.sibling=we,Le=we,re=Te}if(_e===N.length)return r(D,re),xe&&Tn(D,_e),le;if(re===null){for(;_e<N.length;_e++)re=q(D,N[_e],G),re!==null&&(R=p(re,R,_e),Le===null?le=re:Le.sibling=re,Le=re);return xe&&Tn(D,_e),le}for(re=o(re);_e<N.length;_e++)Te=P(re,D,_e,N[_e],G),Te!==null&&(e&&Te.alternate!==null&&re.delete(Te.key===null?_e:Te.key),R=p(Te,R,_e),Le===null?le=Te:Le.sibling=Te,Le=Te);return e&&re.forEach(function(pi){return i(D,pi)}),xe&&Tn(D,_e),le}function se(D,R,N,G){if(N==null)throw Error(l(151));for(var le=null,Le=null,re=R,_e=R=0,Te=null,we=N.next();re!==null&&!we.done;_e++,we=N.next()){re.index>_e?(Te=re,re=null):Te=re.sibling;var pi=H(D,re,we.value,G);if(pi===null){re===null&&(re=Te);break}e&&re&&pi.alternate===null&&i(D,re),R=p(pi,R,_e),Le===null?le=pi:Le.sibling=pi,Le=pi,re=Te}if(we.done)return r(D,re),xe&&Tn(D,_e),le;if(re===null){for(;!we.done;_e++,we=N.next())we=q(D,we.value,G),we!==null&&(R=p(we,R,_e),Le===null?le=we:Le.sibling=we,Le=we);return xe&&Tn(D,_e),le}for(re=o(re);!we.done;_e++,we=N.next())we=P(re,D,_e,we.value,G),we!==null&&(e&&we.alternate!==null&&re.delete(we.key===null?_e:we.key),R=p(we,R,_e),Le===null?le=we:Le.sibling=we,Le=we);return e&&re.forEach(function(ES){return i(D,ES)}),xe&&Tn(D,_e),le}function Ne(D,R,N,G){if(typeof N=="object"&&N!==null&&N.type===T&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case b:e:{for(var le=N.key;R!==null;){if(R.key===le){if(le=N.type,le===T){if(R.tag===7){r(D,R.sibling),G=d(R,N.props.children),G.return=D,D=G;break e}}else if(R.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ne&&Di(le)===R.type){r(D,R.sibling),G=d(R,N.props),pr(G,N),G.return=D,D=G;break e}r(D,R);break}else i(D,R);R=R.sibling}N.type===T?(G=xi(N.props.children,D.mode,G,N.key),G.return=D,D=G):(G=Ml(N.type,N.key,N.props,null,D.mode,G),pr(G,N),G.return=D,D=G)}return _(D);case E:e:{for(le=N.key;R!==null;){if(R.key===le)if(R.tag===4&&R.stateNode.containerInfo===N.containerInfo&&R.stateNode.implementation===N.implementation){r(D,R.sibling),G=d(R,N.children||[]),G.return=D,D=G;break e}else{r(D,R);break}else i(D,R);R=R.sibling}G=lu(N,D.mode,G),G.return=D,D=G}return _(D);case ne:return N=Di(N),Ne(D,R,N,G)}if(fe(N))return ae(D,R,N,G);if(Q(N)){if(le=Q(N),typeof le!="function")throw Error(l(150));return N=le.call(N),se(D,R,N,G)}if(typeof N.then=="function")return Ne(D,R,Vl(N),G);if(N.$$typeof===w)return Ne(D,R,zl(D,N),G);Bl(D,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,R!==null&&R.tag===6?(r(D,R.sibling),G=d(R,N),G.return=D,D=G):(r(D,R),G=ru(N,D.mode,G),G.return=D,D=G),_(D)):r(D,R)}return function(D,R,N,G){try{hr=0;var le=Ne(D,R,N,G);return ga=null,le}catch(re){if(re===ma||re===Ul)throw re;var Le=Nt(29,re,null,D.mode);return Le.lanes=G,Le.return=D,Le}}}var Mi=Dh(!0),Oh=Dh(!1),Kn=!1;function _u(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yu(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Jn(e,i,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Re&2)!==0){var d=o.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),o.pending=i,i=Ol(e),mh(e,null,r),i}return Dl(e,o,i,r),Ol(e)}function mr(e,i,r){if(i=i.updateQueue,i!==null&&(i=i.shared,(r&4194048)!==0)){var o=i.lanes;o&=e.pendingLanes,r|=o,i.lanes=r,Cf(e,r)}}function bu(e,i){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var d=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var _={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?d=p=_:p=p.next=_,r=r.next}while(r!==null);p===null?d=p=i:p=p.next=i}else d=p=i;r={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=i:e.next=i,r.lastBaseUpdate=i}var Su=!1;function gr(){if(Su){var e=pa;if(e!==null)throw e}}function vr(e,i,r,o){Su=!1;var d=e.updateQueue;Kn=!1;var p=d.firstBaseUpdate,_=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var x=C,I=x.next;x.next=null,_===null?p=I:_.next=I,_=x;var B=e.alternate;B!==null&&(B=B.updateQueue,C=B.lastBaseUpdate,C!==_&&(C===null?B.firstBaseUpdate=I:C.next=I,B.lastBaseUpdate=x))}if(p!==null){var q=d.baseState;_=0,B=I=x=null,C=p;do{var H=C.lane&-536870913,P=H!==C.lane;if(P?(Ae&H)===H:(o&H)===H){H!==0&&H===ha&&(Su=!0),B!==null&&(B=B.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var ae=e,se=C;H=i;var Ne=r;switch(se.tag){case 1:if(ae=se.payload,typeof ae=="function"){q=ae.call(Ne,q,H);break e}q=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=se.payload,H=typeof ae=="function"?ae.call(Ne,q,H):ae,H==null)break e;q=g({},q,H);break e;case 2:Kn=!0}}H=C.callback,H!==null&&(e.flags|=64,P&&(e.flags|=8192),P=d.callbacks,P===null?d.callbacks=[H]:P.push(H))}else P={lane:H,tag:C.tag,payload:C.payload,callback:C.callback,next:null},B===null?(I=B=P,x=q):B=B.next=P,_|=H;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;P=C,C=P.next,P.next=null,d.lastBaseUpdate=P,d.shared.pending=null}}while(!0);B===null&&(x=q),d.baseState=x,d.firstBaseUpdate=I,d.lastBaseUpdate=B,p===null&&(d.shared.lanes=0),ai|=_,e.lanes=_,e.memoizedState=q}}function Mh(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function Nh(e,i){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Mh(r[e],i)}var va=k(null),Gl=k(0);function Ih(e,i){e=zn,J(Gl,e),J(va,i),zn=e|i.baseLanes}function Eu(){J(Gl,zn),J(va,va.current)}function Cu(){zn=Gl.current,$(va),$(Gl)}var It=k(null),Xt=null;function ei(e){var i=e.alternate;J(Fe,Fe.current&1),J(It,e),Xt===null&&(i===null||va.current!==null||i.memoizedState!==null)&&(Xt=e)}function Au(e){J(Fe,Fe.current),J(It,e),Xt===null&&(Xt=e)}function zh(e){e.tag===22?(J(Fe,Fe.current),J(It,e),Xt===null&&(Xt=e)):ti()}function ti(){J(Fe,Fe.current),J(It,It.current)}function zt(e){$(It),Xt===e&&(Xt=null),$(Fe)}var Fe=k(0);function jl(e){for(var i=e;i!==null;){if(i.tag===13){var r=i.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||kc(r)||Dc(r)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var wn=0,ge=null,Oe=null,Ze=null,$l=!1,_a=!1,Ni=!1,ql=0,_r=0,ya=null,fb=0;function Ge(){throw Error(l(321))}function Tu(e,i){if(i===null)return!1;for(var r=0;r<i.length&&r<e.length;r++)if(!Mt(e[r],i[r]))return!1;return!0}function xu(e,i,r,o,d,p){return wn=p,ge=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=e===null||e.memoizedState===null?yp:Bu,Ni=!1,p=r(o,d),Ni=!1,_a&&(p=Uh(i,r,o,d)),Hh(e),p}function Hh(e){M.H=Sr;var i=Oe!==null&&Oe.next!==null;if(wn=0,Ze=Oe=ge=null,$l=!1,_r=0,ya=null,i)throw Error(l(300));e===null||Ke||(e=e.dependencies,e!==null&&Il(e)&&(Ke=!0))}function Uh(e,i,r,o){ge=e;var d=0;do{if(_a&&(ya=null),_r=0,_a=!1,25<=d)throw Error(l(301));if(d+=1,Ze=Oe=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}M.H=bp,p=i(r,o)}while(_a);return p}function hb(){var e=M.H,i=e.useState()[0];return i=typeof i.then=="function"?yr(i):i,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(ge.flags|=1024),i}function Lu(){var e=ql!==0;return ql=0,e}function wu(e,i,r){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~r}function Ru(e){if($l){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}$l=!1}wn=0,Ze=Oe=ge=null,_a=!1,_r=ql=0,ya=null}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?ge.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Ye(){if(Oe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var i=Ze===null?ge.memoizedState:Ze.next;if(i!==null)Ze=i,Oe=e;else{if(e===null)throw ge.alternate===null?Error(l(467)):Error(l(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Ze===null?ge.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function Fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yr(e){var i=_r;return _r+=1,ya===null&&(ya=[]),e=wh(ya,e,i),i=ge,(Ze===null?i.memoizedState:Ze.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?yp:Bu),e}function Yl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yr(e);if(e.$$typeof===w)return ht(e)}throw Error(l(438,String(e)))}function ku(e){var i=null,r=ge.updateQueue;if(r!==null&&(i=r.memoCache),i==null){var o=ge.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(i={data:o.data.map(function(d){return d.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),r===null&&(r=Fl(),ge.updateQueue=r),r.memoCache=i,r=i.data[i.index],r===void 0)for(r=i.data[i.index]=Array(e),o=0;o<e;o++)r[o]=F;return i.index++,r}function Rn(e,i){return typeof i=="function"?i(e):i}function Xl(e){var i=Ye();return Du(i,Oe,e)}function Du(e,i,r){var o=e.queue;if(o===null)throw Error(l(311));o.lastRenderedReducer=r;var d=e.baseQueue,p=o.pending;if(p!==null){if(d!==null){var _=d.next;d.next=p.next,p.next=_}i.baseQueue=d=p,o.pending=null}if(p=e.baseState,d===null)e.memoizedState=p;else{i=d.next;var C=_=null,x=null,I=i,B=!1;do{var q=I.lane&-536870913;if(q!==I.lane?(Ae&q)===q:(wn&q)===q){var H=I.revertLane;if(H===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),q===ha&&(B=!0);else if((wn&H)===H){I=I.next,H===ha&&(B=!0);continue}else q={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},x===null?(C=x=q,_=p):x=x.next=q,ge.lanes|=H,ai|=H;q=I.action,Ni&&r(p,q),p=I.hasEagerState?I.eagerState:r(p,q)}else H={lane:q,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},x===null?(C=x=H,_=p):x=x.next=H,ge.lanes|=q,ai|=q;I=I.next}while(I!==null&&I!==i);if(x===null?_=p:x.next=C,!Mt(p,e.memoizedState)&&(Ke=!0,B&&(r=pa,r!==null)))throw r;e.memoizedState=p,e.baseState=_,e.baseQueue=x,o.lastRenderedState=p}return d===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Ou(e){var i=Ye(),r=i.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=e;var o=r.dispatch,d=r.pending,p=i.memoizedState;if(d!==null){r.pending=null;var _=d=d.next;do p=e(p,_.action),_=_.next;while(_!==d);Mt(p,i.memoizedState)||(Ke=!0),i.memoizedState=p,i.baseQueue===null&&(i.baseState=p),r.lastRenderedState=p}return[p,o]}function Ph(e,i,r){var o=ge,d=Ye(),p=xe;if(p){if(r===void 0)throw Error(l(407));r=r()}else r=i();var _=!Mt((Oe||d).memoizedState,r);if(_&&(d.memoizedState=r,Ke=!0),d=d.queue,Iu(Gh.bind(null,o,d,e),[e]),d.getSnapshot!==i||_||Ze!==null&&Ze.memoizedState.tag&1){if(o.flags|=2048,ba(9,{destroy:void 0},Bh.bind(null,o,d,r,i),null),Ie===null)throw Error(l(349));p||(wn&127)!==0||Vh(o,i,r)}return r}function Vh(e,i,r){e.flags|=16384,e={getSnapshot:i,value:r},i=ge.updateQueue,i===null?(i=Fl(),ge.updateQueue=i,i.stores=[e]):(r=i.stores,r===null?i.stores=[e]:r.push(e))}function Bh(e,i,r,o){i.value=r,i.getSnapshot=o,jh(i)&&$h(e)}function Gh(e,i,r){return r(function(){jh(i)&&$h(e)})}function jh(e){var i=e.getSnapshot;e=e.value;try{var r=i();return!Mt(e,r)}catch{return!0}}function $h(e){var i=Ti(e,2);i!==null&&Lt(i,e,2)}function Mu(e){var i=bt();if(typeof e=="function"){var r=e;if(e=r(),Ni){$n(!0);try{r()}finally{$n(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rn,lastRenderedState:e},i}function qh(e,i,r,o){return e.baseState=r,Du(e,Oe,typeof o=="function"?o:Rn)}function pb(e,i,r,o,d){if(Kl(e))throw Error(l(485));if(e=i.action,e!==null){var p={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){p.listeners.push(_)}};M.T!==null?r(!0):p.isTransition=!1,o(p),r=i.pending,r===null?(p.next=i.pending=p,Fh(i,p)):(p.next=r.next,i.pending=r.next=p)}}function Fh(e,i){var r=i.action,o=i.payload,d=e.state;if(i.isTransition){var p=M.T,_={};M.T=_;try{var C=r(d,o),x=M.S;x!==null&&x(_,C),Yh(e,i,C)}catch(I){Nu(e,i,I)}finally{p!==null&&_.types!==null&&(p.types=_.types),M.T=p}}else try{p=r(d,o),Yh(e,i,p)}catch(I){Nu(e,i,I)}}function Yh(e,i,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){Xh(e,i,o)},function(o){return Nu(e,i,o)}):Xh(e,i,r)}function Xh(e,i,r){i.status="fulfilled",i.value=r,Qh(i),e.state=r,i=e.pending,i!==null&&(r=i.next,r===i?e.pending=null:(r=r.next,i.next=r,Fh(e,r)))}function Nu(e,i,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do i.status="rejected",i.reason=r,Qh(i),i=i.next;while(i!==o)}e.action=null}function Qh(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function Zh(e,i){return i}function Kh(e,i){if(xe){var r=Ie.formState;if(r!==null){e:{var o=ge;if(xe){if(Ue){t:{for(var d=Ue,p=Yt;d.nodeType!==8;){if(!p){d=null;break t}if(d=Qt(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){Ue=Qt(d.nextSibling),o=d.data==="F!";break e}}Qn(o)}o=!1}o&&(i=r[0])}}return r=bt(),r.memoizedState=r.baseState=i,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zh,lastRenderedState:i},r.queue=o,r=gp.bind(null,ge,o),o.dispatch=r,o=Mu(!1),p=Vu.bind(null,ge,!1,o.queue),o=bt(),d={state:i,dispatch:null,action:e,pending:null},o.queue=d,r=pb.bind(null,ge,d,p,r),d.dispatch=r,o.memoizedState=e,[i,r,!1]}function Wh(e){var i=Ye();return Jh(i,Oe,e)}function Jh(e,i,r){if(i=Du(e,i,Zh)[0],e=Xl(Rn)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var o=yr(i)}catch(_){throw _===ma?Ul:_}else o=i;i=Ye();var d=i.queue,p=d.dispatch;return r!==i.memoizedState&&(ge.flags|=2048,ba(9,{destroy:void 0},mb.bind(null,d,r),null)),[o,p,e]}function mb(e,i){e.action=i}function ep(e){var i=Ye(),r=Oe;if(r!==null)return Jh(i,r,e);Ye(),i=i.memoizedState,r=Ye();var o=r.queue.dispatch;return r.memoizedState=e,[i,o,!1]}function ba(e,i,r,o){return e={tag:e,create:r,deps:o,inst:i,next:null},i=ge.updateQueue,i===null&&(i=Fl(),ge.updateQueue=i),r=i.lastEffect,r===null?i.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,i.lastEffect=e),e}function tp(){return Ye().memoizedState}function Ql(e,i,r,o){var d=bt();ge.flags|=e,d.memoizedState=ba(1|i,{destroy:void 0},r,o===void 0?null:o)}function Zl(e,i,r,o){var d=Ye();o=o===void 0?null:o;var p=d.memoizedState.inst;Oe!==null&&o!==null&&Tu(o,Oe.memoizedState.deps)?d.memoizedState=ba(i,p,r,o):(ge.flags|=e,d.memoizedState=ba(1|i,p,r,o))}function np(e,i){Ql(8390656,8,e,i)}function Iu(e,i){Zl(2048,8,e,i)}function gb(e){ge.flags|=4;var i=ge.updateQueue;if(i===null)i=Fl(),ge.updateQueue=i,i.events=[e];else{var r=i.events;r===null?i.events=[e]:r.push(e)}}function ip(e){var i=Ye().memoizedState;return gb({ref:i,nextImpl:e}),function(){if((Re&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function ap(e,i){return Zl(4,2,e,i)}function rp(e,i){return Zl(4,4,e,i)}function lp(e,i){if(typeof i=="function"){e=e();var r=i(e);return function(){typeof r=="function"?r():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function op(e,i,r){r=r!=null?r.concat([e]):null,Zl(4,4,lp.bind(null,i,e),r)}function zu(){}function sp(e,i){var r=Ye();i=i===void 0?null:i;var o=r.memoizedState;return i!==null&&Tu(i,o[1])?o[0]:(r.memoizedState=[e,i],e)}function up(e,i){var r=Ye();i=i===void 0?null:i;var o=r.memoizedState;if(i!==null&&Tu(i,o[1]))return o[0];if(o=e(),Ni){$n(!0);try{e()}finally{$n(!1)}}return r.memoizedState=[o,i],o}function Hu(e,i,r){return r===void 0||(wn&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=i:(e.memoizedState=r,e=cm(),ge.lanes|=e,ai|=e,r)}function cp(e,i,r,o){return Mt(r,i)?r:va.current!==null?(e=Hu(e,r,o),Mt(e,i)||(Ke=!0),e):(wn&42)===0||(wn&1073741824)!==0&&(Ae&261930)===0?(Ke=!0,e.memoizedState=r):(e=cm(),ge.lanes|=e,ai|=e,i)}function dp(e,i,r,o,d){var p=Y.p;Y.p=p!==0&&8>p?p:8;var _=M.T,C={};M.T=C,Vu(e,!1,i,r);try{var x=d(),I=M.S;if(I!==null&&I(C,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var B=db(x,o);br(e,i,B,Pt(e))}else br(e,i,o,Pt(e))}catch(q){br(e,i,{then:function(){},status:"rejected",reason:q},Pt())}finally{Y.p=p,_!==null&&C.types!==null&&(_.types=C.types),M.T=_}}function vb(){}function Uu(e,i,r,o){if(e.tag!==5)throw Error(l(476));var d=fp(e).queue;dp(e,d,i,te,r===null?vb:function(){return hp(e),r(o)})}function fp(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rn,lastRenderedState:te},next:null};var r={};return i.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rn,lastRenderedState:r},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function hp(e){var i=fp(e);i.next===null&&(i=e.alternate.memoizedState),br(e,i.next.queue,{},Pt())}function Pu(){return ht(Hr)}function pp(){return Ye().memoizedState}function mp(){return Ye().memoizedState}function _b(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var r=Pt();e=Wn(r);var o=Jn(i,e,r);o!==null&&(Lt(o,i,r),mr(o,i,r)),i={cache:pu()},e.payload=i;return}i=i.return}}function yb(e,i,r){var o=Pt();r={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Kl(e)?vp(i,r):(r=iu(e,i,r,o),r!==null&&(Lt(r,e,o),_p(r,i,o)))}function gp(e,i,r){var o=Pt();br(e,i,r,o)}function br(e,i,r,o){var d={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Kl(e))vp(i,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=i.lastRenderedReducer,p!==null))try{var _=i.lastRenderedState,C=p(_,r);if(d.hasEagerState=!0,d.eagerState=C,Mt(C,_))return Dl(e,i,d,0),Ie===null&&kl(),!1}catch{}if(r=iu(e,i,d,o),r!==null)return Lt(r,e,o),_p(r,i,o),!0}return!1}function Vu(e,i,r,o){if(o={lane:2,revertLane:_c(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Kl(e)){if(i)throw Error(l(479))}else i=iu(e,r,o,2),i!==null&&Lt(i,e,2)}function Kl(e){var i=e.alternate;return e===ge||i!==null&&i===ge}function vp(e,i){_a=$l=!0;var r=e.pending;r===null?i.next=i:(i.next=r.next,r.next=i),e.pending=i}function _p(e,i,r){if((r&4194048)!==0){var o=i.lanes;o&=e.pendingLanes,r|=o,i.lanes=r,Cf(e,r)}}var Sr={readContext:ht,use:Yl,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Sr.useEffectEvent=Ge;var yp={readContext:ht,use:Yl,useCallback:function(e,i){return bt().memoizedState=[e,i===void 0?null:i],e},useContext:ht,useEffect:np,useImperativeHandle:function(e,i,r){r=r!=null?r.concat([e]):null,Ql(4194308,4,lp.bind(null,i,e),r)},useLayoutEffect:function(e,i){return Ql(4194308,4,e,i)},useInsertionEffect:function(e,i){Ql(4,2,e,i)},useMemo:function(e,i){var r=bt();i=i===void 0?null:i;var o=e();if(Ni){$n(!0);try{e()}finally{$n(!1)}}return r.memoizedState=[o,i],o},useReducer:function(e,i,r){var o=bt();if(r!==void 0){var d=r(i);if(Ni){$n(!0);try{r(i)}finally{$n(!1)}}}else d=i;return o.memoizedState=o.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},o.queue=e,e=e.dispatch=yb.bind(null,ge,e),[o.memoizedState,e]},useRef:function(e){var i=bt();return e={current:e},i.memoizedState=e},useState:function(e){e=Mu(e);var i=e.queue,r=gp.bind(null,ge,i);return i.dispatch=r,[e.memoizedState,r]},useDebugValue:zu,useDeferredValue:function(e,i){var r=bt();return Hu(r,e,i)},useTransition:function(){var e=Mu(!1);return e=dp.bind(null,ge,e.queue,!0,!1),bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,r){var o=ge,d=bt();if(xe){if(r===void 0)throw Error(l(407));r=r()}else{if(r=i(),Ie===null)throw Error(l(349));(Ae&127)!==0||Vh(o,i,r)}d.memoizedState=r;var p={value:r,getSnapshot:i};return d.queue=p,np(Gh.bind(null,o,p,e),[e]),o.flags|=2048,ba(9,{destroy:void 0},Bh.bind(null,o,p,r,i),null),r},useId:function(){var e=bt(),i=Ie.identifierPrefix;if(xe){var r=fn,o=dn;r=(o&~(1<<32-Ot(o)-1)).toString(32)+r,i="_"+i+"R_"+r,r=ql++,0<r&&(i+="H"+r.toString(32)),i+="_"}else r=fb++,i="_"+i+"r_"+r.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:Pu,useFormState:Kh,useActionState:Kh,useOptimistic:function(e){var i=bt();i.memoizedState=i.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=r,i=Vu.bind(null,ge,!0,r),r.dispatch=i,[e,i]},useMemoCache:ku,useCacheRefresh:function(){return bt().memoizedState=_b.bind(null,ge)},useEffectEvent:function(e){var i=bt(),r={impl:e};return i.memoizedState=r,function(){if((Re&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},Bu={readContext:ht,use:Yl,useCallback:sp,useContext:ht,useEffect:Iu,useImperativeHandle:op,useInsertionEffect:ap,useLayoutEffect:rp,useMemo:up,useReducer:Xl,useRef:tp,useState:function(){return Xl(Rn)},useDebugValue:zu,useDeferredValue:function(e,i){var r=Ye();return cp(r,Oe.memoizedState,e,i)},useTransition:function(){var e=Xl(Rn)[0],i=Ye().memoizedState;return[typeof e=="boolean"?e:yr(e),i]},useSyncExternalStore:Ph,useId:pp,useHostTransitionStatus:Pu,useFormState:Wh,useActionState:Wh,useOptimistic:function(e,i){var r=Ye();return qh(r,Oe,e,i)},useMemoCache:ku,useCacheRefresh:mp};Bu.useEffectEvent=ip;var bp={readContext:ht,use:Yl,useCallback:sp,useContext:ht,useEffect:Iu,useImperativeHandle:op,useInsertionEffect:ap,useLayoutEffect:rp,useMemo:up,useReducer:Ou,useRef:tp,useState:function(){return Ou(Rn)},useDebugValue:zu,useDeferredValue:function(e,i){var r=Ye();return Oe===null?Hu(r,e,i):cp(r,Oe.memoizedState,e,i)},useTransition:function(){var e=Ou(Rn)[0],i=Ye().memoizedState;return[typeof e=="boolean"?e:yr(e),i]},useSyncExternalStore:Ph,useId:pp,useHostTransitionStatus:Pu,useFormState:ep,useActionState:ep,useOptimistic:function(e,i){var r=Ye();return Oe!==null?qh(r,Oe,e,i):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:ku,useCacheRefresh:mp};bp.useEffectEvent=ip;function Gu(e,i,r,o){i=e.memoizedState,r=r(o,i),r=r==null?i:g({},i,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ju={enqueueSetState:function(e,i,r){e=e._reactInternals;var o=Pt(),d=Wn(o);d.payload=i,r!=null&&(d.callback=r),i=Jn(e,d,o),i!==null&&(Lt(i,e,o),mr(i,e,o))},enqueueReplaceState:function(e,i,r){e=e._reactInternals;var o=Pt(),d=Wn(o);d.tag=1,d.payload=i,r!=null&&(d.callback=r),i=Jn(e,d,o),i!==null&&(Lt(i,e,o),mr(i,e,o))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var r=Pt(),o=Wn(r);o.tag=2,i!=null&&(o.callback=i),i=Jn(e,o,r),i!==null&&(Lt(i,e,r),mr(i,e,r))}};function Sp(e,i,r,o,d,p,_){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,p,_):i.prototype&&i.prototype.isPureReactComponent?!or(r,o)||!or(d,p):!0}function Ep(e,i,r,o){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(r,o),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(r,o),i.state!==e&&ju.enqueueReplaceState(i,i.state,null)}function Ii(e,i){var r=i;if("ref"in i){r={};for(var o in i)o!=="ref"&&(r[o]=i[o])}if(e=e.defaultProps){r===i&&(r=g({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function Cp(e){Rl(e)}function Ap(e){console.error(e)}function Tp(e){Rl(e)}function Wl(e,i){try{var r=e.onUncaughtError;r(i.value,{componentStack:i.stack})}catch(o){setTimeout(function(){throw o})}}function xp(e,i,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function $u(e,i,r){return r=Wn(r),r.tag=3,r.payload={element:null},r.callback=function(){Wl(e,i)},r}function Lp(e){return e=Wn(e),e.tag=3,e}function wp(e,i,r,o){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=o.value;e.payload=function(){return d(p)},e.callback=function(){xp(i,r,o)}}var _=r.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(e.callback=function(){xp(i,r,o),typeof d!="function"&&(ri===null?ri=new Set([this]):ri.add(this));var C=o.stack;this.componentDidCatch(o.value,{componentStack:C!==null?C:""})})}function bb(e,i,r,o,d){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(i=r.alternate,i!==null&&fa(i,r,d,!0),r=It.current,r!==null){switch(r.tag){case 31:case 13:return Xt===null?co():r.alternate===null&&je===0&&(je=3),r.flags&=-257,r.flags|=65536,r.lanes=d,o===Pl?r.flags|=16384:(i=r.updateQueue,i===null?r.updateQueue=new Set([o]):i.add(o),mc(e,o,d)),!1;case 22:return r.flags|=65536,o===Pl?r.flags|=16384:(i=r.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=i):(r=i.retryQueue,r===null?i.retryQueue=new Set([o]):r.add(o)),mc(e,o,d)),!1}throw Error(l(435,r.tag))}return mc(e,o,d),co(),!1}if(xe)return i=It.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=d,o!==uu&&(e=Error(l(422),{cause:o}),cr($t(e,r)))):(o!==uu&&(i=Error(l(423),{cause:o}),cr($t(i,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,o=$t(o,r),d=$u(e.stateNode,o,d),bu(e,d),je!==4&&(je=2)),!1;var p=Error(l(520),{cause:o});if(p=$t(p,r),Rr===null?Rr=[p]:Rr.push(p),je!==4&&(je=2),i===null)return!0;o=$t(o,r),r=i;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=$u(r.stateNode,o,e),bu(r,e),!1;case 1:if(i=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(ri===null||!ri.has(p))))return r.flags|=65536,d&=-d,r.lanes|=d,d=Lp(d),wp(d,e,r,o),bu(r,d),!1}r=r.return}while(r!==null);return!1}var qu=Error(l(461)),Ke=!1;function pt(e,i,r,o){i.child=e===null?Oh(i,null,r,o):Mi(i,e.child,r,o)}function Rp(e,i,r,o,d){r=r.render;var p=i.ref;if("ref"in o){var _={};for(var C in o)C!=="ref"&&(_[C]=o[C])}else _=o;return Ri(i),o=xu(e,i,r,_,p,d),C=Lu(),e!==null&&!Ke?(wu(e,i,d),kn(e,i,d)):(xe&&C&&ou(i),i.flags|=1,pt(e,i,o,d),i.child)}function kp(e,i,r,o,d){if(e===null){var p=r.type;return typeof p=="function"&&!au(p)&&p.defaultProps===void 0&&r.compare===null?(i.tag=15,i.type=p,Dp(e,i,p,o,d)):(e=Ml(r.type,null,o,i,i.mode,d),e.ref=i.ref,e.return=i,i.child=e)}if(p=e.child,!Ju(e,d)){var _=p.memoizedProps;if(r=r.compare,r=r!==null?r:or,r(_,o)&&e.ref===i.ref)return kn(e,i,d)}return i.flags|=1,e=An(p,o),e.ref=i.ref,e.return=i,i.child=e}function Dp(e,i,r,o,d){if(e!==null){var p=e.memoizedProps;if(or(p,o)&&e.ref===i.ref)if(Ke=!1,i.pendingProps=o=p,Ju(e,d))(e.flags&131072)!==0&&(Ke=!0);else return i.lanes=e.lanes,kn(e,i,d)}return Fu(e,i,r,o,d)}function Op(e,i,r,o){var d=o.children,p=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((i.flags&128)!==0){if(p=p!==null?p.baseLanes|r:r,e!==null){for(o=i.child=e.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~p}else o=0,i.child=null;return Mp(e,i,p,r,o)}if((r&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hl(i,p!==null?p.cachePool:null),p!==null?Ih(i,p):Eu(),zh(i);else return o=i.lanes=536870912,Mp(e,i,p!==null?p.baseLanes|r:r,r,o)}else p!==null?(Hl(i,p.cachePool),Ih(i,p),ti(),i.memoizedState=null):(e!==null&&Hl(i,null),Eu(),ti());return pt(e,i,d,r),i.child}function Er(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Mp(e,i,r,o,d){var p=gu();return p=p===null?null:{parent:Qe._currentValue,pool:p},i.memoizedState={baseLanes:r,cachePool:p},e!==null&&Hl(i,null),Eu(),zh(i),e!==null&&fa(e,i,o,!0),i.childLanes=d,null}function Jl(e,i){return i=to({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function Np(e,i,r){return Mi(i,e.child,null,r),e=Jl(i,i.pendingProps),e.flags|=2,zt(i),i.memoizedState=null,e}function Sb(e,i,r){var o=i.pendingProps,d=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(xe){if(o.mode==="hidden")return e=Jl(i,o),i.lanes=536870912,Er(null,e);if(Au(i),(e=Ue)?(e=Fm(e,Yt),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Yn!==null?{id:dn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},r=vh(e),r.return=i,i.child=r,ft=i,Ue=null)):e=null,e===null)throw Qn(i);return i.lanes=536870912,null}return Jl(i,o)}var p=e.memoizedState;if(p!==null){var _=p.dehydrated;if(Au(i),d)if(i.flags&256)i.flags&=-257,i=Np(e,i,r);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(Ke||fa(e,i,r,!1),d=(r&e.childLanes)!==0,Ke||d){if(o=Ie,o!==null&&(_=Af(o,r),_!==0&&_!==p.retryLane))throw p.retryLane=_,Ti(e,_),Lt(o,e,_),qu;co(),i=Np(e,i,r)}else e=p.treeContext,Ue=Qt(_.nextSibling),ft=i,xe=!0,Xn=null,Yt=!1,e!==null&&bh(i,e),i=Jl(i,o),i.flags|=4096;return i}return e=An(e.child,{mode:o.mode,children:o.children}),e.ref=i.ref,i.child=e,e.return=i,e}function eo(e,i){var r=i.ref;if(r===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(e===null||e.ref!==r)&&(i.flags|=4194816)}}function Fu(e,i,r,o,d){return Ri(i),r=xu(e,i,r,o,void 0,d),o=Lu(),e!==null&&!Ke?(wu(e,i,d),kn(e,i,d)):(xe&&o&&ou(i),i.flags|=1,pt(e,i,r,d),i.child)}function Ip(e,i,r,o,d,p){return Ri(i),i.updateQueue=null,r=Uh(i,o,r,d),Hh(e),o=Lu(),e!==null&&!Ke?(wu(e,i,p),kn(e,i,p)):(xe&&o&&ou(i),i.flags|=1,pt(e,i,r,p),i.child)}function zp(e,i,r,o,d){if(Ri(i),i.stateNode===null){var p=sa,_=r.contextType;typeof _=="object"&&_!==null&&(p=ht(_)),p=new r(o,p),i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=ju,i.stateNode=p,p._reactInternals=i,p=i.stateNode,p.props=o,p.state=i.memoizedState,p.refs={},_u(i),_=r.contextType,p.context=typeof _=="object"&&_!==null?ht(_):sa,p.state=i.memoizedState,_=r.getDerivedStateFromProps,typeof _=="function"&&(Gu(i,r,_,o),p.state=i.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(_=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),_!==p.state&&ju.enqueueReplaceState(p,p.state,null),vr(i,o,p,d),gr(),p.state=i.memoizedState),typeof p.componentDidMount=="function"&&(i.flags|=4194308),o=!0}else if(e===null){p=i.stateNode;var C=i.memoizedProps,x=Ii(r,C);p.props=x;var I=p.context,B=r.contextType;_=sa,typeof B=="object"&&B!==null&&(_=ht(B));var q=r.getDerivedStateFromProps;B=typeof q=="function"||typeof p.getSnapshotBeforeUpdate=="function",C=i.pendingProps!==C,B||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(C||I!==_)&&Ep(i,p,o,_),Kn=!1;var H=i.memoizedState;p.state=H,vr(i,o,p,d),gr(),I=i.memoizedState,C||H!==I||Kn?(typeof q=="function"&&(Gu(i,r,q,o),I=i.memoizedState),(x=Kn||Sp(i,r,x,o,H,I,_))?(B||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(i.flags|=4194308)):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=o,i.memoizedState=I),p.props=o,p.state=I,p.context=_,o=x):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),o=!1)}else{p=i.stateNode,yu(e,i),_=i.memoizedProps,B=Ii(r,_),p.props=B,q=i.pendingProps,H=p.context,I=r.contextType,x=sa,typeof I=="object"&&I!==null&&(x=ht(I)),C=r.getDerivedStateFromProps,(I=typeof C=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(_!==q||H!==x)&&Ep(i,p,o,x),Kn=!1,H=i.memoizedState,p.state=H,vr(i,o,p,d),gr();var P=i.memoizedState;_!==q||H!==P||Kn||e!==null&&e.dependencies!==null&&Il(e.dependencies)?(typeof C=="function"&&(Gu(i,r,C,o),P=i.memoizedState),(B=Kn||Sp(i,r,B,o,H,P,x)||e!==null&&e.dependencies!==null&&Il(e.dependencies))?(I||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,P,x),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,P,x)),typeof p.componentDidUpdate=="function"&&(i.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof p.componentDidUpdate!="function"||_===e.memoizedProps&&H===e.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&H===e.memoizedState||(i.flags|=1024),i.memoizedProps=o,i.memoizedState=P),p.props=o,p.state=P,p.context=x,o=B):(typeof p.componentDidUpdate!="function"||_===e.memoizedProps&&H===e.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&H===e.memoizedState||(i.flags|=1024),o=!1)}return p=o,eo(e,i),o=(i.flags&128)!==0,p||o?(p=i.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:p.render(),i.flags|=1,e!==null&&o?(i.child=Mi(i,e.child,null,d),i.child=Mi(i,null,r,d)):pt(e,i,r,d),i.memoizedState=p.state,e=i.child):e=kn(e,i,d),e}function Hp(e,i,r,o){return Li(),i.flags|=256,pt(e,i,r,o),i.child}var Yu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xu(e){return{baseLanes:e,cachePool:xh()}}function Qu(e,i,r){return e=e!==null?e.childLanes&~r:0,i&&(e|=Ut),e}function Up(e,i,r){var o=i.pendingProps,d=!1,p=(i.flags&128)!==0,_;if((_=p)||(_=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),_&&(d=!0,i.flags&=-129),_=(i.flags&32)!==0,i.flags&=-33,e===null){if(xe){if(d?ei(i):ti(),(e=Ue)?(e=Fm(e,Yt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Yn!==null?{id:dn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},r=vh(e),r.return=i,i.child=r,ft=i,Ue=null)):e=null,e===null)throw Qn(i);return Dc(e)?i.lanes=32:i.lanes=536870912,null}var C=o.children;return o=o.fallback,d?(ti(),d=i.mode,C=to({mode:"hidden",children:C},d),o=xi(o,d,r,null),C.return=i,o.return=i,C.sibling=o,i.child=C,o=i.child,o.memoizedState=Xu(r),o.childLanes=Qu(e,_,r),i.memoizedState=Yu,Er(null,o)):(ei(i),Zu(i,C))}var x=e.memoizedState;if(x!==null&&(C=x.dehydrated,C!==null)){if(p)i.flags&256?(ei(i),i.flags&=-257,i=Ku(e,i,r)):i.memoizedState!==null?(ti(),i.child=e.child,i.flags|=128,i=null):(ti(),C=o.fallback,d=i.mode,o=to({mode:"visible",children:o.children},d),C=xi(C,d,r,null),C.flags|=2,o.return=i,C.return=i,o.sibling=C,i.child=o,Mi(i,e.child,null,r),o=i.child,o.memoizedState=Xu(r),o.childLanes=Qu(e,_,r),i.memoizedState=Yu,i=Er(null,o));else if(ei(i),Dc(C)){if(_=C.nextSibling&&C.nextSibling.dataset,_)var I=_.dgst;_=I,o=Error(l(419)),o.stack="",o.digest=_,cr({value:o,source:null,stack:null}),i=Ku(e,i,r)}else if(Ke||fa(e,i,r,!1),_=(r&e.childLanes)!==0,Ke||_){if(_=Ie,_!==null&&(o=Af(_,r),o!==0&&o!==x.retryLane))throw x.retryLane=o,Ti(e,o),Lt(_,e,o),qu;kc(C)||co(),i=Ku(e,i,r)}else kc(C)?(i.flags|=192,i.child=e.child,i=null):(e=x.treeContext,Ue=Qt(C.nextSibling),ft=i,xe=!0,Xn=null,Yt=!1,e!==null&&bh(i,e),i=Zu(i,o.children),i.flags|=4096);return i}return d?(ti(),C=o.fallback,d=i.mode,x=e.child,I=x.sibling,o=An(x,{mode:"hidden",children:o.children}),o.subtreeFlags=x.subtreeFlags&65011712,I!==null?C=An(I,C):(C=xi(C,d,r,null),C.flags|=2),C.return=i,o.return=i,o.sibling=C,i.child=o,Er(null,o),o=i.child,C=e.child.memoizedState,C===null?C=Xu(r):(d=C.cachePool,d!==null?(x=Qe._currentValue,d=d.parent!==x?{parent:x,pool:x}:d):d=xh(),C={baseLanes:C.baseLanes|r,cachePool:d}),o.memoizedState=C,o.childLanes=Qu(e,_,r),i.memoizedState=Yu,Er(e.child,o)):(ei(i),r=e.child,e=r.sibling,r=An(r,{mode:"visible",children:o.children}),r.return=i,r.sibling=null,e!==null&&(_=i.deletions,_===null?(i.deletions=[e],i.flags|=16):_.push(e)),i.child=r,i.memoizedState=null,r)}function Zu(e,i){return i=to({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function to(e,i){return e=Nt(22,e,null,i),e.lanes=0,e}function Ku(e,i,r){return Mi(i,e.child,null,r),e=Zu(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function Pp(e,i,r){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i),fu(e.return,i,r)}function Wu(e,i,r,o,d,p){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:d,treeForkCount:p}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=o,_.tail=r,_.tailMode=d,_.treeForkCount=p)}function Vp(e,i,r){var o=i.pendingProps,d=o.revealOrder,p=o.tail;o=o.children;var _=Fe.current,C=(_&2)!==0;if(C?(_=_&1|2,i.flags|=128):_&=1,J(Fe,_),pt(e,i,o,r),o=xe?ur:0,!C&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pp(e,r,i);else if(e.tag===19)Pp(e,r,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break e;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=i.child,d=null;r!==null;)e=r.alternate,e!==null&&jl(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=i.child,i.child=null):(d=r.sibling,r.sibling=null),Wu(i,!1,d,r,p,o);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=i.child,i.child=null;d!==null;){if(e=d.alternate,e!==null&&jl(e)===null){i.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}Wu(i,!0,r,null,p,o);break;case"together":Wu(i,!1,null,null,void 0,o);break;default:i.memoizedState=null}return i.child}function kn(e,i,r){if(e!==null&&(i.dependencies=e.dependencies),ai|=i.lanes,(r&i.childLanes)===0)if(e!==null){if(fa(e,i,r,!1),(r&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,r=An(e,e.pendingProps),i.child=r,r.return=i;e.sibling!==null;)e=e.sibling,r=r.sibling=An(e,e.pendingProps),r.return=i;r.sibling=null}return i.child}function Ju(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&Il(e)))}function Eb(e,i,r){switch(i.tag){case 3:$e(i,i.stateNode.containerInfo),Zn(i,Qe,e.memoizedState.cache),Li();break;case 27:case 5:qe(i);break;case 4:$e(i,i.stateNode.containerInfo);break;case 10:Zn(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Au(i),null;break;case 13:var o=i.memoizedState;if(o!==null)return o.dehydrated!==null?(ei(i),i.flags|=128,null):(r&i.child.childLanes)!==0?Up(e,i,r):(ei(i),e=kn(e,i,r),e!==null?e.sibling:null);ei(i);break;case 19:var d=(e.flags&128)!==0;if(o=(r&i.childLanes)!==0,o||(fa(e,i,r,!1),o=(r&i.childLanes)!==0),d){if(o)return Vp(e,i,r);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),J(Fe,Fe.current),o)break;return null;case 22:return i.lanes=0,Op(e,i,r,i.pendingProps);case 24:Zn(i,Qe,e.memoizedState.cache)}return kn(e,i,r)}function Bp(e,i,r){if(e!==null)if(e.memoizedProps!==i.pendingProps)Ke=!0;else{if(!Ju(e,r)&&(i.flags&128)===0)return Ke=!1,Eb(e,i,r);Ke=(e.flags&131072)!==0}else Ke=!1,xe&&(i.flags&1048576)!==0&&yh(i,ur,i.index);switch(i.lanes=0,i.tag){case 16:e:{var o=i.pendingProps;if(e=Di(i.elementType),i.type=e,typeof e=="function")au(e)?(o=Ii(e,o),i.tag=1,i=zp(null,i,e,o,r)):(i.tag=0,i=Fu(null,i,e,o,r));else{if(e!=null){var d=e.$$typeof;if(d===z){i.tag=11,i=Rp(null,i,e,o,r);break e}else if(d===j){i.tag=14,i=kp(null,i,e,o,r);break e}}throw i=oe(e)||e,Error(l(306,i,""))}}return i;case 0:return Fu(e,i,i.type,i.pendingProps,r);case 1:return o=i.type,d=Ii(o,i.pendingProps),zp(e,i,o,d,r);case 3:e:{if($e(i,i.stateNode.containerInfo),e===null)throw Error(l(387));o=i.pendingProps;var p=i.memoizedState;d=p.element,yu(e,i),vr(i,o,null,r);var _=i.memoizedState;if(o=_.cache,Zn(i,Qe,o),o!==p.cache&&hu(i,[Qe],r,!0),gr(),o=_.element,p.isDehydrated)if(p={element:o,isDehydrated:!1,cache:_.cache},i.updateQueue.baseState=p,i.memoizedState=p,i.flags&256){i=Hp(e,i,o,r);break e}else if(o!==d){d=$t(Error(l(424)),i),cr(d),i=Hp(e,i,o,r);break e}else for(e=i.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ue=Qt(e.firstChild),ft=i,xe=!0,Xn=null,Yt=!0,r=Oh(i,null,o,r),i.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Li(),o===d){i=kn(e,i,r);break e}pt(e,i,o,r)}i=i.child}return i;case 26:return eo(e,i),e===null?(r=Wm(i.type,null,i.pendingProps,null))?i.memoizedState=r:xe||(r=i.type,e=i.pendingProps,o=_o(ve.current).createElement(r),o[dt]=i,o[St]=e,mt(o,r,e),lt(o),i.stateNode=o):i.memoizedState=Wm(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return qe(i),e===null&&xe&&(o=i.stateNode=Qm(i.type,i.pendingProps,ve.current),ft=i,Yt=!0,d=Ue,ui(i.type)?(Oc=d,Ue=Qt(o.firstChild)):Ue=d),pt(e,i,i.pendingProps.children,r),eo(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&xe&&((d=o=Ue)&&(o=Wb(o,i.type,i.pendingProps,Yt),o!==null?(i.stateNode=o,ft=i,Ue=Qt(o.firstChild),Yt=!1,d=!0):d=!1),d||Qn(i)),qe(i),d=i.type,p=i.pendingProps,_=e!==null?e.memoizedProps:null,o=p.children,Lc(d,p)?o=null:_!==null&&Lc(d,_)&&(i.flags|=32),i.memoizedState!==null&&(d=xu(e,i,hb,null,null,r),Hr._currentValue=d),eo(e,i),pt(e,i,o,r),i.child;case 6:return e===null&&xe&&((e=r=Ue)&&(r=Jb(r,i.pendingProps,Yt),r!==null?(i.stateNode=r,ft=i,Ue=null,e=!0):e=!1),e||Qn(i)),null;case 13:return Up(e,i,r);case 4:return $e(i,i.stateNode.containerInfo),o=i.pendingProps,e===null?i.child=Mi(i,null,o,r):pt(e,i,o,r),i.child;case 11:return Rp(e,i,i.type,i.pendingProps,r);case 7:return pt(e,i,i.pendingProps,r),i.child;case 8:return pt(e,i,i.pendingProps.children,r),i.child;case 12:return pt(e,i,i.pendingProps.children,r),i.child;case 10:return o=i.pendingProps,Zn(i,i.type,o.value),pt(e,i,o.children,r),i.child;case 9:return d=i.type._context,o=i.pendingProps.children,Ri(i),d=ht(d),o=o(d),i.flags|=1,pt(e,i,o,r),i.child;case 14:return kp(e,i,i.type,i.pendingProps,r);case 15:return Dp(e,i,i.type,i.pendingProps,r);case 19:return Vp(e,i,r);case 31:return Sb(e,i,r);case 22:return Op(e,i,r,i.pendingProps);case 24:return Ri(i),o=ht(Qe),e===null?(d=gu(),d===null&&(d=Ie,p=pu(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=r),d=p),i.memoizedState={parent:o,cache:d},_u(i),Zn(i,Qe,d)):((e.lanes&r)!==0&&(yu(e,i),vr(i,null,null,r),gr()),d=e.memoizedState,p=i.memoizedState,d.parent!==o?(d={parent:o,cache:o},i.memoizedState=d,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=d),Zn(i,Qe,o)):(o=p.cache,Zn(i,Qe,o),o!==d.cache&&hu(i,[Qe],r,!0))),pt(e,i,i.pendingProps.children,r),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function Dn(e){e.flags|=4}function ec(e,i,r,o,d){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(pm())e.flags|=8192;else throw Oi=Pl,vu}else e.flags&=-16777217}function Gp(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ig(i))if(pm())e.flags|=8192;else throw Oi=Pl,vu}function no(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Sf():536870912,e.lanes|=i,Aa|=i)}function Cr(e,i){if(!xe)switch(e.tailMode){case"hidden":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Pe(e){var i=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(i)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=o,e.childLanes=r,i}function Cb(e,i,r){var o=i.pendingProps;switch(su(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(i),null;case 1:return Pe(i),null;case 3:return r=i.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Ln(Qe),pe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(da(i)?Dn(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,cu())),Pe(i),null;case 26:var d=i.type,p=i.memoizedState;return e===null?(Dn(i),p!==null?(Pe(i),Gp(i,p)):(Pe(i),ec(i,d,null,o,r))):p?p!==e.memoizedState?(Dn(i),Pe(i),Gp(i,p)):(Pe(i),i.flags&=-16777217):(e=e.memoizedProps,e!==o&&Dn(i),Pe(i),ec(i,d,e,o,r)),null;case 27:if(Be(i),r=ve.current,d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==o&&Dn(i);else{if(!o){if(i.stateNode===null)throw Error(l(166));return Pe(i),null}e=ie.current,da(i)?Sh(i):(e=Qm(d,o,r),i.stateNode=e,Dn(i))}return Pe(i),null;case 5:if(Be(i),d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==o&&Dn(i);else{if(!o){if(i.stateNode===null)throw Error(l(166));return Pe(i),null}if(p=ie.current,da(i))Sh(i);else{var _=_o(ve.current);switch(p){case 1:p=_.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=_.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=_.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof o.is=="string"?_.createElement("select",{is:o.is}):_.createElement("select"),o.multiple?p.multiple=!0:o.size&&(p.size=o.size);break;default:p=typeof o.is=="string"?_.createElement(d,{is:o.is}):_.createElement(d)}}p[dt]=i,p[St]=o;e:for(_=i.child;_!==null;){if(_.tag===5||_.tag===6)p.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===i)break e;for(;_.sibling===null;){if(_.return===null||_.return===i)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}i.stateNode=p;e:switch(mt(p,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Dn(i)}}return Pe(i),ec(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,r),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==o&&Dn(i);else{if(typeof o!="string"&&i.stateNode===null)throw Error(l(166));if(e=ve.current,da(i)){if(e=i.stateNode,r=i.memoizedProps,o=null,d=ft,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}e[dt]=i,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||Um(e.nodeValue,r)),e||Qn(i,!0)}else e=_o(e).createTextNode(o),e[dt]=i,i.stateNode=e}return Pe(i),null;case 31:if(r=i.memoizedState,e===null||e.memoizedState!==null){if(o=da(i),r!==null){if(e===null){if(!o)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[dt]=i}else Li(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Pe(i),e=!1}else r=cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return i.flags&256?(zt(i),i):(zt(i),null);if((i.flags&128)!==0)throw Error(l(558))}return Pe(i),null;case 13:if(o=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=da(i),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error(l(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[dt]=i}else Li(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Pe(i),d=!1}else d=cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return i.flags&256?(zt(i),i):(zt(i),null)}return zt(i),(i.flags&128)!==0?(i.lanes=r,i):(r=o!==null,e=e!==null&&e.memoizedState!==null,r&&(o=i.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==d&&(o.flags|=2048)),r!==e&&r&&(i.child.flags|=8192),no(i,i.updateQueue),Pe(i),null);case 4:return pe(),e===null&&Ec(i.stateNode.containerInfo),Pe(i),null;case 10:return Ln(i.type),Pe(i),null;case 19:if($(Fe),o=i.memoizedState,o===null)return Pe(i),null;if(d=(i.flags&128)!==0,p=o.rendering,p===null)if(d)Cr(o,!1);else{if(je!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(p=jl(e),p!==null){for(i.flags|=128,Cr(o,!1),e=p.updateQueue,i.updateQueue=e,no(i,e),i.subtreeFlags=0,e=r,r=i.child;r!==null;)gh(r,e),r=r.sibling;return J(Fe,Fe.current&1|2),xe&&Tn(i,o.treeForkCount),i.child}e=e.sibling}o.tail!==null&&kt()>oo&&(i.flags|=128,d=!0,Cr(o,!1),i.lanes=4194304)}else{if(!d)if(e=jl(p),e!==null){if(i.flags|=128,d=!0,e=e.updateQueue,i.updateQueue=e,no(i,e),Cr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!p.alternate&&!xe)return Pe(i),null}else 2*kt()-o.renderingStartTime>oo&&r!==536870912&&(i.flags|=128,d=!0,Cr(o,!1),i.lanes=4194304);o.isBackwards?(p.sibling=i.child,i.child=p):(e=o.last,e!==null?e.sibling=p:i.child=p,o.last=p)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=kt(),e.sibling=null,r=Fe.current,J(Fe,d?r&1|2:r&1),xe&&Tn(i,o.treeForkCount),e):(Pe(i),null);case 22:case 23:return zt(i),Cu(),o=i.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(i.flags|=8192):o&&(i.flags|=8192),o?(r&536870912)!==0&&(i.flags&128)===0&&(Pe(i),i.subtreeFlags&6&&(i.flags|=8192)):Pe(i),r=i.updateQueue,r!==null&&no(i,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==r&&(i.flags|=2048),e!==null&&$(ki),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),Ln(Qe),Pe(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function Ab(e,i){switch(su(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Ln(Qe),pe(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return Be(i),null;case 31:if(i.memoizedState!==null){if(zt(i),i.alternate===null)throw Error(l(340));Li()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(zt(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));Li()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return $(Fe),null;case 4:return pe(),null;case 10:return Ln(i.type),null;case 22:case 23:return zt(i),Cu(),e!==null&&$(ki),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Ln(Qe),null;case 25:return null;default:return null}}function jp(e,i){switch(su(i),i.tag){case 3:Ln(Qe),pe();break;case 26:case 27:case 5:Be(i);break;case 4:pe();break;case 31:i.memoizedState!==null&&zt(i);break;case 13:zt(i);break;case 19:$(Fe);break;case 10:Ln(i.type);break;case 22:case 23:zt(i),Cu(),e!==null&&$(ki);break;case 24:Ln(Qe)}}function Ar(e,i){try{var r=i.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var d=o.next;r=d;do{if((r.tag&e)===e){o=void 0;var p=r.create,_=r.inst;o=p(),_.destroy=o}r=r.next}while(r!==d)}}catch(C){De(i,i.return,C)}}function ni(e,i,r){try{var o=i.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var p=d.next;o=p;do{if((o.tag&e)===e){var _=o.inst,C=_.destroy;if(C!==void 0){_.destroy=void 0,d=i;var x=r,I=C;try{I()}catch(B){De(d,x,B)}}}o=o.next}while(o!==p)}}catch(B){De(i,i.return,B)}}function $p(e){var i=e.updateQueue;if(i!==null){var r=e.stateNode;try{Nh(i,r)}catch(o){De(e,e.return,o)}}}function qp(e,i,r){r.props=Ii(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){De(e,i,o)}}function Tr(e,i){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(d){De(e,i,d)}}function hn(e,i){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(d){De(e,i,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){De(e,i,d)}else r.current=null}function Fp(e){var i=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(d){De(e,e.return,d)}}function tc(e,i,r){try{var o=e.stateNode;Fb(o,e.type,r,i),o[St]=i}catch(d){De(e,e.return,d)}}function Yp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ui(e.type)||e.tag===4}function nc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ui(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ic(e,i,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,i?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,i):(i=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,i.appendChild(e),r=r._reactRootContainer,r!=null||i.onclick!==null||(i.onclick=En));else if(o!==4&&(o===27&&ui(e.type)&&(r=e.stateNode,i=null),e=e.child,e!==null))for(ic(e,i,r),e=e.sibling;e!==null;)ic(e,i,r),e=e.sibling}function io(e,i,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,i?r.insertBefore(e,i):r.appendChild(e);else if(o!==4&&(o===27&&ui(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(io(e,i,r),e=e.sibling;e!==null;)io(e,i,r),e=e.sibling}function Xp(e){var i=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,d=i.attributes;d.length;)i.removeAttributeNode(d[0]);mt(i,o,r),i[dt]=e,i[St]=r}catch(p){De(e,e.return,p)}}var On=!1,We=!1,ac=!1,Qp=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Tb(e,i){if(e=e.containerInfo,Tc=To,e=oh(e),Ks(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var d=o.anchorOffset,p=o.focusNode;o=o.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var _=0,C=-1,x=-1,I=0,B=0,q=e,H=null;t:for(;;){for(var P;q!==r||d!==0&&q.nodeType!==3||(C=_+d),q!==p||o!==0&&q.nodeType!==3||(x=_+o),q.nodeType===3&&(_+=q.nodeValue.length),(P=q.firstChild)!==null;)H=q,q=P;for(;;){if(q===e)break t;if(H===r&&++I===d&&(C=_),H===p&&++B===o&&(x=_),(P=q.nextSibling)!==null)break;q=H,H=q.parentNode}q=P}r=C===-1||x===-1?null:{start:C,end:x}}else r=null}r=r||{start:0,end:0}}else r=null;for(xc={focusedElem:e,selectionRange:r},To=!1,ot=i;ot!==null;)if(i=ot,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,ot=e;else for(;ot!==null;){switch(i=ot,p=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=i,d=p.memoizedProps,p=p.memoizedState,o=r.stateNode;try{var ae=Ii(r.type,d);e=o.getSnapshotBeforeUpdate(ae,p),o.__reactInternalSnapshotBeforeUpdate=e}catch(se){De(r,r.return,se)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,r=e.nodeType,r===9)Rc(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=i.sibling,e!==null){e.return=i.return,ot=e;break}ot=i.return}}function Zp(e,i,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:Nn(e,r),o&4&&Ar(5,r);break;case 1:if(Nn(e,r),o&4)if(e=r.stateNode,i===null)try{e.componentDidMount()}catch(_){De(r,r.return,_)}else{var d=Ii(r.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(d,i,e.__reactInternalSnapshotBeforeUpdate)}catch(_){De(r,r.return,_)}}o&64&&$p(r),o&512&&Tr(r,r.return);break;case 3:if(Nn(e,r),o&64&&(e=r.updateQueue,e!==null)){if(i=null,r.child!==null)switch(r.child.tag){case 27:case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}try{Nh(e,i)}catch(_){De(r,r.return,_)}}break;case 27:i===null&&o&4&&Xp(r);case 26:case 5:Nn(e,r),i===null&&o&4&&Fp(r),o&512&&Tr(r,r.return);break;case 12:Nn(e,r);break;case 31:Nn(e,r),o&4&&Jp(e,r);break;case 13:Nn(e,r),o&4&&em(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Nb.bind(null,r),eS(e,r))));break;case 22:if(o=r.memoizedState!==null||On,!o){i=i!==null&&i.memoizedState!==null||We,d=On;var p=We;On=o,(We=i)&&!p?In(e,r,(r.subtreeFlags&8772)!==0):Nn(e,r),On=d,We=p}break;case 30:break;default:Nn(e,r)}}function Kp(e){var i=e.alternate;i!==null&&(e.alternate=null,Kp(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&Ns(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ve=null,Ct=!1;function Mn(e,i,r){for(r=r.child;r!==null;)Wp(e,i,r),r=r.sibling}function Wp(e,i,r){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(Qa,r)}catch{}switch(r.tag){case 26:We||hn(r,i),Mn(e,i,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:We||hn(r,i);var o=Ve,d=Ct;ui(r.type)&&(Ve=r.stateNode,Ct=!1),Mn(e,i,r),Nr(r.stateNode),Ve=o,Ct=d;break;case 5:We||hn(r,i);case 6:if(o=Ve,d=Ct,Ve=null,Mn(e,i,r),Ve=o,Ct=d,Ve!==null)if(Ct)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(r.stateNode)}catch(p){De(r,i,p)}else try{Ve.removeChild(r.stateNode)}catch(p){De(r,i,p)}break;case 18:Ve!==null&&(Ct?(e=Ve,$m(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Oa(e)):$m(Ve,r.stateNode));break;case 4:o=Ve,d=Ct,Ve=r.stateNode.containerInfo,Ct=!0,Mn(e,i,r),Ve=o,Ct=d;break;case 0:case 11:case 14:case 15:ni(2,r,i),We||ni(4,r,i),Mn(e,i,r);break;case 1:We||(hn(r,i),o=r.stateNode,typeof o.componentWillUnmount=="function"&&qp(r,i,o)),Mn(e,i,r);break;case 21:Mn(e,i,r);break;case 22:We=(o=We)||r.memoizedState!==null,Mn(e,i,r),We=o;break;default:Mn(e,i,r)}}function Jp(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Oa(e)}catch(r){De(i,i.return,r)}}}function em(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Oa(e)}catch(r){De(i,i.return,r)}}function xb(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new Qp),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new Qp),i;default:throw Error(l(435,e.tag))}}function ao(e,i){var r=xb(e);i.forEach(function(o){if(!r.has(o)){r.add(o);var d=Ib.bind(null,e,o);o.then(d,d)}})}function At(e,i){var r=i.deletions;if(r!==null)for(var o=0;o<r.length;o++){var d=r[o],p=e,_=i,C=_;e:for(;C!==null;){switch(C.tag){case 27:if(ui(C.type)){Ve=C.stateNode,Ct=!1;break e}break;case 5:Ve=C.stateNode,Ct=!1;break e;case 3:case 4:Ve=C.stateNode.containerInfo,Ct=!0;break e}C=C.return}if(Ve===null)throw Error(l(160));Wp(p,_,d),Ve=null,Ct=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)tm(i,e),i=i.sibling}var rn=null;function tm(e,i){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:At(i,e),Tt(e),o&4&&(ni(3,e,e.return),Ar(3,e),ni(5,e,e.return));break;case 1:At(i,e),Tt(e),o&512&&(We||r===null||hn(r,r.return)),o&64&&On&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?o:r.concat(o))));break;case 26:var d=rn;if(At(i,e),Tt(e),o&512&&(We||r===null||hn(r,r.return)),o&4){var p=r!==null?r.memoizedState:null;if(o=e.memoizedState,r===null)if(o===null)if(e.stateNode===null){e:{o=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":p=d.getElementsByTagName("title")[0],(!p||p[Wa]||p[dt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(o),d.head.insertBefore(p,d.querySelector("head > title"))),mt(p,o,r),p[dt]=e,lt(p),o=p;break e;case"link":var _=tg("link","href",d).get(o+(r.href||""));if(_){for(var C=0;C<_.length;C++)if(p=_[C],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){_.splice(C,1);break t}}p=d.createElement(o),mt(p,o,r),d.head.appendChild(p);break;case"meta":if(_=tg("meta","content",d).get(o+(r.content||""))){for(C=0;C<_.length;C++)if(p=_[C],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){_.splice(C,1);break t}}p=d.createElement(o),mt(p,o,r),d.head.appendChild(p);break;default:throw Error(l(468,o))}p[dt]=e,lt(p),o=p}e.stateNode=o}else ng(d,e.type,e.stateNode);else e.stateNode=eg(d,o,e.memoizedProps);else p!==o?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,o===null?ng(d,e.type,e.stateNode):eg(d,o,e.memoizedProps)):o===null&&e.stateNode!==null&&tc(e,e.memoizedProps,r.memoizedProps)}break;case 27:At(i,e),Tt(e),o&512&&(We||r===null||hn(r,r.return)),r!==null&&o&4&&tc(e,e.memoizedProps,r.memoizedProps);break;case 5:if(At(i,e),Tt(e),o&512&&(We||r===null||hn(r,r.return)),e.flags&32){d=e.stateNode;try{ta(d,"")}catch(ae){De(e,e.return,ae)}}o&4&&e.stateNode!=null&&(d=e.memoizedProps,tc(e,d,r!==null?r.memoizedProps:d)),o&1024&&(ac=!0);break;case 6:if(At(i,e),Tt(e),o&4){if(e.stateNode===null)throw Error(l(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(ae){De(e,e.return,ae)}}break;case 3:if(So=null,d=rn,rn=yo(i.containerInfo),At(i,e),rn=d,Tt(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Oa(i.containerInfo)}catch(ae){De(e,e.return,ae)}ac&&(ac=!1,nm(e));break;case 4:o=rn,rn=yo(e.stateNode.containerInfo),At(i,e),Tt(e),rn=o;break;case 12:At(i,e),Tt(e);break;case 31:At(i,e),Tt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ao(e,o)));break;case 13:At(i,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(lo=kt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ao(e,o)));break;case 22:d=e.memoizedState!==null;var x=r!==null&&r.memoizedState!==null,I=On,B=We;if(On=I||d,We=B||x,At(i,e),We=B,On=I,Tt(e),o&8192)e:for(i=e.stateNode,i._visibility=d?i._visibility&-2:i._visibility|1,d&&(r===null||x||On||We||zi(e)),r=null,i=e;;){if(i.tag===5||i.tag===26){if(r===null){x=r=i;try{if(p=x.stateNode,d)_=p.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{C=x.stateNode;var q=x.memoizedProps.style,H=q!=null&&q.hasOwnProperty("display")?q.display:null;C.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(ae){De(x,x.return,ae)}}}else if(i.tag===6){if(r===null){x=i;try{x.stateNode.nodeValue=d?"":x.memoizedProps}catch(ae){De(x,x.return,ae)}}}else if(i.tag===18){if(r===null){x=i;try{var P=x.stateNode;d?qm(P,!0):qm(x.stateNode,!1)}catch(ae){De(x,x.return,ae)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;r===i&&(r=null),i=i.return}r===i&&(r=null),i.sibling.return=i.return,i=i.sibling}o&4&&(o=e.updateQueue,o!==null&&(r=o.retryQueue,r!==null&&(o.retryQueue=null,ao(e,r))));break;case 19:At(i,e),Tt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ao(e,o)));break;case 30:break;case 21:break;default:At(i,e),Tt(e)}}function Tt(e){var i=e.flags;if(i&2){try{for(var r,o=e.return;o!==null;){if(Yp(o)){r=o;break}o=o.return}if(r==null)throw Error(l(160));switch(r.tag){case 27:var d=r.stateNode,p=nc(e);io(e,p,d);break;case 5:var _=r.stateNode;r.flags&32&&(ta(_,""),r.flags&=-33);var C=nc(e);io(e,C,_);break;case 3:case 4:var x=r.stateNode.containerInfo,I=nc(e);ic(e,I,x);break;default:throw Error(l(161))}}catch(B){De(e,e.return,B)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function nm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;nm(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function Nn(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Zp(e,i.alternate,i),i=i.sibling}function zi(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:ni(4,i,i.return),zi(i);break;case 1:hn(i,i.return);var r=i.stateNode;typeof r.componentWillUnmount=="function"&&qp(i,i.return,r),zi(i);break;case 27:Nr(i.stateNode);case 26:case 5:hn(i,i.return),zi(i);break;case 22:i.memoizedState===null&&zi(i);break;case 30:zi(i);break;default:zi(i)}e=e.sibling}}function In(e,i,r){for(r=r&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var o=i.alternate,d=e,p=i,_=p.flags;switch(p.tag){case 0:case 11:case 15:In(d,p,r),Ar(4,p);break;case 1:if(In(d,p,r),o=p,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(I){De(o,o.return,I)}if(o=p,d=o.updateQueue,d!==null){var C=o.stateNode;try{var x=d.shared.hiddenCallbacks;if(x!==null)for(d.shared.hiddenCallbacks=null,d=0;d<x.length;d++)Mh(x[d],C)}catch(I){De(o,o.return,I)}}r&&_&64&&$p(p),Tr(p,p.return);break;case 27:Xp(p);case 26:case 5:In(d,p,r),r&&o===null&&_&4&&Fp(p),Tr(p,p.return);break;case 12:In(d,p,r);break;case 31:In(d,p,r),r&&_&4&&Jp(d,p);break;case 13:In(d,p,r),r&&_&4&&em(d,p);break;case 22:p.memoizedState===null&&In(d,p,r),Tr(p,p.return);break;case 30:break;default:In(d,p,r)}i=i.sibling}}function rc(e,i){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&dr(r))}function lc(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&dr(e))}function ln(e,i,r,o){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)im(e,i,r,o),i=i.sibling}function im(e,i,r,o){var d=i.flags;switch(i.tag){case 0:case 11:case 15:ln(e,i,r,o),d&2048&&Ar(9,i);break;case 1:ln(e,i,r,o);break;case 3:ln(e,i,r,o),d&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&dr(e)));break;case 12:if(d&2048){ln(e,i,r,o),e=i.stateNode;try{var p=i.memoizedProps,_=p.id,C=p.onPostCommit;typeof C=="function"&&C(_,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){De(i,i.return,x)}}else ln(e,i,r,o);break;case 31:ln(e,i,r,o);break;case 13:ln(e,i,r,o);break;case 23:break;case 22:p=i.stateNode,_=i.alternate,i.memoizedState!==null?p._visibility&2?ln(e,i,r,o):xr(e,i):p._visibility&2?ln(e,i,r,o):(p._visibility|=2,Sa(e,i,r,o,(i.subtreeFlags&10256)!==0||!1)),d&2048&&rc(_,i);break;case 24:ln(e,i,r,o),d&2048&&lc(i.alternate,i);break;default:ln(e,i,r,o)}}function Sa(e,i,r,o,d){for(d=d&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var p=e,_=i,C=r,x=o,I=_.flags;switch(_.tag){case 0:case 11:case 15:Sa(p,_,C,x,d),Ar(8,_);break;case 23:break;case 22:var B=_.stateNode;_.memoizedState!==null?B._visibility&2?Sa(p,_,C,x,d):xr(p,_):(B._visibility|=2,Sa(p,_,C,x,d)),d&&I&2048&&rc(_.alternate,_);break;case 24:Sa(p,_,C,x,d),d&&I&2048&&lc(_.alternate,_);break;default:Sa(p,_,C,x,d)}i=i.sibling}}function xr(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var r=e,o=i,d=o.flags;switch(o.tag){case 22:xr(r,o),d&2048&&rc(o.alternate,o);break;case 24:xr(r,o),d&2048&&lc(o.alternate,o);break;default:xr(r,o)}i=i.sibling}}var Lr=8192;function Ea(e,i,r){if(e.subtreeFlags&Lr)for(e=e.child;e!==null;)am(e,i,r),e=e.sibling}function am(e,i,r){switch(e.tag){case 26:Ea(e,i,r),e.flags&Lr&&e.memoizedState!==null&&fS(r,rn,e.memoizedState,e.memoizedProps);break;case 5:Ea(e,i,r);break;case 3:case 4:var o=rn;rn=yo(e.stateNode.containerInfo),Ea(e,i,r),rn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Lr,Lr=16777216,Ea(e,i,r),Lr=o):Ea(e,i,r));break;default:Ea(e,i,r)}}function rm(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function wr(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var o=i[r];ot=o,om(o,e)}rm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)lm(e),e=e.sibling}function lm(e){switch(e.tag){case 0:case 11:case 15:wr(e),e.flags&2048&&ni(9,e,e.return);break;case 3:wr(e);break;case 12:wr(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,ro(e)):wr(e);break;default:wr(e)}}function ro(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var o=i[r];ot=o,om(o,e)}rm(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:ni(8,i,i.return),ro(i);break;case 22:r=i.stateNode,r._visibility&2&&(r._visibility&=-3,ro(i));break;default:ro(i)}e=e.sibling}}function om(e,i){for(;ot!==null;){var r=ot;switch(r.tag){case 0:case 11:case 15:ni(8,r,i);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:dr(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,ot=o;else e:for(r=e;ot!==null;){o=ot;var d=o.sibling,p=o.return;if(Kp(o),o===r){ot=null;break e}if(d!==null){d.return=p,ot=d;break e}ot=p}}}var Lb={getCacheForType:function(e){var i=ht(Qe),r=i.data.get(e);return r===void 0&&(r=e(),i.data.set(e,r)),r},cacheSignal:function(){return ht(Qe).controller.signal}},wb=typeof WeakMap=="function"?WeakMap:Map,Re=0,Ie=null,Se=null,Ae=0,ke=0,Ht=null,ii=!1,Ca=!1,oc=!1,zn=0,je=0,ai=0,Hi=0,sc=0,Ut=0,Aa=0,Rr=null,xt=null,uc=!1,lo=0,sm=0,oo=1/0,so=null,ri=null,et=0,li=null,Ta=null,Hn=0,cc=0,dc=null,um=null,kr=0,fc=null;function Pt(){return(Re&2)!==0&&Ae!==0?Ae&-Ae:M.T!==null?_c():Tf()}function cm(){if(Ut===0)if((Ae&536870912)===0||xe){var e=gl;gl<<=1,(gl&3932160)===0&&(gl=262144),Ut=e}else Ut=536870912;return e=It.current,e!==null&&(e.flags|=32),Ut}function Lt(e,i,r){(e===Ie&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(xa(e,0),oi(e,Ae,Ut,!1)),Ka(e,r),((Re&2)===0||e!==Ie)&&(e===Ie&&((Re&2)===0&&(Hi|=r),je===4&&oi(e,Ae,Ut,!1)),pn(e))}function dm(e,i,r){if((Re&6)!==0)throw Error(l(327));var o=!r&&(i&127)===0&&(i&e.expiredLanes)===0||Za(e,i),d=o?Db(e,i):pc(e,i,!0),p=o;do{if(d===0){Ca&&!o&&oi(e,i,0,!1);break}else{if(r=e.current.alternate,p&&!Rb(r)){d=pc(e,i,!1),p=!1;continue}if(d===2){if(p=i,e.errorRecoveryDisabledLanes&p)var _=0;else _=e.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){i=_;e:{var C=e;d=Rr;var x=C.current.memoizedState.isDehydrated;if(x&&(xa(C,_).flags|=256),_=pc(C,_,!1),_!==2){if(oc&&!x){C.errorRecoveryDisabledLanes|=p,Hi|=p,d=4;break e}p=xt,xt=d,p!==null&&(xt===null?xt=p:xt.push.apply(xt,p))}d=_}if(p=!1,d!==2)continue}}if(d===1){xa(e,0),oi(e,i,0,!0);break}e:{switch(o=e,p=d,p){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:oi(o,i,Ut,!ii);break e;case 2:xt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(d=lo+300-kt(),10<d)){if(oi(o,i,Ut,!ii),_l(o,0,!0)!==0)break e;Hn=i,o.timeoutHandle=Gm(fm.bind(null,o,r,xt,so,uc,i,Ut,Hi,Aa,ii,p,"Throttled",-0,0),d);break e}fm(o,r,xt,so,uc,i,Ut,Hi,Aa,ii,p,null,-0,0)}}break}while(!0);pn(e)}function fm(e,i,r,o,d,p,_,C,x,I,B,q,H,P){if(e.timeoutHandle=-1,q=i.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:En},am(i,p,q);var ae=(p&62914560)===p?lo-kt():(p&4194048)===p?sm-kt():0;if(ae=hS(q,ae),ae!==null){Hn=p,e.cancelPendingCommit=ae(bm.bind(null,e,i,p,r,o,d,_,C,x,B,q,null,H,P)),oi(e,p,_,!I);return}}bm(e,i,p,r,o,d,_,C,x)}function Rb(e){for(var i=e;;){var r=i.tag;if((r===0||r===11||r===15)&&i.flags&16384&&(r=i.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var d=r[o],p=d.getSnapshot;d=d.value;try{if(!Mt(p(),d))return!1}catch{return!1}}if(r=i.child,i.subtreeFlags&16384&&r!==null)r.return=i,i=r;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function oi(e,i,r,o){i&=~sc,i&=~Hi,e.suspendedLanes|=i,e.pingedLanes&=~i,o&&(e.warmLanes|=i),o=e.expirationTimes;for(var d=i;0<d;){var p=31-Ot(d),_=1<<p;o[p]=-1,d&=~_}r!==0&&Ef(e,r,i)}function uo(){return(Re&6)===0?(Dr(0),!1):!0}function hc(){if(Se!==null){if(ke===0)var e=Se.return;else e=Se,xn=wi=null,Ru(e),ga=null,hr=0,e=Se;for(;e!==null;)jp(e.alternate,e),e=e.return;Se=null}}function xa(e,i){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,Qb(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Hn=0,hc(),Ie=e,Se=r=An(e.current,null),Ae=i,ke=0,Ht=null,ii=!1,Ca=Za(e,i),oc=!1,Aa=Ut=sc=Hi=ai=je=0,xt=Rr=null,uc=!1,(i&8)!==0&&(i|=i&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=i;0<o;){var d=31-Ot(o),p=1<<d;i|=e[d],o&=~p}return zn=i,kl(),r}function hm(e,i){ge=null,M.H=Sr,i===ma||i===Ul?(i=Rh(),ke=3):i===vu?(i=Rh(),ke=4):ke=i===qu?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Ht=i,Se===null&&(je=1,Wl(e,$t(i,e.current)))}function pm(){var e=It.current;return e===null?!0:(Ae&4194048)===Ae?Xt===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===Xt:!1}function mm(){var e=M.H;return M.H=Sr,e===null?Sr:e}function gm(){var e=M.A;return M.A=Lb,e}function co(){je=4,ii||(Ae&4194048)!==Ae&&It.current!==null||(Ca=!0),(ai&134217727)===0&&(Hi&134217727)===0||Ie===null||oi(Ie,Ae,Ut,!1)}function pc(e,i,r){var o=Re;Re|=2;var d=mm(),p=gm();(Ie!==e||Ae!==i)&&(so=null,xa(e,i)),i=!1;var _=je;e:do try{if(ke!==0&&Se!==null){var C=Se,x=Ht;switch(ke){case 8:hc(),_=6;break e;case 3:case 2:case 9:case 6:It.current===null&&(i=!0);var I=ke;if(ke=0,Ht=null,La(e,C,x,I),r&&Ca){_=0;break e}break;default:I=ke,ke=0,Ht=null,La(e,C,x,I)}}kb(),_=je;break}catch(B){hm(e,B)}while(!0);return i&&e.shellSuspendCounter++,xn=wi=null,Re=o,M.H=d,M.A=p,Se===null&&(Ie=null,Ae=0,kl()),_}function kb(){for(;Se!==null;)vm(Se)}function Db(e,i){var r=Re;Re|=2;var o=mm(),d=gm();Ie!==e||Ae!==i?(so=null,oo=kt()+500,xa(e,i)):Ca=Za(e,i);e:do try{if(ke!==0&&Se!==null){i=Se;var p=Ht;t:switch(ke){case 1:ke=0,Ht=null,La(e,i,p,1);break;case 2:case 9:if(Lh(p)){ke=0,Ht=null,_m(i);break}i=function(){ke!==2&&ke!==9||Ie!==e||(ke=7),pn(e)},p.then(i,i);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:Lh(p)?(ke=0,Ht=null,_m(i)):(ke=0,Ht=null,La(e,i,p,7));break;case 5:var _=null;switch(Se.tag){case 26:_=Se.memoizedState;case 5:case 27:var C=Se;if(_?ig(_):C.stateNode.complete){ke=0,Ht=null;var x=C.sibling;if(x!==null)Se=x;else{var I=C.return;I!==null?(Se=I,fo(I)):Se=null}break t}}ke=0,Ht=null,La(e,i,p,5);break;case 6:ke=0,Ht=null,La(e,i,p,6);break;case 8:hc(),je=6;break e;default:throw Error(l(462))}}Ob();break}catch(B){hm(e,B)}while(!0);return xn=wi=null,M.H=o,M.A=d,Re=r,Se!==null?0:(Ie=null,Ae=0,kl(),je)}function Ob(){for(;Se!==null&&!ty();)vm(Se)}function vm(e){var i=Bp(e.alternate,e,zn);e.memoizedProps=e.pendingProps,i===null?fo(e):Se=i}function _m(e){var i=e,r=i.alternate;switch(i.tag){case 15:case 0:i=Ip(r,i,i.pendingProps,i.type,void 0,Ae);break;case 11:i=Ip(r,i,i.pendingProps,i.type.render,i.ref,Ae);break;case 5:Ru(i);default:jp(r,i),i=Se=gh(i,zn),i=Bp(r,i,zn)}e.memoizedProps=e.pendingProps,i===null?fo(e):Se=i}function La(e,i,r,o){xn=wi=null,Ru(i),ga=null,hr=0;var d=i.return;try{if(bb(e,d,i,r,Ae)){je=1,Wl(e,$t(r,e.current)),Se=null;return}}catch(p){if(d!==null)throw Se=d,p;je=1,Wl(e,$t(r,e.current)),Se=null;return}i.flags&32768?(xe||o===1?e=!0:Ca||(Ae&536870912)!==0?e=!1:(ii=e=!0,(o===2||o===9||o===3||o===6)&&(o=It.current,o!==null&&o.tag===13&&(o.flags|=16384))),ym(i,e)):fo(i)}function fo(e){var i=e;do{if((i.flags&32768)!==0){ym(i,ii);return}e=i.return;var r=Cb(i.alternate,i,zn);if(r!==null){Se=r;return}if(i=i.sibling,i!==null){Se=i;return}Se=i=e}while(i!==null);je===0&&(je=5)}function ym(e,i){do{var r=Ab(e.alternate,e);if(r!==null){r.flags&=32767,Se=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!i&&(e=e.sibling,e!==null)){Se=e;return}Se=e=r}while(e!==null);je=6,Se=null}function bm(e,i,r,o,d,p,_,C,x){e.cancelPendingCommit=null;do ho();while(et!==0);if((Re&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(p=i.lanes|i.childLanes,p|=nu,dy(e,r,p,_,C,x),e===Ie&&(Se=Ie=null,Ae=0),Ta=i,li=e,Hn=r,cc=p,dc=d,um=o,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zb(pl,function(){return Tm(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||o){o=M.T,M.T=null,d=Y.p,Y.p=2,_=Re,Re|=4;try{Tb(e,i,r)}finally{Re=_,Y.p=d,M.T=o}}et=1,Sm(),Em(),Cm()}}function Sm(){if(et===1){et=0;var e=li,i=Ta,r=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||r){r=M.T,M.T=null;var o=Y.p;Y.p=2;var d=Re;Re|=4;try{tm(i,e);var p=xc,_=oh(e.containerInfo),C=p.focusedElem,x=p.selectionRange;if(_!==C&&C&&C.ownerDocument&&lh(C.ownerDocument.documentElement,C)){if(x!==null&&Ks(C)){var I=x.start,B=x.end;if(B===void 0&&(B=I),"selectionStart"in C)C.selectionStart=I,C.selectionEnd=Math.min(B,C.value.length);else{var q=C.ownerDocument||document,H=q&&q.defaultView||window;if(H.getSelection){var P=H.getSelection(),ae=C.textContent.length,se=Math.min(x.start,ae),Ne=x.end===void 0?se:Math.min(x.end,ae);!P.extend&&se>Ne&&(_=Ne,Ne=se,se=_);var D=rh(C,se),R=rh(C,Ne);if(D&&R&&(P.rangeCount!==1||P.anchorNode!==D.node||P.anchorOffset!==D.offset||P.focusNode!==R.node||P.focusOffset!==R.offset)){var N=q.createRange();N.setStart(D.node,D.offset),P.removeAllRanges(),se>Ne?(P.addRange(N),P.extend(R.node,R.offset)):(N.setEnd(R.node,R.offset),P.addRange(N))}}}}for(q=[],P=C;P=P.parentNode;)P.nodeType===1&&q.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<q.length;C++){var G=q[C];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}To=!!Tc,xc=Tc=null}finally{Re=d,Y.p=o,M.T=r}}e.current=i,et=2}}function Em(){if(et===2){et=0;var e=li,i=Ta,r=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||r){r=M.T,M.T=null;var o=Y.p;Y.p=2;var d=Re;Re|=4;try{Zp(e,i.alternate,i)}finally{Re=d,Y.p=o,M.T=r}}et=3}}function Cm(){if(et===4||et===3){et=0,ny();var e=li,i=Ta,r=Hn,o=um;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?et=5:(et=0,Ta=li=null,Am(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(ri=null),Os(r),i=i.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(Qa,i,void 0,(i.current.flags&128)===128)}catch{}if(o!==null){i=M.T,d=Y.p,Y.p=2,M.T=null;try{for(var p=e.onRecoverableError,_=0;_<o.length;_++){var C=o[_];p(C.value,{componentStack:C.stack})}}finally{M.T=i,Y.p=d}}(Hn&3)!==0&&ho(),pn(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===fc?kr++:(kr=0,fc=e):kr=0,Dr(0)}}function Am(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,dr(i)))}function ho(){return Sm(),Em(),Cm(),Tm()}function Tm(){if(et!==5)return!1;var e=li,i=cc;cc=0;var r=Os(Hn),o=M.T,d=Y.p;try{Y.p=32>r?32:r,M.T=null,r=dc,dc=null;var p=li,_=Hn;if(et=0,Ta=li=null,Hn=0,(Re&6)!==0)throw Error(l(331));var C=Re;if(Re|=4,lm(p.current),im(p,p.current,_,r),Re=C,Dr(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(Qa,p)}catch{}return!0}finally{Y.p=d,M.T=o,Am(e,i)}}function xm(e,i,r){i=$t(r,i),i=$u(e.stateNode,i,2),e=Jn(e,i,2),e!==null&&(Ka(e,2),pn(e))}function De(e,i,r){if(e.tag===3)xm(e,e,r);else for(;i!==null;){if(i.tag===3){xm(i,e,r);break}else if(i.tag===1){var o=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ri===null||!ri.has(o))){e=$t(r,e),r=Lp(2),o=Jn(i,r,2),o!==null&&(wp(r,o,i,e),Ka(o,2),pn(o));break}}i=i.return}}function mc(e,i,r){var o=e.pingCache;if(o===null){o=e.pingCache=new wb;var d=new Set;o.set(i,d)}else d=o.get(i),d===void 0&&(d=new Set,o.set(i,d));d.has(r)||(oc=!0,d.add(r),e=Mb.bind(null,e,i,r),i.then(e,e))}function Mb(e,i,r){var o=e.pingCache;o!==null&&o.delete(i),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Ie===e&&(Ae&r)===r&&(je===4||je===3&&(Ae&62914560)===Ae&&300>kt()-lo?(Re&2)===0&&xa(e,0):sc|=r,Aa===Ae&&(Aa=0)),pn(e)}function Lm(e,i){i===0&&(i=Sf()),e=Ti(e,i),e!==null&&(Ka(e,i),pn(e))}function Nb(e){var i=e.memoizedState,r=0;i!==null&&(r=i.retryLane),Lm(e,r)}function Ib(e,i){var r=0;switch(e.tag){case 31:case 13:var o=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(i),Lm(e,r)}function zb(e,i){return ws(e,i)}var po=null,wa=null,gc=!1,mo=!1,vc=!1,si=0;function pn(e){e!==wa&&e.next===null&&(wa===null?po=wa=e:wa=wa.next=e),mo=!0,gc||(gc=!0,Ub())}function Dr(e,i){if(!vc&&mo){vc=!0;do for(var r=!1,o=po;o!==null;){if(e!==0){var d=o.pendingLanes;if(d===0)var p=0;else{var _=o.suspendedLanes,C=o.pingedLanes;p=(1<<31-Ot(42|e)+1)-1,p&=d&~(_&~C),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,Dm(o,p))}else p=Ae,p=_l(o,o===Ie?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(p&3)===0||Za(o,p)||(r=!0,Dm(o,p));o=o.next}while(r);vc=!1}}function Hb(){wm()}function wm(){mo=gc=!1;var e=0;si!==0&&Xb()&&(e=si);for(var i=kt(),r=null,o=po;o!==null;){var d=o.next,p=Rm(o,i);p===0?(o.next=null,r===null?po=d:r.next=d,d===null&&(wa=r)):(r=o,(e!==0||(p&3)!==0)&&(mo=!0)),o=d}et!==0&&et!==5||Dr(e),si!==0&&(si=0)}function Rm(e,i){for(var r=e.suspendedLanes,o=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var _=31-Ot(p),C=1<<_,x=d[_];x===-1?((C&r)===0||(C&o)!==0)&&(d[_]=cy(C,i)):x<=i&&(e.expiredLanes|=C),p&=~C}if(i=Ie,r=Ae,r=_l(e,e===i?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===i&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Rs(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Za(e,r)){if(i=r&-r,i===e.callbackPriority)return i;switch(o!==null&&Rs(o),Os(r)){case 2:case 8:r=yf;break;case 32:r=pl;break;case 268435456:r=bf;break;default:r=pl}return o=km.bind(null,e),r=ws(r,o),e.callbackPriority=i,e.callbackNode=r,i}return o!==null&&o!==null&&Rs(o),e.callbackPriority=2,e.callbackNode=null,2}function km(e,i){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(ho()&&e.callbackNode!==r)return null;var o=Ae;return o=_l(e,e===Ie?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(dm(e,o,i),Rm(e,kt()),e.callbackNode!=null&&e.callbackNode===r?km.bind(null,e):null)}function Dm(e,i){if(ho())return null;dm(e,i,!0)}function Ub(){Zb(function(){(Re&6)!==0?ws(_f,Hb):wm()})}function _c(){if(si===0){var e=ha;e===0&&(e=ml,ml<<=1,(ml&261888)===0&&(ml=256)),si=e}return si}function Om(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:El(""+e)}function Mm(e,i){var r=i.ownerDocument.createElement("input");return r.name=i.name,r.value=i.value,e.id&&r.setAttribute("form",e.id),i.parentNode.insertBefore(r,i),e=new FormData(e),r.parentNode.removeChild(r),e}function Pb(e,i,r,o,d){if(i==="submit"&&r&&r.stateNode===d){var p=Om((d[St]||null).action),_=o.submitter;_&&(i=(i=_[St]||null)?Om(i.formAction):_.getAttribute("formAction"),i!==null&&(p=i,_=null));var C=new xl("action","action",null,o,d);e.push({event:C,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(si!==0){var x=_?Mm(d,_):new FormData(d);Uu(r,{pending:!0,data:x,method:d.method,action:p},null,x)}}else typeof p=="function"&&(C.preventDefault(),x=_?Mm(d,_):new FormData(d),Uu(r,{pending:!0,data:x,method:d.method,action:p},p,x))},currentTarget:d}]})}}for(var yc=0;yc<tu.length;yc++){var bc=tu[yc],Vb=bc.toLowerCase(),Bb=bc[0].toUpperCase()+bc.slice(1);an(Vb,"on"+Bb)}an(ch,"onAnimationEnd"),an(dh,"onAnimationIteration"),an(fh,"onAnimationStart"),an("dblclick","onDoubleClick"),an("focusin","onFocus"),an("focusout","onBlur"),an(ib,"onTransitionRun"),an(ab,"onTransitionStart"),an(rb,"onTransitionCancel"),an(hh,"onTransitionEnd"),Ji("onMouseEnter",["mouseout","mouseover"]),Ji("onMouseLeave",["mouseout","mouseover"]),Ji("onPointerEnter",["pointerout","pointerover"]),Ji("onPointerLeave",["pointerout","pointerover"]),Si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Si("onBeforeInput",["compositionend","keypress","textInput","paste"]),Si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="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(" "),Gb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Or));function Nm(e,i){i=(i&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],d=o.event;o=o.listeners;e:{var p=void 0;if(i)for(var _=o.length-1;0<=_;_--){var C=o[_],x=C.instance,I=C.currentTarget;if(C=C.listener,x!==p&&d.isPropagationStopped())break e;p=C,d.currentTarget=I;try{p(d)}catch(B){Rl(B)}d.currentTarget=null,p=x}else for(_=0;_<o.length;_++){if(C=o[_],x=C.instance,I=C.currentTarget,C=C.listener,x!==p&&d.isPropagationStopped())break e;p=C,d.currentTarget=I;try{p(d)}catch(B){Rl(B)}d.currentTarget=null,p=x}}}}function Ee(e,i){var r=i[Ms];r===void 0&&(r=i[Ms]=new Set);var o=e+"__bubble";r.has(o)||(Im(i,e,2,!1),r.add(o))}function Sc(e,i,r){var o=0;i&&(o|=4),Im(r,e,o,i)}var go="_reactListening"+Math.random().toString(36).slice(2);function Ec(e){if(!e[go]){e[go]=!0,wf.forEach(function(r){r!=="selectionchange"&&(Gb.has(r)||Sc(r,!1,e),Sc(r,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[go]||(i[go]=!0,Sc("selectionchange",!1,i))}}function Im(e,i,r,o){switch(cg(i)){case 2:var d=gS;break;case 8:d=vS;break;default:d=Hc}r=d.bind(null,i,r,e),d=void 0,!Gs||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),o?d!==void 0?e.addEventListener(i,r,{capture:!0,passive:d}):e.addEventListener(i,r,!0):d!==void 0?e.addEventListener(i,r,{passive:d}):e.addEventListener(i,r,!1)}function Cc(e,i,r,o,d){var p=o;if((i&1)===0&&(i&2)===0&&o!==null)e:for(;;){if(o===null)return;var _=o.tag;if(_===3||_===4){var C=o.stateNode.containerInfo;if(C===d)break;if(_===4)for(_=o.return;_!==null;){var x=_.tag;if((x===3||x===4)&&_.stateNode.containerInfo===d)return;_=_.return}for(;C!==null;){if(_=Zi(C),_===null)return;if(x=_.tag,x===5||x===6||x===26||x===27){o=p=_;continue e}C=C.parentNode}}o=o.return}Vf(function(){var I=p,B=Vs(r),q=[];e:{var H=ph.get(e);if(H!==void 0){var P=xl,ae=e;switch(e){case"keypress":if(Al(r)===0)break e;case"keydown":case"keyup":P=Iy;break;case"focusin":ae="focus",P=Fs;break;case"focusout":ae="blur",P=Fs;break;case"beforeblur":case"afterblur":P=Fs;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Cy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Uy;break;case ch:case dh:case fh:P=xy;break;case hh:P=Vy;break;case"scroll":case"scrollend":P=Sy;break;case"wheel":P=Gy;break;case"copy":case"cut":case"paste":P=wy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=qf;break;case"toggle":case"beforetoggle":P=$y}var se=(i&4)!==0,Ne=!se&&(e==="scroll"||e==="scrollend"),D=se?H!==null?H+"Capture":null:H;se=[];for(var R=I,N;R!==null;){var G=R;if(N=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||N===null||D===null||(G=er(R,D),G!=null&&se.push(Mr(R,G,N))),Ne)break;R=R.return}0<se.length&&(H=new P(H,ae,null,r,B),q.push({event:H,listeners:se}))}}if((i&7)===0){e:{if(H=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",H&&r!==Ps&&(ae=r.relatedTarget||r.fromElement)&&(Zi(ae)||ae[Qi]))break e;if((P||H)&&(H=B.window===B?B:(H=B.ownerDocument)?H.defaultView||H.parentWindow:window,P?(ae=r.relatedTarget||r.toElement,P=I,ae=ae?Zi(ae):null,ae!==null&&(Ne=u(ae),se=ae.tag,ae!==Ne||se!==5&&se!==27&&se!==6)&&(ae=null)):(P=null,ae=I),P!==ae)){if(se=jf,G="onMouseLeave",D="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(se=qf,G="onPointerLeave",D="onPointerEnter",R="pointer"),Ne=P==null?H:Ja(P),N=ae==null?H:Ja(ae),H=new se(G,R+"leave",P,r,B),H.target=Ne,H.relatedTarget=N,G=null,Zi(B)===I&&(se=new se(D,R+"enter",ae,r,B),se.target=N,se.relatedTarget=Ne,G=se),Ne=G,P&&ae)t:{for(se=jb,D=P,R=ae,N=0,G=D;G;G=se(G))N++;G=0;for(var le=R;le;le=se(le))G++;for(;0<N-G;)D=se(D),N--;for(;0<G-N;)R=se(R),G--;for(;N--;){if(D===R||R!==null&&D===R.alternate){se=D;break t}D=se(D),R=se(R)}se=null}else se=null;P!==null&&zm(q,H,P,se,!1),ae!==null&&Ne!==null&&zm(q,Ne,ae,se,!0)}}e:{if(H=I?Ja(I):window,P=H.nodeName&&H.nodeName.toLowerCase(),P==="select"||P==="input"&&H.type==="file")var Le=Jf;else if(Kf(H))if(eh)Le=eb;else{Le=Wy;var re=Ky}else P=H.nodeName,!P||P.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?I&&Us(I.elementType)&&(Le=Jf):Le=Jy;if(Le&&(Le=Le(e,I))){Wf(q,Le,r,B);break e}re&&re(e,H,I),e==="focusout"&&I&&H.type==="number"&&I.memoizedProps.value!=null&&Hs(H,"number",H.value)}switch(re=I?Ja(I):window,e){case"focusin":(Kf(re)||re.contentEditable==="true")&&(ra=re,Ws=I,sr=null);break;case"focusout":sr=Ws=ra=null;break;case"mousedown":Js=!0;break;case"contextmenu":case"mouseup":case"dragend":Js=!1,sh(q,r,B);break;case"selectionchange":if(nb)break;case"keydown":case"keyup":sh(q,r,B)}var _e;if(Xs)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else aa?Qf(e,r)&&(Te="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Te="onCompositionStart");Te&&(Ff&&r.locale!=="ko"&&(aa||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&aa&&(_e=Bf()):(Fn=B,js="value"in Fn?Fn.value:Fn.textContent,aa=!0)),re=vo(I,Te),0<re.length&&(Te=new $f(Te,e,null,r,B),q.push({event:Te,listeners:re}),_e?Te.data=_e:(_e=Zf(r),_e!==null&&(Te.data=_e)))),(_e=Fy?Yy(e,r):Xy(e,r))&&(Te=vo(I,"onBeforeInput"),0<Te.length&&(re=new $f("onBeforeInput","beforeinput",null,r,B),q.push({event:re,listeners:Te}),re.data=_e)),Pb(q,e,I,r,B)}Nm(q,i)})}function Mr(e,i,r){return{instance:e,listener:i,currentTarget:r}}function vo(e,i){for(var r=i+"Capture",o=[];e!==null;){var d=e,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=er(e,r),d!=null&&o.unshift(Mr(e,d,p)),d=er(e,i),d!=null&&o.push(Mr(e,d,p))),e.tag===3)return o;e=e.return}return[]}function jb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zm(e,i,r,o,d){for(var p=i._reactName,_=[];r!==null&&r!==o;){var C=r,x=C.alternate,I=C.stateNode;if(C=C.tag,x!==null&&x===o)break;C!==5&&C!==26&&C!==27||I===null||(x=I,d?(I=er(r,p),I!=null&&_.unshift(Mr(r,I,x))):d||(I=er(r,p),I!=null&&_.push(Mr(r,I,x)))),r=r.return}_.length!==0&&e.push({event:i,listeners:_})}var $b=/\r\n?/g,qb=/\u0000|\uFFFD/g;function Hm(e){return(typeof e=="string"?e:""+e).replace($b,`
10
+ `).replace(qb,"")}function Um(e,i){return i=Hm(i),Hm(e)===i}function Me(e,i,r,o,d,p){switch(r){case"children":typeof o=="string"?i==="body"||i==="textarea"&&o===""||ta(e,o):(typeof o=="number"||typeof o=="bigint")&&i!=="body"&&ta(e,""+o);break;case"className":bl(e,"class",o);break;case"tabIndex":bl(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":bl(e,r,o);break;case"style":Uf(e,o,p);break;case"data":if(i!=="object"){bl(e,"data",o);break}case"src":case"href":if(o===""&&(i!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=El(""+o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"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 p=="function"&&(r==="formAction"?(i!=="input"&&Me(e,i,"name",d.name,d,null),Me(e,i,"formEncType",d.formEncType,d,null),Me(e,i,"formMethod",d.formMethod,d,null),Me(e,i,"formTarget",d.formTarget,d,null)):(Me(e,i,"encType",d.encType,d,null),Me(e,i,"method",d.method,d,null),Me(e,i,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=El(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=En);break;case"onScroll":o!=null&&Ee("scroll",e);break;case"onScrollEnd":o!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(r=o.__html,r!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}r=El(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""+o):e.removeAttribute(r);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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),yl(e,"popover",o);break;case"xlinkActuate":Sn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Sn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Sn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Sn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Sn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Sn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":yl(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=yy.get(r)||r,yl(e,r,o))}}function Ac(e,i,r,o,d,p){switch(r){case"style":Uf(e,o,p);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(r=o.__html,r!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"children":typeof o=="string"?ta(e,o):(typeof o=="number"||typeof o=="bigint")&&ta(e,""+o);break;case"onScroll":o!=null&&Ee("scroll",e);break;case"onScrollEnd":o!=null&&Ee("scrollend",e);break;case"onClick":o!=null&&(e.onclick=En);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rf.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),i=r.slice(2,d?r.length-7:void 0),p=e[St]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(i,p,d),typeof o=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(i,o,d);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):yl(e,r,o)}}}function mt(e,i,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var o=!1,d=!1,p;for(p in r)if(r.hasOwnProperty(p)){var _=r[p];if(_!=null)switch(p){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,p,_,r,null)}}d&&Me(e,i,"srcSet",r.srcSet,r,null),o&&Me(e,i,"src",r.src,r,null);return;case"input":Ee("invalid",e);var C=p=_=d=null,x=null,I=null;for(o in r)if(r.hasOwnProperty(o)){var B=r[o];if(B!=null)switch(o){case"name":d=B;break;case"type":_=B;break;case"checked":x=B;break;case"defaultChecked":I=B;break;case"value":p=B;break;case"defaultValue":C=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(l(137,i));break;default:Me(e,i,o,B,r,null)}}Nf(e,p,C,x,I,_,d,!1);return;case"select":Ee("invalid",e),o=_=p=null;for(d in r)if(r.hasOwnProperty(d)&&(C=r[d],C!=null))switch(d){case"value":p=C;break;case"defaultValue":_=C;break;case"multiple":o=C;default:Me(e,i,d,C,r,null)}i=p,r=_,e.multiple=!!o,i!=null?ea(e,!!o,i,!1):r!=null&&ea(e,!!o,r,!0);return;case"textarea":Ee("invalid",e),p=d=o=null;for(_ in r)if(r.hasOwnProperty(_)&&(C=r[_],C!=null))switch(_){case"value":o=C;break;case"defaultValue":d=C;break;case"children":p=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(l(91));break;default:Me(e,i,_,C,r,null)}zf(e,o,d,p);return;case"option":for(x in r)r.hasOwnProperty(x)&&(o=r[x],o!=null)&&(x==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Me(e,i,x,o,r,null));return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(o=0;o<Or.length;o++)Ee(Or[o],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in r)if(r.hasOwnProperty(I)&&(o=r[I],o!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,I,o,r,null)}return;default:if(Us(i)){for(B in r)r.hasOwnProperty(B)&&(o=r[B],o!==void 0&&Ac(e,i,B,o,r,void 0));return}}for(C in r)r.hasOwnProperty(C)&&(o=r[C],o!=null&&Me(e,i,C,o,r,null))}function Fb(e,i,r,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,_=null,C=null,x=null,I=null,B=null;for(P in r){var q=r[P];if(r.hasOwnProperty(P)&&q!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":x=q;default:o.hasOwnProperty(P)||Me(e,i,P,null,o,q)}}for(var H in o){var P=o[H];if(q=r[H],o.hasOwnProperty(H)&&(P!=null||q!=null))switch(H){case"type":p=P;break;case"name":d=P;break;case"checked":I=P;break;case"defaultChecked":B=P;break;case"value":_=P;break;case"defaultValue":C=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(l(137,i));break;default:P!==q&&Me(e,i,H,P,o,q)}}zs(e,_,C,x,I,B,p,d);return;case"select":P=_=C=H=null;for(p in r)if(x=r[p],r.hasOwnProperty(p)&&x!=null)switch(p){case"value":break;case"multiple":P=x;default:o.hasOwnProperty(p)||Me(e,i,p,null,o,x)}for(d in o)if(p=o[d],x=r[d],o.hasOwnProperty(d)&&(p!=null||x!=null))switch(d){case"value":H=p;break;case"defaultValue":C=p;break;case"multiple":_=p;default:p!==x&&Me(e,i,d,p,o,x)}i=C,r=_,o=P,H!=null?ea(e,!!r,H,!1):!!o!=!!r&&(i!=null?ea(e,!!r,i,!0):ea(e,!!r,r?[]:"",!1));return;case"textarea":P=H=null;for(C in r)if(d=r[C],r.hasOwnProperty(C)&&d!=null&&!o.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Me(e,i,C,null,o,d)}for(_ in o)if(d=o[_],p=r[_],o.hasOwnProperty(_)&&(d!=null||p!=null))switch(_){case"value":H=d;break;case"defaultValue":P=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==p&&Me(e,i,_,d,o,p)}If(e,H,P);return;case"option":for(var ae in r)H=r[ae],r.hasOwnProperty(ae)&&H!=null&&!o.hasOwnProperty(ae)&&(ae==="selected"?e.selected=!1:Me(e,i,ae,null,o,H));for(x in o)H=o[x],P=r[x],o.hasOwnProperty(x)&&H!==P&&(H!=null||P!=null)&&(x==="selected"?e.selected=H&&typeof H!="function"&&typeof H!="symbol":Me(e,i,x,H,o,P));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 se in r)H=r[se],r.hasOwnProperty(se)&&H!=null&&!o.hasOwnProperty(se)&&Me(e,i,se,null,o,H);for(I in o)if(H=o[I],P=r[I],o.hasOwnProperty(I)&&H!==P&&(H!=null||P!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(l(137,i));break;default:Me(e,i,I,H,o,P)}return;default:if(Us(i)){for(var Ne in r)H=r[Ne],r.hasOwnProperty(Ne)&&H!==void 0&&!o.hasOwnProperty(Ne)&&Ac(e,i,Ne,void 0,o,H);for(B in o)H=o[B],P=r[B],!o.hasOwnProperty(B)||H===P||H===void 0&&P===void 0||Ac(e,i,B,H,o,P);return}}for(var D in r)H=r[D],r.hasOwnProperty(D)&&H!=null&&!o.hasOwnProperty(D)&&Me(e,i,D,null,o,H);for(q in o)H=o[q],P=r[q],!o.hasOwnProperty(q)||H===P||H==null&&P==null||Me(e,i,q,H,o,P)}function Pm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Yb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,r=performance.getEntriesByType("resource"),o=0;o<r.length;o++){var d=r[o],p=d.transferSize,_=d.initiatorType,C=d.duration;if(p&&C&&Pm(_)){for(_=0,C=d.responseEnd,o+=1;o<r.length;o++){var x=r[o],I=x.startTime;if(I>C)break;var B=x.transferSize,q=x.initiatorType;B&&Pm(q)&&(x=x.responseEnd,_+=B*(x<C?1:(C-I)/(x-I)))}if(--o,i+=8*(p+_)/(d.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Tc=null,xc=null;function _o(e){return e.nodeType===9?e:e.ownerDocument}function Vm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Bm(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function Lc(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var wc=null;function Xb(){var e=window.event;return e&&e.type==="popstate"?e===wc?!1:(wc=e,!0):(wc=null,!1)}var Gm=typeof setTimeout=="function"?setTimeout:void 0,Qb=typeof clearTimeout=="function"?clearTimeout:void 0,jm=typeof Promise=="function"?Promise:void 0,Zb=typeof queueMicrotask=="function"?queueMicrotask:typeof jm<"u"?function(e){return jm.resolve(null).then(e).catch(Kb)}:Gm;function Kb(e){setTimeout(function(){throw e})}function ui(e){return e==="head"}function $m(e,i){var r=i,o=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(o===0){e.removeChild(d),Oa(i);return}o--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")o++;else if(r==="html")Nr(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Nr(r);for(var p=r.firstChild;p;){var _=p.nextSibling,C=p.nodeName;p[Wa]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&p.rel.toLowerCase()==="stylesheet"||r.removeChild(p),p=_}}else r==="body"&&Nr(e.ownerDocument.body);r=d}while(r);Oa(i)}function qm(e,i){var r=e;e=0;do{var o=r.nextSibling;if(r.nodeType===1?i?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(i?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=o}while(r)}function Rc(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var r=i;switch(i=i.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Rc(r),Ns(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Wb(e,i,r,o){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Wa])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=Qt(e.nextSibling),e===null)break}return null}function Jb(e,i,r){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Qt(e.nextSibling),e===null))return null;return e}function Fm(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Qt(e.nextSibling),e===null))return null;return e}function kc(e){return e.data==="$?"||e.data==="$~"}function Dc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function eS(e,i){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||r.readyState!=="loading")i();else{var o=function(){i(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Qt(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var Oc=null;function Ym(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(i===0)return Qt(e.nextSibling);i--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||i++}e=e.nextSibling}return null}function Xm(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(i===0)return e;i--}else r!=="/$"&&r!=="/&"||i++}e=e.previousSibling}return null}function Qm(e,i,r){switch(i=_o(r),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Nr(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);Ns(e)}var Zt=new Map,Zm=new Set;function yo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Un=Y.d;Y.d={f:tS,r:nS,D:iS,C:aS,L:rS,m:lS,X:sS,S:oS,M:uS};function tS(){var e=Un.f(),i=uo();return e||i}function nS(e){var i=Ki(e);i!==null&&i.tag===5&&i.type==="form"?hp(i):Un.r(e)}var Ra=typeof document>"u"?null:document;function Km(e,i,r){var o=Ra;if(o&&typeof i=="string"&&i){var d=Gt(i);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),Zm.has(d)||(Zm.add(d),e={rel:e,crossOrigin:r,href:i},o.querySelector(d)===null&&(i=o.createElement("link"),mt(i,"link",e),lt(i),o.head.appendChild(i)))}}function iS(e){Un.D(e),Km("dns-prefetch",e,null)}function aS(e,i){Un.C(e,i),Km("preconnect",e,i)}function rS(e,i,r){Un.L(e,i,r);var o=Ra;if(o&&e&&i){var d='link[rel="preload"][as="'+Gt(i)+'"]';i==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+Gt(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+Gt(r.imageSizes)+'"]')):d+='[href="'+Gt(e)+'"]';var p=d;switch(i){case"style":p=ka(e);break;case"script":p=Da(e)}Zt.has(p)||(e=g({rel:"preload",href:i==="image"&&r&&r.imageSrcSet?void 0:e,as:i},r),Zt.set(p,e),o.querySelector(d)!==null||i==="style"&&o.querySelector(Ir(p))||i==="script"&&o.querySelector(zr(p))||(i=o.createElement("link"),mt(i,"link",e),lt(i),o.head.appendChild(i)))}}function lS(e,i){Un.m(e,i);var r=Ra;if(r&&e){var o=i&&typeof i.as=="string"?i.as:"script",d='link[rel="modulepreload"][as="'+Gt(o)+'"][href="'+Gt(e)+'"]',p=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Da(e)}if(!Zt.has(p)&&(e=g({rel:"modulepreload",href:e},i),Zt.set(p,e),r.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(zr(p)))return}o=r.createElement("link"),mt(o,"link",e),lt(o),r.head.appendChild(o)}}}function oS(e,i,r){Un.S(e,i,r);var o=Ra;if(o&&e){var d=Wi(o).hoistableStyles,p=ka(e);i=i||"default";var _=d.get(p);if(!_){var C={loading:0,preload:null};if(_=o.querySelector(Ir(p)))C.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":i},r),(r=Zt.get(p))&&Mc(e,r);var x=_=o.createElement("link");lt(x),mt(x,"link",e),x._p=new Promise(function(I,B){x.onload=I,x.onerror=B}),x.addEventListener("load",function(){C.loading|=1}),x.addEventListener("error",function(){C.loading|=2}),C.loading|=4,bo(_,i,o)}_={type:"stylesheet",instance:_,count:1,state:C},d.set(p,_)}}}function sS(e,i){Un.X(e,i);var r=Ra;if(r&&e){var o=Wi(r).hoistableScripts,d=Da(e),p=o.get(d);p||(p=r.querySelector(zr(d)),p||(e=g({src:e,async:!0},i),(i=Zt.get(d))&&Nc(e,i),p=r.createElement("script"),lt(p),mt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(d,p))}}function uS(e,i){Un.M(e,i);var r=Ra;if(r&&e){var o=Wi(r).hoistableScripts,d=Da(e),p=o.get(d);p||(p=r.querySelector(zr(d)),p||(e=g({src:e,async:!0,type:"module"},i),(i=Zt.get(d))&&Nc(e,i),p=r.createElement("script"),lt(p),mt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(d,p))}}function Wm(e,i,r,o){var d=(d=ve.current)?yo(d):null;if(!d)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(i=ka(r.href),r=Wi(d).hoistableStyles,o=r.get(i),o||(o={type:"style",instance:null,count:0,state:null},r.set(i,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=ka(r.href);var p=Wi(d).hoistableStyles,_=p.get(e);if(_||(d=d.ownerDocument||d,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,_),(p=d.querySelector(Ir(e)))&&!p._p&&(_.instance=p,_.state.loading=5),Zt.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Zt.set(e,r),p||cS(d,e,r,_.state))),i&&o===null)throw Error(l(528,""));return _}if(i&&o!==null)throw Error(l(529,""));return null;case"script":return i=r.async,r=r.src,typeof r=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Da(r),r=Wi(d).hoistableScripts,o=r.get(i),o||(o={type:"script",instance:null,count:0,state:null},r.set(i,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function ka(e){return'href="'+Gt(e)+'"'}function Ir(e){return'link[rel="stylesheet"]['+e+"]"}function Jm(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function cS(e,i,r,o){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?o.loading=1:(i=e.createElement("link"),o.preload=i,i.addEventListener("load",function(){return o.loading|=1}),i.addEventListener("error",function(){return o.loading|=2}),mt(i,"link",r),lt(i),e.head.appendChild(i))}function Da(e){return'[src="'+Gt(e)+'"]'}function zr(e){return"script[async]"+e}function eg(e,i,r){if(i.count++,i.instance===null)switch(i.type){case"style":var o=e.querySelector('style[data-href~="'+Gt(r.href)+'"]');if(o)return i.instance=o,lt(o),o;var d=g({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),lt(o),mt(o,"style",d),bo(o,r.precedence,e),i.instance=o;case"stylesheet":d=ka(r.href);var p=e.querySelector(Ir(d));if(p)return i.state.loading|=4,i.instance=p,lt(p),p;o=Jm(r),(d=Zt.get(d))&&Mc(o,d),p=(e.ownerDocument||e).createElement("link"),lt(p);var _=p;return _._p=new Promise(function(C,x){_.onload=C,_.onerror=x}),mt(p,"link",o),i.state.loading|=4,bo(p,r.precedence,e),i.instance=p;case"script":return p=Da(r.src),(d=e.querySelector(zr(p)))?(i.instance=d,lt(d),d):(o=r,(d=Zt.get(p))&&(o=g({},r),Nc(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),lt(d),mt(d,"link",o),e.head.appendChild(d),i.instance=d);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(o=i.instance,i.state.loading|=4,bo(o,r.precedence,e));return i.instance}function bo(e,i,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,p=d,_=0;_<o.length;_++){var C=o[_];if(C.dataset.precedence===i)p=C;else if(p!==d)break}p?p.parentNode.insertBefore(e,p.nextSibling):(i=r.nodeType===9?r.head:r,i.insertBefore(e,i.firstChild))}function Mc(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function Nc(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var So=null;function tg(e,i,r){if(So===null){var o=new Map,d=So=new Map;d.set(r,o)}else d=So,o=d.get(r),o||(o=new Map,d.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var p=r[d];if(!(p[Wa]||p[dt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var _=p.getAttribute(i)||"";_=e+_;var C=o.get(_);C?C.push(p):o.set(_,[p])}}return o}function ng(e,i,r){e=e.ownerDocument||e,e.head.insertBefore(r,i==="title"?e.querySelector("head > title"):null)}function dS(e,i,r){if(r===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(e=i.disabled,typeof i.precedence=="string"&&e==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function ig(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fS(e,i,r,o){if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=ka(o.href),p=i.querySelector(Ir(d));if(p){i=p._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Eo.bind(e),i.then(e,e)),r.state.loading|=4,r.instance=p,lt(p);return}p=i.ownerDocument||i,o=Jm(o),(d=Zt.get(d))&&Mc(o,d),p=p.createElement("link"),lt(p);var _=p;_._p=new Promise(function(C,x){_.onload=C,_.onerror=x}),mt(p,"link",o),r.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,i),(i=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=Eo.bind(e),i.addEventListener("load",r),i.addEventListener("error",r))}}var Ic=0;function hS(e,i){return e.stylesheets&&e.count===0&&Ao(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var o=setTimeout(function(){if(e.stylesheets&&Ao(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+i);0<e.imgBytes&&Ic===0&&(Ic=62500*Yb());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ao(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Ic?50:800)+i);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function Eo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ao(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Co=null;function Ao(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Co=new Map,i.forEach(pS,e),Co=null,Eo.call(e))}function pS(e,i){if(!(i.state.loading&4)){var r=Co.get(e);if(r)var o=r.get(null);else{r=new Map,Co.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var _=d[p];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(r.set(_.dataset.precedence,_),o=_)}o&&r.set(null,o)}d=i.instance,_=d.getAttribute("data-precedence"),p=r.get(_)||o,p===o&&r.set(null,d),r.set(_,d),this.count++,o=Eo.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),p?p.parentNode.insertBefore(d,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),i.state.loading|=4}}var Hr={$$typeof:w,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function mS(e,i,r,o,d,p,_,C,x){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ks(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ks(0),this.hiddenUpdates=ks(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function ag(e,i,r,o,d,p,_,C,x,I,B,q){return e=new mS(e,i,r,_,x,I,B,q,C),i=1,p===!0&&(i|=24),p=Nt(3,null,null,i),e.current=p,p.stateNode=e,i=pu(),i.refCount++,e.pooledCache=i,i.refCount++,p.memoizedState={element:o,isDehydrated:r,cache:i},_u(p),e}function rg(e){return e?(e=sa,e):sa}function lg(e,i,r,o,d,p){d=rg(d),o.context===null?o.context=d:o.pendingContext=d,o=Wn(i),o.payload={element:r},p=p===void 0?null:p,p!==null&&(o.callback=p),r=Jn(e,o,i),r!==null&&(Lt(r,e,i),mr(r,e,i))}function og(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<i?r:i}}function zc(e,i){og(e,i),(e=e.alternate)&&og(e,i)}function sg(e){if(e.tag===13||e.tag===31){var i=Ti(e,67108864);i!==null&&Lt(i,e,67108864),zc(e,67108864)}}function ug(e){if(e.tag===13||e.tag===31){var i=Pt();i=Ds(i);var r=Ti(e,i);r!==null&&Lt(r,e,i),zc(e,i)}}var To=!0;function gS(e,i,r,o){var d=M.T;M.T=null;var p=Y.p;try{Y.p=2,Hc(e,i,r,o)}finally{Y.p=p,M.T=d}}function vS(e,i,r,o){var d=M.T;M.T=null;var p=Y.p;try{Y.p=8,Hc(e,i,r,o)}finally{Y.p=p,M.T=d}}function Hc(e,i,r,o){if(To){var d=Uc(o);if(d===null)Cc(e,i,o,xo,r),dg(e,o);else if(yS(d,e,i,r,o))o.stopPropagation();else if(dg(e,o),i&4&&-1<_S.indexOf(e)){for(;d!==null;){var p=Ki(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var _=bi(p.pendingLanes);if(_!==0){var C=p;for(C.pendingLanes|=2,C.entangledLanes|=2;_;){var x=1<<31-Ot(_);C.entanglements[1]|=x,_&=~x}pn(p),(Re&6)===0&&(oo=kt()+500,Dr(0))}}break;case 31:case 13:C=Ti(p,2),C!==null&&Lt(C,p,2),uo(),zc(p,2)}if(p=Uc(o),p===null&&Cc(e,i,o,xo,r),p===d)break;d=p}d!==null&&o.stopPropagation()}else Cc(e,i,o,null,r)}}function Uc(e){return e=Vs(e),Pc(e)}var xo=null;function Pc(e){if(xo=null,e=Zi(e),e!==null){var i=u(e);if(i===null)e=null;else{var r=i.tag;if(r===13){if(e=f(i),e!==null)return e;e=null}else if(r===31){if(e=h(i),e!==null)return e;e=null}else if(r===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return xo=e,null}function cg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"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(iy()){case _f:return 2;case yf:return 8;case pl:case ay:return 32;case bf:return 268435456;default:return 32}default:return 32}}var Vc=!1,ci=null,di=null,fi=null,Ur=new Map,Pr=new Map,hi=[],_S="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 dg(e,i){switch(e){case"focusin":case"focusout":ci=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":Ur.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pr.delete(i.pointerId)}}function Vr(e,i,r,o,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:i,domEventName:r,eventSystemFlags:o,nativeEvent:p,targetContainers:[d]},i!==null&&(i=Ki(i),i!==null&&sg(i)),e):(e.eventSystemFlags|=o,i=e.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),e)}function yS(e,i,r,o,d){switch(i){case"focusin":return ci=Vr(ci,e,i,r,o,d),!0;case"dragenter":return di=Vr(di,e,i,r,o,d),!0;case"mouseover":return fi=Vr(fi,e,i,r,o,d),!0;case"pointerover":var p=d.pointerId;return Ur.set(p,Vr(Ur.get(p)||null,e,i,r,o,d)),!0;case"gotpointercapture":return p=d.pointerId,Pr.set(p,Vr(Pr.get(p)||null,e,i,r,o,d)),!0}return!1}function fg(e){var i=Zi(e.target);if(i!==null){var r=u(i);if(r!==null){if(i=r.tag,i===13){if(i=f(r),i!==null){e.blockedOn=i,xf(e.priority,function(){ug(r)});return}}else if(i===31){if(i=h(r),i!==null){e.blockedOn=i,xf(e.priority,function(){ug(r)});return}}else if(i===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lo(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var r=Uc(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Ps=o,r.target.dispatchEvent(o),Ps=null}else return i=Ki(r),i!==null&&sg(i),e.blockedOn=r,!1;i.shift()}return!0}function hg(e,i,r){Lo(e)&&r.delete(i)}function bS(){Vc=!1,ci!==null&&Lo(ci)&&(ci=null),di!==null&&Lo(di)&&(di=null),fi!==null&&Lo(fi)&&(fi=null),Ur.forEach(hg),Pr.forEach(hg)}function wo(e,i){e.blockedOn===i&&(e.blockedOn=null,Vc||(Vc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bS)))}var Ro=null;function pg(e){Ro!==e&&(Ro=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ro===e&&(Ro=null);for(var i=0;i<e.length;i+=3){var r=e[i],o=e[i+1],d=e[i+2];if(typeof o!="function"){if(Pc(o||r)===null)continue;break}var p=Ki(r);p!==null&&(e.splice(i,3),i-=3,Uu(p,{pending:!0,data:d,method:r.method,action:o},o,d))}}))}function Oa(e){function i(x){return wo(x,e)}ci!==null&&wo(ci,e),di!==null&&wo(di,e),fi!==null&&wo(fi,e),Ur.forEach(i),Pr.forEach(i);for(var r=0;r<hi.length;r++){var o=hi[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<hi.length&&(r=hi[0],r.blockedOn===null);)fg(r),r.blockedOn===null&&hi.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var d=r[o],p=r[o+1],_=d[St]||null;if(typeof p=="function")_||pg(r);else if(_){var C=null;if(p&&p.hasAttribute("formAction")){if(d=p,_=p[St]||null)C=_.formAction;else if(Pc(d)!==null)continue}else C=_.action;typeof C=="function"?r[o+1]=C:(r.splice(o,3),o-=3),pg(r)}}}function mg(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(_){return d=_})},focusReset:"manual",scroll:"manual"})}function i(){d!==null&&(d(),d=null),o||setTimeout(r,20)}function r(){if(!o&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(r,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),d!==null&&(d(),d=null)}}}function Bc(e){this._internalRoot=e}ko.prototype.render=Bc.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var r=i.current,o=Pt();lg(r,o,e,i,null,null)},ko.prototype.unmount=Bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;lg(e.current,2,null,e,null,null),uo(),i[Qi]=null}};function ko(e){this._internalRoot=e}ko.prototype.unstable_scheduleHydration=function(e){if(e){var i=Tf();e={blockedOn:null,target:e,priority:i};for(var r=0;r<hi.length&&i!==0&&i<hi[r].priority;r++);hi.splice(r,0,e),r===0&&fg(e)}};var gg=n.version;if(gg!=="19.2.7")throw Error(l(527,gg,"19.2.7"));Y.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=m(i),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var SS={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Do=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Do.isDisabled&&Do.supportsFiber)try{Qa=Do.inject(SS),Dt=Do}catch{}}return Gr.createRoot=function(e,i){if(!s(e))throw Error(l(299));var r=!1,o="",d=Cp,p=Ap,_=Tp;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(p=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError)),i=ag(e,1,!1,null,null,r,o,null,d,p,_,mg),e[Qi]=i.current,Ec(e),new Bc(i)},Gr.hydrateRoot=function(e,i,r){if(!s(e))throw Error(l(299));var o=!1,d="",p=Cp,_=Ap,C=Tp,x=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(_=r.onCaughtError),r.onRecoverableError!==void 0&&(C=r.onRecoverableError),r.formState!==void 0&&(x=r.formState)),i=ag(e,1,!0,i,r??null,o,d,x,p,_,C,mg),i.context=rg(null),r=i.current,o=Pt(),o=Ds(o),d=Wn(o),d.callback=null,Jn(r,d,o),r=o,i.current.lanes=r,Ka(i,r),pn(i),e[Qi]=i.current,Ec(e),new ko(i)},Gr.version="19.2.7",Gr}var xg;function OS(){if(xg)return $c.exports;xg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),$c.exports=DS(),$c.exports}var MS=OS();const av="diffs-container";(()=>{try{return!1}catch{return!1}})();const NS=/(?=^From [a-f0-9]+ .+$)/m,rv=/(?=^diff --git)/gm,IS=/^(---|\+\+\+)\s+([^\t\r\n]+)/,zS=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,HS=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,US=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,lv="header-prefix",ov="header-metadata",af="header-custom",Jt={dark:"pierre-dark",light:"pierre-light"},PS="data-theme-css",VS="data-unsafe-css",BS="data-diffs-scrollbar-measure",sv="--diffs-scrollbar-gutter-measured",GS=1e5,jS={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},$S=Object.freeze({fromStart:0,fromEnd:0}),Lg={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},qS={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Td(t,n,a){if(t===n||t==null||n==null)return t===n;const l=new Set(a),s=Object.keys(t),u=new Set(Object.keys(n));for(const f of s)if(u.delete(f),!l.has(f)&&(!(f in n)||t[f]!==n[f]))return!1;for(const f of Array.from(u))if(!l.has(f))return!1;return!0}function rf(t,n){return t==null||n==null||typeof t=="string"||typeof n=="string"?t===n:t.dark===n.dark&&t.light===n.light}function uv(t,n){const a=t?.theme??Jt,l=n?.theme??Jt,s=wg(t),u=wg(n);return rf(a,l)&&Td(t,n,["theme","parseDiffOptions"])&&Td(s,u)}function wg(t){if(t!=null&&"parseDiffOptions"in t)return t.parseDiffOptions}function Rg(t,n){return t?.start===n?.start&&t?.end===n?.end&&t?.side===n?.side&&t?.endSide===n?.endSide}function yn(t){return{type:"text",value:t}}function ye({tagName:t,children:n=[],properties:a={}}){return{type:"element",tagName:t,properties:a,children:n}}function is({name:t,width:n=16,height:a=16,properties:l}){return ye({tagName:"svg",properties:{width:n,height:a,viewBox:"0 0 16 16",...l},children:[ye({tagName:"use",properties:{href:`#${t.replace(/^#/,"")}`}})]})}function FS(t){let n=t.children[0];for(;n!=null;){if(n.type==="element"&&n.tagName==="code")return n;"children"in n?n=n.children[0]:n=null}}function Oo(t){return ye({tagName:"div",properties:{"data-gutter":""},children:t})}function YS(t,n,a,l={}){return ye({tagName:"div",properties:{"data-line-type":t,"data-column-number":n,"data-line-index":a,...l},children:n!=null?[ye({tagName:"span",properties:{"data-line-number-content":""},children:[yn(`${n}`)]})]:void 0})}function on(t,n,a){return ye({tagName:"div",properties:{"data-gutter-buffer":n,"data-buffer-size":a,"data-line-type":n==="annotation"?void 0:t,style:n==="annotation"?`grid-row: span ${a};`:`grid-row: span ${a};min-height:calc(${a} * 1lh);`}})}function XS(){return ye({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[is({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function QS(t,n){return t.lineNumber===n.lineNumber&&t.side===n.side}const ZS=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class dl{constructor(n,a,l){this.normal=a,this.property=n,l&&(this.space=l)}}dl.prototype.normal={};dl.prototype.property={};dl.prototype.space=void 0;function cv(t,n){const a={},l={};for(const s of t)Object.assign(a,s.property),Object.assign(l,s.normal);return new dl(a,l,n)}function xd(t){return t.toLowerCase()}class wt{constructor(n,a){this.attribute=a,this.property=n}}wt.prototype.attribute="";wt.prototype.booleanish=!1;wt.prototype.boolean=!1;wt.prototype.commaOrSpaceSeparated=!1;wt.prototype.commaSeparated=!1;wt.prototype.defined=!1;wt.prototype.mustUseProperty=!1;wt.prototype.number=!1;wt.prototype.overloadedBoolean=!1;wt.prototype.property="";wt.prototype.spaceSeparated=!1;wt.prototype.space=void 0;let KS=0;const de=Yi(),Je=Yi(),Ld=Yi(),X=Yi(),ze=Yi(),ji=Yi(),Vt=Yi();function Yi(){return 2**++KS}const wd=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:Je,commaOrSpaceSeparated:Vt,commaSeparated:ji,number:X,overloadedBoolean:Ld,spaceSeparated:ze},Symbol.toStringTag,{value:"Module"})),Xc=Object.keys(wd);class lf extends wt{constructor(n,a,l,s){let u=-1;if(super(n,a),kg(this,"space",s),typeof l=="number")for(;++u<Xc.length;){const f=Xc[u];kg(this,Xc[u],(l&wd[f])===wd[f])}}}lf.prototype.defined=!0;function kg(t,n,a){a&&(t[n]=a)}function qa(t){const n={},a={};for(const[l,s]of Object.entries(t.properties)){const u=new lf(l,t.transform(t.attributes||{},l),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),n[l]=u,a[xd(l)]=l,a[xd(u.attribute)]=l}return new dl(n,a,t.space)}const dv=qa({properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:ze,ariaCurrent:null,ariaDescribedBy:ze,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:ze,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:ze,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ze,ariaLevel:X,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:ze,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:ze,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:Je,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(t,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function fv(t,n){return n in t?t[n]:n}function hv(t,n){return fv(t,n.toLowerCase())}const WS=qa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ji,acceptCharset:ze,accessKey:ze,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alpha:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:ze,autoFocus:de,autoPlay:de,blocking:ze,capture:null,charSet:null,checked:de,cite:null,className:ze,closedBy:null,colorSpace:null,cols:X,colSpan:X,command:null,commandFor:null,content:null,contentEditable:Je,controls:de,controlsList:ze,coords:X|ji,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Ld,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:ze,height:X,hidden:Ld,high:X,href:null,hrefLang:null,htmlFor:ze,httpEquiv:ze,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:ze,itemRef:ze,itemScope:de,itemType:ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,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:de,optimum:X,pattern:null,ping:ze,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:ze,required:de,reversed:de,rows:X,rowSpan:X,sandbox:ze,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootCustomElementRegistry:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shadowRootSerializable:de,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:Je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:Je,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ze,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:Je,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:de,disablePictureInPicture:de,disableRemotePlayback:de,exportParts:ji,part:ze,prefix:null,property:null,results:X,security:null,unselectable:null},space:"html",transform:hv}),JS=qa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Vt,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:ze,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ji,g2:ji,glyphName:ji,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:Vt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vt,rev:Vt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vt,requiredFeatures:Vt,requiredFonts:Vt,requiredFormats:Vt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:Vt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vt,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fv}),pv=qa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,n){return"xlink:"+n.slice(5).toLowerCase()}}),mv=qa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hv}),gv=qa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,n){return"xml:"+n.slice(3).toLowerCase()}}),e1=/[A-Z]/g,Dg=/-[a-z]/g,t1=/^data[-\w.:]+$/i;function n1(t,n){const a=xd(n);let l=n,s=wt;if(a in t.normal)return t.property[t.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&t1.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(Dg,a1);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!Dg.test(u)){let f=u.replace(e1,i1);f.charAt(0)!=="-"&&(f="-"+f),n="data"+f}}s=lf}return new s(l,n)}function i1(t){return"-"+t.toLowerCase()}function a1(t){return t.charAt(1).toUpperCase()}const r1=cv([dv,WS,pv,mv,gv],"html"),vv=cv([dv,JS,pv,mv,gv],"svg"),Og={}.hasOwnProperty;function l1(t,n){const a=n||{};function l(s,...u){let f=l.invalid;const h=l.handlers;if(s&&Og.call(s,t)){const c=String(s[t]);f=Og.call(h,c)?h[c]:l.unknown}if(f)return f.call(this,s,...u)}return l.handlers=a.handlers||{},l.invalid=a.invalid,l.unknown=a.unknown,l}const o1=/["&'<>`]/g,s1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u1=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,c1=/[|\\{}()[\]^$+*?.]/g,Mg=new WeakMap;function d1(t,n){if(t=t.replace(n.subset?f1(n.subset):o1,l),n.subset||n.escapeOnly)return t;return t.replace(s1,a).replace(u1,l);function a(s,u,f){return n.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,f.charCodeAt(u+2),n)}function l(s,u,f){return n.format(s.charCodeAt(0),f.charCodeAt(u+1),n)}}function f1(t){let n=Mg.get(t);return n||(n=h1(t),Mg.set(t,n)),n}function h1(t){const n=[];let a=-1;for(;++a<t.length;)n.push(t[a].replace(c1,"\\$&"));return new RegExp("(?:"+n.join("|")+")","g")}const p1=/[\dA-Fa-f]/;function m1(t,n,a){const l="&#x"+t.toString(16).toUpperCase();return a&&n&&!p1.test(String.fromCharCode(n))?l:l+";"}const g1=/\d/;function v1(t,n,a){const l="&#"+String(t);return a&&n&&!g1.test(String.fromCharCode(n))?l:l+";"}const _1=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Qc={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},y1=["cent","copy","divide","gt","lt","not","para","times"],_v={}.hasOwnProperty,Rd={};let Mo;for(Mo in Qc)_v.call(Qc,Mo)&&(Rd[Qc[Mo]]=Mo);const b1=/[^\dA-Za-z]/;function S1(t,n,a,l){const s=String.fromCharCode(t);if(_v.call(Rd,s)){const u=Rd[s],f="&"+u;return a&&_1.includes(u)&&!y1.includes(u)&&(!l||n&&n!==61&&b1.test(String.fromCharCode(n)))?f:f+";"}return""}function E1(t,n,a){let l=m1(t,n,a.omitOptionalSemicolons),s;if((a.useNamedReferences||a.useShortestReferences)&&(s=S1(t,n,a.omitOptionalSemicolons,a.attribute)),(a.useShortestReferences||!s)&&a.useShortestReferences){const u=v1(t,n,a.omitOptionalSemicolons);u.length<l.length&&(l=u)}return s&&(!a.useShortestReferences||s.length<l.length)?s:l}function Ba(t,n){return d1(t,Object.assign({format:E1},n))}const C1=/^>|^->|<!--|-->|--!>|<!-$/g,A1=[">"],T1=["<",">"];function x1(t,n,a,l){return l.settings.bogusComments?"<?"+Ba(t.value,Object.assign({},l.settings.characterReferences,{subset:A1}))+">":"<!--"+t.value.replace(C1,s)+"-->";function s(u){return Ba(u,Object.assign({},l.settings.characterReferences,{subset:T1}))}}function L1(t,n,a,l){return"<!"+(l.settings.upperDoctype?"DOCTYPE":"doctype")+(l.settings.tightDoctype?"":" ")+"html>"}function Ng(t,n){const a=String(t);if(typeof n!="string")throw new TypeError("Expected character");let l=0,s=a.indexOf(n);for(;s!==-1;)l++,s=a.indexOf(n,s+n.length);return l}function w1(t,n){const a=n||{};return(t[t.length-1]===""?[...t,""]:t).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}function R1(t){return t.join(" ").trim()}const k1=/[ \t\n\f\r]/g;function of(t){return typeof t=="object"?t.type==="text"?Ig(t.value):!1:Ig(t)}function Ig(t){return t.replace(k1,"")===""}const at=bv(1),yv=bv(-1),D1=[];function bv(t){return n;function n(a,l,s){const u=a?a.children:D1;let f=(l||0)+t,h=u[f];if(!s)for(;h&&of(h);)f+=t,h=u[f];return h}}const O1={}.hasOwnProperty;function Sv(t){return n;function n(a,l,s){return O1.call(t,a.tagName)&&t[a.tagName](a,l,s)}}const sf=Sv({body:N1,caption:Zc,colgroup:Zc,dd:U1,dt:H1,head:Zc,html:M1,li:z1,optgroup:P1,option:V1,p:I1,rp:zg,rt:zg,tbody:G1,td:Hg,tfoot:j1,th:Hg,thead:B1,tr:$1});function Zc(t,n,a){const l=at(a,n,!0);return!l||l.type!=="comment"&&!(l.type==="text"&&of(l.value.charAt(0)))}function M1(t,n,a){const l=at(a,n);return!l||l.type!=="comment"}function N1(t,n,a){const l=at(a,n);return!l||l.type!=="comment"}function I1(t,n,a){const l=at(a,n);return l?l.type==="element"&&(l.tagName==="address"||l.tagName==="article"||l.tagName==="aside"||l.tagName==="blockquote"||l.tagName==="details"||l.tagName==="div"||l.tagName==="dl"||l.tagName==="fieldset"||l.tagName==="figcaption"||l.tagName==="figure"||l.tagName==="footer"||l.tagName==="form"||l.tagName==="h1"||l.tagName==="h2"||l.tagName==="h3"||l.tagName==="h4"||l.tagName==="h5"||l.tagName==="h6"||l.tagName==="header"||l.tagName==="hgroup"||l.tagName==="hr"||l.tagName==="main"||l.tagName==="menu"||l.tagName==="nav"||l.tagName==="ol"||l.tagName==="p"||l.tagName==="pre"||l.tagName==="section"||l.tagName==="table"||l.tagName==="ul"):!a||!(a.type==="element"&&(a.tagName==="a"||a.tagName==="audio"||a.tagName==="del"||a.tagName==="ins"||a.tagName==="map"||a.tagName==="noscript"||a.tagName==="video"))}function z1(t,n,a){const l=at(a,n);return!l||l.type==="element"&&l.tagName==="li"}function H1(t,n,a){const l=at(a,n);return!!(l&&l.type==="element"&&(l.tagName==="dt"||l.tagName==="dd"))}function U1(t,n,a){const l=at(a,n);return!l||l.type==="element"&&(l.tagName==="dt"||l.tagName==="dd")}function zg(t,n,a){const l=at(a,n);return!l||l.type==="element"&&(l.tagName==="rp"||l.tagName==="rt")}function P1(t,n,a){const l=at(a,n);return!l||l.type==="element"&&l.tagName==="optgroup"}function V1(t,n,a){const l=at(a,n);return!l||l.type==="element"&&(l.tagName==="option"||l.tagName==="optgroup")}function B1(t,n,a){const l=at(a,n);return!!(l&&l.type==="element"&&(l.tagName==="tbody"||l.tagName==="tfoot"))}function G1(t,n,a){const l=at(a,n);return!l||l.type==="element"&&(l.tagName==="tbody"||l.tagName==="tfoot")}function j1(t,n,a){return!at(a,n)}function $1(t,n,a){const l=at(a,n);return!l||l.type==="element"&&l.tagName==="tr"}function Hg(t,n,a){const l=at(a,n);return!l||l.type==="element"&&(l.tagName==="td"||l.tagName==="th")}const q1=Sv({body:X1,colgroup:Q1,head:Y1,html:F1,tbody:Z1});function F1(t){const n=at(t,-1);return!n||n.type!=="comment"}function Y1(t){const n=new Set;for(const l of t.children)if(l.type==="element"&&(l.tagName==="base"||l.tagName==="title")){if(n.has(l.tagName))return!1;n.add(l.tagName)}const a=t.children[0];return!a||a.type==="element"}function X1(t){const n=at(t,-1,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&of(n.value.charAt(0)))&&!(n.type==="element"&&(n.tagName==="meta"||n.tagName==="link"||n.tagName==="script"||n.tagName==="style"||n.tagName==="template"))}function Q1(t,n,a){const l=yv(a,n),s=at(t,-1,!0);return a&&l&&l.type==="element"&&l.tagName==="colgroup"&&sf(l,a.children.indexOf(l),a)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function Z1(t,n,a){const l=yv(a,n),s=at(t,-1);return a&&l&&l.type==="element"&&(l.tagName==="thead"||l.tagName==="tbody")&&sf(l,a.children.indexOf(l),a)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const No={name:[[`
11
+ \f\r &/=>`.split(""),`
12
+ \f\r "&'/=>\``.split("")],[`\0
13
+ \f\r "&'/<=>`.split(""),`\0
14
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
15
+ \f\r &>`.split(""),`\0
16
+ \f\r "&'<=>\``.split("")],[`\0
17
+ \f\r "&'<=>\``.split(""),`\0
18
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function K1(t,n,a,l){const s=l.schema,u=s.space==="svg"?!1:l.settings.omitOptionalTags;let f=s.space==="svg"?l.settings.closeEmptyElements:l.settings.voids.includes(t.tagName.toLowerCase());const h=[];let c;s.space==="html"&&t.tagName==="svg"&&(l.schema=vv);const m=W1(l,t.properties),v=l.all(s.space==="html"&&t.tagName==="template"?t.content:t);return l.schema=s,v&&(f=!1),(m||!u||!q1(t,n,a))&&(h.push("<",t.tagName,m?" "+m:""),f&&(s.space==="svg"||l.settings.closeSelfClosing)&&(c=m.charAt(m.length-1),(!l.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&h.push(" "),h.push("/")),h.push(">")),h.push(v),!f&&(!u||!sf(t,n,a))&&h.push("</"+t.tagName+">"),h.join("")}function W1(t,n){const a=[];let l=-1,s;if(n){for(s in n)if(n[s]!==null&&n[s]!==void 0){const u=J1(t,s,n[s]);u&&a.push(u)}}for(;++l<a.length;){const u=t.settings.tightAttributes?a[l].charAt(a[l].length-1):void 0;l!==a.length-1&&u!=='"'&&u!=="'"&&(a[l]+=" ")}return a.join("")}function J1(t,n,a){const l=n1(t.schema,n),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,u=t.settings.allowDangerousCharacters?0:1;let f=t.quote,h;if(l.overloadedBoolean&&(a===l.attribute||a==="")?a=!0:(l.boolean||l.overloadedBoolean)&&(typeof a!="string"||a===l.attribute||a==="")&&(a=!!a),a==null||a===!1||typeof a=="number"&&Number.isNaN(a))return"";const c=Ba(l.attribute,Object.assign({},t.settings.characterReferences,{subset:No.name[s][u]}));return a===!0||(a=Array.isArray(a)?(l.commaSeparated?w1:R1)(a,{padLeft:!t.settings.tightCommaSeparatedLists}):String(a),t.settings.collapseEmptyAttributes&&!a)?c:(t.settings.preferUnquoted&&(h=Ba(a,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:No.unquoted[s][u]}))),h!==a&&(t.settings.quoteSmart&&Ng(a,f)>Ng(a,t.alternative)&&(f=t.alternative),h=f+Ba(a,Object.assign({},t.settings.characterReferences,{subset:(f==="'"?No.single:No.double)[s][u],attribute:!0}))+f),c+(h&&"="+h))}const eE=["<","&"];function Ev(t,n,a,l){return a&&a.type==="element"&&(a.tagName==="script"||a.tagName==="style")?t.value:Ba(t.value,Object.assign({},l.settings.characterReferences,{subset:eE}))}function tE(t,n,a,l){return l.settings.allowDangerousHtml?t.value:Ev(t,n,a,l)}function nE(t,n,a,l){return l.all(t)}const iE=l1("type",{invalid:aE,unknown:rE,handlers:{comment:x1,doctype:L1,element:K1,raw:tE,root:nE,text:Ev}});function aE(t){throw new Error("Expected node, not `"+t+"`")}function rE(t){const n=t;throw new Error("Cannot compile unknown node `"+n.type+"`")}const lE={},oE={},sE=[];function Ga(t,n){const a=n||lE,l=a.quote||'"',s=l==='"'?"'":'"';if(l!=='"'&&l!=="'")throw new Error("Invalid quote `"+l+"`, expected `'` or `\"`");return{one:uE,all:cE,settings:{omitOptionalTags:a.omitOptionalTags||!1,allowParseErrors:a.allowParseErrors||!1,allowDangerousCharacters:a.allowDangerousCharacters||!1,quoteSmart:a.quoteSmart||!1,preferUnquoted:a.preferUnquoted||!1,tightAttributes:a.tightAttributes||!1,upperDoctype:a.upperDoctype||!1,tightDoctype:a.tightDoctype||!1,bogusComments:a.bogusComments||!1,tightCommaSeparatedLists:a.tightCommaSeparatedLists||!1,tightSelfClosing:a.tightSelfClosing||!1,collapseEmptyAttributes:a.collapseEmptyAttributes||!1,allowDangerousHtml:a.allowDangerousHtml||!1,voids:a.voids||ZS,characterReferences:a.characterReferences||oE,closeSelfClosing:a.closeSelfClosing||!1,closeEmptyElements:a.closeEmptyElements||!1},schema:a.space==="svg"?vv:r1,quote:l,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function uE(t,n,a){return iE(t,n,a,this)}function cE(t){const n=[],a=t&&t.children||sE;let l=-1;for(;++l<a.length;)n[l]=this.one(a[l],l,t);return n.join("")}var dE=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(t,n){this.mode=t,this.options=n}setOptions(t){this.options=t}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(t){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:a=!1}=this.options;this.pre!==t&&(this.cleanUp(),this.pre=t),a?this.ensureGutterUtilityNode(n):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(t),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(t,n){const a=!(t===this.selectedRange||Rg(t??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!a||(this.proposedSelectedRange=void 0,this.selectedRange=t,this.renderSelection(),this.placeUtility(),a&&n?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const t=this.gutterUtilityLine??this.hoveredLine;if(t!=null){if(this.mode==="diff"&&t.type==="diff-line")return{lineNumber:t.lineNumber,side:t.annotationSide};if(this.mode==="file"&&t.type==="line")return{lineNumber:t.lineNumber}}};handlePointerClick=t=>{const{onHunkExpand:n,onLineClick:a,onLineNumberClick:l,onTokenClick:s,onMergeConflictActionClick:u}=this.options;n==null&&a==null&&l==null&&u==null&&s==null||this.options.onGutterUtilityClick!=null&&zo(t.composedPath())||(Pn(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",t),this.handlePointerEvent({eventType:"click",event:t}))};handlePointerMove=t=>{if(t.pointerType!=="mouse")return;const{lineHoverHighlight:n="disabled",onLineEnter:a,onLineLeave:l,onTokenEnter:s,onTokenLeave:u,enableGutterUtility:f=!1}=this.options;n==="disabled"&&!f&&a==null&&l==null&&s==null&&u==null||(Pn(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",t),this.handlePointerEvent({eventType:"move",event:t}))};handlePointerLeave=t=>{const{__debugPointerEvents:n}=this.options;if(Pn(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){Pn(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,t),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:t,event:n}){const{__debugPointerEvents:a}=this.options,l=n.composedPath();Pn(a,t,"FileDiff.DEBUG.handlePointerEvent:",{eventType:t,composedPath:l});const s=this.resolvePointerTarget(l);Pn(a,t,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",s);const{onLineClick:u,onLineNumberClick:f,onLineEnter:h,onLineLeave:c,onTokenClick:m,onTokenEnter:v,onTokenLeave:g,onHunkExpand:y,onMergeConflictActionClick:b}=this.options;switch(t){case"move":{const E=Kc(s)&&this.hoveredLine?.lineElement===s.lineElement;Wo(s)&&this.hoveredToken?.tokenElement===s.tokenElement||(this.hoveredToken!=null&&(g?.(this.hoveredToken,n),this.clearHoveredToken()),Wo(s)&&(this.setHoveredToken(this.toTokenEventBaseProps(s)),v?.(this.hoveredToken,n))),E||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:n}),this.clearHoveredLine()),Kc(s)?(this.setHoveredLine(this.toEventBaseProps(s)),this.placeUtility(),h?.({...this.hoveredLine,event:n})):this.placeUtility());break}case"click":{if(s==null)break;if(pE(s)&&b!=null){b(s);break}if(hE(s)&&y!=null){y(s.hunkIndex,s.all||n.shiftKey?"both":s.direction,s.all||n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Kc(s))break;Wo(s)&&m!=null&&m(this.toTokenEventBaseProps(s),n);const E=this.toEventBaseProps(s);f!=null&&s.numberColumn?f({...E,event:n}):u?.({...E,event:n});break}}}syncPointerListeners(t){const{__debugPointerEvents:n,lineHoverHighlight:a="disabled",onLineClick:l,onLineNumberClick:s,onLineEnter:u,onLineLeave:f,onTokenClick:h,onTokenEnter:c,onTokenLeave:m,onHunkExpand:v,onMergeConflictActionClick:g,enableGutterUtility:y=!1,enableLineSelection:b=!1,onGutterUtilityClick:E}=this.options,T=E!=null,O=a!=="disabled"||l!=null||s!=null||u!=null||f!=null||h!=null||c!=null||m!=null||v!=null||g!=null||y||b||T;O&&!this.hasPointerListeners?(t.addEventListener("click",this.handlePointerClick),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointermove",this.handlePointerMove),t.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,Pn(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const w=[];return(n==="both"||n==="click")&&(l!=null&&w.push("onLineClick"),s!=null&&w.push("onLineNumberClick"),v!=null&&w.push("expandable hunk separators"),g!=null&&w.push("merge conflict actions")),w})()),Pn(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),Pn(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!O&&this.hasPointerListeners&&(t.removeEventListener("click",this.handlePointerClick),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointermove",this.handlePointerMove),t.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const L=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",A=this.pointerSession.mode==="gutterSelecting";(!b&&L||!T&&A)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:t,onLineNumberClick:n,enableLineSelection:a=!1}=this.options,l=t!=null,s=n!=null||a;l&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!l&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),s&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!s&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=t=>{if(t.pointerType==="mouse"&&t.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const n=t.composedPath();zo(n)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(t):(t.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(n),this.startLineSelectionFromPointerDown(t))};startLineSelectionFromPointerDown(t){const{enableLineSelection:n=!1}=this.options;if(!n)return;const a=this.resolveSelectionInfo(t,{source:"event-path",requireNumberColumn:!0});if(a==null)return;const{pre:l}=this;if(l==null)return;const{lineNumber:s,eventSide:u,lineIndex:f}=a;if(t.shiftKey&&this.selectedRange!=null){const h=this.getIndexesFromSelection(this.selectedRange,l.getAttribute("data-diff-type")==="split");if(h==null)return;const c=h.start<=h.end?f>=h.start:f<=h.end;this.selectionAnchor={lineNumber:c?this.selectedRange.start:this.selectedRange.end,side:c?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(s,u,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:t.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===s&&this.selectedRange?.end===s){const h={lineNumber:s,side:u};this.selectionAnchor=h,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:t.pointerId,anchor:h,pending:h},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:s,side:u},this.updateSelection(s,u,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:t.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(t){const{enableLineSelection:n=!1,onGutterUtilityClick:a}=this.options;if(a==null)return;const l=this.currentSelectionEnds(),s=l?.bottom??this.resolveSelectionPoint(t,{source:"event-path",excludeUtility:!1}),u=l?.top??s;s==null||u==null||(t.preventDefault(),t.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:t.pointerId,anchor:u,current:s},n&&(this.selectionAnchor={lineNumber:u.lineNumber,side:u.side},this.updateSelection(s.lineNumber,s.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=t=>{const{enableLineSelection:n=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const a=this.resolveSelectionPoint(t,{source:"coordinates-first"});if(a==null)return;this.pointerSession.current=a,n===!0&&this.updateSelection(a.lineNumber,a.side);return}case"selecting":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const a=this.resolveSelectionInfo(t,{source:"coordinates-first",requireNumberColumn:!1});if(a==null||this.selectionAnchor==null)return;this.updateSelection(a.lineNumber,a.eventSide);return}case"pendingSingleLineUnselect":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const a=this.resolveSelectionInfo(t,{source:"coordinates-first",requireNumberColumn:!1});if(a==null||this.selectionAnchor==null)return;const l={lineNumber:a.lineNumber,side:a.eventSide};if(QS(this.pointerSession.pending,l))return;this.updateSelection(a.lineNumber,a.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:t.pointerId};return}}};handleDocumentPointerUp=t=>{const{enableLineSelection:n=!1,onGutterUtilityClick:a}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const l=this.resolveSelectionPoint(t,{source:"coordinates-first"});l!=null&&(this.pointerSession.current=l,n&&this.updateSelection(l.lineNumber,l.side)),a?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,n&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=t=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&t.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(t){const{lineHoverHighlight:n="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=t,n!=="disabled"&&((n==="both"||n==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(n==="both"||n==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(t){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=t}ensureGutterUtilityNode(t){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),t)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const n=document.createElement("div");n.innerHTML=Ga(XS());const a=n.firstElementChild;if(!(a instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");a.remove(),this.gutterUtilityButton=a}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(t){if(this.placeUtilityFromSelection())return;const n=this.resolvePointerTarget(t);Yr(n)&&n.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(n))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const t=this.currentSelectionEnds();if(t==null)return!1;const n=this.targetForSelectionPoint(t.bottom);return n==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(n)),!0}showUtilityOnLine(t){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=t,t.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const t=this.getCurrentSelectionRange();return t==null?void 0:this.selectionEnds(t)}selectionEnds(t){const n={lineNumber:t.start,side:t.side},a={lineNumber:t.end,side:t.endSide??t.side},l=this.selectionPointRowIndex(n),s=this.selectionPointRowIndex(a);if(!(l==null||s==null))return l>s?{top:a,bottom:n}:{top:n,bottom:a}}selectionPointRowIndex(t){const n=this.getLineIndex(t.lineNumber,t.side);if(n!=null)return this.isSplitDiff()?n[1]:n[0]}targetForSelectionPoint(t){if(this.pre==null)return;const n=this.getLineIndex(t.lineNumber,t.side);if(n==null)return;const a=this.mode==="diff"?`${n[0]},${n[1]}`:`${n[0]}`,l=this.pre.querySelectorAll(`[data-column-number="${t.lineNumber}"][data-line-index="${a}"]`);for(const s of l){if(!(s instanceof HTMLElement))continue;const u=this.resolvePointerTarget(Io(s));if(Yr(u)&&!(this.mode==="diff"&&t.side!=null&&u.side!==t.side))return u}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(t,n){const a=this.resolvePointerTarget(t);if(Yr(a)&&!(n&&!a.numberColumn)&&a.splitLineIndex!=null)return{lineIndex:a.splitLineIndex,lineNumber:a.lineNumber,eventSide:this.mode==="diff"?a.side:void 0}}resolveSelectionInfo(t,n){const a=this.resolveSelectionPath(t,n);return a!=null?this.selectionInfoFromPath(a,n.requireNumberColumn):void 0}selectionPointFromPath(t){const n=this.resolvePointerTarget(t);if(Yr(n))return{lineNumber:n.lineNumber,side:this.mode==="diff"?n.side:void 0}}resolveSelectionPoint(t,n){const a=this.resolveSelectionPath(t,n);return a!=null?this.selectionPointFromPath(a):void 0}resolveSelectionPath(t,n){const a=n.excludeUtility!==!1;switch(n.source){case"event-path":return this.pathFromEventPath(t.composedPath(),a);case"coordinates-first":{const l=this.pathFromCoordinates(t,a);return l!==void 0?l??void 0:this.pathFromEventPath(t.composedPath(),a)}}}pathFromCoordinates(t,n){const a=this.hitTest(t);if(a!==void 0)return a===null?null:this.pathFromElement(a,n)??null}pathFromEventPath(t,n){if(!(n&&zo(t))){for(const a of t)if(a instanceof Element)return this.pathFromElement(a,n)}}pathFromElement(t,n){const a=Io(t);if(n&&zo(a))return;const l=gE(t);return l!=null?Io(l):this.pathFromAnnotationSlot(t)}pathFromAnnotationSlot(t){const n=_E(vE(t));if(n==null)return;const a=this.targetForSelectionPoint(n);return a!=null?Io(a.lineElement):void 0}hitTest(t){if(!Number.isFinite(t.clientX)||!Number.isFinite(t.clientY))return;const n=this.pre?.getRootNode(),a=Vg(n)?n:Vg(document)?document:void 0;if(a!=null)return a.elementFromPoint(t.clientX,t.clientY)}getLineIndex(t,n){const{getLineIndex:a}=this.options;return a!=null?a(t,n):[t-1,t-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(t,n,a=!0){const l=this.getCurrentSelectionRange();let s;if(t==null)s=null;else{const u=this.selectionAnchor?.side??n,f=this.selectionAnchor?.lineNumber??t;s=this.buildSelectionRange(f,t,u,n)}Rg(l??void 0,s??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=s:(this.selectedRange=s,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),a&&this.notifySelectionChangeDelta())}getIndexesFromSelection(t,n){if(this.pre==null)return;const a=this.getLineIndex(t.start,t.side),l=this.getLineIndex(t.end,t.endSide??t.side);return a!=null&&l!=null?{start:n?a[1]:a[0],end:n?l[1]:l[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const t=this.pre.querySelectorAll("[data-selected-line]");for(const h of t)h.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:n}=this.pre;if(n.length===0)return;if(n.length>2)throw console.error(n),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const a=this.pre.getAttribute("data-diff-type")==="split",l=this.getIndexesFromSelection(this.selectedRange,a);if(l==null)throw console.error({rowRange:l,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const s=l.start===l.end,u=Math.min(l.start,l.end),f=Math.max(l.start,l.end);for(const h of n){const[c,m]=h.children,v=m.children.length;if(v!==c.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let g=0;g<v;g++){const y=m.children[g],b=c.children[g];if(!(y instanceof HTMLElement)||!(b instanceof HTMLElement))continue;const E=this.parseLineIndex(y,a);if((E??0)>f)break;if(E==null||E<u)continue;let T=s?"single":E===u?"first":E===f?"last":"";y.setAttribute("data-selected-line",T),b.setAttribute("data-selected-line",T),b.nextSibling instanceof HTMLElement&&y.nextSibling instanceof HTMLElement&&(y.nextSibling.hasAttribute("data-line-annotation")||y.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(s?(T="last",y.setAttribute("data-selected-line","first")):E===u?T="":E===f&&y.setAttribute("data-selected-line",""),y.nextSibling.setAttribute("data-selected-line",T),b.nextSibling.setAttribute("data-selected-line",T))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(t){this.options.onLineSelectionStart?.(t)}notifySelectionEnd(t){this.options.onLineSelectionEnd?.(t)}toEventBaseProps(t){return this.mode==="file"?{type:"line",lineElement:t.lineElement,lineNumber:t.lineNumber,numberColumn:t.numberColumn,numberElement:t.numberElement}:{type:"diff-line",annotationSide:t.side,lineType:t.lineType,lineElement:t.lineElement,numberElement:t.numberElement,lineNumber:t.lineNumber,numberColumn:t.numberColumn}}toTokenEventBaseProps({lineCharEnd:t,lineCharStart:n,lineNumber:a,side:l,tokenElement:s,tokenText:u}){return this.mode==="file"?{type:"token",lineCharEnd:t,lineCharStart:n,lineNumber:a,tokenElement:s,tokenText:u}:{type:"token",lineCharEnd:t,lineCharStart:n,lineNumber:a,side:l,tokenElement:s,tokenText:u}}buildSelectedLineRange(t,n){return this.buildSelectionRange(t.lineNumber,n.lineNumber,t.side,n.side)}buildSelectionRange(t,n,a,l){return{start:t,end:n,...a!=null?{side:a}:{},...a!==l&&l!=null?{endSide:l}:{}}}resolvePointerTarget(t){let n=!1,a,l,s,u,f,h,c,m,v,g;for(const b of t){if(!(b instanceof HTMLElement))continue;if(g==null&&b.hasAttribute("data-merge-conflict-action")){const L=b.getAttribute("data-merge-conflict-action")??void 0,A=b.getAttribute("data-merge-conflict-conflict-index")??void 0,w=A!=null?Number.parseInt(A,10):NaN;mE(L)&&Number.isFinite(w)&&(g={kind:"merge-conflict-action",resolution:L,conflictIndex:w})}if(h==null&&b.hasAttribute("data-char")){h=b;const L=b.getAttribute("data-char");if(L!=null){const A=Number.parseInt(L,10);if(!Number.isNaN(A)){const w=b.textContent??"",z=A+w.length;(w.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:h,lineCharStart:A,lineCharEnd:z,tokenText:w});continue}}}const E=f==null?b.getAttribute("data-column-number")??void 0:void 0;if(E!=null){f=b,v=Number.parseInt(E,10),n=!0,a=Gg(b),u=b.getAttribute("data-line-index")??void 0;continue}const T=s==null?b.getAttribute("data-line")??void 0:void 0;if(T!=null){s=b,v=Number.parseInt(T,10),a=Gg(b),u=b.getAttribute("data-line-index")??void 0;continue}if(m==null&&(b.hasAttribute("data-expand-button")||b.hasAttribute("data-unmodified-lines"))){m={hunkIndex:void 0,direction:b.hasAttribute("data-expand-up")?"up":b.hasAttribute("data-expand-down")?"down":"both",all:b.hasAttribute("data-expand-all-button")};continue}const O=m!=null?b.getAttribute("data-expand-index")??void 0:void 0;if(m!=null&&O!=null){const L=Number.parseInt(O,10);Number.isNaN(L)||(m.hunkIndex=L);continue}if(l==null&&b.hasAttribute("data-code")){l=b;break}}if(g!=null)return g;if(m?.hunkIndex!=null)return{type:"line-info",hunkIndex:m.hunkIndex,direction:m.direction,all:m.all};if(s??=u!=null?Pg(l,`[data-line][data-line-index="${u}"]`):void 0,f??=u!=null?Pg(l,`[data-column-number][data-line-index="${u}"]`):void 0,l==null||s==null||f==null||a==null||v==null||Number.isNaN(v))return;const y=this.parseLineIndex(s,this.isSplitDiff());return c!=null?this.mode==="file"?{kind:"token",lineType:a,lineElement:s,lineNumber:v,numberColumn:n,numberElement:f,side:void 0,splitLineIndex:y,...c}:{kind:"token",lineType:a,lineElement:s,lineNumber:v,numberColumn:n,numberElement:f,side:Bg(a,l),splitLineIndex:y,...c}:this.mode==="file"?{kind:"line",lineType:a,lineElement:s,lineNumber:v,numberColumn:n,numberElement:f,side:void 0,splitLineIndex:y}:{kind:"line",lineType:a,lineElement:s,lineNumber:v,numberColumn:n,numberElement:f,side:Bg(a,l),splitLineIndex:y}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(t,n){const a=(t.getAttribute("data-line-index")??"").split(",").map(l=>Number.parseInt(l,10)).filter(l=>!Number.isNaN(l));if(n&&a.length===2)return a[1];if(!n)return a[0]}};function Ug({enableTokenInteractionsOnWhitespace:t,enableGutterUtility:n,lineHoverHighlight:a,onGutterUtilityClick:l,onLineClick:s,onLineEnter:u,onLineLeave:f,onLineNumberClick:h,onTokenClick:c,onTokenEnter:m,onTokenLeave:v,renderGutterUtility:g,__debugPointerEvents:y,enableLineSelection:b,controlledSelection:E,onLineSelected:T,onLineSelectionStart:O,onLineSelectionChange:L,onLineSelectionEnd:A},w,z,V){return{enableTokenInteractionsOnWhitespace:t,enableGutterUtility:fE({enableGutterUtility:n,renderGutterUtility:g,onGutterUtilityClick:l}),usesCustomGutterUtility:g!=null,lineHoverHighlight:a,onGutterUtilityClick:l,onHunkExpand:w,onMergeConflictActionClick:V,onLineClick:s,onLineEnter:u,onLineLeave:f,onLineNumberClick:h,onTokenClick:c,onTokenEnter:m,onTokenLeave:v,__debugPointerEvents:y,enableLineSelection:b,controlledSelection:E,onLineSelected:T,onLineSelectionStart:O,onLineSelectionChange:L,onLineSelectionEnd:A,getLineIndex:z}}function fE({enableGutterUtility:t,renderGutterUtility:n,onGutterUtilityClick:a}){if(a!=null&&n!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return t??!1}function Yr(t){return t!=null&&"kind"in t&&t.kind==="line"}function Wo(t){return t!=null&&"kind"in t&&t.kind==="token"}function Kc(t){return Yr(t)||Wo(t)}function hE(t){return"type"in t&&t.type==="line-info"}function pE(t){return"kind"in t&&t.kind==="merge-conflict-action"}function mE(t){return t==="current"||t==="incoming"||t==="both"}function Pg(t,n){const a=t?.querySelector(n);return a instanceof HTMLElement?a:void 0}function Io(t){const n=[];let a=t;for(;a!=null;)n.push(a),a=a.parentNode;return n}function gE(t){const n=t.closest("[data-line], [data-column-number]");if(n instanceof HTMLElement)return n;const a=t.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(a instanceof HTMLElement))return;const l=a.previousElementSibling;return l instanceof HTMLElement&&(l.hasAttribute("data-line")||l.hasAttribute("data-column-number"))?l:void 0}function vE(t){const n=t.closest('[slot^="annotation-"]');if(n instanceof HTMLElement)return n.getAttribute("slot")??void 0;if(t instanceof HTMLElement){const a=t.getAttribute("name")??void 0;return a!=null&&a.startsWith("annotation-")?a:void 0}}function _E(t){if(t==null)return;const n=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(t);if(n==null)return;const a=Number.parseInt(n[2],10);if(!(!Number.isFinite(a)||a<=0))return{lineNumber:a,side:n[1]}}function Vg(t){return t!=null&&typeof t.elementFromPoint=="function"}function Bg(t,n){switch(t){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return n.hasAttribute("data-deletions")?"deletions":"additions"}}function Gg(t){const n=t.getAttribute("data-line-type");if(n!=null)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function zo(t){for(const n of t)if(n instanceof HTMLElement&&(n.hasAttribute("data-utility-button")||n.hasAttribute("data-gutter-utility-slot")||n.getAttribute("slot")==="gutter-utility-slot"||n.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function Pn(t="none",n,...a){switch(t){case"none":return;case"both":break;case"click":if(n!=="click")return;break;case"move":if(n!=="move")return;break}console.log(...a)}var yE=class Gn{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const n=Gn.resizeObserver??new ResizeObserver(Gn.handleSharedResizeEntries);return Gn.resizeObserver=n,n}static handleSharedResizeEntries(n){const a=new Map;for(const l of n){const s=Gn.managersByElement.get(l.target);if(s==null)continue;const u=a.get(s);u==null?a.set(s,[l]):u.push(l)}for(const[l,s]of a)l.handleResizeEntries(s)}observedNodes=new Map;setup(n,a){const l=new Set;let s=0;const u=new Map(this.observedNodes);this.observedNodes.clear();for(const f of n.children){if(s===2)break;const h=(()=>{if(f instanceof HTMLElement&&f.tagName==="CODE")return f})();if(h==null)continue;s++;let c=u.get(h);if(c!=null&&c.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let m=h.firstElementChild;m instanceof HTMLElement||(m=null),c!=null?(this.observedNodes.set(h,c),u.delete(h),c.numberElement!==m?(c.numberElement!=null&&(this.unobserve(c.numberElement),u.delete(c.numberElement)),m!=null&&(this.observe(m),u.delete(m),this.observedNodes.set(m,c)),c.numberElement=m,c.numberWidth=0):c.numberElement!=null?(u.delete(c.numberElement),this.observedNodes.set(c.numberElement,c)):c.numberWidth=0):(c={type:"code",codeElement:h,numberElement:m,codeWidth:"auto",numberWidth:0},this.observedNodes.set(h,c),this.observe(h),m!=null&&(this.observedNodes.set(m,c),this.observe(m)))}if(s>1&&!a){const f=n.querySelectorAll('[data-line-annotation*=","]'),h=new Map;for(const c of f){if(!(c instanceof HTMLElement))continue;const m=c.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(m)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:m,element:c});continue}let v=h.get(m);v==null&&(v=[],h.set(m,v)),v.push(c)}for(const[c,m]of h){if(m.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,m);continue}const[v,g]=m,y=v.firstElementChild,b=g.firstElementChild;if(!(v instanceof HTMLElement)||!(g instanceof HTMLElement)||!(y instanceof HTMLElement)||!(b instanceof HTMLElement))continue;let E=u.get(y);if(E!=null){this.observedNodes.set(y,E),this.observedNodes.set(b,E),u.delete(y),u.delete(b);continue}const T=y.getBoundingClientRect().height,O=b.getBoundingClientRect().height;E={type:"annotations",column1:{container:v,child:y,childHeight:T},column2:{container:g,child:b,childHeight:O},currentHeight:"auto"},l.add({child1:y,child2:b,item:E,newHeight:Math.max(T,O)})}for(const c of l)this.applyNewHeight(c.item,c.newHeight),this.observedNodes.set(c.child1,c.item),this.observedNodes.set(c.child2,c.item),this.observe(c.child1),this.observe(c.child2);l.clear()}for(const[f,h]of u)this.unobserve(f),h.type==="code"?EE(h):CE(h);u.clear()}cleanUp(){for(const n of this.observedNodes.keys())this.unobserve(n);this.observedNodes.clear()}observe(n){const{managersByElement:a}=Gn,l=a.get(n);if(l!==this){if(l!=null&&l!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");a.set(n,this),Gn.getResizeObserver().observe(n)}}unobserve(n){const{managersByElement:a,resizeObserver:l}=Gn,s=a.get(n);if(s!=null){if(s!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");a.delete(n),l?.unobserve(n),l!=null&&a.size===0&&(l.disconnect(),Gn.resizeObserver=void 0)}}handleResizeEntries(n){const a=new Map,l=new Set;for(const s of n){const{target:u,borderBoxSize:f,contentBoxSize:h}=s;if(!(u instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",s);continue}const c=this.observedNodes.get(u);if(c==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",s);continue}if(c.type==="annotations"){const m=(()=>{if(u===c.column1.child)return c.column1;if(u===c.column2.child)return c.column2})();if(m==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:c,target:u});continue}m.childHeight=f[0].blockSize,l.add(c)}else if(c.type==="code"){const m=a.get(c)??{},v=h[0].inlineSize;u===c.codeElement?m.codeInlineSize=v:u===c.numberElement&&(m.numberInlineSize=v),a.set(c,m)}}this.applyAnnotationUpdates(l),l.clear(),this.applyColumnUpdates(a),a.clear()}applyAnnotationUpdates(n){for(const a of n)this.applyNewHeight(a,Math.max(a.column1.childHeight,a.column2.childHeight))}applyColumnUpdates=n=>{for(const[a,l]of n){const s=l.codeInlineSize!=null?bE(l.codeInlineSize):a.codeWidth,u=l.numberInlineSize!=null?SE(l.numberInlineSize):a.numberWidth,f=s!==a.codeWidth,h=u!==a.numberWidth;if(!(!f&&!h)&&(a.codeWidth=s,a.numberWidth=u,f&&a.codeElement.style.setProperty("--diffs-column-width",`${typeof s=="number"?`${s}px`:"auto"}`),h&&a.codeElement.style.setProperty("--diffs-column-number-width",`${u===0?"auto":`${u}px`}`),f||h&&s!=="auto")){const c=typeof s=="number"?Math.max(s-u,0):0;a.codeElement.style.setProperty("--diffs-column-content-width",`${c>0?`${c}px`:"auto"}`)}}};applyNewHeight(n,a){a!==n.currentHeight&&(n.currentHeight=Math.max(a,0),n.column1.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`),n.column2.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`))}};function bE(t){const n=Math.max(Math.floor(t),0);return n===0?"auto":n}function SE(t){return Math.max(Math.ceil(t),0)}function EE(t){t.codeElement.isConnected&&(t.codeElement.style.removeProperty("--diffs-column-content-width"),t.codeElement.style.removeProperty("--diffs-column-number-width"),t.codeElement.style.removeProperty("--diffs-column-width"))}function CE(t){t.column1.container.isConnected&&t.column1.container.style.removeProperty("--diffs-annotation-min-height"),t.column2.container.isConnected&&t.column2.container.style.removeProperty("--diffs-annotation-min-height")}const nl=new Map,Wc=new Map,AE=new Map,kd=new Set;function jg(t){for(const n of Array.isArray(t)?t:[t])if(!(n==="text"||n==="ansi")&&!kd.has(n))return!1;return!0}function $g(t,n){t=Array.isArray(t)?t:[t];for(const a of t){if(kd.has(a.name))continue;let l=nl.get(a.name);l==null&&(l=a,nl.set(a.name,l)),kd.add(l.name),n.loadLanguageSync(l.data)}}function Cv(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}var Dd=Object.defineProperty,TE=Object.getOwnPropertyDescriptor,xE=Object.getOwnPropertyNames,LE=Object.prototype.hasOwnProperty,wE=(t,n)=>{let a={};for(var l in t)Dd(a,l,{get:t[l],enumerable:!0});return Dd(a,Symbol.toStringTag,{value:"Module"}),a},RE=(t,n,a,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(var s=xE(n),u=0,f=s.length,h;u<f;u++)h=s[u],!LE.call(t,h)&&h!==a&&Dd(t,h,{get:(c=>n[c]).bind(null,h),enumerable:!(l=TE(n,h))||l.enumerable});return t},kE=(t,n,a)=>(RE(t,n,"default"),a);const DE="modulepreload",OE=function(t){return"/"+t},qg={},S=function(n,a,l){let s=Promise.resolve();if(a&&a.length>0){let m=function(v){return Promise.all(v.map(g=>Promise.resolve(g).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};var f=m;document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),c=h?.nonce||h?.getAttribute("nonce");s=m(a.map(v=>{if(v=OE(v),v in qg)return;qg[v]=!0;const g=v.endsWith(".css"),y=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${y}`))return;const b=document.createElement("link");if(b.rel=g?"stylesheet":DE,g||(b.as="script"),b.crossOrigin="",b.href=v,c&&b.setAttribute("nonce",c),document.head.appendChild(b),g)return new Promise((E,T)=>{b.addEventListener("load",E),b.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${v}`)))})}))}function u(h){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=h,window.dispatchEvent(c),!c.defaultPrevented)throw h}return s.then(h=>{for(const c of h||[])c.status==="rejected"&&u(c.reason);return n().catch(u)})},Av=[{id:"abap",name:"ABAP",import:(()=>S(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>S(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>S(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>S(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>S(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>S(()=>import("./angular-html-DA-rfuFy.js").then(t=>t.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>S(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>S(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>S(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>S(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>S(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>S(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>S(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>S(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>S(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>S(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>S(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>S(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>S(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>S(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>S(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>S(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>S(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>S(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>S(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>S(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>S(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>S(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>S(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>S(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>S(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>S(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>S(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>S(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>S(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>S(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>S(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>S(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>S(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>S(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>S(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>S(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>S(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>S(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>S(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>S(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>S(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>S(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>S(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>S(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>S(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>S(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>S(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>S(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>S(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>S(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>S(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>S(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>S(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>S(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>S(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>S(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>S(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>S(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>S(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>S(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>S(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>S(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>S(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>S(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>S(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>S(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>S(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>S(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>S(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>S(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>S(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>S(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>S(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>S(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>S(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>S(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>S(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>S(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>S(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>S(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>S(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>S(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>S(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>S(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>S(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>S(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>S(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>S(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>S(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>S(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>S(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>S(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>S(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>S(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>S(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>S(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>S(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>S(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>S(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>S(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>S(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>S(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>S(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>S(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>S(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>S(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>S(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>S(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>S(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>S(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>S(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>S(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>S(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>S(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>S(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>S(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>S(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>S(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>S(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>S(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>S(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>S(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>S(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>S(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>S(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>S(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>S(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>S(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>S(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>S(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>S(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>S(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>S(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>S(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>S(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>S(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>S(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>S(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>S(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>S(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>S(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>S(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>S(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>S(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>S(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>S(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>S(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>S(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>S(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>S(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>S(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>S(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>S(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>S(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>S(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>S(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>S(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>S(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>S(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>S(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>S(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>S(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>S(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>S(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>S(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>S(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>S(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>S(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>S(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>S(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>S(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>S(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>S(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>S(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>S(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>S(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>S(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>S(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>S(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>S(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>S(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>S(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>S(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>S(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>S(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>S(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>S(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>S(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>S(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>S(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>S(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>S(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>S(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>S(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>S(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>S(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>S(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>S(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>S(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>S(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>S(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>S(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>S(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>S(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>S(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>S(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>S(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>S(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>S(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>S(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>S(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>S(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>S(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>S(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>S(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>S(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>S(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>S(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>S(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>S(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>S(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>S(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>S(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>S(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>S(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>S(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>S(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>S(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>S(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>S(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>S(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>S(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>S(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>S(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>S(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>S(()=>import("./zig-VOosw3JB.js"),[]))}],ME=Object.fromEntries(Av.map(t=>[t.id,t.import])),NE=Object.fromEntries(Av.flatMap(t=>t.aliases?.map(n=>[n,t.import])||[])),Od={...ME,...NE},IE=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>S(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>S(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>S(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>S(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>S(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>S(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>S(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>S(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>S(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>S(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>S(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>S(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>S(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>S(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>S(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>S(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>S(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>S(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>S(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>S(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>S(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>S(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>S(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>S(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>S(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>S(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>S(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>S(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>S(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>S(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>S(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>S(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>S(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>S(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>S(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>S(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>S(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>S(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>S(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>S(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>S(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>S(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>S(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>S(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>S(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>S(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>S(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>S(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>S(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>S(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>S(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>S(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>S(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>S(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>S(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>S(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>S(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>S(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>S(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>S(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>S(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>S(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>S(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>S(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>S(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],zE=Object.fromEntries(IE.map(t=>[t.id,t.import]));var uf=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function HE(){return 2147483648}function UE(){return typeof performance<"u"?performance.now():Date.now()}const PE=(t,n)=>t+(n-t%n)%n;async function VE(t){let n,a;const l={};function s(b){a=b,l.HEAPU8=new Uint8Array(b),l.HEAPU32=new Uint32Array(b)}function u(b,E,T){l.HEAPU8.copyWithin(b,E,E+T)}function f(b){try{return n.grow(b-a.byteLength+65535>>>16),s(n.buffer),1}catch{}}function h(b){const E=l.HEAPU8.length;b=b>>>0;const T=HE();if(b>T)return!1;for(let O=1;O<=4;O*=2){let L=E*(1+.2/O);L=Math.min(L,b+100663296);const A=Math.min(T,PE(Math.max(b,L),65536));if(f(A))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function m(b,E,T=1024){const O=E+T;let L=E;for(;b[L]&&!(L>=O);)++L;if(L-E>16&&b.buffer&&c)return c.decode(b.subarray(E,L));let A="";for(;E<L;){let w=b[E++];if(!(w&128)){A+=String.fromCharCode(w);continue}const z=b[E++]&63;if((w&224)===192){A+=String.fromCharCode((w&31)<<6|z);continue}const V=b[E++]&63;if((w&240)===224?w=(w&15)<<12|z<<6|V:w=(w&7)<<18|z<<12|V<<6|b[E++]&63,w<65536)A+=String.fromCharCode(w);else{const U=w-65536;A+=String.fromCharCode(55296|U>>10,56320|U&1023)}}return A}function v(b,E){return b?m(l.HEAPU8,b,E):""}const g={emscripten_get_now:UE,emscripten_memcpy_big:u,emscripten_resize_heap:h,fd_write:()=>0};async function y(){const E=await t({env:g,wasi_snapshot_preview1:g});n=E.memory,s(n.buffer),Object.assign(l,E),l.UTF8ToString=v}return await y(),l}var BE=Object.defineProperty,GE=(t,n,a)=>n in t?BE(t,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[n]=a,nt=(t,n,a)=>GE(t,typeof n!="symbol"?n+"":n,a);let st=null;function jE(t){throw new uf(t.UTF8ToString(t.getLastOnigError()))}class ms{constructor(n){nt(this,"utf16Length"),nt(this,"utf8Length"),nt(this,"utf16Value"),nt(this,"utf8Value"),nt(this,"utf16OffsetToUtf8"),nt(this,"utf8OffsetToUtf16");const a=n.length,l=ms._utf8ByteLength(n),s=l!==a,u=s?new Uint32Array(a+1):null;s&&(u[a]=l);const f=s?new Uint32Array(l+1):null;s&&(f[l]=a);const h=new Uint8Array(l);let c=0;for(let m=0;m<a;m++){const v=n.charCodeAt(m);let g=v,y=!1;if(v>=55296&&v<=56319&&m+1<a){const b=n.charCodeAt(m+1);b>=56320&&b<=57343&&(g=(v-55296<<10)+65536|b-56320,y=!0)}s&&(u[m]=c,y&&(u[m+1]=c),g<=127?f[c+0]=m:g<=2047?(f[c+0]=m,f[c+1]=m):g<=65535?(f[c+0]=m,f[c+1]=m,f[c+2]=m):(f[c+0]=m,f[c+1]=m,f[c+2]=m,f[c+3]=m)),g<=127?h[c++]=g:g<=2047?(h[c++]=192|(g&1984)>>>6,h[c++]=128|(g&63)>>>0):g<=65535?(h[c++]=224|(g&61440)>>>12,h[c++]=128|(g&4032)>>>6,h[c++]=128|(g&63)>>>0):(h[c++]=240|(g&1835008)>>>18,h[c++]=128|(g&258048)>>>12,h[c++]=128|(g&4032)>>>6,h[c++]=128|(g&63)>>>0),y&&m++}this.utf16Length=a,this.utf8Length=l,this.utf16Value=n,this.utf8Value=h,this.utf16OffsetToUtf8=u,this.utf8OffsetToUtf16=f}static _utf8ByteLength(n){let a=0;for(let l=0,s=n.length;l<s;l++){const u=n.charCodeAt(l);let f=u,h=!1;if(u>=55296&&u<=56319&&l+1<s){const c=n.charCodeAt(l+1);c>=56320&&c<=57343&&(f=(u-55296<<10)+65536|c-56320,h=!0)}f<=127?a+=1:f<=2047?a+=2:f<=65535?a+=3:a+=4,h&&l++}return a}createString(n){const a=n.omalloc(this.utf8Length);return n.HEAPU8.set(this.utf8Value,a),a}}const gs=class gn{constructor(n){if(nt(this,"id",++gn.LAST_ID),nt(this,"_onigBinding"),nt(this,"content"),nt(this,"utf16Length"),nt(this,"utf8Length"),nt(this,"utf16OffsetToUtf8"),nt(this,"utf8OffsetToUtf16"),nt(this,"ptr"),!st)throw new uf("Must invoke loadWasm first.");this._onigBinding=st,this.content=n;const a=new ms(n);this.utf16Length=a.utf16Length,this.utf8Length=a.utf8Length,this.utf16OffsetToUtf8=a.utf16OffsetToUtf8,this.utf8OffsetToUtf16=a.utf8OffsetToUtf16,this.utf8Length<1e4&&!gn._sharedPtrInUse?(gn._sharedPtr||(gn._sharedPtr=st.omalloc(1e4)),gn._sharedPtrInUse=!0,st.HEAPU8.set(a.utf8Value,gn._sharedPtr),this.ptr=gn._sharedPtr):this.ptr=a.createString(st)}convertUtf8OffsetToUtf16(n){return this.utf8OffsetToUtf16?n<0?0:n>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[n]:n}convertUtf16OffsetToUtf8(n){return this.utf16OffsetToUtf8?n<0?0:n>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[n]:n}dispose(){this.ptr===gn._sharedPtr?gn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};nt(gs,"LAST_ID",0);nt(gs,"_sharedPtr",0);nt(gs,"_sharedPtrInUse",!1);let Tv=gs;class $E{constructor(n){if(nt(this,"_onigBinding"),nt(this,"_ptr"),!st)throw new uf("Must invoke loadWasm first.");const a=[],l=[];for(let h=0,c=n.length;h<c;h++){const m=new ms(n[h]);a[h]=m.createString(st),l[h]=m.utf8Length}const s=st.omalloc(4*n.length);st.HEAPU32.set(a,s/4);const u=st.omalloc(4*n.length);st.HEAPU32.set(l,u/4);const f=st.createOnigScanner(s,u,n.length);for(let h=0,c=n.length;h<c;h++)st.ofree(a[h]);st.ofree(u),st.ofree(s),f===0&&jE(st),this._onigBinding=st,this._ptr=f}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(n,a,l){let s=0;if(typeof l=="number"&&(s=l),typeof n=="string"){n=new Tv(n);const u=this._findNextMatchSync(n,a,!1,s);return n.dispose(),u}return this._findNextMatchSync(n,a,!1,s)}_findNextMatchSync(n,a,l,s){const u=this._onigBinding,f=u.findNextOnigScannerMatch(this._ptr,n.id,n.ptr,n.utf8Length,n.convertUtf16OffsetToUtf8(a),s);if(f===0)return null;const h=u.HEAPU32;let c=f/4;const m=h[c++],v=h[c++],g=[];for(let y=0;y<v;y++){const b=n.convertUtf8OffsetToUtf16(h[c++]),E=n.convertUtf8OffsetToUtf16(h[c++]);g[y]={start:b,end:E,length:E-b}}return{index:m,captureIndices:g}}}function qE(t){return typeof t.instantiator=="function"}function FE(t){return typeof t.default=="function"}function YE(t){return typeof t.data<"u"}function XE(t){return typeof Response<"u"&&t instanceof Response}function QE(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let Ho;function xv(t){if(Ho)return Ho;async function n(){st=await VE(async a=>{let l=t;return l=await l,typeof l=="function"&&(l=await l(a)),typeof l=="function"&&(l=await l(a)),qE(l)?l=await l.instantiator(a):FE(l)?l=await l.default(a):(YE(l)&&(l=l.data),XE(l)?typeof WebAssembly.instantiateStreaming=="function"?l=await ZE(l)(a):l=await KE(l)(a):QE(l)?l=await Jc(l)(a):l instanceof WebAssembly.Module?l=await Jc(l)(a):"default"in l&&l.default instanceof WebAssembly.Module&&(l=await Jc(l.default)(a))),"instance"in l&&(l=l.instance),"exports"in l&&(l=l.exports),l})}return Ho=n(),Ho}function Jc(t){return n=>WebAssembly.instantiate(t,n)}function ZE(t){return n=>WebAssembly.instantiateStreaming(t,n)}function KE(t){return async n=>{const a=await t.arrayBuffer();return WebAssembly.instantiate(a,n)}}let Lv;function WE(t){Lv=t}function JE(){return Lv}async function wv(t){return t&&await xv(t),{createScanner(n){return new $E(n.map(a=>typeof a=="string"?a:a.source))},createString(n){return new Tv(n)}}}const eC=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:wv,getDefaultWasmLoader:JE,loadWasm:xv,setDefaultWasmLoader:WE},Symbol.toStringTag,{value:"Module"}));var Rv=wE({});kE(Rv,eC);var He=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function tC(t){return cf(t)}function cf(t){return Array.isArray(t)?nC(t):t instanceof RegExp?t:typeof t=="object"?iC(t):t}function nC(t){let n=[];for(let a=0,l=t.length;a<l;a++)n[a]=cf(t[a]);return n}function iC(t){let n={};for(let a in t)n[a]=cf(t[a]);return n}function kv(t,...n){return n.forEach(a=>{for(let l in a)t[l]=a[l]}),t}function Dv(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return n===0?t:~n===t.length-1?Dv(t.substring(0,t.length-1)):t.substr(~n+1)}var ed=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Uo=class{static hasCaptures(t){return t===null?!1:(ed.lastIndex=0,ed.test(t))}static replaceCaptures(t,n,a){return t.replace(ed,(l,s,u,f)=>{let h=a[parseInt(s||u,10)];if(h){let c=n.substring(h.start,h.end);for(;c[0]===".";)c=c.substring(1);switch(f){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return l})}};function Ov(t,n){return t<n?-1:t>n?1:0}function Mv(t,n){if(t===null&&n===null)return 0;if(!t)return-1;if(!n)return 1;let a=t.length,l=n.length;if(a===l){for(let s=0;s<a;s++){let u=Ov(t[s],n[s]);if(u!==0)return u}return 0}return a-l}function Fg(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Nv(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Iv=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const n=this.fn(t);return this.cache.set(t,n),n}},as=class{constructor(t,n,a){this._colorMap=t,this._defaults=n,this._root=a}static createFromRawTheme(t,n){return this.createFromParsedTheme(lC(t),n)}static createFromParsedTheme(t,n){return sC(t,n)}_cachedMatchRoot=new Iv(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const n=t.scopeName,l=this._cachedMatchRoot.get(n).find(s=>aC(t.parent,s.parentScopes));return l?new zv(l.fontStyle,l.foreground,l.background):null}},td=class Jo{constructor(n,a){this.parent=n,this.scopeName=a}static push(n,a){for(const l of a)n=new Jo(n,l);return n}static from(...n){let a=null;for(let l=0;l<n.length;l++)a=new Jo(a,n[l]);return a}push(n){return new Jo(this,n)}getSegments(){let n=this;const a=[];for(;n;)a.push(n.scopeName),n=n.parent;return a.reverse(),a}toString(){return this.getSegments().join(" ")}extends(n){return this===n?!0:this.parent===null?!1:this.parent.extends(n)}getExtensionIfDefined(n){const a=[];let l=this;for(;l&&l!==n;)a.push(l.scopeName),l=l.parent;return l===n?a.reverse():void 0}};function aC(t,n){if(n.length===0)return!0;for(let a=0;a<n.length;a++){let l=n[a],s=!1;if(l===">"){if(a===n.length-1)return!1;l=n[++a],s=!0}for(;t&&!rC(t.scopeName,l);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function rC(t,n){return n===t||t.startsWith(n)&&t[n.length]==="."}var zv=class{constructor(t,n,a){this.fontStyle=t,this.foregroundId=n,this.backgroundId=a}};function lC(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let n=t.settings,a=[],l=0;for(let s=0,u=n.length;s<u;s++){let f=n[s];if(!f.settings)continue;let h;if(typeof f.scope=="string"){let g=f.scope;g=g.replace(/^[,]+/,""),g=g.replace(/[,]+$/,""),h=g.split(",")}else Array.isArray(f.scope)?h=f.scope:h=[""];let c=-1;if(typeof f.settings.fontStyle=="string"){c=0;let g=f.settings.fontStyle.split(" ");for(let y=0,b=g.length;y<b;y++)switch(g[y]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let m=null;typeof f.settings.foreground=="string"&&Fg(f.settings.foreground)&&(m=f.settings.foreground);let v=null;typeof f.settings.background=="string"&&Fg(f.settings.background)&&(v=f.settings.background);for(let g=0,y=h.length;g<y;g++){let E=h[g].trim().split(" "),T=E[E.length-1],O=null;E.length>1&&(O=E.slice(0,E.length-1),O.reverse()),a[l++]=new oC(T,O,s,c,m,v)}}return a}var oC=class{constructor(t,n,a,l,s,u){this.scope=t,this.parentScopes=n,this.index=a,this.fontStyle=l,this.foreground=s,this.background=u}},yt=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(yt||{});function sC(t,n){t.sort((c,m)=>{let v=Ov(c.scope,m.scope);return v!==0||(v=Mv(c.parentScopes,m.parentScopes),v!==0)?v:c.index-m.index});let a=0,l="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(a=c.fontStyle),c.foreground!==null&&(l=c.foreground),c.background!==null&&(s=c.background)}let u=new uC(n),f=new zv(a,u.getId(l),u.getId(s)),h=new dC(new Md(0,null,-1,0,0),[]);for(let c=0,m=t.length;c<m;c++){let v=t[c];h.insert(0,v.scope,v.parentScopes,v.fontStyle,u.getId(v.foreground),u.getId(v.background))}return new as(u,f,h)}var uC=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let n=0,a=t.length;n<a;n++)this._color2id[t[n]]=n,this._id2color[n]=t[n]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let n=this._color2id[t];if(n)return n;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return n=++this._lastColorId,this._color2id[t]=n,this._id2color[n]=t,n}getColorMap(){return this._id2color.slice(0)}},cC=Object.freeze([]),Md=class Hv{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(n,a,l,s,u){this.scopeDepth=n,this.parentScopes=a||cC,this.fontStyle=l,this.foreground=s,this.background=u}clone(){return new Hv(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(n){let a=[];for(let l=0,s=n.length;l<s;l++)a[l]=n[l].clone();return a}acceptOverwrite(n,a,l,s){this.scopeDepth>n?console.log("how did this happen?"):this.scopeDepth=n,a!==-1&&(this.fontStyle=a),l!==0&&(this.foreground=l),s!==0&&(this.background=s)}},dC=class Nd{constructor(n,a=[],l={}){this._mainRule=n,this._children=l,this._rulesWithParentScopes=a}_rulesWithParentScopes;static _cmpBySpecificity(n,a){if(n.scopeDepth!==a.scopeDepth)return a.scopeDepth-n.scopeDepth;let l=0,s=0;for(;n.parentScopes[l]===">"&&l++,a.parentScopes[s]===">"&&s++,!(l>=n.parentScopes.length||s>=a.parentScopes.length);){const u=a.parentScopes[s].length-n.parentScopes[l].length;if(u!==0)return u;l++,s++}return a.parentScopes.length-n.parentScopes.length}match(n){if(n!==""){let l=n.indexOf("."),s,u;if(l===-1?(s=n,u=""):(s=n.substring(0,l),u=n.substring(l+1)),this._children.hasOwnProperty(s))return this._children[s].match(u)}const a=this._rulesWithParentScopes.concat(this._mainRule);return a.sort(Nd._cmpBySpecificity),a}insert(n,a,l,s,u,f){if(a===""){this._doInsertHere(n,l,s,u,f);return}let h=a.indexOf("."),c,m;h===-1?(c=a,m=""):(c=a.substring(0,h),m=a.substring(h+1));let v;this._children.hasOwnProperty(c)?v=this._children[c]:(v=new Nd(this._mainRule.clone(),Md.cloneArr(this._rulesWithParentScopes)),this._children[c]=v),v.insert(n+1,m,l,s,u,f)}_doInsertHere(n,a,l,s,u){if(a===null){this._mainRule.acceptOverwrite(n,l,s,u);return}for(let f=0,h=this._rulesWithParentScopes.length;f<h;f++){let c=this._rulesWithParentScopes[f];if(Mv(c.parentScopes,a)===0){c.acceptOverwrite(n,l,s,u);return}}l===-1&&(l=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),u===0&&(u=this._mainRule.background),this._rulesWithParentScopes.push(new Md(n,a,l,s,u))}},$i=class Kt{static toBinaryStr(n){return n.toString(2).padStart(32,"0")}static print(n){const a=Kt.getLanguageId(n),l=Kt.getTokenType(n),s=Kt.getFontStyle(n),u=Kt.getForeground(n),f=Kt.getBackground(n);console.log({languageId:a,tokenType:l,fontStyle:s,foreground:u,background:f})}static getLanguageId(n){return(n&255)>>>0}static getTokenType(n){return(n&768)>>>8}static containsBalancedBrackets(n){return(n&1024)!==0}static getFontStyle(n){return(n&30720)>>>11}static getForeground(n){return(n&16744448)>>>15}static getBackground(n){return(n&4278190080)>>>24}static set(n,a,l,s,u,f,h){let c=Kt.getLanguageId(n),m=Kt.getTokenType(n),v=Kt.containsBalancedBrackets(n)?1:0,g=Kt.getFontStyle(n),y=Kt.getForeground(n),b=Kt.getBackground(n);return a!==0&&(c=a),l!==8&&(m=l),s!==null&&(v=s?1:0),u!==-1&&(g=u),f!==0&&(y=f),h!==0&&(b=h),(c<<0|m<<8|v<<10|g<<11|y<<15|b<<24)>>>0}};function rs(t,n){const a=[],l=fC(t);let s=l.next();for(;s!==null;){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=l.next()}let m=f();if(a.push({matcher:m,priority:c}),s!==",")break;s=l.next()}return a;function u(){if(s==="-"){s=l.next();const c=u();return m=>!!c&&!c(m)}if(s==="("){s=l.next();const c=h();return s===")"&&(s=l.next()),c}if(Yg(s)){const c=[];do c.push(s),s=l.next();while(Yg(s));return m=>n(c,m)}return null}function f(){const c=[];let m=u();for(;m;)c.push(m),m=u();return v=>c.every(g=>g(v))}function h(){const c=[];let m=f();for(;m&&(c.push(m),s==="|"||s===",");){do s=l.next();while(s==="|"||s===",");m=f()}return v=>c.some(g=>g(v))}}function Yg(t){return!!t&&!!t.match(/[\w\.:]+/)}function fC(t){let n=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,a=n.exec(t);return{next:()=>{if(!a)return null;const l=a[0];return a=n.exec(t),l}}}function Uv(t){typeof t.dispose=="function"&&t.dispose()}var il=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},hC=class{constructor(t,n){this.scopeName=t,this.ruleName=n}toKey(){return`${this.scopeName}#${this.ruleName}`}},pC=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const n=t.toKey();this._seenReferenceKeys.has(n)||(this._seenReferenceKeys.add(n),this._references.push(t))}},mC=class{constructor(t,n){this.repo=t,this.initialScopeName=n,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new il(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const n=new pC;for(const a of t)gC(a,this.initialScopeName,this.repo,n);for(const a of n.references)if(a instanceof il){if(this.seenFullScopeRequests.has(a.scopeName))continue;this.seenFullScopeRequests.add(a.scopeName),this.Q.push(a)}else{if(this.seenFullScopeRequests.has(a.scopeName)||this.seenPartialScopeRequests.has(a.toKey()))continue;this.seenPartialScopeRequests.add(a.toKey()),this.Q.push(a)}}};function gC(t,n,a,l){const s=a.lookup(t.scopeName);if(!s){if(t.scopeName===n)throw new Error(`No grammar provided for <${n}>`);return}const u=a.lookup(n);t instanceof il?es({baseGrammar:u,selfGrammar:s},l):Id(t.ruleName,{baseGrammar:u,selfGrammar:s,repository:s.repository},l);const f=a.injections(t.scopeName);if(f)for(const h of f)l.add(new il(h))}function Id(t,n,a){if(n.repository&&n.repository[t]){const l=n.repository[t];ls([l],n,a)}}function es(t,n){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ls(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},n),t.selfGrammar.injections&&ls(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},n)}function ls(t,n,a){for(const l of t){if(a.visitedRule.has(l))continue;a.visitedRule.add(l);const s=l.repository?kv({},n.repository,l.repository):n.repository;Array.isArray(l.patterns)&&ls(l.patterns,{...n,repository:s},a);const u=l.include;if(!u)continue;const f=Pv(u);switch(f.kind){case 0:es({...n,selfGrammar:n.baseGrammar},a);break;case 1:es(n,a);break;case 2:Id(f.ruleName,{...n,repository:s},a);break;case 3:case 4:const h=f.scopeName===n.selfGrammar.scopeName?n.selfGrammar:f.scopeName===n.baseGrammar.scopeName?n.baseGrammar:void 0;if(h){const c={baseGrammar:n.baseGrammar,selfGrammar:h,repository:s};f.kind===4?Id(f.ruleName,c,a):es(c,a)}else f.kind===4?a.add(new hC(f.scopeName,f.ruleName)):a.add(new il(f.scopeName));break}}}var vC=class{kind=0},_C=class{kind=1},yC=class{constructor(t){this.ruleName=t}kind=2},bC=class{constructor(t){this.scopeName=t}kind=3},SC=class{constructor(t,n){this.scopeName=t,this.ruleName=n}kind=4};function Pv(t){if(t==="$base")return new vC;if(t==="$self")return new _C;const n=t.indexOf("#");if(n===-1)return new bC(t);if(n===0)return new yC(t.substring(1));{const a=t.substring(0,n),l=t.substring(n+1);return new SC(a,l)}}var EC=/\\(\d+)/,Xg=/\\(\d+)/g,CC=-1,Vv=-2;var fl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,n,a,l){this.$location=t,this.id=n,this._name=a||null,this._nameIsCapturing=Uo.hasCaptures(this._name),this._contentName=l||null,this._contentNameIsCapturing=Uo.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Dv(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,n){return!this._nameIsCapturing||this._name===null||t===null||n===null?this._name:Uo.replaceCaptures(this._name,t,n)}getContentName(t,n){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Uo.replaceCaptures(this._contentName,t,n)}},AC=class extends fl{retokenizeCapturedWithRuleId;constructor(t,n,a,l,s){super(t,n,a,l),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,a,l){throw new Error("Not supported!")}},TC=class extends fl{_match;captures;_cachedCompiledPatterns;constructor(t,n,a,l,s){super(t,n,a,null),this._match=new al(l,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,a,l){return this._getCachedCompiledPatterns(t).compileAG(t,a,l)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rl,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Qg=class extends fl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,n,a,l,s){super(t,n,a,l),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const a of this.patterns)t.getRule(a).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,a,l){return this._getCachedCompiledPatterns(t).compileAG(t,a,l)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rl,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zd=class extends fl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,n,a,l,s,u,f,h,c,m){super(t,n,a,l),this._begin=new al(s,this.id),this.beginCaptures=u,this._end=new al(f||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=h,this.applyEndPatternLast=c||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,a,l){return this._getCachedCompiledPatterns(t,n).compileAG(t,a,l)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rl;for(const a of this.patterns)t.getRule(a).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},os=class extends fl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,n,a,l,s,u,f,h,c){super(t,n,a,l),this._begin=new al(s,this.id),this.beginCaptures=u,this.whileCaptures=h,this._while=new al(f,Vv),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,a,l){return this._getCachedCompiledPatterns(t).compileAG(t,a,l)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rl;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,a,l){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,a,l)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new rl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},Bv=class vt{static createCaptureRule(n,a,l,s,u){return n.registerRule(f=>new AC(a,f,l,s,u))}static getCompiledRuleId(n,a,l){return n.id||a.registerRule(s=>{if(n.id=s,n.match)return new TC(n.$vscodeTextmateLocation,n.id,n.name,n.match,vt._compileCaptures(n.captures,a,l));if(typeof n.begin>"u"){n.repository&&(l=kv({},l,n.repository));let u=n.patterns;return typeof u>"u"&&n.include&&(u=[{include:n.include}]),new Qg(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,vt._compilePatterns(u,a,l))}return n.while?new os(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,vt._compileCaptures(n.beginCaptures||n.captures,a,l),n.while,vt._compileCaptures(n.whileCaptures||n.captures,a,l),vt._compilePatterns(n.patterns,a,l)):new zd(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,vt._compileCaptures(n.beginCaptures||n.captures,a,l),n.end,vt._compileCaptures(n.endCaptures||n.captures,a,l),n.applyEndPatternLast,vt._compilePatterns(n.patterns,a,l))}),n.id}static _compileCaptures(n,a,l){let s=[];if(n){let u=0;for(const f in n){if(f==="$vscodeTextmateLocation")continue;const h=parseInt(f,10);h>u&&(u=h)}for(let f=0;f<=u;f++)s[f]=null;for(const f in n){if(f==="$vscodeTextmateLocation")continue;const h=parseInt(f,10);let c=0;n[f].patterns&&(c=vt.getCompiledRuleId(n[f],a,l)),s[h]=vt.createCaptureRule(a,n[f].$vscodeTextmateLocation,n[f].name,n[f].contentName,c)}}return s}static _compilePatterns(n,a,l){let s=[];if(n)for(let u=0,f=n.length;u<f;u++){const h=n[u];let c=-1;if(h.include){const m=Pv(h.include);switch(m.kind){case 0:case 1:c=vt.getCompiledRuleId(l[h.include],a,l);break;case 2:let v=l[m.ruleName];v&&(c=vt.getCompiledRuleId(v,a,l));break;case 3:case 4:const g=m.scopeName,y=m.kind===4?m.ruleName:null,b=a.getExternalGrammar(g,l);if(b)if(y){let E=b.repository[y];E&&(c=vt.getCompiledRuleId(E,a,b.repository))}else c=vt.getCompiledRuleId(b.repository.$self,a,b.repository);break}}else c=vt.getCompiledRuleId(h,a,l);if(c!==-1){const m=a.getRule(c);let v=!1;if((m instanceof Qg||m instanceof zd||m instanceof os)&&m.hasMissingPatterns&&m.patterns.length===0&&(v=!0),v)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(n?n.length:0)!==s.length}}},al=class Gv{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(n,a){if(n&&typeof n=="string"){const l=n.length;let s=0,u=[],f=!1;for(let h=0;h<l;h++)if(n.charAt(h)==="\\"&&h+1<l){const m=n.charAt(h+1);m==="z"?(u.push(n.substring(s,h)),u.push("$(?!\\n)(?<!\\n)"),s=h+2):(m==="A"||m==="G")&&(f=!0),h++}this.hasAnchor=f,s===0?this.source=n:(u.push(n.substring(s,l)),this.source=u.join(""))}else this.hasAnchor=!1,this.source=n;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=a,typeof this.source=="string"?this.hasBackReferences=EC.test(this.source):this.hasBackReferences=!1}clone(){return new Gv(this.source,this.ruleId)}setSource(n){this.source!==n&&(this.source=n,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(n,a){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let l=a.map(s=>n.substring(s.start,s.end));return Xg.lastIndex=0,this.source.replace(Xg,(s,u)=>Nv(l[parseInt(u,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=[],a=[],l=[],s=[],u,f,h,c;for(u=0,f=this.source.length;u<f;u++)h=this.source.charAt(u),n[u]=h,a[u]=h,l[u]=h,s[u]=h,h==="\\"&&u+1<f&&(c=this.source.charAt(u+1),c==="A"?(n[u+1]="￿",a[u+1]="￿",l[u+1]="A",s[u+1]="A"):c==="G"?(n[u+1]="￿",a[u+1]="G",l[u+1]="￿",s[u+1]="G"):(n[u+1]=c,a[u+1]=c,l[u+1]=c,s[u+1]=c),u++);return{A0_G0:n.join(""),A0_G1:a.join(""),A1_G0:l.join(""),A1_G1:s.join("")}}resolveAnchors(n,a){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:n?a?this._anchorCache.A1_G1:this._anchorCache.A1_G0:a?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},rl=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,n){this._items[t].source!==n&&(this._disposeCaches(),this._items[t].setSource(n))}compile(t){if(!this._cached){let n=this._items.map(a=>a.source);this._cached=new Zg(t,n,this._items.map(a=>a.ruleId))}return this._cached}compileAG(t,n,a){return this._hasAnchors?n?a?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,n,a)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,n,a)),this._anchorCache.A1_G0):a?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,n,a)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,n,a)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,n,a){let l=this._items.map(s=>s.resolveAnchors(n,a));return new Zg(t,l,this._items.map(s=>s.ruleId))}},Zg=class{constructor(t,n,a){this.regExps=n,this.rules=a,this.scanner=t.createOnigScanner(n)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let n=0,a=this.rules.length;n<a;n++)t.push(" - "+this.rules[n]+": "+this.regExps[n]);return t.join(`
19
+ `)}findNextMatchSync(t,n,a){const l=this.scanner.findNextMatchSync(t,n,a);return l?{ruleId:this.rules[l.index],captureIndices:l.captureIndices}:null}},nd=class{constructor(t,n){this.languageId=t,this.tokenType=n}},xC=class Hd{_defaultAttributes;_embeddedLanguagesMatcher;constructor(n,a){this._defaultAttributes=new nd(n,8),this._embeddedLanguagesMatcher=new LC(Object.entries(a||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(n){return n===null?Hd._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(n)}static _NULL_SCOPE_METADATA=new nd(0,0);_getBasicScopeAttributes=new Iv(n=>{const a=this._scopeToLanguage(n),l=this._toStandardTokenType(n);return new nd(a,l)});_scopeToLanguage(n){return this._embeddedLanguagesMatcher.match(n)||0}_toStandardTokenType(n){const a=n.match(Hd.STANDARD_TOKEN_TYPE_REGEXP);if(!a)return 8;switch(a[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},LC=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const n=t.map(([a,l])=>Nv(a));n.sort(),n.reverse(),this.scopesRegExp=new RegExp(`^((${n.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const n=t.match(this.scopesRegExp);if(n)return this.values.get(n[1])}},Kg=class{constructor(t,n){this.stack=t,this.stoppedEarly=n}};function jv(t,n,a,l,s,u,f,h){const c=n.content.length;let m=!1,v=-1;if(f){const b=wC(t,n,a,l,s,u);s=b.stack,l=b.linePos,a=b.isFirstLine,v=b.anchorPosition}const g=Date.now();for(;!m;){if(h!==0&&Date.now()-g>h)return new Kg(s,!0);y()}return new Kg(s,!1);function y(){const b=RC(t,n,a,l,s,v);if(!b){u.produce(s,c),m=!0;return}const E=b.captureIndices,T=b.matchedRuleId,O=E&&E.length>0?E[0].end>l:!1;if(T===CC){const L=s.getRule(t);u.produce(s,E[0].start),s=s.withContentNameScopesList(s.nameScopesList),Xr(t,n,a,s,u,L.endCaptures,E),u.produce(s,E[0].end);const A=s;if(s=s.parent,v=A.getAnchorPos(),!O&&A.getEnterPos()===l){s=A,u.produce(s,c),m=!0;return}}else{const L=t.getRule(T);u.produce(s,E[0].start);const A=s,w=L.getName(n.content,E),z=s.contentNameScopesList.pushAttributed(w,t);if(s=s.push(T,l,v,E[0].end===c,null,z,z),L instanceof zd){const V=L;Xr(t,n,a,s,u,V.beginCaptures,E),u.produce(s,E[0].end),v=E[0].end;const U=V.getContentName(n.content,E),j=z.pushAttributed(U,t);if(s=s.withContentNameScopesList(j),V.endHasBackReferences&&(s=s.withEndRule(V.getEndWithResolvedBackReferences(n.content,E))),!O&&A.hasSameRuleAs(s)){s=s.pop(),u.produce(s,c),m=!0;return}}else if(L instanceof os){const V=L;Xr(t,n,a,s,u,V.beginCaptures,E),u.produce(s,E[0].end),v=E[0].end;const U=V.getContentName(n.content,E),j=z.pushAttributed(U,t);if(s=s.withContentNameScopesList(j),V.whileHasBackReferences&&(s=s.withEndRule(V.getWhileWithResolvedBackReferences(n.content,E))),!O&&A.hasSameRuleAs(s)){s=s.pop(),u.produce(s,c),m=!0;return}}else if(Xr(t,n,a,s,u,L.captures,E),u.produce(s,E[0].end),s=s.pop(),!O){s=s.safePop(),u.produce(s,c),m=!0;return}}E[0].end>l&&(l=E[0].end,a=!1)}}function wC(t,n,a,l,s,u){let f=s.beginRuleCapturedEOL?0:-1;const h=[];for(let c=s;c;c=c.pop()){const m=c.getRule(t);m instanceof os&&h.push({rule:m,stack:c})}for(let c=h.pop();c;c=h.pop()){const{ruleScanner:m,findOptions:v}=OC(c.rule,t,c.stack.endRule,a,l===f),g=m.findNextMatchSync(n,l,v);if(g){if(g.ruleId!==Vv){s=c.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(u.produce(c.stack,g.captureIndices[0].start),Xr(t,n,a,c.stack,u,c.rule.whileCaptures,g.captureIndices),u.produce(c.stack,g.captureIndices[0].end),f=g.captureIndices[0].end,g.captureIndices[0].end>l&&(l=g.captureIndices[0].end,a=!1))}else{s=c.stack.pop();break}}return{stack:s,linePos:l,anchorPosition:f,isFirstLine:a}}function RC(t,n,a,l,s,u){const f=kC(t,n,a,l,s,u),h=t.getInjections();if(h.length===0)return f;const c=DC(h,t,n,a,l,s,u);if(!c)return f;if(!f)return c;const m=f.captureIndices[0].start,v=c.captureIndices[0].start;return v<m||c.priorityMatch&&v===m?c:f}function kC(t,n,a,l,s,u){const f=s.getRule(t),{ruleScanner:h,findOptions:c}=$v(f,t,s.endRule,a,l===u),m=h.findNextMatchSync(n,l,c);return m?{captureIndices:m.captureIndices,matchedRuleId:m.ruleId}:null}function DC(t,n,a,l,s,u,f){let h=Number.MAX_VALUE,c=null,m,v=0;const g=u.contentNameScopesList.getScopeNames();for(let y=0,b=t.length;y<b;y++){const E=t[y];if(!E.matcher(g))continue;const T=n.getRule(E.ruleId),{ruleScanner:O,findOptions:L}=$v(T,n,null,l,s===f),A=O.findNextMatchSync(a,s,L);if(!A)continue;const w=A.captureIndices[0].start;if(!(w>=h)&&(h=w,c=A.captureIndices,m=A.ruleId,v=E.priority,h===s))break}return c?{priorityMatch:v===-1,captureIndices:c,matchedRuleId:m}:null}function $v(t,n,a,l,s){return{ruleScanner:t.compileAG(n,a,l,s),findOptions:0}}function OC(t,n,a,l,s){return{ruleScanner:t.compileWhileAG(n,a,l,s),findOptions:0}}function Xr(t,n,a,l,s,u,f){if(u.length===0)return;const h=n.content,c=Math.min(u.length,f.length),m=[],v=f[0].end;for(let g=0;g<c;g++){const y=u[g];if(y===null)continue;const b=f[g];if(b.length===0)continue;if(b.start>v)break;for(;m.length>0&&m[m.length-1].endPos<=b.start;)s.produceFromScopes(m[m.length-1].scopes,m[m.length-1].endPos),m.pop();if(m.length>0?s.produceFromScopes(m[m.length-1].scopes,b.start):s.produce(l,b.start),y.retokenizeCapturedWithRuleId){const T=y.getName(h,f),O=l.contentNameScopesList.pushAttributed(T,t),L=y.getContentName(h,f),A=O.pushAttributed(L,t),w=l.push(y.retokenizeCapturedWithRuleId,b.start,-1,!1,null,O,A),z=t.createOnigString(h.substring(0,b.end));jv(t,z,a&&b.start===0,b.start,w,s,!1,0),Uv(z);continue}const E=y.getName(h,f);if(E!==null){const O=(m.length>0?m[m.length-1].scopes:l.contentNameScopesList).pushAttributed(E,t);m.push(new MC(O,b.end))}}for(;m.length>0;)s.produceFromScopes(m[m.length-1].scopes,m[m.length-1].endPos),m.pop()}var MC=class{scopes;endPos;constructor(t,n){this.scopes=t,this.endPos=n}};function NC(t,n,a,l,s,u,f,h){return new zC(t,n,a,l,s,u,f,h)}function Wg(t,n,a,l,s){const u=rs(n,ss),f=Bv.getCompiledRuleId(a,l,s.repository);for(const h of u)t.push({debugSelector:n,matcher:h.matcher,ruleId:f,grammar:s,priority:h.priority})}function ss(t,n){if(n.length<t.length)return!1;let a=0;return t.every(l=>{for(let s=a;s<n.length;s++)if(IC(n[s],l))return a=s+1,!0;return!1})}function IC(t,n){if(!t)return!1;if(t===n)return!0;const a=n.length;return t.length>a&&t.substr(0,a)===n&&t[a]==="."}var zC=class{constructor(t,n,a,l,s,u,f,h){if(this._rootScopeName=t,this.balancedBracketSelectors=u,this._onigLib=h,this._basicScopeAttributesProvider=new xC(a,l),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=f,this._grammar=Jg(n,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const c of Object.keys(s)){const m=rs(c,ss);for(const v of m)this._tokenTypeMatchers.push({matcher:v.matcher,type:s[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},n=[],a=this._rootScopeName,l=t.lookup(a);if(l){const s=l.injections;if(s)for(let f in s)Wg(n,f,s[f],this,l);const u=this._grammarRepository.injections(a);u&&u.forEach(f=>{const h=this.getExternalGrammar(f);if(h){const c=h.injectionSelector;c&&Wg(n,c,h,this,h)}})}return n.sort((s,u)=>s.priority-u.priority),n}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const n=++this._lastRuleId,a=t(n);return this._ruleId2desc[n]=a,a}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,n){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const a=this._grammarRepository.lookup(t);if(a)return this._includedGrammars[t]=Jg(a,n&&n.$base),this._includedGrammars[t]}}tokenizeLine(t,n,a=0){const l=this._tokenize(t,n,!1,a);return{tokens:l.lineTokens.getResult(l.ruleStack,l.lineLength),ruleStack:l.ruleStack,stoppedEarly:l.stoppedEarly}}tokenizeLine2(t,n,a=0){const l=this._tokenize(t,n,!0,a);return{tokens:l.lineTokens.getBinaryResult(l.ruleStack,l.lineLength),ruleStack:l.ruleStack,stoppedEarly:l.stoppedEarly}}_tokenize(t,n,a,l){this._rootId===-1&&(this._rootId=Bv.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!n||n===Ud.NULL){s=!0;const m=this._basicScopeAttributesProvider.getDefaultAttributes(),v=this.themeProvider.getDefaults(),g=$i.set(0,m.languageId,m.tokenType,null,v.fontStyle,v.foregroundId,v.backgroundId),y=this.getRule(this._rootId).getName(null,null);let b;y?b=Jr.createRootAndLookUpScopeName(y,g,this):b=Jr.createRoot("unknown",g),n=new Ud(null,this._rootId,-1,-1,!1,null,b,b)}else s=!1,n.reset();t=t+`
20
+ `;const u=this.createOnigString(t),f=u.content.length,h=new UC(a,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=jv(this,u,s,0,n,h,!0,l);return Uv(u),{lineLength:f,lineTokens:h,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Jg(t,n){return t=tC(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=n||t.repository.$self,t}var Jr=class vn{constructor(n,a,l){this.parent=n,this.scopePath=a,this.tokenAttributes=l}static fromExtension(n,a){let l=n,s=n?.scopePath??null;for(const u of a)s=td.push(s,u.scopeNames),l=new vn(l,s,u.encodedTokenAttributes);return l}static createRoot(n,a){return new vn(null,new td(null,n),a)}static createRootAndLookUpScopeName(n,a,l){const s=l.getMetadataForScope(n),u=new td(null,n),f=l.themeProvider.themeMatch(u),h=vn.mergeAttributes(a,s,f);return new vn(null,u,h)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(n){return vn.equals(this,n)}static equals(n,a){do{if(n===a||!n&&!a)return!0;if(!n||!a||n.scopeName!==a.scopeName||n.tokenAttributes!==a.tokenAttributes)return!1;n=n.parent,a=a.parent}while(!0)}static mergeAttributes(n,a,l){let s=-1,u=0,f=0;return l!==null&&(s=l.fontStyle,u=l.foregroundId,f=l.backgroundId),$i.set(n,a.languageId,a.tokenType,null,s,u,f)}pushAttributed(n,a){if(n===null)return this;if(n.indexOf(" ")===-1)return vn._pushAttributed(this,n,a);const l=n.split(/ /g);let s=this;for(const u of l)s=vn._pushAttributed(s,u,a);return s}static _pushAttributed(n,a,l){const s=l.getMetadataForScope(a),u=n.scopePath.push(a),f=l.themeProvider.themeMatch(u),h=vn.mergeAttributes(n.tokenAttributes,s,f);return new vn(n,u,h)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(n){const a=[];let l=this;for(;l&&l!==n;)a.push({encodedTokenAttributes:l.tokenAttributes,scopeNames:l.scopePath.getExtensionIfDefined(l.parent?.scopePath??null)}),l=l.parent;return l===n?a.reverse():void 0}},Ud=class Pi{constructor(n,a,l,s,u,f,h,c){this.parent=n,this.ruleId=a,this.beginRuleCapturedEOL=u,this.endRule=f,this.nameScopesList=h,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=l,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new Pi(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(n){return n===null?!1:Pi._equals(this,n)}static _equals(n,a){return n===a?!0:this._structuralEquals(n,a)?Jr.equals(n.contentNameScopesList,a.contentNameScopesList):!1}static _structuralEquals(n,a){do{if(n===a||!n&&!a)return!0;if(!n||!a||n.depth!==a.depth||n.ruleId!==a.ruleId||n.endRule!==a.endRule)return!1;n=n.parent,a=a.parent}while(!0)}clone(){return this}static _reset(n){for(;n;)n._enterPos=-1,n._anchorPos=-1,n=n.parent}reset(){Pi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(n,a,l,s,u,f,h){return new Pi(this,n,a,l,s,u,f,h)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(n){return n.getRule(this.ruleId)}toString(){const n=[];return this._writeString(n,0),"["+n.join(",")+"]"}_writeString(n,a){return this.parent&&(a=this.parent._writeString(n,a)),n[a++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,a}withContentNameScopesList(n){return this.contentNameScopesList===n?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,n)}withEndRule(n){return this.endRule===n?this:new Pi(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,n,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(n){let a=this;for(;a&&a._enterPos===n._enterPos;){if(a.ruleId===n.ruleId)return!0;a=a.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(n,a){const l=Jr.fromExtension(n?.nameScopesList??null,a.nameScopesList);return new Pi(n,a.ruleId,a.enterPos??-1,a.anchorPos??-1,a.beginRuleCapturedEOL,a.endRule,l,Jr.fromExtension(l,a.contentNameScopesList))}},HC=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,n){this.balancedBracketScopes=t.flatMap(a=>a==="*"?(this.allowAny=!0,[]):rs(a,ss).map(l=>l.matcher)),this.unbalancedBracketScopes=n.flatMap(a=>rs(a,ss).map(l=>l.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const n of this.unbalancedBracketScopes)if(n(t))return!1;for(const n of this.balancedBracketScopes)if(n(t))return!0;return this.allowAny}},UC=class{constructor(t,n,a,l){this.balancedBracketSelectors=l,this._emitBinaryTokens=t,this._tokenTypeOverrides=a,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,n){this.produceFromScopes(t.contentNameScopesList,n)}produceFromScopes(t,n){if(this._lastTokenEndIndex>=n)return;if(this._emitBinaryTokens){let l=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const u=t?.getScopeNames()??[];for(const f of this._tokenTypeOverrides)f.matcher(u)&&(l=$i.set(l,0,f.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(u))}if(s&&(l=$i.set(l,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===l){this._lastTokenEndIndex=n;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(l),this._lastTokenEndIndex=n;return}const a=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:n,scopes:a}),this._lastTokenEndIndex=n}getResult(t,n){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===n-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,n),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,n){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===n-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,n),this._binaryTokens[this._binaryTokens.length-2]=0);const a=new Uint32Array(this._binaryTokens.length);for(let l=0,s=this._binaryTokens.length;l<s;l++)a[l]=this._binaryTokens[l];return a}},PC=class{constructor(t,n){this._onigLib=n,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,n){this._rawGrammars.set(t.scopeName,t),n&&this._injectionGrammars.set(t.scopeName,n)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,n,a,l,s){if(!this._grammars.has(t)){let u=this._rawGrammars.get(t);if(!u)return null;this._grammars.set(t,NC(t,u,n,a,l,s,this,this._onigLib))}return this._grammars.get(t)}},VC=class{_options;_syncRegistry;_ensureGrammarCache;constructor(n){this._options=n,this._syncRegistry=new PC(as.createFromRawTheme(n.theme,n.colorMap),n.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(n,a){this._syncRegistry.setTheme(as.createFromRawTheme(n,a))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(n,a,l){return this.loadGrammarWithConfiguration(n,a,{embeddedLanguages:l})}loadGrammarWithConfiguration(n,a,l){return this._loadGrammar(n,a,l.embeddedLanguages,l.tokenTypes,new HC(l.balancedBracketSelectors||[],l.unbalancedBracketSelectors||[]))}loadGrammar(n){return this._loadGrammar(n,0,null,null,null)}_loadGrammar(n,a,l,s,u){const f=new mC(this._syncRegistry,n);for(;f.Q.length>0;)f.Q.map(h=>this._loadSingleGrammar(h.scopeName)),f.processQueue();return this._grammarForScopeName(n,a,l,s,u)}_loadSingleGrammar(n){this._ensureGrammarCache.has(n)||(this._doLoadSingleGrammar(n),this._ensureGrammarCache.set(n,!0))}_doLoadSingleGrammar(n){const a=this._options.loadGrammar(n);if(a){const l=typeof this._options.getInjections=="function"?this._options.getInjections(n):void 0;this._syncRegistry.addGrammar(a,l)}}addGrammar(n,a=[],l=0,s=null){return this._syncRegistry.addGrammar(n,a),this._grammarForScopeName(n.scopeName,l,s)}_grammarForScopeName(n,a=0,l=null,s=null,u=null){return this._syncRegistry.grammarForScopeName(n,a,l,s,u)}},Pd=Ud.NULL;function us(t,n){const a=typeof t=="string"?{}:{...t.colorReplacements},l=typeof t=="string"?t:t.name;for(const[s,u]of Object.entries(n?.colorReplacements||{}))typeof u=="string"?a[s]=u:s===l&&Object.assign(a,u);return a}function _i(t,n){return t&&(n?.[t?.toLowerCase()]||t)}function BC(t){return Array.isArray(t)?t:[t]}async function qv(t){return Promise.resolve(typeof t=="function"?t():t).then(n=>n.default||n)}function vs(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Fv(t){return t==="ansi"||vs(t)}function _s(t){return t==="none"}function Yv(t){return _s(t)}const GC=/(\r?\n)/g;function ys(t,n=!1){if(t.length===0)return[["",0]];const a=t.split(GC);let l=0;const s=[];for(let u=0;u<a.length;u+=2){const f=n?a[u]+(a[u+1]||""):a[u];s.push([f,l]),l+=a[u].length,l+=a[u+1]?.length||0}return s}const e0={light:"#333333",dark:"#bbbbbb"},t0={light:"#fffffe",dark:"#1e1e1e"},n0="__shiki_resolved";function bs(t){if(t?.[n0])return t;const n={...t};n.tokenColors&&!n.settings&&(n.settings=n.tokenColors,delete n.tokenColors),n.type||="dark",n.colorReplacements={...n.colorReplacements},n.settings||=[];let{bg:a,fg:l}=n;if(!a||!l){const h=n.settings?n.settings.find(c=>!c.name&&!c.scope):void 0;h?.settings?.foreground&&(l=h.settings.foreground),h?.settings?.background&&(a=h.settings.background),!l&&n?.colors?.["editor.foreground"]&&(l=n.colors["editor.foreground"]),!a&&n?.colors?.["editor.background"]&&(a=n.colors["editor.background"]),l||(l=n.type==="light"?e0.light:e0.dark),a||(a=n.type==="light"?t0.light:t0.dark),n.fg=l,n.bg=a}n.settings[0]&&n.settings[0].settings&&!n.settings[0].scope||n.settings.unshift({settings:{foreground:n.fg,background:n.bg}});let s=0;const u=new Map;function f(h){if(u.has(h))return u.get(h);s+=1;const c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return n.colorReplacements?.[`#${c}`]?f(h):(u.set(h,c),c)}n.settings=n.settings.map(h=>{const c=h.settings?.foreground&&!h.settings.foreground.startsWith("#"),m=h.settings?.background&&!h.settings.background.startsWith("#");if(!c&&!m)return h;const v={...h,settings:{...h.settings}};if(c){const g=f(h.settings.foreground);n.colorReplacements[g]=h.settings.foreground,v.settings.foreground=g}if(m){const g=f(h.settings.background);n.colorReplacements[g]=h.settings.background,v.settings.background=g}return v});for(const h of Object.keys(n.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!n.colors[h]?.startsWith("#")){const c=f(n.colors[h]);n.colorReplacements[c]=n.colors[h],n.colors[h]=c}return Object.defineProperty(n,n0,{enumerable:!1,writable:!1,value:!0}),n}async function Xv(t){return[...new Set((await Promise.all(t.filter(n=>!Fv(n)).map(async n=>await qv(n).then(a=>Array.isArray(a)?a:[a])))).flat())]}async function Qv(t){return(await Promise.all(t.map(async n=>Yv(n)?null:bs(await qv(n))))).filter(n=>!!n)}function Zv(t,n){if(!n)return t;if(n[t]){const a=new Set([t]);for(;n[t];){if(t=n[t],a.has(t))throw new He(`Circular alias \`${[...a].join(" -> ")} -> ${t}\``);a.add(t)}}return t}var jC=class extends VC{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,n,a,l={}){super(t),this._resolver=t,this._themes=n,this._langs=a,this._alias=l,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=bs(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=as.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=Zv(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const a={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const l=this.loadGrammarWithConfiguration(t.scopeName,1,a);if(l.name=t.name,this._resolvedGrammars.set(t.name,l),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const l of t)this.resolveEmbeddedLanguages(l);const n=[...this._langGraph.entries()],a=n.filter(([l,s])=>!s);if(a.length){const l=n.filter(([s,u])=>u?(u.embeddedLanguages||u.embeddedLangs)?.some(f=>a.map(([h])=>h).includes(f)):!1).filter(s=>!a.includes(s));throw new He(`Missing languages ${a.map(([s])=>`\`${s}\``).join(", ")}, required by ${l.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[l,s]of n)this._resolver.addLanguage(s);for(const[l,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const a of n)this._langGraph.set(a,this._langMap.get(a))}},$C=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:a=>t.createScanner(a),createOnigString:a=>t.createString(a)},n.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let a=[];for(let l=1;l<=n.length;l++){const s=n.slice(0,l).join(".");a=[...a,...this._injections.get(s)||[]]}return a}};let jr=0;function qC(t){jr+=1,t.warnings!==!1&&jr>=10&&jr%10===0&&console.warn(`[Shiki] ${jr} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!t.engine)throw new He("`engine` option is required for synchronous mode");const a=(t.langs||[]).flat(1),l=(t.themes||[]).flat(1).map(bs),s=new jC(new $C(t.engine,a),l,a,t.langAlias);let u;function f(A){return Zv(A,t.langAlias)}function h(A){O();const w=s.getGrammar(typeof A=="string"?A:A.name);if(!w)throw new He(`Language \`${A}\` not found, you may need to load it first`);return w}function c(A){if(A==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};O();const w=s.getTheme(A);if(!w)throw new He(`Theme \`${A}\` not found, you may need to load it first`);return w}function m(A){O();const w=c(A);return u!==A&&(s.setTheme(w),u=A),{theme:w,colorMap:s.getColorMap()}}function v(){return O(),s.getLoadedThemes()}function g(){return O(),s.getLoadedLanguages()}function y(...A){O(),s.loadLanguages(A.flat(1))}async function b(...A){return y(await Xv(A))}function E(...A){O();for(const w of A.flat(1))s.loadTheme(w)}async function T(...A){return O(),E(await Qv(A))}function O(){if(n)throw new He("Shiki instance has been disposed")}function L(){n||(n=!0,s.dispose(),jr-=1)}return{setTheme:m,getTheme:c,getLanguage:h,getLoadedThemes:v,getLoadedLanguages:g,resolveLangAlias:f,loadLanguage:b,loadLanguageSync:y,loadTheme:T,loadThemeSync:E,dispose:L,[Symbol.dispose]:L}}async function FC(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[n,a,l]=await Promise.all([Qv(t.themes||[]),Xv(t.langs||[]),t.engine]);return qC({...t,themes:n,langs:a,engine:l})}const Kv=new WeakMap;function Ss(t,n){Kv.set(t,n)}function ll(t){return Kv.get(t)}var Es=class Wv{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(n,a){return new Wv(Object.fromEntries(BC(a).map(l=>[l,Pd])),n)}constructor(...n){if(n.length===2){const[a,l]=n;this.lang=l,this._stacks=a}else{const[a,l,s]=n;this.lang=l,this._stacks={[s]:a}}}getInternalStack(n=this.theme){return this._stacks[n]}getScopes(n=this.theme){return YC(this._stacks[n])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function YC(t){const n=[],a=new Set;function l(s){if(a.has(s))return;a.add(s);const u=s?.nameScopesList?.scopeName;u&&n.push(u),s.parent&&l(s.parent)}return l(t),n}function XC(t,n){if(!(t instanceof Es))throw new He("Invalid grammar state");return t.getInternalStack(n)}const QC=/,/,ZC=/ /;function Jv(t,n,a={}){const{theme:l=t.getLoadedThemes()[0]}=a;if(vs(t.resolveLangAlias(a.lang||"text"))||_s(l))return ys(n).map(h=>[{content:h[0],offset:h[1]}]);const{theme:s,colorMap:u}=t.setTheme(l),f=t.getLanguage(a.lang||"text");if(a.grammarState){if(a.grammarState.lang!==f.name)throw new He(`Grammar state language "${a.grammarState.lang}" does not match highlight language "${f.name}"`);if(!a.grammarState.themes.includes(s.name))throw new He(`Grammar state themes "${a.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return WC(n,f,s,u,a)}function KC(...t){if(t.length===2)return ll(t[1]);const[n,a,l={}]=t,{lang:s="text",theme:u=n.getLoadedThemes()[0]}=l;if(vs(s)||_s(u))throw new He("Plain language does not have grammar state");if(s==="ansi")throw new He("ANSI language does not have grammar state");const{theme:f,colorMap:h}=n.setTheme(u),c=n.getLanguage(s);return new Es(df(a,c,f,h,l).stateStack,c.name,f.name)}function WC(t,n,a,l,s){const u=df(t,n,a,l,s),f=new Es(u.stateStack,n.name,a.name);return Ss(u.tokens,f),u.tokens}function df(t,n,a,l,s){const u=us(a,s),{tokenizeMaxLineLength:f=0,tokenizeTimeLimit:h=500,includeExplanation:c=!1}=s,m=ys(t);let v=s.grammarState?XC(s.grammarState,a.name)??Pd:s.grammarContextCode!=null?df(s.grammarContextCode,n,a,l,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Pd,g=[];const y=[];for(let b=0,E=m.length;b<E;b++){const[T,O]=m[b];if(T===""){g=[],y.push([]);continue}if(f>0&&T.length>=f){g=[],y.push([{content:T,offset:O,color:"",fontStyle:0}]);continue}let L,A,w;c&&c!=="tokenType"&&(L=n.tokenizeLine(T,v,h),A=L.tokens,w=0);const z=n.tokenizeLine2(T,v,h),V=z.tokens.length/2;for(let U=0;U<V;U++){const j=z.tokens[2*U],ne=U+1<V?z.tokens[2*U+2]:T.length;if(j===ne)continue;const W=z.tokens[2*U+1],F=_i(l[$i.getForeground(W)],u),K=$i.getFontStyle(W),Q={content:T.substring(j,ne),offset:O+j,color:F,fontStyle:K};if(c==="tokenType")Q.type=$i.getTokenType(W);else if(c){const ee=[];if(c!=="scopeName")for(const fe of a.settings){let M;switch(typeof fe.scope){case"string":M=fe.scope.split(QC).map(Y=>Y.trim());break;case"object":M=fe.scope;break;default:continue}ee.push({settings:fe,selectors:M.map(Y=>Y.split(ZC))})}Q.explanation=[];let oe=0;for(;j+oe<ne;){const fe=A[w],M=T.substring(fe.startIndex,fe.endIndex);oe+=M.length,Q.explanation.push({content:M,scopes:c==="scopeName"?JC(fe.scopes):eA(ee,fe.scopes)}),w+=1}}g.push(Q)}y.push(g),g=[],v=z.ruleStack}return{tokens:y,stateStack:v}}function JC(t){return t.map(n=>({scopeName:n}))}function eA(t,n){const a=[];for(let l=0,s=n.length;l<s;l++){const u=n[l];a[l]={scopeName:u,themeMatches:nA(t,u,n.slice(0,l))}}return a}function i0(t,n){return t===n||n.substring(0,t.length)===t&&n[t.length]==="."}function tA(t,n,a){if(!i0(t.at(-1),n))return!1;let l=t.length-2,s=a.length-1;for(;l>=0&&s>=0;)i0(t[l],a[s])&&(l-=1),s-=1;return l===-1}function nA(t,n,a){const l=[];for(const{selectors:s,settings:u}of t)for(const f of s)if(tA(f,n,a)){l.push(u);break}return l}function e_(t,n,a,l=Jv){const s=Object.entries(a.themes).filter(m=>m[1]).map(m=>({color:m[0],theme:m[1]})),u=s.map(m=>{const v=l(t,n,{...a,theme:m.theme});return{tokens:v,state:ll(v),theme:typeof m.theme=="string"?m.theme:m.theme.name}}),f=iA(...u.map(m=>m.tokens)),h=f[0].map((m,v)=>m.map((g,y)=>{const b={content:g.content,variants:{},offset:g.offset};return"includeExplanation"in a&&a.includeExplanation&&(b.explanation=g.explanation),f.forEach((E,T)=>{const{content:O,explanation:L,offset:A,...w}=E[v][y];b.variants[s[T].color]=w}),b})),c=u[0].state?new Es(Object.fromEntries(u.map(m=>[m.theme,m.state?.getInternalStack(m.theme)])),u[0].state.lang):void 0;return c&&Ss(h,c),h}function iA(...t){const n=t.map(()=>[]),a=t.length;for(let l=0;l<t[0].length;l++){const s=t.map(c=>c[l]),u=n.map(()=>[]);n.forEach((c,m)=>c.push(u[m]));const f=s.map(()=>0),h=s.map(c=>c[0]);for(;h.every(c=>c);){const c=Math.min(...h.map(m=>m.content.length));for(let m=0;m<a;m++){const v=h[m];v.content.length===c?(u[m].push(v),f[m]+=1,h[m]=s[m][f[m]]):(u[m].push({...v,content:v.content.slice(0,c)}),h[m]={...v,content:v.content.slice(c),offset:v.offset+c})}}}return n}const a0=/\s+/g;function t_(t,n){if(!n)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(a0)),Array.isArray(t.properties.class)||(t.properties.class=[]);const a=Array.isArray(n)?n:n.split(a0);for(const l of a)l&&!t.properties.class.includes(l)&&t.properties.class.push(l);return t}function aA(t){const n=ys(t,!0).map(([s])=>s);function a(s){if(s===t.length)return{line:n.length-1,character:n.at(-1).length};let u=s,f=0;for(const h of n){if(u<h.length)break;u-=h.length,f++}return{line:f,character:u}}function l(s,u){let f=0;for(let h=0;h<s;h++)f+=n[h].length;return f+=u,f}return{lines:n,indexToPos:a,posToIndex:l}}const rA=["color","background-color"];function lA(t,n){let a=0;const l=[];for(const s of n)s>a&&l.push({...t,content:t.content.slice(a,s),offset:t.offset+a}),a=s;return a<t.content.length&&l.push({...t,content:t.content.slice(a),offset:t.offset+a}),l}function oA(t,n){let a=0,l=t.length;for(;a<l;){const s=a+(l-a>>1);t[s]<=n?a=s+1:l=s}return a}function sA(t,n){const a=[...n instanceof Set?n:new Set(n)].sort((l,s)=>l-s);return a.length?t.map(l=>l.flatMap(s=>{const u=s.offset+s.content.length,f=oA(a,s.offset);let h=f;for(;h<a.length&&a[h]<u;)h++;if(f===h)return s;const c=a.slice(f,h);for(let m=0;m<c.length;m++)c[m]-=s.offset;return lA(s,c)})):t}function uA(t,n,a,l,s="css-vars"){const u={content:t.content,explanation:t.explanation,offset:t.offset},f=n.map(v=>cs(t.variants[v])),h=new Set(f.flatMap(v=>Object.keys(v))),c={},m=(v,g)=>{const y=g==="color"?"":g==="background-color"?"-bg":`-${g}`;return a+n[v]+(g==="color"?"":y)};return f.forEach((v,g)=>{for(const y of h){const b=v[y]||"inherit";if(g===0&&l&&rA.includes(y))if(l==="light-dark()"&&f.length>1){const E=n.findIndex(A=>A==="light"),T=n.findIndex(A=>A==="dark");if(E===-1||T===-1)throw new He('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const O=f[E][y]||"inherit",L=f[T][y]||"inherit";c[y]=`light-dark(${O}, ${L})`,s==="css-vars"&&(c[m(g,y)]=b)}else c[y]=b;else s==="css-vars"&&(c[m(g,y)]=b)}}),u.htmlStyle=c,u}function cs(t){const n={};if(t.color&&(n.color=t.color),t.bgColor&&(n["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&yt.Italic&&(n["font-style"]="italic"),t.fontStyle&yt.Bold&&(n["font-weight"]="bold");const a=[];t.fontStyle&yt.Underline&&a.push("underline"),t.fontStyle&yt.Strikethrough&&a.push("line-through"),a.length&&(n["text-decoration"]=a.join(" "))}return n}function Vd(t){return typeof t=="string"?t:Object.entries(t).map(([n,a])=>`${n}:${a}`).join(";")}function cA(){const t=new WeakMap;function n(a){if(!t.has(a.meta)){let u=function(h){if(typeof h=="number"){if(h<0||h>a.source.length)throw new He(`Invalid decoration offset: ${h}. Code length: ${a.source.length}`);return{...s.indexToPos(h),offset:h}}else{const c=s.lines[h.line];if(c===void 0)throw new He(`Invalid decoration position ${JSON.stringify(h)}. Lines length: ${s.lines.length}`);let m=h.character;if(m<0&&(m=c.length+m),m<0||m>c.length)throw new He(`Invalid decoration position ${JSON.stringify(h)}. Line ${h.line} length: ${c.length}`);return{...h,character:m,offset:s.posToIndex(h.line,m)}}};var l=u;const s=aA(a.source),f=(a.options.decorations||[]).map(h=>({...h,start:u(h.start),end:u(h.end)}));dA(f),t.set(a.meta,{decorations:f,converter:s,source:a.source})}return t.get(a.meta)}return{name:"shiki:decorations",tokens(a){if(this.options.decorations?.length)return sA(a,n(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]))},code(a){if(!this.options.decorations?.length)return;const l=n(this),s=[...a.children].filter(v=>v.type==="element"&&v.tagName==="span");if(s.length!==l.converter.lines.length)throw new He(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${l.converter.lines.length}). Failed to apply decorations.`);function u(v,g,y,b){const E=s[v];let T="",O=-1,L=-1;if(g===0&&(O=0),y===0&&(L=0),y===Number.POSITIVE_INFINITY&&(L=E.children.length),O===-1||L===-1)for(let w=0;w<E.children.length;w++)T+=n_(E.children[w]),O===-1&&T.length===g&&(O=w+1),L===-1&&T.length===y&&(L=w+1);if(O===-1)throw new He(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(L===-1)throw new He(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const A=E.children.slice(O,L);if(!b.alwaysWrap&&A.length===E.children.length)h(E,b,"line");else if(!b.alwaysWrap&&A.length===1&&A[0].type==="element")h(A[0],b,"token");else{const w={type:"element",tagName:"span",properties:{},children:A};h(w,b,"wrapper"),E.children.splice(O,A.length,w)}}function f(v,g){s[v]=h(s[v],g,"line")}function h(v,g,y){const b=g.properties||{},E=g.transform||(T=>T);return v.tagName=g.tagName||"span",v.properties={...v.properties,...b,class:v.properties.class},g.properties?.class&&t_(v,g.properties.class),v=E(v,y)||v,v}const c=[],m=l.decorations.sort((v,g)=>g.start.offset-v.start.offset||v.end.offset-g.end.offset);for(const v of m){const{start:g,end:y}=v;if(g.line===y.line)u(g.line,g.character,y.character,v);else if(g.line<y.line){u(g.line,g.character,Number.POSITIVE_INFINITY,v);for(let b=g.line+1;b<y.line;b++)c.unshift(()=>f(b,v));u(y.line,0,y.character,v)}}c.forEach(v=>v())}}}function dA(t){for(let n=0;n<t.length;n++){const a=t[n];if(a.start.offset>a.end.offset)throw new He(`Invalid decoration range: ${JSON.stringify(a.start)} - ${JSON.stringify(a.end)}`);for(let l=n+1;l<t.length;l++){const s=t[l],u=a.start.offset<=s.start.offset&&s.start.offset<a.end.offset,f=a.start.offset<s.end.offset&&s.end.offset<=a.end.offset,h=s.start.offset<=a.start.offset&&a.start.offset<s.end.offset,c=s.start.offset<a.end.offset&&a.end.offset<=s.end.offset;if(u||f||h||c){if(u&&f||h&&c||h&&a.start.offset===a.end.offset||f&&s.start.offset===s.end.offset)continue;throw new He(`Decorations ${JSON.stringify(a.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function n_(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(n_).join(""):""}const fA=[cA()];function ds(t){const n=hA(t.transformers||[]);return[...n.pre,...n.normal,...n.post,...fA]}function hA(t){const n=[],a=[],l=[];for(const s of t)switch(s.enforce){case"pre":n.push(s);break;case"post":a.push(s);break;default:l.push(s)}return{pre:n,post:a,normal:l}}var Bi=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],id={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function pA(t,n){const a=t.indexOf("\x1B",n);if(a!==-1&&t[a+1]==="["){const l=t.indexOf("m",a);if(l!==-1)return{sequence:t.substring(a+2,l).split(";"),startPosition:a,position:l+1}}return{position:t.length}}function r0(t){const n=t.shift();if(n==="2"){const a=t.splice(0,3).map(l=>Number.parseInt(l));return a.length!==3||a.some(l=>Number.isNaN(l))?void 0:{type:"rgb",rgb:a}}else if(n==="5"){const a=t.shift();if(a)return{type:"table",index:Number(a)}}}function mA(t){const n=[];for(;t.length>0;){const a=t.shift();if(!a)continue;const l=Number.parseInt(a);if(!Number.isNaN(l))if(l===0)n.push({type:"resetAll"});else if(l<=9)id[l]&&n.push({type:"setDecoration",value:id[l]});else if(l<=29){const s=id[l-20];s&&(n.push({type:"resetDecoration",value:s}),s==="dim"&&n.push({type:"resetDecoration",value:"bold"}))}else if(l<=37)n.push({type:"setForegroundColor",value:{type:"named",name:Bi[l-30]}});else if(l===38){const s=r0(t);s&&n.push({type:"setForegroundColor",value:s})}else if(l===39)n.push({type:"resetForegroundColor"});else if(l<=47)n.push({type:"setBackgroundColor",value:{type:"named",name:Bi[l-40]}});else if(l===48){const s=r0(t);s&&n.push({type:"setBackgroundColor",value:s})}else l===49?n.push({type:"resetBackgroundColor"}):l===53?n.push({type:"setDecoration",value:"overline"}):l===55?n.push({type:"resetDecoration",value:"overline"}):l>=90&&l<=97?n.push({type:"setForegroundColor",value:{type:"named",name:Bi[l-90+8]}}):l>=100&&l<=107&&n.push({type:"setBackgroundColor",value:{type:"named",name:Bi[l-100+8]}})}return n}function gA(){let t=null,n=null,a=new Set;return{parse(l){const s=[];let u=0;do{const f=pA(l,u),h=f.sequence?l.substring(u,f.startPosition):l.substring(u);if(h.length>0&&s.push({value:h,foreground:t,background:n,decorations:new Set(a)}),f.sequence){const c=mA(f.sequence);for(const m of c)m.type==="resetAll"?(t=null,n=null,a.clear()):m.type==="resetForegroundColor"?t=null:m.type==="resetBackgroundColor"?n=null:m.type==="resetDecoration"&&a.delete(m.value);for(const m of c)m.type==="setForegroundColor"?t=m.value:m.type==="setBackgroundColor"?n=m.value:m.type==="setDecoration"&&a.add(m.value)}u=f.position}while(u<l.length);return s}}}var vA={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function _A(t=vA){function n(h){return t[h]}function a(h){return`#${h.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let l;function s(){if(l)return l;l=[];for(let m=0;m<Bi.length;m++)l.push(n(Bi[m]));let h=[0,95,135,175,215,255];for(let m=0;m<6;m++)for(let v=0;v<6;v++)for(let g=0;g<6;g++)l.push(a([h[m],h[v],h[g]]));let c=8;for(let m=0;m<24;m++,c+=10)l.push(a([c,c,c]));return l}function u(h){return s()[h]}function f(h){switch(h.type){case"named":return n(h.name);case"rgb":return a(h.rgb);case"table":return u(h.index)}}return{value:f}}const yA=/#([0-9a-f]{3,8})/i,bA=/var\((--[\w-]+-ansi-[\w-]+)\)/,SA={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function EA(t,n,a){const l=us(t,a),s=ys(n),u=_A(Object.fromEntries(Bi.map(h=>{const c=`terminal.ansi${h[0].toUpperCase()}${h.substring(1)}`;return[h,t.colors?.[c]||SA[h]]}))),f=gA();return s.map(h=>f.parse(h[0]).map(c=>{let m,v;c.decorations.has("reverse")?(m=c.background?u.value(c.background):t.bg,v=c.foreground?u.value(c.foreground):t.fg):(m=c.foreground?u.value(c.foreground):t.fg,v=c.background?u.value(c.background):void 0),m=_i(m,l),v=_i(v,l),c.decorations.has("dim")&&(m=CA(m));let g=yt.None;return c.decorations.has("bold")&&(g|=yt.Bold),c.decorations.has("italic")&&(g|=yt.Italic),c.decorations.has("underline")&&(g|=yt.Underline),c.decorations.has("strikethrough")&&(g|=yt.Strikethrough),{content:c.value,offset:h[1],color:m,bgColor:v,fontStyle:g}}))}function CA(t){const n=t.match(yA);if(n){const l=n[1];if(l.length===8){const s=Math.round(Number.parseInt(l.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${l.slice(0,6)}${s}`}else{if(l.length===6)return`#${l}80`;if(l.length===4){const s=l[0],u=l[1],f=l[2],h=l[3];return`#${s}${s}${u}${u}${f}${f}${Math.round(Number.parseInt(`${h}${h}`,16)/2).toString(16).padStart(2,"0")}`}else if(l.length===3){const s=l[0],u=l[1],f=l[2];return`#${s}${s}${u}${u}${f}${f}80`}}}const a=t.match(bA);return a?`var(${a[1]}-dim)`:t}function Bd(t,n,a={}){const l=t.resolveLangAlias(a.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=a;if(!vs(l)&&!_s(s)&&l==="ansi"){const{theme:u}=t.setTheme(s);return EA(u,n,a)}return Jv(t,n,a)}function fs(t,n,a){let l,s,u,f,h,c;if("themes"in a){const{defaultColor:m="light",cssVariablePrefix:v="--shiki-",colorsRendering:g="css-vars"}=a,y=Object.entries(a.themes).filter(L=>L[1]).map(L=>({color:L[0],theme:L[1]})).sort((L,A)=>L.color===m?-1:A.color===m?1:0);if(y.length===0)throw new He("`themes` option must not be empty");const b=e_(t,n,a,Bd);if(c=ll(b),m&&m!=="light-dark()"&&!y.some(L=>L.color===m))throw new He(`\`themes\` option must contain the defaultColor key \`${m}\``);const E=y.map(L=>t.getTheme(L.theme)),T=y.map(L=>L.color);u=b.map(L=>L.map(A=>uA(A,T,v,m,g))),c&&Ss(u,c);const O=y.map(L=>us(L.theme,a));s=l0(y,E,O,v,m,"fg",g),l=l0(y,E,O,v,m,"bg",g),f=`shiki-themes ${E.map(L=>L.name).join(" ")}`,h=m?void 0:[s,l].join(";")}else if("theme"in a){const m=us(a.theme,a);u=Bd(t,n,a);const v=t.getTheme(a.theme);l=_i(v.bg,m),s=_i(v.fg,m),f=v.name,c=ll(u)}else throw new He("Invalid options, either `theme` or `themes` must be provided");return{tokens:u,fg:s,bg:l,themeName:f,rootStyle:h,grammarState:c}}function l0(t,n,a,l,s,u,f){return t.map((h,c)=>{const m=_i(n[c][u],a[c])||"inherit",v=`${l+h.color}${u==="bg"?"-bg":""}:${m}`;if(c===0&&s){if(s==="light-dark()"&&t.length>1){const g=t.findIndex(b=>b.color==="light"),y=t.findIndex(b=>b.color==="dark");if(g===-1||y===-1)throw new He('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${_i(n[g][u],a[g])||"inherit"}, ${_i(n[y][u],a[y])||"inherit"});${v}`}return m}return f==="css-vars"?v:null}).filter(h=>!!h).join(";")}const i_=/^\s+$/,AA=/^(\s*)(.*?)(\s*)$/;function hs(t,n,a,l={meta:{},options:a,codeToHast:(s,u)=>hs(t,s,u),codeToTokens:(s,u)=>fs(t,s,u)}){let s=n;for(const E of ds(a))s=E.preprocess?.call(l,s,a)||s;let{tokens:u,fg:f,bg:h,themeName:c,rootStyle:m,grammarState:v}=fs(t,s,a);const{mergeWhitespaces:g=!0,mergeSameStyleTokens:y=!1}=a;g===!0?u=xA(u):g==="never"&&(u=LA(u)),y&&(u=wA(u));const b={...l,get source(){return s}};for(const E of ds(a))u=E.tokens?.call(b,u)||u;return TA(u,{...a,fg:f,bg:h,themeName:c,rootStyle:a.rootStyle===!1?!1:a.rootStyle??m},b,v)}function TA(t,n,a,l=ll(t)){const s=ds(n),u=[],f={type:"root",children:[]},{structure:h="classic",tabindex:c="0"}=n,m={class:`shiki ${n.themeName||""}`};n.rootStyle!==!1&&(n.rootStyle!=null?m.style=n.rootStyle:m.style=`background-color:${n.bg};color:${n.fg}`),c!==!1&&c!=null&&(m.tabindex=c.toString());for(const[T,O]of Object.entries(n.meta||{}))T.startsWith("_")||(m[T]=O);let v={type:"element",tagName:"pre",properties:m,children:[],data:n.data},g={type:"element",tagName:"code",properties:{},children:u};const y=[],b={...a,structure:h,addClassToHast:t_,get source(){return a.source},get tokens(){return t},get options(){return n},get root(){return f},get pre(){return v},get code(){return g},get lines(){return y}};if(t.forEach((T,O)=>{O&&(h==="inline"?f.children.push({type:"element",tagName:"br",properties:{},children:[]}):h==="classic"&&u.push({type:"text",value:`
21
+ `}));let L={type:"element",tagName:"span",properties:{class:"line"},children:[]},A=0;for(const w of T){let z={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]};const V=Vd(w.htmlStyle||cs(w));V&&(z.properties.style=V);for(const U of s)z=U?.span?.call(b,z,O+1,A,L,w)||z;h==="inline"?f.children.push(z):h==="classic"&&L.children.push(z),A+=w.content.length}if(h==="classic"){for(const w of s)L=w?.line?.call(b,L,O+1)||L;y.push(L),u.push(L)}else h==="inline"&&y.push(L)}),h==="classic"){for(const T of s)g=T?.code?.call(b,g)||g;v.children.push(g);for(const T of s)v=T?.pre?.call(b,v)||v;f.children.push(v)}else if(h==="inline"){const T=[];let O={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const A of f.children)A.type==="element"&&A.tagName==="br"?(T.push(O),O={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(A.type==="element"||A.type==="text")&&O.children.push(A);T.push(O);let L={type:"element",tagName:"code",properties:{},children:T};for(const A of s)L=A?.code?.call(b,L)||L;f.children=[];for(let A=0;A<L.children.length;A++){A>0&&f.children.push({type:"element",tagName:"br",properties:{},children:[]});const w=L.children[A];w.type==="element"&&f.children.push(...w.children)}}let E=f;for(const T of s)E=T?.root?.call(b,E)||E;return l&&Ss(E,l),E}function xA(t){return t.map(n=>{const a=[];let l="",s;return n.forEach((u,f)=>{const h=!(u.fontStyle&&(u.fontStyle&yt.Underline||u.fontStyle&yt.Strikethrough));h&&i_.test(u.content)&&n[f+1]?(s===void 0&&(s=u.offset),l+=u.content):l?(h?a.push({...u,offset:s,content:l+u.content}):a.push({content:l,offset:s},u),s=void 0,l=""):a.push(u)}),a})}function LA(t){return t.map(n=>n.flatMap(a=>{if(i_.test(a.content))return a;const l=a.content.match(AA);if(!l)return a;const[,s,u,f]=l;if(!s&&!f)return a;const h=[{...a,offset:a.offset+s.length,content:u}];return s&&h.unshift({content:s,offset:a.offset}),f&&h.push({content:f,offset:a.offset+s.length+u.length}),h}))}function wA(t){return t.map(n=>{const a=[];for(const l of n){if(a.length===0){a.push({...l});continue}const s=a.at(-1),u=Vd(s.htmlStyle||cs(s)),f=Vd(l.htmlStyle||cs(l)),h=s.fontStyle&&(s.fontStyle&yt.Underline||s.fontStyle&yt.Strikethrough),c=l.fontStyle&&(l.fontStyle&yt.Underline||l.fontStyle&yt.Strikethrough);!h&&!c&&u===f?s.content+=l.content:a.push({...l})}return a})}const RA=Ga;function kA(t,n,a){const l={meta:{},options:a,codeToHast:(u,f)=>hs(t,u,f),codeToTokens:(u,f)=>fs(t,u,f)};let s=RA(hs(t,n,a,l));for(const u of ds(a))s=u.postprocess?.call(l,s,a)||s;return s}async function DA(t){const n=await FC(t);return{getLastGrammarState:(...a)=>KC(n,...a),codeToTokensBase:(a,l)=>Bd(n,a,l),codeToTokensWithThemes:(a,l)=>e_(n,a,l),codeToTokens:(a,l)=>fs(n,a,l),codeToHast:(a,l)=>hs(n,a,l),codeToHtml:(a,l)=>kA(n,a,l),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...n,getInternalContext:()=>n}}function OA(t){const n=t.langs,a=t.themes,l=t.engine;async function s(u){function f(g){if(typeof g=="string"){if(g=u.langAlias?.[g]||g,Fv(g))return[];const y=n[g];if(!y)throw new He(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return y}return g}function h(g){if(Yv(g))return"none";if(typeof g=="string"){const y=a[g];if(!y)throw new He(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return y}return g}const c=(u.themes??[]).map(g=>h(g)),m=(u.langs??[]).map(g=>f(g)),v=await DA({engine:u.engine??l(),...u,themes:c,langs:m});return{...v,loadLanguage(...g){return v.loadLanguage(...g.map(f))},loadTheme(...g){return v.loadTheme(...g.map(h))},getBundledLanguages(){return n},getBundledThemes(){return a}}}return s}const MA=OA({langs:Od,themes:zE,engine:()=>(0,Rv.createOnigurumaEngine)(S(()=>import("./wasm-CG6Dc4jp.js"),[]))}),o0=4294967295;var NA=class{patterns;options;regexps;constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:a=!1,cache:l,regexConstructor:s}=n;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(u=>{if(typeof u!="string")return u;const f=l?.get(u);if(f){if(f instanceof RegExp)return f;if(a)return null;throw f}try{const h=s(u);return l?.set(u,h),h}catch(h){if(l?.set(u,h),a)return null;throw h}})}findNextMatchSync(t,n,a){const l=typeof t=="string"?t:t.content,s=[];function u(f,h,c=0){return{index:f,captureIndices:h.indices.map(m=>m==null?{start:o0,end:o0,length:0}:{start:m[0]+c,end:m[1]+c,length:m[1]-m[0]})}}for(let f=0;f<this.regexps.length;f++){const h=this.regexps[f];if(h)try{h.lastIndex=n;const c=h.exec(l);if(!c)continue;if(c.index===n)return u(f,c,0);s.push([f,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(s.length){const f=Math.min(...s.map(h=>h[1].index));for(const[h,c,m]of s)if(c.index===f)return u(h,c,m)}return null}};function Fa(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function IA(t,n,a){return t.has(n)||t.set(n,a),t.get(n)}const ff=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),ut=String.raw;function Ya(t,n){if(t==null)throw new Error(n??"Value expected");return t}const a_=ut`\[\^?`,r_=`c.? | C(?:-.?)?|${ut`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${ut`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${ut`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${ut`o\{[^\}]*\}?`}|${ut`\d{1,3}`}`,hf=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Po=new RegExp(ut`
22
+ \\ (?:
23
+ ${r_}
24
+ | [gk]<[^>]*>?
25
+ | [gk]'[^']*'?
26
+ | .
27
+ )
28
+ | \( (?:
29
+ \? (?:
30
+ [:=!>({]
31
+ | <[=!]
32
+ | <[^>]*>
33
+ | '[^']*'
34
+ | ~\|?
35
+ | #(?:[^)\\]|\\.?)*
36
+ | [^:)]*[:)]
37
+ )?
38
+ | \*[^\)]*\)?
39
+ )?
40
+ | (?:${hf.source})+
41
+ | ${a_}
42
+ | .
43
+ `.replace(/\s+/g,""),"gsu"),ad=new RegExp(ut`
44
+ \\ (?:
45
+ ${r_}
46
+ | .
47
+ )
48
+ | \[:(?:\^?\p{Alpha}+|\^):\]
49
+ | ${a_}
50
+ | &&
51
+ | .
52
+ `.replace(/\s+/g,""),"gsu");function zA(t,n={}){const a={flags:"",...n,rules:{captureGroup:!1,singleline:!1,...n.rules}};if(typeof t!="string")throw new Error("String expected as pattern");const l=tT(a.flags),s=[l.extended],u={captureGroup:a.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(g){s.push(g)},replaceCurrentModX(g){s[s.length-1]=g},singleline:a.rules.singleline};let f=[],h;for(Po.lastIndex=0;h=Po.exec(t);){const g=HA(u,t,h[0],Po.lastIndex);g.tokens?f.push(...g.tokens):g.token&&f.push(g.token),g.lastIndex!==void 0&&(Po.lastIndex=g.lastIndex)}const c=[];let m=0;f.filter(g=>g.type==="GroupOpen").forEach(g=>{g.kind==="capturing"?g.number=++m:g.raw==="("&&c.push(g)}),m||c.forEach((g,y)=>{g.kind="capturing",g.number=y+1});const v=m||c.length;return{tokens:f.map(g=>g.type==="EscapedNumber"?iT(g,v):g).flat(),flags:l}}function HA(t,n,a,l){const[s,u]=a;if(a==="["||a==="[^"){const f=UA(n,a,l);return{tokens:f.tokens,lastIndex:f.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(u))return{token:s0(a,a)};if(/^\\g[<']/.test(a)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(a))throw new Error(`Invalid group name "${a}"`);return{token:XA(a)}}if(/^\\k[<']/.test(a)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(a))throw new Error(`Invalid group name "${a}"`);return{token:o_(a)}}if(u==="K")return{token:s_("keep",a)};if(u==="N"||u==="R")return{token:Gi("newline",a,{negate:u==="N"})};if(u==="O")return{token:Gi("any",a)};if(u==="X")return{token:Gi("text_segment",a)};const f=l_(a,{inCharClass:!1});return Array.isArray(f)?{tokens:f}:{token:f}}if(s==="("){if(u==="*")return{token:WA(a)};if(a==="(?{")throw new Error(`Unsupported callout "${a}"`);if(a.startsWith("(?#")){if(n[l]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:l+1}}if(/^\(\?[-imx]+[:)]$/.test(a))return{token:KA(a,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,a==="("&&!t.captureGroup||a==="(?:")return{token:Ha("group",a)};if(a==="(?>")return{token:Ha("atomic",a)};if(a==="(?="||a==="(?!"||a==="(?<="||a==="(?<!")return{token:Ha(a[2]==="<"?"lookbehind":"lookahead",a,{negate:a.endsWith("!")})};if(a==="("&&t.captureGroup||a.startsWith("(?<")&&a.endsWith(">")||a.startsWith("(?'")&&a.endsWith("'"))return{token:Ha("capturing",a,{...a!=="("&&{name:a.slice(3,-1)}})};if(a.startsWith("(?~")){if(a==="(?~|")throw new Error(`Unsupported absence function kind "${a}"`);return{token:Ha("absence_repeater",a)}}throw a==="(?("?new Error(`Unsupported conditional "${a}"`):new Error(`Invalid or unsupported group option "${a}"`)}if(a===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:qA(a)}}if(t.getCurrentModX()){if(a==="#"){const f=n.indexOf(`
53
+ `,l);return{lastIndex:f===-1?n.length:f}}if(/^\s$/.test(a)){const f=/\s+/y;return f.lastIndex=l,{lastIndex:f.exec(n)?f.lastIndex:l}}}if(a===".")return{token:Gi("dot",a)};if(a==="^"||a==="$"){const f=t.singleline?{"^":ut`\A`,$:ut`\Z`}[a]:a;return{token:s0(f,a)}}return a==="|"?{token:VA(a)}:hf.test(a)?{tokens:aT(a)}:{token:jn(Fa(a),a)}}function UA(t,n,a){const l=[u0(n[1]==="^",n)];let s=1,u;for(ad.lastIndex=a;u=ad.exec(t);){const f=u[0];if(f[0]==="["&&f[1]!==":")s++,l.push(u0(f[1]==="^",f));else if(f==="]"){if(l.at(-1).type==="CharacterClassOpen")l.push(jn(93,f));else if(s--,l.push(BA(f)),!s)break}else{const h=PA(f);Array.isArray(h)?l.push(...h):l.push(h)}}return{tokens:l,lastIndex:ad.lastIndex||t.length}}function PA(t){if(t[0]==="\\")return l_(t,{inCharClass:!0});if(t[0]==="["){const n=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!n||!ff.has(n.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return Gi("posix",t,{value:n.groups.name,negate:!!n.groups.negate})}return t==="-"?GA(t):t==="&&"?jA(t):jn(Fa(t),t)}function l_(t,{inCharClass:n}){const a=t[1];if(a==="c"||a==="C")return ZA(t);if("dDhHsSwW".includes(a))return JA(t);if(t.startsWith(ut`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return eT(t)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(t))try{const l=t.split(/\\x/).slice(1).map(f=>parseInt(f,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(l)),u=new TextEncoder;return[...s].map(f=>{const h=[...u.encode(f)].map(c=>`\\x${c.toString(16)}`).join("");return jn(Fa(f),h)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(a==="u"||a==="x")return jn(nT(t),t);if(c0.has(a))return jn(c0.get(a),t);if(/\d/.test(a))return $A(n,t);if(t==="\\")throw new Error(ut`Incomplete escape "\"`);if(a==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return jn(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function VA(t){return{type:"Alternator",raw:t}}function s0(t,n){return{type:"Assertion",kind:t,raw:n}}function o_(t){return{type:"Backreference",raw:t}}function jn(t,n){return{type:"Character",value:t,raw:n}}function BA(t){return{type:"CharacterClassClose",raw:t}}function GA(t){return{type:"CharacterClassHyphen",raw:t}}function jA(t){return{type:"CharacterClassIntersector",raw:t}}function u0(t,n){return{type:"CharacterClassOpen",negate:t,raw:n}}function Gi(t,n,a={}){return{type:"CharacterSet",kind:t,...a,raw:n}}function s_(t,n,a={}){return t==="keep"?{type:"Directive",kind:t,raw:n}:{type:"Directive",kind:t,flags:Ya(a.flags),raw:n}}function $A(t,n){return{type:"EscapedNumber",inCharClass:t,raw:n}}function qA(t){return{type:"GroupClose",raw:t}}function Ha(t,n,a={}){return{type:"GroupOpen",kind:t,...a,raw:n}}function FA(t,n,a,l){return{type:"NamedCallout",kind:t,tag:n,arguments:a,raw:l}}function YA(t,n,a,l){return{type:"Quantifier",kind:t,min:n,max:a,raw:l}}function XA(t){return{type:"Subroutine",raw:t}}const QA=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),c0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function ZA(t){const n=t[1]==="c"?t[2]:t[3];if(!n||!/[A-Za-z]/.test(n))throw new Error(`Unsupported control character "${t}"`);return jn(Fa(n.toUpperCase())-64,t)}function KA(t,n){let{on:a,off:l}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;l??="";const s=(n.getCurrentModX()||a.includes("x"))&&!l.includes("x"),u=f0(a),f=f0(l),h={};if(u&&(h.enable=u),f&&(h.disable=f),t.endsWith(")"))return n.replaceCurrentModX(s),s_("flags",t,{flags:h});if(t.endsWith(":"))return n.pushModX(s),n.numOpenGroups++,Ha("group",t,{...(u||f)&&{flags:h}});throw new Error(`Unexpected flag modifier "${t}"`)}function WA(t){const n=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!n)throw new Error(`Incomplete or invalid named callout "${t}"`);const{name:a,tag:l,args:s}=n.groups;if(!a)throw new Error(`Invalid named callout "${t}"`);if(l==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);const u=s?s.split(",").filter(v=>v!=="").map(v=>/^[+-]?\d+$/.test(v)?+v:v):[],[f,h,c]=u,m=QA.has(a)?a.toLowerCase():"custom";switch(m){case"fail":case"mismatch":case"skip":if(u.length>0)throw new Error(`Named callout arguments not allowed "${u}"`);break;case"error":if(u.length>1)throw new Error(`Named callout allows only one argument "${u}"`);if(typeof f=="string")throw new Error(`Named callout argument must be a number "${f}"`);break;case"max":if(!u.length||u.length>2)throw new Error(`Named callout must have one or two arguments "${u}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument one must be a tag or number "${f}"`);if(u.length===2&&(typeof h=="number"||!/^[<>X]$/.test(h)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${h}"`);break;case"count":case"total_count":if(u.length>1)throw new Error(`Named callout allows only one argument "${u}"`);if(u.length===1&&(typeof f=="number"||!/^[<>X]$/.test(f)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${f}"`);break;case"cmp":if(u.length!==3)throw new Error(`Named callout must have three arguments "${u}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument one must be a tag or number "${f}"`);if(typeof h=="number"||!/^(?:[<>!=]=|[<>])$/.test(h))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${h}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${a}"`);default:throw new Error(`Unexpected named callout kind "${m}"`)}return FA(m,l??null,s?.split(",")??null,t)}function d0(t){let n=null,a,l;if(t[0]==="{"){const{minStr:s,maxStr:u}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,f=1e5;if(+s>f||u&&+u>f)throw new Error("Quantifier value unsupported in Oniguruma");if(a=+s,l=u===void 0?+s:u===""?1/0:+u,a>l&&(n="possessive",[a,l]=[l,a]),t.endsWith("?")){if(n==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else a=t[0]==="+"?1:0,l=t[0]==="?"?1:1/0,n=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return YA(n,a,l,t)}function JA(t){const n=t[1].toLowerCase();return Gi({d:"digit",h:"hex",s:"space",w:"word"}[n],t,{negate:t[1]!==n})}function eT(t){const{p:n,neg:a,value:l}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return Gi("property",t,{value:l,negate:n==="P"&&!a||n==="p"&&!!a})}function f0(t){const n={};return t.includes("i")&&(n.ignoreCase=!0),t.includes("m")&&(n.dotAll=!0),t.includes("x")&&(n.extended=!0),Object.keys(n).length?n:null}function tT(t){const n={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let a=0;a<t.length;a++){const l=t[a];if(!"imxDPSWy".includes(l))throw new Error(`Invalid flag "${l}"`);if(l==="y"){if(!/^y{[gw]}/.test(t.slice(a)))throw new Error('Invalid or unspecified flag "y" mode');n.textSegmentMode=t[a+2]==="g"?"grapheme":"word",a+=3;continue}n[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[l]]=!0}return n}function nT(t){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(t))throw new Error(`Incomplete or invalid escape "${t}"`);const n=t[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(t).groups.hex:t.slice(2);return parseInt(n,16)}function iT(t,n){const{raw:a,inCharClass:l}=t,s=a.slice(1);if(!l&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=n))return[o_(a)];const u=[],f=s.match(/^[0-7]+|\d/g);for(let h=0;h<f.length;h++){const c=f[h];let m;if(h===0&&c!=="8"&&c!=="9"){if(m=parseInt(c,8),m>127)throw new Error(ut`Octal encoded byte above 177 unsupported "${a}"`)}else m=Fa(c);u.push(jn(m,(h===0?"\\":"")+c))}return u}function aT(t){const n=[],a=new RegExp(hf,"gy");let l;for(;l=a.exec(t);){const s=l[0];if(s[0]==="{"){const u=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(u){const{min:f,max:h}=u.groups;if(+f>+h&&s.endsWith("?")){a.lastIndex--,n.push(d0(s.slice(0,-1)));continue}}}n.push(d0(s))}return n}function u_(t,n){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;const a=t.body[0];return!n||Object.keys(n).every(l=>n[l]===a[l])}function rT(t){return lT.has(t.type)}const lT=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function c_(t,n={}){const a={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n,rules:{captureGroup:!1,singleline:!1,...n.rules}},l=zA(t,{flags:a.flags,rules:{captureGroup:a.rules.captureGroup,singleline:a.rules.singleline}}),s=(y,b)=>{const E=l.tokens[u.nextIndex];switch(u.parent=y,u.nextIndex++,E.type){case"Alternator":return Fi();case"Assertion":return oT(E);case"Backreference":return sT(E,u);case"Character":return Cs(E.value,{useLastValid:!!b.isCheckingRangeEnd});case"CharacterClassHyphen":return uT(E,u,b);case"CharacterClassOpen":return cT(E,u,b);case"CharacterSet":return dT(E,u);case"Directive":return vT(E.kind,{flags:E.flags});case"GroupOpen":return fT(E,u,b);case"NamedCallout":return yT(E.kind,E.tag,E.arguments);case"Quantifier":return hT(E,u);case"Subroutine":return pT(E,u);default:throw new Error(`Unexpected token type "${E.type}"`)}},u={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:a.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:a.skipBackrefValidation,skipLookbehindValidation:a.skipLookbehindValidation,skipPropertyNameValidation:a.skipPropertyNameValidation,subroutines:[],tokens:l.tokens,unicodePropertyMap:a.unicodePropertyMap,walk:s},f=ST(_T(l.flags));let h=f.body[0];for(;u.nextIndex<l.tokens.length;){const y=s(h,{});y.type==="Alternative"?(f.body.push(y),h=y):h.body.push(y)}const{capturingGroups:c,hasNumberedRef:m,namedGroupsByName:v,subroutines:g}=u;if(m&&v.size&&!a.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:y}of g)if(typeof y=="number"){if(y>c.length)throw new Error("Subroutine uses a group number that's not defined");y&&(c[y-1].isSubroutined=!0)}else if(v.has(y)){if(v.get(y).length>1)throw new Error(ut`Subroutine uses a duplicate group name "\g<${y}>"`);v.get(y)[0].isSubroutined=!0}else throw new Error(ut`Subroutine uses a group name that's not defined "\g<${y}>"`);return f}function oT({kind:t}){return Gd(Ya({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[t],`Unexpected assertion kind "${t}"`),{negate:t===ut`\B`||t===ut`\Y`})}function sT({raw:t},n){const a=/^\\k[<']/.test(t),l=a?t.slice(3,-1):t.slice(1),s=(u,f=!1)=>{const h=n.capturingGroups.length;let c=!1;if(u>h)if(n.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return n.hasNumberedRef=!0,jd(f?h+1-u:u,{orphan:c})};if(a){const u=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(l);if(u)return s(+u.groups.num,!!u.groups.sign);if(/[-+]/.test(l))throw new Error(`Invalid backref name "${t}"`);if(!n.namedGroupsByName.has(l))throw new Error(`Group name not defined to the left "${t}"`);return jd(l)}return s(+l)}function uT(t,n,a){const{tokens:l,walk:s}=n,u=n.parent,f=u.body.at(-1),h=l[n.nextIndex];if(!a.isCheckingRangeEnd&&f&&f.type!=="CharacterClass"&&f.type!=="CharacterClassRange"&&h&&h.type!=="CharacterClassOpen"&&h.type!=="CharacterClassClose"&&h.type!=="CharacterClassIntersector"){const c=s(u,{...a,isCheckingRangeEnd:!0});if(f.type==="Character"&&c.type==="Character")return u.body.pop(),gT(f,c);throw new Error("Invalid character class range")}return Cs(Fa("-"))}function cT({negate:t},n,a){const{tokens:l,walk:s}=n,u=[ts()],f=l[n.nextIndex];let h=m0(f);for(;h.type!=="CharacterClassClose";){if(h.type==="CharacterClassIntersector")u.push(ts()),n.nextIndex++;else{const m=u.at(-1);m.body.push(s(m,a))}h=m0(l[n.nextIndex],f)}const c=ts({negate:t});return u.length===1?c.body=u[0].body:(c.kind="intersection",c.body=u.map(m=>m.body.length===1?m.body[0]:m)),n.nextIndex++,c}function dT({kind:t,negate:n,value:a},l){const{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:u,unicodePropertyMap:f}=l;if(t==="property"){const h=As(a);if(ff.has(h)&&!f?.has(h))t="posix",a=h;else return Ua(a,{negate:n,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:u,unicodePropertyMap:f})}return t==="posix"?bT(a,{negate:n}):$d(t,{negate:n})}function fT(t,n,a){const{tokens:l,capturingGroups:s,namedGroupsByName:u,skipLookbehindValidation:f,walk:h}=n,c=ET(t),m=c.type==="AbsenceFunction",v=p0(c),g=v&&c.negate;if(c.type==="CapturingGroup"&&(s.push(c),c.name&&IA(u,c.name,[]).push(c)),m&&a.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let y=g0(l[n.nextIndex]);for(;y.type!=="GroupClose";){if(y.type==="Alternator")c.body.push(Fi()),n.nextIndex++;else{const b=c.body.at(-1),E=h(b,{...a,isInAbsenceFunction:a.isInAbsenceFunction||m,isInLookbehind:a.isInLookbehind||v,isInNegLookbehind:a.isInNegLookbehind||g});if(b.body.push(E),(v||a.isInLookbehind)&&!f){const T="Lookbehind includes a pattern not allowed by Oniguruma";if(g||a.isInNegLookbehind){if(h0(E)||E.type==="CapturingGroup")throw new Error(T)}else if(h0(E)||p0(E)&&E.negate)throw new Error(T)}}y=g0(l[n.nextIndex])}return n.nextIndex++,c}function hT({kind:t,min:n,max:a},l){const s=l.parent,u=s.body.at(-1);if(!u||!rT(u))throw new Error("Quantifier requires a repeatable token");const f=f_(t,n,a,u);return s.body.pop(),f}function pT({raw:t},n){const{capturingGroups:a,subroutines:l}=n;let s=t.slice(3,-1);const u=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(u){const h=+u.groups.num,c=a.length;if(n.hasNumberedRef=!0,s={"":h,"+":c+h,"-":c+1-h}[u.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const f=h_(s);return l.push(f),f}function mT(t,n){return{type:"AbsenceFunction",kind:t,body:hl(n?.body)}}function Fi(t){return{type:"Alternative",body:p_(t?.body)}}function Gd(t,n){const a={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(a.negate=!!n?.negate),a}function jd(t,n){const a=!!n?.orphan;return{type:"Backreference",ref:t,...a&&{orphan:a}}}function d_(t,n){const a={name:void 0,isSubroutined:!1,...n};if(a.name!==void 0&&!CT(a.name))throw new Error(`Group name "${a.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...a.name&&{name:a.name},...a.isSubroutined&&{isSubroutined:a.isSubroutined},body:hl(n?.body)}}function Cs(t,n){const a={useLastValid:!1,...n};if(t>1114111){const l=t.toString(16);if(a.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${l}}"`):new Error(`Invalid code point out of range in JS "\\x{${l}}"`)}return{type:"Character",value:t}}function ts(t){const n={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:n.kind,negate:n.negate,body:p_(t?.body)}}function gT(t,n){if(n.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:n}}function $d(t,n){const a=!!n?.negate,l={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(l.negate=a),(t==="text_segment"||t==="newline"&&!a)&&(l.variableLength=!0),l}function vT(t,n={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:Ya(n.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function _T(t){return{type:"Flags",...t}}function un(t){const n=t?.atomic,a=t?.flags;if(n&&a)throw new Error("Atomic group cannot have flags");return{type:"Group",...n&&{atomic:n},...a&&{flags:a},body:hl(t?.body)}}function Vi(t){const n={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:n.behind?"lookbehind":"lookahead",negate:n.negate,body:hl(t?.body)}}function yT(t,n,a){return{type:"NamedCallout",kind:t,tag:n,arguments:a}}function bT(t,n){const a=!!n?.negate;if(!ff.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:a}}function f_(t,n,a,l){if(n>a)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:n,max:a,body:l}}function ST(t,n){return{type:"Regex",body:hl(n?.body),flags:t}}function h_(t){return{type:"Subroutine",ref:t}}function Ua(t,n){const a={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n};let l=a.unicodePropertyMap?.get(As(t));if(!l){if(a.normalizeUnknownPropertyNames)l=AT(t);else if(a.unicodePropertyMap&&!a.skipPropertyNameValidation)throw new Error(ut`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:l??t,negate:a.negate}}function ET({flags:t,kind:n,name:a,negate:l,number:s}){switch(n){case"absence_repeater":return mT("repeater");case"atomic":return un({atomic:!0});case"capturing":return d_(s,{name:a});case"group":return un({flags:t});case"lookahead":case"lookbehind":return Vi({behind:n==="lookbehind",negate:l});default:throw new Error(`Unexpected group kind "${n}"`)}}function hl(t){if(t===void 0)t=[Fi()];else if(!Array.isArray(t)||!t.length||!t.every(n=>n.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function p_(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(n=>!!n.type))throw new Error("Invalid body; expected array of nodes");return t}function h0(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function p0(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function CT(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function AT(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}function As(t){return t.replace(/[- _]+/g,"").toLowerCase()}function m0(t,n){const a=n;return Ya(t,`Unclosed character class${a?.type==="Character"&&a.value===93&&a.raw==="]"?' (started with "]")':""}`)}function g0(t){return Ya(t,"Unclosed group")}function el(t,n,a=null){function l(u,f){for(let h=0;h<u.length;h++){const c=s(u[h],f,h,u);h=Math.max(-1,h+c)}}function s(u,f=null,h=null,c=null){let m=0,v=!1;const g={node:u,parent:f,key:h,container:c,root:t,remove(){Vo(c).splice(Math.max(0,Ma(h)+m),1),m--,v=!0},removeAllNextSiblings(){return Vo(c).splice(Ma(h)+1)},removeAllPrevSiblings(){const L=Ma(h)+m;return m-=L,Vo(c).splice(0,Math.max(0,L))},replaceWith(L,A={}){const w=!!A.traverse;c?c[Math.max(0,Ma(h)+m)]=L:Ya(f,"Can't replace root node")[h]=L,w&&s(L,f,h,c),v=!0},replaceWithMultiple(L,A={}){const w=!!A.traverse;if(Vo(c).splice(Math.max(0,Ma(h)+m),1,...L),m+=L.length-1,w){let z=0;for(let V=0;V<L.length;V++)z+=s(L[V],f,Ma(h)+V+z,c)}v=!0},skip(){v=!0}},{type:y}=u,b=n["*"],E=n[y],T=typeof b=="function"?b:b?.enter,O=typeof E=="function"?E:E?.enter;if(T?.(g,a),O?.(g,a),!v)switch(y){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":l(u.body,u);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(u.min,u,"min"),s(u.max,u,"max");break;case"Quantifier":s(u.body,u,"body");break;case"Regex":l(u.body,u),s(u.flags,u,"flags");break;default:throw new Error(`Unexpected node type "${y}"`)}return E?.exit?.(g,a),b?.exit?.(g,a),m}return s(t),t}function Vo(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function Ma(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}const TT=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function xT(t,n){for(let a=0;a<t.length;a++)t[a]>=n&&t[a]++}function LT(t,n,a,l){return t.slice(0,n)+l+t.slice(n+a.length)}const en=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function pf(t,n,a,l){const s=new RegExp(String.raw`${n}|(?<$skip>\[\^?|\\?.)`,"gsu"),u=[!1];let f=0,h="";for(const c of t.matchAll(s)){const{0:m,groups:{$skip:v}}=c;if(!v&&(!l||l===en.DEFAULT==!f)){a instanceof Function?h+=a(c,{context:f?en.CHAR_CLASS:en.DEFAULT,negated:u[u.length-1]}):h+=a;continue}m[0]==="["?(f++,u.push(m[1]==="^")):m==="]"&&f&&(f--,u.pop()),h+=m}return h}function m_(t,n,a,l){pf(t,n,a,l)}function wT(t,n,a=0,l){if(!new RegExp(n,"su").test(t))return null;const s=new RegExp(`${n}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=a;let u=0,f;for(;f=s.exec(t);){const{0:h,groups:{$skip:c}}=f;if(!c&&(!l||l===en.DEFAULT==!u))return f;h==="["?u++:h==="]"&&u&&u--,s.lastIndex==f.index&&s.lastIndex++}return null}function Bo(t,n,a){return!!wT(t,n,0,a)}function RT(t,n){const a=/\\?./gsu;a.lastIndex=n;let l=t.length,s=0,u=1,f;for(;f=a.exec(t);){const[h]=f;if(h==="[")s++;else if(s)h==="]"&&s--;else if(h==="(")u++;else if(h===")"&&(u--,!u)){l=f.index;break}}return t.slice(n,l)}const v0=new RegExp(String.raw`(?<noncapturingStart>${TT})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function kT(t,n){const a=n?.hiddenCaptures??[];let l=n?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:l,hiddenCaptures:a};const s="(?>",u="(?:(?=(",f=[0],h=[];let c=0,m=0,v=NaN,g;do{g=!1;let y=0,b=0,E=!1,T;for(v0.lastIndex=Number.isNaN(v)?0:v+u.length;T=v0.exec(t);){const{0:O,index:L,groups:{capturingStart:A,noncapturingStart:w}}=T;if(O==="[")y++;else if(y)O==="]"&&y--;else if(O===s&&!E)v=L,E=!0;else if(E&&w)b++;else if(A)E?b++:(c++,f.push(c+m));else if(O===")"&&E){if(!b){m++;const z=c+m;if(t=`${t.slice(0,v)}${u}${t.slice(v+s.length,L)}))<$$${z}>)${t.slice(L+1)}`,g=!0,h.push(z),xT(a,z),l.size){const V=new Map;l.forEach((U,j)=>{V.set(j>=z?j+1:j,U.map(ne=>ne>=z?ne+1:ne))}),l=V}break}b--}}}while(g);return a.push(...h),t=pf(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:y,groups:{backrefNum:b,wrappedBackrefNum:E}})=>{if(b){const T=+b;if(T>f.length-1)throw new Error(`Backref "${y}" greater than number of captures`);return`\\${f[T]}`}return`\\${E}`},en.DEFAULT),{pattern:t,captureTransfers:l,hiddenCaptures:a}}const g_=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,rd=new RegExp(String.raw`
54
+ \\(?: \d+
55
+ | c[A-Za-z]
56
+ | [gk]<[^>]+>
57
+ | [pPu]\{[^\}]+\}
58
+ | u[A-Fa-f\d]{4}
59
+ | x[A-Fa-f\d]{2}
60
+ )
61
+ | \((?: \? (?: [:=!>]
62
+ | <(?:[=!]|[^>]+>)
63
+ | [A-Za-z\-]+:
64
+ | \(DEFINE\)
65
+ ))?
66
+ | (?<qBase>${g_})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
67
+ | \\?.
68
+ `.replace(/\s+/g,""),"gsu");function DT(t){if(!new RegExp(`${g_}\\+`).test(t))return{pattern:t};const n=[];let a=null,l=null,s="",u=0,f;for(rd.lastIndex=0;f=rd.exec(t);){const{0:h,index:c,groups:{qBase:m,qMod:v,invalidQ:g}}=f;if(h==="[")u||(l=c),u++;else if(h==="]")u?u--:l=null;else if(!u)if(v==="+"&&s&&!s.startsWith("(")){if(g)throw new Error(`Invalid quantifier "${h}"`);let y=-1;if(/^\{\d+\}$/.test(m))t=LT(t,c+m.length,v,"");else{if(s===")"||s==="]"){const b=s===")"?a:l;if(b===null)throw new Error(`Invalid unmatched "${s}"`);t=`${t.slice(0,b)}(?>${t.slice(b,c)}${m})${t.slice(c+h.length)}`}else t=`${t.slice(0,c-s.length)}(?>${s}${m})${t.slice(c+h.length)}`;y+=4}rd.lastIndex+=y}else h[0]==="("?n.push(c):h===")"&&(a=n.length?n.pop():null);s=h}return{pattern:t}}const Wt=String.raw,OT=Wt`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,qd=Wt`\(\?R=(?<rDepth>[^\)]+)\)|${OT}`,Ts=Wt`\(\?<(?![=!])(?<captureName>[^>]+)>`,v_=Wt`${Ts}|(?<unnamed>\()(?!\?)`,Ui=new RegExp(Wt`${Ts}|${qd}|\(\?|\\?.`,"gsu"),ld="Cannot use multiple overlapping recursions";function MT(t,n){const{hiddenCaptures:a,mode:l}={hiddenCaptures:[],mode:"plugin",...n};let s=n?.captureTransfers??new Map;if(!new RegExp(qd,"su").test(t))return{pattern:t,captureTransfers:s,hiddenCaptures:a};if(l==="plugin"&&Bo(t,Wt`\(\?\(DEFINE\)`,en.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const u=[],f=Bo(t,Wt`\\[1-9]`,en.DEFAULT),h=new Map,c=[];let m=!1,v=0,g=0,y;for(Ui.lastIndex=0;y=Ui.exec(t);){const{0:b,groups:{captureName:E,rDepth:T,gRNameOrNum:O,gRDepth:L}}=y;if(b==="[")v++;else if(v)b==="]"&&v--;else if(T){if(_0(T),m)throw new Error(ld);if(f)throw new Error(`${l==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const A=t.slice(0,y.index),w=t.slice(Ui.lastIndex);if(Bo(w,qd,en.DEFAULT))throw new Error(ld);const z=+T-1;t=y0(A,w,z,!1,a,u,g),s=S0(s,A,z,u.length,0,g);break}else if(O){_0(L);let A=!1;for(const Q of c)if(Q.name===O||Q.num===+O){if(A=!0,Q.hasRecursedWithin)throw new Error(ld);break}if(!A)throw new Error(Wt`Recursive \g cannot be used outside the referenced group "${l==="external"?O:Wt`\g<${O}&R=${L}>`}"`);const w=h.get(O),z=RT(t,w);if(f&&Bo(z,Wt`${Ts}|\((?!\?)`,en.DEFAULT))throw new Error(`${l==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const V=t.slice(w,y.index),U=z.slice(V.length+b.length),j=u.length,ne=+L-1,W=y0(V,U,ne,!0,a,u,g);s=S0(s,V,ne,u.length-j,j,g);const F=t.slice(0,w),K=t.slice(w+z.length);t=`${F}${W}${K}`,Ui.lastIndex+=W.length-b.length-V.length-U.length,c.forEach(Q=>Q.hasRecursedWithin=!0),m=!0}else if(E)g++,h.set(String(g),Ui.lastIndex),h.set(E,Ui.lastIndex),c.push({num:g,name:E});else if(b[0]==="("){const A=b==="(";A&&(g++,h.set(String(g),Ui.lastIndex)),c.push(A?{num:g}:{})}else b===")"&&c.pop()}return a.push(...u),{pattern:t,captureTransfers:s,hiddenCaptures:a}}function _0(t){const n=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(n);if(t=+t,t<2||t>100)throw new Error(n)}function y0(t,n,a,l,s,u,f){const h=new Set;l&&m_(t+n,Ts,({groups:{captureName:m}})=>{h.add(m)},en.DEFAULT);const c=[a,l?h:null,s,u,f];return`${t}${b0(`(?:${t}`,"forward",...c)}(?:)${b0(`${n})`,"backward",...c)}${n}`}function b0(t,n,a,l,s,u,f){const c=v=>n==="forward"?v+2:a-v+2-1;let m="";for(let v=0;v<a;v++){const g=c(v);m+=pf(t,Wt`${v_}|\\k<(?<backref>[^>]+)>`,({0:y,groups:{captureName:b,unnamed:E,backref:T}})=>{if(T&&l&&!l.has(T))return y;const O=`_$${g}`;if(E||b){const L=f+u.length+1;return u.push(L),NT(s,L),E?y:`(?<${b}${O}>`}return Wt`\k<${T}${O}>`},en.DEFAULT)}return m}function NT(t,n){for(let a=0;a<t.length;a++)t[a]>=n&&t[a]++}function S0(t,n,a,l,s,u){if(t.size&&l){let f=0;m_(n,v_,()=>f++,en.DEFAULT);const h=u-f+s,c=new Map;return t.forEach((m,v)=>{const g=(l-f*a)/a,y=f*a,b=v>h+f?v+l:v,E=[];for(const T of m)if(T<=h)E.push(T);else if(T>h+f+g)E.push(T+l);else if(T<=h+f)for(let O=0;O<=a;O++)E.push(T+f*O);else for(let O=0;O<=a;O++)E.push(T+y+g*O);c.set(b,E)}),c}return t}var it=String.fromCodePoint,me=String.raw,cn={},xs=globalThis.RegExp;cn.flagGroups=(()=>{try{new xs("(?i:)")}catch{return!1}return!0})();cn.unicodeSets=(()=>{try{new xs("[[]]","v")}catch{return!1}return!0})();cn.bugFlagVLiteralHyphenIsRange=cn.unicodeSets?(()=>{try{new xs(me`[\d\-a]`,"v")}catch{return!0}return!1})():!1;cn.bugNestedClassIgnoresNegation=cn.unicodeSets&&new xs("[[^a]]","v").test("a");function ps(t,{enable:n,disable:a}){return{dotAll:!a?.dotAll&&!!(n?.dotAll||t.dotAll),ignoreCase:!a?.ignoreCase&&!!(n?.ignoreCase||t.ignoreCase)}}function ol(t,n,a){return t.has(n)||t.set(n,a),t.get(n)}function Fd(t,n){return E0[t]>=E0[n]}function IT(t,n){if(t==null)throw new Error(n??"Value expected");return t}var E0={ES2025:2025,ES2024:2024,ES2018:2018},zT={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function __(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!zT[t.target])throw new Error(`Unexpected target "${t.target}"`);const n={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return n.target==="auto"&&(n.target=cn.flagGroups?"ES2025":cn.unicodeSets?"ES2024":"ES2018"),n}var HT="[ -\r ]",UT=new Set([it(304),it(305)]),Vn=me`[\p{L}\p{M}\p{N}\p{Pc}]`;function y_(t){if(UT.has(t))return[t];const n=new Set,a=t.toLowerCase(),l=a.toUpperCase(),s=BT.get(a),u=PT.get(a),f=VT.get(a);return[...l].length===1&&n.add(l),f&&n.add(f),s&&n.add(s),n.add(a),u&&n.add(u),[...n]}var mf=new Map(`C Other
69
+ Cc Control cntrl
70
+ Cf Format
71
+ Cn Unassigned
72
+ Co Private_Use
73
+ Cs Surrogate
74
+ L Letter
75
+ LC Cased_Letter
76
+ Ll Lowercase_Letter
77
+ Lm Modifier_Letter
78
+ Lo Other_Letter
79
+ Lt Titlecase_Letter
80
+ Lu Uppercase_Letter
81
+ M Mark Combining_Mark
82
+ Mc Spacing_Mark
83
+ Me Enclosing_Mark
84
+ Mn Nonspacing_Mark
85
+ N Number
86
+ Nd Decimal_Number digit
87
+ Nl Letter_Number
88
+ No Other_Number
89
+ P Punctuation punct
90
+ Pc Connector_Punctuation
91
+ Pd Dash_Punctuation
92
+ Pe Close_Punctuation
93
+ Pf Final_Punctuation
94
+ Pi Initial_Punctuation
95
+ Po Other_Punctuation
96
+ Ps Open_Punctuation
97
+ S Symbol
98
+ Sc Currency_Symbol
99
+ Sk Modifier_Symbol
100
+ Sm Math_Symbol
101
+ So Other_Symbol
102
+ Z Separator
103
+ Zl Line_Separator
104
+ Zp Paragraph_Separator
105
+ Zs Space_Separator
106
+ ASCII
107
+ ASCII_Hex_Digit AHex
108
+ Alphabetic Alpha
109
+ Any
110
+ Assigned
111
+ Bidi_Control Bidi_C
112
+ Bidi_Mirrored Bidi_M
113
+ Case_Ignorable CI
114
+ Cased
115
+ Changes_When_Casefolded CWCF
116
+ Changes_When_Casemapped CWCM
117
+ Changes_When_Lowercased CWL
118
+ Changes_When_NFKC_Casefolded CWKCF
119
+ Changes_When_Titlecased CWT
120
+ Changes_When_Uppercased CWU
121
+ Dash
122
+ Default_Ignorable_Code_Point DI
123
+ Deprecated Dep
124
+ Diacritic Dia
125
+ Emoji
126
+ Emoji_Component EComp
127
+ Emoji_Modifier EMod
128
+ Emoji_Modifier_Base EBase
129
+ Emoji_Presentation EPres
130
+ Extended_Pictographic ExtPict
131
+ Extender Ext
132
+ Grapheme_Base Gr_Base
133
+ Grapheme_Extend Gr_Ext
134
+ Hex_Digit Hex
135
+ IDS_Binary_Operator IDSB
136
+ IDS_Trinary_Operator IDST
137
+ ID_Continue IDC
138
+ ID_Start IDS
139
+ Ideographic Ideo
140
+ Join_Control Join_C
141
+ Logical_Order_Exception LOE
142
+ Lowercase Lower
143
+ Math
144
+ Noncharacter_Code_Point NChar
145
+ Pattern_Syntax Pat_Syn
146
+ Pattern_White_Space Pat_WS
147
+ Quotation_Mark QMark
148
+ Radical
149
+ Regional_Indicator RI
150
+ Sentence_Terminal STerm
151
+ Soft_Dotted SD
152
+ Terminal_Punctuation Term
153
+ Unified_Ideograph UIdeo
154
+ Uppercase Upper
155
+ Variation_Selector VS
156
+ White_Space space
157
+ XID_Continue XIDC
158
+ XID_Start XIDS`.split(/\s/).map(t=>[As(t),t])),PT=new Map([["s",it(383)],[it(383),"s"]]),VT=new Map([[it(223),it(7838)],[it(107),it(8490)],[it(229),it(8491)],[it(969),it(8486)]]),BT=new Map([gi(453),gi(456),gi(459),gi(498),...od(8072,8079),...od(8088,8095),...od(8104,8111),gi(8124),gi(8140),gi(8188)]),GT=new Map([["alnum",me`[\p{Alpha}\p{Nd}]`],["alpha",me`\p{Alpha}`],["ascii",me`\p{ASCII}`],["blank",me`[\p{Zs}\t]`],["cntrl",me`\p{Cc}`],["digit",me`\p{Nd}`],["graph",me`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",me`\p{Lower}`],["print",me`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",me`[\p{P}\p{S}]`],["space",me`\p{space}`],["upper",me`\p{Upper}`],["word",me`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",me`\p{AHex}`]]);function jT(t,n){const a=[];for(let l=t;l<=n;l++)a.push(l);return a}function gi(t){const n=it(t);return[n.toLowerCase(),n]}function od(t,n){return jT(t,n).map(a=>gi(a))}var b_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function $T(t,n){const a={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...n};S_(t);const l={accuracy:a.accuracy,asciiWordBoundaries:a.asciiWordBoundaries,avoidSubclass:a.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Fd(a.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};el(t,qT,l);const s={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},u={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:l.subroutineRefMap};el(t,FT,u);const f={groupsByName:u.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:u.reffedNodesByReferencer};return el(t,YT,f),t._originMap=u.groupOriginByCopy,t._strategy=l.strategy,t}var qT={AbsenceFunction({node:t,parent:n,replaceWith:a}){const{body:l,kind:s}=t;if(s==="repeater"){const u=un();u.body[0].body.push(Vi({negate:!0,body:l}),Ua("Any"));const f=un();f.body[0].body.push(f_("greedy",0,1/0,u)),a(Xe(f,n),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:n,key:a},{flagDirectivesByAlt:l}){const s=t.body.filter(u=>u.kind==="flags");for(let u=a+1;u<n.body.length;u++){const f=n.body[u];ol(l,f,[]).push(...s)}},exit({node:t},{flagDirectivesByAlt:n}){if(n.get(t)?.length){const a=C_(n.get(t));if(a){const l=un({flags:a});l.body[0].body=t.body,t.body=[Xe(l,t)]}}}},Assertion({node:t,parent:n,key:a,container:l,root:s,remove:u,replaceWith:f},h){const{kind:c,negate:m}=t,{asciiWordBoundaries:v,avoidSubclass:g,supportedGNodes:y,wordIsAscii:b}=h;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${m?"Y":"y"}"`);if(c==="line_end")f(Xe(Vi({body:[Fi({body:[Gd("string_end")]}),Fi({body:[Cs(10)]})]}),n));else if(c==="line_start")f(Xe(Bn(me`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),n));else if(c==="search_start")if(y.has(t))s.flags.sticky=!0,u();else{const E=l[a-1];if(E&&JT(E))f(Xe(Vi({negate:!0}),n));else{if(g)throw new Error(me`Uses "\G" in a way that requires a subclass`);f(vi(Gd("string_start"),n)),h.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")f(Xe(Bn(me`(?=\n?\z)`),n));else if(c==="word_boundary"){if(!b&&!v){const E=`(?:(?<=${Vn})(?!${Vn})|(?<!${Vn})(?=${Vn}))`,T=`(?:(?<=${Vn})(?=${Vn})|(?<!${Vn})(?!${Vn}))`;f(Xe(Bn(m?T:E),n))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:t},{jsGroupNameMap:n}){let{ref:a}=t;typeof a=="string"&&!ud(a)&&(a=sd(a,n),t.ref=a)},CapturingGroup({node:t},{jsGroupNameMap:n,subroutineRefMap:a}){let{name:l}=t;l&&!ud(l)&&(l=sd(l,n),t.name=l),a.set(t.number,t),l&&a.set(l,t)},CharacterClassRange({node:t,parent:n,replaceWith:a}){if(n.kind==="intersection"){const l=ts({body:[t]});a(Xe(l,n),{traverse:!0})}},CharacterSet({node:t,parent:n,replaceWith:a},{accuracy:l,minTargetEs2024:s,digitIsAscii:u,spaceIsAscii:f,wordIsAscii:h}){const{kind:c,negate:m,value:v}=t;if(u&&(c==="digit"||v==="digit")){a(vi($d("digit",{negate:m}),n));return}if(f&&(c==="space"||v==="space")){a(Xe(cd(Bn(HT),m),n));return}if(h&&(c==="word"||v==="word")){a(vi($d("word",{negate:m}),n));return}if(c==="any")a(vi(Ua("Any"),n));else if(c==="digit")a(vi(Ua("Nd",{negate:m}),n));else if(c!=="dot")if(c==="text_segment"){if(l==="strict")throw new Error(me`Use of "\X" requires non-strict accuracy`);const g="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",y=me`\p{RI}{2}|${g}(?:\u200D${g})*`;a(Xe(Bn(me`(?>\r\n|${s?me`\p{RGI_Emoji}`:y}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),n))}else if(c==="hex")a(vi(Ua("AHex",{negate:m}),n));else if(c==="newline")a(Xe(Bn(m?`[^
159
+ ]`:`(?>\r
160
+ ?|[
161
+ \v\f…\u2028\u2029])`),n));else if(c==="posix")if(!s&&(v==="graph"||v==="print")){if(l==="strict")throw new Error(`POSIX class "${v}" requires min target ES2024 or non-strict accuracy`);let g={graph:"!-~",print:" -~"}[v];m&&(g=`\0-${it(g.codePointAt(0)-1)}${it(g.codePointAt(2)+1)}-􏿿`),a(Xe(Bn(`[${g}]`),n))}else a(Xe(cd(Bn(GT.get(v)),m),n));else if(c==="property")mf.has(As(v))||(t.key="sc");else if(c==="space")a(vi(Ua("space",{negate:m}),n));else if(c==="word")a(Xe(cd(Bn(Vn),m),n));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:t,parent:n,root:a,remove:l,replaceWith:s,removeAllPrevSiblings:u,removeAllNextSiblings:f}){const{kind:h,flags:c}=t;if(h==="flags")if(!c.enable&&!c.disable)l();else{const m=un({flags:c});m.body[0].body=f(),s(Xe(m,n),{traverse:!0})}else if(h==="keep"){const m=a.body[0],g=a.body.length===1&&u_(m,{type:"Group"})&&m.body[0].body.length===1?m.body[0]:a;if(n.parent!==g||g.body.length>1)throw new Error(me`Uses "\K" in a way that's unsupported`);const y=Vi({behind:!0});y.body[0].body=u(),s(Xe(y,n))}else throw new Error(`Unexpected directive kind "${h}"`)},Flags({node:t,parent:n}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(a=>delete t[a]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),n.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;const{enable:n,disable:a}=t.flags;n?.extended&&delete n.extended,a?.extended&&delete a.extended,n?.dotAll&&a?.dotAll&&delete n.dotAll,n?.ignoreCase&&a?.ignoreCase&&delete n.ignoreCase,n&&!Object.keys(n).length&&delete t.flags.enable,a&&!Object.keys(a).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},n){const{kind:a}=t;a==="lookbehind"&&(n.passedLookbehind=!0)},NamedCallout({node:t,parent:n,replaceWith:a}){const{kind:l}=t;if(l==="fail")a(Xe(Vi({negate:!0}),n));else throw new Error(`Unsupported named callout "(*${l.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){const n=un();n.body[0].body.push(t.body),t.body=Xe(n,t)}},Regex:{enter({node:t},{supportedGNodes:n}){const a=[];let l=!1,s=!1;for(const u of t.body)if(u.body.length===1&&u.body[0].kind==="search_start")u.body.pop();else{const f=T_(u.body);f?(l=!0,Array.isArray(f)?a.push(...f):a.push(f)):s=!0}l&&!s&&a.forEach(u=>n.add(u))},exit(t,{accuracy:n,passedLookbehind:a,strategy:l}){if(n==="strict"&&a&&l)throw new Error(me`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:n}){let{ref:a}=t;typeof a=="string"&&!ud(a)&&(a=sd(a,n),t.ref=a)}},FT={Backreference({node:t},{multiplexCapturesToLeftByRef:n,reffedNodesByReferencer:a}){const{orphan:l,ref:s}=t;l||a.set(t,[...n.get(s).map(({node:u})=>u)])},CapturingGroup:{enter({node:t,parent:n,replaceWith:a,skip:l},{groupOriginByCopy:s,groupsByName:u,multiplexCapturesToLeftByRef:f,openRefs:h,reffedNodesByReferencer:c}){const m=s.get(t);if(m&&h.has(t.number)){const g=vi(C0(t.number),n);c.set(g,h.get(t.number)),a(g);return}h.set(t.number,t),f.set(t.number,[]),t.name&&ol(f,t.name,[]);const v=f.get(t.name??t.number);for(let g=0;g<v.length;g++){const y=v[g];if(m===y.node||m&&m===y.origin||t===y.origin){v.splice(g,1);break}}if(f.get(t.number).push({node:t,origin:m}),t.name&&f.get(t.name).push({node:t,origin:m}),t.name){const g=ol(u,t.name,new Map);let y=!1;if(m)y=!0;else for(const b of g.values())if(!b.hasDuplicateNameToRemove){y=!0;break}u.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:y})}},exit({node:t},{openRefs:n}){n.get(t.number)===t&&n.delete(t.number)}},Group:{enter({node:t},n){n.prevFlags=n.currentFlags,t.flags&&(n.currentFlags=ps(n.currentFlags,t.flags))},exit(t,n){n.currentFlags=n.prevFlags}},Subroutine({node:t,parent:n,replaceWith:a},l){const{isRecursive:s,ref:u}=t;if(s){let v=n;for(;(v=v.parent)&&!(v.type==="CapturingGroup"&&(v.name===u||v.number===u)););l.reffedNodesByReferencer.set(t,v);return}const f=l.subroutineRefMap.get(u),h=u===0,c=h?C0(0):E_(f,l.groupOriginByCopy,null);let m=c;if(!h){const v=C_(ZT(f,y=>y.type==="Group"&&!!y.flags)),g=v?ps(l.globalFlags,v):l.globalFlags;XT(g,l.currentFlags)||(m=un({flags:KT(g)}),m.body[0].body.push(c))}a(Xe(m,n),{traverse:!h})}},YT={Backreference({node:t,parent:n,replaceWith:a},l){if(t.orphan){l.highestOrphanBackref=Math.max(l.highestOrphanBackref,t.ref);return}const u=l.reffedNodesByReferencer.get(t).filter(f=>QT(f,t));if(!u.length)a(Xe(Vi({negate:!0}),n));else if(u.length>1){const f=un({atomic:!0,body:u.reverse().map(h=>Fi({body:[jd(h.number)]}))});a(Xe(f,n))}else t.ref=u[0].number},CapturingGroup({node:t},n){t.number=++n.numCapturesToLeft,t.name&&n.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},n){const a=Math.max(n.highestOrphanBackref-n.numCapturesToLeft,0);for(let l=0;l<a;l++){const s=d_();t.body.at(-1).body.push(s)}}},Subroutine({node:t},n){!t.isRecursive||t.ref===0||(t.ref=n.reffedNodesByReferencer.get(t).number)}};function S_(t){el(t,{"*"({node:n,parent:a}){n.parent=a}})}function XT(t,n){return t.dotAll===n.dotAll&&t.ignoreCase===n.ignoreCase}function QT(t,n){let a=n;do{if(a.type==="Regex")return!1;if(a.type==="Alternative")continue;if(a===t)return!1;const l=A_(a.parent);for(const s of l){if(s===a)break;if(s===t||x_(s,t))return!0}}while(a=a.parent);throw new Error("Unexpected path")}function E_(t,n,a,l){const s=Array.isArray(t)?[]:{};for(const[u,f]of Object.entries(t))u==="parent"?s.parent=Array.isArray(a)?l:a:f&&typeof f=="object"?s[u]=E_(f,n,s,a):(u==="type"&&f==="CapturingGroup"&&n.set(s,n.get(t)??t),s[u]=f);return s}function C0(t){const n=h_(t);return n.isRecursive=!0,n}function ZT(t,n){const a=[];for(;t=t.parent;)(!n||n(t))&&a.push(t);return a}function sd(t,n){if(n.has(t))return n.get(t);const a=`$${n.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return n.set(t,a),a}function C_(t){const n=["dotAll","ignoreCase"],a={enable:{},disable:{}};return t.forEach(({flags:l})=>{n.forEach(s=>{l.enable?.[s]&&(delete a.disable[s],a.enable[s]=!0),l.disable?.[s]&&(a.disable[s]=!0)})}),Object.keys(a.enable).length||delete a.enable,Object.keys(a.disable).length||delete a.disable,a.enable||a.disable?a:null}function KT({dotAll:t,ignoreCase:n}){const a={};return(t||n)&&(a.enable={},t&&(a.enable.dotAll=!0),n&&(a.enable.ignoreCase=!0)),(!t||!n)&&(a.disable={},!t&&(a.disable.dotAll=!0),!n&&(a.disable.ignoreCase=!0)),a}function A_(t){if(!t)throw new Error("Node expected");const{body:n}=t;return Array.isArray(n)?n:n?[n]:null}function T_(t){const n=t.find(a=>a.kind==="search_start"||ex(a,{negate:!1})||!WT(a));if(!n)return null;if(n.kind==="search_start")return n;if(n.type==="LookaroundAssertion")return n.body[0].body[0];if(n.type==="CapturingGroup"||n.type==="Group"){const a=[];for(const l of n.body){const s=T_(l.body);if(!s)return null;Array.isArray(s)?a.push(...s):a.push(s)}return a}return null}function x_(t,n){const a=A_(t)??[];for(const l of a)if(l===n||x_(l,n))return!0;return!1}function WT({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function JT(t){const n=["Character","CharacterClass","CharacterSet"];return n.includes(t.type)||t.type==="Quantifier"&&t.min&&n.includes(t.body.type)}function ex(t,n){const a={negate:null,...n};return t.type==="LookaroundAssertion"&&(a.negate===null||t.negate===a.negate)&&t.body.length===1&&u_(t.body[0],{type:"Assertion",kind:"search_start"})}function ud(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function Bn(t,n){const l=c_(t,{...n,unicodePropertyMap:mf}).body;return l.length>1||l[0].body.length>1?un({body:l}):l[0].body[0]}function cd(t,n){return t.negate=n,t}function vi(t,n){return t.parent=n,t}function Xe(t,n){return S_(t),t.parent=n,t}function tx(t,n){const a=__(n),l=Fd(a.target,"ES2024"),s=Fd(a.target,"ES2025"),u=a.rules.recursionLimit;if(!Number.isInteger(u)||u<2||u>20)throw new Error("Invalid recursionLimit; use 2-20");let f=null,h=null;if(!s){const b=[t.flags.ignoreCase];el(t,nx,{getCurrentModI:()=>b.at(-1),popModI(){b.pop()},pushModI(E){b.push(E)},setHasCasedChar(){b.at(-1)?f=!0:h=!0}})}const c={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||f)&&!h)};let m=t;const v={accuracy:a.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:m,originMap:t._originMap,recursionLimit:u,useAppliedIgnoreCase:!!(!s&&f&&h),useFlagMods:s,useFlagV:l,verbose:a.verbose};function g(b){return v.lastNode=m,m=b,IT(ix[b.type],`Unexpected node type "${b.type}"`)(b,v,g)}const y={pattern:t.body.map(g).join("|"),flags:g(t.flags),options:{...t.options}};return l||(delete y.options.force.v,y.options.disable.v=!0,y.options.unicodeSetsPlugin=null),y._captureTransfers=new Map,y._hiddenCaptures=[],v.captureMap.forEach((b,E)=>{b.hidden&&y._hiddenCaptures.push(E),b.transferTo&&ol(y._captureTransfers,b.transferTo,[]).push(E)}),y}var nx={"*":{enter({node:t},n){if(T0(t)){const a=n.getCurrentModI();n.pushModI(t.flags?ps({ignoreCase:a},t.flags).ignoreCase:a)}},exit({node:t},n){T0(t)&&n.popModI()}},Backreference(t,n){n.setHasCasedChar()},Character({node:t},n){gf(it(t.value))&&n.setHasCasedChar()},CharacterClassRange({node:t,skip:n},a){n(),L_(t,{firstOnly:!0}).length&&a.setHasCasedChar()},CharacterSet({node:t},n){t.kind==="property"&&b_.has(t.value)&&n.setHasCasedChar()}},ix={Alternative({body:t},n,a){return t.map(a).join("")},Assertion({kind:t,negate:n}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return n?me`\B`:me`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},n){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!n.useFlagMods&&n.accuracy==="strict"&&n.currentFlags.ignoreCase&&!n.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,n,a){const{body:l,name:s,number:u}=t,f={ignoreCase:n.currentFlags.ignoreCase},h=n.originMap.get(t);return h&&(f.hidden=!0,u>h.number&&(f.transferTo=h.number)),n.captureMap.set(u,f),`(${s?`?<${s}>`:""}${l.map(a).join("|")})`},Character({value:t},n){const a=it(t),l=Na(t,{escDigit:n.lastNode.type==="Backreference",inCharClass:n.inCharClass,useFlagV:n.useFlagV});if(l!==a)return l;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase&&gf(a)){const s=y_(a);return n.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return a},CharacterClass(t,n,a){const{kind:l,negate:s,parent:u}=t;let{body:f}=t;if(l==="intersection"&&!n.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");cn.bugFlagVLiteralHyphenIsRange&&n.useFlagV&&f.some(x0)&&(f=[Cs(45),...f.filter(m=>!x0(m))]);const h=()=>`[${s?"^":""}${f.map(a).join(l==="intersection"?"&&":"")}]`;if(!n.inCharClass){if((!n.useFlagV||cn.bugNestedClassIgnoresNegation)&&!s){const v=f.filter(g=>g.type==="CharacterClass"&&g.kind==="union"&&g.negate);if(v.length){const g=un(),y=g.body[0];return g.parent=u,y.parent=g,f=f.filter(b=>!v.includes(b)),t.body=f,f.length?(t.parent=y,y.body.push(t)):g.body.pop(),v.forEach(b=>{const E=Fi({body:[b]});b.parent=E,E.parent=g,g.body.push(E)}),a(g)}}n.inCharClass=!0;const m=h();return n.inCharClass=!1,m}const c=f[0];if(l==="union"&&!s&&c&&((!n.useFlagV||!n.verbose)&&u.kind==="union"&&!(cn.bugFlagVLiteralHyphenIsRange&&n.useFlagV)||!n.verbose&&u.kind==="intersection"&&f.length===1&&c.type!=="CharacterClassRange"))return f.map(a).join("");if(!n.useFlagV&&u.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return h()},CharacterClassRange(t,n){const a=t.min.value,l=t.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:n.useFlagV},u=Na(a,s),f=Na(l,s),h=new Set;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase){const c=L_(t);sx(c).forEach(v=>{h.add(Array.isArray(v)?`${Na(v[0],s)}-${Na(v[1],s)}`:Na(v,s))})}return`${u}-${f}${[...h].join("")}`},CharacterSet({kind:t,negate:n,value:a,key:l},s){if(t==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":me`[^\n]`;if(t==="digit")return n?me`\D`:me`\d`;if(t==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&b_.has(a))throw new Error(`Unicode property "${a}" can't be case-insensitive when other chars have specific case`);return`${n?me`\P`:me`\p`}{${l?`${l}=`:""}${a}}`}if(t==="word")return n?me`\W`:me`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,n){return(n.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:n,flags:a,parent:l},s,u){const f=s.currentFlags;a&&(s.currentFlags=ps(f,a));const h=n.map(u).join("|"),c=!s.verbose&&n.length===1&&l.type!=="Quantifier"&&!t&&(!s.useFlagMods||!a)?h:`(?${ux(t,a,s.useFlagMods)}${h})`;return s.currentFlags=f,c},LookaroundAssertion({body:t,kind:n,negate:a},l,s){return`(?${`${n==="lookahead"?"":"<"}${a?"!":"="}`}${t.map(s).join("|")})`},Quantifier(t,n,a){return a(t.body)+cx(t)},Subroutine({isRecursive:t,ref:n},a){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");const l=a.recursionLimit;return n===0?`(?R=${l})`:me`\g<${n}&R=${l}>`}},ax=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),rx=new Set(["-","\\","]","^","["]),lx=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),A0=new Map([[9,me`\t`],[10,me`\n`],[11,me`\v`],[12,me`\f`],[13,me`\r`],[8232,me`\u2028`],[8233,me`\u2029`],[65279,me`\uFEFF`]]),ox=new RegExp("^\\p{Cased}$","u");function gf(t){return ox.test(t)}function L_(t,n){const a=!!n?.firstOnly,l=t.min.value,s=t.max.value,u=[];if(l<65&&(s===65535||s>=131071)||l===65536&&s>=131071)return u;for(let f=l;f<=s;f++){const h=it(f);if(!gf(h))continue;const c=y_(h).filter(m=>{const v=m.codePointAt(0);return v<l||v>s});if(c.length&&(u.push(...c),a))break}return u}function Na(t,{escDigit:n,inCharClass:a,useFlagV:l}){if(A0.has(t))return A0.get(t);if(t<32||t>126&&t<160||t>262143||n&&dx(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;const s=a?l?lx:rx:ax,u=it(t);return(s.has(u)?"\\":"")+u}function sx(t){const n=t.map(s=>s.codePointAt(0)).sort((s,u)=>s-u),a=[];let l=null;for(let s=0;s<n.length;s++)n[s+1]===n[s]+1?l??=n[s]:l===null?a.push(n[s]):(a.push([l,n[s]]),l=null);return a}function ux(t,n,a){if(t)return">";let l="";if(n&&a){const{enable:s,disable:u}=n;l=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(u?"-":"")+(u?.ignoreCase?"i":"")+(u?.dotAll?"s":"")}return`${l}:`}function cx({kind:t,max:n,min:a}){let l;return!a&&n===1?l="?":!a&&n===1/0?l="*":a===1&&n===1/0?l="+":a===n?l=`{${a}}`:l=`{${a},${n===1/0?"":n}}`,l+{greedy:"",lazy:"?",possessive:"+"}[t]}function T0({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function dx(t){return t>47&&t<58}function x0({type:t,value:n}){return t==="Character"&&n===45}var fx=class Yd extends RegExp{#t=new Map;#e=null;#i;#n=null;#a=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(n,a,l){const s=!!l?.lazyCompile;if(n instanceof RegExp){if(l)throw new Error("Cannot provide options when copying a regexp");const u=n;super(u,a),this.#i=u.source,u instanceof Yd&&(this.#t=u.#t,this.#n=u.#n,this.#a=u.#a,this.rawOptions=u.rawOptions)}else{const u={hiddenCaptures:[],strategy:null,transfers:[],...l};super(s?"":n,a),this.#i=n,this.#t=px(u.hiddenCaptures,u.transfers),this.#a=u.strategy,this.rawOptions=l??{}}s||(this.#e=this)}exec(n){if(!this.#e){const{lazyCompile:s,...u}=this.rawOptions;this.#e=new Yd(this.#i,this.flags,u)}const a=this.global||this.sticky,l=this.lastIndex;if(this.#a==="clip_search"&&a&&l){this.lastIndex=0;const s=this.#r(n.slice(l));return s&&(hx(s,l,n,this.hasIndices),this.lastIndex+=l),s}return this.#r(n)}#r(n){this.#e.lastIndex=this.lastIndex;const a=super.exec.call(this.#e,n);if(this.lastIndex=this.#e.lastIndex,!a||!this.#t.size)return a;const l=[...a];a.length=1;let s;this.hasIndices&&(s=[...a.indices],a.indices.length=1);const u=[0];for(let f=1;f<l.length;f++){const{hidden:h,transferTo:c}=this.#t.get(f)??{};if(h?u.push(null):(u.push(a.length),a.push(l[f]),this.hasIndices&&a.indices.push(s[f])),c&&l[f]!==void 0){const m=u[c];if(!m)throw new Error(`Invalid capture transfer to "${m}"`);if(a[m]=l[f],this.hasIndices&&(a.indices[m]=s[f]),a.groups){this.#n||(this.#n=mx(this.source));const v=this.#n.get(c);v&&(a.groups[v]=l[f],this.hasIndices&&(a.indices.groups[v]=s[f]))}}}return a}};function hx(t,n,a,l){if(t.index+=n,t.input=a,l){const s=t.indices;for(let f=0;f<s.length;f++){const h=s[f];h&&(s[f]=[h[0]+n,h[1]+n])}const u=s.groups;u&&Object.keys(u).forEach(f=>{const h=u[f];h&&(u[f]=[h[0]+n,h[1]+n])})}}function px(t,n){const a=new Map;for(const l of t)a.set(l,{hidden:!0});for(const[l,s]of n)for(const u of s)ol(a,u,{}).transferTo=l;return a}function mx(t){const n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,a=new Map;let l=0,s=0,u;for(;u=n.exec(t);){const{0:f,groups:{capture:h,name:c}}=u;f==="["?l++:l?f==="]"&&l--:h&&(s++,c&&a.set(s,c))}return a}function gx(t,n){const a=vx(t,n);return a.options?new fx(a.pattern,a.flags,a.options):new RegExp(a.pattern,a.flags)}function vx(t,n){const a=__(n),l=c_(t,{flags:a.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:a.rules.captureGroup,singleline:a.rules.singleline},skipBackrefValidation:a.rules.allowOrphanBackrefs,unicodePropertyMap:mf}),s=$T(l,{accuracy:a.accuracy,asciiWordBoundaries:a.rules.asciiWordBoundaries,avoidSubclass:a.avoidSubclass,bestEffortTarget:a.target}),u=tx(s,a),f=MT(u.pattern,{captureTransfers:u._captureTransfers,hiddenCaptures:u._hiddenCaptures,mode:"external"}),h=DT(f.pattern),c=kT(h.pattern,{captureTransfers:f.captureTransfers,hiddenCaptures:f.hiddenCaptures}),m={pattern:c.pattern,flags:`${a.hasIndices?"d":""}${a.global?"g":""}${u.flags}${u.options.disable.v?"u":"v"}`};if(a.avoidSubclass){if(a.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const v=c.hiddenCaptures.sort((E,T)=>E-T),g=Array.from(c.captureTransfers),y=s._strategy,b=m.pattern.length>=a.lazyCompileLength;(v.length||g.length||y||b)&&(m.options={...v.length&&{hiddenCaptures:v},...g.length&&{transfers:g},...y&&{strategy:y},...b&&{lazyCompile:b}})}return m}function _x(t,n){return gx(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...n})}function yx(t={}){const n={target:"auto",cache:new Map,...t};return n.regexConstructor||=a=>_x(a,{target:n.target}),{createScanner(a){return new NA(a,n)},createString(a){return{content:a}}}}async function bx(t){if(Cv())throw new Error(`resolveLanguage("${t}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const n=Wc.get(t);if(n!=null)return n;try{let a=AE.get(t);if(a==null&&Object.prototype.hasOwnProperty.call(Od,t)&&(a=Od[t]),a==null)throw new Error(`resolveLanguage: "${t}" not found in bundled or custom languages`);const l=a().then(({default:s})=>{const u={name:t,data:s};return nl.has(t)||nl.set(t,u),u});return Wc.set(t,l),await l}finally{Wc.delete(t)}}function Sx(t){return nl.get(t)??bx(t)}const Xd=new Set;function sl(t){const n=[],a=new Set;for(const g of Ex(t.themes)){const y=w_(g)?g.getThemes():[g];for(const b of y){if(a.has(b.name))throw new Error(`Theme collection already contains theme "${b.name}"`);a.add(b.name),n.push(b)}}const l=Object.freeze([...n]),s=Object.freeze(l.filter(g=>g.colorScheme==="light")),u=Object.freeze(l.filter(g=>g.colorScheme==="dark")),f=new Map(l.map(g=>[g.name,g])),h=Object.freeze(l.map(g=>g.name)),c=Object.freeze(s.map(g=>g.name)),m=Object.freeze(u.map(g=>g.name));function v(g){if(g==null)return l;const{colorScheme:y,collection:b}=g;return b==null?y==="light"?s:y==="dark"?u:l:l.filter(E=>E.collection!==b?!1:y==null||E.colorScheme===y)}return{getTheme(g){return f.get(g)},getThemes(g){return v(g)},getThemeNames(g){return g?.collection==null?g?.colorScheme==="light"?c:g?.colorScheme==="dark"?m:h:v(g).map(y=>y.name)},hasTheme(g){return f.has(g)},orderBy(g){return sl({themes:l.map((y,b)=>({descriptor:y,index:b})).sort((y,b)=>{const E=g(y.descriptor,b.descriptor);return E!==0?E:y.index-b.index}).map(y=>y.descriptor)})},pick(g){const y=[],b=new Set;for(const E of g){if(b.has(E))throw new Error(`Theme collection pick already includes theme "${E}"`);b.add(E);const T=f.get(E);if(T==null)throw new Error(`Theme collection does not contain theme "${E}"`);y.push(T)}return sl({themes:y})},registerInto(g){for(const y of l)g.registerThemeIfAbsent(y.name,y.load)}}}function Ex(t){return Cx(t)?[t]:t}function Cx(t){return w_(t)||Ax(t)}function Ax(t){return typeof t.name=="string"&&typeof t.load=="function"}function w_(t){return typeof t.getThemes=="function"}function R_(t){return t!==null&&typeof t=="object"&&"default"in t?t.default:t}var Tx=class extends Error{constructor(t){super(`Theme "${t}" is already registered`),this.name="DuplicateThemeError"}},xx=class extends Error{constructor(t){super(`No loader registered for theme "${t}"`),this.name="UnregisteredThemeError"}},Lx=class extends Error{constructor(t){super(`Theme "${t}" has not been resolved`),this.name="UnresolvedThemeError"}};function wx(){const t=new Map,n=new Map,a=new Map;let l=0;function s(L,A){if(t.has(L))throw new Tx(L);t.set(L,A)}function u(L,A){return t.has(L)?!1:(t.set(L,A),!0)}function f(L){return t.has(L)}function h(L){const A=n.get(L);if(A!==void 0)return Promise.resolve(A);const w=a.get(L);if(w!==void 0)return w;const z=t.get(L);if(z===void 0)return Promise.reject(new xx(L));const V=l,U=z().then(j=>{const ne=R_(j);return V===l&&n.set(L,ne),a.get(L)===U&&a.delete(L),ne}).catch(j=>{throw a.get(L)===U&&a.delete(L),j});return a.set(L,U),U}function c(L){return Promise.all(L.map(A=>h(A)))}function m(L,A){n.set(L,A)}function v(L){for(const[A,w]of L)m(A,w)}function g(L){return n.get(L)}function y(L){const A=[];for(const w of L){const z=n.get(w);if(z===void 0)throw new Lx(w);A.push(z)}return A}function b(L){return n.has(L)}function E(L){for(const A of L)if(!n.has(A))return!1;return!0}function T(L){const A=n.get(L);return A!==void 0?A:h(L)}function O(){l++,n.clear(),a.clear()}return{clearResolvedThemes:O,getResolvedOrResolveTheme:T,getResolvedTheme:g,getResolvedThemes:y,hasRegisteredTheme:f,hasResolvedTheme:b,hasResolvedThemes:E,registerTheme:s,registerThemeIfAbsent:u,resolveTheme:h,resolveThemes:c,seedResolvedTheme:m,seedResolvedThemes:v}}const yi=wx();function L0(t,n){t=Array.isArray(t)?t:[t];for(let a of t){let l;if(typeof a=="string"){if(l=yi.getResolvedTheme(a),l==null)throw new Error(`loadResolvedThemes: ${a} is not resolved, you must resolve it before calling loadResolvedThemes`)}else l=a,a=a.name,yi.getResolvedTheme(a)==null&&yi.seedResolvedTheme(a,l);Xd.has(a)||(Xd.add(a),n.loadThemeSync(l))}}function k_({name:t,load:n,colorScheme:a,collection:l,displayName:s}){return{name:t,colorScheme:a,collection:l,displayName:s,load:Rx(n)}}function Rx(t){return async()=>bs(R_(await t()))}const kx="pierre",Dx=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],D_=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Ox=[...D_,...Dx],Mx=new Set(D_);function Nx(t){return Mx.has(t)?"light":"dark"}const Ix={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},zx={"pierre-dark":()=>S(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>S(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>S(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>S(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>S(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>S(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>S(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>S(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>S(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>S(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function Hx(t){return k_({name:t,collection:kx,colorScheme:Nx(t),displayName:Ix[t],load:zx[t]})}const O_=sl({themes:Ox.map(t=>Hx(t))}),Ux="shiki",M_=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],Px=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],Vx=new Set(M_);function Bx(t){return Vx.has(t)?"light":"dark"}const Gx={andromeeda:()=>S(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>S(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>S(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>S(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>S(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>S(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]),"catppuccin-latte":()=>S(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]),"catppuccin-macchiato":()=>S(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]),"catppuccin-mocha":()=>S(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]),"dark-plus":()=>S(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>S(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>S(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>S(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>S(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>S(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>S(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>S(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>S(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>S(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>S(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>S(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>S(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>S(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>S(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>S(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>S(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>S(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>S(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>S(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>S(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>S(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]),"kanagawa-lotus":()=>S(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]),"kanagawa-wave":()=>S(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]),laserwave:()=>S(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>S(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>S(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>S(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>S(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>S(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>S(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>S(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>S(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>S(()=>import("./monokai-BRVnQi9A.js"),[]),"night-owl":()=>S(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>S(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>S(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>S(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>S(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>S(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>S(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>S(()=>import("./red-hvxz__6c.js"),[]),"rose-pine":()=>S(()=>import("./rose-pine-5qJOZa0Y.js"),[]),"rose-pine-dawn":()=>S(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]),"rose-pine-moon":()=>S(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]),"slack-dark":()=>S(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>S(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>S(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>S(()=>import("./solarized-dark-CpvCGNkr.js"),[]),"solarized-light":()=>S(()=>import("./solarized-light-Dlz6yCKv.js"),[]),"synthwave-84":()=>S(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>S(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>S(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>S(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>S(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>S(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function w0(t){return k_({name:t,collection:Ux,colorScheme:Bx(t),load:Gx[t]})}const N_=sl({themes:Object.freeze([...M_.map(t=>w0(t)),...Px.map(t=>w0(t))])});sl({themes:[O_,N_]});function jx(t){if(Cv())throw new Error(`Theme "${t}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(yi.hasRegisteredTheme(t))return;const n=N_.getTheme(t);if(n!=null){yi.registerThemeIfAbsent(n.name,n.load);return}throw new Error(`No valid theme loader registered for "${t}"`)}function $x(t,n){if(n.name!==t)throw new Error(`resolvedTheme: themeName: ${t} does not match theme.name: ${n.name}`)}async function qx(t){jx(t);const n=await yi.resolveTheme(t);return $x(t,n),n}function Fx(t){return yi.getResolvedTheme(t)??qx(t)}let _n;async function Yx({themes:t,langs:n,preferredHighlighter:a="shiki-js"}){_n??=MA({themes:[],langs:["text"],engine:a==="shiki-wasm"?wv(S(()=>import("./wasm-CG6Dc4jp.js"),[])):yx()});const l=Qx(_n)?await _n:_n;_n=l;const s=[];for(const f of n){if(f==="text"||f==="ansi")continue;const h=Sx(f);"then"in h?s.push(h):$g(h,l)}const u=[];for(const f of t){const h=Fx(f);"then"in h?u.push(h):L0(h,_n)}return(s.length>0||u.length>0)&&await Promise.all([Promise.all(s).then(f=>{$g(f,l)}),Promise.all(u).then(f=>{L0(f,l)})]),l}function Xx(){if(_n!=null&&!("then"in _n))return _n}function Qx(t=_n){return t!=null&&"then"in t}for(const t of O_.getThemes())yi.registerThemeIfAbsent(t.name,t.load);function I_(t=Jt){const n=[];return typeof t=="string"?n.push(t):(n.push(t.dark),n.push(t.light)),n}function dd(t){for(const n of I_(t))if(!Xd.has(n))return!1;return!0}function R0(t,n){return t?.cacheKey===n?.cacheKey&&t?.contents===n?.contents&&t?.name===n?.name&&t?.lang===n?.lang}function z_(t,n){return t==null||n==null?t===n:t.startingLine===n.startingLine&&t.totalLines===n.totalLines&&t.bufferBefore===n.bufferBefore&&t.bufferAfter===n.bufferAfter}function Zx(t){return ye({tagName:"div",children:[ye({tagName:"div",children:t.annotations?.map(n=>ye({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${t.hunkIndex},${t.lineIndex}`}})}function Kx(t){switch(t){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Wx({fileOrDiff:t,mode:n,stickyHeader:a}){const l="type"in t?t:void 0,s={"data-diffs-header":n,"data-change-type":l?.type,"data-sticky":a?"":void 0};return ye({tagName:"div",children:[n==="custom"?ye({tagName:"slot",properties:{name:af}}):Jx({name:t.name,prevName:"prevName"in t?t.prevName:void 0,iconType:l?.type??"file"}),...n==="custom"?[]:[eL(l)]],properties:s})}function Jx({name:t,prevName:n,iconType:a}){const l=[ye({tagName:"slot",properties:{name:lv}}),is({name:Kx(a),properties:{"data-change-icon":a}})];return n!=null&&(l.push(ye({tagName:"div",children:[ye({tagName:"bdi",children:[yn(n)]})],properties:{"data-prev-name":""}})),l.push(is({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),l.push(ye({tagName:"div",children:[ye({tagName:"bdi",children:[yn(t)]})],properties:{"data-title":""}})),ye({tagName:"div",children:l,properties:{"data-header-content":""}})}function eL(t){const n=[];if(t!=null){let a=0,l=0;for(const s of t.hunks)a+=s.additionLines,l+=s.deletionLines;(l>0||a===0)&&n.push(ye({tagName:"span",children:[yn(`-${l}`)],properties:{"data-deletions-count":""}})),(a>0||l===0)&&n.push(ye({tagName:"span",children:[yn(`+${a}`)],properties:{"data-additions-count":""}}))}return n.push(ye({tagName:"slot",properties:{name:ov}})),ye({tagName:"div",children:n,properties:{"data-metadata":""}})}function tL(t){return ye({tagName:"pre",properties:nL(t)})}function nL({diffIndicators:t,disableBackground:n,disableLineNumbers:a,overflow:l,split:s,totalLines:u,type:f,customProperties:h}){return{...h,"data-diff":f==="diff"?"":void 0,"data-file":f==="file"?"":void 0,"data-diff-type":f==="diff"?s?"split":"single":void 0,"data-overflow":l,"data-disable-line-numbers":a?"":void 0,"data-background":n?void 0:"","data-indicators":t==="bars"||t==="classic"?t:void 0,style:`--diffs-min-number-column-width-default:${`${u}`.length}ch;`}}const Ia=new Map,$r={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function qi(t){if(Ia.has(t))return Ia.get(t)??"text";if($r[t]!=null)return $r[t];const n=t.match(/\.([^/\\]+\.[^/\\]+)$/);if(n!=null){if(Ia.has(n[1]))return Ia.get(n[1])??"text";if($r[n[1]]!=null)return $r[n[1]]??"text"}const a=t.match(/\.([^.]+)$/)?.[1]??"";return Ia.has(a)?Ia.get(a)??"text":$r[a]??"text"}function iL(t,{theme:n,preferredHighlighter:a="shiki-js"}){return{langs:[t??"text"],themes:I_(n),preferredHighlighter:a}}function ja(t){return`annotation-${"side"in t?`${t.side}-`:""}${t.lineNumber}`}function $a(t){return t.replace(/\n$|\r\n$/,"")}function aL(t,n,a){const l=typeof a.lineInfo=="function"?a.lineInfo(n):a.lineInfo[n-1];if(l==null){const s=`processLine: line ${n}, contains no state.lineInfo`;throw console.error(s,{node:t,line:n,state:a}),new Error(s)}return t.tagName="div",t.properties["data-line"]=l.lineNumber,t.properties["data-alt-line"]=l.altLineNumber,t.properties["data-line-type"]=l.type,t.properties["data-line-index"]=l.lineIndex,t.children.length===0&&t.children.push(yn(`
162
+ `)),t}const Go=Symbol("no-token"),fd=Symbol("multiple-tokens");function H_(t){const n=rL(t);if(n!=null)return n;let a=Go;const l=[];let s=[],u;const f=()=>{if(s.length===0||u==null){s=[],u=void 0;return}if(s.length===1){const c=s[0];if(c?.type==="element"){lL(c,u);for(const m of c.children)ns(m)}else ns(c);l.push(c),s=[],u=void 0;return}for(const c of s)ns(c);l.push(ye({tagName:"span",properties:{"data-char":u},children:s})),s=[],u=void 0},h=c=>{if(c!==Go){if(c===fd){a=fd;return}if(a===Go){a=c;return}a!==c&&(a=fd)}};for(const c of t.children){const m=c.type==="element"?H_(c):Go;if(h(m),typeof m!="number"){f(),l.push(c);continue}u!=null&&u!==m&&f(),u??=m,s.push(c)}return f(),t.children=l,a}function rL(t){const n=t.properties["data-char"];if(typeof n=="number")return n}function ns(t){if(t.type==="element"){t.properties["data-char"]=void 0;for(const n of t.children)ns(n)}}function lL(t,n){t.properties["data-char"]=n}function oL(t={}){const{classPrefix:n="__shiki_",classSuffix:a="",classReplacer:l=h=>h}=t,s=new Map;function u(h){return Object.entries(h).map(([c,m])=>`${c}:${m}`).join(";")}function f(h){const c=typeof h=="string"?h:u(h);let m=n+sL(c)+a;return m=l(m),s.has(m)||s.set(m,typeof h=="string"?h:{...h}),m}return{name:"@shikijs/transformers:style-to-class",pre(h){if(!h.properties.style)return;const c=f(h.properties.style);delete h.properties.style,this.addClassToHast(h,c)},tokens(h){for(const c of h)for(const m of c){if(!m.htmlStyle)continue;const v=f(m.htmlStyle);m.htmlStyle={},m.htmlAttrs||={},m.htmlAttrs.class?m.htmlAttrs.class+=` ${v}`:m.htmlAttrs.class=v}},getClassRegistry(){return s},getCSS(){let h="";for(const[c,m]of s.entries())h+=`.${c}{${typeof m=="string"?m:u(m)}}`;return h},clearRegistry(){s.clear()}}}function sL(t,n=0){let a=3735928559^n,l=1103547991^n;for(let s=0,u;s<t.length;s++)u=t.charCodeAt(s),a=Math.imul(a^u,2654435761),l=Math.imul(l^u,1597334677);return a=Math.imul(a^a>>>16,2246822507),a^=Math.imul(l^l>>>13,3266489909),l=Math.imul(l^l>>>16,2246822507),l^=Math.imul(a^a>>>13,3266489909),(4294967296*(2097151&l)+(a>>>0)).toString(36).slice(0,6)}function uL(t=!1,n=!1){const a={lineInfo:[]},l=[{line(s){return delete s.properties.class,s},pre(s){const u=FS(s),f=[];if(u!=null){let h=1;for(const c of u.children)c.type==="element"&&(t&&H_(c),f.push(aL(c,h,a)),h++);u.children=f}return s},...t?{tokens(s){for(const u of s){let f=0;for(const h of u){const c=h;c.__lineChar??=f,f+=h.content.length}}},preprocess(s,u){u.mergeWhitespaces="never"},span(s,u,f,h,c){if(c?.offset!=null&&c.content!=null){const m=c.__lineChar;return m!=null&&(s.properties["data-char"]=m),s}return s}}:null}];return n&&l.push(cL,k0),{state:a,transformers:l,toClass:k0}}const k0=oL({classPrefix:"hl-"}),cL={name:"token-style-normalizer",tokens(t){for(const n of t)for(const a of n){if(a.htmlStyle!=null)continue;const l={};a.color!=null&&(l.color=a.color),a.bgColor!=null&&(l["background-color"]=a.bgColor),a.fontStyle!=null&&a.fontStyle!==0&&((a.fontStyle&1)!==0&&(l["font-style"]="italic"),(a.fontStyle&2)!==0&&(l["font-weight"]="bold"),(a.fontStyle&4)!==0&&(l["text-decoration"]="underline")),Object.keys(l).length>0&&(a.htmlStyle=l)}}};function sn(t){return`--${t==="token"?"diffs-token":"diffs"}-`}const dL=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,fL=/^0(?:\.0+)?%?$/;function hL(t){const n=t.indexOf("(");if(n<=0||!t.endsWith(")"))return;const a=t.slice(0,n).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(a))return;const l=t.slice(n+1,-1).trim();if(l.length===0)return;const s=l.lastIndexOf("/");if(s!==-1)return l.slice(s+1).trim();if(/^(?:rgba|hsla)$/i.test(a)){const u=l.split(",");if(u.length===4)return u[3]?.trim()}}function pL(t){const n=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(t.trim());if(n==null)return null;const a=n[1];let l,s=1;return a.length===3?l=a.split("").map(u=>u+u).join(""):a.length===6?l=a:(l=a.slice(0,6),s=parseInt(a.slice(6,8),16)/255),[parseInt(l.slice(0,2),16),parseInt(l.slice(2,4),16),parseInt(l.slice(4,6),16),s]}function hd(t){if(t==null)return null;const n=pL(t);if(n==null)return null;const a=n[0]/255,l=n[1]/255,s=n[2]/255,u=f=>f<=.03928?f/12.92:((f+.055)/1.055)**2.4;return .2126*u(a)+.7152*u(l)+.0722*u(s)}function D0(t){if(t==null)return!1;const n=t.trim().toLowerCase();if(n==="transparent"||dL.test(n))return!0;const a=hL(n);return a!=null&&fL.test(a)}function mL(t,n,a){if(n==null||a==null)return!1;const l=hd(t),s=hd(n),u=hd(a);return l==null||s==null||u==null?!1:Math.abs(l-u)<Math.abs(l-s)}const O0=new WeakMap;function pd(t){const n=O0.get(t);if(n!=null)return n;const a=t.colors??{},l={...a},s=a["editor.background"]??t.bg,u=a["editor.foreground"]??t.fg,f=a["sideBar.background"]??s,h=a["sideBar.foreground"]??u;mn(l,"editor.background",s),mn(l,"editor.foreground",u),mn(l,"sideBar.background",f),mn(l,"sideBar.foreground",h),mn(l,"input.background",a["input.background"]??f),mn(l,"sideBarSectionHeader.foreground",a["sideBarSectionHeader.foreground"]??h),mn(l,"list.activeSelectionForeground",a["list.activeSelectionForeground"]??h),mn(l,"gitDecoration.addedResourceForeground",md(a["gitDecoration.addedResourceForeground"],a["terminal.ansiGreen"],a["editorGutter.addedBackground"])),mn(l,"gitDecoration.modifiedResourceForeground",md(a["gitDecoration.modifiedResourceForeground"],a["terminal.ansiBlue"],a["editorGutter.modifiedBackground"])),mn(l,"gitDecoration.deletedResourceForeground",md(a["gitDecoration.deletedResourceForeground"],a["terminal.ansiRed"],a["editorGutter.deletedBackground"]));const c=(D0(a["list.focusOutline"])?void 0:a["list.focusOutline"])??(D0(a.focusBorder)?void 0:a.focusBorder);c!=null?l["list.focusOutline"]=c:delete l["list.focusOutline"];const m=a["list.hoverBackground"];m!=null&&(gL(m,f)||mL(m,f,h))&&delete l["list.hoverBackground"];const v=Object.freeze({...t,colors:Object.freeze(l)});return O0.set(t,v),v}function mn(t,n,a){a!=null&&a!==""&&(t[n]=a)}function md(...t){for(const n of t)if(n!=null&&n!=="")return n}function gL(t,n){return n!=null&&t.toLowerCase()===n.toLowerCase()}function vL({theme:t=Jt,highlighter:n,prefix:a}){let l="";if(typeof t=="string"){const s=n.getTheme(t),u=pd(s);l+=`color:${u.fg};`,l+=`background-color:${u.bg};`,l+=`${sn("global")}fg:${u.fg};`,l+=`${sn("global")}bg:${u.bg};`,l+=gd(s,a)}else{let s=n.getTheme(t.dark),u=pd(s);l+=`${sn("global")}dark:${u.fg};`,l+=`${sn("global")}dark-bg:${u.bg};`,l+=gd(s,"dark"),s=n.getTheme(t.light),u=pd(s),l+=`${sn("global")}light:${u.fg};`,l+=`${sn("global")}light-bg:${u.bg};`,l+=gd(s,"light")}return l}function gd(t,n){n=n!=null?`${n}-`:"";let a="";const l=t.colors?.["gitDecoration.addedResourceForeground"]??t.colors?.["terminal.ansiGreen"];l!=null&&(a+=`${sn("global")}${n}addition-color:${l};`);const s=t.colors?.["gitDecoration.deletedResourceForeground"]??t.colors?.["terminal.ansiRed"];s!=null&&(a+=`${sn("global")}${n}deletion-color:${s};`);const u=t.colors?.["gitDecoration.modifiedResourceForeground"]??t.colors?.["terminal.ansiBlue"];return u!=null&&(a+=`${sn("global")}${n}modified-color:${u};`),a}function M0(t){let n=t.children[0];for(;n!=null;){if(n.type==="element"&&n.tagName==="code")return n.children;"children"in n?n=n.children[0]:n=null}throw console.error(t),new Error("getLineNodes: Unable to find children")}const _L="-1,-1";function yL(t){return t?.some(n=>n.lineNumber===0)??!1}function N0(t){const n=t[0];return n!=null&&n.length>0?n:void 0}function U_(t){return t.startingLine===0&&t.totalLines>0}function bL(t,n){return ye({tagName:"div",children:t,properties:{"data-content":"",style:`grid-row: span ${n}`}})}function SL(t){return t.useTokenTransformer===!0||t.onTokenClick!=null||t.onTokenEnter!=null||t.onTokenLeave!=null}const EL=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
163
+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
164
+ <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
165
+ </symbol>
166
+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
167
+ <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
168
+ </symbol>
169
+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
170
+ <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
171
+ </symbol>
172
+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
173
+ <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
174
+ </symbol>
175
+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
176
+ <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
177
+ </symbol>
178
+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
179
+ <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
180
+ </symbol>
181
+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
182
+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
183
+ </symbol>
184
+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
185
+ <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
186
+ </symbol>
187
+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
188
+ <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
189
+ </symbol>
190
+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
191
+ <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
192
+ </symbol>
193
+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
194
+ <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
195
+ </symbol>
196
+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
197
+ <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
198
+ </symbol>
199
+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
200
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
201
+ </symbol>
202
+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
203
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
204
+ </symbol>
205
+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
206
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
207
+ </symbol>
208
+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
209
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
210
+ </symbol>
211
+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
212
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
213
+ </symbol>
214
+ </svg>`;function CL(t,n){return t==null||n==null?t===n:AL(t.customProperties,n.customProperties)&&t.type===n.type&&t.diffIndicators===n.diffIndicators&&t.disableBackground===n.disableBackground&&t.disableLineNumbers===n.disableLineNumbers&&t.overflow===n.overflow&&t.split===n.split&&t.totalLines===n.totalLines}const I0={};function AL(t=I0,n=I0){if(t===n)return!0;const a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(const s of a)if(t[s]!==n[s])return!1;return!0}function TL(t){const n=document.createElement("div");return n.dataset.annotationSlot="",n.slot=t,n.style.whiteSpace="normal",n}function xL(){const t=document.createElement("div");return t.slot="gutter-utility-slot",t.style.position="absolute",t.style.top="0",t.style.bottom="0",t.style.textAlign="center",t.style.whiteSpace="normal",t.style.touchAction="none",t}function LL(){const t=document.createElement("style");return t.setAttribute(VS,""),t}var wL=`@layer base {
215
+ :host {
216
+ --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
217
+ "Courier New", monospace;
218
+ --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
219
+ "Noto Sans", "Liberation Sans", Arial, sans-serif;
220
+ --diffs-mixer: light-dark(#000, #fff);
221
+ --diffs-gap-fallback: 8px;
222
+ --diffs-scrollbar-gutter-fallback: 6px;
223
+ --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
224
+ --diffs-added-light: #0dbe4e;
225
+ --diffs-added-dark: #5ecc71;
226
+ --diffs-modified-light: #009fff;
227
+ --diffs-modified-dark: #69b1ff;
228
+ --diffs-deleted-light: #ff2e3f;
229
+ --diffs-deleted-dark: #ff6762;
230
+ color-scheme: light dark;
231
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
232
+ font-size: var(--diffs-font-size, 13px);
233
+ line-height: var(--diffs-line-height, 20px);
234
+ font-feature-settings: var(--diffs-font-features);
235
+ --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
236
+ --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
237
+ --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
238
+ --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
239
+ --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
240
+ --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
241
+ --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
242
+ --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
243
+ --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
244
+ --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
245
+ --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
246
+ --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
247
+ --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
248
+ --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
249
+ --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
250
+ --diffs-selection-base: var(--diffs-modified-base);
251
+ --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
252
+ background-color: var(--diffs-bg);
253
+ color: var(--diffs-fg);
254
+ display: block;
255
+ }
256
+
257
+ pre, code, [data-error-wrapper] {
258
+ isolation: isolate;
259
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
260
+ outline: none;
261
+ margin: 0;
262
+ padding: 0;
263
+ display: block;
264
+ }
265
+
266
+ pre, code {
267
+ background-color: var(--diffs-bg);
268
+ }
269
+
270
+ code {
271
+ contain: content;
272
+ }
273
+
274
+ *, :before, :after {
275
+ box-sizing: border-box;
276
+ }
277
+
278
+ [data-icon-sprite] {
279
+ display: none;
280
+ }
281
+
282
+ [data-diffs-header], [data-separator] {
283
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
284
+ }
285
+
286
+ [data-diffs-header][data-sticky] {
287
+ z-index: 1;
288
+ background-color: var(--diffs-bg);
289
+ position: sticky;
290
+ top: 0;
291
+ }
292
+
293
+ [data-file-info] {
294
+ color: var(--fg);
295
+ background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
296
+ border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
297
+ padding: 10px;
298
+ font-weight: 700;
299
+ }
300
+
301
+ [data-diff], [data-file] {
302
+ --diffs-grid-number-column-width: minmax(min-content, max-content);
303
+ --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
304
+
305
+ &[data-dehydrated] {
306
+ --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
307
+ }
308
+
309
+ &:hover [data-code]::-webkit-scrollbar-thumb {
310
+ background-color: var(--diffs-bg-context);
311
+ }
312
+ }
313
+
314
+ @supports (-webkit-touch-callout: none) {
315
+ :host {
316
+ --diffs-scrollbar-gutter-fallback: 0px;
317
+ }
318
+ }
319
+
320
+ [data-line] span {
321
+ color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
322
+ background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
323
+ font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
324
+ font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
325
+ text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
326
+ }
327
+
328
+ [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions] {
329
+ --diffs-computed-decoration-bg: var(--diffs-bg);
330
+ --diffs-computed-diff-line-bg: var(--diffs-bg);
331
+ --diffs-computed-selected-line-bg: var(--diffs-bg);
332
+ color: var(--diffs-fg);
333
+ background-color: var(--diffs-line-bg, var(--diffs-bg));
334
+
335
+ @media (pointer: fine) {
336
+ &:where([data-hovered]) {
337
+ --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
338
+ var(--diffs-computed-selected-line-bg) 97%,
339
+ var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab,
340
+ var(--diffs-computed-selected-line-bg) 91%,
341
+ var(--diffs-bg-hover-override, var(--diffs-mixer))));
342
+ --diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit);
343
+ }
344
+ }
345
+ }
346
+
347
+ [data-line], [data-no-newline] {
348
+ &[data-decoration-bg] {
349
+ --mix-deco-light: 92%;
350
+ --mix-deco-dark: 85%;
351
+
352
+ &[data-decoration-bg-depth="2"] {
353
+ --mix-deco-light: 88%;
354
+ --mix-deco-dark: 80%;
355
+ }
356
+
357
+ &[data-decoration-bg-depth="3"] {
358
+ --mix-deco-light: 85%;
359
+ --mix-deco-dark: 78%;
360
+ }
361
+
362
+ @media (pointer: fine) {
363
+ &[data-hovered]:not([data-selected-line]) {
364
+ --mix-deco-light: 85%;
365
+ --mix-deco-dark: 85%;
366
+ }
367
+
368
+ &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] {
369
+ --mix-deco-light: 83%;
370
+ --mix-deco-dark: 83%;
371
+ }
372
+
373
+ &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] {
374
+ --mix-deco-light: 81%;
375
+ --mix-deco-dark: 81%;
376
+ }
377
+ }
378
+
379
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
380
+ var(--diffs-bg) var(--mix-deco-light),
381
+ var(--diffs-decoration-bg)), color-mix(in lab,
382
+ var(--diffs-bg) var(--mix-deco-dark),
383
+ var(--diffs-decoration-bg)));
384
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
385
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
386
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
387
+ }
388
+ }
389
+
390
+ [data-line-annotation], [data-gutter-buffer="annotation"] {
391
+ --diffs-annotation-bg: var(--diffs-bg-context);
392
+ --diffs-computed-decoration-bg: var(--diffs-annotation-bg);
393
+ --diffs-computed-diff-line-bg: var(--diffs-annotation-bg);
394
+ --diffs-computed-selected-line-bg: var(--diffs-annotation-bg);
395
+ --diffs-line-bg: var(--diffs-annotation-bg);
396
+ }
397
+
398
+ [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
399
+ --diffs-computed-decoration-bg: var(--diffs-bg-context);
400
+ --diffs-computed-diff-line-bg: var(--diffs-bg-context);
401
+ --diffs-computed-selected-line-bg: var(--diffs-bg-context);
402
+ --diffs-line-bg: var(--diffs-bg-context);
403
+ }
404
+
405
+ [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
406
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
407
+ var(--diffs-bg) 78%,
408
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
409
+ var(--diffs-bg) 68%,
410
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
411
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
412
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
413
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
414
+ }
415
+
416
+ [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
417
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
418
+ var(--diffs-bg) 78%,
419
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
420
+ var(--diffs-bg) 68%,
421
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
422
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
423
+ --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
424
+ --diffs-line-bg: var(--diffs-computed-decoration-bg);
425
+ }
426
+
427
+ [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
428
+ --diffs-computed-decoration-bg: var(--diffs-bg);
429
+ --diffs-computed-diff-line-bg: var(--diffs-bg);
430
+ --diffs-computed-selected-line-bg: var(--diffs-bg);
431
+ --diffs-line-bg: var(--diffs-bg);
432
+ }
433
+
434
+ :where([data-background]) {
435
+ & [data-gutter-buffer], & [data-column-number] {
436
+ --mix-light: 91%;
437
+ --mix-dark: 85%;
438
+ }
439
+
440
+ & [data-line], & [data-no-newline] {
441
+ --mix-light: 88%;
442
+ --mix-dark: 80%;
443
+ }
444
+
445
+ & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
446
+ --diffs-diff-line-mix-target: var(--diffs-bg);
447
+
448
+ &[data-line-type="change-deletion"] {
449
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
450
+
451
+ @media (pointer: fine) {
452
+ &[data-hovered] {
453
+ --mix-light: 80%;
454
+ --mix-dark: 75%;
455
+ }
456
+ }
457
+
458
+ &:where([data-gutter-buffer], [data-column-number]) {
459
+ color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
460
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
461
+ }
462
+
463
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
464
+ var(--diffs-computed-decoration-bg) var(--mix-light),
465
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
466
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
467
+ var(--diffs-diff-line-mix-target)));
468
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
469
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
470
+ }
471
+
472
+ &[data-line-type="change-addition"] {
473
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
474
+
475
+ @media (pointer: fine) {
476
+ &[data-hovered] {
477
+ --mix-light: 80%;
478
+ --mix-dark: 70%;
479
+ }
480
+ }
481
+
482
+ &:where([data-gutter-buffer], [data-column-number]) {
483
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
484
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
485
+ }
486
+
487
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
488
+ var(--diffs-computed-decoration-bg) var(--mix-light),
489
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
490
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
491
+ var(--diffs-diff-line-mix-target)));
492
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
493
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
494
+ }
495
+
496
+ &[data-merge-conflict="current"] {
497
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
498
+
499
+ &:where([data-gutter-buffer], [data-column-number]) {
500
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
501
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
502
+ }
503
+
504
+ @media (pointer: fine) {
505
+ &[data-hovered] {
506
+ --mix-light: 80%;
507
+ --mix-dark: 70%;
508
+ }
509
+ }
510
+
511
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
512
+ var(--diffs-computed-decoration-bg) var(--mix-light),
513
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
514
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
515
+ var(--diffs-diff-line-mix-target)));
516
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
517
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
518
+ }
519
+
520
+ &[data-merge-conflict="incoming"] {
521
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
522
+
523
+ &:where([data-gutter-buffer], [data-column-number]) {
524
+ color: var(--diffs-modified-base);
525
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
526
+ }
527
+
528
+ @media (pointer: fine) {
529
+ &[data-hovered] {
530
+ --mix-light: 80%;
531
+ --mix-dark: 70%;
532
+ }
533
+ }
534
+
535
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
536
+ var(--diffs-computed-decoration-bg) var(--mix-light),
537
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
538
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
539
+ var(--diffs-diff-line-mix-target)));
540
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
541
+ --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
542
+ }
543
+ }
544
+ }
545
+
546
+ [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline] {
547
+ --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
548
+
549
+ &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
550
+ --mix-selection-light: 82%;
551
+ --mix-selection-dark: 75%;
552
+
553
+ @media (pointer: fine) {
554
+ &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
555
+ --mix-selection-light: 75%;
556
+ --mix-selection-dark: 70%;
557
+ }
558
+ }
559
+ }
560
+
561
+ &:where([data-gutter-buffer], [data-column-number])[data-selected-line] {
562
+ --mix-selection-light: 75%;
563
+ --mix-selection-dark: 60%;
564
+ --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
565
+
566
+ @media (pointer: fine) {
567
+ &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
568
+ --mix-selection-light: 70%;
569
+ --mix-selection-dark: 55%;
570
+ }
571
+ }
572
+ }
573
+
574
+ &[data-selected-line] {
575
+ --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
576
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
577
+ var(--diffs-selection-mix-target)), color-mix(in lab,
578
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
579
+ var(--diffs-selection-mix-target)));
580
+ --diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit);
581
+ }
582
+ }
583
+
584
+ [data-gutter-buffer], [data-column-number] {
585
+ &[data-selected-line] {
586
+ color: var(--diffs-selection-number-fg);
587
+ }
588
+ }
589
+
590
+ [data-no-newline] {
591
+ user-select: none;
592
+
593
+ & span {
594
+ opacity: .6;
595
+ }
596
+ }
597
+
598
+ [data-diff-type="split"][data-overflow="scroll"] {
599
+ grid-template-columns: 1fr 1fr;
600
+ display: grid;
601
+
602
+ & [data-additions] {
603
+ border-left: 1px solid var(--diffs-bg);
604
+ }
605
+
606
+ & [data-deletions] {
607
+ border-right: 1px solid var(--diffs-bg);
608
+ }
609
+ }
610
+
611
+ [data-code] {
612
+ grid-auto-flow: dense;
613
+ grid-template-columns: var(--diffs-code-grid);
614
+ overflow: var(--diffs-overflow-override, scroll) clip;
615
+ overscroll-behavior-x: none;
616
+ tab-size: var(--diffs-tab-size, 2);
617
+ padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
618
+ padding-bottom: max(0px,
619
+ calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
620
+ var(--diffs-scrollbar-gutter)));
621
+ scrollbar-gutter: stable;
622
+ align-self: flex-start;
623
+ display: grid;
624
+ }
625
+
626
+ [data-diffs-scrollbar-measure] {
627
+ opacity: 0;
628
+ pointer-events: none;
629
+ scrollbar-gutter: auto;
630
+ grid-template-columns: none;
631
+ width: 100px;
632
+ height: 100px;
633
+ padding: 0;
634
+ position: absolute;
635
+ top: -200px;
636
+ left: -200px;
637
+ }
638
+
639
+ [data-container-size] {
640
+ container-type: inline-size;
641
+ }
642
+
643
+ [data-code]::-webkit-scrollbar {
644
+ width: 0;
645
+ height: var(--diffs-scrollbar-gutter);
646
+ }
647
+
648
+ [data-code]::-webkit-scrollbar-track {
649
+ background: none;
650
+ }
651
+
652
+ [data-code]::-webkit-scrollbar-thumb {
653
+ background-color: #0000;
654
+ background-clip: content-box;
655
+ border: 1px solid #0000;
656
+ border-radius: 3px;
657
+ }
658
+
659
+ [data-code]::-webkit-scrollbar-corner {
660
+ background-color: #0000;
661
+ }
662
+
663
+ @supports ((-moz-appearance: none)) {
664
+ [data-code] {
665
+ scrollbar-width: thin;
666
+ scrollbar-color: var(--diffs-bg-context) transparent;
667
+ padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
668
+ }
669
+ }
670
+
671
+ [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
672
+ & [data-code], &[data-overflow="wrap"] {
673
+ padding-top: 0;
674
+ }
675
+ }
676
+
677
+ [data-gutter] {
678
+ grid-template-rows: subgrid;
679
+ grid-template-columns: subgrid;
680
+ z-index: 3;
681
+ background-color: var(--diffs-bg);
682
+ grid-column: 1;
683
+ display: grid;
684
+ position: relative;
685
+
686
+ & [data-gutter-buffer], & [data-column-number] {
687
+ border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
688
+ }
689
+ }
690
+
691
+ [data-content] {
692
+ grid-template-rows: subgrid;
693
+ grid-template-columns: subgrid;
694
+ background-color: var(--diffs-bg);
695
+ grid-column: 2;
696
+ min-width: 0;
697
+ display: grid;
698
+ }
699
+
700
+ [data-diff-type="split"][data-overflow="wrap"] {
701
+ grid-auto-flow: dense;
702
+ grid-template-columns: repeat(2, var(--diffs-code-grid));
703
+ padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
704
+ display: grid;
705
+
706
+ & [data-deletions] {
707
+ display: contents;
708
+
709
+ & [data-gutter] {
710
+ grid-column: 1;
711
+ }
712
+
713
+ & [data-content] {
714
+ border-right: 1px solid var(--diffs-bg);
715
+ grid-column: 2;
716
+ }
717
+ }
718
+
719
+ & [data-additions] {
720
+ display: contents;
721
+
722
+ & [data-gutter] {
723
+ border-left: 1px solid var(--diffs-bg);
724
+ grid-column: 3;
725
+ }
726
+
727
+ & [data-content] {
728
+ grid-column: 4;
729
+ }
730
+ }
731
+ }
732
+
733
+ [data-overflow="scroll"] [data-gutter] {
734
+ position: sticky;
735
+ left: 0;
736
+ }
737
+
738
+ [data-interactive-lines] [data-line] {
739
+ cursor: pointer;
740
+ }
741
+
742
+ [data-interactive-line-numbers] [data-column-number] {
743
+ cursor: pointer;
744
+ touch-action: none;
745
+ }
746
+
747
+ [data-content-buffer], [data-gutter-buffer] {
748
+ user-select: none;
749
+ min-height: 1lh;
750
+ position: relative;
751
+ }
752
+
753
+ [data-gutter-buffer] {
754
+ padding-left: 2ch;
755
+ padding-right: 1ch;
756
+
757
+ &:before {
758
+ content: "";
759
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
760
+ display: block;
761
+ }
762
+ }
763
+
764
+ [data-gutter-buffer="annotation"] {
765
+ --diffs-annotation-bg: var(--diffs-bg-context-gutter);
766
+ min-height: 0;
767
+ }
768
+
769
+ [data-gutter-buffer="buffer"] {
770
+ --diffs-line-bg: var(--diffs-bg-context-gutter);
771
+ }
772
+
773
+ [data-content-buffer] {
774
+ background-position: 5px 0;
775
+ background-size: 8px 8px;
776
+ background-origin: border-box;
777
+ background-image: repeating-linear-gradient(-45deg,
778
+ transparent,
779
+ transparent calc(3px * 1.414),
780
+ var(--diffs-bg-buffer) calc(3px * 1.414),
781
+ var(--diffs-bg-buffer) calc(4px * 1.414));
782
+ grid-column: 1;
783
+ }
784
+
785
+ [data-separator] {
786
+ box-sizing: content-box;
787
+ background-color: var(--diffs-bg);
788
+ }
789
+
790
+ [data-separator="simple"] {
791
+ min-height: 4px;
792
+ }
793
+
794
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
795
+ background-color: var(--diffs-bg-separator);
796
+ }
797
+
798
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
799
+ height: 32px;
800
+ position: relative;
801
+ }
802
+
803
+ [data-separator-wrapper] {
804
+ user-select: none;
805
+ fill: currentColor;
806
+ background-color: var(--diffs-bg);
807
+ align-items: center;
808
+ height: 100%;
809
+ display: flex;
810
+ position: absolute;
811
+ inset-inline: 0;
812
+ }
813
+
814
+ [data-content] [data-separator-wrapper] {
815
+ display: none;
816
+ }
817
+
818
+ [data-separator="metadata"] [data-separator-wrapper] {
819
+ background-color: var(--diffs-bg-separator);
820
+ height: 100%;
821
+ color: var(--diffs-fg-number);
822
+ white-space: nowrap;
823
+ text-overflow: ellipsis;
824
+ min-width: min-content;
825
+ padding-inline: 1ch;
826
+ inset-inline: 100% auto;
827
+ overflow: hidden;
828
+ }
829
+
830
+ [data-separator="line-info"] {
831
+ margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
832
+
833
+ & [data-separator-wrapper] {
834
+ min-width: 16px;
835
+ }
836
+ }
837
+
838
+ [data-separator="line-info-basic"], [data-separator="metadata"] {
839
+ margin-block: 0;
840
+ }
841
+
842
+ [data-separator="line-info"][data-separator-first] {
843
+ margin-top: 0;
844
+ }
845
+
846
+ [data-separator="line-info"][data-separator-last] {
847
+ margin-bottom: 0;
848
+ }
849
+
850
+ [data-expand-index] [data-separator-wrapper] {
851
+ grid-template-columns: 32px auto;
852
+ display: grid;
853
+ }
854
+
855
+ [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
856
+ grid-template-columns: 32px 32px auto;
857
+ }
858
+
859
+ [data-expand-button], [data-separator-content] {
860
+ background-color: var(--diffs-bg-separator);
861
+ flex: none;
862
+ align-items: center;
863
+ display: flex;
864
+ }
865
+
866
+ [data-expand-index] [data-separator-content]:hover {
867
+ cursor: pointer;
868
+ text-decoration: underline;
869
+ }
870
+
871
+ [data-expand-button] {
872
+ cursor: pointer;
873
+ min-width: 32px;
874
+ color: var(--diffs-fg-number);
875
+ border-right: 2px solid var(--diffs-bg);
876
+ flex-shrink: 0;
877
+ justify-content: center;
878
+ align-self: stretch;
879
+
880
+ &:hover {
881
+ color: var(--diffs-fg);
882
+ }
883
+
884
+ &[data-expand-all-button] {
885
+ display: none;
886
+ }
887
+ }
888
+
889
+ [data-expand-down] [data-icon] {
890
+ transform: scaleY(-1);
891
+ }
892
+
893
+ [data-separator-content] {
894
+ height: 100%;
895
+ color: var(--diffs-fg-number);
896
+ flex: auto;
897
+ justify-content: flex-start;
898
+ padding: 0 1ch;
899
+ overflow: hidden;
900
+ }
901
+
902
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
903
+ & [data-separator-content] {
904
+ user-select: none;
905
+ height: 100%;
906
+ overflow: clip;
907
+ }
908
+ }
909
+
910
+ [data-unmodified-lines] {
911
+ text-overflow: ellipsis;
912
+ white-space: nowrap;
913
+ flex: 0 auto;
914
+ min-width: 0;
915
+ display: block;
916
+ overflow: hidden;
917
+ }
918
+
919
+ @supports (width: 1cqi) {
920
+ [data-unified] {
921
+ & [data-separator="line-info"] [data-separator-wrapper] {
922
+ padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
923
+ width: 100cqi;
924
+
925
+ & [data-separator-content] {
926
+ border-radius: 6px;
927
+ }
928
+ }
929
+
930
+ & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
931
+ border-top-left-radius: unset;
932
+ border-bottom-left-radius: unset;
933
+ }
934
+ }
935
+
936
+ [data-gutter] {
937
+ & [data-separator="line-info"] [data-separator-wrapper] {
938
+ padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
939
+ }
940
+
941
+ & [data-separator="line-info"] [data-separator-content] {
942
+ border-top-left-radius: 6px;
943
+ border-bottom-left-radius: 6px;
944
+ }
945
+
946
+ & [data-separator="line-info"][data-expand-index] [data-separator-content] {
947
+ border-top-left-radius: unset;
948
+ border-bottom-left-radius: unset;
949
+ }
950
+ }
951
+
952
+ [data-additions] {
953
+ & [data-content] [data-separator="line-info"] {
954
+ background-color: var(--diffs-bg);
955
+
956
+ & [data-separator-wrapper] {
957
+ display: none;
958
+ }
959
+ }
960
+
961
+ & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
962
+ background-color: var(--diffs-bg-separator);
963
+ border-top-right-radius: 6px;
964
+ border-bottom-right-radius: 6px;
965
+ height: 100%;
966
+ display: block;
967
+
968
+ & [data-separator-content], & [data-expand-button] {
969
+ display: none;
970
+ }
971
+ }
972
+ }
973
+
974
+ [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
975
+ width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
976
+ }
977
+
978
+ [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
979
+ background-color: var(--diffs-bg-separator);
980
+ height: 100%;
981
+ margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
982
+ border-top-right-radius: 6px;
983
+ border-bottom-right-radius: 6px;
984
+ display: block;
985
+
986
+ & [data-separator-content], & [data-expand-button] {
987
+ display: none;
988
+ }
989
+ }
990
+
991
+ [data-separator="line-info"] [data-separator-wrapper] {
992
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
993
+ border-top-left-radius: 6px;
994
+ border-bottom-left-radius: 6px;
995
+ }
996
+ }
997
+
998
+ @media (pointer: fine) {
999
+ [data-separator="line-info"] [data-separator-wrapper] {
1000
+ &[data-separator-multi-button] {
1001
+ & [data-expand-up] {
1002
+ border-top-left-radius: 6px;
1003
+ border-bottom-left-radius: unset;
1004
+ }
1005
+
1006
+ & [data-expand-down] {
1007
+ border-bottom-left-radius: 6px;
1008
+ border-top-left-radius: unset;
1009
+ }
1010
+ }
1011
+ }
1012
+ }
1013
+ }
1014
+
1015
+ @media (pointer: coarse) {
1016
+ [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
1017
+ grid-template-columns: 34px 34px auto;
1018
+
1019
+ & [data-separator-content] {
1020
+ grid-column: unset;
1021
+ grid-row: unset;
1022
+ }
1023
+ }
1024
+
1025
+ @supports (width: 1cqi) {
1026
+ [data-separator="line-info"] [data-separator-wrapper] {
1027
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
1028
+ border-top-left-radius: 6px;
1029
+ border-bottom-left-radius: 6px;
1030
+ }
1031
+
1032
+ &[data-separator-multi-button] {
1033
+ & [data-expand-up] {
1034
+ border-top-left-radius: 6px;
1035
+ border-bottom-left-radius: 6px;
1036
+ }
1037
+
1038
+ & [data-expand-down] {
1039
+ border-bottom-left-radius: unset;
1040
+ border-top-left-radius: unset;
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+ }
1046
+
1047
+ @media (pointer: fine) {
1048
+ [data-separator-wrapper][data-separator-multi-button] {
1049
+ grid-template-rows: 50% 50%;
1050
+ display: grid;
1051
+
1052
+ & [data-separator-content] {
1053
+ grid-area: 1 / 2 / -1;
1054
+ min-width: min-content;
1055
+ }
1056
+
1057
+ & [data-expand-button] {
1058
+ grid-column: 1;
1059
+ }
1060
+ }
1061
+
1062
+ [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
1063
+ grid-template-columns: 34px auto;
1064
+ }
1065
+
1066
+ [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
1067
+ grid-template-columns: 100% auto;
1068
+ }
1069
+
1070
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
1071
+ & [data-separator-multi-button] {
1072
+ & [data-expand-up] {
1073
+ border-bottom: 1px solid var(--diffs-bg);
1074
+ border-right: 2px solid var(--diffs-bg);
1075
+ }
1076
+
1077
+ & [data-expand-down] {
1078
+ border-top: 1px solid var(--diffs-bg);
1079
+ border-right: 2px solid var(--diffs-bg);
1080
+ }
1081
+ }
1082
+ }
1083
+ }
1084
+
1085
+ [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
1086
+ display: none;
1087
+ }
1088
+
1089
+ [data-line-annotation] {
1090
+ min-height: var(--diffs-annotation-min-height, 0);
1091
+ z-index: 2;
1092
+ }
1093
+
1094
+ [data-merge-conflict-actions] {
1095
+ z-index: 2;
1096
+ }
1097
+
1098
+ [data-separator="custom"] {
1099
+ grid-template-columns: subgrid;
1100
+ display: grid;
1101
+ }
1102
+
1103
+ [data-line], [data-column-number], [data-no-newline] {
1104
+ padding-inline: 1ch;
1105
+ position: relative;
1106
+ }
1107
+
1108
+ [data-indicators="classic"] [data-line] {
1109
+ padding-inline-start: 2ch;
1110
+ }
1111
+
1112
+ [data-indicators="classic"] {
1113
+ & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
1114
+ &[data-no-newline], &[data-line] {
1115
+ &:before {
1116
+ user-select: none;
1117
+ width: 1ch;
1118
+ height: 1lh;
1119
+ display: inline-block;
1120
+ position: absolute;
1121
+ top: 0;
1122
+ left: 0;
1123
+ }
1124
+ }
1125
+ }
1126
+
1127
+ & [data-line-type="change-addition"] {
1128
+ &[data-line], &[data-no-newline] {
1129
+ &:before {
1130
+ content: "+";
1131
+ color: var(--diffs-addition-base);
1132
+ }
1133
+ }
1134
+ }
1135
+
1136
+ & [data-line-type="change-deletion"] {
1137
+ &[data-line], &[data-no-newline] {
1138
+ &:before {
1139
+ content: "-";
1140
+ color: var(--diffs-deletion-base);
1141
+ }
1142
+ }
1143
+ }
1144
+ }
1145
+
1146
+ [data-indicators="bars"] {
1147
+ & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
1148
+ &[data-column-number] {
1149
+ &:before {
1150
+ content: "";
1151
+ user-select: none;
1152
+ contain: strict;
1153
+ width: 4px;
1154
+ height: 100%;
1155
+ display: block;
1156
+ position: absolute;
1157
+ top: 0;
1158
+ left: 0;
1159
+ }
1160
+ }
1161
+ }
1162
+
1163
+ & [data-line-type="change-deletion"] {
1164
+ &[data-column-number] {
1165
+ &:before {
1166
+ background-image: linear-gradient(0deg,
1167
+ var(--diffs-bg-deletion) 50%,
1168
+ var(--diffs-deletion-base) 50%);
1169
+ background-repeat: repeat;
1170
+ background-size: 2px 2px;
1171
+ background-size: calc(1lh / round(1lh / 2px))
1172
+ calc(1lh / round(1lh / 2px));
1173
+ }
1174
+ }
1175
+ }
1176
+
1177
+ & [data-line-type="change-addition"] {
1178
+ &[data-column-number] {
1179
+ &:before {
1180
+ background-color: var(--diffs-addition-base);
1181
+ }
1182
+ }
1183
+ }
1184
+ }
1185
+
1186
+ [data-overflow="wrap"] {
1187
+ & [data-line], & [data-annotation-content] {
1188
+ white-space: pre-wrap;
1189
+ word-break: break-word;
1190
+ }
1191
+ }
1192
+
1193
+ [data-overflow="scroll"] [data-line] {
1194
+ white-space: pre;
1195
+ min-height: 1lh;
1196
+ }
1197
+
1198
+ [data-column-number] {
1199
+ box-sizing: content-box;
1200
+ text-align: right;
1201
+ user-select: none;
1202
+ color: var(--diffs-fg-number);
1203
+ padding-left: 2ch;
1204
+ }
1205
+
1206
+ [data-line-number-content] {
1207
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
1208
+ z-index: 1;
1209
+ display: inline-block;
1210
+ position: relative;
1211
+ }
1212
+
1213
+ [data-disable-line-numbers] {
1214
+ & [data-gutter-buffer], & [data-column-number] {
1215
+ min-width: 4px;
1216
+ padding: 0;
1217
+
1218
+ &:before {
1219
+ min-width: 0;
1220
+ }
1221
+ }
1222
+
1223
+ & [data-line-number-content] {
1224
+ display: none;
1225
+ }
1226
+
1227
+ & [data-gutter-utility-slot] {
1228
+ right: unset;
1229
+ justify-content: flex-start;
1230
+ left: 0;
1231
+ }
1232
+
1233
+ &[data-indicators="bars"] [data-gutter-utility-slot] {
1234
+ left: 6px;
1235
+ }
1236
+ }
1237
+
1238
+ [data-file][data-disable-line-numbers] {
1239
+ & [data-gutter-buffer], & [data-column-number] {
1240
+ border-right: 0;
1241
+ min-width: 0;
1242
+ }
1243
+ }
1244
+
1245
+ [data-diff-span] {
1246
+ box-decoration-break: clone;
1247
+ border-radius: 3px;
1248
+ }
1249
+
1250
+ [data-line-type="change-addition"] [data-diff-span] {
1251
+ background-color: var(--diffs-bg-addition-emphasis);
1252
+ }
1253
+
1254
+ [data-line-type="change-deletion"] [data-diff-span] {
1255
+ background-color: var(--diffs-bg-deletion-emphasis);
1256
+ }
1257
+
1258
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
1259
+ color: var(--diffs-fg);
1260
+ padding-left: 1ch;
1261
+ }
1262
+
1263
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
1264
+ align-items: center;
1265
+ display: flex;
1266
+
1267
+ &:after {
1268
+ color: var(--diffs-fg-conflict-marker);
1269
+ font-size: .75rem;
1270
+ font-style: normal;
1271
+ line-height: 1.25rem;
1272
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1273
+ padding-left: 1ch;
1274
+ }
1275
+ }
1276
+
1277
+ [data-merge-conflict="marker-start"]:after {
1278
+ content: "(Current Change)";
1279
+ }
1280
+
1281
+ [data-merge-conflict="marker-end"]:after {
1282
+ content: "(Incoming Change)";
1283
+ }
1284
+
1285
+ [data-merge-conflict-actions-content] {
1286
+ min-height: 1.75rem;
1287
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1288
+ color: var(--diffs-fg);
1289
+ align-items: center;
1290
+ gap: .25rem;
1291
+ padding-inline: .5rem;
1292
+ font-size: .75rem;
1293
+ line-height: 1.2;
1294
+ display: flex;
1295
+ }
1296
+
1297
+ [data-merge-conflict-action] {
1298
+ appearance: none;
1299
+ color: var(--diffs-fg-number);
1300
+ font: inherit;
1301
+ cursor: pointer;
1302
+ background: none;
1303
+ border: 0;
1304
+ padding: 0;
1305
+ font-style: normal;
1306
+ }
1307
+
1308
+ [data-merge-conflict-action]:hover {
1309
+ color: var(--diffs-fg);
1310
+ }
1311
+
1312
+ [data-merge-conflict-action="current"]:hover {
1313
+ color: var(--diffs-addition-base);
1314
+ }
1315
+
1316
+ [data-merge-conflict-action="incoming"]:hover {
1317
+ color: var(--diffs-modified-base);
1318
+ }
1319
+
1320
+ [data-merge-conflict-action-separator] {
1321
+ color: var(--diffs-fg-number);
1322
+ opacity: .6;
1323
+ user-select: none;
1324
+ }
1325
+
1326
+ [data-diffs-header="default"] {
1327
+ background-color: var(--diffs-bg);
1328
+ justify-content: space-between;
1329
+ align-items: center;
1330
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1331
+ min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
1332
+ z-index: 2;
1333
+ flex-direction: row;
1334
+ padding-inline: 16px;
1335
+ display: flex;
1336
+ position: relative;
1337
+ top: 0;
1338
+ }
1339
+
1340
+ [data-header-content] {
1341
+ align-items: center;
1342
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1343
+ white-space: nowrap;
1344
+ flex-direction: row;
1345
+ min-width: 0;
1346
+ display: flex;
1347
+ }
1348
+
1349
+ [data-header-content] [data-prev-name], [data-header-content] [data-title] {
1350
+ text-overflow: ellipsis;
1351
+ white-space: nowrap;
1352
+ direction: rtl;
1353
+ min-width: 0;
1354
+ overflow: hidden;
1355
+ }
1356
+
1357
+ [data-prev-name] {
1358
+ opacity: .7;
1359
+ }
1360
+
1361
+ [data-rename-icon] {
1362
+ fill: currentColor;
1363
+ flex-grow: 0;
1364
+ flex-shrink: 0;
1365
+ }
1366
+
1367
+ [data-diffs-header="default"] [data-metadata] {
1368
+ white-space: nowrap;
1369
+ align-items: center;
1370
+ gap: 1ch;
1371
+ display: flex;
1372
+ }
1373
+
1374
+ [data-diffs-header="default"] [data-additions-count] {
1375
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1376
+ color: var(--diffs-addition-base);
1377
+ }
1378
+
1379
+ [data-diffs-header="default"] [data-deletions-count] {
1380
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1381
+ color: var(--diffs-deletion-base);
1382
+ }
1383
+
1384
+ [data-change-icon] {
1385
+ fill: currentColor;
1386
+ flex-shrink: 0;
1387
+ }
1388
+
1389
+ [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
1390
+ color: var(--diffs-modified-base);
1391
+ }
1392
+
1393
+ [data-change-icon="new"] {
1394
+ color: var(--diffs-addition-base);
1395
+ }
1396
+
1397
+ [data-change-icon="deleted"] {
1398
+ color: var(--diffs-deletion-base);
1399
+ }
1400
+
1401
+ [data-change-icon="file"] {
1402
+ opacity: .6;
1403
+ }
1404
+
1405
+ [data-annotation-content] {
1406
+ z-index: 2;
1407
+ isolation: isolate;
1408
+ align-self: flex-start;
1409
+ min-width: 0;
1410
+ display: flow-root;
1411
+ position: relative;
1412
+ }
1413
+
1414
+ [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
1415
+ width: var(--diffs-column-content-width, auto);
1416
+ left: var(--diffs-column-number-width, 0);
1417
+ position: sticky;
1418
+ }
1419
+
1420
+ [data-annotation-slot] {
1421
+ text-wrap-mode: wrap;
1422
+ word-break: normal;
1423
+ white-space-collapse: collapse;
1424
+ }
1425
+
1426
+ [data-gutter-utility-slot] {
1427
+ touch-action: none;
1428
+ justify-content: flex-end;
1429
+ display: flex;
1430
+ position: absolute;
1431
+ top: 0;
1432
+ bottom: 0;
1433
+ right: 0;
1434
+ }
1435
+
1436
+ [data-utility-button] {
1437
+ appearance: none;
1438
+ cursor: pointer;
1439
+ width: 1lh;
1440
+ height: 1lh;
1441
+ font-size: var(--diffs-font-size, 13px);
1442
+ line-height: var(--diffs-line-height, 20px);
1443
+ background-color: var(--diffs-modified-base);
1444
+ color: var(--diffs-bg);
1445
+ fill: currentColor;
1446
+ z-index: 4;
1447
+ touch-action: none;
1448
+ border: none;
1449
+ border-radius: 4px;
1450
+ justify-content: center;
1451
+ align-items: center;
1452
+ margin-right: calc(-1lh + 1ch);
1453
+ padding: 0;
1454
+ display: flex;
1455
+ position: relative;
1456
+
1457
+ &:before {
1458
+ content: "";
1459
+ display: block;
1460
+ position: absolute;
1461
+ inset: 0 0 0 -4px;
1462
+ }
1463
+ }
1464
+
1465
+ [data-decoration-bar-stack] {
1466
+ pointer-events: none;
1467
+ isolation: isolate;
1468
+ z-index: 1;
1469
+ background-color: var(--diffs-decoration-bar-color, transparent);
1470
+ box-sizing: content-box;
1471
+ border-left: 2px solid var(--diffs-bg);
1472
+ border-right: 2px solid var(--diffs-bg);
1473
+ width: 6px;
1474
+ position: absolute;
1475
+ top: 0;
1476
+ bottom: 0;
1477
+ right: -2px;
1478
+
1479
+ [data-decoration-bar-depth="1"] & {
1480
+ background-color: color-mix(in lab,
1481
+ var(--diffs-bg) 20%,
1482
+ var(--diffs-decoration-bar-color, transparent));
1483
+ }
1484
+
1485
+ [data-decoration-bar-depth="2"] & {
1486
+ background-color: color-mix(in lab,
1487
+ var(--diffs-bg) 45%,
1488
+ var(--diffs-decoration-bar-color, transparent));
1489
+ }
1490
+
1491
+ [data-decoration-bar-depth="3"] & {
1492
+ background-color: color-mix(in lab,
1493
+ var(--diffs-bg) 65%,
1494
+ var(--diffs-decoration-bar-color, transparent));
1495
+ }
1496
+
1497
+ [data-decoration-bar-start] & {
1498
+ border-top-left-radius: 5px;
1499
+ border-top-right-radius: 5px;
1500
+ }
1501
+
1502
+ [data-decoration-bar-end] & {
1503
+ z-index: 3;
1504
+ border-bottom-right-radius: 5px;
1505
+ border-bottom-left-radius: 5px;
1506
+ }
1507
+ }
1508
+
1509
+ [data-placeholder] {
1510
+ contain: strict;
1511
+ }
1512
+
1513
+ [data-error-wrapper] {
1514
+ padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
1515
+ var(--diffs-gap-inline, var(--diffs-gap-fallback));
1516
+ scrollbar-width: none;
1517
+ max-height: 400px;
1518
+ overflow: auto;
1519
+
1520
+ & [data-error-message] {
1521
+ color: var(--diffs-deletion-base);
1522
+ font-size: 18px;
1523
+ font-weight: bold;
1524
+ }
1525
+
1526
+ & [data-error-stack] {
1527
+ color: var(--diffs-fg-number);
1528
+ }
1529
+ }
1530
+ }
1531
+
1532
+ @layer theme, rendered, unsafe;
1533
+ `;let jo;function Qd(t){if(jo!=null)return jo;const n=t.host;if(typeof HTMLElement<"u"&&n instanceof HTMLElement&&!n.isConnected)return;const a=document.createElement("div");a.setAttribute("data-code",""),a.setAttribute(BS,"true");const l=document.createElement("div");return l.style.position="relative",l.style.width="200%",l.style.height="200%",a.appendChild(l),t.appendChild(a),jo=Math.max(a.offsetHeight-a.clientHeight,0),a.remove(),jo}function P_(t){return`${sv}: ${t==null?"var(--diffs-scrollbar-gutter-fallback)":`${t}px`};`}const V_="@layer base, theme, rendered, unsafe;",RL=new RegExp(`${ML(sv)}\\s*:\\s*[^;]+;`);function kL(t){return`${V_}
1534
+ @layer unsafe {
1535
+ ${t}
1536
+ }`}function DL(t,n="system",a){return`${V_}
1537
+ @layer rendered {
1538
+ :host {${n==="system"?"":`
1539
+ color-scheme: ${n};`}
1540
+ ${P_(a)}
1541
+ ${t}
1542
+ }
1543
+ }`}function OL(t,n){const a=P_(n);return t.replace(RL,a)}function ML(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vd({code:t,pre:n,columnType:a,rowSpan:l,containerSize:s=!1}={}){return t==null&&(t=document.createElement("code"),t.setAttribute("data-code",""),a!=null&&t.setAttribute(`data-${a}`,""),n?.appendChild(t)),l!=null?t.style.setProperty("grid-row",`span ${l}`):t.style.removeProperty("grid-row"),s?t.setAttribute("data-container-size",""):t.removeAttribute("data-container-size"),t}function NL(t,n){if(n==null)return;const a=t.shadowRoot??t.attachShadow({mode:"open"});a.innerHTML===""&&(a.innerHTML=n)}function IL(t,{type:n,diffIndicators:a,disableBackground:l,disableLineNumbers:s,overflow:u,split:f,totalLines:h,customProperties:c}){if(c!=null)for(const m in c){const v=c[m];v!=null&&t.setAttribute(m,`${v}`)}switch(n==="diff"?(t.setAttribute("data-diff",""),t.removeAttribute("data-file")):(t.setAttribute("data-file",""),t.removeAttribute("data-diff")),a){case"bars":case"classic":t.setAttribute("data-indicators",a);break;case"none":t.removeAttribute("data-indicators");break}return s?t.setAttribute("data-disable-line-numbers",""):t.removeAttribute("data-disable-line-numbers"),l?t.removeAttribute("data-background"):t.setAttribute("data-background",""),n==="diff"?t.setAttribute("data-diff-type",f?"split":"single"):t.removeAttribute("data-diff-type"),t.setAttribute("data-overflow",u),t.style.setProperty("--diffs-min-number-column-width-default",`${`${h}`.length}ch`),t}function z0(t){if(typeof HTMLStyleElement<"u"&&t instanceof HTMLStyleElement)return!0;const n=t.tagName??t.nodeName;return typeof n=="string"&&n.toLowerCase()==="style"}function zL({shadowRoot:t,currentNode:n,themeCSS:a}){if(a.trim()===""){n?.remove();return}return n??=HL(),n.textContent=a,n.parentNode!==t&&t.appendChild(n),n}function HL(){const t=document.createElement("style");return t.setAttribute(PS,""),t}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let t;class n extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const l=this.attachShadow({mode:"open"});t==null&&(t=new CSSStyleSheet,t.replaceSync(wL)),l.adoptedStyleSheets=[t]}connectedCallback(){Qd(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(av,n)}function _d(t){return{...jS,...t}}function Pa(t,n){const a=UL(t,n);return n?a:t.diffHeaderHeight+a}function UL(t,n){return t.paddingTop??(n?t.spacing:0)}function B_(t){return t.paddingBottom??t.spacing}function PL(t){switch(t){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}function Qr(t,n){return t===n||t?.cacheKey!=null&&t.cacheKey===n?.cacheKey}const VL=new TextEncoder,BL=new TextDecoder("utf-8",{ignoreBOM:!0}),GL=/[\uD800-\uDFFF]/,Zd=1024;let Va=new Uint8Array(Zd);function G_(){Va.length!==Zd&&(Va=new Uint8Array(Zd))}function tt(t){if(t.length===0)return t;if(GL.test(t))return JSON.parse(JSON.stringify(t));const n=t.length*3;Va.length<n&&(Va=new Uint8Array(n));const{written:a}=VL.encodeInto(t,Va);return BL.decode(Va.subarray(0,a))}function jL(t,n,a){try{return $L(t,n,a)}finally{G_()}}function $L(t,n,a=!1){const l=ew(t),s=l?XL(t):QL(t);let u;const f=[];for(const h of s){if(l&&!rv.test(h)){if(u==null)u=tt(h);else{if(a)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",h)}continue}else if(!l&&!ZL(h)){if(u==null)u=tt(h);else{if(a)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",h)}continue}const c=j_(h,{cacheKey:void 0,isGitDiff:l,throwOnError:a});c!=null&&f.push(c)}return{patchMetadata:u,files:f}}function qL(t,n){try{return j_(t,n)}finally{G_()}}function j_(t,{cacheKey:n,isGitDiff:a=rv.test(t),oldFile:l,newFile:s,throwOnError:u=!1}={}){let f=0;const h=Y_(t,"@@ ");let c;const m=l==null||s==null;let v=0,g=0;for(const y of h){const b=$_(y),E=b[0];if(E==null){if(u)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",y);continue}const T=F_(E);let O=0,L=0;if(T==null||c==null){if(c!=null){if(u)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",y);continue}c={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:m,additionLines:!m&&l!=null&&s!=null?H0(s.contents):[],deletionLines:!m&&l!=null&&s!=null?H0(l.contents):[],cacheKey:V0(n)},c.additionLines.length===1&&s?.contents===""&&(c.additionLines.length=0),c.deletionLines.length===1&&l?.contents===""&&(c.deletionLines.length=0);for(const W of b){if(W.startsWith("diff --git")){const K=W.trim().match(HS),Q=K?.[1]??K?.[2],ee=K?.[3]??K?.[4];if(Q==null||ee==null){if(u)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",W);continue}c.name=tt(ee.trim()),Q!==ee&&(c.prevName=tt(Q.trim()));continue}const F=W.startsWith("---")||W.startsWith("+++")?W.match(a?zS:IS):null;if(F!=null){const[,K,Q]=F;if(K==="---"&&Q!=="/dev/null"){const ee=tt(Q.trim());c.prevName=ee,c.name=ee}else K==="+++"&&Q!=="/dev/null"&&(c.name=tt(Q.trim()))}else if(a){if(W.startsWith("new mode ")&&(c.mode=tt(W.slice(8).trim())),W.startsWith("old mode ")&&(c.prevMode=tt(W.slice(8).trim())),W.startsWith("new file mode")&&(c.type="new",c.mode=tt(W.slice(13).trim())),W.startsWith("deleted file mode")&&(c.type="deleted",c.mode=tt(W.slice(17).trim())),W.startsWith("similarity index")&&(W.startsWith("similarity index 100%")?c.type="rename-pure":c.type="rename-changed"),W.startsWith("index ")){const[,K,Q,ee]=W.trim().match(US)??[];K!=null&&(c.prevObjectId=tt(K)),Q!=null&&(c.newObjectId=tt(Q)),ee!=null&&(c.mode=tt(ee))}W.startsWith("rename from ")&&(c.prevName=tt(W.slice(12).trim())),W.startsWith("rename to ")&&(c.name=tt(W.slice(10).trim()))}}continue}let A,w;for(;b.length>0&&(b[b.length-1]===`
1544
+ `||b[b.length-1]==="\r"||b[b.length-1]===`\r
1545
+ `||b[b.length-1]==="");)b.pop();const{additionStart:z,deletionStart:V}=T;v=m?v:V-1,g=m?g:z-1;const U={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:T.additionCount,additionStart:z,additionLines:O,deletionCount:T.deletionCount,deletionStart:V,deletionLines:L,deletionLineIndex:v,additionLineIndex:g,hunkContent:[],hunkContext:V0(T.hunkContext),hunkSpecs:tt(E),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let j=0,ne=0;for(let W=1;W<b.length;W++){const F=b[W];if(j>=U.additionCount&&ne>=U.deletionCount&&!F.startsWith("\\")){if(u&&KL(F)&&!WL(F))throw Error("parsePatchContent: hunk has more lines than expected");break}const K=F[0];if(K!=="+"&&K!=="-"&&K!==" "&&K!=="\\"){if(u)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${K}", full line: "${F}"`),console.error("processFile: invalid rawLine:",F);continue}const Q=tw(K);if(Q==="addition"){if(u&&j>=U.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const ee=yd(F);(A==null||A.type!=="change")&&(A=bd("change",v,g),U.hunkContent.push(A)),g++,j++,m&&c.additionLines.push(ee),A.additions++,O++,w="addition"}else if(Q==="deletion"){if(u&&ne>=U.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const ee=yd(F);(A==null||A.type!=="change")&&(A=bd("change",v,g),U.hunkContent.push(A)),v++,ne++,m&&c.deletionLines.push(ee),A.deletions++,L++,w="deletion"}else if(Q==="context"){if(u&&(ne>=U.deletionCount||j>=U.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const ee=yd(F);(A==null||A.type!=="context")&&(A=bd("context",v,g),U.hunkContent.push(A)),g++,v++,j++,ne++,m&&(c.deletionLines.push(ee),c.additionLines.push(ee)),A.lines++,w="context"}else if(Q==="metadata"&&A!=null){if(A.type==="context"?(U.noEOFCRAdditions=!0,U.noEOFCRDeletions=!0):w==="deletion"?U.noEOFCRDeletions=!0:w==="addition"&&(U.noEOFCRAdditions=!0),m&&(w==="addition"||w==="context")){const ee=c.additionLines.length-1;ee>=0&&(c.additionLines[ee]=$a(c.additionLines[ee]))}if(m&&(w==="deletion"||w==="context")){const ee=c.deletionLines.length-1;ee>=0&&(c.deletionLines[ee]=$a(c.deletionLines[ee]))}}}if(u&&(j!==U.additionCount||ne!==U.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");U.additionLines=O,U.deletionLines=L,U.collapsedBefore=Math.max(U.additionStart-1-f,0),c.hunks.push(U),f=U.additionStart+U.additionCount-1;for(const W of U.hunkContent)W.type==="context"?(U.splitLineCount+=W.lines,U.unifiedLineCount+=W.lines):(U.splitLineCount+=Math.max(W.additions,W.deletions),U.unifiedLineCount+=W.deletions+W.additions);U.splitLineStart=c.splitLineCount+U.collapsedBefore,U.unifiedLineStart=c.unifiedLineCount+U.collapsedBefore,c.splitLineCount+=U.collapsedBefore+U.splitLineCount,c.unifiedLineCount+=U.collapsedBefore+U.unifiedLineCount}if(c!=null){if(u&&m&&!a&&c.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(c.hunks.length>0&&!m&&c.additionLines.length>0&&c.deletionLines.length>0){const y=c.hunks[c.hunks.length-1],b=y.additionStart+y.additionCount-1,E=c.additionLines.length,T=Math.max(E-b,0);c.splitLineCount+=T,c.unifiedLineCount+=T}return a||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type="rename-changed":c.type="rename-pure":(l==null||l.contents==="")&&s!=null&&s.contents!==""?c.type="new":l!=null&&l.contents!==""&&(s==null||s.contents==="")&&(c.type="deleted")),c.type!=="rename-pure"&&c.type!=="rename-changed"&&(c.prevName=void 0),c}}function FL(t,n,a=!1){const l=[],s=YL(t)?t.split(NS):[t];for(const u of s)try{l.push(jL(u,n!=null?`${n}-${l.length}`:void 0,a))}catch(f){if(a)throw f;console.error(f)}return l}function YL(t){return t.startsWith("From ")||t.includes(`
1546
+ From `)}function H0(t){const n=$_(t);for(let a=0;a<n.length;a++)n[a]=tt(n[a]);return n}function $_(t){if(t.length===0)return[""];const n=[];let a=0;for(;;){const l=t.indexOf(`
1547
+ `,a);if(l===-1)break;n.push(t.slice(a,l+1)),a=l+1}return a<t.length&&n.push(t.slice(a)),n}function XL(t){return Y_(t,"diff --git")}function QL(t){if(t.length===0)return[""];const n=[];let a=0,l=0,s=0,u=0,f=!1;for(;l<t.length;){const h=Kd(t,l);if(s<=0&&u<=0){if(q_(t,l)){l>a&&n.push(t.slice(a,l)),a=l,f=!0,l=Kd(t,h);continue}if(f&&t.startsWith("@@ -",l)){const m=F_(t.slice(l,h));m!=null&&(s=m.deletionCount,u=m.additionCount)}l=h;continue}const c=t[l];if(c==="\\"){l=h;continue}c===" "?(s=Math.max(s-1,0),u=Math.max(u-1,0)):c==="-"?s=Math.max(s-1,0):c==="+"&&(u=Math.max(u-1,0)),l=h}return n.push(t.slice(a)),n}function ZL(t){return q_(t,0)}function q_(t,n){const a=Kd(t,n);return U0(t,n,"---")&&U0(t,a,"+++")}function U0(t,n,a){if(!t.startsWith(a,n))return!1;const l=t[n+a.length];if(l!==" "&&l!==" ")return!1;for(let s=n+a.length+1;s<t.length;s++){const u=t[s];if(u===`
1548
+ `||u==="\r")break;if(u!==" "&&u!==" ")return!0}return!1}function Kd(t,n){const a=t.indexOf(`
1549
+ `,n);return a===-1?t.length:a+1}function KL(t){const n=t[0];return n==="+"||n==="-"||n===" "}function WL(t){if(!t.startsWith("--"))return!1;for(let n=2;n<t.length;n++){const a=t[n];if(a!==" "&&a!==" "&&a!==`
1550
+ `&&a!=="\r")return!1}return!0}function F_(t){if(!t.startsWith("@@ -"))return;let n=4;const a=$o(t,n);if(a==null)return;const l=a.value;n=a.endIndex;let s=1;if(t[n]===","){const v=$o(t,n+1);if(v==null)return;s=v.value,n=v.endIndex}if(t[n]!==" "||t[n+1]!=="+")return;n+=2;const u=$o(t,n);if(u==null)return;const f=u.value;n=u.endIndex;let h=1;if(t[n]===","){const v=$o(t,n+1);if(v==null)return;h=v.value,n=v.endIndex}if(t[n]!==" "||t[n+1]!=="@"||t[n+2]!=="@")return;let c;const m=n+3;return t[m]===" "&&(c=JL(t.slice(m+1))),{additionCount:h,additionStart:f,deletionCount:s,deletionStart:l,hunkContext:c}}function $o(t,n){let a=n,l=0;for(;a<t.length;a++){const s=t.charCodeAt(a)-48;if(s<0||s>9)break;l=l*10+s}if(a!==n)return{value:l,endIndex:a}}function JL(t){return t.endsWith(`\r
1551
+ `)?t.slice(0,-2):t.endsWith(`
1552
+ `)?t.slice(0,-1):t}function ew(t){return t.startsWith("diff --git")||t.includes(`
1553
+ diff --git`)}function Y_(t,n){if(t.length===0)return[""];const a=`
1554
+ ${n}`,l=t.startsWith(n)?0:P0(t,a,0);if(l===-1)return[t];const s=[];l>0&&s.push(t.slice(0,l));let u=l;for(;;){const f=P0(t,a,u+1);if(f===-1)break;s.push(t.slice(u,f)),u=f}return s.push(t.slice(u)),s}function P0(t,n,a){const l=t.indexOf(n,a);return l===-1?-1:l+1}function V0(t){return t==null?t:tt(t)}function tw(t){return t===" "?"context":t==="\\"?"metadata":t==="+"?"addition":"deletion"}function yd(t){const n=t.slice(1);return tt(n===""?`
1555
+ `:n)}function bd(t,n,a){return t==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:a,deletionLineIndex:n}:{type:"context",lines:0,additionLineIndex:a,deletionLineIndex:n}}class vf{diff(n,a,l={}){let s;typeof l=="function"?(s=l,l={}):"callback"in l&&(s=l.callback);const u=this.castInput(n,l),f=this.castInput(a,l),h=this.removeEmpty(this.tokenize(u,l)),c=this.removeEmpty(this.tokenize(f,l));return this.diffWithOptionsObj(h,c,l,s)}diffWithOptionsObj(n,a,l,s){var u;const f=A=>{if(A=this.postProcess(A,l),s){setTimeout(function(){s(A)},0);return}else return A},h=a.length,c=n.length;let m=1,v=h+c;l.maxEditLength!=null&&(v=Math.min(v,l.maxEditLength));const g=(u=l.timeout)!==null&&u!==void 0?u:1/0,y=Date.now()+g,b=[{oldPos:-1,lastComponent:void 0}];let E=this.extractCommon(b[0],a,n,0,l);if(b[0].oldPos+1>=c&&E+1>=h)return f(this.buildValues(b[0].lastComponent,a,n));let T=-1/0,O=1/0;const L=()=>{for(let A=Math.max(T,-m);A<=Math.min(O,m);A+=2){let w;const z=b[A-1],V=b[A+1];z&&(b[A-1]=void 0);let U=!1;if(V){const ne=V.oldPos-A;U=V&&0<=ne&&ne<h}const j=z&&z.oldPos+1<c;if(!U&&!j){b[A]=void 0;continue}if(!j||U&&z.oldPos<V.oldPos?w=this.addToPath(V,!0,!1,0,l):w=this.addToPath(z,!1,!0,1,l),E=this.extractCommon(w,a,n,A,l),w.oldPos+1>=c&&E+1>=h)return f(this.buildValues(w.lastComponent,a,n))||!0;b[A]=w,w.oldPos+1>=c&&(O=Math.min(O,A-1)),E+1>=h&&(T=Math.max(T,A+1))}m++};if(s)(function A(){setTimeout(function(){if(m>v||Date.now()>y)return s(void 0);L()||A()},0)})();else for(;m<=v&&Date.now()<=y;){const A=L();if(A)return A}}addToPath(n,a,l,s,u){const f=n.lastComponent;return f&&!u.oneChangePerToken&&f.added===a&&f.removed===l?{oldPos:n.oldPos+s,lastComponent:{count:f.count+1,added:a,removed:l,previousComponent:f.previousComponent}}:{oldPos:n.oldPos+s,lastComponent:{count:1,added:a,removed:l,previousComponent:f}}}extractCommon(n,a,l,s,u){const f=a.length,h=l.length;let c=n.oldPos,m=c-s,v=0;for(;m+1<f&&c+1<h&&this.equals(l[c+1],a[m+1],u);)m++,c++,v++,u.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return v&&!u.oneChangePerToken&&(n.lastComponent={count:v,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=c,m}equals(n,a,l){return l.comparator?l.comparator(n,a):n===a||!!l.ignoreCase&&n.toLowerCase()===a.toLowerCase()}removeEmpty(n){const a=[];for(let l=0;l<n.length;l++)n[l]&&a.push(n[l]);return a}castInput(n,a){return n}tokenize(n,a){return Array.from(n)}join(n){return n.join("")}postProcess(n,a){return n}get useLongestToken(){return!1}buildValues(n,a,l){const s=[];let u;for(;n;)s.push(n),u=n.previousComponent,delete n.previousComponent,n=u;s.reverse();const f=s.length;let h=0,c=0,m=0;for(;h<f;h++){const v=s[h];if(v.removed)v.value=this.join(l.slice(m,m+v.count)),m+=v.count;else{if(!v.added&&this.useLongestToken){let g=a.slice(c,c+v.count);g=g.map(function(y,b){const E=l[m+b];return E.length>y.length?E:y}),v.value=this.join(g)}else v.value=this.join(a.slice(c,c+v.count));c+=v.count,v.added||(m+=v.count)}}return s}}class nw extends vf{}const iw=new nw;function aw(t,n,a){return iw.diff(t,n,a)}const B0="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}";class rw extends vf{tokenize(n){const a=new RegExp(`(\\r?\\n)|[${B0}]+|[^\\S\\n\\r]+|[^${B0}]`,"ug");return n.match(a)||[]}}const lw=new rw;function ow(t,n,a){return lw.diff(t,n,a)}class sw extends vf{constructor(){super(...arguments),this.tokenize=cw}equals(n,a,l){return l.ignoreWhitespace?((!l.newlineIsToken||!n.includes(`
1556
+ `))&&(n=n.trim()),(!l.newlineIsToken||!a.includes(`
1557
+ `))&&(a=a.trim())):l.ignoreNewlineAtEof&&!l.newlineIsToken&&(n.endsWith(`
1558
+ `)&&(n=n.slice(0,-1)),a.endsWith(`
1559
+ `)&&(a=a.slice(0,-1))),super.equals(n,a,l)}}const uw=new sw;function G0(t,n,a){return uw.diff(t,n,a)}function cw(t,n){n.stripTrailingCr&&(t=t.replace(/\r\n/g,`
1560
+ `));const a=[],l=t.split(/(\n|\r\n)/);l[l.length-1]||l.pop();for(let s=0;s<l.length;s++){const u=l[s];s%2&&!n.newlineIsToken?a[a.length-1]+=u:a.push(u)}return a}function dw(t){for(let n=0;n<t.length;n++)if(t[n]<" "||t[n]>"~"||t[n]==='"'||t[n]==="\\")return!0;return!1}function mi(t){if(!dw(t))return t;let n='"';const a=new TextEncoder().encode(t);let l=0;for(;l<a.length;){const s=a[l];s===7?n+="\\a":s===8?n+="\\b":s===9?n+="\\t":s===10?n+="\\n":s===11?n+="\\v":s===12?n+="\\f":s===13?n+="\\r":s===34?n+='\\"':s===92?n+="\\\\":s>=32&&s<=126?n+=String.fromCharCode(s):n+="\\"+s.toString(8).padStart(3,"0"),l++}return n+='"',n}const j0={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function $0(t,n,a,l,s,u,f){let h;f?typeof f=="function"?h={callback:f}:h=f:h={},typeof h.context>"u"&&(h.context=4);const c=h.context;if(h.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(h.callback){const{callback:v}=h;G0(a,l,Object.assign(Object.assign({},h),{callback:g=>{const y=m(g);v(y)}}))}else return m(G0(a,l,h));function m(v){if(!v)return;v.push({value:"",lines:[]});function g(A){return A.map(function(w){return" "+w})}const y=[];let b=0,E=0,T=[],O=1,L=1;for(let A=0;A<v.length;A++){const w=v[A],z=w.lines||hw(w.value);if(w.lines=z,w.added||w.removed){if(!b){const V=v[A-1];b=O,E=L,V&&(T=c>0?g(V.lines.slice(-c)):[],b-=T.length,E-=T.length)}for(const V of z)T.push((w.added?"+":"-")+V);w.added?L+=z.length:O+=z.length}else{if(b)if(z.length<=c*2&&A<v.length-2)for(const V of g(z))T.push(V);else{const V=Math.min(z.length,c);for(const j of g(z.slice(0,V)))T.push(j);const U={oldStart:b,oldLines:O-b+V,newStart:E,newLines:L-E+V,lines:T};y.push(U),b=0,E=0,T=[]}O+=z.length,L+=z.length}}for(const A of y)for(let w=0;w<A.lines.length;w++)A.lines[w].endsWith(`
1561
+ `)?A.lines[w]=A.lines[w].slice(0,-1):(A.lines.splice(w+1,0,"\"),w++);return{oldFileName:t,newFileName:n,oldHeader:s,newHeader:u,hunks:y}}}function Wd(t,n){var a,l,s,u,f,h;if(n||(n=j0),Array.isArray(t)){if(t.length>1&&!n.includeFileHeaders&&!t.every(v=>v.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return t.map(v=>Wd(v,n)).join(`
1562
+ `)}const c=[];if(t.isGit){if(n=j0,!t.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!t.newFileName)throw new Error("newFileName must be specified for Git patches");let v=t.oldFileName,g=t.newFileName;t.isCreate&&v==="/dev/null"?v=g.replace(/^b\//,"a/"):t.isDelete&&g==="/dev/null"&&(g=v.replace(/^a\//,"b/")),c.push("diff --git "+mi(v)+" "+mi(g)),t.isDelete&&c.push("deleted file mode "+((a=t.oldMode)!==null&&a!==void 0?a:"100644")),t.isCreate&&c.push("new file mode "+((l=t.newMode)!==null&&l!==void 0?l:"100644")),t.oldMode&&t.newMode&&!t.isDelete&&!t.isCreate&&(c.push("old mode "+t.oldMode),c.push("new mode "+t.newMode)),t.isRename&&(c.push("rename from "+mi(((s=t.oldFileName)!==null&&s!==void 0?s:"").replace(/^a\//,""))),c.push("rename to "+mi(((u=t.newFileName)!==null&&u!==void 0?u:"").replace(/^b\//,"")))),t.isCopy&&(c.push("copy from "+mi(((f=t.oldFileName)!==null&&f!==void 0?f:"").replace(/^a\//,""))),c.push("copy to "+mi(((h=t.newFileName)!==null&&h!==void 0?h:"").replace(/^b\//,""))))}else n.includeIndex&&t.oldFileName==t.newFileName&&t.oldFileName!==void 0&&c.push("Index: "+t.oldFileName),n.includeUnderline&&c.push("===================================================================");const m=t.hunks.length>0;n.includeFileHeaders&&t.oldFileName!==void 0&&t.newFileName!==void 0&&(!t.isGit||m)&&(c.push("--- "+mi(t.oldFileName)+(t.oldHeader?" "+t.oldHeader:"")),c.push("+++ "+mi(t.newFileName)+(t.newHeader?" "+t.newHeader:"")));for(let v=0;v<t.hunks.length;v++){const g=t.hunks[v],y=g.oldLines===0?g.oldStart-1:g.oldStart,b=g.newLines===0?g.newStart-1:g.newStart;c.push("@@ -"+y+","+g.oldLines+" +"+b+","+g.newLines+" @@");for(const E of g.lines)c.push(E)}return c.join(`
1563
+ `)+`
1564
+ `}function fw(t,n,a,l,s,u,f){if(typeof f=="function"&&(f={callback:f}),f?.callback){const{callback:h}=f;$0(t,n,a,l,s,u,Object.assign(Object.assign({},f),{callback:c=>{h(c?Wd(c,f.headerOptions):void 0)}}))}else{const h=$0(t,n,a,l,s,u,f);return h?Wd(h,f?.headerOptions):void 0}}function hw(t){const n=t.endsWith(`
1565
+ `),a=t.split(`
1566
+ `).map(l=>l+`
1567
+ `);return n?a.pop():a.push(a.pop().slice(0,-1)),a}function Jd(t,n,a,l=!1){const s=qL(fw(t.name,n.name,t.contents,n.contents,t.header,n.header,a),{cacheKey:(()=>{if(t.cacheKey!=null&&n.cacheKey!=null)return`${t.cacheKey}:${n.cacheKey}`})(),oldFile:t,newFile:n,throwOnError:l});if(s==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return n.lang!=null&&(s.lang=n.lang),s}var pw=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(t,n,a){if(n==null||a==null)for(const l of t.children??[])l instanceof HTMLElement&&("deletions"in l.dataset?n=l:"additions"in l.dataset&&(a=l));if(a==null||n==null){this.cleanUp();return}this.codeDeletions!==n&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=n,n.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==a&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=a,a.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function qr(t,n){return rf(t.theme,n.theme)&&t.useTokenTransformer===n.useTokenTransformer&&t.tokenizeMaxLineLength===n.tokenizeMaxLineLength&&t.lineDiffType===n.lineDiffType&&t.maxLineDiffLength===n.maxLineDiffLength}function qo(t){return ye({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":t,style:`grid-row: span ${t};min-height:calc(${t} * 1lh)`}})}function Fo(t){return ye({tagName:"div",children:[ye({tagName:"span",children:[yn("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":t,"data-column-content":""}})}function Sd(t){return ye({tagName:"div",children:[is({name:t==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":t==="both"?"":void 0,"data-expand-up":t==="up"?"":void 0,"data-expand-down":t==="down"?"":void 0}})}function za({type:t,content:n,expandIndex:a,chunked:l=!1,slotName:s,isFirstHunk:u,isLastHunk:f}){let h=0;const c=[];if(t==="metadata"&&n!=null&&c.push(ye({tagName:"div",children:[yn(n)],properties:{"data-separator-wrapper":""}})),(t==="line-info"||t==="line-info-basic")&&n!=null){const m=[];a!=null&&(l?(u||(m.push(Sd("up")),h++),f||(m.push(Sd("down")),h++)):(m.push(Sd(!u&&!f?"both":u?"down":"up")),h++)),m.push(ye({tagName:"div",children:[ye({tagName:"span",children:[yn(n)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),l&&a!=null&&m.push(ye({tagName:"div",children:[yn("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),c.push(ye({tagName:"div",children:m,properties:{"data-separator-wrapper":"","data-separator-multi-button":h>1?"":void 0}}))}return t==="custom"&&s!=null&&c.push(ye({tagName:"slot",properties:{name:s}})),ye({tagName:"div",children:c,properties:{"data-separator":c.length===0?"simple":t,"data-expand-index":a,"data-separator-first":u?"":void 0,"data-separator-last":f?"":void 0}})}function mw(t,n){return`hunk-separator-${t}-${n}`}function gw(t){const n=t.at(-1);return n==null?0:Math.max(n.additionStart+n.additionCount,n.deletionStart+n.deletionCount)}function vw(t){return t.startingLine===0&&t.totalLines===1/0&&t.bufferBefore===0&&t.bufferAfter===0}function q0({line:t,spanStart:n,spanLength:a}){return{start:{line:t,character:n},end:{line:t,character:n+a},properties:{"data-diff-span":""},alwaysWrap:!0}}function Yo({item:t,arr:n,enableJoin:a,isNeutral:l=!1,isLastItem:s=!1}){const u=n[n.length-1];if(u==null||s||!a){n.push([l?0:1,t.value]);return}const f=u[0]===0;if(l===f||l&&t.value.length===1&&!f){u[1]+=t.value;return}n.push([l?0:1,t.value])}function ul({isPartial:t,rangeSize:n,expandedHunks:a,hunkIndex:l,collapsedContextThreshold:s}){const u=Math.max(n,0);if(u===0||t)return{fromStart:0,fromEnd:0,rangeSize:u,collapsedLines:u,renderAll:!1};if(a===!0||u<=s)return{fromStart:u,fromEnd:0,rangeSize:u,collapsedLines:0,renderAll:!0};const f=a?.get(l),h=Math.min(Math.max(f?.fromStart??0,0),u),c=Math.min(Math.max(f?.fromEnd??0,0),u),m=h+c,v=m>=u;return{fromStart:v?u:h,fromEnd:v?0:c,rangeSize:u,collapsedLines:Math.max(u-m,0),renderAll:v}}function X_({fileDiff:t,errorPrefix:n}){const a=t.hunks[t.hunks.length-1];if(a==null||t.isPartial||t.additionLines.length===0||t.deletionLines.length===0)return 0;const l=t.additionLines.length-(a.additionLineIndex+a.additionCount),s=t.deletionLines.length-(a.deletionLineIndex+a.deletionCount);if(l<=0&&s<=0)return 0;if(l!==s)throw new Error(`${n}: trailing context mismatch (additions=${l}, deletions=${s}) for ${t.name}`);return Math.min(l,s)}function cl({fileDiff:t,hunkIndex:n,expandedHunks:a,collapsedContextThreshold:l,errorPrefix:s}){if(n!==t.hunks.length-1)return;const u=X_({fileDiff:t,errorPrefix:s});if(u<=0)return;if(a===!0||u<=l)return{fromStart:u,fromEnd:0,rangeSize:u,collapsedLines:0,renderAll:!0};const f=a?.get(t.hunks.length),h=Math.min(Math.max(f?.fromStart??0,0),u);return{fromStart:h,fromEnd:0,rangeSize:u,collapsedLines:u-h,renderAll:h>=u}}function Q_({type:t,metrics:n}){return n.hunkSeparatorHeight??PL(t)}function Z_({type:t,metrics:n}){return t==="simple"||t==="metadata"||t==="line-info-basic"?0:n.spacing}function _w({type:t,hunkIndex:n,hunkSpecs:a}){switch(t){case"simple":return n>0;case"metadata":return a!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function yw(t){return t!=="simple"&&t!=="metadata"}function Zr({type:t,metrics:n,hunkIndex:a,hunkSpecs:l}){if(!_w({type:t,hunkIndex:a,hunkSpecs:l}))return;const s=Q_({type:t,metrics:n}),u=Z_({type:t,metrics:n}),f=a>0?u:0,h=u;return{height:s,gapBefore:f,gapAfter:h,totalHeight:f+s+h}}function Kr({type:t,metrics:n}){if(!yw(t))return;const a=Q_({type:t,metrics:n}),l=Z_({type:t,metrics:n});return{height:a,gapBefore:l,gapAfter:0,totalHeight:l+a}}function tl({diff:t,diffStyle:n,startingLine:a=0,totalLines:l=1/0,expandedHunks:s,collapsedContextThreshold:u=1,callback:f}){const h=bw({diff:t,diffStyle:n,startingLine:a,expandedHunks:s,collapsedContextThreshold:u}),c={viewportStart:a,viewportEnd:a+l,isWindowedHighlight:a>0||l<1/0,splitCount:h.splitCount,unifiedCount:h.unifiedCount,finalHunkIndex:t.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;const g=c.unifiedCount>=a+l,y=c.splitCount>=a+l;return n==="unified"?g:(n==="split"||g)&&y},shouldSkip(g,y){if(!c.isWindowedHighlight)return!1;const b=c.unifiedCount+g<a,E=c.splitCount+y<a;return n==="unified"?b:(n==="split"||b)&&E},incrementCounts(g,y){(n==="unified"||n==="both")&&(c.unifiedCount+=g),(n==="split"||n==="both")&&(c.splitCount+=y)},isInWindow(g,y){if(!c.isWindowedHighlight)return!0;const b=c.isInUnifiedWindow(g),E=c.isInSplitWindow(y);return n==="unified"?b:n==="split"?E:b||E},isInUnifiedWindow(g){return!c.isWindowedHighlight||c.unifiedCount>=a-g&&c.unifiedCount<a+l},isInSplitWindow(g){return!c.isWindowedHighlight||c.splitCount>=a-g&&c.splitCount<a+l},emit(g,y=!1){return y||(n==="unified"?c.incrementCounts(1,0):n==="split"?c.incrementCounts(0,1):c.incrementCounts(1,1)),f(g)??!1}};e:for(let g=h.hunkIndex;g<t.hunks.length;g++){let O=function(F,K){return E==null||E.collapsedLines<=0||E.fromStart+E.fromEnd>0?0:n==="unified"?F===y.unifiedLineStart+y.unifiedLineCount-1?E.collapsedLines:0:K===y.splitLineStart+y.splitLineCount-1?E.collapsedLines:0},A=function(){return L?0:(L=!0,b.collapsedLines)};var m=O,v=A;const y=t.hunks[g];if(y==null)throw new Error("iterateOverDiff: invalid hunk index");if(c.shouldBreak())break;const b=ul({isPartial:t.isPartial,rangeSize:y.collapsedBefore,expandedHunks:s,hunkIndex:g,collapsedContextThreshold:u}),E=g===c.finalHunkIndex?cl({fileDiff:t,hunkIndex:g,expandedHunks:s,collapsedContextThreshold:u,errorPrefix:"iterateOverDiff"}):void 0,T=b.fromStart+b.fromEnd;let L=b.collapsedLines===0;if(c.shouldSkip(T,T))c.incrementCounts(T,T),A();else{let F=y.unifiedLineStart-b.rangeSize,K=y.splitLineStart-b.rangeSize,Q=y.deletionLineIndex-b.rangeSize,ee=y.additionLineIndex-b.rangeSize,oe=y.deletionStart-b.rangeSize,fe=y.additionStart-b.rangeSize;if(Xo(c,b.fromStart,n,M=>c.emit({hunkIndex:g,hunk:y,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:oe+M,lineIndex:Q+M,noEOFCR:!1,unifiedLineIndex:F+M,splitLineIndex:K+M},additionLine:{unifiedLineIndex:F+M,splitLineIndex:K+M,lineIndex:ee+M,lineNumber:fe+M,noEOFCR:!1}}))||(F=y.unifiedLineStart-b.fromEnd,K=y.splitLineStart-b.fromEnd,Q=y.deletionLineIndex-b.fromEnd,ee=y.additionLineIndex-b.fromEnd,oe=y.deletionStart-b.fromEnd,fe=y.additionStart-b.fromEnd,Xo(c,b.fromEnd,n,M=>c.emit({hunkIndex:g,hunk:y,collapsedBefore:A(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:oe+M,lineIndex:Q+M,noEOFCR:!1,unifiedLineIndex:F+M,splitLineIndex:K+M},additionLine:{unifiedLineIndex:F+M,splitLineIndex:K+M,lineIndex:ee+M,lineNumber:fe+M,noEOFCR:!1}}),()=>{A()})))break e}let w=y.unifiedLineStart,z=y.splitLineStart,V=y.deletionLineIndex,U=y.additionLineIndex,j=y.deletionStart,ne=y.additionStart;const W=y.hunkContent.at(-1);for(const F of y.hunkContent){if(c.shouldBreak())break e;const K=F===W;if(F.type==="context"){if(c.shouldSkip(F.lines,F.lines))c.incrementCounts(F.lines,F.lines),A();else if(Xo(c,F.lines,n,Q=>{const ee=K&&Q===F.lines-1,oe=w+Q,fe=z+Q;return c.emit({hunkIndex:g,hunk:y,collapsedBefore:A(),collapsedAfter:O(oe,fe),type:"context",deletionLine:{lineNumber:j+Q,lineIndex:V+Q,noEOFCR:ee&&y.noEOFCRDeletions,unifiedLineIndex:oe,splitLineIndex:fe},additionLine:{unifiedLineIndex:oe,splitLineIndex:fe,lineIndex:U+Q,lineNumber:ne+Q,noEOFCR:ee&&y.noEOFCRAdditions}})},()=>{A()}))break e;w+=F.lines,z+=F.lines,V+=F.lines,U+=F.lines,j+=F.lines,ne+=F.lines}else{const Q=Math.max(F.deletions,F.additions),ee=F.deletions+F.additions;if(!c.shouldSkip(ee,Q)){const oe=Cw(c,F,n);(oe[0]?.[0]??0)>0&&A();for(const[fe,M]of oe)for(let Y=fe;Y<M;Y++){const te=O(w+Y,n==="unified"?z+(Y<F.deletions?Y:Y-F.deletions):z+Y);if(c.emit(Aw({hunkIndex:g,hunk:y,collapsedBefore:A(),collapsedAfter:te,diffStyle:n,index:Y,unifiedLineIndex:w,splitLineIndex:z,additionLineIndex:U,deletionLineIndex:V,additionLineNumber:ne,deletionLineNumber:j,content:F,isLastContent:K,unifiedCount:ee,splitCount:Q}),!0))break e}}A(),c.incrementCounts(ee,Q),w+=ee,z+=Q,V+=F.deletions,U+=F.additions,j+=F.deletions,ne+=F.additions}}if(E!=null){const{collapsedLines:F,fromStart:K,fromEnd:Q}=E,ee=K+Q;if(Xo(c,ee,n,oe=>{const fe=oe===ee-1;return c.emit({hunkIndex:t.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:fe?F:0,type:"context-expanded",deletionLine:{lineNumber:j+oe,lineIndex:V+oe,noEOFCR:!1,unifiedLineIndex:w+oe,splitLineIndex:z+oe},additionLine:{unifiedLineIndex:w+oe,splitLineIndex:z+oe,lineIndex:U+oe,lineNumber:ne+oe,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break e}}}function bw({diff:t,diffStyle:n,startingLine:a,expandedHunks:l,collapsedContextThreshold:s}){if(a<=0||n==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const u=Sw({diff:t,expandedHunks:l,collapsedContextThreshold:s});let f=0,h=t.hunks.length-1,c=t.hunks.length;for(;f<=h;){const v=f+h>>1,g=u[v+1];if(g==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(n==="unified"?g.unifiedCount:g.splitCount)>a?(c=v,h=v-1):f=v+1}if(c>=t.hunks.length){const v=u[t.hunks.length];if(v==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:t.hunks.length,splitCount:v.splitCount,unifiedCount:v.unifiedCount}}const m=u[c];if(m==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:c,splitCount:m.splitCount,unifiedCount:m.unifiedCount}}function Sw({diff:t,expandedHunks:n,collapsedContextThreshold:a}){let l=0,s=0;const u=t.hunks.length-1,f=[{splitCount:0,unifiedCount:0}];for(let h=0;h<t.hunks.length;h++){const c=t.hunks[h];if(c==null)throw new Error("iterateOverDiff: invalid hunk summary index");const m=ul({isPartial:t.isPartial,rangeSize:c.collapsedBefore,expandedHunks:n,hunkIndex:h,collapsedContextThreshold:a}),v=m.fromStart+m.fromEnd;l+=v+c.splitLineCount,s+=v+c.unifiedLineCount;const g=h===u?cl({fileDiff:t,hunkIndex:h,expandedHunks:n,collapsedContextThreshold:a,errorPrefix:"iterateOverDiff"}):void 0;if(g!=null){const y=g.fromStart+g.fromEnd;l+=y,s+=y}f.push({splitCount:l,unifiedCount:s})}return f}function Ew(t,n,a){if(!t.isWindowedHighlight||n<=0)return[0,n];const l=[];function s(h){const c=Math.max(0,t.viewportStart-h),m=Math.min(n,t.viewportEnd-h);m>c&&l.push([c,m])}if(a!=="split"&&s(t.unifiedCount),a!=="unified"&&s(t.splitCount),l.length===0)return[0,0];let u=l[0][0],f=l[0][1];for(let h=1;h<l.length;h++){const c=l[h];u=Math.min(u,c[0]),f=Math.max(f,c[1])}return[u,f]}function Xo(t,n,a,l,s,u){const[f,h]=Ew(t,n,a);f>0&&(t.incrementCounts(f,f),s?.());let c=f;for(;c<n;){if(u?.()===!0)return!0;if(c>=h){t.incrementCounts(n-c,n-c);break}if(t.isInWindow(0,0)){if(l(c)===!0)return!0}else t.incrementCounts(1,1);c++}return!1}function Cw(t,n,a){if(!t.isWindowedHighlight)return[[0,a==="unified"?n.deletions+n.additions:Math.max(n.deletions,n.additions)]];const l=a!=="split",s=a!=="unified",u=a==="unified"?"unified":"split",f=[];function h(g,y){if(g+y<=t.viewportStart||g>=t.viewportEnd)return;const b=Math.max(0,t.viewportStart-g),E=Math.min(y,t.viewportEnd-g);return E>b?[b,E]:void 0}function c(g,y){return u==="split"?g:y==="additions"?[g[0]+n.deletions,g[1]+n.deletions]:g}function m(g,y){if(g==null)return;const[b,E]=c(g,y);E>b&&f.push([b,E])}if(l&&(m(h(t.unifiedCount,n.deletions),"deletions"),m(h(t.unifiedCount+n.deletions,n.additions),"additions")),s&&(m(h(t.splitCount,n.deletions),"deletions"),m(h(t.splitCount,n.additions),"additions")),f.length===0)return f;f.sort((g,y)=>g[0]-y[0]);const v=[f[0]];for(const[g,y]of f.slice(1)){const b=v[v.length-1];g<=b[1]?b[1]=Math.max(b[1],y):v.push([g,y])}return v}function Aw({hunkIndex:t,hunk:n,collapsedAfter:a,collapsedBefore:l,diffStyle:s,index:u,unifiedLineIndex:f,splitLineIndex:h,additionLineIndex:c,deletionLineIndex:m,additionLineNumber:v,deletionLineNumber:g,content:y,isLastContent:b,unifiedCount:E,splitCount:T}){const O=u<y.deletions?f+u:void 0,L=s==="unified"?u>=y.deletions?f+u:void 0:u<y.additions?f+y.deletions+u:void 0,A=s==="unified"?h+(u<y.deletions?u:u-y.deletions):h+u,w=u<y.deletions?m+u:void 0,z=u<y.deletions?g+u:void 0,V=s==="unified"?u>=y.deletions?c+(u-y.deletions):void 0:u<y.additions?c+u:void 0,U=s==="unified"?u>=y.deletions?v+(u-y.deletions):void 0:u<y.additions?v+u:void 0,j=s==="unified"?b&&u===y.deletions-1&&n.noEOFCRDeletions:b&&u===T-1&&n.noEOFCRDeletions,ne=s==="unified"?b&&u===E-1&&n.noEOFCRAdditions:b&&u===T-1&&n.noEOFCRAdditions,W=w!=null&&z!=null&&O!=null?{lineNumber:z,lineIndex:w,noEOFCR:j,unifiedLineIndex:O,splitLineIndex:A}:void 0,F=V!=null&&U!=null&&L!=null?{unifiedLineIndex:L,splitLineIndex:A,lineIndex:V,lineNumber:U,noEOFCR:ne}:void 0;if(W==null&&F!=null)return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:a,collapsedBefore:l,deletionLine:void 0,additionLine:F};if(W!=null&&F==null)return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:a,collapsedBefore:l,deletionLine:W,additionLine:void 0};if(W==null||F==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:a,collapsedBefore:l,deletionLine:W,additionLine:F}}const Tw={forcePlainText:!1};function xw(t,n,a,{forcePlainText:l,startingLine:s,totalLines:u,expandedHunks:f,collapsedContextThreshold:h=1}=Tw){l?(s??=0,u??=1/0):(s=0,u=1/0);const c=s>0||u<1/0,m=typeof a.theme=="string"?n.getTheme(a.theme).type:void 0,v=vL({theme:a.theme,highlighter:n}),g=l&&!c&&(t.unifiedLineCount>1e3||t.splitLineCount>1e3)?"none":a.lineDiffType,y={deletionLines:[],additionLines:[]},{maxLineDiffLength:b}=a,E=!l&&!t.isPartial,T=l?f:void 0,O=new Map;function L(w){const z=E?0:w,V=O.get(z)??ww();return O.set(z,V),V}function A(w,z,V,U){if(c){let j=V.at(-1);(j==null||j.targetIndex+j.count!==z)&&(j={targetIndex:z,originalOffset:U.length,count:0},V.push(j)),j.count++}U.push(w)}tl({diff:t,diffStyle:"both",startingLine:s,totalLines:u,expandedHunks:c?T:!0,collapsedContextThreshold:h,callback:({hunkIndex:w,additionLine:z,deletionLine:V,type:U})=>{const j=L(w),ne=z!=null?z.splitLineIndex:V.splitLineIndex;U==="change"&&z!=null&&V!=null&&Lw({additionLine:t.additionLines[z.lineIndex],deletionLine:t.deletionLines[V.lineIndex],deletionLineIndex:j.deletionContent.length,additionLineIndex:j.additionContent.length,deletionDecorations:j.deletionDecorations,additionDecorations:j.additionDecorations,lineDiffType:g,maxLineDiffLength:b}),V!=null&&(A(t.deletionLines[V.lineIndex],V.lineIndex,j.deletionSegments,j.deletionContent),j.deletionInfo.push({type:U==="change"?"change-deletion":U,lineNumber:V.lineNumber,altLineNumber:U==="change"?void 0:z.lineNumber??void 0,lineIndex:`${V.unifiedLineIndex},${ne}`})),z!=null&&(A(t.additionLines[z.lineIndex],z.lineIndex,j.additionSegments,j.additionContent),j.additionInfo.push({type:U==="change"?"change-addition":U,lineNumber:z.lineNumber,altLineNumber:U==="change"?void 0:V.lineNumber??void 0,lineIndex:`${z.unifiedLineIndex},${ne}`}))}});for(const w of O.values()){if(w.deletionContent.length===0&&w.additionContent.length===0)continue;const z={name:t.prevName??t.name,contents:w.deletionContent.value},V={name:t.name,contents:w.additionContent.value},{deletionLines:U,additionLines:j}=Rw({deletionFile:z,deletionInfo:w.deletionInfo,deletionDecorations:w.deletionDecorations,additionFile:V,additionInfo:w.additionInfo,additionDecorations:w.additionDecorations,highlighter:n,options:a,languageOverride:l?"text":t.lang});if(E){y.deletionLines=U,y.additionLines=j;continue}if(w.deletionSegments.length>0)for(const ne of w.deletionSegments)for(let W=0;W<ne.count;W++)y.deletionLines[ne.targetIndex+W]=U[ne.originalOffset+W];else y.deletionLines.push(...U);if(w.additionSegments.length>0)for(const ne of w.additionSegments)for(let W=0;W<ne.count;W++)y.additionLines[ne.targetIndex+W]=j[ne.originalOffset+W];else y.additionLines.push(...j)}return{code:y,themeStyles:v,baseThemeType:m}}function Lw({deletionLine:t,additionLine:n,deletionLineIndex:a,additionLineIndex:l,deletionDecorations:s,additionDecorations:u,lineDiffType:f,maxLineDiffLength:h}){if(t==null||n==null||f==="none"||(t=$a(t),n=$a(n),t.length>h||n.length>h))return;const c=f==="char"?aw(t,n):ow(t,n),m=[],v=[],g=f==="word-alt",y=c.at(-1);for(const E of c){const T=E===y;!E.added&&!E.removed?(Yo({item:E,arr:m,enableJoin:g,isNeutral:!0,isLastItem:T}),Yo({item:E,arr:v,enableJoin:g,isNeutral:!0,isLastItem:T})):E.removed?Yo({item:E,arr:m,enableJoin:g,isLastItem:T}):Yo({item:E,arr:v,enableJoin:g,isLastItem:T})}let b=0;for(const E of m)E[0]===1&&s.push(q0({line:a,spanStart:b,spanLength:E[1].length})),b+=E[1].length;b=0;for(const E of v)E[0]===1&&u.push(q0({line:l,spanStart:b,spanLength:E[1].length})),b+=E[1].length}function ww(){return{deletionContent:{push(t){this.value+=t,this.length++},value:"",length:0},additionContent:{push(t){this.value+=t,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function Rw({deletionFile:t,additionFile:n,deletionInfo:a,additionInfo:l,highlighter:s,deletionDecorations:u,additionDecorations:f,languageOverride:h,options:{theme:c=Jt,...m}}){const v=h??qi(t.name),g=h??qi(n.name),{state:y,transformers:b}=uL(m.useTokenTransformer),E=typeof c=="string"?{...m,lang:"text",theme:c,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:sn("token"),tokenizeTimeLimit:0}:{...m,lang:"text",themes:c,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:sn("token"),tokenizeTimeLimit:0};return{deletionLines:t.contents===""?[]:(E.lang=v,y.lineInfo=a,E.decorations=u,M0(s.codeToHast($a(t.contents),E))),additionLines:n.contents===""?[]:(E.lang=g,E.decorations=f,y.lineInfo=l,M0(s.codeToHast($a(n.contents),E)))}}function ef(t){const n=t.lang??qi(t.name),a=t.lang??(t.prevName!=null?qi(t.prevName):"text");return n==="text"&&a==="text"}let kw=-1;var Dw=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++kw}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(t={theme:Jt},n,a){this.options=t,this.onRenderUpdate=n,this.workerManager=a,a?.isWorkingPool()!==!0&&(this.highlighter=dd(t.theme??Jt)?Xx():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(t){this.options=t}mergeOptions(t){this.options={...this.options,...t}}expandHunk(t,n,a=this.getOptionsWithDefaults().expansionLineCount){const l={...this.expandedHunks.get(t)??{fromStart:0,fromEnd:0}};(n==="up"||n==="both")&&(l.fromStart+=a),(n==="down"||n==="both")&&(l.fromEnd+=a),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(t,l)}getExpandedHunk(t){return this.expandedHunks.get(t)??$S}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(t){this.additionAnnotations={},this.deletionAnnotations={};for(const n of t){const a=(()=>{switch(n.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),l=a[n.lineNumber]??[];a[n.lineNumber]=l,l.push(n)}}getUnifiedLineDecoration({lineType:t}){return{gutterLineType:t}}getSplitLineDecoration({side:t,type:n}){return n!=="change"?{gutterLineType:n}:{gutterLineType:t==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement=t=>Zx(t);getOptionsWithDefaults(){const{diffIndicators:t="bars",diffStyle:n="split",disableBackground:a=!1,disableFileHeader:l=!1,disableLineNumbers:s=!1,disableVirtualizationBuffers:u=!1,collapsed:f=!1,expandUnchanged:h=!1,collapsedContextThreshold:c=1,expansionLineCount:m=100,hunkSeparators:v="line-info",lineDiffType:g="word-alt",maxLineDiffLength:y=1e3,overflow:b="scroll",stickyHeader:E=!1,theme:T=Jt,headerRenderMode:O="default",tokenizeMaxLineLength:L=1e3,tokenizeMaxLength:A=GS,useTokenTransformer:w=!1,useCSSClasses:z=!1}=this.options;return{diffIndicators:t,diffStyle:n,disableBackground:a,disableFileHeader:l,disableLineNumbers:s,disableVirtualizationBuffers:u,collapsed:f,expandUnchanged:h,collapsedContextThreshold:c,expansionLineCount:m,hunkSeparators:v,lineDiffType:g,maxLineDiffLength:y,overflow:b,stickyHeader:E,theme:this.workerManager?.getDiffRenderOptions().theme??T,headerRenderMode:O,tokenizeMaxLineLength:L,tokenizeMaxLength:A,useTokenTransformer:w,useCSSClasses:z}}async initializeHighlighter(){return this.highlighter=await Yx(iL(this.computedLang,this.options)),this.highlighter}hydrate(t){if(t==null)return;this.diff=t;const{options:n}=this.getRenderOptions(t),a=Cd(t,this.getTokenizeMaxLength());let l=this.workerManager?.getDiffResultCache(t);l!=null&&!qr(n,l.options)&&(l=void 0),this.renderCache??={diff:t,highlighted:!a&&!ef(t),options:n,result:a?void 0:l?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!a&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=t.lang??qi(t.name),this.initializeHighlighter())}getRenderOptions(t){const n=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:l,tokenizeMaxLineLength:s,lineDiffType:u,maxLineDiffLength:f}=this.getOptionsWithDefaults();return{theme:l,useTokenTransformer:SL(this.options),tokenizeMaxLineLength:s,lineDiffType:u,maxLineDiffLength:f}})();this.getOptionsWithDefaults();const{renderCache:a}=this;return a?.result==null?{options:n,forceHighlight:!0}:!Qr(t,a.diff)||!qr(n,a.options)?{options:n,forceHighlight:!0}:{options:n,forceHighlight:!1}}renderDiff(t=this.renderCache?.diff,n=Lg){if(t==null)return;const{expandUnchanged:a=!1,collapsedContextThreshold:l}=this.getOptionsWithDefaults();let{options:s,forceHighlight:u}=this.getRenderOptions(t);const f=this.getMatchingWorkerResultCache(t,s);f!=null&&!this.hasHighlightedRenderCache(t,s)&&(this.renderCache={diff:t,highlighted:!0,renderRange:void 0,...f},u=!1),this.renderCache??={diff:t,highlighted:!1,options:s,result:void 0,renderRange:void 0};const h=t.additionLines.length>0||t.deletionLines.length>0,c=!h||ef(t)||Cd(t,this.getTokenizeMaxLength()),m=!Qr(t,this.renderCache.diff),v=!z_(this.renderCache.renderRange,n);if(this.workerManager?.isWorkingPool()===!0)(c||this.renderCache.result==null||!this.renderCache.highlighted&&(m||v))&&(this.renderCache.diff=t,this.renderCache.options=s,this.renderCache.highlighted=!1,(this.renderCache.result==null||m||v||u)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(t,n.startingLine,n.totalLines,vw(n)||a?!0:this.expandedHunks,l)),this.renderCache.renderRange=n),!c&&h&&(!this.renderCache.highlighted||u)&&this.workerManager.highlightDiffAST(this,t);else{this.computedLang=t.lang??qi(t.name);const g=this.highlighter!=null&&dd(s.theme),y=this.highlighter!=null&&jg(this.computedLang),b=!c&&y;if(this.highlighter!=null&&g&&(u||c||!this.renderCache.highlighted&&b||this.renderCache.result==null)){const{result:E,options:T}=this.renderDiffWithHighlighter(t,this.highlighter,c||!y);this.renderCache={diff:t,options:T,highlighted:b,result:E,renderRange:void 0}}(!g||!c&&!y)&&this.asyncHighlight(t).then(({result:E,options:T})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(t,E,T,!c)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,n,this.renderCache.result):void 0}async asyncRender(t,n=Lg){const{result:a}=await this.asyncHighlight(t);return this.processDiffResult(t,n,a)}createPreElement(t,n,a){const{diffIndicators:l,disableBackground:s,disableLineNumbers:u,overflow:f}=this.getOptionsWithDefaults();return tL({type:"diff",diffIndicators:l,disableBackground:s,disableLineNumbers:u,overflow:f,split:t,totalLines:n,customProperties:a})}async asyncHighlight(t){const n=Cd(t,this.getTokenizeMaxLength());this.computedLang=n?"text":t.lang??qi(t.name);const a=this.highlighter!=null&&dd(this.options.theme??Jt),l=n||this.highlighter!=null&&jg(this.computedLang);return(this.highlighter==null||!a||!l)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(t,this.highlighter,n)}renderDiffWithHighlighter(t,n,a=!1){const{options:l}=this.getRenderOptions(t),{collapsedContextThreshold:s}=this.getOptionsWithDefaults();return{result:xw(t,n,l,{forcePlainText:a,expandedHunks:a?!0:void 0,collapsedContextThreshold:s}),options:l}}onHighlightSuccess(t,n,a,l=!0){if(this.renderCache==null)return;const s=!this.renderCache.highlighted||!qr(this.renderCache.options,a)||!Qr(this.renderCache.diff,t);this.renderCache={diff:t,options:a,highlighted:l,result:n,renderRange:void 0},s&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(t,n){const a=this.workerManager?.getDiffResultCache(t);if(!(a==null||!qr(n,a.options)))return a}hasHighlightedRenderCache(t,n){const{renderCache:a}=this;return a?.result!=null&&a.highlighted&&Qr(t,a.diff)&&qr(n,a.options)}onHighlightError(t){console.error(t)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(t,n,{code:a,themeStyles:l,baseThemeType:s}){const{diffStyle:u,disableFileHeader:f,expandUnchanged:h,expansionLineCount:c,collapsedContextThreshold:m,hunkSeparators:v}=this.getOptionsWithDefaults();this.diff=t;const g=u==="unified";let y=[],b=[],E=[];const T=[],{additionLines:O,deletionLines:L}=a,A={rowCount:0,hunkSeparators:v,additionsContentAST:y,deletionsContentAST:b,unifiedContentAST:E,unifiedGutterAST:Oo(),deletionsGutterAST:Oo(),additionsGutterAST:Oo(),expansionLineCount:c,hunkData:T,incrementRowCount(ee=1){A.rowCount+=ee},pushToGutter(ee,oe){switch(ee){case"unified":A.unifiedGutterAST.children.push(oe);break;case"deletions":A.deletionsGutterAST.children.push(oe);break;case"additions":A.additionsGutterAST.children.push(oe);break}}},w=X_({fileDiff:t,errorPrefix:"DiffHunksRenderer.processDiffResult"}),z={size:0,side:void 0,increment(){this.size+=1},flush(){if(u!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(A.pushToGutter("additions",on(void 0,"buffer",this.size)),y?.push(qo(this.size))):(A.pushToGutter("deletions",on(void 0,"buffer",this.size)),b?.push(qo(this.size))),this.size=0,this.side=void 0}}},V=(ee,oe,fe,M,Y)=>{A.pushToGutter(ee,YS(oe,fe,M,Y))};function U(ee){z.flush(),u==="unified"?Ed("unified",ee,A):(Ed("deletions",ee,A),Ed("additions",ee,A))}this.pushFileLevelAnnotations(t,u,n,A),tl({diff:t,diffStyle:u,startingLine:n.startingLine,totalLines:n.totalLines,expandedHunks:h?!0:this.expandedHunks,collapsedContextThreshold:m,callback:({hunkIndex:ee,hunk:oe,collapsedBefore:fe,collapsedAfter:M,additionLine:Y,deletionLine:te,type:ue})=>{const be=te!=null?te.splitLineIndex:Y.splitLineIndex,k=Y!=null?Y.unifiedLineIndex:te.unifiedLineIndex;u==="split"&&ue!=="change"&&z.flush(),fe>0&&U({hunkIndex:ee,collapsedLines:fe,rangeSize:Math.max(oe?.collapsedBefore??0,0),hunkSpecs:oe?.hunkSpecs,isFirstHunk:ee===0,isLastHunk:!1,isExpandable:!t.isPartial});const $=u==="unified"?k:be,J={type:ue,hunkIndex:ee,lineIndex:$,unifiedLineIndex:k,splitLineIndex:be,deletionLine:te,additionLine:Y};if(u==="unified"){const pe=this.getUnifiedInjectedRowsForLine?.(J);pe?.before!=null&&X0(pe.before,A);let qe=te!=null?L[te.lineIndex]:void 0,Be=Y!=null?O[Y.lineIndex]:void 0;if(qe==null&&Be==null){const rt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(rt,{file:t.name}),new Error(rt)}const nn=ue==="change"?Y!=null?"change-addition":"change-deletion":ue,Rt=this.getUnifiedLineDecoration({type:ue,lineType:nn,additionLineIndex:Y?.lineIndex,deletionLineIndex:te?.lineIndex});V("unified",Rt.gutterLineType,Y!=null?Y.lineNumber:te.lineNumber,`${k},${be}`,Rt.gutterProperties),Be!=null?Be=Zo(Be,Rt.contentProperties):qe!=null&&(qe=Zo(qe,Rt.contentProperties)),Qo({diffStyle:"unified",type:ue,deletionLine:qe,additionLine:Be,unifiedSpan:this.getAnnotations("unified",te?.lineNumber,Y?.lineNumber,ee,$),createAnnotationElement:rt=>this.createAnnotationElement(rt),context:A}),pe?.after!=null&&X0(pe.after,A)}else{const pe=this.getSplitInjectedRowsForLine?.(J);pe?.before!=null&&Q0(pe.before,A,z);let qe=te!=null?L[te.lineIndex]:void 0,Be=Y!=null?O[Y.lineIndex]:void 0;const nn=this.getSplitLineDecoration({side:"deletions",type:ue,lineIndex:te?.lineIndex}),Rt=this.getSplitLineDecoration({side:"additions",type:ue,lineIndex:Y?.lineIndex});if(qe==null&&Be==null){const ct="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(ct,{file:t.name}),new Error(ct)}const rt=(()=>{if(ue==="change"){if(Be==null)return"additions";if(qe==null)return"deletions"}})();if(rt!=null){if(z.side!=null&&z.side!==rt)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");z.side=rt,z.increment()}const bn=this.getAnnotations("split",te?.lineNumber,Y?.lineNumber,ee,$);if(bn!=null&&z.size>0&&z.flush(),te!=null){const ct=Zo(qe,nn.contentProperties);V("deletions",nn.gutterLineType,te.lineNumber,`${te.unifiedLineIndex},${be}`,nn.gutterProperties),ct!=null&&(qe=ct)}if(Y!=null){const ct=Zo(Be,Rt.contentProperties);V("additions",Rt.gutterLineType,Y.lineNumber,`${Y.unifiedLineIndex},${be}`,Rt.gutterProperties),ct!=null&&(Be=ct)}Qo({diffStyle:"split",type:ue,additionLine:Be,deletionLine:qe,...bn,createAnnotationElement:ct=>this.createAnnotationElement(ct),context:A}),pe?.after!=null&&Q0(pe.after,A,z)}const ie=u==="split"&&oe!=null&&be===oe.splitLineStart+oe.splitLineCount-1,ce=ie?oe.noEOFCRDeletions:!1,ve=ie?oe.noEOFCRAdditions:!1,Ce=(te?.noEOFCR??!1)||ce,$e=(Y?.noEOFCR??!1)||ve;if($e||Ce){if(u==="split"&&z.flush(),Ce){const pe=ue==="context"||ue==="context-expanded"?ue:"change-deletion";u==="unified"?(A.unifiedContentAST.push(Fo(pe)),A.pushToGutter("unified",on(pe,"metadata",1))):(A.deletionsContentAST.push(Fo(pe)),A.pushToGutter("deletions",on(pe,"metadata",1)),$e||(A.pushToGutter("additions",on(void 0,"buffer",1)),A.additionsContentAST.push(qo(1))))}if($e){const pe=ue==="context"||ue==="context-expanded"?ue:"change-addition";u==="unified"?(A.unifiedContentAST.push(Fo(pe)),A.pushToGutter("unified",on(pe,"metadata",1))):(A.additionsContentAST.push(Fo(pe)),A.pushToGutter("additions",on(pe,"metadata",1)),Ce||(A.pushToGutter("deletions",on(void 0,"buffer",1)),A.deletionsContentAST.push(qo(1))))}A.incrementRowCount(1)}M>0&&v!=="simple"&&U({hunkIndex:ue==="context-expanded"?ee:ee+1,collapsedLines:M,rangeSize:w,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!t.isPartial}),A.incrementRowCount(1)}}),u==="split"&&z.flush();const j=Math.max(gw(t.hunks),t.additionLines.length??0,t.deletionLines.length??0),ne=n.bufferBefore>0||n.bufferAfter>0,W=!g&&t.type!=="deleted",F=!g&&t.type!=="new",K=A.rowCount>0||ne;y=W&&K?y:void 0,b=F&&K?b:void 0,E=g&&K?E:void 0;const Q=this.createPreElement(b!=null&&y!=null,j);return{unifiedGutterAST:g&&K?A.unifiedGutterAST.children:void 0,unifiedContentAST:E,deletionsGutterAST:F&&K?A.deletionsGutterAST.children:void 0,deletionsContentAST:b,additionsGutterAST:W&&K?A.additionsGutterAST.children:void 0,additionsContentAST:y,hunkData:T,preNode:Q,themeStyles:l,baseThemeType:s,headerElement:f?void 0:this.renderHeader(this.diff),totalLines:j,rowCount:A.rowCount,bufferBefore:n.bufferBefore,bufferAfter:n.bufferAfter,css:""}}renderCodeAST(t,n){const a=t==="unified"?n.unifiedGutterAST:t==="deletions"?n.deletionsGutterAST:n.additionsGutterAST,l=t==="unified"?n.unifiedContentAST:t==="deletions"?n.deletionsContentAST:n.additionsContentAST;if(a==null||l==null)return;const s=Oo(a);return s.properties.style=`grid-row: span ${n.rowCount}`,[s,bL(l,n.rowCount)]}renderFullAST(t,n=[]){const a=this.getOptionsWithDefaults().hunkSeparators==="line-info",l=this.renderCodeAST("unified",t);if(l!=null)return n.push(ye({tagName:"code",children:l,properties:{"data-code":"","data-container-size":a?"":void 0,"data-unified":""}})),{...t.preNode,children:n};const s=this.renderCodeAST("deletions",t);s!=null&&n.push(ye({tagName:"code",children:s,properties:{"data-code":"","data-container-size":a?"":void 0,"data-deletions":""}}));const u=this.renderCodeAST("additions",t);return u!=null&&n.push(ye({tagName:"code",children:u,properties:{"data-code":"","data-container-size":a?"":void 0,"data-additions":""}})),{...t.preNode,children:n}}renderFullHTML(t,n=[]){return Ga(this.renderFullAST(t,n))}renderPartialHTML(t,n){return n==null?Ga(t):Ga(ye({tagName:"code",children:t,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${n}`]:""}}))}pushFileLevelAnnotations(t,n,a,l){if(!U_(a))return;const s=t.type!=="new"?F0(N0(this.deletionAnnotations)):[],u=t.type!=="deleted"?F0(N0(this.additionAnnotations)):[];if(s.length===0&&u.length===0)return;const f=-1,h=-1,{createAnnotationElement:c}=this;if(n==="unified"){Qo({diffStyle:n,type:"context",unifiedSpan:{type:"annotation",hunkIndex:f,lineIndex:h,annotations:s.concat(u)},createAnnotationElement:c,context:l});return}Qo({diffStyle:n,type:"context",deletionSpan:{type:"annotation",hunkIndex:f,lineIndex:h,annotations:s},additionSpan:{type:"annotation",hunkIndex:f,lineIndex:h,annotations:u},createAnnotationElement:c,context:l})}getAnnotations(t,n,a,l,s){const u={type:"annotation",hunkIndex:l,lineIndex:s,annotations:[]};if(n!=null)for(const h of this.deletionAnnotations[n]??[])u.annotations.push(ja(h));const f={type:"annotation",hunkIndex:l,lineIndex:s,annotations:[]};if(a!=null)for(const h of this.additionAnnotations[a]??[])(t==="unified"?u:f).annotations.push(ja(h));if(t==="unified")return u.annotations.length>0?u:void 0;if(!(f.annotations.length===0&&u.annotations.length===0))return{deletionSpan:u,additionSpan:f}}renderHeader(t){const{headerRenderMode:n,stickyHeader:a}=this.getOptionsWithDefaults();return Wx({fileOrDiff:t,mode:n,stickyHeader:a})}};function F0(t){return t?.map(n=>ja(n))??[]}const Ow=new Intl.PluralRules("en-US");function Y0(t){return`${t} unmodified line${Ow.select(t)==="one"?"":"s"}`}function X0(t,n){for(const a of t)n.unifiedContentAST.push(a.content),n.pushToGutter("unified",a.gutter),n.incrementRowCount(1)}function Q0(t,n,a){for(const{deletion:l,addition:s}of t){if(l==null&&s==null)continue;const u=l!=null&&s!=null?void 0:l==null?"deletions":"additions";(u==null||a.side!==u)&&a.flush(),l!=null&&(n.deletionsContentAST.push(l.content),n.pushToGutter("deletions",l.gutter)),s!=null&&(n.additionsContentAST.push(s.content),n.pushToGutter("additions",s.gutter)),u!=null&&(a.side=u,a.increment()),n.incrementRowCount(1)}}function Qo({diffStyle:t,type:n,deletionLine:a,additionLine:l,unifiedSpan:s,deletionSpan:u,additionSpan:f,createAnnotationElement:h,context:c}){let m=!1;if(t==="unified"){if(l!=null?c.unifiedContentAST.push(l):a!=null&&c.unifiedContentAST.push(a),s!=null){const v=n==="change"?a!=null?"change-deletion":"change-addition":n;c.unifiedContentAST.push(h(s)),c.pushToGutter("unified",on(v,"annotation",1)),m=!0}}else if(t==="split"){if(a!=null&&c.deletionsContentAST.push(a),l!=null&&c.additionsContentAST.push(l),u!=null){const v=n==="change"?a!=null?"change-deletion":"context":n;c.deletionsContentAST.push(h(u)),c.pushToGutter("deletions",on(v,"annotation",1)),m=!0}if(f!=null){const v=n==="change"?l!=null?"change-addition":"context":n;c.additionsContentAST.push(h(f)),c.pushToGutter("additions",on(v,"annotation",1)),m=!0}}m&&c.incrementRowCount(1)}function Ed(t,{hunkIndex:n,collapsedLines:a,rangeSize:l,hunkSpecs:s,isFirstHunk:u,isLastHunk:f,isExpandable:h},c){if(a<=0)return;const m=t==="unified"?c.unifiedContentAST:t==="deletions"?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators==="metadata"){s!=null&&(c.pushToGutter(t,za({type:"metadata",content:s,isFirstHunk:u,isLastHunk:f})),m.push(za({type:"metadata",content:s,isFirstHunk:u,isLastHunk:f})),t!=="additions"&&c.incrementRowCount(1));return}if(c.hunkSeparators==="simple"){n>0&&(c.pushToGutter(t,za({type:"simple",isFirstHunk:u,isLastHunk:!1})),m.push(za({type:"simple",isFirstHunk:u,isLastHunk:!1})),t!=="additions"&&c.incrementRowCount(1));return}const v=mw(t,n),g=l>c.expansionLineCount,y=h?n:void 0;c.pushToGutter(t,za({type:c.hunkSeparators,content:Y0(a),expandIndex:y,chunked:g,slotName:v,isFirstHunk:u,isLastHunk:f})),m.push(za({type:c.hunkSeparators,content:Y0(a),expandIndex:y,chunked:g,slotName:v,isFirstHunk:u,isLastHunk:f})),t!=="additions"&&c.incrementRowCount(1),c.hunkData.push({slotName:v,hunkIndex:n,lines:a,type:t,expandable:h?{up:!u,down:!f,chunked:g}:void 0})}function Zo(t,n){return t==null||t.type!=="element"||n==null?t:{...t,properties:{...t.properties,...n}}}function Cd(t,n){return Math.max(t.additionLines.length,t.deletionLines.length)>n}function Mw(t,n){return t.lineNumber===n.lineNumber&&t.side===n.side&&t.metadata===n.metadata}function Nw(t,n){return t.slotName===n.slotName&&t.hunkIndex===n.hunkIndex&&t.lines===n.lines&&t.type===n.type&&t.expandable?.chunked===n.expandable?.chunked&&t.expandable?.up===n.expandable?.up&&t.expandable?.down===n.expandable?.down}function Iw(t){return{theme:t?.theme,disableLineNumbers:t?.disableLineNumbers,overflow:t?.overflow,collapsed:t?.collapsed,disableFileHeader:t?.disableFileHeader,disableVirtualizationBuffers:t?.disableVirtualizationBuffers,stickyHeader:t?.stickyHeader,preferredHighlighter:t?.preferredHighlighter,useCSSClasses:t?.useCSSClasses,useTokenTransformer:t?.useTokenTransformer,tokenizeMaxLineLength:t?.tokenizeMaxLineLength,tokenizeMaxLength:t?.tokenizeMaxLength,diffStyle:t?.diffStyle,diffIndicators:t?.diffIndicators,disableBackground:t?.disableBackground,hunkSeparators:typeof t?.hunkSeparators=="function"?"custom":t?.hunkSeparators,expandUnchanged:t?.expandUnchanged,collapsedContextThreshold:t?.collapsedContextThreshold,lineDiffType:t?.lineDiffType,maxLineDiffLength:t?.maxLineDiffLength,expansionLineCount:t?.expansionLineCount,headerRenderMode:t?.renderCustomHeader!=null?"custom":"default"}}let zw=-1;var K_=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++zw}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(n={theme:Jt},a,l=!1){this.options=n,this.workerManager=a,this.isContainerManaged=l,this.hunksRenderer=this.createHunksRenderer(n),this.resizeManager=new yE,this.scrollSyncManager=new pw,this.interactionManager=new dE("diff",Ug(n,typeof n.hunkSeparators=="function"||(n.hunkSeparators??"line-info")==="line-info"||n.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(n){return Iw(n)}createHunksRenderer(n){return new Dw(this.getHunksRendererOptions(n),this.handleHighlightRender,this.workerManager)}getLineIndex=(n,a="additions")=>{if(this.fileDiff==null)return;const l=this.fileDiff.hunks.at(-1);let s,u;e:for(const f of this.fileDiff.hunks){let h=a==="deletions"?f.deletionStart:f.additionStart;const c=a==="deletions"?f.deletionCount:f.additionCount;let m=f.splitLineStart,v=f.unifiedLineStart;if(n<h){const g=h-n;s=Math.max(v-g,0),u=Math.max(m-g,0);break e}if(n>=h+c){if(f===l){const g=n-(h+c);s=v+f.unifiedLineCount+g,u=m+f.splitLineCount+g;break e}continue}for(const g of f.hunkContent)if(g.type==="context")if(n<h+g.lines){const y=n-h;u=m+y,s=v+y;break e}else h+=g.lines,m+=g.lines,v+=g.lines;else{const y=a==="deletions"?g.deletions:g.additions;if(n<h+y){const b=n-h;s=v+(a==="additions"?g.deletions:0)+b,u=m+b;break e}else h+=y,m+=Math.max(g.deletions,g.additions),v+=g.deletions+g.additions}break e}if(!(s==null||u==null))return[s,u]};setOptions(n){n!=null&&(this.options=n,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(n)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Ug(this.options,typeof this.options.hunkSeparators=="function"||(this.options.hunkSeparators??"line-info")==="line-info"||this.options.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(n){this.options={...this.options,...n}}setThemeType(n){(this.options.themeType??"system")!==n&&(this.mergeOptions({themeType:n}),this.applyCachedThemeState(n))}applyCachedThemeState(n){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const a=this.appliedThemeCSS.baseThemeType??n;return this.appliedThemeCSS.themeType===a?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,n,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!rf(this.appliedThemeCSS.theme,this.options.theme??Jt)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(n){this.lineAnnotations=n}canPartiallyRender(n,a,l){return!(n||a||l||typeof this.options.hunkSeparators=="function")}setSelectedLines(n,a){this.interactionManager.setSelection(n,a)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:n="split",overflow:a="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,a==="wrap"),a==="scroll"&&n==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(n=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,n||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,n||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,n?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(n){const{fileContainer:a,prerenderedHTML:l,preventEmit:s=!1,lineAnnotations:u,oldFile:f,newFile:h,fileDiff:c}=n;this.hydrateElements(a,l),Pw(this.pre,Hw({fileDiff:c,oldFile:f,newFile:h}),this.options.collapsed)||Vw(this.headerElement,Uw({fileDiff:c,oldFile:f,newFile:h}),this.options.disableFileHeader)?this.render({...n,preventEmit:!0}):this.hydrationSetup({fileDiff:c,oldFile:f,newFile:h,lineAnnotations:u}),s||this.emitPostRender()}hydrateElements(n,a){this.fileContainer!==n&&this.emitPostRender(!0),NL(n,a);for(const l of n.shadowRoot?.children??[]){if(l instanceof SVGElement){this.spriteSVG=l;continue}if(l instanceof HTMLElement){if(l instanceof HTMLPreElement){this.pre=l;for(const s of l.children)!(s instanceof HTMLElement)||s.tagName.toLowerCase()!=="code"||("deletions"in s.dataset&&(this.codeDeletions=s),"additions"in s.dataset&&(this.codeAdditions=s),"unified"in s.dataset&&(this.codeUnified=s));continue}if("diffsHeader"in l.dataset){this.headerElement=l;continue}if(l instanceof HTMLStyleElement&&l.hasAttribute("data-theme-css")){this.themeCSSStyle=l;continue}if(l instanceof HTMLStyleElement&&l.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=l,this.appliedUnsafeCSS=l.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=n,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:n,oldFile:a,newFile:l,lineAnnotations:s}){this.lineAnnotations=s??this.lineAnnotations,this.additionFile=l,this.deletionFile=a,this.fileDiff=n??(a!=null&&l!=null?Jd(a,l,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(n,a,l)=>{this.expandHunk(n,a,l)};expandHunk=(n,a,l)=>{this.hunksRenderer.expandHunk(n,a,l),this.rerender()};render({oldFile:n,newFile:a,fileDiff:l,deferManagers:s=!1,forceRender:u=!1,preventEmit:f=!1,lineAnnotations:h,fileContainer:c,containerWrapper:m,renderRange:v}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:g=!1,themeType:y="system"}=this.options,b=g?void 0:v,E=this.hasThemeChanged(),T=n!=null&&a!=null&&(!R0(n,this.deletionFile)||!R0(a,this.additionFile));let O=l!=null&&l!==this.fileDiff;const L=h!=null&&(h.length>0||this.lineAnnotations.length>0)?h!==this.lineAnnotations:!1;if(!g&&z_(b,this.renderRange)&&!u&&!L&&!E&&(l!=null&&l===this.fileDiff||l==null&&!T))return this.applyCachedThemeState(y);const{renderRange:A}=this;if(this.renderRange=b,this.deletionFile=n,this.additionFile=a,l!=null?this.fileDiff=l:n!=null&&a!=null&&T&&(O=!0,this.fileDiff=Jd(n,a,this.options.parseDiffOptions)),O&&(this.cachedHeaderHTML=void 0),h!=null&&this.setLineAnnotations(h),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:w=!1,disableFileHeader:z=!1}=this.options;if(z&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),c=this.getOrCreateFileContainer(c,m),this.applyCachedThemeState(y),g){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const V=this.hunksRenderer.renderDiff(this.fileDiff,qS);V!=null&&this.applyThemeState(c,V.themeStyles,y,V.baseThemeType),V?.headerElement!=null&&this.applyHeaderToDOM(V.headerElement,c),this.renderSeparators([]),this.injectUnsafeCSS()}catch(V){if(w)throw V;console.error(V),V instanceof Error&&this.applyErrorToDOM(V,c)}return f||this.emitPostRender(),!0}try{const V=this.getOrCreatePreNode(c);if(!(this.canPartiallyRender(u,L,T||O||E)&&this.applyPartialRender({previousRenderRange:A,renderRange:b}))){const U=this.hunksRenderer.renderDiff(this.fileDiff,b);if(U==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(c,U.themeStyles,y,U.baseThemeType),U.headerElement!=null&&this.applyHeaderToDOM(U.headerElement,c),U.additionsContentAST!=null||U.deletionsContentAST!=null||U.unifiedContentAST!=null?this.applyHunksToDOM(V,U):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(U.hunkData)}this.applyBuffers(V,b),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,s||this.flushManagers()}catch(V){if(w)throw V;console.error(V),V instanceof Error&&this.applyErrorToDOM(V,c)}return f||this.emitPostRender(),!0}emitPostRender(n=!1){const{fileContainer:a,options:{onPostRender:l}}=this;if(n){if(!this.mounted||(this.mounted=!1,a==null))return;this.options.onPostRender?.(a,this,"unmount");return}if(a==null)return;const s=this.mounted?"update":"mount";this.mounted=!0,l?.(a,this,s)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:n}of this.separatorCache.values())n.remove();this.separatorCache.clear();for(const{element:n}of this.annotationCache.values())n.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(n){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const a=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",a.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${n}px`),!0}primeHighlightCache(){const{fileDiff:n,workerManager:a}=this;if(n==null||a==null||ef(n))return;const l=this.options.tokenizeMaxLength??1e5;Math.max(n.additionLines.length,n.deletionLines.length)>l||a.primeDiffHighlightCache(n)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(n){const{hunkSeparators:a}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof a!="function"){for(const{element:s}of this.separatorCache.values())s.remove();this.separatorCache.clear();return}const l=new Map(this.separatorCache);for(const s of n){const u=s.slotName;let f=this.separatorCache.get(u);if(f==null||!Nw(s,f.hunkData)){f?.element.remove();const h=document.createElement("div");h.style.display="contents",h.slot=s.slotName;const c=a(s,this);c!=null&&h.appendChild(c),this.fileContainer.appendChild(h),f={element:h,hunkData:s},this.separatorCache.set(u,f)}l.delete(u)}for(const[s,{element:u}]of l.entries())this.separatorCache.delete(s),u.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:l}of this.annotationCache.values())l.remove();this.annotationCache.clear();return}const n=new Map(this.annotationCache),{renderAnnotation:a}=this.options;if(a!=null&&this.lineAnnotations.length>0)for(const[l,s]of this.lineAnnotations.entries()){const u=`${l}-${ja(s)}`;let f=this.annotationCache.get(u);if(f==null||!Mw(s,f.annotation)){f?.element.remove();const h=a(s);if(h==null)continue;f={element:TL(ja(s)),annotation:s},f.element.appendChild(h),this.fileContainer.appendChild(f.element),this.annotationCache.set(u,f)}n.delete(u)}for(const[l,{element:s}]of n.entries())this.annotationCache.delete(l),s.remove()}renderGutterUtility(){const{renderGutterUtility:n}=this.options;if(this.fileContainer==null||n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const a=n(this.interactionManager.getHoveredLine);if(a!=null&&this.gutterUtilityContent!=null)return;if(a==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const l=xL();l.appendChild(a),this.fileContainer.appendChild(l),this.gutterUtilityContent=l}getOrCreateFileContainer(n,a){const{fileContainer:l}=this,s=n??l??document.createElement("diffs-container"),u=l!==s;return u&&this.emitPostRender(!0),this.fileContainer=s,l!=null&&u&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),a!=null&&this.fileContainer.parentNode!==a&&a.appendChild(this.fileContainer),u&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(n){const{shadowRoot:a}=n;if(a!=null)for(const l of a.children)l instanceof SVGElement?this.spriteSVG??=l:z0(l)&&l.hasAttribute("data-theme-css")?(this.themeCSSStyle??=l,this.hasAdoptedThemeCSS=!0):z0(l)&&l.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=l,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(n){const a=n.shadowRoot??n.attachShadow({mode:"open"});if(this.spriteSVG==null){const l=document.createElement("div");l.innerHTML=EL;const s=l.firstChild;s instanceof SVGElement&&(this.spriteSVG=s)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==a&&a.appendChild(this.spriteSVG)}getOrCreatePreNode(n){const a=n.shadowRoot??n.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,a.appendChild(this.pre)):this.pre.parentNode!==a&&(a.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(n){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const a of Array.from(n.children))a instanceof HTMLElement&&(a.hasAttribute("data-unified")?this.codeUnified=a:a.hasAttribute("data-deletions")?this.codeDeletions=a:a.hasAttribute("data-additions")&&(this.codeAdditions=a))}applyHeaderToDOM(n,a){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:l}=this,s=this.cachedHeaderHTML??Ga(n);if(this.cachedHeaderHTML=s,s!==this.lastRenderedHeaderHTML){const v=document.createElement("div");v.innerHTML=s;const g=v.firstElementChild;if(!(g instanceof HTMLElement))return;this.headerElement!=null?a.shadowRoot?.replaceChild(g,this.headerElement):a.shadowRoot?.prepend(g),this.headerElement=g,this.lastRenderedHeaderHTML=s}if(this.isContainerManaged||l==null)return;const{renderCustomHeader:u,renderHeaderPrefix:f,renderHeaderMetadata:h}=this.options;if(u!=null){const v=u(l)??void 0;this.headerCustom=this.upsertHeaderSlotElement(a,this.headerCustom,af,v),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const c=f?.(l)??void 0,m=h?.(l)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(a,this.headerPrefix,lv,c),this.headerMetadata=this.upsertHeaderSlotElement(a,this.headerMetadata,ov,m),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(n,a,l,s){if(s==null){a?.remove();return}const u=a??this.createHeaderSlotElement(l);return a==null&&n.appendChild(u),this.replaceHeaderSlotContent(u,s),u}replaceHeaderSlotContent(n,a){n.replaceChildren(),a instanceof Element?n.appendChild(a):n.innerText=`${a}`}createHeaderSlotElement(n){const a=document.createElement("div");return a.slot=n,a}injectUnsafeCSS(){const{unsafeCSS:n}=this.options,a=this.fileContainer?.shadowRoot;if(a!=null){if(n==null||n===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===a&&this.appliedUnsafeCSS===n||(this.unsafeCSSStyle??=LL(),this.unsafeCSSStyle.parentNode!==a&&a.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=kL(n),this.appliedUnsafeCSS=n)}}applyThemeState(n,a,l,s){const u=n.shadowRoot??n.attachShadow({mode:"open"}),f=s??l,h=this.options.theme??Jt,c=typeof h=="string"?h:{...h},m=Qd(u);if(this.themeCSSStyle?.parentNode===u&&this.appliedThemeCSS?.themeStyles===a&&this.appliedThemeCSS.themeType===f&&this.appliedThemeCSS.scrollbarGutter===m){this.appliedThemeCSS.theme=c;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===u){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:c,themeStyles:a,themeType:f,baseThemeType:s,scrollbarGutter:m};return}this.themeCSSStyle=zL({shadowRoot:u,currentNode:this.themeCSSStyle,themeCSS:DL(a,f,m)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:c,themeStyles:a,themeType:f,baseThemeType:s,scrollbarGutter:m}:void 0}hydrateMeasuredScrollbar(){const n=this.fileContainer?.shadowRoot;n==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=OL(this.themeCSSStyle.textContent??"",Qd(n)))}applyHunksToDOM(n,a){const{overflow:l="scroll"}=this.options,s=(this.options.hunkSeparators??"line-info")==="line-info",u=l==="wrap"?a.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,a);let f=!1;const h=[],c=this.hunksRenderer.renderCodeAST("unified",a),m=this.hunksRenderer.renderCodeAST("deletions",a),v=this.hunksRenderer.renderCodeAST("additions",a);c!=null?(f=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=vd({code:this.codeUnified,columnType:"unified",rowSpan:u,containerSize:s}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(c),h.push(this.codeUnified)):m!=null||v!=null?(m!=null?(f=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=vd({code:this.codeDeletions,columnType:"deletions",rowSpan:u,containerSize:s}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(m),h.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),v!=null?(f=f||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=vd({code:this.codeAdditions,columnType:"additions",rowSpan:u,containerSize:s}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(v),h.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),h.length===0?n.textContent="":f&&n.replaceChildren(...h),this.lastRowCount=a.rowCount}applyPartialRender({previousRenderRange:n,renderRange:a}){const{pre:l,codeUnified:s,codeAdditions:u,codeDeletions:f,options:{diffStyle:h="split"}}=this;if(l==null||n==null||a==null||!Number.isFinite(n.totalLines)||!Number.isFinite(a.totalLines)||this.lastRowCount==null)return!1;const c=this.getCodeColumns(h,s,f,u);if(c==null)return!1;const m=n.startingLine,v=a.startingLine,g=m+n.totalLines,y=v+a.totalLines,b=Math.max(m,v),E=Math.min(g,y);if(E<=b)return!1;const T=Math.max(0,b-m),O=Math.max(0,g-E),L=this.trimColumns({columns:c,trimStart:T,trimEnd:O,previousStart:m,overlapStart:b,overlapEnd:E,diffStyle:h});if(L<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<L)throw new Error("applyPartialRender: trimmed beyond DOM row count");let A=this.lastRowCount-L;const w=(j,ne)=>{if(!(ne<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:j,totalLines:ne,bufferBefore:0,bufferAfter:0})},z=w(v,Math.max(b-v,0));if(z==null&&v<b)return!1;const V=w(E,Math.max(y-E,0));if(V==null&&y>E)return!1;const U=(j,ne)=>{if(j!=null){if(h==="unified"&&!Array.isArray(c))this.insertPartialHTML(h,c,j,ne);else if(h==="split"&&Array.isArray(c))this.insertPartialHTML(h,c,j,ne);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");A+=j.rowCount}};return this.cleanupErrorWrapper(),U(z,"afterbegin"),U(V,"beforeend"),this.lastRowCount!==A&&(this.applyRowSpan(h,c,A),this.lastRowCount=A),!0}insertPartialHTML(n,a,l,s){if(n==="unified"&&!Array.isArray(a)){const u=this.hunksRenderer.renderCodeAST("unified",l);this.renderPartialColumn(a,u,s)}else if(n==="split"&&Array.isArray(a)){const u=this.hunksRenderer.renderCodeAST("deletions",l),f=this.hunksRenderer.renderCodeAST("additions",l);this.renderPartialColumn(a[0],u,s),this.renderPartialColumn(a[1],f,s)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(n,a,l){if(n==null||a==null)return;const s=Z0(a[0]),u=Z0(a[1]);if(s==null||u==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const f=u.at(0);l==="beforeend"&&f?.type==="element"&&typeof f.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(f.properties["data-buffer-size"],n.content.children[n.content.children.length-1],n.gutter.children[n.gutter.children.length-1],s,u,!0);const h=u.at(-1);l==="afterbegin"&&h?.type==="element"&&typeof h.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(h.properties["data-buffer-size"],n.content.children[0],n.gutter.children[0],s,u,!1),n.gutter.insertAdjacentHTML(l,this.hunksRenderer.renderPartialHTML(s)),n.content.insertAdjacentHTML(l,this.hunksRenderer.renderPartialHTML(u))}mergeBuffersIfNecessary(n,a,l,s,u,f){if(!(a instanceof HTMLElement)||!(l instanceof HTMLElement))return;const h=this.getBufferSize(a.dataset);h!=null&&(f?(s.shift(),u.shift()):(s.pop(),u.pop()),this.updateBufferSize(a,h+n),this.updateBufferSize(l,h+n))}applyRowSpan(n,a,l){const s=u=>{u!=null&&(u.gutter.style.setProperty("grid-row",`span ${l}`),u.content.style.setProperty("grid-row",`span ${l}`))};if(n==="unified"&&!Array.isArray(a))s(a);else if(n==="split"&&Array.isArray(a))s(a[0]),s(a[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(n,a,l){let s=0,u=0,f=0,h=!1;const c=l>=0;if(n==null)return 0;const m=Array.from(n.content.children),v=Array.from(n.gutter.children);if(m.length!==v.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;f<m.length&&!(a<=0&&!c&&!h);){const g=v[f],y=m[f];if(f++,!(g instanceof HTMLElement)||!(y instanceof HTMLElement))throw console.error({gutterElement:g,contentElement:y}),new Error("FileDiff.trimColumnRows: invalid row elements");if(h&&(h=!1,g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in y.dataset||g.dataset.gutterBuffer==="metadata"&&"noNewline"in y.dataset)){g.remove(),y.remove(),u++;continue}if("lineIndex"in g.dataset&&"lineIndex"in y.dataset){(a>0||c&&s>=l)&&(g.remove(),y.remove(),a>0&&(a--,a===0&&(h=!0)),u++),s++;continue}if("separator"in g.dataset&&"separator"in y.dataset){(a>0||c&&s>=l)&&(g.remove(),y.remove(),u++);continue}if(g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in y.dataset){(a>0||c&&s>=l)&&(g.remove(),y.remove(),u++);continue}if(g.dataset.gutterBuffer==="metadata"&&"noNewline"in y.dataset){(a>0||c&&s>=l)&&(g.remove(),y.remove(),u++);continue}if(g.dataset.gutterBuffer==="buffer"&&"contentBuffer"in y.dataset){const b=this.getBufferSize(y.dataset);if(b==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(a>0){const E=Math.min(a,b),T=b-E;T>0?(this.updateBufferSize(g,T),this.updateBufferSize(y,T),u+=E):(g.remove(),y.remove(),u+=b),a-=E,a===0&&T===0&&(h=!0)}else if(c){const E=s,T=s+b-1;if(l<=E)g.remove(),y.remove(),u+=b;else if(l<=T){const O=T-l+1,L=b-O;this.updateBufferSize(g,L),this.updateBufferSize(y,L),u+=O}}s+=b;continue}throw console.error({gutterElement:g,contentElement:y}),new Error("FileDiff.trimColumnRows: unknown row elements")}return u}trimColumns({columns:n,diffStyle:a,overlapEnd:l,overlapStart:s,previousStart:u,trimEnd:f,trimStart:h}){const c=Math.max(0,s-u),m=l-u;if(m<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const v=h>0,g=f>0;if(!v&&!g)return 0;const y=v?c:0,b=g?m:-1;if(a==="unified"&&!Array.isArray(n))return this.trimColumnRows(n,y,b);if(a==="split"&&Array.isArray(n)){const E=this.trimColumnRows(n[0],y,b),T=this.trimColumnRows(n[1],y,b);if(n[0]!=null&&n[1]!=null&&E!==T)throw new Error("FileDiff.trimColumns: split columns out of sync");return n[0]!=null?E:T}else throw console.error({diffStyle:a,columns:n}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(n){const a=Number.parseInt(n?.bufferSize??"",10);return Number.isNaN(a)?void 0:a}updateBufferSize(n,a){n.dataset.bufferSize=`${a}`,n.style.setProperty("grid-row",`span ${a}`),n.style.setProperty("min-height",`calc(${a} * 1lh)`)}getCodeColumns(n,a,l,s){function u(f){if(f==null)return;const h=f.children[0],c=f.children[1];if(!(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||h.dataset.gutter==null||c.dataset.content==null))return{gutter:h,content:c}}if(n==="unified")return u(a);{const f=u(l),h=u(s);return f!=null||h!=null?[f,h]:void 0}}applyBuffers(n,a){if(a==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}a.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",n.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${a.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),a.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",n.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${a.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(n,{additionsContentAST:a,deletionsContentAST:l,totalLines:s},u){const{diffIndicators:f="bars",disableBackground:h=!1,disableLineNumbers:c=!1,overflow:m="scroll",diffStyle:v="split"}=this.options,g={type:"diff",diffIndicators:f,disableBackground:h,disableLineNumbers:c,overflow:m,split:v==="unified"?!1:a!=null&&l!=null,totalLines:s,customProperties:u};CL(g,this.appliedPreAttributes)||(IL(n,g),this.appliedPreAttributes=g)}applyErrorToDOM(n,a){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const l=a.shadowRoot??a.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",l.appendChild(this.errorWrapper);const s=document.createElement("div");s.dataset.errorMessage="",s.innerText=n.message,this.errorWrapper.appendChild(s);const u=document.createElement("pre");u.dataset.errorStack="",u.innerText=n.stack??"No Error Stack",this.errorWrapper.appendChild(u)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Hw({fileDiff:t,oldFile:n,newFile:a}){return t!=null&&t.hunks.length>0||n!=null||a!=null}function Uw({fileDiff:t,oldFile:n,newFile:a}){return t!=null||n!=null||a!=null}function Pw(t,n,a=!1){return!a&&t==null&&n}function Vw(t,n,a=!1){return t==null&&n&&!a}function Z0(t){if(!(t==null||t.type!=="element"))return t.children??[]}function Bw({fileDiff:t,metrics:n,disableFileHeader:a,hunkSeparators:l,expandUnchanged:s,expandedHunks:u,collapsedContextThreshold:f}){let h=Pa(n,a),c=h;const m=s?!0:u,v=t.hunks.length-1;for(let g=0;g<t.hunks.length;g++){const y=t.hunks[g];if(y==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const b=ul({isPartial:t.isPartial,rangeSize:y.collapsedBefore,expandedHunks:m,hunkIndex:g,collapsedContextThreshold:f}),E=(b.fromStart+b.fromEnd)*n.lineHeight;if(h+=E,c+=E,b.collapsedLines>0){const L=Zr({type:l,metrics:n,hunkIndex:g,hunkSpecs:y.hunkSpecs})?.totalHeight??0;h+=L,c+=L}h+=y.splitLineCount*n.lineHeight,c+=y.unifiedLineCount*n.lineHeight;const T=Gw(y);h+=T.split*n.lineHeight,c+=T.unified*n.lineHeight;const O=g===v?cl({fileDiff:t,hunkIndex:g,expandedHunks:m,collapsedContextThreshold:f,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(O!=null){const L=(O.fromStart+O.fromEnd)*n.lineHeight;if(h+=L,c+=L,O.collapsedLines>0){const A=Kr({type:l,metrics:n})?.totalHeight??0;h+=A,c+=A}}}if(t.hunks.length>0){const g=B_(n);h+=g,c+=g}return{splitHeight:h,unifiedHeight:c}}function Gw(t){if(!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return{split:0,unified:0};const n=t.hunkContent.at(-1);if(n==null)return{split:0,unified:0};if(n.type==="context"){const a=n.lines>0?1:0;return{split:a,unified:a}}return jw(t,n)}function jw(t,n){const a=(n.deletions>0&&t.noEOFCRDeletions?1:0)+(n.additions>0&&t.noEOFCRAdditions?1:0),l=n.deletions>0&&t.noEOFCRDeletions,s=n.additions>0&&t.noEOFCRAdditions;return{split:l||s?1:0,unified:a}}const tf=5e3;let $w=-1;var qw=class extends K_{__id=`little-virtualized-file-diff:${++$w}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(t,n,a,l,s=!1){super(t,l,s),this.virtualizer=n,this.metrics=_d(a)}setMetrics(t,n=!1){const a=_d(t);!n&&Td(this.metrics,a)||(this.metrics=a,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(t){this.syncLineAnnotations(t)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(t){return t==null||t===this.lineAnnotations||t.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(t),!0)}setFileAnnotationHeight(t){const n=this.cache.fileAnnotationHeight;return t===n?!1:(this.cache.fileAnnotationHeight=t,this.cache.measuredHeightDeltaTotal+=t-n,!0)}hasFileAnnotations(t=this.fileDiff){return t==null||!yL(this.lineAnnotations)?!1:this.lineAnnotations.some(n=>n.lineNumber!==0?!1:t.type==="new"?n.side==="additions":t.type==="deleted"?n.side==="deletions":!0)}getLineHeight(t,n=!1){return this.getEstimatedLineHeight(n)+(this.cache.heightDeltas.get(t)??0)}getEstimatedLineHeight(t=!1){const n=t?2:1;return this.metrics.lineHeight*n}setOptions(t){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(t==null)return;const{options:n}=this,a=!uv(n,t),l=a&&Kw(n,t);super.setOptions(t),l&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:Ww(n,t)}),a&&(this.forceRenderOverride=!0),a&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,l)}setThemeType(t){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(t)}resetLayoutCache({forceSimpleRecompute:t=!1,includeEstimatedHeights:n=!1}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),n&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),t&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let t=!1;const{overflow:n="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(t=!0),this.height=0,t;if(this.top=this.getVirtualizedTop(),n==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return t;const a=this.getDiffStyle(),l=a==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],s=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&s&&U_(this.renderRange)){const u=Fw(l)??0;this.setFileAnnotationHeight(u)&&(t=!0)}else!s&&this.setFileAnnotationHeight(0)&&(t=!0);for(const u of l){if(u==null)continue;const f=u.children[1];if(f instanceof HTMLElement)for(const h of f.children){if(!(h instanceof HTMLElement))continue;const c=h.dataset.lineIndex;if(c==null)continue;const m=eR(c,a);let v=h.getBoundingClientRect().height,g=!1;h.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in h.nextElementSibling.dataset||"noNewline"in h.nextElementSibling.dataset)&&("noNewline"in h.nextElementSibling.dataset&&(g=!0),v+=h.nextElementSibling.getBoundingClientRect().height);const y=this.getEstimatedLineHeight(g),b=this.cache.heightDeltas.get(m)??0,E=v-y;E!==b&&(t=!0,this.cache.measuredHeightDeltaTotal+=E-b,E===0?this.cache.heightDeltas.delete(m):this.cache.heightDeltas.set(m,E))}}return(t||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),t}onRender=t=>this.fileContainer==null?!1:(t&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(t,n,a,l){const s=!Qr(this.fileDiff,t),u=this.syncLineAnnotations(l);let f=a?.resetDiffLayoutCache===!0||s||u,h=s||a?.resetDiffLayoutCache===!0&&a.includeEstimatedDiffHeights;a?.metrics!=null&&(this.metrics=_d(a.metrics),f=!0,h=!0);const{collapsed:c=!1}=this.options;return this.currentCollapsed!==c&&(this.currentCollapsed=c,f=!0),f&&this.resetLayoutCache({includeEstimatedHeights:h}),this.fileDiff=t,this.top=n,this.computeApproximateSize(),this.height}getLinePosition(t,n="additions"){if(this.fileDiff==null||t<1)return;const a=this.getLineIndex(t,n);if(a==null)return;const{disableFileHeader:l=!1,expandUnchanged:s=!1,collapsed:u=!1,collapsedContextThreshold:f=1}=this.options,h=this.getDiffStyle(),c=this.getHunkSeparatorType(),m=h==="split"?a[1]:a[0];this.approximateLayoutCheckpoints();const v=Pa(this.metrics,l),g=this.getLayoutCheckpointBeforeLineIndex(m);let y=g?.top??v+this.cache.fileAnnotationHeight;if(u)return{top:v,height:0};let b;return tl({diff:this.fileDiff,diffStyle:h,startingLine:g?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:f,callback:({hunkIndex:E,hunk:T,collapsedBefore:O,collapsedAfter:L,deletionLine:A,additionLine:w})=>{const z=h==="split"?w?.splitLineIndex??A?.splitLineIndex:w?.unifiedLineIndex??A?.unifiedLineIndex;if(z==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(O>0){const U=Zr({type:c,metrics:this.metrics,hunkIndex:E,hunkSpecs:T?.hunkSpecs});if(U!=null){if(y+=U.gapBefore,m>=z-O&&m<z)return b={top:y,height:U.height},!0;y+=U.height+U.gapAfter}}const V=this.getLineHeight(z,(w?.noEOFCR??!1)||(A?.noEOFCR??!1));if(z===m)return b={top:y,height:V},!0;if(y+=V,L>0){const U=Kr({type:c,metrics:this.metrics});if(U!=null){if(m>z&&m<=z+L)return b={top:y+U.gapBefore,height:U.height},!0;y+=U.totalHeight}}return!1}}),b}getNumericScrollAnchor(t){if(this.fileDiff==null)return;const{disableFileHeader:n=!1,expandUnchanged:a=!1,collapsed:l=!1,collapsedContextThreshold:s=1}=this.options;if(l)return;const u=this.getDiffStyle(),f=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const h=this.getLayoutCheckpointBeforeTop(t);let c=h?.top??Pa(this.metrics,n)+this.cache.fileAnnotationHeight,m;return tl({diff:this.fileDiff,diffStyle:u,startingLine:h?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:v,hunk:g,collapsedBefore:y,collapsedAfter:b,deletionLine:E,additionLine:T})=>{const O=u==="split"?T?.splitLineIndex??E?.splitLineIndex:T?.unifiedLineIndex??E?.unifiedLineIndex;if(O==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(y>0){const A=Zr({type:f,metrics:this.metrics,hunkIndex:v,hunkSpecs:g?.hunkSpecs});A!=null&&(c+=A.totalHeight)}if(c>=t&&(E!=null?m={lineNumber:E.lineNumber,side:"deletions",top:c}:T!=null&&(m={lineNumber:T.lineNumber,side:"additions",top:c}),m!=null))return!0;const L=this.getLineHeight(O,(T?.noEOFCR??!1)||(E?.noEOFCR??!1));if(c+=L,b>0){const A=Kr({type:f,metrics:this.metrics});A!=null&&(c+=A.totalHeight)}return!1}}),m}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(t){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const n=t!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,t):this.renderRange;if(n==null)return;const{bufferBefore:a,bufferAfter:l,totalLines:s}=n;let u=0;if(s===0){const f=t??this.virtualizer.getWindowSpecs();this.top<f.top&&(u=l)}return{topOffset:this.top+a+u,height:this.height-(a+l)}}cleanUp(t=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),t||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(t)}expandHunk=(t,n,a)=>{this.hunksRenderer.expandHunk(t,n,a),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(t){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,t&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!t&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(t=!1){const n=this.isResizeDebuggingEnabled();if(!t&&!this.layoutDirty&&!n)return;const a=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:l=!1,collapsed:s=!1}=this.options,u=Pa(this.metrics,l);if(this.height+=u,s){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,n&&!a&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const t=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return t}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:a=1}=this.options,{splitHeight:l,unifiedHeight:s}=Bw({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a});this.cache.estimatedSplitHeight=l,this.cache.estimatedUnifiedHeight=s}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const t=this.fileContainer.getBoundingClientRect();t.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:t.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:t,oldFile:n,newFile:a,fileDiff:l,forceRender:s=!1,lineAnnotations:u,...f}={}){const{forceRenderOverride:h,isSetup:c}=this;this.forceRenderOverride=void 0;const m=this.syncLineAnnotations(u);if(m&&this.resetLayoutCache({includeEstimatedHeights:!1}),this.fileDiff??=l??(n!=null&&a!=null?Jd(n,a,this.options.parseDiffOptions):void 0),t=this.getOrCreateFileContainer(t),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(c)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const b=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(b==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");b.connect(t,this),this.isVisible=b.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const v=this.virtualizer.getWindowSpecs(),g=this.top??0,y=this.computeRenderRangeFromWindow(this.fileDiff,g,v);return super.render({fileDiff:this.fileDiff,fileContainer:t,renderRange:y,oldFile:n,newFile:a,lineAnnotations:u,forceRender:(h??s)||m,...f})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return Jw(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:a=1}=this.options,l=this.fileDiff.hunks.length-1,s=this.getDiffStyle(),u=this.getHunkSeparatorType(),f=n?!0:this.hunksRenderer.getExpandedHunksMap(),h=Yw(this.cache.heightDeltas);let c=Pa(this.metrics,t)+this.cache.fileAnnotationHeight,m=0;const v=({rowCount:g,startLineIndex:y,preSeparatorHeight:b=0,postSeparatorHeight:E=0,metadataOffsets:T=[]})=>{if(g<=0)return;const O=m,L=m+g;let A=Xw(O);for(;A<L;){const w=A-O,z=c+(w>0?b:0)+w*this.metrics.lineHeight+Qw(T,w)*this.metrics.lineHeight+K0(h,y,y+w);this.cache.checkpoints.push({renderedLineIndex:A,lineIndex:y+w,top:z}),A+=tf}c+=b+g*this.metrics.lineHeight+T.length*this.metrics.lineHeight+K0(h,y,y+g)+E,m=L};for(let g=0;g<this.fileDiff.hunks.length;g++){const y=this.fileDiff.hunks[g];if(y==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const b=ul({isPartial:this.fileDiff.isPartial,rangeSize:y.collapsedBefore,expandedHunks:f,hunkIndex:g,collapsedContextThreshold:a}),E=b.collapsedLines>0?Zr({type:u,metrics:this.metrics,hunkIndex:g,hunkSpecs:y.hunkSpecs})?.totalHeight??0:0;v({rowCount:b.fromStart,startLineIndex:(s==="split"?y.splitLineStart:y.unifiedLineStart)-b.rangeSize});let T=E;v({rowCount:b.fromEnd,startLineIndex:(s==="split"?y.splitLineStart:y.unifiedLineStart)-b.fromEnd,preSeparatorHeight:T}),b.fromEnd>0&&(T=0);const O=g===l?cl({fileDiff:this.fileDiff,hunkIndex:g,expandedHunks:f,collapsedContextThreshold:a,errorPrefix:"VirtualizedFileDiff"}):void 0,L=O!=null&&O.collapsedLines>0?Kr({type:u,metrics:this.metrics})?.totalHeight??0:0,A=O!=null?O.fromStart+O.fromEnd:0,w=s==="split"?y.splitLineCount:y.unifiedLineCount,z=s==="split"?y.splitLineStart:y.unifiedLineStart;v({rowCount:w,startLineIndex:z,preSeparatorHeight:T,postSeparatorHeight:A===0?L:0,metadataOffsets:Zw({diffStyle:s,hunk:y,rowCount:w})}),O!=null&&A>0&&v({rowCount:A,startLineIndex:z+w,postSeparatorHeight:L})}this.cache.totalLines=m}getLayoutCheckpointBeforeLineIndex(t){if(t<=0||this.cache.checkpoints.length===0)return;let n=0,a=this.cache.checkpoints.length-1,l;for(;n<=a;){const s=n+a>>1,u=this.cache.checkpoints[s];if(u==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");u.lineIndex<=t?(l=u,n=s+1):a=s-1}return l}getLayoutCheckpointBeforeTop(t,n){let a=0,l=this.cache.checkpoints.length-1,s=-1;for(;a<=l;){const u=a+l>>1,f=this.cache.checkpoints[u];if(f==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");f.top<=t?(s=u,a=u+1):l=u-1}if(n==null)return s>=0?this.cache.checkpoints[s]:void 0;for(let u=s;u>=0;u--){const f=this.cache.checkpoints[u];if(f==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(f.renderedLineIndex%n===0)return f}}getExpandedLineCount(t,n){let a=0;if(t.isPartial){for(const h of t.hunks)a+=n==="split"?h.splitLineCount:h.unifiedLineCount;return a}const{expandUnchanged:l=!1,collapsedContextThreshold:s=1}=this.options,u=l?!0:this.hunksRenderer.getExpandedHunksMap();for(const[h,c]of t.hunks.entries()){const m=n==="split"?c.splitLineCount:c.unifiedLineCount;a+=m;const v=Math.max(c.collapsedBefore,0),{fromStart:g,fromEnd:y,renderAll:b}=ul({isPartial:t.isPartial,rangeSize:v,expandedHunks:u,hunkIndex:h,collapsedContextThreshold:s});v>0&&(a+=b?v:g+y)}const f=cl({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:u,collapsedContextThreshold:s,errorPrefix:"VirtualizedFileDiff"});return f!=null&&(a+=f.fromStart+f.fromEnd),a}computeRenderRangeFromWindow(t,n,{top:a,bottom:l}){const{disableFileHeader:s=!1,expandUnchanged:u=!1,collapsedContextThreshold:f=1}=this.options,{hunkLineCount:h,lineHeight:c}=this.metrics,m=this.getDiffStyle(),v=this.getHunkSeparatorType(),g=this.height;let y=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(t,m);const b=Pa(this.metrics,s),E=t.hunks.length>0?B_(this.metrics):0,{fileAnnotationHeight:T}=this.cache,O=b+T,L=Math.max(0,g-b-T-E),A=this.hasFileAnnotations(t),w=n+b,z=T>0&&A&&w<l&&w+T>a;if(n<a-g||n>l)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-b-E};if(y<=h||t.hunks.length===0)return{startingLine:0,totalLines:h,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),y=this.cache.totalLines>0?this.cache.totalLines:y;const V=Math.ceil(Math.max(l-a,0)/c),U=Math.ceil(V/h)*h+h,j=U/h,ne=j,W=[],F=(a+l)/2,K=this.getLayoutCheckpointBeforeTop(Math.max(0,a-n-U*c*2),h);let Q=n+(K?.top??O),ee=K?.renderedLineIndex??0,oe,fe,M;if(tl({diff:t,diffStyle:m,startingLine:K?.renderedLineIndex??0,expandedHunks:u?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:f,callback:({hunkIndex:ve,hunk:Ce,collapsedBefore:$e,collapsedAfter:pe,deletionLine:qe,additionLine:Be})=>{const nn=Be!=null?Be.splitLineIndex:qe.splitLineIndex,Rt=Be!=null?Be.unifiedLineIndex:qe.unifiedLineIndex,rt=(Be?.noEOFCR??!1)||(qe?.noEOFCR??!1),bn=($e>0?Zr({type:v,metrics:this.metrics,hunkIndex:ve,hunkSpecs:Ce?.hunkSpecs}):void 0)?.totalHeight??0;Q+=bn;const ct=ee%h===0,Xa=Math.floor(ee/h);if(ct&&(W[Xa]=Q-(n+O+bn),M!=null)){if(M<=0)return!0;M--}const Xi=this.getLineHeight(m==="split"?nn:Rt,rt);return Q>a-Xi&&Q<l&&(oe??=Xa),fe==null&&Q+Xi>F&&(fe=Xa),M==null&&Q>=l&&ct&&(M=ne),ee++,Q+=Xi,pe>0&&(Q+=Kr({type:v,metrics:this.metrics})?.totalHeight??0),!1}}),oe==null)if(z)oe=0,fe=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:g-b-E};fe??=oe;const Y=Math.round(fe-j/2),te=Math.max(0,Math.ceil(y/h)-j),ue=Math.max(0,Math.min(Y,te)),be=ue*h,k=Y<0?U+Y*h:U,$=W[ue]??0,J=be===0?0:T+$,ie=ue+k/h,ce=ie<W.length?L-W[ie]:L-(Q-n-O);return{startingLine:be,totalLines:k,bufferBefore:J,bufferAfter:Math.max(0,ce)}}};function Fw(t){let n;for(const a of t){if(a==null)continue;const l=a.children[1];if(l instanceof HTMLElement)for(const s of l.children)s instanceof HTMLElement&&s.dataset.lineAnnotation===_L&&(n=Math.max(n??0,s.getBoundingClientRect().height))}return n}function Yw(t){const n=Array.from(t).sort((u,f)=>u[0]-f[0]),a=[],l=[0];let s=0;for(const[u,f]of n)a.push(u),s+=f,l.push(s);return{lineIndexes:a,prefixTotals:l}}function K0({lineIndexes:t,prefixTotals:n},a,l){if(a>=l||t.length===0)return 0;const s=W0(t,a);return(n[W0(t,l)]??0)-(n[s]??0)}function W0(t,n){let a=0,l=t.length;for(;a<l;){const s=a+l>>1,u=t[s];if(u==null)throw new Error("VirtualizedFileDiff: invalid prefix index");u<n?a=s+1:l=s}return a}function Xw(t){return Math.ceil(t/tf)*tf}function Qw(t,n){let a=0;for(const l of t)l<n&&a++;return a}function Zw({diffStyle:t,hunk:n,rowCount:a}){if(a<=0||!n.noEOFCRAdditions&&!n.noEOFCRDeletions)return[];const l=n.hunkContent.at(-1);if(l==null)return[];if(l.type==="context")return[a-1];const s=Math.max(l.deletions,l.additions),u=l.deletions+l.additions;if(t==="split")return s>0&&(n.noEOFCRAdditions||n.noEOFCRDeletions)?[a-1]:[];const f=[],h=a-u;return l.deletions>0&&n.noEOFCRDeletions&&f.push(h+l.deletions-1),l.additions>0&&n.noEOFCRAdditions&&f.push(a-1),f}function Kw(t,n){return(t.diffStyle??"split")!==(n.diffStyle??"split")||(t.overflow??"scroll")!==(n.overflow??"scroll")||(t.collapsed??!1)!==(n.collapsed??!1)||(t.disableLineNumbers??!1)!==(n.disableLineNumbers??!1)||(t.disableFileHeader??!1)!==(n.disableFileHeader??!1)||(t.diffIndicators??"bars")!==(n.diffIndicators??"bars")||(t.hunkSeparators??"line-info")!==(n.hunkSeparators??"line-info")||(t.expandUnchanged??!1)!==(n.expandUnchanged??!1)||(t.collapsedContextThreshold??1)!==(n.collapsedContextThreshold??1)||t.unsafeCSS!==n.unsafeCSS}function Ww(t,n){return(t.disableFileHeader??!1)!==(n.disableFileHeader??!1)||(t.hunkSeparators??"line-info")!==(n.hunkSeparators??"line-info")||(t.expandUnchanged??!1)!==(n.expandUnchanged??!1)||(t.collapsedContextThreshold??1)!==(n.collapsedContextThreshold??1)}function Jw(t){return typeof t=="function"?"custom":t??"line-info"}function eR(t,n){const[a,l]=t.split(",").map(Number);return n==="split"?l:a}function tR({hunkIndex:t,lineIndex:n,conflictIndex:a}){return`merge-conflict-action-${t}-${n}-${a}`}function nR(t,n){const a=n.hunks[t.hunkIndex];if(a!=null)return{hunkIndex:t.hunkIndex,lineIndex:iR(a,t.startContentIndex)}}function iR(t,n){let a=t.unifiedLineStart;for(let l=0;l<n;l++){const s=t.hunkContent[l];a+=s.type==="context"?s.lines:s.deletions+s.additions}return a}const aR={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},rR={display:"contents"};function J0(){return null}function lR({fileDiff:t,actions:n,renderCustomHeader:a,renderHeaderPrefix:l,renderHeaderMetadata:s,renderAnnotation:u,renderGutterUtility:f,renderMergeConflictUtility:h,lineAnnotations:c,getHoveredLine:m,getInstance:v}){const g=a?.(t),y=l?.(t),b=s?.(t);return Z.jsxs(Z.Fragment,{children:[g!=null?Z.jsx("div",{slot:af,children:g}):Z.jsxs(Z.Fragment,{children:[y!=null&&Z.jsx("div",{slot:"header-prefix",children:y}),b!=null&&Z.jsx("div",{slot:"header-metadata",children:b})]}),u!=null&&c?.map((E,T)=>Z.jsx("div",{slot:ja(E),children:u(E)},T)),n!=null&&h!=null&&v!=null&&n.map(E=>{if(E==null)return;const T=oR(E,t);return Z.jsx("div",{slot:T,style:rR,children:h(E,v)},T)}),f!=null&&Z.jsx("div",{slot:"gutter-utility-slot",style:aR,children:f(m)})]})}function oR(t,n){const a=nR(t,n);return a!=null?tR({hunkIndex:a.hunkIndex,lineIndex:a.lineIndex,conflictIndex:t.conflictIndex}):void 0}function sR(t){const n=tn.useRef(t);return tn.useInsertionEffect(()=>{n.current=t}),tn.useCallback((...a)=>n.current(...a),[])}const uR=tn.createContext(void 0);function cR(t,n){return typeof window>"u"&&n!=null?Z.jsxs(Z.Fragment,{children:[Z.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:n}}),t]}):Z.jsx(Z.Fragment,{children:t})}const dR=tn.createContext(void 0);function fR(){return tn.useContext(dR)}const hR=typeof window>"u"?tn.useEffect:tn.useLayoutEffect;function pR({fileDiff:t,options:n,lineAnnotations:a,selectedLines:l,prerenderedHTML:s,metrics:u,hasGutterRenderUtility:f,hasCustomHeader:h,disableWorkerPool:c}){const m=fR(),v=l!==void 0,g=tn.useContext(uR),y=tn.useRef(null),b=sR(E=>{if(E!=null){if(y.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");m!=null?y.current=new qw(Ad({controlledSelection:v,hasCustomHeader:h,hasGutterRenderUtility:f,options:n}),m,u,c?void 0:g,!0):y.current=new K_(Ad({controlledSelection:v,hasCustomHeader:h,hasGutterRenderUtility:f,options:n}),c?void 0:g,!0),y.current.hydrate({fileDiff:t,fileContainer:E,lineAnnotations:a,prerenderedHTML:s})}else{if(y.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");y.current.cleanUp(),y.current=null}});return hR(()=>{const{current:E}=y;if(E==null)return;const T=Ad({controlledSelection:v,hasCustomHeader:h,hasGutterRenderUtility:f,options:n}),O=!uv(E.options,T);E.setOptions(T),E.render({forceRender:O,fileDiff:t,lineAnnotations:a}),l!==void 0&&E.setSelectedLines(l)}),{ref:b,getHoveredLine:tn.useCallback(()=>y.current?.getHoveredLine(),[])}}function Ad({options:t,controlledSelection:n,hasCustomHeader:a,hasGutterRenderUtility:l}){return!n&&!l&&!a?t:{...t,controlledSelection:n,renderCustomHeader:a?J0:t?.renderCustomHeader,renderGutterUtility:l?J0:t?.renderGutterUtility}}function mR({fileDiff:t,options:n,metrics:a,lineAnnotations:l,selectedLines:s,className:u,style:f,prerenderedHTML:h,renderAnnotation:c,renderCustomHeader:m,renderHeaderPrefix:v,renderHeaderMetadata:g,renderGutterUtility:y,disableWorkerPool:b=!1}){const{ref:E,getHoveredLine:T}=pR({fileDiff:t,options:n,metrics:a,lineAnnotations:l,selectedLines:s,prerenderedHTML:h,hasGutterRenderUtility:y!=null,hasCustomHeader:m!=null,disableWorkerPool:b});return Z.jsx(av,{ref:E,className:u,style:f,children:cR(lR({fileDiff:t,renderCustomHeader:m,renderHeaderPrefix:v,renderHeaderMetadata:g,renderAnnotation:c,renderGutterUtility:y,lineAnnotations:l,getHoveredLine:T}),h)})}const gR=new Set(["definition.json","instruction.md","task.toml",".selfbench-manifest.json","solution/gold.patch","tests/test.patch","tests/dependency-setup.patch"]);async function ev(t){const n=t instanceof Blob?new Uint8Array(await t.arrayBuffer()):t,a=nv(await tv(n)),l=a.find(h=>h.name==="manifest.json")?.data;if(!l)throw new Error("export is missing manifest.json");const s=JSON.parse(new TextDecoder().decode(l)),u=[],f=new Map;for(const h of s.tasks){const c=`tasks/${h.taskId}.tar.gz`,m=a.find(b=>b.name===c);if(!m)throw new Error(`export is missing ${c}`);f.set(h.taskId,m.data);const v=nv(await tv(m.data)),g=new Map,y=new Map;for(const b of v){const E=b.name.replace(/^harbor-task\//,"");!E||b.name.endsWith("/")||(g.set(E,b.data),(gR.has(E)||E.endsWith(".json"))&&y.set(E,new TextDecoder().decode(b.data)))}u.push({taskId:h.taskId,files:g,textFiles:y})}return{manifest:s,tasks:u,taskArchives:f}}async function vR(t,n){const a=new Set(t.tasks.filter(u=>!n.has(u.taskId)).map(u=>u.taskId)),l={...t.manifest,acceptedCount:a.size,tasks:t.manifest.tasks.filter(u=>a.has(u.taskId))},s=[{name:"manifest.json",data:new TextEncoder().encode(`${JSON.stringify(l,null,2)}
1568
+ `)}];for(const u of t.tasks)if(a.has(u.taskId)){const f=t.taskArchives.get(u.taskId);if(!f)throw new Error(`loaded export is missing ${u.taskId}`);s.push({name:`tasks/${u.taskId}.tar.gz`,data:f})}return _R(yR(s))}async function tv(t){return W_(t,new DecompressionStream("gzip"))}async function _R(t){const n=await W_(t,new CompressionStream("gzip"));return new Blob([n.buffer],{type:"application/gzip"})}async function W_(t,n){const a=await new Response(new Blob([t.buffer]).stream().pipeThrough(n)).arrayBuffer();return new Uint8Array(a)}function nv(t){const n=[];for(let a=0;a+512<=t.length;){const l=t.subarray(a,a+512);if(l.every(c=>c===0))break;const s=J_(l,0,100),u=bR(l,124,12),f=l[156];a+=512;const h=t.slice(a,a+u);f!==5&&s&&n.push({name:s,data:h}),a+=Math.ceil(u/512)*512}return n}function yR(t){const n=[];for(const s of t){const u=new Uint8Array(512);Wr(u,0,100,s.name),Fr(u,100,8,420),Fr(u,108,8,0),Fr(u,116,8,0),Fr(u,124,12,s.data.length),Fr(u,136,12,Math.floor(Date.now()/1e3)),u.fill(32,148,156),u[156]=48,Wr(u,257,6,"ustar\0"),Wr(u,263,2,"00");const f=u.reduce((h,c)=>h+c,0);Wr(u,148,8,`${f.toString(8).padStart(6,"0")}\0 `),n.push(u,s.data,new Uint8Array((512-s.data.length%512)%512))}n.push(new Uint8Array(1024));const a=new Uint8Array(n.reduce((s,u)=>s+u.length,0));let l=0;for(const s of n)a.set(s,l),l+=s.length;return a}function J_(t,n,a){const l=t.indexOf(0,n);return new TextDecoder().decode(t.subarray(n,l<0?n+a:l))}function bR(t,n,a){const l=J_(t,n,a).trim();return l?Number.parseInt(l,8):0}function Wr(t,n,a,l){t.set(new TextEncoder().encode(l).subarray(0,a),n)}function Fr(t,n,a,l){Wr(t,n,a,l.toString(8).padStart(a-1,"0"))}function SR(){const[t,n]=_t.useState([]),[a,l]=_t.useState(null),[s,u]=_t.useState(null),[f,h]=_t.useState(null),[c,m]=_t.useState(new Set),[v,g]=_t.useState(null),[y,b]=_t.useState(null),[E,T]=_t.useState(!1),[O,L]=_t.useState(""),A=_t.useRef(null),w=_t.useCallback(F=>fetch(F,O?{headers:{Authorization:`Bearer ${O}`}}:void 0),[O]),z=_t.useCallback(async()=>{try{b(null);const F=await w("/v1/runs");if(!F.ok)throw new Error(`Unable to list runs (${F.status})`);n(await F.json())}catch(F){b(F instanceof Error?F.message:String(F))}},[w]);_t.useEffect(()=>{z()},[z]);const V=async F=>{try{T(!0),b(null),l(F),h(null),m(new Set);const[K,Q]=await Promise.all([w(`/v1/runs/${encodeURIComponent(F)}`),w(`/v1/runs/${encodeURIComponent(F)}/export`)]);if(!K.ok)throw new Error(`Unable to load run (${K.status})`);if(!Q.ok)throw new Error(`Export is not ready (${Q.status})`);u(await K.json()),h(await ev(await Q.blob()))}catch(K){b(K instanceof Error?K.message:String(K))}finally{T(!1)}},U=async F=>{try{T(!0),b(null);const K=await ev(F);h(K),l(K.manifest.runId),u({runId:K.manifest.runId,phase:"local export",requested:K.manifest.acceptedCount,accepted:K.manifest.acceptedCount,rejected:0,tasks:[]}),m(new Set),g(null)}catch(K){b(K instanceof Error?K.message:String(K))}finally{T(!1)}},j=f?.tasks.find(F=>F.taskId===v)??f?.tasks[0],ne=F=>m(K=>{const Q=new Set(K);return Q.has(F)?Q.delete(F):Q.add(F),Q}),W=async()=>{if(!f||!a)return;const F=await vR(f,c),K=URL.createObjectURL(F),Q=document.createElement("a");Q.href=K,Q.download=`selfbench-${a}-cleaned.tar.gz`,Q.click(),URL.revokeObjectURL(K)};return Z.jsxs("main",{className:"app-shell",children:[Z.jsxs("header",{className:"topbar",children:[Z.jsxs("div",{children:[Z.jsx("p",{className:"eyebrow",children:"SELFBENCH / EXPORT REVIEW"}),Z.jsx("h1",{children:"Review accepted tasks before publishing."})]}),Z.jsxs("div",{className:"topbar-actions",children:[Z.jsx("input",{className:"token-input",type:"password",value:O,onChange:F=>L(F.target.value),placeholder:"API token (session only)","aria-label":"API token"}),Z.jsx("input",{ref:A,hidden:!0,type:"file",accept:".gz,.tgz,application/gzip",onChange:F=>{const K=F.target.files?.[0];K&&U(K)}}),Z.jsx("button",{type:"button",className:"button",onClick:()=>A.current?.click(),children:"Open gzip"}),Z.jsx("button",{type:"button",className:"button",onClick:()=>{z()},children:"Refresh runs"})]})]}),y&&Z.jsx("div",{className:"error-banner",children:y}),Z.jsxs("section",{className:"workspace",children:[Z.jsxs("aside",{className:"run-list surface",children:[Z.jsxs("div",{className:"section-heading",children:[Z.jsx("h2",{children:"Runs"}),Z.jsx("span",{children:t.length})]}),t.length===0&&Z.jsx("p",{className:"muted",children:"No runs found."}),t.map(F=>Z.jsxs("button",{type:"button",className:`run-row ${F.runId===a?"selected":""}`,onClick:()=>{V(F.runId)},children:[Z.jsx("strong",{children:F.runId}),Z.jsx("span",{children:F.status}),Z.jsx("small",{children:new Date(F.startedAt).toLocaleString()})]},F.runId))]}),Z.jsxs("section",{className:"content",children:[!f&&Z.jsxs("div",{className:"empty surface",children:[Z.jsx("h2",{children:E?"Loading export…":"Select a completed run"}),Z.jsx("p",{children:"Choose a run or open a local export gzip to inspect its accepted tasks."})]}),f&&s&&Z.jsxs(Z.Fragment,{children:[Z.jsxs("div",{className:"summary surface",children:[Z.jsxs("div",{children:[Z.jsx("p",{className:"eyebrow",children:f.manifest.repository.url}),Z.jsx("h2",{children:a}),Z.jsxs("p",{className:"muted",children:[s.phase," · ",f.manifest.acceptedCount," accepted tasks · commit"," ",f.manifest.repository.commit.slice(0,12)]})]}),Z.jsx("button",{type:"button",className:"button primary",onClick:()=>{W()},children:c.size?`Download cleaned export (${f.tasks.length-c.size})`:"Download export copy"})]}),Z.jsxs("div",{className:"review-grid",children:[Z.jsxs("div",{className:"task-list surface",children:[Z.jsxs("div",{className:"section-heading",children:[Z.jsx("h2",{children:"Tasks"}),Z.jsxs("span",{children:[c.size," marked for removal"]})]}),f.tasks.map(F=>Z.jsxs("button",{type:"button",className:`task-row ${F.taskId===j?.taskId?"selected":""} ${c.has(F.taskId)?"removed":""}`,onClick:()=>g(F.taskId),children:[Z.jsx("strong",{children:F.taskId}),Z.jsx("span",{children:c.has(F.taskId)?"marked for removal":"keep"})]},F.taskId))]}),j&&Z.jsx(ER,{task:j,removed:c.has(j.taskId),onToggle:()=>ne(j.taskId)})]})]})]})]})]})}function ER({task:t,removed:n,onToggle:a}){const l=AR(t.textFiles.get("definition.json"));return Z.jsxs("article",{className:"task-detail surface",children:[Z.jsxs("div",{className:"detail-header",children:[Z.jsxs("div",{children:[Z.jsx("p",{className:"eyebrow",children:"TASK"}),Z.jsx("h2",{children:t.taskId}),Z.jsxs("p",{className:"muted",children:[String(l?.difficulty??"unknown")," · ",String(l?.repo??"")]})]}),Z.jsx("button",{type:"button",className:`button ${n?"undo":"danger"}`,onClick:a,children:n?"Keep task":"Mark for removal"})]}),Z.jsx(Ko,{title:"Prompt",children:Z.jsx("pre",{children:String(l?.prompt??t.textFiles.get("instruction.md")??"No prompt")})}),Z.jsx(Ko,{title:"Task definition",children:Z.jsx("pre",{children:t.textFiles.get("definition.json")??"Missing definition.json"})}),Z.jsx(Ko,{title:"Gold patch",children:Z.jsx(iv,{patch:t.textFiles.get("solution/gold.patch")})}),Z.jsx(Ko,{title:"Held-out test patch",children:Z.jsx(iv,{patch:t.textFiles.get("tests/test.patch")})})]})}function iv({patch:t}){const n=_t.useMemo(()=>t?FL(t).flatMap(l=>l.files):[],[t]);if(!t)return Z.jsx("pre",{children:"Missing patch"});if(!n.length)return Z.jsx("pre",{children:t});const a={themeType:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",diffStyle:window.matchMedia("(max-width: 900px)").matches?"unified":"split",diffIndicators:"bars",overflow:"scroll",stickyHeader:!0};return Z.jsx(CR,{fallback:t,children:Z.jsx("div",{className:"patch-files",children:n.map(l=>Z.jsx(mR,{fileDiff:l,disableWorkerPool:!0,options:a},`${l.prevName??""}:${l.name}`))})})}class CR extends _t.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(n){console.error("Pierre diff renderer failed",n)}render(){return this.state.failed?Z.jsx("pre",{children:this.props.fallback}):this.props.children}}function Ko({title:t,children:n}){return Z.jsxs("section",{className:"detail-block",children:[Z.jsx("h3",{children:t}),n]})}function AR(t){if(!t)return null;try{return JSON.parse(t)}catch{return null}}const ey=document.getElementById("root");if(!ey)throw new Error("review root is missing");MS.createRoot(ey).render(Z.jsx(_t.StrictMode,{children:Z.jsx(SR,{})}));