@cloudflare/think 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -16
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/extensions/index.d.ts +100 -8
- package/dist/{hook-proxy-CkF0EhRO.js → hook-proxy-Dogs9wbj.js} +3 -3
- package/dist/{hook-proxy-CkF0EhRO.js.map → hook-proxy-Dogs9wbj.js.map} +1 -1
- package/dist/{index-CDNxUctz.d.ts → index-s3Pl812H.d.ts} +44 -16
- package/dist/messengers/index.d.ts +1 -1
- package/dist/messengers/telegram.d.ts +1 -1
- package/dist/studio/assets/{angular-html-Dl5doFtz.js → angular-html-B26lsrRw.js} +1 -1
- package/dist/studio/assets/{angular-ts-CbN7_mlY.js → angular-ts-B0BTTyHo.js} +1 -1
- package/dist/studio/assets/{apl-CUTyCKtR.js → apl-W5hJk0fj.js} +1 -1
- package/dist/studio/assets/{astro-4sWs7Jg3.js → astro-ChkXCqsA.js} +1 -1
- package/dist/studio/assets/{blade-NmhW_pJp.js → blade-Dy0zTtr6.js} +1 -1
- package/dist/studio/assets/{c-_ropPcoN.js → c-DOHYbsuN.js} +1 -1
- package/dist/studio/assets/{cobol-BacpIX4U.js → cobol-DtGo7U_-.js} +1 -1
- package/dist/studio/assets/{coffee-DcwgCl9J.js → coffee-Uf9fkZqI.js} +1 -1
- package/dist/studio/assets/{cpp-BCPbrI0m.js → cpp-CVwmol0l.js} +1 -1
- package/dist/studio/assets/{crystal-DZXQ6wBH.js → crystal-ChHObCtF.js} +1 -1
- package/dist/studio/assets/{css-BYyCaTYR.js → css-DYjZAj5w.js} +1 -1
- package/dist/studio/assets/{edge-CVh9HJt8.js → edge-C2J43zbu.js} +1 -1
- package/dist/studio/assets/{elixir-9uvyi7ZY.js → elixir-B7WZ8XhB.js} +1 -1
- package/dist/studio/assets/{elm-DDSgRIyn.js → elm-PN4qGuR2.js} +1 -1
- package/dist/studio/assets/{erb-DAVyz0cP.js → erb-CkbjE2OZ.js} +1 -1
- package/dist/studio/assets/{git-rebase-z3txLW9w.js → git-rebase-CsGmQhFO.js} +1 -1
- package/dist/studio/assets/{glimmer-js-BRADiKXN.js → glimmer-js-D85-ZYXa.js} +1 -1
- package/dist/studio/assets/{glimmer-ts-B6C6vVGo.js → glimmer-ts-B_0SLVPe.js} +1 -1
- package/dist/studio/assets/{glsl-34bCtA9U.js → glsl-BE5n0T0t.js} +1 -1
- package/dist/studio/assets/{graphql-CL83z2DV.js → graphql-BVcCJEBO.js} +1 -1
- package/dist/studio/assets/{hack-B9WxPQav.js → hack-CyUu15_C.js} +1 -1
- package/dist/studio/assets/{haml-oavex6g4.js → haml-Dj54pugT.js} +1 -1
- package/dist/studio/assets/{handlebars-pd64xhEq.js → handlebars-l3llPaCT.js} +1 -1
- package/dist/studio/assets/{highlighted-body-OFNGDK62-DB3-I0_d.js → highlighted-body-OFNGDK62-D_z62he-.js} +1 -1
- package/dist/studio/assets/{html-A_mALprL.js → html--Tmh4628.js} +1 -1
- package/dist/studio/assets/{html-derivative-CBwZyoIR.js → html-derivative-B0Q_m8BM.js} +1 -1
- package/dist/studio/assets/{http-Cua_-o-V.js → http-BXKW9YQL.js} +1 -1
- package/dist/studio/assets/{hurl-Dpr8mC4K.js → hurl-C60QjgUE.js} +1 -1
- package/dist/studio/assets/index-Cd4PgOFu.js +390 -0
- package/dist/studio/assets/{java-B1Ptmnmm.js → java-aXeLcVht.js} +1 -1
- package/dist/studio/assets/{javascript-waNlhfIS.js → javascript-BQcRH4fE.js} +1 -1
- package/dist/studio/assets/{jinja-D06CyNkk.js → jinja-DGNUkEt-.js} +1 -1
- package/dist/studio/assets/{jison-CQo2g2q_.js → jison-DwfSvoKv.js} +1 -1
- package/dist/studio/assets/{json-T8-gmbyP.js → json-B0ukOVyl.js} +1 -1
- package/dist/studio/assets/{jsx-pi8aEi7y.js → jsx-CzJUnsSO.js} +1 -1
- package/dist/studio/assets/{julia-DQ0CkLQi.js → julia-D8zt_FEP.js} +1 -1
- package/dist/studio/assets/{just-BaZbjeHH.js → just-nn4e9Gpd.js} +1 -1
- package/dist/studio/assets/{latex-CKRYEGLe.js → latex-OBwqlec5.js} +1 -1
- package/dist/studio/assets/{liquid-KfgQvxVp.js → liquid-CktG-Iuw.js} +1 -1
- package/dist/studio/assets/{lua-BDYsw9Eb.js → lua-ZqavSetL.js} +1 -1
- package/dist/studio/assets/{marko-BSPq2tuh.js → marko-CxDLRfNz.js} +1 -1
- package/dist/studio/assets/{mdc-ZTdTy2-Y.js → mdc-COZbBQqS.js} +1 -1
- package/dist/studio/assets/mermaid-GHXKKRXX-ChY6AJ7l.js +1 -0
- package/dist/studio/assets/{nginx-BsBsElo9.js → nginx-DB8A8-iZ.js} +1 -1
- package/dist/studio/assets/{nim-Fud12WJN.js → nim-Cs5VB9QZ.js} +1 -1
- package/dist/studio/assets/{perl-BcRrrqpJ.js → perl-pV-3Dli_.js} +1 -1
- package/dist/studio/assets/{php-CvBMy7ll.js → php-CFSq0mhc.js} +1 -1
- package/dist/studio/assets/{pug-9fn0F-sp.js → pug-DuCfu-AK.js} +1 -1
- package/dist/studio/assets/{qml-DPYDKGeG.js → qml-Gqte1OeW.js} +1 -1
- package/dist/studio/assets/{r-B-BlSOk_.js → r-B8XqafmU.js} +1 -1
- package/dist/studio/assets/{razor-BBsuDNIH.js → razor-HyK7qWun.js} +1 -1
- package/dist/studio/assets/{regexp-siAWelih.js → regexp-Bdipf9Ks.js} +1 -1
- package/dist/studio/assets/{rst-DpBCyEwj.js → rst-DtdOQB-0.js} +1 -1
- package/dist/studio/assets/{ruby-BQ1xX5ej.js → ruby-DOExsDws.js} +1 -1
- package/dist/studio/assets/{sas-Dft5mTiQ.js → sas-BLRRJVWF.js} +1 -1
- package/dist/studio/assets/{scss-BFMJsYGZ.js → scss-BILH_sWZ.js} +1 -1
- package/dist/studio/assets/{shellscript-Cncrs_5T.js → shellscript-CC2KTOv4.js} +1 -1
- package/dist/studio/assets/{shellsession-BngbHbQf.js → shellsession-CiGs-_qT.js} +1 -1
- package/dist/studio/assets/{soy-BY5W-W7z.js → soy-QSSlYQhf.js} +1 -1
- package/dist/studio/assets/{sql-rEN1gzdE.js → sql-CPD_IP3i.js} +1 -1
- package/dist/studio/assets/{stata-BDRzO3gs.js → stata-jhUDP248.js} +1 -1
- package/dist/studio/assets/{surrealql-DgF3SPLS.js → surrealql-CEI1vHaO.js} +1 -1
- package/dist/studio/assets/{svelte-BsPFEf_A.js → svelte-BqMghnvQ.js} +1 -1
- package/dist/studio/assets/{templ-D4eIDjcz.js → templ-DhMt3Gd_.js} +1 -1
- package/dist/studio/assets/{tex-hl_BDesm.js → tex-B2oLGu4M.js} +1 -1
- package/dist/studio/assets/{ts-tags-mYERLvfx.js → ts-tags-DbXbAuWo.js} +1 -1
- package/dist/studio/assets/{tsx-4zmdohFv.js → tsx-BWdjt-eB.js} +1 -1
- package/dist/studio/assets/{twig-J6ElH33g.js → twig-b7sZE9-Z.js} +1 -1
- package/dist/studio/assets/{typescript-DaBxXTXh.js → typescript-B5gQukXY.js} +1 -1
- package/dist/studio/assets/{vue-CnJAvLlE.js → vue-DGv3yRD9.js} +1 -1
- package/dist/studio/assets/{vue-html-5M7J-A2F.js → vue-html-Cx5Ph-Io.js} +1 -1
- package/dist/studio/assets/{vue-vine-BgG3D4Fz.js → vue-vine-G05O51ag.js} +1 -1
- package/dist/studio/assets/{xml-BuA8iyrb.js → xml-Bd8eSLdt.js} +1 -1
- package/dist/studio/assets/{xsl-CEhAy4QP.js → xsl-DVLXYJQL.js} +1 -1
- package/dist/studio/assets/{yaml-CKMEvlUE.js → yaml-CO0sPwby.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/think.d.ts +2 -2
- package/dist/think.js +229 -98
- package/dist/think.js.map +1 -1
- package/dist/tools/execute.d.ts +1 -1
- package/dist/tools/extensions.d.ts +4 -37
- package/dist/tools/extensions.js.map +1 -1
- package/dist/tools/workspace.d.ts +1 -1
- package/dist/tools/workspace.js +1 -13
- package/dist/tools/workspace.js.map +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/{workspace-BZXdZcuw.d.ts → workspace-DxZQSbko.d.ts} +10 -157
- package/package.json +12 -12
- package/dist/index-B-zgBVj2.d.ts +0 -109
- package/dist/studio/assets/index-DmVgVRjr.js +0 -390
- package/dist/studio/assets/mermaid-GHXKKRXX-UMXpy7w5.js +0 -1
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-Dl5doFtz.js","./html-A_mALprL.js","./javascript-waNlhfIS.js","./css-BYyCaTYR.js","./angular-ts-CbN7_mlY.js","./scss-BFMJsYGZ.js","./apl-CUTyCKtR.js","./xml-BuA8iyrb.js","./java-B1Ptmnmm.js","./json-T8-gmbyP.js","./astro-4sWs7Jg3.js","./typescript-DaBxXTXh.js","./postcss-BXeXVLqQ.js","./tsx-4zmdohFv.js","./blade-NmhW_pJp.js","./html-derivative-CBwZyoIR.js","./sql-rEN1gzdE.js","./bsl-BkkzgIyY.js","./sdbl-bTVj8UrX.js","./cairo-DLTphjLi.js","./python-gzcpVVnB.js","./cobol-BacpIX4U.js","./coffee-DcwgCl9J.js","./cpp-BCPbrI0m.js","./regexp-siAWelih.js","./glsl-34bCtA9U.js","./c-_ropPcoN.js","./crystal-DZXQ6wBH.js","./shellscript-Cncrs_5T.js","./edge-CVh9HJt8.js","./elixir-9uvyi7ZY.js","./elm-DDSgRIyn.js","./erb-DAVyz0cP.js","./ruby-BQ1xX5ej.js","./haml-oavex6g4.js","./graphql-CL83z2DV.js","./jsx-pi8aEi7y.js","./lua-BDYsw9Eb.js","./yaml-CKMEvlUE.js","./erlang-Cphh6RMH.js","./markdown-BYOwaDjH.js","./fortran-fixed-form-DEKoE2YW.js","./fortran-free-form-CYNrtFtB.js","./fsharp-D13ZGOAj.js","./gdresource-C0sCabJj.js","./gdshader-CBce3t8t.js","./gdscript-Cp2uCuqX.js","./git-commit-BSykSTBG.js","./diff-woXpYk--.js","./git-rebase-z3txLW9w.js","./glimmer-js-BRADiKXN.js","./glimmer-ts-B6C6vVGo.js","./hack-B9WxPQav.js","./handlebars-pd64xhEq.js","./http-Cua_-o-V.js","./hurl-Dpr8mC4K.js","./csv-Dx-8-gkx.js","./hxml-B0Qn7Nwc.js","./haxe-OTjmBuCE.js","./jinja-D06CyNkk.js","./jison-CQo2g2q_.js","./julia-DQ0CkLQi.js","./r-B-BlSOk_.js","./just-BaZbjeHH.js","./perl-BcRrrqpJ.js","./latex-CKRYEGLe.js","./tex-hl_BDesm.js","./liquid-KfgQvxVp.js","./marko-BSPq2tuh.js","./less-DVTAwKKz.js","./mdc-ZTdTy2-Y.js","./nextflow-Bbiyy34d.js","./nextflow-groovy-Dc_ddanL.js","./nginx-BsBsElo9.js","./nim-Fud12WJN.js","./php-CvBMy7ll.js","./pug-9fn0F-sp.js","./qml-DPYDKGeG.js","./razor-BBsuDNIH.js","./csharp-Ct8U2NOr.js","./rst-DpBCyEwj.js","./cmake-Bj61d0ZC.js","./sas-Dft5mTiQ.js","./shaderlab-TOUzSsQk.js","./hlsl-Cvrh5tZx.js","./shellsession-BngbHbQf.js","./soy-BY5W-W7z.js","./sparql-D_iOobhT.js","./turtle-ByJddavk.js","./stata-BDRzO3gs.js","./surrealql-DgF3SPLS.js","./svelte-BsPFEf_A.js","./templ-D4eIDjcz.js","./go-BJwz_mda.js","./ts-tags-mYERLvfx.js","./twig-J6ElH33g.js","./vue-CnJAvLlE.js","./vue-html-5M7J-A2F.js","./vue-vine-BgG3D4Fz.js","./stylus-B6D30XZt.js","./xsl-CEhAy4QP.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},te={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=te,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=d(),n=p(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],ne=-1;function R(e){return{current:e}}function re(e){0>ne||(e.current=L[ne],L[ne]=null,ne--)}function z(e,t){ne++,L[ne]=e.current,e.current=t}var ie=R(null),ae=R(null),oe=R(null),se=R(null);function ce(e,t){switch(z(oe,t),z(ae,e),z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}re(ie),z(ie,e)}function le(){re(ie),re(ae),re(oe)}function ue(e){e.memoizedState!==null&&z(se,e);var t=ie.current,n=Qd(t,e.type);t!==n&&(z(ae,e),z(ie,n))}function de(e){ae.current===e&&(re(ie),re(ae)),se.current===e&&(re(se),cp._currentValue=I)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
|
|
3
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
-
`+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
-
`),l=s.split(`
|
|
6
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
-
Error generating stack: `+e.message+`
|
|
9
|
-
`+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,ke=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&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 We(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qe(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ie(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(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 tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=te.p;return e===0?(e=window.event,e===void 0?32:wp(e.type)):e}function rt(e,t){var n=te.p;try{return te.p=e,t()}finally{te.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,B=`__reactProps$`+it,ot=`__reactContainer$`+it,st=`__reactEvents$`+it,ct=`__reactListeners$`+it,lt=`__reactHandles$`+it,ut=`__reactResources$`+it,V=`__reactMarker$`+it;function dt(e){delete e[at],delete e[B],delete e[st],delete e[ct],delete e[lt]}function ft(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[at])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function pt(e){if(e=e[at]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function mt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ht(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function gt(e){e[V]=!0}var _t=new Set,vt={};function yt(e,t){bt(e,t),bt(e+`Capture`,t)}function bt(e,t){for(vt[e]=t,e=0;e<t.length;e++)_t.add(t[e])}var xt=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]*$`),St={},Ct={};function wt(e){return ye.call(Ct,e)?!0:ye.call(St,e)?!1:xt.test(e)?Ct[e]=!0:(St[e]=!0,!1)}function Tt(e,t,n){if(wt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Et(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Dt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ot(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function At(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jt(e){if(!e._valueTracker){var t=kt(e)?`checked`:`value`;e._valueTracker=At(e,t,``+e[t])}}function Mt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=kt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Nt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Pt=/[\n"\\]/g;function Ft(e){return e.replace(Pt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function It(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ot(t)):e.value!==``+Ot(t)&&(e.value=``+Ot(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Rt(e,o,Ot(n)):Rt(e,o,Ot(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ot(s):e.removeAttribute(`name`)}function Lt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){jt(e);return}n=n==null?``:``+Ot(n),t=t==null?n:``+Ot(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),jt(e)}function Rt(e,t,n){t===`number`&&Nt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function zt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ot(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Bt(e,t,n){if(t!=null&&(t=``+Ot(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ot(n)}function Vt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ot(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),jt(e)}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ut=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 Wt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Ut.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Gt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Wt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Wt(e,o,t[o])}function Kt(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 qt=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`]]),Jt=/^[\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 Yt(e){return Jt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Xt(){}var Zt=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $t=null,en=null;function tn(e){var t=pt(e);if(t&&(e=t.stateNode)){var n=e[B]||null;a:switch(e=t.stateNode,t.type){case`input`:if(It(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ft(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[B]||null;if(!a)throw Error(i(90));It(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Mt(r)}break a;case`textarea`:Bt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&zt(e,!!n.multiple,t,!1)}}}var nn=!1;function rn(e,t,n){if(nn)return e(t,n);nn=!0;try{return e(t)}finally{if(nn=!1,($t!==null||en!==null)&&(Du(),$t&&(t=$t,e=en,en=$t=null,tn(t),e)))for(t=0;t<e.length;t++)tn(e[t])}}function an(e,t){var n=e.stateNode;if(n===null)return null;var r=n[B]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var on=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,"passive",{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return dn=i.slice(e,1<r?1-r:void 0)}function pn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function mn(){return!0}function hn(){return!1}function gn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?mn:hn,this.isPropagationStopped=hn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vn=gn(_n),yn=m({},_n,{view:0,detail:0}),bn=gn(yn),xn,Sn,Cn,wn=m({},yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,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!==Cn&&(Cn&&e.type===`mousemove`?(xn=e.screenX-Cn.screenX,Sn=e.screenY-Cn.screenY):Sn=xn=0,Cn=e),xn)},movementY:function(e){return`movementY`in e?e.movementY:Sn}}),Tn=gn(wn),En=gn(m({},wn,{dataTransfer:0})),Dn=gn(m({},yn,{relatedTarget:0})),On=gn(m({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=gn(m({},_n,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=gn(m({},_n,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=gn(m({},yn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=gn(m({},wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=gn(m({},yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=gn(m({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=gn(m({},wn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Vn=gn(m({},_n,{newState:0,oldState:0})),Hn=[9,13,27,32],Un=on&&`CompositionEvent`in window,Wn=null;on&&`documentMode`in document&&(Wn=document.documentMode);var Gn=on&&`TextEvent`in window&&!Wn,Kn=on&&(!Un||Wn&&8<Wn&&11>=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=fn(),dn=un=ln=null,Zn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Kn&&t.locale!==`ko`?null:t.data;default:return null}}var er={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 tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){$t?en?en.push(r):en=[r]:$t=r,t=Fd(t,`onChange`),0<t.length&&(n=new vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function ar(e){Dd(e,0)}function or(e){if(Mt(mt(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(on){var lr;if(on){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function fr(){rr&&(rr.detachEvent(`onpropertychange`,pr),ir=rr=null)}function pr(e){if(e.propertyName===`value`&&or(ir)){var t=[];nr(t,ir,e,Qt(e)),rn(ar,t)}}function mr(e,t,n){e===`focusin`?(fr(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,pr)):e===`focusout`&&fr()}function hr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return or(ir)}function gr(e,t){if(e===`click`)return or(t)}function _r(e,t){if(e===`input`||e===`change`)return or(t)}function vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var yr=typeof Object.is==`function`?Object.is:vr;function br(e,t){if(yr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!yr(e[i],t[i]))return!1}return!0}function xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var n=xr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nt(e.document)}return t}function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Er=on&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==Nt(r)||(r=Dr,`selectionStart`in r&&Tr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),kr&&br(kr,r)||(kr=r,r=Fd(Or,`onSelect`),0<r.length&&(t=new vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};on&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,Gr=`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(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),yt(t,[e])}var qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Jr=[],Yr=0,Xr=0;function Zr(){for(var e=Yr,t=Xr=Yr=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ti(n,i,a)}}function Qr(e,t,n,r){Jr[Yr++]=e,Jr[Yr++]=t,Jr[Yr++]=n,Jr[Yr++]=r,Xr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $r(e,t,n,r){return Qr(e,t,n,r),ni(e)}function ei(e,t){return Qr(e,null,null,t),ni(e)}function ti(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(e){if(50<vu)throw vu=0,yu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function ii(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ci(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function li(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)oi(e)&&(s=1);else if(typeof e==`string`)s=$f(e,n,ie.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ai(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ui(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ai(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ai(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ai(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-Ie(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var Ai=null,ji=null,H=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[B]=r,n){case`dialog`:Od(`cancel`,t),Od(`close`,t);break;case`iframe`:case`object`:case`embed`:Od(`load`,t);break;case`video`:case`audio`:for(n=0;n<Td.length;n++)Od(Td[n],t);break;case`source`:Od(`error`,t);break;case`img`:case`image`:case`link`:Od(`error`,t),Od(`load`,t);break;case`details`:Od(`toggle`,t);break;case`input`:Od(`invalid`,t),Lt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Od(`invalid`,t);break;case`textarea`:Od(`invalid`,t),Vt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Vd(t.textContent,n)?(r.popover!=null&&(Od(`beforetoggle`,t),Od(`toggle`,t)),r.onScroll!=null&&Od(`scroll`,t),r.onScrollEnd!=null&&Od(`scrollend`,t),r.onClick!=null&&(t.onclick=Xt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(Ai=e.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:Ai=Ai.return}}function Ri(e){if(e!==Ai)return!1;if(!H)return Li(e),H=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||$d(e.type,e.memoizedProps)),n=!n),n&&ji&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=bf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ji=bf(e)}else t===27?(t=ji,cf(e.type)?(e=yf,yf=null,ji=e):ji=t):ji=Ai?vf(e.stateNode.nextSibling):null;return!0}function zi(){ji=Ai=null,H=!1}function Bi(){var e=Mi;return e!==null&&(iu===null?iu=e:iu.push.apply(iu,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=R(null),Ui=null,Wi=null;function Gi(e,t,n){z(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,re(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;yr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[cp]:e.push(cp))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!yr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=yd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=F.S;F.S=function(e,t){su=we(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=R(null);function ga(){var e=ha.current;return e===null?Hl.pooledCache:e}function _a(e,t){t===null?z(ha,ha.current):z(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xt,Xt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Xt,Xt);else{if(e=Hl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=si(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ui(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=li(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=pi(t,e.mode,n),t.return=e,t;case O:return t=Ta(t),f(e,t,n)}if(ee(t)||M(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ta(n),p(e,t,n,r)}if(ee(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Na(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ta(r),m(e,t,n,r,i)}if(ee(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Na(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Ti(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return H&&Ti(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),H&&Ti(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),H&&Ti(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Ti(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),H&&Ti(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ui(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=li(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=pi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ta(o),b(e,r,o,c)}if(ee(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Vl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Wl&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ql|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=R(null),Xa=R(0);function Za(e,t){e=Xl,z(Xa,e),z(Ya,t),Xl=e|t.baseLanes}function Qa(){z(Xa,Xl),z(Ya,Ya.current)}function $a(){Xl=Xa.current,re(Ya),re(Xa)}var eo=R(null),to=null;function no(e){var t=e.alternate;z(so,so.current&1),z(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){z(so,so.current),z(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(z(so,so.current),z(eo,e),to===null&&(to=e)):ao(e)}function ao(){z(so,so.current),z(eo,eo.current)}function oo(e){re(eo),to===e&&(to=null),re(so)}var so=R(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hf(n)||gf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lo=0,uo=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return lo=a,uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Bs:Vs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){F.H=zs;var t=fo!==null&&fo.next!==null;if(lo=0,po=fo=uo=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||ic||(e=e.dependencies,e!==null&&Xi(e)&&(ic=!0))}function To(e,t,n,r){uo=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Hs,o=t(n,r)}while(ho);return o}function Eo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(uo.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}lo=0,po=fo=uo=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?uo.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=uo.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?uo.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw uo.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?uo.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=wa(yo,e,t),t=uo,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=uo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=uo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),uo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(lo&f)===f:(Wl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,uo.lanes|=p,Ql|=p;f=u.action,go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,uo.lanes|=f,Ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!yr(o,e.memoizedState)&&(ic=!0,d&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=jo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);yr(o,t.memoizedState)||(ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=uo,a=jo(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!yr((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,ic=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||lo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=uo.updateQueue,t===null?(t=Mo(),uo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yr(e,n)}catch{return!0}}function Go(e){var t=ei(e,2);t!==null&&Su(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Is(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(H){var n=Hl.formState;if(n!==null){a:{var r=uo;if(H){if(ji){b:{for(var i=ji,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=vf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ji=vf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,uo,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,uo,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,uo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ya?xa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(uo.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=uo.updateQueue,t===null&&(t=Mo(),uo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();uo.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(uo.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){uo.flags|=4;var t=uo.updateQueue;if(t===null)t=Mo(),uo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||lo&1073741824&&!(Wl&261930)?e.memoizedState=t:(e.memoizedState=n,e=xu(),uo.lanes|=e,Ql|=e,n)}function Ss(e,t,n,r){return yr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Wl&261930)?(ic=!0,e.memoizedState=n):(e=xu(),uo.lanes|=e,Ql|=e,t):(e=xs(e,n,r),yr(e,t)||(ic=!0),e)}function Cs(e,t,n,r,i){var a=te.p;te.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Fs(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,pa(c,r),bu(e)):Ps(e,t,r,bu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},bu())}finally{te.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,I,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},bu())}function Os(){return Qi(cp)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bu();e=Ba(n);var r=Va(t,e,n);r!==null&&(Su(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=bu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=$r(e,t,n,r),n!==null&&(Su(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,bu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,yr(s,o))return Qr(e,t,i,0),Hl===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return Su(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:yd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=$r(e,n,r,2),t!==null&&Su(t,e,2)}function Is(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Ls(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var zs={readContext:Qi,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};zs.useEffectEvent=xo;var Bs={readContext:Qi,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Fe(!0);try{n(t)}finally{Fe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,uo,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,uo,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=uo,a=Ao();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Hl.identifierPrefix;if(H){var n=wi,r=Ci;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,uo)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Su(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Su(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(Su(t,e,n),Ha(t,e,n))}};function Gs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!br(n,r)||!br(i,a):!0}function Ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ws.enqueueReplaceState(t,t.state,null)}function qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){qr(e)}function Ys(e){console.error(e)}function Xs(e){qr(e)}function Zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function $s(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Ba(e),e.tag=3,e}function tc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Qs(t,n,r),typeof i!=`function`&&(uu===null?uu=new Set([this]):uu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Pu():n.alternate===null&&Zl===0&&(Zl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$u(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),$u(e,r,a)),!1}throw Error(i(435,n.tag))}return $u(e,r,a),Pu(),!1}if(H)return t=eo.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=hi(r,n),a=$s(e.stateNode,r,a),Ua(e,a),Zl!==4&&(Zl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=hi(o,n),ru===null?ru=[o]:ru.push(o),Zl!==4&&(Zl=2),t===null)return!0;r=hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=$s(n.stateNode,r,e),Ua(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(uu===null||!uu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ec(a),tc(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var rc=Error(i(461)),ic=!1;function ac(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(H&&s&&Di(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?br:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=si(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(br(a,r)&&e.ref===t.ref)if(ic=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(ic=!0);else return t.lanes=e.lanes,Ac(e,t,i)}return gc(e,t,n,r,i)}function lc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return dc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,dc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function fc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pc(e,t,n){return Fa(t,e.child,null,n),e=fc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function mc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=fc(t,r),t.lanes=536870912,uc(null,e);if(ro(t),(e=ji)?(e=mf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a)if(t.flags&256)t.flags&=-257,t=pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ic||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,ic||a){if(r=Hl,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ei(e,s),Su(r,e,s),rc;Pu(),t=pc(e,t,n)}else e=o.treeContext,ji=vf(s.nextSibling),Ai=t,H=!0,Mi=null,Ni=!1,e!==null&&ki(t,e),t=fc(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function gc(e,t,n,r,i){return Zi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(H&&r&&Di(t),t.flags|=1,ac(e,t,n,i),t.child)}function _c(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!ic?(Oo(e,t,a),Ac(e,t,a)):(H&&r&&Di(t),t.flags|=1,ac(e,t,n,a),t.child)}function vc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ws.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ks(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=La||Gs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ks(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=La||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,hc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function yc(e,t,n,r){return zi(),t.flags|=256,ac(e,t,n,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:va()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=tu),e}function Cc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(so.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(H){if(a?no(t):ao(t),(e=ji)?(e=mf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,ji=null)):e=null,e===null)throw Fi(t);return gf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=Tc({mode:`hidden`,children:c},a),r=ui(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(null,r)):(no(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=Tc({mode:`visible`,children:r.children},a),c=ui(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,t=uc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),gf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(ic||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,ic||s){if(s=Hl,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ei(e,r),Su(s,e,r),rc;hf(c)||Pu(),t=Ec(e,t,n)}else hf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ji=vf(c.nextSibling),Ai=t,H=!0,Mi=null,Ni=!1,e!==null&&ki(t,e),t=wc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,a,n,null),c.flags|=2):c=si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,uc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=xc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=si(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Fa(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Oc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,z(so,o),ac(e,t,r,n),r=H?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function Mc(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),z(so,so.current),r)break;return null;case 22:return t.lanes=0,lc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ic=!0;else{if(!jc(e,n)&&!(t.flags&128))return ic=!1,Mc(e,t,n);ic=!!(e.flags&131072)}else ic=!1,H&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=qs(e,r),t.tag=1,t=vc(null,t,e,r,n)):(t.tag=0,t=gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=oc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=qs(r,t.pendingProps),vc(e,t,r,a,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=yc(e,t,r,n);break a}else if(r!==a){a=hi(Error(i(424)),t),Vi(a),t=yc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ji=vf(e.firstChild),Ai=t,H=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=Ac(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return hc(e,t),e===null?(n=zf(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(n=t.type,e=t.pendingProps,r=Xd(oe.current).createElement(n),r[at]=t,r[B]=e,Wd(r,n,e),gt(r),t.stateNode=r):t.memoizedState=zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&H&&(r=t.stateNode=Sf(t.type,t.pendingProps,oe.current),Ai=t,Ni=!0,a=ji,cf(t.type)?(yf=a,ji=vf(r.firstChild)):ji=a),ac(e,t,t.pendingProps.children,n),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=ji)&&(r=ff(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,Ai=t,ji=vf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),ue(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,$d(a,o)?r=null:s!==null&&$d(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),cp._currentValue=a),hc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=ji)&&(n=pf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,Ai=t,ji=null,e=!0)),e||Fi(t)),null;case 13:return Cc(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return mc(e,t,n);case 22:return lc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Hl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Pc(e){e.flags|=4}function Fc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(ju())e.flags|=8192;else throw Ea=Sa,ba}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ep(t))if(ju())e.flags|=8192;else throw Ea=Sa,ba}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,nu|=t)}function Rc(e,t){if(!H)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function zc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bc(e,t,n){var r=t.pendingProps;switch(Oi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zc(t),null;case 1:return zc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),zc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Pc(t),o===null?(zc(t),Fc(t,a,null,r,n)):(zc(t),Ic(t,o))):o?o===e.memoizedState?(zc(t),t.flags&=-16777217):(Pc(t),zc(t),Ic(t,o)):(e=e.memoizedProps,e!==r&&Pc(t),zc(t),Fc(t,a,e,r,n)),null;case 27:if(de(t),n=oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return zc(t),null}e=ie.current,Ri(t)?Ii(t,e):(e=Sf(a,r,n),t.stateNode=e,Pc(t))}return zc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return zc(t),null}if(o=ie.current,Ri(t))Ii(t,o);else{var s=Xd(oe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[at]=t,o[B]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Wd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return zc(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=oe.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ai,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Vd(e.nodeValue,n)),e||Fi(t,!0)}else e=Xd(e).createTextNode(r),e[at]=t,t.stateNode=e}return zc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[at]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return zc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[at]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),zc(t),null);case 4:return le(),e===null&&jd(t.stateNode.containerInfo),zc(t),null;case 10:return Ki(t.type),zc(t),null;case 19:if(re(so),r=t.memoizedState,r===null)return zc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Rc(r,!1);else{if(Zl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return z(so,so.current&1|2),H&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>cu&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304)}else{if(!a)if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!H)return zc(t),null}else 2*we()-r.renderingStartTime>cu&&n!==536870912&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(zc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=so.current,z(so,a?n&1|2:n&1),H&&Ti(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(zc(t),t.subtreeFlags&6&&(t.flags|=8192)):zc(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&re(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),zc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Vc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(so),null;case 4:return le(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&re(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Hc(e,t){switch(Oi(t),t.tag){case 3:Ki(ia),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:re(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&re(ha);break;case 24:Ki(ia)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Qu(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Qu(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Qu(e,e.return,t)}}}function Kc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Qu(e,t,n)}}function U(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Qu(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Qu(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Qu(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Gd(r,e.type,n,t),r[B]=t}catch(t){Qu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cf(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(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&&cf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xt));else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[at]=e,t[B]=n}catch(t){Qu(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Jd=_p,e=wr(e),Tr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Yd={focusedElem:e,selectionRange:n},_p=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)df(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:df(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Uc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Qu(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Qu(n,n.return,e)}}r&64&&Gc(n),r&512&&U(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ja(e,t)}catch(e){Qu(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&U(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=nd.bind(null,n),_f(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&dt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;cf(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),Cf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null)if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Qu(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Qu(n,t,e)}break;case 18:ll!==null&&(ul?(e=ll,lf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Up(e)):lf(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),nl||Wc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Up(e)}catch(e){Qu(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Up(e)}catch(e){Qu(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=rd.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(cf(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[V]||o[at]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Wd(o,r,n),o[at]=e,gt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Zf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[at]=e,gt(o),r=o}e.stateNode=r}else Qf(a,e.type,e.stateNode);else e.stateNode=Kf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Qf(a,e.type,e.stateNode):Kf(a,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{Ht(a,``)}catch(t){Qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Qu(e,e.return,t)}}break;case 3:if(Xf=null,a=vl,vl=Ef(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Up(t.containerInfo)}catch(t){Qu(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=Ef(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ou=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?uf(m,!0):uf(l.stateNode,!1)}catch(e){Qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ht(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),Cl(t);break;case 27:Cf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Uc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)qa(c[i],s)}catch(e){Qu(r,r.return,e)}}n&&o&64&&Gc(a),U(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),U(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),U(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Uc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Qu(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&tp(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=Ef(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Wc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,Vl=0,Hl=null,Ul=null,Wl=0,Gl=0,Kl=null,ql=!1,Jl=!1,Yl=!1,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=null,iu=null,au=!1,ou=0,su=0,cu=1/0,lu=null,uu=null,du=0,fu=null,pu=null,mu=0,hu=0,gu=null,_u=null,vu=0,yu=null;function bu(){return Vl&2&&Wl!==0?Wl&-Wl:F.T===null?nt():yd()}function xu(){if(tu===0)if(!(Wl&536870912)||H){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=262144),tu=e}else tu=536870912;return e=eo.current,e!==null&&(e.flags|=32),tu}function Su(e,t,n){(e===Hl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(ku(e,0),Eu(e,Wl,tu,!1)),Ye(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&($l|=n),Zl===4&&Eu(e,Wl,tu,!1)),dd(e))}function Cu(e,t,n){if(Vl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ge(e,t),a=r?Lu(e,t):Fu(e,t,!0),o=r;do{if(a===0){Jl&&!r&&Eu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Tu(n)){a=Fu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ru;var l=c.current.memoizedState.isDehydrated;if(l&&(ku(c,s).flags|=256),s=Fu(c,s,!1),s!==2){if(Yl&&!l){c.errorRecoveryDisabledLanes|=o,$l|=o,a=4;break a}o=iu,iu=a,o!==null&&(iu===null?iu=o:iu.push.apply(iu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ku(e,0),Eu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Eu(r,t,tu,!ql);break a;case 2:iu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ou+300-we(),10<a)){if(Eu(r,t,tu,!ql),We(r,0,!0)!==0)break a;mu=t,r.timeoutHandle=nf(wu.bind(null,r,n,iu,lu,au,t,tu,$l,nu,ql,o,`Throttled`,-0,0),a);break a}wu(r,n,iu,lu,au,t,tu,$l,nu,ql,o,null,-0,0)}}break}while(1);dd(e)}function wu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xt},Nl(t,a,d);var m=(a&62914560)===a?ou-we():(a&4194048)===a?su-we():0;if(m=rp(d,m),m!==null){mu=a,e.cancelPendingCommit=m(Wu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Eu(e,a,o,!l);return}}Wu(e,t,a,n,r,i,o,s,c)}function Tu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!yr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Eu(e,t,n,r){t&=~eu,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function Du(){return Vl&6?!0:(fd(0,!1),!1)}function Ou(){if(Ul!==null){if(Gl===0)var e=Ul.return;else e=Ul,Wi=Ui=null,ko(e),ka=null,Aa=0,e=Ul;for(;e!==null;)Hc(e.alternate,e),e=e.return;Ul=null}}function ku(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),mu=0,Ou(),Hl=e,Ul=n=si(e.current,null),Wl=t,Gl=0,Kl=null,ql=!1,Jl=Ge(e,t),Yl=!1,nu=tu=eu=$l=Ql=Zl=0,iu=ru=null,au=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ie(r),a=1<<i;t|=e[i],r&=~a}return Xl=t,Zr(),n}function Au(e,t){uo=null,F.H=zs,t===ya||t===xa?(t=Da(),Gl=3):t===ba?(t=Da(),Gl=4):Gl=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,Ul===null&&(Zl=1,Zs(e,hi(t,e.current)))}function ju(){var e=eo.current;return e===null?!0:(Wl&4194048)===Wl?to===null:(Wl&62914560)===Wl||Wl&536870912?e===to:!1}function Mu(){var e=F.H;return F.H=zs,e===null?zs:e}function Nu(){var e=F.A;return F.A=zl,e}function Pu(){Zl=4,ql||(Wl&4194048)!==Wl&&eo.current!==null||(Jl=!0),!(Ql&134217727)&&!($l&134217727)||Hl===null||Eu(Hl,Wl,tu,!1)}function Fu(e,t,n){var r=Vl;Vl|=2;var i=Mu(),a=Nu();(Hl!==e||Wl!==t)&&(lu=null,ku(e,t)),t=!1;var o=Zl;a:do try{if(Gl!==0&&Ul!==null){var s=Ul,c=Kl;switch(Gl){case 8:Ou(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Vu(e,s,c,l),n&&Jl){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Vu(e,s,c,l)}}Iu(),o=Zl;break}catch(t){Au(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Vl=r,F.H=i,F.A=a,Ul===null&&(Hl=null,Wl=0,Zr()),o}function Iu(){for(;Ul!==null;)zu(Ul)}function Lu(e,t){var n=Vl;Vl|=2;var r=Mu(),a=Nu();Hl!==e||Wl!==t?(lu=null,cu=we()+500,ku(e,t)):Jl=Ge(e,t);a:do try{if(Gl!==0&&Ul!==null){t=Ul;var o=Kl;b:switch(Gl){case 1:Gl=0,Kl=null,Vu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Gl=0,Kl=null,Bu(t);break}t=function(){Gl!==2&&Gl!==9||Hl!==e||(Gl=7),dd(e)},o.then(t,t);break a;case 3:Gl=7;break a;case 4:Gl=5;break a;case 7:Ca(o)?(Gl=0,Kl=null,Bu(t)):(Gl=0,Kl=null,Vu(e,t,o,7));break;case 5:var s=null;switch(Ul.tag){case 26:s=Ul.memoizedState;case 5:case 27:var c=Ul;if(s?ep(s):c.stateNode.complete){Gl=0,Kl=null;var l=c.sibling;if(l!==null)Ul=l;else{var u=c.return;u===null?Ul=null:(Ul=u,Hu(u))}break b}}Gl=0,Kl=null,Vu(e,t,o,5);break;case 6:Gl=0,Kl=null,Vu(e,t,o,6);break;case 8:Ou(),Zl=6;break a;default:throw Error(i(462))}}Ru();break}catch(t){Au(e,t)}while(1);return Wi=Ui=null,F.H=r,F.A=a,Vl=n,Ul===null?(Hl=null,Wl=0,Zr(),Zl):0}function Ru(){for(;Ul!==null&&!Se();)zu(Ul)}function zu(e){var t=Nc(e.alternate,e,Xl);e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Bu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_c(n,t,t.pendingProps,t.type,void 0,Wl);break;case 11:t=_c(n,t,t.pendingProps,t.type.render,t.ref,Wl);break;case 5:ko(t);default:Hc(n,t),t=Ul=ci(t,Xl),t=Nc(n,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Vu(e,t,n,r){Wi=Ui=null,ko(t),ka=null,Aa=0;var i=t.return;try{if(nc(e,i,t,n,Wl)){Zl=1,Zs(e,hi(n,e.current)),Ul=null;return}}catch(t){if(i!==null)throw Ul=i,t;Zl=1,Zs(e,hi(n,e.current)),Ul=null;return}t.flags&32768?(H||r===1?e=!0:Jl||Wl&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Uu(t,e)):Hu(t)}function Hu(e){var t=e;do{if(t.flags&32768){Uu(t,ql);return}e=t.return;var n=Bc(t.alternate,t,Xl);if(n!==null){Ul=n;return}if(t=t.sibling,t!==null){Ul=t;return}Ul=t=e}while(t!==null);Zl===0&&(Zl=5)}function Uu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,Ul=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ul=e;return}Ul=e=n}while(e!==null);Zl=6,Ul=null}function Wu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Yu();while(du!==0);if(Vl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Xr,Xe(e,n,o,s,c,l),e===Hl&&(Ul=Hl=null,Wl=0),pu=t,fu=e,mu=n,hu=o,gu=a,_u=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,id(Oe,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=te.p,te.p=2,s=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,te.p=a,F.T=r}}du=1,Gu(),Ku(),qu()}}function Gu(){if(du===1){du=0;var e=fu,t=pu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=te.p;te.p=2;var i=Vl;Vl|=4;try{yl(t,e);var a=Yd,o=wr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Cr(s.ownerDocument.documentElement,s)){if(c!==null&&Tr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Sr(s,h),v=Sr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}_p=!!Jd,Yd=Jd=null}finally{Vl=i,te.p=r,F.T=n}}e.current=t,du=2}}function Ku(){if(du===2){du=0;var e=fu,t=pu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=te.p;te.p=2;var i=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,te.p=r,F.T=n}}du=3}}function qu(){if(du===4||du===3){du=0,Ce();var e=fu,t=pu,n=mu,r=_u;t.subtreeFlags&10256||t.flags&10256?du=5:(du=0,pu=fu=null,Ju(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(uu=null),tt(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=te.p,te.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,te.p=i}}mu&3&&Yu(),dd(e),i=e.pendingLanes,n&261930&&i&42?e===yu?vu++:(vu=0,yu=e):vu=0,fd(0,!1)}}function Ju(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Yu(){return Gu(),Ku(),qu(),Xu()}function Xu(){if(du!==5)return!1;var e=fu,t=hu;hu=0;var n=tt(mu),r=F.T,a=te.p;try{te.p=32>n?32:n,F.T=null,n=gu,gu=null;var o=fu,s=mu;if(du=0,pu=fu=null,mu=0,Vl&6)throw Error(i(331));var c=Vl;if(Vl|=4,Il(o.current),Ol(o,o.current,s,n),Vl=c,fd(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{te.p=a,F.T=r,Ju(e,t)}}function Zu(e,t,n){t=hi(n,t),t=$s(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Ye(e,2),dd(e))}function Qu(e,t,n){if(e.tag===3)Zu(e,e,n);else for(;t!==null;){if(t.tag===3){Zu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(uu===null||!uu.has(r))){e=hi(n,e),n=ec(2),r=Va(t,n,2),r!==null&&(tc(n,r,t,e),Ye(r,2),dd(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Yl=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(Wl&n)===n&&(Zl===4||Zl===3&&(Wl&62914560)===Wl&&300>we()-ou?!(Vl&2)&&ku(e,0):eu|=n,nu===Wl&&(nu=0)),dd(e)}function td(e,t){t===0&&(t=qe()),e=ei(e,t),e!==null&&(Ye(e,t),dd(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),td(e,n)}function id(e,t){return be(e,t)}var ad=null,od=null,sd=!1,cd=!1,ld=!1,ud=0;function dd(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,vd())}function fd(e,t){if(!ld&&cd){ld=!0;do for(var n=!1,r=ad;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,_d(r,a))}else a=Wl,a=We(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(r,a)||(n=!0,_d(r,a));r=r.next}while(n);ld=!1}}function pd(){md()}function md(){cd=sd=!1;var e=0;ud!==0&&tf()&&(e=ud);for(var t=we(),n=null,r=ad;r!==null;){var i=r.next,a=hd(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}du!==0&&du!==5||fd(e,!1),ud!==0&&(ud=0)}function hd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ke(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=Wl,n=We(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),tt(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=gd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function gd(e,t){if(du!==0&&du!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=Wl;return r=We(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),hd(e,we()),e.callbackNode!=null&&e.callbackNode===n?gd.bind(null,e):null)}function _d(e,t){if(Yu())return null;Cu(e,t,!0)}function vd(){of(function(){Vl&6?be(Ee,pd):md()})}function yd(){if(ud===0){var e=la;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),ud=e}return ud}function bd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Yt(``+e)}function xd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Sd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=bd((i[B]||null).action),o=r.submitter;o&&(t=(t=o[B]||null)?bd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ud!==0){var e=o?xd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?xd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Cd=0;Cd<Gr.length;Cd++){var wd=Gr[Cd];Kr(wd.toLowerCase(),`on`+(wd[0].toUpperCase()+wd.slice(1)))}Kr(Lr,`onAnimationEnd`),Kr(Rr,`onAnimationIteration`),Kr(zr,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Br,`onTransitionRun`),Kr(Vr,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),bt(`onMouseEnter`,[`mouseout`,`mouseover`]),bt(`onMouseLeave`,[`mouseout`,`mouseover`]),bt(`onPointerEnter`,[`pointerout`,`pointerover`]),bt(`onPointerLeave`,[`pointerout`,`pointerover`]),yt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),yt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),yt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),yt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),yt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),yt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Td=`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(` `),Ed=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Td));function Dd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}}}}function Od(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Md(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),Md(n,e,r,t)}var Ad=`_reactListening`+Math.random().toString(36).slice(2);function jd(e){if(!e[Ad]){e[Ad]=!0,_t.forEach(function(t){t!==`selectionchange`&&(Ed.has(t)||kd(t,!1,e),kd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,kd(`selectionchange`,!1,t))}}function Md(e,t,n,r){switch(wp(t)){case 2:var i=vp;break;case 8:i=yp;break;default:i=bp}n=i.bind(null,t,n,e),i=void 0,!sn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Nd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ft(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}rn(function(){var r=a,i=Qt(n),s=[];a:{var c=Wr.get(e);if(c!==void 0){var l=vn,u=e;switch(e){case`keypress`:if(pn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=Dn;break;case`focusout`:u=`blur`,l=Dn;break;case`beforeblur`:case`afterblur`:l=Dn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Tn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=En;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Lr:case Rr:case zr:l=On;break;case Ur:l=zn;break;case`scroll`:case`scrollend`:l=bn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=Vn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=an(m,p),g!=null&&d.push(Pd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Zt&&(u=n.relatedTarget||n.fromElement)&&(ft(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ft(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Tn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:mt(l),h=u==null?c:mt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ft(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Id,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ld(s,c,l,d,!1),u!==null&&f!==null&&Ld(s,f,u,d,!0)}}a:{if(c=r?mt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(tr(c))if(cr)v=_r;else{v=hr;var y=mr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Kt(r.elementType)&&(v=sr):v=gr;if(v&&=v(e,r)){nr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Rt(c,`number`,c.value)}switch(y=r?mt(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(s,n,i);break;case`selectionchange`:if(Er)break;case`keydown`:case`keyup`:jr(s,n,i)}var b;if(Un)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Zn?Yn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Kn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=fn()):(ln=i,un=`value`in ln?ln.value:ln.textContent,Zn=!0)),y=Fd(r,x),0<y.length&&(x=new An(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=Gn?Qn(e,n):$n(e,n))&&(x=Fd(r,`onBeforeInput`),0<x.length&&(y=new An(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Sd(s,e,r,n,i)}Dd(s,t)})}function Pd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=an(e,n),i!=null&&r.unshift(Pd(e,i,a)),i=an(e,t),i!=null&&r.push(Pd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Id(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=an(n,a),l!=null&&o.unshift(Pd(n,l,c))):i||(l=an(n,a),l!=null&&o.push(Pd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Rd=/\r\n?/g,zd=/\u0000|\uFFFD/g;function Bd(e){return(typeof e==`string`?e:``+e).replace(Rd,`
|
|
10
|
-
`).replace(zd,``)}function Vd(e,t){return t=Bd(t),Bd(e)===t}function Hd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Et(e,`class`,r);break;case`tabIndex`:Et(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Et(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Et(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Hd(e,t,`name`,a.name,a,null),Hd(e,t,`formEncType`,a.formEncType,a,null),Hd(e,t,`formMethod`,a.formMethod,a,null),Hd(e,t,`formTarget`,a.formTarget,a,null)):(Hd(e,t,`encType`,a.encType,a,null),Hd(e,t,`method`,a.method,a,null),Hd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Yt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Od(`beforetoggle`,e),Od(`toggle`,e),Tt(e,`popover`,r);break;case`xlinkActuate`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Tt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=qt.get(n)||n,Tt(e,n,r))}}function Ud(e,t,n,r,a,o){switch(n){case`style`:Gt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(e,``+r);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!vt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[B]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Tt(e,n,r)}}}function Wd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Od(`error`,e),Od(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,o,s,n,null)}}a&&Hd(e,t,`srcSet`,n.srcSet,n,null),r&&Hd(e,t,`src`,n.src,n,null);return;case`input`:Od(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Hd(e,t,r,d,n,null)}}Lt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Od(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Hd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&zt(e,!!r,n,!0):zt(e,!!r,t,!1);return;case`textarea`:for(s in Od(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Hd(e,t,s,c,n,null)}Vt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Hd(e,t,l,r,n,null)}return;case`dialog`:Od(`beforetoggle`,e),Od(`toggle`,e),Od(`cancel`,e),Od(`close`,e);break;case`iframe`:case`object`:Od(`load`,e);break;case`video`:case`audio`:for(r=0;r<Td.length;r++)Od(Td[r],e);break;case`image`:Od(`error`,e),Od(`load`,e);break;case`details`:Od(`toggle`,e);break;case`embed`:case`source`:case`link`:Od(`error`,e),Od(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,u,r,n,null)}return;default:if(Kt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ud(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Hd(e,t,c,r,n,null))}function Gd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Hd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Hd(e,t,p,m,r,f)}}It(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Hd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Hd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?zt(e,!!n,n?[]:``,!1):zt(e,!!n,t,!0)):zt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Hd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Hd(e,t,s,a,r,o)}Bt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Hd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Hd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Hd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Hd(e,t,u,p,r,m)}return;default:if(Kt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ud(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ud(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Hd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Hd(e,t,f,p,r,m)}function Kd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function qd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Kd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Kd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Jd=null,Yd=null;function Xd(e){return e.nodeType===9?e:e.ownerDocument}function Zd(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 Qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function $d(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ef=null;function tf(){var e=window.event;return e&&e.type===`popstate`?e===ef?!1:(ef=e,!0):(ef=null,!1)}var nf=typeof setTimeout==`function`?setTimeout:void 0,rf=typeof clearTimeout==`function`?clearTimeout:void 0,af=typeof Promise==`function`?Promise:void 0,of=typeof queueMicrotask==`function`?queueMicrotask:af===void 0?nf:function(e){return af.resolve(null).then(e).catch(sf)};function sf(e){setTimeout(function(){throw e})}function cf(e){return e===`head`}function lf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Up(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Cf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Cf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[V]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Cf(e.ownerDocument.body);n=i}while(n);Up(t)}function uf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function df(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:df(n),dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ff(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[V])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=vf(e.nextSibling),e===null)break}return null}function pf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=vf(e.nextSibling),e===null))return null;return e}function mf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=vf(e.nextSibling),e===null))return null;return e}function hf(e){return e.data===`$?`||e.data===`$~`}function gf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function _f(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function vf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var yf=null;function bf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return vf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function xf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Sf(e,t,n){switch(t=Xd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Cf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);dt(e)}var wf=new Map,Tf=new Set;function Ef(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Df=te.d;te.d={f:Of,r:kf,D:Mf,C:Nf,L:Pf,m:Ff,X:Lf,S:If,M:Rf};function Of(){var e=Df.f(),t=Du();return e||t}function kf(e){var t=pt(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):Df.r(e)}var Af=typeof document>`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ft(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),gt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ft(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ft(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ft(n.imageSizes)+`"]`)):i+=`[href="`+Ft(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),gt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ft(r)+`"][href="`+Ft(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),gt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=ht(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);gt(c),Wd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=ht(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=m({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),gt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=ht(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),gt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=oe.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=ht(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=ht(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=ht(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ft(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Wd(t,`link`,n),gt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ft(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ft(n.href)+`"]`);if(r)return t.instance=r,gt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),gt(r),Wd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,gt(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),gt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,gt(a),a):(r=n,(a=wf.get(o))&&(r=m({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),gt(a),Wd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Xf=null;function Zf(e,t,n){if(Xf===null){var r=new Map,i=Xf=new Map;i.set(n,r)}else i=Xf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[V]||a[at]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,gt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),gt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&op(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&np===0&&(np=62500*qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&op(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ip.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var cp={$$typeof:C,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function lp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function up(e,t,n,r,i,a,o,s,c,l,u,d){return e=new lp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ai(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function dp(e){return e?(e=ri,e):ri}function fp(e,t,n,r,i,a){i=dp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(Su(n,e,t),Ha(n,e,t))}function pp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mp(e,t){pp(e,t),(e=e.alternate)&&pp(e,t)}function hp(e){if(e.tag===13||e.tag===31){var t=ei(e,67108864);t!==null&&Su(t,e,67108864),mp(e,67108864)}}function gp(e){if(e.tag===13||e.tag===31){var t=bu();t=et(t);var n=ei(e,t);n!==null&&Su(n,e,t),mp(e,t)}}var _p=!0;function vp(e,t,n,r){var i=F.T;F.T=null;var a=te.p;try{te.p=2,bp(e,t,n,r)}finally{te.p=a,F.T=i}}function yp(e,t,n,r){var i=F.T;F.T=null;var a=te.p;try{te.p=8,bp(e,t,n,r)}finally{te.p=a,F.T=i}}function bp(e,t,n,r){if(_p){var i=xp(r);if(i===null)Nd(e,t,r,Sp,n),Np(e,r);else if(Fp(i,e,t,n,r))r.stopPropagation();else if(Np(e,r),t&4&&-1<Mp.indexOf(e)){for(;i!==null;){var a=pt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}dd(a),!(Vl&6)&&(cu=we()+500,fd(0,!1))}}break;case 31:case 13:s=ei(a,2),s!==null&&Su(s,a,2),Du(),mp(a,2)}if(a=xp(r),a===null&&Nd(e,t,r,Sp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}function xp(e){return e=Qt(e),Cp(e)}var Sp=null;function Cp(e){if(Sp=null,e=ft(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sp=e,null}function wp(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(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var Tp=!1,Ep=null,Dp=null,Op=null,kp=new Map,Ap=new Map,jp=[],Mp=`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 Np(e,t){switch(e){case`focusin`:case`focusout`:Ep=null;break;case`dragenter`:case`dragleave`:Dp=null;break;case`mouseover`:case`mouseout`:Op=null;break;case`pointerover`:case`pointerout`:kp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ap.delete(t.pointerId)}}function Pp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=pt(t),t!==null&&hp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fp(e,t,n,r,i){switch(t){case`focusin`:return Ep=Pp(Ep,e,t,n,r,i),!0;case`dragenter`:return Dp=Pp(Dp,e,t,n,r,i),!0;case`mouseover`:return Op=Pp(Op,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return kp.set(a,Pp(kp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ap.set(a,Pp(Ap.get(a)||null,e,t,n,r,i)),!0}return!1}function Ip(e){var t=ft(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,rt(e.priority,function(){gp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,rt(e.priority,function(){gp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=pt(n),t!==null&&hp(t),e.blockedOn=n,!1;t.shift()}return!0}function Rp(e,t,n){Lp(e)&&n.delete(t)}function zp(){Tp=!1,Ep!==null&&Lp(Ep)&&(Ep=null),Dp!==null&&Lp(Dp)&&(Dp=null),Op!==null&&Lp(Op)&&(Op=null),kp.forEach(Rp),Ap.forEach(Rp)}function Bp(e,n){e.blockedOn===n&&(e.blockedOn=null,Tp||(Tp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zp)))}var Vp=null;function Hp(e){Vp!==e&&(Vp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vp===e&&(Vp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Cp(r||n)===null)continue;break}var a=pt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Up(e){function t(t){return Bp(t,e)}Ep!==null&&Bp(Ep,e),Dp!==null&&Bp(Dp,e),Op!==null&&Bp(Op,e),kp.forEach(t),Ap.forEach(t);for(var n=0;n<jp.length;n++){var r=jp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jp.length&&(n=jp[0],n.blockedOn===null);)Ip(n),n.blockedOn===null&&jp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[B]||null;if(typeof a==`function`)o||Hp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[B]||null)s=o.formAction;else if(Cp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Hp(n)}}}function Wp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Gp(e){this._internalRoot=e}Kp.prototype.render=Gp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fp(n,bu(),e,t,null,null)},Kp.prototype.unmount=Gp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fp(e.current,2,null,e,null,null),Du(),t[ot]=null}};function Kp(e){this._internalRoot=e}Kp.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jp.length&&t!==0&&t<jp[n].priority;n++);jp.splice(n,0,e),n===0&&Ip(e)}};var qp=n.version;if(qp!==`19.2.7`)throw Error(i(527,qp,`19.2.7`));te.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Jp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Yp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yp.isDisabled&&Yp.supportsFiber)try{Ne=Yp.inject(Jp),Pe=Yp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=Ys,c=Xs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=up(e,1,!1,null,null,n,r,null,o,s,c,Wp),e[ot]=t.current,jd(e),new Gp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),y=o(((e,t)=>{t.exports=v()}));function b(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=b(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function x(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=b(e))&&(r&&(r+=` `),r+=t);return r}var S=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},C=(e,t)=>({classGroupId:e,validator:t}),w=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),T=`-`,E=[],D=`arbitrary..`,O=e=>{let t=j(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return A(e);let n=e.split(T);return k(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?S(i,t):t:i||E}return n[e]||E}}},k=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=k(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(T):e.slice(t).join(T),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},A=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?D+r:void 0})(),j=e=>{let{theme:t,classGroups:n}=e;return M(n,t)},M=(e,t)=>{let n=w();for(let r in e){let i=e[r];N(i,n,r,t)}return n},N=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];P(i,t,n,r)}},P=(e,t,n,r)=>{if(typeof e==`string`){ee(e,t,n);return}if(typeof e==`function`){F(e,t,n,r);return}te(e,t,n,r)},ee=(e,t,n)=>{let r=e===``?t:I(t,e);r.classGroupId=n},F=(e,t,n,r)=>{if(L(e)){N(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(C(n,e))},te=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];N(o,I(t,a),n,r)}},I=(e,t)=>{let n=e,r=t.split(T),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=w(),n.nextPart.set(t,i)),n=i}return n},L=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},R=`!`,re=`:`,z=[],ie=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ae=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===re){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(R)?(c=s.slice(0,-1),l=!0):s.startsWith(R)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ie(t,l,c,u)};if(t){let e=t+re,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ie(z,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},oe=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},se=e=>({cache:ne(e.cacheSize),parseClassName:ae(e),sortModifiers:oe(e),...O(e)}),ce=/\s+/,le=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(ce),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+R:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},ue=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=de(n))&&(i&&(i+=` `),i+=r);return i},de=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=de(e[r]))&&(n&&(n+=` `),n+=t);return n},fe=(e,...t)=>{let n,r,i,a,o=o=>(n=se(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=le(e,n);return i(e,a),a};return a=o,(...e)=>a(ue(...e))},pe=[],me=e=>{let t=t=>t[e]||pe;return t.isThemeGetter=!0,t},he=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ge=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_e=/^\d+\/\d+$/,ve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ye=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,be=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Se=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ce=e=>_e.test(e),we=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>!!e&&Number.isInteger(Number(e)),Ee=e=>e.endsWith(`%`)&&we(e.slice(0,-1)),De=e=>ve.test(e),Oe=()=>!0,ke=e=>ye.test(e)&&!be.test(e),Ae=()=>!1,je=e=>xe.test(e),Me=e=>Se.test(e),Ne=e=>!Fe(e)&&!Ve(e),Pe=e=>Je(e,Qe,Ae),Fe=e=>he.test(e),Ie=e=>Je(e,$e,ke),Le=e=>Je(e,et,we),Re=e=>Je(e,Xe,Ae),ze=e=>Je(e,Ze,Me),Be=e=>Je(e,nt,je),Ve=e=>ge.test(e),He=e=>Ye(e,$e),Ue=e=>Ye(e,tt),We=e=>Ye(e,Xe),Ge=e=>Ye(e,Qe),Ke=e=>Ye(e,Ze),qe=e=>Ye(e,nt,!0),Je=(e,t,n)=>{let r=he.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ye=(e,t,n=!1)=>{let r=ge.exec(e);return r?r[1]?t(r[1]):n:!1},Xe=e=>e===`position`||e===`percentage`,Ze=e=>e===`image`||e===`url`,Qe=e=>e===`length`||e===`size`||e===`bg-size`,$e=e=>e===`length`,et=e=>e===`number`,tt=e=>e===`family-name`,nt=e=>e===`shadow`,rt=fe(()=>{let e=me(`color`),t=me(`font`),n=me(`text`),r=me(`font-weight`),i=me(`tracking`),a=me(`leading`),o=me(`breakpoint`),s=me(`container`),c=me(`spacing`),l=me(`radius`),u=me(`shadow`),d=me(`inset-shadow`),f=me(`text-shadow`),p=me(`drop-shadow`),m=me(`blur`),h=me(`perspective`),g=me(`aspect`),_=me(`ease`),v=me(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Ve,Fe],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Ve,Fe,c],T=()=>[Ce,`full`,`auto`,...w()],E=()=>[Te,`none`,`subgrid`,Ve,Fe],D=()=>[`auto`,{span:[`full`,Te,Ve,Fe]},Te,Ve,Fe],O=()=>[Te,`auto`,Ve,Fe],k=()=>[`auto`,`min`,`max`,`fr`,Ve,Fe],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Ce,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,Ve,Fe],ee=()=>[...b(),We,Re,{position:[Ve,Fe]}],F=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,Ge,Pe,{size:[Ve,Fe]}],I=()=>[Ee,He,Ie],L=()=>[``,`none`,`full`,l,Ve,Fe],ne=()=>[``,we,He,Ie],R=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[we,Ee,We,Re],ie=()=>[``,`none`,m,Ve,Fe],ae=()=>[`none`,we,Ve,Fe],oe=()=>[`none`,we,Ve,Fe],se=()=>[we,Ve,Fe],ce=()=>[Ce,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[De],breakpoint:[De],color:[Oe],container:[De],"drop-shadow":[De],ease:[`in`,`out`,`in-out`],font:[Ne],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[De],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[De],shadow:[De],spacing:[`px`,we],text:[De],"text-shadow":[De],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Ce,Fe,Ve,g]}],container:[`container`],columns:[{columns:[we,Fe,Ve,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Te,`auto`,Ve,Fe]}],basis:[{basis:[Ce,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[we,Ce,`auto`,`initial`,`none`,Fe]}],grow:[{grow:[``,we,Ve,Fe]}],shrink:[{shrink:[``,we,Ve,Fe]}],order:[{order:[Te,`first`,`last`,`none`,Ve,Fe]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,He,Ie]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ve,Le]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ee,Fe]}],"font-family":[{font:[Ue,Fe,t]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Ve,Fe]}],"line-clamp":[{"line-clamp":[we,`none`,Ve,Le]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Ve,Fe]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Ve,Fe]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...R(),`wavy`]}],"text-decoration-thickness":[{decoration:[we,`from-font`,`auto`,Ve,Ie]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[we,`auto`,Ve,Fe]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Ve,Fe]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Ve,Fe]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Te,Ve,Fe],radial:[``,Ve,Fe],conic:[Te,Ve,Fe]},Ke,ze]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...R(),`hidden`,`none`]}],"divide-style":[{divide:[...R(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...R(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[we,Ve,Fe]}],"outline-w":[{outline:[``,we,He,Ie]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,qe,Be]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,qe,Be]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:ne()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[we,Ie]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,qe,Be]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[we,Ve,Fe]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[we]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Ve,Fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[we]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Ve,Fe]}],filter:[{filter:[``,`none`,Ve,Fe]}],blur:[{blur:ie()}],brightness:[{brightness:[we,Ve,Fe]}],contrast:[{contrast:[we,Ve,Fe]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,qe,Be]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,we,Ve,Fe]}],"hue-rotate":[{"hue-rotate":[we,Ve,Fe]}],invert:[{invert:[``,we,Ve,Fe]}],saturate:[{saturate:[we,Ve,Fe]}],sepia:[{sepia:[``,we,Ve,Fe]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Ve,Fe]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[we,Ve,Fe]}],"backdrop-contrast":[{"backdrop-contrast":[we,Ve,Fe]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,we,Ve,Fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[we,Ve,Fe]}],"backdrop-invert":[{"backdrop-invert":[``,we,Ve,Fe]}],"backdrop-opacity":[{"backdrop-opacity":[we,Ve,Fe]}],"backdrop-saturate":[{"backdrop-saturate":[we,Ve,Fe]}],"backdrop-sepia":[{"backdrop-sepia":[``,we,Ve,Fe]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Ve,Fe]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[we,`initial`,Ve,Fe]}],ease:[{ease:[`linear`,`initial`,_,Ve,Fe]}],delay:[{delay:[we,Ve,Fe]}],animate:[{animate:[`none`,v,Ve,Fe]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Ve,Fe]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[Ve,Fe,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Ve,Fe]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Ve,Fe]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[we,He,Ie,Le]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function it(...e){return rt(x(e))}function at(e,t,n){let r=e[t];return r===void 0?e[n]:r}var B=y(),ot=`inline-flex w-fit flex-none shrink-0 items-center justify-self-start rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap`,st={variant:{primary:{classes:`bg-kumo-badge-inverted text-kumo-badge-inverted`,description:`Primary badge`},secondary:{classes:`bg-kumo-fill text-kumo-badge-neutral-subtle`,description:`Secondary badge`},error:{classes:`bg-kumo-danger-tint/60 text-kumo-danger`,description:`Error badge`},warning:{classes:`bg-kumo-warning-tint/70 text-kumo-warning`,description:`Warning badge`},success:{classes:`bg-kumo-success-tint/70 text-kumo-success`,description:`Success badge`},destructive:{classes:`bg-kumo-badge-red text-white`,description:`Deprecated. Use red instead.`},info:{classes:`bg-kumo-info-tint/70 text-kumo-info`,description:`Info badge`},beta:{classes:`border border-dashed border-kumo-brand bg-transparent text-kumo-link`,description:`Indicates beta or experimental features`},outline:{classes:`border border-kumo-fill bg-transparent text-kumo-default`,description:`Bordered badge with transparent background`},red:{classes:`bg-kumo-badge-red text-white`,description:`Red badge`},green:{classes:`bg-kumo-badge-green text-white`,description:`Green badge`},neutral:{classes:`bg-kumo-badge-neutral text-white`,description:`Neutral badge`},orange:{classes:`bg-kumo-badge-orange text-black`,description:`Orange badge`},purple:{classes:`bg-kumo-badge-purple text-white`,description:`Purple badge`},teal:{classes:`bg-kumo-badge-teal text-white`,description:`Teal badge`},"teal-subtle":{classes:`bg-kumo-badge-teal-subtle text-kumo-badge-teal-subtle`,description:`Subtle teal badge`},blue:{classes:`bg-kumo-badge-blue text-white`,description:`Blue badge`}},appearance:{filled:{classes:``,description:`Filled badge with background color (default)`},dot:{classes:`gap-1.5 bg-transparent text-kumo-default ring ring-kumo-hairline`,description:`Outlined badge with a colored circle dot indicating status`}},dotColor:{none:{classes:``,description:`No dot indicator (used when appearance is not dot, or variant has no dot color)`},success:{classes:`bg-kumo-success`,description:`Green dot for success status`},warning:{classes:`bg-kumo-badge-orange`,description:`Orange dot for warning status`},error:{classes:`bg-kumo-badge-red`,description:`Red dot for error status`},neutral:{classes:`bg-kumo-badge-neutral`,description:`Neutral dot for informational status`}}},ct={variant:`primary`,appearance:`filled`,dotColor:`none`};function lt({variant:e=ct.variant,appearance:t=ct.appearance}={}){let n=at(st.variant,e,ct.variant).classes,r=at(st.appearance,t,ct.appearance).classes;return it(ot,t===`dot`?``:n,r)}function ut({variant:e=ct.variant,appearance:t=ct.appearance,className:n,children:r}){let i=t===`dot`?at(st.dotColor,e,ct.dotColor).classes:``;return(0,B.jsxs)(`span`,{className:it(lt({variant:e,appearance:t}),n),children:[i?(0,B.jsx)(`span`,{"aria-hidden":`true`,className:it(`size-1.75 rounded-full shrink-0`,i)}):null,r]})}var V=l(p(),1),dt=(0,V.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),ft=V.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=V.useContext(dt);return V.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&V.createElement(`title`,null,n),s,c.get(a??f))});ft.displayName=`IconBase`;var pt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),mt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:pt}));mt.displayName=`ArrowsClockwiseIcon`;var ht=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]]),gt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:ht}));gt.displayName=`CaretUpDownIcon`;var _t=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M120,128a16,16,0,1,1-16-16A16,16,0,0,1,120,128Zm32-16a16,16,0,1,0,16,16A16,16,0,0,0,152,112Zm84,16A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58,10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56,8A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z`}))]]),vt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:_t}));vt.displayName=`ChatCircleDotsIcon`;var yt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),bt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:yt}));bt.displayName=`CheckIcon`;var xt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),St=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:xt}));St.displayName=`CopyIcon`;var Ct=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z`}))]]),wt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:Ct}));wt.displayName=`EyeIcon`;var Tt=wt,Et=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z`}))]]),Dt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:Et}));Dt.displayName=`EyeSlashIcon`;var Ot=Dt,kt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z`}))]]),At=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:kt}));At.displayName=`GearIcon`;var jt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),Mt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:jt}));Mt.displayName=`InfoIcon`;var Nt=Mt,Pt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),Ft=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:Pt}));Ft.displayName=`MoonIcon`;var It=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M233.86,110.48,65.8,14.58A20,20,0,0,0,37.15,38.64L67.33,128,37.15,217.36A20,20,0,0,0,56,244a20.1,20.1,0,0,0,9.81-2.58l.09-.06,168-96.07a20,20,0,0,0,0-34.81ZM63.19,215.26,88.61,140H144a12,12,0,0,0,0-24H88.61L63.18,40.72l152.76,87.17Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M227.91,134.86,59.93,231a8,8,0,0,1-11.44-9.67L80,128,48.49,34.72a8,8,0,0,1,11.44-9.67l168,95.85A8,8,0,0,1,227.91,134.86Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M231.87,114l-168-95.89A16,16,0,0,0,40.92,37.34L71.55,128,40.92,218.67A16,16,0,0,0,56,240a16.15,16.15,0,0,0,7.93-2.1l167.92-96.05a16,16,0,0,0,.05-27.89ZM56,224a.56.56,0,0,0,0-.12L85.74,136H144a8,8,0,0,0,0-16H85.74L56.06,32.16A.46.46,0,0,0,56,32l168,95.83Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M240,127.89a16,16,0,0,1-8.18,14L63.9,237.9A16.15,16.15,0,0,1,56,240a16,16,0,0,1-15-21.33l27-79.95A4,4,0,0,1,71.72,136H144a8,8,0,0,0,8-8.53,8.19,8.19,0,0,0-8.26-7.47h-72a4,4,0,0,1-3.79-2.72l-27-79.94A16,16,0,0,1,63.84,18.07l168,95.89A16,16,0,0,1,240,127.89Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M230.88,115.69l-168-95.88a14,14,0,0,0-20,16.87L73.66,128,42.81,219.33A14,14,0,0,0,56,238a14.15,14.15,0,0,0,6.93-1.83L230.84,140.1a14,14,0,0,0,0-24.41Zm-5.95,14L57,225.73a2,2,0,0,1-2.86-2.42.42.42,0,0,0,0-.1L84.3,134H144a6,6,0,0,0,0-12H84.3L54.17,32.8a.3.3,0,0,0,0-.1,1.87,1.87,0,0,1,.6-2.2A1.85,1.85,0,0,1,57,30.25l168,95.89a1.93,1.93,0,0,1,1,1.74A2,2,0,0,1,224.93,129.66Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M231.87,114l-168-95.89A16,16,0,0,0,40.92,37.34L71.55,128,40.92,218.67A16,16,0,0,0,56,240a16.15,16.15,0,0,0,7.93-2.1l167.92-96.05a16,16,0,0,0,.05-27.89ZM56,224a.56.56,0,0,0,0-.12L85.74,136H144a8,8,0,0,0,0-16H85.74L56.06,32.16A.46.46,0,0,0,56,32l168,95.83Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M229.89,117.43l-168-95.88A12,12,0,0,0,44.7,36l31.08,92L44.71,220A12,12,0,0,0,56,236a12.13,12.13,0,0,0,5.93-1.57l167.94-96.08a12,12,0,0,0,0-20.92Zm-4,14L58,227.47a4,4,0,0,1-5.72-4.83l0-.07L82.87,132H144a4,4,0,0,0,0-8H82.87L52.26,33.37A3.89,3.89,0,0,1,53.44,29,4.13,4.13,0,0,1,56,28a3.88,3.88,0,0,1,1.93.54l168,95.87a4,4,0,0,1,0,7Z`}))]]),Lt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:It}));Lt.displayName=`PaperPlaneRightIcon`;var Rt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M137,168l11.52-11.51a12,12,0,0,0-17-17L120,151l-15-15,11.52-11.51a12,12,0,0,0-17-17L88,119,72.49,103.51a12,12,0,0,0-17,17L59,124,38.54,144.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l25.57-25.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L132,197l3.51,3.52a12,12,0,0,0,17-17ZM94.54,200.49a12,12,0,0,1-17,0L55.51,178.43a12,12,0,0,1,0-17L76,141l39,39Zm146-185a12,12,0,0,0-17,0L197.94,41.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L124,59l-3.51-3.52a12,12,0,0,0-17,17l80,80a12,12,0,0,0,17-17L197,132l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,25.58-25.57A12,12,0,0,0,240.49,15.51Zm-40,79L180,115,141,76l20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M76,124l56,56-29,29a24,24,0,0,1-33.94,0L47,186.91A24,24,0,0,1,47,153ZM209,69.09,186.91,47A24,24,0,0,0,153,47L124,76l56,56,29-29A24,24,0,0,0,209,69.09Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M149.66,149.66,131.31,168l18.35,18.34a8,8,0,0,1-11.32,11.32L132,191.31l-23.31,23.32a32.06,32.06,0,0,1-45.26,0l-5.37-5.38-28.4,28.41a8,8,0,0,1-11.32-11.32l28.41-28.4-5.38-5.37a32,32,0,0,1,0-45.26L64.69,124l-6.35-6.34a8,8,0,0,1,11.32-11.32L88,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32L99.31,136,120,156.69l18.34-18.35a8,8,0,0,1,11.32,11.32Zm88-131.32a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M148.24,139.76a6,6,0,0,0-8.48,0L120,159.51,96.49,136l19.75-19.76a6,6,0,0,0-8.48-8.48L88,127.51,68.24,107.76a6,6,0,0,0-8.48,8.48L67.51,124,42.79,148.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l29.82-29.81,6.79,6.78a30,30,0,0,0,42.42,0L132,188.49l7.76,7.75a6,6,0,0,0,8.48-8.48L128.49,168l19.75-19.76A6,6,0,0,0,148.24,139.76Zm-49.45,65a18,18,0,0,1-25.46,0L51.27,182.67a18,18,0,0,1,0-25.46L76,132.49,123.51,180Zm137.45-185a6,6,0,0,0-8.48,0L197.94,49.57l-6.79-6.78a30,30,0,0,0-42.42,0L124,67.51l-7.76-7.75a6,6,0,0,0-8.48,8.48l80,80a6,6,0,0,0,8.48-8.48L188.49,132l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,29.81-29.82A6,6,0,0,0,236.24,19.76Zm-31.51,79L180,123.51,132.49,76l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z`}))]]),zt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:Rt}));zt.displayName=`PlugsIcon`;var Bt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M240.49,15.51a12,12,0,0,0-17,0L173.94,65.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L100,83l-3.51-3.52a12,12,0,0,0-17,17L83,100,62.54,120.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l49.57-49.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L156,173l3.51,3.52a12,12,0,0,0,17-17L173,156l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,49.58-49.57A12,12,0,0,0,240.49,15.51Zm-121.95,161a12,12,0,0,1-17,0L79.51,154.43a12,12,0,0,1,0-17L100,117l39,39Zm58-57.95h0L156,139l-39-39,20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17ZM85.27,33.37a12,12,0,0,1,21.46-10.74l8,16A12,12,0,1,1,93.27,49.37Zm-68,57.26a12,12,0,0,1,16.1-5.36l16,8a12,12,0,1,1-10.74,21.46l-16-8A12,12,0,0,1,17.27,90.63Zm221.46,74.74a12,12,0,0,1-16.1,5.36l-16-8a12,12,0,0,1,10.74-21.46l16,8A12,12,0,0,1,238.73,165.37Zm-68,57.26a12,12,0,1,1-21.46,10.74l-8-16a12,12,0,0,1,21.46-10.74Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M185,127,127,185a24,24,0,0,1-33.94,0L71,162.91A24,24,0,0,1,71,129L129,71a24,24,0,0,1,33.94,0L185,93.09A24,24,0,0,1,185,127Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32.06,32.06,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94h0L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22a16,16,0,0,1,0,22.63ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM29,103.43l20,8A8,8,0,1,0,55,96.57l-20-8A8,8,0,0,0,29,103.43ZM227,152.57l-20-8A8,8,0,1,0,201,159.43l20,8A8,8,0,0,0,227,152.57ZM159.43,201A8,8,0,0,0,144.57,207l8,20A8,8,0,1,0,167.43,221ZM237.91,18.52a8,8,0,0,0-11.5-.18L174,70.75l-5.38-5.38a32,32,0,0,0-45.28,0L106.14,82.54a4,4,0,0,0,0,5.66l61.7,61.66a4,4,0,0,0,5.66,0l16.74-16.74a32.76,32.76,0,0,0,9.81-22.52,31.82,31.82,0,0,0-9.37-23.17l-5.38-5.37,52.2-52.17A8.22,8.22,0,0,0,237.91,18.52ZM85.64,90.34a8,8,0,0,0-11.49.18,8.22,8.22,0,0,0,.41,11.37L80.67,108,65.34,123.31A31.82,31.82,0,0,0,56,146.47,32.75,32.75,0,0,0,65.77,169l5,4.94L18.49,226.13a8.21,8.21,0,0,0-.61,11.1,8,8,0,0,0,11.72.43L82,185.25l5.37,5.38a32.1,32.1,0,0,0,45.29,0L148,175.31l6.34,6.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M236.24,19.76a6,6,0,0,0-8.48,0L173.94,73.57l-6.79-6.78a30,30,0,0,0-42.42,0L100,91.51l-7.76-7.75a6,6,0,0,0-8.48,8.48L91.51,100,66.79,124.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l53.82-53.81,6.79,6.78a30,30,0,0,0,42.42,0L156,164.49l7.76,7.75a6,6,0,0,0,8.48-8.48L164.49,156l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,53.81-53.82A6,6,0,0,0,236.24,19.76Zm-113.45,161a18,18,0,0,1-25.46,0L75.27,158.67a18,18,0,0,1,0-25.46L100,108.49,147.51,156Zm57.94-57.94L156,147.51,108.49,100l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46ZM90.43,34.23a6,6,0,0,1,11.14-4.46l8,20a6,6,0,1,1-11.14,4.46Zm-64,59.54a6,6,0,0,1,7.8-3.34l20,8a6,6,0,1,1-4.46,11.14l-20-8A6,6,0,0,1,26.43,93.77Zm203.14,68.46a6,6,0,0,1-7.8,3.34l-20-8a6,6,0,0,1,4.46-11.14l20,8A6,6,0,0,1,229.57,162.23Zm-64,59.54a6,6,0,1,1-11.14,4.46l-8-20a6,6,0,0,1,11.14-4.46Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32,32,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,179.31,121.37ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z`}))]]),Vt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:Bt}));Vt.displayName=`PlugsConnectedIcon`;var Ht=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),Ut=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:Ht}));Ut.displayName=`SunIcon`;var Wt=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),Gt=V.forwardRef((e,t)=>V.createElement(ft,{ref:t,...e,weights:Wt}));Gt.displayName=`TrashIcon`;var Kt={size:{sm:{value:16,description:`Small loader for inline use`},base:{value:24,description:`Default loader size`},lg:{value:32,description:`Large loader for prominent loading states`}}},qt={size:`base`};function Jt({size:e=qt.size}={}){return typeof e==`number`?e:at(Kt.size,e,qt.size).value}var Yt=({className:e,size:t=qt.size,"aria-label":n=`Loading`})=>{let r=Jt({size:t});return(0,B.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,stroke:`currentColor`,className:e,style:{height:r,width:r},role:`status`,"aria-label":n,children:[(0,B.jsxs)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,B.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`2s`,repeatCount:`indefinite`}),(0,B.jsx)(`animate`,{attributeName:`stroke-dasharray`,values:`0 150;42 150;42 150`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`}),(0,B.jsx)(`animate`,{attributeName:`stroke-dashoffset`,values:`0;-16;-59`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`})]}),(0,B.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,opacity:.1,strokeWidth:`2`,strokeLinecap:`round`})]})},Xt=(0,V.createContext)(null);function Zt(){return(0,V.useContext)(Xt)}var Qt=l(h(),1);function $t(){return typeof window<`u`}function en(e){return rn(e)?(e.nodeName||``).toLowerCase():`#document`}function tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nn(e){return((rn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function rn(e){return $t()?e instanceof Node||e instanceof tn(e).Node:!1}function an(e){return $t()?e instanceof Element||e instanceof tn(e).Element:!1}function on(e){return $t()?e instanceof HTMLElement||e instanceof tn(e).HTMLElement:!1}function sn(e){return!$t()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof tn(e).ShadowRoot}function cn(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=yn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ln(e){return/^(table|td|th)$/.test(en(e))}function un(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var dn=/transform|translate|scale|rotate|perspective|filter/,fn=/paint|layout|strict|content/,pn=e=>!!e&&e!==`none`,mn;function hn(e){let t=an(e)?yn(e):e;return pn(t.transform)||pn(t.translate)||pn(t.scale)||pn(t.rotate)||pn(t.perspective)||!_n()&&(pn(t.backdropFilter)||pn(t.filter))||dn.test(t.willChange||``)||fn.test(t.contain||``)}function gn(e){let t=xn(e);for(;on(t)&&!vn(t);){if(hn(t))return t;if(un(t))return null;t=xn(t)}return null}function _n(){return mn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),mn}function vn(e){return/^(html|body|#document)$/.test(en(e))}function yn(e){return tn(e).getComputedStyle(e)}function bn(e){return an(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xn(e){if(en(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||sn(e)&&e.host||nn(e);return sn(t)?t.host:t}function Sn(e){let t=xn(e);return vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:on(t)&&cn(t)?t:Sn(t)}function Cn(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Sn(e),i=r===e.ownerDocument?.body,a=tn(r);if(i){let e=wn(a);return t.concat(a,a.visualViewport||[],cn(r)?r:[],e&&n?Cn(e):[])}else return t.concat(r,Cn(r,[],n))}function wn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Tn=[`top`,`right`,`bottom`,`left`],En=Math.min,Dn=Math.max,On=Math.round,kn=Math.floor,An=e=>({x:e,y:e}),jn={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Mn(e,t,n){return Dn(e,En(t,n))}function Nn(e,t){return typeof e==`function`?e(t):e}function Pn(e){return e.split(`-`)[0]}function Fn(e){return e.split(`-`)[1]}function In(e){return e===`x`?`y`:`x`}function Ln(e){return e===`y`?`height`:`width`}function Rn(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function zn(e){return In(Rn(e))}function Bn(e,t,n){n===void 0&&(n=!1);let r=Fn(e),i=zn(e),a=Ln(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Yn(o)),[o,Yn(o)]}function Vn(e){let t=Yn(e);return[Hn(e),t,Hn(t)]}function Hn(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Un=[`left`,`right`],Wn=[`right`,`left`],Gn=[`top`,`bottom`],Kn=[`bottom`,`top`];function qn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Wn:Un:t?Un:Wn;case`left`:case`right`:return t?Gn:Kn;default:return[]}}function Jn(e,t,n,r){let i=Fn(e),a=qn(Pn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Hn)))),a}function Yn(e){let t=Pn(e);return jn[t]+e.slice(t.length)}function Xn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Xn(e)}function Qn(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function $n(e,t,n){let{reference:r,floating:i}=e,a=Rn(t),o=zn(t),s=Ln(o),c=Pn(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Fn(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function er(e,t){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=Nn(t,e),m=Zn(p),h=s[f?d===`floating`?`reference`:`floating`:d],g=Qn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=Qn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:v,strategy:c}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}var tr=50,nr=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:er},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=$n(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<tr&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=$n(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},rr=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Nn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Pn(r),_=Rn(o),v=Pn(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Yn(o)]:Vn(o)),x=p!==`none`;!d&&x&&b.push(...Jn(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Bn(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Rn(t))||T.every(e=>Rn(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Rn(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ir(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ar(e){return Tn.some(t=>e[t]>=0)}var or=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Nn(e,t);switch(i){case`referenceHidden`:{let e=ir(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ar(e)}}}case`escaped`:{let e=ir(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ar(e)}}}default:return{}}}}},sr=new Set([`left`,`top`]);async function cr(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Pn(n),s=Fn(n),c=Rn(n)===`y`,l=sr.has(o)?-1:1,u=a&&c?-1:1,d=Nn(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var lr=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await cr(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ur=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Nn(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Rn(Pn(i)),p=In(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Mn(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Mn(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},dr=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Nn(e,t),u={x:n,y:r},d=Rn(i),f=In(d),p=u[f],m=u[d],h=Nn(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=sr.has(Pn(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},fr=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Nn(e,t),u=await o.detectOverflow(t,l),d=Pn(i),f=Fn(i),p=Rn(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=En(h-u[g],v),x=En(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Dn(u.left,0),t=Dn(u.right,0),n=Dn(u.top,0),r=Dn(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Dn(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Dn(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function pr(e){let t=yn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=on(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=On(n)!==a||On(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function mr(e){return an(e)?e:e.contextElement}function hr(e){let t=mr(e);if(!on(t))return An(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=pr(t),o=(a?On(n.width):n.width)/r,s=(a?On(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var gr=An(0);function _r(e){let t=tn(e);return!_n()||!t.visualViewport?gr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tn(e)?!1:t}function yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=mr(e),o=An(1);t&&(r?an(r)&&(o=hr(r)):o=hr(e));let s=vr(a,n,r)?_r(a):An(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=tn(a),t=r&&an(r)?tn(r):r,n=e,i=wn(n);for(;i&&r&&t!==n;){let e=hr(i),t=i.getBoundingClientRect(),r=yn(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=tn(i),i=wn(n)}}return Qn({width:u,height:d,x:c,y:l})}function br(e,t){let n=bn(e).scrollLeft;return t?t.left+n:yr(nn(e)).left+n}function xr(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-br(e,n),y:n.top+t.scrollTop}}function Sr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=nn(r),s=t?un(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=An(1),u=An(0),d=on(r);if((d||!d&&!a)&&((en(r)!==`body`||cn(o))&&(c=bn(r)),d)){let e=yr(r);l=hr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?xr(o,c):An(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Cr(e){return Array.from(e.getClientRects())}function wr(e){let t=nn(e),n=bn(e),r=e.ownerDocument.body,i=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+br(e),s=-n.scrollTop;return yn(r).direction===`rtl`&&(o+=Dn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Tr=25;function Er(e,t){let n=tn(e),r=nn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=_n();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=br(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Tr&&(a-=o)}else l<=Tr&&(a+=l);return{width:a,height:o,x:s,y:c}}function Dr(e,t){let n=yr(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=on(e)?hr(e):An(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Or(e,t,n){let r;if(t===`viewport`)r=Er(e,n);else if(t===`document`)r=wr(nn(e));else if(an(t))r=Dr(t,n);else{let n=_r(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Qn(r)}function kr(e,t){let n=xn(e);return n===t||!an(n)||vn(n)?!1:yn(n).position===`fixed`||kr(n,t)}function Ar(e,t){let n=t.get(e);if(n)return n;let r=Cn(e,[],!1).filter(e=>an(e)&&en(e)!==`body`),i=null,a=yn(e).position===`fixed`,o=a?xn(e):e;for(;an(o)&&!vn(o);){let t=yn(o),n=hn(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||cn(o)&&!n&&kr(e,o))?r=r.filter(e=>e!==o):i=t,o=xn(o)}return t.set(e,r),r}function jr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?un(t)?[]:Ar(t,this._c):[].concat(n),r],o=Or(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Or(t,a[e],i);s=Dn(n.top,s),c=En(n.right,c),l=En(n.bottom,l),u=Dn(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Mr(e){let{width:t,height:n}=pr(e);return{width:t,height:n}}function Nr(e,t,n){let r=on(t),i=nn(t),a=n===`fixed`,o=yr(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=An(0);function l(){c.x=br(i)}if(r||!r&&!a)if((en(t)!==`body`||cn(i))&&(s=bn(t)),r){let e=yr(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?xr(i,s):An(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Pr(e){return yn(e).position===`static`}function Fr(e,t){if(!on(e)||yn(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return nn(e)===n&&(n=n.ownerDocument.body),n}function Ir(e,t){let n=tn(e);if(un(e))return n;if(!on(e)){let t=xn(e);for(;t&&!vn(t);){if(an(t)&&!Pr(t))return t;t=xn(t)}return n}let r=Fr(e,t);for(;r&&ln(r)&&Pr(r);)r=Fr(r,t);return r&&vn(r)&&Pr(r)&&!hn(r)?n:r||gn(e)||n}var Lr=async function(e){let t=this.getOffsetParent||Ir,n=this.getDimensions,r=await n(e.floating);return{reference:Nr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rr(e){return yn(e).direction===`rtl`}var zr={convertOffsetParentRelativeRectToViewportRelativeRect:Sr,getDocumentElement:nn,getClippingRect:jr,getOffsetParent:Ir,getElementRects:Lr,getClientRects:Cr,getDimensions:Mr,getScale:hr,isElement:an,isRTL:Rr};function Br(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vr(e,t){let n=null,r,i=nn(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=kn(d),h=kn(i.clientWidth-(u+f)),g=kn(i.clientHeight-(d+p)),_=kn(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Dn(0,En(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Br(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Hr(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=mr(e),u=i||a?[...l?Cn(l):[],...t?Cn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Vr(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?yr(e):null;c&&g();function g(){let t=yr(e);h&&!Br(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ur=lr,Wr=ur,Gr=rr,Kr=fr,qr=or,Jr=dr,Yr=(e,t,n)=>{let r=new Map,i={platform:zr,...n},a={...i.platform,_c:r};return nr(e,t,{...i,platform:a})},Xr=typeof document<`u`?V.useLayoutEffect:function(){};function Zr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Zr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Zr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Qr(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $r(e,t){let n=Qr(e);return Math.round(t*n)/n}function ei(e){let t=V.useRef(e);return Xr(()=>{t.current=e}),t}function ti(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=V.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=V.useState(r);Zr(f,r)||p(r);let[m,h]=V.useState(null),[g,_]=V.useState(null),v=V.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=V.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=V.useRef(null),C=V.useRef(null),w=V.useRef(u),T=c!=null,E=ei(c),D=ei(i),O=ei(l),k=V.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Yr(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Zr(w.current,t)&&(w.current=t,Qt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Xr(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=V.useRef(!1);Xr(()=>(A.current=!0,()=>{A.current=!1}),[]),Xr(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=V.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=V.useMemo(()=>({reference:b,floating:x}),[b,x]),N=V.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=$r(M.floating,u.x),r=$r(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Qr(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return V.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var ni=(e,t)=>{let n=Ur(e);return{name:n.name,fn:n.fn,options:[e,t]}},ri=(e,t)=>{let n=Wr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ii=(e,t)=>({fn:Jr(e).fn,options:[e,t]}),ai=(e,t)=>{let n=Gr(e);return{name:n.name,fn:n.fn,options:[e,t]}},oi=(e,t)=>{let n=Kr(e);return{name:n.name,fn:n.fn,options:[e,t]}},si=(e,t)=>{let n=qr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ci={exports:{}},li={},ui;function di(){if(ui)return li;ui=1;var e=V.default;function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var n=typeof Object.is==`function`?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(e,t){var n=t(),s=r({inst:{value:n,getSnapshot:t}}),l=s[0].inst,u=s[1];return a(function(){l.value=n,l.getSnapshot=t,c(l)&&u({inst:l})},[e,n,t]),i(function(){return c(l)&&u({inst:l}),e(function(){c(l)&&u({inst:l})})},[e]),o(n),n}function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch{return!0}}function l(e,t){return t()}var u=typeof window>`u`||typeof window.document>`u`||typeof window.document.createElement>`u`?l:s;return li.useSyncExternalStore=e.useSyncExternalStore===void 0?u:e.useSyncExternalStore,li}var fi;function pi(){return fi||(fi=1,ci.exports=di()),ci.exports}var mi=pi(),hi={exports:{}},gi={},_i;function vi(){if(_i)return gi;_i=1;var e=V.default,t=pi();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;return gi.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=a(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=l(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(a,e))return t;var n=l(e);return u!==void 0&&u(t,n)?(a=e,t):(a=e,o=n)}var i=!1,a,o,s=n===void 0?null:n;return[function(){return e(t())},s===null?void 0:function(){return e(s())}]},[t,n,l,u]);var p=i(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),c(p),p},gi}var yi;function bi(){return yi||(yi=1,hi.exports=vi()),hi.exports}var xi=bi(),Si={};function Ci(e,t){let n=V.useRef(Si);return n.current===Si&&(n.current=e(t)),n}var wi=[],Ti;function Ei(){return Ti}function Di(e){wi.push(e)}function Oi(e){let t=(t,n)=>{let r=Ci(Ai).current,i;try{Ti=r;for(let e of wi)e.before(r);i=e(t,n);for(let e of wi)e.after(r);r.didInitialize=!0}finally{Ti=void 0}return i};return t.displayName=e.displayName||e.name,t}function ki(e){return V.forwardRef(Oi(e))}function Ai(){return{didInitialize:!1}}function ji(e){let t=V.useRef(!0);t.current&&(t.current=!1,e())}var H=typeof document<`u`?V.useLayoutEffect:()=>{};function Mi(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Ni=Mi(`https://base-ui.com/production-error`,`Base UI`),Pi=V.createContext(void 0);function Fi(e){let t=V.useContext(Pi);if(t===void 0&&!e)throw Error(Ni(72));return t}var Ii=[];function Li(e){V.useEffect(e,Ii)}var Ri=0,zi=class e{static create(){return new e}currentId=Ri;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ri,t()},e)}isStarted(){return this.currentId!==Ri}clear=()=>{this.currentId!==Ri&&(clearTimeout(this.currentId),this.currentId=Ri)};disposeEffect=()=>this.clear};function Bi(){let e=Ci(zi.create).current;return Li(e.disposeEffect),e}var Vi=typeof navigator<`u`,Hi=Zi(),Ui=$i(),Wi=Qi(),Gi=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),Ki=Hi.platform===`MacIntel`&&Hi.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Hi.platform);Vi&&/firefox/i.test(Wi);var qi=Vi&&/apple/i.test(navigator.vendor),Ji=Vi&&/android/i.test(Ui)||/android/i.test(Wi),Yi=Vi&&Ui.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Xi=Wi.includes(`jsdom/`);function Zi(){if(!Vi)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function Qi(){if(!Vi)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function $i(){if(!Vi)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function ea(e){e.preventDefault(),e.stopPropagation()}function ta(e){return`nativeEvent`in e}function na(e){return e.pointerType===``&&e.isTrusted?!0:Ji&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function ra(e){return Xi?!1:!Ji&&e.width===0&&e.height===0||Ji&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function ia(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function aa(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var oa=`data-base-ui-focusable`,sa=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,ca=`ArrowLeft`,la=`ArrowRight`,ua=`ArrowUp`,da=`ArrowDown`;function fa(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function pa(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&sn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ma(e){return`composedPath`in e?e.composedPath()[0]:e.target}function ha(e,t){if(!an(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(pa(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function ga(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function _a(e){return e.matches(`html,body`)}function va(e){return on(e)&&e.matches(sa)}function ya(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${sa}`)!=null}function ba(e){return e?e.getAttribute(`role`)===`combobox`&&va(e):!1}function xa(e){if(!e||Xi)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Sa(e){return e?e.hasAttribute(oa)?e:e.querySelector(`[${oa}]`)||e:null}function Ca(e,t){return t!=null&&!ia(t)?0:typeof e==`function`?e():e}function wa(e,t,n){let r=Ca(e,n);return typeof r==`number`?r:r?.[t]}function Ta(e){return typeof e==`function`?e():e}function Ea(e,t){return t||e===`click`||e===`mousedown`}function Da(e){return e?.includes(`mouse`)&&e!==`mousedown`}function Oa(){}var ka=Object.freeze([]),Aa=Object.freeze({}),ja=`none`,Ma=`trigger-press`,Na=`trigger-hover`,Pa=`trigger-focus`,Fa=`outside-press`,Ia=`item-press`,La=`focus-out`,Ra=`escape-key`,za=`list-navigation`,Ba=`cancel-open`,Va=`sibling-open`,Ha=`disabled`,Ua=`imperative-action`,Wa=`window-resize`;function Ga(e,t,n,r){let i=!1,a=!1,o=r??Aa;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var Ka=V.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new zi,currentIdRef:{current:null},currentContextRef:{current:null}});function qa(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=V.useContext(Ka),[f,p]=V.useState(!1);return H(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),H(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:wa(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Ga(ja))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),H(()=>()=>{l.current=null},[l]),V.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function Ja(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ya(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Xa(e,t,n,r){let i=Ci(Qa).current;return $a(i,e,t,n,r)&&to(i,[e,t,n,r]),i.callback}function Za(e){let t=Ci(Qa).current;return eo(t,e)&&to(t,e),t.callback}function Qa(){return{callback:null,cleanup:null,refs:[]}}function $a(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function eo(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function to(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break}}}}}}function no(e){let t=Ci(ro,e).current;return t.next=e,H(t.effect),t}function ro(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var io={...V},ao=io.useInsertionEffect,oo=ao&&ao!==io.useLayoutEffect?ao:e=>e();function so(e){let t=Ci(co).current;return t.next=e,oo(t.effect),t.trampoline}function co(){let e={next:void 0,callback:lo,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function lo(){}var uo=null;globalThis.requestAnimationFrame;var fo=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},po=class e{static create(){return new e}static request(e){return fo.request(e)}static cancel(e){return fo.cancel(e)}currentId=uo;request(e){this.cancel(),this.currentId=fo.request(()=>{this.currentId=uo,e()})}cancel=()=>{this.currentId!==uo&&(fo.cancel(this.currentId),this.currentId=uo)};disposeEffect=()=>this.cancel};function mo(){let e=Ci(po.create).current;return Li(e.disposeEffect),e}function ho(e){return e?.ownerDocument||document}var go={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},_o={...go,position:`fixed`,top:0,left:0},vo={...go,position:`absolute`},yo=V.forwardRef(function(e,t){let[n,r]=V.useState();return H(()=>{qi&&r(`button`)},[]),(0,B.jsx)(`span`,{...e,ref:t,style:_o,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":``})});function bo(e,t,n){return Math.floor(e/t)!==n}function xo(e,t){return t<0||t>=e.length}function So(e,t){return wo(e.current,{disabledIndices:t})}function Co(e,t){return wo(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function wo(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ko(e,a,r));return a}function To(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===ua?p=`up`:t.key===da&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!ko(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=kn(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!ko(e,r,s))return r}};d&&ea(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=wo(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=wo(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}xo(e,f)&&(f=u)}if(n===`both`){let n=kn(u/o);t.key===(a?ca:la)&&(d&&ea(t),u%o===o-1?r&&(f=wo(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=wo(e,{startingIndex:u,disabledIndices:s}),r&&bo(f,o,n)&&(f=wo(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),bo(f,o,n)&&(f=u)),t.key===(a?la:ca)&&(d&&ea(t),u%o===0?r&&(f=wo(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=wo(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&bo(f,o,n)&&(f=wo(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),bo(f,o,n)&&(f=u));let c=kn(l/o)===n;xo(e,f)&&(r&&c?(f=t.key===(a?la:ca)?l:wo(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function Eo(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Do(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function Oo(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function ko(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?jo(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function Ao(e){return e.visibility===`hidden`||e.visibility===`collapse`}function jo(e,t=e?yn(e):null){return!e||!e.isConnected||!t||Ao(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Mo=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function No(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return sn(n)?n.host:null}function Po(e){for(let t of Array.from(e.children))if(en(t)===`summary`)return t;return null}function Fo(e,t){let n=Po(t);return!!n&&(e===n||pa(n,e))}function Io(e){let t=e?en(e):``;return e!=null&&e.matches(Mo)&&(t!==`summary`||e.parentElement!=null&&en(e.parentElement)===`details`&&Po(e.parentElement)===e)&&(t!==`details`||Po(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Lo(e){if(!Io(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=No(t)){let n=t!==e,r=en(t)===`slot`;if(t.hasAttribute(`inert`)||n&&en(t)===`details`&&!t.open&&!Fo(e,t)||t.hasAttribute(`hidden`)||!r&&!Ro(t,n))return!1}return!0}function Ro(e,t){let n=yn(e);return t?n.display!==`none`:jo(e,n)}function zo(e){let t=e.tabIndex;if(t<0){let t=en(e);if(t===`details`||t===`audio`||t===`video`||on(e)&&e.isContentEditable)return 0}return t}function Bo(e){if(en(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Vo(e,t){let n=Bo(e);if(!n)return!0;let r=t.find(e=>{let t=Bo(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Bo(e);return t?.name===n.name&&t.form===n.form})===n}function Ho(e){if(on(e)&&en(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return on(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Uo(e,t){Ho(e).forEach(e=>{Io(e)&&t.push(e),Uo(e,t)})}function Wo(e,t,n){Ho(e).forEach(e=>{on(e)&&e.matches(t)&&n.push(e),Wo(e,t,n)})}function Go(e){return Lo(e)&&zo(e)>=0}function Ko(e){let t=[];return Uo(e,t),t.filter(Lo)}function qo(e){let t=Ko(e);return t.filter(e=>zo(e)>=0&&Vo(e,t))}function Jo(e,t){let n=qo(e),r=n.length;if(r===0)return;let i=fa(ho(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Yo(e){return Jo(ho(e).body,1)||e}function Xo(e){return Jo(ho(e).body,-1)||e}function Zo(e,t){if(!e)return null;let n=qo(ho(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Qo(e){return Zo(e,1)}function $o(e){return Zo(e,-1)}function es(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!pa(n,r)}function ts(e){qo(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ns(e){let t=[];Wo(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function rs(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...rs(e,t.id,n)])}function is(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function as(e){return`data-base-ui-${e}`}var os=0;function ss(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(os);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),Oa;let o=requestAnimationFrame(a);return os=o,()=>{os===o&&(cancelAnimationFrame(o),os=0)}}var cs={inert:new WeakMap,"aria-hidden":new WeakMap},ls=`data-base-ui-inert`,us={inert:new WeakSet,"aria-hidden":new WeakSet},ds=new WeakMap,fs=0;function ps(e){return us[e]}function ms(e){return e?sn(e)?e.host:ms(e.parentNode):null}var hs=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ms(t);return e.contains(n)?n:null}).filter(e=>e!=null),gs=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},_s=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{en(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function vs(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=hs(t,e),u=i?hs(t,a):[],d=new Set(u),f=i?_s(t,gs(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=cs[o],n=ps(o);c=n,s=e;let r=hs(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);_s(t,gs(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(ds.get(e)||0)+1;ds.set(e,t),m.push(e),t===1&&e.setAttribute(ls,``)}),fs+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(ds.get(e)||0)-1;ds.set(e,t),t||e.removeAttribute(ls)}),--fs,fs||(cs.inert=new WeakMap,cs[`aria-hidden`]=new WeakMap,us.inert=new WeakSet,us[`aria-hidden`]=new WeakSet,ds=new WeakMap)}}function ys(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=ho(e[0]).body;return vs(e,o,n,r,{mark:i,markerIgnoreElements:a})}var bs=0;function xs(e,t=`mui`){let[n,r]=V.useState(e),i=e||n;return V.useEffect(()=>{n??(bs+=1,r(`${t}-${bs}`))},[n,t]),i}var Ss=io.useId;function Cs(e,t){if(Ss!==void 0){let n=Ss();return e??(t?`${t}-${n}`:n)}return xs(e,t)}var ws=19;function Ts(e){return ws>=e}function Es(e){if(!V.isValidElement(e))return null;let t=e,n=t.props;return(Ts(19)?n?.ref:t.ref)??null}function Ds(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Os(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function ks(e,t){return typeof e==`function`?e(t):e}function As(e,t){return typeof e==`function`?e(t):e}var js={};function Ms(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Ps(t);let a=Ps(e);return t&&(a=Fs(a,t)),n&&(a=Fs(a,n)),r&&(a=Fs(a,r)),i&&(a=Fs(a,i)),a}function Ns(e){if(e.length===0)return js;if(e.length===1)return Ps(e[0]);let t=Ps(e[0]);for(let n=1;n<e.length;n+=1)t=Fs(t,e[n]);return t}function Ps(e){return zs(e)?{...Bs(e,js)}:Is(e)}function Fs(e,t){return zs(t)?Bs(t,e):Ls(e,t)}function Is(e){let t={...e};for(let e in t){let n=t[e];Rs(e,n)&&(t[e]=Hs(n))}return t}function Ls(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Ds(e.style,r);break;case`className`:e[n]=Ws(e.className,r);break;default:Rs(n,r)?e[n]=Vs(e[n],r):e[n]=r}}return e}function Rs(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||typeof t>`u`)}function zs(e){return typeof e==`function`}function Bs(e,t){return zs(e)?e(t):e??js}function Vs(e,t){return t?e?(...n)=>{let r=n[0];if(Gs(r)){let i=r;Us(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Hs(t):e}function Hs(e){return e&&((...t)=>{let n=t[0];return Gs(n)&&Us(n),e(...t)})}function Us(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ws(e,t){return t?e?t+` `+e:t:e}function Gs(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Ks(e,t,n={}){let r=t.render,i=qs(t,n);return n.enabled===!1?null:Xs(e,r,i,n.state??Aa)}function qs(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Aa,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?ks(n,a):void 0,d=l?As(r,a):void 0,f=l?Os(a,c):Aa,p=l&&s?Js(s):void 0,m=l?Ds(f,p)??{}:Aa;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=Za([m.ref,Es(i),...o]):m.ref=Xa(m.ref,Es(i),o):Xa(null,null)),l?(u!==void 0&&(m.className=Ws(m.className,u)),d!==void 0&&(m.style=Ds(m.style,d)),m):Aa}function Js(e){return Array.isArray(e)?Ns(e):Ms(void 0,e)}var Ys=Symbol.for(`react.lazy`);function Xs(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Ms(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===Ys&&(i=V.Children.toArray(t)[0]),V.cloneElement(i,e)}if(e&&typeof e==`string`)return Zs(e,n);throw Error(Ni(8))}function Zs(e,t){return e===`button`?(0,V.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,V.createElement)(`img`,{alt:``,...t,key:t.key}):V.createElement(e,t)}var Qs=500,$s=500,ec={style:{transition:`none`}},tc=`data-base-ui-click-trigger`,nc=`data-base-ui-swipe-ignore`,rc=`data-swipe-ignore`,ic=`[${nc}]`,ac=`[${rc}]`,oc={fallbackAxisSide:`none`},sc={fallbackAxisSide:`end`},cc={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},lc=V.createContext(null),uc=()=>V.useContext(lc),dc=as(`portal`);function fc(e={}){let{ref:t,container:n,componentProps:r=Aa,elementProps:i}=e,a=Cs(),o=uc()?.portalNode,[s,c]=V.useState(null),[l,u]=V.useState(null),d=so(e=>{e!==null&&u(e)}),f=V.useRef(null);H(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(rn(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=Ks(`div`,r,{ref:[t,d],props:[{id:a,[dc]:``},i]});return{portalNode:l,portalSubtree:s&&p?Qt.createPortal(p,s):null}}var pc=V.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=fc({container:o,ref:t,componentProps:e,elementProps:c}),d=V.useRef(null),f=V.useRef(null),p=V.useRef(null),m=V.useRef(null),[h,g]=V.useState(null),_=V.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;V.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&es(e)&&(e.type===`focusin`?_.current&&=(ns(l),!1):(ts(l),_.current=!0))}return Ya(Ja(l,`focusin`,e,!0),Ja(l,`focusout`,e,!0))},[l,v]),V.useEffect(()=>{!l||y!==!1||(ns(l),_.current=!1)},[y,l]);let x=V.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,B.jsxs)(V.Fragment,{children:[u,(0,B.jsxs)(lc.Provider,{value:x,children:[b&&l&&(0,B.jsx)(yo,{"data-type":`outside`,ref:d,onFocus:e=>{es(e,l)?p.current?.focus():Xo(h?h.domReference:null)?.focus()}}),b&&l&&(0,B.jsx)(`span`,{"aria-owns":l.id,style:cc}),l&&Qt.createPortal(a,l),b&&l&&(0,B.jsx)(yo,{"data-type":`outside`,ref:f,onFocus:e=>{es(e,l)?m.current?.focus():(Yo(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Ga(La,e.nativeEvent)))}})]})]})});function mc(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var hc=class{nodesRef={current:[]};events=mc();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},gc=V.createContext(null),_c=V.createContext(null),vc=()=>V.useContext(gc)?.id||null,yc=e=>{let t=V.useContext(_c);return e??t};function bc(e){let t=Cs(),n=yc(e),r=vc();return H(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function xc(e){let{children:t,externalTree:n}=e,r=Ci(()=>n??new hc).current;return(0,B.jsx)(_c.Provider,{value:r,children:t})}function Sc(e){return e==null?e:`current`in e?e.current:e}function Cc(e,t){let n=tn(ma(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var wc=20,Tc=[];function Ec(){Tc=Tc.filter(e=>e.deref()?.isConnected)}function Dc(e){Ec(),e&&en(e)!==`body`&&(Tc.push(new WeakRef(e)),Tc.length>wc&&(Tc=Tc.slice(-20)))}function Oc(){return Ec(),Tc[Tc.length-1]?.deref()}function kc(e){return e?Go(e)?e:qo(e)[0]||e:null}function Ac(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=Ko(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Go(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function jc(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=so(()=>b.current.floatingContext?.nodeId),S=i===!1,C=ba(_)&&S,w=V.useRef([`content`]),T=no(i),E=no(a),D=no(l),O=yc(p),k=uc(),A=V.useRef(!1),j=V.useRef(!1),M=V.useRef(!1),N=V.useRef(null),P=V.useRef(``),ee=V.useRef(``),F=V.useRef(null),te=V.useRef(null),I=Xa(F,f,k?.beforeInsideRef),L=Xa(te,k?.afterInsideRef),ne=Bi(),R=Bi(),re=mo(),z=k!=null,ie=Sa(v),ae=so((e=ie)=>e?qo(e):[]),oe=so(()=>m?.().filter(e=>e!=null)??[]);V.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&pa(ie,fa(ho(ie)))&&ae().length===0&&!C&&ea(e)}return Ja(ho(ie),`keydown`,e)},[r,ie,s,C,ae]),V.useEffect(()=>{if(r||!g)return;let e=ho(ie);function t(){M.current=!1}function n(e){let t=ma(e),n=oe();M.current=!(pa(v,t)||pa(_,t)||pa(k?.portalNode,t)||n.some(e=>e===t||pa(e,t))),ee.current=e.pointerType||`keyboard`,t?.closest(`[${tc}]`)&&(j.current=!0)}function i(){ee.current=`keyboard`}return Ya(Ja(e,`pointerdown`,n,!0),Ja(e,`pointerup`,t,!0),Ja(e,`pointercancel`,t,!0),Ja(e,`keydown`,i,!0))},[r,v,_,ie,g,k,oe]),V.useEffect(()=>{if(r||!c)return;let e=ho(ie);function t(){j.current=!0,R.start(0,()=>{j.current=!1})}function n(e){let t=ma(e);Go(t)&&(N.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=ma(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=oe(),f=n?.hasAttribute(as(`focus-guard`))&&[F.current,te.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,Sc(d),Sc(u)].includes(n),p=!(pa(_,n)||pa(v,n)||pa(n,v)||pa(k?.portalNode,n)||l.some(e=>e===n||pa(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>pa(e,n))||f||O&&(rs(O.nodesRef.current,a).find(e=>pa(e.context?.elements.floating,n)||pa(e.context?.elements.domReference,n))||is(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,Sa(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&ie&&Ac(ie,w),o&&r!==_&&!jo(i)&&fa(e)===e.body){if(on(ie)&&(ie.focus(),o===`popup`)){re.request(()=>{ie.focus()});return}let e=ae(),t=N.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||ie;on(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!j.current&&(C||n!==Oc())&&(A.current=!0,h.setOpen(!1,Ga(La,t)))})}function a(){M.current||(b.current.insideReactTree=!0,ne.start(0,()=>{b.current.insideReactTree=!1}))}let l=on(_)?_:null;if(!(!v&&!l))return Ya(l&&Ja(l,`focusout`,i),l&&Ja(l,`pointerdown`,t),v&&Ja(v,`focusin`,n),v&&Ja(v,`focusout`,i),v&&k&&Ja(v,`focusout`,a,!0))},[r,_,v,ie,s,O,k,h,c,o,ae,C,x,w,b,ne,R,re,u,d,oe]),V.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${as(`portal`)}]`)||[]),t=(O?is(O.nodesRef.current,x()):[]).find(e=>ba(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ys([v,...e,F.current,te.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...oe(),t,Sc(d),Sc(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=ys([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,oe]),H(()=>{if(!g||r||!on(ie))return;let e=ho(ie),t=fa(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||pa(ie,t))return;let i=null,a=()=>(i??=ae(ie),i[0]||ie),o;o=r===!0||r===null?a():Sc(r),o||=a();let s=pa(ie,fa(e));ss(o,{preventScroll:o===ie,shouldFocus(){if(s)return!0;let t=fa(e);return!(t!==o&&pa(ie,t))}})})},[r,g,ie,ae,T,D]),H(()=>{if(r||!ie)return;let e=ho(ie);Dc(fa(e));function t(e){if(e.open||(P.current=Cc(e.nativeEvent,ee.current)),e.reason===Na&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===Fa)if(e.nested)A.current=!1;else if(na(e.nativeEvent)||ra(e.nativeEvent))A.current=!1;else{let e=!1;ho(ie).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(P.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`)return _?.isConnected?_:Oc()||null;let n=_?.isConnected?_:Oc();return Sc(t)||n||null}return()=>{y.off(`openchange`,t);let r=fa(e),i=oe(),a=pa(v,r)||i.some(e=>e===r||pa(e,r))||O&&rs(O.nodesRef.current,x(),!1).some(e=>pa(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=kc(s),n=typeof o!=`boolean`;o&&!A.current&&on(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,v,ie,E,y,O,_,x,oe]),H(()=>{if(!Gi||g||!v)return;let e=fa(ho(v));!on(e)||!va(e)||pa(v,e)&&e.blur()},[g,v]),H(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),H(()=>{if(!(r||!ie))return Ac(ie,w),()=>{queueMicrotask(Ec)}},[r,ie,w]);let se=!r&&(s?!C:!0)&&(z||s);return(0,B.jsxs)(V.Fragment,{children:[se&&(0,B.jsx)(yo,{"data-type":`inside`,ref:I,onFocus:e=>{if(s){let e=ae();ss(e[e.length-1])}else k?.portalNode&&(A.current=!1,es(e,k.portalNode)?Yo(_)?.focus():Sc(d??k.beforeOutsideRef)?.focus())}}),n,se&&(0,B.jsx)(yo,{"data-type":`inside`,ref:L,onFocus:e=>{s?ss(ae()[0]):k?.portalNode&&(c&&(A.current=!0),es(e,k.portalNode)?Xo(_)?.focus():Sc(u??k.afterOutsideRef)?.focus())}})]})}function Mc(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Ma}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=V.useRef(void 0),f=mo(),p=Bi(),m=V.useMemo(()=>{function e(e,t,n,r){let i=Ga(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||ia(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=ma(o);if(va(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}ia(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return V.useMemo(()=>n?{reference:m}:Aa,[n,m])}function Nc(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Pc(e){return e!=null&&e.clientX!=null}function Fc(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=V.useRef(!1),u=V.useRef(null),[d,f]=V.useState(),[p,m]=V.useState([]),h=so(e=>{i.set(`positionReference`,e)}),g=so((e,t,n)=>{l.current||c.current.openEvent&&!Pc(c.current.openEvent)||i.set(`positionReference`,Nc(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=so(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=ia(d)?o:a;V.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=tn(o);function r(t){pa(o,ma(t))?e():g(t.clientX,t.clientY)}return!c.current.openEvent||Pc(c.current.openEvent)?u.current=Ja(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),V.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),V.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),V.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=V.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return V.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}var Ic={intentional:`onClick`,sloppy:`onPointerDown`};function Lc(){return!1}function Rc(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function zc(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Lc,referencePressEvent:s=`sloppy`,bubbles:c,externalTree:l}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=u.useState(`floatingElement`),{dataRef:p}=u.context,m=yc(l),h=so(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=so(()=>a),{escapeKey:y,outsidePress:b}=Rc(c),x=V.useRef(!1),S=V.useRef(!1),C=V.useRef(!1),w=V.useRef(!1),T=V.useRef(``),E=V.useRef(null),D=Bi(),O=Bi(),k=so(()=>{O.clear(),p.current.insideReactTree=!1}),A=so(e=>{let t=p.current.floatingContext?.nodeId;return(m?rs(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),j=so(e=>ga(e,u.select(`floatingElement`))||ga(e,u.select(`domReferenceElement`))),M=so(e=>{o()&&u.setOpen(!1,Ga(Ma,e.nativeEvent))}),N=so(e=>{if(!d||!n||!r||e.key!==`Escape`||w.current||!y&&A(`__escapeKeyBubbles`))return;let t=Ga(Ra,ta(e)?e.nativeEvent:e);u.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),P=so(()=>{p.current.insideReactTree=!0,O.start(0,k)}),ee=so(e=>{if(!d||!n||e.button!==0)return;let t=ma(e.nativeEvent);pa(u.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),F=so(e=>{!d||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});V.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=b;let e=new zi,t=new zi;function i(){e.clear(),w.current=!0}function a(){e.start(_n()?5:0,()=>{w.current=!1})}function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function s(){x.current=!1,S.current=!1}function c(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function l(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=p.current.floatingContext?.nodeId,n=m&&rs(m.nodesRef.current,t).some(t=>ga(e,t.context?.elements.floating));return j(e)||n}function O(e){if(l(e)){e.type!==`click`&&!j(e)&&(t.clear(),C.current=!1),k();return}if(p.current.insideReactTree){k();return}let n=ma(e),r=`[${as(`inert`)}]`,i=an(n)?n.getRootNode():null,a=Array.from((sn(i)?i:ho(u.select(`floatingElement`))).querySelectorAll(r)),o=u.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>pa(e,n))))return;let s=an(n)?n:null;for(;s&&!vn(s);){let e=xn(s);if(vn(e)||!an(e))break;s=e}if(!(a.length&&an(n)&&!_a(n)&&!pa(n,u.select(`floatingElement`))&&a.every(e=>!pa(s,e)))){if(on(n)&&!(`touches`in e)){let t=vn(n),r=yn(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!h(e)){if(c()===`intentional`&&C.current){t.clear(),C.current=!1;return}typeof g==`function`&&!g(e)||A(`__outsidePressBubbles`)||(u.setOpen(!1,Ga(Fa,e)),k())}}}function M(e){c()!==`sloppy`||e.pointerType===`touch`||!u.select(`open`)||!n||j(e)||O(e)}function P(e){if(c()!==`sloppy`||!u.select(`open`)||!n||j(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function ee(e,t){let n=ma(e);if(!n)return;let r=Ja(n,e.type,()=>{t(e),r()})}function F(e){T.current=`touch`,ee(e,P)}function te(e){D.clear(),e.type===`pointerdown`&&(T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&ee(e,e=>{e.type===`pointerdown`?M(e):O(e)})}function I(e){if(!x.current)return;let n=S.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!h(e)){if(n){o();return}typeof g==`function`&&!g(e)||(t.clear(),C.current=!0,k())}}}function L(e){if(c()!==`sloppy`||!E.current||j(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(O(e),D.clear(),E.current=null)}function ne(e){ee(e,L)}function R(e){c()!==`sloppy`||!E.current||j(e)||(E.current.dismissOnTouchEnd&&O(e),D.clear(),E.current=null)}function re(e){ee(e,R)}let z=ho(f),ie=Ya(r&&Ya(Ja(z,`keydown`,N),Ja(z,`compositionstart`,i),Ja(z,`compositionend`,a)),_&&Ya(Ja(z,`click`,te,!0),Ja(z,`pointerdown`,te,!0),Ja(z,`pointerup`,I,!0),Ja(z,`pointercancel`,I,!0),Ja(z,`mousedown`,te,!0),Ja(z,`mouseup`,I,!0),Ja(z,`touchstart`,F,!0),Ja(z,`touchmove`,ne,!0),Ja(z,`touchend`,re,!0)));return()=>{ie(),e.clear(),t.clear(),s(),C.current=!1}},[p,f,r,_,g,d,n,y,b,N,k,v,A,j,m,u,D]),V.useEffect(k,[g,k]);let te=V.useMemo(()=>({onKeyDown:N,[Ic[s]]:M,...s!==`intentional`&&{onClick:M}}),[N,M,s]),I=V.useMemo(()=>({onKeyDown:N,onPointerDown:F,onMouseDown:F,onClickCapture:P,onMouseDownCapture(e){P(),ee(e)},onPointerDownCapture(e){P(),ee(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[N,P,ee,F]);return V.useMemo(()=>n?{reference:te,floating:I,trigger:te}:{},[n,te,I])}function Bc(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Vc(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function Hc(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Vc(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:Bc(r,i,a,o)}}function Uc(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function Wc(e,t,n){let{lines:r}=Hc(e.getClientRects());if(r.length<2)return;let i=Uc(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function Gc(e,t){function n(t){Kc(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:n,onMouseMove:r}}function Kc(e,t,n,r){let i=Wc(t,n,r);return e.current=i,i}var U=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(Ni(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},qc=Ts(19)?Xc:Zc;function Jc(e,t,n,r,i){return qc(e,t,n,r,i)}function Yc(e,t,n,r,i){let a=V.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return mi.useSyncExternalStore(e.subscribe,a,a)}Di({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),mi.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Xc(e,t,n,r,i){let a=Ei();if(!a)return Yc(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Zc(e,t,n,r,i){return xi.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Qc=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Jc(this,e,t,n,r)}},$c=class extends Qc{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){V.useDebugValue(e);let n=this;H(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;H(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;H(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){V.useDebugValue(e);let n=this,r=t!==void 0;H(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return V.useDebugValue(e),Jc(this,this.selectors[e],t,n,r)}useContextCallback(e,t){V.useDebugValue(e);let n=so(t??Oa);this.context[e]=n}useStateSetter(e){let t=V.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},el={open:U(e=>e.open),transitionStatus:U(e=>e.transitionStatus),domReferenceElement:U(e=>e.domReferenceElement),referenceElement:U(e=>e.positionReference??e.referenceElement),floatingElement:U(e=>e.floatingElement),floatingId:U(e=>e.floatingId)},tl=class extends $c{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:mc(),nested:n,triggerElements:i},el),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&aa(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function nl(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=V.useRef(null);r===void 0&&f.current===null&&(f.current=new tl({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),H(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};an(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function rl(e,t=!1,n=!1){let[r,i]=V.useState(e&&t?`idle`:void 0),[a,o]=V.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),H(()=>{if(!e&&a&&r!==`ending`&&n){let e=po.request(()=>{i(`ending`)});return()=>{po.cancel(e)}}},[e,a,r,n]),H(()=>{if(!e||t)return;let n=po.request(()=>{i(void 0)});return()=>{po.cancel(n)}},[t,e]),H(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=po.request(()=>{i(`idle`)});return()=>{po.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var il=(function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e})({}),al={[il.startingStyle]:``},ol={[il.endingStyle]:``},sl={transitionStatus(e){return e===`starting`?al:e===`ending`?ol:null}};function cl(e,t=!1,n=!0){let r=mo();return so((i,a=null)=>{r.cancel();let o=Sc(e);if(o==null)return;let s=o,c=()=>{Qt.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=il.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function ll(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=so(i),o=cl(r,n,!1);V.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}var ul={tabIndex:-1,[oa]:``};function dl(e,t,n=!1){let r=Cs(),i=vc()!=null,a=V.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return nl({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function fl(e,t){let n=V.useRef(null),r=V.useRef(null);return V.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function pl(e,t,n){let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function ml(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=fl(e,n),o=so(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);if(o===e){n.update({activeTriggerElement:t,...i?r:null});return}o==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return H(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function hl(e){let t=e.useState(`open`);H(()=>{if(!t){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let n=e.context.triggerElements.size,r={};if(e.state.triggerCount!==n&&(r.triggerCount=n),!e.select(`activeTriggerId`)&&n===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;r.activeTriggerId=e,r.activeTriggerElement=n}}(r.triggerCount!==void 0||r.activeTriggerId!==void 0)&&e.update(r)},[t,e,e.useState(`triggerCount`)])}function gl(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=rl(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=so(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),s=t.useState(`preventUnmountingOnClose`);return ll({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}function _l(e,t){e.useSyncedValues(t),H(()=>()=>{e.update({activeTriggerProps:Aa,inactiveTriggerProps:Aa,popupProps:Aa})},[e])}var vl=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function yl(){return new tl({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new vl,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function bl(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:yl(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Aa,inactiveTriggerProps:Aa,popupProps:Aa}}function xl(e,t,n=!1){return new tl({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var Sl=U(e=>e.triggerIdProp??e.activeTriggerId),Cl=U(e=>e.openProp??e.open),wl=U(e=>(e.popupElement?.id??e.floatingId)||void 0);function Tl(e,t){return t!==void 0&&Cl(e)&&Sl(e)===t}function El(e,t){return Tl(e,t)?!0:t!==void 0&&Cl(e)&&Sl(e)==null&&e.triggerCount===1}var Dl={open:Cl,mounted:U(e=>e.mounted),transitionStatus:U(e=>e.transitionStatus),floatingRootContext:U(e=>e.floatingRootContext),triggerCount:U(e=>e.triggerCount),preventUnmountingOnClose:U(e=>e.preventUnmountingOnClose),payload:U(e=>e.payload),activeTriggerId:Sl,activeTriggerElement:U(e=>e.mounted?e.activeTriggerElement:null),popupId:wl,isTriggerActive:U((e,t)=>t!==void 0&&Sl(e)===t),isOpenedByTrigger:U((e,t)=>Tl(e,t)),isMountedByTrigger:U((e,t)=>t!==void 0&&Sl(e)===t&&e.mounted),triggerProps:U((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:U((e,t)=>El(e,t)?wl(e):void 0),popupProps:U(e=>e.popupProps),popupElement:U(e=>e.popupElement),positionerElement:U(e=>e.positionerElement)};function Ol(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Cs(),a=vc()!=null,o=Ci(()=>new tl({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new vl,floatingId:i,syncOnly:!1,nested:a})).current;return H(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=an(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function kl(e={}){let{nodeId:t,externalTree:n}=e,r=Ol(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=V.useState(null),[f,p]=V.useState(void 0),[m,h]=V.useState(void 0),g=V.useRef(null),_=yc(n),v=V.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=ti({...e,elements:{...v,...u&&{reference:u}}}),b=an(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=V.useCallback(e=>{let t=an(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=V.useCallback(e=>{(an(e)||e===null)&&(g.current=e,p(e)),(an(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!an(e))&&y.refs.setReference(e)},[y.refs,p]),w=V.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=V.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=V.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=V.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return H(()=>{s&&(g.current=s)},[s]),H(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),V.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var Al=Yi&&qi;function jl(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=V.useRef(!1),c=V.useRef(null),l=V.useRef(!0),u=Bi();V.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=tn(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&on(e)&&e===fa(ho(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return Ya(Ja(t,`blur`,r),Al&&Ja(t,`keydown`,a,!0),Al&&Ja(t,`pointerdown`,o,!0))},[i,n]),V.useEffect(()=>{if(!n)return;function e(e){if(e.reason===Ma||e.reason===Ra){let e=i.select(`domReferenceElement`);an(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=V.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=ma(t.nativeEvent);if(an(a)){if(Al&&!t.relatedTarget){if(!l.current&&!va(a))return}else if(!xa(a))return}let o=ha(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,Ga(Pa,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,Ga(Pa,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=an(n)&&n.hasAttribute(as(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=fa(ho(e));!n&&t===e||pa(o.current.floatingContext?.refs.floating.current,t)||pa(e,t)||a||ha(n??t,i.context.triggerElements)||i.setOpen(!1,Ga(Pa,r))})}}},[o,r,i,u]);return V.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var Ml=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new zi,this.restTimeout=new zi,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Nl=new WeakMap;function Pl(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Nl.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Nl.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Fl(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Nl.get(n);a&&a!==e&&Pl(a),Pl(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Nl.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Il(e){let t=e.context.dataRef.current,n=Ci(()=>t.hoverInteractionState??Ml.create()).current;return t.hoverInteractionState||=n,Li(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Ll(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=yc(),d=vc(),f=Il(a),p=Bi(),m=so(()=>Ea(l.current.openEvent?.type,f.interactedInside)),h=so(()=>Da(l.current.openEvent?.type)),g=so(()=>{Pl(f)});H(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),V.useEffect(()=>g,[g]),H(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&an(c)&&s){let e=c,t=s,n=ho(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r;return Fl(f,{scopeElement:f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),V.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&rs(u.nodesRef.current,d).length>0)}function t(e){let t=wa(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,Ga(Na,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=ma(e);if(!ya(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,_),g()}function h(n){if(e()&&u){u.events.on(`floating.closed`,_);return}if(ha(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&an(o)&&rs(u.nodesRef.current,r,!1).some(e=>pa(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),m()||t(n)}}function _(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,_),a.setOpen(!1,Ga(Na,t)),u.events.emit(`floating.closed`,t)})}let v=s;return Ya(v&&Ja(v,`mouseenter`,c),v&&Ja(v,`mouseleave`,h),v&&Ja(v,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,_)})},[n,s,a,l,r,i,m,g,f,u,d,p])}var Rl={current:null};function zl(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Rl,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=yc(l),v=Il(m),y=V.useRef(!1),b=no(i),x=no(r),S=no(o),C=no(n),w=no(p),T=no(f),E=so(()=>Ea(h.current.openEvent?.type,v.interactedInside)),D=so(()=>w.current?.()!==!1),O=so((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!pa(e,t);if(!an(n))return!1;let i=n;return r.hasMatchingElement(e=>pa(e,i))&&(!e||!pa(e,i))}),k=so(()=>{v.handler&&=(ho(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=so(()=>{Pl(v)});return u&&(v.handleCloseOptions=b.current?.__options),V.useEffect(()=>k,[k]),V.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===Na,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),V.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=wa(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,Ga(Na,e)),_?.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,Ga(Na,e)),_?.events.emit(`floating.closed`,e))}let t=c.current??(u?m.select(`domReferenceElement`):null);if(!an(t))return;function r(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!ia(v.pointerType))return;let t=Ta(S.current),n=wa(x.current,`open`,v.pointerType),r=ma(e),i=e.currentTarget??null,o=m.select(`domReferenceElement`),s=i;if(an(r)&&!m.context.triggerElements.hasElement(r)){for(let e of m.context.triggerElements.elements())if(pa(e,r)){s=e;break}}an(i)&&an(o)&&!m.context.triggerElements.hasElement(i)&&pa(i,o)&&(s=o);let c=s==null?!1:O(o,s,r),l=m.select(`open`),u=T.current?.()??m.select(`transitionStatus`)===`ending`,d=!l&&u&&y.current,f=!c&&an(s)&&an(o)&&pa(o,s)&&d,p=t>0&&!n,h=c&&(l||d)||f,g=!l||c;if(h){D()&&m.setOpen(!0,Ga(Na,e,s));return}p||(n?v.openChangeTimeout.start(n,()=>{g&&D()&&m.setOpen(!0,Ga(Na,e,s))}):g&&D()&&m.setOpen(!0,Ga(Na,e,s)))}function i(t){if(E()){A();return}k();let n=ho(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let r=h.current.floatingContext??d?.();if(!ha(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select(`open`)||v.openChangeTimeout.clear();let i=c.current;v.handler=b.current({...r,tree:_,x:t.clientX,y:t.clientY,onClose(){A(),k(),C.current&&!E()&&i===m.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,v.handler),v.handler(t);return}(v.pointerType!==`touch`||!pa(m.select(`floatingElement`),t.relatedTarget))&&e(t)}}return s?Ya(Ja(t,`mousemove`,r,{once:!0}),Ja(t,`mouseenter`,r),Ja(t,`mouseleave`,i)):Ya(Ja(t,`mouseenter`,r),Ja(t,`mouseleave`,i))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),V.useMemo(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=m.select(`domReferenceElement`),i=m.select(`open`),o=O(r,n,e.target);if(a&&!ia(v.pointerType))return;if(i&&o&&v.handleCloseOptions?.blockPointerEvents){let e=m.select(`floatingElement`);e&&Fl(v,{scopeElement:v.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}let s=Ta(S.current);if(i&&!o||s===0||!o&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function c(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||o)&&D()&&m.setOpen(!0,Ga(Na,t,n))}v.pointerType===`touch`?Qt.flushSync(()=>{c()}):o&&i?c():(v.restTimeoutPending=!0,v.restTimeout.start(s,c))}}},[n,v,E,O,a,m,S,D])}var Bl=`Escape`;function Vl(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Hl(e,t){return Vl(t,e===ua||e===da,e===ca||e===la)}function Ul(e,t,n){return Vl(t,e===da,n?e===ca:e===la)||e===`Enter`||e===` `||e===``}function Wl(e,t,n){return Vl(t,n?e===ca:e===la,e===da)}function Gl(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Bl:Vl(t,n?e===la:e===ca,e===ua)}function Kl(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,cols:v=1,id:y,resetOnPointerLeave:b=!0,externalTree:x}=t,S=`rootStore`in e?e.rootStore:e,C=S.useState(`open`),w=S.useState(`floatingElement`),T=S.useState(`domReferenceElement`),E=S.context.dataRef,D=Sa(w),O=ba(T),k=no(D),A=vc(),j=yc(x),M=V.useRef(f),N=V.useRef(o??-1),P=V.useRef(null),ee=V.useRef(!0),F=so(e=>{i(N.current===-1?null:N.current,e)}),te=V.useRef(F),I=V.useRef(!!w),L=V.useRef(C),ne=V.useRef(!1),R=V.useRef(!1),re=V.useRef(null),z=no(h),ie=no(C),ae=no(o),oe=no(b),se=mo(),ce=mo(),le=so(()=>{function e(e){d?j?.events.emit(`virtualfocus`,e):re.current=ss(e,{sync:ne.current,preventScroll:!0})}let t=n.current[N.current],r=R.current;t&&e(t),(ne.current?e=>e():e=>se.request(e))(()=>{let i=n.current[N.current]||t;i&&(t||e(i),he&&(r||!ee.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});H(()=>{E.current.orientation=g},[E,g]),H(()=>{a&&(C&&w?(N.current=o??-1,M.current&&o!=null&&(R.current=!0,F())):I.current&&(N.current=-1,te.current()))},[a,C,w,o,F]),H(()=>{if(a){if(!C){ne.current=!1;return}if(w)if(r==null){if(ne.current=!1,ae.current!=null)return;if(I.current&&(N.current=-1,le()),(!L.current||!I.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ce.request(e):queueMicrotask)(t),e+=1):(N.current=P.current==null||Ul(P.current,g,u)||l?So(n):Co(n),P.current=null,F())};t()}}else xo(n.current,r)||(N.current=r,le(),R.current=!1)}},[a,C,w,r,ae,l,n,g,u,F,le,ce]),H(()=>{if(!a||w||!j||d||!I.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===A)?.context?.elements.floating,n=fa(ho(w)),r=e.some(e=>e.context&&pa(e.context.elements.floating,n));t&&!r&&ee.current&&t.focus({preventScroll:!0})},[a,w,j,A,d]),H(()=>{te.current=F,L.current=C,I.current=!!w}),H(()=>{C||(P.current=null,M.current=f)},[C,f]);let ue=r!=null,de=so(e=>{if(!ie.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(N.current!==t||r!==t)&&(N.current=t,F(e))}),fe=so(()=>_??j?.nodesRef.current.find(e=>e.id===A)?.context?.dataRef?.current.orientation),pe=so(()=>So(n,z.current)),me=so(e=>{if(ee.current=!1,ne.current=!0,e.which===229||!ie.current&&e.currentTarget===k.current)return;if(l&&Gl(e.key,g,u,v)){Hl(e.key,fe())||ea(e),S.setOpen(!1,Ga(za,e.nativeEvent)),on(T)&&(d?j?.events.emit(`virtualfocus`,T):T.focus());return}let t=N.current,r=So(n,h),i=Co(n,h);if(O||(e.key===`Home`&&(ea(e),N.current=r,F(e)),e.key===`End`&&(ea(e),N.current=i,F(e))),v>1){let t=Array.from({length:n.current.length},()=>({width:1,height:1})),a=Eo(t,v,!1),o=a.findIndex(e=>e!=null&&!ko(n.current,e,h)),s=a.reduce((e,t,r)=>t!=null&&!ko(n.current,t,h)?r:e,-1),l=a[To(a.map(e=>e==null?null:n.current[e]),{event:e,orientation:g,loopFocus:c,rtl:u,cols:v,disabledIndices:Oo([...(typeof h==`function`?null:h)||n.current.map((e,t)=>ko(n.current,t,h)?t:void 0),void 0],a),minIndex:o,maxIndex:s,prevIndex:Do(N.current>i?r:N.current,t,a,v,e.key===da?`bl`:e.key===(u?ca:la)?`tr`:`tl`),stopEvent:!0})];if(l!=null&&(N.current=l,F(e)),g===`both`)return}if(Hl(e.key,g)){if(ea(e),C&&!d&&fa(e.currentTarget.ownerDocument)===e.currentTarget){N.current=Ul(e.key,g,u)?r:i,F(e);return}Ul(e.key,g,u)?c?t>=i?s&&t!==n.current.length?N.current=-1:(ne.current=!1,N.current=r):N.current=wo(n.current,{startingIndex:t,disabledIndices:h}):N.current=Math.min(i,wo(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?N.current=n.current.length:(ne.current=!1,N.current=i):N.current=wo(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):N.current=Math.max(r,wo(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),xo(n.current,N.current)&&(N.current=-1),F(e)}}),he=V.useMemo(()=>({onFocus(e){ne.current=!0,de(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){ne.current=!0,R.current=!1,p&&de(e)},onPointerLeave(e){if(!ie.current||!ee.current||e.pointerType===`touch`)return;ne.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&oe.current&&(re.current?.(),re.current=null,N.current=-1,F(e),!d)){let e=k.current,t=fa(ho(e));e&&pa(e,t)&&e.focus({preventScroll:!0})}}}),[de,ie,k,p,n,F,oe,d]),ge=V.useMemo(()=>d&&C&&ue&&{"aria-activedescendant":`${y}-${r}`},[d,C,ue,y,r]),_e=V.useMemo(()=>({"aria-orientation":g===`both`?void 0:g,...O?{}:ge,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&C&&!d){let t=ma(e.nativeEvent);if(t&&!pa(k.current,t))return;ea(e),S.setOpen(!1,Ga(La,e.nativeEvent)),on(T)&&T.focus();return}me(e)},onPointerMove(){ee.current=!0}}),[ge,me,k,g,O,S,C,d,T]),ve=V.useMemo(()=>{function e(e){S.setOpen(!0,Ga(za,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&na(e.nativeEvent)&&(M.current=!d)}function n(e){M.current=f,f===`auto`&&ra(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(t){let n=S.select(`open`);ee.current=!1;let r=t.key.startsWith(`Arrow`),i=Wl(t.key,fe(),u),a=Hl(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return me(t);if(!(!n&&!m&&r)){if(o){let e=Hl(t.key,fe());P.current=l&&e?null:t.key}if(l){i&&(ea(t),n?(N.current=pe(),F(t)):e(t));return}a&&(ae.current!=null&&(N.current=ae.current),ea(t),!n&&m?e(t):me(t),n&&F(t))}},onFocus(e){S.select(`open`)&&!d&&(N.current=-1,F(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[me,f,pe,l,F,S,m,g,fe,u,ae,d]),ye=V.useMemo(()=>({...ge,...ve}),[ge,ve]);return V.useMemo(()=>a?{reference:ye,floating:_e,item:he,trigger:ve}:{},[a,ye,_e,ve,he])}function ql(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,onTyping:o,enabled:s=!0,resetMs:c=750,selectedIndex:l=null}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=Bi(),p=V.useRef(``),m=V.useRef(l??i??-1),h=V.useRef(null),g=so(e=>{function t(e){let t=r?.current[e];return!t||jo(t)}function s(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let u=n.current;if(p.current.length>0&&e.key===` `&&(ea(e),o?.(!0)),p.current.length>0&&p.current[0]!==` `&&s(u,p.current)===-1&&e.key!==` `&&o?.(!1),u==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;d&&e.key!==` `&&(ea(e),o?.(!0));let g=p.current===``;g&&(m.current=l??i??-1),u.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&p.current===e.key&&(p.current=``,m.current=h.current),p.current+=e.key,f.start(c,()=>{p.current=``,m.current=h.current,o?.(!1)});let _=((g?l??i??-1:m.current)??0)+1,v=s(u,p.current,_);v===-1?e.key!==` `&&(p.current=``,o?.(!1)):(a?.(v),h.current=v)}),_=so(e=>{let t=e.relatedTarget,n=u.select(`domReferenceElement`),r=u.select(`floatingElement`);pa(n,t)||pa(r,t)||(f.clear(),p.current=``,m.current=h.current,o?.(!1))});H(()=>{!d&&l!==null||(f.clear(),h.current=null,p.current!==``&&(p.current=``))},[d,l,f]),H(()=>{d&&p.current===``&&(m.current=l??i??-1)},[d,l,i]);let v=V.useMemo(()=>({onKeyDown:g,onBlur:_}),[g,_]);return V.useMemo(()=>s?{reference:v,floating:v}:{},[s,v])}var Jl=.1,Yl=Jl*Jl,Xl=.5;function Zl(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ql(e,t,n,r,i,a,o,s,c,l){let u=!1;return Zl(e,t,n,r,i,a)&&(u=!u),Zl(e,t,i,a,o,s)&&(u=!u),Zl(e,t,o,s,c,l)&&(u=!u),Zl(e,t,c,l,n,r)&&(u=!u),u}function $l(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function eu(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function tu(e={}){let{blockPointerEvents:t=!1}=e,n=new zi,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Yl;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=ma(r),g=r.type===`mouseleave`,_=pa(u,h),v=pa(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&an(r.relatedTarget)&&pa(u,r.relatedTarget))return;function y(){return!!(s&&rs(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=eu(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=eu(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=eu(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=eu(d,f,x.right-1,A,S.left+1,k);break}if(j)return;if(l&&!$l(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Xl/2:Xl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Xl+1,o=C||T?S.bottom-Xl:S.top,s=C?T?S.bottom-Xl:S.top:S.bottom-Xl;M=Ql(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Xl/2:Xl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Xl,o=C||T?S.top+Xl:S.bottom,s=C?T?S.top+Xl:S.bottom:S.top+Xl;M=Ql(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Xl/2:Xl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Xl+1,o=w||E?S.right-Xl:S.left,s=w?E?S.right-Xl:S.left:S.right-Xl;M=Ql(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Xl/2:Xl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Xl,o=w||E?S.left+Xl:S.right,s=w?E?S.left+Xl:S.right:S.left+Xl;M=Ql(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var nu={...Dl,disabled:U(e=>e.disabled),instantType:U(e=>e.instantType),isInstantPhase:U(e=>e.isInstantPhase),trackCursorAxis:U(e=>e.trackCursorAxis),disableHoverablePopup:U(e=>e.disableHoverablePopup),lastOpenChangeReason:U(e=>e.openChangeReason),closeOnClick:U(e=>e.closeOnClick),closeDelay:U(e=>e.closeDelay),hasViewport:U(e=>e.hasViewport)},ru=class e extends $c{constructor(e,t,n=!1){let r=new vl,i={...iu(),...e};i.floatingRootContext=xl(r,t,n),super(i,{popupRef:V.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},nu)}setOpen=(e,t)=>{let n=t.reason,r=n===Na,i=e&&n===Pa,a=!e&&(n===Ma||n===Ra);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===Na&&(r.instantType=void 0),pl(r,e,t.trigger),this.update(r)};r?Qt.flushSync(o):o()};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Ga(Ma,e))}static useStore(t,n){return dl(t,(t,r)=>new e(n,t,r)).store}};function iu(){return{...bl(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var au=Oi(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=ru.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});ji(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),p.useSyncedValue(`disabled`,t),hl(p);let{forceUnmount:y,transitionStatus:b}=gl(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=V.useRef(null);H(()=>{m&&t&&p.setOpen(!1,Ga(Ha))},[m,t,p]),H(()=>{b===`ending`&&C===ja||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),H(()=>{h&&g==null&&p.set(`payload`,void 0)},[p,g,h]);let T=V.useCallback(()=>{p.setOpen(!1,Ga(Ua))},[p]);V.useImperativeHandle(o,()=>({unmount:y,close:T}),[y,T]);let E=h||_||!t&&a!==`none`;return(0,B.jsxs)(Pi.Provider,{value:p,children:[E&&(0,B.jsx)(ou,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function ou({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=zc(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Fc(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n});return _l(e,{activeTriggerProps:V.useMemo(()=>Ms(a.reference,i.reference),[a.reference,i.reference]),inactiveTriggerProps:V.useMemo(()=>Ms(a.trigger,i.trigger),[a.trigger,i.trigger]),popupProps:V.useMemo(()=>Ms(ul,a.floating,i.floating),[a.floating,i.floating])}),null}var su=(function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=il.startingStyle]=`startingStyle`,e[e.endingStyle=il.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e})({}),cu=(function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e})({}),lu={[cu.popupOpen]:``},uu={[cu.popupOpen]:``,[cu.pressed]:``},du={[su.open]:``},fu={[su.closed]:``},pu={[su.anchorHidden]:``},mu={open(e){return e?lu:null}},hu={open(e){return e?uu:null}},gu={open(e){return e?du:fu},anchorHidden(e){return e?pu:null}};function _u(e){return Cs(e,`base-ui`)}var vu=V.createContext(void 0);function yu(){return V.useContext(vu)}var bu=(function(e){return e[e.popupOpen=cu.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e})({}),xu=600,Su=`data-base-ui-tooltip-trigger`;function Cu(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let n=t[e];if(an(n))return n}}let t=e.target;return an(t)?t:null}function wu(e){let t=e;for(;t;){if(t.hasAttribute(Su))return t;let e=t.parentElement;if(e){t=e;continue}let n=t.getRootNode();t=`host`in n&&an(n.host)?n.host:null}return null}var Tu=ki(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=Fi(!0),m=a?.store??p;if(!m)throw Error(Ni(82));let h=_u(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=V.useRef(null),b=c??xu,x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=ml(h,y,m,{payload:o,closeOnClick:l,closeDelay:x}),w=yu(),{delayRef:T,isInstantPhase:E,hasProvider:D}=qa(v,{open:_}),O=Il(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=no(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=V.useRef(!1),ee=Bi(),F=V.useRef(void 0);function te(){let e=w?.delay,t=typeof T.current==`object`?T.current.open:void 0,n=b;return D&&(n=t===0?0:c??e??b),n}function I(e){let t=y.current;if(!t||!e)return!1;let n=wu(e);return n!==null&&n!==t&&pa(t,n)}function L(e){let t=I(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,ee.clear()),t}let ne=zl(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?tu():null,restMs:te,delay(){let e=typeof T.current==`object`?T.current.close:void 0,t=x;return u==null&&D&&(t=e),{close:t}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),R=jl(v,{enabled:!A}).reference,re=e=>{let t=P.current,n=Cu(e),r=L(n),i=y.current,a=i&&n&&pa(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===Na){m.setOpen(!1,Ga(Na,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&ia(F.current)){let t=()=>{!P.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Ga(Na,e,i))},n=te();n===0?(ee.clear(),t()):ee.start(n,t)}},z=m.useState(`triggerProps`,C);return Ks(`button`,e,{state:{open:_},ref:[t,S,y],props:[ne,R,C||M!==`none`?z:void 0,{onMouseOver(e){re(e.nativeEvent)},onFocus(e){I(Cu(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,ee.clear(),F.current=void 0},onPointerEnter(e){F.current=e.pointerType},onPointerDown(e){F.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[bu.triggerDisabled]:A?``:void 0,[Su]:A?void 0:``},f],stateAttributesMapping:mu})}),Eu=V.createContext(void 0);function Du(){let e=V.useContext(Eu);if(e===void 0)throw Error(Ni(70));return e}var Ou=V.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=fc({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,B.jsxs)(V.Fragment,{children:[l,c&&Qt.createPortal(n,c)]})}),ku=V.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Fi().useState(`mounted`)||n?(0,B.jsx)(Eu.Provider,{value:n,children:(0,B.jsx)(Ou,{ref:t,...r})}):null}),Au=V.createContext(void 0);function ju(){let e=V.useContext(Au);if(e===void 0)throw Error(Ni(71));return e}var Mu=V.createContext(void 0);function Nu(){return V.useContext(Mu)?.direction??`ltr`}var Pu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Nn(e,t)||{};if(l==null)return{};let f=Zn(u),p={x:n,y:r},m=zn(i),h=Ln(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Mn(k,j,A),N=!c.arrow&&Fn(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),Fu=(e,t)=>({...Pu(e),options:[e,t]}),Iu={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await si().fn(e)).data?.referenceHidden||a}}}},Lu={sideX:`left`,sideY:`top`},Ru={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=tn(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:Lu};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=ho(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=Pn(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Lu.sideX,g=f===`top`?`bottom`:Lu.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function zu(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Bu(e,t,n){let{rects:r,placement:i}=e;return{side:zu(t,Pn(i),n),align:Fn(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Vu(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=V.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=so(D),k=D?O:t,A=no(t),j=no(h),M=Nu()===`rtl`,N=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],P=a===`center`?N:`${N}-${a}`,ee=c,F=+(r===`bottom`),te=+(r===`top`),I=+(r===`right`),L=+(r===`left`);typeof ee==`number`?ee={top:ee+F,right:ee+L,bottom:ee+te,left:ee+I}:ee&&={top:(ee.top||0)+F,right:(ee.right||0)+L,bottom:(ee.bottom||0)+te,left:(ee.left||0)+I};let ne={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:ee},R=V.useRef(null),re=no(i),z=no(o),ie=typeof i==`function`?0:i,ae=typeof o==`function`?0:o,oe=[];f&&oe.push(f),oe.push(ni(e=>{let t=Bu(e,r,M),n=typeof re.current==`function`?re.current(t):re.current,i=typeof z.current==`function`?z.current(t):z.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[ie,ae,M,r]));let se=T===`none`&&w!==`shift`,ce=!se&&(l||_||w===`shift`),le=w===`none`?null:ai({...ne,padding:{top:ee.top+1,right:ee.right+1,bottom:ee.bottom+1,left:ee.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),ue=se?null:ri(e=>{let t=ho(e.elements.floating).documentElement;return{...ne,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:ce,limiter:l||_?void 0:ii(e=>{if(!R.current)return{};let{width:t,height:n}=R.current.getBoundingClientRect(),r=Rn(Pn(e.placement)),i=r===`y`?t:n,a=r===`y`?ee.left+ee.right:ee.top+ee.bottom;return{offset:i/2+a/2}})}},[ne,l,_,ee,T]);w===`shift`||T===`shift`||a===`center`?oe.push(ue,le):oe.push(le,ue),oe.push(oi({...ne,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=tn(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),Fu(e=>({element:R.current||ho(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=Pn(a),l=Rn(c),u=R.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(Bu(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,ce&&l===`y`&&b?S:x),{}}},Iu,y),H(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let de=V.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:fe,elements:pe,x:me,y:he,middlewareData:ge,update:_e,placement:ve,context:ye,isPositioned:be,floatingStyles:xe}=kl({rootContext:m,open:p?h:void 0,placement:P,middleware:oe,strategy:n,whileElementsMounted:p?void 0:(...e)=>Hr(...e,de),nodeId:v,externalTree:x}),{sideX:Se,sideY:Ce}=ge.adaptiveOrigin||Lu,we=be?n:`fixed`,Te=V.useMemo(()=>{let e=y?{position:we,[Se]:me,[Ce]:he}:{position:we,...xe};return be||(e.opacity=0),e},[y,we,Se,me,Ce,he,xe,be]),Ee=V.useRef(null);H(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(Hu(t)?t.current:t)||null;n!==Ee.current&&(fe.setPositionReference(n),Ee.current=n)},[h,fe,k,A]),V.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&Hu(e)&&e.current!==Ee.current&&(fe.setPositionReference(e.current),Ee.current=e.current)},[h,fe,k,A]),V.useEffect(()=>{if(p&&h&&pe.domReference&&pe.floating)return Hr(pe.domReference,pe.floating,_e,de)},[p,h,pe,_e,de]);let De=Pn(ve),Oe=zu(r,De,M),ke=Fn(ve)||`center`,Ae=!!ge.hide?.referenceHidden;H(()=>{b&&h&&be&&C(De)},[b,h,be,De]);let je=V.useMemo(()=>({position:`absolute`,top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),Me=ge.arrow?.centerOffset!==0;return V.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:R,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:fe,context:ye,isPositioned:be,update:_e}),[Te,je,R,Me,Oe,ke,De,Ae,fe,ye,be,_e])}function Hu(e){return e!=null&&`current`in e}function Uu(e){return e===`starting`?ec:Aa}function Wu(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Ks(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Uu(r),i],stateAttributesMapping:gu})}var Gu=V.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=sc,style:g,..._}=e,v=Fi(),y=Du(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Vu({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?Ru:void 0}),O=Wu(e,V.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,B.jsx)(Au.Provider,{value:D,children:O})}),Ku={...gu,...sl},qu=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Fi(),{side:s,align:c}=ju(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);ll({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Ll(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Ks(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[f,Uu(d),a],stateAttributesMapping:Ku})}),Ju=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Fi(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=ju();return Ks(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:gu})});function Yu(e){return Ts(19)?e:e?`true`:void 0}function Xu(e){let[t,n]=V.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var Zu=V.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function Qu(e=!1){let t=V.useContext(Zu);if(!t&&!e)throw Error(Ni(86));return t}var $u=(function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e})({}),ed={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},td={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},nd={disabled:!1,...td},rd={valid(e){return e===null?null:e?{[$u.valid]:``}:{[$u.invalid]:``}}},id={invalid:void 0,name:void 0,validityData:{state:ed,errors:[],error:``,value:``,initialValue:null},setValidityData:Oa,disabled:void 0,touched:td.touched,setTouched:Oa,dirty:td.dirty,setDirty:Oa,filled:td.filled,setFilled:Oa,focused:td.focused,setFocused:Oa,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:nd,markedDirtyRef:{current:!1},registerFieldControl:Oa,validation:{getValidationProps:(e=Aa)=>e,getInputValidationProps:(e=Aa)=>e,inputRef:{current:null},commit:async()=>{}}},ad=V.createContext(id);function od(e=!0){let t=V.useContext(ad);if(t.setValidityData===Oa&&!e)throw Error(Ni(28));return t}var sd=V.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Oa,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function cd(){return V.useContext(sd)}var ld=V.createContext({controlId:void 0,registerControlId:Oa,labelId:void 0,setLabelId:Oa,messageIds:[],setMessageIds:Oa,getDescriptionProps:e=>e});function ud(){return V.useContext(ld)}var dd=function(e){let t=_u(),n=e.controlId===void 0?t:e.controlId,[r,i]=V.useState(n),[a,o]=V.useState(e.labelId),[s,c]=V.useState([]),l=Ci(()=>new Map),{messageIds:u}=ud(),d=so((e,t)=>{let n=l.current;if(t===void 0){n.delete(e);return}n.set(e,t),i(e=>{if(n.size===0)return;let t;for(let r of n.values()){if(e!==void 0&&r===e)return e;t===void 0&&(t=r)}return t})}),f=V.useCallback(e=>Ms({"aria-describedby":u.concat(s).join(` `)||void 0},e),[u,s]),p=V.useMemo(()=>({controlId:r,registerControlId:d,labelId:a,setLabelId:o,messageIds:s,setMessageIds:c,getDescriptionProps:f}),[r,d,a,o,s,c,f]);return(0,B.jsx)(ld.Provider,{value:p,children:e.children})};function fd(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=ud(),o=_u(t),s=n?i:void 0,c=Ci(()=>Symbol(`labelable-control`)),l=V.useRef(!1),u=V.useRef(t!=null),d=so(()=>{!l.current||a===Oa||(l.current=!1,a(c.current,void 0))});return H(()=>{if(a===Oa)return;let e;if(n){let n=r?.current;e=an(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),V.useEffect(()=>d,[d]),i??o}function pd(e,t){let n=_u(e);return H(()=>(t(n),()=>{t(void 0)}),[n,t]),n}function md(e={}){let{id:t,fallbackControlId:n,native:r=!1,setLabelId:i,focusControl:a}=e,{controlId:o,setLabelId:s}=ud(),c=pd(t,so(e=>{s(e),i?.(e)})),l=o??n;function u(e){if(a){a(e,l);return}if(!l)return;let t=ho(e.currentTarget).getElementById(l);on(t)&&hd(t)}function d(e){ma(e.nativeEvent)?.closest(`button,input,select,textarea`)||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),!r&&u(e))}return r?{id:c,htmlFor:l??void 0,onMouseDown:d}:{id:c,onClick:d,onPointerDown(e){e.preventDefault()}}}function hd(e){e.focus({focusVisible:!0})}function gd(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var _d=Object.keys(ed);function vd(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let n of _d)n!==`valid`&&(n===`valueMissing`&&(t=e[n]),e[n]&&(t=!1));return t}function yd(e){let{formRef:t,clearErrors:n}=cd(),{setValidityData:r,validate:i,validityData:a,validationDebounceTime:o,invalid:s,markedDirtyRef:c,state:l,name:u,shouldValidateOnChange:d,getRegisteredFieldId:f}=e,{controlId:p,getDescriptionProps:m}=ud(),h=Bi(),g=V.useRef(null),_=so(async(e,n=!1)=>{let o=g.current;if(!o)return;function u(e,n=s){let r=f()??p;if(r==null)return;let i=t.current.fields.get(r);if(!i)return;let a=gd(e,n);t.current.fields.set(r,{...i,validityData:a})}if(n){if(l.valid!==!1)return;let t=o.validity;if(!t.valueMissing){let t={value:e,state:{...ed,valid:!0},error:``,errors:[],initialValue:a.initialValue};o.setCustomValidity(``),u(t,!1),r(t);return}let n=_d.reduce((e,n)=>(e[n]=t[n],e),{});if(!n.valid&&!vd(n))return}function m(e){let t=_d.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of _d)if(e!==`valid`){if(e===`valueMissing`&&t[e])n=!0;else if(t[e])return t}return n&&!c.current&&(t.valid=!0,t.valueMissing=!1),t}h.clear();let _=null,v=[],y=m(o),b,x=d();if(o.validationMessage&&!x)b=o.validationMessage,v=[o.validationMessage];else{let n=i(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));_=typeof n==`object`&&n&&`then`in n?await n:n,_===null?x&&(o.setCustomValidity(``),y.customError=!1,o.validationMessage?(b=o.validationMessage,v=[o.validationMessage]):o.validity.valid&&!y.valid&&(y.valid=!0)):(y.valid=!1,y.customError=!0,Array.isArray(_)?(v=_,o.setCustomValidity(_.join(`
|
|
11
|
-
`))):_&&(v=[_],o.setCustomValidity(_)))}let S={value:e,state:y,error:b??(Array.isArray(_)?_[0]:_??``),errors:v,initialValue:a.initialValue};u(S),r(S)}),v=V.useCallback((e={})=>Ms(m,l.valid===!1?{"aria-invalid":!0}:Aa,e),[m,l.valid]),y=V.useCallback((e={})=>Ms({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(n(u),!d()){_(e.currentTarget.value,!0);return}let t=e.currentTarget;if(t.value===``){_(t.value);return}h.clear(),o?h.start(o,()=>{_(t.value)}):_(t.value)}},v(e)),[v,n,u,h,_,o,d]);return V.useMemo(()=>({getValidationProps:v,getInputValidationProps:y,inputRef:g,commit:_}),[v,y,_])}function bd(e){let{commit:t,invalid:n,markedDirtyRef:r,name:i,setRegisteredFieldId:a,setValidityData:o,validityData:s}=e,{formRef:c}=cd(),l=V.useRef(null),u=V.useRef(null),d=V.useRef(null),f=so(()=>{let e=u.current;if(e)return e.getValue?e.getValue():e.value}),p=so(()=>{let e=u.current;if(!e)return;let n=e.value;n===void 0&&(n=f()),r.current=!0,t(n)});function m(){let e=u.current;!e||!e.id||c.current.fields.set(e.id,{getValue:f,name:i,controlRef:e.controlRef??d,validityData:gd(s,n),validate:p})}function h(e=u.current?.id){e&&c.current.fields.delete(e)}function g(){let e=u.current;if(!e)return;let t=e.value;t===void 0&&(t=f()),s.initialValue===null&&t!==null&&o(e=>({...e,initialValue:t}))}return H(()=>{let e=u.current;!e||!e.id||c.current.fields.set(e.id,{getValue:f,name:i,controlRef:e.controlRef??d,validityData:gd(s,n),validate:p})},[c,f,n,i,p,s]),H(()=>{let e=c.current.fields;return()=>{let t=u.current?.id;t&&e.delete(t)}},[c]),so((e,t)=>{if(!t){l.current===e&&(l.current=null,h(),u.current=null,a(void 0));return}let n=u.current?.id;l.current=e,u.current=t,a(t.id),n&&n!==t.id&&h(n),g(),m()})}var xd=V.forwardRef(function(e,t){let{errors:n,validationMode:r,submitAttemptedRef:i}=cd(),{render:a,className:o,validate:s,validationDebounceTime:c=0,validationMode:l=r,name:u,disabled:d=!1,invalid:f,dirty:p,touched:m,actionsRef:h,style:g,..._}=e,{disabled:v}=Qu(),y=so(s||(()=>null)),b=v||d,[x,S]=V.useState(!1),[C,w]=V.useState(!1),[T,E]=V.useState(!1),[D,O]=V.useState(!1),k=p??C,A=m??x,j=V.useRef(!1),M=V.useRef(void 0),N=V.useCallback(()=>M.current,[]),P=V.useCallback(e=>{M.current=e},[]),ee=so(e=>{p===void 0&&(e&&(j.current=!0),w(e))}),F=so(e=>{m===void 0&&S(e)}),te=so(()=>l===`onChange`||l===`onSubmit`&&i.current),I=!!u&&Object.hasOwn(n,u)&&n[u]!==void 0,L=f===!0||I,[ne,R]=V.useState({state:ed,error:``,errors:[],value:null,initialValue:null}),re=!L&&ne.state.valid,z=V.useMemo(()=>({disabled:b,touched:A,dirty:k,valid:re,filled:T,focused:D}),[b,A,k,re,T,D]),ie=yd({setValidityData:R,validate:y,validityData:ne,validationDebounceTime:c,invalid:L,markedDirtyRef:j,state:z,name:u,shouldValidateOnChange:te,getRegisteredFieldId:N}),ae=ne.value,oe=V.useCallback(()=>{j.current=!0,ie.commit(ae)},[ie,ae]),se=bd({commit:ie.commit,invalid:L,markedDirtyRef:j,name:u,setRegisteredFieldId:P,setValidityData:R,validityData:ne});V.useImperativeHandle(h,()=>({validate:oe}),[oe]);let ce=V.useMemo(()=>({invalid:L,name:u,validityData:ne,setValidityData:R,disabled:b,touched:A,setTouched:F,dirty:k,setDirty:ee,filled:T,setFilled:E,focused:D,setFocused:O,validate:y,validationMode:l,validationDebounceTime:c,shouldValidateOnChange:te,state:z,markedDirtyRef:j,registerFieldControl:se,validation:ie}),[L,u,ne,b,A,F,k,ee,T,E,D,O,y,l,c,te,z,se,ie]),le=Ks(`div`,e,{ref:t,state:z,props:_,stateAttributesMapping:rd});return(0,B.jsx)(ad.Provider,{value:ce,children:le})}),Sd=V.forwardRef(function(e,t){return(0,B.jsx)(dd,{children:(0,B.jsx)(xd,{...e,ref:t})})}),Cd=V.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,nativeLabel:o=!0,...s}=e,c=od(!1),{labelId:l}=ud(),u=V.useRef(null),d=md({id:l??a,native:o});return Ks(`label`,e,{ref:[t,u],state:c.state,props:[d,s],stateAttributesMapping:rd})}),wd={...rd,...sl},Td=V.forwardRef(function(e,t){let{render:n,id:r,className:i,match:a,style:o,...s}=e,c=_u(r),{validityData:l,state:u,name:d}=od(!1),{setMessageIds:f}=ud(),{errors:p}=cd(),m=d?p[d]:null,h=typeof a==`string`,g=!1;g=a===!0?!0:h?!!l.state[a]:!!m||l.state.valid===!1;let{mounted:_,transitionStatus:v,setMounted:y}=rl(g);H(()=>{if(!(!g||!c))return f(e=>e.concat(c)),()=>{f(e=>e.filter(e=>e!==c))}},[g,c,f]);let b=V.useRef(null),[x,S]=V.useState(null),[C,w]=V.useState(null),T=l.errors.length>1?(0,B.jsx)(`ul`,{children:l.errors.map(e=>(0,B.jsx)(`li`,{children:e},e))}):l.error,E=h?T:m||T,D=l.error;m==null?l.errors.length>1&&(D=JSON.stringify(l.errors)):D=Array.isArray(m)?JSON.stringify(m):m,g&&D!==C&&(w(D),S(E)),ll({open:g,ref:b,onComplete(){g||y(!1)}});let O={...u,transitionStatus:v},k=Ks(`div`,e,{ref:[t,b],state:O,props:[{id:c,children:g?E:x},s],stateAttributesMapping:wd,enabled:_});return _?k:null}),Ed=V.forwardRef(function(e,t){let{render:n,id:r,className:i,style:a,...o}=e,s=_u(r),c=od(!1),{setMessageIds:l}=ud();return H(()=>{if(s)return l(e=>e.concat(s)),()=>{l(e=>e.filter(e=>e!==s))}},[s,l]),Ks(`p`,e,{ref:t,state:c.state,props:[{id:s},o],stateAttributesMapping:rd})});function Dd({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=V.useRef(e!==void 0),[a,o]=V.useState(t);return[i?e:a,V.useCallback(e=>{i||o(e)},[])]}function Od(e,t,n,r,i=!0){let{registerFieldControl:a}=od(),o=V.useRef(null);o.current||=Symbol(),H(()=>{let s=o.current;return!s||!i?void 0:(a(s,{controlRef:e,getValue:r,id:t,value:n}),()=>{a(s,void 0)})},[e,i,r,t,a,n])}var kd=V.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=od(),C=h||s,w=m??a,T={...p,disabled:C},{labelId:E}=ud(),D=fd({id:i});H(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let O=V.useRef(null);H(()=>{u&&O.current===fa(ho(O.current))&&y(!0)},[u,y]);let[k]=Dd({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0,M=so(()=>S.inputRef.current?.value);return Od(S.inputRef,D,j,M),Ks(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,Ga(ja,e.nativeEvent)),_(t!==v.initialValue),b(t!==``)},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),f],stateAttributesMapping:rd})}),Ad=V.createContext(void 0);function jd(e=!1){let t=V.useContext(Ad);if(t===void 0&&!e)throw Error(Ni(16));return t}function Md(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:V.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Nd(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=V.useRef(null),s=jd(!0),c=a??s!==void 0,{props:l}=Md({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=V.useCallback(()=>{let e=o.current;Pd(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return H(u,[u]),{getButtonProps:V.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Ms({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Us(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=Pd(a),l=!i&&Fd(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(Us(e),a?.(e),e.target===e.currentTarget&&i&&c&&Pd(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:so(e=>{o.current=e,u()})}}function Pd(e){return on(e)&&e.tagName===`BUTTON`}function Fd(e){return!!(e?.tagName===`A`&&e?.href)}function Id(e,t){let n=V.useRef(e),r=so(t);H(()=>{n.current!==e&&r(n.current)},[e,r]),H(()=>{n.current=e},[e])}var Ld=e=>e.toastMetadata;U(e=>e.toasts),U(e=>e.toasts.length===0),U(Ld,(e,t)=>e.get(t)?.value),U(Ld,(e,t)=>e.get(t)?.domIndex??-1),U(Ld,(e,t)=>e.get(t)?.offsetY??0),U(Ld,(e,t)=>e.get(t)?.visibleIndex??-1),U(e=>e.hovering),U(e=>e.focused),U(e=>e.hovering||e.focused),U(e=>e.hovering||e.focused||!e.isWindowFocused),U(e=>e.prevFocusElement);function Rd(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}({...sl}),`${ic}${ac}`;var zd=V.forwardRef(function(e,t){return(0,B.jsx)(kd,{ref:t,...e})}),Bd=(e,t)=>Object.is(e,t);function Vd(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Hd(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:Vd(t,e,n))}function Ud(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:Vd(e,t,n))}function Wd(e,t,n){return e.filter(e=>!Vd(t,e,n))}function Gd(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Kd(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function qd(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Kd(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Jd(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Gd(e)}function Yd(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Gd(e.value):Gd(e)}function Xd(e,t,n){function r(){return Jd(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=Kd(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Zd(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,B.jsx)(V.Fragment,{children:Xd(r,t,n)},i)),e),[])}U(e=>e.id),U(e=>e.labelId),U(e=>e.items),U(e=>e.selectedValue),U(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),U(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),U((e,t)=>t?qd(e.items):!1),U(e=>e.open),U(e=>e.mounted),U(e=>e.forceMounted),U(e=>e.inline),U(e=>e.activeIndex),U(e=>e.selectedIndex),U((e,t)=>e.activeIndex===t),U((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>Vd(t,e,n)):Vd(t,r,n)}),U(e=>e.transitionStatus),U(e=>e.popupProps),U(e=>e.inputProps),U(e=>e.triggerProps),U(e=>e.itemProps),U(e=>e.positionerElement),U(e=>e.listElement),U(e=>e.triggerElement),U(e=>e.inputElement),U(e=>e.inputGroupElement),U(e=>e.popupSide),U(e=>e.openMethod),U(e=>e.inputInsidePopup),U(e=>e.inputOwnsFormValue),U(e=>e.selectionMode),U(e=>e.name),U(e=>e.form),U(e=>e.disabled),U(e=>e.readOnly),U(e=>e.required),U(e=>e.grid),U(e=>e.virtualized),U(e=>e.itemToStringLabel),U(e=>e.isItemEqualToValue),U(e=>e.modal),U(e=>e.autoHighlight),U(e=>e.submitOnItemClick);function Qd(e){return Array.isArray(e)?e.map(e=>Qd(e)).join(`,`):e==null?``:String(e)}function $d(e){let t=V.useRef(``),n=V.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:V.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function ef(e,t){let{onClick:n,onPointerDown:r}=$d(so((n,r)=>{(typeof e==`function`?e():e)||t(r||(Ki?`touch`:``))}));return V.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function tf(e){let[t,n]=V.useState(null),r=ef(e,n);return Id(e,t=>{t&&!e&&n(null)}),V.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function nf(e){return e==null?void 0:`${e}-label`}function rf(e,t){return e??t}({...hu,...rd});function af(e){let t=e.getBoundingClientRect(),n=tn(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var of=V.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function sf(){return V.useContext(of)}function cf(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=so(i),o=V.useRef(0),s=Ci(uf).current,c=Ci(lf).current,[l,u]=V.useState(0),d=V.useRef(l),f=so((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=so(e=>{c.delete(e),d.current+=1,u(d.current)}),m=V.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(df).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);H(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),H(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),H(()=>()=>{n.current=[]},[n]),H(()=>()=>{r&&(r.current=[])},[r]);let h=so(e=>(s.add(e),()=>{s.delete(e)}));H(()=>{s.forEach(e=>e(m))},[s,m]);let g=V.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,B.jsx)(of.Provider,{value:g,children:t})}function lf(){return new Map}function uf(){return new Set}function df(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}({...gu,...sl});var ff=V.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,B.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),pf={},mf={},hf=``;function gf(e){if(typeof document>`u`)return!1;let t=ho(e);return tn(t).innerWidth-t.documentElement.clientWidth>0}function _f(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=ho(e),n=t.documentElement,r=t.body,i=cn(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function vf(e){let t=ho(e),n=t.documentElement,r=t.body,i=cn(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function yf(e){let t=ho(e),n=t.documentElement,r=t.body,i=tn(n),a=0,o=0,s=!1,c=po.create();if(Gi&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,pf={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},hf=n.style.scrollBehavior,mf={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=cn(n)?n:r;if(s=_f(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,pf),Object.assign(r.style,mf),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=hf)}function d(){u(),c.request(l)}l();let f=Ja(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var bf=new class{lockCount=0;restore=null;timeoutLock=zi.create();timeoutUnlock=zi.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=ho(e).documentElement,n=tn(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=Oa;return}let r=Ki||!gf(e);this.restore=r?vf(e):yf(e)}};function xf(e=!0,t=null){H(()=>{if(e)return bf.acquire(t)},[e,t])}var Sf=20;function Cf(e,t,n,r){let[i,a]=V.useState(!1);H(()=>{if(!e||!t||n==null){a(!1);return}let r=ho(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Sf)},[e,t,n]),xf(e&&(!t||i),r)}({...gu,...sl});var wf=(function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e})({});function Tf(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=sf(),f=V.useRef(-1),[p,m]=V.useState(a??(i===wf.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=V.useRef(null),g=V.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return H(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),H(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),V.useMemo(()=>({ref:g,index:p}),[p,g])}({...sl,...mu});var Ef=V.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Ks(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),Df=V.createContext(void 0);function Of(e){let t=V.useContext(Df);if(t===void 0&&!e)throw Error(Ni(69));return t}var kf=`ArrowUp`,Af=`ArrowDown`,jf=`ArrowLeft`,Mf=`ArrowRight`,Nf=`Home`,Pf=`End`,Ff=new Set([jf,Mf]),If=new Set([kf,Af]),Lf=new Set([...Ff,...If]),Rf=new Set([...Lf,Nf,Pf]);function zf(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=jd(),{ref:i,index:a}=Tf(e),o=n===a,s=V.useRef(null),c=Xa(i,s);return{compositeProps:V.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}function Bf(e){let{render:t,className:n,style:r,state:i=Aa,props:a=ka,refs:o=ka,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=zf({metadata:s});return Ks(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}({...gu,...sl}),(function(e){return e[e.open=su.open]=`open`,e[e.closed=su.closed]=`closed`,e[e.startingStyle=su.startingStyle]=`startingStyle`,e[e.endingStyle=su.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e})({}),{...gu,...sl},{...Dl},U(e=>e.modal),U(e=>e.nested),U(e=>e.nestedOpenDialogCount),U(e=>e.nestedOpenDrawerCount),U(e=>e.disablePointerDismissal),U(e=>e.openMethod),U(e=>e.descriptionElementId),U(e=>e.titleElementId),U(e=>e.viewportElement),U(e=>e.role),(function(e){return e[e.open=su.open]=`open`,e[e.closed=su.closed]=`closed`,e[e.startingStyle=su.startingStyle]=`startingStyle`,e[e.endingStyle=su.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e})({}),{...gu,...sl};function Vf(e){return Ks(e.defaultTagName??`div`,e,e)}var Hf=V.createContext(void 0);function Uf(e){let t=V.useContext(Hf);if(t===void 0&&!e)throw Error(Ni(36));return t}var Wf=V.createContext(void 0);function Gf(e=!0){let t=V.useContext(Wf);if(t===void 0&&!e)throw Error(Ni(25));return t}({...gu,...sl}),{...sl},{...gu,...sl};var Kf=V.createContext(null);function qf(e){let t=V.useContext(Kf);if(t===null&&!e)throw Error(Ni(5));return t}var Jf={...Dl,disabled:U(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:U(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:U(e=>e.openMethod),allowMouseEnter:U(e=>e.allowMouseEnter),stickIfOpen:U(e=>e.stickIfOpen),parent:U(e=>e.parent),rootId:U(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:U(e=>e.activeIndex),isActive:U((e,t)=>e.activeIndex===t),hoverEnabled:U(e=>e.hoverEnabled),instantType:U(e=>e.instantType),lastOpenChangeReason:U(e=>e.openChangeReason),floatingTreeRoot:U(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:U(e=>e.floatingNodeId),floatingParentNodeId:U(e=>e.floatingParentNodeId),itemProps:U(e=>e.itemProps),closeDelay:U(e=>e.closeDelay),hasViewport:U(e=>e.hasViewport),keyboardEventRelay:U(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},Yf=class e extends $c{constructor(e){super({...Xf(),...e},{positionerRef:V.createRef(),popupRef:V.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:V.createRef(),beforeContentFocusGuardRef:V.createRef(),onOpenChangeComplete:void 0,triggerElements:new vl},Jf),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=Ci(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function Xf(){return{...bl(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new hc,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Aa,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var Zf=V.createContext(void 0);function Qf(){return V.useContext(Zf)}Oi(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:h=!0}=e,g=Gf(!0),_=Uf(!0),v=qf(!0),y=Qf(),b=V.useMemo(()=>y&&_?{type:`menu`,store:_.store}:v?{type:`menubar`,context:v}:g&&!_?{type:`context-menu`,context:g}:{type:void 0},[g,_,v,y]),x=Yf.useStore(f?.store,{open:a,openProp:n,activeTriggerId:m,triggerIdProp:p,parent:b});ji(()=>{n===void 0&&x.state.open===!1&&a===!0&&x.update({open:!0,activeTriggerId:m})}),x.useControlledProp(`openProp`,n),x.useControlledProp(`triggerIdProp`,p),x.useContextCallback(`onOpenChangeComplete`,i);let S=Cs(),C=Cs(),w=x.useState(`floatingTreeRoot`),T=bc(w),E=vc(),D=x.useState(`open`),O=x.useState(`activeTriggerElement`),k=x.useState(`positionerElement`),A=x.useState(`hoverEnabled`),j=x.useState(`disabled`),M=x.useState(`lastOpenChangeReason`),N=x.useState(`parent`),P=x.useState(`activeIndex`),ee=x.useState(`payload`),F=x.useState(`floatingParentNodeId`),te=V.useRef(null),I=V.useRef(N.type!==`context-menu`),L=Bi(),ne=V.useRef(!0),R=Bi(),re=F!=null,{openMethod:z,triggerProps:ie}=tf(D);x.useSyncedValues({disabled:o,modal:N.type===void 0?s:void 0,openMethod:z,rootId:S}),hl(x);let{forceUnmount:ae}=gl(D,x,()=>{x.update({allowMouseEnter:!1,stickIfOpen:!0})});H(()=>{g&&!_?x.update({parent:{type:`context-menu`,context:g},floatingNodeId:T,floatingParentNodeId:E}):_&&x.update({floatingNodeId:T,floatingParentNodeId:E})},[g,_,T,E,x]),V.useEffect(()=>{if(D||(te.current=null),N.type===`context-menu`){if(!D){L.clear(),I.current=!1;return}L.start(500,()=>{I.current=!0})}},[L,D,N.type]),H(()=>{!D&&!A&&x.set(`hoverEnabled`,!0)},[D,A,x]);let oe=so((e,t)=>{let n=t.reason;if(D===e&&t.trigger===O&&M===n||(t.preventUnmountOnClose=()=>{x.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=O??void 0),r?.(e,t),t.isCanceled))return;x.state.floatingRootContext.dispatchOpenChange(e,t);let i=t.event;if(e===!1&&i?.type===`click`&&i.pointerType===`touch`&&!ne.current)return;if(!e&&P!==null){let e=x.context.itemDomElements.current[P];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===Pa?(ne.current=!1,R.start(300,()=>{ne.current=!0})):(ne.current=!0,R.clear());let a=(n===Ma||n===Ia)&&i.detail===0&&i?.isTrusted,o=!e&&(n===Ra||n==null),s={open:e,openChangeReason:n};te.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),x.update(s),N.type===`menubar`&&(n===Pa||n===La||n===Na||n===za||n===Va)?x.set(`instantType`,`group`):a||o?x.set(`instantType`,a?`click`:`dismiss`):x.set(`instantType`,void 0)}),se=nl({popupStore:x,floatingId:C,nested:E!=null,onOpenChange:oe}),ce=se.context.events;V.useEffect(()=>{let e=({open:e,eventDetails:t})=>oe(e,t);return ce.on(`setOpen`,e),()=>{ce?.off(`setOpen`,e)}},[ce,oe]);let le=V.useCallback(()=>{x.setOpen(!1,Ga(Ua))},[x]);V.useImperativeHandle(u,()=>({unmount:ae,close:le}),[ae,le]);let ue;N.type===`context-menu`&&(ue=N.context),V.useImperativeHandle(ue?.positionerRef,()=>k,[k]),V.useImperativeHandle(ue?.actionsRef,()=>({setOpen:oe}),[oe]);let de=zc(se,{enabled:!j,bubbles:{escapeKey:d&&N.type===`menu`},outsidePress(){return N.type!==`context-menu`||te.current?.type===`contextmenu`?!0:I.current},externalTree:re?w:void 0}),fe=Nu(),pe=V.useCallback(e=>{x.select(`activeIndex`)!==e&&x.set(`activeIndex`,e)},[x]),me=Kl(se,{enabled:!j,listRef:x.context.itemDomElements,activeIndex:P,nested:N.type!==void 0,loopFocus:c,orientation:l,parentOrientation:N.type===`menubar`?N.context.orientation:void 0,rtl:fe===`rtl`,disabledIndices:ka,onNavigate:pe,openOnArrowKeyDown:N.type!==`context-menu`,externalTree:re?w:void 0,focusItemOnHover:h}),he=V.useCallback(e=>{x.context.typingRef.current=e},[x]),ge=ql(se,{listRef:x.context.itemLabels,elementsRef:x.context.itemDomElements,activeIndex:P,resetMs:Qs,onMatch:e=>{D&&e!==P&&x.set(`activeIndex`,e)},onTyping:he});_l(x,{floatingRootContext:se,activeTriggerProps:V.useMemo(()=>{let e=Ms(ge.reference,me.reference,de.reference,{onMouseMove(){x.set(`allowMouseEnter`,!0)}},ie);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=D,e},[x,ge.reference,me.reference,de.reference,ie,D]),inactiveTriggerProps:V.useMemo(()=>{let e=Ms(me.trigger,de.trigger,ie);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[me.trigger,de.trigger,ie]),popupProps:V.useMemo(()=>Ms(ul,{id:C,role:`menu`,"aria-labelledby":O?.id,onMouseMove(){x.set(`allowMouseEnter`,!0),N.type===`menu`&&x.set(`hoverEnabled`,!1)},onClick(){x.select(`hoverEnabled`)&&x.set(`hoverEnabled`,!1)},onKeyDown(e){let t=x.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},ge.floating,me.floating,de.floating),[O,C,N.type,x,ge.floating,me.floating,de.floating]),itemProps:me.item??Aa});let _e=V.useMemo(()=>({store:x,parent:b}),[x,b]),ve=(0,B.jsx)(Hf.Provider,{value:_e,children:typeof t==`function`?t({payload:ee}):t});return N.type===void 0||N.type===`context-menu`?(0,B.jsx)(xc,{externalTree:w,children:ve}):ve});function $f(e){if(on(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!vn(e))return $f(xn(e))}function ep(e,t){let n=V.useRef(null);function r(t){Qt.flushSync(()=>{e.setOpen(!1,Ga(La,t.nativeEvent,t.currentTarget))}),$o(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&es(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{Qt.flushSync(()=>{e.setOpen(!1,Ga(La,n.nativeEvent,n.currentTarget))});let i=Qo(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&pa(r,i);){let e=i;if(i=Yo(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function tp(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=V.useRef(!1);return V.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,ho(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:Aa,[t,n,r])}var np=2;ki(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Uf(!0),h=d?.store??m?.store;if(!h)throw Error(Ni(85));let g=_u(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=V.useRef(null),S=ip(),C=jd(!0),w=yc(),T=V.useMemo(()=>w??new hc,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=ml(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:bc(T),floatingParentNodeId:vc(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=Nd({disabled:A,native:o});V.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=V.useRef(null),P=Bi(),ee=so(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(pa(N.current,t)||pa(h.select(`positionerElement`),t)||t===N.current||t!=null&&$f(t)===h.select(`rootId`))return;let n=af(N.current);e.clientX>=n.left-np&&e.clientX<=n.right+np&&e.clientY>=n.top-np&&e.clientY<=n.bottom+np||T.events.emit(`close`,{domEvent:e,reason:Ba})});V.useEffect(()=>{y&&h.select(`lastOpenChangeReason`)===Na&&ho(N.current).addEventListener(`mouseup`,ee,{once:!0})},[y,ee,h]);let F=O&&S.context.hasSubmenuOpen,te=zl(v,{enabled:(c??F)&&!A&&S.type!==`context-menu`&&(!O||F&&!D),handleClose:tu({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),I=rp(y,h.select(`lastOpenChangeReason`)),L=Mc(v,{enabled:!A&&S.type!==`context-menu`,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0?I:!1}),ne=jl(v,{enabled:!A&&F}),R=tp({open:y,enabled:O,mouseDownAction:`open`}),re=V.useMemo(()=>Ms(ne.reference,L.reference),[ne.reference,L.reference]),z=h.useState(`triggerProps`,D),{preFocusGuardRef:ie,handlePreFocusGuardFocus:ae,handleFocusTargetFocus:oe}=ep(h,x),se={disabled:A,open:y},ce=[N,t,M,E,x],le=[re,te??Aa,z,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),ho(e.currentTarget).addEventListener(`mouseup`,ee,{once:!0}))}},O?{role:`menuitem`}:{},R,p,j],ue=Ks(`button`,e,{enabled:!O,stateAttributesMapping:hu,state:se,ref:ce,props:le});return O?(0,B.jsx)(Bf,{tag:`button`,render:n,className:r,style:i,state:se,refs:ce,props:le,stateAttributesMapping:hu}):y?(0,B.jsxs)(V.Fragment,{children:[(0,B.jsx)(yo,{ref:ie,onFocus:ae},`${g}-pre-focus-guard`),(0,B.jsx)(V.Fragment,{children:ue},g),(0,B.jsx)(yo,{ref:h.context.triggerFocusTargetRef,onFocus:oe},`${g}-post-focus-guard`)]}):(0,B.jsx)(V.Fragment,{children:ue},g)});function rp(e,t){let n=Bi(),[r,i]=V.useState(!1);return H(()=>{e&&t===`trigger-hover`?(i(!0),n.start($s,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function ip(){let e=Gf(!0),t=Uf(!0),n=qf(!0);return V.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var ap=(function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=il.startingStyle]=`startingStyle`,e[e.endingStyle=il.endingStyle]=`endingStyle`,e})({}),op=(function(e){return e.panelOpen=`data-panel-open`,e})({}),sp={[ap.open]:``},cp={[ap.closed]:``},lp={open(e){return e?{[op.panelOpen]:``}:null}},up={open(e){return e?sp:cp}};({...up,...sl}),{...lp,...sl};var dp=V.createContext(null),fp=V.createContext(null);function pp(){let e=V.useContext(dp);if(e===null)throw Error(Ni(60));return e}function mp(){let e=V.useContext(fp);if(e===null)throw Error(Ni(61));return e}var hp={id:U(e=>e.id),labelId:U(e=>e.labelId),modal:U(e=>e.modal),multiple:U(e=>e.multiple),items:U(e=>e.items),itemToStringLabel:U(e=>e.itemToStringLabel),itemToStringValue:U(e=>e.itemToStringValue),isItemEqualToValue:U(e=>e.isItemEqualToValue),value:U(e=>e.value),hasSelectedValue:U(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Yd(t,r)!==``}),hasNullItemLabel:U((e,t)=>t?qd(e.items):!1),open:U(e=>e.open),mounted:U(e=>e.mounted),forceMount:U(e=>e.forceMount),transitionStatus:U(e=>e.transitionStatus),openMethod:U(e=>e.openMethod),activeIndex:U(e=>e.activeIndex),selectedIndex:U(e=>e.selectedIndex),isActive:U((e,t)=>e.activeIndex===t),isSelected:U((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>Vd(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Vd(n,i,r)}),isSelectedByFocus:U((e,t)=>e.selectedIndex===t),popupProps:U(e=>e.popupProps),triggerProps:U(e=>e.triggerProps),triggerElement:U(e=>e.triggerElement),positionerElement:U(e=>e.positionerElement),listElement:U(e=>e.listElement),popupSide:U(e=>e.popupSide),scrollUpArrowVisible:U(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:U(e=>e.scrollDownArrowVisible),hasScrollArrows:U(e=>e.hasScrollArrows)},gp=1;function _p(e,t){return Math.max(0,e-t)}function vp(e,t){if(t<=0)return 0;let n=Rd(e,0,t),r=n,i=t-n,a=r<=gp,o=i<=gp;return a&&o?r<=i?0:t:a?0:o?t:n}function yp(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=Bd,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=cd(),{setDirty:E,setTouched:D,setFocused:O,shouldValidateOnChange:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:ee}=od(),F=fd({id:t}),te=N||d,I=M??c,[L,ne]=Dd({controlled:n,default:y?r??ka:r,name:`Select`,state:`value`}),[R,re]=Dd({controlled:a,default:o,name:`Select`,state:`open`}),z=V.useRef([]),ie=V.useRef([]),ae=V.useRef(null),oe=V.useRef(null),se=V.useRef(0),ce=V.useRef(null),le=V.useRef([]),ue=V.useRef(!1),de=V.useRef(!1),fe=V.useRef(null),pe=V.useRef(null),me=V.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),he=V.useRef(!1),{mounted:ge,setMounted:_e,transitionStatus:ve}=rl(R),{openMethod:ye,triggerProps:be}=tf(R),xe=Ci(()=>new Qc({id:F,labelId:void 0,modal:m,multiple:y,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:L,open:R,mounted:ge,transitionStatus:ve,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Se=Jc(xe,hp.activeIndex),Ce=Jc(xe,hp.selectedIndex),we=Jc(xe,hp.triggerElement),Te=Jc(xe,hp.positionerElement),Ee=Xu(ye),De=ye??Ee,Oe=V.useMemo(()=>y&&Array.isArray(L)&&L.length===0?``:Yd(L,x),[y,L,x]),ke=V.useMemo(()=>y&&Array.isArray(L)?L.map(e=>Yd(e,x)):Yd(L,x),[y,L,x]);Od(no(xe.state.triggerElement),F,L,so(()=>ke));let Ae=V.useRef(L),je=y?Array.isArray(L)&&L.length>0:L!=null;H(()=>{L!==Ae.current&&xe.set(`forceMount`,!0)},[xe,L]),H(()=>{j(je)},[je,j]),H(function(){let e=le.current,t;if(y){let n=Array.isArray(L)?L:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=Ud(e,r,S);t=i===-1?null:i}}else{let n=Ud(e,L,S);t=n===-1?null:n}t===null&&(pe.current=null),!R&&xe.set(`selectedIndex`,t)},[je,y,R,L,le,S,xe,pe]),Id(L,()=>{T(I),E(L!==A.initialValue),k()?P.commit(L):P.commit(L,!0)});let Me=so((e,t)=>{if(s?.(e,t),!t.isCanceled&&(re(e),!e&&(t.reason===La||t.reason===Fa)&&(D(!0),O(!1),ee===`onBlur`&&P.commit(L)),!e&&xe.state.activeIndex!==null)){let e=z.current[xe.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Ne=so(()=>{_e(!1),xe.update({activeIndex:null,openMethod:null}),_?.(!1)});ll({enabled:!h,open:R,ref:ae,onComplete(){R||Ne()}}),V.useImperativeHandle(h,()=>({unmount:Ne}),[Ne]);let Pe=so((e,t)=>{i?.(e,t),!t.isCanceled&&ne(e)}),Fe=so(()=>{let e=xe.state.listElement||ae.current;if(!e)return;let t=_p(e.scrollHeight,e.clientHeight),n=vp(e.scrollTop,t),r=n>0,i=n<t;xe.state.scrollUpArrowVisible!==r&&xe.set(`scrollUpArrowVisible`,r),xe.state.scrollDownArrowVisible!==i&&xe.set(`scrollDownArrowVisible`,i)}),Ie=Ol({open:R,onOpenChange:Me,elements:{reference:we,floating:Te}}),Le=Mc(Ie,{enabled:!f&&!te,event:`mousedown`}),Re=zc(Ie),ze=Kl(Ie,{enabled:!f&&!te,listRef:z,activeIndex:Se,selectedIndex:Ce,disabledIndices:ka,onNavigate(e){e===null&&!R||xe.set(`activeIndex`,e)},focusItemOnHover:C}),Be=ql(Ie,{enabled:!f&&!te&&(R||!y),listRef:ie,activeIndex:Se,selectedIndex:Ce,onMatch(e){R?xe.set(`activeIndex`,e):Pe(le.current[e],Ga(`none`))},onTyping(e){ue.current=e}}),Ve=V.useMemo(()=>{let e=Ms(Be.reference,ze.reference,Re.reference,Le.reference,be);return F&&(e.id=F),e},[Le.reference,Be.reference,ze.reference,Re.reference,be,F]),He=V.useMemo(()=>Ms(ul,Be.floating,ze.floating,Re.floating),[Be.floating,ze.floating,Re.floating]),Ue=ze.item??Aa;ji(()=>{xe.update({popupProps:He,triggerProps:Ve})}),H(()=>{xe.update({id:F,modal:m,multiple:y,value:L,open:R,mounted:ge,transitionStatus:ve,popupProps:He,triggerProps:Ve,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:De})},[xe,F,m,y,L,R,ge,ve,He,Ve,v,b,x,S,De]);let We=V.useMemo(()=>({store:xe,name:I,required:p,disabled:te,readOnly:f,multiple:y,highlightItemOnHover:C,setValue:Pe,setOpen:Me,listRef:z,popupRef:ae,scrollHandlerRef:oe,handleScrollArrowVisibility:Fe,scrollArrowsMountedCountRef:se,itemProps:Ue,events:Ie.context.events,valueRef:ce,valuesRef:le,labelsRef:ie,typingRef:ue,selectionRef:me,firstItemTextRef:fe,selectedItemTextRef:pe,validation:P,onOpenChangeComplete:_,keyboardActiveRef:de,alignItemWithTriggerActiveRef:he,initialValueRef:Ae}),[xe,I,p,te,f,y,C,Pe,Me,Ue,Ie.context.events,P,_,Fe]),Ge=Xa(g,P.inputRef),Ke=y&&Array.isArray(L)&&L.length>0,qe=y?void 0:I,Je=V.useMemo(()=>!y||!Array.isArray(L)||!I?null:L.map(e=>{let t=Yd(e,x);return(0,B.jsx)(`input`,{type:`hidden`,form:l,name:I,value:t},t)}),[y,L,l,I,x]);return(0,B.jsx)(dp.Provider,{value:We,children:(0,B.jsxs)(fp.Provider,{value:Ie,children:[w,(0,B.jsx)(`input`,{...P.getInputValidationProps({onFocus(){xe.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||te||f){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,n=Ga(ja,e.nativeEvent);function r(){if(y)return;let e=le.current.find(e=>Yd(e,x).toLowerCase()===t.toLowerCase()||Jd(e,b).toLowerCase()===t.toLowerCase());e!=null&&(E(e!==A.initialValue),Pe(e,n),k()&&P.commit(e))}xe.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&qe==null?`${F}-hidden-input`:void 0,form:l,name:qe,autoComplete:u,value:Oe,disabled:te,required:p&&!Ke,readOnly:f,ref:Ge,style:I?vo:_o,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Je]})})}var bp=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=a;delete o.id;let s=od(),{store:c}=pp(),l=Jc(c,hp.triggerElement),u=Jc(c,hp.id),d=md({id:nf(u),fallbackControlId:l?.id??u,setLabelId(e){c.set(`labelId`,e)}});return Ks(`div`,e,{ref:t,state:s.state,props:[d,a],stateAttributesMapping:rd})}),xp=2,Sp=400,Cp={...hu,...rd,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},wp=V.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,setFocused:u,validationMode:d,state:f,disabled:p}=od(),{labelId:m}=ud(),{store:h,setOpen:g,selectionRef:_,validation:v,readOnly:y,required:b,alignItemWithTriggerActiveRef:x,disabled:S,keyboardActiveRef:C}=pp(),w=p||S||a,T=Jc(h,hp.open),E=Jc(h,hp.mounted),D=Jc(h,hp.value),O=Jc(h,hp.triggerProps),k=Jc(h,hp.positionerElement),A=Jc(h,hp.listElement),j=Jc(h,hp.popupSide),M=Jc(h,hp.id),N=Jc(h,hp.labelId),P=Jc(h,hp.hasSelectedValue),ee=E&&k?j:null,F=i??M,te=rf(m,N);fd({id:F});let I=no(k),L=V.useRef(null),{getButtonProps:ne,buttonRef:R}=Nd({disabled:w,native:o}),re=Xa(t,L,R,so(e=>{h.set(`triggerElement`,e)})),z=Bi(),ie=Bi(),ae=Bi();V.useEffect(()=>{if(T)return ae.start(Sp,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}),()=>{ae.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ie.clear()},[T,_,ie,ae]);let oe=Ms(O,{id:F,role:`combobox`,"aria-expanded":T?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":T?A?.id??Sa(k)?.id:void 0,"aria-labelledby":te,"aria-readonly":y||void 0,"aria-required":b||void 0,tabIndex:w?-1:0,ref:re,onFocus(e){u(!0),T&&x.current&&g(!1,Ga(ja,e.nativeEvent)),z.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){pa(k,e.relatedTarget)||(l(!0),u(!1),d===`onBlur`&&v.commit(D))},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(e){if(T)return;let t=ho(e.currentTarget);function n(e){if(!L.current)return;let t=e.target;if(pa(L.current,t)||pa(I.current,t)||t===L.current)return;let n=af(L.current);e.clientX>=n.left-xp&&e.clientX<=n.right+xp&&e.clientY>=n.top-xp&&e.clientY<=n.bottom+xp||g(!1,Ga(Ba,e))}ie.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},v.getValidationProps,c,ne);oe.role=`combobox`;let se={...f,open:T,disabled:w,value:D,readOnly:y,popupSide:ee,placeholder:!P};return Ks(`button`,e,{ref:[t,L],state:se,stateAttributesMapping:Cp,props:oe})}),Tp={value:()=>null},Ep=V.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=pp(),u=Jc(c,hp.value),d=Jc(c,hp.items),f=Jc(c,hp.itemToStringLabel),p=Jc(c,hp.hasSelectedValue),m=!p&&a!=null&&i==null,h=Jc(c,hp.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(!p&&a!=null&&!h?a:Array.isArray(u)?Zd(u,d,f):Xd(u,d,f)),Ks(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:Tp})}),Dp=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=pp();return Ks(`span`,e,{state:{open:Jc(o,hp.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:mu})}),Op=V.createContext(void 0),kp=V.forwardRef(function(e,t){let{store:n}=pp(),r=Jc(n,hp.mounted),i=Jc(n,hp.forceMount);return r||i?(0,B.jsx)(Op.Provider,{value:!0,children:(0,B.jsx)(pc,{ref:t,...e})}):null});({...gu,...sl});var Ap=V.createContext(void 0);function jp(){let e=V.useContext(Ap);if(!e)throw Error(Ni(59));return e}function Mp(e,t){e&&Object.assign(e.style,t)}var Np={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Pp={position:`fixed`},Fp=V.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=oc,style:_,...v}=e,{store:y,listRef:b,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D}=pp(),O=mp(),k=Jc(y,hp.open),A=Jc(y,hp.mounted),j=Jc(y,hp.modal),M=Jc(y,hp.value),N=Jc(y,hp.openMethod),P=Jc(y,hp.positionerElement),ee=Jc(y,hp.triggerElement),F=Jc(y,hp.isItemEqualToValue),te=Jc(y,hp.transitionStatus),I=V.useRef(null),L=V.useRef(null),[ne,R]=V.useState(h),re=A&&ne&&N!==`touch`;!A&&ne!==h&&R(h),H(()=>{A||(hp.scrollUpArrowVisible(y.state)&&y.set(`scrollUpArrowVisible`,!1),hp.scrollDownArrowVisible(y.state)&&y.set(`scrollDownArrowVisible`,!1))},[y,A]),V.useImperativeHandle(S,()=>re),Cf((re||j)&&k,N===`touch`,P,ee);let z=Vu({anchor:n,floatingRootContext:O,positionMethod:r,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??re,collisionAvoidance:g,keepMounted:!0}),ie=re?`none`:z.side,ae=re?Pp:z.positionerStyles,oe={open:k,side:ie,align:z.align,anchorHidden:z.anchorHidden};H(()=>{y.set(`popupSide`,z.side)},[y,z.side]);let se=Wu(e,oe,{styles:ae,transitionStatus:te,props:v,refs:[t,so(e=>{y.set(`positionerElement`,e)})],hidden:!A,inert:!k}),ce=V.useRef(0),le=so(e=>{if(e.size===0&&ce.current===0||w.current.length===0)return;let t=ce.current;if(ce.current=e.size,e.size===t)return;let n=Ga(ja);if(t!==0&&!y.state.multiple&&M!==null&&Ud(w.current,M,F)===-1){let e=T.current,t=e!=null&&Ud(w.current,e,F)!==-1?e:null;D(t,n),t===null&&(y.set(`selectedIndex`,null),C.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(M)){let e=e=>Ud(w.current,e,F)!==-1,t=M.filter(t=>e(t));(t.length!==M.length||t.some(e=>!Hd(M,e,F)))&&(D(t,n),t.length===0&&(y.set(`selectedIndex`,null),C.current=null))}if(k&&re){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Mp(P,e),Mp(E.current,e)}}),ue=V.useMemo(()=>({...z,side:ie,alignItemWithTriggerActive:re,setControlledAlignItemWithTrigger:R,scrollUpArrowRef:I,scrollDownArrowRef:L}),[z,ie,re,R]);return(0,B.jsx)(cf,{elementsRef:b,labelsRef:x,onMapChange:le,children:(0,B.jsxs)(Ap.Provider,{value:ue,children:[A&&j&&(0,B.jsx)(ff,{inert:Yu(!k),cutout:ee}),se]})})}),Ip=`base-ui-disable-scrollbar`,Lp={className:Ip,getElement(e){return(0,B.jsx)(`style`,{nonce:e,href:Ip,precedence:`base-ui:low`,children:`.${Ip}{scrollbar-width:none}.${Ip}::-webkit-scrollbar{display:none}`})}},Rp=V.createContext(void 0),zp={disableStyleElements:!1};function Bp(){return V.useContext(Rp)??zp}var Vp={...gu,...sl},Hp=V.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:c,onOpenChangeComplete:l,setOpen:u,valueRef:d,firstItemTextRef:f,selectedItemTextRef:p,keyboardActiveRef:m,multiple:h,handleScrollArrowVisibility:g,scrollHandlerRef:_,listRef:v,highlightItemOnHover:y}=pp(),{side:b,align:x,alignItemWithTriggerActive:S,isPositioned:C,setControlledAlignItemWithTrigger:w,scrollDownArrowRef:T,scrollUpArrowRef:E}=jp(),D=Of(!0)!=null,O=mp(),k=Nu(),{nonce:A,disableStyleElements:j}=Bp(),M=Jc(s,hp.id),N=Jc(s,hp.open),P=Jc(s,hp.mounted),ee=Jc(s,hp.popupProps),F=Jc(s,hp.transitionStatus),te=Jc(s,hp.triggerElement),I=Jc(s,hp.positionerElement),L=Jc(s,hp.listElement),ne=V.useRef(!1),R=V.useRef(!1),re=V.useRef({}),z=mo(),ie=so(e=>{if(!I||!c.current||!R.current)return;if(ne.current||!S){g();return}let t=I.style.top===`0px`,n=I.style.bottom===`0px`;if(!t&&!n){g();return}let r=Gp(I),i=Kp(I.getBoundingClientRect().height,`y`,r),a=ho(I),o=getComputedStyle(I),s=parseFloat(o.marginTop),l=parseFloat(o.marginBottom),u=Up(getComputedStyle(c.current)),d=Math.min(a.documentElement.clientHeight-s-l,u),f=e.scrollTop,p=Wp(e),m=0,h=null,_=!1,v=!1,y=e=>{I.style.height=`${e}px`},b=(t,n)=>{let r=Rd(t,0,d-i);r>0&&y(i+r),e.scrollTop=n,d-(i+r)<=gp&&(ne.current=!0),g()},x=t?p-f:f,C=Math.min(i+x,d);if(m=C,x<=gp){b(x,t?p:0);return}if(d-C>gp?t?v=!0:h=0:(_=!0,n&&f<p&&(h=f-(x-(i+x-d)))),m=Math.ceil(m),m!==0&&y(m),v||h!=null){let t=Wp(e),n=v?t:Rd(h,0,t);Math.abs(e.scrollTop-n)>gp&&(e.scrollTop=n)}(_||m>=d-gp)&&(ne.current=!0),g()});V.useImperativeHandle(_,()=>ie,[ie]),ll({open:N,ref:c,onComplete(){N&&l?.(!0)}});let ae={open:N,transitionStatus:F,side:b,align:x};H(()=>{!I||!c.current||Object.keys(re.current).length||(re.current={top:I.style.top||`0`,left:I.style.left||`0`,right:I.style.right,height:I.style.height,bottom:I.style.bottom,minHeight:I.style.minHeight,maxHeight:I.style.maxHeight,marginTop:I.style.marginTop,marginBottom:I.style.marginBottom})},[c,I]),H(()=>{N||S||(R.current=!1,ne.current=!1,Mp(I,re.current))},[N,S,I,c]),H(()=>{let e=c.current;if(!N||!te||!I||!e||S&&!C||s.state.transitionStatus===`ending`)return;if(!S){R.current=!0,z.request(g),e.style.removeProperty(`--transform-origin`);return}let t=Yp(e);e.style.removeProperty(`--transform-origin`);try{let t=p.current;t?.isConnected||(t=!hp.hasSelectedValue(s.state)&&f.current?.isConnected?f.current:null);let n=d.current,r=getComputedStyle(I),i=getComputedStyle(e),a=ho(te),o=tn(I),c=Gp(te),l=qp(te.getBoundingClientRect(),c),u=qp(I.getBoundingClientRect(),c),m=l.height,h=L||e,_=h.scrollHeight,b=parseFloat(i.borderBottomWidth),x=parseFloat(r.marginTop)||10,S=parseFloat(r.marginBottom)||10,C=parseFloat(r.minHeight)||100,T=Up(i),E=a.documentElement.clientHeight-x-S,D=a.documentElement.clientWidth,O=E-l.bottom+m,A,j=k===`rtl`?l.right-u.width:l.left,M=0;if(t&&n){let e=qp(n.getBoundingClientRect(),c);A=qp(t.getBoundingClientRect(),c),j=u.left+(k===`rtl`?e.right-A.right:e.left-A.left);let r=e.top-l.top+e.height/2;M=A.top-u.top+A.height/2-r}let N=O+M+S+b,P=Math.min(E,N),ee=E-x-S,F=N-P,z=D-5;I.style.left=`${Rd(j,5,z-u.width)}px`,I.style.height=`${P}px`,I.style.maxHeight=`auto`,I.style.marginTop=`${x}px`,I.style.marginBottom=`${S}px`,e.style.height=`100%`;let ie=Wp(h),ae=F>=ie-gp;ae&&(P=Math.min(E,u.height)-(F-ie));let oe=l.top<20||l.bottom>E-20||Math.ceil(P)+gp<Math.min(_,C),se=(o.visualViewport?.scale??1)!==1&&Gi;if(oe||se){R.current=!0,Mp(I,re.current),w(!1);return}let ce=Math.max(C,P);if(ae){let e=Math.max(0,E-N);I.style.top=u.height>=ee?`0`:`${e}px`,I.style.height=`${P}px`,h.scrollTop=Wp(h)}else I.style.bottom=`0`,h.scrollTop=F;if(A){let t=u.top,n=u.height,r=A.top+A.height/2,i=Rd(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(ce===E||P>=T)&&(ne.current=!0),g(),y&&s.state.selectedIndex===null&&s.state.activeIndex===null&&v.current[0]!=null&&s.set(`activeIndex`,0),R.current=!0}finally{t()}},[s,N,I,te,d,f,p,c,g,S,w,z,T,E,L,v,y,k,C]),V.useEffect(()=>{if(!S||!I||!N)return;let e=tn(I);function t(e){u(!1,Ga(Wa,e))}return Ja(e,`resize`,t)},[u,S,I,N]);let oe={...L?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":h||void 0,id:`${M}-list`},onKeyDown(e){m.current=!0,D&&Rf.has(e.key)&&e.stopPropagation()},onMouseMove(){m.current=!1},onScroll(e){L||ie(e.currentTarget)},...S&&{style:L?{height:`100%`}:Np}},se=Ks(`div`,e,{ref:[t,c],state:ae,stateAttributesMapping:Vp,props:[ee,oe,Uu(F),{className:!L&&S?Lp.className:void 0},o]});return(0,B.jsxs)(V.Fragment,{children:[!j&&Lp.getElement(A),(0,B.jsx)(jc,{context:O,modal:!1,disabled:!P,returnFocus:a,restoreFocus:!0,children:se})]})});function Up(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function Wp(e){return _p(e.scrollHeight,e.clientHeight)}function Gp(e){return zr.getScale(e)}function Kp(e,t,n){return e/n[t]}function qp(e,t){return Qn({x:Kp(e.x,`x`,t),y:Kp(e.y,`y`,t),width:Kp(e.width,`x`,t),height:Kp(e.height,`y`,t)})}var Jp=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Yp(e){let{style:t}=e,n={};for(let[e,r]of Jp)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Jp){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Xp=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=pp(),{alignItemWithTriggerActive:c}=jp(),l=Jc(o,hp.hasScrollArrows),u=Jc(o,hp.openMethod),d=Jc(o,hp.multiple),f={id:`${Jc(o,hp.id)}-list`,role:`listbox`,"aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:Np},className:l&&u!==`touch`?Lp.className:void 0};return Ks(`div`,e,{ref:[t,so(e=>{o.set(`listElement`,e)})],props:[f,a]})}),Zp=V.createContext(void 0);function Qp(){let e=V.useContext(Zp);if(!e)throw Error(Ni(57));return e}var $p=V.memo(V.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=V.useRef(null),d=Tf({label:o,textRef:u,indexGuessBehavior:wf.GuessFromOrder}),{store:f,itemProps:p,setOpen:m,setValue:h,selectionRef:g,typingRef:_,valuesRef:v,multiple:y,selectedItemTextRef:b}=pp(),x=Jc(f,hp.isActive,d.index),S=Jc(f,hp.isSelected,d.index,a),C=Jc(f,hp.isSelectedByFocus,d.index),w=Jc(f,hp.isItemEqualToValue),T=d.index,E=T!==-1,D=V.useRef(null);H(()=>{if(!E)return;let e=v.current;return e[T]=a,()=>{delete e[T]}},[E,T,a,v]),H(()=>{if(!E)return;let e=f.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&Vd(a,t,w)&&(f.set(`selectedIndex`,T),u.current&&(b.current=u.current))},[E,T,y,w,f,a,b]);let O=V.useRef(null),k=V.useRef(`mouse`),A=V.useRef(!1),{getButtonProps:j,buttonRef:M}=Nd({disabled:s,focusableWhenDisabled:!0,native:c,composite:!0}),N={disabled:s,selected:S,highlighted:x};function P(e){let t=f.state.value;if(y){let n=Array.isArray(t)?t:[];h(S?Wd(n,a,w):[...n,a],Ga(Ia,e))}else h(a,Ga(Ia,e)),m(!1,Ga(Ia,e))}function ee(){g.current.dragY=0}let F={role:`option`,"aria-selected":S,tabIndex:x?0:-1,onKeyDown(e){O.current=e.key,f.set(`activeIndex`,T),e.key===` `&&_.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&k.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&na(e.nativeEvent)&&(n!==void 0||x),i=t&&!r&&!A.current;A.current=!1,!(e.type===`keydown`&&O.current===null)&&(s||e.type===`keydown`&&O.current===` `&&_.current||i||(O.current=null,P(e.nativeEvent)))},onPointerEnter(e){k.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){k.current=e.pointerType,A.current=!0,ee()},onMouseUp(){if(ee(),s||k.current===`touch`||A.current)return;let e=!g.current.allowSelectedMouseUp&&S,t=!g.current.allowUnselectedMouseUp&&!S;e||t||(A.current=!0,D.current?.click(),A.current=!1)}},te=Ks(`div`,e,{ref:[M,t,d.ref,D],state:N,props:[p,F,l,j]}),I=V.useMemo(()=>({selected:S,index:T,textRef:u,selectedByFocus:C,hasRegistered:E}),[S,T,u,C,E]);return(0,B.jsx)(Zp.Provider,{value:I,children:te})})),em=V.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=Qp();return n||r?(0,B.jsx)(tm,{...e,ref:t}):null}),tm=V.memo(V.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=Qp(),c=V.useRef(null),{transitionStatus:l,setMounted:u}=rl(s),d=Ks(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:sl});return ll({open:s,ref:c,onComplete(){s||u(!1)}}),d})),nm=V.memo(V.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i,hasRegistered:a}=Qp(),{firstItemTextRef:o,selectedItemTextRef:s}=pp(),{render:c,className:l,style:u,...d}=e;return Ks(`div`,e,{ref:[V.useCallback(e=>{e&&(a&&n===0&&(o.current=e),a&&i&&(s.current=e))},[o,s,n,i,a]),t,r],props:d})}));({...gu,...sl});var rm=V.createContext(void 0);function im(){let e=V.useContext(rm);if(e===void 0)throw Error(Ni(56));return e}var am=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=V.useState(),c=V.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=Ks(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,B.jsx)(rm.Provider,{value:c,children:l})}),om=V.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=im(),c=_u(a);return H(()=>{s(c)},[c,s]),Ks(`div`,e,{ref:t,props:[{id:c},o]})});({...rd});var sm=(function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e})({}),cm={tabActivationDirection:e=>({[sm.activationDirection]:e})};({...cm}),(function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=il.startingStyle]=`startingStyle`,e[e.endingStyle=il.endingStyle]=`endingStyle`,e})({}),{...cm,...sl},{...Dl},U(e=>e.disabled),U(e=>e.instantType),U(e=>e.openMethod),U(e=>e.openChangeReason),U(e=>e.modal),U(e=>e.focusManagerModal),U(e=>e.stickIfOpen),U(e=>e.titleElementId),U(e=>e.descriptionElementId),U(e=>e.openOnHover),U(e=>e.closeDelay),U(e=>e.hasViewport),{...gu,...sl},{...gu,...sl},{...sl,...rd},{...up},{...sl},{...sl},{...gu,...sl};var lm=`data-drawer-content`;(function(e){return e[e.open=su.open]=`open`,e[e.closed=su.closed]=`closed`,e[e.startingStyle=su.startingStyle]=`startingStyle`,e[e.endingStyle=su.endingStyle]=`endingStyle`,e.expanded=`data-expanded`,e.nestedDrawerOpen=`data-nested-drawer-open`,e.nestedDrawerSwiping=`data-nested-drawer-swiping`,e.swipeDismiss=`data-swipe-dismiss`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e})({}),{...gu,...sl};var um=(function(e){return e[e.open=su.open]=`open`,e[e.closed=su.closed]=`closed`,e.disabled=`data-disabled`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e})({});um.open,um.closed,um.swiping,um.disabled,`${lm}`,{...gu,...sl},yl(),yl(),{...gu,...sl},{...gu,...sl};var dm={inputValue:()=>null,value:()=>null,...rd},fm=[`零`,`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],pm=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],mm=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`],hm=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],gm=[`%`,`٪`,`%`,`﹪`],_m=[`‰`,`؉`],vm=[`−`,`-`,`‒`,`–`,`—`,`﹣`],ym=[`+`,`﹢`];RegExp(`[${pm.join(``)}]`,`g`),RegExp(`[${mm.join(``)}]`,`g`),RegExp(`[${hm.join(``)}]`,`g`),RegExp(`[${fm.join(``)}]`,`g`),RegExp(`[${gm.join(``)}]`),RegExp(`[${_m.join(``)}]`),RegExp(`[${hm.join(``)}]`),[...ym],[...vm];var bm=e=>e.replace(/[-\\\]^]/g,e=>`\\${e}`),xm=e=>`[${e.map(bm).join(``)}]`,Sm=xm([`-`].concat(vm)),Cm=xm([`+`].concat(ym));new RegExp(Sm,`gu`),new RegExp(Cm,`gu`),new RegExp(Sm),new RegExp(Cm),{...rd,...dm},{...rd},{...rd};var wm=V.createContext(void 0);function Tm(e){let t=V.useContext(wm);if(t===void 0&&!e)throw Error(Ni(50));return t}var Em=600,Dm=300,Om={...Dl,instantType:U(e=>e.instantType),hasViewport:U(e=>e.hasViewport)},km=class e extends $c{constructor(e,t,n=!1){let r=new vl,i={...Am(),...e};i.floatingRootContext=xl(r,t,n),super(i,{popupRef:V.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r,closeDelayRef:{current:Dm},inlineRectCoordsRef:{current:void 0}},Om)}setOpen=(e,t)=>{let n=t.reason,r=n===Na,i=e&&n===Pa,a=!e&&(n===Ma||n===Ra);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let o=t.event;e&&r&&t.trigger&&`clientX`in o&&`clientY`in o&&this.context.inlineRectCoordsRef.current?.element!==t.trigger&&Kc(this.context.inlineRectCoordsRef,t.trigger,o.clientX,o.clientY),this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let r={open:e};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===Na&&(r.instantType=void 0),pl(r,e,t.trigger),this.update(r)};r?Qt.flushSync(s):s()};static useStore(t,n){return dl(t,(t,r)=>new e(n,t,r)).store}};function Am(){return{...bl(),instantType:void 0,hasViewport:!1}}function jm(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=km.useStore(o?.store,{open:n,openProp:t,activeTriggerId:c,triggerIdProp:s});ji(()=>{t===void 0&&u.state.open===!1&&n===!0&&u.update({open:!0,activeTriggerId:c})}),u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),p=u.useState(`mounted`),m=u.useState(`payload`);hl(u);let{forceUnmount:h}=gl(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});H(()=>{d&&f==null&&u.set(`payload`,void 0)},[u,f,d]);let g=V.useCallback(()=>{u.setOpen(!1,Ga(Ua))},[u]);V.useImperativeHandle(a,()=>({unmount:h,close:g}),[h,g]);let _=d||p;return(0,B.jsxs)(wm.Provider,{value:u,children:[_&&(0,B.jsx)(Mm,{store:u}),typeof l==`function`?l({payload:m}):l]})}function Mm({store:e}){let t=zc(e.useState(`floatingRootContext`));return _l(e,{activeTriggerProps:t.reference??Aa,inactiveTriggerProps:t.trigger??Aa,popupProps:V.useMemo(()=>Ms(ul,t.floating),[t.floating])}),null}Oi(function(e){return Tm(!0)?(0,B.jsx)(jm,{...e}):(0,B.jsx)(xc,{children:(0,B.jsx)(jm,{...e})})}),ki(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...u}=e,d=Tm(!0),f=c?.store??d;if(!f)throw Error(Ni(89));let p=_u(o),m=f.useState(`isTriggerActive`,p),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`floatingRootContext`),_=f.context.inlineRectCoordsRef,v=V.useRef(null),y=i??Em,b=a??Dm,{registerTrigger:x,isMountedByThisTrigger:S}=ml(p,v,f,{payload:s});H(()=>{S&&(f.context.closeDelayRef.current=b)},[f,S,b]);let C=zl(g,{mouseOnly:!0,move:!1,handleClose:tu(),delay:()=>({open:y,close:b}),triggerElementRef:v,isActiveTrigger:m,isClosing:()=>f.select(`transitionStatus`)===`ending`}),w=jl(g,{delay:y}),T={open:h},E=f.useState(`triggerProps`,S),D=Gc(_,h);return Ks(`a`,e,{state:T,ref:[t,x,v],props:[C,w.reference,E,D,{id:p},u],stateAttributesMapping:mu})}),{...gu,...sl},{...gu,...sl},{...rd},[...Rf];function Nm({content:e,children:t,align:n,asChild:r,render:i,side:a,className:o,container:s,closeDelay:c,delay:l,...u}){let d=Zt(),f=s??d??void 0,p=i??(r?t:void 0);return(0,B.jsxs)(au,{...u,children:[(0,B.jsx)(Tu,{closeDelay:c,delay:l,className:it(p===void 0&&`inline-flex items-center bg-transparent border-none shadow-none p-0 m-0 h-auto min-h-0 leading-[0]`,`cursor-default`,o),render:p,children:r?void 0:t}),(0,B.jsx)(ku,{container:f,children:(0,B.jsx)(Gu,{align:n,side:a,sideOffset:10,className:`max-w-[var(--available-width)]`,children:(0,B.jsxs)(qu,{className:it(`flex origin-[var(--transform-origin)] flex-col rounded-md bg-kumo-base px-2.5 py-1.5 text-sm text-kumo-default`,`shadow-lg shadow-kumo-tip-shadow outline outline-kumo-fill`,`transition-[transform,scale,opacity] duration-150`,`data-[starting-style]:scale-90 data-[starting-style]:opacity-0`,`data-[ending-style]:scale-90 data-[ending-style]:opacity-0`,`data-[instant]:duration-0`,`kumo-tooltip-popup`),children:[(0,B.jsx)(Ju,{className:it(`flex`,`data-[side=bottom]:top-[-8px]`,`data-[side=left]:right-[-13px] data-[side=left]:rotate-90`,`data-[side=right]:left-[-13px] data-[side=right]:-rotate-90`,`data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`),children:(0,B.jsx)(Pm,{})}),e]})})})]})}function Pm(e){return(0,B.jsxs)(`svg`,{width:`20`,height:`10`,viewBox:`0 0 20 10`,fill:`none`,...e,children:[(0,B.jsx)(`path`,{d:`M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z`,className:`fill-kumo-base`}),(0,B.jsx)(`path`,{d:`M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z`,className:`fill-kumo-tip-shadow`}),(0,B.jsx)(`path`,{d:`M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z`,className:`fill-kumo-tip-stroke`})]})}var Fm=(0,V.forwardRef)(function({to:e,href:t,...n},r){return(0,B.jsx)(`a`,{ref:r,href:t??e??void 0,...n})}),Im=(0,V.createContext)(Fm);function Lm(){return(0,V.useContext)(Im)}function Rm({component:e,children:t}){return(0,B.jsx)(Im.Provider,{value:e??Fm,children:t})}var zm={shape:{base:{classes:``,description:`Default rectangular button shape`},square:{classes:`items-center justify-center p-0`,description:`Square button for icon-only actions`},circle:{classes:`items-center justify-center p-0 rounded-full`,description:`Circular button for icon-only actions`}},size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small button for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small button for secondary actions`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default button size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large button for primary CTAs`}},compactSize:{xs:{classes:`size-3.5`},sm:{classes:`size-6.5`},base:{classes:`size-9`},lg:{classes:`size-10`}},variant:{primary:{classes:`relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) disabled:opacity-50`,description:`High-emphasis button for primary actions`},secondary:{classes:`bg-kumo-base !text-kumo-default ring not-disabled:hover:bg-kumo-tint disabled:bg-kumo-base/50 disabled:!text-kumo-default/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Default button style for most actions`},ghost:{classes:`text-kumo-default hover:bg-kumo-tint shadow-none bg-inherit`,description:`Minimal button with no background`},destructive:{classes:`relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) disabled:opacity-50`,description:`Danger button for destructive actions like delete`},"secondary-destructive":{classes:`bg-kumo-base !text-kumo-danger ring not-disabled:hover:!text-kumo-danger not-disabled:hover:ring-kumo-danger/30 disabled:bg-kumo-base/50 disabled:!text-kumo-danger/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Secondary button with destructive text for less prominent dangerous actions`},outline:{classes:`bg-transparent text-kumo-default ring ring-kumo-line transition-colors not-disabled:hover:text-kumo-strong not-disabled:hover:ring-kumo-focus/25`,description:`Bordered button with transparent background`}}},Bm={shape:`base`,size:`base`,variant:`secondary`};function Vm({variant:e=Bm.variant,size:t=Bm.size,shape:n=Bm.shape}={}){let r=n===`square`||n===`circle`;return it(`group flex w-max shrink-0 items-center font-medium select-none`,`border-0 shadow-xs`,`focus:outline-none focus:ring-kumo-focus/50 focus-visible:ring-2 focus-visible:ring-kumo-brand`,`cursor-pointer`,`disabled:cursor-not-allowed disabled:text-kumo-subtle`,at(zm.size,t,Bm.size).classes,at(zm.shape,n,Bm.shape).classes,r&&at(zm.compactSize,t,Bm.size).classes,at(zm.variant,e,Bm.variant).classes)}var Hm=e=>e?V.isValidElement(e)?e:(0,B.jsx)(e,{}):null,Um=e=>{if(e===`primary`)return`var(--color-kumo-brand)`;if(e===`destructive`)return`var(--color-kumo-danger)`},Wm=e=>{let t=Um(e);if(t)return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${t}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${t}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${t}, white 15%)`,"--kumo-button-emphasis-gradient-end":t}},Gm=(e,t,n)=>{let r=n==null?null:(0,B.jsx)(`span`,{className:`contents`,children:n});return Um(e)?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-0 rounded-[inherit] bg-linear-to-b from-(--kumo-button-emphasis-gradient-start) to-(--kumo-button-emphasis-gradient-end) translate-y-px group-hover:from-(--kumo-button-emphasis-bg)`}),(0,B.jsxs)(`span`,{className:`relative flex items-center gap-1.5`,children:[t,r]})]}):(0,B.jsxs)(B.Fragment,{children:[t,r]})},Km=V.forwardRef(({children:e,className:t,disabled:n,loading:r,shape:i=`base`,size:a=`base`,variant:o=`secondary`,icon:s,style:c,title:l,...u},d)=>{let{type:f,...p}=u,m=Wm(o),h=r?(0,B.jsx)(Yt,{size:a===`lg`?16:14}):Hm(s),g=(0,B.jsx)(`button`,{ref:d,"data-kumo-component":`Button`,className:it(Vm({variant:o,size:a,shape:i}),n&&`cursor-not-allowed opacity-50`,t),disabled:r||n,style:m?{...m,...c}:c,type:f??`button`,...p,children:Gm(o,h,e)});return l?(0,B.jsx)(Nm,{content:l,render:g}):g});Km.displayName=`Button`;var qm=V.forwardRef(({children:e,className:t,external:n,href:r,shape:i=`base`,size:a=`base`,variant:o=`ghost`,icon:s,style:c,...l},u)=>{let d=Lm(),f=Wm(o),p=n?{target:`_blank`,rel:`noopener noreferrer`}:{};return(0,B.jsx)(d,{ref:u,"data-kumo-component":`LinkButton`,className:it(Vm({variant:o,size:a,shape:i}),`flex items-center no-underline!`,t),href:r,style:f?{...f,...c}:c,to:typeof r==`string`?r:void 0,...p,...l,children:Gm(o,Hm(s),e)})});qm.displayName=`LinkButton`;function Jm(e={}){return it(`m-0 text-base font-medium text-kumo-default`)}function Ym(){return it(`inline-flex items-center gap-1`)}function Xm({children:e,showOptional:t=!1,tooltip:n,className:r,htmlFor:i,asContent:a=!1}){let o=(0,B.jsxs)(B.Fragment,{children:[e,t&&(0,B.jsx)(`span`,{className:`font-normal text-kumo-subtle`,children:`(optional)`}),n&&(0,B.jsx)(Nm,{content:n,render:(0,B.jsx)(Km,{variant:`ghost`,size:`xs`,shape:`square`,"aria-label":`More information`,children:(0,B.jsx)(Nt,{className:`size-4`})})})]});return a?(0,B.jsx)(`span`,{className:it(Ym(),r),children:o}):(0,B.jsx)(`label`,{htmlFor:i,className:it(Jm(),Ym(),r),children:o})}Xm.displayName=`Label`;function Zm(e){if(e)return typeof e==`string`?{message:e,match:!0}:e}function Qm({controlFirst:e=!1}={}){return it(`grid gap-2`,`has-[input[type=checkbox]]:grid-cols-[auto_1fr] has-[input[type=checkbox]]:items-center`,`has-[[role=switch]]:grid-cols-[auto_1fr] has-[[role=switch]]:items-center`,e&&[`has-[input[type=checkbox]]:flex has-[input[type=checkbox]]:flex-row-reverse has-[input[type=checkbox]]:flex-wrap has-[input[type=checkbox]]:items-center`,`has-[[role=switch]]:flex has-[[role=switch]]:flex-row-reverse has-[[role=switch]]:flex-wrap has-[[role=switch]]:items-center`,`[&>label]:flex-1`])}function $m({children:e,label:t,required:n,labelTooltip:r,error:i,description:a,controlFirst:o=!1,hideLabel:s=!1}){let c=n===!1;return(0,B.jsxs)(Sd,{className:Qm({controlFirst:o}),children:[!s&&(0,B.jsx)(Cd,{className:`m-0 select-none text-base font-medium text-kumo-default`,children:(0,B.jsx)(Xm,{showOptional:c,tooltip:r,asContent:!0,children:t})}),e,i?(0,B.jsx)(Td,{className:it(`text-sm leading-snug text-kumo-danger`,`col-span-full`),match:i.match,children:i.message}):a&&(0,B.jsx)(Ed,{className:it(`text-sm leading-snug text-kumo-subtle`,`col-span-full`),children:a})]})}var eh={size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small input for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small input for secondary fields`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default input size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large input for prominent fields`}},variant:{default:{classes:`focus:ring-kumo-focus/50 focus:ring-[1.5px]`,description:`Default input appearance`},error:{classes:`!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]`,description:`Error state for validation failures`}}},th={size:`base`,variant:`default`};function nh({variant:e=th.variant,size:t=th.size,parentFocusIndicator:n=!1,focusIndicator:r=!1}={}){return it(`border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-none`,`kumo-input-placeholder disabled:text-kumo-disabled`,at(eh.size,t,th.size).classes,at(eh.variant,e,th.variant).classes,n&&(e===`error`?`focus-within:ring-kumo-danger/50 focus-within:ring-[1.5px]`:`focus-within:ring-kumo-focus/50 focus-within:ring-[1.5px]`),r&&(e===`error`?`focus:ring-kumo-danger/50 focus:ring-[1.5px]`:`focus:ring-kumo-focus/50 focus:ring-[1.5px]`))}var rh=(0,V.forwardRef)((e,t)=>{let{className:n,size:r=`base`,variant:i,label:a,labelTooltip:o,description:s,error:c,passwordManagerIgnore:l=!1,...u}=e,d=i??(c?`error`:`default`),{required:f}=u,p=(0,B.jsx)(zd,{ref:t,className:it(nh({size:r,variant:d,focusIndicator:!0}),l&&`keeper-ignore`,n),...l?{"data-1p-ignore":`true`,"data-bwignore":`true`,"data-form-type":`other`,"data-lpignore":`true`}:{},...u});return a||c||s?(0,B.jsx)($m,{label:a,required:f,labelTooltip:o,description:s,error:Zm(c),children:p}):p});rh.displayName=`Input`;var ih=V.forwardRef((e,t)=>{let{className:n,onValueChange:r,size:i=`base`,variant:a,onChange:o,label:s,labelTooltip:c,description:l,error:u,...d}=e,f=a??(u?`error`:`default`),{required:p}=d,m=(0,V.useCallback)(e=>{o?.(e),r?.(e.target.value)},[o,r]),h=it(nh({size:i,variant:f,focusIndicator:!0}),`h-auto py-2`,n);return s||u||l?(0,B.jsx)($m,{label:s,required:p,labelTooltip:c,description:l,error:Zm(u),children:(0,B.jsx)(kd,{render:e=>(0,B.jsx)(`textarea`,{...e,ref:t,className:h,onChange:m,...d})})}):(0,B.jsx)(`textarea`,{ref:t,className:h,onChange:m,...d})});ih.displayName=`InputArea`;var ah=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),oh=(e,t)=>(Math.random()*(t-e)+e).toFixed(2),sh=({minWidth:e=30,maxWidth:t=100,minDuration:n=1.3,maxDuration:r=1.7,minDelay:i=0,maxDelay:a=.5,blockHeight:o,className:s})=>{let{width:c,duration:l,delay:u}=(0,V.useMemo)(()=>({width:ah(e,t),duration:oh(n,r),delay:oh(i,a)}),[e,t,n,r,i,a]),d={"--skeleton-width":`${c}%`,"--shimmer-duration":`${l}s`,"--shimmer-delay":`${u}s`},f=(0,B.jsx)(`div`,{className:it(`skeleton-line`,s),style:d});return o===void 0?f:(0,B.jsx)(`div`,{className:`flex items-center`,style:{height:typeof o==`number`?`${o}px`:o},children:f})};eh.size;var ch={size:`base`};function lh({size:e=ch.size}={}){return it(Vm({size:e}),`justify-between font-normal`,`focus:opacity-100 focus:ring-kumo-focus/50 focus-visible:ring-inset *:in-focus:opacity-100`)}var uh={xs:{iconSize:12,className:`text-kumo-subtle`},sm:{iconSize:14,className:`text-kumo-subtle`},base:{iconSize:16,className:`text-kumo-subtle`},lg:{iconSize:18,className:`text-kumo-subtle`}};function dh(e){if(typeof e!=`object`||!e||Array.isArray(e)||`$$typeof`in e||e instanceof Promise)return!1;let t=e;return`label`in t&&t.label!==void 0}function fh(e){return Array.isArray(e)?e:Object.entries(e).map(([e,t])=>({value:e,label:dh(t)?t.label:t}))}function ph(e){let t=fh(e),n=new Map;if(!Array.isArray(e))for(let[t,r]of Object.entries(e))dh(r)&&n.set(t,{disabled:r.disabled});return t.filter(e=>e.value!==null).map((e,t)=>{let r=typeof e.value==`string`?e.value:`option-${t}`,i=typeof e.value==`string`?n.get(e.value):void 0;return(0,B.jsx)(hh,{value:e.value,disabled:i?.disabled,children:e.label},r)})}function mh({children:e,className:t,renderValue:n,label:r,hideLabel:i,placeholder:a,loading:o,size:s=ch.size,labelTooltip:c,description:l,error:u,required:d,container:f,...p}){let m=(0,V.useId)(),h=Zt(),g=f??h??void 0,_=p,v=_[`aria-label`],y=_[`aria-labelledby`],b=typeof r==`string`?r:a,x=r&&i!==!0,S=x?void 0:y??(r?m:void 0),C=v??(S?void 0:b),w=p.items?fh(p.items):void 0,T=e||(p.items?ph(p.items):null),E=n?e=>{let t=a==null?null:(0,B.jsx)(`span`,{className:`text-kumo-placeholder`,children:a});return e==null||e===``?t:n(e)??t}:void 0,{items:D,...O}=p,k=r?(0,B.jsx)(bp,{className:`m-0 select-none text-base font-medium text-kumo-default`,children:(0,B.jsx)(Xm,{showOptional:d===!1,tooltip:i?void 0:c,asContent:!0,children:r})}):null,A=(0,B.jsxs)(yp,{...O,items:w,disabled:o||p.disabled,children:[k,(0,B.jsxs)(wp,{"data-kumo-component":`Select`,"data-kumo-part":`trigger`,className:it(lh({size:s}),p.disabled&&`cursor-not-allowed opacity-50`,u&&`!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]`,t),"aria-label":C,"aria-labelledby":S,children:[o?(0,B.jsx)(sh,{className:`w-32`}):(0,B.jsx)(Ep,{placeholder:a,className:`min-w-0 truncate data-[placeholder]:text-kumo-placeholder`,children:E}),(0,B.jsx)(Dp,{className:it(`flex shrink-0 items-center`,uh[s].className),children:(0,B.jsx)(gt,{size:uh[s].iconSize,className:`fill-current`})})]}),(0,B.jsx)(kp,{container:g,children:(0,B.jsx)(Fp,{children:(0,B.jsx)(Hp,{className:it(`flex flex-col`,`max-h-[var(--available-height)] bg-kumo-base text-kumo-default`,`rounded-lg shadow-lg ring ring-kumo-line`,`min-w-[calc(var(--anchor-width)+3px)] py-1.5`),children:(0,B.jsx)(Xp,{className:it(`min-h-0 flex-1 overflow-y-auto overscroll-none scroll-pt-2 scroll-pb-2`),children:T})})})})]});if(x)return(0,B.jsx)($m,{label:r,required:d,labelTooltip:c,description:l,error:u?typeof u==`string`?{message:u,match:!0}:u:void 0,hideLabel:!0,children:A});let j=u?typeof u==`string`?{message:u}:u:void 0;return(0,B.jsxs)(`div`,{className:`grid gap-2`,children:[r&&(0,B.jsx)(`span`,{id:m,className:`sr-only`,children:r}),A,j?(0,B.jsx)(`span`,{className:`text-sm text-kumo-danger`,children:j.message}):l&&(0,B.jsx)(`span`,{className:`text-sm leading-snug text-kumo-subtle`,children:l})]})}function hh({children:e,value:t,disabled:n,className:r}){return(0,B.jsxs)($p,{"data-kumo-component":`Select`,"data-kumo-part":`option`,value:t,disabled:n,className:it(`group mx-1.5 flex cursor-pointer items-center justify-between gap-2 rounded px-2 py-1.5 text-base outline-none`,`focus-visible:z-50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset`,`data-highlighted:bg-kumo-tint`,`data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,r),children:[(0,B.jsx)(nm,{children:e}),(0,B.jsx)(em,{children:(0,B.jsx)(bt,{})})]})}var gh=(0,V.forwardRef)(({children:e,className:t},n)=>(0,B.jsx)(am,{ref:n,className:it(t),children:e}));gh.displayName=`Select.Group`;var _h=(0,V.forwardRef)(({children:e,className:t},n)=>(0,B.jsx)(om,{ref:n,className:it(`px-3.5 py-1.5 text-sm font-semibold text-kumo-subtle`,t),children:e}));_h.displayName=`Select.GroupLabel`;var vh=(0,V.forwardRef)(({className:e},t)=>(0,B.jsx)(Ef,{ref:t,className:it(`-mx-1 my-1 h-px bg-kumo-hairline`,e)}));vh.displayName=`Select.Separator`,mh.Option=hh,mh.Group=gh,mh.GroupLabel=_h,mh.Separator=vh,mh.Option.displayName=`Select.Option`;var yh=`overflow-hidden rounded-lg bg-kumo-base shadow-xs ring ring-kumo-line`,bh=`flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-hairline`,xh=`-my-2 flex items-center gap-2 bg-kumo-elevated p-4 text-base font-medium text-kumo-subtle`,Sh=`relative flex flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill`;function Ch(e={}){return it(yh)}function wh(e){return V.Children.toArray(e).some(e=>(0,V.isValidElement)(e)?e.type===Dh||e.type===Eh?!0:e.type===V.Fragment?wh(e.props.children):!1:!1)}var Th=(0,V.forwardRef)(function({children:e,className:t,render:n,...r},i){return Vf({defaultTagName:`div`,render:n,ref:i,props:Ms({className:it(wh(e)?bh:Ch(),t)},r,{children:e})})});function Eh({children:e,className:t,...n}){return(0,B.jsx)(`div`,{className:it(xh,t),...n,children:e})}function Dh({children:e,className:t,...n}){return(0,B.jsx)(`div`,{className:it(Sh,t),...n,children:e})}Th.displayName=`LayerCard`,Eh.displayName=`LayerCard.Secondary`,Dh.displayName=`LayerCard.Primary`;var Oh=Object.assign(Th,{Primary:Dh,Secondary:Eh}),kh=function({color:e=`primary`,className:t,render:n,as:r,...i}){let a=n??(r?(0,V.createElement)(r):void 0);return(0,B.jsx)(Oh,{className:it(`overflow-visible rounded-none`,t),render:a,...i,"data-surface-color":e,"data-deprecated":`surface`})};kh.displayName=`Surface`;var Ah={variant:{heading1:{classes:`text-3xl font-semibold`,description:`Large heading for page titles`},heading2:{classes:`text-2xl font-semibold`,description:`Medium heading for section titles`},heading3:{classes:`text-lg font-semibold`,description:`Small heading for subsections`},body:{classes:`text-kumo-default`,description:`Default body text`},secondary:{classes:`text-kumo-subtle`,description:`Muted text for secondary information`},success:{classes:`text-kumo-link`,description:`Success state text`},error:{classes:`text-kumo-danger`,description:`Error state text`},mono:{classes:`font-mono`,description:`Monospace text for code`},"mono-secondary":{classes:`font-mono text-kumo-subtle`,description:`Muted monospace text`}},size:{xs:{classes:`text-xs`,description:`Extra small text`},sm:{classes:`text-sm`,description:`Small text`},base:{classes:`text-base`,description:`Default text size`},lg:{classes:`text-lg`,description:`Large text`}}},jh={variant:`body`,size:`base`};function Mh({variant:e=`body`,bold:t=!1,size:n=`base`,truncate:r=!1,children:i,DANGEROUS_className:a,DANGEROUS_style:o,as:s,...c},l){let u=[`body`,`secondary`,`success`,`error`].includes(e),d=[`mono`,`mono-secondary`].includes(e);return(0,B.jsx)((0,V.useMemo)(()=>s||([`mono`,`mono-secondary`].includes(e)||[`heading1`,`heading2`,`heading3`].includes(e)?`span`:`p`),[e,s]),{ref:l,className:it(`text-kumo-default`,at(Ah.variant,e,jh.variant).classes,u?at(Ah.size,n,jh.size).classes:``,u&&t?`font-medium`:``,d&&(n===`lg`?Ah.size.base.classes:Ah.size.sm.classes),r&&`truncate min-w-0`,a),style:o,...c,children:i})}var Nh=(0,V.forwardRef)(Mh),Ph={size:`base`,variant:`default`},Fh=(0,V.forwardRef)(({value:e,defaultValue:t=``,onChange:n,onValueChange:r,onCopy:i,size:a=Ph.size,variant:o,disabled:s=!1,readOnly:c=!1,id:l,autoComplete:u=`off`,className:d,label:f,labelTooltip:p,description:m,error:h,required:g,..._},v)=>{let y=o??(h?`error`:`default`),b=typeof f==`string`?f:`Sensitive value`,x=e!==void 0,[S,C]=(0,V.useState)(t),w=x?e:S,T=w.length>0,[E,D]=(0,V.useState)(()=>T?`masked`:`empty`),[O,k]=(0,V.useState)(!1),A=(0,V.useRef)(null),j=(0,V.useRef)(null),M=(0,V.useId)(),N=(0,V.useId)(),P=l??N,ee=(0,V.useId)(),F=(0,V.useCallback)(e=>{A.current=e,typeof v==`function`?v(e):v&&(v.current=e)},[v]);(0,V.useEffect)(()=>{if(O){let e=setTimeout(()=>k(!1),2e3);return()=>clearTimeout(e)}},[O]);let te=(0,V.useCallback)(async e=>{e.stopPropagation();try{if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`){await navigator.clipboard.writeText(w),k(!0),i?.();return}}catch{}if(typeof document<`u`){let e=document.createElement(`textarea`);e.value=w,e.setAttribute(`readonly`,``),e.style.position=`absolute`,e.style.left=`-9999px`,document.body.appendChild(e);let t=document.getSelection(),n=t?.rangeCount?t.getRangeAt(0):null;e.select();try{document.execCommand(`copy`),k(!0),i?.()}catch(e){console.warn(`Clipboard copy failed`,e)}finally{document.body.removeChild(e),n&&(t?.removeAllRanges(),t?.addRange(n))}}},[w,i]),I=(0,V.useRef)(T);I.current!==T&&(I.current=T,!T&&E===`masked`&&D(`empty`));let L=(0,V.useCallback)(e=>{if(!s){if(j.current){let t=j.current.getBoundingClientRect();if(!(e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom))return}E===`masked`&&T&&(D(`revealed`),c||setTimeout(()=>A.current?.focus(),0))}},[E,T,s,c]),ne=(0,V.useCallback)(e=>{e.stopPropagation(),E===`revealed`?D(`masked`):E===`empty`&&T&&D(`revealed`)},[E,T]),R=(0,V.useCallback)(e=>{let t=e.target.value;x||C(t),E===`empty`&&t.length>0&&D(`revealed`),n?.(e),r?.(t)},[x,n,r,E]),re=(0,V.useCallback)(e=>{j.current&&e.relatedTarget instanceof Node&&j.current.contains(e.relatedTarget)||T&&D(`masked`)},[T]),z=(0,V.useCallback)(e=>{s||E===`masked`&&T&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),D(`revealed`),c||setTimeout(()=>A.current?.focus(),0))},[E,T,s,c]),ie=(0,V.useCallback)(e=>{E===`revealed`&&e.key===`Escape`&&(D(`masked`),setTimeout(()=>j.current?.focus(),0))},[E]),ae=E===`masked`&&T,oe=!s&&(E===`revealed`||E===`empty`&&T),se=a===`xs`||a===`sm`?`size-3`:`size-4`,ce=it(nh({size:a,variant:y,parentFocusIndicator:!0}),`group/container relative flex w-full items-center`,`focus-within:outline focus-within:outline-2 focus-within:outline-kumo-focus`,ae&&!s&&`cursor-pointer`,s&&`cursor-not-allowed`,d),le=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(zd,{ref:F,id:P,type:E===`revealed`?`text`:`password`,value:w,onChange:R,onBlur:re,onKeyDown:ie,disabled:s,readOnly:c||ae,autoComplete:u,tabIndex:ae?-1:0,className:it(`w-full border-0 bg-transparent p-0 text-kumo-default ring-0 outline-none kumo-input-placeholder disabled:cursor-not-allowed disabled:text-kumo-subtle`,a===`xs`&&`pr-5`,a===`sm`&&`pr-6`,a===`base`&&`pr-8`,a===`lg`&&`pr-10`,ae&&`pointer-events-none text-transparent`),"aria-hidden":ae,..._}),(0,B.jsx)(`span`,{className:it(`pointer-events-none absolute inset-y-0 left-0 flex items-center overflow-hidden select-none`,a===`xs`&&`right-5`,a===`sm`&&`right-6`,a===`base`&&`right-8`,a===`lg`&&`right-10`,a===`xs`&&`px-1.5`,a===`sm`&&`px-2`,a===`base`&&`px-3`,a===`lg`&&`px-4`,!ae&&`invisible`,ae&&`pointer-events-auto`,`text-kumo-default`,`group/mask`),"aria-hidden":`true`,children:(0,B.jsxs)(`span`,{className:`relative`,children:[(0,B.jsx)(`span`,{className:it(ae&&!s&&`group-focus-within/container:invisible group-hover/mask:invisible`),children:`••••••••`}),ae&&!s&&(0,B.jsx)(`span`,{className:`invisible absolute left-0 top-0 whitespace-nowrap text-kumo-subtle group-focus-within/container:visible group-hover/mask:visible`,children:`Click to reveal`})]})}),(0,B.jsx)(`button`,{type:`button`,"data-kumo-component":`SensitiveInput`,"data-kumo-part":`toggle-visibility`,onClick:ne,onKeyDown:e=>e.stopPropagation(),"aria-label":E===`revealed`?`Hide value`:`Reveal value`,tabIndex:oe?0:-1,className:it(`absolute top-1/2 right-0 -translate-y-1/2 cursor-pointer text-kumo-subtle hover:text-kumo-default focus:text-kumo-default focus:ring-kumo-focus/50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:rounded-sm`,`bg-transparent border-none shadow-none p-0 m-0 h-auto min-h-0 inline-flex items-center justify-center`,a===`xs`&&`right-1.5`,a===`sm`&&`right-2`,a===`base`&&`right-3`,a===`lg`&&`right-4`,se,!oe&&`pointer-events-none opacity-0`),children:E===`revealed`?(0,B.jsx)(Ot,{className:`size-full`}):(0,B.jsx)(Tt,{className:`size-full`})}),T&&!s&&(0,B.jsx)(`button`,{type:`button`,"data-kumo-component":`SensitiveInput`,"data-kumo-part":`copy`,onClick:te,onKeyDown:e=>e.stopPropagation(),"aria-label":O?`Copied`:`Copy to clipboard`,className:it(`absolute -top-px right-2 -translate-y-full cursor-pointer rounded-t-md bg-kumo-brand px-2 py-0.5 text-xs text-white opacity-0 transition-opacity group-focus-within/container:opacity-100 group-hover/container:opacity-100 hover:brightness-120 focus:outline-none focus:ring-kumo-focus/50 focus-visible:ring-2 focus-visible:ring-kumo-brand`,`border-none shadow-none m-0 h-auto min-h-0`),children:O?`Copied`:`Copy`})]}),ue=(0,B.jsxs)(`div`,{children:[ae?(0,B.jsx)(`div`,{ref:j,role:`button`,"data-kumo-component":`SensitiveInput`,"data-kumo-part":`masked-container`,tabIndex:s?-1:0,className:ce,onClick:L,onKeyDown:z,"aria-label":`${b}, masked.`,"aria-describedby":`${ee} ${M}`,"aria-disabled":s,children:le}):(0,B.jsx)(`div`,{ref:j,className:ce,children:le}),ae&&(0,B.jsx)(`span`,{id:ee,className:`sr-only`,children:`Click or press Enter to reveal.`}),(0,B.jsxs)(`span`,{id:M,className:`sr-only`,"aria-live":`polite`,children:[E===`masked`&&T&&`Value hidden`,O&&`Copied to clipboard`]})]});return f?(0,B.jsx)($m,{label:f,required:g,labelTooltip:p,description:m,error:h?typeof h==`string`?{message:h,match:!0}:h:void 0,children:ue}):ue});Fh.displayName=`SensitiveInput`;var Ih={size:{sm:{classes:`px-6 py-8 gap-4`,description:`Compact empty state for smaller containers`},base:{classes:`px-10 py-16 gap-6`,description:`Default empty state size`},lg:{classes:`px-12 py-20 gap-8`,description:`Large empty state for prominent placement`}}},Lh={size:`base`};function Rh({size:e=Lh.size}={}){return it(`flex w-full flex-col items-center rounded-xl border border-kumo-fill bg-kumo-control text-kumo-default`,at(Ih.size,e,Lh.size).classes)}function zh({icon:e,title:t,description:n,commandLine:r,contents:i,size:a=`base`,className:o}){let[s,c]=(0,V.useState)(!1);return(0,B.jsxs)(`div`,{className:it(Rh({size:a}),o),children:[e,(0,B.jsx)(`h2`,{className:`text-2xl font-semibold`,children:t}),n&&(0,B.jsx)(`p`,{className:`max-w-140 text-center text-kumo-subtle`,children:n}),r&&(0,B.jsxs)(`div`,{className:it(`group/cmd relative inline-flex h-10 max-w-8/10 transform-gpu items-center gap-2 rounded-lg font-mono shadow-sm`,`bg-kumo-overlay pr-2 pl-3`,`transition-all duration-300 hover:border-kumo-interact/80 hover:shadow-md`,`border border-kumo-fill/60`),children:[(0,B.jsx)(`span`,{className:`text-xs text-kumo-inactive select-none`,children:`$`}),(0,B.jsx)(`span`,{className:`no-scrollbar overflow-scroll text-base whitespace-nowrap text-kumo-brand`,children:r}),(0,B.jsx)(Km,{className:`group`,size:`sm`,variant:`ghost`,shape:`square`,"aria-label":`Copy command`,onClick:async()=>{c(!0),setTimeout(()=>{c(!1)},1e3),await navigator.clipboard.writeText(r)},children:s?(0,B.jsx)(bt,{size:16,className:`animate-bounce-in text-kumo-success`}):(0,B.jsx)(St,{size:16,className:`text-kumo-inactive group-hover:text-kumo-brand`})})]}),i]})}var Bh=_(),Vh={target:{},agents:[]};async function Hh(){try{let e=await fetch(`/__studio/config.json`);if(!e.ok)return Vh;let t=await e.json();return{target:t.target??{},agents:Array.isArray(t.agents)?t.agents:[]}}catch{return Vh}}function Uh(){return typeof document>`u`?`light`:document.documentElement.getAttribute(`data-mode`)===`dark`?`dark`:`light`}function Wh(){let[e,t]=(0,V.useState)(Uh);return(0,B.jsx)(Km,{variant:`ghost`,shape:`square`,size:`sm`,"aria-label":e===`dark`?`Switch to light theme`:`Switch to dark theme`,onClick:()=>{let n=e===`dark`?`light`:`dark`;document.documentElement.setAttribute(`data-mode`,n),document.documentElement.style.colorScheme=n;try{localStorage.setItem(`theme`,n)}catch{}t(n)},icon:e===`dark`?(0,B.jsx)(Ut,{size:16}):(0,B.jsx)(Ft,{size:16})})}var Gh=`__other__`;function Kh({config:e,onConnect:t}){let n=e.agents.length>0,[r,i]=(0,V.useState)(e.target.url?`remote`:`local`),[a,o]=(0,V.useState)(e.target.host??`localhost:5173`),[s,c]=(0,V.useState)(e.target.url??`https://`),[l,u]=(0,V.useState)(e.target.token??``),[d,f]=(0,V.useState)(e.target.instance??`default`),p=(0,V.useMemo)(()=>e.target.agent?e.agents.some(t=>t.id===e.target.agent)?e.target.agent:Gh:n?e.agents[0].id:Gh,[e,n]),[m,h]=(0,V.useState)(p),[g,_]=(0,V.useState)(p===Gh?e.target.agent??``:``),v=m===Gh?g.trim():m,y=m!==Gh&&e.agents.some(e=>e.id===m),[b,x]=(0,V.useState)(null),S=()=>{if(!v){x(`Enter an agent id.`);return}if(r===`remote`&&!/^https?:\/\/.+/.test(s.trim())){x(`Enter a full remote URL (https://…).`);return}if(r===`local`&&!a.trim()){x(`Enter a host (e.g. localhost:5173).`);return}x(null),t({url:r===`remote`?s.trim():void 0,host:r===`local`?a.trim():void 0,protocol:e.target.protocol,token:l.trim()||void 0,agent:v,instance:d.trim()||`default`,routePrefix:e.target.routePrefix,canonicalAgent:y})};return(0,B.jsx)(`div`,{className:`flex h-full items-center justify-center p-6`,children:(0,B.jsxs)(kh,{className:`w-full max-w-md rounded-2xl p-6 ring ring-kumo-line`,children:[(0,B.jsxs)(`div`,{className:`mb-5 flex items-center justify-between gap-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Vt,{size:22,className:`text-kumo-accent`}),(0,B.jsx)(Nh,{size:`lg`,bold:!0,children:`Connect to a Think instance`})]}),(0,B.jsx)(Wh,{})]}),(0,B.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{e.preventDefault(),S()},children:[(0,B.jsxs)(mh,{label:`Connection`,value:r,onValueChange:e=>i(e),children:[(0,B.jsx)(mh.Option,{value:`local`,children:`Local dev server`}),(0,B.jsx)(mh.Option,{value:`remote`,children:`Remote (deployed)`})]}),r===`local`?(0,B.jsx)(rh,{label:`Host`,placeholder:`localhost:5173`,value:a,onChange:e=>o(e.target.value)}):(0,B.jsx)(rh,{label:`URL`,placeholder:`https://app.example.com`,value:s,onChange:e=>c(e.target.value)}),n?(0,B.jsxs)(mh,{label:`Agent`,value:m,onValueChange:e=>h(e),children:[e.agents.map(e=>(0,B.jsx)(mh.Option,{value:e.id,children:e.label},e.id)),(0,B.jsx)(mh.Option,{value:Gh,children:`Other…`})]}):null,m===Gh?(0,B.jsx)(rh,{label:`Agent id`,placeholder:`support`,value:g,onChange:e=>_(e.target.value)}):null,(0,B.jsx)(rh,{label:`Instance`,placeholder:`default`,value:d,onChange:e=>f(e.target.value)}),(0,B.jsx)(Fh,{label:`Token (optional)`,placeholder:`Sent as the token query param`,value:l,onValueChange:u}),b?(0,B.jsx)(`p`,{className:`text-sm text-kumo-danger`,children:b}):null,(0,B.jsx)(Km,{type:`submit`,variant:`primary`,className:`w-full`,children:`Connect`})]})]})})}var qh=new Set([`toJSON`,`then`,`catch`,`finally`,`valueOf`,`toString`,`constructor`,`prototype`,`$$typeof`,`@@toStringTag`,`asymmetricMatch`,`nodeType`]);function Jh(e){return typeof e==`symbol`||qh.has(e)}function Yh(e){if(e===e.toUpperCase()&&e!==e.toLowerCase())return e.toLowerCase().replace(/_/g,`-`);let t=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);return t=t.startsWith(`-`)?t.slice(1):t,t.replace(/_/g,`-`).replace(/-$/,``)}(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
|
|
12
|
-
PartySocket requires a global 'EventTarget' class to be available!
|
|
13
|
-
You can polyfill this global by adding this to your code before any partysocket imports:
|
|
14
|
-
|
|
15
|
-
\`\`\`
|
|
16
|
-
import 'partysocket/event-target-polyfill';
|
|
17
|
-
\`\`\`
|
|
18
|
-
Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
|
|
19
|
-
`);var Xh=class extends Event{message;error;constructor(e,t){super(`error`,t),this.message=e.message,this.error=e}},Zh=class extends Event{code;reason;wasClean=!0;constructor(e=1e3,t=``,n){super(`close`,n),this.code=e,this.reason=t}},Qh={Event,ErrorEvent:Xh,CloseEvent:Zh};function $h(e,t){if(!e)throw Error(t)}function eg(e){return new e.constructor(e.type,e)}function tg(e){return`data`in e?new MessageEvent(e.type,e):`code`in e||`reason`in e?new Zh(e.code||1999,e.reason||`unknown reason`,e):`error`in e?new Xh(e.error,e):new Event(e.type,e)}var ng=typeof process<`u`&&process.versions?.node!==void 0,rg=typeof navigator<`u`&&navigator.product===`ReactNative`,ig=ng||rg?tg:eg,ag={maxReconnectionDelay:1e4,minReconnectionDelay:3e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},og=!1;function sg(){}var cg=class e extends EventTarget{_ws;_retryCount=-1;_uptimeTimeout;_connectTimeout;_shouldReconnect=!0;_connectLock=!1;_binaryType=`blob`;_closeCalled=!1;_didWarnAboutClosedSend=!1;_messageQueue=[];_debugLogger=console.log.bind(console);_url;_protocols;_options;constructor(e,t,n={}){super(),this._url=e,this._protocols=t,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._options.debugLogger&&(this._debugLogger=this._options.debugLogger),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return e.CONNECTING}get OPEN(){return e.OPEN}get CLOSING(){return e.CLOSING}get CLOSED(){return e.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((e,t)=>(typeof t==`string`?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:``}get protocol(){return this._ws?this._ws.protocol:``}get readyState(){return this._closeCalled?e.CLOSED:this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING}get url(){return this._ws?this._ws.url:``}get shouldReconnect(){return this._shouldReconnect}onclose=null;onerror=null;onmessage=null;onopen=null;close(e=1e3,t){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug(`close enqueued: no ws instance`);return}if(this._ws.readyState===this.CLOSED||this._ws.readyState===this.CLOSING){this._debug(`close: already closing or closed`);return}this._disconnect(e,t)}reconnect(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._didWarnAboutClosedSend=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED||this._ws.readyState===this.CLOSING||this._disconnect(e,t),this._connect()}send(e){if(this._ws&&this._ws.readyState===this.OPEN)return this._debug(`send`,e),this._ws.send(e),!0;this._closeCalled&&!this._didWarnAboutClosedSend&&(this._didWarnAboutClosedSend=!0,console.warn(`ReconnectingWebSocket: send() was called after close(). The message has been buffered, but it will only be delivered if reconnect() is called on this socket. If this socket has been discarded, the message is lost — this usually means a stale socket reference is being used.`));let{maxEnqueuedMessages:t=ag.maxEnqueuedMessages}=this._options;return this._messageQueue.length<t&&(this._debug(`enqueue`,e),this._messageQueue.push(e)),!1}drainQueuedMessages(){let e=this._messageQueue;return this._messageQueue=[],e}_debug(...e){this._options.debug&&this._debugLogger(`RWS>`,...e)}_getNextDelay(){let{reconnectionDelayGrowFactor:e=ag.reconnectionDelayGrowFactor,minReconnectionDelay:t=ag.minReconnectionDelay,maxReconnectionDelay:n=ag.maxReconnectionDelay}=this._options,r=0;return this._retryCount>0&&(r=t*e**(this._retryCount-1),r>n&&(r=n)),this._debug(`next delay`,r),r}_wait(){return new Promise(e=>{setTimeout(e,this._getNextDelay())})}_getNextProtocols(e){if(!e)return Promise.resolve(null);if(typeof e==`string`||Array.isArray(e))return Promise.resolve(e);if(typeof e==`function`){let t=e();if(!t)return Promise.resolve(null);if(typeof t==`string`||Array.isArray(t))return Promise.resolve(t);if(t.then)return t}throw Error(`Invalid protocols`)}_getNextUrl(e){if(typeof e==`string`)return Promise.resolve(e);if(typeof e==`function`){let t=e();if(typeof t==`string`)return Promise.resolve(t);if(t.then)return t}throw Error(`Invalid URL`)}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;let{maxRetries:e=ag.maxRetries,connectionTimeout:t=ag.connectionTimeout}=this._options;if(this._retryCount>=e){this._debug(`max retries reached`,this._retryCount,`>=`,e),this._connectLock=!1;return}this._retryCount++,this._debug(`connect`,this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([e,n])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>`u`&&!og&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket.
|
|
20
|
-
|
|
21
|
-
For example, if you're using node.js, run \`npm install ws\`, and then in your code:
|
|
22
|
-
|
|
23
|
-
import PartySocket from 'partysocket';
|
|
24
|
-
import WS from 'ws';
|
|
25
|
-
|
|
26
|
-
const partysocket = new PartySocket({
|
|
27
|
-
host: "127.0.0.1:1999",
|
|
28
|
-
room: "test-room",
|
|
29
|
-
WebSocket: WS
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
`),og=!0);let r=this._options.WebSocket||WebSocket;this._debug(`connect`,{url:e,protocols:n}),this._ws=n?new r(e,n):new r(e),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),t)}).catch(e=>{this._connectLock=!1,this._handleError(new Qh.ErrorEvent(Error(e.message),this))})}_handleTimeout(){this._debug(`timeout event`),this._handleError(new Qh.ErrorEvent(Error(`TIMEOUT`),this))}_disconnect(e=1e3,t){if(this._clearTimeouts(),this._ws){this._removeListeners();try{(this._ws.readyState===this.OPEN||this._ws.readyState===this.CONNECTING)&&this._ws.close(e,t),this._handleClose(new Qh.CloseEvent(e,t,this))}catch{}}}_acceptOpen(){this._debug(`accept open`),this._retryCount=0}_handleOpen=e=>{this._debug(`open event`);let{minUptime:t=ag.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),t),$h(this._ws,`WebSocket is not defined`),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(e=>{this._ws?.send(e)}),this._messageQueue=[],this.onopen&&this.onopen(e),this.dispatchEvent(ig(e))};_handleMessage=e=>{this._debug(`message event`),this.onmessage&&this.onmessage(e),this.dispatchEvent(ig(e))};_handleError=e=>{this._debug(`error event`,e.message),this._disconnect(void 0,e.message===`TIMEOUT`?`timeout`:void 0),this.onerror&&this.onerror(e),this._debug(`exec error listeners`),this.dispatchEvent(ig(e)),this._connect()};_handleClose=e=>{this._debug(`close event`),this._clearTimeouts(),this._options.shouldReconnectOnClose&&!this._options.shouldReconnectOnClose(e)&&(this._shouldReconnect=!1),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(e),this.dispatchEvent(ig(e))};_removeListeners(){this._ws&&(this._debug(`removeListeners`),this._ws.removeEventListener(`open`,this._handleOpen),this._ws.removeEventListener(`close`,this._handleClose),this._ws.removeEventListener(`message`,this._handleMessage),this._ws.removeEventListener(`error`,this._handleError),this._ws.addEventListener(`error`,sg))}_addListeners(){this._ws&&(this._debug(`addListeners`),this._ws.addEventListener(`open`,this._handleOpen),this._ws.addEventListener(`close`,this._handleClose),this._ws.addEventListener(`message`,this._handleMessage),this._ws.addEventListener(`error`,this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}},lg=e=>e[1]!==null&&e[1]!==void 0;function ug(){if(crypto?.randomUUID)return crypto.randomUUID();let e=Date.now(),t=performance?.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(n){let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n===`x`?r:r&3|8).toString(16)})}function dg(e,t,n={}){let{host:r,path:i,protocol:a,room:o,party:s,basePath:c,prefix:l,query:u}=e,d=r.replace(/^(http|https|ws|wss):\/\//,``);if(d.endsWith(`/`)&&(d=d.slice(0,-1)),i?.startsWith(`/`))throw Error(`path must not start with a slash`);let f=s??`main`,p=i?`/${i}`:``,m=a||(d.startsWith(`localhost:`)||d.startsWith(`127.0.0.1:`)||d.startsWith(`192.168.`)||d.startsWith(`10.`)||d.startsWith(`172.`)&&d.split(`.`)[1]>=`16`&&d.split(`.`)[1]<=`31`||d.startsWith(`[::ffff:7f00:1]:`)?t:`${t}s`),h=`${m}://${d}/${c||`${l||`parties`}/${f}/${o}`}${p}`,g=(e={})=>`${h}?${new URLSearchParams([...Object.entries(n),...Object.entries(e).filter(lg)])}`,_=typeof u==`function`?async()=>g(await u()):g(u);return{host:d,path:p,room:o,name:f,protocol:m,partyUrl:h,urlProvider:_}}var fg=class extends cg{_pk;_pkurl;name;room;host;path;basePath;constructor(e){let t=pg(e);if(super(t.urlProvider,t.protocols,t.socketOptions),this.partySocketOptions=e,this.setWSProperties(t),!e.startClosed&&!this.room&&!this.basePath)throw this.close(),Error(`Either room or basePath must be provided to connect. Use startClosed: true to create a socket and set them via updateProperties before calling reconnect().`);e.disableNameValidation||(e.party?.includes(`/`)&&console.warn(`PartySocket: party name "${e.party}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`),e.room?.includes(`/`)&&console.warn(`PartySocket: room name "${e.room}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`))}updateProperties(e){let t=pg({...this.partySocketOptions,...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path,basePath:e.basePath??this.basePath});this._url=t.urlProvider,this._protocols=t.protocols,this._options=t.socketOptions,this.setWSProperties(t)}setWSProperties(e){let{_pk:t,_pkurl:n,name:r,room:i,host:a,path:o,basePath:s}=e;this._pk=t,this._pkurl=n,this.name=r,this.room=i,this.host=a,this.path=o,this.basePath=s}reconnect(e,t){if(!this.host)throw Error("The host must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");if(!this.room&&!this.basePath)throw Error("The room (or basePath) must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");super.reconnect(e,t)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,t){let n=dg(e,`http`),r=typeof n.urlProvider==`string`?n.urlProvider:await n.urlProvider();return(e.fetch??fetch)(r,t)}};function pg(e){let{id:t,host:n,path:r,party:i,room:a,protocol:o,query:s,protocols:c,...l}=e,u=t||ug(),d=dg(e,`ws`,{_pk:u});return{_pk:u,_pkurl:d.partyUrl,name:d.name,room:d.room,host:d.host,path:d.path,basePath:e.basePath,protocols:c,socketOptions:l,urlProvider:d.urlProvider}}var mg=class extends Error{constructor(e){let t=e.reason||`WebSocket closed with code ${e.code}`;super(`Agent connection closed: ${t}`),this.name=`AgentConnectionError`,this.code=e.code,this.reason=e.reason,this.wasClean=e.wasClean}};function hg(e){return e.code===1008||e.code>=4e3&&e.code<=4999}function gg(e){return new Proxy({},{get:(t,n)=>{if(!Jh(n))return(...t)=>e(n,t)}})}function _g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function vg(e){if(_g(e))return{input:e,changed:!1};if(typeof e==`string`&&e.trim().startsWith(`{`))try{let t=JSON.parse(e);if(_g(t))return{input:t,changed:!0}}catch{}return{input:{},changed:!0}}function yg(e,t){switch(t.type){case`text-start`:return e.push({type:`text`,text:``,state:`streaming`}),!0;case`text-delta`:{let n=bg(e,`text`);return n&&n.type===`text`?n.text+=t.delta??``:e.push({type:`text`,text:t.delta??``,state:`streaming`}),!0}case`text-end`:{let t=bg(e,`text`);return t&&`state`in t&&(t.state=`done`),!0}case`reasoning-start`:return e.push({type:`reasoning`,text:``,state:`streaming`}),!0;case`reasoning-delta`:{let n=bg(e,`reasoning`);return n&&n.type===`reasoning`?(n.text+=t.delta??``,Sg(n,t.providerMetadata)):e.push({type:`reasoning`,text:t.delta??``,state:`streaming`,...t.providerMetadata==null?{}:{providerMetadata:t.providerMetadata}}),!0}case`reasoning-end`:{let n=bg(e,`reasoning`);return n&&`state`in n&&(n.state=`done`,Sg(n,t.providerMetadata)),!0}case`file`:return e.push({type:`file`,mediaType:t.mediaType,url:t.url}),!0;case`source-url`:return e.push({type:`source-url`,sourceId:t.sourceId,url:t.url,title:t.title,providerMetadata:t.providerMetadata}),!0;case`source-document`:return e.push({type:`source-document`,sourceId:t.sourceId,mediaType:t.mediaType,title:t.title,filename:t.filename,providerMetadata:t.providerMetadata}),!0;case`tool-input-start`:return xg(e,t.toolCallId)||e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`input-streaming`,input:void 0,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata},...t.title==null?{}:{title:t.title}}),!0;case`tool-input-delta`:{let n=xg(e,t.toolCallId);return n&&n.state===`input-streaming`&&(n.input=t.input),!0}case`tool-input-available`:{let n=xg(e,t.toolCallId);if(n){let e=n;return e.state===`input-streaming`&&(e.state=`input-available`,e.input=vg(t.input).input,t.providerExecuted!=null&&(e.providerExecuted=t.providerExecuted),t.providerMetadata!=null&&(e.callProviderMetadata=t.providerMetadata),t.title!=null&&(e.title=t.title)),!0}return e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`input-available`,input:vg(t.input).input,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata},...t.title==null?{}:{title:t.title}}),!0}case`tool-input-error`:{let n=xg(e,t.toolCallId);if(n){let e=n;if(e.state===`output-available`||e.state===`output-error`||e.state===`output-denied`)return!0;e.state=`output-error`,e.errorText=t.errorText,e.input=vg(t.input).input,t.providerExecuted!=null&&(e.providerExecuted=t.providerExecuted),t.providerMetadata!=null&&(e.callProviderMetadata=t.providerMetadata)}else e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`output-error`,input:vg(t.input).input,errorText:t.errorText,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata}});return!0}case`tool-approval-request`:{let n=xg(e,t.toolCallId);if(n){let e=n;if(e.state===`approval-responded`||e.state===`output-available`||e.state===`output-error`||e.state===`output-denied`)return!0;e.state=`approval-requested`,e.approval={id:t.approvalId,...t.approvalDescriptor!==void 0&&{descriptor:t.approvalDescriptor}}}return!0}case`tool-output-denied`:{let n=xg(e,t.toolCallId);if(n){let e=n;if(e.state===`output-available`||e.state===`output-error`||e.state===`output-denied`||e.state===`approval-responded`)return!0;e.state=`output-denied`}return!0}case`tool-output-available`:{let n=xg(e,t.toolCallId);if(n){let e=n;e.state=`output-available`,e.output=t.output,t.preliminary!==void 0&&(e.preliminary=t.preliminary)}return!0}case`tool-output-error`:{let n=xg(e,t.toolCallId);if(n){let e=n;e.state=`output-error`,e.errorText=t.errorText}return!0}case`step-start`:case`start-step`:return e.push({type:`step-start`}),!0;default:if(t.type.startsWith(`data-`)){if(t.transient)return!0;if(t.id!=null){let n=Cg(e,t.type,t.id);if(n)return n.data=t.data,!0}return e.push({type:t.type,...t.id!=null&&{id:t.id},data:t.data}),!0}return!1}}function bg(e,t){for(let n=e.length-1;n>=0;n--)if(e[n].type===t)return e[n]}function xg(e,t){if(t)for(let n=e.length-1;n>=0;n--){let r=e[n];if(`toolCallId`in r&&r.toolCallId===t)return r}}function Sg(e,t){if(t==null)return;let n=e;n.providerMetadata={...n.providerMetadata,...t}}function Cg(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];if(i.type===t&&`id`in i&&i.id===n)return i}}var wg=(e,t)=>{let n=(0,V.useRef)(t);n.current=t,(0,V.useEffect)(()=>{let t=e=>n.current?.onOpen?.(e),r=e=>n.current?.onMessage?.(e),i=e=>n.current?.onClose?.(e),a=e=>n.current?.onError?.(e);return e.addEventListener(`open`,t),e.addEventListener(`close`,i),e.addEventListener(`error`,a),e.addEventListener(`message`,r),()=>{e.removeEventListener(`open`,t),e.removeEventListener(`close`,i),e.removeEventListener(`error`,a),e.removeEventListener(`message`,r)}},[e])},Tg=e=>[e.startClosed,e.minUptime,e.maxRetries,e.connectionTimeout,e.maxEnqueuedMessages,e.maxReconnectionDelay,e.minReconnectionDelay,e.reconnectionDelayGrowFactor,e.debug];function Eg({options:e,createSocket:t,createSocketMemoKey:n,createSocketDestinationKey:r}){let{enabled:i=!0}=e,a=(0,V.useMemo)(()=>e,[n(e)]),[o,s]=(0,V.useState)(()=>t({...a,startClosed:!0})),c=(0,V.useRef)(null),l=(0,V.useRef)(t);l.current=t;let u=(0,V.useRef)(i),d=(0,V.useRef)(a),f=(0,V.useRef)(!1),p=(0,V.useRef)(a),m=e=>{let t=l.current({...a,startClosed:!0}),n=e.drainQueuedMessages();if(n.length>0){let e=r?r(p.current)===r(a):!1;if(a.transferEnqueuedMessages??e)for(let e of n)t.send(e);else console.warn(`PartySocket: discarded ${n.length} buffered message(s) while replacing the socket, because the connection destination changed. Pass transferEnqueuedMessages: true to deliver buffered messages to the new destination instead.`)}return p.current=a,t},h=(0,V.useRef)(m);return h.current=m,(0,V.useEffect)(()=>{let e=d.current!==a;if(d.current=a,!i)return o.close(),u.current=i,e&&(f.current=!0),()=>{o.close()};if(!u.current&&i){u.current=i;let t=e||f.current;if(f.current=!1,!t)return o.reconnect(),()=>{o.close()};let n=h.current(o);return s(n),()=>{n.close()}}if(u.current=i,c.current===o)if(e){let e=h.current(o);return s(e),()=>{e.close()}}else return a.startClosed!==!0&&o.reconnect(),()=>{o.close()};else return c.current?c.current!==o&&o.reconnect():a.startClosed!==!0&&o.reconnect(),c.current=o,()=>{o.close()}},[o,a,i]),o}function Dg(e){let{host:t,...n}=e,r=Eg({options:{host:t||(typeof window<`u`?window.location.host:`dummy-domain.com`),...n},createSocket:e=>new fg(e),createSocketMemoKey:e=>JSON.stringify([e.query,e.id,e.host,e.room,e.party,e.path,e.protocol,e.protocols,e.basePath,e.prefix,...Tg(e)]),createSocketDestinationKey:e=>JSON.stringify([e.host,e.room,e.party,e.path,e.protocol,e.protocols,e.basePath,e.prefix])});return wg(r,e),r}var Og=new Map;function kg(e,t,n,r){if(r===void 0)return JSON.stringify([e,t||`default`,...n]);let i=n;return i.length===0?JSON.stringify([e,t||`default`,...r]):JSON.stringify([e,t||`default`,i.map(e=>[e.agent,e.name]),...r])}function Ag(e,t){if(e.length===0)return t??``;let n=e.flatMap(e=>[`sub`,Yh(e.agent),encodeURIComponent(e.name)]).join(`/`);return t?`${n}/${t.startsWith(`/`)?t.slice(1):t}`:n}function jg(e){let t=Og.get(e);if(t){if(Date.now()>=t.expiresAt){Og.delete(e);return}return t}}function Mg(e,t,n){let r={promise:t,expiresAt:Date.now()+n};return Og.set(e,r),r}function Ng(e){Og.delete(e)}function Pg(e){let t=Yh(e.agent),{query:n,queryDeps:r,cacheTtl:i,sub:a,path:o,defaultCallTimeout:s,onConnectionError:c,shouldReconnectOnClose:l,...u}=e,d=(0,V.useMemo)(()=>(a??[]).map(e=>({agent:e.agent,name:e.name})),[JSON.stringify(a??[])]),f=d.length>0?d[d.length-1].agent:e.agent,p=d.length>0?d[d.length-1].name:e.name||`default`,m=(0,V.useMemo)(()=>[{agent:e.agent,name:e.name||`default`},...d],[e.agent,e.name,d]),h=(0,V.useRef)(new Map),g=(0,V.useRef)(null),_=(0,V.useRef)(s??3e4);_.current=s??3e4;let v=(e,t)=>{let n=Error(t);for(let[r,i]of h.current)i.sentOn===e&&(i.timeoutId&&clearTimeout(i.timeoutId),h.current.delete(r),i.reject(n),i.stream?.onError?.(t))},y=()=>{let e=g.current;if(!(!e||e.readyState!==e.OPEN))for(let t of h.current.values())t.sentOn===null&&(e.send(t.request),t.sentOn=e)},b=e=>{let t=Error(e);for(let[n,r]of h.current)r.sentOn===null&&(r.timeoutId&&clearTimeout(r.timeoutId),h.current.delete(n),r.reject(t),r.stream?.onError?.(e))},x=(0,V.useMemo)(()=>kg(t,e.name,d,r||[]),[t,e.name,d,r]),S=(0,V.useRef)(x);S.current=x;let C=i??300*1e3,[w,T]=(0,V.useState)(0),E=n&&typeof n==`function`,[D,O]=(0,V.useState)(!1),k=(0,V.useMemo)(()=>{if(!n||typeof n!=`function`)return null;let t=jg(x);if(t)return t.promise;let r=n().catch(t=>{throw console.error(`[useAgent] Query failed for agent "${e.agent}":`,t),Ng(x),t});return Mg(x,r,C),r},[x,n,e.agent,C,w]);(0,V.useEffect)(()=>{if(!k||C<=0)return;let e=jg(x);if(!e)return;let t=e.expiresAt-Date.now(),n=setTimeout(()=>{Ng(x),T(Date.now())},Math.max(0,t));return()=>clearTimeout(n)},[x,k,C]);let A;if(n)if(typeof n==`function`){let e=(0,V.use)(k);if(e){for(let[t,n]of Object.entries(e))n!=null&&typeof n!=`string`&&typeof n!=`number`&&typeof n!=`boolean`&&console.warn(`[useAgent] Query parameter "${t}" is an object and will be converted to "[object Object]". Query parameters should be string, number, boolean, or null.`);A=e}}else A=n;(0,V.useEffect)(()=>{D&&A!==void 0&&O(!1)},[D,A]);let[j,M]=(0,V.useState)(void 0),[N,P]=(0,V.useState)(null),ee=(0,V.useRef)(null),F=(0,V.useRef)(null),te=(0,V.useRef)(l);te.current=l;let I=(0,V.useCallback)(e=>(te.current?.(e)??!0)&&!hg(e),[]),[L,ne]=(0,V.useState)({name:p,agent:Yh(f),identified:!1}),R=(0,V.useRef)({name:null,agent:null}),re=(0,V.useRef)(void 0),z=()=>{let e;re.current={promise:new Promise(t=>{e=t}),resolve:e}};re.current||z();let ie=(0,V.useRef)(null),ae=(0,V.useMemo)(()=>Ag(d,o),[d,o]),oe=e.basePath?{basePath:e.basePath,path:ae||void 0,query:A,...u,shouldReconnectOnClose:I}:{party:t,prefix:`agents`,room:e.name||`default`,path:ae||void 0,query:A,...u,shouldReconnectOnClose:I},se=!D&&(u.enabled??!0),ce=JSON.stringify([e.host??null,e.basePath??null,t,e.name||`default`,ae||null]),le=F.current===ce?N:null;ee.current=le;let ue=Dg({...oe,enabled:se,onOpen:t=>{F.current=null,P(null),y(),e.onOpen?.(t)},onMessage:t=>{if(typeof t.data==`string`){let n;try{n=JSON.parse(t.data)}catch{return e.onMessage?.(t)}if(n.type===`cf_agent_identity`){let t=R.current.name,r=R.current.agent,i=n.name,a=n.agent,o=ie.current;if(o&&(o.name=i,o.agent=a,o.identified=!0),ne({name:i,agent:a,identified:!0}),re.current?.resolve(),t!==null&&r!==null&&(t!==i||r!==a))if(e.onIdentityChange)e.onIdentityChange(t,i,r,a);else{let e=r!==a,n=t!==i,o=``;o=e&&n?`agent "${r}" → "${a}", instance "${t}" → "${i}"`:e?`agent "${r}" → "${a}"`:`instance "${t}" → "${i}"`,console.warn(`[agents] Identity changed on reconnect: ${o}. This can happen with server-side routing (e.g., basePath with getAgentByName) where the instance is determined by auth/session. Provide onIdentityChange callback to handle this explicitly, or ignore if this is expected for your routing pattern.`)}R.current={name:i,agent:a},e.onIdentity?.(i,a);return}if(n.type===`cf_agent_state`){M(n.state),e.onStateUpdate?.(n.state,`server`);return}if(n.type===`cf_agent_state_error`){e.onStateUpdateError?.(n.error);return}if(n.type===`cf_agent_mcp_servers`){e.onMcpUpdate?.(n.mcp);return}if(n.type===`rpc`){let e=n,t=h.current.get(e.id);if(!t){console.warn(`[useAgent] Discarded an RPC response with no matching pending call (id "${e.id}"). The call likely timed out or was rejected when its connection closed before the response arrived.`);return}if(!e.success){t.timeoutId&&clearTimeout(t.timeoutId),t.reject(Error(e.error)),h.current.delete(e.id),t.stream?.onError?.(e.error);return}`done`in e?e.done?(t.timeoutId&&clearTimeout(t.timeoutId),t.resolve(e.result),h.current.delete(e.id),t.stream?.onDone?.(e.result)):t.stream?.onChunk?.(e.result):(t.timeoutId&&clearTimeout(t.timeoutId),t.resolve(e.result),h.current.delete(e.id));return}}e.onMessage?.(t)},onClose:t=>{let n=t.target??g.current,r=n===g.current,i=hg(t);if(n&&(v(n,`Connection closed`),r&&!n.shouldReconnect&&b(`Connection closed`)),r&&(z(),ie.current&&(ie.current.identified=!1),ne(e=>({...e,identified:!1})),n?.shouldReconnect&&(E&&O(!0),Ng(S.current),T(Date.now())),!n?.shouldReconnect&&i)){let e=new mg(t);F.current=ce,P(e),c?.(e)}e.onClose?.(t)}});g.current=ue;let de=(0,V.useRef)(null),fe=(0,V.useRef)(ce);(0,V.useEffect)(()=>{let e=de.current;de.current=ue;let t=fe.current;fe.current=ce,t!==ce&&(F.current=null,P(null),b(`Call discarded: the agent address changed before the request could be sent`)),e&&e!==ue&&(v(e,`Connection closed`),z(),ie.current&&(ie.current.identified=!1),ne(e=>e.identified?{...e,identified:!1}:e))},[ue,ce]);let pe=(0,V.useCallback)((e,t=[],n)=>new Promise((r,i)=>{let a=g.current;if(a&&ee.current&&a.readyState===a.CLOSED){i(Error(`Connection closed`));return}let o=crypto.randomUUID(),s,c=n&&(`onChunk`in n||`onDone`in n||`onError`in n),l=c?n:n?.stream,u=c?void 0:n?.timeout,d=u===void 0?l?void 0:_.current:u;d&&(s=setTimeout(()=>{let t=h.current.get(o);h.current.delete(o);let n=`RPC call to ${e} timed out after ${d}ms`;t?.stream?.onError?.(n),i(Error(n))},d));let f=JSON.stringify({args:t,id:o,method:e,type:`rpc`});if(h.current.set(o,{reject:i,resolve:r,stream:l,timeoutId:s,request:f,sentOn:null}),a&&a.readyState===a.OPEN){a.send(f);let e=h.current.get(o);e&&(e.sentOn=a)}}),[]);return ue.setState=t=>{(g.current??ue).send(JSON.stringify({state:t,type:`cf_agent_state`})),M(t),e.onStateUpdate?.(t,`client`)},ue.call=pe,ue.agent=L.agent,ue.name=L.name,ue.path=m,ue.identified=L.identified,ue.ready=re.current.promise,ue.state=j,ue.connectionError=le,ie.current=ue,ue.stub=(0,V.useMemo)(()=>gg(pe),[pe]),ue.getHttpUrl=()=>(ue._url||ue._pkurl||``).replace(`ws://`,`http://`).replace(`wss://`,`https://`),L.agent!==L.agent.toLowerCase()&&console.warn(`Agent name: `+L.agent+` should probably be in lowercase. Received: `+L.agent),ue}function Fg(e){if(typeof e==`object`&&e&&!Array.isArray(e))return e}var Ig=class{constructor(e){this.messageId=e.messageId,this._isContinuation=e.continuation??!1,this.parts=e.existingParts?[...e.existingParts]:[],this.metadata=e.existingMetadata?{...e.existingMetadata}:void 0}applyChunk(e){let t=yg(this.parts,e);if(e.type===`tool-approval-request`&&e.toolCallId)return{handled:t,action:{type:`tool-approval-request`,toolCallId:e.toolCallId}};if((e.type===`tool-output-available`||e.type===`tool-output-error`)&&e.toolCallId&&!this.parts.some(t=>`toolCallId`in t&&t.toolCallId===e.toolCallId))return{handled:t,action:{type:`cross-message-tool-update`,updateType:e.type===`tool-output-available`?`output-available`:`output-error`,toolCallId:e.toolCallId,output:e.output,errorText:e.errorText,preliminary:e.preliminary}};if(!t)switch(e.type){case`start`:{e.messageId!=null&&!this._isContinuation&&(this.messageId=e.messageId);let t=Fg(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`start`,messageId:e.messageId,metadata:t}}}case`finish`:{let t=Fg(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`finish`,finishReason:`finishReason`in e?e.finishReason:void 0,metadata:t}}}case`message-metadata`:{let t=Fg(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`message-metadata`,metadata:t??{}}}}case`finish-step`:return{handled:!0};case`error`:return{handled:!0,action:{type:`error`,error:e.errorText??JSON.stringify(e)}}}return{handled:t}}toMessage(){return{id:this.messageId,role:`assistant`,parts:[...this.parts],...this.metadata!=null&&{metadata:this.metadata}}}mergeInto(e){let t=e.findIndex(e=>e.id===this.messageId);if(t<0&&this._isContinuation){for(let n=e.length-1;n>=0;n--)if(e[n].role===`assistant`){t=n;break}}let n={id:t>=0?e[t].id:this.messageId,role:`assistant`,parts:[...this.parts],...this.metadata!=null&&{metadata:this.metadata}};if(t>=0){let r=[...e];return r[t]=n,r}return[...e,n]}};function Lg(e,t){switch(t.type){case`clear`:return{state:{status:`idle`},isStreaming:!1};case`resume-fallback`:{let e=new Ig({messageId:t.messageId});return{state:{status:`observing`,streamId:t.streamId,accumulator:e},isStreaming:!0}}case`response`:{let n,r=t.replay===!0&&t.chunkData?.type===`start`;if(e.status===`idle`||e.streamId!==t.streamId||r){let e=t.messageId,r,i;if(t.continuation&&t.currentMessages){for(let n=t.currentMessages.length-1;n>=0;n--)if(t.currentMessages[n].role===`assistant`){e=t.currentMessages[n].id,r=[...t.currentMessages[n].parts],t.currentMessages[n].metadata!=null&&(i={...t.currentMessages[n].metadata});break}}n=new Ig({messageId:e,continuation:t.continuation,existingParts:r,existingMetadata:i})}else n=e.accumulator;t.chunkData&&n.applyChunk(t.chunkData);let i;return t.done?(i=e=>n.mergeInto(e),{state:{status:`idle`},messagesUpdate:i,isStreaming:!1}):((t.chunkData&&!t.replay||t.replayComplete)&&(i=e=>n.mergeInto(e)),{state:{status:`observing`,streamId:t.streamId,accumulator:n},messagesUpdate:i,isStreaming:!0})}}}var Rg={IDLE:`idle`,CONTINUATION_OWNED:`continuation-owned`},zg=`vercel.ai.error`,Bg=Symbol.for(zg),Vg,Hg,Ug=class e extends (Hg=Error,Vg=Bg,Hg){constructor({name:e,message:t,cause:n}){super(t),this[Vg]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,zg)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};function Wg(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var Gg=`AI_InvalidArgumentError`,Kg=`vercel.ai.error.${Gg}`,qg=Symbol.for(Kg),Jg,Yg,Xg=class extends (Yg=Ug,Jg=qg,Yg){constructor({message:e,cause:t,argument:n}){super({name:Gg,message:e,cause:t}),this[Jg]=!0,this.argument=n}static isInstance(e){return Ug.hasMarker(e,Kg)}},Zg=`AI_JSONParseError`,Qg=`vercel.ai.error.${Zg}`,$g=Symbol.for(Qg),e_,t_,n_=class extends (t_=Ug,e_=$g,t_){constructor({text:e,cause:t}){super({name:Zg,message:`JSON parsing failed: Text: ${e}.
|
|
33
|
-
Error message: ${Wg(t)}`,cause:t}),this[e_]=!0,this.text=e}static isInstance(e){return Ug.hasMarker(e,Qg)}},r_=`AI_TypeValidationError`,i_=`vercel.ai.error.${r_}`,a_=Symbol.for(i_),o_,s_,c_=class e extends (s_=Ug,o_=a_,s_){constructor({value:e,cause:t,context:n}){let r=`Type validation failed`;if(n?.field&&(r+=` for ${n.field}`),n?.entityName||n?.entityId){r+=` (`;let e=[];n.entityName&&e.push(n.entityName),n.entityId&&e.push(`id: "${n.entityId}"`),r+=e.join(`, `),r+=`)`}super({name:r_,message:`${r}: Value: ${JSON.stringify(e)}.
|
|
34
|
-
Error message: ${Wg(t)}`,cause:t}),this[o_]=!0,this.value=e,this.context=n}static isInstance(e){return Ug.hasMarker(e,i_)}static wrap({value:t,cause:n,context:r}){return e.isInstance(n)&&n.value===t&&n.context?.field===r?.field&&n.context?.entityName===r?.entityName&&n.context?.entityId===r?.entityId?n:new e({value:t,cause:n,context:r})}},l_;function W(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var u_=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},d_=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(l_=globalThis).__zod_globalConfig??(l_.__zod_globalConfig={});var f_=globalThis.__zod_globalConfig;function p_(e){return e&&Object.assign(f_,e),f_}function m_(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function h_(e,t){return typeof t==`bigint`?t.toString():t}function g_(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function __(e){return e==null}function v_(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function y_(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var b_=Symbol(`evaluating`);function x_(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==b_)return r===void 0&&(r=b_,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function S_(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function C_(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function w_(e){return JSON.stringify(e)}function T_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var E_=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function D_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var O_=g_(()=>{if(f_.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function k_(e){if(D_(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(D_(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function A_(e){return k_(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var j_=new Set([`string`,`number`,`symbol`]);function M_(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function N_(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function P_(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function F_(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var I_={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function L_(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return N_(e,C_(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return S_(this,`shape`,e),e},checks:[]}))}function R_(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return N_(e,C_(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return S_(this,`shape`,r),r},checks:[]}))}function z_(e,t){if(!k_(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return N_(e,C_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S_(this,`shape`,n),n}}))}function B_(e,t){if(!k_(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return N_(e,C_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S_(this,`shape`,n),n}}))}function V_(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return N_(e,C_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return S_(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function H_(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return N_(t,C_(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return S_(this,`shape`,i),i},checks:[]}))}function U_(e,t,n){return N_(t,C_(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return S_(this,`shape`,i),i}}))}function W_(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function G_(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function K_(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function q_(e){return typeof e==`string`?e:e?.message}function J_(e,t,n){let r=e.message?e.message:q_(e.inst?._zod.def?.error?.(e))??q_(t?.error?.(e))??q_(n.customError?.(e))??q_(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Y_(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function X_(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Z_=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,h_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Q_=W(`$ZodError`,Z_),$_=W(`$ZodError`,Z_,{Parent:Error});function ev(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function tv(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var nv=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new u_;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>J_(e,a,p_())));throw E_(t,i?.callee),t}return o.value},rv=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>J_(e,a,p_())));throw E_(t,i?.callee),t}return o.value},iv=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new u_;return a.issues.length?{success:!1,error:new(e??Q_)(a.issues.map(e=>J_(e,i,p_())))}:{success:!0,data:a.value}},av=iv($_),ov=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>J_(e,i,p_())))}:{success:!0,data:a.value}},sv=ov($_),cv=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nv(e)(t,n,i)},lv=e=>(t,n,r)=>nv(e)(t,n,r),uv=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return rv(e)(t,n,i)},dv=e=>async(t,n,r)=>rv(e)(t,n,r),fv=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return iv(e)(t,n,i)},pv=e=>(t,n,r)=>iv(e)(t,n,r),mv=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ov(e)(t,n,i)},hv=e=>async(t,n,r)=>ov(e)(t,n,r),gv=/^[cC][0-9a-z]{6,}$/,_v=/^[0-9a-z]+$/,vv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,yv=/^[0-9a-vA-V]{20}$/,bv=/^[A-Za-z0-9]{27}$/,xv=/^[a-zA-Z0-9_-]{21}$/,Sv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cv=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,wv=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Tv=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ev=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Dv(){return new RegExp(Ev,`u`)}var Ov=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Av=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,jv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Mv=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Nv=/^[A-Za-z0-9_-]*$/,Pv=/^https?$/,Fv=/^\+[1-9]\d{6,14}$/,Iv=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Lv=RegExp(`^${Iv}$`);function Rv(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zv(e){return RegExp(`^${Rv(e)}$`)}function Bv(e){let t=Rv({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Iv}T(?:${r})$`)}var Vv=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Hv=/^-?\d+$/,Uv=/^-?\d+(?:\.\d+)?$/,Wv=/^(?:true|false)$/i,Gv=/^null$/i,Kv=/^[^A-Z]*$/,qv=/^[^a-z]*$/,Jv=W(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Yv={number:`number`,bigint:`bigint`,object:`date`},Xv=W(`$ZodCheckLessThan`,(e,t)=>{Jv.init(e,t);let n=Yv[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zv=W(`$ZodCheckGreaterThan`,(e,t)=>{Jv.init(e,t);let n=Yv[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qv=W(`$ZodCheckMultipleOf`,(e,t)=>{Jv.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):y_(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$v=W(`$ZodCheckNumberFormat`,(e,t)=>{Jv.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=I_[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Hv)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ey=W(`$ZodCheckMaxLength`,(e,t)=>{var n;Jv.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!__(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Y_(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ty=W(`$ZodCheckMinLength`,(e,t)=>{var n;Jv.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!__(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Y_(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ny=W(`$ZodCheckLengthEquals`,(e,t)=>{var n;Jv.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!__(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Y_(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ry=W(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Jv.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),iy=W(`$ZodCheckRegex`,(e,t)=>{ry.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ay=W(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Kv,ry.init(e,t)}),oy=W(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=qv,ry.init(e,t)}),sy=W(`$ZodCheckIncludes`,(e,t)=>{Jv.init(e,t);let n=M_(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),cy=W(`$ZodCheckStartsWith`,(e,t)=>{Jv.init(e,t);let n=RegExp(`^${M_(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ly=W(`$ZodCheckEndsWith`,(e,t)=>{Jv.init(e,t);let n=RegExp(`.*${M_(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),uy=W(`$ZodCheckOverwrite`,(e,t)=>{Jv.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),dy=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
35
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
36
|
-
`))}},fy={major:4,minor:4,patch:3},py=W(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fy;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=W_(e),i;for(let a of t){if(a._zod.def.when){if(G_(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new u_;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=W_(e,t))});else{if(e.issues.length===t)continue;r||=W_(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(W_(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new u_;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new u_;return o.then(e=>t(e,r,a))}return t(o,r,a)}}x_(e,`~standard`,()=>({validate:t=>{try{let n=av(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return sv(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),my=W(`$ZodString`,(e,t)=>{py.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vv(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),hy=W(`$ZodStringFormat`,(e,t)=>{ry.init(e,t),my.init(e,t)}),gy=W(`$ZodGUID`,(e,t)=>{t.pattern??=Cv,hy.init(e,t)}),_y=W(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=wv(e)}else t.pattern??=wv();hy.init(e,t)}),vy=W(`$ZodEmail`,(e,t)=>{t.pattern??=Tv,hy.init(e,t)}),yy=W(`$ZodURL`,(e,t)=>{hy.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Pv.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),by=W(`$ZodEmoji`,(e,t)=>{t.pattern??=Dv(),hy.init(e,t)}),xy=W(`$ZodNanoID`,(e,t)=>{t.pattern??=xv,hy.init(e,t)}),Sy=W(`$ZodCUID`,(e,t)=>{t.pattern??=gv,hy.init(e,t)}),Cy=W(`$ZodCUID2`,(e,t)=>{t.pattern??=_v,hy.init(e,t)}),wy=W(`$ZodULID`,(e,t)=>{t.pattern??=vv,hy.init(e,t)}),Ty=W(`$ZodXID`,(e,t)=>{t.pattern??=yv,hy.init(e,t)}),Ey=W(`$ZodKSUID`,(e,t)=>{t.pattern??=bv,hy.init(e,t)}),Dy=W(`$ZodISODateTime`,(e,t)=>{t.pattern??=Bv(t),hy.init(e,t)}),Oy=W(`$ZodISODate`,(e,t)=>{t.pattern??=Lv,hy.init(e,t)}),ky=W(`$ZodISOTime`,(e,t)=>{t.pattern??=zv(t),hy.init(e,t)}),Ay=W(`$ZodISODuration`,(e,t)=>{t.pattern??=Sv,hy.init(e,t)}),jy=W(`$ZodIPv4`,(e,t)=>{t.pattern??=Ov,hy.init(e,t),e._zod.bag.format=`ipv4`}),My=W(`$ZodIPv6`,(e,t)=>{t.pattern??=kv,hy.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Ny=W(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Av,hy.init(e,t)}),Py=W(`$ZodCIDRv6`,(e,t)=>{t.pattern??=jv,hy.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Fy(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Iy=W(`$ZodBase64`,(e,t)=>{t.pattern??=Mv,hy.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Fy(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Ly(e){if(!Nv.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Fy(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Ry=W(`$ZodBase64URL`,(e,t)=>{t.pattern??=Nv,hy.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Ly(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),zy=W(`$ZodE164`,(e,t)=>{t.pattern??=Fv,hy.init(e,t)});function By(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Vy=W(`$ZodJWT`,(e,t)=>{hy.init(e,t),e._zod.check=n=>{By(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Hy=W(`$ZodNumber`,(e,t)=>{py.init(e,t),e._zod.pattern=e._zod.bag.pattern??Uv,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Uy=W(`$ZodNumberFormat`,(e,t)=>{$v.init(e,t),Hy.init(e,t)}),Wy=W(`$ZodBoolean`,(e,t)=>{py.init(e,t),e._zod.pattern=Wv,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Gy=W(`$ZodNull`,(e,t)=>{py.init(e,t),e._zod.pattern=Gv,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Ky=W(`$ZodUnknown`,(e,t)=>{py.init(e,t),e._zod.parse=e=>e}),qy=W(`$ZodNever`,(e,t)=>{py.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Jy(e,t,n){e.issues.length&&t.issues.push(...K_(n,e.issues)),t.value[n]=e.value}var Yy=W(`$ZodArray`,(e,t)=>{py.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Jy(t,n,e))):Jy(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Xy(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...K_(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Zy(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=F_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Qy(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Xy(e,n,i,t,u,d))):Xy(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var $y=W(`$ZodObject`,(e,t)=>{if(py.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=g_(()=>Zy(t));x_(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=D_,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Xy(n,t,e,s,r,i))):Xy(a,t,e,s,r,i)}return i?Qy(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),eb=W(`$ZodObjectJIT`,(e,t)=>{$y.init(e,t);let n=e._zod.parse,r=g_(()=>Zy(t)),i=e=>{let t=new dy([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=w_(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=w_(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
37
|
-
if (${n}.issues.length) {
|
|
38
|
-
if (${o} in input) {
|
|
39
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
40
|
-
...iss,
|
|
41
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
42
|
-
})));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (${n}.value === undefined) {
|
|
47
|
-
if (${o} in input) {
|
|
48
|
-
newResult[${o}] = undefined;
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
51
|
-
newResult[${o}] = ${n}.value;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
`):c?t.write(`
|
|
55
|
-
if (${n}.issues.length) {
|
|
56
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
57
|
-
...iss,
|
|
58
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
59
|
-
})));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (${n}.value === undefined) {
|
|
63
|
-
if (${o} in input) {
|
|
64
|
-
newResult[${o}] = undefined;
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
newResult[${o}] = ${n}.value;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
`):t.write(`
|
|
71
|
-
const ${n}_present = ${o} in input;
|
|
72
|
-
if (${n}.issues.length) {
|
|
73
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
74
|
-
...iss,
|
|
75
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
76
|
-
})));
|
|
77
|
-
}
|
|
78
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
79
|
-
payload.issues.push({
|
|
80
|
-
code: "invalid_type",
|
|
81
|
-
expected: "nonoptional",
|
|
82
|
-
input: undefined,
|
|
83
|
-
path: [${o}]
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (${n}_present) {
|
|
88
|
-
if (${n}.value === undefined) {
|
|
89
|
-
newResult[${o}] = undefined;
|
|
90
|
-
} else {
|
|
91
|
-
newResult[${o}] = ${n}.value;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=D_,s=!f_.jitless,c=s&&O_.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Qy([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function tb(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!W_(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>J_(e,r,p_())))}),t)}var nb=W(`$ZodUnion`,(e,t)=>{py.init(e,t),x_(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),x_(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),x_(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),x_(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>v_(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>tb(t,r,e,i)):tb(o,r,e,i)}}),rb=W(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,nb.init(e,t);let n=e._zod.parse;x_(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=g_(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!D_(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),ib=W(`$ZodIntersection`,(e,t)=>{py.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ob(e,t,n)):ob(e,i,a)}});function ab(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(k_(e)&&k_(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=ab(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ab(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ob(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),W_(e))return e;let o=ab(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var sb=W(`$ZodRecord`,(e,t)=>{py.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!k_(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>J_(e,r,p_())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...K_(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...K_(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Uv.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>J_(e,r,p_())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...K_(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...K_(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),cb=W(`$ZodEnum`,(e,t)=>{py.init(e,t);let n=m_(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>j_.has(typeof e)).map(e=>typeof e==`string`?M_(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),lb=W(`$ZodLiteral`,(e,t)=>{if(py.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?M_(e):e?M_(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),ub=W(`$ZodTransform`,(e,t)=>{py.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new d_(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new u_;return n.value=i,n.fallback=!0,n}});function db(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var fb=W(`$ZodOptional`,(e,t)=>{py.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,x_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),x_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${v_(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>db(e,r)):db(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),pb=W(`$ZodExactOptional`,(e,t)=>{fb.init(e,t),x_(e._zod,`values`,()=>t.innerType._zod.values),x_(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),mb=W(`$ZodNullable`,(e,t)=>{py.init(e,t),x_(e._zod,`optin`,()=>t.innerType._zod.optin),x_(e._zod,`optout`,()=>t.innerType._zod.optout),x_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${v_(e.source)}|null)$`):void 0}),x_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),hb=W(`$ZodDefault`,(e,t)=>{py.init(e,t),e._zod.optin=`optional`,x_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>gb(e,t)):gb(r,t)}});function gb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var _b=W(`$ZodPrefault`,(e,t)=>{py.init(e,t),e._zod.optin=`optional`,x_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),vb=W(`$ZodNonOptional`,(e,t)=>{py.init(e,t),x_(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>yb(t,e)):yb(i,e)}});function yb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var bb=W(`$ZodCatch`,(e,t)=>{py.init(e,t),e._zod.optin=`optional`,x_(e._zod,`optout`,()=>t.innerType._zod.optout),x_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>J_(e,n,p_()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>J_(e,n,p_()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),xb=W(`$ZodPipe`,(e,t)=>{py.init(e,t),x_(e._zod,`values`,()=>t.in._zod.values),x_(e._zod,`optin`,()=>t.in._zod.optin),x_(e._zod,`optout`,()=>t.out._zod.optout),x_(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Sb(e,t.in,n)):Sb(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Sb(e,t.out,n)):Sb(r,t.out,n)}});function Sb(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Cb=W(`$ZodReadonly`,(e,t)=>{py.init(e,t),x_(e._zod,`propValues`,()=>t.innerType._zod.propValues),x_(e._zod,`values`,()=>t.innerType._zod.values),x_(e._zod,`optin`,()=>t.innerType?._zod?.optin),x_(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(wb):wb(r)}});function wb(e){return e.value=Object.freeze(e.value),e}var Tb=W(`$ZodLazy`,(e,t)=>{py.init(e,t),x_(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),x_(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),x_(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),x_(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),x_(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Eb=W(`$ZodCustom`,(e,t)=>{Jv.init(e,t),py.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Db(t,n,r,e));Db(i,n,r,e)}});function Db(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(X_(e))}}var Ob,kb=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ab(){return new kb}(Ob=globalThis).__zod_globalRegistry??(Ob.__zod_globalRegistry=Ab());var jb=globalThis.__zod_globalRegistry;function Mb(e,t){return new e({type:`string`,...P_(t)})}function Nb(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...P_(t)})}function Pb(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...P_(t)})}function Fb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...P_(t)})}function Ib(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...P_(t)})}function Lb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...P_(t)})}function Rb(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...P_(t)})}function zb(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...P_(t)})}function Bb(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...P_(t)})}function Vb(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...P_(t)})}function Hb(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...P_(t)})}function Ub(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...P_(t)})}function Wb(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...P_(t)})}function Gb(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...P_(t)})}function Kb(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...P_(t)})}function qb(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...P_(t)})}function Jb(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...P_(t)})}function Yb(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...P_(t)})}function Xb(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...P_(t)})}function Zb(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...P_(t)})}function Qb(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...P_(t)})}function $b(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...P_(t)})}function ex(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...P_(t)})}function tx(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...P_(t)})}function nx(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...P_(t)})}function rx(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...P_(t)})}function ix(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...P_(t)})}function ax(e,t){return new e({type:`number`,checks:[],...P_(t)})}function ox(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...P_(t)})}function sx(e,t){return new e({type:`boolean`,...P_(t)})}function cx(e,t){return new e({type:`null`,...P_(t)})}function lx(e){return new e({type:`unknown`})}function ux(e,t){return new e({type:`never`,...P_(t)})}function dx(e,t){return new Xv({check:`less_than`,...P_(t),value:e,inclusive:!1})}function fx(e,t){return new Xv({check:`less_than`,...P_(t),value:e,inclusive:!0})}function px(e,t){return new Zv({check:`greater_than`,...P_(t),value:e,inclusive:!1})}function mx(e,t){return new Zv({check:`greater_than`,...P_(t),value:e,inclusive:!0})}function hx(e,t){return new Qv({check:`multiple_of`,...P_(t),value:e})}function gx(e,t){return new ey({check:`max_length`,...P_(t),maximum:e})}function _x(e,t){return new ty({check:`min_length`,...P_(t),minimum:e})}function vx(e,t){return new ny({check:`length_equals`,...P_(t),length:e})}function yx(e,t){return new iy({check:`string_format`,format:`regex`,...P_(t),pattern:e})}function bx(e){return new ay({check:`string_format`,format:`lowercase`,...P_(e)})}function xx(e){return new oy({check:`string_format`,format:`uppercase`,...P_(e)})}function Sx(e,t){return new sy({check:`string_format`,format:`includes`,...P_(t),includes:e})}function Cx(e,t){return new cy({check:`string_format`,format:`starts_with`,...P_(t),prefix:e})}function wx(e,t){return new ly({check:`string_format`,format:`ends_with`,...P_(t),suffix:e})}function Tx(e){return new uy({check:`overwrite`,tx:e})}function Ex(e){return Tx(t=>t.normalize(e))}function Dx(){return Tx(e=>e.trim())}function Ox(){return Tx(e=>e.toLowerCase())}function kx(){return Tx(e=>e.toUpperCase())}function Ax(){return Tx(e=>T_(e))}function jx(e,t,n){return new e({type:`array`,element:t,...P_(n)})}function Mx(e,t,n){let r=P_(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Nx(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...P_(n)})}function Px(e,t){let n=Fx(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(X_(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(X_(r))}},e(t.value,t)),t);return n}function Fx(e,t){let n=new Jv({check:`custom`,...P_(t)});return n._zod.check=e,n}function Ix(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??jb,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Lx(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Lx(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&Bx(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Rx(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
96
|
-
|
|
97
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function zx(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Hx(t,`input`,e.processors),output:Hx(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Bx(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Bx(r.element,n);if(r.type===`set`)return Bx(r.valueType,n);if(r.type===`lazy`)return Bx(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return Bx(r.innerType,n);if(r.type===`intersection`)return Bx(r.left,n)||Bx(r.right,n);if(r.type===`record`||r.type===`map`)return Bx(r.keyType,n)||Bx(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Bx(r.in,n)||Bx(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Bx(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Bx(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Bx(e,n))return!0;return!!(r.rest&&Bx(r.rest,n))}return!1}var Vx=(e,t={})=>n=>{let r=Ix({...n,processors:t});return Lx(e,r),Rx(r,e),zx(r,e)},Hx=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Ix({...i??{},target:a,io:t,processors:n});return Lx(e,o),Rx(o,e),zx(o,e)},Ux={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Wx=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ux[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Gx=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},Kx=(e,t,n,r)=>{n.type=`boolean`},qx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},Jx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},Yx=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Xx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},Zx=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},Qx=(e,t,n,r)=>{n.not={}},$x=(e,t,n,r)=>{},eS=(e,t,n,r)=>{},tS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},nS=(e,t,n,r)=>{let i=e._zod.def,a=m_(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},rS=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},iS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},aS=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},oS=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},sS=(e,t,n,r)=>{n.type=`boolean`},cS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},lS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},uS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},dS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},fS=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},pS=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Lx(a.element,t,{...r,path:[...r.path,`items`]})},mS=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Lx(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Lx(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},hS=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Lx(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},gS=(e,t,n,r)=>{let i=e._zod.def,a=Lx(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Lx(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},_S=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>Lx(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?Lx(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},vS=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Lx(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Lx(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Lx(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},yS=(e,t,n,r)=>{let i=e._zod.def,a=Lx(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},bS=(e,t,n,r)=>{let i=e._zod.def;Lx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},xS=(e,t,n,r)=>{let i=e._zod.def;Lx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},SS=(e,t,n,r)=>{let i=e._zod.def;Lx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},CS=(e,t,n,r)=>{let i=e._zod.def;Lx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},wS=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Lx(o,t,r);let s=t.seen.get(e);s.ref=o},TS=(e,t,n,r)=>{let i=e._zod.def;Lx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ES=(e,t,n,r)=>{let i=e._zod.def;Lx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},DS=(e,t,n,r)=>{let i=e._zod.def;Lx(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},OS=(e,t,n,r)=>{let i=e._zod.innerType;Lx(i,t,r);let a=t.seen.get(e);a.ref=i},kS={string:Wx,number:Gx,boolean:Kx,bigint:qx,symbol:Jx,null:Yx,undefined:Xx,void:Zx,never:Qx,any:$x,unknown:eS,date:tS,enum:nS,literal:rS,nan:iS,template_literal:aS,file:oS,success:sS,custom:cS,function:lS,transform:uS,map:dS,set:fS,array:pS,object:mS,union:hS,intersection:gS,tuple:_S,record:vS,nullable:yS,nonoptional:bS,default:xS,prefault:SS,catch:CS,pipe:wS,readonly:TS,promise:ES,optional:DS,lazy:OS};function AS(e,t){if(`_idmap`in e){let n=e,r=Ix({...t,processors:kS}),i={};for(let e of n._idmap.entries()){let[t,n]=e;Lx(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Rx(r,n),a[t]=zx(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Ix({...t,processors:kS});return Lx(e,n),Rx(n,e),zx(n,e)}var jS=W(`ZodISODateTime`,(e,t)=>{Dy.init(e,t),iC.init(e,t)});function MS(e){return tx(jS,e)}var NS=W(`ZodISODate`,(e,t)=>{Oy.init(e,t),iC.init(e,t)});function PS(e){return nx(NS,e)}var FS=W(`ZodISOTime`,(e,t)=>{ky.init(e,t),iC.init(e,t)});function IS(e){return rx(FS,e)}var LS=W(`ZodISODuration`,(e,t)=>{Ay.init(e,t),iC.init(e,t)});function RS(e){return ix(LS,e)}var zS=W(`ZodError`,(e,t)=>{Q_.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>tv(e,t)},flatten:{value:t=>ev(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,h_,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,h_,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),BS=nv(zS),VS=rv(zS),HS=iv(zS),US=ov(zS),WS=cv(zS),GS=lv(zS),KS=uv(zS),qS=dv(zS),JS=fv(zS),YS=pv(zS),XS=mv(zS),ZS=hv(zS),QS=new WeakMap;function $S(e,t,n){let r=Object.getPrototypeOf(e),i=QS.get(r);if(i||(i=new Set,QS.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var eC=W(`ZodType`,(e,t)=>(py.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Hx(e,`input`),output:Hx(e,`output`)}}),e.toJSONSchema=Vx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>BS(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>HS(e,t,n),e.parseAsync=async(t,n)=>VS(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>US(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>WS(e,t,n),e.decode=(t,n)=>GS(e,t,n),e.encodeAsync=async(t,n)=>KS(e,t,n),e.decodeAsync=async(t,n)=>qS(e,t,n),e.safeEncode=(t,n)=>JS(e,t,n),e.safeDecode=(t,n)=>YS(e,t,n),e.safeEncodeAsync=async(t,n)=>XS(e,t,n),e.safeDecodeAsync=async(t,n)=>ZS(e,t,n),$S(e,`ZodType`,{check(...e){let t=this.def;return this.clone(C_(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return N_(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Cw(e,t))},superRefine(e,t){return this.check(ww(e,t))},overwrite(e){return this.check(Tx(e))},optional(){return nw(this)},exactOptional(){return iw(this)},nullable(){return ow(this)},nullish(){return nw(ow(this))},nonoptional(e){return fw(this,e)},array(){return LC(this)},or(e){return HC([this,e])},and(e){return KC(this,e)},transform(e){return gw(this,ew(e))},default(e){return cw(this,e)},prefault(e){return uw(this,e)},catch(e){return mw(this,e)},pipe(e){return gw(this,e)},readonly(){return vw(this)},describe(e){let t=this.clone();return jb.add(t,{description:e}),t},meta(...e){if(e.length===0)return jb.get(this);let t=this.clone();return jb.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return jb.get(e)?.description},configurable:!0}),e)),tC=W(`_ZodString`,(e,t)=>{my.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wx(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,$S(e,`_ZodString`,{regex(...e){return this.check(yx(...e))},includes(...e){return this.check(Sx(...e))},startsWith(...e){return this.check(Cx(...e))},endsWith(...e){return this.check(wx(...e))},min(...e){return this.check(_x(...e))},max(...e){return this.check(gx(...e))},length(...e){return this.check(vx(...e))},nonempty(...e){return this.check(_x(1,...e))},lowercase(e){return this.check(bx(e))},uppercase(e){return this.check(xx(e))},trim(){return this.check(Dx())},normalize(...e){return this.check(Ex(...e))},toLowerCase(){return this.check(Ox())},toUpperCase(){return this.check(kx())},slugify(){return this.check(Ax())}})}),nC=W(`ZodString`,(e,t)=>{my.init(e,t),tC.init(e,t),e.email=t=>e.check(Nb(aC,t)),e.url=t=>e.check(zb(cC,t)),e.jwt=t=>e.check(ex(CC,t)),e.emoji=t=>e.check(Bb(lC,t)),e.guid=t=>e.check(Pb(oC,t)),e.uuid=t=>e.check(Fb(sC,t)),e.uuidv4=t=>e.check(Ib(sC,t)),e.uuidv6=t=>e.check(Lb(sC,t)),e.uuidv7=t=>e.check(Rb(sC,t)),e.nanoid=t=>e.check(Vb(uC,t)),e.guid=t=>e.check(Pb(oC,t)),e.cuid=t=>e.check(Hb(dC,t)),e.cuid2=t=>e.check(Ub(fC,t)),e.ulid=t=>e.check(Wb(pC,t)),e.base64=t=>e.check(Zb(bC,t)),e.base64url=t=>e.check(Qb(xC,t)),e.xid=t=>e.check(Gb(mC,t)),e.ksuid=t=>e.check(Kb(hC,t)),e.ipv4=t=>e.check(qb(gC,t)),e.ipv6=t=>e.check(Jb(_C,t)),e.cidrv4=t=>e.check(Yb(vC,t)),e.cidrv6=t=>e.check(Xb(yC,t)),e.e164=t=>e.check($b(SC,t)),e.datetime=t=>e.check(MS(t)),e.date=t=>e.check(PS(t)),e.time=t=>e.check(IS(t)),e.duration=t=>e.check(RS(t))});function rC(e){return Mb(nC,e)}var iC=W(`ZodStringFormat`,(e,t)=>{hy.init(e,t),tC.init(e,t)}),aC=W(`ZodEmail`,(e,t)=>{vy.init(e,t),iC.init(e,t)}),oC=W(`ZodGUID`,(e,t)=>{gy.init(e,t),iC.init(e,t)}),sC=W(`ZodUUID`,(e,t)=>{_y.init(e,t),iC.init(e,t)}),cC=W(`ZodURL`,(e,t)=>{yy.init(e,t),iC.init(e,t)}),lC=W(`ZodEmoji`,(e,t)=>{by.init(e,t),iC.init(e,t)}),uC=W(`ZodNanoID`,(e,t)=>{xy.init(e,t),iC.init(e,t)}),dC=W(`ZodCUID`,(e,t)=>{Sy.init(e,t),iC.init(e,t)}),fC=W(`ZodCUID2`,(e,t)=>{Cy.init(e,t),iC.init(e,t)}),pC=W(`ZodULID`,(e,t)=>{wy.init(e,t),iC.init(e,t)}),mC=W(`ZodXID`,(e,t)=>{Ty.init(e,t),iC.init(e,t)}),hC=W(`ZodKSUID`,(e,t)=>{Ey.init(e,t),iC.init(e,t)}),gC=W(`ZodIPv4`,(e,t)=>{jy.init(e,t),iC.init(e,t)}),_C=W(`ZodIPv6`,(e,t)=>{My.init(e,t),iC.init(e,t)}),vC=W(`ZodCIDRv4`,(e,t)=>{Ny.init(e,t),iC.init(e,t)}),yC=W(`ZodCIDRv6`,(e,t)=>{Py.init(e,t),iC.init(e,t)}),bC=W(`ZodBase64`,(e,t)=>{Iy.init(e,t),iC.init(e,t)}),xC=W(`ZodBase64URL`,(e,t)=>{Ry.init(e,t),iC.init(e,t)}),SC=W(`ZodE164`,(e,t)=>{zy.init(e,t),iC.init(e,t)}),CC=W(`ZodJWT`,(e,t)=>{Vy.init(e,t),iC.init(e,t)}),wC=W(`ZodNumber`,(e,t)=>{Hy.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gx(e,t,n,r),$S(e,`ZodNumber`,{gt(e,t){return this.check(px(e,t))},gte(e,t){return this.check(mx(e,t))},min(e,t){return this.check(mx(e,t))},lt(e,t){return this.check(dx(e,t))},lte(e,t){return this.check(fx(e,t))},max(e,t){return this.check(fx(e,t))},int(e){return this.check(DC(e))},safe(e){return this.check(DC(e))},positive(e){return this.check(px(0,e))},nonnegative(e){return this.check(mx(0,e))},negative(e){return this.check(dx(0,e))},nonpositive(e){return this.check(fx(0,e))},multipleOf(e,t){return this.check(hx(e,t))},step(e,t){return this.check(hx(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function TC(e){return ax(wC,e)}var EC=W(`ZodNumberFormat`,(e,t)=>{Uy.init(e,t),wC.init(e,t)});function DC(e){return ox(EC,e)}var OC=W(`ZodBoolean`,(e,t)=>{Wy.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kx(e,t,n,r)});function kC(e){return sx(OC,e)}var AC=W(`ZodNull`,(e,t)=>{Gy.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yx(e,t,n,r)});function jC(e){return cx(AC,e)}var MC=W(`ZodUnknown`,(e,t)=>{Ky.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function NC(){return lx(MC)}var PC=W(`ZodNever`,(e,t)=>{qy.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qx(e,t,n,r)});function FC(e){return ux(PC,e)}var IC=W(`ZodArray`,(e,t)=>{Yy.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pS(e,t,n,r),e.element=t.element,$S(e,`ZodArray`,{min(e,t){return this.check(_x(e,t))},nonempty(e){return this.check(_x(1,e))},max(e,t){return this.check(gx(e,t))},length(e,t){return this.check(vx(e,t))},unwrap(){return this.element}})});function LC(e,t){return jx(IC,e,t)}var RC=W(`ZodObject`,(e,t)=>{eb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mS(e,t,n,r),x_(e,`shape`,()=>t.shape),$S(e,`ZodObject`,{keyof(){return XC(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:NC()})},loose(){return this.clone({...this._zod.def,catchall:NC()})},strict(){return this.clone({...this._zod.def,catchall:FC()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return z_(this,e)},safeExtend(e){return B_(this,e)},merge(e){return V_(this,e)},pick(e){return L_(this,e)},omit(e){return R_(this,e)},partial(...e){return H_(tw,this,e[0])},required(...e){return U_(dw,this,e[0])}})});function zC(e,t){return new RC({type:`object`,shape:e??{},...P_(t)})}function BC(e,t){return new RC({type:`object`,shape:e,catchall:FC(),...P_(t)})}var VC=W(`ZodUnion`,(e,t)=>{nb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hS(e,t,n,r),e.options=t.options});function HC(e,t){return new VC({type:`union`,options:e,...P_(t)})}var UC=W(`ZodDiscriminatedUnion`,(e,t)=>{VC.init(e,t),rb.init(e,t)});function WC(e,t,n){return new UC({type:`union`,options:t,discriminator:e,...P_(n)})}var GC=W(`ZodIntersection`,(e,t)=>{ib.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gS(e,t,n,r)});function KC(e,t){return new GC({type:`intersection`,left:e,right:t})}var qC=W(`ZodRecord`,(e,t)=>{sb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vS(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function JC(e,t,n){return!t||!t._zod?new qC({type:`record`,keyType:rC(),valueType:e,...P_(t)}):new qC({type:`record`,keyType:e,valueType:t,...P_(n)})}var YC=W(`ZodEnum`,(e,t)=>{cb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nS(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new YC({...t,checks:[],...P_(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new YC({...t,checks:[],...P_(r),entries:i})}});function XC(e,t){return new YC({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...P_(t)})}var ZC=W(`ZodLiteral`,(e,t)=>{lb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rS(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function QC(e,t){return new ZC({type:`literal`,values:Array.isArray(e)?e:[e],...P_(t)})}var $C=W(`ZodTransform`,(e,t)=>{ub.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uS(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new d_(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(X_(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(X_(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function ew(e){return new $C({type:`transform`,transform:e})}var tw=W(`ZodOptional`,(e,t)=>{fb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nw(e){return new tw({type:`optional`,innerType:e})}var rw=W(`ZodExactOptional`,(e,t)=>{pb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iw(e){return new rw({type:`optional`,innerType:e})}var aw=W(`ZodNullable`,(e,t)=>{mb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ow(e){return new aw({type:`nullable`,innerType:e})}var sw=W(`ZodDefault`,(e,t)=>{hb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cw(e,t){return new sw({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():A_(t)}})}var lw=W(`ZodPrefault`,(e,t)=>{_b.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uw(e,t){return new lw({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():A_(t)}})}var dw=W(`ZodNonOptional`,(e,t)=>{vb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fw(e,t){return new dw({type:`nonoptional`,innerType:e,...P_(t)})}var pw=W(`ZodCatch`,(e,t)=>{bb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mw(e,t){return new pw({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var hw=W(`ZodPipe`,(e,t)=>{xb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wS(e,t,n,r),e.in=t.in,e.out=t.out});function gw(e,t){return new hw({type:`pipe`,in:e,out:t})}var _w=W(`ZodReadonly`,(e,t)=>{Cb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vw(e){return new _w({type:`readonly`,innerType:e})}var yw=W(`ZodLazy`,(e,t)=>{Tb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OS(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function bw(e){return new yw({type:`lazy`,getter:e})}var xw=W(`ZodCustom`,(e,t)=>{Eb.init(e,t),eC.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cS(e,t,n,r)});function Sw(e,t){return Mx(xw,e??(()=>!0),t)}function Cw(e,t={}){return Nx(xw,e,t)}function ww(e,t){return Px(e,t)}function Tw(e,t={}){let n=new xw({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...P_(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Ew;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(Ew||={});var Dw;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Dw||={});var Ow=Ew.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),kw=e=>{switch(typeof e){case`undefined`:return Ow.undefined;case`string`:return Ow.string;case`number`:return Number.isNaN(e)?Ow.nan:Ow.number;case`boolean`:return Ow.boolean;case`function`:return Ow.function;case`bigint`:return Ow.bigint;case`symbol`:return Ow.symbol;case`object`:return Array.isArray(e)?Ow.array:e===null?Ow.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?Ow.promise:typeof Map<`u`&&e instanceof Map?Ow.map:typeof Set<`u`&&e instanceof Set?Ow.set:typeof Date<`u`&&e instanceof Date?Ow.date:Ow.object;default:return Ow.unknown}},Aw=Ew.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),jw=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ew.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t=Object.create(null),n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};jw.create=e=>new jw(e);var Mw=(e,t)=>{let n;switch(e.code){case Aw.invalid_type:n=e.received===Ow.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case Aw.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ew.jsonStringifyReplacer)}`;break;case Aw.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ew.joinValues(e.keys,`, `)}`;break;case Aw.invalid_union:n=`Invalid input`;break;case Aw.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ew.joinValues(e.options)}`;break;case Aw.invalid_enum_value:n=`Invalid enum value. Expected ${Ew.joinValues(e.options)}, received '${e.received}'`;break;case Aw.invalid_arguments:n=`Invalid function arguments`;break;case Aw.invalid_return_type:n=`Invalid function return type`;break;case Aw.invalid_date:n=`Invalid date`;break;case Aw.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ew.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case Aw.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case Aw.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case Aw.custom:n=`Invalid input`;break;case Aw.invalid_intersection_types:n=`Intersection results could not be merged`;break;case Aw.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Aw.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,Ew.assertNever(e)}return{message:n}},Nw=Mw;function Pw(){return Nw}var Fw=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Iw(e,t){let n=Pw(),r=Fw({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Mw?void 0:Mw].filter(e=>!!e)});e.common.issues.push(r)}var Lw=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return Rw;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return Rw;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},Rw=Object.freeze({status:`aborted`}),zw=e=>({status:`dirty`,value:e}),Bw=e=>({status:`valid`,value:e}),Vw=e=>e.status===`aborted`,Hw=e=>e.status===`dirty`,Uw=e=>e.status===`valid`,Ww=e=>typeof Promise<`u`&&e instanceof Promise,Gw;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Gw||={});var Kw=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},qw=(e,t)=>{if(Uw(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new jw(e.common.issues);return this._error=t,this._error}}};function Jw(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var Yw=class{get description(){return this._def.description}_getType(e){return kw(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:kw(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lw,ctx:{common:e.parent.common,data:e.data,parsedType:kw(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Ww(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kw(e)};return qw(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kw(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Uw(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Uw(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kw(e)},r=this._parse({data:e,path:n.path,parent:n});return qw(n,await(Ww(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:Aw.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new QT({schema:this,typeName:sE.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return $T.create(this,this._def)}nullable(){return eE.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return NT.create(this)}promise(){return ZT.create(this,this._def)}or(e){return IT.create([this,e],this._def)}and(e){return BT.create(this,e,this._def)}transform(e){return new QT({...Jw(this._def),schema:this,typeName:sE.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new tE({...Jw(this._def),innerType:this,defaultValue:t,typeName:sE.ZodDefault})}brand(){return new iE({typeName:sE.ZodBranded,type:this,...Jw(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new nE({...Jw(this._def),innerType:this,catchValue:t,typeName:sE.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return aE.create(this,e)}readonly(){return oE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Xw=/^c[^\s-]{8,}$/i,Zw=/^[0-9a-z]+$/,Qw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,$w=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,eT=/^[a-z0-9_-]{21}$/i,tT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,rT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,iT=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,aT,oT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,sT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,cT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,lT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fT=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,pT=RegExp(`^${fT}$`);function mT(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function hT(e){return RegExp(`^${mT(e)}$`)}function gT(e){let t=`${fT}T${mT(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function _T(e,t){return!!((t===`v4`||!t)&&oT.test(e)||(t===`v6`||!t)&&cT.test(e))}function vT(e,t){if(!tT.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function yT(e,t){return!!((t===`v4`||!t)&&sT.test(e)||(t===`v6`||!t)&&lT.test(e))}var bT=class e extends Yw{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ow.string){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.string,received:t.parsedType}),Rw}let t=new Lw,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?Iw(n,{code:Aw.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&Iw(n,{code:Aw.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)rT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`email`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)aT||=new RegExp(iT,`u`),aT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`emoji`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)$w.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`uuid`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)eT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`nanoid`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Xw.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`cuid`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)Zw.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`cuid2`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)Qw.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`ulid`,code:Aw.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Iw(n,{validation:`url`,code:Aw.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`regex`,code:Aw.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?gT(r).test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?pT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?hT(r).test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?nT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`duration`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?_T(e.data,r.version)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`ip`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?vT(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`jwt`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?yT(e.data,r.version)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`cidr`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?uT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`base64`,code:Aw.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?dT.test(e.data)||(n=this._getOrReturnCtx(e,n),Iw(n,{validation:`base64url`,code:Aw.invalid_string,message:r.message}),t.dirty()):Ew.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:Aw.invalid_string,...Gw.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Gw.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Gw.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Gw.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Gw.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Gw.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Gw.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Gw.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Gw.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Gw.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Gw.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Gw.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Gw.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Gw.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Gw.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Gw.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Gw.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Gw.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Gw.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Gw.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Gw.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Gw.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Gw.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Gw.errToObj(t)})}nonempty(e){return this.min(1,Gw.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};bT.create=e=>new bT({checks:[],typeName:sE.ZodString,coerce:e?.coerce??!1,...Jw(e)});function xT(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var ST=class e extends Yw{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ow.number){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.number,received:t.parsedType}),Rw}let t,n=new Lw;for(let r of this._def.checks)r.kind===`int`?Ew.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?xT(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.not_finite,message:r.message}),n.dirty()):Ew.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Gw.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Gw.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Gw.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Gw.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Gw.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Gw.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Gw.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Gw.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Gw.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Gw.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Gw.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Gw.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Gw.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Gw.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&Ew.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};ST.create=e=>new ST({checks:[],typeName:sE.ZodNumber,coerce:e?.coerce||!1,...Jw(e)});var CT=class e extends Yw{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ow.bigint)return this._getInvalidInput(e);let t,n=new Lw;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Iw(t,{code:Aw.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Ew.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.bigint,received:t.parsedType}),Rw}gte(e,t){return this.setLimit(`min`,e,!0,Gw.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Gw.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Gw.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Gw.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Gw.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Gw.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Gw.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Gw.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Gw.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Gw.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};CT.create=e=>new CT({checks:[],typeName:sE.ZodBigInt,coerce:e?.coerce??!1,...Jw(e)});var wT=class extends Yw{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ow.boolean){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.boolean,received:t.parsedType}),Rw}return Bw(e.data)}};wT.create=e=>new wT({typeName:sE.ZodBoolean,coerce:e?.coerce||!1,...Jw(e)});var TT=class e extends Yw{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ow.date){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.date,received:t.parsedType}),Rw}if(Number.isNaN(e.data.getTime()))return Iw(this._getOrReturnCtx(e),{code:Aw.invalid_date}),Rw;let t=new Lw,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),Iw(n,{code:Aw.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):Ew.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Gw.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Gw.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};TT.create=e=>new TT({checks:[],coerce:e?.coerce||!1,typeName:sE.ZodDate,...Jw(e)});var ET=class extends Yw{_parse(e){if(this._getType(e)!==Ow.symbol){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.symbol,received:t.parsedType}),Rw}return Bw(e.data)}};ET.create=e=>new ET({typeName:sE.ZodSymbol,...Jw(e)});var DT=class extends Yw{_parse(e){if(this._getType(e)!==Ow.undefined){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.undefined,received:t.parsedType}),Rw}return Bw(e.data)}};DT.create=e=>new DT({typeName:sE.ZodUndefined,...Jw(e)});var OT=class extends Yw{_parse(e){if(this._getType(e)!==Ow.null){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.null,received:t.parsedType}),Rw}return Bw(e.data)}};OT.create=e=>new OT({typeName:sE.ZodNull,...Jw(e)});var kT=class extends Yw{constructor(){super(...arguments),this._any=!0}_parse(e){return Bw(e.data)}};kT.create=e=>new kT({typeName:sE.ZodAny,...Jw(e)});var AT=class extends Yw{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Bw(e.data)}};AT.create=e=>new AT({typeName:sE.ZodUnknown,...Jw(e)});var jT=class extends Yw{_parse(e){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.never,received:t.parsedType}),Rw}};jT.create=e=>new jT({typeName:sE.ZodNever,...Jw(e)});var MT=class extends Yw{_parse(e){if(this._getType(e)!==Ow.undefined){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.void,received:t.parsedType}),Rw}return Bw(e.data)}};MT.create=e=>new MT({typeName:sE.ZodVoid,...Jw(e)});var NT=class e extends Yw{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==Ow.array)return Iw(t,{code:Aw.invalid_type,expected:Ow.array,received:t.parsedType}),Rw;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(Iw(t,{code:e?Aw.too_big:Aw.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(Iw(t,{code:Aw.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(Iw(t,{code:Aw.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new Kw(t,e,t.path,n)))).then(e=>Lw.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Kw(t,e,t.path,n)));return Lw.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Gw.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Gw.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Gw.toString(n)}})}nonempty(e){return this.min(1,e)}};NT.create=(e,t)=>new NT({type:e,minLength:null,maxLength:null,exactLength:null,typeName:sE.ZodArray,...Jw(t)});function PT(e){if(e instanceof FT){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=$T.create(PT(r))}return new FT({...e._def,shape:()=>t})}else if(e instanceof NT)return new NT({...e._def,type:PT(e.element)});else if(e instanceof $T)return $T.create(PT(e.unwrap()));else if(e instanceof eE)return eE.create(PT(e.unwrap()));else if(e instanceof VT)return VT.create(e.items.map(e=>PT(e)));else return e}var FT=class e extends Yw{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Ew.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==Ow.object){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.object,received:t.parsedType}),Rw}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof jT&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new Kw(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof jT){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(Iw(n,{code:Aw.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new Kw(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Lw.mergeObjectSync(t,e)):Lw.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Gw.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Gw.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:sE.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of Ew.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of Ew.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return PT(this)}partial(t){let n={};for(let e of Ew.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of Ew.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof $T;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return JT(Ew.objectKeys(this.shape))}};FT.create=(e,t)=>new FT({shape:()=>e,unknownKeys:`strip`,catchall:jT.create(),typeName:sE.ZodObject,...Jw(t)}),FT.strictCreate=(e,t)=>new FT({shape:()=>e,unknownKeys:`strict`,catchall:jT.create(),typeName:sE.ZodObject,...Jw(t)}),FT.lazycreate=(e,t)=>new FT({shape:e,unknownKeys:`strip`,catchall:jT.create(),typeName:sE.ZodObject,...Jw(t)});var IT=class extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new jw(e.ctx.common.issues));return Iw(t,{code:Aw.invalid_union,unionErrors:n}),Rw}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new jw(e));return Iw(t,{code:Aw.invalid_union,unionErrors:i}),Rw}}get options(){return this._def.options}};IT.create=(e,t)=>new IT({options:e,typeName:sE.ZodUnion,...Jw(t)});var LT=e=>e instanceof KT?LT(e.schema):e instanceof QT?LT(e.innerType()):e instanceof qT?[e.value]:e instanceof YT?e.options:e instanceof XT?Ew.objectValues(e.enum):e instanceof tE?LT(e._def.innerType):e instanceof DT?[void 0]:e instanceof OT?[null]:e instanceof $T?[void 0,...LT(e.unwrap())]:e instanceof eE?[null,...LT(e.unwrap())]:e instanceof iE||e instanceof oE?LT(e.unwrap()):e instanceof nE?LT(e._def.innerType):[],RT=class e extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ow.object)return Iw(t,{code:Aw.invalid_type,expected:Ow.object,received:t.parsedType}),Rw;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Iw(t,{code:Aw.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Rw)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=LT(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:sE.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Jw(r)})}};function zT(e,t){let n=kw(e),r=kw(t);if(e===t)return{valid:!0,data:e};if(n===Ow.object&&r===Ow.object){let n=Ew.objectKeys(t),r=Ew.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=zT(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===Ow.array&&r===Ow.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=zT(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===Ow.date&&r===Ow.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var BT=class extends Yw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Vw(e)||Vw(r))return Rw;let i=zT(e.value,r.value);return i.valid?((Hw(e)||Hw(r))&&t.dirty(),{status:t.value,value:i.data}):(Iw(n,{code:Aw.invalid_intersection_types}),Rw)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};BT.create=(e,t,n)=>new BT({left:e,right:t,typeName:sE.ZodIntersection,...Jw(n)});var VT=class e extends Yw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ow.array)return Iw(n,{code:Aw.invalid_type,expected:Ow.array,received:n.parsedType}),Rw;if(n.data.length<this._def.items.length)return Iw(n,{code:Aw.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),Rw;!this._def.rest&&n.data.length>this._def.items.length&&(Iw(n,{code:Aw.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new Kw(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Lw.mergeArray(t,e)):Lw.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};VT.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new VT({items:e,typeName:sE.ZodTuple,rest:null,...Jw(t)})};var HT=class e extends Yw{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ow.object)return Iw(n,{code:Aw.invalid_type,expected:Ow.object,received:n.parsedType}),Rw;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Kw(n,e,n.path,e)),value:a._parse(new Kw(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Lw.mergeObjectAsync(t,r):Lw.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Yw?new e({keyType:t,valueType:n,typeName:sE.ZodRecord,...Jw(r)}):new e({keyType:bT.create(),valueType:t,typeName:sE.ZodRecord,...Jw(n)})}},UT=class extends Yw{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ow.map)return Iw(n,{code:Aw.invalid_type,expected:Ow.map,received:n.parsedType}),Rw;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Kw(n,e,n.path,[a,`key`])),value:i._parse(new Kw(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return Rw;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return Rw;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};UT.create=(e,t,n)=>new UT({valueType:t,keyType:e,typeName:sE.ZodMap,...Jw(n)});var WT=class e extends Yw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ow.set)return Iw(n,{code:Aw.invalid_type,expected:Ow.set,received:n.parsedType}),Rw;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(Iw(n,{code:Aw.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(Iw(n,{code:Aw.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return Rw;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new Kw(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Gw.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Gw.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};WT.create=(e,t)=>new WT({valueType:e,minSize:null,maxSize:null,typeName:sE.ZodSet,...Jw(t)});var GT=class e extends Yw{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ow.function)return Iw(t,{code:Aw.invalid_type,expected:Ow.function,received:t.parsedType}),Rw;function n(e,n){return Fw({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Pw(),Mw].filter(e=>!!e),issueData:{code:Aw.invalid_arguments,argumentsError:n}})}function r(e,n){return Fw({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Pw(),Mw].filter(e=>!!e),issueData:{code:Aw.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ZT){let e=this;return Bw(async function(...t){let o=new jw([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return Bw(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new jw([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new jw([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:VT.create(t).rest(AT.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||VT.create([]).rest(AT.create()),returns:n||AT.create(),typeName:sE.ZodFunction,...Jw(r)})}},KT=class extends Yw{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};KT.create=(e,t)=>new KT({getter:e,typeName:sE.ZodLazy,...Jw(t)});var qT=class extends Yw{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Iw(t,{received:t.data,code:Aw.invalid_literal,expected:this._def.value}),Rw}return{status:`valid`,value:e.data}}get value(){return this._def.value}};qT.create=(e,t)=>new qT({value:e,typeName:sE.ZodLiteral,...Jw(t)});function JT(e,t){return new YT({values:e,typeName:sE.ZodEnum,...Jw(t)})}var YT=class e extends Yw{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return Iw(t,{expected:Ew.joinValues(n),received:t.parsedType,code:Aw.invalid_type}),Rw}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return Iw(t,{received:t.data,code:Aw.invalid_enum_value,options:n}),Rw}return Bw(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};YT.create=JT;var XT=class extends Yw{_parse(e){let t=Ew.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ow.string&&n.parsedType!==Ow.number){let e=Ew.objectValues(t);return Iw(n,{expected:Ew.joinValues(e),received:n.parsedType,code:Aw.invalid_type}),Rw}if(this._cache||=new Set(Ew.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=Ew.objectValues(t);return Iw(n,{received:n.data,code:Aw.invalid_enum_value,options:e}),Rw}return Bw(e.data)}get enum(){return this._def.values}};XT.create=(e,t)=>new XT({values:e,typeName:sE.ZodNativeEnum,...Jw(t)});var ZT=class extends Yw{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==Ow.promise&&t.common.async===!1?(Iw(t,{code:Aw.invalid_type,expected:Ow.promise,received:t.parsedType}),Rw):Bw((t.parsedType===Ow.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};ZT.create=(e,t)=>new ZT({type:e,typeName:sE.ZodPromise,...Jw(t)});var QT=class extends Yw{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===sE.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Iw(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return Rw;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?Rw:r.status===`dirty`||t.value===`dirty`?zw(r.value):r});{if(t.value===`aborted`)return Rw;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?Rw:r.status===`dirty`||t.value===`dirty`?zw(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?Rw:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?Rw:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Uw(e))return Rw;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Uw(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):Rw);Ew.assertNever(r)}};QT.create=(e,t,n)=>new QT({schema:e,typeName:sE.ZodEffects,effect:t,...Jw(n)}),QT.createWithPreprocess=(e,t,n)=>new QT({schema:t,effect:{type:`preprocess`,transform:e},typeName:sE.ZodEffects,...Jw(n)});var $T=class extends Yw{_parse(e){return this._getType(e)===Ow.undefined?Bw(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$T.create=(e,t)=>new $T({innerType:e,typeName:sE.ZodOptional,...Jw(t)});var eE=class extends Yw{_parse(e){return this._getType(e)===Ow.null?Bw(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};eE.create=(e,t)=>new eE({innerType:e,typeName:sE.ZodNullable,...Jw(t)});var tE=class extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===Ow.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};tE.create=(e,t)=>new tE({innerType:e,typeName:sE.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Jw(t)});var nE=class extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ww(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new jw(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new jw(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};nE.create=(e,t)=>new nE({innerType:e,typeName:sE.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Jw(t)});var rE=class extends Yw{_parse(e){if(this._getType(e)!==Ow.nan){let t=this._getOrReturnCtx(e);return Iw(t,{code:Aw.invalid_type,expected:Ow.nan,received:t.parsedType}),Rw}return{status:`valid`,value:e.data}}};rE.create=e=>new rE({typeName:sE.ZodNaN,...Jw(e)});var iE=class extends Yw{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},aE=class e extends Yw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Rw:e.status===`dirty`?(t.dirty(),zw(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Rw:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:sE.ZodPipeline})}},oE=class extends Yw{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Uw(e)&&(e.value=Object.freeze(e.value)),e);return Ww(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};oE.create=(e,t)=>new oE({innerType:e,typeName:sE.ZodReadonly,...Jw(t)}),FT.lazycreate;var sE;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(sE||={}),bT.create,ST.create,rE.create,CT.create,wT.create,TT.create,ET.create,DT.create,OT.create,kT.create,AT.create,jT.create,MT.create,NT.create,FT.create,FT.strictCreate,IT.create,RT.create,BT.create,VT.create,HT.create,UT.create,WT.create,GT.create,KT.create,qT.create,YT.create,XT.create,ZT.create,QT.create,$T.create,eE.create,QT.createWithPreprocess,aE.create;var cE=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},lE=10,uE=13,dE=32;function fE(e){}function pE(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=fE,onError:n=fE,onRetry:r=fE,onComment:i,maxBufferSize:a}=e,o=[],s=0,c=!0,l,u=``,d=0,f,p=!1;function m(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),o.length===0){let t=g(e);t!==``&&(o.push(t),s=t.length),h();return}if(e.indexOf(`
|
|
98
|
-
`)===-1&&e.indexOf(`\r`)===-1){o.push(e),s+=e.length,h();return}o.push(e);let t=o.join(``);o.length=0,s=0;let n=g(t);n!==``&&(o.push(n),s=n.length),h()}function h(){a!==void 0&&(s+u.length<=a||(p=!0,o.length=0,s=0,l=void 0,u=``,d=0,f=void 0,n(new cE(`Buffered data exceeded max buffer size of ${a} characters`,{type:`max-buffer-size-exceeded`}))))}function g(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(`
|
|
99
|
-
`,n);for(;r!==-1;){if(n===r){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0,n=r+1,r=e.indexOf(`
|
|
100
|
-
`,n);continue}let i=e.charCodeAt(n);if(mE(e,n,i)){let i=e.charCodeAt(n+5)===dE?n+6:n+5,a=e.slice(i,r);if(d===0&&e.charCodeAt(r+1)===lE){t({id:l,event:f,data:a}),l=void 0,u=``,f=void 0,n=r+2,r=e.indexOf(`
|
|
101
|
-
`,n);continue}u=d===0?a:`${u}
|
|
102
|
-
${a}`,d++}else hE(e,n,i)?f=e.slice(e.charCodeAt(n+6)===dE?n+7:n+6,r)||void 0:_(e,n,r);n=r+1,r=e.indexOf(`
|
|
103
|
-
`,n)}return e.slice(n)}for(;n<e.length;){let t=e.indexOf(`\r`,n),r=e.indexOf(`
|
|
104
|
-
`,n),i=-1;if(t!==-1&&r!==-1?i=t<r?t:r:t===-1?r!==-1&&(i=r):i=t===e.length-1?-1:t,i===-1)break;_(e,n,i),n=i+1,e.charCodeAt(n-1)===uE&&e.charCodeAt(n)===lE&&n++}return e.slice(n)}function _(e,t,n){if(t===n){y();return}let r=e.charCodeAt(t);if(mE(e,t,r)){let r=e.charCodeAt(t+5)===dE?t+6:t+5,i=e.slice(r,n);u=d===0?i:`${u}
|
|
105
|
-
${i}`,d++;return}if(hE(e,t,r)){f=e.slice(e.charCodeAt(t+6)===dE?t+7:t+6,n)||void 0;return}if(r===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let r=e.slice(e.charCodeAt(t+3)===dE?t+4:t+3,n);l=r.includes(`\0`)?void 0:r;return}if(r===58){i&&i(e.slice(t,n).slice(e.charCodeAt(t+1)===dE?2:1));return}let a=e.slice(t,n),o=a.indexOf(`:`);if(o===-1){v(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===dE?2:1;v(s,a.slice(o+c),a)}function v(e,t,i){switch(e){case`event`:f=t||void 0;break;case`data`:u=d===0?t:`${u}
|
|
106
|
-
${t}`,d++;break;case`id`:l=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new cE(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new cE(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function y(){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0}function b(e={}){if(e.consume&&o.length>0){let e=o.join(``);_(e,0,e.length)}c=!0,l=void 0,u=``,d=0,f=void 0,o.length=0,s=0,p=!1}return{feed:m,reset:b}}function mE(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function hE(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}var gE=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n,maxBufferSize:r}={}){let i;super({start(a){i=pE({onEvent:e=>{a.enqueue(e)},onError(t){typeof e==`function`&&e(t),(e===`terminate`||t.type===`max-buffer-size-exceeded`)&&a.error(t)},onRetry:t,onComment:n,maxBufferSize:r})},transform(e){i.feed(e)}})}},{btoa:_E,atob:vE}=globalThis,yE=({prefix:e,size:t=16,alphabet:n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,separator:r=`-`}={})=>{let i=()=>{let e=n.length,r=Array(t);for(let i=0;i<t;i++)r[i]=n[Math.random()*e|0];return r.join(``)};if(e==null)return i;if(n.includes(r))throw new Xg({argument:`separator`,message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},bE=yE();function xE(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((e,n)=>{t[n.toLowerCase()]=e});else{Array.isArray(e)||(e=Object.entries(e));for(let[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}var SE=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,CE=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function wE(e){let t=JSON.parse(e);return typeof t!=`object`||!t||SE.test(e)===!1&&CE.test(e)===!1?t:TE(t)}function TE(e){let t=[e];for(;t.length;){let e=t;t=[];for(let n of e){if(Object.prototype.hasOwnProperty.call(n,`__proto__`)||Object.prototype.hasOwnProperty.call(n,`constructor`)&&n.constructor!==null&&typeof n.constructor==`object`&&Object.prototype.hasOwnProperty.call(n.constructor,`prototype`))throw SyntaxError(`Object contains forbidden prototype property`);for(let e in n){let r=n[e];r&&typeof r==`object`&&t.push(r)}}}return e}function EE(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return wE(e)}try{return wE(e)}finally{Error.stackTraceLimit=t}}function DE(e){if(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)){e.additionalProperties=!1;let{properties:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=OE(t[e])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(OE):OE(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(OE)),e.allOf!=null&&(e.allOf=e.allOf.map(OE)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(OE));let{definitions:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=OE(t[e]);return e}function OE(e){return typeof e==`boolean`?e:DE(e)}var kE=Symbol(`Let zodToJsonSchema decide on which parser to use`),AE={name:void 0,$refStrategy:`root`,basePath:[`#`],effectStrategy:`input`,pipeStrategy:`all`,dateStrategy:`format:date-time`,mapStrategy:`entries`,removeAdditionalStrategy:`passthrough`,allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:`definitions`,strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:`escape`,applyRegexFlags:!1,emailStrategy:`format:email`,base64Strategy:`contentEncoding:base64`,nameStrategy:`ref`},jE=e=>typeof e==`string`?{...AE,name:e}:{...AE,...e};function ME(){return{}}function NE(e,t){let n={type:`array`};return e.type?._def&&e.type?._def?.typeName!==sE.ZodAny&&(n.items=wD(e.type._def,{...t,currentPath:[...t.currentPath,`items`]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}function PE(e){let t={type:`integer`,format:`int64`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value;break}return t}function FE(){return{type:`boolean`}}function IE(e,t){return wD(e.type._def,t)}var LE=(e,t)=>wD(e.innerType._def,t);function RE(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,r)=>RE(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return zE(e)}}var zE=e=>{let t={type:`integer`,format:`unix-time`};for(let n of e.checks)switch(n.kind){case`min`:t.minimum=n.value;break;case`max`:t.maximum=n.value;break}return t};function BE(e,t){return{...wD(e.innerType._def,t),default:e.defaultValue()}}function VE(e,t){return t.effectStrategy===`input`?wD(e.schema._def,t):ME()}function HE(e){return{type:`string`,enum:Array.from(e.values)}}var UE=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function WE(e,t){let n=[wD(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),wD(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=[];return n.forEach(e=>{if(UE(e))r.push(...e.allOf);else{let t=e;if(`additionalProperties`in e&&e.additionalProperties===!1){let{additionalProperties:n,...r}=e;t=r}r.push(t)}}),r.length?{allOf:r}:void 0}function GE(e){let t=typeof e.value;return t!==`bigint`&&t!==`number`&&t!==`boolean`&&t!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:{type:t===`bigint`?`integer`:t,const:e.value}}var KE=void 0,qE={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(KE===void 0&&(KE=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),KE),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function JE(e,t){let n={type:`string`};if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value;break;case`max`:n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`email`:switch(t.emailStrategy){case`format:email`:QE(n,`email`,r.message,t);break;case`format:idn-email`:QE(n,`idn-email`,r.message,t);break;case`pattern:zod`:$E(n,qE.email,r.message,t);break}break;case`url`:QE(n,`uri`,r.message,t);break;case`uuid`:QE(n,`uuid`,r.message,t);break;case`regex`:$E(n,r.regex,r.message,t);break;case`cuid`:$E(n,qE.cuid,r.message,t);break;case`cuid2`:$E(n,qE.cuid2,r.message,t);break;case`startsWith`:$E(n,RegExp(`^${YE(r.value,t)}`),r.message,t);break;case`endsWith`:$E(n,RegExp(`${YE(r.value,t)}$`),r.message,t);break;case`datetime`:QE(n,`date-time`,r.message,t);break;case`date`:QE(n,`date`,r.message,t);break;case`time`:QE(n,`time`,r.message,t);break;case`duration`:QE(n,`duration`,r.message,t);break;case`length`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`includes`:$E(n,RegExp(YE(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&QE(n,`ipv4`,r.message,t),r.version!==`v4`&&QE(n,`ipv6`,r.message,t);break;case`base64url`:$E(n,qE.base64url,r.message,t);break;case`jwt`:$E(n,qE.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&$E(n,qE.ipv4Cidr,r.message,t),r.version!==`v4`&&$E(n,qE.ipv6Cidr,r.message,t);break;case`emoji`:$E(n,qE.emoji(),r.message,t);break;case`ulid`:$E(n,qE.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:QE(n,`binary`,r.message,t);break;case`contentEncoding:base64`:n.contentEncoding=`base64`;break;case`pattern:zod`:$E(n,qE.base64,r.message,t);break}break;case`nanoid`:$E(n,qE.nanoid,r.message,t);case`toLowerCase`:case`toUpperCase`:case`trim`:break;default:}return n}function YE(e,t){return t.patternStrategy===`escape`?ZE(e):e}var XE=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function ZE(e){let t=``;for(let n=0;n<e.length;n++)XE.has(e[n])||(t+=`\\`),t+=e[n];return t}function QE(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function $E(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:eD(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=eD(t,r)}function eD(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes(`i`),m:e.flags.includes(`m`),s:e.flags.includes(`s`)},r=n.i?e.source.toLowerCase():e.source,i=``,a=!1,o=!1,s=!1;for(let e=0;e<r.length;e++){if(a){i+=r[e],a=!1;continue}if(n.i){if(o){if(r[e].match(/[a-z]/)){s?(i+=r[e],i+=`${r[e-2]}-${r[e]}`.toUpperCase(),s=!1):r[e+1]===`-`&&r[e+2]?.match(/[a-z]/)?(i+=r[e],s=!0):i+=`${r[e]}${r[e].toUpperCase()}`;continue}}else if(r[e].match(/[a-z]/)){i+=`[${r[e]}${r[e].toUpperCase()}]`;continue}}if(n.m){if(r[e]===`^`){i+=`(^|(?<=[\r
|
|
107
|
-
]))`;continue}else if(r[e]===`$`){i+=`($|(?=[\r
|
|
108
|
-
]))`;continue}}if(n.s&&r[e]===`.`){i+=o?`${r[e]}\r
|
|
109
|
-
`:`[${r[e]}\r
|
|
110
|
-
]`;continue}i+=r[e],r[e]===`\\`?a=!0:o&&r[e]===`]`?o=!1:!o&&r[e]===`[`&&(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join(`/`)} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function tD(e,t){let n={type:`object`,additionalProperties:wD(e.valueType._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]})??t.allowedAdditionalProperties};if(e.keyType?._def.typeName===sE.ZodString&&e.keyType._def.checks?.length){let{type:r,...i}=JE(e.keyType._def,t);return{...n,propertyNames:i}}else if(e.keyType?._def.typeName===sE.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};else if(e.keyType?._def.typeName===sE.ZodBranded&&e.keyType._def.type._def.typeName===sE.ZodString&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=IE(e.keyType._def,t);return{...n,propertyNames:i}}return n}function nD(e,t){return t.mapStrategy===`record`?tD(e,t):{type:`array`,maxItems:125,items:{type:`array`,items:[wD(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||ME(),wD(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||ME()],minItems:2,maxItems:2}}}function rD(e){let t=e.values,n=Object.keys(e.values).filter(e=>typeof t[t[e]]!=`number`).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:r.length===1?r[0]===`string`?`string`:`number`:[`string`,`number`],enum:n}}function iD(){return{not:ME()}}function aD(){return{type:`null`}}var oD={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`};function sD(e,t){let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in oD&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=oD[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}else if(n.every(e=>e._def.typeName===`ZodLiteral`&&!e.description)){let e=n.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case`string`:case`number`:case`boolean`:return[...e,n];case`bigint`:return[...e,`integer`];case`object`:if(t._def.value===null)return[...e,`null`];default:return e}},[]);if(e.length===n.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>e._def.typeName===`ZodEnum`))return{type:`string`,enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return cD(e,t)}var cD=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>wD(e._def,{...t,currentPath:[...t.currentPath,`anyOf`,`${n}`]})).filter(e=>!!e&&(!t.strictUnions||typeof e==`object`&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function lD(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[oD[e.innerType._def.typeName],`null`]};let n=wD(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}function uD(e){let t={type:`number`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`int`:t.type=`integer`;break;case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value;break}return t}function dD(e,t){let n={type:`object`,properties:{}},r=[],i=e.shape();for(let e in i){let a=i[e];if(a===void 0||a._def===void 0)continue;let o=pD(a),s=wD(a._def,{...t,currentPath:[...t.currentPath,`properties`,e],propertyPath:[...t.currentPath,`properties`,e]});s!==void 0&&(n.properties[e]=s,o||r.push(e))}r.length&&(n.required=r);let a=fD(e,t);return a!==void 0&&(n.additionalProperties=a),n}function fD(e,t){if(e.catchall._def.typeName!==`ZodNever`)return wD(e.catchall._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]});switch(e.unknownKeys){case`passthrough`:return t.allowedAdditionalProperties;case`strict`:return t.rejectedAdditionalProperties;case`strip`:return t.removeAdditionalStrategy===`strict`?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function pD(e){try{return e.isOptional()}catch{return!0}}var mD=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return wD(e.innerType._def,t);let n=wD(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:ME()},n]}:ME()},hD=(e,t)=>{if(t.pipeStrategy===`input`)return wD(e.in._def,t);if(t.pipeStrategy===`output`)return wD(e.out._def,t);let n=wD(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]});return{allOf:[n,wD(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]})].filter(e=>e!==void 0)}};function gD(e,t){return wD(e.type._def,t)}function _D(e,t){let n={type:`array`,uniqueItems:!0,items:wD(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function vD(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>wD(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:wD(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>wD(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}function yD(){return{not:ME()}}function bD(){return ME()}var xD=(e,t)=>wD(e.innerType._def,t),SD=(e,t,n)=>{switch(t){case sE.ZodString:return JE(e,n);case sE.ZodNumber:return uD(e);case sE.ZodObject:return dD(e,n);case sE.ZodBigInt:return PE(e);case sE.ZodBoolean:return FE();case sE.ZodDate:return RE(e,n);case sE.ZodUndefined:return yD();case sE.ZodNull:return aD();case sE.ZodArray:return NE(e,n);case sE.ZodUnion:case sE.ZodDiscriminatedUnion:return sD(e,n);case sE.ZodIntersection:return WE(e,n);case sE.ZodTuple:return vD(e,n);case sE.ZodRecord:return tD(e,n);case sE.ZodLiteral:return GE(e);case sE.ZodEnum:return HE(e);case sE.ZodNativeEnum:return rD(e);case sE.ZodNullable:return lD(e,n);case sE.ZodOptional:return mD(e,n);case sE.ZodMap:return nD(e,n);case sE.ZodSet:return _D(e,n);case sE.ZodLazy:return()=>e.getter()._def;case sE.ZodPromise:return gD(e,n);case sE.ZodNaN:case sE.ZodNever:return iD();case sE.ZodEffects:return VE(e,n);case sE.ZodAny:return ME();case sE.ZodUnknown:return bD();case sE.ZodDefault:return BE(e,n);case sE.ZodBranded:return IE(e,n);case sE.ZodReadonly:return xD(e,n);case sE.ZodCatch:return LE(e,n);case sE.ZodPipeline:return hD(e,n);case sE.ZodFunction:case sE.ZodVoid:case sE.ZodSymbol:return;default:return(e=>void 0)(t)}},CD=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join(`/`)};function wD(e,t,n=!1){let r=t.seen.get(e);if(t.override){let i=t.override?.call(t,e,t,r,n);if(i!==kE)return i}if(r&&!n){let e=TD(r,t);if(e!==void 0)return e}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=SD(e,e.typeName,t),o=typeof a==`function`?wD(a(),t):a;if(o&&ED(e,t,o),t.postProcess){let n=t.postProcess(o,e,t);return i.jsonSchema=o,n}return i.jsonSchema=o,o}var TD=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:CD(t.currentPath,e.path)};case`none`:case`seen`:return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`),ME()):t.$refStrategy===`seen`?ME():void 0}},ED=(e,t,n)=>(e.description&&(n.description=e.description),n),DD=e=>{let t=jE(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}},OD=(e,t)=>{let n=DD(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:wD(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??ME()}),{}):void 0,i=typeof t==`string`?t:t?.nameStrategy===`title`?void 0:t?.name,a=wD(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??ME(),o=typeof t==`object`&&t.name!==void 0&&t.nameStrategy===`title`?t.name:void 0;o!==void 0&&(a.title=o);let s=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy===`relative`?[]:n.basePath,n.definitionPath,i].join(`/`),[n.definitionPath]:{...r,[i]:a}};return s.$schema=`http://json-schema.org/draft-07/schema#`,s},kD=Symbol.for(`vercel.ai.schema`);function AD(e){let t;return()=>(t??=e(),t)}function jD(e,{validate:t}={}){return{[kD]:!0,_type:void 0,get jsonSchema(){return typeof e==`function`&&(e=e()),e},validate:t}}function MD(e){return typeof e==`object`&&!!e&&kD in e&&e[kD]===!0&&`jsonSchema`in e&&`validate`in e}function ND(e){return e==null?jD({properties:{},additionalProperties:!1}):MD(e)?e:`~standard`in e?e[`~standard`].vendor===`zod`?RD(e):PD(e):e()}function PD(e){return jD(()=>DE(e[`~standard`].jsonSchema.input({target:`draft-07`})),{validate:async t=>{let n=await e[`~standard`].validate(t);return`value`in n?{success:!0,value:n.value}:{success:!1,error:new c_({value:t,cause:n.issues})}}})}function FD(e,t){let n=t?.useReferences??!1;return jD(()=>OD(e,{$refStrategy:n?`root`:`none`}),{validate:async t=>{let n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function ID(e,t){let n=t?.useReferences??!1;return jD(()=>DE(AS(e,{target:`draft-7`,io:`input`,reused:n?`ref`:`inline`})),{validate:async t=>{let n=await US(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function LD(e){return`_zod`in e}function RD(e,t){return LD(e)?ID(e,t):FD(e,t)}async function zD({value:e,schema:t,context:n}){let r=await BD({value:e,schema:t,context:n});if(!r.success)throw c_.wrap({value:e,cause:r.error,context:n});return r.value}async function BD({value:e,schema:t,context:n}){let r=ND(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};let t=await r.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:c_.wrap({value:e,cause:t.error,context:n}),rawValue:e}}catch(t){return{success:!1,error:c_.wrap({value:e,cause:t,context:n}),rawValue:e}}}async function VD({text:e,schema:t}){try{let n=EE(e);return t==null?{success:!0,value:n,rawValue:n}:await BD({value:n,schema:t})}catch(t){return{success:!1,error:n_.isInstance(t)?t:new n_({text:e,cause:t}),rawValue:void 0}}}function HD({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new gE).pipeThrough(new TransformStream({async transform({data:e},n){e!==`[DONE]`&&n.enqueue(await VD({text:e,schema:t}))}}))}async function UD(e){return typeof e==`function`&&(e=e()),Promise.resolve(e)}var WD=Object.defineProperty,GD=(e,t)=>{for(var n in t)WD(e,n,{get:t[n],enumerable:!0})},KD=`AI_NoObjectGeneratedError`,qD=`vercel.ai.error.${KD}`,JD=Symbol.for(qD),YD,XD=class extends Ug{constructor({message:e=`No object generated.`,cause:t,text:n,response:r,usage:i,finishReason:a}){super({name:KD,message:e,cause:t}),this[YD]=!0,this.text=n,this.response=r,this.usage=i,this.finishReason=a}static isInstance(e){return Ug.hasMarker(e,qD)}};YD=JD;var ZD=`AI_UIMessageStreamError`,QD=`vercel.ai.error.${ZD}`,$D=Symbol.for(QD),eO,tO=class extends Ug{constructor({chunkType:e,chunkId:t,message:n}){super({name:ZD,message:n}),this[eO]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return Ug.hasMarker(e,QD)}};eO=$D;var nO=HC([rC(),Tw(Uint8Array),Tw(ArrayBuffer),Sw(e=>globalThis.Buffer?.isBuffer(e)??!1,{message:`Must be a Buffer`})]),rO=bw(()=>HC([jC(),rC(),TC(),kC(),JC(rC(),rO.optional()),LC(rO)])),iO=JC(rC(),JC(rC(),rO.optional())),aO=zC({type:QC(`text`),text:rC(),providerOptions:iO.optional()}),oO=zC({type:QC(`image`),image:HC([nO,Tw(URL)]),mediaType:rC().optional(),providerOptions:iO.optional()}),sO=zC({type:QC(`file`),data:HC([nO,Tw(URL)]),filename:rC().optional(),mediaType:rC(),providerOptions:iO.optional()}),cO=zC({type:QC(`reasoning`),text:rC(),providerOptions:iO.optional()}),lO=zC({type:QC(`tool-call`),toolCallId:rC(),toolName:rC(),input:NC(),providerOptions:iO.optional(),providerExecuted:kC().optional()}),uO=WC(`type`,[zC({type:QC(`text`),value:rC(),providerOptions:iO.optional()}),zC({type:QC(`json`),value:rO,providerOptions:iO.optional()}),zC({type:QC(`execution-denied`),reason:rC().optional(),providerOptions:iO.optional()}),zC({type:QC(`error-text`),value:rC(),providerOptions:iO.optional()}),zC({type:QC(`error-json`),value:rO,providerOptions:iO.optional()}),zC({type:QC(`content`),value:LC(HC([zC({type:QC(`text`),text:rC(),providerOptions:iO.optional()}),zC({type:QC(`media`),data:rC(),mediaType:rC()}),zC({type:QC(`file-data`),data:rC(),mediaType:rC(),filename:rC().optional(),providerOptions:iO.optional()}),zC({type:QC(`file-url`),url:rC(),providerOptions:iO.optional()}),zC({type:QC(`file-id`),fileId:HC([rC(),JC(rC(),rC())]),providerOptions:iO.optional()}),zC({type:QC(`image-data`),data:rC(),mediaType:rC(),providerOptions:iO.optional()}),zC({type:QC(`image-url`),url:rC(),providerOptions:iO.optional()}),zC({type:QC(`image-file-id`),fileId:HC([rC(),JC(rC(),rC())]),providerOptions:iO.optional()}),zC({type:QC(`custom`),providerOptions:iO.optional()})]))})]),dO=zC({type:QC(`tool-result`),toolCallId:rC(),toolName:rC(),output:uO,providerOptions:iO.optional()}),fO=zC({type:QC(`tool-approval-request`),approvalId:rC(),toolCallId:rC()}),pO=zC({type:QC(`tool-approval-response`),approvalId:rC(),approved:kC(),reason:rC().optional()});HC([zC({role:QC(`system`),content:rC(),providerOptions:iO.optional()}),zC({role:QC(`user`),content:HC([rC(),LC(HC([aO,oO,sO]))]),providerOptions:iO.optional()}),zC({role:QC(`assistant`),content:HC([rC(),LC(HC([aO,sO,cO,lO,dO,fO]))]),providerOptions:iO.optional()}),zC({role:QC(`tool`),content:LC(HC([dO,pO])),providerOptions:iO.optional()})]);function mO(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let n={...e};for(let r in t)if(!(r===`__proto__`||r===`constructor`||r===`prototype`)&&Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];if(i===void 0)continue;let a=r in e?e[r]:void 0,o=typeof i==`object`&&!!i&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),s=typeof a==`object`&&!!a&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);o&&s?n[r]=mO(a,i):n[r]=i}return n}new TextEncoder,GD({},{array:()=>yO,choice:()=>bO,json:()=>xO,object:()=>vO,text:()=>_O});function hO(e){let t=[`ROOT`],n=-1,r=null,i=0;function a(e){return e>=`0`&&e<=`9`||e>=`A`&&e<=`F`||e>=`a`&&e<=`f`}function o(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`);break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`);break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`);break}}function s(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop();break}}function c(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=r,t.pop();break}}for(let l=0;l<e.length;l++){let u=e[l];switch(t[t.length-1]){case`ROOT`:o(u,l,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break;case`}`:n=l,t.pop();break}break;case`INSIDE_OBJECT_AFTER_COMMA`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break}break;case`INSIDE_OBJECT_KEY`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`);break}break;case`INSIDE_OBJECT_AFTER_KEY`:switch(u){case`:`:t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`);break}break;case`INSIDE_OBJECT_BEFORE_VALUE`:o(u,l,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:s(u,l);break;case`INSIDE_STRING`:switch(u){case`"`:t.pop(),n=l;break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=l}break;case`INSIDE_ARRAY_START`:switch(u){case`]`:n=l,t.pop();break;default:n=l,o(u,l,`INSIDE_ARRAY_AFTER_VALUE`);break}break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(u){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=l,t.pop();break;default:n=l;break}break;case`INSIDE_ARRAY_AFTER_COMMA`:o(u,l,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),u===`u`?(i=0,t.push(`INSIDE_STRING_UNICODE_ESCAPE`)):n=l;break;case`INSIDE_STRING_UNICODE_ESCAPE`:a(u)&&(i++,i===4&&(t.pop(),n=l));break;case`INSIDE_NUMBER`:switch(u){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=l;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&s(u,l);break;case`}`:t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&s(u,l);break;case`]`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l);break;default:t.pop();break}break;case`INSIDE_LITERAL`:{let i=e.substring(r,l+1);!`false`.startsWith(i)&&!`true`.startsWith(i)&&!`null`.startsWith(i)?(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?s(u,l):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l)):n=l;break}}}let l=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:l+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:l+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:l+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?l+=`true`.slice(t.length):`false`.startsWith(t)?l+=`false`.slice(t.length):`null`.startsWith(t)&&(l+=`null`.slice(t.length))}}return l}async function gO(e){if(e===void 0)return{value:void 0,state:`undefined-input`};let t=await VD({text:e});return t.success?{value:t.value,state:`successful-parse`}:(t=await VD({text:hO(e)}),t.success?{value:t.value,state:`repaired-parse`}:{value:void 0,state:`failed-parse`})}var _O=()=>({name:`text`,responseFormat:Promise.resolve({type:`text`}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),vO=({schema:e,name:t,description:n})=>{let r=ND(e);return{name:`object`,responseFormat:UD(r.jsonSchema).then(e=>({type:`json`,schema:e,...t!=null&&{name:t},...n!=null&&{description:n}})),async parseCompleteOutput({text:e},t){let n=await VD({text:e});if(!n.success)throw new XD({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let i=await BD({value:n.value,schema:r});if(!i.success)throw new XD({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return i.value},async parsePartialOutput({text:e}){let t=await gO(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return{partial:t.value}}},createElementStreamTransform(){}}},yO=({element:e,name:t,description:n})=>{let r=ND(e);return{name:`array`,responseFormat:UD(r.jsonSchema).then(e=>{let{$schema:r,...i}=e;return{type:`json`,schema:{$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{elements:{type:`array`,items:i}},required:[`elements`],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}}),async parseCompleteOutput({text:e},t){let n=await VD({text:e});if(!n.success)throw new XD({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let i=n.value;if(typeof i!=`object`||!i||!(`elements`in i)||!Array.isArray(i.elements))throw new XD({message:`No object generated: response did not match schema.`,cause:new c_({value:i,cause:`response must be an object with an elements array`}),text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});for(let n of i.elements){let i=await BD({value:n,schema:r});if(!i.success)throw new XD({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason})}return i.elements},async parsePartialOutput({text:e}){let t=await gO(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:{let e=t.value;if(typeof e!=`object`||!e||!(`elements`in e)||!Array.isArray(e.elements))return;let n=t.state===`repaired-parse`&&e.elements.length>0?e.elements.slice(0,-1):e.elements,i=[];for(let e of n){let t=await BD({value:e,schema:r});t.success&&i.push(t.value)}return{partial:i}}}},createElementStreamTransform(){let e=0;return new TransformStream({transform({partialOutput:t},n){if(t!=null)for(;e<t.length;e++)n.enqueue(t[e])}})}}},bO=({options:e,name:t,description:n})=>({name:`choice`,responseFormat:Promise.resolve({type:`json`,schema:{$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{result:{type:`string`,enum:e}},required:[`result`],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}),async parseCompleteOutput({text:t},n){let r=await VD({text:t});if(!r.success)throw new XD({message:`No object generated: could not parse the response.`,cause:r.error,text:t,response:n.response,usage:n.usage,finishReason:n.finishReason});let i=r.value;if(typeof i!=`object`||!i||!(`result`in i)||typeof i.result!=`string`||!e.includes(i.result))throw new XD({message:`No object generated: response did not match schema.`,cause:new c_({value:i,cause:`response must be an object that contains a choice value.`}),text:t,response:n.response,usage:n.usage,finishReason:n.finishReason});return i.result},async parsePartialOutput({text:t}){let n=await gO(t);switch(n.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:{let t=n.value;if(typeof t!=`object`||!t||!(`result`in t)||typeof t.result!=`string`)return;let r=e.filter(e=>e.startsWith(t.result));return n.state===`successful-parse`?r.includes(t.result)?{partial:t.result}:void 0:r.length===1?{partial:r[0]}:void 0}}},createElementStreamTransform(){}}),xO=({name:e,description:t}={})=>({name:`json`,responseFormat:Promise.resolve({type:`json`,...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:e},t){let n=await VD({text:e});if(!n.success)throw new XD({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return n.value},async parsePartialOutput({text:e}){let t=await gO(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return t.value===void 0?void 0:{partial:t.value}}},createElementStreamTransform(){}});yE({prefix:`aitxt`,size:24}),TransformStream;var SO=JC(rC(),rO.optional()),CO=AD(()=>RD(HC([BC({type:QC(`text-start`),id:rC(),providerMetadata:iO.optional()}),BC({type:QC(`text-delta`),id:rC(),delta:rC(),providerMetadata:iO.optional()}),BC({type:QC(`text-end`),id:rC(),providerMetadata:iO.optional()}),BC({type:QC(`error`),errorText:rC()}),BC({type:QC(`tool-input-start`),toolCallId:rC(),toolName:rC(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:SO.optional(),dynamic:kC().optional(),title:rC().optional()}),BC({type:QC(`tool-input-delta`),toolCallId:rC(),inputTextDelta:rC()}),BC({type:QC(`tool-input-available`),toolCallId:rC(),toolName:rC(),input:NC(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:SO.optional(),dynamic:kC().optional(),title:rC().optional()}),BC({type:QC(`tool-input-error`),toolCallId:rC(),toolName:rC(),input:NC(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:SO.optional(),dynamic:kC().optional(),errorText:rC(),title:rC().optional()}),BC({type:QC(`tool-approval-request`),approvalId:rC(),toolCallId:rC(),signature:rC().optional()}),BC({type:QC(`tool-output-available`),toolCallId:rC(),output:NC(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:SO.optional(),dynamic:kC().optional(),preliminary:kC().optional()}),BC({type:QC(`tool-output-error`),toolCallId:rC(),errorText:rC(),providerExecuted:kC().optional(),providerMetadata:iO.optional(),toolMetadata:SO.optional(),dynamic:kC().optional()}),BC({type:QC(`tool-output-denied`),toolCallId:rC()}),BC({type:QC(`reasoning-start`),id:rC(),providerMetadata:iO.optional()}),BC({type:QC(`reasoning-delta`),id:rC(),delta:rC(),providerMetadata:iO.optional()}),BC({type:QC(`reasoning-end`),id:rC(),providerMetadata:iO.optional()}),BC({type:QC(`source-url`),sourceId:rC(),url:rC(),title:rC().optional(),providerMetadata:iO.optional()}),BC({type:QC(`source-document`),sourceId:rC(),mediaType:rC(),title:rC(),filename:rC().optional(),providerMetadata:iO.optional()}),BC({type:QC(`file`),url:rC(),mediaType:rC(),providerMetadata:iO.optional()}),BC({type:Sw(e=>typeof e==`string`&&e.startsWith(`data-`),{message:`Type must start with "data-"`}),id:rC().optional(),data:NC(),transient:kC().optional()}),BC({type:QC(`start-step`)}),BC({type:QC(`finish-step`)}),BC({type:QC(`start`),messageId:rC().optional(),messageMetadata:NC().optional()}),BC({type:QC(`finish`),finishReason:XC([`stop`,`length`,`content-filter`,`tool-calls`,`error`,`other`]).optional(),messageMetadata:NC().optional()}),BC({type:QC(`abort`),reason:rC().optional()}),BC({type:QC(`message-metadata`),messageMetadata:NC()})])));function wO(e){return e.type.startsWith(`data-`)}function TO(){return Object.create(null)}function EO(e){return e.type.startsWith(`tool-`)}function DO(e){return e.type===`dynamic-tool`}function OO(e){return EO(e)||DO(e)}function kO(e){return e.type.split(`-`).slice(1).join(`-`)}function AO(e){return DO(e)?e.toolName:kO(e)}function jO({lastMessage:e,messageId:t}){return{message:e?.role===`assistant`?e:{id:t,metadata:void 0,role:`assistant`,parts:[]},activeTextParts:TO(),activeReasoningParts:TO(),partialToolCalls:TO()}}function MO({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:o}){return e.pipeThrough(new TransformStream({async transform(e,s){await r(async({state:r,write:c})=>{function l(e){let t=r.message.parts.filter(OO).find(t=>t.toolCallId===e);if(t==null)throw new tO({chunkType:`tool-invocation`,chunkId:e,message:`No tool invocation found for tool call ID "${e}".`});return t}function u(e){let t=r.message.parts.find(t=>EO(t)&&t.toolCallId===e.toolCallId),n=e,i=t;if(t!=null){t.state=e.state,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput,i.preliminary=n.preliminary,e.title!==void 0&&(i.title=e.title),e.toolMetadata!==void 0&&(i.toolMetadata=e.toolMetadata),i.providerExecuted=n.providerExecuted??t.providerExecuted;let r=n.providerMetadata;if(r!=null)if(e.state===`output-available`||e.state===`output-error`){let e=t;e.resultProviderMetadata=r}else t.callProviderMetadata=r}else r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},input:n.input,output:n.output,rawInput:n.rawInput,errorText:n.errorText,providerExecuted:n.providerExecuted,preliminary:n.preliminary,...n.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:n.providerMetadata}:{},...n.providerMetadata!=null&&!(e.state===`output-available`||e.state===`output-error`)?{callProviderMetadata:n.providerMetadata}:{}})}function d(e){let t=r.message.parts.find(t=>t.type===`dynamic-tool`&&t.toolCallId===e.toolCallId),n=e,i=t;if(t!=null){t.state=e.state,i.toolName=e.toolName,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput??i.rawInput,i.preliminary=n.preliminary,e.title!==void 0&&(i.title=e.title),e.toolMetadata!==void 0&&(i.toolMetadata=e.toolMetadata),i.providerExecuted=n.providerExecuted??t.providerExecuted;let r=n.providerMetadata;if(r!=null)if(e.state===`output-available`||e.state===`output-error`){let e=t;e.resultProviderMetadata=r}else t.callProviderMetadata=r}else r.message.parts.push({type:`dynamic-tool`,toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:n.input,output:n.output,errorText:n.errorText,preliminary:n.preliminary,providerExecuted:n.providerExecuted,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},...n.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:n.providerMetadata}:{},...n.providerMetadata!=null&&!(e.state===`output-available`||e.state===`output-error`)?{callProviderMetadata:n.providerMetadata}:{}})}async function f(e){if(e!=null){let n=r.message.metadata==null?e:mO(r.message.metadata,e);t!=null&&await zD({value:n,schema:t,context:{field:`message.metadata`,entityId:r.message.id}}),r.message.metadata=n}}switch(e.type){case`text-start`:{let t={type:`text`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeTextParts[e.id]=t,r.message.parts.push(t),c();break}case`text-delta`:{let t=r.activeTextParts[e.id];if(t==null)throw new tO({chunkType:`text-delta`,chunkId:e.id,message:`Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`text-end`:{let t=r.activeTextParts[e.id];if(t==null)throw new tO({chunkType:`text-end`,chunkId:e.id,message:`Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});t.state=`done`,t.providerMetadata=e.providerMetadata??t.providerMetadata,delete r.activeTextParts[e.id],c();break}case`reasoning-start`:{let t={type:`reasoning`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),c();break}case`reasoning-delta`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new tO({chunkType:`reasoning-delta`,chunkId:e.id,message:`Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`reasoning-end`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new tO({chunkType:`reasoning-end`,chunkId:e.id,message:`Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});t.providerMetadata=e.providerMetadata??t.providerMetadata,t.state=`done`,delete r.activeReasoningParts[e.id],c();break}case`file`:r.message.parts.push({type:`file`,mediaType:e.mediaType,url:e.url,...e.providerMetadata==null?{}:{providerMetadata:e.providerMetadata}}),c();break;case`source-url`:r.message.parts.push({type:`source-url`,sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),c();break;case`source-document`:r.message.parts.push({type:`source-document`,sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),c();break;case`tool-input-start`:{let t=r.message.parts.filter(EO);r.partialToolCalls[e.toolCallId]={text:``,toolName:e.toolName,index:t.length,dynamic:e.dynamic,title:e.title,toolMetadata:e.toolMetadata},e.dynamic?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}),c();break}case`tool-input-delta`:{let t=r.partialToolCalls[e.toolCallId];if(t==null)throw new tO({chunkType:`tool-input-delta`,chunkId:e.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});t.text+=e.inputTextDelta;let{value:n}=await gO(t.text);t.dynamic?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n,title:t.title,toolMetadata:t.toolMetadata}):u({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`tool-input-available`:e.dynamic?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}),c(),a&&!e.providerExecuted&&await a({toolCall:e});break;case`tool-input-error`:{let t=r.message.parts.filter(OO).find(t=>t.toolCallId===e.toolCallId);(t==null?e.dynamic:t.type===`dynamic-tool`)?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}),c();break}case`tool-approval-request`:{let t=l(e.toolCallId);t.state=`approval-requested`,t.approval={id:e.approvalId,...e.signature==null?{}:{signature:e.signature}},c();break}case`tool-output-denied`:{let t=l(e.toolCallId);t.state=`output-denied`,c();break}case`tool-output-available`:{let t=l(e.toolCallId);t.type===`dynamic-tool`?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-available`,input:t.input,output:e.output,preliminary:e.preliminary,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}):u({toolCallId:e.toolCallId,toolName:kO(t),state:`output-available`,input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`tool-output-error`:{let t=l(e.toolCallId);t.type===`dynamic-tool`?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-error`,input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}):u({toolCallId:e.toolCallId,toolName:kO(t),state:`output-error`,input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`start-step`:r.message.parts.push({type:`step-start`});break;case`finish-step`:r.activeTextParts=TO(),r.activeReasoningParts=TO();break;case`start`:e.messageId!=null&&(r.message.id=e.messageId),await f(e.messageMetadata),(e.messageId!=null||e.messageMetadata!=null)&&c();break;case`finish`:e.finishReason!=null&&(r.finishReason=e.finishReason),await f(e.messageMetadata),e.messageMetadata!=null&&c();break;case`message-metadata`:await f(e.messageMetadata),e.messageMetadata!=null&&c();break;case`error`:i?.(Error(e.errorText));break;default:if(wO(e)){if(n?.[e.type]!=null){let t=r.message.parts.findIndex(t=>`id`in t&&`data`in t&&t.id===e.id&&t.type===e.type),i=t>=0?t:r.message.parts.length;await zD({value:e.data,schema:n[e.type],context:{field:`message.parts[${i}].data`,entityName:e.type,entityId:e.id}})}let t=e;if(t.transient){o?.(t);break}let i=t.id==null?void 0:r.message.parts.find(e=>t.type===e.type&&t.id===e.id);i==null?r.message.parts.push(t):i.data=t.data,o?.(t),c()}}s.enqueue(e)})}}))}async function NO({stream:e,onError:t}){let n=e.getReader();try{for(;;){let{done:e}=await n.read();if(e)break}}catch(e){t?.(e)}finally{n.releaseLock()}}yE({prefix:`aitxt`,size:24}),JC(rC(),rO.optional()),yE({prefix:`aiobj`,size:24});var PO=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(e){n(e)}}),this.processQueue()})}};yE({prefix:`aiobj`,size:24});async function FO(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw Error(`FileList is not supported in the current environment`);return Promise.all(Array.from(e).map(async e=>{let{name:t,type:n}=e;return{type:`file`,mediaType:n,filename:t,url:await new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result)},r.onerror=e=>n(e),r.readAsDataURL(e)})}}))}var IO=class{constructor({api:e=`/api/chat`,credentials:t,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){let n=await UD(this.body),r=await UD(this.headers),i=await UD(this.credentials),a={...xE(r),...xE(t.headers)},o=await this.prepareSendMessagesRequest?.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...n,...t.body},headers:a,credentials:i,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId}),s=o?.api??this.api,c=o?.headers===void 0?a:xE(o.headers),l=o?.body===void 0?{...n,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId}:o.body,u=o?.credentials??i,d=await(this.fetch??globalThis.fetch)(s,{method:`POST`,headers:{"Content-Type":`application/json`,...c},body:JSON.stringify(l),credentials:u,signal:e});if(!d.ok)throw Error(await d.text()??`Failed to fetch the chat response.`);if(!d.body)throw Error(`The response body is empty.`);return this.processResponseStream(d.body)}async reconnectToStream(e){let t=await UD(this.body),n=await UD(this.headers),r=await UD(this.credentials),i={...xE(n),...xE(e.headers)},a=await this.prepareReconnectToStreamRequest?.call(this,{api:this.api,id:e.chatId,body:{...t,...e.body},headers:i,credentials:r,requestMetadata:e.metadata}),o=a?.api??`${this.api}/${e.chatId}/stream`,s=a?.headers===void 0?i:xE(a.headers),c=a?.credentials??r,l=await(this.fetch??globalThis.fetch)(o,{method:`GET`,headers:s,credentials:c});if(l.status===204)return null;if(!l.ok)throw Error(await l.text()??`Failed to fetch the chat response.`);if(!l.body)throw Error(`The response body is empty.`);return this.processResponseStream(l.body)}},LO=class extends IO{constructor(e={}){super(e)}processResponseStream(e){return HD({stream:e,schema:CO}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},RO=class{constructor({generateId:e=bE,id:t=e(),transport:n=new LO,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:c,onData:l,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new PO,this.sendMessage=async(e,t)=>{if(e==null){await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...t});return}let n;if(n=`text`in e||`files`in e?{parts:[...Array.isArray(e.files)?e.files:await FO(e.files),...`text`in e&&e.text!=null?[{type:`text`,text:e.text}]:[]]}:e,e.messageId!=null){let t=this.state.messages.findIndex(t=>t.id===e.messageId);if(t===-1)throw Error(`message with id ${e.messageId} not found`);if(this.state.messages[t].role!==`user`)throw Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...n,id:e.messageId,role:n.role??`user`,metadata:e.metadata})}else this.state.pushMessage({...n,id:n.id??this.generateId(),role:n.role??`user`,metadata:e.metadata});await this.makeRequest({trigger:`submit-message`,messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{let n=e==null?this.state.messages.length-1:this.state.messages.findIndex(t=>t.id===e);if(n===-1)throw Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,this.messages[n].role===`assistant`?n:n+1),await this.makeRequest({trigger:`regenerate-message`,messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:`resume-stream`,...e})},this.clearError=()=>{this.status===`error`&&(this.state.error=void 0,this.setStatus({status:`ready`}))},this.addToolApprovalResponse=async({id:e,approved:t,reason:n,options:r})=>this.jobExecutor.run(async()=>{let i=this.state.messages,a=i[i.length-1],o=r=>OO(r)&&r.state===`approval-requested`&&r.approval.id===e?{...r,state:`approval-responded`,approval:{id:e,approved:t,reason:n}}:r;this.state.replaceMessage(i.length-1,{...a,parts:a.parts.map(o)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(o)),this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(e=>{e&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...r})})}),this.addToolOutput=async({state:e=`output-available`,toolCallId:t,output:n,errorText:r,options:i})=>this.jobExecutor.run(async()=>{let a=this.state.messages,o=a[a.length-1],s=i=>OO(i)&&i.toolCallId===t?{...i,state:e,output:n,errorText:r}:i;this.state.replaceMessage(a.length-1,{...o,parts:o.parts.map(s)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(s)),this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(e=>{e&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...i})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{this.status!==`streaming`&&this.status!==`submitted`||this.activeResponse?.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=c,this.onData=l,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;let e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e==`object`&&`then`in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:i}){var a;let o;if(e===`resume-stream`)try{let e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(e==null)return;o=e}catch(e){this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e});return}this.setStatus({status:`submitted`,error:void 0});let s=this.lastMessage,c=!1,l=!1,u=!1;try{let a={state:jO({lastMessage:this.state.snapshot(s),messageId:this.generateId()}),abortController:new AbortController};a.abortController.signal.addEventListener(`abort`,()=>{c=!0}),this.activeResponse=a;let l;l=e===`resume-stream`?o:await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:a.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:i}),await NO({stream:MO({stream:l,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:e=>this.jobExecutor.run(()=>e({state:a.state,write:()=>{this.setStatus({status:`streaming`}),a.state.message.id===this.lastMessage?.id?this.state.replaceMessage(this.state.messages.length-1,a.state.message):this.state.pushMessage(a.state.message)}})),onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:`ready`})}catch(e){if(c||e.name===`AbortError`)return c=!0,this.setStatus({status:`ready`}),null;u=!0,e instanceof TypeError&&(e.message.toLowerCase().includes(`fetch`)||e.message.toLowerCase().includes(`network`))&&(l=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e})}finally{try{(a=this.onFinish)==null||a.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:l,isError:u,finishReason:this.activeResponse?.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}!u&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,metadata:t,headers:n,body:r})}},zO=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,BO=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=zO[n[e]&63];return t},VO=l(o(((e,t)=>{function n(e,t){if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n,r=0;return function(...i){clearTimeout(n);let a=Date.now(),o=t-(a-r);o<=0?(r=a,e.apply(this,i)):n=setTimeout(()=>{r=Date.now(),e.apply(this,i)},o)}}t.exports=n}))(),1),HO=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},UO=(e,t,n)=>(HO(e,t,`read from private field`),n?n.call(e):t.get(e)),WO=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},GO=(e,t,n,r)=>(HO(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function KO(e,t){return t==null?e:(0,VO.default)(e,t)}var qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk=class{constructor(e=[]){WO(this,qO,void 0),WO(this,JO,`ready`),WO(this,YO,void 0),WO(this,XO,new Set),WO(this,ZO,new Set),WO(this,QO,new Set),this.pushMessage=e=>{GO(this,qO,UO(this,qO).concat(e)),UO(this,$O).call(this)},this.popMessage=()=>{GO(this,qO,UO(this,qO).slice(0,-1)),UO(this,$O).call(this)},this.replaceMessage=(e,t)=>{GO(this,qO,[...UO(this,qO).slice(0,e),this.snapshot(t),...UO(this,qO).slice(e+1)]),UO(this,$O).call(this)},this.snapshot=e=>structuredClone(e),this[`~registerMessagesCallback`]=(e,t)=>{let n=t?KO(e,t):e;return UO(this,XO).add(n),()=>{UO(this,XO).delete(n)}},this[`~registerStatusCallback`]=e=>(UO(this,ZO).add(e),()=>{UO(this,ZO).delete(e)}),this[`~registerErrorCallback`]=e=>(UO(this,QO).add(e),()=>{UO(this,QO).delete(e)}),WO(this,$O,()=>{UO(this,XO).forEach(e=>e())}),WO(this,ek,()=>{UO(this,ZO).forEach(e=>e())}),WO(this,tk,()=>{UO(this,QO).forEach(e=>e())}),GO(this,qO,e)}get status(){return UO(this,JO)}set status(e){GO(this,JO,e),UO(this,ek).call(this)}get error(){return UO(this,YO)}set error(e){GO(this,YO,e),UO(this,tk).call(this)}get messages(){return UO(this,qO)}set messages(e){GO(this,qO,[...e]),UO(this,$O).call(this)}};qO=new WeakMap,JO=new WeakMap,YO=new WeakMap,XO=new WeakMap,ZO=new WeakMap,QO=new WeakMap,$O=new WeakMap,ek=new WeakMap,tk=new WeakMap;var rk,ik=class extends RO{constructor({messages:e,...t}){let n=new nk(e);super({...t,state:n}),WO(this,rk,void 0),this[`~registerMessagesCallback`]=(e,t)=>UO(this,rk)[`~registerMessagesCallback`](e,t),this[`~registerStatusCallback`]=e=>UO(this,rk)[`~registerStatusCallback`](e),this[`~registerErrorCallback`]=e=>UO(this,rk)[`~registerErrorCallback`](e),GO(this,rk,n)}};rk=new WeakMap;function ak({experimental_throttle:e,resume:t=!1,...n}={}){let r=(0,V.useRef)(`chat`in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});`chat`in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});let i={...n,onToolCall:e=>{var t;return(t=r.current).onToolCall?.call(t,e)},onData:e=>{var t;return(t=r.current).onData?.call(t,e)},onFinish:e=>{var t;return(t=r.current).onFinish?.call(t,e)},onError:e=>{var t;return(t=r.current).onError?.call(t,e)},sendAutomaticallyWhen:e=>{var t;return(t=r.current).sendAutomaticallyWhen?.call(t,e)??!1}},a=(0,V.useRef)(`chat`in n?n.chat:new ik(i));(`chat`in n&&n.chat!==a.current||`id`in n&&a.current.id!==n.id)&&(a.current=`chat`in n?n.chat:new ik(i));let o=(0,V.useSyncExternalStore)((0,V.useCallback)(t=>a.current[`~registerMessagesCallback`](t,e),[e,a.current.id]),()=>a.current.messages,()=>a.current.messages),s=(0,V.useSyncExternalStore)(a.current[`~registerStatusCallback`],()=>a.current.status,()=>a.current.status),c=(0,V.useSyncExternalStore)(a.current[`~registerErrorCallback`],()=>a.current.error,()=>a.current.error),l=(0,V.useCallback)(e=>{typeof e==`function`&&(e=e(a.current.messages)),a.current.messages=e},[a]);return(0,V.useEffect)(()=>{t&&a.current.resumeStream()},[t,a]),{id:a.current.id,messages:o,setMessages:l,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:c,resumeStream:a.current.resumeStream,status:s,addToolResult:a.current.addToolOutput,addToolOutput:a.current.addToolOutput,addToolApprovalResponse:a.current.addToolApprovalResponse}}var ok=5e3,sk=6e4,ck=class{constructor(e){this._resumeResolver=null,this._resumeNoneResolver=null,this._onStreamPending=null,this._retryResumeProbe=null,this._expectToolContinuation=!1,this._abortToolContinuation=null,this._activeServerTurnId=null,this._cancelAttachedStream=null,this._detachResumeStream=null,this.agent=e.agent,this.prepareBody=e.prepareBody,this.activeRequestIds=e.activeRequestIds,this.cancelOnClientAbort=e.cancelOnClientAbort??!1}setAgent(e){this.agent!==e&&(this.resetResumeState(),this.agent=e)}setCancelOnClientAbort(e){this.cancelOnClientAbort=e}cancelActiveServerTurn(){let e=this._activeServerTurnId,t=!1;e&&(this.sendCancelFrame(e),this._cancelAttachedStream?.(),this.clearActiveServerTurn(e),t=!0);let n=this.abortActiveToolContinuation();return t||n}sendCancelFrame(e){try{this.agent.send(JSON.stringify({id:e,type:`cf_agent_chat_request_cancel`}))}catch{}}setActiveServerTurn(e,t){this._activeServerTurnId=e,this._cancelAttachedStream=t}clearActiveServerTurn(e){this._activeServerTurnId===e&&(this._activeServerTurnId=null,this._cancelAttachedStream=null)}expectToolContinuation(){this._expectToolContinuation=!0}abortActiveToolContinuation(){return this._abortToolContinuation?.()??!1}isAwaitingResume(){return this._resumeResolver!==null||this._resumeNoneResolver!==null}cancelPendingResume(){let e=this._resumeNoneResolver;return e?e({}):!1}resetResumeState(){this._expectToolContinuation=!1,this.cancelPendingResume(),this._detachResumeStream?.()}retryPendingResume(){let e=this._retryResumeProbe;return e?(e(),!0):!1}handleStreamResuming(e){return this._resumeResolver?(this._resumeResolver(e),!0):!1}handleStreamResumeNone(e={}){return this._resumeNoneResolver?this._resumeNoneResolver(e):!1}handleStreamPending(){return this._onStreamPending?(this._onStreamPending(),!0):!1}handleServerTurnCompleted(e){this.clearActiveServerTurn(e)}observeServerTurn(e){this.setActiveServerTurn(e,null)}async sendMessages(e){let t=BO(8),n=new AbortController,r=!1,i=!1,a={};this.prepareBody&&(a=await this.prepareBody({messages:e.messages,trigger:e.trigger,messageId:e.messageId})),e.body&&(a={...a,...e.body});let o=JSON.stringify({messages:e.messages,trigger:e.trigger,...a});this.activeRequestIds?.add(t);let s=this.agent,c=this.activeRequestIds,l=(e,i=!1,a=!0)=>{if(!r){r=!0,a&&this.clearActiveServerTurn(t);try{e()}catch{}i||c?.delete(t),n.abort()}},u=Error(`Aborted`);u.name=`AbortError`,this.setActiveServerTurn(t,()=>r?!1:(l(()=>f.error(u),!0),!0));let d=()=>{r||(this.cancelOnClientAbort?(i&&this.sendCancelFrame(t),l(()=>f.error(u),i)):l(()=>f.error(u),!1,!i))},f,p=new ReadableStream({start(e){f=e,s.addEventListener(`message`,n=>{try{let r=JSON.parse(n.data);if(r.type!==`cf_agent_use_chat_response`||r.id!==t)return;if(r.error){l(()=>e.error(Error(r.body||`Stream error`)));return}if(r.body?.trim())try{let t=JSON.parse(r.body);e.enqueue(t)}catch{}r.done&&l(()=>e.close())}catch{}},{signal:n.signal}),s.addEventListener(`close`,()=>{l(()=>e.close(),!1,!1)},{signal:n.signal})},cancel(){d()}});return e.abortSignal&&(e.abortSignal.addEventListener(`abort`,d,{once:!0}),e.abortSignal.aborted&&d()),r?p:(i=!0,s.send(JSON.stringify({id:t,init:{method:`POST`,body:o},type:`cf_agent_use_chat_request`})),p)}async reconnectToStream(e){if(this.isAwaitingResume())return null;if(this._expectToolContinuation)return this._expectToolContinuation=!1,this._createToolContinuationStream();let t=this.activeRequestIds,n=BO(8);return new Promise(e=>{let r=!1,i,a=null,o=null,s=null,c=null,l=()=>{a&&this._resumeResolver===a&&(this._resumeResolver=null),o&&this._resumeNoneResolver===o&&(this._resumeNoneResolver=null),s&&this._onStreamPending===s&&(this._onStreamPending=null),c&&this._retryResumeProbe===c&&(this._retryResumeProbe=null)},u=t=>{r||(r=!0,l(),i&&clearTimeout(i),e(t))},d=e=>{i&&clearTimeout(i),i=setTimeout(()=>u(null),e)};s=()=>{r||d(sk)},o=e=>e.probeId&&e.probeId!==n?!1:(u(null),!0),a=e=>{let n=e.id;t?.add(n);let r=this._createResumeStream(n);this.agent.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:n})),u(r)},c=()=>{if(!r){d(ok);try{this.agent.send(JSON.stringify({type:`cf_agent_stream_resume_request`,probeId:n}))}catch{}}},this._onStreamPending=s,this._resumeNoneResolver=o,this._resumeResolver=a,this._retryResumeProbe=c,c()})}_createToolContinuationStream(){let e=this.agent,t=this.activeRequestIds,n=new AbortController,r=Error(`Aborted`);r.name=`AbortError`;let i=!1,a=null,o=null,s=BO(8),c=null,l=null,u=null,d=null,f=null,p=null,m=()=>{c&&this._resumeResolver===c&&(this._resumeResolver=null),l&&this._resumeNoneResolver===l&&(this._resumeNoneResolver=null),u&&this._onStreamPending===u&&(this._onStreamPending=null),d&&this._retryResumeProbe===d&&(this._retryResumeProbe=null)},h=(e,r=!1)=>{if(!i){i=!0,this._abortToolContinuation===f&&(this._abortToolContinuation=null),this._detachResumeStream===p&&(this._detachResumeStream=null),m();try{e()}catch{}a&&!r&&t?.delete(a),n.abort()}},g=this;return f=()=>{if(i)return!1;if(a===null)return h(()=>o?.error(r)),!0;try{e.send(JSON.stringify({type:`cf_agent_chat_request_cancel`,id:a}))}catch{}return h(()=>o?.error(r),!0),!0},this._abortToolContinuation=f,p=()=>i?!1:(h(()=>o?.close()),!0),this._detachResumeStream=p,new ReadableStream({start(r){o=r;let f,p=e=>{f&&clearTimeout(f),f=setTimeout(()=>h(()=>r.close()),e)},_=e=>e.probeId&&e.probeId!==s?!1:(h(()=>r.close()),!0),v=n=>{a||(a=n.id,t?.add(a),m(),f&&clearTimeout(f),e.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:a})))},y=()=>{i||p(sk)},b=()=>{if(!(i||a!==null)){p(ok);try{g.agent.send(JSON.stringify({type:`cf_agent_stream_resume_request`,probeId:s}))}catch{}}};c=v,l=_,u=y,d=b,g._resumeResolver=v,g._resumeNoneResolver=_,g._onStreamPending=y,g._retryResumeProbe=b,e.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data);if(t.type!==`cf_agent_use_chat_response`||a==null||t.id!==a)return;if(t.error){h(()=>r.error(Error(t.body||`Stream error`)));return}if(t.body?.trim())try{let e=JSON.parse(t.body);r.enqueue(e)}catch{}t.done&&h(()=>r.close())}catch{}},{signal:n.signal}),e.addEventListener(`close`,()=>h(()=>r.close()),{signal:n.signal}),b()},cancel(){a&&g.cancelOnClientAbort?(g.sendCancelFrame(a),h(()=>{},!0)):h(()=>{})}})}_createResumeStream(e){let t=this.agent,n=this.activeRequestIds,r=new AbortController,i=Error(`Aborted`);i.name=`AbortError`;let a=!1,o=null,s=(t,i=!1,s=!0)=>{if(!a){a=!0,s&&this.clearActiveServerTurn(e),this._detachResumeStream===o&&(this._detachResumeStream=null);try{t()}catch{}i||n?.delete(e),r.abort()}},c=null;this.setActiveServerTurn(e,()=>a?!1:(s(()=>c?.error(i),!0),!0));let l=this;return o=()=>a?!1:(s(()=>c?.close()),!0),this._detachResumeStream=o,new ReadableStream({start(n){c=n,t.addEventListener(`message`,t=>{try{let r=JSON.parse(t.data);if(r.type!==`cf_agent_use_chat_response`||r.id!==e)return;if(r.error){s(()=>n.error(Error(r.body||`Stream error`)));return}if(r.body?.trim())try{let e=JSON.parse(r.body);n.enqueue(e)}catch{}r.done&&s(()=>n.close())}catch{}},{signal:r.signal}),t.addEventListener(`close`,()=>{s(()=>n.close(),!1,!1)},{signal:r.signal})},cancel(){l.cancelOnClientAbort?(l.sendCancelFrame(e),s(()=>{},!0)):s(()=>{},!1,!1)}})}},lk=new Set;function uk(e,t){lk.has(e)||(lk.add(e),console.warn(`[agents/chat] Deprecated: ${t}`))}function dk(e){if(!e)return;let t=Object.entries(e).filter(([e,t])=>t.execute).map(([e,t])=>(t.inputSchema&&!t.parameters&&console.warn(`[useAgentChat] Tool "${e}" uses deprecated 'inputSchema'. Please migrate to 'parameters'.`),{name:e,description:t.description,parameters:t.parameters??t.inputSchema}));return t.length>0?t:void 0}function fk(e){return e.approval}var pk=new Map;function mk(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.role===`assistant`)return{index:t,message:n}}return null}function hk(e,t){let n=e.findIndex(e=>e.id===t);if(n<0||n===e.length-1)return e;let r=[...e],[i]=r.splice(n,1);return i?(r.push(i),r):e}function gk(e,t){if(t.length===0)return e;let n=new Set(t.map(e=>e.id)),r=e.filter(e=>!n.has(e.id));return r.length===0?t:[...r,...t]}function _k(e){let{agent:t,getInitialMessages:n,messages:r,onToolCall:i,onData:a,experimental_automaticToolResolution:o,tools:s,toolsRequiringConfirmation:c,autoContinueAfterToolResult:l=!0,autoSendAfterAllConfirmationsResolved:u=!0,resume:d=!0,cancelOnClientAbort:f=!1,syncMessagesToServer:p=!0,body:m,prepareSendMessagesRequest:h,...g}=e;c&&uk(`useAgentChat.toolsRequiringConfirmation`,`The 'toolsRequiringConfirmation' option is deprecated. Use needsApproval on server-side tools instead. Will be removed in the next major version.`),o&&uk(`useAgentChat.experimental_automaticToolResolution`,`The 'experimental_automaticToolResolution' option is deprecated. Use the onToolCall callback instead. Will be removed in the next major version.`),e.autoSendAfterAllConfirmationsResolved!==void 0&&uk(`useAgentChat.autoSendAfterAllConfirmationsResolved`,`The 'autoSendAfterAllConfirmationsResolved' option is deprecated. Use sendAutomaticallyWhen from AI SDK instead. Will be removed in the next major version.`);let _=(0,V.useMemo)(()=>c||(s?Object.entries(s).filter(([e,t])=>!t.execute).map(([e])=>e):[]),[c,s]),v=(0,V.useRef)(i);v.current=i;let y=(0,V.useRef)(a);y.current=a;let b=t.getHttpUrl(),x=b?new URL(b):null;x&&x.searchParams.delete(`_pk`);let S=x?.toString()??null,C=Array.isArray(t.path)?JSON.stringify(t.path.map(e=>[e.agent,e.name])):JSON.stringify([[t.agent??``,t.name??``]]),w=x?`${x.origin}${x.pathname}|${C}`:null,T=C,E=(0,V.useRef)(null),D=(0,V.useRef)(null),O=(0,V.useRef)(null),k=C,A=Array.isArray(t.path)&&O.current!==null&&O.current!==C;(E.current===null||D.current!==t||A)&&(E.current=w??k),D.current=t,O.current=C;let j=(0,V.useRef)(t);j.current=t;async function M({url:t}){if(!t)return[];let n=new URL(t);n.pathname+=`/get-messages`;let r=await fetch(n.toString(),{credentials:e.credentials,headers:e.headers});if(!r.ok)return console.warn(`Failed to fetch initial messages: ${r.status} ${r.statusText}`),[];let i=await r.text();if(!i.trim())return[];try{return JSON.parse(i)}catch(e){return console.warn(`Failed to parse initial messages JSON:`,e),[]}}let N=n||M;function P(e,t){if(pk.has(t))return pk.get(t);let n=N(e);return pk.set(t,n),n}let ee=n!==null&&(n||S)?P({agent:t.agent,name:t.name,url:S??void 0},T):null,F=ee?(0,V.use)(ee):r??[];(0,V.useEffect)(()=>{if(ee)return pk.set(T,ee),()=>{pk.get(T)===ee&&pk.delete(T)}},[T,ee]);let te=(0,V.useRef)(s);te.current=s;let I=(0,V.useRef)(h);I.current=h;let L=(0,V.useRef)(m);L.current=m;let ne=(0,V.useRef)(new Set),R=(0,V.useRef)(new Set),re=(0,V.useRef)(new Set),z=(0,V.useRef)(new Set),ie=(0,V.useRef)(null);ie.current===null&&(ie.current=new ck({agent:j.current,activeRequestIds:ne.current,cancelOnClientAbort:f,prepareBody:async({messages:e,trigger:t,messageId:n})=>{let r={},i=L.current;if(i&&(r={...typeof i==`function`?await i():i}),te.current){let e=dk(te.current);e&&(r.clientTools=e)}if(I.current){let i=await I.current({id:j.current._pk,messages:e,trigger:t,messageId:n});i.body&&Object.assign(r,i.body)}return r}})),ie.current.setAgent(j.current),ie.current.setCancelOnClientAbort(f);let ae=ie.current,oe=ak({...g,onData:a,messages:F,transport:ae,id:E.current,resume:!1}),{messages:se,setMessages:ce,addToolResult:le,addToolApprovalResponse:ue,sendMessage:de,resumeStream:fe,status:pe,stop:me}=oe,he=(0,V.useRef)(pe);he.current=pe;let ge=(0,V.useRef)(0),_e=(0,V.useRef)(null),ve=(0,V.useRef)(!1),ye=(0,V.useRef)(null),be=(0,V.useCallback)(()=>{ge.current++,_e.current=null},[]),xe=(0,V.useCallback)((...e)=>{let t=_e.current;if(t)return t.promise;let n={generation:ge.current,promise:Promise.resolve()};return _e.current=n,n.promise=fe(...e).finally(()=>{_e.current!==n||ge.current!==n.generation||(_e.current=null,ye.current?.())}),n.promise},[fe]),Se=(0,V.useRef)(xe);Se.current=xe;let Ce=(0,V.useRef)(!1),we=(0,V.useRef)(!1),Te=(0,V.useRef)(null),Ee=(0,V.useRef)(null),De=(0,V.useRef)(0),[Oe,ke]=(0,V.useState)(!1),Ae=(0,V.useCallback)(()=>{De.current++,we.current=!1,Ce.current=!1,Te.current=null,Ee.current&&=(clearTimeout(Ee.current),null),ke(!1)},[]),je=(0,V.useCallback)(()=>{if(!we.current||he.current!==`ready`||Ee.current)return;let e=setTimeout(()=>{(async()=>{for(;_e.current;)await _e.current.promise.catch(()=>{});if(Ee.current===e&&(Ee.current=null),!we.current||he.current!==`ready`)return;we.current=!1;let t=De.current;ae.expectToolContinuation(),await xe().catch(e=>{console.error(`[useAgentChat] Tool continuation resume failed:`,e)}).finally(()=>{De.current===t&&(Ce.current=!1,ke(!1))})})()},0);Ee.current=e},[ae,xe]),Me=(0,V.useCallback)(()=>{!l||Ce.current||(++De.current,Ce.current=!0,we.current=!0,ke(!0),je())},[l,je]);(0,V.useEffect)(()=>{if(pe===`error`&&we.current){Ae();return}je()},[Ae,je,pe]);let Ne=(0,V.useCallback)(async()=>{try{ae.cancelActiveServerTurn(),await me()}finally{ae.abortActiveToolContinuation()}},[me,ae]),Pe=(0,V.useRef)(new Set),Fe=(0,V.useRef)(!1),[Ie,Le]=(0,V.useState)(0),[Re,ze]=(0,V.useState)(new Map),Be=(0,V.useRef)(se);Be.current=se;let Ve=(0,V.useRef)(F);Ve.current=F;let He=(0,V.useRef)(null),Ue=(0,V.useCallback)(()=>{He.current=T},[T]);(0,V.useEffect)(()=>{ee&&He.current!==T&&(Ue(),ce(e=>gk(Ve.current,e)))},[T,ee,Ue,ce]);let We=(0,V.useRef)(new Map),Ge=(0,V.useRef)(null),Ke=(0,V.useCallback)(e=>{let t=Ge.current;if(!t)return[...e];let n=e.findIndex(e=>e.id===t.assistantId);if(n>=0&&e.slice(n+1).some(e=>e.role===`assistant`))return Ge.current=null,[...e];let r=Be.current.find(e=>e.id===t.assistantId)??e.find(e=>e.id===t.assistantId);return r?[...e.filter(e=>e.id!==t.assistantId),r]:[...e]},[]),qe=(0,V.useCallback)(()=>{if(he.current!==`streaming`)return;let e=mk(Be.current);e&&(Ge.current?.assistantId!==e.message.id&&(Ge.current={assistantId:e.message.id,anchorMessageId:Be.current[e.index-1]?.id??null}),ce(e=>{let t=Ge.current;return t?hk(e,t.assistantId):e}))},[ce]),Je=(0,V.useCallback)(e=>{let t=Ge.current;!t||e!==void 0&&t.assistantId!==e||(Ge.current=null,ce(e=>{let n=e.findIndex(e=>e.id===t.assistantId);if(n<0)return e;let r=[...e],[i]=r.splice(n,1);if(!i)return e;if(t.anchorMessageId===null)r.unshift(i);else{let e=r.findIndex(e=>e.id===t.anchorMessageId);r.splice(e>=0?e+1:n,0,i)}return r}))},[ce]),Ye=(0,V.useCallback)(e=>{ce(t=>{let n=t[t.length-1];if(!n||n.role!==`assistant`||n.id!==e)return t;re.current.add(e);let r=[...t];return r[r.length-1]={...n,parts:[]},r})},[ce]),Xe=(0,V.useCallback)(e=>{let t=e.parts,n=t.filter((e,n)=>e.type!==`text`||!(`text`in e)||!e.text?!0:!t.some((t,r)=>r<=n||t.type!==`text`||!(`text`in t)||!t.text?!1:t.text.startsWith(e.text)));return n.length===t.length?e:{...e,parts:n}},[]);(0,V.useEffect)(()=>{if(re.current.size===0)return;let e=new Set(se.filter(e=>re.current.has(e.id)&&e.role===`assistant`&&Xe(e)!==e).map(e=>e.id));e.size!==0&&ce(t=>{let n=!1,r=t.map(t=>{if(!e.has(t.id))return t;let r=Xe(t);return r!==t&&(n=!0),r});return n?r:t})},[se,Xe,ce]);let Ze=(0,V.useCallback)(()=>{Ue(),ce([]),ze(new Map),rt(new Set),Ae(),Pe.current.clear(),We.current.clear(),R.current.clear(),z.current.clear(),re.current.clear(),Ge.current=null},[Ue,ce,Ae]),Qe=(0,V.useCallback)(async(e,t)=>{let n=de(e,t);return e!==void 0&&!(typeof e==`object`&&e&&`messageId`in e&&e.messageId!=null)&&qe(),n},[de,qe]),$e=se[se.length-1],et=(()=>{if(!$e||$e.role!==`assistant`)return{messageId:void 0,toolCallIds:new Set};let e=new Set;for(let t of $e.parts??[])OO(t)&&t.state===`input-available`&&_.includes(AO(t))&&e.add(t.toolCallId);return{messageId:$e.id,toolCallIds:e}})(),tt=(0,V.useRef)(et);tt.current=et;let[nt,rt]=(0,V.useState)(()=>new Set),it=(0,V.useCallback)(e=>{rt(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);(0,V.useEffect)(()=>{if(!o||Fe.current)return;let e=se[se.length-1];if(!e||e.role!==`assistant`)return;let t=e.parts.filter(e=>OO(e)&&e.state===`input-available`&&!Pe.current.has(e.toolCallId));if(t.length>0){let e=te.current,n=t.filter(t=>OO(t)&&!_.includes(AO(t))&&e?.[AO(t)]?.execute);n.length>0&&(Fe.current=!0,(async()=>{try{let t=[];for(let r of n)if(OO(r)){let n=null,i=AO(r),a=e?.[i];if(a?.execute&&r.input!==void 0)try{n=await a.execute(r.input)}catch(e){n=`Error executing tool: ${e instanceof Error?e.message:String(e)}`}Pe.current.add(r.toolCallId),t.push({toolCallId:r.toolCallId,toolName:i,output:n})}if(t.length>0){let n=dk(e);for(let e of t)j.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:e.toolCallId,toolName:e.toolName,output:e.output,autoContinue:l,clientTools:n}));await Promise.all(t.map(e=>le({tool:e.toolName,toolCallId:e.toolCallId,output:e.output}))),ze(e=>{let n=new Map(e);for(let e of t)n.set(e.toolCallId,e.output);return n}),Me()}}finally{Fe.current=!1,Le(e=>e+1)}})())}},[se,o,le,_,l,Me,Ie]);let at=(0,V.useCallback)((e,t,n,r,i)=>{let a=r===`output-error`?!1:l;j.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:e,toolName:t,output:n,...r?{state:r}:{},...i===void 0?{}:{errorText:i},autoContinue:a,clientTools:te.current?dk(te.current):void 0})),r!==`output-error`&&ze(t=>new Map(t).set(e,n)),a&&Me()},[l,Me]),B=(0,V.useCallback)((e,t)=>{j.current.send(JSON.stringify({type:`cf_agent_tool_approval`,toolCallId:e,approved:t,autoContinue:l})),l&&Me()},[l,Me]);(0,V.useEffect)(()=>{let e=v.current;if(!e)return;let t=se[se.length-1];if(!t||t.role!==`assistant`)return;let n=t.parts.filter(e=>OO(e)&&e.state===`input-available`&&!Pe.current.has(e.toolCallId));for(let t of n)if(OO(t)){let n=t.toolCallId,r=AO(t);Pe.current.add(n),rt(e=>{if(e.has(n))return e;let t=new Set(e);return t.add(n),t});let i=e=>{at(e.toolCallId,r,e.output,e.state,e.errorText),le({tool:r,toolCallId:e.toolCallId,output:e.state===`output-error`?e.errorText??`Tool execution denied by user`:e.output})},a;try{a=e({toolCall:{toolCallId:n,toolName:r,input:t.input},addToolOutput:i})}catch(e){throw it(n),e}Promise.resolve(a).finally(()=>{it(n)})}},[se,at,le,it]);let ot=(0,V.useRef)({status:`idle`}),[st,ct]=(0,V.useState)(!1),[lt,ut]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let e=We.current;function n(t){if(typeof t.data!=`string`)return;let n;try{n=JSON.parse(t.data)}catch{return}switch(n.type){case`cf_agent_chat_clear`:ot.current=Lg(ot.current,{type:`clear`}).state,ct(!1),ut(!1),Ze();break;case`cf_agent_chat_recovering`:ut(!!n.recovering);break;case`cf_agent_chat_messages`:{let e=Ke(n.messages),t=ot.current;if(t.status===`observing`&&t.accumulator.parts.length>0){let n=e.findIndex(e=>e.id===t.accumulator.messageId),r=n>=0?e[n].parts.length:0;t.accumulator.parts.length>=r&&(e=t.accumulator.mergeInto(e))}ce(e);break}case`cf_agent_message_updated`:ce(e=>{let t=n.message,r=e.findIndex(e=>e.id===t.id);if(r<0){let n=new Set(t.parts.filter(e=>`toolCallId`in e&&e.toolCallId).map(e=>e.toolCallId));n.size>0&&(r=e.findIndex(e=>e.parts.some(e=>`toolCallId`in e&&n.has(e.toolCallId))))}if(r>=0){let n=[...e];return n[r]={...t,id:e[r].id},n}return e});break;case`cf_agent_stream_resume_none`:if(ae.handleStreamResumeNone(n)&&n.reason===Rg.IDLE&&typeof n.probeId==`string`){let e=Lg(ot.current,{type:`clear`});ot.current=e.state,ct(e.isStreaming),Te.current!==null&&Ae()}break;case`cf_agent_stream_pending`:ae.handleStreamPending();break;case`cf_agent_stream_resuming`:{let e=Ce.current&&!ae.isAwaitingResume();if(!d&&!ae.isAwaitingResume()&&!e||(Ce.current||R.current.add(n.id),ae.handleStreamResuming(n))||ne.current.has(n.id)||z.current.has(n.id))return;e&&(we.current=!1,Te.current=n.id,Ee.current&&=(clearTimeout(Ee.current),null)),ot.current=Lg(ot.current,{type:`resume-fallback`,streamId:n.id,messageId:BO()}).state,ae.observeServerTurn(n.id),ct(!0),ut(!1),z.current.add(n.id),j.current.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:n.id}));break}case`cf_agent_use_chat_response`:{if(ne.current.has(n.id)){if(n.body?.trim())try{let t=JSON.parse(n.body);if(t.type===`start`&&typeof t.messageId==`string`){if(e.set(n.id,t.messageId),!n.continuation&&Ge.current?.assistantId!==t.messageId){let e=Be.current,n=e.findIndex(e=>e.id===t.messageId),r=n>=0?e[n-1]?.id??null:e[e.length-1]?.id??null;Ge.current={assistantId:t.messageId,anchorMessageId:r}}n.replay&&!n.continuation&&!Ce.current&&Te.current!==n.id&&(R.current.delete(n.id),Ye(t.messageId))}}catch{}(n.done||n.replayComplete)&&R.current.delete(n.id),n.done&&(ot.current.status===`observing`&&ot.current.streamId===n.id&&(ot.current={status:`idle`},ct(!1)),ae.handleServerTurnCompleted(n.id),Je(e.get(n.id)),e.delete(n.id),ne.current.delete(n.id),z.current.delete(n.id),Te.current===n.id&&Ae());return}let t;if(n.replay&&ot.current.status!==`observing`&&!R.current.has(n.id))return;if(n.body?.trim())try{t=JSON.parse(n.body),n.replay&&!n.continuation&&!Ce.current&&Te.current!==n.id&&typeof t.messageId==`string`&&t.type===`start`&&(R.current.delete(n.id),Ye(t.messageId)),typeof t.type==`string`&&t.type.startsWith(`data-`)&&y.current&&y.current(t)}catch(e){console.warn(`[useAgentChat] Failed to parse stream chunk:`,e instanceof Error?e.message:e,`body:`,n.body?.slice(0,100))}(n.done||n.replayComplete)&&R.current.delete(n.id),n.done&&(ae.handleServerTurnCompleted(n.id),z.current.delete(n.id),ut(!1));let r=n.done&&Te.current===n.id,i=Lg(ot.current,{type:`response`,streamId:n.id,messageId:BO(),chunkData:t,done:n.done,error:n.error,replay:n.replay,replayComplete:n.replayComplete,continuation:n.continuation,currentMessages:n.continuation?Be.current:void 0});ot.current=i.state,i.messagesUpdate&&ce(i.messagesUpdate),ct(i.isStreaming),r&&Ae();break}}}let r=z.current,i=!1,a=!1,o=!1,s=()=>{let e=Lg(ot.current,{type:`clear`});ot.current=e.state,ct(e.isStreaming),Te.current!==null&&Ae()},c=()=>{if(o||!i||!ve.current)return;if(!d){ve.current=!1;return}if(ae.retryPendingResume()){ve.current=!1;return}let e=Te.current!==null;he.current!==`ready`&&he.current!==`error`||Ce.current&&!e||_e.current!==null||(ve.current=!1,Se.current().catch(()=>{}))};ye.current=c;function l(){i=!1,a=!0,r.clear(),d||s()}function u(){i=!0,a&&(a=!1,ve.current=!0,c())}return t.addEventListener(`message`,n),t.addEventListener(`close`,l),t.addEventListener(`open`,u),()=>{o=!0,ye.current===c&&(ye.current=null),ve.current=!1,t.removeEventListener(`message`,n),t.removeEventListener(`close`,l),t.removeEventListener(`open`,u),r.clear(),ot.current={status:`idle`},ct(!1),ut(!1),Ge.current=null,e.clear(),ae.resetResumeState(),be()}},[t,ce,d,ae,Ke,Ae,Ye,Je,Ze,be]),(0,V.useEffect)(()=>{d&&xe().catch(()=>{})},[d,xe]),(0,V.useEffect)(()=>{ye.current?.()},[Oe,pe]);let dt=async e=>{let{toolCallId:t}=e,n=`tool`in e?e.tool:``,r=`output`in e?e.output:void 0;if(j.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:t,toolName:n,output:r,autoContinue:l,clientTools:te.current?dk(te.current):void 0})),ze(e=>new Map(e).set(t,r)),le(e),l&&Me(),!l){if(!u){de();return}let e=tt.current?.toolCallIds;if(!e){de();return}let n=e.size===1&&e.has(t);e.has(t)&&e.delete(t),(n||e.size===0)&&de()}},ft=e=>{let{id:t,approved:n}=e,r;for(let e of Be.current){for(let n of e.parts)if(`toolCallId`in n&&`approval`in n&&n.approval?.id===t){r=n.toolCallId;break}if(r)break}r?B(r,n):console.warn(`[useAgentChat] addToolApprovalResponse: Could not find toolCallId for approval ID "${t}". Server will not be notified, which may cause duplicate messages.`),ue(e)},pt=(0,V.useMemo)(()=>Re.size===0?se:se.map(e=>({...e,parts:e.parts.map(e=>!(`toolCallId`in e)||!(`state`in e)||e.state!==`input-available`||!Re.has(e.toolCallId)?e:{...e,state:`output-available`,output:Re.get(e.toolCallId)})})),[se,Re]);(0,V.useEffect)(()=>{let e=new Set;for(let t of se)for(let n of t.parts)`toolCallId`in n&&n.toolCallId&&e.add(n.toolCallId);ze(t=>{if(t.size===0)return t;let n=!1;for(let r of t.keys())if(!e.has(r)){n=!0;break}if(!n)return t;let r=new Map;for(let[n,i]of t)e.has(n)&&r.set(n,i);return r});for(let t of Pe.current)e.has(t)||Pe.current.delete(t)},[se]);let mt=(0,V.useCallback)(e=>{let t=e.toolName??``;at(e.toolCallId,t,e.output,e.state,e.errorText),le({tool:t,toolCallId:e.toolCallId,output:e.state===`output-error`?e.errorText??`Tool execution denied by user`:e.output})},[at,le]),ht=pt[pt.length-1],gt=(()=>{if(nt.size===0&&!s||!ht||ht.role!==`assistant`)return!1;for(let e of ht.parts){if(!OO(e)||e.state!==`input-available`)continue;let t=AO(e);if(!_.includes(t)&&(nt.has(e.toolCallId)||s?.[t]?.execute))return!0}return!1})(),_t=st||gt,vt=pe===`streaming`||_t;return{...oe,resumeStream:xe,messages:pt,isServerStreaming:_t,isStreaming:vt,isRecovering:lt,isToolContinuation:Oe,connectionError:t.connectionError??null,sendMessage:Qe,stop:Ne,addToolOutput:mt,addToolResult:dt,addToolApprovalResponse:ft,clearHistory:()=>{Ze(),t.send(JSON.stringify({type:`cf_agent_chat_clear`}))},setMessages:e=>{let n;n=typeof e==`function`?e(Be.current):e,n.length===0&&Ue(),ce(n),p&&t.send(JSON.stringify({messages:n,type:`cf_agent_chat_messages`}))}}}var vk=new Set;function yk(){return!0}function bk(e){let t=e.syncMessagesToServer;return!yk()&&t&&!vk.has(`syncMessagesToServer`)&&(vk.add(`syncMessagesToServer`),console.warn("[@cloudflare/think] `syncMessagesToServer` has no effect: Think ignores client-pushed transcripts. `setMessages` updates the local view only. Use `clearHistory()` for persisted clears.")),_k({...e,syncMessagesToServer:!1})}var xk=(function(e){if(e==null)return Ek;if(typeof e==`function`)return Tk(e);if(typeof e==`object`)return Array.isArray(e)?Sk(e):Ck(e);if(typeof e==`string`)return wk(e);throw Error(`Expected function, string, or object as test`)});function Sk(e){let t=[],n=-1;for(;++n<e.length;)t[n]=xk(e[n]);return Tk(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Ck(e){let t=e;return Tk(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function wk(e){return Tk(t);function t(t){return t&&t.type===e}}function Tk(e){return t;function t(t,n,r){return!!(Dk(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Ek(){return!0}function Dk(e){return typeof e==`object`&&!!e&&`type`in e}function Ok(e){return e}var kk=[],Ak=`skip`;function jk(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=xk(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Ok(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=kk,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Mk(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Mk(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?kk:[e]}function Nk(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),jk(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Pk={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function Fk({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=Pk.indicator,imageBlockPolicy:c=Pk.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=Gk(e,t,n,r,i,a,o,s,c);Vk(l),Nk(l,u)}}function Ik(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function Lk(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var Rk=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),zk=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function Bk(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=Ik(e,n);if(!o||zk.has(o.protocol)||!(Rk.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=Lk(e);return o&&t.some(e=>{let t=Ik(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function Vk(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)Vk(t)}}var Hk=Symbol(`node-seen`);function Uk(e,t,n){return t===Pk.remove?{type:`remove`}:t===Pk.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function Wk(e,t,n){if(t===Pk.remove)return{type:`remove`};if(t===Pk.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var Gk=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[Hk])return!0;if(u.tagName===`a`){let n=Bk(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[Hk]=!0,Nk(u,l),f&&typeof d==`number`){let e=Uk(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[Ak,d];f.children[d]=e.element}return Ak}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=Bk(u.properties.src,n,e,r,!0,i);if(t===null){if(u[Hk]=!0,Nk(u,l),f&&typeof d==`number`){let e=Wk(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[Ak,d];f.children[d]=e.element}return Ak}else return u.properties.src=t,!0}return!0};return l},Kk=typeof self==`object`?self:globalThis,qk=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Kk[e](t)},Jk=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(qk(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(qk(a,o),i)};return r},Yk=e=>Jk(new Map,e)(0),Xk=``,{toString:Zk}={},{keys:Qk}=Object,$k=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Zk.call(e).slice(8,-1);switch(n){case`Array`:return[1,Xk];case`Object`:return[2,Xk];case`Date`:return[3,Xk];case`RegExp`:return[4,Xk];case`Map`:return[5,Xk];case`Set`:return[6,Xk];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},eA=([e,t])=>e===0&&(t===`function`||t===`symbol`),tA=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=$k(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Qk(r))(e||!eA($k(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(eA($k(n))||eA($k(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!eA($k(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},nA=(e,{json:t,lossy:n}={})=>{let r=[];return tA(!(t||n),!!t,new Map,r)(e),r},rA=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Yk(nA(e,t)):structuredClone(e):(e,t)=>Yk(nA(e,t)),iA=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};iA.prototype.normal={},iA.prototype.property={},iA.prototype.space=void 0;function aA(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new iA(n,r,t)}function oA(e){return e.toLowerCase()}var sA=class{constructor(e,t){this.attribute=t,this.property=e}};sA.prototype.attribute=``,sA.prototype.booleanish=!1,sA.prototype.boolean=!1,sA.prototype.commaOrSpaceSeparated=!1,sA.prototype.commaSeparated=!1,sA.prototype.defined=!1,sA.prototype.mustUseProperty=!1,sA.prototype.number=!1,sA.prototype.overloadedBoolean=!1,sA.prototype.property=``,sA.prototype.spaceSeparated=!1,sA.prototype.space=void 0;var cA=s({boolean:()=>uA,booleanish:()=>dA,commaOrSpaceSeparated:()=>gA,commaSeparated:()=>hA,number:()=>pA,overloadedBoolean:()=>fA,spaceSeparated:()=>mA}),lA=0,uA=_A(),dA=_A(),fA=_A(),pA=_A(),mA=_A(),hA=_A(),gA=_A();function _A(){return 2**++lA}var vA=Object.keys(cA),yA=class extends sA{constructor(e,t,n,r){let i=-1;if(super(e,t),bA(this,`space`,r),typeof n==`number`)for(;++i<vA.length;){let e=vA[i];bA(this,vA[i],(n&cA[e])===cA[e])}}};yA.prototype.defined=!0;function bA(e,t,n){n&&(e[t]=n)}function xA(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new yA(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[oA(r)]=r,n[oA(a.attribute)]=r}return new iA(t,n,e.space)}var SA=xA({properties:{ariaActiveDescendant:null,ariaAtomic:dA,ariaAutoComplete:null,ariaBusy:dA,ariaChecked:dA,ariaColCount:pA,ariaColIndex:pA,ariaColSpan:pA,ariaControls:mA,ariaCurrent:null,ariaDescribedBy:mA,ariaDetails:null,ariaDisabled:dA,ariaDropEffect:mA,ariaErrorMessage:null,ariaExpanded:dA,ariaFlowTo:mA,ariaGrabbed:dA,ariaHasPopup:null,ariaHidden:dA,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mA,ariaLevel:pA,ariaLive:null,ariaModal:dA,ariaMultiLine:dA,ariaMultiSelectable:dA,ariaOrientation:null,ariaOwns:mA,ariaPlaceholder:null,ariaPosInSet:pA,ariaPressed:dA,ariaReadOnly:dA,ariaRelevant:null,ariaRequired:dA,ariaRoleDescription:mA,ariaRowCount:pA,ariaRowIndex:pA,ariaRowSpan:pA,ariaSelected:dA,ariaSetSize:pA,ariaSort:null,ariaValueMax:pA,ariaValueMin:pA,ariaValueNow:pA,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function CA(e,t){return t in e?e[t]:t}function wA(e,t){return CA(e,t.toLowerCase())}var TA=xA({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:hA,acceptCharset:mA,accessKey:mA,action:null,allow:null,allowFullScreen:uA,allowPaymentRequest:uA,allowUserMedia:uA,alpha:uA,alt:null,as:null,async:uA,autoCapitalize:null,autoComplete:mA,autoFocus:uA,autoPlay:uA,blocking:mA,capture:null,charSet:null,checked:uA,cite:null,className:mA,closedBy:null,colorSpace:null,cols:pA,colSpan:pA,command:null,commandFor:null,content:null,contentEditable:dA,controls:uA,controlsList:mA,coords:pA|hA,crossOrigin:null,data:null,dateTime:null,decoding:null,default:uA,defer:uA,dir:null,dirName:null,disabled:uA,download:fA,draggable:dA,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:uA,formTarget:null,headers:mA,height:pA,hidden:fA,high:pA,href:null,hrefLang:null,htmlFor:mA,httpEquiv:mA,id:null,imageSizes:null,imageSrcSet:null,inert:uA,inputMode:null,integrity:null,is:null,isMap:uA,itemId:null,itemProp:mA,itemRef:mA,itemScope:uA,itemType:mA,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:uA,low:pA,manifest:null,max:null,maxLength:pA,media:null,method:null,min:null,minLength:pA,multiple:uA,muted:uA,name:null,nonce:null,noModule:uA,noValidate:uA,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:uA,optimum:pA,pattern:null,ping:mA,placeholder:null,playsInline:uA,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:uA,referrerPolicy:null,rel:mA,required:uA,reversed:uA,rows:pA,rowSpan:pA,sandbox:mA,scope:null,scoped:uA,seamless:uA,selected:uA,shadowRootClonable:uA,shadowRootCustomElementRegistry:uA,shadowRootDelegatesFocus:uA,shadowRootMode:null,shadowRootSerializable:uA,shape:null,size:pA,sizes:null,slot:null,span:pA,spellCheck:dA,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pA,step:null,style:null,tabIndex:pA,target:null,title:null,translate:null,type:null,typeMustMatch:uA,useMap:null,value:dA,width:pA,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mA,axis:null,background:null,bgColor:null,border:pA,borderColor:null,bottomMargin:pA,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:uA,declare:uA,event:null,face:null,frame:null,frameBorder:null,hSpace:pA,leftMargin:pA,link:null,longDesc:null,lowSrc:null,marginHeight:pA,marginWidth:pA,noResize:uA,noHref:uA,noShade:uA,noWrap:uA,object:null,profile:null,prompt:null,rev:null,rightMargin:pA,rules:null,scheme:null,scrolling:dA,standby:null,summary:null,text:null,topMargin:pA,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pA,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:uA,disablePictureInPicture:uA,disableRemotePlayback:uA,exportParts:hA,part:mA,prefix:null,property:null,results:pA,security:null,unselectable:null},space:`html`,transform:wA}),EA=xA({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:gA,accentHeight:pA,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pA,amplitude:pA,arabicForm:null,ascent:pA,attributeName:null,attributeType:null,azimuth:pA,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pA,by:null,calcMode:null,capHeight:pA,className:mA,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:pA,diffuseConstant:pA,direction:null,display:null,dur:null,divisor:pA,dominantBaseline:null,download:uA,dx:null,dy:null,edgeMode:null,editable:null,elevation:pA,enableBackground:null,end:null,event:null,exponent:pA,externalResourcesRequired:null,fill:null,fillOpacity:pA,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:hA,g2:hA,glyphName:hA,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pA,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pA,horizOriginX:pA,horizOriginY:pA,id:null,ideographic:pA,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pA,k:pA,k1:pA,k2:pA,k3:pA,k4:pA,kernelMatrix:gA,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pA,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:pA,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:pA,overlineThickness:pA,paintOrder:null,panose1:null,path:null,pathLength:pA,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mA,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pA,pointsAtY:pA,pointsAtZ:pA,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gA,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gA,rev:gA,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gA,requiredFeatures:gA,requiredFonts:gA,requiredFormats:gA,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:pA,specularExponent:pA,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pA,strikethroughThickness:pA,string:null,stroke:null,strokeDashArray:gA,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pA,strokeOpacity:pA,strokeWidth:null,style:null,surfaceScale:pA,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gA,tabIndex:pA,tableValues:null,target:null,targetX:pA,targetY:pA,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gA,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pA,underlineThickness:pA,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pA,values:null,vAlphabetic:pA,vMathematical:pA,vectorEffect:null,vHanging:pA,vIdeographic:pA,version:null,vertAdvY:pA,vertOriginX:pA,vertOriginY:pA,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pA,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:CA}),DA=xA({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),OA=xA({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:wA}),kA=xA({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),AA={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},jA=/[A-Z]/g,MA=/-[a-z]/g,NA=/^data[-\w.:]+$/i;function PA(e,t){let n=oA(t),r=t,i=sA;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&NA.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(MA,IA);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!MA.test(e)){let n=e.replace(jA,FA);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=yA}return new i(r,t)}function FA(e){return`-`+e.toLowerCase()}function IA(e){return e.charAt(1).toUpperCase()}var LA=aA([SA,TA,DA,OA,kA],`html`),RA=aA([SA,EA,DA,OA,kA],`svg`);function zA(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function BA(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var VA=/[#.]/g;function HA(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){VA.lastIndex=i;let e=VA.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function UA(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function WA(e){return e.join(` `).trim()}function GA(e,t,n){let r=n?ZA(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=HA(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,KA(i))a.unshift(i);else for(let[t,n]of Object.entries(i))qA(e,o.properties,t,n)}for(let e of a)JA(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function KA(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function qA(e,t,n,r){let i=PA(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?UA(r):i.commaSeparated?zA(r):i.commaOrSpaceSeparated?UA(zA(r).join(` `)):YA(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?XA(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(YA(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function JA(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)JA(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?JA(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function YA(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||oA(n)===oA(t)))return!0}return n}function XA(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function ZA(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var QA=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),$A=GA(LA,`div`),ej=GA(RA,`g`,QA);function tj(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=nj(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=nj(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function nj(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
111
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var rj={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},ij={}.hasOwnProperty,aj=Object.prototype;function oj(e,t){let n=t||{};return sj({file:n.file||void 0,location:!1,schema:n.space===`svg`?RA:LA,verbose:n.verbose||!1},e)}function sj(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},uj(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:cj(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=tj(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},uj(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},uj(e,r,n),n}default:return n=lj(e,t),n}}function cj(e,t){let n=-1,r=[];for(;++n<t.length;){let i=sj(e,t[n]);r.push(i)}return r}function lj(e,t){let n=e.schema;e.schema=t.namespaceURI===rj.svg?RA:LA;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;ij.call(aj,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?ej:$A)(t.tagName,i,cj(e,t.childNodes));if(uj(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&fj(r.startTag),o=r&&r.endTag&&fj(r.endTag),s=sj(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function uj(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=dj(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function dj(e,t,n){let r=fj(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)ij.call(n.attrs,i)&&(r[PA(e.schema,i).property]=fj(n.attrs[i]));n.startTag;let a=fj(n.startTag),o=n.endTag?fj(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function fj(e){let t=pj({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=pj({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function pj(e){return e.line&&e.column?e:void 0}var mj={}.hasOwnProperty;function hj(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&mj.call(t,e)){let n=String(t[e]);i=mj.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var gj={},_j={}.hasOwnProperty,vj=hj(`type`,{handlers:{root:bj,element:Tj,text:Cj,comment:wj,doctype:Sj}});function yj(e,t){let n=(t||gj).space;return vj(e,n===`svg`?RA:LA)}function bj(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=Dj(e.children,n,t),Oj(e,n),n}function xj(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=Dj(e.children,n,t),Oj(e,n),n}function Sj(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return Oj(e,t),t}function Cj(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return Oj(e,t),t}function wj(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return Oj(e,t),t}function Tj(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=RA);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&_j.call(e.properties,a)){let t=Ej(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:rj[o],childNodes:[],parentNode:null};return s.childNodes=Dj(e.children,s,r),Oj(e,s),e.tagName===`template`&&e.content&&(s.content=xj(e.content,r)),s}function Ej(e,t,n){let r=PA(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?BA(n):WA(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=rj[r.space]}return i}function Dj(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=vj(e[r],n);a.parentNode=t,i.push(a)}return i}function Oj(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var kj=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Aj=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),G;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(G||={});var jj={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function Mj(e){return e>=55296&&e<=57343}function Nj(e){return e>=56320&&e<=57343}function Pj(e,t){return(e-55296)*1024+9216+t}function Fj(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ij(e){return e>=64976&&e<=65007||Aj.has(e)}var K;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(K||={});var Lj=65536,Rj=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Lj,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(Nj(t))return this.pos++,this._addGap(),Pj(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,G.EOF;return this._err(K.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let n=this.html.charCodeAt(t);return n===G.CARRIAGE_RETURN?G.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let e=this.html.charCodeAt(this.pos);return e===G.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,G.LINE_FEED):e===G.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Mj(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===G.LINE_FEED||e===G.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Fj(e)?this._err(K.controlCharacterInInputStream):Ij(e)&&this._err(K.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},zj;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(zj||={});function Bj(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Vj=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),Hj=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function Uj(e){return e>=55296&&e<=57343||e>1114111?65533:Hj.get(e)??e}var Wj;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(Wj||={});var Gj=32,Kj;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Kj||={});function qj(e){return e>=Wj.ZERO&&e<=Wj.NINE}function Jj(e){return e>=Wj.UPPER_A&&e<=Wj.UPPER_F||e>=Wj.LOWER_A&&e<=Wj.LOWER_F}function Yj(e){return e>=Wj.UPPER_A&&e<=Wj.UPPER_Z||e>=Wj.LOWER_A&&e<=Wj.LOWER_Z||qj(e)}function Xj(e){return e===Wj.EQUALS||Yj(e)}var Zj;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Zj||={});var Qj;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Qj||={});var $j=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Zj.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Qj.Strict}startEntity(e){this.decodeMode=e,this.state=Zj.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Zj.EntityStart:return e.charCodeAt(t)===Wj.NUM?(this.state=Zj.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Zj.NamedEntity,this.stateNamedEntity(e,t));case Zj.NumericStart:return this.stateNumericStart(e,t);case Zj.NumericDecimal:return this.stateNumericDecimal(e,t);case Zj.NumericHex:return this.stateNumericHex(e,t);case Zj.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Gj)===Wj.LOWER_X?(this.state=Zj.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Zj.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(qj(r)||Jj(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(qj(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Wj.SEMI)this.consumed+=1;else if(this.decodeMode===Qj.Strict)return 0;return this.emitCodePoint(Uj(this.result),this.consumed),this.errors&&(e!==Wj.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Kj.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=eM(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Qj.Attribute&&(i===0||Xj(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Kj.VALUE_LENGTH)>>14,i!==0){if(a===Wj.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Qj.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Kj.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Kj.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Zj.NamedEntity:return this.result!==0&&(this.decodeMode!==Qj.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Zj.NumericDecimal:return this.emitNumericEntity(0,2);case Zj.NumericHex:return this.emitNumericEntity(0,3);case Zj.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Zj.EntityStart:return 0}}};function eM(e,t,n,r){let i=(t&Kj.BRANCH_LENGTH)>>7,a=t&Kj.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var q;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(q||={});var tM;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(tM||={});var nM;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(nM||={});var J;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(J||={});var Y;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(Y||={});var rM=new Map([[J.A,Y.A],[J.ADDRESS,Y.ADDRESS],[J.ANNOTATION_XML,Y.ANNOTATION_XML],[J.APPLET,Y.APPLET],[J.AREA,Y.AREA],[J.ARTICLE,Y.ARTICLE],[J.ASIDE,Y.ASIDE],[J.B,Y.B],[J.BASE,Y.BASE],[J.BASEFONT,Y.BASEFONT],[J.BGSOUND,Y.BGSOUND],[J.BIG,Y.BIG],[J.BLOCKQUOTE,Y.BLOCKQUOTE],[J.BODY,Y.BODY],[J.BR,Y.BR],[J.BUTTON,Y.BUTTON],[J.CAPTION,Y.CAPTION],[J.CENTER,Y.CENTER],[J.CODE,Y.CODE],[J.COL,Y.COL],[J.COLGROUP,Y.COLGROUP],[J.DD,Y.DD],[J.DESC,Y.DESC],[J.DETAILS,Y.DETAILS],[J.DIALOG,Y.DIALOG],[J.DIR,Y.DIR],[J.DIV,Y.DIV],[J.DL,Y.DL],[J.DT,Y.DT],[J.EM,Y.EM],[J.EMBED,Y.EMBED],[J.FIELDSET,Y.FIELDSET],[J.FIGCAPTION,Y.FIGCAPTION],[J.FIGURE,Y.FIGURE],[J.FONT,Y.FONT],[J.FOOTER,Y.FOOTER],[J.FOREIGN_OBJECT,Y.FOREIGN_OBJECT],[J.FORM,Y.FORM],[J.FRAME,Y.FRAME],[J.FRAMESET,Y.FRAMESET],[J.H1,Y.H1],[J.H2,Y.H2],[J.H3,Y.H3],[J.H4,Y.H4],[J.H5,Y.H5],[J.H6,Y.H6],[J.HEAD,Y.HEAD],[J.HEADER,Y.HEADER],[J.HGROUP,Y.HGROUP],[J.HR,Y.HR],[J.HTML,Y.HTML],[J.I,Y.I],[J.IMG,Y.IMG],[J.IMAGE,Y.IMAGE],[J.INPUT,Y.INPUT],[J.IFRAME,Y.IFRAME],[J.KEYGEN,Y.KEYGEN],[J.LABEL,Y.LABEL],[J.LI,Y.LI],[J.LINK,Y.LINK],[J.LISTING,Y.LISTING],[J.MAIN,Y.MAIN],[J.MALIGNMARK,Y.MALIGNMARK],[J.MARQUEE,Y.MARQUEE],[J.MATH,Y.MATH],[J.MENU,Y.MENU],[J.META,Y.META],[J.MGLYPH,Y.MGLYPH],[J.MI,Y.MI],[J.MO,Y.MO],[J.MN,Y.MN],[J.MS,Y.MS],[J.MTEXT,Y.MTEXT],[J.NAV,Y.NAV],[J.NOBR,Y.NOBR],[J.NOFRAMES,Y.NOFRAMES],[J.NOEMBED,Y.NOEMBED],[J.NOSCRIPT,Y.NOSCRIPT],[J.OBJECT,Y.OBJECT],[J.OL,Y.OL],[J.OPTGROUP,Y.OPTGROUP],[J.OPTION,Y.OPTION],[J.P,Y.P],[J.PARAM,Y.PARAM],[J.PLAINTEXT,Y.PLAINTEXT],[J.PRE,Y.PRE],[J.RB,Y.RB],[J.RP,Y.RP],[J.RT,Y.RT],[J.RTC,Y.RTC],[J.RUBY,Y.RUBY],[J.S,Y.S],[J.SCRIPT,Y.SCRIPT],[J.SEARCH,Y.SEARCH],[J.SECTION,Y.SECTION],[J.SELECT,Y.SELECT],[J.SOURCE,Y.SOURCE],[J.SMALL,Y.SMALL],[J.SPAN,Y.SPAN],[J.STRIKE,Y.STRIKE],[J.STRONG,Y.STRONG],[J.STYLE,Y.STYLE],[J.SUB,Y.SUB],[J.SUMMARY,Y.SUMMARY],[J.SUP,Y.SUP],[J.TABLE,Y.TABLE],[J.TBODY,Y.TBODY],[J.TEMPLATE,Y.TEMPLATE],[J.TEXTAREA,Y.TEXTAREA],[J.TFOOT,Y.TFOOT],[J.TD,Y.TD],[J.TH,Y.TH],[J.THEAD,Y.THEAD],[J.TITLE,Y.TITLE],[J.TR,Y.TR],[J.TRACK,Y.TRACK],[J.TT,Y.TT],[J.U,Y.U],[J.UL,Y.UL],[J.SVG,Y.SVG],[J.VAR,Y.VAR],[J.WBR,Y.WBR],[J.XMP,Y.XMP]]);function iM(e){return rM.get(e)??Y.UNKNOWN}var X=Y,aM={[q.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[q.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[q.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[q.XLINK]:new Set,[q.XML]:new Set,[q.XMLNS]:new Set},oM=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);J.STYLE,J.SCRIPT,J.XMP,J.IFRAME,J.NOEMBED,J.NOFRAMES,J.PLAINTEXT;var Z;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Z||={});var sM={DATA:Z.DATA,RCDATA:Z.RCDATA,RAWTEXT:Z.RAWTEXT,SCRIPT_DATA:Z.SCRIPT_DATA,PLAINTEXT:Z.PLAINTEXT,CDATA_SECTION:Z.CDATA_SECTION};function cM(e){return e>=G.DIGIT_0&&e<=G.DIGIT_9}function lM(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_Z}function uM(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_Z}function dM(e){return uM(e)||lM(e)}function fM(e){return dM(e)||cM(e)}function pM(e){return e+32}function mM(e){return e===G.SPACE||e===G.LINE_FEED||e===G.TABULATION||e===G.FORM_FEED}function hM(e){return mM(e)||e===G.SOLIDUS||e===G.GREATER_THAN_SIGN}function gM(e){return e===G.NULL?K.nullCharacterReference:e>1114111?K.characterReferenceOutsideUnicodeRange:Mj(e)?K.surrogateCharacterReference:Ij(e)?K.noncharacterCharacterReference:Fj(e)||e===G.CARRIAGE_RETURN?K.controlCharacterReference:null}var _M=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Z.DATA,this.returnState=Z.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Rj(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new $j(Vj,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(K.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(K.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=gM(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:zj.START_TAG,tagName:``,tagID:Y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:zj.END_TAG,tagName:``,tagID:Y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:zj.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:zj.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(Bj(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(K.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=iM(e.tagName),e.type===zj.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(K.endTagWithAttributes),e.selfClosing&&this._err(K.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case zj.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case zj.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case zj.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:zj.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=mM(e)?zj.WHITESPACE_CHARACTER:e===G.NULL?zj.NULL_CHARACTER:zj.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(zj.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Z.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Qj.Attribute:Qj.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Z.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Z.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Z.DATA:this._stateData(e);break;case Z.RCDATA:this._stateRcdata(e);break;case Z.RAWTEXT:this._stateRawtext(e);break;case Z.SCRIPT_DATA:this._stateScriptData(e);break;case Z.PLAINTEXT:this._statePlaintext(e);break;case Z.TAG_OPEN:this._stateTagOpen(e);break;case Z.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Z.TAG_NAME:this._stateTagName(e);break;case Z.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Z.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Z.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Z.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Z.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Z.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Z.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Z.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Z.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Z.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Z.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Z.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Z.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Z.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Z.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Z.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Z.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Z.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Z.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Z.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Z.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Z.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Z.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Z.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Z.BOGUS_COMMENT:this._stateBogusComment(e);break;case Z.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Z.COMMENT_START:this._stateCommentStart(e);break;case Z.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Z.COMMENT:this._stateComment(e);break;case Z.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Z.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Z.COMMENT_END:this._stateCommentEnd(e);break;case Z.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Z.DOCTYPE:this._stateDoctype(e);break;case Z.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Z.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Z.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Z.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Z.CDATA_SECTION:this._stateCdataSection(e);break;case Z.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Z.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Z.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Z.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Z.TAG_OPEN;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitCodePoint(e);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case G.AMPERSAND:this._startCharacterReference();break;case G.LESS_THAN_SIGN:this.state=Z.RCDATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case G.LESS_THAN_SIGN:this.state=Z.RAWTEXT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(dM(e))this._createStartTagToken(),this.state=Z.TAG_NAME,this._stateTagName(e);else switch(e){case G.EXCLAMATION_MARK:this.state=Z.MARKUP_DECLARATION_OPEN;break;case G.SOLIDUS:this.state=Z.END_TAG_OPEN;break;case G.QUESTION_MARK:this._err(K.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e);break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Z.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(dM(e))this._createEndTagToken(),this.state=Z.TAG_NAME,this._stateTagName(e);else switch(e){case G.GREATER_THAN_SIGN:this._err(K.missingEndTagName),this.state=Z.DATA;break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this.state=Z.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.tagName+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(lM(e)?pM(e):e)}}_stateRcdataLessThanSign(e){e===G.SOLIDUS?this.state=Z.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Z.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){dM(e)?(this.state=Z.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Z.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Z.BEFORE_ATTRIBUTE_NAME,!1;case G.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Z.SELF_CLOSING_START_TAG,!1;case G.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Z.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===G.SOLIDUS?this.state=Z.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){dM(e)?(this.state=Z.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case G.SOLIDUS:this.state=Z.SCRIPT_DATA_END_TAG_OPEN;break;case G.EXCLAMATION_MARK:this.state=Z.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){dM(e)?(this.state=Z.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===G.HYPHEN_MINUS?(this.state=Z.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===G.HYPHEN_MINUS?(this.state=Z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Z.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.GREATER_THAN_SIGN:this.state=Z.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===G.SOLIDUS?this.state=Z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:dM(e)?(this._emitChars(`<`),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){dM(e)?(this.state=Z.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(jj.SCRIPT,!1)&&hM(this.preprocessor.peek(jj.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<jj.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.GREATER_THAN_SIGN:this.state=Z.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===G.SOLIDUS?(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(jj.SCRIPT,!1)&&hM(this.preprocessor.peek(jj.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<jj.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Z.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this.state=Z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._err(K.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Z.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Z.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this._leaveAttrName(),this.state=Z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._leaveAttrName(),this.state=Z.BEFORE_ATTRIBUTE_VALUE;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:this._err(K.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(lM(e)?pM(e):e)}}_stateAfterAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:this.state=Z.SELF_CLOSING_START_TAG;break;case G.EQUALS_SIGN:this.state=Z.BEFORE_ATTRIBUTE_VALUE;break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Z.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:this.state=Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case G.APOSTROPHE:this.state=Z.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingAttributeValue),this.state=Z.DATA,this.emitCurrentTagToken();break;default:this.state=Z.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case G.QUOTATION_MARK:this.state=Z.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case G.APOSTROPHE:this.state=Z.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case G.AMPERSAND:this._startCharacterReference();break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Z.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:case G.EQUALS_SIGN:case G.GRAVE_ACCENT:this._err(K.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Z.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this._leaveAttrValue(),this.state=Z.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Z.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.missingWhitespaceBetweenAttributes),this.state=Z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case G.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Z.DATA,this.emitCurrentTagToken();break}case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.unexpectedSolidusInTag),this.state=Z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentComment(t);break;case G.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(jj.DASH_DASH,!0)?(this._createCommentToken(jj.DASH_DASH.length+1),this.state=Z.COMMENT_START):this._consumeSequenceIfMatch(jj.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(jj.DOCTYPE.length+1),this.state=Z.DOCTYPE):this._consumeSequenceIfMatch(jj.CDATA_START,!0)?this.inForeignNode?this.state=Z.CDATA_SECTION:(this._err(K.cdataInHtmlContent),this._createCommentToken(jj.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Z.BOGUS_COMMENT):this._ensureHibernation()||(this._err(K.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case G.HYPHEN_MINUS:this.state=Z.COMMENT_START_DASH;break;case G.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=Z.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Z.COMMENT_END;break;case G.GREATER_THAN_SIGN:this._err(K.abruptClosingOfEmptyComment),this.state=Z.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Z.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Z.COMMENT_END_DASH;break;case G.LESS_THAN_SIGN:t.data+=`<`,this.state=Z.COMMENT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case G.EXCLAMATION_MARK:t.data+=`!`,this.state=Z.COMMENT_LESS_THAN_SIGN_BANG;break;case G.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===G.HYPHEN_MINUS?this.state=Z.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Z.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===G.HYPHEN_MINUS?this.state=Z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Z.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==G.GREATER_THAN_SIGN&&e!==G.EOF&&this._err(K.nestedComment),this.state=Z.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Z.COMMENT_END;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentComment(t);break;case G.EXCLAMATION_MARK:this.state=Z.COMMENT_END_BANG;break;case G.HYPHEN_MINUS:t.data+=`-`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Z.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:t.data+=`--!`,this.state=Z.COMMENT_END_DASH;break;case G.GREATER_THAN_SIGN:this._err(K.incorrectlyClosedComment),this.state=Z.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Z.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBeforeDoctypeName),this.state=Z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(lM(e))this._createDoctypeToken(String.fromCharCode(pM(e))),this.state=Z.DOCTYPE_NAME;else switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.NULL:this._err(K.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Z.DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:{this._err(K.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Z.DATA;break}case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Z.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.AFTER_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.NULL:this._err(K.unexpectedNullCharacter),t.name+=`�`;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(lM(e)?pM(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(jj.PUBLIC,!1)?this.state=Z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(jj.SYSTEM,!1)?this.state=Z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(K.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.publicId=``,this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case G.APOSTROPHE:this.state=Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case G.GREATER_THAN_SIGN:this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.QUOTATION_MARK:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case G.APOSTROPHE:this.state=Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Z.DATA;break;case G.NULL:this._err(K.unexpectedNullCharacter);break;case G.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case G.RIGHT_SQUARE_BRACKET:this.state=Z.CDATA_SECTION_BRACKET;break;case G.EOF:this._err(K.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===G.RIGHT_SQUARE_BRACKET?this.state=Z.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Z.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case G.GREATER_THAN_SIGN:this.state=Z.DATA;break;case G.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Z.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(G.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&fM(this.preprocessor.peek(1))?Z.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){fM(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===G.SEMICOLON&&this._err(K.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},vM=new Set([Y.DD,Y.DT,Y.LI,Y.OPTGROUP,Y.OPTION,Y.P,Y.RB,Y.RP,Y.RT,Y.RTC]),yM=new Set([...vM,Y.CAPTION,Y.COLGROUP,Y.TBODY,Y.TD,Y.TFOOT,Y.TH,Y.THEAD,Y.TR]),bM=new Set([Y.APPLET,Y.CAPTION,Y.HTML,Y.MARQUEE,Y.OBJECT,Y.TABLE,Y.TD,Y.TEMPLATE,Y.TH]),xM=new Set([...bM,Y.OL,Y.UL]),SM=new Set([...bM,Y.BUTTON]),CM=new Set([Y.ANNOTATION_XML,Y.MI,Y.MN,Y.MO,Y.MS,Y.MTEXT]),wM=new Set([Y.DESC,Y.FOREIGN_OBJECT,Y.TITLE]),TM=new Set([Y.TR,Y.TEMPLATE,Y.HTML]),EM=new Set([Y.TBODY,Y.TFOOT,Y.THEAD,Y.TEMPLATE,Y.HTML]),DM=new Set([Y.TABLE,Y.TEMPLATE,Y.HTML]),OM=new Set([Y.TD,Y.TH]),kM=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Y.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===q.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==q.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(oM,q.HTML)}popUntilTableCellPopped(){this.popUntilPopped(OM,q.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(DM,q.HTML)}clearBackToTableBodyContext(){this.clearBackTo(EM,q.HTML)}clearBackToTableRowContext(){this.clearBackTo(TM,q.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Y.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===Y.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case q.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case q.SVG:if(wM.has(r))return!1;break;case q.MATHML:if(CM.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,bM)}hasInListItemScope(e){return this.hasInDynamicScope(e,xM)}hasInButtonScope(e){return this.hasInDynamicScope(e,SM)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case q.HTML:if(oM.has(t))return!0;if(bM.has(t))return!1;break;case q.SVG:if(wM.has(t))return!1;break;case q.MATHML:if(CM.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===q.HTML)switch(this.tagIDs[t]){case e:return!0;case Y.TABLE:case Y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===q.HTML)switch(this.tagIDs[e]){case Y.TBODY:case Y.THEAD:case Y.TFOOT:return!0;case Y.TABLE:case Y.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===q.HTML)switch(this.tagIDs[t]){case e:return!0;case Y.OPTION:case Y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&vM.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&yM.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&yM.has(this.currentTagId);)this.pop()}},AM=3,jM;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(jM||={});var MM={type:jM.Marker},NM=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===jM.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<AM)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<AM)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=AM&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(MM)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:jM.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:jM.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(MM);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===jM.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===jM.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===jM.Element&&t.element===e)}},PM={createDocument(){return{nodeName:`#document`,mode:nM.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};PM.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(PM.isTextNode(n)){n.value+=t;return}}PM.appendChild(e,PM.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&PM.isTextNode(r)?r.value+=t:PM.insertBefore(e,PM.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},FM=`html`,IM=`about:legacy-compat`,LM=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,RM=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),zM=[...RM,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],BM=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),VM=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],HM=[...VM,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function UM(e,t){return t.some(t=>e.startsWith(t))}function WM(e){return e.name===FM&&e.publicId===null&&(e.systemId===null||e.systemId===IM)}function GM(e){if(e.name!==FM)return nM.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===LM)return nM.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),BM.has(n))return nM.QUIRKS;let e=t===null?zM:RM;if(UM(n,e))return nM.QUIRKS;if(e=t===null?VM:HM,UM(n,e))return nM.LIMITED_QUIRKS}return nM.NO_QUIRKS}var KM={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},qM=`definitionurl`,JM=`definitionURL`,YM=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),XM=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:q.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:q.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:q.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:q.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:q.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:q.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:q.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:q.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:q.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:q.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:q.XMLNS}]]),ZM=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),QM=new Set([Y.B,Y.BIG,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.CENTER,Y.CODE,Y.DD,Y.DIV,Y.DL,Y.DT,Y.EM,Y.EMBED,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HR,Y.I,Y.IMG,Y.LI,Y.LISTING,Y.MENU,Y.META,Y.NOBR,Y.OL,Y.P,Y.PRE,Y.RUBY,Y.S,Y.SMALL,Y.SPAN,Y.STRONG,Y.STRIKE,Y.SUB,Y.SUP,Y.TABLE,Y.TT,Y.U,Y.UL,Y.VAR]);function $M(e){let t=e.tagID;return t===Y.FONT&&e.attrs.some(({name:e})=>e===tM.COLOR||e===tM.SIZE||e===tM.FACE)||QM.has(t)}function eN(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===qM){e.attrs[t].name=JM;break}}function tN(e){for(let t=0;t<e.attrs.length;t++){let n=YM.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function nN(e){for(let t=0;t<e.attrs.length;t++){let n=XM.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function rN(e){let t=ZM.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=iM(e.tagName))}function iN(e,t){return t===q.MATHML&&(e===Y.MI||e===Y.MO||e===Y.MN||e===Y.MS||e===Y.MTEXT)}function aN(e,t,n){if(t===q.MATHML&&e===Y.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===tM.ENCODING){let t=n[e].value.toLowerCase();return t===KM.TEXT_HTML||t===KM.APPLICATION_XML}}return t===q.SVG&&(e===Y.FOREIGN_OBJECT||e===Y.DESC||e===Y.TITLE)}function oN(e,t,n,r){return(!r||r===q.HTML)&&aN(e,t,n)||(!r||r===q.MATHML)&&iN(e,t)}var sN=`hidden`,cN=8,lN=3,Q;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(Q||={});var uN={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},dN=new Set([Y.TABLE,Y.TBODY,Y.TFOOT,Y.THEAD,Y.TR]),fN={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:PM,onParseError:null},pN=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Q.INITIAL,this.originalInsertionMode=Q.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...fN,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new _M(this.options,this),this.activeFormattingElements=new NM(this.treeAdapter),this.fragmentContextID=n?iM(this.treeAdapter.getTagName(n)):Y.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new kM(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...fN,...t};e??=n.treeAdapter.createElement(J.TEMPLATE,q.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,q.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===Y.TEMPLATE&&i.tmplInsertionModeStack.unshift(Q.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??uN,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===q.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,q.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Q.TEXT}switchToPlaintextParsing(){this.insertionMode=Q.TEXT,this.originalInsertionMode=Q.IN_BODY,this.tokenizer.state=sM.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===J.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==q.HTML))switch(this.fragmentContextID){case Y.TITLE:case Y.TEXTAREA:this.tokenizer.state=sM.RCDATA;break;case Y.STYLE:case Y.XMP:case Y.IFRAME:case Y.NOEMBED:case Y.NOFRAMES:case Y.NOSCRIPT:this.tokenizer.state=sM.RAWTEXT;break;case Y.SCRIPT:this.tokenizer.state=sM.SCRIPT_DATA;break;case Y.PLAINTEXT:this.tokenizer.state=sM.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,q.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,q.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(J.HTML,q.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Y.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===zj.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===Y.SVG&&this.treeAdapter.getTagName(t)===J.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===q.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===Y.MGLYPH||e.tagID===Y.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,q.HTML)}_processToken(e){switch(e.type){case zj.CHARACTER:this.onCharacter(e);break;case zj.NULL_CHARACTER:this.onNullCharacter(e);break;case zj.COMMENT:this.onComment(e);break;case zj.DOCTYPE:this.onDoctype(e);break;case zj.START_TAG:this._processStartTag(e);break;case zj.END_TAG:this.onEndTag(e);break;case zj.EOF:this.onEof(e);break;case zj.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return oN(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===jM.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Y.P),this.openElements.popUntilTagNamePopped(Y.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Y.TR:this.insertionMode=Q.IN_ROW;return;case Y.TBODY:case Y.THEAD:case Y.TFOOT:this.insertionMode=Q.IN_TABLE_BODY;return;case Y.CAPTION:this.insertionMode=Q.IN_CAPTION;return;case Y.COLGROUP:this.insertionMode=Q.IN_COLUMN_GROUP;return;case Y.TABLE:this.insertionMode=Q.IN_TABLE;return;case Y.BODY:this.insertionMode=Q.IN_BODY;return;case Y.FRAMESET:this.insertionMode=Q.IN_FRAMESET;return;case Y.SELECT:this._resetInsertionModeForSelect(e);return;case Y.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case Y.HTML:this.insertionMode=this.headElement?Q.AFTER_HEAD:Q.BEFORE_HEAD;return;case Y.TD:case Y.TH:if(e>0){this.insertionMode=Q.IN_CELL;return}break;case Y.HEAD:if(e>0){this.insertionMode=Q.IN_HEAD;return}break}this.insertionMode=Q.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===Y.TEMPLATE)break;if(e===Y.TABLE){this.insertionMode=Q.IN_SELECT_IN_TABLE;return}}this.insertionMode=Q.IN_SELECT}_isElementCausesFosterParenting(e){return dN.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Y.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===q.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Y.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return aM[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){jF(this,e);return}switch(this.insertionMode){case Q.INITIAL:EN(this,e);break;case Q.BEFORE_HTML:kN(this,e);break;case Q.BEFORE_HEAD:MN(this,e);break;case Q.IN_HEAD:IN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:zN(this,e);break;case Q.AFTER_HEAD:HN(this,e);break;case Q.IN_BODY:case Q.IN_CAPTION:case Q.IN_CELL:case Q.IN_TEMPLATE:GN(this,e);break;case Q.TEXT:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:BP(this,e);break;case Q.IN_TABLE_TEXT:$P(this,e);break;case Q.IN_COLUMN_GROUP:oF(this,e);break;case Q.AFTER_BODY:SF(this,e);break;case Q.AFTER_AFTER_BODY:OF(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){AF(this,e);return}switch(this.insertionMode){case Q.INITIAL:EN(this,e);break;case Q.BEFORE_HTML:kN(this,e);break;case Q.BEFORE_HEAD:MN(this,e);break;case Q.IN_HEAD:IN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:zN(this,e);break;case Q.AFTER_HEAD:HN(this,e);break;case Q.TEXT:this._insertCharacters(e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:BP(this,e);break;case Q.IN_COLUMN_GROUP:oF(this,e);break;case Q.AFTER_BODY:SF(this,e);break;case Q.AFTER_AFTER_BODY:OF(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){xN(this,e);return}switch(this.insertionMode){case Q.INITIAL:case Q.BEFORE_HTML:case Q.BEFORE_HEAD:case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:case Q.IN_BODY:case Q.IN_TABLE:case Q.IN_CAPTION:case Q.IN_COLUMN_GROUP:case Q.IN_TABLE_BODY:case Q.IN_ROW:case Q.IN_CELL:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:case Q.IN_TEMPLATE:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:xN(this,e);break;case Q.IN_TABLE_TEXT:eF(this,e);break;case Q.AFTER_BODY:SN(this,e);break;case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:CN(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Q.INITIAL:TN(this,e);break;case Q.BEFORE_HEAD:case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:this._err(e,K.misplacedDoctype);break;case Q.IN_TABLE_TEXT:eF(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,K.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?NF(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Q.INITIAL:EN(this,e);break;case Q.BEFORE_HTML:DN(this,e);break;case Q.BEFORE_HEAD:AN(this,e);break;case Q.IN_HEAD:NN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:LN(this,e);break;case Q.AFTER_HEAD:BN(this,e);break;case Q.IN_BODY:wP(this,e);break;case Q.IN_TABLE:YP(this,e);break;case Q.IN_TABLE_TEXT:eF(this,e);break;case Q.IN_CAPTION:nF(this,e);break;case Q.IN_COLUMN_GROUP:iF(this,e);break;case Q.IN_TABLE_BODY:sF(this,e);break;case Q.IN_ROW:lF(this,e);break;case Q.IN_CELL:dF(this,e);break;case Q.IN_SELECT:pF(this,e);break;case Q.IN_SELECT_IN_TABLE:hF(this,e);break;case Q.IN_TEMPLATE:_F(this,e);break;case Q.AFTER_BODY:bF(this,e);break;case Q.IN_FRAMESET:CF(this,e);break;case Q.AFTER_FRAMESET:TF(this,e);break;case Q.AFTER_AFTER_BODY:DF(this,e);break;case Q.AFTER_AFTER_FRAMESET:kF(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?PF(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Q.INITIAL:EN(this,e);break;case Q.BEFORE_HTML:ON(this,e);break;case Q.BEFORE_HEAD:jN(this,e);break;case Q.IN_HEAD:PN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:RN(this,e);break;case Q.AFTER_HEAD:VN(this,e);break;case Q.IN_BODY:IP(this,e);break;case Q.TEXT:RP(this,e);break;case Q.IN_TABLE:XP(this,e);break;case Q.IN_TABLE_TEXT:eF(this,e);break;case Q.IN_CAPTION:rF(this,e);break;case Q.IN_COLUMN_GROUP:aF(this,e);break;case Q.IN_TABLE_BODY:cF(this,e);break;case Q.IN_ROW:uF(this,e);break;case Q.IN_CELL:fF(this,e);break;case Q.IN_SELECT:mF(this,e);break;case Q.IN_SELECT_IN_TABLE:gF(this,e);break;case Q.IN_TEMPLATE:vF(this,e);break;case Q.AFTER_BODY:xF(this,e);break;case Q.IN_FRAMESET:wF(this,e);break;case Q.AFTER_FRAMESET:EF(this,e);break;case Q.AFTER_AFTER_BODY:OF(this,e);break;default:}}onEof(e){switch(this.insertionMode){case Q.INITIAL:EN(this,e);break;case Q.BEFORE_HTML:kN(this,e);break;case Q.BEFORE_HEAD:MN(this,e);break;case Q.IN_HEAD:IN(this,e);break;case Q.IN_HEAD_NO_SCRIPT:zN(this,e);break;case Q.AFTER_HEAD:HN(this,e);break;case Q.IN_BODY:case Q.IN_TABLE:case Q.IN_CAPTION:case Q.IN_COLUMN_GROUP:case Q.IN_TABLE_BODY:case Q.IN_ROW:case Q.IN_CELL:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:LP(this,e);break;case Q.TEXT:zP(this,e);break;case Q.IN_TABLE_TEXT:eF(this,e);break;case Q.IN_TEMPLATE:yF(this,e);break;case Q.AFTER_BODY:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:wN(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===G.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case Q.IN_HEAD:case Q.IN_HEAD_NO_SCRIPT:case Q.AFTER_HEAD:case Q.TEXT:case Q.IN_COLUMN_GROUP:case Q.IN_SELECT:case Q.IN_SELECT_IN_TABLE:case Q.IN_FRAMESET:case Q.AFTER_FRAMESET:this._insertCharacters(e);break;case Q.IN_BODY:case Q.IN_CAPTION:case Q.IN_CELL:case Q.IN_TEMPLATE:case Q.AFTER_BODY:case Q.AFTER_AFTER_BODY:case Q.AFTER_AFTER_FRAMESET:WN(this,e);break;case Q.IN_TABLE:case Q.IN_TABLE_BODY:case Q.IN_ROW:BP(this,e);break;case Q.IN_TABLE_TEXT:QP(this,e);break;default:}}};function mN(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):FP(e,t),n}function hN(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function gN(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=lN;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=_N(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function _N(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function vN(e,t,n){let r=iM(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===Y.TEMPLATE&&i===q.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function yN(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function bN(e,t){for(let n=0;n<cN;n++){let n=mN(e,t);if(!n)break;let r=hN(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=gN(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&vN(e,a,i),yN(e,r,n)}}function xN(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function SN(e,t){e._appendCommentNode(t,e.openElements.items[0])}function CN(e,t){e._appendCommentNode(t,e.document)}function wN(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function TN(e,t){e._setDocumentType(t);let n=t.forceQuirks?nM.QUIRKS:GM(t);WM(t)||e._err(t,K.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Q.BEFORE_HTML}function EN(e,t){e._err(t,K.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nM.QUIRKS),e.insertionMode=Q.BEFORE_HTML,e._processToken(t)}function DN(e,t){t.tagID===Y.HTML?(e._insertElement(t,q.HTML),e.insertionMode=Q.BEFORE_HEAD):kN(e,t)}function ON(e,t){let n=t.tagID;(n===Y.HTML||n===Y.HEAD||n===Y.BODY||n===Y.BR)&&kN(e,t)}function kN(e,t){e._insertFakeRootElement(),e.insertionMode=Q.BEFORE_HEAD,e._processToken(t)}function AN(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.HEAD:e._insertElement(t,q.HTML),e.headElement=e.openElements.current,e.insertionMode=Q.IN_HEAD;break;default:MN(e,t)}}function jN(e,t){let n=t.tagID;n===Y.HEAD||n===Y.BODY||n===Y.HTML||n===Y.BR?MN(e,t):e._err(t,K.endTagWithoutMatchingOpenElement)}function MN(e,t){e._insertFakeElement(J.HEAD,Y.HEAD),e.headElement=e.openElements.current,e.insertionMode=Q.IN_HEAD,e._processToken(t)}function NN(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:e._appendElement(t,q.HTML),t.ackSelfClosing=!0;break;case Y.TITLE:e._switchToTextParsing(t,sM.RCDATA);break;case Y.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,sM.RAWTEXT):(e._insertElement(t,q.HTML),e.insertionMode=Q.IN_HEAD_NO_SCRIPT);break;case Y.NOFRAMES:case Y.STYLE:e._switchToTextParsing(t,sM.RAWTEXT);break;case Y.SCRIPT:e._switchToTextParsing(t,sM.SCRIPT_DATA);break;case Y.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Q.IN_TEMPLATE);break;case Y.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:IN(e,t)}}function PN(e,t){switch(t.tagID){case Y.HEAD:e.openElements.pop(),e.insertionMode=Q.AFTER_HEAD;break;case Y.BODY:case Y.BR:case Y.HTML:IN(e,t);break;case Y.TEMPLATE:FN(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function FN(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Y.TEMPLATE&&e._err(t,K.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,K.endTagWithoutMatchingOpenElement)}function IN(e,t){e.openElements.pop(),e.insertionMode=Q.AFTER_HEAD,e._processToken(t)}function LN(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.BASEFONT:case Y.BGSOUND:case Y.HEAD:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.STYLE:NN(e,t);break;case Y.NOSCRIPT:e._err(t,K.nestedNoscriptInHead);break;default:zN(e,t)}}function RN(e,t){switch(t.tagID){case Y.NOSCRIPT:e.openElements.pop(),e.insertionMode=Q.IN_HEAD;break;case Y.BR:zN(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function zN(e,t){let n=t.type===zj.EOF?K.openElementsLeftAfterEof:K.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Q.IN_HEAD,e._processToken(t)}function BN(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.BODY:e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode=Q.IN_BODY;break;case Y.FRAMESET:e._insertElement(t,q.HTML),e.insertionMode=Q.IN_FRAMESET;break;case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.SCRIPT:case Y.STYLE:case Y.TEMPLATE:case Y.TITLE:e._err(t,K.abandonedHeadElementChild),e.openElements.push(e.headElement,Y.HEAD),NN(e,t),e.openElements.remove(e.headElement);break;case Y.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:HN(e,t)}}function VN(e,t){switch(t.tagID){case Y.BODY:case Y.HTML:case Y.BR:HN(e,t);break;case Y.TEMPLATE:FN(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function HN(e,t){e._insertFakeElement(J.BODY,Y.BODY),e.insertionMode=Q.IN_BODY,UN(e,t)}function UN(e,t){switch(t.type){case zj.CHARACTER:GN(e,t);break;case zj.WHITESPACE_CHARACTER:WN(e,t);break;case zj.COMMENT:xN(e,t);break;case zj.START_TAG:wP(e,t);break;case zj.END_TAG:IP(e,t);break;case zj.EOF:LP(e,t);break;default:}}function WN(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function GN(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function KN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function qN(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function JN(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_FRAMESET)}function YN(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML)}function XN(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&oM.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,q.HTML)}function ZN(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function QN(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML),n||(e.formElement=e.openElements.current))}function $N(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===Y.LI&&r===Y.LI||(n===Y.DD||n===Y.DT)&&(r===Y.DD||r===Y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==Y.ADDRESS&&r!==Y.DIV&&r!==Y.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML)}function eP(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.tokenizer.state=sM.PLAINTEXT}function tP(e,t){e.openElements.hasInScope(Y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.framesetOk=!1}function nP(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(J.A);n&&(bN(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function rP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function iP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Y.NOBR)&&(bN(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function aP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function oP(e,t){e.treeAdapter.getDocumentMode(e.document)!==nM.QUIRKS&&e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode=Q.IN_TABLE}function sP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,q.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function cP(e){let t=Bj(e,tM.TYPE);return t!=null&&t.toLowerCase()===sN}function lP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,q.HTML),cP(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function uP(e,t){e._appendElement(t,q.HTML),t.ackSelfClosing=!0}function dP(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._appendElement(t,q.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fP(e,t){t.tagName=J.IMG,t.tagID=Y.IMG,sP(e,t)}function pP(e,t){e._insertElement(t,q.HTML),e.skipNextNewLine=!0,e.tokenizer.state=sM.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Q.TEXT}function mP(e,t){e.openElements.hasInButtonScope(Y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,sM.RAWTEXT)}function hP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,sM.RAWTEXT)}function gP(e,t){e._switchToTextParsing(t,sM.RAWTEXT)}function _P(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Q.IN_TABLE||e.insertionMode===Q.IN_CAPTION||e.insertionMode===Q.IN_TABLE_BODY||e.insertionMode===Q.IN_ROW||e.insertionMode===Q.IN_CELL?Q.IN_SELECT_IN_TABLE:Q.IN_SELECT}function vP(e,t){e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML)}function yP(e,t){e.openElements.hasInScope(Y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,q.HTML)}function bP(e,t){e.openElements.hasInScope(Y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Y.RTC),e._insertElement(t,q.HTML)}function xP(e,t){e._reconstructActiveFormattingElements(),eN(t),nN(t),t.selfClosing?e._appendElement(t,q.MATHML):e._insertElement(t,q.MATHML),t.ackSelfClosing=!0}function SP(e,t){e._reconstructActiveFormattingElements(),tN(t),nN(t),t.selfClosing?e._appendElement(t,q.SVG):e._insertElement(t,q.SVG),t.ackSelfClosing=!0}function CP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML)}function wP(e,t){switch(t.tagID){case Y.I:case Y.S:case Y.B:case Y.U:case Y.EM:case Y.TT:case Y.BIG:case Y.CODE:case Y.FONT:case Y.SMALL:case Y.STRIKE:case Y.STRONG:rP(e,t);break;case Y.A:nP(e,t);break;case Y.H1:case Y.H2:case Y.H3:case Y.H4:case Y.H5:case Y.H6:XN(e,t);break;case Y.P:case Y.DL:case Y.OL:case Y.UL:case Y.DIV:case Y.DIR:case Y.NAV:case Y.MAIN:case Y.MENU:case Y.ASIDE:case Y.CENTER:case Y.FIGURE:case Y.FOOTER:case Y.HEADER:case Y.HGROUP:case Y.DIALOG:case Y.DETAILS:case Y.ADDRESS:case Y.ARTICLE:case Y.SEARCH:case Y.SECTION:case Y.SUMMARY:case Y.FIELDSET:case Y.BLOCKQUOTE:case Y.FIGCAPTION:YN(e,t);break;case Y.LI:case Y.DD:case Y.DT:$N(e,t);break;case Y.BR:case Y.IMG:case Y.WBR:case Y.AREA:case Y.EMBED:case Y.KEYGEN:sP(e,t);break;case Y.HR:dP(e,t);break;case Y.RB:case Y.RTC:yP(e,t);break;case Y.RT:case Y.RP:bP(e,t);break;case Y.PRE:case Y.LISTING:ZN(e,t);break;case Y.XMP:mP(e,t);break;case Y.SVG:SP(e,t);break;case Y.HTML:KN(e,t);break;case Y.BASE:case Y.LINK:case Y.META:case Y.STYLE:case Y.TITLE:case Y.SCRIPT:case Y.BGSOUND:case Y.BASEFONT:case Y.TEMPLATE:NN(e,t);break;case Y.BODY:qN(e,t);break;case Y.FORM:QN(e,t);break;case Y.NOBR:iP(e,t);break;case Y.MATH:xP(e,t);break;case Y.TABLE:oP(e,t);break;case Y.INPUT:lP(e,t);break;case Y.PARAM:case Y.TRACK:case Y.SOURCE:uP(e,t);break;case Y.IMAGE:fP(e,t);break;case Y.BUTTON:tP(e,t);break;case Y.APPLET:case Y.OBJECT:case Y.MARQUEE:aP(e,t);break;case Y.IFRAME:hP(e,t);break;case Y.SELECT:_P(e,t);break;case Y.OPTION:case Y.OPTGROUP:vP(e,t);break;case Y.NOEMBED:case Y.NOFRAMES:gP(e,t);break;case Y.FRAMESET:JN(e,t);break;case Y.TEXTAREA:pP(e,t);break;case Y.NOSCRIPT:e.options.scriptingEnabled?gP(e,t):CP(e,t);break;case Y.PLAINTEXT:eP(e,t);break;case Y.COL:case Y.TH:case Y.TD:case Y.TR:case Y.HEAD:case Y.FRAME:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.CAPTION:case Y.COLGROUP:break;default:CP(e,t)}}function TP(e,t){if(e.openElements.hasInScope(Y.BODY)&&(e.insertionMode=Q.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function EP(e,t){e.openElements.hasInScope(Y.BODY)&&(e.insertionMode=Q.AFTER_BODY,xF(e,t))}function DP(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function OP(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Y.FORM):n&&e.openElements.remove(n))}function kP(e){e.openElements.hasInButtonScope(Y.P)||e._insertFakeElement(J.P,Y.P),e._closePElement()}function AP(e){e.openElements.hasInListItemScope(Y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Y.LI),e.openElements.popUntilTagNamePopped(Y.LI))}function jP(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function MP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function NP(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function PP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(J.BR,Y.BR),e.openElements.pop(),e.framesetOk=!1}function FP(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==Y.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function IP(e,t){switch(t.tagID){case Y.A:case Y.B:case Y.I:case Y.S:case Y.U:case Y.EM:case Y.TT:case Y.BIG:case Y.CODE:case Y.FONT:case Y.NOBR:case Y.SMALL:case Y.STRIKE:case Y.STRONG:bN(e,t);break;case Y.P:kP(e);break;case Y.DL:case Y.UL:case Y.OL:case Y.DIR:case Y.DIV:case Y.NAV:case Y.PRE:case Y.MAIN:case Y.MENU:case Y.ASIDE:case Y.BUTTON:case Y.CENTER:case Y.FIGURE:case Y.FOOTER:case Y.HEADER:case Y.HGROUP:case Y.DIALOG:case Y.ADDRESS:case Y.ARTICLE:case Y.DETAILS:case Y.SEARCH:case Y.SECTION:case Y.SUMMARY:case Y.LISTING:case Y.FIELDSET:case Y.BLOCKQUOTE:case Y.FIGCAPTION:DP(e,t);break;case Y.LI:AP(e);break;case Y.DD:case Y.DT:jP(e,t);break;case Y.H1:case Y.H2:case Y.H3:case Y.H4:case Y.H5:case Y.H6:MP(e);break;case Y.BR:PP(e);break;case Y.BODY:TP(e,t);break;case Y.HTML:EP(e,t);break;case Y.FORM:OP(e);break;case Y.APPLET:case Y.OBJECT:case Y.MARQUEE:NP(e,t);break;case Y.TEMPLATE:FN(e,t);break;default:FP(e,t)}}function LP(e,t){e.tmplInsertionModeStack.length>0?yF(e,t):wN(e,t)}function RP(e,t){var n;t.tagID===Y.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function zP(e,t){e._err(t,K.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function BP(e,t){if(e.openElements.currentTagId!==void 0&&dN.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Q.IN_TABLE_TEXT,t.type){case zj.CHARACTER:$P(e,t);break;case zj.WHITESPACE_CHARACTER:QP(e,t);break}else ZP(e,t)}function VP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_CAPTION}function HP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_COLUMN_GROUP}function UP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(J.COLGROUP,Y.COLGROUP),e.insertionMode=Q.IN_COLUMN_GROUP,iF(e,t)}function WP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_TABLE_BODY}function GP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(J.TBODY,Y.TBODY),e.insertionMode=Q.IN_TABLE_BODY,sF(e,t)}function KP(e,t){e.openElements.hasInTableScope(Y.TABLE)&&(e.openElements.popUntilTagNamePopped(Y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function qP(e,t){cP(t)?e._appendElement(t,q.HTML):ZP(e,t),t.ackSelfClosing=!0}function JP(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,q.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function YP(e,t){switch(t.tagID){case Y.TD:case Y.TH:case Y.TR:GP(e,t);break;case Y.STYLE:case Y.SCRIPT:case Y.TEMPLATE:NN(e,t);break;case Y.COL:UP(e,t);break;case Y.FORM:JP(e,t);break;case Y.TABLE:KP(e,t);break;case Y.TBODY:case Y.TFOOT:case Y.THEAD:WP(e,t);break;case Y.INPUT:qP(e,t);break;case Y.CAPTION:VP(e,t);break;case Y.COLGROUP:HP(e,t);break;default:ZP(e,t)}}function XP(e,t){switch(t.tagID){case Y.TABLE:e.openElements.hasInTableScope(Y.TABLE)&&(e.openElements.popUntilTagNamePopped(Y.TABLE),e._resetInsertionMode());break;case Y.TEMPLATE:FN(e,t);break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TBODY:case Y.TD:case Y.TFOOT:case Y.TH:case Y.THEAD:case Y.TR:break;default:ZP(e,t)}}function ZP(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,UN(e,t),e.fosterParentingEnabled=n}function QP(e,t){e.pendingCharacterTokens.push(t)}function $P(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function eF(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ZP(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var tF=new Set([Y.CAPTION,Y.COL,Y.COLGROUP,Y.TBODY,Y.TD,Y.TFOOT,Y.TH,Y.THEAD,Y.TR]);function nF(e,t){let n=t.tagID;tF.has(n)?e.openElements.hasInTableScope(Y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_TABLE,YP(e,t)):wP(e,t)}function rF(e,t){let n=t.tagID;switch(n){case Y.CAPTION:case Y.TABLE:e.openElements.hasInTableScope(Y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_TABLE,n===Y.TABLE&&XP(e,t));break;case Y.BODY:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TBODY:case Y.TD:case Y.TFOOT:case Y.TH:case Y.THEAD:case Y.TR:break;default:IP(e,t)}}function iF(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.COL:e._appendElement(t,q.HTML),t.ackSelfClosing=!0;break;case Y.TEMPLATE:NN(e,t);break;default:oF(e,t)}}function aF(e,t){switch(t.tagID){case Y.COLGROUP:e.openElements.currentTagId===Y.COLGROUP&&(e.openElements.pop(),e.insertionMode=Q.IN_TABLE);break;case Y.TEMPLATE:FN(e,t);break;case Y.COL:break;default:oF(e,t)}}function oF(e,t){e.openElements.currentTagId===Y.COLGROUP&&(e.openElements.pop(),e.insertionMode=Q.IN_TABLE,e._processToken(t))}function sF(e,t){switch(t.tagID){case Y.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_ROW;break;case Y.TH:case Y.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(J.TR,Y.TR),e.insertionMode=Q.IN_ROW,lF(e,t);break;case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE,YP(e,t));break;default:YP(e,t)}}function cF(e,t){let n=t.tagID;switch(t.tagID){case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE);break;case Y.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE,XP(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TD:case Y.TH:case Y.TR:break;default:XP(e,t)}}function lF(e,t){switch(t.tagID){case Y.TH:case Y.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,q.HTML),e.insertionMode=Q.IN_CELL,e.activeFormattingElements.insertMarker();break;case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.TR:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,sF(e,t));break;default:YP(e,t)}}function uF(e,t){switch(t.tagID){case Y.TR:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY);break;case Y.TABLE:e.openElements.hasInTableScope(Y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,cF(e,t));break;case Y.TBODY:case Y.TFOOT:case Y.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(Y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Q.IN_TABLE_BODY,cF(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:case Y.TD:case Y.TH:break;default:XP(e,t)}}function dF(e,t){let n=t.tagID;tF.has(n)?(e.openElements.hasInTableScope(Y.TD)||e.openElements.hasInTableScope(Y.TH))&&(e._closeTableCell(),lF(e,t)):wP(e,t)}function fF(e,t){let n=t.tagID;switch(n){case Y.TD:case Y.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Q.IN_ROW);break;case Y.TABLE:case Y.TBODY:case Y.TFOOT:case Y.THEAD:case Y.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),uF(e,t));break;case Y.BODY:case Y.CAPTION:case Y.COL:case Y.COLGROUP:case Y.HTML:break;default:IP(e,t)}}function pF(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.OPTION:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e._insertElement(t,q.HTML);break;case Y.OPTGROUP:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,q.HTML);break;case Y.HR:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,q.HTML),t.ackSelfClosing=!0;break;case Y.INPUT:case Y.KEYGEN:case Y.TEXTAREA:case Y.SELECT:e.openElements.hasInSelectScope(Y.SELECT)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),t.tagID!==Y.SELECT&&e._processStartTag(t));break;case Y.SCRIPT:case Y.TEMPLATE:NN(e,t);break;default:}}function mF(e,t){switch(t.tagID){case Y.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===Y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Y.OPTGROUP&&e.openElements.pop();break;case Y.OPTION:e.openElements.currentTagId===Y.OPTION&&e.openElements.pop();break;case Y.SELECT:e.openElements.hasInSelectScope(Y.SELECT)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode());break;case Y.TEMPLATE:FN(e,t);break;default:}}function hF(e,t){let n=t.tagID;n===Y.CAPTION||n===Y.TABLE||n===Y.TBODY||n===Y.TFOOT||n===Y.THEAD||n===Y.TR||n===Y.TD||n===Y.TH?(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):pF(e,t)}function gF(e,t){let n=t.tagID;n===Y.CAPTION||n===Y.TABLE||n===Y.TBODY||n===Y.TFOOT||n===Y.THEAD||n===Y.TR||n===Y.TD||n===Y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):mF(e,t)}function _F(e,t){switch(t.tagID){case Y.BASE:case Y.BASEFONT:case Y.BGSOUND:case Y.LINK:case Y.META:case Y.NOFRAMES:case Y.SCRIPT:case Y.STYLE:case Y.TEMPLATE:case Y.TITLE:NN(e,t);break;case Y.CAPTION:case Y.COLGROUP:case Y.TBODY:case Y.TFOOT:case Y.THEAD:e.tmplInsertionModeStack[0]=Q.IN_TABLE,e.insertionMode=Q.IN_TABLE,YP(e,t);break;case Y.COL:e.tmplInsertionModeStack[0]=Q.IN_COLUMN_GROUP,e.insertionMode=Q.IN_COLUMN_GROUP,iF(e,t);break;case Y.TR:e.tmplInsertionModeStack[0]=Q.IN_TABLE_BODY,e.insertionMode=Q.IN_TABLE_BODY,sF(e,t);break;case Y.TD:case Y.TH:e.tmplInsertionModeStack[0]=Q.IN_ROW,e.insertionMode=Q.IN_ROW,lF(e,t);break;default:e.tmplInsertionModeStack[0]=Q.IN_BODY,e.insertionMode=Q.IN_BODY,wP(e,t)}}function vF(e,t){t.tagID===Y.TEMPLATE&&FN(e,t)}function yF(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):wN(e,t)}function bF(e,t){t.tagID===Y.HTML?wP(e,t):SF(e,t)}function xF(e,t){if(t.tagID===Y.HTML){if(e.fragmentContext||(e.insertionMode=Q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Y.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else SF(e,t)}function SF(e,t){e.insertionMode=Q.IN_BODY,UN(e,t)}function CF(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.FRAMESET:e._insertElement(t,q.HTML);break;case Y.FRAME:e._appendElement(t,q.HTML),t.ackSelfClosing=!0;break;case Y.NOFRAMES:NN(e,t);break;default:}}function wF(e,t){t.tagID===Y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==Y.FRAMESET&&(e.insertionMode=Q.AFTER_FRAMESET))}function TF(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.NOFRAMES:NN(e,t);break;default:}}function EF(e,t){t.tagID===Y.HTML&&(e.insertionMode=Q.AFTER_AFTER_FRAMESET)}function DF(e,t){t.tagID===Y.HTML?wP(e,t):OF(e,t)}function OF(e,t){e.insertionMode=Q.IN_BODY,UN(e,t)}function kF(e,t){switch(t.tagID){case Y.HTML:wP(e,t);break;case Y.NOFRAMES:NN(e,t);break;default:}}function AF(e,t){t.chars=`�`,e._insertCharacters(t)}function jF(e,t){e._insertCharacters(t),e.framesetOk=!1}function MF(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==q.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function NF(e,t){if($M(t))MF(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===q.MATHML?eN(t):r===q.SVG&&(rN(t),tN(t)),nN(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function PF(e,t){if(t.tagID===Y.P||t.tagID===Y.BR){MF(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===q.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}J.AREA,J.BASE,J.BASEFONT,J.BGSOUND,J.BR,J.COL,J.EMBED,J.FRAME,J.HR,J.IMG,J.INPUT,J.KEYGEN,J.LINK,J.META,J.PARAM,J.SOURCE,J.TRACK,J.WBR;var FF=LF(`end`),IF=LF(`start`);function LF(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function RF(e){let t=IF(e),n=FF(e);if(t&&n)return{start:t,end:n}}var zF=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,BF=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),VF={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function HF(e,t){let n=nI(e),r=hj(`type`,{handlers:{root:WF,element:GF,text:KF,comment:YF,doctype:qF,raw:XF},unknown:ZF}),i={parser:n?new pN(VF):pN.getFragmentParser(void 0,VF),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),QF(i,IF());let a=oj(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&Nk(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function UF(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function WF(e,t){UF(e.children,t)}function GF(e,t){eI(e,t),UF(e.children,t),tI(e,t)}function KF(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:zj.CHARACTER,chars:e.value,location:rI(e)};QF(t,IF(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function qF(e,t){let n={type:zj.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:rI(e)};QF(t,IF(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function JF(e,t){t.stitches=!0;let n=iI(e);`children`in e&&`children`in n&&(n.children=HF({type:`root`,children:e.children},t.options).children),YF({type:`comment`,value:{stitch:n}},t)}function YF(e,t){let n=e.value,r={type:zj.COMMENT,data:n,location:rI(e)};QF(t,IF(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function XF(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,$F(t,IF(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(zF,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function ZF(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))JF(n,t);else{let e=``;throw BF.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function QF(e,t){$F(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=sM.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function $F(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function eI(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===sM.PLAINTEXT)return;QF(t,IF(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:rj.html;i===rj.html&&n===`svg`&&(i=rj.svg);let a=yj({...e,children:[]},{space:i===rj.svg?`svg`:`html`}),o={type:zj.START_TAG,tagName:n,tagID:iM(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:rI(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function tI(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&kj.includes(n)||t.parser.tokenizer.state===sM.PLAINTEXT)return;QF(t,FF(e));let r={type:zj.END_TAG,tagName:n,tagID:iM(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:rI(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===sM.RCDATA||t.parser.tokenizer.state===sM.RAWTEXT||t.parser.tokenizer.state===sM.SCRIPT_DATA)&&(t.parser.tokenizer.state=sM.DATA)}function nI(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function rI(e){let t=IF(e)||{line:void 0,column:void 0,offset:void 0},n=FF(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function iI(e){return`children`in e?rA({...e,children:[]}):rA(e)}function aI(e){return function(t,n){return HF(t,{...e,file:n})}}var oI=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],sI={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...oI,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...oI],h2:[[`className`,`sr-only`]],img:[...oI,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...oI,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...oI],table:[...oI],ul:[...oI,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},cI={}.hasOwnProperty;function lI(e,t){let n={type:`root`,children:[]},r=uI({schema:t?{...sI,...t}:sI,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function uI(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return dI(e,n);case`doctype`:return fI(e,n);case`element`:return pI(e,n);case`root`:return mI(e,n);case`text`:return hI(e,n);default:}}}function dI(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return SI(r,t),r}}function fI(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return SI(e,t),e}}function pI(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=gI(e,t.children),i=_I(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&cI.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return SI(o,t),o}function mI(e,t){let n={type:`root`,children:gI(e,t.children)};return SI(n,t),n}function hI(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return SI(n,t),n}function gI(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=uI(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function _I(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&cI.call(r,n)?r[n]:void 0,o=r&&cI.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(cI.call(s,l)){let t=s[l],n=vI(e,CI(a,l),l,t);n??=vI(e,CI(o,l),l,t),n!=null&&(c[l]=n)}if(i&&cI.call(i,n)){let e=i[n];for(l in e)cI.call(e,l)&&!cI.call(c,l)&&(c[l]=e[l])}return c}function vI(e,t,n,r){return t?Array.isArray(r)?yI(e,t,n,r):bI(e,t,n,r):void 0}function yI(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=bI(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function bI(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&xI(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function xI(e,t,n){let r=e.schema.protocols&&cI.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function SI(e,t){let n=RF(t);t.data&&(e.data=rA(t.data)),n&&(e.position=n)}function CI(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function wI(e){return function(t){return lI(t,e)}}function TI(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var EI=RI(/[A-Za-z]/),DI=RI(/[\dA-Za-z]/),OI=RI(/[#-'*+\--9=?A-Z^-~]/);function kI(e){return e!==null&&(e<32||e===127)}var AI=RI(/\d/),jI=RI(/[\dA-Fa-f]/),MI=RI(/[!-/:-@[-`{-~]/);function NI(e){return e!==null&&e<-2}function PI(e){return e!==null&&(e<0||e===32)}function FI(e){return e===-2||e===-1||e===32}var II=RI(/\p{P}|\p{S}/u),LI=RI(/\s/);function RI(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function zI(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function BI(e,t,n){let r=xk((n||{}).ignore||[]),i=VI(t),a=-1;for(;++a<i.length;)jk(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function VI(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([HI(e[0]),UI(e[1])])}return t}function HI(e){return typeof e==`string`?new RegExp(zI(e),`g`):e}function UI(e){return typeof e==`function`?e:function(){return e}}var WI=`phrasing`,GI=[`autolink`,`link`,`image`,`label`];function KI(){return{transforms:[eL],enter:{literalAutolink:JI,literalAutolinkEmail:YI,literalAutolinkHttp:YI,literalAutolinkWww:YI},exit:{literalAutolink:$I,literalAutolinkEmail:QI,literalAutolinkHttp:XI,literalAutolinkWww:ZI}}}function qI(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:WI,notInConstruct:GI},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:WI,notInConstruct:GI},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:WI,notInConstruct:GI}]}}function JI(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function YI(e){this.config.enter.autolinkProtocol.call(this,e)}function XI(e){this.config.exit.autolinkProtocol.call(this,e)}function ZI(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function QI(e){this.config.exit.autolinkEmail.call(this,e)}function $I(e){this.exit(e)}function eL(e){BI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tL],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nL]],{ignore:[`link`,`linkReference`]})}function tL(e,t,n,r,i){let a=``;if(!aL(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!rL(n)))return!1;let o=iL(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function nL(e,t,n,r){return!aL(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function rL(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function iL(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=TI(e,`(`),a=TI(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function aL(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||LI(n)||II(n))&&(!t||n!==47)}function oL(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}gL.peek=hL;function sL(){this.buffer()}function cL(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function lL(){this.buffer()}function uL(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function dL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=oL(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fL(e){this.exit(e)}function pL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=oL(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mL(e){this.exit(e)}function hL(){return`[`}function gL(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function _L(){return{enter:{gfmFootnoteCallString:sL,gfmFootnoteCall:cL,gfmFootnoteDefinitionLabelString:lL,gfmFootnoteDefinition:uL},exit:{gfmFootnoteCallString:dL,gfmFootnoteCall:fL,gfmFootnoteDefinitionLabelString:pL,gfmFootnoteDefinition:mL}}}function vL(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:gL},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
112
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?bL:yL))),s(),o}}function yL(e,t,n){return t===0?e:bL(e,t,n)}function bL(e,t,n){return(n?``:` `)+e}var xL=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];EL.peek=DL;function SL(){return{canContainEols:[`delete`],enter:{strikethrough:wL},exit:{strikethrough:TL}}}function CL(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:xL}],handlers:{delete:EL}}}function wL(e){this.enter({type:`delete`,children:[]},e)}function TL(e){this.exit(e)}function EL(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function DL(){return`~`}function OL(e){return e.length}function kL(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||OL,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=AL(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=jL(r[d]);else{let e=jL(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
113
|
-
`)}function AL(e){return e==null?``:String(e)}function jL(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function ML(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),NL);return i(),o}function NL(e,t,n){return`>`+(n?``:` `)+e}function PL(e,t){return FL(e,t.inConstruct,!0)&&!FL(e,t.notInConstruct,!1)}function FL(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function IL(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
114
|
-
`&&PL(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
115
|
-
`}function LL(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function RL(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function zL(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function BL(e,t,n,r){let i=zL(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(RL(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,VL);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(LL(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
116
|
-
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
117
|
-
`),a&&(u+=s.move(a+`
|
|
118
|
-
`)),u+=s.move(c),l(),u}function VL(e,t,n){return(n?``:` `)+e}function HL(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function UL(e,t,n,r){let i=HL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
119
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function WL(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function GL(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function KL(e){if(e===null||PI(e)||LI(e))return 1;if(II(e))return 2}function qL(e,t,n){let r=KL(e),i=KL(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}JL.peek=YL;function JL(e,t,n,r){let i=WL(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=qL(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=GL(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=qL(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+GL(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function YL(e,t,n){return n.options.emphasis||`*`}var XL={};function ZL(e,t){let n=t||XL;return QL(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function QL(e,t,n){if(eR(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return $L(e.children,t,n)}return Array.isArray(e)?$L(e,t,n):``}function $L(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=QL(e[i],t,n);return r.join(``)}function eR(e){return!!(e&&typeof e==`object`)}function tR(e,t){let n=!1;return Nk(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ZL(e)&&(t.options.setext||n))}function nR(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(tR(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
120
|
-
`,after:`
|
|
121
|
-
`});return r(),t(),o+`
|
|
122
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
123
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
124
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=GL(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}rR.peek=iR;function rR(e){return e.value||``}function iR(){return`<`}aR.peek=oR;function aR(e,t,n,r){let i=HL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function oR(){return`!`}sR.peek=cR;function sR(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function cR(){return`!`}lR.peek=uR;function lR(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function uR(){return"`"}function dR(e,t){let n=ZL(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fR.peek=pR;function fR(e,t,n,r){let i=HL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(dR(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function pR(e,t,n){return dR(e,n)?`<`:`[`}mR.peek=hR;function mR(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function hR(){return`[`}function gR(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function _R(e){let t=gR(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function vR(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function yR(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function bR(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?vR(n):gR(n),s=e.ordered?o===`.`?`)`:`.`:_R(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),yR(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function xR(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function SR(e,t,n,r){let i=xR(n),a=n.bulletCurrent||gR(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function CR(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var wR=xk([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function TR(e,t,n,r){return(e.children.some(function(e){return wR(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ER(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}DR.peek=OR;function DR(e,t,n,r){let i=ER(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=qL(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=GL(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=qL(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+GL(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function OR(e,t,n){return n.options.strong||`*`}function kR(e,t,n,r){return n.safe(e.value,r)}function AR(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function jR(e,t,n){let r=(yR(n)+(n.options.ruleSpaces?` `:``)).repeat(AR(n));return n.options.ruleSpaces?r.slice(0,-1):r}var MR={blockquote:ML,break:IL,code:BL,definition:UL,emphasis:JL,hardBreak:IL,heading:nR,html:rR,image:aR,imageReference:sR,inlineCode:lR,link:fR,linkReference:mR,list:bR,listItem:SR,paragraph:CR,root:TR,strong:DR,text:kR,thematicBreak:jR};function NR(){return{enter:{table:PR,tableData:RR,tableHeader:RR,tableRow:IR},exit:{codeText:zR,table:FR,tableData:LR,tableHeader:LR,tableRow:LR}}}function PR(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function FR(e){this.exit(e),this.data.inTable=void 0}function IR(e){this.enter({type:`tableRow`,children:[]},e)}function LR(e){this.exit(e)}function RR(e){this.enter({type:`tableCell`,children:[]},e)}function zR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,BR));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function BR(e,t){return t===`|`?t:e}function VR(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
125
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
126
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return kL(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=MR.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function HR(){return{exit:{taskListCheckValueChecked:WR,taskListCheckValueUnchecked:WR,paragraph:GR}}}function UR(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:KR}}}function WR(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function GR(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function KR(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=MR.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function qR(){return[KI(),_L(),SL(),NR(),HR()]}function JR(e){return{extensions:[qI(),vL(e),CL(),VR(e),UR()]}}function YR(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function XR(e,t){return e.length>0?(YR(e,e.length,0,t),e):t}var ZR={}.hasOwnProperty;function QR(e){let t={},n=-1;for(;++n<e.length;)$R(t,e[n]);return t}function $R(e,t){let n;for(n in t){let r=(ZR.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ZR.call(r,a)||(r[a]=[]);let e=i[a];ez(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ez(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);YR(e,0,0,r)}var tz={tokenize:hz,partial:!0},nz={tokenize:gz,partial:!0},rz={tokenize:_z,partial:!0},iz={tokenize:vz,partial:!0},az={tokenize:yz,partial:!0},oz={name:`wwwAutolink`,tokenize:pz,previous:bz},sz={name:`protocolAutolink`,tokenize:mz,previous:xz},cz={name:`emailAutolink`,tokenize:fz,previous:Sz},lz={};function uz(){return{text:lz}}for(var dz=48;dz<123;)lz[dz]=cz,dz++,dz===58?dz=65:dz===91&&(dz=97);lz[43]=cz,lz[45]=cz,lz[46]=cz,lz[95]=cz,lz[72]=[cz,sz],lz[104]=[cz,sz],lz[87]=[cz,oz],lz[119]=[cz,oz];function fz(e,t,n){let r=this,i,a;return o;function o(t){return!Cz(t)||!Sz.call(r,r.previous)||wz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Cz(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(az,u,l)(t):t===45||t===95||DI(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&EI(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function pz(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!bz.call(r,r.previous)||wz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(tz,e.attempt(nz,e.attempt(rz,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function mz(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&xz.call(r,r.previous)&&!wz(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(EI(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||kI(t)||PI(t)||LI(t)||II(t)?n(t):e.attempt(nz,e.attempt(rz,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function hz(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function gz(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(iz,c,s)(t):t===null||PI(t)||LI(t)||t!==45&&II(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function _z(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(iz,t,a)(o):o===null||PI(o)||LI(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function vz(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||PI(o)||LI(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||PI(e)||LI(e)?t(e):r(e)}function a(e){return EI(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):EI(t)?(e.consume(t),o):n(t)}}function yz(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return DI(e)?n(e):t(e)}}function bz(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||PI(e)}function xz(e){return!EI(e)}function Sz(e){return!(e===47||Cz(e))}function Cz(e){return e===43||e===45||e===46||e===95||DI(e)}function wz(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Tz(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&DI(e.charCodeAt(n+1))&&DI(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Ez(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Dz={name:`attention`,resolveAll:Oz,tokenize:kz};function Oz(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Az(d,-c),Az(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=XR(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=XR(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=XR(l,Ez(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=XR(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=XR(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,YR(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function kz(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=KL(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=KL(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Az(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var jz={name:`autolink`,tokenize:Mz};function Mz(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return EI(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||DI(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||DI(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||kI(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):OI(t)?(e.consume(t),l):n(t)}function u(e){return DI(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||DI(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function Nz(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return FI(r)?(e.enter(n),s(r)):t(r)}function s(r){return FI(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Pz={partial:!0,tokenize:Fz};function Fz(e,t,n){return r;function r(t){return FI(t)?Nz(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||NI(e)?t(e):n(e)}}var Iz={continuation:{tokenize:Rz},exit:zz,name:`blockQuote`,tokenize:Lz};function Lz(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return FI(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Rz(e,t,n){let r=this;return i;function i(t){return FI(t)?Nz(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Iz,t,n)(r)}}function zz(e){e.exit(`blockQuote`)}var Bz={name:`characterEscape`,tokenize:Vz};function Vz(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return MI(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Hz=document.createElement(`i`);function Uz(e){let t=`&`+e+`;`;Hz.innerHTML=t;let n=Hz.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}var Wz={name:`characterReference`,tokenize:Gz};function Gz(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=DI,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=jI,u):(e.enter(`characterReferenceValue`),a=7,o=AI,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===DI&&!Uz(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Kz={partial:!0,tokenize:Yz},qz={concrete:!0,name:`codeFenced`,tokenize:Jz};function Jz(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),FI(t)?Nz(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||NI(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Kz,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||NI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):FI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Nz(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||NI(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||NI(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&FI(t)?Nz(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||NI(t)?e.check(Kz,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||NI(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),FI(t)?Nz(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),FI(t)?Nz(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||NI(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Yz(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Xz={name:`codeIndented`,tokenize:Qz},Zz={partial:!0,tokenize:$z};function Qz(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Nz(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):NI(t)?e.attempt(Zz,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||NI(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function $z(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):NI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Nz(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):NI(e)?i(e):n(e)}}var eB={name:`codeText`,previous:nB,resolve:tB,tokenize:rB};function tB(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function nB(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function rB(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):NI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||NI(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var iB=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&aB(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),aB(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),aB(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);aB(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);aB(this.left,t.reverse())}}};function aB(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function oB(e){let t={},n=-1,r,i,a,o,s,c,l,u=new iB(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,sB(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return YR(e,0,1/0,u.slice(0)),!l}function sB(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var cB={resolve:uB,tokenize:dB},lB={partial:!0,tokenize:fB};function uB(e){return oB(e),e}function dB(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):NI(t)?e.check(lB,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function fB(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Nz(e,a,`linePrefix`)}function a(i){if(i===null||NI(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function pB(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||kI(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||NI(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||PI(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||kI(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function mB(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):NI(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||NI(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!FI(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function hB(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):NI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Nz(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||NI(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function gB(e,t){let n;return r;function r(i){return NI(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):FI(i)?Nz(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var _B={name:`definition`,tokenize:yB},vB={partial:!0,tokenize:bB};function yB(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return mB.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=oL(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return PI(t)?gB(e,l)(t):l(t)}function l(t){return pB(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(vB,d,d)(t)}function d(t){return FI(t)?Nz(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||NI(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function bB(e,t,n){return r;function r(t){return PI(t)?gB(e,i)(t):n(t)}function i(t){return hB(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return FI(t)?Nz(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||NI(e)?t(e):n(e)}}var xB={name:`hardBreakEscape`,tokenize:SB};function SB(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return NI(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var CB={name:`headingAtx`,resolve:wB,tokenize:TB};function wB(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},YR(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function TB(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||PI(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||NI(n)?(e.exit(`atxHeading`),t(n)):FI(n)?Nz(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||PI(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var EB=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),DB=[`pre`,`script`,`style`,`textarea`],OB={concrete:!0,name:`htmlFlow`,resolveTo:jB,tokenize:MB},kB={partial:!0,tokenize:PB},AB={partial:!0,tokenize:NB};function jB(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function MB(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):EI(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):EI(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return EI(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||PI(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&DB.includes(l)?(i=1,r.interrupt?t(s):O(s)):EB.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||DI(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return FI(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||EI(t)?(e.consume(t),b):FI(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||DI(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):FI(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):FI(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||NI(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||PI(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||FI(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||NI(t)?O(t):FI(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):NI(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(kB,I,k)(t)):t===null||NI(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(AB,A,I)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||NI(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return DB.includes(n)?(e.consume(t),te):O(t)}return EI(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),F):O(t)}function te(t){return t===null||NI(t)?(e.exit(`htmlFlowData`),I(t)):(e.consume(t),te)}function I(n){return e.exit(`htmlFlow`),t(n)}}function NB(e,t,n){let r=this;return i;function i(t){return NI(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function PB(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Pz,t,n)}}var FB={name:`htmlText`,tokenize:IB};function IB(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):EI(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):EI(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):NI(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):NI(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):NI(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):NI(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return EI(t)?(e.consume(t),S):n(t)}function S(t){return t===45||DI(t)?(e.consume(t),S):C(t)}function C(t){return NI(t)?(o=C,N(t)):FI(t)?(e.consume(t),C):M(t)}function w(t){return t===45||DI(t)?(e.consume(t),w):t===47||t===62||PI(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||EI(t)?(e.consume(t),E):NI(t)?(o=T,N(t)):FI(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||DI(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):NI(t)?(o=D,N(t)):FI(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):NI(t)?(o=O,N(t)):FI(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):NI(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||PI(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||PI(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return FI(t)?Nz(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var LB={name:`labelEnd`,resolveAll:VB,resolveTo:HB,tokenize:UB},RB={tokenize:WB},zB={tokenize:GB},BB={tokenize:KB};function VB(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&YR(e,0,e.length,n),e}function HB(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=XR(s,e.slice(a+1,a+r+3)),s=XR(s,[[`enter`,u,t]]),s=XR(s,Ez(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=XR(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=XR(s,e.slice(o+1)),s=XR(s,[[`exit`,c,t]]),YR(e,a,e.length,s),e}function UB(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(oL(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(RB,u,o?u:d)(t):t===91?e.attempt(zB,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(BB,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function WB(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return PI(t)?gB(e,a)(t):a(t)}function a(t){return t===41?u(t):pB(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return PI(t)?gB(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?hB(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return PI(t)?gB(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function GB(e,t,n){let r=this;return i;function i(t){return mB.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(oL(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function KB(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var qB={name:`labelStartImage`,resolveAll:LB.resolveAll,tokenize:JB};function JB(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var YB={name:`labelStartLink`,resolveAll:LB.resolveAll,tokenize:XB};function XB(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ZB={name:`lineEnding`,tokenize:QB};function QB(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Nz(e,t,`linePrefix`)}}var $B={name:`thematicBreak`,tokenize:eV};function eV(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||NI(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),FI(t)?Nz(e,s,`whitespace`)(t):s(t))}}var tV={continuation:{tokenize:aV},exit:sV,name:`list`,tokenize:iV},nV={partial:!0,tokenize:cV},rV={partial:!0,tokenize:oV};function iV(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:AI(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check($B,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return AI(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Pz,r.interrupt?n:u,e.attempt(nV,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return FI(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function aV(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Pz,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Nz(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!FI(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rV,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Nz(e,e.attempt(tV,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function oV(e,t,n){let r=this;return Nz(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function sV(e){e.exit(this.containerState.type)}function cV(e,t,n){let r=this;return Nz(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!FI(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var lV={name:`setextUnderline`,resolveTo:uV,tokenize:dV};function uV(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function dV(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),FI(t)?Nz(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||NI(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var fV={tokenize:bV,partial:!0};function pV(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:_V,continuation:{tokenize:vV},exit:yV}},text:{91:{name:`gfmFootnoteCall`,tokenize:gV},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:mV,resolveTo:hV}}}}function mV(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=oL(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function hV(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function gV(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||PI(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(oL(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return PI(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function _V(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||PI(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=oL(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return PI(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Nz(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function vV(e,t,n){return e.check(Pz,t,e.attempt(fV,t,n))}function yV(e){e.exit(`gfmFootnoteDefinition`)}function bV(e,t,n){let r=this;return Nz(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function xV(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&YR(o,o.length,0,Ez(s,e.slice(r+1,n),t)),YR(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),YR(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=KL(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=KL(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var SV=class{constructor(){this.map=[]}add(e,t,n){CV(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function CV(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function wV(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function TV(){return{flow:{null:{name:`table`,tokenize:EV,resolveAll:DV}}}}function EV(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):NI(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):FI(t)?Nz(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||PI(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,FI(t)?Nz(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return FI(t)?Nz(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||NI(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return FI(t)?Nz(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||NI(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||NI(n)?(e.exit(`tableRow`),t(n)):FI(n)?Nz(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||PI(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function DV(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new SV;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(kV(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=OV(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=OV(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=OV(f,t,o,i,n,d)):(o[0]=o[1],d=OV(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&kV(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=wV(t.events,n))}return e}function OV(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},AV(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=AV(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=AV(t.events,n[2]),a=AV(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},AV(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function kV(e,t,n,r,i){let a=[],o=AV(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function AV(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var jV={name:`tasklistCheck`,tokenize:NV};function MV(){return{text:{91:jV}}}function NV(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return PI(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return NI(r)?t(r):FI(r)?e.check({tokenize:PV},t,n)(r):n(r)}}function PV(e,t,n){return Nz(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function FV(e){return QR([uz(),pV(),xV(e),TV(),MV()])}var IV={};function LV(e){let t=this,n=e||IV,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(FV(n)),a.push(qR()),o.push(JR(n))}var RV=Object.defineProperty,zV=Object.defineProperties,BV=Object.getOwnPropertyDescriptors,VV=Object.getOwnPropertySymbols,HV=Object.prototype.hasOwnProperty,UV=Object.prototype.propertyIsEnumerable,WV=(e,t,n)=>t in e?RV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GV=(e,t)=>{for(var n in t||={})HV.call(t,n)&&WV(e,n,t[n]);if(VV)for(var n of VV(t))UV.call(t,n)&&WV(e,n,t[n]);return e},KV=(e,t)=>zV(e,BV(t)),qV=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]===`\\`&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},JV=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},YV=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]===`\\`&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!JV(e,n)&&(t+=1)}return t},XV=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]===`\\`&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},ZV=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,QV=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(ZV,(t,n,r,i)=>qV(e,i)?t:`${n}\\>${r}`),$V=/(\*\*)([^*]*\*?)$/,eH=/(__)([^_]*?)$/,tH=/(\*\*\*)([^*]*?)$/,nH=/(\*)([^*]*?)$/,rH=/(_)([^_]*?)$/,iH=/(`)([^`]*?)$/,aH=/(~~)([^~]*?)$/,oH=/^[\s_~*`]*$/,sH=/^[\s]*[-*+][\s]+$/,cH=/[\p{L}\p{N}_]/u,lH=/^```[^`\n]*```?$/,uH=/^\*{4,}$/,dH=/(__)([^_]+)_$/,fH=/(~~)([^~]+)~$/,pH=/~~/g,mH=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:cH.test(e)},hH=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},gH=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]===`[`)n+=1;else if(e[r]===`]`&&(--n,n===0))return r;return-1},_H=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]===`\\`&&e[i+1]===`$`){i+=1;continue}e[i]===`$`&&(e[i+1]===`$`?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},vH=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
|
|
127
|
-
`)return!1}return!1},yH=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?vH(e,t):!1;if(e[n]===`
|
|
128
|
-
`)return!1}return!1},bH=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`>`)return!1;if(e[n]===`<`){let t=n+1<e.length?e[n+1]:``;return t>=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t===`/`}if(e[n]===`
|
|
129
|
-
`)return!1}return!1},xH=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===`
|
|
130
|
-
`){r=n+1;break}let i=e.length;for(let n=t;n<e.length;n+=1)if(e[n]===`
|
|
131
|
-
`){i=n;break}let a=e.substring(r,i),o=0,s=!1;for(let e of a)if(e===n)o+=1;else if(e!==` `&&e!==` `){s=!0;break}return o>=3&&!s},SH=(e,t,n,r)=>n===`\\`||e.includes(`$`)&&_H(e,t)?!0:n!==`*`&&r===`*`?(t<e.length-2?e[t+2]:``)!==`*`:!!(n===`*`||n&&r&&mH(n)&&mH(r)||(!n||n===` `||n===` `||n===`
|
|
132
|
-
`)&&(!r||r===` `||r===` `||r===`
|
|
133
|
-
`)),CH=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!==`*`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;SH(e,i,a,o)||(t+=1)}return t},wH=(e,t,n,r)=>!!(n===`\\`||e.includes(`$`)&&_H(e,t)||yH(e,t)||bH(e,t)||n===`_`||r===`_`||n&&r&&mH(n)&&mH(r)),TH=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!==`_`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;wH(e,i,a,o)||(t+=1)}return t},EH=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]===`*`?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},DH=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]===`*`&&r+1<e.length&&e[r+1]===`*`&&(t+=1,r+=1)}return t},OH=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]===`_`&&r+1<e.length&&e[r+1]===`_`&&(t+=1,r+=1)}return t},kH=(e,t,n)=>{if(!t||oH.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
134
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return sH.test(a)&&t.includes(`
|
|
135
|
-
`)?!0:xH(e,n,`*`)},AH=e=>{let t=e.match($V);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return qV(e,r)||XV(e,r)||kH(e,n,r)?e:DH(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},jH=(e,t,n)=>{if(!t||oH.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
136
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return sH.test(a)&&t.includes(`
|
|
137
|
-
`)?!0:xH(e,n,`_`)},MH=e=>{let t=e.match(eH);if(!t){let t=e.match(dH);if(t){let n=e.lastIndexOf(t[1]);if(!(qV(e,n)||XV(e,n))&&OH(e)%2==1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return qV(e,r)||XV(e,r)||jH(e,n,r)?e:OH(e)%2==1?`${e}__`:e},NH=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]===`*`&&e[n-1]!==`*`&&e[n+1]!==`*`&&e[n-1]!==`\\`&&!_H(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if((!t||t===` `||t===` `||t===`
|
|
138
|
-
`)&&(!r||r===` `||r===` `||r===`
|
|
139
|
-
`)||t&&r&&mH(t)&&mH(r))continue;return n}}return-1},PH=e=>{if(!e.match(nH))return e;let t=NH(e);if(t===-1||qV(e,t)||XV(e,t))return e;let n=e.substring(t+1);return!n||oH.test(n)?e:CH(e)%2==1?`${e}*`:e},FH=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]===`_`&&e[n-1]!==`_`&&e[n+1]!==`_`&&e[n-1]!==`\\`&&!_H(e,n)&&!yH(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if(t&&r&&mH(t)&&mH(r))continue;return n}}return-1},IH=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
140
|
-
`;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},LH=e=>{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(DH(t)%2!=1)return null;let n=t.indexOf(`**`),r=FH(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},RH=e=>{if(!e.match(rH))return e;let t=FH(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||oH.test(n)||qV(e,t)||XV(e,t))return e;if(TH(e)%2==1){let t=LH(e);return t===null?IH(e):t}return e},zH=e=>{let t=DH(e),n=CH(e);return t%2==0&&n%2==0},BH=(e,t,n)=>!t||oH.test(t)||qV(e,n)||XV(e,n)?!0:xH(e,n,`*`),VH=e=>{if(uH.test(e))return e;let t=e.match(tH);if(!t)return e;let n=t[2];return BH(e,n,e.lastIndexOf(t[1]))?e:EH(e)%2==1?zH(e)?e:`${e}***`:e},HH=/<[a-zA-Z/][^>]*$/,UH=e=>{let t=e.match(HH);return!t||t.index===void 0||qV(e,t.index)?e:e.substring(0,t.index).trimEnd()},WH=e=>!e.match(lH)||e.includes(`
|
|
141
|
-
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,GH=e=>(e.match(/```/g)||[]).length%2==1,KH=e=>{let t=WH(e);if(t!==null)return t;let n=e.match(iH);if(n&&!GH(e)){let t=n[2];if(!t||oH.test(t))return e;if(YV(e)%2==1)return`${e}\``}return e},qH=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",JH=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!qH(e,r)&&(n=!n),!n&&e[r]===`$`&&e[r+1]===`$`&&(t+=1,r+=1);return t},YH=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]===`\\`){r+=1;continue}if(e[r]==="`"&&!qH(e,r)){n=!n;continue}!n&&e[r]===`$`&&(r+1<e.length&&e[r+1]===`$`?r+=1:t+=1)}return t},XH=e=>{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(`
|
|
142
|
-
`,t)!==-1&&!e.endsWith(`
|
|
143
|
-
`)?`${e}
|
|
144
|
-
$$`:`${e}$$`},ZH=e=>JH(e)%2==0?e:XH(e),QH=e=>YH(e)%2==1?`${e}$`:e,$H=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=hH(e,t);if(r===-1||qV(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a);if(i)return o;let s=e.substring(r+1,t);return n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},eU=(e,t)=>{for(let n=0;n<t;n++)if(e[n]===`[`&&!qV(e,n)){if(n>0&&e[n-1]===`!`)continue;let t=gH(e,n);if(t===-1)return n;if(t+1<e.length&&e[t+1]===`(`){let r=e.indexOf(`)`,t+2);r!==-1&&(n=r)}}return t},tU=(e,t,n)=>{let r=t>0&&e[t-1]===`!`,i=r?t-1:t;if(!e.substring(t+1).includes(`]`)){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=eU(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}if(gH(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=eU(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},nU=(e,t=`protocol`)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!qV(e,n)){let r=$H(e,n,t);if(r!==null)return r}for(let n=e.length-1;n>=0;--n)if(e[n]===`[`&&!qV(e,n)){let r=tU(e,n,t);if(r!==null)return r}return e},rU=/^-{1,2}$/,iU=/^[\s]*-{1,2}[\s]+$/,aU=/^={1,2}$/,oU=/^[\s]*={1,2}[\s]+$/,sU=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(`
|
|
145
|
-
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(rU.test(i)&&!n.match(iU)){let t=r.split(`
|
|
146
|
-
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(aU.test(i)&&!n.match(oU)){let t=r.split(`
|
|
147
|
-
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},cU=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),lU=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(cU,(t,n)=>qV(e,n)?t:`\\~`),uU=e=>{let t=e.match(aH);if(t){let n=t[2];if(!n||oH.test(n))return e;let r=e.lastIndexOf(t[1]);if(qV(e,r)||XV(e,r))return e;if(e.match(pH)?.length%2==1)return`${e}~~`}else{let t=e.match(fH);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(qV(e,n)||XV(e,n))return e;if(e.match(pH)?.length%2==1)return`${e}~`}}return e},dU=e=>e!==!1,fU=e=>e===!0,pU={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},mU=[{handler:{name:`singleTilde`,handle:lU,priority:pU.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:QV,priority:pU.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:UH,priority:pU.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:sU,priority:pU.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:nU,priority:pU.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:VH,priority:pU.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:AH,priority:pU.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:MH,priority:pU.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:PH,priority:pU.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:RH,priority:pU.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:KH,priority:pU.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:uU,priority:pU.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:ZH,priority:pU.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:QH,priority:pU.INLINE_KATEX},optionKey:`inlineKatex`}],hU=e=>{let t=e?.linkMode??`protocol`;return mU.filter(({handler:t,optionKey:n})=>t.name===`links`?dU(e?.links)||dU(e?.images):t.name===`inlineKatex`?fU(e?.inlineKatex):dU(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:KV(GV({},e),{handle:e=>nU(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},gU=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=hU(t),i=(t?.handlers??[]).map(e=>({handler:KV(GV({},e),{priority:e.priority??pU.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n};function _U(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_U(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function vU(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_U(e))&&(r&&(r+=` `),r+=t);return r}var yU=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bU=(e,t)=>({classGroupId:e,validator:t}),xU=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),SU=`-`,CU=[],wU=`arbitrary..`,TU=e=>{let t=OU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return DU(e);let n=e.split(SU);return EU(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?yU(i,t):t:i||CU}return n[e]||CU}}},EU=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=EU(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(SU):e.slice(t).join(SU),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},DU=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?wU+r:void 0})(),OU=e=>{let{theme:t,classGroups:n}=e;return kU(n,t)},kU=(e,t)=>{let n=xU();for(let r in e){let i=e[r];AU(i,n,r,t)}return n},AU=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];jU(i,t,n,r)}},jU=(e,t,n,r)=>{if(typeof e==`string`){MU(e,t,n);return}if(typeof e==`function`){NU(e,t,n,r);return}PU(e,t,n,r)},MU=(e,t,n)=>{let r=e===``?t:FU(t,e);r.classGroupId=n},NU=(e,t,n,r)=>{if(IU(e)){AU(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bU(n,e))},PU=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];AU(o,FU(t,a),n,r)}},FU=(e,t)=>{let n=e,r=t.split(SU),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=xU(),n.nextPart.set(t,i)),n=i}return n},IU=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,LU=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},RU=`!`,zU=`:`,BU=[],VU=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),HU=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===zU){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(RU)?(c=s.slice(0,-1),l=!0):s.startsWith(RU)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return VU(t,l,c,u)};if(t){let e=t+zU,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):VU(BU,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},UU=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},WU=e=>({cache:LU(e.cacheSize),parseClassName:HU(e),sortModifiers:UU(e),postfixLookupClassGroupIds:GU(e),...TU(e)}),GU=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},KU=/\s+/,qU=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(KU),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+RU:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},JU=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=YU(n))&&(i&&(i+=` `),i+=r);return i},YU=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=YU(e[r]))&&(n&&(n+=` `),n+=t);return n},XU=(e,...t)=>{let n,r,i,a,o=o=>(n=WU(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=qU(e,n);return i(e,a),a};return a=o,(...e)=>a(JU(...e))},ZU=[],QU=e=>{let t=t=>t[e]||ZU;return t.isThemeGetter=!0,t},$U=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eW=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tW=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,nW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sW=e=>tW.test(e),cW=e=>!!e&&!Number.isNaN(Number(e)),lW=e=>!!e&&Number.isInteger(Number(e)),uW=e=>e.endsWith(`%`)&&cW(e.slice(0,-1)),dW=e=>nW.test(e),fW=()=>!0,pW=e=>rW.test(e)&&!iW.test(e),mW=()=>!1,hW=e=>aW.test(e),gW=e=>oW.test(e),_W=e=>!bW(e)&&!OW(e),vW=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),yW=e=>IW(e,BW,mW),bW=e=>$U.test(e),xW=e=>IW(e,VW,pW),SW=e=>IW(e,HW,cW),CW=e=>IW(e,WW,fW),wW=e=>IW(e,UW,mW),TW=e=>IW(e,RW,mW),EW=e=>IW(e,zW,gW),DW=e=>IW(e,GW,hW),OW=e=>eW.test(e),kW=e=>LW(e,VW),AW=e=>LW(e,UW),jW=e=>LW(e,RW),MW=e=>LW(e,BW),NW=e=>LW(e,zW),PW=e=>LW(e,GW,!0),FW=e=>LW(e,WW,!0),IW=(e,t,n)=>{let r=$U.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},LW=(e,t,n=!1)=>{let r=eW.exec(e);return r?r[1]?t(r[1]):n:!1},RW=e=>e===`position`||e===`percentage`,zW=e=>e===`image`||e===`url`,BW=e=>e===`length`||e===`size`||e===`bg-size`,VW=e=>e===`length`,HW=e=>e===`number`,UW=e=>e===`family-name`,WW=e=>e===`number`||e===`weight`,GW=e=>e===`shadow`,KW=XU(()=>{let e=QU(`color`),t=QU(`font`),n=QU(`text`),r=QU(`font-weight`),i=QU(`tracking`),a=QU(`leading`),o=QU(`breakpoint`),s=QU(`container`),c=QU(`spacing`),l=QU(`radius`),u=QU(`shadow`),d=QU(`inset-shadow`),f=QU(`text-shadow`),p=QU(`drop-shadow`),m=QU(`blur`),h=QU(`perspective`),g=QU(`aspect`),_=QU(`ease`),v=QU(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),OW,bW],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[OW,bW,c],T=()=>[sW,`full`,`auto`,...w()],E=()=>[lW,`none`,`subgrid`,OW,bW],D=()=>[`auto`,{span:[`full`,lW,OW,bW]},lW,OW,bW],O=()=>[lW,`auto`,OW,bW],k=()=>[`auto`,`min`,`max`,`fr`,OW,bW],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[sW,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[sW,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[sW,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,OW,bW],te=()=>[...b(),jW,TW,{position:[OW,bW]}],I=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],L=()=>[`auto`,`cover`,`contain`,MW,yW,{size:[OW,bW]}],ne=()=>[uW,kW,xW],R=()=>[``,`none`,`full`,l,OW,bW],re=()=>[``,cW,kW,xW],z=()=>[`solid`,`dashed`,`dotted`,`double`],ie=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ae=()=>[cW,uW,jW,TW],oe=()=>[``,`none`,m,OW,bW],se=()=>[`none`,cW,OW,bW],ce=()=>[`none`,cW,OW,bW],le=()=>[cW,OW,bW],ue=()=>[sW,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[dW],breakpoint:[dW],color:[fW],container:[dW],"drop-shadow":[dW],ease:[`in`,`out`,`in-out`],font:[_W],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[dW],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[dW],shadow:[dW],spacing:[`px`,cW],text:[dW],"text-shadow":[dW],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,sW,bW,OW,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,OW,bW]}],"container-named":[vW],columns:[{columns:[cW,bW,OW,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[lW,`auto`,OW,bW]}],basis:[{basis:[sW,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[cW,sW,`auto`,`initial`,`none`,bW]}],grow:[{grow:[``,cW,OW,bW]}],shrink:[{shrink:[``,cW,OW,bW]}],order:[{order:[lW,`first`,`last`,`none`,OW,bW]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,kW,xW]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,FW,CW]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,uW,bW]}],"font-family":[{font:[AW,wW,t]}],"font-features":[{"font-features":[bW]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,OW,bW]}],"line-clamp":[{"line-clamp":[cW,`none`,OW,SW]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,OW,bW]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,OW,bW]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[cW,`from-font`,`auto`,OW,xW]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[cW,`auto`,OW,bW]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[lW,OW,bW]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,OW,bW]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,OW,bW]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:L()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},lW,OW,bW],radial:[``,OW,bW],conic:[lW,OW,bW]},NW,EW]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":re()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[cW,OW,bW]}],"outline-w":[{outline:[``,cW,kW,xW]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,PW,DW]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,PW,DW]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:re()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[cW,xW]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,PW,DW]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[cW,OW,bW]}],"mix-blend":[{"mix-blend":[...ie(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[cW]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[OW,bW]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[cW]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,OW,bW]}],filter:[{filter:[``,`none`,OW,bW]}],blur:[{blur:oe()}],brightness:[{brightness:[cW,OW,bW]}],contrast:[{contrast:[cW,OW,bW]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,PW,DW]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,cW,OW,bW]}],"hue-rotate":[{"hue-rotate":[cW,OW,bW]}],invert:[{invert:[``,cW,OW,bW]}],saturate:[{saturate:[cW,OW,bW]}],sepia:[{sepia:[``,cW,OW,bW]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,OW,bW]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[cW,OW,bW]}],"backdrop-contrast":[{"backdrop-contrast":[cW,OW,bW]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,cW,OW,bW]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[cW,OW,bW]}],"backdrop-invert":[{"backdrop-invert":[``,cW,OW,bW]}],"backdrop-opacity":[{"backdrop-opacity":[cW,OW,bW]}],"backdrop-saturate":[{"backdrop-saturate":[cW,OW,bW]}],"backdrop-sepia":[{"backdrop-sepia":[``,cW,OW,bW]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,OW,bW]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[cW,`initial`,OW,bW]}],ease:[{ease:[`linear`,`initial`,_,OW,bW]}],delay:[{delay:[cW,OW,bW]}],animate:[{animate:[`none`,v,OW,bW]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,OW,bW]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[OW,bW,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[lW,OW,bW]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,OW,bW]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,OW,bW]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[cW,kW,xW,SW]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),qW=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,JW=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YW={};function XW(e,t){return((t||YW).jsx?JW:qW).test(e)}var ZW=/[ \t\n\f\r]/g;function QW(e){return typeof e==`object`?e.type===`text`?$W(e.value):!1:$W(e)}function $W(e){return e.replace(ZW,``)===``}var eG=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`/`,d=`*`,f=``;function p(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,p=1;function h(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
148
|
-
`);p=~n?e.length-n:p+e.length}function g(){var e={line:l,column:p};return function(t){return t.position=new _(e),b(),t}}function _(e){this.start=e,this.end={line:l,column:p},this.source=t.source}_.prototype.content=e;function v(n){var r=Error(t.source+`:`+l+`:`+p+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(i)}function x(e){var t;for(e||=[];t=S();)t!==!1&&e.push(t);return e}function S(){var t=g();if(!(u!=e.charAt(0)||d!=e.charAt(1))){for(var n=2;f!=e.charAt(n)&&(d!=e.charAt(n)||u!=e.charAt(n+1));)++n;if(n+=2,f===e.charAt(n-1))return v(`End of comment missing`);var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:`comment`,comment:r})}}function C(){var e=g(),t=y(a);if(t){if(S(),!y(o))return v(`property missing ':'`);var r=y(s),i=e({type:`declaration`,property:m(t[0].replace(n,f)),value:r?m(r[0].replace(n,f)):f});return y(c),i}}function w(){var e=[];x(e);for(var t;t=C();)t!==!1&&(e.push(t),x(e));return e}return b(),w()}function m(e){return e?e.replace(l,f):f}t.exports=p})),tG=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(eG());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),nG=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),rG=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(tG()),r=nG();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function iG(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?oG(e.position):`start`in e||`end`in e?oG(e):`line`in e||`column`in e?aG(e):``}function aG(e){return sG(e&&e.line)+`:`+sG(e&&e.column)}function oG(e){return aG(e&&e.start)+`-`+aG(e&&e.end)}function sG(e){return e&&typeof e==`number`?e:1}var cG=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=iG(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};cG.prototype.file=``,cG.prototype.name=``,cG.prototype.reason=``,cG.prototype.message=``,cG.prototype.stack=``,cG.prototype.column=void 0,cG.prototype.line=void 0,cG.prototype.ancestors=void 0,cG.prototype.cause=void 0,cG.prototype.fatal=void 0,cG.prototype.place=void 0,cG.prototype.ruleId=void 0,cG.prototype.source=void 0;var lG=l(rG(),1),uG={}.hasOwnProperty,dG=new Map,fG=/[A-Z]/g,pG=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),mG=new Set([`td`,`th`]);function hG(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=EG(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=TG(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?RA:LA,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=gG(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function gG(e,t,n){if(t.type===`element`)return _G(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return vG(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return bG(e,t,n);if(t.type===`mdxjsEsm`)return yG(e,t);if(t.type===`root`)return xG(e,t,n);if(t.type===`text`)return SG(e,t)}function _G(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=RA,e.schema=i),e.ancestors.push(t);let a=MG(e,t.tagName,!1),o=DG(e,t),s=kG(e,t);return pG.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!QW(e):!0})),CG(e,o,a,t),wG(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function vG(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}NG(e,t.position)}function yG(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);NG(e,t.position)}function bG(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=RA,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:MG(e,t.name,!0),o=OG(e,t),s=kG(e,t);return CG(e,o,a,t),wG(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function xG(e,t,n){let r={};return wG(r,kG(e,t)),e.create(t,e.Fragment,r,n)}function SG(e,t){return t.value}function CG(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wG(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function TG(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function EG(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=IF(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function DG(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&uG.call(t.properties,i)){let a=AG(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&mG.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function OG(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else NG(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else NG(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function kG(e,t){let n=[],r=-1,i=e.passKeys?new Map:dG;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=gG(e,a,o);s!==void 0&&n.push(s)}return n}function AG(e,t,n){let r=PA(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?BA(n):WA(n)),r.property===`style`){let t=typeof n==`object`?n:jG(e,String(n));return e.stylePropertyNameCase===`css`&&(t=PG(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?AA[r.property]||r.property:r.attribute,n]}}function jG(e,t){try{return(0,lG.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new cG("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function MG(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=XW(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=XW(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return uG.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);NG(e)}function NG(e,t){let n=new cG("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function PG(e){let t={},n;for(n in e)uG.call(e,n)&&(t[FG(n)]=e[n]);return t}function FG(e){let t=e.replace(fG,IG);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function IG(e){return`-`+e.toLowerCase()}var LG={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},RG={tokenize:zG};function zG(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Nz(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return NI(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var BG={tokenize:HG},VG={tokenize:UG};function HG(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return YR(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(VG,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(VG,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return NI(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;YR(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function UG(e,t,n){return Nz(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var WG={tokenize:GG};function GG(e){let t=this,n=e.attempt(Pz,r,e.attempt(this.parser.constructs.flowInitial,i,Nz(e,e.attempt(this.parser.constructs.flow,i,e.attempt(cB,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var KG={resolveAll:XG()},qG=YG(`string`),JG=YG(`text`);function YG(e){return{resolveAll:XG(e===`text`?ZG:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function XG(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function ZG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var QG=s({attentionMarkers:()=>oK,contentInitial:()=>eK,disable:()=>sK,document:()=>$G,flow:()=>nK,flowInitial:()=>tK,insideSpan:()=>aK,string:()=>rK,text:()=>iK}),$G={42:tV,43:tV,45:tV,48:tV,49:tV,50:tV,51:tV,52:tV,53:tV,54:tV,55:tV,56:tV,57:tV,62:Iz},eK={91:_B},tK={[-2]:Xz,[-1]:Xz,32:Xz},nK={35:CB,42:$B,45:[lV,$B],60:OB,61:lV,95:$B,96:qz,126:qz},rK={38:Wz,92:Bz},iK={[-5]:ZB,[-4]:ZB,[-3]:ZB,33:qB,38:Wz,42:Dz,60:[jz,FB],91:YB,92:[xB,Bz],93:LB,95:Dz,96:eB},aK={null:[Dz,KG]},oK={null:[42,95]},sK={null:[]};function cK(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=XR(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Ez(a,l.events,l),l.events):[]}function f(e,t){return uK(p(e),t)}function p(e){return lK(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){NI(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&YR(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function lK(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function uK(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
149
|
-
`;break;case-3:o=`\r
|
|
150
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function dK(e){let t={constructs:QR([QG,...(e||{}).extensions||[]]),content:n(RG),defined:[],document:n(BG),flow:n(WG),lazy:{},string:n(qG),text:n(JG)};return t;function n(e){return n;function n(n){return cK(t,e,n)}}}function fK(e){for(;!oB(e););return e}var pK=/[\0\t\n\r]/g;function mK(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(pK.lastIndex=u,c=pK.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function hK(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var gK=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _K(e){return e.replace(gK,vK)}function vK(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return hK(n.slice(t?2:1),t?16:10)}return Uz(n)||e}var yK={}.hasOwnProperty;function bK(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),xK(n)(fK(dK(n).document().write(mK()(e,t,!0))))}function xK(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(he),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(de),blockQuote:a(oe),characterEscape:T,characterReference:T,codeFenced:a(se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(se,o),codeText:a(ce,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(le),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ue),hardBreakEscape:a(fe),hardBreakTrailing:a(fe),htmlFlow:a(pe,o),htmlFlowData:T,htmlText:a(pe,o),htmlTextData:T,image:a(me),label:o,link:a(he),listItem:a(_e),listItemValue:f,listOrdered:a(ge,d),listUnordered:a(ge),paragraph:a(ve),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(de),strong:a(ye),thematicBreak:a(xe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ae,autolinkProtocol:ie,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:R,characterReferenceMarkerNumeric:R,characterReferenceValue:re,characterReference:z,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:ee,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ne,resourceDestinationString:F,resourceTitleString:te,resource:I,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};CK(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];yK.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||TK).call(a,void 0,e[0])}for(r.position={start:SK(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:SK(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:SK(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||TK).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+iG({start:e.start,end:e.end})+`): it’s not open`);n.position.end=SK(e.end)}function u(){return ZL(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=oL(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=be(),n.position={start:SK(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=SK(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=SK(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=_K(t),n.identifier=oL(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function I(){this.data.inReference=void 0}function L(){this.data.referenceType=`collapsed`}function ne(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=oL(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function R(e){this.data.characterReferenceType=e.type}function re(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=hK(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Uz(t);let i=this.stack[this.stack.length-1];i.value+=r}function z(e){let t=this.stack.pop();t.position.end=SK(e.end)}function ie(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ae(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function oe(){return{type:`blockquote`,children:[]}}function se(){return{type:`code`,lang:null,meta:null,value:``}}function ce(){return{type:`inlineCode`,value:``}}function le(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ue(){return{type:`emphasis`,children:[]}}function de(){return{type:`heading`,depth:0,children:[]}}function fe(){return{type:`break`}}function pe(){return{type:`html`,value:``}}function me(){return{type:`image`,title:null,url:``,alt:null}}function he(){return{type:`link`,title:null,url:``,children:[]}}function ge(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function _e(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ve(){return{type:`paragraph`,children:[]}}function ye(){return{type:`strong`,children:[]}}function be(){return{type:`text`,value:``}}function xe(){return{type:`thematicBreak`}}}function SK(e){return{line:e.line,column:e.column,offset:e.offset}}function CK(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?CK(e,r):wK(e,r)}}function wK(e,t){let n;for(n in t)if(yK.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function TK(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+iG({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+iG({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+iG({start:t.start,end:t.end})+`) is still open`)}function EK(e){let t=this;t.parser=n;function n(n){return bK(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function DK(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function OK(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function kK(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||DK,r=e.options.footnoteBackLabel||OK,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Tz(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...rA(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
151
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
152
|
-
`}]}}function AK(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function jK(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
153
|
-
`}]}function MK(e,t){let n=t.value?t.value+`
|
|
154
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function NK(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PK(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FK(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Tz(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function IK(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LK(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function RK(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function zK(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return RK(e,t);let i={src:Tz(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function BK(e,t){let n={src:Tz(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function VK(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function HK(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return RK(e,t);let i={href:Tz(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function UK(e,t){let n={href:Tz(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function WK(e,t,n){let r=e.all(t),i=n?GK(n):KK(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
155
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
156
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function GK(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=KK(n[r])}return t}function KK(e){return e.spread??e.children.length>1}function qK(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function JK(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YK(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function XK(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZK(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=IF(t.children[1]),o=FF(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function QK(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function $K(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var eq=9,tq=32;function nq(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(rq(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(rq(t.slice(i),i>0,!1)),a.join(``)}function rq(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===eq||t===tq;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===eq||t===tq;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function iq(e,t){let n={type:`text`,value:nq(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function aq(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var oq={blockquote:AK,break:jK,code:MK,delete:NK,emphasis:PK,footnoteReference:FK,heading:IK,html:LK,imageReference:zK,image:BK,inlineCode:VK,linkReference:HK,link:UK,listItem:WK,list:qK,paragraph:JK,root:YK,strong:XK,table:ZK,tableCell:$K,tableRow:QK,text:iq,thematicBreak:aq,toml:sq,yaml:sq,definition:sq,footnoteDefinition:sq};function sq(){}var cq={}.hasOwnProperty,lq={};function uq(e,t){let n=t||lq,r=new Map,i=new Map,a={all:s,applyData:fq,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...oq,...n.handlers},one:o,options:n,patch:dq,wrap:mq};return Nk(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(cq.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=rA(n);return r.children=a.all(e),r}return rA(e)}return(a.options.unknownHandler||pq)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=hq(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=hq(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function dq(e,t){e.position&&(t.position=RF(e))}function fq(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,rA(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function pq(e,t){let n=t.data||{},r=`value`in t&&!(cq.call(n,`hProperties`)||cq.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function mq(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
157
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
158
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
159
|
-
`}),n}function hq(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function gq(e,t){let n=uq(e,t),r=n.one(e,void 0),i=kK(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
160
|
-
`},i)),a}function _q(e,t){return e&&`run`in e?async function(n,r){let i=gq(n,{file:r,...t});await e.run(i,r)}:function(n,r){return gq(n,{file:r,...e||t})}}function vq(e){if(e)throw e}var yq=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function bq(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xq(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Sq(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Sq(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Cq={basename:wq,dirname:Tq,extname:Eq,join:Dq,sep:`/`};function wq(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Aq(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Tq(e){if(Aq(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Eq(e){Aq(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Dq(...e){let t=-1,n;for(;++t<e.length;)Aq(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Oq(n)}function Oq(e){Aq(e);let t=e.codePointAt(0)===47,n=kq(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function kq(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Aq(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var jq={cwd:Mq};function Mq(){return`/`}function Nq(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Pq(e){if(typeof e==`string`)e=new URL(e);else if(!Nq(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Fq(e)}function Fq(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Iq=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Lq=class{constructor(e){let t;t=e?Nq(e)?{path:e}:typeof e==`string`||Vq(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:jq.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Iq.length;){let e=Iq[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Iq.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Cq.basename(this.path):void 0}set basename(e){zq(e,`basename`),Rq(e,`basename`),this.path=Cq.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Cq.dirname(this.path):void 0}set dirname(e){Bq(this.basename,`dirname`),this.path=Cq.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Cq.extname(this.path):void 0}set extname(e){if(Rq(e,`extname`),Bq(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Cq.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Nq(e)&&(e=Pq(e)),zq(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Cq.basename(this.path,this.extname):void 0}set stem(e){zq(e,`stem`),Rq(e,`stem`),this.path=Cq.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new cG(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Rq(e,t){if(e&&e.includes(Cq.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Cq.sep+"`")}function zq(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Bq(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Vq(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Hq=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Uq=l(yq(),1),Wq={}.hasOwnProperty,Gq=new class e extends Hq{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=xq()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Uq.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Jq(`data`,this.frozen),this.namespace[e]=t,this):Wq.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Jq(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Zq(e),n=this.parser||this.Parser;return Kq(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Kq(`process`,this.parser||this.Parser),qq(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Zq(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);$q(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Kq(`processSync`,this.parser||this.Parser),qq(`processSync`,this.compiler||this.Compiler),this.process(e,r),Xq(`processSync`,`process`,t),n;function r(e,r){t=!0,vq(e),n=r}}run(e,t,n){Yq(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Zq(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Xq(`runSync`,`run`,n),r;function i(e,t){vq(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Zq(t),r=this.compiler||this.Compiler;return qq(`stringify`,r),Yq(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Jq(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Uq.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];bq(o)&&bq(r)&&(r=(0,Uq.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Kq(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function qq(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Jq(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Yq(e){if(!bq(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Xq(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zq(e){return Qq(e)?e:new Lq(e)}function Qq(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function $q(e){return typeof e==`string`||eJ(e)}function eJ(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function tJ(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nJ=tJ();function rJ(e){nJ=e}var iJ={exec:()=>null};function aJ(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(sJ.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var oJ=(()=>{try{return!0}catch{return!1}})(),sJ={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},cJ=/^(?:[ \t]*(?:\n|$))+/,lJ=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,uJ=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,dJ=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fJ=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pJ=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,mJ=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,hJ=aJ(mJ).replace(/bull/g,pJ).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),gJ=aJ(mJ).replace(/bull/g,pJ).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_J=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vJ=/^[^\n]+/,yJ=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,bJ=aJ(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,yJ).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xJ=aJ(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pJ).getRegex(),SJ=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,CJ=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wJ=aJ(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,CJ).replace(`tag`,SJ).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),TJ=aJ(_J).replace(`hr`,dJ).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,SJ).getRegex(),EJ={blockquote:aJ(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,TJ).getRegex(),code:lJ,def:bJ,fences:uJ,heading:fJ,hr:dJ,html:wJ,lheading:hJ,list:xJ,newline:cJ,paragraph:TJ,table:iJ,text:vJ},DJ=aJ(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,dJ).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,SJ).getRegex(),OJ={...EJ,lheading:gJ,table:DJ,paragraph:aJ(_J).replace(`hr`,dJ).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,DJ).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,SJ).getRegex()},kJ={...EJ,html:aJ(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,CJ).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:iJ,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:aJ(_J).replace(`hr`,dJ).replace(`heading`,` *#{1,6} *[^
|
|
161
|
-
]`).replace(`lheading`,hJ).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},AJ=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jJ=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,MJ=/^( {2,}|\\)\n(?!\s*$)/,NJ=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,PJ=/[\p{P}\p{S}]/u,FJ=/[\s\p{P}\p{S}]/u,IJ=/[^\s\p{P}\p{S}]/u,LJ=aJ(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,FJ).getRegex(),RJ=/(?!~)[\p{P}\p{S}]/u,zJ=/(?!~)[\s\p{P}\p{S}]/u,BJ=/(?:[^\s\p{P}\p{S}]|~)/u,VJ=aJ(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,oJ?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),HJ=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,UJ=aJ(HJ,`u`).replace(/punct/g,PJ).getRegex(),WJ=aJ(HJ,`u`).replace(/punct/g,RJ).getRegex(),GJ=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,KJ=aJ(GJ,`gu`).replace(/notPunctSpace/g,IJ).replace(/punctSpace/g,FJ).replace(/punct/g,PJ).getRegex(),qJ=aJ(GJ,`gu`).replace(/notPunctSpace/g,BJ).replace(/punctSpace/g,zJ).replace(/punct/g,RJ).getRegex(),JJ=aJ(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,IJ).replace(/punctSpace/g,FJ).replace(/punct/g,PJ).getRegex(),YJ=aJ(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,PJ).getRegex(),XJ=aJ(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,IJ).replace(/punctSpace/g,FJ).replace(/punct/g,PJ).getRegex(),ZJ=aJ(/\\(punct)/,`gu`).replace(/punct/g,PJ).getRegex(),QJ=aJ(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),$J=aJ(CJ).replace(`(?:-->|$)`,`-->`).getRegex(),eY=aJ(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,$J).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),tY=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nY=aJ(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,tY).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rY=aJ(/^!?\[(label)\]\[(ref)\]/).replace(`label`,tY).replace(`ref`,yJ).getRegex(),iY=aJ(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,yJ).getRegex(),aY=aJ(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,rY).replace(`nolink`,iY).getRegex(),oY=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sY={_backpedal:iJ,anyPunctuation:ZJ,autolink:QJ,blockSkip:VJ,br:MJ,code:jJ,del:iJ,delLDelim:iJ,delRDelim:iJ,emStrongLDelim:UJ,emStrongRDelimAst:KJ,emStrongRDelimUnd:JJ,escape:AJ,link:nY,nolink:iY,punctuation:LJ,reflink:rY,reflinkSearch:aY,tag:eY,text:NJ,url:iJ},cY={...sY,link:aJ(/^!?\[(label)\]\((.*?)\)/).replace(`label`,tY).getRegex(),reflink:aJ(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,tY).getRegex()},lY={...sY,emStrongRDelimAst:qJ,emStrongLDelim:WJ,delLDelim:YJ,delRDelim:XJ,url:aJ(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,oY).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:aJ(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,oY).getRegex()},uY={...lY,br:aJ(MJ).replace(`{2,}`,`*`).getRegex(),text:aJ(lY.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},dY={normal:EJ,gfm:OJ,pedantic:kJ},fY={normal:sY,gfm:lY,breaks:uY,pedantic:cY},pY={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},mY=e=>pY[e];function hY(e,t){if(t){if(sJ.escapeTest.test(e))return e.replace(sJ.escapeReplace,mY)}else if(sJ.escapeTestNoEncode.test(e))return e.replace(sJ.escapeReplaceNoEncode,mY);return e}function gY(e){try{e=encodeURI(e).replace(sJ.percentDecode,`%`)}catch{return null}return e}function _Y(e,t){let n=e.replace(sJ.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(sJ.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(sJ.slashPipe,`|`);return n}function vY(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function yY(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function bY(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function xY(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function SY(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
162
|
-
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
163
|
-
`)}var CY=class{options;rules;lexer;constructor(e){this.options=e||nJ}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:vY(e,`
|
|
164
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=SY(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=vY(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:vY(t[0],`
|
|
165
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=vY(t[0],`
|
|
166
|
-
`).split(`
|
|
167
|
-
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
168
|
-
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
169
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
170
|
-
${s}`:s,r=r?`${r}
|
|
171
|
-
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
|
|
172
|
-
`+e.join(`
|
|
173
|
-
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
174
|
-
`+e.join(`
|
|
175
|
-
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
176
|
-
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=bY(t[2].split(`
|
|
177
|
-
`,1)[0],t[1].length),l=e.split(`
|
|
178
|
-
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
179
|
-
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
|
|
180
|
-
`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
181
|
-
`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
182
|
-
`+l}u=!l.trim(),r+=p+`
|
|
183
|
-
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=_Y(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
184
|
-
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(_Y(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
185
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=vY(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=yY(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),xY(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return xY(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},wY=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||nJ,this.options.tokenizer=this.options.tokenizer||new CY,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:sJ,block:dY.normal,inline:fY.normal};this.options.pedantic?(t.block=dY.pedantic,t.inline=fY.pedantic):this.options.gfm&&(t.block=dY.gfm,this.options.breaks?t.inline=fY.breaks:t.inline=fY.gfm),this.tokenizer.rules=t}static get rules(){return{block:dY,inline:fY}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(sJ.carriageReturn,`
|
|
186
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(sJ.tabCharGlobal,` `).replace(sJ.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
187
|
-
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
188
|
-
`)?``:`
|
|
189
|
-
`)+r.raw,n.text+=`
|
|
190
|
-
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
191
|
-
`)?``:`
|
|
192
|
-
`)+r.raw,n.text+=`
|
|
193
|
-
`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
|
|
194
|
-
`)?``:`
|
|
195
|
-
`)+r.raw,a.text+=`
|
|
196
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
197
|
-
`)?``:`
|
|
198
|
-
`)+r.raw,n.text+=`
|
|
199
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},TY=class{options;parser;constructor(e){this.options=e||nJ}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(sJ.notSpaceStart)?.[0],i=e.replace(sJ.endingNewline,``)+`
|
|
200
|
-
`;return r?`<pre><code class="language-`+hY(r)+`">`+(n?i:hY(i,!0))+`</code></pre>
|
|
201
|
-
`:`<pre><code>`+(n?i:hY(i,!0))+`</code></pre>
|
|
202
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
203
|
-
${this.parser.parse(e)}</blockquote>
|
|
204
|
-
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
205
|
-
`}hr(e){return`<hr>
|
|
206
|
-
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
207
|
-
`+r+`</`+i+`>
|
|
208
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
209
|
-
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
210
|
-
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
211
|
-
<thead>
|
|
212
|
-
`+t+`</thead>
|
|
213
|
-
`+r+`</table>
|
|
214
|
-
`}tablerow({text:e}){return`<tr>
|
|
215
|
-
${e}</tr>
|
|
216
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
217
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${hY(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=gY(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+hY(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=gY(e);if(i===null)return hY(n);e=i;let a=`<img src="${e}" alt="${hY(n)}"`;return t&&(a+=` title="${hY(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:hY(e.text)}},EY=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},DY=class e{options;renderer;textRenderer;constructor(e){this.options=e||nJ,this.options.renderer=this.options.renderer||new TY,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new EY}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},OY=class{options;block;constructor(e){this.options=e||nJ}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?wY.lex:wY.lexInline}provideParser(e=this.block){return e?DY.parse:DY.parseInline}},kY=new class{defaults=tJ();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=DY;Renderer=TY;TextRenderer=EY;Lexer=wY;Tokenizer=CY;Hooks=OY;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new TY(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new CY(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new OY;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];OY.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&OY.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return wY.lex(e,t??this.defaults)}parser(e,t){return DY.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?wY.lex:wY.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?DY.parse:DY.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?wY.lex:wY.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?DY.parse:DY.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
218
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+hY(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function AY(e,t){return kY.parse(e,t)}AY.options=AY.setOptions=function(e){return kY.setOptions(e),AY.defaults=kY.defaults,rJ(AY.defaults),AY},AY.getDefaults=tJ,AY.defaults=nJ,AY.use=function(...e){return kY.use(...e),AY.defaults=kY.defaults,rJ(AY.defaults),AY},AY.walkTokens=function(e,t){return kY.walkTokens(e,t)},AY.parseInline=kY.parseInline,AY.Parser=DY,AY.parser=DY.parse,AY.Renderer=TY,AY.TextRenderer=EY,AY.Lexer=wY,AY.lexer=wY.lex,AY.Tokenizer=CY,AY.Hooks=OY,AY.parse=AY,AY.options,AY.setOptions,AY.use,AY.walkTokens,AY.parseInline,DY.parse,wY.lex;var jY=`modulepreload`,MY=function(e,t){return new URL(e,t).href},NY={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=MY(t,n),t=s(t),t in NY)return;NY[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:jY,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},PY=300,FY=`300px`,IY=500;function LY(e={}){let{immediate:t=!1,debounceDelay:n=PY,rootMargin:r=FY,idleTimeout:i=IY}=e,[a,o]=(0,V.useState)(!1),s=(0,V.useRef)(null),c=(0,V.useRef)(null),l=(0,V.useRef)(null),u=(0,V.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,V.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,V.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,V.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var RY=/\s/,zY=/^\s+$/,BY=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),VY=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,HY=e=>e.some(e=>VY(e)&&BY.has(e.tagName)),UY=e=>{let t=[],n=``,r=!1;for(let i of e){let e=RY.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},WY=e=>{let t=[],n=``;for(let r of e)RY.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},GY=(e,t,n,r,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},KY=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&`children`in a))return;if(HY(t))return Ak;let o=a,s=o.children.indexOf(e);if(s===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let l=n.sep===`char`?WY(c):UY(c),u=r.prevContentLength,d=l.map(e=>{let t=i.count;if(i.count+=e.length,zY.test(e))return{type:`text`,value:e};let r=u>0&&t<u,a=r?0:i.newIndex++*n.stagger;return GY(e,n.animation,n.duration,n.easing,r,a)});return o.children.splice(s,1,...d),s+d.length},qY=0;function JY(e){let t={animation:e?.animation??`fadeIn`,duration:e?.duration??150,easing:e?.easing??`ease`,sep:e?.sep??`word`,stagger:e?.stagger??40},n={prevContentLength:0,lastRenderCharCount:0},r=qY++,i=()=>e=>{let r={count:0,newIndex:0};jk(e,`text`,(e,i)=>KY(e,i,t,n,r)),n.lastRenderCharCount=r.count,n.prevContentLength=0};return Object.defineProperty(i,"name",{value:`rehypeAnimate$${r}`}),{name:`animate`,type:`animate`,rehypePlugin:i,setPrevContentLength(e){n.prevContentLength=e},getLastRenderCharCount(){let e=n.lastRenderCharCount;return n.lastRenderCharCount=0,e}}}JY();var YY=(0,V.createContext)(!1),XY=()=>(0,V.useContext)(YY),ZY=(...e)=>KW(vU(e)),QY=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},$Y=e=>e?(...t)=>QY(e,KW(vU(t))):ZY,eX=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},tX=(0,V.createContext)(ZY),nX=()=>(0,V.useContext)(tX),rX=ZY(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-6`,`before:mr-4`,`before:text-[13px]`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),iX=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},aX=(0,V.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...o})=>{let s=nX(),c=(0,V.useMemo)(()=>s(rX),[s]),l=(0,V.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,iX(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,B.jsx)(`div`,{className:s(r,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,...o,children:(0,B.jsx)(`pre`,{className:s(r,`bg-[var(--sdm-bg,inherit]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]`),style:l,children:(0,B.jsx)(`code`,{className:a?s(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((e,t)=>(0,B.jsx)(`span`,{className:a?c:void 0,children:e.length===0||e.length===1&&e[0].content===``?`
|
|
219
|
-
`:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,B.jsx)(`span`,{className:s(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),oX=({className:e,language:t,style:n,isIncomplete:r,...i})=>(0,B.jsx)(`div`,{className:nX()(`my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...n},...i}),sX=(0,V.createContext)({code:``}),cX=()=>(0,V.useContext)(sX),lX=({language:e})=>{let t=nX();return(0,B.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,B.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},uX=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
220
|
-
`;)t--;return e.slice(0,t)},dX=(0,V.lazy)(()=>$(()=>import(`./highlighted-body-OFNGDK62-DB3-I0_d.js`).then(e=>({default:e.HighlightedCodeBlockBody})),[],import.meta.url)),fX=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=nX(),l=(0,V.useMemo)(()=>uX(e),[e]),u=(0,V.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:l.split(`
|
|
221
|
-
`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,B.jsx)(sX.Provider,{value:{code:e},children:(0,B.jsxs)(oX,{isIncomplete:i,language:t,children:[(0,B.jsx)(lX,{language:t}),r?(0,B.jsx)(`div`,{className:c(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,B.jsx)(`div`,{className:c(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`code-block-actions`,children:r})}):null,(0,B.jsx)(V.Suspense,{fallback:(0,B.jsx)(aX,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,B.jsx)(dX,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},pX={CheckIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),CopyIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),DownloadIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),ExternalLinkIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Loader2Icon:e=>(0,B.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,B.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),RotateCcwIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),XIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomInIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomOutIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})})},mX=(0,V.createContext)(pX),hX=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>e[n]===t[n]):!1},gX=({icons:e,children:t})=>{let n=(0,V.useRef)(e),r=(0,V.useRef)(e?{...pX,...e}:pX);hX(n.current,e)||(n.current=e,r.current=e?{...pX,...e}:pX);let i=r.current;return(0,B.jsx)(mX.Provider,{value:i,children:t})},_X=()=>(0,V.useContext)(mX),vX={copyCode:`Copy Code`,downloadFile:`Download file`,downloadDiagram:`Download diagram`,downloadDiagramAsSvg:`Download diagram as SVG`,downloadDiagramAsPng:`Download diagram as PNG`,downloadDiagramAsMmd:`Download diagram as MMD`,viewFullscreen:`View fullscreen`,exitFullscreen:`Exit fullscreen`,mermaidFormatSvg:`SVG`,mermaidFormatPng:`PNG`,mermaidFormatMmd:`MMD`,copyTable:`Copy table`,copyTableAsMarkdown:`Copy table as Markdown`,copyTableAsCsv:`Copy table as CSV`,copyTableAsTsv:`Copy table as TSV`,downloadTable:`Download table`,downloadTableAsCsv:`Download table as CSV`,downloadTableAsMarkdown:`Download table as Markdown`,tableFormatMarkdown:`Markdown`,tableFormatCsv:`CSV`,tableFormatTsv:`TSV`,imageNotAvailable:`Image not available`,downloadImage:`Download image`,openExternalLink:`Open external link?`,externalLinkWarning:`You're about to visit an external website.`,close:`Close`,copyLink:`Copy link`,copied:`Copied`,openLink:`Open link`},yX=(0,V.createContext)(vX),bX=()=>(0,V.useContext)(yX),xX=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=nX(),[c,l]=(0,V.useState)(!1),u=(0,V.useRef)(0),{code:d}=cX(),{isAnimating:f}=(0,V.useContext)(DQ),p=bX(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,V.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=_X(),_=c?g.CheckIcon:g.CopyIcon;return(0,B.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:f,onClick:h,title:p.copyCode,type:`button`,...o,children:r??(0,B.jsx)(_,{size:14})})},SX={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},CX=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=nX(),{code:c}=cX(),{isAnimating:l}=(0,V.useContext)(DQ),u=bX(),d=_X(),f=a??c,p=`file.${n&&n in SX?SX[n]:`txt`}`;return(0,B.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:()=>{try{eX(p,f,`text/plain`),e?.()}catch(e){t?.(e)}},title:u.downloadFile,type:`button`,...o,children:r??(0,B.jsx)(d.DownloadIcon,{size:14})})},wX=()=>{let{Loader2Icon:e}=_X(),t=nX();return(0,B.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,B.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,B.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,B.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},TX=/\.[^/.]+$/,EX=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=_X(),c=nX(),l=(0,V.useRef)(null),[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(!1),m=bX(),h=o.width!=null||o.height!=null,g=(u||h)&&!f,_=f&&!h;(0,V.useEffect)(()=>{let e=l.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;d(t),p(!t)}},[]);let v=(0,V.useCallback)(e=>{d(!0),p(!1),i?.(e)},[i]),y=(0,V.useCallback)(e=>{d(!1),p(!0),a?.(e)},[a]),b=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(TX,``)}.${i}`}eX(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,B.jsxs)(`div`,{className:c(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,B.jsx)(`img`,{alt:r,className:c(`max-w-full rounded-lg`,_&&`hidden`,t),"data-streamdown":`image`,onError:y,onLoad:v,ref:l,src:n,...o}),_&&(0,B.jsx)(`span`,{className:c(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:m.imageNotAvailable}),(0,B.jsx)(`div`,{className:c(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`)}),g&&(0,B.jsx)(`button`,{className:c(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:b,title:m.downloadImage,type:`button`,children:(0,B.jsx)(s,{size:14})})]}):null},DX=0,OX=()=>{DX+=1,DX===1&&(document.body.style.overflow=`hidden`)},kX=()=>{DX=Math.max(0,DX-1),DX===0&&(document.body.style.overflow=``)},AX=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=_X(),c=nX(),[l,u]=(0,V.useState)(!1),d=bX(),f=(0,V.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),p=(0,V.useCallback)(()=>{r(),n()},[r,n]);return(0,V.useEffect)(()=>{if(t){OX();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kX()}}},[t,n]),t?(0,B.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,B.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,B.jsx)(`button`,{className:c(`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:n,title:d.close,type:`button`,children:(0,B.jsx)(s,{size:16})}),(0,B.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,B.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,B.jsx)(o,{size:20}),(0,B.jsx)(`span`,{children:d.openExternalLink})]}),(0,B.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,B.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,B.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,B.jsx)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`),onClick:f,type:`button`,children:l?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(i,{size:14}),(0,B.jsx)(`span`,{children:d.copied})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(a,{size:14}),(0,B.jsx)(`span`,{children:d.copyLink})]})}),(0,B.jsxs)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`),onClick:p,type:`button`,children:[(0,B.jsx)(o,{size:14}),(0,B.jsx)(`span`,{children:d.openLink})]})]})]})}):null},jX=(0,V.createContext)(null),MX=()=>(0,V.useContext)(jX),NX=()=>MX()?.code??null,PX=()=>MX()?.mermaid??null,FX=e=>{var t;let n=MX();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},IX=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),LX=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=nX(),[s,c]=(0,V.useState)(!1),l=(0,V.useRef)(null),{isAnimating:u}=(0,V.useContext)(DQ),d=_X(),f=PX(),p=bX(),m=async t=>{try{if(t===`mmd`){eX(`diagram.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!f){a?.(Error(`Mermaid plugin not available`));return}let n=f.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){eX(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){eX(`diagram.png`,await IX(l),`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,V.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,B.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,B.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:p.downloadDiagram,type:`button`,children:t??(0,B.jsx)(d.DownloadIcon,{size:14})}),s?(0,B.jsxs)(`div`,{className:o(`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,B.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`svg`),title:p.downloadDiagramAsSvg,type:`button`,children:p.mermaidFormatSvg}),(0,B.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`png`),title:p.downloadDiagramAsPng,type:`button`,children:p.mermaidFormatPng}),(0,B.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`mmd`),title:p.downloadDiagramAsMmd,type:`button`,children:p.mermaidFormatMmd})]}):null]})},RX=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=_X(),c=nX(),[l,u]=(0,V.useState)(!1),{isAnimating:d,controls:f}=(0,V.useContext)(DQ),p=bX(),m=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),h=()=>{u(!l)};return(0,V.useEffect)(()=>{if(l){OX();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kX()}}},[l]),(0,V.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:h,title:p.viewFullscreen,type:`button`,...a,children:(0,B.jsx)(o,{size:14})}),l?(0,Qt.createPortal)((0,B.jsxs)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),onClick:h,onKeyDown:e=>{e.key===`Escape`&&h()},role:`button`,tabIndex:0,children:[(0,B.jsx)(`button`,{className:c(`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:h,title:p.exitFullscreen,type:`button`,children:(0,B.jsx)(s,{size:20})}),(0,B.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,B.jsx)(jQ,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},zX=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},BX=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===`
|
|
222
|
-
`)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(`
|
|
223
|
-
`)},VX=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
|
|
224
|
-
`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
|
|
225
|
-
`?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(`
|
|
226
|
-
`)},HX=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},UX=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>HX(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;e<t.length;e+=1)a[e]=`---`;r[i]=`| ${a.join(` | `)} |`,i+=1;for(let e of n)if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?HX(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else r[i]=`| ${e.map(e=>HX(e)).join(` | `)} |`,i+=1;return r.join(`
|
|
227
|
-
`)},WX=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=nX(),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(!1),u=(0,V.useRef)(null),d=(0,V.useRef)(0),{isAnimating:f}=(0,V.useContext)(DQ),p=bX(),m=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=zX(t),o=({csv:BX,tsv:VX,md:UX}[e]||UX)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,V.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let h=_X(),g=c?h.CheckIcon:h.CopyIcon;return(0,B.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,B.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>s(!o),title:p.copyTable,type:`button`,children:e??(0,B.jsx)(g,{height:14,width:14})}),o?(0,B.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`md`),title:p.copyTableAsMarkdown,type:`button`,children:p.tableFormatMarkdown}),(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`csv`),title:p.copyTableAsCsv,type:`button`,children:p.tableFormatCsv}),(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`tsv`),title:p.copyTableAsTsv,type:`button`,children:p.tableFormatTsv})]}):null]})},GX=({children:e,className:t,onDownload:n,onError:r})=>{let i=nX(),[a,o]=(0,V.useState)(!1),s=(0,V.useRef)(null),{isAnimating:c}=(0,V.useContext)(DQ),l=bX(),u=_X(),d=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=zX(t),a=e===`csv`?BX(i):UX(i);eX(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,V.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,B.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,B.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,B.jsx)(u.DownloadIcon,{size:14})}),a?(0,B.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,B.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,B.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},KX=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=_X(),o=nX(),[s,c]=(0,V.useState)(!1),{isAnimating:l}=(0,V.useContext)(DQ),u=bX(),d=()=>{c(!0)},f=()=>{c(!1)};return(0,V.useEffect)(()=>{if(s){OX();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),kX()}}},[s]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:d,title:u.viewFullscreen,type:`button`,children:(0,B.jsx)(i,{size:14})}),s?(0,Qt.createPortal)((0,B.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`dialog`,children:(0,B.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,B.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,B.jsx)(WX,{}):null,r?(0,B.jsx)(GX,{}):null,(0,B.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:f,title:u.exitFullscreen,type:`button`,children:(0,B.jsx)(a,{size:20})})]}),(0,B.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,B.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},qX=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=nX(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,B.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,B.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,B.jsx)(WX,{}):null,l?(0,B.jsx)(GX,{}):null,u?(0,B.jsx)(KX,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,B.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,B.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},JX=/startLine=(\d+)/,YX=/\bnoLineNumbers\b/,XX=(0,V.lazy)(()=>$(()=>import(`./mermaid-GHXKKRXX-UMXpy7w5.js`).then(e=>({default:e.Mermaid})),[],import.meta.url)),ZX=/language-([^\s]+)/;function QX(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function $X(e,t){return e.className===t.className&&QX(e.node,t.node)}var eZ=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,tZ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},nZ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},rZ=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},iZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`ol`,{className:nX()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>$X(e,t));iZ.displayName=`MarkdownOl`;var aZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`li`,{className:nX()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&QX(e.node,t.node));aZ.displayName=`MarkdownLi`;var oZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`ul`,{className:nX()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>$X(e,t));oZ.displayName=`MarkdownUl`;var sZ=(0,V.memo)(({className:e,node:t,...n})=>(0,B.jsx)(`hr`,{className:nX()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>$X(e,t));sZ.displayName=`MarkdownHr`;var cZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`span`,{className:nX()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>$X(e,t));cZ.displayName=`MarkdownStrong`;var lZ=(0,V.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=nX(),{linkSafety:o}=(0,V.useContext)(DQ),[s,c]=(0,V.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,V.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,V.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,V.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,B.jsx)(AX,{...p})]}):(0,B.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>$X(e,t)&&e.href===t.href);lZ.displayName=`MarkdownA`;var uZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h1`,{className:nX()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>$X(e,t));uZ.displayName=`MarkdownH1`;var dZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h2`,{className:nX()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>$X(e,t));dZ.displayName=`MarkdownH2`;var fZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h3`,{className:nX()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>$X(e,t));fZ.displayName=`MarkdownH3`;var pZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h4`,{className:nX()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>$X(e,t));pZ.displayName=`MarkdownH4`;var mZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h5`,{className:nX()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>$X(e,t));mZ.displayName=`MarkdownH5`;var hZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h6`,{className:nX()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>$X(e,t));hZ.displayName=`MarkdownH6`;var gZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,V.useContext)(DQ);return(0,B.jsx)(qX,{className:t,showControls:eZ(i,`table`),showCopy:tZ(i,`copy`),showDownload:tZ(i,`download`),showFullscreen:tZ(i,`fullscreen`),...r,children:e})},(e,t)=>$X(e,t));gZ.displayName=`MarkdownTable`;var _Z=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`thead`,{className:nX()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>$X(e,t));_Z.displayName=`MarkdownThead`;var vZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`tbody`,{className:nX()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>$X(e,t));vZ.displayName=`MarkdownTbody`;var yZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`tr`,{className:nX()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>$X(e,t));yZ.displayName=`MarkdownTr`;var bZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`th`,{className:nX()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>$X(e,t));bZ.displayName=`MarkdownTh`;var xZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`td`,{className:nX()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>$X(e,t));xZ.displayName=`MarkdownTd`;var SZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`blockquote`,{className:nX()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>$X(e,t));SZ.displayName=`MarkdownBlockquote`;var CZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`sup`,{className:nX()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>$X(e,t));CZ.displayName=`MarkdownSup`;var wZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`sub`,{className:nX()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>$X(e,t));wZ.displayName=`MarkdownSub`;var TZ=(0,V.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,V.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,V.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,V.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,V.isValidElement)(e))return e;if(e.type===iZ){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,B.jsx)(`section`,{className:t,...r,children:i}):null}return(0,B.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>$X(e,t));TZ.displayName=`MarkdownSection`;var EZ=(0,V.memo)(({node:e,className:t,children:n,...r})=>{let i=nX(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,V.useContext)(DQ),l=PX(),u=XY(),d=(t?.match(ZX))?.at(1)??``,f=FX(d);if(a)return(0,B.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(JX),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&YX.test(p))&&c!==!1,v=``;if((0,V.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,B.jsx)(V.Suspense,{fallback:(0,B.jsx)(wX,{}),children:(0,B.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=eZ(s,`mermaid`),n=rZ(s,`download`),r=rZ(s,`copy`),a=rZ(s,`fullscreen`),c=rZ(s,`panZoom`),l=e&&(n||r||a);return(0,B.jsx)(V.Suspense,{fallback:(0,B.jsx)(wX,{}),children:(0,B.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,B.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,B.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,B.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,B.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,B.jsx)(LX,{chart:v,config:o?.config}):null,r?(0,B.jsx)(xX,{code:v}):null,a?(0,B.jsx)(RX,{chart:v,config:o?.config}):null]})}):null,(0,B.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,B.jsx)(XX,{chart:v,config:o?.config,showControls:c})})]})})}let y=eZ(s,`code`),b=nZ(s,`download`),x=nZ(s,`copy`);return(0,B.jsx)(fX,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,children:y?(0,B.jsxs)(B.Fragment,{children:[b?(0,B.jsx)(CX,{code:v,language:d}):null,x?(0,B.jsx)(xX,{}):null]}):null})},(e,t)=>e.className===t.className&&QX(e.node,t.node));EZ.displayName=`MarkdownCode`;var DZ=(0,V.memo)(EX,(e,t)=>e.className===t.className&&QX(e.node,t.node));DZ.displayName=`MarkdownImg`;var OZ=(0,V.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,V.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,B.jsx)(B.Fragment,{children:e})}return(0,B.jsx)(`p`,{...n,children:e})},(e,t)=>$X(e,t));OZ.displayName=`MarkdownParagraph`;var kZ={ol:iZ,li:aZ,ul:oZ,hr:sZ,strong:cZ,a:lZ,h1:uZ,h2:dZ,h3:fZ,h4:pZ,h5:mZ,h6:hZ,table:gZ,thead:_Z,tbody:vZ,tr:yZ,th:bZ,td:xZ,blockquote:SZ,code:EZ,img:DZ,pre:({children:e})=>(0,V.isValidElement)(e)?(0,V.cloneElement)(e,{"data-block":`true`}):e,sup:CZ,sub:wZ,p:OZ,section:TZ},AZ=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,jZ=/\p{L}/u;function MZ(e){let t=e.replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``);for(let e of t){if(AZ.test(e))return`rtl`;if(jZ.test(e))return`ltr`}return`ltr`}var NZ=/^[ \t]{0,3}(`{3,}|~{3,})/,PZ=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,FZ=e=>{let t=e.split(`
|
|
228
|
-
`),n=null,r=0;for(let e of t){let t=NZ.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},IZ=e=>{let t=e.split(`
|
|
229
|
-
`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&PZ.test(t))return!0}return!1},LZ=()=>e=>{Nk(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},RZ=[],zZ={allowDangerousHtml:!0},BZ=new WeakMap,VZ=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=BZ.get(e);n||(n=e.name,BZ.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=BZ.get(r);e||(e=r.name,BZ.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},HZ=e=>{let t=UZ(e),n=e.children||``;return XZ(t.runSync(t.parse(n),n),e)},UZ=e=>{let t=VZ.get(e);if(t)return t;let n=GZ(e);return VZ.set(e,n),n},WZ=e=>e.some(e=>Array.isArray(e)?e[0]===aI:e===aI),GZ=e=>{let t=e.rehypePlugins||RZ,n=e.remarkPlugins||RZ,r=WZ(t)?n:[...n,LZ],i=e.remarkRehypeOptions?{...zZ,...e.remarkRehypeOptions}:zZ;return Gq().use(EK).use(r).use(_q,i).use(t)},KZ=e=>e,qZ=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},JZ=(e,t)=>{for(let n in LG)if(Object.hasOwn(LG,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=LG[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},YZ=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},XZ=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||KZ;Nk(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return qZ(c,s,a,e.value),s;if(e.type===`element`&&(JZ(e,t),YZ(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return hG(e,{Fragment:B.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0})},ZZ=/\[\^[\w-]{1,200}\](?!:)/,QZ=/\[\^[\w-]{1,200}\]:/,$Z=/<(\w+)[\s>]/,eQ=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),tQ=new Map,nQ=new Map,rQ=e=>{let t=e.toLowerCase(),n=tQ.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return tQ.set(t,r),r},iQ=e=>{let t=e.toLowerCase(),n=nQ.get(t);if(n)return n;let r=RegExp(`</${t}(?=[\\s>])[^>]*>`,`gi`);return nQ.set(t,r),r},aQ=(e,t)=>{if(eQ.has(t.toLowerCase()))return 0;let n=e.match(rQ(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},oQ=(e,t)=>{let n=e.match(iQ(t));return n?n.length:0},sQ=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]===`$`&&e[n+1]===`$`&&(t+=1,n+=1);return t},cQ=e=>{let t=ZZ.test(e),n=QZ.test(e);if(t||n)return[e];let r=wY.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){i[n-1]+=t;let e=a.at(-1),r=aQ(t,e),o=oQ(t,e);for(let t=0;t<r;t+=1)a.push(e);for(let t=0;t<o;t+=1)a.length>0&&a.at(-1)===e&&a.pop();continue}if(e.type===`html`&&e.block){let e=t.match($Z);if(e){let n=e[1];aQ(t,n)>oQ(t,n)&&a.push(n)}}if(n>0&&!o){let e=i[n-1];if(sQ(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},lQ=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>{if(!n.includes(`
|
|
230
|
-
|
|
231
|
-
`))return t+n+r;let i=n.replace(/\n\n/g,`
|
|
232
|
-
<!---->
|
|
233
|
-
`);return`${t}${(i.startsWith(`
|
|
234
|
-
`)?``:`
|
|
235
|
-
`)+i+(i.endsWith(`
|
|
236
|
-
`)?``:`
|
|
237
|
-
`)}${r}
|
|
238
|
-
|
|
239
|
-
`})}return n},uQ=/([\\`*_~[\]|])/g,dQ=e=>e.replace(uQ,`\\$1`),fQ=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+dQ(n).replace(/\n\n/g,` `)+r)}return n},pQ=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(pQ).join(``):``,mQ=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));Nk(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=pQ(e);e.children=t?[{type:`text`,value:t}]:[]}})},hQ=()=>e=>{Nk(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},gQ=/^[ \t]*<[\w!/?-]/,_Q=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,vQ=e=>typeof e!=`string`||e.length===0||!gQ.test(e)?e:e.replace(_Q,`$1`),yQ={...sI,protocols:{...sI.protocols,href:[...sI.protocols?.href??[],`tel`]},attributes:{...sI.attributes,code:[...sI.attributes?.code??[],`metastring`]}},bQ={raw:aI,sanitize:[wI,yQ],harden:[Fk,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},xQ={gfm:[LV,{}],codeMeta:hQ},SQ=Object.values(bQ),CQ=Object.values(xQ),wQ={block:` ▋`,circle:` ●`},TQ=[`github-light`,`github-dark`],EQ={enabled:!0},DQ=(0,V.createContext)({shikiTheme:TQ,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:EQ}),OQ=(0,V.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?vQ(e):e,l=(0,B.jsx)(HZ,{...s,children:c});return(0,B.jsx)(YY.Provider,{value:i,children:a?(0,B.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});OQ.displayName=`Block`;var kQ=(0,V.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=SQ,remarkPlugins:s=CQ,className:c,shikiTheme:l=TQ,mermaid:u,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:m=OQ,parseMarkdownIntoBlocksFn:h=cQ,caret:g,plugins:_,remend:v,linkSafety:y=EQ,lineNumbers:b=!0,allowedTags:x,literalTagContent:S,translations:C,icons:w,prefix:T,onAnimationStart:E,onAnimationEnd:D,...O})=>{let k=(0,V.useId)(),[A,j]=(0,V.useTransition)(),M=(0,V.useMemo)(()=>$Y(T),[T]),N=(0,V.useRef)(null),P=(0,V.useRef)(E),ee=(0,V.useRef)(D);P.current=E,ee.current=D,(0,V.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=N.current;if(N.current=f,i===null){f&&((e=P.current)==null||e.call(P));return}f&&!i?(n=P.current)==null||n.call(P):!f&&i&&((r=ee.current)==null||r.call(ee))},[f,t]);let F=(0,V.useMemo)(()=>x?Object.keys(x):[],[x]),te=(0,V.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?gU(e,v):e;return S&&S.length>0&&(n=fQ(n,S)),F.length>0&&(n=lQ(n,F)),n},[e,t,r,v,F,S]),I=(0,V.useMemo)(()=>h(te),[te,h]),[L,ne]=(0,V.useState)(I);(0,V.useEffect)(()=>{t===`streaming`&&!ae?j(()=>{ne(I)}):ne(I)},[I,t]);let R=t===`streaming`?L:I,re=(0,V.useMemo)(()=>n===`auto`?R.map(MZ):void 0,[R,n]),z=(0,V.useMemo)(()=>R.map((e,t)=>`${k}-${t}`),[R.length,k]),ie=(0,V.useMemo)(()=>p===!0?`true`:p?JSON.stringify(p):``,[p]),ae=(0,V.useMemo)(()=>ie?ie===`true`?JY():JY(p):null,[ie]),oe=(0,V.useMemo)(()=>({shikiTheme:(_?.code)?.getThemes()??l,controls:d,isAnimating:f,lineNumbers:b,mode:t,mermaid:u,linkSafety:y}),[l,d,f,b,t,u,y,_?.code]),se=(0,V.useMemo)(()=>({...vX,...C}),[(0,V.useMemo)(()=>C?JSON.stringify(C):``,[C])]),ce=(0,V.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...kZ,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,V.createElement)(t,n):null:(0,V.createElement)(e,n)}return n},[a]),le=(0,V.useMemo)(()=>{let e=[];return _!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsBefore]),e=[...e,...s],_!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(e=[...e,_.math.remarkPlugin]),e},[s,_?.math,_?.cjk]),ue=(0,V.useMemo)(()=>{let e=o;if(x&&Object.keys(x).length>0&&o===SQ){let t={...yQ,tagNames:[...yQ.tagNames??[],...Object.keys(x)],attributes:{...yQ.attributes,...x}};e=[bQ.raw,[wI,t],bQ.harden]}return S&&S.length>0&&(e=[...e,[mQ,S]]),_!=null&&_.math&&(e=[...e,_.math.rehypePlugin]),ae&&f&&(e=[...e,ae.rehypePlugin]),e},[o,_?.math,ae,f,x,S]),de=(0,V.useMemo)(()=>{if(!f||R.length===0)return!1;let e=R.at(-1);return FZ(e)||IZ(e)},[f,R]),fe=(0,V.useMemo)(()=>g&&f&&!de?{"--streamdown-caret":`"${wQ[g]}"`}:void 0,[g,f,de]);return t===`static`?(0,B.jsx)(yX.Provider,{value:se,children:(0,B.jsx)(jX.Provider,{value:_??null,children:(0,B.jsx)(DQ.Provider,{value:oe,children:(0,B.jsx)(gX,{icons:w,children:(0,B.jsx)(tX.Provider,{value:M,children:(0,B.jsx)(`div`,{className:M(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?MZ(te):n,children:(0,B.jsx)(HZ,{components:ce,rehypePlugins:ue,remarkPlugins:le,...O,children:te})})})})})})}):(0,B.jsx)(yX.Provider,{value:se,children:(0,B.jsx)(jX.Provider,{value:_??null,children:(0,B.jsx)(DQ.Provider,{value:oe,children:(0,B.jsx)(gX,{icons:w,children:(0,B.jsx)(tX.Provider,{value:M,children:(0,B.jsxs)(`div`,{className:M(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,g&&!de?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:fe,children:[R.length===0&&g&&f&&(0,B.jsx)(`span`,{}),R.map((e,t)=>{let a=t===R.length-1,o=f&&a&&FZ(e);return(0,B.jsx)(m,{animatePlugin:ae,components:ce,content:e,dir:re?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:ue,remarkPlugins:le,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...O},z[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);kQ.displayName=`Streamdown`;var AQ=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=_X(),d=nX(),f=(0,V.useRef)(null),p=(0,V.useRef)(null),[m,h]=(0,V.useState)(o),[g,_]=(0,V.useState)({x:0,y:0}),[v,y]=(0,V.useState)(!1),[b,x]=(0,V.useState)({x:0,y:0}),[S,C]=(0,V.useState)({x:0,y:0}),w=(0,V.useCallback)(e=>{h(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),T=(0,V.useCallback)(()=>{w(i)},[w,i]),E=(0,V.useCallback)(()=>{w(-i)},[w,i]),D=(0,V.useCallback)(()=>{h(o),_({x:0,y:0})},[o]),O=(0,V.useCallback)(e=>{e.preventDefault(),w(e.deltaY>0?-i:i)},[w,i]),k=(0,V.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;y(!0),x({x:e.clientX,y:e.clientY}),C(g);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[g]),A=(0,V.useCallback)(e=>{if(!v)return;e.preventDefault();let t=e.clientX-b.x,n=e.clientY-b.y;_({x:S.x+t,y:S.y+n})},[v,b,S]),j=(0,V.useCallback)(e=>{y(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,V.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(`wheel`,O,{passive:!1}),()=>{e.removeEventListener(`wheel`,O)}},[O]),(0,V.useEffect)(()=>{let e=p.current;if(e&&v)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,A,{passive:!1}),e.addEventListener(`pointerup`,j),e.addEventListener(`pointercancel`,j),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,A),e.removeEventListener(`pointerup`,j),e.removeEventListener(`pointercancel`,j)}},[v,A,j]),(0,B.jsxs)(`div`,{className:d(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:f,style:{cursor:v?`grabbing`:`grab`},children:[a?(0,B.jsxs)(`div`,{className:d(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m>=r,onClick:T,title:`Zoom in`,type:`button`,children:(0,B.jsx)(l,{size:16})}),(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m<=n,onClick:E,title:`Zoom out`,type:`button`,children:(0,B.jsx)(u,{size:16})}),(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:D,title:`Reset zoom and pan`,type:`button`,children:(0,B.jsx)(c,{size:16})})]}):null,(0,B.jsx)(`div`,{className:d(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:k,ref:p,role:`application`,style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},jQ=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=nX(),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(!1),[u,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(``),[m,h]=(0,V.useState)(0),{mermaid:g}=(0,V.useContext)(DQ),_=PX(),v=g?.errorComponent,{shouldRender:y,containerRef:b}=LY({immediate:r});if((0,V.useEffect)(()=>{if(y){if(!_){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=_.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){f||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,m,y,_]),!(y||u||f))return(0,B.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:b});if(c&&!u&&!f)return(0,B.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:b,children:(0,B.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,B.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,B.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!f)return v?(0,B.jsx)(`div`,{ref:b,children:(0,B.jsx)(v,{chart:e,error:o,retry:()=>h(e=>e+1)})}):(0,B.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:b,children:[(0,B.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,B.jsxs)(`details`,{className:a(`mt-2`),children:[(0,B.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,B.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let x=u||f;return(0,B.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,B.jsx)(AQ,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,B.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})},MQ=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function NQ(e){return PQ(e)}function PQ(e){return Array.isArray(e)?FQ(e):e instanceof RegExp?e:typeof e==`object`?IQ(e):e}function FQ(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=PQ(e[n]);return t}function IQ(e){let t={};for(let n in e)t[n]=PQ(e[n]);return t}function LQ(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function RQ(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?RQ(e.substring(0,e.length-1)):e.substr(~t+1)}var zQ=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,BQ=class{static hasCaptures(e){return e===null?!1:(zQ.lastIndex=0,zQ.test(e))}static replaceCaptures(e,t,n){return e.replace(zQ,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function VQ(e,t){return e<t?-1:+(e>t)}function HQ(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=VQ(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function UQ(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function WQ(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var GQ=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},KQ=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ZQ(e),t)}static createFromParsedTheme(e,t){return e$(e,t)}_cachedMatchRoot=new GQ(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>JQ(e.parent,t.parentScopes));return n?new XQ(n.fontStyle,n.foreground,n.background):null}},qQ=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function JQ(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!YQ(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function YQ(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var XQ=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ZQ(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&UQ(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&UQ(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new QQ(l,u,e,o,s,c)}}return n}var QQ=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},$Q=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))($Q||{});function e$(e,t){e.sort((e,t)=>{let n=VQ(e.scope,t.scope);return n!==0||(n=HQ(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new t$(t),o=new XQ(n,a.getId(r),a.getId(i)),s=new i$(new r$(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new KQ(a,o,s)}var t$=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},n$=Object.freeze([]),r$=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||n$,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},i$=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),r$.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(HQ(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new r$(e,t,n,r,i))}},a$=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=s$(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function o$(e){return e}function s$(e){return e}function c$(e,t){let n=[],r=u$(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(l$(i)){let e=[];do e.push(i),i=r.next();while(l$(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function l$(e){return!!e&&!!e.match(/[\w\.:]+/)}function u$(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function d$(e){typeof e.dispose==`function`&&e.dispose()}var f$=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},p$=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},m$=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},h$=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new f$(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new m$;for(let n of e)g$(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof f$){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function g$(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof f$?v$({baseGrammar:a,selfGrammar:i},r):_$(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new f$(e))}function _$(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];y$([r],t,n)}}function v$(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&y$(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&y$(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function y$(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?LQ({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&y$(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=T$(i);switch(a.kind){case 0:v$({...t,selfGrammar:t.baseGrammar},n);break;case 1:v$(t,n);break;case 2:_$(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?_$(a.ruleName,i,n):v$(i,n)}else a.kind===4?n.add(new p$(a.scopeName,a.ruleName)):n.add(new f$(a.scopeName));break}}}var b$=class{kind=0},x$=class{kind=1},S$=class{constructor(e){this.ruleName=e}kind=2},C$=class{constructor(e){this.scopeName=e}kind=3},w$=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function T$(e){if(e===`$base`)return new b$;if(e===`$self`)return new x$;let t=e.indexOf(`#`);return t===-1?new C$(e):t===0?new S$(e.substring(1)):new w$(e.substring(0,t),e.substring(t+1))}var E$=/\\(\d+)/,D$=/\\(\d+)/g,O$=-1,k$=-2;function A$(e){return e}function j$(e){return e}var M$=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=BQ.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=BQ.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${RQ(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:BQ.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:BQ.replaceCaptures(this._contentName,e,t)}},N$=class extends M${retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},P$=class extends M${_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new z$(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new B$,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},F$=class extends M${hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new B$,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},I$=class extends M${_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new z$(i,this.id),this.beginCaptures=a,this._end=new z$(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new B$;for(let t of this.patterns)e.getRule(t).collectPatterns(e,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,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},L$=class extends M${_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new z$(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new z$(o,k$),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(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new B$;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new B$,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},R$=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new N$(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new P$(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=LQ({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new F$(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new L$(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new I$(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=T$(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof F$||e instanceof I$||e instanceof L$)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},z$=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=E$.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return D$.lastIndex=0,this.source.replace(D$,(e,t)=>WQ(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},B$=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(),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(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new V$(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new V$(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},V$=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
240
|
-
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},H$=class{constructor(e,t){this.languageId=e,this.tokenType=t}},U$=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new H$(e,8),this._embeddedLanguagesMatcher=new W$(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new H$(0,0);_getBasicScopeAttributes=new GQ(e=>new H$(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},W$=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>WQ(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var G$=!1,K$=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function q$(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=J$(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new K$(i,!0);f()}return new K$(i,!1);function f(){let o=Y$(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===O$){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),t1(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof I$){let r=o;t1(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof L$){let r=o;t1(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(t1(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function J$(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof L$&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=$$(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==k$){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),t1(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Y$(e,t,n,r,i,a){let o=X$(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Z$(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function X$(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Q$(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Z$(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Q$(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Q$(e,t,n,r,i){return G$?{ruleScanner:e.compile(t,n),findOptions:e1(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function $$(e,t,n,r,i){return G$?{ruleScanner:e.compileWhile(t,n),findOptions:e1(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function e1(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function t1(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));q$(e,p,n&&d.start===0,d.start,f,i,!1,0),d$(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new n1(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var n1=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function r1(e,t,n,r,i,a,o,s){return new s1(e,t,n,r,i,a,o,s)}function i1(e,t,n,r,i){let a=c$(t,a1),o=R$.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function a1(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(o1(t[r],e))return n=r+1,!0;return!1})}function o1(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var s1=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new U$(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=c1(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=c$(e,a1);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)i1(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&i1(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(A$(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[j$(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=c1(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=R$.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===u1.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=a$.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?l1.createRootAndLookUpScopeName(a,r,this):l1.createRoot(`unknown`,r),t=new u1(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
241
|
-
`;let a=this.createOnigString(e),o=a.content.length,s=new f1(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=q$(this,a,i,0,t,s,!0,r);return d$(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function c1(e,t){return e=NQ(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var l1=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=qQ.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new qQ(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new qQ(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),a$.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},u1=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?l1.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:j$(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=l1.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,A$(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,l1.fromExtension(r,n.contentNameScopesList))}},d1=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):c$(e,a1).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>c$(e,a1).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},f1=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=a$.set(n,0,o$(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=a$.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},p1=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,r1(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},m1=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new p1(KQ.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(KQ.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new d1(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new h$(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},h1=u1.NULL,g1=/["&'<>`]/g,_1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v1=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,y1=/[|\\{}()[\]^$+*?.]/g,b1=new WeakMap;function x1(e,t){if(e=e.replace(t.subset?S1(t.subset):g1,r),t.subset||t.escapeOnly)return e;return e.replace(_1,n).replace(v1,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function S1(e){let t=b1.get(e);return t||(t=C1(e),b1.set(e,t)),t}function C1(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(y1,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var w1=/[\dA-Fa-f]/;function T1(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!w1.test(String.fromCharCode(t))?r:r+`;`}var E1=/\d/;function D1(e,t,n){let r=`&#`+String(e);return n&&t&&!E1.test(String.fromCharCode(t))?r:r+`;`}var O1=`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`.split(`.`),k1={nbsp:`\xA0`,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:`€`},A1=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],j1={}.hasOwnProperty,M1={},N1;for(N1 in k1)j1.call(k1,N1)&&(M1[k1[N1]]=N1);var P1=/[^\dA-Za-z]/;function F1(e,t,n,r){let i=String.fromCharCode(e);if(j1.call(M1,i)){let e=M1[i],a=`&`+e;return n&&O1.includes(e)&&!A1.includes(e)&&(!r||t&&t!==61&&P1.test(String.fromCharCode(t)))?a:a+`;`}return``}function I1(e,t,n){let r=T1(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=F1(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=D1(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function L1(e,t){return x1(e,Object.assign({format:I1},t))}var R1=/^>|^->|<!--|-->|--!>|<!-$/g,z1=[`>`],B1=[`<`,`>`];function V1(e,t,n,r){return r.settings.bogusComments?`<?`+L1(e.value,Object.assign({},r.settings.characterReferences,{subset:z1}))+`>`:`<!--`+e.value.replace(R1,i)+`-->`;function i(e){return L1(e,Object.assign({},r.settings.characterReferences,{subset:B1}))}}function H1(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var U1=K1(1),W1=K1(-1),G1=[];function K1(e){return t;function t(t,n,r){let i=t?t.children:G1,a=(n||0)+e,o=i[a];if(!r)for(;o&&QW(o);)a+=e,o=i[a];return o}}var q1={}.hasOwnProperty;function J1(e){return t;function t(t,n,r){return q1.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Y1=J1({body:Q1,caption:X1,colgroup:X1,dd:n0,dt:t0,head:X1,html:Z1,li:e0,optgroup:i0,option:a0,p:$1,rp:r0,rt:r0,tbody:s0,td:u0,tfoot:c0,th:u0,thead:o0,tr:l0});function X1(e,t,n){let r=U1(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&QW(r.value.charAt(0)))}function Z1(e,t,n){let r=U1(n,t);return!r||r.type!==`comment`}function Q1(e,t,n){let r=U1(n,t);return!r||r.type!==`comment`}function $1(e,t,n){let r=U1(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function e0(e,t,n){let r=U1(n,t);return!r||r.type===`element`&&r.tagName===`li`}function t0(e,t,n){let r=U1(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function n0(e,t,n){let r=U1(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function r0(e,t,n){let r=U1(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function i0(e,t,n){let r=U1(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function a0(e,t,n){let r=U1(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function o0(e,t,n){let r=U1(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function s0(e,t,n){let r=U1(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function c0(e,t,n){return!U1(n,t)}function l0(e,t,n){let r=U1(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function u0(e,t,n){let r=U1(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var d0=J1({body:m0,colgroup:h0,head:p0,html:f0,tbody:g0});function f0(e){let t=U1(e,-1);return!t||t.type!==`comment`}function p0(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function m0(e){let t=U1(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&QW(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function h0(e,t,n){let r=W1(n,t),i=U1(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Y1(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function g0(e,t,n){let r=W1(n,t),i=U1(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Y1(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var _0={name:[[`
|
|
242
|
-
\f\r &/=>`.split(``),`
|
|
243
|
-
\f\r "&'/=>\``.split(``)],[`\0
|
|
244
|
-
\f\r "&'/<=>`.split(``),`\0
|
|
245
|
-
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
246
|
-
\f\r &>`.split(``),`\0
|
|
247
|
-
\f\r "&'<=>\``.split(``)],[`\0
|
|
248
|
-
\f\r "&'<=>\``.split(``),`\0
|
|
249
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function v0(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=RA);let l=y0(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!d0(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Y1(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function y0(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=b0(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function b0(e,t,n){let r=PA(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=L1(r.attribute,Object.assign({},e.settings.characterReferences,{subset:_0.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?BA:WA)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=L1(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:_0.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&TI(n,o)>TI(n,e.alternative)&&(o=e.alternative),s=o+L1(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?_0.single:_0.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var x0=[`<`,`&`];function S0(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:L1(e.value,Object.assign({},r.settings.characterReferences,{subset:x0}))}function C0(e,t,n,r){return r.settings.allowDangerousHtml?e.value:S0(e,t,n,r)}function w0(e,t,n,r){return r.all(e)}var T0=hj(`type`,{invalid:E0,unknown:D0,handlers:{comment:V1,doctype:H1,element:v0,raw:C0,root:w0,text:S0}});function E0(e){throw Error("Expected node, not `"+e+"`")}function D0(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var O0={},k0={},A0=[];function j0(e,t){let n=t||O0,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:M0,all:N0,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||kj,characterReferences:n.characterReferences||k0,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?RA:LA,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function M0(e,t,n){return T0(e,t,n,this)}function N0(e){let t=[],n=e&&e.children||A0,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function P0(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function F0(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function I0(e){return Array.isArray(e)?e:[e]}async function L0(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function R0(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function z0(e){return e===`ansi`||R0(e)}function B0(e){return e===`none`}function V0(e){return B0(e)}function H0(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function U0(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function W0(e){let t=U0(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function G0(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var K0=`light-dark()`,q0=[`color`,`background-color`];function J0(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Y0(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?J0(e,t):e})):e}function X0(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Z0(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&q0.includes(a))if(r===K0&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new MQ('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Z0(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&$Q.Italic&&(t[`font-style`]=`italic`),e.fontStyle&$Q.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&$Q.Underline&&n.push(`underline`),e.fontStyle&$Q.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Q0(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var $0=new WeakMap;function e2(e,t){$0.set(e,t)}function t2(e){return $0.get(e)}var n2=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(I0(n).map(e=>[e,h1])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return r2(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function r2(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function i2(e,t){if(!(e instanceof n2))throw new MQ(`Invalid grammar state`);return e.getInternalStack(t)}function a2(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new MQ(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new MQ(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new MQ(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=W0(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));o2(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return Y0(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new MQ(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=s2(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new MQ(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new MQ(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&H0(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function o2(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new MQ(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new MQ(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function s2(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(s2).join(``):``}var c2=[a2()];function l2(e){let t=u2(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...c2]}function u2(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var d2=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],f2={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function p2(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function m2(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function h2(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)f2[r]&&t.push({type:`setDecoration`,value:f2[r]});else if(r<=29){let e=f2[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:d2[r-30]}});else if(r===38){let n=m2(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:d2[r-40]}});else if(r===48){let n=m2(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:d2[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:d2[r-100+8]}})}return t}function g2(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=p2(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=h2(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var _2={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 v2(e=_2){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<d2.length;e++)r.push(t(d2[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var y2={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 b2(e,t,n){let r=P0(e,n),i=U0(t),a=v2(Object.fromEntries(d2.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||y2[t]]}))),o=g2();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=F0(i,r),o=F0(o,r),n.decorations.has(`dim`)&&(i=x2(i));let s=$Q.None;return n.decorations.has(`bold`)&&(s|=$Q.Bold),n.decorations.has(`italic`)&&(s|=$Q.Italic),n.decorations.has(`underline`)&&(s|=$Q.Underline),n.decorations.has(`strikethrough`)&&(s|=$Q.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function x2(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function S2(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(R0(i)||B0(r))return U0(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return b2(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new MQ(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new MQ(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return w2(t,s,a,o,n)}function C2(...e){if(e.length===2)return t2(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(R0(i)||B0(a))throw new MQ(`Plain language does not have grammar state`);if(i===`ansi`)throw new MQ(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new n2(T2(n,c,o,s,r).stateStack,c.name,o.name)}function w2(e,t,n,r,i){let a=T2(e,t,n,r,i),o=new n2(a.stateStack,t.name,n.name);return e2(a.tokens,o),a.tokens}function T2(e,t,n,r,i){let a=P0(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=U0(e),l=i.grammarState?i2(i.grammarState,n.name)??h1:i.grammarContextCode==null?h1:T2(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=F0(r[a$.getForeground(s)],a),l=a$.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?E2(t.scopes):D2(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function E2(e){return e.map(e=>({scopeName:e}))}function D2(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:A2(e,i,t.slice(0,r))}}return n}function O2(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function k2(e,t,n){if(!O2(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)O2(e[r],n[i])&&--r,--i;return r===-1}function A2(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(k2(e,t,n)){r.push(a);break}return r}function j2(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=S2(e,t,{...n,theme:r.theme});return{tokens:i,state:t2(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=M2(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new n2(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&e2(o,s),o}function M2(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function N2(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new MQ("`themes` option must not be empty");let p=j2(e,t,n);if(c=t2(p),l&&K0!==l&&!f.find(e=>e.color===l))throw new MQ(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>X0(e,h,u,l,d))),c&&e2(a,c);let g=f.map(e=>P0(e.theme,n));i=P2(f,m,g,u,l,`fg`,d),r=P2(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=P0(n.theme,n);a=S2(e,t,n);let l=e.getTheme(n.theme);r=F0(l.bg,s),i=F0(l.fg,s),o=l.name,c=t2(a)}else throw new MQ("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function P2(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=F0(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===K0&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new MQ('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${F0(t[r][a],n[r])||`inherit`}, ${F0(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function F2(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>F2(e,t,n),codeToTokens:(t,n)=>N2(e,t,n)}){let i=t;for(let e of l2(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=N2(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=L2(a):d===`never`&&(a=R2(a)),f&&(a=z2(a));let p={...r,get source(){return i}};for(let e of l2(n))a=e.tokens?.call(p,a)||a;return I2(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function I2(e,t,n,r=t2(e)){let i=l2(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:H0,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
250
|
-
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Q0(a.htmlStyle||Z0(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&e2(m,r),m}function L2(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&$Q.Underline||i.fontStyle&$Q.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function R2(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function z2(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=Q0(e.htmlStyle||Z0(e)),i=Q0(n.htmlStyle||Z0(n)),a=e.fontStyle&&(e.fontStyle&$Q.Underline||e.fontStyle&$Q.Strikethrough),o=n.fontStyle&&(n.fontStyle&$Q.Underline||n.fontStyle&$Q.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var B2=j0;function V2(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>F2(e,t,n),codeToTokens:(t,n)=>N2(e,t,n)},i=B2(F2(e,t,n,r));for(let e of l2(n))i=e.postprocess?.call(r,i,n)||i;return i}var H2={light:`#333333`,dark:`#bbbbbb`},U2={light:`#fffffe`,dark:`#1e1e1e`},W2=`__shiki_resolved`;function G2(e){if(e?.[W2])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?H2.light:H2.dark,n||=t.type===`light`?U2.light:U2.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,W2,{enumerable:!1,writable:!1,value:!0}),t}async function K2(e){return Array.from(new Set((await Promise.all(e.filter(e=>!z0(e)).map(async e=>await L0(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function q2(e){return(await Promise.all(e.map(async e=>V0(e)?null:G2(await L0(e))))).filter(e=>!!e)}var J2=3,Y2=!1;function X2(e,t=3){if(J2&&!(typeof J2==`number`&&t>J2)){if(Y2)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var Z2=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Q2(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Z2(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var $2=class extends m1{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=G2(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=KQ.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Q2(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Z2(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},e4=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},t4=0;function n4(e){t4+=1,e.warnings!==!1&&t4>=10&&t4%10==0&&console.warn(`[Shiki] ${t4} 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 t=!1;if(!e.engine)throw new Z2("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(G2),i=new $2(new e4(e.engine,n),r,n,e.langAlias),a;function o(t){return Q2(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Z2(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new Z2(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await K2(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await q2(e))}function g(){if(t)throw new Z2(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--t4)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function r4(e){e.engine||X2("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([q2(e.themes||[]),K2(e.langs||[]),e.engine]);return n4({...e,themes:t,langs:n,engine:r})}async function i4(e){let t=await r4(e);return{getLastGrammarState:(...e)=>C2(t,...e),codeToTokensBase:(e,n)=>S2(t,e,n),codeToTokensWithThemes:(e,n)=>j2(t,e,n),codeToTokens:(e,n)=>N2(t,e,n),codeToHast:(e,n)=>F2(t,e,n),codeToHtml:(e,n)=>V2(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function a4(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,z0(n))return[];let r=t[n];if(!r)throw new MQ(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(V0(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new MQ(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await i4({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function o4(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function s4(e,t){let n=o4(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var c4=[{id:`abap`,name:`ABAP`,import:(()=>$(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>$(()=>import(`./actionscript-3--17pq3dv.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>$(()=>import(`./ada-C5qYipkI.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>$(()=>import(`./angular-html-Dl5doFtz.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-CbN7_mlY.js`),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>$(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>$(()=>import(`./apex-CGTLDQj6.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>$(()=>import(`./apl-CUTyCKtR.js`),__vite__mapDeps([6,2,3,1,7,8,9]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>$(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>$(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>$(()=>import(`./asciidoc-DE70LPWp.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>$(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>$(()=>import(`./astro-4sWs7Jg3.js`),__vite__mapDeps([10,2,3,9,11,12,13]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>$(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>$(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>$(()=>import(`./bat-Bo4NYOV-.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>$(()=>import(`./beancount-D-usSTwE.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>$(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>$(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>$(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>$(()=>import(`./bird2-C2hNVINV.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-NmhW_pJp.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-BkkzgIyY.js`),__vite__mapDeps([17,18]),import.meta.url))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-_ropPcoN.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>$(()=>import(`./c3-CnJL0r0V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>$(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>$(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>$(()=>import(`./clarity-SemFz856.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>$(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>$(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>$(()=>import(`./cobol-BacpIX4U.js`),__vite__mapDeps([21,1,2,3,8]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>$(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>$(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>$(()=>import(`./coffee-DcwgCl9J.js`),__vite__mapDeps([22,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>$(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Coq`,import:(()=>$(()=>import(`./coq-BrsZFFmf.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>$(()=>import(`./cpp-BCPbrI0m.js`).then(e=>e.n),__vite__mapDeps([23,16,24,25,26]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-DZXQ6wBH.js`),__vite__mapDeps([27,2,3,1,16,26,28]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-Ct8U2NOr.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-BYyCaTYR.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>$(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>$(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>$(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>$(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>$(()=>import(`./dart-DkHntEIa.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>$(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>$(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>$(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>$(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>$(()=>import(`./dotenv-_5a1GRtc.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>$(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>$(()=>import(`./edge-CVh9HJt8.js`),__vite__mapDeps([29,1,2,3,11,15]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-9uvyi7ZY.js`),__vite__mapDeps([30,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-DDSgRIyn.js`),__vite__mapDeps([31,25,26]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-C9PiwqqW.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-DAVyz0cP.js`),__vite__mapDeps([32,1,2,3,33,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>$(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([39,40]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>$(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>$(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>$(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>$(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([41,42]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>$(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>$(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([43,40]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-C0sCabJj.js`),__vite__mapDeps([44,45,46]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>$(()=>import(`./gdscript-Cp2uCuqX.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>$(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>$(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>$(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>$(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([47,48]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-z3txLW9w.js`),__vite__mapDeps([49,28]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-BRADiKXN.js`),__vite__mapDeps([50,2,3,1,11]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-B6C6vVGo.js`),__vite__mapDeps([51,2,3,1,11]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-34bCtA9U.js`).then(e=>e.n),__vite__mapDeps([25,26]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>$(()=>import(`./gn-ilITqXS6.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>$(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>$(()=>import(`./go-BJwz_mda.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-CL83z2DV.js`).then(e=>e.n),__vite__mapDeps([35,2,11,13,36]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-B9WxPQav.js`),__vite__mapDeps([52,1,2,3,16]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-oavex6g4.js`).then(e=>e.n),__vite__mapDeps([34,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-pd64xhEq.js`),__vite__mapDeps([53,2,3,1,38]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>$(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>$(()=>import(`./haxe-OTjmBuCE.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>$(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>$(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>$(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>$(()=>import(`./html-A_mALprL.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-CBwZyoIR.js`),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-Cua_-o-V.js`),__vite__mapDeps([54,7,8,9,28,35,2,11,13,36]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-Dpr8mC4K.js`),__vite__mapDeps([55,7,8,56,35,2,11,13,36]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-B0Qn7Nwc.js`),__vite__mapDeps([57,58]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>$(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>$(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>$(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>$(()=>import(`./java-B1Ptmnmm.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-waNlhfIS.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-D06CyNkk.js`),__vite__mapDeps([59,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-CQo2g2q_.js`),__vite__mapDeps([60,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-T8-gmbyP.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>$(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>$(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>$(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>$(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>$(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>$(()=>import(`./jsx-pi8aEi7y.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-DQ0CkLQi.js`),__vite__mapDeps([61,2,16,20,23,24,25,26,62]),import.meta.url))},{id:`just`,name:`Just`,import:(()=>$(()=>import(`./just-BaZbjeHH.js`),__vite__mapDeps([63,2,11,20,28,33,3,1,7,8,16,26,23,24,25,34,35,13,36,37,38,64]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>$(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-BUv0MjJC.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-CKRYEGLe.js`),__vite__mapDeps([65,66,62]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>$(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>$(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>$(()=>import(`./liquid-KfgQvxVp.js`),__vite__mapDeps([67,2,3,1,9]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>$(()=>import(`./llvm-Cm23YOpf.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>$(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>$(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>$(()=>import(`./lua-BDYsw9Eb.js`).then(e=>e.n),__vite__mapDeps([37,26]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>$(()=>import(`./luau-CNKltnaQ.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>$(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>$(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>$(()=>import(`./marko-BSPq2tuh.js`),__vite__mapDeps([68,3,5,11,69]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-ZTdTy2-Y.js`),__vite__mapDeps([70,15,1,2,3,38,40]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>$(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>$(()=>import(`./mermaid-Bk4SNUv9.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>$(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>$(()=>import(`./mojo-BgCJLMeH.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>$(()=>import(`./moonbit-CaWjb8XO.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>$(()=>import(`./move-B1IS1UjX.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>$(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>$(()=>import(`./nextflow-Bbiyy34d.js`),__vite__mapDeps([71,72]),import.meta.url))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>$(()=>import(`./nextflow-groovy-Dc_ddanL.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-BsBsElo9.js`),__vite__mapDeps([73,37,26]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-Fud12WJN.js`),__vite__mapDeps([74,2,3,1,7,8,26,25,40]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>$(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>$(()=>import(`./nushell-DcLAeLz5.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>$(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>$(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>$(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>$(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>$(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>$(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>$(()=>import(`./perl-BcRrrqpJ.js`),__vite__mapDeps([64,2,3,1,7,8,16]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-CvBMy7ll.js`),__vite__mapDeps([75,2,3,1,7,8,9,16]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>$(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>$(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>$(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>$(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>$(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>$(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>$(()=>import(`./powershell-DshXNtvi.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>$(()=>import(`./prisma-BsRQq5mF.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>$(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>$(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>$(()=>import(`./pug-9fn0F-sp.js`),__vite__mapDeps([76,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>$(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>$(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>$(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>$(()=>import(`./qml-DPYDKGeG.js`),__vite__mapDeps([77,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>$(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>$(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>$(()=>import(`./r-B-BlSOk_.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>$(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>$(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>$(()=>import(`./razor-BBsuDNIH.js`),__vite__mapDeps([78,1,2,3,79]),import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>$(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>$(()=>import(`./regexp-siAWelih.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>$(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>$(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>$(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>$(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>$(()=>import(`./rst-DpBCyEwj.js`),__vite__mapDeps([80,2,15,1,3,20,81,23,16,24,25,26,28,38,33,7,8,34,35,11,13,36,37]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>$(()=>import(`./ruby-BQ1xX5ej.js`),__vite__mapDeps([33,2,3,1,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>$(()=>import(`./rust-Cfkwpbl8.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-Dft5mTiQ.js`),__vite__mapDeps([82,16]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>$(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>$(()=>import(`./scala-DKOlJaKm.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>$(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>$(()=>import(`./scss-BFMJsYGZ.js`).then(e=>e.n),__vite__mapDeps([5,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>$(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>$(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([83,84]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-Cncrs_5T.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-BngbHbQf.js`),__vite__mapDeps([85,28]),import.meta.url))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>$(()=>import(`./smalltalk-B16xEiuN.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>$(()=>import(`./solidity-CKzVLygQ.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>$(()=>import(`./soy-BY5W-W7z.js`),__vite__mapDeps([86,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([87,88]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>$(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>$(()=>import(`./sql-rEN1gzdE.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>$(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>$(()=>import(`./stata-BDRzO3gs.js`),__vite__mapDeps([89,16]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>$(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>$(()=>import(`./surrealql-DgF3SPLS.js`),__vite__mapDeps([90,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-BsPFEf_A.js`),__vite__mapDeps([91,2,3,11,12]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>$(()=>import(`./swift-DonLKvLd.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>$(()=>import(`./system-verilog-DJ5XKQeo.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>$(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>$(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>$(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>$(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>$(()=>import(`./templ-D4eIDjcz.js`),__vite__mapDeps([92,2,3,93]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-hl_BDesm.js`),__vite__mapDeps([66,62]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-mYERLvfx.js`),__vite__mapDeps([94,2,3,1,7,8,11,16,25,26]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>$(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>$(()=>import(`./tsx-4zmdohFv.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-J6ElH33g.js`),__vite__mapDeps([95,2,3,5,20,33,1,7,8,16,26,23,24,25,28,34,35,11,13,36,37,38,75,9]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>$(()=>import(`./typescript-DaBxXTXh.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-B88KGewJ.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>$(()=>import(`./typst-DI99ib-x.js`),[],import.meta.url))},{id:`v`,name:`V`,import:(()=>$(()=>import(`./v-DETTlOr0.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>$(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>$(()=>import(`./vb-Djn5o6TS.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>$(()=>import(`./verilog-CiiDBU1e.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>$(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>$(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>$(()=>import(`./vue-CnJAvLlE.js`),__vite__mapDeps([96,2,3,1,9,11,15]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-5M7J-A2F.js`),__vite__mapDeps([97,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-BgG3D4Fz.js`),__vite__mapDeps([98,2,3,5,12,69,99]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>$(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>$(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>$(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>$(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>$(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>$(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>$(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>$(()=>import(`./xml-BuA8iyrb.js`).then(e=>e.n),__vite__mapDeps([7,8]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-CEhAy4QP.js`),__vite__mapDeps([100,7,8]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-CKMEvlUE.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],l4=Object.fromEntries(c4.map(e=>[e.id,e.import])),u4=Object.fromEntries(c4.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),d4={...l4,...u4},f4=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>$(()=>import(`./andromeeda-vGVdxbeo.js`),[],import.meta.url))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>$(()=>import(`./aurora-x-CDeNXAV0.js`),[],import.meta.url))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>$(()=>import(`./ayu-dark-DluEY0Gj.js`),[],import.meta.url))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>$(()=>import(`./ayu-light-C3h-C4tm.js`),[],import.meta.url))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>$(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[],import.meta.url))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[],import.meta.url))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>$(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[],import.meta.url))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[],import.meta.url))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>$(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[],import.meta.url))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>$(()=>import(`./dark-plus-Cs2F2srj.js`),[],import.meta.url))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>$(()=>import(`./dracula-BHWKrbxM.js`),[],import.meta.url))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>$(()=>import(`./dracula-soft-5eyTD99u.js`),[],import.meta.url))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>$(()=>import(`./everforest-dark-sB-x3p7T.js`),[],import.meta.url))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>$(()=>import(`./everforest-light-Df2xbC6M.js`),[],import.meta.url))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>$(()=>import(`./github-dark-C-LZuMrd.js`),[],import.meta.url))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>$(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>$(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[],import.meta.url))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>$(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[],import.meta.url))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>$(()=>import(`./github-light-EUqPIrTm.js`),[],import.meta.url))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>$(()=>import(`./github-light-default-BXViO-2h.js`),[],import.meta.url))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>$(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[],import.meta.url))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[],import.meta.url))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[],import.meta.url))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>$(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[],import.meta.url))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[],import.meta.url))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[],import.meta.url))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>$(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[],import.meta.url))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>$(()=>import(`./horizon-CE9ld1lL.js`),[],import.meta.url))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>$(()=>import(`./horizon-bright-Br1oVSNq.js`),[],import.meta.url))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>$(()=>import(`./houston-CsvMBhTu.js`),[],import.meta.url))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>$(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[],import.meta.url))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>$(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[],import.meta.url))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>$(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[],import.meta.url))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>$(()=>import(`./laserwave-C_8bwKvT.js`),[],import.meta.url))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>$(()=>import(`./light-plus-DVQuIRkW.js`),[],import.meta.url))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>$(()=>import(`./material-theme-Bm3Qr25_.js`),[],import.meta.url))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>$(()=>import(`./material-theme-darker-2IIEA8gg.js`),[],import.meta.url))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>$(()=>import(`./material-theme-lighter-uhdI0v04.js`),[],import.meta.url))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>$(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[],import.meta.url))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>$(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[],import.meta.url))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>$(()=>import(`./min-dark-BSWPekZh.js`),[],import.meta.url))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>$(()=>import(`./min-light-DDpmG2fV.js`),[],import.meta.url))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>$(()=>import(`./monokai-CdkpiU2Y.js`),[],import.meta.url))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>$(()=>import(`./night-owl-DhmEMT88.js`),[],import.meta.url))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>$(()=>import(`./night-owl-light-eJ-hLW7d.js`),[],import.meta.url))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>$(()=>import(`./nord-Cb4Vim4T.js`),[],import.meta.url))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>$(()=>import(`./one-dark-pro-CLwyXe_n.js`),[],import.meta.url))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>$(()=>import(`./one-light-D7Lr4KcI.js`),[],import.meta.url))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>$(()=>import(`./plastic-DQwYfKfQ.js`),[],import.meta.url))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>$(()=>import(`./poimandres-DRFjx7u4.js`),[],import.meta.url))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>$(()=>import(`./red-CJ3rzSJv.js`),[],import.meta.url))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>$(()=>import(`./rose-pine-BthvhNj6.js`),[],import.meta.url))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>$(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[],import.meta.url))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>$(()=>import(`./rose-pine-moon-hon4tzzS.js`),[],import.meta.url))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>$(()=>import(`./slack-dark-DnToyrRv.js`),[],import.meta.url))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>$(()=>import(`./slack-ochin-B2OO5cIa.js`),[],import.meta.url))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>$(()=>import(`./snazzy-light-4G7pJPwS.js`),[],import.meta.url))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>$(()=>import(`./solarized-dark-DV17i1UV.js`),[],import.meta.url))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>$(()=>import(`./solarized-light-DSh2HLQt.js`),[],import.meta.url))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>$(()=>import(`./synthwave-84-nFMaYfgc.js`),[],import.meta.url))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>$(()=>import(`./tokyo-night-oM2G3aXe.js`),[],import.meta.url))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>$(()=>import(`./vesper-D5bVUKB1.js`),[],import.meta.url))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>$(()=>import(`./vitesse-black-fwtXNY1n.js`),[],import.meta.url))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>$(()=>import(`./vitesse-dark-BZCL-v6S.js`),[],import.meta.url))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>$(()=>import(`./vitesse-light-VbXTXTou.js`),[],import.meta.url))}].map(e=>[e.id,e.import])),p4=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function m4(){return 2147483648}function h4(){return typeof performance<`u`?performance.now():Date.now()}var g4=(e,t)=>e+(t-e%t)%t;async function _4(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=m4();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,g4(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:h4,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var v4=Object.defineProperty,y4=(e,t,n)=>t in e?v4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b4=(e,t,n)=>y4(e,typeof t==`symbol`?t:t+``,n),x4=null;function S4(e){throw new p4(e.UTF8ToString(e.getLastOnigError()))}var C4=class e{constructor(t){b4(this,`utf16Length`),b4(this,`utf8Length`),b4(this,`utf16Value`),b4(this,`utf8Value`),b4(this,`utf16OffsetToUtf8`),b4(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},w4=class e{constructor(t){if(b4(this,`id`,++e.LAST_ID),b4(this,`_onigBinding`),b4(this,`content`),b4(this,`utf16Length`),b4(this,`utf8Length`),b4(this,`utf16OffsetToUtf8`),b4(this,`utf8OffsetToUtf16`),b4(this,`ptr`),!x4)throw new p4(`Must invoke loadWasm first.`);this._onigBinding=x4,this.content=t;let n=new C4(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=x4.omalloc(1e4),e._sharedPtrInUse=!0,x4.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(x4)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};b4(w4,`LAST_ID`,0),b4(w4,`_sharedPtr`,0),b4(w4,`_sharedPtrInUse`,!1);var T4=w4,E4=class{constructor(e){if(b4(this,`_onigBinding`),b4(this,`_ptr`),!x4)throw new p4(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new C4(e[r]);t[r]=i.createString(x4),n[r]=i.utf8Length}let r=x4.omalloc(4*e.length);x4.HEAPU32.set(t,r/4);let i=x4.omalloc(4*e.length);x4.HEAPU32.set(n,i/4);let a=x4.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)x4.ofree(t[n]);x4.ofree(i),x4.ofree(r),a===0&&S4(x4),this._onigBinding=x4,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new T4(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function D4(e){return typeof e.instantiator==`function`}function O4(e){return typeof e.default==`function`}function k4(e){return e.data!==void 0}function A4(e){return typeof Response<`u`&&e instanceof Response}function j4(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var M4;function N4(e){if(M4)return M4;async function t(){x4=await _4(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),D4(n)?n=await n.instantiator(t):O4(n)?n=await n.default(t):(k4(n)&&(n=n.data),A4(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await F4(n)(t):await I4(n)(t):j4(n)||n instanceof WebAssembly.Module?n=await P4(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await P4(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return M4=t(),M4}function P4(e){return t=>WebAssembly.instantiate(e,t)}function F4(e){return t=>WebAssembly.instantiateStreaming(e,t)}function I4(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function L4(e){return e&&await N4(e),{createScanner(e){return new E4(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new T4(e)}}}var R4=a4({langs:d4,themes:f4,engine:()=>L4($(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url))}),{codeToHtml:z4,codeToHast:B4,codeToTokens:V4,codeToTokensBase:H4,codeToTokensWithThemes:U4,getSingletonHighlighter:W4,getLastGrammarState:G4}=s4(R4,{guessEmbeddedLanguages:G0});function K4(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function q4(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var J4=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),Y4=String.raw;function X4(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Z4=Y4`\[\^?`,Q4=`c.? | C(?:-.?)?|${Y4`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Y4`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Y4`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Y4`o\{[^\}]*\}?`}|${Y4`\d{1,3}`}`,$4=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,e3=new RegExp(Y4`
|
|
251
|
-
\\ (?:
|
|
252
|
-
${Q4}
|
|
253
|
-
| [gk]<[^>]*>?
|
|
254
|
-
| [gk]'[^']*'?
|
|
255
|
-
| .
|
|
256
|
-
)
|
|
257
|
-
| \( (?:
|
|
258
|
-
\? (?:
|
|
259
|
-
[:=!>({]
|
|
260
|
-
| <[=!]
|
|
261
|
-
| <[^>]*>
|
|
262
|
-
| '[^']*'
|
|
263
|
-
| ~\|?
|
|
264
|
-
| #(?:[^)\\]|\\.?)*
|
|
265
|
-
| [^:)]*[:)]
|
|
266
|
-
)?
|
|
267
|
-
| \*[^\)]*\)?
|
|
268
|
-
)?
|
|
269
|
-
| (?:${$4.source})+
|
|
270
|
-
| ${Z4}
|
|
271
|
-
| .
|
|
272
|
-
`.replace(/\s+/g,``),`gsu`),t3=new RegExp(Y4`
|
|
273
|
-
\\ (?:
|
|
274
|
-
${Q4}
|
|
275
|
-
| .
|
|
276
|
-
)
|
|
277
|
-
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
278
|
-
| ${Z4}
|
|
279
|
-
| &&
|
|
280
|
-
| .
|
|
281
|
-
`.replace(/\s+/g,``),`gsu`);function n3(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=M3(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(e3.lastIndex=0;s=e3.exec(e);){let t=r3(a,e,s[0],e3.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(e3.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?P3(e,u):e).flat(),flags:r}}function r3(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=i3(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:c3(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:S3(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:l3(n)}}if(a===`K`)return{token:g3(`keep`,n)};if(a===`N`||a===`R`)return{token:h3(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:h3(`any`,n)};if(a===`X`)return{token:h3(`text_segment`,n)};let e=o3(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:D3(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:E3(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:y3(`group`,n)};if(n===`(?>`)return{token:y3(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:y3(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:y3(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:y3(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:v3(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
|
|
282
|
-
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:h3(`dot`,n)}:n===`^`||n===`$`?{token:c3(e.singleline?{"^":Y4`\A`,$:Y4`\Z`}[n]:n,n)}:n===`|`?{token:s3(n)}:$4.test(n)?{tokens:F3(n)}:{token:u3(K4(n),n)}}function i3(e,t,n){let r=[m3(t[1]===`^`,t)],i=1,a;for(t3.lastIndex=n;a=t3.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(m3(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(u3(93,e));else if(i--,r.push(d3(e)),!i)break}else{let t=a3(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:t3.lastIndex||e.length}}function a3(e){if(e[0]===`\\`)return o3(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!J4.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return h3(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?f3(e):e===`&&`?p3(e):u3(K4(e),e)}function o3(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return T3(e);if(`dDhHsSwW`.includes(n))return k3(e);if(e.startsWith(Y4`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return A3(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return u3(K4(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return u3(N3(e),e);if(w3.has(n))return u3(w3.get(n),e);if(/\d/.test(n))return _3(t,e);if(e===`\\`)throw Error(Y4`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return u3(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function s3(e){return{type:`Alternator`,raw:e}}function c3(e,t){return{type:`Assertion`,kind:e,raw:t}}function l3(e){return{type:`Backreference`,raw:e}}function u3(e,t){return{type:`Character`,value:e,raw:t}}function d3(e){return{type:`CharacterClassClose`,raw:e}}function f3(e){return{type:`CharacterClassHyphen`,raw:e}}function p3(e){return{type:`CharacterClassIntersector`,raw:e}}function m3(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function h3(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function g3(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:X4(n.flags),raw:t}}function _3(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function v3(e){return{type:`GroupClose`,raw:e}}function y3(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function b3(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function x3(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function S3(e){return{type:`Subroutine`,raw:e}}var C3=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),w3=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function T3(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return u3(K4(t.toUpperCase())-64,e)}function E3(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=j3(n),o=j3(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),g3(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,y3(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function D3(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=C3.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return b3(l,r??null,i?.split(`,`)??null,e)}function O3(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return x3(t,n,r,e)}function k3(e){let t=e[1].toLowerCase();return h3({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function A3(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return h3(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function j3(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function M3(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function N3(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function P3(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[l3(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(Y4`Octal encoded byte above 177 unsupported "${n}"`)}else r=K4(t);a.push(u3(r,(e===0?`\\`:``)+t))}return a}function F3(e){let t=[],n=new RegExp($4,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(O3(e.slice(0,-1)));continue}}}t.push(O3(e))}return t}function I3(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function L3(e){return R3.has(e.type)}var R3=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function z3(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=n3(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return Y3();case`Assertion`:return B3(n);case`Backreference`:return V3(n,a);case`Character`:return $3(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return H3(n,a,t);case`CharacterClassOpen`:return U3(n,a,t);case`CharacterSet`:return W3(n,a);case`Directive`:return r6(n.kind,{flags:n.flags});case`GroupOpen`:return G3(n,a,t);case`NamedCallout`:return s6(n.kind,n.tag,n.arguments);case`Quantifier`:return K3(n,a);case`Subroutine`:return q3(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=u6(i6(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(Y4`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(Y4`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function B3({kind:e}){return X3(X4({"^":`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`}[e],`Unexpected assertion kind "${e}"`),{negate:e===Y4`\B`||e===Y4`\Y`})}function V3({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Z3(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return Z3(r)}return i(+r)}function H3(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),t6(o,e);throw Error(`Invalid character class range`)}return $3(K4(`-`))}function U3({negate:e},t,n){let{tokens:r,walk:i}=t,a=[e6()],o=r[t.nextIndex],s=x6(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(e6()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=x6(r[t.nextIndex],o)}let c=e6({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function W3({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=b6(n);if(J4.has(r)&&!o?.has(r))e=`posix`,n=r;else return f6(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?c6(n,{negate:t}):n6(e,{negate:t})}function G3(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=p6(e),l=c.type===`AbsenceFunction`,u=_6(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&q4(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=S6(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(Y3()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(g6(t)||t.type===`CapturingGroup`)throw Error(e)}else if(g6(t)||_6(t)&&t.negate)throw Error(e)}}f=S6(r[t.nextIndex])}return t.nextIndex++,c}function K3({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!L3(a))throw Error(`Quantifier requires a repeatable token`);let o=l6(e,t,n,a);return i.body.pop(),o}function q3({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=d6(i);return r.push(o),o}function J3(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:m6(t?.body)}}function Y3(e){return{type:`Alternative`,body:h6(e?.body)}}function X3(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function Z3(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function Q3(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!v6(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:m6(t?.body)}}function $3(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function e6(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:h6(e?.body)}}function t6(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function n6(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function r6(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:X4(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function i6(e){return{type:`Flags`,...e}}function a6(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:m6(e?.body)}}function o6(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:m6(e?.body)}}function s6(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function c6(e,t){let n=!!t?.negate;if(!J4.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function l6(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function u6(e,t){return{type:`Regex`,body:m6(t?.body),flags:e}}function d6(e){return{type:`Subroutine`,ref:e}}function f6(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(b6(e));if(!r){if(n.normalizeUnknownPropertyNames)r=y6(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(Y4`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function p6({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return J3(`repeater`);case`atomic`:return a6({atomic:!0});case`capturing`:return Q3(i,{name:n});case`group`:return a6({flags:e});case`lookahead`:case`lookbehind`:return o6({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function m6(e){if(e===void 0)e=[Y3()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function h6(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function g6(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function _6(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function v6(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function y6(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function b6(e){return e.replace(/[- _]+/g,``).toLowerCase()}function x6(e,t){let n=t;return X4(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function S6(e){return X4(e,`Unclosed group`)}function C6(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){w6(c).splice(Math.max(0,T6(s)+l),1),l--,u=!0},removeAllNextSiblings(){return w6(c).splice(T6(s)+1)},removeAllPrevSiblings(){let e=T6(s)+l;return l-=e,w6(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,T6(s)+l)]=e:X4(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(w6(c).splice(Math.max(0,T6(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,T6(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function w6(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function T6(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var E6=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function D6(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function O6(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var k6=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function A6(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===k6.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?k6.CHAR_CLASS:k6.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function j6(e,t,n,r){A6(e,t,n,r)}function M6(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===k6.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function N6(e,t,n){return!!M6(e,t,0,n)}function P6(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var F6=new RegExp(String.raw`(?<noncapturingStart>${E6})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function I6(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(F6.lastIndex=Number.isNaN(c)?0:c+7;f=F6.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),D6(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=A6(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},k6.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var L6=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,R6=new RegExp(String.raw`
|
|
283
|
-
\\(?: \d+
|
|
284
|
-
| c[A-Za-z]
|
|
285
|
-
| [gk]<[^>]+>
|
|
286
|
-
| [pPu]\{[^\}]+\}
|
|
287
|
-
| u[A-Fa-f\d]{4}
|
|
288
|
-
| x[A-Fa-f\d]{2}
|
|
289
|
-
)
|
|
290
|
-
| \((?: \? (?: [:=!>]
|
|
291
|
-
| <(?:[=!]|[^>]+>)
|
|
292
|
-
| [A-Za-z\-]+:
|
|
293
|
-
| \(DEFINE\)
|
|
294
|
-
))?
|
|
295
|
-
| (?<qBase>${L6})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
296
|
-
| \\?.
|
|
297
|
-
`.replace(/\s+/g,``),`gsu`);function z6(e){if(!RegExp(`${L6}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(R6.lastIndex=0;o=R6.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=O6(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}R6.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var B6=String.raw,V6=B6`\(\?R=(?<rDepth>[^\)]+)\)|${B6`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,H6=B6`\(\?<(?![=!])(?<captureName>[^>]+)>`,U6=B6`${H6}|(?<unnamed>\()(?!\?)`,W6=new RegExp(B6`${H6}|${V6}|\(\?|\\?.`,`gsu`),G6=`Cannot use multiple overlapping recursions`;function K6(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(V6,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&N6(e,B6`\(\?\(DEFINE\)`,k6.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=N6(e,B6`\\[1-9]`,k6.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(W6.lastIndex=0;f=W6.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(q6(m),l)throw Error(G6);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(W6.lastIndex);if(N6(s,V6,k6.DEFAULT))throw Error(G6);let c=m-1;e=J6(t,s,c,!1,n,a,d),i=Z6(i,t,c,a.length,0,d);break}else if(h){q6(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(G6);break}if(!u)throw Error(B6`Recursive \g cannot be used outside the referenced group "${r===`external`?h:B6`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=P6(e,p);if(o&&N6(m,B6`${H6}|\((?!\?)`,k6.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=J6(_,v,b,!0,n,a,d);i=Z6(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,W6.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),W6.lastIndex),s.set(p,W6.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),W6.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function q6(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function J6(e,t,n,r,i,a,o){let s=new Set;r&&j6(e+t,H6,({groups:{captureName:e}})=>{s.add(e)},k6.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${Y6(`(?:${e}`,`forward`,...c)}(?:)${Y6(`${t})`,`backward`,...c)}${t}`}function Y6(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=A6(e,B6`${U6}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),X6(i,n),s?e:`(?<${t}${l}>`}return B6`\k<${c}${l}>`},k6.DEFAULT)}return c}function X6(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Z6(e,t,n,r,i,a){if(e.size&&r){let o=0;j6(t,U6,()=>o++,k6.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var Q6=String.fromCodePoint,$6=String.raw,e8={},t8=globalThis.RegExp;e8.flagGroups=(()=>{try{new t8(`(?i:)`)}catch{return!1}return!0})(),e8.unicodeSets=(()=>{try{new t8(`[[]]`,`v`)}catch{return!1}return!0})(),e8.bugFlagVLiteralHyphenIsRange=e8.unicodeSets?(()=>{try{new t8($6`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,e8.bugNestedClassIgnoresNegation=e8.unicodeSets&&new t8(`[[^a]]`,`v`).test(`a`);function n8(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function r8(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function i8(e,t){return o8[e]>=o8[t]}function a8(e,t){if(e==null)throw Error(t??`Value expected`);return e}var o8={ES2025:2025,ES2024:2024,ES2018:2018},s8={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function c8(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!s8[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=e8.flagGroups?`ES2025`:e8.unicodeSets?`ES2024`:`ES2018`),t}var l8=`[ -\r ]`,u8=new Set([Q6(304),Q6(305)]),d8=$6`[\p{L}\p{M}\p{N}\p{Pc}]`;function f8(e){if(u8.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=g8.get(n),a=m8.get(n),o=h8.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var p8=new Map(`C Other
|
|
298
|
-
Cc Control cntrl
|
|
299
|
-
Cf Format
|
|
300
|
-
Cn Unassigned
|
|
301
|
-
Co Private_Use
|
|
302
|
-
Cs Surrogate
|
|
303
|
-
L Letter
|
|
304
|
-
LC Cased_Letter
|
|
305
|
-
Ll Lowercase_Letter
|
|
306
|
-
Lm Modifier_Letter
|
|
307
|
-
Lo Other_Letter
|
|
308
|
-
Lt Titlecase_Letter
|
|
309
|
-
Lu Uppercase_Letter
|
|
310
|
-
M Mark Combining_Mark
|
|
311
|
-
Mc Spacing_Mark
|
|
312
|
-
Me Enclosing_Mark
|
|
313
|
-
Mn Nonspacing_Mark
|
|
314
|
-
N Number
|
|
315
|
-
Nd Decimal_Number digit
|
|
316
|
-
Nl Letter_Number
|
|
317
|
-
No Other_Number
|
|
318
|
-
P Punctuation punct
|
|
319
|
-
Pc Connector_Punctuation
|
|
320
|
-
Pd Dash_Punctuation
|
|
321
|
-
Pe Close_Punctuation
|
|
322
|
-
Pf Final_Punctuation
|
|
323
|
-
Pi Initial_Punctuation
|
|
324
|
-
Po Other_Punctuation
|
|
325
|
-
Ps Open_Punctuation
|
|
326
|
-
S Symbol
|
|
327
|
-
Sc Currency_Symbol
|
|
328
|
-
Sk Modifier_Symbol
|
|
329
|
-
Sm Math_Symbol
|
|
330
|
-
So Other_Symbol
|
|
331
|
-
Z Separator
|
|
332
|
-
Zl Line_Separator
|
|
333
|
-
Zp Paragraph_Separator
|
|
334
|
-
Zs Space_Separator
|
|
335
|
-
ASCII
|
|
336
|
-
ASCII_Hex_Digit AHex
|
|
337
|
-
Alphabetic Alpha
|
|
338
|
-
Any
|
|
339
|
-
Assigned
|
|
340
|
-
Bidi_Control Bidi_C
|
|
341
|
-
Bidi_Mirrored Bidi_M
|
|
342
|
-
Case_Ignorable CI
|
|
343
|
-
Cased
|
|
344
|
-
Changes_When_Casefolded CWCF
|
|
345
|
-
Changes_When_Casemapped CWCM
|
|
346
|
-
Changes_When_Lowercased CWL
|
|
347
|
-
Changes_When_NFKC_Casefolded CWKCF
|
|
348
|
-
Changes_When_Titlecased CWT
|
|
349
|
-
Changes_When_Uppercased CWU
|
|
350
|
-
Dash
|
|
351
|
-
Default_Ignorable_Code_Point DI
|
|
352
|
-
Deprecated Dep
|
|
353
|
-
Diacritic Dia
|
|
354
|
-
Emoji
|
|
355
|
-
Emoji_Component EComp
|
|
356
|
-
Emoji_Modifier EMod
|
|
357
|
-
Emoji_Modifier_Base EBase
|
|
358
|
-
Emoji_Presentation EPres
|
|
359
|
-
Extended_Pictographic ExtPict
|
|
360
|
-
Extender Ext
|
|
361
|
-
Grapheme_Base Gr_Base
|
|
362
|
-
Grapheme_Extend Gr_Ext
|
|
363
|
-
Hex_Digit Hex
|
|
364
|
-
IDS_Binary_Operator IDSB
|
|
365
|
-
IDS_Trinary_Operator IDST
|
|
366
|
-
ID_Continue IDC
|
|
367
|
-
ID_Start IDS
|
|
368
|
-
Ideographic Ideo
|
|
369
|
-
Join_Control Join_C
|
|
370
|
-
Logical_Order_Exception LOE
|
|
371
|
-
Lowercase Lower
|
|
372
|
-
Math
|
|
373
|
-
Noncharacter_Code_Point NChar
|
|
374
|
-
Pattern_Syntax Pat_Syn
|
|
375
|
-
Pattern_White_Space Pat_WS
|
|
376
|
-
Quotation_Mark QMark
|
|
377
|
-
Radical
|
|
378
|
-
Regional_Indicator RI
|
|
379
|
-
Sentence_Terminal STerm
|
|
380
|
-
Soft_Dotted SD
|
|
381
|
-
Terminal_Punctuation Term
|
|
382
|
-
Unified_Ideograph UIdeo
|
|
383
|
-
Uppercase Upper
|
|
384
|
-
Variation_Selector VS
|
|
385
|
-
White_Space space
|
|
386
|
-
XID_Continue XIDC
|
|
387
|
-
XID_Start XIDS`.split(/\s/).map(e=>[b6(e),e])),m8=new Map([[`s`,Q6(383)],[Q6(383),`s`]]),h8=new Map([[Q6(223),Q6(7838)],[Q6(107),Q6(8490)],[Q6(229),Q6(8491)],[Q6(969),Q6(8486)]]),g8=new Map([y8(453),y8(456),y8(459),y8(498),...b8(8072,8079),...b8(8088,8095),...b8(8104,8111),y8(8124),y8(8140),y8(8188)]),_8=new Map([[`alnum`,$6`[\p{Alpha}\p{Nd}]`],[`alpha`,$6`\p{Alpha}`],[`ascii`,$6`\p{ASCII}`],[`blank`,$6`[\p{Zs}\t]`],[`cntrl`,$6`\p{Cc}`],[`digit`,$6`\p{Nd}`],[`graph`,$6`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,$6`\p{Lower}`],[`print`,$6`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,$6`[\p{P}\p{S}]`],[`space`,$6`\p{space}`],[`upper`,$6`\p{Upper}`],[`word`,$6`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,$6`\p{AHex}`]]);function v8(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function y8(e){let t=Q6(e);return[t.toLowerCase(),t]}function b8(e,t){return v8(e,t).map(e=>y8(e))}var x8=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function S8(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};E8(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:i8(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};C6(e,C8,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return C6(e,w8,a),C6(e,T8,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var C8={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=a6();e.body[0].body.push(o6({negate:!0,body:r}),f6(`Any`));let i=a6();i.body[0].body.push(l6(`greedy`,0,1/0,e)),n(G8(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];r8(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=N8(t.get(e));if(n){let t=a6({flags:n});t.body[0].body=e.body,e.body=[G8(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(G8(o6({body:[Y3({body:[X3(`string_end`)]}),Y3({body:[$3(10)]})]}),t));else if(c===`line_start`)o(G8(H8($6`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&z8(e))o(G8(o6({negate:!0}),t));else if(d)throw Error($6`Uses "\G" in a way that requires a subclass`);else o(W8(X3(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(G8(H8($6`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${d8})(?!${d8})|(?<!${d8})(?=${d8}))`,n=`(?:(?<=${d8})(?=${d8})|(?<!${d8})(?!${d8}))`;o(G8(H8(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!V8(n)&&(n=M8(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!V8(r)&&(r=M8(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(G8(e6({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(W8(n6(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(G8(U8(H8(l8),l),t));return}if(s&&(c===`word`||u===`word`)){n(W8(n6(`word`,{negate:l}),t));return}if(c===`any`)n(W8(f6(`Any`),t));else if(c===`digit`)n(W8(f6(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error($6`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=$6`\p{RI}{2}|${e}(?:\u200D${e})*`;n(G8(H8($6`(?>\r\n|${i?$6`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(W8(f6(`AHex`,{negate:l}),t));else if(c===`newline`)n(G8(H8(l?`[^
|
|
388
|
-
]`:`(?>\r
|
|
389
|
-
?|[
|
|
390
|
-
\v\f
\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${Q6(e.codePointAt(0)-1)}${Q6(e.codePointAt(2)+1)}-\u{10FFFF}`),n(G8(H8(`[${e}]`),t))}else n(G8(U8(H8(_8.get(u)),l),t));else if(c===`property`)p8.has(b6(u))||(e.key=`sc`);else if(c===`space`)n(W8(f6(`space`,{negate:l}),t));else if(c===`word`)n(G8(U8(H8(d8),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=a6({flags:c});e.body[0].body=o(),i(G8(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&I3(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error($6`Uses "\K" in a way that's unsupported`);let o=o6({behind:!0});o.body[0].body=a(),i(G8(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(G8(o6({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=a6();t.body[0].body.push(e.body),e.body=G8(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=I8(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error($6`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!V8(n)&&(n=M8(n,t),e.ref=n)}},w8={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=W8(A8(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&r8(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=r8(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=n8(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?A8(0):k8(o,r.groupOriginByCopy,null),l=c;if(!s){let e=N8(j8(o,e=>e.type===`Group`&&!!e.flags)),t=e?n8(r.globalFlags,e):r.globalFlags;D8(t,r.currentFlags)||(l=a6({flags:P8(t)}),l.body[0].body.push(c))}n(G8(l,t),{traverse:!s})}},T8={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>O8(t,e));i.length?i.length>1?n(G8(a6({atomic:!0,body:i.reverse().map(e=>Y3({body:[Z3(e.number)]}))}),t)):e.ref=i[0].number:n(G8(o6({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=Q3();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function E8(e){C6(e,{"*"({node:e,parent:t}){e.parent=t}})}function D8(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function O8(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=F8(n.parent);for(let r of t){if(r===n)break;if(r===e||L8(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function k8(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=k8(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function A8(e){let t=d6(e);return t.isRecursive=!0,t}function j8(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function M8(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function N8(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function P8({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function F8(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function I8(e){let t=e.find(e=>e.kind===`search_start`||B8(e,{negate:!1})||!R8(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=I8(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function L8(e,t){let n=F8(e)??[];for(let e of n)if(e===t||L8(e,t))return!0;return!1}function R8({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function z8(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function B8(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&I3(e.body[0],{type:`Assertion`,kind:`search_start`})}function V8(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function H8(e,t){let n=z3(e,{...t,unicodePropertyMap:p8}).body;return n.length>1||n[0].body.length>1?a6({body:n}):n[0].body[0]}function U8(e,t){return e.negate=t,e}function W8(e,t){return e.parent=t,e}function G8(e,t){return E8(e),e.parent=t,e}function K8(e,t){let n=c8(t),r=i8(n.target,`ES2024`),i=i8(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];C6(e,q8,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,a8(J8[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&r8(f._captureTransfers,e.transferTo,[]).push(t)}),f}var q8={"*":{enter({node:e},t){if(o5(e)){let n=t.getCurrentModI();t.pushModI(e.flags?n8({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){o5(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){e5(Q6(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),t5(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&x8.has(e.value)&&t.setHasCasedChar()}},J8={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?$6`\B`:$6`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=Q6(e),r=n5(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&e5(n)){let e=f8(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);e8.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(c5)&&(o=[$3(45),...o.filter(e=>!c5(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||e8.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=a6(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=Y3({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(e8.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=n5(n,i),o=n5(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&r5(t5(e)).forEach(e=>{s.add(Array.isArray(e)?`${n5(e[0],i)}-${n5(e[1],i)}`:n5(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:$6`[^\n]`;if(e===`digit`)return t?$6`\D`:$6`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&x8.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?$6`\P`:$6`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?$6`\W`:$6`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=n8(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${i5(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+a5(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:$6`\g<${t}&R=${r}>`}},Y8=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),X8=new Set([`-`,`\\`,`]`,`^`,`[`]),Z8=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),Q8=new Map([[9,$6`\t`],[10,$6`\n`],[11,$6`\v`],[12,$6`\f`],[13,$6`\r`],[8232,$6`\u2028`],[8233,$6`\u2029`],[65279,$6`\uFEFF`]]),$8=/^\p{Cased}$/u;function e5(e){return $8.test(e)}function t5(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=Q6(e);if(!e5(t))continue;let o=f8(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function n5(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Q8.has(e))return Q8.get(e);if(e<32||e>126&&e<160||e>262143||t&&s5(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?Z8:X8:Y8,a=Q6(e);return(i.has(a)?`\\`:``)+a}function r5(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function i5(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function a5({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function o5({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function s5(e){return e>47&&e<58}function c5({type:e,value:t}){return e===`Character`&&t===45}var l5=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=d5(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(u5(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=f5(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function u5(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function d5(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)r8(n,t,{}).transferTo=e;return n}function f5(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function p5(e,t){let n=m5(e,t);return n.options?new l5(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function m5(e,t){let n=c8(t),r=S8(z3(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:p8}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=K8(r,n),a=K6(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=I6(z6(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}var h5=4294967295,g5=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:h5,end:h5,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function _5(e,t){return p5(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function v5(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>_5(e,{target:t.target}),{createScanner(e){return new g5(e,t)},createString(e){return{content:e}}}}var y5=v5({forgiving:!0}),b5=Object.fromEntries(c4.flatMap(e=>(e.aliases??[]).map(t=>[t,e.id]))),x5=new Set(Object.keys(d4)),S5=e=>{let t=e.trim().toLowerCase();return b5[t]||(x5.has(t),t)},C5=new Map,w5=new Map,T5=new Map,E5=e=>typeof e==`string`?e:e.name??`custom`,D5=(e,t)=>`${e}-${E5(t[0])}-${E5(t[1])}`,O5=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):``;return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},k5=(e,t)=>{let n=D5(e,t);if(C5.has(n))return C5.get(n);let r=R4({themes:t,langs:[e],engine:y5});return C5.set(n,r),r};function A5(e={}){let t=e.themes??[`github-light`,`github-dark`];return{name:`shiki`,type:`code-highlighter`,supportsLanguage(e){let t=S5(e);return x5.has(t)},getSupportedLanguages(){return Array.from(x5)},getThemes(){return t},highlight({code:e,language:t,themes:n},r){let i=S5(t),a=[E5(n[0]),E5(n[1])],o=O5(e,i,a);return w5.has(o)?w5.get(o):(r&&(T5.has(o)||T5.set(o,new Set),T5.get(o).add(r)),k5(x5.has(i)?i:`text`,n).then(t=>{let n=t.getLoadedLanguages().includes(i)?i:`text`,r=t.codeToTokens(e,{lang:n,themes:{light:a[0],dark:a[1]}});w5.set(o,r);let s=T5.get(o);if(s){for(let e of s)e(r);T5.delete(o)}}).catch(e=>{console.error(`[Streamdown Code] Failed to highlight code:`,e),T5.delete(o)}),null)}}}var j5=A5();function M5(e){if(e===e.toUpperCase()&&e!==e.toLowerCase())return e.toLowerCase().replace(/_/g,`-`);let t=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);return t=t.startsWith(`-`)?t.slice(1):t,t.replace(/_/g,`-`).replace(/-$/,``)}function N5(e){return(e??`/agents`).replace(/^\/+|\/+$/g,``)||`agents`}function P5(e,t){let n={};if(t&&(n.token=t),!e)return n;if(Array.isArray(e)){for(let t of e){let e=t.indexOf(`=`);if(e<=0)throw Error(`Invalid query "${t}" (expected key=value).`);n[t.slice(0,e)]=t.slice(e+1)}return n}for(let[t,r]of Object.entries(e))n[t]=r;return n}function F5(e){let t=e.instance?.trim()||`default`,n=N5(e.routePrefix),r,i;if(e.url){let t;try{t=new URL(e.url)}catch{throw Error(`Invalid url "${e.url}" (expected a full origin).`)}if(!t.host)throw Error(`Invalid url "${e.url}" (missing host — include a scheme, e.g. https://host).`);r=t.host,i=e.protocol===`ws`||e.protocol===`wss`?e.protocol:t.protocol===`https:`||t.protocol===`wss:`?`wss`:`ws`}else r=e.host?.trim()||`localhost:5173`,i=e.protocol===`wss`?`wss`:`ws`;let a=e.canonicalAgent?e.agent:M5(e.agent),o=[n,encodeURIComponent(a),encodeURIComponent(t)].join(`/`);return{host:r,protocol:i,basePath:o,query:P5(e.query,e.token),instance:t,segment:a}}var I5={connected:{label:`Connected`,dot:`bg-green-500`,cls:`bg-green-500/10 text-kumo-success`},connecting:{label:`Connecting…`,dot:`bg-kumo-warning animate-pulse`,cls:`bg-kumo-warning-tint text-kumo-warning`},disconnected:{label:`Disconnected`,dot:`bg-kumo-danger`,cls:`bg-kumo-danger-tint text-kumo-danger`}};function L5({status:e}){let t=I5[e];return(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium ${t.cls}`,children:[(0,B.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full ${t.dot}`}),t.label]})}function R5(e){return e.isRecovering?(0,B.jsx)(ut,{variant:`warning`,children:`Recovering`}):e.isStreaming?(0,B.jsx)(ut,{variant:`info`,children:`Streaming`}):e.chatStatus===`submitted`?(0,B.jsx)(ut,{variant:`info`,children:`Working`}):e.chatStatus===`error`?(0,B.jsx)(ut,{variant:`destructive`,children:`Error`}):(0,B.jsx)(ut,{variant:`secondary`,children:`Idle`})}function z5({label:e,children:t}){return(0,B.jsxs)(`div`,{className:`flex items-start justify-between gap-3 py-1.5`,children:[(0,B.jsx)(Nh,{size:`xs`,variant:`secondary`,children:e}),(0,B.jsx)(`div`,{className:`text-right text-xs text-kumo-default break-all`,children:t})]})}function B5(e){let t=e.state===void 0||e.state===null?null:JSON.stringify(e.state,null,2);return(0,B.jsxs)(`div`,{className:`flex h-full flex-col gap-4 overflow-y-auto p-4`,children:[(0,B.jsx)(Nh,{size:`sm`,bold:!0,children:`Inspector`}),(0,B.jsxs)(kh,{className:`rounded-xl p-3 ring ring-kumo-line`,children:[(0,B.jsx)(z5,{label:`Agent`,children:e.identity?.agent??`—`}),(0,B.jsx)(z5,{label:`Instance`,children:e.identity?.name??`—`}),(0,B.jsx)(z5,{label:`Connection`,children:(0,B.jsx)(L5,{status:e.status})}),(0,B.jsx)(z5,{label:`Turn`,children:R5(e)}),(0,B.jsxs)(z5,{label:`History`,children:[e.messageCount,` messages`]})]}),(0,B.jsxs)(kh,{className:`rounded-xl p-3 ring ring-kumo-line`,children:[(0,B.jsx)(Nh,{size:`xs`,variant:`secondary`,bold:!0,children:`Endpoint`}),(0,B.jsx)(`pre`,{className:`mt-1 overflow-x-auto whitespace-pre-wrap break-all font-mono text-xs text-kumo-subtle`,children:`${e.endpoint.protocol}://${e.endpoint.host}/${e.endpoint.basePath}`})]}),(0,B.jsxs)(kh,{className:`flex-1 rounded-xl p-3 ring ring-kumo-line`,children:[(0,B.jsx)(Nh,{size:`xs`,variant:`secondary`,bold:!0,children:`Live state`}),t===null?(0,B.jsx)(`p`,{className:`mt-1 text-xs italic text-kumo-inactive`,children:`No state yet`}):(0,B.jsx)(`pre`,{className:`mt-1 overflow-x-auto whitespace-pre-wrap break-all font-mono text-xs text-kumo-subtle`,children:t})]})]})}function V5({align:e,variant:t,children:n}){let r=`max-w-[85%] rounded-2xl overflow-hidden`;return(0,B.jsx)(`div`,{className:`flex ${e===`right`?`justify-end`:`justify-start`}`,children:t===`user`?(0,B.jsx)(`div`,{className:`${r} rounded-br-md bg-kumo-contrast text-kumo-inverse`,children:n}):(0,B.jsx)(kh,{className:`${r} rounded-bl-md ring ring-kumo-line`,children:n})})}function H5({connection:e,onDisconnect:t}){let n=(0,V.useMemo)(()=>F5({agent:e.agent,canonicalAgent:e.canonicalAgent,instance:e.instance,url:e.url,host:e.host,protocol:e.protocol,token:e.token,routePrefix:e.routePrefix}),[e]),[r,i]=(0,V.useState)(`connecting`),[a,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(void 0),[l,u]=(0,V.useState)(``),d=(0,V.useRef)(null),{messages:f,sendMessage:p,clearHistory:m,status:h,isStreaming:g,isRecovering:_,addToolApprovalResponse:v}=bk({agent:Pg({agent:e.agent,name:n.instance,basePath:n.basePath,host:n.host,protocol:n.protocol,query:n.query,onOpen:(0,V.useCallback)(()=>i(`connected`),[]),onClose:(0,V.useCallback)(()=>i(`disconnected`),[]),onError:(0,V.useCallback)(()=>i(`disconnected`),[]),onIdentity:(0,V.useCallback)((e,t)=>o({name:e,agent:t}),[]),onStateUpdate:(0,V.useCallback)(e=>c(e),[])}),getInitialMessages:(0,V.useCallback)(async()=>[],[])}),y=r===`connected`,b=g||_;(0,V.useEffect)(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[f]);let x=(0,V.useCallback)(()=>{let e=l.trim();!e||b||(p({role:`user`,parts:[{type:`text`,text:e}]}),u(``))},[l,b,p]);return(0,B.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-kumo-line px-4 py-2.5`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Nh,{bold:!0,children:`Think Studio`}),(0,B.jsx)(Nh,{size:`xs`,variant:`secondary`,children:a?`${a.agent}/${a.name}`:n.basePath})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(L5,{status:r}),(0,B.jsx)(Wh,{}),(0,B.jsx)(Km,{variant:`secondary`,size:`sm`,icon:(0,B.jsx)(zt,{size:14}),onClick:t,children:`Disconnect`})]})]}),(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col p-4`,children:[(0,B.jsxs)(`div`,{ref:d,className:`mb-4 flex-1 space-y-4 overflow-y-auto`,children:[f.length===0?(0,B.jsx)(zh,{icon:(0,B.jsx)(vt,{size:32}),title:`No messages yet`,description:`Send a message to drive a durable turn on this agent.`}):null,f.map(e=>{let t=e.role===`user`;return(0,B.jsx)(`div`,{className:`space-y-2`,children:e.parts.map((e,n)=>{if(e.type===`text`)return!e.text||e.text.trim()===``?null:(0,B.jsx)(V5,{align:t?`right`:`left`,variant:t?`user`:`assistant`,children:(0,B.jsx)(kQ,{className:`sd-theme px-4 py-2.5 text-sm leading-relaxed ${t?`**:text-kumo-inverse`:``}`,plugins:{code:j5},controls:!1,children:e.text})},n);if(e.type===`reasoning`)return!e.text||e.text.trim()===``?null:(0,B.jsx)(`div`,{className:`flex justify-start`,children:(0,B.jsxs)(`div`,{className:`max-w-[85%] rounded-xl border border-kumo-line bg-kumo-elevated px-3 py-2`,children:[(0,B.jsx)(Nh,{size:`xs`,variant:`secondary`,bold:!0,children:`Reasoning`}),(0,B.jsx)(`div`,{className:`mt-1 whitespace-pre-wrap text-xs text-kumo-subtle`,children:e.text})]})},n);if(!OO(e))return null;let r=AO(e),i=e.input,a=e.output,o=e.errorText;if(e.state===`approval-requested`){let t=fk(e)?.id;return(0,B.jsx)(`div`,{className:`flex justify-start`,children:(0,B.jsxs)(kh,{className:`max-w-[85%] rounded-xl px-4 py-3 ring ring-kumo-warning`,children:[(0,B.jsxs)(Nh,{size:`sm`,bold:!0,children:[`Approval needed: `,r]}),(0,B.jsx)(`pre`,{className:`mt-1 mb-3 max-h-40 overflow-auto whitespace-pre-wrap break-all rounded-lg bg-kumo-elevated p-2 font-mono text-xs text-kumo-subtle`,children:JSON.stringify(i,null,2)}),(0,B.jsxs)(`div`,{className:`flex gap-2`,children:[(0,B.jsx)(Km,{variant:`primary`,size:`sm`,disabled:!t,onClick:()=>t&&v({id:t,approved:!0}),children:`Approve`}),(0,B.jsx)(Km,{variant:`secondary`,size:`sm`,disabled:!t,onClick:()=>t&&v({id:t,approved:!1}),children:`Reject`})]})]})},e.toolCallId)}return(0,B.jsx)(`div`,{className:`flex justify-start`,children:(0,B.jsxs)(kh,{className:`max-w-[85%] rounded-xl px-3 py-2 ring ring-kumo-line`,children:[(0,B.jsxs)(`div`,{className:`mb-1 flex items-center gap-2`,children:[(0,B.jsx)(At,{size:14,className:`text-kumo-inactive`}),(0,B.jsx)(Nh,{size:`xs`,variant:`secondary`,bold:!0,children:r}),(0,B.jsx)(U5,{state:e.state})]}),(0,B.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-all font-mono text-xs ${e.state===`output-error`?`text-kumo-danger`:`text-kumo-subtle`}`,children:e.state===`output-error`?o??`Tool failed`:JSON.stringify(e.state===`output-available`?a:i,null,2)})]})},e.toolCallId)})},e.id)})]}),(0,B.jsx)(`div`,{className:`border-t border-kumo-line pt-4`,children:(0,B.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),x()},children:(0,B.jsxs)(`div`,{className:`flex items-end gap-3 rounded-xl border border-kumo-line bg-kumo-base p-3`,children:[(0,B.jsx)(ih,{value:l,onValueChange:u,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),x())},placeholder:y?`Send a message…`:`Connecting to agent…`,disabled:!y||b,rows:2,className:`flex-1 bg-transparent! shadow-none! outline-none! ring-0! focus:ring-0!`,"aria-label":`Message`}),(0,B.jsxs)(`div`,{className:`mb-0.5 flex items-center gap-2`,children:[(0,B.jsx)(Km,{type:`button`,variant:`ghost`,shape:`square`,size:`sm`,"aria-label":`Clear history`,onClick:m,disabled:f.length===0,icon:(0,B.jsx)(Gt,{size:16})}),(0,B.jsx)(Km,{type:`submit`,variant:`primary`,shape:`square`,"aria-label":`Send message`,disabled:!l.trim()||!y||b,icon:(0,B.jsx)(Lt,{size:18}),loading:b})]})]})})})]}),(0,B.jsx)(`div`,{className:`w-80 shrink-0 border-l border-kumo-line`,children:(0,B.jsx)(B5,{status:r,identity:a,endpoint:n,state:s,messageCount:f.length,isStreaming:g,isRecovering:_,chatStatus:h})})]})]})}function U5({state:e}){return e===`output-available`?(0,B.jsx)(ut,{variant:`success`,children:`Done`}):e===`output-error`?(0,B.jsx)(ut,{variant:`destructive`,children:`Error`}):e===`output-denied`?(0,B.jsx)(ut,{variant:`secondary`,children:`Denied`}):(0,B.jsx)(ut,{variant:`info`,children:`Running`})}var W5=(0,V.forwardRef)(({to:e,...t},n)=>(0,B.jsx)(`a`,{ref:n,href:typeof e==`string`?e:void 0,...t}));function G5(){let[e,t]=(0,V.useState)(null),[n,r]=(0,V.useState)(null);return(0,V.useEffect)(()=>{Hh().then(t)},[]),(0,B.jsx)(Rm,{component:W5,children:e===null?(0,B.jsx)(`div`,{className:`flex h-full items-center justify-center text-kumo-inactive`,children:`Loading Think Studio…`}):n===null?(0,B.jsx)(Kh,{config:e,onConnect:r}):(0,B.jsx)(H5,{connection:n,onDisconnect:()=>r(null)})})}(0,Bh.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(G5,{}));export{y as a,l as c,jQ as i,NX as n,p as o,DQ as r,s,aX as t};
|