@cursor/july 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/channels/slack/post-update-delivery.d.ts +85 -0
  2. package/dist/channels/slack/post-update-delivery.d.ts.map +1 -0
  3. package/dist/docs/404.html +2 -2
  4. package/dist/docs/ab.html +3 -3
  5. package/dist/docs/assets/{app.CKFFLL4Z.js → app.DjHC-Ggf.js} +1 -1
  6. package/dist/docs/assets/chunks/@localSearchIndexroot.DZtu0ZIc.js +1 -0
  7. package/dist/docs/assets/chunks/{VPLocalSearchBox.BXk19JBN.js → VPLocalSearchBox.DwviwmIq.js} +1 -1
  8. package/dist/docs/assets/chunks/{theme.BXSPBMyn.js → theme.BIpeYSon.js} +2 -2
  9. package/dist/docs/assets/{example-agents_index.md.BPXjUtRB.js → example-agents_index.md.D2PEVSXl.js} +2 -2
  10. package/dist/docs/assets/{example-agents_index.md.BPXjUtRB.lean.js → example-agents_index.md.D2PEVSXl.lean.js} +1 -1
  11. package/dist/docs/assets/example-agents_security-reviewer.md.BZSNycMf.js +19 -0
  12. package/dist/docs/assets/{example-agents_security-reviewer.md.CE9v-aKm.lean.js → example-agents_security-reviewer.md.BZSNycMf.lean.js} +1 -1
  13. package/dist/docs/building-with-agents.html +3 -3
  14. package/dist/docs/concepts.html +3 -3
  15. package/dist/docs/deployment.html +3 -3
  16. package/dist/docs/evals.html +3 -3
  17. package/dist/docs/example-agents/approval-buddy.html +3 -3
  18. package/dist/docs/example-agents/benny.html +3 -3
  19. package/dist/docs/example-agents/bugbot.html +3 -3
  20. package/dist/docs/example-agents/codebase-wiki.html +3 -3
  21. package/dist/docs/example-agents/codeowners-review.html +3 -3
  22. package/dist/docs/example-agents/concierge.html +3 -3
  23. package/dist/docs/example-agents/fsd.html +3 -3
  24. package/dist/docs/example-agents/index.html +5 -5
  25. package/dist/docs/example-agents/knowledge-base.html +3 -3
  26. package/dist/docs/example-agents/oncall.html +3 -3
  27. package/dist/docs/example-agents/security-reviewer.html +14 -14
  28. package/dist/docs/example-agents/slack-agent.html +3 -3
  29. package/dist/docs/example-agents/weather-agent.html +3 -3
  30. package/dist/docs/guides/agent-to-agent.html +3 -3
  31. package/dist/docs/guides/cloud-runtime.html +3 -3
  32. package/dist/docs/guides/github.html +3 -3
  33. package/dist/docs/guides/human-in-the-loop.html +3 -3
  34. package/dist/docs/guides/mcp-oauth.html +3 -3
  35. package/dist/docs/guides/slack.html +3 -3
  36. package/dist/docs/guides/webhooks.html +3 -3
  37. package/dist/docs/hashmap.json +1 -1
  38. package/dist/docs/hillclimbing.html +3 -3
  39. package/dist/docs/index.html +3 -3
  40. package/dist/docs/quickstart.html +3 -3
  41. package/dist/docs/reference/agent-config.html +3 -3
  42. package/dist/docs/reference/channels.html +3 -3
  43. package/dist/docs/reference/cli.html +3 -3
  44. package/dist/docs/reference/connections.html +3 -3
  45. package/dist/docs/reference/hooks.html +3 -3
  46. package/dist/docs/reference/http-api.html +3 -3
  47. package/dist/docs/reference/instructions.html +3 -3
  48. package/dist/docs/reference/playground.html +3 -3
  49. package/dist/docs/reference/project-layout.html +3 -3
  50. package/dist/docs/reference/prompt.html +3 -3
  51. package/dist/docs/reference/schedules.html +3 -3
  52. package/dist/docs/reference/sessions.html +3 -3
  53. package/dist/docs/reference/skills.html +3 -3
  54. package/dist/docs/reference/subagents.html +3 -3
  55. package/dist/docs/reference/tools.html +3 -3
  56. package/dist/docs/scaffolding-agents.html +3 -3
  57. package/dist/docs/storage.html +3 -3
  58. package/dist/docs/troubleshooting.html +3 -3
  59. package/dist/evals.d.ts +26 -0
  60. package/dist/evals.d.ts.map +1 -1
  61. package/dist/evals.js +30 -0
  62. package/dist/internal/cli-ax.d.ts.map +1 -1
  63. package/dist/internal/cli-ax.js +5 -2
  64. package/dist/internal/eval-run-store.d.ts.map +1 -1
  65. package/dist/internal/eval-run-store.js +7 -0
  66. package/dist/internal/eval-runner.d.ts +2 -0
  67. package/dist/internal/eval-runner.d.ts.map +1 -1
  68. package/dist/internal/eval-runner.js +17 -2
  69. package/dist/internal/evals-client.d.ts.map +1 -1
  70. package/dist/internal/evals-client.js +4 -3
  71. package/dist/internal/persistence-coordinator.d.ts +127 -0
  72. package/dist/internal/persistence-coordinator.d.ts.map +1 -0
  73. package/dist/persistence.d.ts +184 -0
  74. package/dist/persistence.d.ts.map +1 -0
  75. package/dist/playground/assets/index-Bwl4Onx4.js +85 -0
  76. package/dist/playground/assets/index-ByV4nfch.css +1 -0
  77. package/dist/playground/index.html +2 -2
  78. package/docs/example-agents/index.md +1 -1
  79. package/docs/example-agents/security-reviewer.md +23 -21
  80. package/package.json +1 -1
  81. package/skills/evals/SKILL.md +10 -0
  82. package/src/evals.ts +52 -0
  83. package/src/internal/cli-ax.ts +3 -0
  84. package/src/internal/eval-run-store.ts +8 -0
  85. package/src/internal/eval-runner.ts +22 -1
  86. package/src/internal/evals-client.ts +10 -2
  87. package/dist/channels/github/instrument.d.ts +0 -20
  88. package/dist/channels/github/instrument.d.ts.map +0 -1
  89. package/dist/docs/assets/chunks/@localSearchIndexroot.DGWkvXJc.js +0 -1
  90. package/dist/docs/assets/example-agents_security-reviewer.md.CE9v-aKm.js +0 -19
  91. package/dist/internal/json-dir-store.js +0 -100
  92. package/dist/playground/assets/index-CuXb4j4V.css +0 -1
  93. package/dist/playground/assets/index-DeyYpOit.js +0 -86
@@ -0,0 +1,85 @@
1
+ function lz(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function oh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jg={exports:{}},Au={};var Aw;function uz(){if(Aw)return Au;Aw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:a}}return Au.Fragment=t,Au.jsx=n,Au.jsxs=n,Au}var Nw;function cz(){return Nw||(Nw=1,Jg.exports=uz()),Jg.exports}var v=cz(),eb={exports:{}},Et={};var Ow;function fz(){if(Ow)return Et;Ow=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function y(B){return B===null||typeof B!="object"?null:(B=g&&B[g]||B["@@iterator"],typeof B=="function"?B:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function E(B,G,O){this.props=B,this.context=G,this.refs=_,this.updater=O||k}E.prototype.isReactComponent={},E.prototype.setState=function(B,G){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,G,"setState")},E.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function R(){}R.prototype=E.prototype;function T(B,G,O){this.props=B,this.context=G,this.refs=_,this.updater=O||k}var C=T.prototype=new R;C.constructor=T,w(C,E.prototype),C.isPureReactComponent=!0;var A=Array.isArray;function N(){}var I={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function $(B,G,O){var ie=O.ref;return{$$typeof:e,type:B,key:G,ref:ie!==void 0?ie:null,props:O}}function L(B,G){return $(B.type,G,B.props)}function K(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function Z(B){var G={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(O){return G[O]})}var q=/\/+/g;function z(B,G){return typeof B=="object"&&B!==null&&B.key!=null?Z(""+B.key):G.toString(36)}function j(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(N,N):(B.status="pending",B.then(function(G){B.status==="pending"&&(B.status="fulfilled",B.value=G)},function(G){B.status==="pending"&&(B.status="rejected",B.reason=G)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function F(B,G,O,ie,te){var ne=typeof B;(ne==="undefined"||ne==="boolean")&&(B=null);var le=!1;if(B===null)le=!0;else switch(ne){case"bigint":case"string":case"number":le=!0;break;case"object":switch(B.$$typeof){case e:case t:le=!0;break;case h:return le=B._init,F(le(B._payload),G,O,ie,te)}}if(le)return te=te(B),le=ie===""?"."+z(B,0):ie,A(te)?(O="",le!=null&&(O=le.replace(q,"$&/")+"/"),F(te,G,O,"",function(Se){return Se})):te!=null&&(K(te)&&(te=L(te,O+(te.key==null||B&&B.key===te.key?"":(""+te.key).replace(q,"$&/")+"/")+le)),G.push(te)),1;le=0;var pe=ie===""?".":ie+":";if(A(B))for(var ye=0;ye<B.length;ye++)ie=B[ye],ne=pe+z(ie,ye),le+=F(ie,G,O,ne,te);else if(ye=y(B),typeof ye=="function")for(B=ye.call(B),ye=0;!(ie=B.next()).done;)ie=ie.value,ne=pe+z(ie,ye++),le+=F(ie,G,O,ne,te);else if(ne==="object"){if(typeof B.then=="function")return F(j(B),G,O,ie,te);throw G=String(B),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return le}function U(B,G,O){if(B==null)return B;var ie=[],te=0;return F(B,ie,"","",function(ne){return G.call(O,ne,te++)}),ie}function P(B){if(B._status===-1){var G=B._result;G=G(),G.then(function(O){(B._status===0||B._status===-1)&&(B._status=1,B._result=O)},function(O){(B._status===0||B._status===-1)&&(B._status=2,B._result=O)}),B._status===-1&&(B._status=0,B._result=G)}if(B._status===1)return B._result.default;throw B._result}var W=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},D={map:U,forEach:function(B,G,O){U(B,function(){G.apply(this,arguments)},O)},count:function(B){var G=0;return U(B,function(){G++}),G},toArray:function(B){return U(B,function(G){return G})||[]},only:function(B){if(!K(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return Et.Activity=m,Et.Children=D,Et.Component=E,Et.Fragment=n,Et.Profiler=s,Et.PureComponent=T,Et.StrictMode=r,Et.Suspense=p,Et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Et.__COMPILER_RUNTIME={__proto__:null,c:function(B){return I.H.useMemoCache(B)}},Et.cache=function(B){return function(){return B.apply(null,arguments)}},Et.cacheSignal=function(){return null},Et.cloneElement=function(B,G,O){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ie=w({},B.props),te=B.key;if(G!=null)for(ne in G.key!==void 0&&(te=""+G.key),G)!H.call(G,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&G.ref===void 0||(ie[ne]=G[ne]);var ne=arguments.length-2;if(ne===1)ie.children=O;else if(1<ne){for(var le=Array(ne),pe=0;pe<ne;pe++)le[pe]=arguments[pe+2];ie.children=le}return $(B.type,te,ie)},Et.createContext=function(B){return B={$$typeof:l,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:a,_context:B},B},Et.createElement=function(B,G,O){var ie,te={},ne=null;if(G!=null)for(ie in G.key!==void 0&&(ne=""+G.key),G)H.call(G,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(te[ie]=G[ie]);var le=arguments.length-2;if(le===1)te.children=O;else if(1<le){for(var pe=Array(le),ye=0;ye<le;ye++)pe[ye]=arguments[ye+2];te.children=pe}if(B&&B.defaultProps)for(ie in le=B.defaultProps,le)te[ie]===void 0&&(te[ie]=le[ie]);return $(B,ne,te)},Et.createRef=function(){return{current:null}},Et.forwardRef=function(B){return{$$typeof:c,render:B}},Et.isValidElement=K,Et.lazy=function(B){return{$$typeof:h,_payload:{_status:-1,_result:B},_init:P}},Et.memo=function(B,G){return{$$typeof:d,type:B,compare:G===void 0?null:G}},Et.startTransition=function(B){var G=I.T,O={};I.T=O;try{var ie=B(),te=I.S;te!==null&&te(O,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(N,W)}catch(ne){W(ne)}finally{G!==null&&O.types!==null&&(G.types=O.types),I.T=G}},Et.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Et.use=function(B){return I.H.use(B)},Et.useActionState=function(B,G,O){return I.H.useActionState(B,G,O)},Et.useCallback=function(B,G){return I.H.useCallback(B,G)},Et.useContext=function(B){return I.H.useContext(B)},Et.useDebugValue=function(){},Et.useDeferredValue=function(B,G){return I.H.useDeferredValue(B,G)},Et.useEffect=function(B,G){return I.H.useEffect(B,G)},Et.useEffectEvent=function(B){return I.H.useEffectEvent(B)},Et.useId=function(){return I.H.useId()},Et.useImperativeHandle=function(B,G,O){return I.H.useImperativeHandle(B,G,O)},Et.useInsertionEffect=function(B,G){return I.H.useInsertionEffect(B,G)},Et.useLayoutEffect=function(B,G){return I.H.useLayoutEffect(B,G)},Et.useMemo=function(B,G){return I.H.useMemo(B,G)},Et.useOptimistic=function(B,G){return I.H.useOptimistic(B,G)},Et.useReducer=function(B,G,O){return I.H.useReducer(B,G,O)},Et.useRef=function(B){return I.H.useRef(B)},Et.useState=function(B){return I.H.useState(B)},Et.useSyncExternalStore=function(B,G,O){return I.H.useSyncExternalStore(B,G,O)},Et.useTransition=function(){return I.H.useTransition()},Et.version="19.2.6",Et}var Mw;function Ic(){return Mw||(Mw=1,eb.exports=fz()),eb.exports}var x=Ic();const Hu=oh(x),ah=lz({__proto__:null,default:Hu},[x]);var tb={exports:{}},Nu={},nb={exports:{}},rb={};var Iw;function dz(){return Iw||(Iw=1,(function(e){function t(F,U){var P=F.length;F.push(U);e:for(;0<P;){var W=P-1>>>1,D=F[W];if(0<s(D,U))F[W]=U,F[P]=D,P=W;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var U=F[0],P=F.pop();if(P!==U){F[0]=P;e:for(var W=0,D=F.length,B=D>>>1;W<B;){var G=2*(W+1)-1,O=F[G],ie=G+1,te=F[ie];if(0>s(O,P))ie<D&&0>s(te,O)?(F[W]=te,F[ie]=P,W=ie):(F[W]=O,F[G]=P,W=G);else if(ie<D&&0>s(te,P))F[W]=te,F[ie]=P,W=ie;else break e}}return U}function s(F,U){var P=F.sortIndex-U.sortIndex;return P!==0?P:F.id-U.id}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 l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var p=[],d=[],h=1,m=null,g=3,y=!1,k=!1,w=!1,_=!1,E=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(F){for(var U=n(d);U!==null;){if(U.callback===null)r(d);else if(U.startTime<=F)r(d),U.sortIndex=U.expirationTime,t(p,U);else break;U=n(d)}}function A(F){if(w=!1,C(F),!k)if(n(p)!==null)k=!0,N||(N=!0,Z());else{var U=n(d);U!==null&&j(A,U.startTime-F)}}var N=!1,I=-1,H=5,$=-1;function L(){return _?!0:!(e.unstable_now()-$<H)}function K(){if(_=!1,N){var F=e.unstable_now();$=F;var U=!0;try{e:{k=!1,w&&(w=!1,R(I),I=-1),y=!0;var P=g;try{t:{for(C(F),m=n(p);m!==null&&!(m.expirationTime>F&&L());){var W=m.callback;if(typeof W=="function"){m.callback=null,g=m.priorityLevel;var D=W(m.expirationTime<=F);if(F=e.unstable_now(),typeof D=="function"){m.callback=D,C(F),U=!0;break t}m===n(p)&&r(p),C(F)}else r(p);m=n(p)}if(m!==null)U=!0;else{var B=n(d);B!==null&&j(A,B.startTime-F),U=!1}}break e}finally{m=null,g=P,y=!1}U=void 0}}finally{U?Z():N=!1}}}var Z;if(typeof T=="function")Z=function(){T(K)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,z=q.port2;q.port1.onmessage=K,Z=function(){z.postMessage(null)}}else Z=function(){E(K,0)};function j(F,U){I=E(function(){F(e.unstable_now())},U)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var U=3;break;default:U=g}var P=g;g=U;try{return F()}finally{g=P}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(F,U){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var P=g;g=F;try{return U()}finally{g=P}},e.unstable_scheduleCallback=function(F,U,P){var W=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?W+P:W):P=W,F){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=P+D,F={id:h++,callback:U,priorityLevel:F,startTime:P,expirationTime:D,sortIndex:-1},P>W?(F.sortIndex=P,t(d,F),n(p)===null&&F===n(d)&&(w?(R(I),I=-1):w=!0,j(A,P-W))):(F.sortIndex=D,t(p,F),k||y||(k=!0,N||(N=!0,Z()))),F},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(F){var U=g;return function(){var P=g;g=U;try{return F.apply(this,arguments)}finally{g=P}}}})(rb)),rb}var Dw;function pz(){return Dw||(Dw=1,nb.exports=dz()),nb.exports}var ib={exports:{}},ur={};var zw;function hz(){if(zw)return ur;zw=1;var e=Ic();function t(p){var d="https://react.dev/errors/"+p;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+p+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(p,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:p,containerInfo:d,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(p,d){if(p==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ur.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ur.createPortal=function(p,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return a(p,d,null,h)},ur.flushSync=function(p){var d=l.T,h=r.p;try{if(l.T=null,r.p=2,p)return p()}finally{l.T=d,r.p=h,r.d.f()}},ur.preconnect=function(p,d){typeof p=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(p,d))},ur.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},ur.preinit=function(p,d){if(typeof p=="string"&&d&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(p,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:y}):h==="script"&&r.d.X(p,{crossOrigin:m,integrity:g,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ur.preinitModule=function(p,d){if(typeof p=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);r.d.M(p,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(p)},ur.preload=function(p,d){if(typeof p=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin);r.d.L(p,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ur.preloadModule=function(p,d){if(typeof p=="string")if(d){var h=c(d.as,d.crossOrigin);r.d.m(p,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(p)},ur.requestFormReset=function(p){r.d.r(p)},ur.unstable_batchedUpdates=function(p,d){return p(d)},ur.useFormState=function(p,d,h){return l.H.useFormState(p,d,h)},ur.useFormStatus=function(){return l.H.useHostTransitionStatus()},ur.version="19.2.6",ur}var Lw;function G_(){if(Lw)return ib.exports;Lw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ib.exports=hz(),ib.exports}var jw;function mz(){if(jw)return Nu;jw=1;var e=pz(),t=Ic(),n=G_();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function a(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function l(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function c(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function p(i){if(a(i)!==i)throw Error(r(188))}function d(i){var o=i.alternate;if(!o){if(o=a(i),o===null)throw Error(r(188));return o!==i?null:i}for(var u=i,f=o;;){var b=u.return;if(b===null)break;var S=b.alternate;if(S===null){if(f=b.return,f!==null){u=f;continue}break}if(b.child===S.child){for(S=b.child;S;){if(S===u)return p(b),i;if(S===f)return p(b),o;S=S.sibling}throw Error(r(188))}if(u.return!==f.return)u=b,f=S;else{for(var M=!1,V=b.child;V;){if(V===u){M=!0,u=b,f=S;break}if(V===f){M=!0,f=b,u=S;break}V=V.sibling}if(!M){for(V=S.child;V;){if(V===u){M=!0,u=S,f=b;break}if(V===f){M=!0,f=S,u=b;break}V=V.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==f)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:o}function h(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=h(i),o!==null)return o;i=i.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function Z(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function z(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case E:return"Profiler";case _:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList";case $:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case T:return i.displayName||"Context";case R:return(i._context.displayName||"Context")+".Consumer";case C:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return o=i.displayName||null,o!==null?o:z(i.type)||"Memo";case H:o=i._payload,i=i._init;try{return z(i(o))}catch{}}return null}var j=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},W=[],D=-1;function B(i){return{current:i}}function G(i){0>D||(i.current=W[D],W[D]=null,D--)}function O(i,o){D++,W[D]=i.current,i.current=o}var ie=B(null),te=B(null),ne=B(null),le=B(null);function pe(i,o){switch(O(ne,o),O(te,i),O(ie,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?QS(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=QS(o),i=JS(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}G(ie),O(ie,i)}function ye(){G(ie),G(te),G(ne)}function Se(i){i.memoizedState!==null&&O(le,i);var o=ie.current,u=JS(o,i.type);o!==u&&(O(te,i),O(ie,u))}function ze(i){te.current===i&&(G(ie),G(te)),le.current===i&&(G(le),Tu._currentValue=P)}var he,Te;function Re(i){if(he===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);he=o&&o[1]||"",Te=-1<u.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+he+i+Te}var Oe=!1;function ve(i,o){if(!i||Oe)return"";Oe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(o){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(be){var me=be}Reflect.construct(i,[],Ae)}else{try{Ae.call()}catch(be){me=be}i.call(Ae.prototype)}}else{try{throw Error()}catch(be){me=be}(Ae=i())&&typeof Ae.catch=="function"&&Ae.catch(function(){})}}catch(be){if(be&&me&&typeof be.stack=="string")return[be.stack,me.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=f.DetermineComponentFrameRoot(),M=S[0],V=S[1];if(M&&V){var Q=M.split(`
4
+ `),de=V.split(`
5
+ `);for(b=f=0;f<Q.length&&!Q[f].includes("DetermineComponentFrameRoot");)f++;for(;b<de.length&&!de[b].includes("DetermineComponentFrameRoot");)b++;if(f===Q.length||b===de.length)for(f=Q.length-1,b=de.length-1;1<=f&&0<=b&&Q[f]!==de[b];)b--;for(;1<=f&&0<=b;f--,b--)if(Q[f]!==de[b]){if(f!==1||b!==1)do if(f--,b--,0>b||Q[f]!==de[b]){var ke=`
6
+ `+Q[f].replace(" at new "," at ");return i.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",i.displayName)),ke}while(1<=f&&0<=b);break}}}finally{Oe=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Re(u):""}function xe(i,o){switch(i.tag){case 26:case 27:case 5:return Re(i.type);case 16:return Re("Lazy");case 13:return i.child!==o&&o!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return ve(i.type,!1);case 11:return ve(i.type.render,!1);case 1:return ve(i.type,!0);case 31:return Re("Activity");default:return""}}function Me(i){try{var o="",u=null;do o+=xe(i,u),u=i,i=i.return;while(i);return o}catch(f){return`
7
+ Error generating stack: `+f.message+`
8
+ `+f.stack}}var Ce=Object.prototype.hasOwnProperty,Pe=e.unstable_scheduleCallback,ge=e.unstable_cancelCallback,fe=e.unstable_shouldYield,oe=e.unstable_requestPaint,re=e.unstable_now,_e=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,ue=e.unstable_UserBlockingPriority,Ie=e.unstable_NormalPriority,Be=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,Ye=e.log,ot=e.unstable_setDisableYieldValue,it=null,nt=null;function vt(i){if(typeof Ye=="function"&&ot(i),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(it,i)}catch{}}var st=Math.clz32?Math.clz32:Ot,xt=Math.log,We=Math.LN2;function Ot(i){return i>>>=0,i===0?32:31-(xt(i)/We|0)|0}var Fe=256,Ke=262144,ht=4194304;function Xe(i){var o=i&42;if(o!==0)return o;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Y(i,o,u){var f=i.pendingLanes;if(f===0)return 0;var b=0,S=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var V=f&134217727;return V!==0?(f=V&~S,f!==0?b=Xe(f):(M&=V,M!==0?b=Xe(M):u||(u=V&~i,u!==0&&(b=Xe(u))))):(V=f&~S,V!==0?b=Xe(V):M!==0?b=Xe(M):u||(u=f&~i,u!==0&&(b=Xe(u)))),b===0?0:o!==0&&o!==b&&(o&S)===0&&(S=b&-b,u=o&-o,S>=u||S===32&&(u&4194048)!==0)?o:b}function X(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function we(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Ge(){var i=ht;return ht<<=1,(ht&62914560)===0&&(ht=4194304),i}function ct(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function St(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function $e(i,o,u,f,b,S){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var V=i.entanglements,Q=i.expirationTimes,de=i.hiddenUpdates;for(u=M&~u;0<u;){var ke=31-st(u),Ae=1<<ke;V[ke]=0,Q[ke]=-1;var me=de[ke];if(me!==null)for(de[ke]=null,ke=0;ke<me.length;ke++){var be=me[ke];be!==null&&(be.lane&=-536870913)}u&=~Ae}f!==0&&Le(i,f,0),S!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=S&~(M&~o))}function Le(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var f=31-st(o);i.entangledLanes|=o,i.entanglements[f]=i.entanglements[f]|1073741824|u&261930}function qe(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var f=31-st(u),b=1<<f;b&o|i[f]&o&&(i[f]|=o),u&=~b}}function Wt(i,o){var u=o&-o;return u=(u&42)!==0?1:tt(u),(u&(i.suspendedLanes|o))!==0?0:u}function tt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Dt(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Kn(){var i=U.p;return i!==0?i:(i=window.event,i===void 0?32:Sw(i.type))}function Qn(i,o){var u=U.p;try{return U.p=i,o()}finally{U.p=u}}var Tn=Math.random().toString(36).slice(2),an="__reactFiber$"+Tn,Jn="__reactProps$"+Tn,Hi="__reactContainer$"+Tn,Ll="__reactEvents$"+Tn,af="__reactListeners$"+Tn,da="__reactHandles$"+Tn,lf="__reactResources$"+Tn,xo="__reactMarker$"+Tn;function jl(i){delete i[an],delete i[Jn],delete i[Ll],delete i[af],delete i[da]}function yr(i){var o=i[an];if(o)return o;for(var u=i.parentNode;u;){if(o=u[Hi]||u[an]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=ow(i);i!==null;){if(u=i[an])return u;i=ow(i)}return o}i=u,u=i.parentNode}return null}function Gi(i){if(i=i[an]||i[Hi]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function Cs(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function As(i){var o=i[lf];return o||(o=i[lf]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Ln(i){i[xo]=!0}var uf=new Set,ko={};function Vi(i,o){De(i,o),De(i+"Capture",o)}function De(i,o){for(ko[i]=o,i=0;i<o.length;i++)uf.add(o[i])}var at=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]*$"),Mt={},Yt={};function On(i){return Ce.call(Yt,i)?!0:Ce.call(Mt,i)?!1:at.test(i)?Yt[i]=!0:(Mt[i]=!0,!1)}function lr(i,o,u){if(On(o))if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var f=o.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+u)}}function $r(i,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+u)}}function Tr(i,o,u,f){if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(o,u,""+f)}}function cn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Br(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function cf(i,o,u){var f=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var b=f.get,S=f.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return b.call(this)},set:function(M){u=""+M,S.call(this,M)}}),Object.defineProperty(i,o,{enumerable:f.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function pa(i){if(!i._valueTracker){var o=Br(i)?"checked":"value";i._valueTracker=cf(i,o,""+i[o])}}function Pl(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),f="";return i&&(f=Br(i)?i.checked?"true":"false":i.value),i=f,i!==u?(o.setValue(i),!0):!1}function ha(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Qh=/[\n"\\]/g;function _r(i){return i.replace(Qh,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function $l(i,o,u,f,b,S,M,V){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),o!=null?M==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+cn(o)):i.value!==""+cn(o)&&(i.value=""+cn(o)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),o!=null?ma(i,M,cn(o)):u!=null?ma(i,M,cn(u)):f!=null&&i.removeAttribute("value"),b==null&&S!=null&&(i.defaultChecked=!!S),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?i.name=""+cn(V):i.removeAttribute("name")}function So(i,o,u,f,b,S,M,V){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.type=S),o!=null||u!=null){if(!(S!=="submit"&&S!=="reset"||o!=null)){pa(i);return}u=u!=null?""+cn(u):"",o=o!=null?""+cn(o):u,V||o===i.value||(i.value=o),i.defaultValue=o}f=f??b,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=V?i.checked:!!f,i.defaultChecked=!!f,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),pa(i)}function ma(i,o,u){o==="number"&&ha(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function er(i,o,u,f){if(i=i.options,o){o={};for(var b=0;b<u.length;b++)o["$"+u[b]]=!0;for(u=0;u<i.length;u++)b=o.hasOwnProperty("$"+i[u].value),i[u].selected!==b&&(i[u].selected=b),b&&f&&(i[u].defaultSelected=!0)}else{for(u=""+cn(u),o=null,b=0;b<i.length;b++){if(i[b].value===u){i[b].selected=!0,f&&(i[b].defaultSelected=!0);return}o!==null||i[b].disabled||(o=i[b])}o!==null&&(o.selected=!0)}}function ff(i,o,u){if(o!=null&&(o=""+cn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+cn(u):""}function ga(i,o,u,f){if(o==null){if(f!=null){if(u!=null)throw Error(r(92));if(j(f)){if(1<f.length)throw Error(r(93));f=f[0]}u=f}u==null&&(u=""),o=u}u=cn(o),i.defaultValue=u,f=i.textContent,f===u&&f!==""&&f!==null&&(i.value=f),pa(i)}function mt(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var df=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 jn(i,o,u){var f=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?f?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":f?i.setProperty(o,u):typeof u!="number"||u===0||df.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function Xt(i,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,u!=null){for(var f in u)!u.hasOwnProperty(f)||o!=null&&o.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var b in o)f=o[b],o.hasOwnProperty(b)&&u[b]!==f&&jn(i,b,f)}else for(var S in o)o.hasOwnProperty(S)&&jn(i,S,o[S])}function Ns(i){if(i.indexOf("-")===-1)return!1;switch(i){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 Ki=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"]]),Bl=/^[\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 Os(i){return Bl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ue(){}var Je=null;function Tt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Pt=null,kn=null;function Qr(i){var o=Gi(i);if(o&&(i=o.stateNode)){var u=i[Jn]||null;e:switch(i=o.stateNode,o.type){case"input":if($l(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+_r(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var f=u[o];if(f!==i&&f.form===i.form){var b=f[Jn]||null;if(!b)throw Error(r(90));$l(f,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(o=0;o<u.length;o++)f=u[o],f.form===i.form&&Pl(f)}break e;case"textarea":ff(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&er(i,!!u.multiple,o,!1)}}}var Fl=!1;function pf(i,o,u){if(Fl)return i(o,u);Fl=!0;try{var f=i(o);return f}finally{if(Fl=!1,(Pt!==null||kn!==null)&&(ed(),Pt&&(o=Pt,i=kn,kn=Pt=null,Qr(o),i)))for(o=0;o<i.length;o++)Qr(i[o])}}function Ul(i,o){var u=i.stateNode;if(u===null)return null;var f=u[Jn]||null;if(f===null)return null;u=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var Zi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jh=!1;if(Zi)try{var ql={};Object.defineProperty(ql,"passive",{get:function(){Jh=!0}}),window.addEventListener("test",ql,ql),window.removeEventListener("test",ql,ql)}catch{Jh=!1}var Ms=null,em=null,hf=null;function Jx(){if(hf)return hf;var i,o=em,u=o.length,f,b="value"in Ms?Ms.value:Ms.textContent,S=b.length;for(i=0;i<u&&o[i]===b[i];i++);var M=u-i;for(f=1;f<=M&&o[u-f]===b[S-f];f++);return hf=b.slice(i,1<f?1-f:void 0)}function mf(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function gf(){return!0}function ek(){return!1}function Rr(i){function o(u,f,b,S,M){this._reactName=u,this._targetInst=b,this.type=f,this.nativeEvent=S,this.target=M,this.currentTarget=null;for(var V in i)i.hasOwnProperty(V)&&(u=i[V],this[V]=u?u(S):S[V]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?gf:ek,this.isPropagationStopped=ek,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=gf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=gf)},persist:function(){},isPersistent:gf}),o}var wo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bf=Rr(wo),Hl=m({},wo,{view:0,detail:0}),oI=Rr(Hl),tm,nm,Gl,yf=m({},Hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:im,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Gl&&(Gl&&i.type==="mousemove"?(tm=i.screenX-Gl.screenX,nm=i.screenY-Gl.screenY):nm=tm=0,Gl=i),tm)},movementY:function(i){return"movementY"in i?i.movementY:nm}}),tk=Rr(yf),aI=m({},yf,{dataTransfer:0}),lI=Rr(aI),uI=m({},Hl,{relatedTarget:0}),rm=Rr(uI),cI=m({},wo,{animationName:0,elapsedTime:0,pseudoElement:0}),fI=Rr(cI),dI=m({},wo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),pI=Rr(dI),hI=m({},wo,{data:0}),nk=Rr(hI),mI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gI={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"},bI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yI(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=bI[i])?!!o[i]:!1}function im(){return yI}var vI=m({},Hl,{key:function(i){if(i.key){var o=mI[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=mf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?gI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:im,charCode:function(i){return i.type==="keypress"?mf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?mf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),xI=Rr(vI),kI=m({},yf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rk=Rr(kI),SI=m({},Hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:im}),wI=Rr(SI),EI=m({},wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),TI=Rr(EI),_I=m({},yf,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),RI=Rr(_I),CI=m({},wo,{newState:0,oldState:0}),AI=Rr(CI),NI=[9,13,27,32],sm=Zi&&"CompositionEvent"in window,Vl=null;Zi&&"documentMode"in document&&(Vl=document.documentMode);var OI=Zi&&"TextEvent"in window&&!Vl,ik=Zi&&(!sm||Vl&&8<Vl&&11>=Vl),sk=" ",ok=!1;function ak(i,o){switch(i){case"keyup":return NI.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lk(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ba=!1;function MI(i,o){switch(i){case"compositionend":return lk(o);case"keypress":return o.which!==32?null:(ok=!0,sk);case"textInput":return i=o.data,i===sk&&ok?null:i;default:return null}}function II(i,o){if(ba)return i==="compositionend"||!sm&&ak(i,o)?(i=Jx(),hf=em=Ms=null,ba=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return ik&&o.locale!=="ko"?null:o.data;default:return null}}var DI={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 uk(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!DI[i.type]:o==="textarea"}function ck(i,o,u,f){Pt?kn?kn.push(f):kn=[f]:Pt=f,o=ad(o,"onChange"),0<o.length&&(u=new bf("onChange","change",null,u,f),i.push({event:u,listeners:o}))}var Kl=null,Zl=null;function zI(i){VS(i,0)}function vf(i){var o=Cs(i);if(Pl(o))return i}function fk(i,o){if(i==="change")return o}var dk=!1;if(Zi){var om;if(Zi){var am="oninput"in document;if(!am){var pk=document.createElement("div");pk.setAttribute("oninput","return;"),am=typeof pk.oninput=="function"}om=am}else om=!1;dk=om&&(!document.documentMode||9<document.documentMode)}function hk(){Kl&&(Kl.detachEvent("onpropertychange",mk),Zl=Kl=null)}function mk(i){if(i.propertyName==="value"&&vf(Zl)){var o=[];ck(o,Zl,i,Tt(i)),pf(zI,o)}}function LI(i,o,u){i==="focusin"?(hk(),Kl=o,Zl=u,Kl.attachEvent("onpropertychange",mk)):i==="focusout"&&hk()}function jI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return vf(Zl)}function PI(i,o){if(i==="click")return vf(o)}function $I(i,o){if(i==="input"||i==="change")return vf(o)}function BI(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Fr=typeof Object.is=="function"?Object.is:BI;function Wl(i,o){if(Fr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),f=Object.keys(o);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var b=u[f];if(!Ce.call(o,b)||!Fr(i[b],o[b]))return!1}return!0}function gk(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function bk(i,o){var u=gk(i);i=0;for(var f;u;){if(u.nodeType===3){if(f=i+u.textContent.length,i<=o&&f>=o)return{node:u,offset:o-i};i=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=gk(u)}}function yk(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?yk(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function vk(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=ha(i.document);o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)i=o.contentWindow;else break;o=ha(i.document)}return o}function lm(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var FI=Zi&&"documentMode"in document&&11>=document.documentMode,ya=null,um=null,Yl=null,cm=!1;function xk(i,o,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;cm||ya==null||ya!==ha(f)||(f=ya,"selectionStart"in f&&lm(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Yl&&Wl(Yl,f)||(Yl=f,f=ad(um,"onSelect"),0<f.length&&(o=new bf("onSelect","select",null,o,u),i.push({event:o,listeners:f}),o.target=ya)))}function Eo(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var va={animationend:Eo("Animation","AnimationEnd"),animationiteration:Eo("Animation","AnimationIteration"),animationstart:Eo("Animation","AnimationStart"),transitionrun:Eo("Transition","TransitionRun"),transitionstart:Eo("Transition","TransitionStart"),transitioncancel:Eo("Transition","TransitionCancel"),transitionend:Eo("Transition","TransitionEnd")},fm={},kk={};Zi&&(kk=document.createElement("div").style,"AnimationEvent"in window||(delete va.animationend.animation,delete va.animationiteration.animation,delete va.animationstart.animation),"TransitionEvent"in window||delete va.transitionend.transition);function To(i){if(fm[i])return fm[i];if(!va[i])return i;var o=va[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in kk)return fm[i]=o[u];return i}var Sk=To("animationend"),wk=To("animationiteration"),Ek=To("animationstart"),UI=To("transitionrun"),qI=To("transitionstart"),HI=To("transitioncancel"),Tk=To("transitionend"),_k=new Map,dm="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(" ");dm.push("scrollEnd");function gi(i,o){_k.set(i,o),Vi(o,[i])}var xf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Jr=[],xa=0,pm=0;function kf(){for(var i=xa,o=pm=xa=0;o<i;){var u=Jr[o];Jr[o++]=null;var f=Jr[o];Jr[o++]=null;var b=Jr[o];Jr[o++]=null;var S=Jr[o];if(Jr[o++]=null,f!==null&&b!==null){var M=f.pending;M===null?b.next=b:(b.next=M.next,M.next=b),f.pending=b}S!==0&&Rk(u,b,S)}}function Sf(i,o,u,f){Jr[xa++]=i,Jr[xa++]=o,Jr[xa++]=u,Jr[xa++]=f,pm|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function hm(i,o,u,f){return Sf(i,o,u,f),wf(i)}function _o(i,o){return Sf(i,null,null,o),wf(i)}function Rk(i,o,u){i.lanes|=u;var f=i.alternate;f!==null&&(f.lanes|=u);for(var b=!1,S=i.return;S!==null;)S.childLanes|=u,f=S.alternate,f!==null&&(f.childLanes|=u),S.tag===22&&(i=S.stateNode,i===null||i._visibility&1||(b=!0)),i=S,S=S.return;return i.tag===3?(S=i.stateNode,b&&o!==null&&(b=31-st(u),i=S.hiddenUpdates,f=i[b],f===null?i[b]=[o]:f.push(o),o.lane=u|536870912),S):null}function wf(i){if(50<yu)throw yu=0,wg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var ka={};function GI(i,o,u,f){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(i,o,u,f){return new GI(i,o,u,f)}function mm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Wi(i,o){var u=i.alternate;return u===null?(u=Ur(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function Ck(i,o){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,o=u.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function Ef(i,o,u,f,b,S){var M=0;if(f=i,typeof i=="function")mm(i)&&(M=1);else if(typeof i=="string")M=YD(i,u,ie.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case $:return i=Ur(31,u,o,b),i.elementType=$,i.lanes=S,i;case w:return Ro(u.children,b,S,o);case _:M=8,b|=24;break;case E:return i=Ur(12,u,o,b|2),i.elementType=E,i.lanes=S,i;case A:return i=Ur(13,u,o,b),i.elementType=A,i.lanes=S,i;case N:return i=Ur(19,u,o,b),i.elementType=N,i.lanes=S,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:M=10;break e;case R:M=9;break e;case C:M=11;break e;case I:M=14;break e;case H:M=16,f=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),f=null}return o=Ur(M,u,o,b),o.elementType=i,o.type=f,o.lanes=S,o}function Ro(i,o,u,f){return i=Ur(7,i,f,o),i.lanes=u,i}function gm(i,o,u){return i=Ur(6,i,null,o),i.lanes=u,i}function Ak(i){var o=Ur(18,null,null,0);return o.stateNode=i,o}function bm(i,o,u){return o=Ur(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var Nk=new WeakMap;function ei(i,o){if(typeof i=="object"&&i!==null){var u=Nk.get(i);return u!==void 0?u:(o={value:i,source:o,stack:Me(o)},Nk.set(i,o),o)}return{value:i,source:o,stack:Me(o)}}var Sa=[],wa=0,Tf=null,Xl=0,ti=[],ni=0,Is=null,Ai=1,Ni="";function Yi(i,o){Sa[wa++]=Xl,Sa[wa++]=Tf,Tf=i,Xl=o}function Ok(i,o,u){ti[ni++]=Ai,ti[ni++]=Ni,ti[ni++]=Is,Is=i;var f=Ai;i=Ni;var b=32-st(f)-1;f&=~(1<<b),u+=1;var S=32-st(o)+b;if(30<S){var M=b-b%5;S=(f&(1<<M)-1).toString(32),f>>=M,b-=M,Ai=1<<32-st(o)+b|u<<b|f,Ni=S+i}else Ai=1<<S|u<<b|f,Ni=i}function ym(i){i.return!==null&&(Yi(i,1),Ok(i,1,0))}function vm(i){for(;i===Tf;)Tf=Sa[--wa],Sa[wa]=null,Xl=Sa[--wa],Sa[wa]=null;for(;i===Is;)Is=ti[--ni],ti[ni]=null,Ni=ti[--ni],ti[ni]=null,Ai=ti[--ni],ti[ni]=null}function Mk(i,o){ti[ni++]=Ai,ti[ni++]=Ni,ti[ni++]=Is,Ai=o.id,Ni=o.overflow,Is=i}var tr=null,hn=null,Ut=!1,Ds=null,ri=!1,xm=Error(r(519));function zs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ql(ei(o,i)),xm}function Ik(i){var o=i.stateNode,u=i.type,f=i.memoizedProps;switch(o[an]=i,o[Jn]=f,u){case"dialog":Lt("cancel",o),Lt("close",o);break;case"iframe":case"object":case"embed":Lt("load",o);break;case"video":case"audio":for(u=0;u<xu.length;u++)Lt(xu[u],o);break;case"source":Lt("error",o);break;case"img":case"image":case"link":Lt("error",o),Lt("load",o);break;case"details":Lt("toggle",o);break;case"input":Lt("invalid",o),So(o,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":Lt("invalid",o);break;case"textarea":Lt("invalid",o),ga(o,f.value,f.defaultValue,f.children)}u=f.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||f.suppressHydrationWarning===!0||YS(o.textContent,u)?(f.popover!=null&&(Lt("beforetoggle",o),Lt("toggle",o)),f.onScroll!=null&&Lt("scroll",o),f.onScrollEnd!=null&&Lt("scrollend",o),f.onClick!=null&&(o.onclick=Ue),o=!0):o=!1,o||zs(i,!0)}function Dk(i){for(tr=i.return;tr;)switch(tr.tag){case 5:case 31:case 13:ri=!1;return;case 27:case 3:ri=!0;return;default:tr=tr.return}}function Ea(i){if(i!==tr)return!1;if(!Ut)return Dk(i),Ut=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||Pg(i.type,i.memoizedProps)),u=!u),u&&hn&&zs(i),Dk(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));hn=sw(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));hn=sw(i)}else o===27?(o=hn,Ws(i.type)?(i=qg,qg=null,hn=i):hn=o):hn=tr?si(i.stateNode.nextSibling):null;return!0}function Co(){hn=tr=null,Ut=!1}function km(){var i=Ds;return i!==null&&(Or===null?Or=i:Or.push.apply(Or,i),Ds=null),i}function Ql(i){Ds===null?Ds=[i]:Ds.push(i)}var Sm=B(null),Ao=null,Xi=null;function Ls(i,o,u){O(Sm,o._currentValue),o._currentValue=u}function Qi(i){i._currentValue=Sm.current,G(Sm)}function wm(i,o,u){for(;i!==null;){var f=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),i===u)break;i=i.return}}function Em(i,o,u,f){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var S=b.dependencies;if(S!==null){var M=b.child;S=S.firstContext;e:for(;S!==null;){var V=S;S=b;for(var Q=0;Q<o.length;Q++)if(V.context===o[Q]){S.lanes|=u,V=S.alternate,V!==null&&(V.lanes|=u),wm(S.return,u,i),f||(M=null);break e}S=V.next}}else if(b.tag===18){if(M=b.return,M===null)throw Error(r(341));M.lanes|=u,S=M.alternate,S!==null&&(S.lanes|=u),wm(M,u,i),M=null}else M=b.child;if(M!==null)M.return=b;else for(M=b;M!==null;){if(M===i){M=null;break}if(b=M.sibling,b!==null){b.return=M.return,M=b;break}M=M.return}b=M}}function Ta(i,o,u,f){i=null;for(var b=o,S=!1;b!==null;){if(!S){if((b.flags&524288)!==0)S=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var M=b.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var V=b.type;Fr(b.pendingProps.value,M.value)||(i!==null?i.push(V):i=[V])}}else if(b===le.current){if(M=b.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(Tu):i=[Tu])}b=b.return}i!==null&&Em(o,i,u,f),o.flags|=262144}function _f(i){for(i=i.firstContext;i!==null;){if(!Fr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function No(i){Ao=i,Xi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function nr(i){return zk(Ao,i)}function Rf(i,o){return Ao===null&&No(i),zk(i,o)}function zk(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},Xi===null){if(i===null)throw Error(r(308));Xi=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else Xi=Xi.next=o;return u}var VI=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(u,f){i.push(f)}};this.abort=function(){o.aborted=!0,i.forEach(function(u){return u()})}},KI=e.unstable_scheduleCallback,ZI=e.unstable_NormalPriority,Pn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Tm(){return{controller:new VI,data:new Map,refCount:0}}function Jl(i){i.refCount--,i.refCount===0&&KI(ZI,function(){i.controller.abort()})}var eu=null,_m=0,_a=0,Ra=null;function WI(i,o){if(eu===null){var u=eu=[];_m=0,_a=Ag(),Ra={status:"pending",value:void 0,then:function(f){u.push(f)}}}return _m++,o.then(Lk,Lk),o}function Lk(){if(--_m===0&&eu!==null){Ra!==null&&(Ra.status="fulfilled");var i=eu;eu=null,_a=0,Ra=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function YI(i,o){var u=[],f={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return i.then(function(){f.status="fulfilled",f.value=o;for(var b=0;b<u.length;b++)(0,u[b])(o)},function(b){for(f.status="rejected",f.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),f}var jk=F.S;F.S=function(i,o){xS=re(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&WI(i,o),jk!==null&&jk(i,o)};var Oo=B(null);function Rm(){var i=Oo.current;return i!==null?i:ln.pooledCache}function Cf(i,o){o===null?O(Oo,Oo.current):O(Oo,o.pool)}function Pk(){var i=Rm();return i===null?null:{parent:Pn._currentValue,pool:i}}var Ca=Error(r(460)),Cm=Error(r(474)),Af=Error(r(542)),Nf={then:function(){}};function $k(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Bk(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Ue,Ue),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Uk(i),i;default:if(typeof o.status=="string")o.then(Ue,Ue);else{if(i=ln,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(f){if(o.status==="pending"){var b=o;b.status="fulfilled",b.value=f}},function(f){if(o.status==="pending"){var b=o;b.status="rejected",b.reason=f}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Uk(i),i}throw Io=o,Ca}}function Mo(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Io=u,Ca):u}}var Io=null;function Fk(){if(Io===null)throw Error(r(459));var i=Io;return Io=null,i}function Uk(i){if(i===Ca||i===Af)throw Error(r(483))}var Aa=null,tu=0;function Of(i){var o=tu;return tu+=1,Aa===null&&(Aa=[]),Bk(Aa,i,o)}function nu(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Mf(i,o){throw o.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function qk(i){function o(ae,se){if(i){var ce=ae.deletions;ce===null?(ae.deletions=[se],ae.flags|=16):ce.push(se)}}function u(ae,se){if(!i)return null;for(;se!==null;)o(ae,se),se=se.sibling;return null}function f(ae){for(var se=new Map;ae!==null;)ae.key!==null?se.set(ae.key,ae):se.set(ae.index,ae),ae=ae.sibling;return se}function b(ae,se){return ae=Wi(ae,se),ae.index=0,ae.sibling=null,ae}function S(ae,se,ce){return ae.index=ce,i?(ce=ae.alternate,ce!==null?(ce=ce.index,ce<se?(ae.flags|=67108866,se):ce):(ae.flags|=67108866,se)):(ae.flags|=1048576,se)}function M(ae){return i&&ae.alternate===null&&(ae.flags|=67108866),ae}function V(ae,se,ce,Ee){return se===null||se.tag!==6?(se=gm(ce,ae.mode,Ee),se.return=ae,se):(se=b(se,ce),se.return=ae,se)}function Q(ae,se,ce,Ee){var ft=ce.type;return ft===w?ke(ae,se,ce.props.children,Ee,ce.key):se!==null&&(se.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===H&&Mo(ft)===se.type)?(se=b(se,ce.props),nu(se,ce),se.return=ae,se):(se=Ef(ce.type,ce.key,ce.props,null,ae.mode,Ee),nu(se,ce),se.return=ae,se)}function de(ae,se,ce,Ee){return se===null||se.tag!==4||se.stateNode.containerInfo!==ce.containerInfo||se.stateNode.implementation!==ce.implementation?(se=bm(ce,ae.mode,Ee),se.return=ae,se):(se=b(se,ce.children||[]),se.return=ae,se)}function ke(ae,se,ce,Ee,ft){return se===null||se.tag!==7?(se=Ro(ce,ae.mode,Ee,ft),se.return=ae,se):(se=b(se,ce),se.return=ae,se)}function Ae(ae,se,ce){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return se=gm(""+se,ae.mode,ce),se.return=ae,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case y:return ce=Ef(se.type,se.key,se.props,null,ae.mode,ce),nu(ce,se),ce.return=ae,ce;case k:return se=bm(se,ae.mode,ce),se.return=ae,se;case H:return se=Mo(se),Ae(ae,se,ce)}if(j(se)||Z(se))return se=Ro(se,ae.mode,ce,null),se.return=ae,se;if(typeof se.then=="function")return Ae(ae,Of(se),ce);if(se.$$typeof===T)return Ae(ae,Rf(ae,se),ce);Mf(ae,se)}return null}function me(ae,se,ce,Ee){var ft=se!==null?se.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return ft!==null?null:V(ae,se,""+ce,Ee);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return ce.key===ft?Q(ae,se,ce,Ee):null;case k:return ce.key===ft?de(ae,se,ce,Ee):null;case H:return ce=Mo(ce),me(ae,se,ce,Ee)}if(j(ce)||Z(ce))return ft!==null?null:ke(ae,se,ce,Ee,null);if(typeof ce.then=="function")return me(ae,se,Of(ce),Ee);if(ce.$$typeof===T)return me(ae,se,Rf(ae,ce),Ee);Mf(ae,ce)}return null}function be(ae,se,ce,Ee,ft){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return ae=ae.get(ce)||null,V(se,ae,""+Ee,ft);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case y:return ae=ae.get(Ee.key===null?ce:Ee.key)||null,Q(se,ae,Ee,ft);case k:return ae=ae.get(Ee.key===null?ce:Ee.key)||null,de(se,ae,Ee,ft);case H:return Ee=Mo(Ee),be(ae,se,ce,Ee,ft)}if(j(Ee)||Z(Ee))return ae=ae.get(ce)||null,ke(se,ae,Ee,ft,null);if(typeof Ee.then=="function")return be(ae,se,ce,Of(Ee),ft);if(Ee.$$typeof===T)return be(ae,se,ce,Rf(se,Ee),ft);Mf(se,Ee)}return null}function Qe(ae,se,ce,Ee){for(var ft=null,Gt=null,et=se,Ct=se=0,Bt=null;et!==null&&Ct<ce.length;Ct++){et.index>Ct?(Bt=et,et=null):Bt=et.sibling;var Vt=me(ae,et,ce[Ct],Ee);if(Vt===null){et===null&&(et=Bt);break}i&&et&&Vt.alternate===null&&o(ae,et),se=S(Vt,se,Ct),Gt===null?ft=Vt:Gt.sibling=Vt,Gt=Vt,et=Bt}if(Ct===ce.length)return u(ae,et),Ut&&Yi(ae,Ct),ft;if(et===null){for(;Ct<ce.length;Ct++)et=Ae(ae,ce[Ct],Ee),et!==null&&(se=S(et,se,Ct),Gt===null?ft=et:Gt.sibling=et,Gt=et);return Ut&&Yi(ae,Ct),ft}for(et=f(et);Ct<ce.length;Ct++)Bt=be(et,ae,Ct,ce[Ct],Ee),Bt!==null&&(i&&Bt.alternate!==null&&et.delete(Bt.key===null?Ct:Bt.key),se=S(Bt,se,Ct),Gt===null?ft=Bt:Gt.sibling=Bt,Gt=Bt);return i&&et.forEach(function(eo){return o(ae,eo)}),Ut&&Yi(ae,Ct),ft}function pt(ae,se,ce,Ee){if(ce==null)throw Error(r(151));for(var ft=null,Gt=null,et=se,Ct=se=0,Bt=null,Vt=ce.next();et!==null&&!Vt.done;Ct++,Vt=ce.next()){et.index>Ct?(Bt=et,et=null):Bt=et.sibling;var eo=me(ae,et,Vt.value,Ee);if(eo===null){et===null&&(et=Bt);break}i&&et&&eo.alternate===null&&o(ae,et),se=S(eo,se,Ct),Gt===null?ft=eo:Gt.sibling=eo,Gt=eo,et=Bt}if(Vt.done)return u(ae,et),Ut&&Yi(ae,Ct),ft;if(et===null){for(;!Vt.done;Ct++,Vt=ce.next())Vt=Ae(ae,Vt.value,Ee),Vt!==null&&(se=S(Vt,se,Ct),Gt===null?ft=Vt:Gt.sibling=Vt,Gt=Vt);return Ut&&Yi(ae,Ct),ft}for(et=f(et);!Vt.done;Ct++,Vt=ce.next())Vt=be(et,ae,Ct,Vt.value,Ee),Vt!==null&&(i&&Vt.alternate!==null&&et.delete(Vt.key===null?Ct:Vt.key),se=S(Vt,se,Ct),Gt===null?ft=Vt:Gt.sibling=Vt,Gt=Vt);return i&&et.forEach(function(az){return o(ae,az)}),Ut&&Yi(ae,Ct),ft}function nn(ae,se,ce,Ee){if(typeof ce=="object"&&ce!==null&&ce.type===w&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:e:{for(var ft=ce.key;se!==null;){if(se.key===ft){if(ft=ce.type,ft===w){if(se.tag===7){u(ae,se.sibling),Ee=b(se,ce.props.children),Ee.return=ae,ae=Ee;break e}}else if(se.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===H&&Mo(ft)===se.type){u(ae,se.sibling),Ee=b(se,ce.props),nu(Ee,ce),Ee.return=ae,ae=Ee;break e}u(ae,se);break}else o(ae,se);se=se.sibling}ce.type===w?(Ee=Ro(ce.props.children,ae.mode,Ee,ce.key),Ee.return=ae,ae=Ee):(Ee=Ef(ce.type,ce.key,ce.props,null,ae.mode,Ee),nu(Ee,ce),Ee.return=ae,ae=Ee)}return M(ae);case k:e:{for(ft=ce.key;se!==null;){if(se.key===ft)if(se.tag===4&&se.stateNode.containerInfo===ce.containerInfo&&se.stateNode.implementation===ce.implementation){u(ae,se.sibling),Ee=b(se,ce.children||[]),Ee.return=ae,ae=Ee;break e}else{u(ae,se);break}else o(ae,se);se=se.sibling}Ee=bm(ce,ae.mode,Ee),Ee.return=ae,ae=Ee}return M(ae);case H:return ce=Mo(ce),nn(ae,se,ce,Ee)}if(j(ce))return Qe(ae,se,ce,Ee);if(Z(ce)){if(ft=Z(ce),typeof ft!="function")throw Error(r(150));return ce=ft.call(ce),pt(ae,se,ce,Ee)}if(typeof ce.then=="function")return nn(ae,se,Of(ce),Ee);if(ce.$$typeof===T)return nn(ae,se,Rf(ae,ce),Ee);Mf(ae,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,se!==null&&se.tag===6?(u(ae,se.sibling),Ee=b(se,ce),Ee.return=ae,ae=Ee):(u(ae,se),Ee=gm(ce,ae.mode,Ee),Ee.return=ae,ae=Ee),M(ae)):u(ae,se)}return function(ae,se,ce,Ee){try{tu=0;var ft=nn(ae,se,ce,Ee);return Aa=null,ft}catch(et){if(et===Ca||et===Af)throw et;var Gt=Ur(29,et,null,ae.mode);return Gt.lanes=Ee,Gt.return=ae,Gt}}}var Do=qk(!0),Hk=qk(!1),js=!1;function Am(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nm(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ps(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function $s(i,o,u){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Zt&2)!==0){var b=f.pending;return b===null?o.next=o:(o.next=b.next,b.next=o),f.pending=o,o=wf(i),Rk(i,null,u),o}return Sf(i,f,o,u),wf(i)}function ru(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var f=o.lanes;f&=i.pendingLanes,u|=f,o.lanes=u,qe(i,u)}}function Om(i,o){var u=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var b=null,S=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};S===null?b=S=M:S=S.next=M,u=u.next}while(u!==null);S===null?b=S=o:S=S.next=o}else b=S=o;u={baseState:f.baseState,firstBaseUpdate:b,lastBaseUpdate:S,shared:f.shared,callbacks:f.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var Mm=!1;function iu(){if(Mm){var i=Ra;if(i!==null)throw i}}function su(i,o,u,f){Mm=!1;var b=i.updateQueue;js=!1;var S=b.firstBaseUpdate,M=b.lastBaseUpdate,V=b.shared.pending;if(V!==null){b.shared.pending=null;var Q=V,de=Q.next;Q.next=null,M===null?S=de:M.next=de,M=Q;var ke=i.alternate;ke!==null&&(ke=ke.updateQueue,V=ke.lastBaseUpdate,V!==M&&(V===null?ke.firstBaseUpdate=de:V.next=de,ke.lastBaseUpdate=Q))}if(S!==null){var Ae=b.baseState;M=0,ke=de=Q=null,V=S;do{var me=V.lane&-536870913,be=me!==V.lane;if(be?($t&me)===me:(f&me)===me){me!==0&&me===_a&&(Mm=!0),ke!==null&&(ke=ke.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Qe=i,pt=V;me=o;var nn=u;switch(pt.tag){case 1:if(Qe=pt.payload,typeof Qe=="function"){Ae=Qe.call(nn,Ae,me);break e}Ae=Qe;break e;case 3:Qe.flags=Qe.flags&-65537|128;case 0:if(Qe=pt.payload,me=typeof Qe=="function"?Qe.call(nn,Ae,me):Qe,me==null)break e;Ae=m({},Ae,me);break e;case 2:js=!0}}me=V.callback,me!==null&&(i.flags|=64,be&&(i.flags|=8192),be=b.callbacks,be===null?b.callbacks=[me]:be.push(me))}else be={lane:me,tag:V.tag,payload:V.payload,callback:V.callback,next:null},ke===null?(de=ke=be,Q=Ae):ke=ke.next=be,M|=me;if(V=V.next,V===null){if(V=b.shared.pending,V===null)break;be=V,V=be.next,be.next=null,b.lastBaseUpdate=be,b.shared.pending=null}}while(!0);ke===null&&(Q=Ae),b.baseState=Q,b.firstBaseUpdate=de,b.lastBaseUpdate=ke,S===null&&(b.shared.lanes=0),Hs|=M,i.lanes=M,i.memoizedState=Ae}}function Gk(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Vk(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Gk(u[i],o)}var Na=B(null),If=B(0);function Kk(i,o){i=as,O(If,i),O(Na,o),as=i|o.baseLanes}function Im(){O(If,as),O(Na,Na.current)}function Dm(){as=If.current,G(Na),G(If)}var qr=B(null),ii=null;function Bs(i){var o=i.alternate;O(Mn,Mn.current&1),O(qr,i),ii===null&&(o===null||Na.current!==null||o.memoizedState!==null)&&(ii=i)}function zm(i){O(Mn,Mn.current),O(qr,i),ii===null&&(ii=i)}function Zk(i){i.tag===22?(O(Mn,Mn.current),O(qr,i),ii===null&&(ii=i)):Fs()}function Fs(){O(Mn,Mn.current),O(qr,qr.current)}function Hr(i){G(qr),ii===i&&(ii=null),G(Mn)}var Mn=B(0);function Df(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Fg(u)||Ug(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Ji=0,Rt=null,en=null,$n=null,zf=!1,Oa=!1,zo=!1,Lf=0,ou=0,Ma=null,XI=0;function _n(){throw Error(r(321))}function Lm(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Fr(i[u],o[u]))return!1;return!0}function jm(i,o,u,f,b,S){return Ji=S,Rt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,F.H=i===null||i.memoizedState===null?O0:Qm,zo=!1,S=u(f,b),zo=!1,Oa&&(S=Yk(o,u,f,b)),Wk(i),S}function Wk(i){F.H=uu;var o=en!==null&&en.next!==null;if(Ji=0,$n=en=Rt=null,zf=!1,ou=0,Ma=null,o)throw Error(r(300));i===null||Bn||(i=i.dependencies,i!==null&&_f(i)&&(Bn=!0))}function Yk(i,o,u,f){Rt=i;var b=0;do{if(Oa&&(Ma=null),ou=0,Oa=!1,25<=b)throw Error(r(301));if(b+=1,$n=en=null,i.updateQueue!=null){var S=i.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}F.H=M0,S=o(u,f)}while(Oa);return S}function QI(){var i=F.H,o=i.useState()[0];return o=typeof o.then=="function"?au(o):o,i=i.useState()[0],(en!==null?en.memoizedState:null)!==i&&(Rt.flags|=1024),o}function Pm(){var i=Lf!==0;return Lf=0,i}function $m(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Bm(i){if(zf){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}zf=!1}Ji=0,$n=en=Rt=null,Oa=!1,ou=Lf=0,Ma=null}function vr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $n===null?Rt.memoizedState=$n=i:$n=$n.next=i,$n}function In(){if(en===null){var i=Rt.alternate;i=i!==null?i.memoizedState:null}else i=en.next;var o=$n===null?Rt.memoizedState:$n.next;if(o!==null)$n=o,en=i;else{if(i===null)throw Rt.alternate===null?Error(r(467)):Error(r(310));en=i,i={memoizedState:en.memoizedState,baseState:en.baseState,baseQueue:en.baseQueue,queue:en.queue,next:null},$n===null?Rt.memoizedState=$n=i:$n=$n.next=i}return $n}function jf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function au(i){var o=ou;return ou+=1,Ma===null&&(Ma=[]),i=Bk(Ma,i,o),o=Rt,($n===null?o.memoizedState:$n.next)===null&&(o=o.alternate,F.H=o===null||o.memoizedState===null?O0:Qm),i}function Pf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return au(i);if(i.$$typeof===T)return nr(i)}throw Error(r(438,String(i)))}function Fm(i){var o=null,u=Rt.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var f=Rt.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(o={data:f.data.map(function(b){return b.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=jf(),Rt.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(i),f=0;f<i;f++)u[f]=L;return o.index++,u}function es(i,o){return typeof o=="function"?o(i):o}function $f(i){var o=In();return Um(o,en,i)}function Um(i,o,u){var f=i.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=u;var b=i.baseQueue,S=f.pending;if(S!==null){if(b!==null){var M=b.next;b.next=S.next,S.next=M}o.baseQueue=b=S,f.pending=null}if(S=i.baseState,b===null)i.memoizedState=S;else{o=b.next;var V=M=null,Q=null,de=o,ke=!1;do{var Ae=de.lane&-536870913;if(Ae!==de.lane?($t&Ae)===Ae:(Ji&Ae)===Ae){var me=de.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Ae===_a&&(ke=!0);else if((Ji&me)===me){de=de.next,me===_a&&(ke=!0);continue}else Ae={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(V=Q=Ae,M=S):Q=Q.next=Ae,Rt.lanes|=me,Hs|=me;Ae=de.action,zo&&u(S,Ae),S=de.hasEagerState?de.eagerState:u(S,Ae)}else me={lane:Ae,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(V=Q=me,M=S):Q=Q.next=me,Rt.lanes|=Ae,Hs|=Ae;de=de.next}while(de!==null&&de!==o);if(Q===null?M=S:Q.next=V,!Fr(S,i.memoizedState)&&(Bn=!0,ke&&(u=Ra,u!==null)))throw u;i.memoizedState=S,i.baseState=M,i.baseQueue=Q,f.lastRenderedState=S}return b===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function qm(i){var o=In(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var f=u.dispatch,b=u.pending,S=o.memoizedState;if(b!==null){u.pending=null;var M=b=b.next;do S=i(S,M.action),M=M.next;while(M!==b);Fr(S,o.memoizedState)||(Bn=!0),o.memoizedState=S,o.baseQueue===null&&(o.baseState=S),u.lastRenderedState=S}return[S,f]}function Xk(i,o,u){var f=Rt,b=In(),S=Ut;if(S){if(u===void 0)throw Error(r(407));u=u()}else u=o();var M=!Fr((en||b).memoizedState,u);if(M&&(b.memoizedState=u,Bn=!0),b=b.queue,Vm(e0.bind(null,f,b,i),[i]),b.getSnapshot!==o||M||$n!==null&&$n.memoizedState.tag&1){if(f.flags|=2048,Ia(9,{destroy:void 0},Jk.bind(null,f,b,u,o),null),ln===null)throw Error(r(349));S||(Ji&127)!==0||Qk(f,o,u)}return u}function Qk(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Rt.updateQueue,o===null?(o=jf(),Rt.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function Jk(i,o,u,f){o.value=u,o.getSnapshot=f,t0(o)&&n0(i)}function e0(i,o,u){return u(function(){t0(o)&&n0(i)})}function t0(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Fr(i,u)}catch{return!0}}function n0(i){var o=_o(i,2);o!==null&&Mr(o,i,2)}function Hm(i){var o=vr();if(typeof i=="function"){var u=i;if(i=u(),zo){vt(!0);try{u()}finally{vt(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:i},o}function r0(i,o,u,f){return i.baseState=u,Um(i,en,typeof f=="function"?f:es)}function JI(i,o,u,f,b){if(Uf(i))throw Error(r(485));if(i=o.action,i!==null){var S={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){S.listeners.push(M)}};F.T!==null?u(!0):S.isTransition=!1,f(S),u=o.pending,u===null?(S.next=o.pending=S,i0(o,S)):(S.next=u.next,o.pending=u.next=S)}}function i0(i,o){var u=o.action,f=o.payload,b=i.state;if(o.isTransition){var S=F.T,M={};F.T=M;try{var V=u(b,f),Q=F.S;Q!==null&&Q(M,V),s0(i,o,V)}catch(de){Gm(i,o,de)}finally{S!==null&&M.types!==null&&(S.types=M.types),F.T=S}}else try{S=u(b,f),s0(i,o,S)}catch(de){Gm(i,o,de)}}function s0(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){o0(i,o,f)},function(f){return Gm(i,o,f)}):o0(i,o,u)}function o0(i,o,u){o.status="fulfilled",o.value=u,a0(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,i0(i,u)))}function Gm(i,o,u){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do o.status="rejected",o.reason=u,a0(o),o=o.next;while(o!==f)}i.action=null}function a0(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function l0(i,o){return o}function u0(i,o){if(Ut){var u=ln.formState;if(u!==null){e:{var f=Rt;if(Ut){if(hn){t:{for(var b=hn,S=ri;b.nodeType!==8;){if(!S){b=null;break t}if(b=si(b.nextSibling),b===null){b=null;break t}}S=b.data,b=S==="F!"||S==="F"?b:null}if(b){hn=si(b.nextSibling),f=b.data==="F!";break e}}zs(f)}f=!1}f&&(o=u[0])}}return u=vr(),u.memoizedState=u.baseState=o,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l0,lastRenderedState:o},u.queue=f,u=C0.bind(null,Rt,f),f.dispatch=u,f=Hm(!1),S=Xm.bind(null,Rt,!1,f.queue),f=vr(),b={state:o,dispatch:null,action:i,pending:null},f.queue=b,u=JI.bind(null,Rt,b,S,u),b.dispatch=u,f.memoizedState=i,[o,u,!1]}function c0(i){var o=In();return f0(o,en,i)}function f0(i,o,u){if(o=Um(i,o,l0)[0],i=$f(es)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var f=au(o)}catch(M){throw M===Ca?Af:M}else f=o;o=In();var b=o.queue,S=b.dispatch;return u!==o.memoizedState&&(Rt.flags|=2048,Ia(9,{destroy:void 0},eD.bind(null,b,u),null)),[f,S,i]}function eD(i,o){i.action=o}function d0(i){var o=In(),u=en;if(u!==null)return f0(o,u,i);In(),o=o.memoizedState,u=In();var f=u.queue.dispatch;return u.memoizedState=i,[o,f,!1]}function Ia(i,o,u,f){return i={tag:i,create:u,deps:f,inst:o,next:null},o=Rt.updateQueue,o===null&&(o=jf(),Rt.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=i.next=i:(f=u.next,u.next=i,i.next=f,o.lastEffect=i),i}function p0(){return In().memoizedState}function Bf(i,o,u,f){var b=vr();Rt.flags|=i,b.memoizedState=Ia(1|o,{destroy:void 0},u,f===void 0?null:f)}function Ff(i,o,u,f){var b=In();f=f===void 0?null:f;var S=b.memoizedState.inst;en!==null&&f!==null&&Lm(f,en.memoizedState.deps)?b.memoizedState=Ia(o,S,u,f):(Rt.flags|=i,b.memoizedState=Ia(1|o,S,u,f))}function h0(i,o){Bf(8390656,8,i,o)}function Vm(i,o){Ff(2048,8,i,o)}function tD(i){Rt.flags|=4;var o=Rt.updateQueue;if(o===null)o=jf(),Rt.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function m0(i){var o=In().memoizedState;return tD({ref:o,nextImpl:i}),function(){if((Zt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function g0(i,o){return Ff(4,2,i,o)}function b0(i,o){return Ff(4,4,i,o)}function y0(i,o){if(typeof o=="function"){i=i();var u=o(i);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function v0(i,o,u){u=u!=null?u.concat([i]):null,Ff(4,4,y0.bind(null,o,i),u)}function Km(){}function x0(i,o){var u=In();o=o===void 0?null:o;var f=u.memoizedState;return o!==null&&Lm(o,f[1])?f[0]:(u.memoizedState=[i,o],i)}function k0(i,o){var u=In();o=o===void 0?null:o;var f=u.memoizedState;if(o!==null&&Lm(o,f[1]))return f[0];if(f=i(),zo){vt(!0);try{i()}finally{vt(!1)}}return u.memoizedState=[f,o],f}function Zm(i,o,u){return u===void 0||(Ji&1073741824)!==0&&($t&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=SS(),Rt.lanes|=i,Hs|=i,u)}function S0(i,o,u,f){return Fr(u,o)?u:Na.current!==null?(i=Zm(i,u,f),Fr(i,o)||(Bn=!0),i):(Ji&42)===0||(Ji&1073741824)!==0&&($t&261930)===0?(Bn=!0,i.memoizedState=u):(i=SS(),Rt.lanes|=i,Hs|=i,o)}function w0(i,o,u,f,b){var S=U.p;U.p=S!==0&&8>S?S:8;var M=F.T,V={};F.T=V,Xm(i,!1,o,u);try{var Q=b(),de=F.S;if(de!==null&&de(V,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var ke=YI(Q,f);lu(i,o,ke,Kr(i))}else lu(i,o,f,Kr(i))}catch(Ae){lu(i,o,{then:function(){},status:"rejected",reason:Ae},Kr())}finally{U.p=S,M!==null&&V.types!==null&&(M.types=V.types),F.T=M}}function nD(){}function Wm(i,o,u,f){if(i.tag!==5)throw Error(r(476));var b=E0(i).queue;w0(i,b,o,P,u===null?nD:function(){return T0(i),u(f)})}function E0(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:P},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function T0(i){var o=E0(i);o.next===null&&(o=i.alternate.memoizedState),lu(i,o.next.queue,{},Kr())}function Ym(){return nr(Tu)}function _0(){return In().memoizedState}function R0(){return In().memoizedState}function rD(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Kr();i=Ps(u);var f=$s(o,i,u);f!==null&&(Mr(f,o,u),ru(f,o,u)),o={cache:Tm()},i.payload=o;return}o=o.return}}function iD(i,o,u){var f=Kr();u={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Uf(i)?A0(o,u):(u=hm(i,o,u,f),u!==null&&(Mr(u,i,f),N0(u,o,f)))}function C0(i,o,u){var f=Kr();lu(i,o,u,f)}function lu(i,o,u,f){var b={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Uf(i))A0(o,b);else{var S=i.alternate;if(i.lanes===0&&(S===null||S.lanes===0)&&(S=o.lastRenderedReducer,S!==null))try{var M=o.lastRenderedState,V=S(M,u);if(b.hasEagerState=!0,b.eagerState=V,Fr(V,M))return Sf(i,o,b,0),ln===null&&kf(),!1}catch{}if(u=hm(i,o,b,f),u!==null)return Mr(u,i,f),N0(u,o,f),!0}return!1}function Xm(i,o,u,f){if(f={lane:2,revertLane:Ag(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Uf(i)){if(o)throw Error(r(479))}else o=hm(i,u,f,2),o!==null&&Mr(o,i,2)}function Uf(i){var o=i.alternate;return i===Rt||o!==null&&o===Rt}function A0(i,o){Oa=zf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function N0(i,o,u){if((u&4194048)!==0){var f=o.lanes;f&=i.pendingLanes,u|=f,o.lanes=u,qe(i,u)}}var uu={readContext:nr,use:Pf,useCallback:_n,useContext:_n,useEffect:_n,useImperativeHandle:_n,useLayoutEffect:_n,useInsertionEffect:_n,useMemo:_n,useReducer:_n,useRef:_n,useState:_n,useDebugValue:_n,useDeferredValue:_n,useTransition:_n,useSyncExternalStore:_n,useId:_n,useHostTransitionStatus:_n,useFormState:_n,useActionState:_n,useOptimistic:_n,useMemoCache:_n,useCacheRefresh:_n};uu.useEffectEvent=_n;var O0={readContext:nr,use:Pf,useCallback:function(i,o){return vr().memoizedState=[i,o===void 0?null:o],i},useContext:nr,useEffect:h0,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Bf(4194308,4,y0.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Bf(4194308,4,i,o)},useInsertionEffect:function(i,o){Bf(4,2,i,o)},useMemo:function(i,o){var u=vr();o=o===void 0?null:o;var f=i();if(zo){vt(!0);try{i()}finally{vt(!1)}}return u.memoizedState=[f,o],f},useReducer:function(i,o,u){var f=vr();if(u!==void 0){var b=u(o);if(zo){vt(!0);try{u(o)}finally{vt(!1)}}}else b=o;return f.memoizedState=f.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},f.queue=i,i=i.dispatch=iD.bind(null,Rt,i),[f.memoizedState,i]},useRef:function(i){var o=vr();return i={current:i},o.memoizedState=i},useState:function(i){i=Hm(i);var o=i.queue,u=C0.bind(null,Rt,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Km,useDeferredValue:function(i,o){var u=vr();return Zm(u,i,o)},useTransition:function(){var i=Hm(!1);return i=w0.bind(null,Rt,i.queue,!0,!1),vr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var f=Rt,b=vr();if(Ut){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),ln===null)throw Error(r(349));($t&127)!==0||Qk(f,o,u)}b.memoizedState=u;var S={value:u,getSnapshot:o};return b.queue=S,h0(e0.bind(null,f,S,i),[i]),f.flags|=2048,Ia(9,{destroy:void 0},Jk.bind(null,f,S,u,o),null),u},useId:function(){var i=vr(),o=ln.identifierPrefix;if(Ut){var u=Ni,f=Ai;u=(f&~(1<<32-st(f)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Lf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=XI++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:Ym,useFormState:u0,useActionState:u0,useOptimistic:function(i){var o=vr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Xm.bind(null,Rt,!0,u),u.dispatch=o,[i,o]},useMemoCache:Fm,useCacheRefresh:function(){return vr().memoizedState=rD.bind(null,Rt)},useEffectEvent:function(i){var o=vr(),u={impl:i};return o.memoizedState=u,function(){if((Zt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Qm={readContext:nr,use:Pf,useCallback:x0,useContext:nr,useEffect:Vm,useImperativeHandle:v0,useInsertionEffect:g0,useLayoutEffect:b0,useMemo:k0,useReducer:$f,useRef:p0,useState:function(){return $f(es)},useDebugValue:Km,useDeferredValue:function(i,o){var u=In();return S0(u,en.memoizedState,i,o)},useTransition:function(){var i=$f(es)[0],o=In().memoizedState;return[typeof i=="boolean"?i:au(i),o]},useSyncExternalStore:Xk,useId:_0,useHostTransitionStatus:Ym,useFormState:c0,useActionState:c0,useOptimistic:function(i,o){var u=In();return r0(u,en,i,o)},useMemoCache:Fm,useCacheRefresh:R0};Qm.useEffectEvent=m0;var M0={readContext:nr,use:Pf,useCallback:x0,useContext:nr,useEffect:Vm,useImperativeHandle:v0,useInsertionEffect:g0,useLayoutEffect:b0,useMemo:k0,useReducer:qm,useRef:p0,useState:function(){return qm(es)},useDebugValue:Km,useDeferredValue:function(i,o){var u=In();return en===null?Zm(u,i,o):S0(u,en.memoizedState,i,o)},useTransition:function(){var i=qm(es)[0],o=In().memoizedState;return[typeof i=="boolean"?i:au(i),o]},useSyncExternalStore:Xk,useId:_0,useHostTransitionStatus:Ym,useFormState:d0,useActionState:d0,useOptimistic:function(i,o){var u=In();return en!==null?r0(u,en,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Fm,useCacheRefresh:R0};M0.useEffectEvent=m0;function Jm(i,o,u,f){o=i.memoizedState,u=u(f,o),u=u==null?o:m({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var eg={enqueueSetState:function(i,o,u){i=i._reactInternals;var f=Kr(),b=Ps(f);b.payload=o,u!=null&&(b.callback=u),o=$s(i,b,f),o!==null&&(Mr(o,i,f),ru(o,i,f))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var f=Kr(),b=Ps(f);b.tag=1,b.payload=o,u!=null&&(b.callback=u),o=$s(i,b,f),o!==null&&(Mr(o,i,f),ru(o,i,f))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Kr(),f=Ps(u);f.tag=2,o!=null&&(f.callback=o),o=$s(i,f,u),o!==null&&(Mr(o,i,u),ru(o,i,u))}};function I0(i,o,u,f,b,S,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,S,M):o.prototype&&o.prototype.isPureReactComponent?!Wl(u,f)||!Wl(b,S):!0}function D0(i,o,u,f){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,f),o.state!==i&&eg.enqueueReplaceState(o,o.state,null)}function Lo(i,o){var u=o;if("ref"in o){u={};for(var f in o)f!=="ref"&&(u[f]=o[f])}if(i=i.defaultProps){u===o&&(u=m({},u));for(var b in i)u[b]===void 0&&(u[b]=i[b])}return u}function z0(i){xf(i)}function L0(i){console.error(i)}function j0(i){xf(i)}function qf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(f){setTimeout(function(){throw f})}}function P0(i,o,u){try{var f=i.onCaughtError;f(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function tg(i,o,u){return u=Ps(u),u.tag=3,u.payload={element:null},u.callback=function(){qf(i,o)},u}function $0(i){return i=Ps(i),i.tag=3,i}function B0(i,o,u,f){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var S=f.value;i.payload=function(){return b(S)},i.callback=function(){P0(o,u,f)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){P0(o,u,f),typeof b!="function"&&(Gs===null?Gs=new Set([this]):Gs.add(this));var V=f.stack;this.componentDidCatch(f.value,{componentStack:V!==null?V:""})})}function sD(i,o,u,f,b){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(o=u.alternate,o!==null&&Ta(o,u,b,!0),u=qr.current,u!==null){switch(u.tag){case 31:case 13:return ii===null?td():u.alternate===null&&Rn===0&&(Rn=3),u.flags&=-257,u.flags|=65536,u.lanes=b,f===Nf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([f]):o.add(f),_g(i,f,b)),!1;case 22:return u.flags|=65536,f===Nf?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([f])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([f]):u.add(f)),_g(i,f,b)),!1}throw Error(r(435,u.tag))}return _g(i,f,b),td(),!1}if(Ut)return o=qr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=b,f!==xm&&(i=Error(r(422),{cause:f}),Ql(ei(i,u)))):(f!==xm&&(o=Error(r(423),{cause:f}),Ql(ei(o,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,f=ei(f,u),b=tg(i.stateNode,f,b),Om(i,b),Rn!==4&&(Rn=2)),!1;var S=Error(r(520),{cause:f});if(S=ei(S,u),bu===null?bu=[S]:bu.push(S),Rn!==4&&(Rn=2),o===null)return!0;f=ei(f,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=tg(u.stateNode,f,i),Om(u,i),!1;case 1:if(o=u.type,S=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Gs===null||!Gs.has(S))))return u.flags|=65536,b&=-b,u.lanes|=b,b=$0(b),B0(b,i,u,f),Om(u,b),!1}u=u.return}while(u!==null);return!1}var ng=Error(r(461)),Bn=!1;function rr(i,o,u,f){o.child=i===null?Hk(o,null,u,f):Do(o,i.child,u,f)}function F0(i,o,u,f,b){u=u.render;var S=o.ref;if("ref"in f){var M={};for(var V in f)V!=="ref"&&(M[V]=f[V])}else M=f;return No(o),f=jm(i,o,u,M,S,b),V=Pm(),i!==null&&!Bn?($m(i,o,b),ts(i,o,b)):(Ut&&V&&ym(o),o.flags|=1,rr(i,o,f,b),o.child)}function U0(i,o,u,f,b){if(i===null){var S=u.type;return typeof S=="function"&&!mm(S)&&S.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=S,q0(i,o,S,f,b)):(i=Ef(u.type,null,f,o,o.mode,b),i.ref=o.ref,i.return=o,o.child=i)}if(S=i.child,!cg(i,b)){var M=S.memoizedProps;if(u=u.compare,u=u!==null?u:Wl,u(M,f)&&i.ref===o.ref)return ts(i,o,b)}return o.flags|=1,i=Wi(S,f),i.ref=o.ref,i.return=o,o.child=i}function q0(i,o,u,f,b){if(i!==null){var S=i.memoizedProps;if(Wl(S,f)&&i.ref===o.ref)if(Bn=!1,o.pendingProps=f=S,cg(i,b))(i.flags&131072)!==0&&(Bn=!0);else return o.lanes=i.lanes,ts(i,o,b)}return rg(i,o,u,f,b)}function H0(i,o,u,f){var b=f.children,S=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((o.flags&128)!==0){if(S=S!==null?S.baseLanes|u:u,i!==null){for(f=o.child=i.child,b=0;f!==null;)b=b|f.lanes|f.childLanes,f=f.sibling;f=b&~S}else f=0,o.child=null;return G0(i,o,S,u,f)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Cf(o,S!==null?S.cachePool:null),S!==null?Kk(o,S):Im(),Zk(o);else return f=o.lanes=536870912,G0(i,o,S!==null?S.baseLanes|u:u,u,f)}else S!==null?(Cf(o,S.cachePool),Kk(o,S),Fs(),o.memoizedState=null):(i!==null&&Cf(o,null),Im(),Fs());return rr(i,o,b,u),o.child}function cu(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function G0(i,o,u,f,b){var S=Rm();return S=S===null?null:{parent:Pn._currentValue,pool:S},o.memoizedState={baseLanes:u,cachePool:S},i!==null&&Cf(o,null),Im(),Zk(o),i!==null&&Ta(i,o,f,!0),o.childLanes=b,null}function Hf(i,o){return o=Vf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function V0(i,o,u){return Do(o,i.child,null,u),i=Hf(o,o.pendingProps),i.flags|=2,Hr(o),o.memoizedState=null,i}function oD(i,o,u){var f=o.pendingProps,b=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Ut){if(f.mode==="hidden")return i=Hf(o,f),o.lanes=536870912,cu(null,i);if(zm(o),(i=hn)?(i=iw(i,ri),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Is!==null?{id:Ai,overflow:Ni}:null,retryLane:536870912,hydrationErrors:null},u=Ak(i),u.return=o,o.child=u,tr=o,hn=null)):i=null,i===null)throw zs(o);return o.lanes=536870912,null}return Hf(o,f)}var S=i.memoizedState;if(S!==null){var M=S.dehydrated;if(zm(o),b)if(o.flags&256)o.flags&=-257,o=V0(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Bn||Ta(i,o,u,!1),b=(u&i.childLanes)!==0,Bn||b){if(f=ln,f!==null&&(M=Wt(f,u),M!==0&&M!==S.retryLane))throw S.retryLane=M,_o(i,M),Mr(f,i,M),ng;td(),o=V0(i,o,u)}else i=S.treeContext,hn=si(M.nextSibling),tr=o,Ut=!0,Ds=null,ri=!1,i!==null&&Mk(o,i),o=Hf(o,f),o.flags|=4096;return o}return i=Wi(i.child,{mode:f.mode,children:f.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Gf(i,o){var u=o.ref;if(u===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(o.flags|=4194816)}}function rg(i,o,u,f,b){return No(o),u=jm(i,o,u,f,void 0,b),f=Pm(),i!==null&&!Bn?($m(i,o,b),ts(i,o,b)):(Ut&&f&&ym(o),o.flags|=1,rr(i,o,u,b),o.child)}function K0(i,o,u,f,b,S){return No(o),o.updateQueue=null,u=Yk(o,f,u,b),Wk(i),f=Pm(),i!==null&&!Bn?($m(i,o,S),ts(i,o,S)):(Ut&&f&&ym(o),o.flags|=1,rr(i,o,u,S),o.child)}function Z0(i,o,u,f,b){if(No(o),o.stateNode===null){var S=ka,M=u.contextType;typeof M=="object"&&M!==null&&(S=nr(M)),S=new u(f,S),o.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=eg,o.stateNode=S,S._reactInternals=o,S=o.stateNode,S.props=f,S.state=o.memoizedState,S.refs={},Am(o),M=u.contextType,S.context=typeof M=="object"&&M!==null?nr(M):ka,S.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(Jm(o,u,M,f),S.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(M=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),M!==S.state&&eg.enqueueReplaceState(S,S.state,null),su(o,f,S,b),iu(),S.state=o.memoizedState),typeof S.componentDidMount=="function"&&(o.flags|=4194308),f=!0}else if(i===null){S=o.stateNode;var V=o.memoizedProps,Q=Lo(u,V);S.props=Q;var de=S.context,ke=u.contextType;M=ka,typeof ke=="object"&&ke!==null&&(M=nr(ke));var Ae=u.getDerivedStateFromProps;ke=typeof Ae=="function"||typeof S.getSnapshotBeforeUpdate=="function",V=o.pendingProps!==V,ke||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(V||de!==M)&&D0(o,S,f,M),js=!1;var me=o.memoizedState;S.state=me,su(o,f,S,b),iu(),de=o.memoizedState,V||me!==de||js?(typeof Ae=="function"&&(Jm(o,u,Ae,f),de=o.memoizedState),(Q=js||I0(o,u,Q,f,me,de,M))?(ke||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=de),S.props=f,S.state=de,S.context=M,f=Q):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{S=o.stateNode,Nm(i,o),M=o.memoizedProps,ke=Lo(u,M),S.props=ke,Ae=o.pendingProps,me=S.context,de=u.contextType,Q=ka,typeof de=="object"&&de!==null&&(Q=nr(de)),V=u.getDerivedStateFromProps,(de=typeof V=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(M!==Ae||me!==Q)&&D0(o,S,f,Q),js=!1,me=o.memoizedState,S.state=me,su(o,f,S,b),iu();var be=o.memoizedState;M!==Ae||me!==be||js||i!==null&&i.dependencies!==null&&_f(i.dependencies)?(typeof V=="function"&&(Jm(o,u,V,f),be=o.memoizedState),(ke=js||I0(o,u,ke,f,me,be,Q)||i!==null&&i.dependencies!==null&&_f(i.dependencies))?(de||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(f,be,Q),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(f,be,Q)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=be),S.props=f,S.state=be,S.context=Q,f=ke):(typeof S.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),f=!1)}return S=f,Gf(i,o),f=(o.flags&128)!==0,S||f?(S=o.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:S.render(),o.flags|=1,i!==null&&f?(o.child=Do(o,i.child,null,b),o.child=Do(o,null,u,b)):rr(i,o,u,b),o.memoizedState=S.state,i=o.child):i=ts(i,o,b),i}function W0(i,o,u,f){return Co(),o.flags|=256,rr(i,o,u,f),o.child}var ig={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sg(i){return{baseLanes:i,cachePool:Pk()}}function og(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Vr),i}function Y0(i,o,u){var f=o.pendingProps,b=!1,S=(o.flags&128)!==0,M;if((M=S)||(M=i!==null&&i.memoizedState===null?!1:(Mn.current&2)!==0),M&&(b=!0,o.flags&=-129),M=(o.flags&32)!==0,o.flags&=-33,i===null){if(Ut){if(b?Bs(o):Fs(),(i=hn)?(i=iw(i,ri),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Is!==null?{id:Ai,overflow:Ni}:null,retryLane:536870912,hydrationErrors:null},u=Ak(i),u.return=o,o.child=u,tr=o,hn=null)):i=null,i===null)throw zs(o);return Ug(i)?o.lanes=32:o.lanes=536870912,null}var V=f.children;return f=f.fallback,b?(Fs(),b=o.mode,V=Vf({mode:"hidden",children:V},b),f=Ro(f,b,u,null),V.return=o,f.return=o,V.sibling=f,o.child=V,f=o.child,f.memoizedState=sg(u),f.childLanes=og(i,M,u),o.memoizedState=ig,cu(null,f)):(Bs(o),ag(o,V))}var Q=i.memoizedState;if(Q!==null&&(V=Q.dehydrated,V!==null)){if(S)o.flags&256?(Bs(o),o.flags&=-257,o=lg(i,o,u)):o.memoizedState!==null?(Fs(),o.child=i.child,o.flags|=128,o=null):(Fs(),V=f.fallback,b=o.mode,f=Vf({mode:"visible",children:f.children},b),V=Ro(V,b,u,null),V.flags|=2,f.return=o,V.return=o,f.sibling=V,o.child=f,Do(o,i.child,null,u),f=o.child,f.memoizedState=sg(u),f.childLanes=og(i,M,u),o.memoizedState=ig,o=cu(null,f));else if(Bs(o),Ug(V)){if(M=V.nextSibling&&V.nextSibling.dataset,M)var de=M.dgst;M=de,f=Error(r(419)),f.stack="",f.digest=M,Ql({value:f,source:null,stack:null}),o=lg(i,o,u)}else if(Bn||Ta(i,o,u,!1),M=(u&i.childLanes)!==0,Bn||M){if(M=ln,M!==null&&(f=Wt(M,u),f!==0&&f!==Q.retryLane))throw Q.retryLane=f,_o(i,f),Mr(M,i,f),ng;Fg(V)||td(),o=lg(i,o,u)}else Fg(V)?(o.flags|=192,o.child=i.child,o=null):(i=Q.treeContext,hn=si(V.nextSibling),tr=o,Ut=!0,Ds=null,ri=!1,i!==null&&Mk(o,i),o=ag(o,f.children),o.flags|=4096);return o}return b?(Fs(),V=f.fallback,b=o.mode,Q=i.child,de=Q.sibling,f=Wi(Q,{mode:"hidden",children:f.children}),f.subtreeFlags=Q.subtreeFlags&65011712,de!==null?V=Wi(de,V):(V=Ro(V,b,u,null),V.flags|=2),V.return=o,f.return=o,f.sibling=V,o.child=f,cu(null,f),f=o.child,V=i.child.memoizedState,V===null?V=sg(u):(b=V.cachePool,b!==null?(Q=Pn._currentValue,b=b.parent!==Q?{parent:Q,pool:Q}:b):b=Pk(),V={baseLanes:V.baseLanes|u,cachePool:b}),f.memoizedState=V,f.childLanes=og(i,M,u),o.memoizedState=ig,cu(i.child,f)):(Bs(o),u=i.child,i=u.sibling,u=Wi(u,{mode:"visible",children:f.children}),u.return=o,u.sibling=null,i!==null&&(M=o.deletions,M===null?(o.deletions=[i],o.flags|=16):M.push(i)),o.child=u,o.memoizedState=null,u)}function ag(i,o){return o=Vf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Vf(i,o){return i=Ur(22,i,null,o),i.lanes=0,i}function lg(i,o,u){return Do(o,i.child,null,u),i=ag(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function X0(i,o,u){i.lanes|=o;var f=i.alternate;f!==null&&(f.lanes|=o),wm(i.return,o,u)}function ug(i,o,u,f,b,S){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:b,treeForkCount:S}:(M.isBackwards=o,M.rendering=null,M.renderingStartTime=0,M.last=f,M.tail=u,M.tailMode=b,M.treeForkCount=S)}function Q0(i,o,u){var f=o.pendingProps,b=f.revealOrder,S=f.tail;f=f.children;var M=Mn.current,V=(M&2)!==0;if(V?(M=M&1|2,o.flags|=128):M&=1,O(Mn,M),rr(i,o,f,u),f=Ut?Xl:0,!V&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&X0(i,u,o);else if(i.tag===19)X0(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(u=o.child,b=null;u!==null;)i=u.alternate,i!==null&&Df(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=o.child,o.child=null):(b=u.sibling,u.sibling=null),ug(o,!1,b,u,S,f);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=o.child,o.child=null;b!==null;){if(i=b.alternate,i!==null&&Df(i)===null){o.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}ug(o,!0,u,null,S,f);break;case"together":ug(o,!1,null,null,void 0,f);break;default:o.memoizedState=null}return o.child}function ts(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Hs|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(Ta(i,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,u=Wi(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=Wi(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function cg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&_f(i)))}function aD(i,o,u){switch(o.tag){case 3:pe(o,o.stateNode.containerInfo),Ls(o,Pn,i.memoizedState.cache),Co();break;case 27:case 5:Se(o);break;case 4:pe(o,o.stateNode.containerInfo);break;case 10:Ls(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,zm(o),null;break;case 13:var f=o.memoizedState;if(f!==null)return f.dehydrated!==null?(Bs(o),o.flags|=128,null):(u&o.child.childLanes)!==0?Y0(i,o,u):(Bs(o),i=ts(i,o,u),i!==null?i.sibling:null);Bs(o);break;case 19:var b=(i.flags&128)!==0;if(f=(u&o.childLanes)!==0,f||(Ta(i,o,u,!1),f=(u&o.childLanes)!==0),b){if(f)return Q0(i,o,u);o.flags|=128}if(b=o.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),O(Mn,Mn.current),f)break;return null;case 22:return o.lanes=0,H0(i,o,u,o.pendingProps);case 24:Ls(o,Pn,i.memoizedState.cache)}return ts(i,o,u)}function J0(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Bn=!0;else{if(!cg(i,u)&&(o.flags&128)===0)return Bn=!1,aD(i,o,u);Bn=(i.flags&131072)!==0}else Bn=!1,Ut&&(o.flags&1048576)!==0&&Ok(o,Xl,o.index);switch(o.lanes=0,o.tag){case 16:e:{var f=o.pendingProps;if(i=Mo(o.elementType),o.type=i,typeof i=="function")mm(i)?(f=Lo(i,f),o.tag=1,o=Z0(null,o,i,f,u)):(o.tag=0,o=rg(null,o,i,f,u));else{if(i!=null){var b=i.$$typeof;if(b===C){o.tag=11,o=F0(null,o,i,f,u);break e}else if(b===I){o.tag=14,o=U0(null,o,i,f,u);break e}}throw o=z(i)||i,Error(r(306,o,""))}}return o;case 0:return rg(i,o,o.type,o.pendingProps,u);case 1:return f=o.type,b=Lo(f,o.pendingProps),Z0(i,o,f,b,u);case 3:e:{if(pe(o,o.stateNode.containerInfo),i===null)throw Error(r(387));f=o.pendingProps;var S=o.memoizedState;b=S.element,Nm(i,o),su(o,f,null,u);var M=o.memoizedState;if(f=M.cache,Ls(o,Pn,f),f!==S.cache&&Em(o,[Pn],u,!0),iu(),f=M.element,S.isDehydrated)if(S={element:f,isDehydrated:!1,cache:M.cache},o.updateQueue.baseState=S,o.memoizedState=S,o.flags&256){o=W0(i,o,f,u);break e}else if(f!==b){b=ei(Error(r(424)),o),Ql(b),o=W0(i,o,f,u);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,hn=si(i.firstChild),tr=o,Ut=!0,Ds=null,ri=!0,u=Hk(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Co(),f===b){o=ts(i,o,u);break e}rr(i,o,f,u)}o=o.child}return o;case 26:return Gf(i,o),i===null?(u=cw(o.type,null,o.pendingProps,null))?o.memoizedState=u:Ut||(u=o.type,i=o.pendingProps,f=ld(ne.current).createElement(u),f[an]=o,f[Jn]=i,ir(f,u,i),Ln(f),o.stateNode=f):o.memoizedState=cw(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Se(o),i===null&&Ut&&(f=o.stateNode=aw(o.type,o.pendingProps,ne.current),tr=o,ri=!0,b=hn,Ws(o.type)?(qg=b,hn=si(f.firstChild)):hn=b),rr(i,o,o.pendingProps.children,u),Gf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Ut&&((b=f=hn)&&(f=jD(f,o.type,o.pendingProps,ri),f!==null?(o.stateNode=f,tr=o,hn=si(f.firstChild),ri=!1,b=!0):b=!1),b||zs(o)),Se(o),b=o.type,S=o.pendingProps,M=i!==null?i.memoizedProps:null,f=S.children,Pg(b,S)?f=null:M!==null&&Pg(b,M)&&(o.flags|=32),o.memoizedState!==null&&(b=jm(i,o,QI,null,null,u),Tu._currentValue=b),Gf(i,o),rr(i,o,f,u),o.child;case 6:return i===null&&Ut&&((i=u=hn)&&(u=PD(u,o.pendingProps,ri),u!==null?(o.stateNode=u,tr=o,hn=null,i=!0):i=!1),i||zs(o)),null;case 13:return Y0(i,o,u);case 4:return pe(o,o.stateNode.containerInfo),f=o.pendingProps,i===null?o.child=Do(o,null,f,u):rr(i,o,f,u),o.child;case 11:return F0(i,o,o.type,o.pendingProps,u);case 7:return rr(i,o,o.pendingProps,u),o.child;case 8:return rr(i,o,o.pendingProps.children,u),o.child;case 12:return rr(i,o,o.pendingProps.children,u),o.child;case 10:return f=o.pendingProps,Ls(o,o.type,f.value),rr(i,o,f.children,u),o.child;case 9:return b=o.type._context,f=o.pendingProps.children,No(o),b=nr(b),f=f(b),o.flags|=1,rr(i,o,f,u),o.child;case 14:return U0(i,o,o.type,o.pendingProps,u);case 15:return q0(i,o,o.type,o.pendingProps,u);case 19:return Q0(i,o,u);case 31:return oD(i,o,u);case 22:return H0(i,o,u,o.pendingProps);case 24:return No(o),f=nr(Pn),i===null?(b=Rm(),b===null&&(b=ln,S=Tm(),b.pooledCache=S,S.refCount++,S!==null&&(b.pooledCacheLanes|=u),b=S),o.memoizedState={parent:f,cache:b},Am(o),Ls(o,Pn,b)):((i.lanes&u)!==0&&(Nm(i,o),su(o,null,null,u),iu()),b=i.memoizedState,S=o.memoizedState,b.parent!==f?(b={parent:f,cache:f},o.memoizedState=b,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=b),Ls(o,Pn,f)):(f=S.cache,Ls(o,Pn,f),f!==b.cache&&Em(o,[Pn],u,!0))),rr(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function ns(i){i.flags|=4}function fg(i,o,u,f,b){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(_S())i.flags|=8192;else throw Io=Nf,Cm}else i.flags&=-16777217}function eS(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!mw(o))if(_S())i.flags|=8192;else throw Io=Nf,Cm}function Kf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Ge():536870912,i.lanes|=o,ja|=o)}function fu(i,o){if(!Ut)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function mn(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,f=0;if(o)for(var b=i.child;b!==null;)u|=b.lanes|b.childLanes,f|=b.subtreeFlags&65011712,f|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)u|=b.lanes|b.childLanes,f|=b.subtreeFlags,f|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=f,i.childLanes=u,o}function lD(i,o,u){var f=o.pendingProps;switch(vm(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mn(o),null;case 1:return mn(o),null;case 3:return u=o.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),o.memoizedState.cache!==f&&(o.flags|=2048),Qi(Pn),ye(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Ea(o)?ns(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,km())),mn(o),null;case 26:var b=o.type,S=o.memoizedState;return i===null?(ns(o),S!==null?(mn(o),eS(o,S)):(mn(o),fg(o,b,null,f,u))):S?S!==i.memoizedState?(ns(o),mn(o),eS(o,S)):(mn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==f&&ns(o),mn(o),fg(o,b,i,f,u)),null;case 27:if(ze(o),u=ne.current,b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==f&&ns(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return mn(o),null}i=ie.current,Ea(o)?Ik(o):(i=aw(b,f,u),o.stateNode=i,ns(o))}return mn(o),null;case 5:if(ze(o),b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==f&&ns(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return mn(o),null}if(S=ie.current,Ea(o))Ik(o);else{var M=ld(ne.current);switch(S){case 1:S=M.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:S=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":S=M.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":S=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":S=M.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof f.is=="string"?M.createElement("select",{is:f.is}):M.createElement("select"),f.multiple?S.multiple=!0:f.size&&(S.size=f.size);break;default:S=typeof f.is=="string"?M.createElement(b,{is:f.is}):M.createElement(b)}}S[an]=o,S[Jn]=f;e:for(M=o.child;M!==null;){if(M.tag===5||M.tag===6)S.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===o)break e;for(;M.sibling===null;){if(M.return===null||M.return===o)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}o.stateNode=S;e:switch(ir(S,b,f),b){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&ns(o)}}return mn(o),fg(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==f&&ns(o);else{if(typeof f!="string"&&o.stateNode===null)throw Error(r(166));if(i=ne.current,Ea(o)){if(i=o.stateNode,u=o.memoizedProps,f=null,b=tr,b!==null)switch(b.tag){case 27:case 5:f=b.memoizedProps}i[an]=o,i=!!(i.nodeValue===u||f!==null&&f.suppressHydrationWarning===!0||YS(i.nodeValue,u)),i||zs(o,!0)}else i=ld(i).createTextNode(f),i[an]=o,o.stateNode=i}return mn(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(f=Ea(o),u!==null){if(i===null){if(!f)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[an]=o}else Co(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;mn(o),i=!1}else u=km(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(Hr(o),o):(Hr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return mn(o),null;case 13:if(f=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=Ea(o),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(r(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[an]=o}else Co(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;mn(o),b=!1}else b=km(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return o.flags&256?(Hr(o),o):(Hr(o),null)}return Hr(o),(o.flags&128)!==0?(o.lanes=u,o):(u=f!==null,i=i!==null&&i.memoizedState!==null,u&&(f=o.child,b=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(b=f.alternate.memoizedState.cachePool.pool),S=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(S=f.memoizedState.cachePool.pool),S!==b&&(f.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),Kf(o,o.updateQueue),mn(o),null);case 4:return ye(),i===null&&Ig(o.stateNode.containerInfo),mn(o),null;case 10:return Qi(o.type),mn(o),null;case 19:if(G(Mn),f=o.memoizedState,f===null)return mn(o),null;if(b=(o.flags&128)!==0,S=f.rendering,S===null)if(b)fu(f,!1);else{if(Rn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Df(i),S!==null){for(o.flags|=128,fu(f,!1),i=S.updateQueue,o.updateQueue=i,Kf(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)Ck(u,i),u=u.sibling;return O(Mn,Mn.current&1|2),Ut&&Yi(o,f.treeForkCount),o.child}i=i.sibling}f.tail!==null&&re()>Qf&&(o.flags|=128,b=!0,fu(f,!1),o.lanes=4194304)}else{if(!b)if(i=Df(S),i!==null){if(o.flags|=128,b=!0,i=i.updateQueue,o.updateQueue=i,Kf(o,i),fu(f,!0),f.tail===null&&f.tailMode==="hidden"&&!S.alternate&&!Ut)return mn(o),null}else 2*re()-f.renderingStartTime>Qf&&u!==536870912&&(o.flags|=128,b=!0,fu(f,!1),o.lanes=4194304);f.isBackwards?(S.sibling=o.child,o.child=S):(i=f.last,i!==null?i.sibling=S:o.child=S,f.last=S)}return f.tail!==null?(i=f.tail,f.rendering=i,f.tail=i.sibling,f.renderingStartTime=re(),i.sibling=null,u=Mn.current,O(Mn,b?u&1|2:u&1),Ut&&Yi(o,f.treeForkCount),i):(mn(o),null);case 22:case 23:return Hr(o),Dm(),f=o.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(o.flags|=8192):f&&(o.flags|=8192),f?(u&536870912)!==0&&(o.flags&128)===0&&(mn(o),o.subtreeFlags&6&&(o.flags|=8192)):mn(o),u=o.updateQueue,u!==null&&Kf(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==u&&(o.flags|=2048),i!==null&&G(Oo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),Qi(Pn),mn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function uD(i,o){switch(vm(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Qi(Pn),ye(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return ze(o),null;case 31:if(o.memoizedState!==null){if(Hr(o),o.alternate===null)throw Error(r(340));Co()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Hr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Co()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return G(Mn),null;case 4:return ye(),null;case 10:return Qi(o.type),null;case 22:case 23:return Hr(o),Dm(),i!==null&&G(Oo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return Qi(Pn),null;case 25:return null;default:return null}}function tS(i,o){switch(vm(o),o.tag){case 3:Qi(Pn),ye();break;case 26:case 27:case 5:ze(o);break;case 4:ye();break;case 31:o.memoizedState!==null&&Hr(o);break;case 13:Hr(o);break;case 19:G(Mn);break;case 10:Qi(o.type);break;case 22:case 23:Hr(o),Dm(),i!==null&&G(Oo);break;case 24:Qi(Pn)}}function du(i,o){try{var u=o.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var b=f.next;u=b;do{if((u.tag&i)===i){f=void 0;var S=u.create,M=u.inst;f=S(),M.destroy=f}u=u.next}while(u!==b)}}catch(V){Jt(o,o.return,V)}}function Us(i,o,u){try{var f=o.updateQueue,b=f!==null?f.lastEffect:null;if(b!==null){var S=b.next;f=S;do{if((f.tag&i)===i){var M=f.inst,V=M.destroy;if(V!==void 0){M.destroy=void 0,b=o;var Q=u,de=V;try{de()}catch(ke){Jt(b,Q,ke)}}}f=f.next}while(f!==S)}}catch(ke){Jt(o,o.return,ke)}}function nS(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Vk(o,u)}catch(f){Jt(i,i.return,f)}}}function rS(i,o,u){u.props=Lo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(f){Jt(i,o,f)}}function pu(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof u=="function"?i.refCleanup=u(f):u.current=f}}catch(b){Jt(i,o,b)}}function Oi(i,o){var u=i.ref,f=i.refCleanup;if(u!==null)if(typeof f=="function")try{f()}catch(b){Jt(i,o,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(b){Jt(i,o,b)}else u.current=null}function iS(i){var o=i.type,u=i.memoizedProps,f=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&f.focus();break e;case"img":u.src?f.src=u.src:u.srcSet&&(f.srcset=u.srcSet)}}catch(b){Jt(i,i.return,b)}}function dg(i,o,u){try{var f=i.stateNode;OD(f,i.type,u,o),f[Jn]=o}catch(b){Jt(i,i.return,b)}}function sS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ws(i.type)||i.tag===4}function pg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||sS(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ws(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function hg(i,o,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(i),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Ue));else if(f!==4&&(f===27&&Ws(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(hg(i,o,u),i=i.sibling;i!==null;)hg(i,o,u),i=i.sibling}function Zf(i,o,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(f!==4&&(f===27&&Ws(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Zf(i,o,u),i=i.sibling;i!==null;)Zf(i,o,u),i=i.sibling}function oS(i){var o=i.stateNode,u=i.memoizedProps;try{for(var f=i.type,b=o.attributes;b.length;)o.removeAttributeNode(b[0]);ir(o,f,u),o[an]=i,o[Jn]=u}catch(S){Jt(i,i.return,S)}}var rs=!1,Fn=!1,mg=!1,aS=typeof WeakSet=="function"?WeakSet:Set,Zn=null;function cD(i,o){if(i=i.containerInfo,Lg=md,i=vk(i),lm(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var b=f.anchorOffset,S=f.focusNode;f=f.focusOffset;try{u.nodeType,S.nodeType}catch{u=null;break e}var M=0,V=-1,Q=-1,de=0,ke=0,Ae=i,me=null;t:for(;;){for(var be;Ae!==u||b!==0&&Ae.nodeType!==3||(V=M+b),Ae!==S||f!==0&&Ae.nodeType!==3||(Q=M+f),Ae.nodeType===3&&(M+=Ae.nodeValue.length),(be=Ae.firstChild)!==null;)me=Ae,Ae=be;for(;;){if(Ae===i)break t;if(me===u&&++de===b&&(V=M),me===S&&++ke===f&&(Q=M),(be=Ae.nextSibling)!==null)break;Ae=me,me=Ae.parentNode}Ae=be}u=V===-1||Q===-1?null:{start:V,end:Q}}else u=null}u=u||{start:0,end:0}}else u=null;for(jg={focusedElem:i,selectionRange:u},md=!1,Zn=o;Zn!==null;)if(o=Zn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Zn=i;else for(;Zn!==null;){switch(o=Zn,S=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)b=i[u],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&S!==null){i=void 0,u=o,b=S.memoizedProps,S=S.memoizedState,f=u.stateNode;try{var Qe=Lo(u.type,b);i=f.getSnapshotBeforeUpdate(Qe,S),f.__reactInternalSnapshotBeforeUpdate=i}catch(pt){Jt(u,u.return,pt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Bg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Bg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,Zn=i;break}Zn=o.return}}function lS(i,o,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:ss(i,u),f&4&&du(5,u);break;case 1:if(ss(i,u),f&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(M){Jt(u,u.return,M)}else{var b=Lo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(b,o,i.__reactInternalSnapshotBeforeUpdate)}catch(M){Jt(u,u.return,M)}}f&64&&nS(u),f&512&&pu(u,u.return);break;case 3:if(ss(i,u),f&64&&(i=u.updateQueue,i!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{Vk(i,o)}catch(M){Jt(u,u.return,M)}}break;case 27:o===null&&f&4&&oS(u);case 26:case 5:ss(i,u),o===null&&f&4&&iS(u),f&512&&pu(u,u.return);break;case 12:ss(i,u);break;case 31:ss(i,u),f&4&&fS(i,u);break;case 13:ss(i,u),f&4&&dS(i,u),f&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=vD.bind(null,u),$D(i,u))));break;case 22:if(f=u.memoizedState!==null||rs,!f){o=o!==null&&o.memoizedState!==null||Fn,b=rs;var S=Fn;rs=f,(Fn=o)&&!S?os(i,u,(u.subtreeFlags&8772)!==0):ss(i,u),rs=b,Fn=S}break;case 30:break;default:ss(i,u)}}function uS(i){var o=i.alternate;o!==null&&(i.alternate=null,uS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&jl(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var gn=null,Cr=!1;function is(i,o,u){for(u=u.child;u!==null;)cS(i,o,u),u=u.sibling}function cS(i,o,u){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(it,u)}catch{}switch(u.tag){case 26:Fn||Oi(u,o),is(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Fn||Oi(u,o);var f=gn,b=Cr;Ws(u.type)&&(gn=u.stateNode,Cr=!1),is(i,o,u),Su(u.stateNode),gn=f,Cr=b;break;case 5:Fn||Oi(u,o);case 6:if(f=gn,b=Cr,gn=null,is(i,o,u),gn=f,Cr=b,gn!==null)if(Cr)try{(gn.nodeType===9?gn.body:gn.nodeName==="HTML"?gn.ownerDocument.body:gn).removeChild(u.stateNode)}catch(S){Jt(u,o,S)}else try{gn.removeChild(u.stateNode)}catch(S){Jt(u,o,S)}break;case 18:gn!==null&&(Cr?(i=gn,nw(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Ga(i)):nw(gn,u.stateNode));break;case 4:f=gn,b=Cr,gn=u.stateNode.containerInfo,Cr=!0,is(i,o,u),gn=f,Cr=b;break;case 0:case 11:case 14:case 15:Us(2,u,o),Fn||Us(4,u,o),is(i,o,u);break;case 1:Fn||(Oi(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"&&rS(u,o,f)),is(i,o,u);break;case 21:is(i,o,u);break;case 22:Fn=(f=Fn)||u.memoizedState!==null,is(i,o,u),Fn=f;break;default:is(i,o,u)}}function fS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Ga(i)}catch(u){Jt(o,o.return,u)}}}function dS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Ga(i)}catch(u){Jt(o,o.return,u)}}function fD(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new aS),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new aS),o;default:throw Error(r(435,i.tag))}}function Wf(i,o){var u=fD(i);o.forEach(function(f){if(!u.has(f)){u.add(f);var b=xD.bind(null,i,f);f.then(b,b)}})}function Ar(i,o){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var b=u[f],S=i,M=o,V=M;e:for(;V!==null;){switch(V.tag){case 27:if(Ws(V.type)){gn=V.stateNode,Cr=!1;break e}break;case 5:gn=V.stateNode,Cr=!1;break e;case 3:case 4:gn=V.stateNode.containerInfo,Cr=!0;break e}V=V.return}if(gn===null)throw Error(r(160));cS(S,M,b),gn=null,Cr=!1,S=b.alternate,S!==null&&(S.return=null),b.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)pS(o,i),o=o.sibling}var bi=null;function pS(i,o){var u=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Ar(o,i),Nr(i),f&4&&(Us(3,i,i.return),du(3,i),Us(5,i,i.return));break;case 1:Ar(o,i),Nr(i),f&512&&(Fn||u===null||Oi(u,u.return)),f&64&&rs&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?f:u.concat(f))));break;case 26:var b=bi;if(Ar(o,i),Nr(i),f&512&&(Fn||u===null||Oi(u,u.return)),f&4){var S=u!==null?u.memoizedState:null;if(f=i.memoizedState,u===null)if(f===null)if(i.stateNode===null){e:{f=i.type,u=i.memoizedProps,b=b.ownerDocument||b;t:switch(f){case"title":S=b.getElementsByTagName("title")[0],(!S||S[xo]||S[an]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=b.createElement(f),b.head.insertBefore(S,b.querySelector("head > title"))),ir(S,f,u),S[an]=i,Ln(S),f=S;break e;case"link":var M=pw("link","href",b).get(f+(u.href||""));if(M){for(var V=0;V<M.length;V++)if(S=M[V],S.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&S.getAttribute("rel")===(u.rel==null?null:u.rel)&&S.getAttribute("title")===(u.title==null?null:u.title)&&S.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(V,1);break t}}S=b.createElement(f),ir(S,f,u),b.head.appendChild(S);break;case"meta":if(M=pw("meta","content",b).get(f+(u.content||""))){for(V=0;V<M.length;V++)if(S=M[V],S.getAttribute("content")===(u.content==null?null:""+u.content)&&S.getAttribute("name")===(u.name==null?null:u.name)&&S.getAttribute("property")===(u.property==null?null:u.property)&&S.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&S.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(V,1);break t}}S=b.createElement(f),ir(S,f,u),b.head.appendChild(S);break;default:throw Error(r(468,f))}S[an]=i,Ln(S),f=S}i.stateNode=f}else hw(b,i.type,i.stateNode);else i.stateNode=dw(b,f,i.memoizedProps);else S!==f?(S===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):S.count--,f===null?hw(b,i.type,i.stateNode):dw(b,f,i.memoizedProps)):f===null&&i.stateNode!==null&&dg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Ar(o,i),Nr(i),f&512&&(Fn||u===null||Oi(u,u.return)),u!==null&&f&4&&dg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Ar(o,i),Nr(i),f&512&&(Fn||u===null||Oi(u,u.return)),i.flags&32){b=i.stateNode;try{mt(b,"")}catch(Qe){Jt(i,i.return,Qe)}}f&4&&i.stateNode!=null&&(b=i.memoizedProps,dg(i,b,u!==null?u.memoizedProps:b)),f&1024&&(mg=!0);break;case 6:if(Ar(o,i),Nr(i),f&4){if(i.stateNode===null)throw Error(r(162));f=i.memoizedProps,u=i.stateNode;try{u.nodeValue=f}catch(Qe){Jt(i,i.return,Qe)}}break;case 3:if(fd=null,b=bi,bi=ud(o.containerInfo),Ar(o,i),bi=b,Nr(i),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Ga(o.containerInfo)}catch(Qe){Jt(i,i.return,Qe)}mg&&(mg=!1,hS(i));break;case 4:f=bi,bi=ud(i.stateNode.containerInfo),Ar(o,i),Nr(i),bi=f;break;case 12:Ar(o,i),Nr(i);break;case 31:Ar(o,i),Nr(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,Wf(i,f)));break;case 13:Ar(o,i),Nr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Xf=re()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,Wf(i,f)));break;case 22:b=i.memoizedState!==null;var Q=u!==null&&u.memoizedState!==null,de=rs,ke=Fn;if(rs=de||b,Fn=ke||Q,Ar(o,i),Fn=ke,rs=de,Nr(i),f&8192)e:for(o=i.stateNode,o._visibility=b?o._visibility&-2:o._visibility|1,b&&(u===null||Q||rs||Fn||jo(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){Q=u=o;try{if(S=Q.stateNode,b)M=S.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{V=Q.stateNode;var Ae=Q.memoizedProps.style,me=Ae!=null&&Ae.hasOwnProperty("display")?Ae.display:null;V.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(Qe){Jt(Q,Q.return,Qe)}}}else if(o.tag===6){if(u===null){Q=o;try{Q.stateNode.nodeValue=b?"":Q.memoizedProps}catch(Qe){Jt(Q,Q.return,Qe)}}}else if(o.tag===18){if(u===null){Q=o;try{var be=Q.stateNode;b?rw(be,!0):rw(Q.stateNode,!1)}catch(Qe){Jt(Q,Q.return,Qe)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}f&4&&(f=i.updateQueue,f!==null&&(u=f.retryQueue,u!==null&&(f.retryQueue=null,Wf(i,u))));break;case 19:Ar(o,i),Nr(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,Wf(i,f)));break;case 30:break;case 21:break;default:Ar(o,i),Nr(i)}}function Nr(i){var o=i.flags;if(o&2){try{for(var u,f=i.return;f!==null;){if(sS(f)){u=f;break}f=f.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var b=u.stateNode,S=pg(i);Zf(i,S,b);break;case 5:var M=u.stateNode;u.flags&32&&(mt(M,""),u.flags&=-33);var V=pg(i);Zf(i,V,M);break;case 3:case 4:var Q=u.stateNode.containerInfo,de=pg(i);hg(i,de,Q);break;default:throw Error(r(161))}}catch(ke){Jt(i,i.return,ke)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function hS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;hS(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function ss(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)lS(i,o.alternate,o),o=o.sibling}function jo(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Us(4,o,o.return),jo(o);break;case 1:Oi(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&rS(o,o.return,u),jo(o);break;case 27:Su(o.stateNode);case 26:case 5:Oi(o,o.return),jo(o);break;case 22:o.memoizedState===null&&jo(o);break;case 30:jo(o);break;default:jo(o)}i=i.sibling}}function os(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var f=o.alternate,b=i,S=o,M=S.flags;switch(S.tag){case 0:case 11:case 15:os(b,S,u),du(4,S);break;case 1:if(os(b,S,u),f=S,b=f.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(de){Jt(f,f.return,de)}if(f=S,b=f.updateQueue,b!==null){var V=f.stateNode;try{var Q=b.shared.hiddenCallbacks;if(Q!==null)for(b.shared.hiddenCallbacks=null,b=0;b<Q.length;b++)Gk(Q[b],V)}catch(de){Jt(f,f.return,de)}}u&&M&64&&nS(S),pu(S,S.return);break;case 27:oS(S);case 26:case 5:os(b,S,u),u&&f===null&&M&4&&iS(S),pu(S,S.return);break;case 12:os(b,S,u);break;case 31:os(b,S,u),u&&M&4&&fS(b,S);break;case 13:os(b,S,u),u&&M&4&&dS(b,S);break;case 22:S.memoizedState===null&&os(b,S,u),pu(S,S.return);break;case 30:break;default:os(b,S,u)}o=o.sibling}}function gg(i,o){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&Jl(u))}function bg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Jl(i))}function yi(i,o,u,f){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)mS(i,o,u,f),o=o.sibling}function mS(i,o,u,f){var b=o.flags;switch(o.tag){case 0:case 11:case 15:yi(i,o,u,f),b&2048&&du(9,o);break;case 1:yi(i,o,u,f);break;case 3:yi(i,o,u,f),b&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Jl(i)));break;case 12:if(b&2048){yi(i,o,u,f),i=o.stateNode;try{var S=o.memoizedProps,M=S.id,V=S.onPostCommit;typeof V=="function"&&V(M,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Q){Jt(o,o.return,Q)}}else yi(i,o,u,f);break;case 31:yi(i,o,u,f);break;case 13:yi(i,o,u,f);break;case 23:break;case 22:S=o.stateNode,M=o.alternate,o.memoizedState!==null?S._visibility&2?yi(i,o,u,f):hu(i,o):S._visibility&2?yi(i,o,u,f):(S._visibility|=2,Da(i,o,u,f,(o.subtreeFlags&10256)!==0||!1)),b&2048&&gg(M,o);break;case 24:yi(i,o,u,f),b&2048&&bg(o.alternate,o);break;default:yi(i,o,u,f)}}function Da(i,o,u,f,b){for(b=b&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var S=i,M=o,V=u,Q=f,de=M.flags;switch(M.tag){case 0:case 11:case 15:Da(S,M,V,Q,b),du(8,M);break;case 23:break;case 22:var ke=M.stateNode;M.memoizedState!==null?ke._visibility&2?Da(S,M,V,Q,b):hu(S,M):(ke._visibility|=2,Da(S,M,V,Q,b)),b&&de&2048&&gg(M.alternate,M);break;case 24:Da(S,M,V,Q,b),b&&de&2048&&bg(M.alternate,M);break;default:Da(S,M,V,Q,b)}o=o.sibling}}function hu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=i,f=o,b=f.flags;switch(f.tag){case 22:hu(u,f),b&2048&&gg(f.alternate,f);break;case 24:hu(u,f),b&2048&&bg(f.alternate,f);break;default:hu(u,f)}o=o.sibling}}var mu=8192;function za(i,o,u){if(i.subtreeFlags&mu)for(i=i.child;i!==null;)gS(i,o,u),i=i.sibling}function gS(i,o,u){switch(i.tag){case 26:za(i,o,u),i.flags&mu&&i.memoizedState!==null&&XD(u,bi,i.memoizedState,i.memoizedProps);break;case 5:za(i,o,u);break;case 3:case 4:var f=bi;bi=ud(i.stateNode.containerInfo),za(i,o,u),bi=f;break;case 22:i.memoizedState===null&&(f=i.alternate,f!==null&&f.memoizedState!==null?(f=mu,mu=16777216,za(i,o,u),mu=f):za(i,o,u));break;default:za(i,o,u)}}function bS(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function gu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var f=o[u];Zn=f,vS(f,i)}bS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)yS(i),i=i.sibling}function yS(i){switch(i.tag){case 0:case 11:case 15:gu(i),i.flags&2048&&Us(9,i,i.return);break;case 3:gu(i);break;case 12:gu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Yf(i)):gu(i);break;default:gu(i)}}function Yf(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var f=o[u];Zn=f,vS(f,i)}bS(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Us(8,o,o.return),Yf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,Yf(o));break;default:Yf(o)}i=i.sibling}}function vS(i,o){for(;Zn!==null;){var u=Zn;switch(u.tag){case 0:case 11:case 15:Us(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var f=u.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Jl(u.memoizedState.cache)}if(f=u.child,f!==null)f.return=u,Zn=f;else e:for(u=i;Zn!==null;){f=Zn;var b=f.sibling,S=f.return;if(uS(f),f===u){Zn=null;break e}if(b!==null){b.return=S,Zn=b;break e}Zn=S}}}var dD={getCacheForType:function(i){var o=nr(Pn),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return nr(Pn).controller.signal}},pD=typeof WeakMap=="function"?WeakMap:Map,Zt=0,ln=null,zt=null,$t=0,Qt=0,Gr=null,qs=!1,La=!1,yg=!1,as=0,Rn=0,Hs=0,Po=0,vg=0,Vr=0,ja=0,bu=null,Or=null,xg=!1,Xf=0,xS=0,Qf=1/0,Jf=null,Gs=null,Gn=0,Vs=null,Pa=null,ls=0,kg=0,Sg=null,kS=null,yu=0,wg=null;function Kr(){return(Zt&2)!==0&&$t!==0?$t&-$t:F.T!==null?Ag():Kn()}function SS(){if(Vr===0)if(($t&536870912)===0||Ut){var i=Ke;Ke<<=1,(Ke&3932160)===0&&(Ke=262144),Vr=i}else Vr=536870912;return i=qr.current,i!==null&&(i.flags|=32),Vr}function Mr(i,o,u){(i===ln&&(Qt===2||Qt===9)||i.cancelPendingCommit!==null)&&($a(i,0),Ks(i,$t,Vr,!1)),St(i,u),((Zt&2)===0||i!==ln)&&(i===ln&&((Zt&2)===0&&(Po|=u),Rn===4&&Ks(i,$t,Vr,!1)),Mi(i))}function wS(i,o,u){if((Zt&6)!==0)throw Error(r(327));var f=!u&&(o&127)===0&&(o&i.expiredLanes)===0||X(i,o),b=f?gD(i,o):Tg(i,o,!0),S=f;do{if(b===0){La&&!f&&Ks(i,o,0,!1);break}else{if(u=i.current.alternate,S&&!hD(u)){b=Tg(i,o,!1),S=!1;continue}if(b===2){if(S=o,i.errorRecoveryDisabledLanes&S)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){o=M;e:{var V=i;b=bu;var Q=V.current.memoizedState.isDehydrated;if(Q&&($a(V,M).flags|=256),M=Tg(V,M,!1),M!==2){if(yg&&!Q){V.errorRecoveryDisabledLanes|=S,Po|=S,b=4;break e}S=Or,Or=b,S!==null&&(Or===null?Or=S:Or.push.apply(Or,S))}b=M}if(S=!1,b!==2)continue}}if(b===1){$a(i,0),Ks(i,o,0,!0);break}e:{switch(f=i,S=b,S){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Ks(f,o,Vr,!qs);break e;case 2:Or=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(b=Xf+300-re(),10<b)){if(Ks(f,o,Vr,!qs),Y(f,0,!0)!==0)break e;ls=o,f.timeoutHandle=ew(ES.bind(null,f,u,Or,Jf,xg,o,Vr,Po,ja,qs,S,"Throttled",-0,0),b);break e}ES(f,u,Or,Jf,xg,o,Vr,Po,ja,qs,S,null,-0,0)}}break}while(!0);Mi(i)}function ES(i,o,u,f,b,S,M,V,Q,de,ke,Ae,me,be){if(i.timeoutHandle=-1,Ae=o.subtreeFlags,Ae&8192||(Ae&16785408)===16785408){Ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ue},gS(o,S,Ae);var Qe=(S&62914560)===S?Xf-re():(S&4194048)===S?xS-re():0;if(Qe=QD(Ae,Qe),Qe!==null){ls=S,i.cancelPendingCommit=Qe(MS.bind(null,i,o,S,u,f,b,M,V,Q,ke,Ae,null,me,be)),Ks(i,S,M,!de);return}}MS(i,o,S,u,f,b,M,V,Q)}function hD(i){for(var o=i;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var f=0;f<u.length;f++){var b=u[f],S=b.getSnapshot;b=b.value;try{if(!Fr(S(),b))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ks(i,o,u,f){o&=~vg,o&=~Po,i.suspendedLanes|=o,i.pingedLanes&=~o,f&&(i.warmLanes|=o),f=i.expirationTimes;for(var b=o;0<b;){var S=31-st(b),M=1<<S;f[S]=-1,b&=~M}u!==0&&Le(i,u,o)}function ed(){return(Zt&6)===0?(vu(0),!1):!0}function Eg(){if(zt!==null){if(Qt===0)var i=zt.return;else i=zt,Xi=Ao=null,Bm(i),Aa=null,tu=0,i=zt;for(;i!==null;)tS(i.alternate,i),i=i.return;zt=null}}function $a(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,DD(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),ls=0,Eg(),ln=i,zt=u=Wi(i.current,null),$t=o,Qt=0,Gr=null,qs=!1,La=X(i,o),yg=!1,ja=Vr=vg=Po=Hs=Rn=0,Or=bu=null,xg=!1,(o&8)!==0&&(o|=o&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=o;0<f;){var b=31-st(f),S=1<<b;o|=i[b],f&=~S}return as=o,kf(),u}function TS(i,o){Rt=null,F.H=uu,o===Ca||o===Af?(o=Fk(),Qt=3):o===Cm?(o=Fk(),Qt=4):Qt=o===ng?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Gr=o,zt===null&&(Rn=1,qf(i,ei(o,i.current)))}function _S(){var i=qr.current;return i===null?!0:($t&4194048)===$t?ii===null:($t&62914560)===$t||($t&536870912)!==0?i===ii:!1}function RS(){var i=F.H;return F.H=uu,i===null?uu:i}function CS(){var i=F.A;return F.A=dD,i}function td(){Rn=4,qs||($t&4194048)!==$t&&qr.current!==null||(La=!0),(Hs&134217727)===0&&(Po&134217727)===0||ln===null||Ks(ln,$t,Vr,!1)}function Tg(i,o,u){var f=Zt;Zt|=2;var b=RS(),S=CS();(ln!==i||$t!==o)&&(Jf=null,$a(i,o)),o=!1;var M=Rn;e:do try{if(Qt!==0&&zt!==null){var V=zt,Q=Gr;switch(Qt){case 8:Eg(),M=6;break e;case 3:case 2:case 9:case 6:qr.current===null&&(o=!0);var de=Qt;if(Qt=0,Gr=null,Ba(i,V,Q,de),u&&La){M=0;break e}break;default:de=Qt,Qt=0,Gr=null,Ba(i,V,Q,de)}}mD(),M=Rn;break}catch(ke){TS(i,ke)}while(!0);return o&&i.shellSuspendCounter++,Xi=Ao=null,Zt=f,F.H=b,F.A=S,zt===null&&(ln=null,$t=0,kf()),M}function mD(){for(;zt!==null;)AS(zt)}function gD(i,o){var u=Zt;Zt|=2;var f=RS(),b=CS();ln!==i||$t!==o?(Jf=null,Qf=re()+500,$a(i,o)):La=X(i,o);e:do try{if(Qt!==0&&zt!==null){o=zt;var S=Gr;t:switch(Qt){case 1:Qt=0,Gr=null,Ba(i,o,S,1);break;case 2:case 9:if($k(S)){Qt=0,Gr=null,NS(o);break}o=function(){Qt!==2&&Qt!==9||ln!==i||(Qt=7),Mi(i)},S.then(o,o);break e;case 3:Qt=7;break e;case 4:Qt=5;break e;case 7:$k(S)?(Qt=0,Gr=null,NS(o)):(Qt=0,Gr=null,Ba(i,o,S,7));break;case 5:var M=null;switch(zt.tag){case 26:M=zt.memoizedState;case 5:case 27:var V=zt;if(M?mw(M):V.stateNode.complete){Qt=0,Gr=null;var Q=V.sibling;if(Q!==null)zt=Q;else{var de=V.return;de!==null?(zt=de,nd(de)):zt=null}break t}}Qt=0,Gr=null,Ba(i,o,S,5);break;case 6:Qt=0,Gr=null,Ba(i,o,S,6);break;case 8:Eg(),Rn=6;break e;default:throw Error(r(462))}}bD();break}catch(ke){TS(i,ke)}while(!0);return Xi=Ao=null,F.H=f,F.A=b,Zt=u,zt!==null?0:(ln=null,$t=0,kf(),Rn)}function bD(){for(;zt!==null&&!fe();)AS(zt)}function AS(i){var o=J0(i.alternate,i,as);i.memoizedProps=i.pendingProps,o===null?nd(i):zt=o}function NS(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=K0(u,o,o.pendingProps,o.type,void 0,$t);break;case 11:o=K0(u,o,o.pendingProps,o.type.render,o.ref,$t);break;case 5:Bm(o);default:tS(u,o),o=zt=Ck(o,as),o=J0(u,o,as)}i.memoizedProps=i.pendingProps,o===null?nd(i):zt=o}function Ba(i,o,u,f){Xi=Ao=null,Bm(o),Aa=null,tu=0;var b=o.return;try{if(sD(i,b,o,u,$t)){Rn=1,qf(i,ei(u,i.current)),zt=null;return}}catch(S){if(b!==null)throw zt=b,S;Rn=1,qf(i,ei(u,i.current)),zt=null;return}o.flags&32768?(Ut||f===1?i=!0:La||($t&536870912)!==0?i=!1:(qs=i=!0,(f===2||f===9||f===3||f===6)&&(f=qr.current,f!==null&&f.tag===13&&(f.flags|=16384))),OS(o,i)):nd(o)}function nd(i){var o=i;do{if((o.flags&32768)!==0){OS(o,qs);return}i=o.return;var u=lD(o.alternate,o,as);if(u!==null){zt=u;return}if(o=o.sibling,o!==null){zt=o;return}zt=o=i}while(o!==null);Rn===0&&(Rn=5)}function OS(i,o){do{var u=uD(i.alternate,i);if(u!==null){u.flags&=32767,zt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){zt=i;return}zt=i=u}while(i!==null);Rn=6,zt=null}function MS(i,o,u,f,b,S,M,V,Q){i.cancelPendingCommit=null;do rd();while(Gn!==0);if((Zt&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(S=o.lanes|o.childLanes,S|=pm,$e(i,u,S,M,V,Q),i===ln&&(zt=ln=null,$t=0),Pa=o,Vs=i,ls=u,kg=S,Sg=b,kS=f,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,kD(Ie,function(){return jS(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||f){f=F.T,F.T=null,b=U.p,U.p=2,M=Zt,Zt|=4;try{cD(i,o,u)}finally{Zt=M,U.p=b,F.T=f}}Gn=1,IS(),DS(),zS()}}function IS(){if(Gn===1){Gn=0;var i=Vs,o=Pa,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=F.T,F.T=null;var f=U.p;U.p=2;var b=Zt;Zt|=4;try{pS(o,i);var S=jg,M=vk(i.containerInfo),V=S.focusedElem,Q=S.selectionRange;if(M!==V&&V&&V.ownerDocument&&yk(V.ownerDocument.documentElement,V)){if(Q!==null&&lm(V)){var de=Q.start,ke=Q.end;if(ke===void 0&&(ke=de),"selectionStart"in V)V.selectionStart=de,V.selectionEnd=Math.min(ke,V.value.length);else{var Ae=V.ownerDocument||document,me=Ae&&Ae.defaultView||window;if(me.getSelection){var be=me.getSelection(),Qe=V.textContent.length,pt=Math.min(Q.start,Qe),nn=Q.end===void 0?pt:Math.min(Q.end,Qe);!be.extend&&pt>nn&&(M=nn,nn=pt,pt=M);var ae=bk(V,pt),se=bk(V,nn);if(ae&&se&&(be.rangeCount!==1||be.anchorNode!==ae.node||be.anchorOffset!==ae.offset||be.focusNode!==se.node||be.focusOffset!==se.offset)){var ce=Ae.createRange();ce.setStart(ae.node,ae.offset),be.removeAllRanges(),pt>nn?(be.addRange(ce),be.extend(se.node,se.offset)):(ce.setEnd(se.node,se.offset),be.addRange(ce))}}}}for(Ae=[],be=V;be=be.parentNode;)be.nodeType===1&&Ae.push({element:be,left:be.scrollLeft,top:be.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Ae.length;V++){var Ee=Ae[V];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}md=!!Lg,jg=Lg=null}finally{Zt=b,U.p=f,F.T=u}}i.current=o,Gn=2}}function DS(){if(Gn===2){Gn=0;var i=Vs,o=Pa,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=F.T,F.T=null;var f=U.p;U.p=2;var b=Zt;Zt|=4;try{lS(i,o.alternate,o)}finally{Zt=b,U.p=f,F.T=u}}Gn=3}}function zS(){if(Gn===4||Gn===3){Gn=0,oe();var i=Vs,o=Pa,u=ls,f=kS;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Gn=5:(Gn=0,Pa=Vs=null,LS(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(Gs=null),Dt(u),o=o.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(it,o,void 0,(o.current.flags&128)===128)}catch{}if(f!==null){o=F.T,b=U.p,U.p=2,F.T=null;try{for(var S=i.onRecoverableError,M=0;M<f.length;M++){var V=f[M];S(V.value,{componentStack:V.stack})}}finally{F.T=o,U.p=b}}(ls&3)!==0&&rd(),Mi(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===wg?yu++:(yu=0,wg=i):yu=0,vu(0)}}function LS(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,Jl(o)))}function rd(){return IS(),DS(),zS(),jS()}function jS(){if(Gn!==5)return!1;var i=Vs,o=kg;kg=0;var u=Dt(ls),f=F.T,b=U.p;try{U.p=32>u?32:u,F.T=null,u=Sg,Sg=null;var S=Vs,M=ls;if(Gn=0,Pa=Vs=null,ls=0,(Zt&6)!==0)throw Error(r(331));var V=Zt;if(Zt|=4,yS(S.current),mS(S,S.current,M,u),Zt=V,vu(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(it,S)}catch{}return!0}finally{U.p=b,F.T=f,LS(i,o)}}function PS(i,o,u){o=ei(u,o),o=tg(i.stateNode,o,2),i=$s(i,o,2),i!==null&&(St(i,2),Mi(i))}function Jt(i,o,u){if(i.tag===3)PS(i,i,u);else for(;o!==null;){if(o.tag===3){PS(o,i,u);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Gs===null||!Gs.has(f))){i=ei(u,i),u=$0(2),f=$s(o,u,2),f!==null&&(B0(u,f,o,i),St(f,2),Mi(f));break}}o=o.return}}function _g(i,o,u){var f=i.pingCache;if(f===null){f=i.pingCache=new pD;var b=new Set;f.set(o,b)}else b=f.get(o),b===void 0&&(b=new Set,f.set(o,b));b.has(u)||(yg=!0,b.add(u),i=yD.bind(null,i,o,u),o.then(i,i))}function yD(i,o,u){var f=i.pingCache;f!==null&&f.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,ln===i&&($t&u)===u&&(Rn===4||Rn===3&&($t&62914560)===$t&&300>re()-Xf?(Zt&2)===0&&$a(i,0):vg|=u,ja===$t&&(ja=0)),Mi(i)}function $S(i,o){o===0&&(o=Ge()),i=_o(i,o),i!==null&&(St(i,o),Mi(i))}function vD(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),$S(i,u)}function xD(i,o){var u=0;switch(i.tag){case 31:case 13:var f=i.stateNode,b=i.memoizedState;b!==null&&(u=b.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(o),$S(i,u)}function kD(i,o){return Pe(i,o)}var id=null,Fa=null,Rg=!1,sd=!1,Cg=!1,Zs=0;function Mi(i){i!==Fa&&i.next===null&&(Fa===null?id=Fa=i:Fa=Fa.next=i),sd=!0,Rg||(Rg=!0,wD())}function vu(i,o){if(!Cg&&sd){Cg=!0;do for(var u=!1,f=id;f!==null;){if(i!==0){var b=f.pendingLanes;if(b===0)var S=0;else{var M=f.suspendedLanes,V=f.pingedLanes;S=(1<<31-st(42|i)+1)-1,S&=b&~(M&~V),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(u=!0,qS(f,S))}else S=$t,S=Y(f,f===ln?S:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(S&3)===0||X(f,S)||(u=!0,qS(f,S));f=f.next}while(u);Cg=!1}}function SD(){BS()}function BS(){sd=Rg=!1;var i=0;Zs!==0&&ID()&&(i=Zs);for(var o=re(),u=null,f=id;f!==null;){var b=f.next,S=FS(f,o);S===0?(f.next=null,u===null?id=b:u.next=b,b===null&&(Fa=u)):(u=f,(i!==0||(S&3)!==0)&&(sd=!0)),f=b}Gn!==0&&Gn!==5||vu(i),Zs!==0&&(Zs=0)}function FS(i,o){for(var u=i.suspendedLanes,f=i.pingedLanes,b=i.expirationTimes,S=i.pendingLanes&-62914561;0<S;){var M=31-st(S),V=1<<M,Q=b[M];Q===-1?((V&u)===0||(V&f)!==0)&&(b[M]=we(V,o)):Q<=o&&(i.expiredLanes|=V),S&=~V}if(o=ln,u=$t,u=Y(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,u===0||i===o&&(Qt===2||Qt===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&ge(f),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||X(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(f!==null&&ge(f),Dt(u)){case 2:case 8:u=ue;break;case 32:u=Ie;break;case 268435456:u=Ze;break;default:u=Ie}return f=US.bind(null,i),u=Pe(u,f),i.callbackPriority=o,i.callbackNode=u,o}return f!==null&&f!==null&&ge(f),i.callbackPriority=2,i.callbackNode=null,2}function US(i,o){if(Gn!==0&&Gn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(rd()&&i.callbackNode!==u)return null;var f=$t;return f=Y(i,i===ln?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(wS(i,f,o),FS(i,re()),i.callbackNode!=null&&i.callbackNode===u?US.bind(null,i):null)}function qS(i,o){if(rd())return null;wS(i,o,!0)}function wD(){zD(function(){(Zt&6)!==0?Pe(J,SD):BS()})}function Ag(){if(Zs===0){var i=_a;i===0&&(i=Fe,Fe<<=1,(Fe&261888)===0&&(Fe=256)),Zs=i}return Zs}function HS(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Os(""+i)}function GS(i,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,i.id&&u.setAttribute("form",i.id),o.parentNode.insertBefore(u,o),i=new FormData(i),u.parentNode.removeChild(u),i}function ED(i,o,u,f,b){if(o==="submit"&&u&&u.stateNode===b){var S=HS((b[Jn]||null).action),M=f.submitter;M&&(o=(o=M[Jn]||null)?HS(o.formAction):M.getAttribute("formAction"),o!==null&&(S=o,M=null));var V=new bf("action","action",null,f,b);i.push({event:V,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Zs!==0){var Q=M?GS(b,M):new FormData(b);Wm(u,{pending:!0,data:Q,method:b.method,action:S},null,Q)}}else typeof S=="function"&&(V.preventDefault(),Q=M?GS(b,M):new FormData(b),Wm(u,{pending:!0,data:Q,method:b.method,action:S},S,Q))},currentTarget:b}]})}}for(var Ng=0;Ng<dm.length;Ng++){var Og=dm[Ng],TD=Og.toLowerCase(),_D=Og[0].toUpperCase()+Og.slice(1);gi(TD,"on"+_D)}gi(Sk,"onAnimationEnd"),gi(wk,"onAnimationIteration"),gi(Ek,"onAnimationStart"),gi("dblclick","onDoubleClick"),gi("focusin","onFocus"),gi("focusout","onBlur"),gi(UI,"onTransitionRun"),gi(qI,"onTransitionStart"),gi(HI,"onTransitionCancel"),gi(Tk,"onTransitionEnd"),De("onMouseEnter",["mouseout","mouseover"]),De("onMouseLeave",["mouseout","mouseover"]),De("onPointerEnter",["pointerout","pointerover"]),De("onPointerLeave",["pointerout","pointerover"]),Vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xu="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(" "),RD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xu));function VS(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var f=i[u],b=f.event;f=f.listeners;e:{var S=void 0;if(o)for(var M=f.length-1;0<=M;M--){var V=f[M],Q=V.instance,de=V.currentTarget;if(V=V.listener,Q!==S&&b.isPropagationStopped())break e;S=V,b.currentTarget=de;try{S(b)}catch(ke){xf(ke)}b.currentTarget=null,S=Q}else for(M=0;M<f.length;M++){if(V=f[M],Q=V.instance,de=V.currentTarget,V=V.listener,Q!==S&&b.isPropagationStopped())break e;S=V,b.currentTarget=de;try{S(b)}catch(ke){xf(ke)}b.currentTarget=null,S=Q}}}}function Lt(i,o){var u=o[Ll];u===void 0&&(u=o[Ll]=new Set);var f=i+"__bubble";u.has(f)||(KS(o,i,2,!1),u.add(f))}function Mg(i,o,u){var f=0;o&&(f|=4),KS(u,i,f,o)}var od="_reactListening"+Math.random().toString(36).slice(2);function Ig(i){if(!i[od]){i[od]=!0,uf.forEach(function(u){u!=="selectionchange"&&(RD.has(u)||Mg(u,!1,i),Mg(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[od]||(o[od]=!0,Mg("selectionchange",!1,o))}}function KS(i,o,u,f){switch(Sw(o)){case 2:var b=tz;break;case 8:b=nz;break;default:b=Zg}u=b.bind(null,o,u,i),b=void 0,!Jh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(b=!0),f?b!==void 0?i.addEventListener(o,u,{capture:!0,passive:b}):i.addEventListener(o,u,!0):b!==void 0?i.addEventListener(o,u,{passive:b}):i.addEventListener(o,u,!1)}function Dg(i,o,u,f,b){var S=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var M=f.tag;if(M===3||M===4){var V=f.stateNode.containerInfo;if(V===b)break;if(M===4)for(M=f.return;M!==null;){var Q=M.tag;if((Q===3||Q===4)&&M.stateNode.containerInfo===b)return;M=M.return}for(;V!==null;){if(M=yr(V),M===null)return;if(Q=M.tag,Q===5||Q===6||Q===26||Q===27){f=S=M;continue e}V=V.parentNode}}f=f.return}pf(function(){var de=S,ke=Tt(u),Ae=[];e:{var me=_k.get(i);if(me!==void 0){var be=bf,Qe=i;switch(i){case"keypress":if(mf(u)===0)break e;case"keydown":case"keyup":be=xI;break;case"focusin":Qe="focus",be=rm;break;case"focusout":Qe="blur",be=rm;break;case"beforeblur":case"afterblur":be=rm;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":be=tk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=lI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=wI;break;case Sk:case wk:case Ek:be=fI;break;case Tk:be=TI;break;case"scroll":case"scrollend":be=oI;break;case"wheel":be=RI;break;case"copy":case"cut":case"paste":be=pI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=rk;break;case"toggle":case"beforetoggle":be=AI}var pt=(o&4)!==0,nn=!pt&&(i==="scroll"||i==="scrollend"),ae=pt?me!==null?me+"Capture":null:me;pt=[];for(var se=de,ce;se!==null;){var Ee=se;if(ce=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||ce===null||ae===null||(Ee=Ul(se,ae),Ee!=null&&pt.push(ku(se,Ee,ce))),nn)break;se=se.return}0<pt.length&&(me=new be(me,Qe,null,u,ke),Ae.push({event:me,listeners:pt}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",be=i==="mouseout"||i==="pointerout",me&&u!==Je&&(Qe=u.relatedTarget||u.fromElement)&&(yr(Qe)||Qe[Hi]))break e;if((be||me)&&(me=ke.window===ke?ke:(me=ke.ownerDocument)?me.defaultView||me.parentWindow:window,be?(Qe=u.relatedTarget||u.toElement,be=de,Qe=Qe?yr(Qe):null,Qe!==null&&(nn=a(Qe),pt=Qe.tag,Qe!==nn||pt!==5&&pt!==27&&pt!==6)&&(Qe=null)):(be=null,Qe=de),be!==Qe)){if(pt=tk,Ee="onMouseLeave",ae="onMouseEnter",se="mouse",(i==="pointerout"||i==="pointerover")&&(pt=rk,Ee="onPointerLeave",ae="onPointerEnter",se="pointer"),nn=be==null?me:Cs(be),ce=Qe==null?me:Cs(Qe),me=new pt(Ee,se+"leave",be,u,ke),me.target=nn,me.relatedTarget=ce,Ee=null,yr(ke)===de&&(pt=new pt(ae,se+"enter",Qe,u,ke),pt.target=ce,pt.relatedTarget=nn,Ee=pt),nn=Ee,be&&Qe)t:{for(pt=CD,ae=be,se=Qe,ce=0,Ee=ae;Ee;Ee=pt(Ee))ce++;Ee=0;for(var ft=se;ft;ft=pt(ft))Ee++;for(;0<ce-Ee;)ae=pt(ae),ce--;for(;0<Ee-ce;)se=pt(se),Ee--;for(;ce--;){if(ae===se||se!==null&&ae===se.alternate){pt=ae;break t}ae=pt(ae),se=pt(se)}pt=null}else pt=null;be!==null&&ZS(Ae,me,be,pt,!1),Qe!==null&&nn!==null&&ZS(Ae,nn,Qe,pt,!0)}}e:{if(me=de?Cs(de):window,be=me.nodeName&&me.nodeName.toLowerCase(),be==="select"||be==="input"&&me.type==="file")var Gt=fk;else if(uk(me))if(dk)Gt=$I;else{Gt=jI;var et=LI}else be=me.nodeName,!be||be.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?de&&Ns(de.elementType)&&(Gt=fk):Gt=PI;if(Gt&&(Gt=Gt(i,de))){ck(Ae,Gt,u,ke);break e}et&&et(i,me,de),i==="focusout"&&de&&me.type==="number"&&de.memoizedProps.value!=null&&ma(me,"number",me.value)}switch(et=de?Cs(de):window,i){case"focusin":(uk(et)||et.contentEditable==="true")&&(ya=et,um=de,Yl=null);break;case"focusout":Yl=um=ya=null;break;case"mousedown":cm=!0;break;case"contextmenu":case"mouseup":case"dragend":cm=!1,xk(Ae,u,ke);break;case"selectionchange":if(FI)break;case"keydown":case"keyup":xk(Ae,u,ke)}var Ct;if(sm)e:{switch(i){case"compositionstart":var Bt="onCompositionStart";break e;case"compositionend":Bt="onCompositionEnd";break e;case"compositionupdate":Bt="onCompositionUpdate";break e}Bt=void 0}else ba?ak(i,u)&&(Bt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Bt="onCompositionStart");Bt&&(ik&&u.locale!=="ko"&&(ba||Bt!=="onCompositionStart"?Bt==="onCompositionEnd"&&ba&&(Ct=Jx()):(Ms=ke,em="value"in Ms?Ms.value:Ms.textContent,ba=!0)),et=ad(de,Bt),0<et.length&&(Bt=new nk(Bt,i,null,u,ke),Ae.push({event:Bt,listeners:et}),Ct?Bt.data=Ct:(Ct=lk(u),Ct!==null&&(Bt.data=Ct)))),(Ct=OI?MI(i,u):II(i,u))&&(Bt=ad(de,"onBeforeInput"),0<Bt.length&&(et=new nk("onBeforeInput","beforeinput",null,u,ke),Ae.push({event:et,listeners:Bt}),et.data=Ct)),ED(Ae,i,de,u,ke)}VS(Ae,o)})}function ku(i,o,u){return{instance:i,listener:o,currentTarget:u}}function ad(i,o){for(var u=o+"Capture",f=[];i!==null;){var b=i,S=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||S===null||(b=Ul(i,u),b!=null&&f.unshift(ku(i,b,S)),b=Ul(i,o),b!=null&&f.push(ku(i,b,S))),i.tag===3)return f;i=i.return}return[]}function CD(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function ZS(i,o,u,f,b){for(var S=o._reactName,M=[];u!==null&&u!==f;){var V=u,Q=V.alternate,de=V.stateNode;if(V=V.tag,Q!==null&&Q===f)break;V!==5&&V!==26&&V!==27||de===null||(Q=de,b?(de=Ul(u,S),de!=null&&M.unshift(ku(u,de,Q))):b||(de=Ul(u,S),de!=null&&M.push(ku(u,de,Q)))),u=u.return}M.length!==0&&i.push({event:o,listeners:M})}var AD=/\r\n?/g,ND=/\u0000|\uFFFD/g;function WS(i){return(typeof i=="string"?i:""+i).replace(AD,`
9
+ `).replace(ND,"")}function YS(i,o){return o=WS(o),WS(i)===o}function tn(i,o,u,f,b,S){switch(u){case"children":typeof f=="string"?o==="body"||o==="textarea"&&f===""||mt(i,f):(typeof f=="number"||typeof f=="bigint")&&o!=="body"&&mt(i,""+f);break;case"className":$r(i,"class",f);break;case"tabIndex":$r(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":$r(i,u,f);break;case"style":Xt(i,f,S);break;case"data":if(o!=="object"){$r(i,"data",f);break}case"src":case"href":if(f===""&&(o!=="a"||u!=="href")){i.removeAttribute(u);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(u);break}f=Os(""+f),i.setAttribute(u,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(u,"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 S=="function"&&(u==="formAction"?(o!=="input"&&tn(i,o,"name",b.name,b,null),tn(i,o,"formEncType",b.formEncType,b,null),tn(i,o,"formMethod",b.formMethod,b,null),tn(i,o,"formTarget",b.formTarget,b,null)):(tn(i,o,"encType",b.encType,b,null),tn(i,o,"method",b.method,b,null),tn(i,o,"target",b.target,b,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(u);break}f=Os(""+f),i.setAttribute(u,f);break;case"onClick":f!=null&&(i.onclick=Ue);break;case"onScroll":f!=null&&Lt("scroll",i);break;case"onScrollEnd":f!=null&&Lt("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}u=Os(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,""+f):i.removeAttribute(u);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":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":f===!0?i.setAttribute(u,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,f):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(u,f):i.removeAttribute(u);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(u):i.setAttribute(u,f);break;case"popover":Lt("beforetoggle",i),Lt("toggle",i),lr(i,"popover",f);break;case"xlinkActuate":Tr(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Tr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Tr(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Tr(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Tr(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Tr(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":lr(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Ki.get(u)||u,lr(i,u,f))}}function zg(i,o,u,f,b,S){switch(u){case"style":Xt(i,f,S);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof f=="string"?mt(i,f):(typeof f=="number"||typeof f=="bigint")&&mt(i,""+f);break;case"onScroll":f!=null&&Lt("scroll",i);break;case"onScrollEnd":f!=null&&Lt("scrollend",i);break;case"onClick":f!=null&&(i.onclick=Ue);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ko.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),o=u.slice(2,b?u.length-7:void 0),S=i[Jn]||null,S=S!=null?S[u]:null,typeof S=="function"&&i.removeEventListener(o,S,b),typeof f=="function")){typeof S!="function"&&S!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(o,f,b);break e}u in i?i[u]=f:f===!0?i.setAttribute(u,""):lr(i,u,f)}}}function ir(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Lt("error",i),Lt("load",i);var f=!1,b=!1,S;for(S in u)if(u.hasOwnProperty(S)){var M=u[S];if(M!=null)switch(S){case"src":f=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:tn(i,o,S,M,u,null)}}b&&tn(i,o,"srcSet",u.srcSet,u,null),f&&tn(i,o,"src",u.src,u,null);return;case"input":Lt("invalid",i);var V=S=M=b=null,Q=null,de=null;for(f in u)if(u.hasOwnProperty(f)){var ke=u[f];if(ke!=null)switch(f){case"name":b=ke;break;case"type":M=ke;break;case"checked":Q=ke;break;case"defaultChecked":de=ke;break;case"value":S=ke;break;case"defaultValue":V=ke;break;case"children":case"dangerouslySetInnerHTML":if(ke!=null)throw Error(r(137,o));break;default:tn(i,o,f,ke,u,null)}}So(i,S,V,Q,de,M,b,!1);return;case"select":Lt("invalid",i),f=M=S=null;for(b in u)if(u.hasOwnProperty(b)&&(V=u[b],V!=null))switch(b){case"value":S=V;break;case"defaultValue":M=V;break;case"multiple":f=V;default:tn(i,o,b,V,u,null)}o=S,u=M,i.multiple=!!f,o!=null?er(i,!!f,o,!1):u!=null&&er(i,!!f,u,!0);return;case"textarea":Lt("invalid",i),S=b=f=null;for(M in u)if(u.hasOwnProperty(M)&&(V=u[M],V!=null))switch(M){case"value":f=V;break;case"defaultValue":b=V;break;case"children":S=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:tn(i,o,M,V,u,null)}ga(i,f,b,S);return;case"option":for(Q in u)u.hasOwnProperty(Q)&&(f=u[Q],f!=null)&&(Q==="selected"?i.selected=f&&typeof f!="function"&&typeof f!="symbol":tn(i,o,Q,f,u,null));return;case"dialog":Lt("beforetoggle",i),Lt("toggle",i),Lt("cancel",i),Lt("close",i);break;case"iframe":case"object":Lt("load",i);break;case"video":case"audio":for(f=0;f<xu.length;f++)Lt(xu[f],i);break;case"image":Lt("error",i),Lt("load",i);break;case"details":Lt("toggle",i);break;case"embed":case"source":case"link":Lt("error",i),Lt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in u)if(u.hasOwnProperty(de)&&(f=u[de],f!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:tn(i,o,de,f,u,null)}return;default:if(Ns(o)){for(ke in u)u.hasOwnProperty(ke)&&(f=u[ke],f!==void 0&&zg(i,o,ke,f,u,void 0));return}}for(V in u)u.hasOwnProperty(V)&&(f=u[V],f!=null&&tn(i,o,V,f,u,null))}function OD(i,o,u,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,S=null,M=null,V=null,Q=null,de=null,ke=null;for(be in u){var Ae=u[be];if(u.hasOwnProperty(be)&&Ae!=null)switch(be){case"checked":break;case"value":break;case"defaultValue":Q=Ae;default:f.hasOwnProperty(be)||tn(i,o,be,null,f,Ae)}}for(var me in f){var be=f[me];if(Ae=u[me],f.hasOwnProperty(me)&&(be!=null||Ae!=null))switch(me){case"type":S=be;break;case"name":b=be;break;case"checked":de=be;break;case"defaultChecked":ke=be;break;case"value":M=be;break;case"defaultValue":V=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,o));break;default:be!==Ae&&tn(i,o,me,be,f,Ae)}}$l(i,M,V,Q,de,ke,S,b);return;case"select":be=M=V=me=null;for(S in u)if(Q=u[S],u.hasOwnProperty(S)&&Q!=null)switch(S){case"value":break;case"multiple":be=Q;default:f.hasOwnProperty(S)||tn(i,o,S,null,f,Q)}for(b in f)if(S=f[b],Q=u[b],f.hasOwnProperty(b)&&(S!=null||Q!=null))switch(b){case"value":me=S;break;case"defaultValue":V=S;break;case"multiple":M=S;default:S!==Q&&tn(i,o,b,S,f,Q)}o=V,u=M,f=be,me!=null?er(i,!!u,me,!1):!!f!=!!u&&(o!=null?er(i,!!u,o,!0):er(i,!!u,u?[]:"",!1));return;case"textarea":be=me=null;for(V in u)if(b=u[V],u.hasOwnProperty(V)&&b!=null&&!f.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:tn(i,o,V,null,f,b)}for(M in f)if(b=f[M],S=u[M],f.hasOwnProperty(M)&&(b!=null||S!=null))switch(M){case"value":me=b;break;case"defaultValue":be=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==S&&tn(i,o,M,b,f,S)}ff(i,me,be);return;case"option":for(var Qe in u)me=u[Qe],u.hasOwnProperty(Qe)&&me!=null&&!f.hasOwnProperty(Qe)&&(Qe==="selected"?i.selected=!1:tn(i,o,Qe,null,f,me));for(Q in f)me=f[Q],be=u[Q],f.hasOwnProperty(Q)&&me!==be&&(me!=null||be!=null)&&(Q==="selected"?i.selected=me&&typeof me!="function"&&typeof me!="symbol":tn(i,o,Q,me,f,be));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 pt in u)me=u[pt],u.hasOwnProperty(pt)&&me!=null&&!f.hasOwnProperty(pt)&&tn(i,o,pt,null,f,me);for(de in f)if(me=f[de],be=u[de],f.hasOwnProperty(de)&&me!==be&&(me!=null||be!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,o));break;default:tn(i,o,de,me,f,be)}return;default:if(Ns(o)){for(var nn in u)me=u[nn],u.hasOwnProperty(nn)&&me!==void 0&&!f.hasOwnProperty(nn)&&zg(i,o,nn,void 0,f,me);for(ke in f)me=f[ke],be=u[ke],!f.hasOwnProperty(ke)||me===be||me===void 0&&be===void 0||zg(i,o,ke,me,f,be);return}}for(var ae in u)me=u[ae],u.hasOwnProperty(ae)&&me!=null&&!f.hasOwnProperty(ae)&&tn(i,o,ae,null,f,me);for(Ae in f)me=f[Ae],be=u[Ae],!f.hasOwnProperty(Ae)||me===be||me==null&&be==null||tn(i,o,Ae,me,f,be)}function XS(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function MD(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,u=performance.getEntriesByType("resource"),f=0;f<u.length;f++){var b=u[f],S=b.transferSize,M=b.initiatorType,V=b.duration;if(S&&V&&XS(M)){for(M=0,V=b.responseEnd,f+=1;f<u.length;f++){var Q=u[f],de=Q.startTime;if(de>V)break;var ke=Q.transferSize,Ae=Q.initiatorType;ke&&XS(Ae)&&(Q=Q.responseEnd,M+=ke*(Q<V?1:(V-de)/(Q-de)))}if(--f,o+=8*(S+M)/(b.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Lg=null,jg=null;function ld(i){return i.nodeType===9?i:i.ownerDocument}function QS(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function JS(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function Pg(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var $g=null;function ID(){var i=window.event;return i&&i.type==="popstate"?i===$g?!1:($g=i,!0):($g=null,!1)}var ew=typeof setTimeout=="function"?setTimeout:void 0,DD=typeof clearTimeout=="function"?clearTimeout:void 0,tw=typeof Promise=="function"?Promise:void 0,zD=typeof queueMicrotask=="function"?queueMicrotask:typeof tw<"u"?function(i){return tw.resolve(null).then(i).catch(LD)}:ew;function LD(i){setTimeout(function(){throw i})}function Ws(i){return i==="head"}function nw(i,o){var u=o,f=0;do{var b=u.nextSibling;if(i.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(f===0){i.removeChild(b),Ga(o);return}f--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")f++;else if(u==="html")Su(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Su(u);for(var S=u.firstChild;S;){var M=S.nextSibling,V=S.nodeName;S[xo]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&S.rel.toLowerCase()==="stylesheet"||u.removeChild(S),S=M}}else u==="body"&&Su(i.ownerDocument.body);u=b}while(u);Ga(o)}function rw(i,o){var u=i;i=0;do{var f=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),f&&f.nodeType===8)if(u=f.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=f}while(u)}function Bg(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Bg(u),jl(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function jD(i,o,u,f){for(;i.nodeType===1;){var b=u;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[xo])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(S=i.getAttribute("rel"),S==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(S!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(S=i.getAttribute("src"),(S!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&S&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var S=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===S)return i}else return i;if(i=si(i.nextSibling),i===null)break}return null}function PD(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=si(i.nextSibling),i===null))return null;return i}function iw(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=si(i.nextSibling),i===null))return null;return i}function Fg(i){return i.data==="$?"||i.data==="$~"}function Ug(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function $D(i,o){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||u.readyState!=="loading")o();else{var f=function(){o(),u.removeEventListener("DOMContentLoaded",f)};u.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function si(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var qg=null;function sw(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return si(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function ow(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return i;o--}else u!=="/$"&&u!=="/&"||o++}i=i.previousSibling}return null}function aw(i,o,u){switch(o=ld(u),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Su(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);jl(i)}var oi=new Map,lw=new Set;function ud(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var us=U.d;U.d={f:BD,r:FD,D:UD,C:qD,L:HD,m:GD,X:KD,S:VD,M:ZD};function BD(){var i=us.f(),o=ed();return i||o}function FD(i){var o=Gi(i);o!==null&&o.tag===5&&o.type==="form"?T0(o):us.r(i)}var Ua=typeof document>"u"?null:document;function uw(i,o,u){var f=Ua;if(f&&typeof o=="string"&&o){var b=_r(o);b='link[rel="'+i+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),lw.has(b)||(lw.add(b),i={rel:i,crossOrigin:u,href:o},f.querySelector(b)===null&&(o=f.createElement("link"),ir(o,"link",i),Ln(o),f.head.appendChild(o)))}}function UD(i){us.D(i),uw("dns-prefetch",i,null)}function qD(i,o){us.C(i,o),uw("preconnect",i,o)}function HD(i,o,u){us.L(i,o,u);var f=Ua;if(f&&i&&o){var b='link[rel="preload"][as="'+_r(o)+'"]';o==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+_r(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+_r(u.imageSizes)+'"]')):b+='[href="'+_r(i)+'"]';var S=b;switch(o){case"style":S=qa(i);break;case"script":S=Ha(i)}oi.has(S)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),oi.set(S,i),f.querySelector(b)!==null||o==="style"&&f.querySelector(wu(S))||o==="script"&&f.querySelector(Eu(S))||(o=f.createElement("link"),ir(o,"link",i),Ln(o),f.head.appendChild(o)))}}function GD(i,o){us.m(i,o);var u=Ua;if(u&&i){var f=o&&typeof o.as=="string"?o.as:"script",b='link[rel="modulepreload"][as="'+_r(f)+'"][href="'+_r(i)+'"]',S=b;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Ha(i)}if(!oi.has(S)&&(i=m({rel:"modulepreload",href:i},o),oi.set(S,i),u.querySelector(b)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Eu(S)))return}f=u.createElement("link"),ir(f,"link",i),Ln(f),u.head.appendChild(f)}}}function VD(i,o,u){us.S(i,o,u);var f=Ua;if(f&&i){var b=As(f).hoistableStyles,S=qa(i);o=o||"default";var M=b.get(S);if(!M){var V={loading:0,preload:null};if(M=f.querySelector(wu(S)))V.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=oi.get(S))&&Hg(i,u);var Q=M=f.createElement("link");Ln(Q),ir(Q,"link",i),Q._p=new Promise(function(de,ke){Q.onload=de,Q.onerror=ke}),Q.addEventListener("load",function(){V.loading|=1}),Q.addEventListener("error",function(){V.loading|=2}),V.loading|=4,cd(M,o,f)}M={type:"stylesheet",instance:M,count:1,state:V},b.set(S,M)}}}function KD(i,o){us.X(i,o);var u=Ua;if(u&&i){var f=As(u).hoistableScripts,b=Ha(i),S=f.get(b);S||(S=u.querySelector(Eu(b)),S||(i=m({src:i,async:!0},o),(o=oi.get(b))&&Gg(i,o),S=u.createElement("script"),Ln(S),ir(S,"link",i),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},f.set(b,S))}}function ZD(i,o){us.M(i,o);var u=Ua;if(u&&i){var f=As(u).hoistableScripts,b=Ha(i),S=f.get(b);S||(S=u.querySelector(Eu(b)),S||(i=m({src:i,async:!0,type:"module"},o),(o=oi.get(b))&&Gg(i,o),S=u.createElement("script"),Ln(S),ir(S,"link",i),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},f.set(b,S))}}function cw(i,o,u,f){var b=(b=ne.current)?ud(b):null;if(!b)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=qa(u.href),u=As(b).hoistableStyles,f=u.get(o),f||(f={type:"style",instance:null,count:0,state:null},u.set(o,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=qa(u.href);var S=As(b).hoistableStyles,M=S.get(i);if(M||(b=b.ownerDocument||b,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(i,M),(S=b.querySelector(wu(i)))&&!S._p&&(M.instance=S,M.state.loading=5),oi.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},oi.set(i,u),S||WD(b,i,u,M.state))),o&&f===null)throw Error(r(528,""));return M}if(o&&f!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Ha(u),u=As(b).hoistableScripts,f=u.get(o),f||(f={type:"script",instance:null,count:0,state:null},u.set(o,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function qa(i){return'href="'+_r(i)+'"'}function wu(i){return'link[rel="stylesheet"]['+i+"]"}function fw(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function WD(i,o,u,f){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?f.loading=1:(o=i.createElement("link"),f.preload=o,o.addEventListener("load",function(){return f.loading|=1}),o.addEventListener("error",function(){return f.loading|=2}),ir(o,"link",u),Ln(o),i.head.appendChild(o))}function Ha(i){return'[src="'+_r(i)+'"]'}function Eu(i){return"script[async]"+i}function dw(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var f=i.querySelector('style[data-href~="'+_r(u.href)+'"]');if(f)return o.instance=f,Ln(f),f;var b=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),Ln(f),ir(f,"style",b),cd(f,u.precedence,i),o.instance=f;case"stylesheet":b=qa(u.href);var S=i.querySelector(wu(b));if(S)return o.state.loading|=4,o.instance=S,Ln(S),S;f=fw(u),(b=oi.get(b))&&Hg(f,b),S=(i.ownerDocument||i).createElement("link"),Ln(S);var M=S;return M._p=new Promise(function(V,Q){M.onload=V,M.onerror=Q}),ir(S,"link",f),o.state.loading|=4,cd(S,u.precedence,i),o.instance=S;case"script":return S=Ha(u.src),(b=i.querySelector(Eu(S)))?(o.instance=b,Ln(b),b):(f=u,(b=oi.get(S))&&(f=m({},u),Gg(f,b)),i=i.ownerDocument||i,b=i.createElement("script"),Ln(b),ir(b,"link",f),i.head.appendChild(b),o.instance=b);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(f=o.instance,o.state.loading|=4,cd(f,u.precedence,i));return o.instance}function cd(i,o,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=f.length?f[f.length-1]:null,S=b,M=0;M<f.length;M++){var V=f[M];if(V.dataset.precedence===o)S=V;else if(S!==b)break}S?S.parentNode.insertBefore(i,S.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function Hg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Gg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var fd=null;function pw(i,o,u){if(fd===null){var f=new Map,b=fd=new Map;b.set(u,f)}else b=fd,f=b.get(u),f||(f=new Map,b.set(u,f));if(f.has(i))return f;for(f.set(i,null),u=u.getElementsByTagName(i),b=0;b<u.length;b++){var S=u[b];if(!(S[xo]||S[an]||i==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var M=S.getAttribute(o)||"";M=i+M;var V=f.get(M);V?V.push(S):f.set(M,[S])}}return f}function hw(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function YD(i,o,u){if(u===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function mw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function XD(i,o,u,f){if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=qa(f.href),S=o.querySelector(wu(b));if(S){o=S._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=dd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=S,Ln(S);return}S=o.ownerDocument||o,f=fw(f),(b=oi.get(b))&&Hg(f,b),S=S.createElement("link"),Ln(S);var M=S;M._p=new Promise(function(V,Q){M.onload=V,M.onerror=Q}),ir(S,"link",f),u.instance=S}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=dd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var Vg=0;function QD(i,o){return i.stylesheets&&i.count===0&&hd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var f=setTimeout(function(){if(i.stylesheets&&hd(i,i.stylesheets),i.unsuspend){var S=i.unsuspend;i.unsuspend=null,S()}},6e4+o);0<i.imgBytes&&Vg===0&&(Vg=62500*MD());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&hd(i,i.stylesheets),i.unsuspend)){var S=i.unsuspend;i.unsuspend=null,S()}},(i.imgBytes>Vg?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(f),clearTimeout(b)}}:null}function dd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var pd=null;function hd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,pd=new Map,o.forEach(JD,i),pd=null,dd.call(i))}function JD(i,o){if(!(o.state.loading&4)){var u=pd.get(i);if(u)var f=u.get(null);else{u=new Map,pd.set(i,u);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<b.length;S++){var M=b[S];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),f=M)}f&&u.set(null,f)}b=o.instance,M=b.getAttribute("data-precedence"),S=u.get(M)||f,S===f&&u.set(null,b),u.set(M,b),this.count++,f=dd.bind(this),b.addEventListener("load",f),b.addEventListener("error",f),S?S.parentNode.insertBefore(b,S.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),o.state.loading|=4}}var Tu={$$typeof:T,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function ez(i,o,u,f,b,S,M,V,Q){this.tag=1,this.containerInfo=i,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=ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ct(0),this.hiddenUpdates=ct(null),this.identifierPrefix=f,this.onUncaughtError=b,this.onCaughtError=S,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function gw(i,o,u,f,b,S,M,V,Q,de,ke,Ae){return i=new ez(i,o,u,M,Q,de,ke,Ae,V),o=1,S===!0&&(o|=24),S=Ur(3,null,null,o),i.current=S,S.stateNode=i,o=Tm(),o.refCount++,i.pooledCache=o,o.refCount++,S.memoizedState={element:f,isDehydrated:u,cache:o},Am(S),i}function bw(i){return i?(i=ka,i):ka}function yw(i,o,u,f,b,S){b=bw(b),f.context===null?f.context=b:f.pendingContext=b,f=Ps(o),f.payload={element:u},S=S===void 0?null:S,S!==null&&(f.callback=S),u=$s(i,f,o),u!==null&&(Mr(u,i,o),ru(u,i,o))}function vw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Kg(i,o){vw(i,o),(i=i.alternate)&&vw(i,o)}function xw(i){if(i.tag===13||i.tag===31){var o=_o(i,67108864);o!==null&&Mr(o,i,67108864),Kg(i,67108864)}}function kw(i){if(i.tag===13||i.tag===31){var o=Kr();o=tt(o);var u=_o(i,o);u!==null&&Mr(u,i,o),Kg(i,o)}}var md=!0;function tz(i,o,u,f){var b=F.T;F.T=null;var S=U.p;try{U.p=2,Zg(i,o,u,f)}finally{U.p=S,F.T=b}}function nz(i,o,u,f){var b=F.T;F.T=null;var S=U.p;try{U.p=8,Zg(i,o,u,f)}finally{U.p=S,F.T=b}}function Zg(i,o,u,f){if(md){var b=Wg(f);if(b===null)Dg(i,o,f,gd,u),ww(i,f);else if(iz(b,i,o,u,f))f.stopPropagation();else if(ww(i,f),o&4&&-1<rz.indexOf(i)){for(;b!==null;){var S=Gi(b);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var M=Xe(S.pendingLanes);if(M!==0){var V=S;for(V.pendingLanes|=2,V.entangledLanes|=2;M;){var Q=1<<31-st(M);V.entanglements[1]|=Q,M&=~Q}Mi(S),(Zt&6)===0&&(Qf=re()+500,vu(0))}}break;case 31:case 13:V=_o(S,2),V!==null&&Mr(V,S,2),ed(),Kg(S,2)}if(S=Wg(f),S===null&&Dg(i,o,f,gd,u),S===b)break;b=S}b!==null&&f.stopPropagation()}else Dg(i,o,f,null,u)}}function Wg(i){return i=Tt(i),Yg(i)}var gd=null;function Yg(i){if(gd=null,i=yr(i),i!==null){var o=a(i);if(o===null)i=null;else{var u=o.tag;if(u===13){if(i=l(o),i!==null)return i;i=null}else if(u===31){if(i=c(o),i!==null)return i;i=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return gd=i,null}function Sw(i){switch(i){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(_e()){case J:return 2;case ue:return 8;case Ie:case Be:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var Xg=!1,Ys=null,Xs=null,Qs=null,_u=new Map,Ru=new Map,Js=[],rz="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 ww(i,o){switch(i){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Xs=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":_u.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ru.delete(o.pointerId)}}function Cu(i,o,u,f,b,S){return i===null||i.nativeEvent!==S?(i={blockedOn:o,domEventName:u,eventSystemFlags:f,nativeEvent:S,targetContainers:[b]},o!==null&&(o=Gi(o),o!==null&&xw(o)),i):(i.eventSystemFlags|=f,o=i.targetContainers,b!==null&&o.indexOf(b)===-1&&o.push(b),i)}function iz(i,o,u,f,b){switch(o){case"focusin":return Ys=Cu(Ys,i,o,u,f,b),!0;case"dragenter":return Xs=Cu(Xs,i,o,u,f,b),!0;case"mouseover":return Qs=Cu(Qs,i,o,u,f,b),!0;case"pointerover":var S=b.pointerId;return _u.set(S,Cu(_u.get(S)||null,i,o,u,f,b)),!0;case"gotpointercapture":return S=b.pointerId,Ru.set(S,Cu(Ru.get(S)||null,i,o,u,f,b)),!0}return!1}function Ew(i){var o=yr(i.target);if(o!==null){var u=a(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){i.blockedOn=o,Qn(i.priority,function(){kw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,Qn(i.priority,function(){kw(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function bd(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Wg(i.nativeEvent);if(u===null){u=i.nativeEvent;var f=new u.constructor(u.type,u);Je=f,u.target.dispatchEvent(f),Je=null}else return o=Gi(u),o!==null&&xw(o),i.blockedOn=u,!1;o.shift()}return!0}function Tw(i,o,u){bd(i)&&u.delete(o)}function sz(){Xg=!1,Ys!==null&&bd(Ys)&&(Ys=null),Xs!==null&&bd(Xs)&&(Xs=null),Qs!==null&&bd(Qs)&&(Qs=null),_u.forEach(Tw),Ru.forEach(Tw)}function yd(i,o){i.blockedOn===o&&(i.blockedOn=null,Xg||(Xg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,sz)))}var vd=null;function _w(i){vd!==i&&(vd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vd===i&&(vd=null);for(var o=0;o<i.length;o+=3){var u=i[o],f=i[o+1],b=i[o+2];if(typeof f!="function"){if(Yg(f||u)===null)continue;break}var S=Gi(u);S!==null&&(i.splice(o,3),o-=3,Wm(S,{pending:!0,data:b,method:u.method,action:f},f,b))}}))}function Ga(i){function o(Q){return yd(Q,i)}Ys!==null&&yd(Ys,i),Xs!==null&&yd(Xs,i),Qs!==null&&yd(Qs,i),_u.forEach(o),Ru.forEach(o);for(var u=0;u<Js.length;u++){var f=Js[u];f.blockedOn===i&&(f.blockedOn=null)}for(;0<Js.length&&(u=Js[0],u.blockedOn===null);)Ew(u),u.blockedOn===null&&Js.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(f=0;f<u.length;f+=3){var b=u[f],S=u[f+1],M=b[Jn]||null;if(typeof S=="function")M||_w(u);else if(M){var V=null;if(S&&S.hasAttribute("formAction")){if(b=S,M=S[Jn]||null)V=M.formAction;else if(Yg(b)!==null)continue}else V=M.action;typeof V=="function"?u[f+1]=V:(u.splice(f,3),f-=3),_w(u)}}}function Rw(){function i(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(M){return b=M})},focusReset:"manual",scroll:"manual"})}function o(){b!==null&&(b(),b=null),f||setTimeout(u,20)}function u(){if(!f&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){f=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),b!==null&&(b(),b=null)}}}function Qg(i){this._internalRoot=i}xd.prototype.render=Qg.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,f=Kr();yw(u,f,i,o,null,null)},xd.prototype.unmount=Qg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;yw(i.current,2,null,i,null,null),ed(),o[Hi]=null}};function xd(i){this._internalRoot=i}xd.prototype.unstable_scheduleHydration=function(i){if(i){var o=Kn();i={blockedOn:null,target:i,priority:o};for(var u=0;u<Js.length&&o!==0&&o<Js[u].priority;u++);Js.splice(u,0,i),u===0&&Ew(i)}};var Cw=t.version;if(Cw!=="19.2.6")throw Error(r(527,Cw,"19.2.6"));U.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var oz={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kd.isDisabled&&kd.supportsFiber)try{it=kd.inject(oz),nt=kd}catch{}}return Nu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,f="",b=z0,S=L0,M=j0;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError)),o=gw(i,1,!1,null,null,u,f,null,b,S,M,Rw),i[Hi]=o.current,Ig(i),new Qg(o)},Nu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var f=!1,b="",S=z0,M=L0,V=j0,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(S=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(V=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),o=gw(i,1,!0,o,u??null,f,b,Q,S,M,V,Rw),o.context=bw(null),u=o.current,f=Kr(),f=tt(f),b=Ps(f),b.callback=null,$s(u,b,f),u=f,o.current.lanes=u,St(o,u),Mi(o),i[Hi]=o.current,Ig(i),new xd(o)},Nu.version="19.2.6",Nu}var Pw;function gz(){if(Pw)return tb.exports;Pw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),tb.exports=mz(),tb.exports}var bz=gz(),Ou={},$w;function yz(){if($w)return Ou;$w=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.styleq=void 0;var e=new WeakMap,t="$$css";function n(s){var a,l,c;return s!=null&&(a=s.disableCache===!0,l=s.disableMix===!0,c=s.transform),function(){for(var d=[],h="",m=null,g="",y=a?null:e,k=new Array(arguments.length),w=0;w<arguments.length;w++)k[w]=arguments[w];for(;k.length>0;){var _=k.pop();if(!(_==null||_===!1)){if(Array.isArray(_)){for(var E=0;E<_.length;E++)k.push(_[E]);continue}var R=c!=null?c(_):_;if(R.$$css!=null){var T="";if(y!=null&&y.has(R)){var C=y.get(R);C!=null&&(T=C[0],g=C[2],d.push.apply(d,C[1]),y=C[3])}else{var A=[];for(var N in R){var I=R[N];if(N===t){var H=R[N];H!==!0&&(g=g?H+"; "+g:H);continue}typeof I=="string"||I===null?d.includes(N)||(d.push(N),y!=null&&A.push(N),typeof I=="string"&&(T+=T?" "+I:I)):console.error("styleq: ".concat(N," typeof ").concat(String(I),' is not "string" or "null".'))}if(y!=null){var $=new WeakMap;y.set(R,[T,A,g,$]),y=$}}T&&(h=h?T+" "+h:T)}else if(l)m==null&&(m={}),m=Object.assign({},R,m);else{var L=null;for(var K in R){var Z=R[K];Z!==void 0&&(d.includes(K)||(Z!=null&&(m==null&&(m={}),L==null&&(L={}),L[K]=Z),d.push(K),y=null))}L!=null&&(m=Object.assign(L,m))}}}var q=[h,m,g];return q}}var r=Ou.styleq=n();return r.factory=n,Ou}var vz=yz();function An(...e){const[t,n,r]=vz.styleq(e),s={};return t!=null&&t!==""&&(s.className=t),n!=null&&Object.keys(n).length>0&&(s.style=n),r!=null&&r!==""&&(s["data-style-src"]=r),s}function V_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=V_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xz(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=V_(e))&&(r&&(r+=" "),r+=t);return r}function Sn(...e){return xz(e)}function wn({rootClass:e,stylexStyles:t,className:n,style:r}){const s=An(t);return{className:Sn(e,s.className,n),style:{...s.style,...r}}}const ki={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",khDVqt:"ui-uxw1ft",kMv6JI:"ui-1acoasx",kIxVMA:"ui-1rlb8dw",ksF3WI:"ui-tg4lcy",kYm2EN:"ui-10zfh2d",kqGeR4:"ui-ipogy4",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},sizeSm:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1jg1sa",kGO01o:"ui-18d9i69",kE3dHu:"ui-1rplcre",$$css:!0},sizeBase:{kLKAdn:"ui-493x5y",kpe85a:"ui-g31tg3",kGO01o:"ui-b6dno7",kE3dHu:"ui-43mhey",$$css:!0},pill:{kIxVMA:"ui-c8ce4q",ksF3WI:"ui-j5toj7",kYm2EN:"ui-16ti9za",kqGeR4:"ui-11hym3f",$$css:!0},pillSizeSm:{kLKAdn:"ui-493x5y",kpe85a:"ui-1yxiud8",kGO01o:"ui-b6dno7",kE3dHu:"ui-yab65l",$$css:!0},pillSizeBase:{kLKAdn:"ui-5pb957",kpe85a:"ui-17v7654",kGO01o:"ui-1mmyrcj",kE3dHu:"ui-1lfpczk",$$css:!0},variantAccent:{kMwMTN:"ui-kbann2",kWkggS:"ui-gsjhps",$$css:!0},variantNeutral:{kMwMTN:"ui-19aaqeu",kWkggS:"ui-i07v4r",$$css:!0},variantSuccess:{kMwMTN:"ui-1w5rjie",kWkggS:"ui-1buh4up",$$css:!0},variantWarn:{kMwMTN:"ui-1izesbo",kWkggS:"ui-1xvwvse",$$css:!0},variantDanger:{kMwMTN:"ui-1jh5svw",kWkggS:"ui-1xnwcy6",$$css:!0}};function kz({pill:e,size:t,variant:n}){return[ki.base,t==="sm"?ki.sizeSm:ki.sizeBase,e?[ki.pill,t==="sm"?ki.pillSizeSm:ki.pillSizeBase]:null,Sz(n)]}function Sz(e){switch(e){case"accent":return ki.variantAccent;case"neutral":return ki.variantNeutral;case"success":return ki.variantSuccess;case"warn":return ki.variantWarn;case"danger":return ki.variantDanger}}function ra({children:e,variant:t="neutral",size:n="base",pill:r=!1,as:s="span",className:a,style:l,...c}){const p=wn({rootClass:"ui-status-badge",stylexStyles:kz({pill:r,size:n,variant:t}),className:a,style:l});return v.jsx(s,{className:p.className,style:p.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function wz(e,t){return function(r,...s){const a=new URL(e);return a.searchParams.set("code",r.toString()),s.forEach(l=>a.searchParams.append("args[]",l)),`${t} error #${r}; visit ${a} for the full message.`}}const Xn=wz("https://base-ui.com/production-error","Base UI"),Bw={};function wr(e,t){const n=x.useRef(Bw);return n.current===Bw&&(n.current=e(t)),n}function ks(e,t,n,r){const s=wr(K_).current;return Tz(s,e,t,n,r)&&Z_(s,[e,t,n,r]),s.callback}function Ez(e){const t=wr(K_).current;return _z(t,e)&&Z_(t,e),t.callback}function K_(){return{callback:null,cleanup:null,refs:[]}}function Tz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function _z(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Z_(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=a(n);typeof l=="function"&&(r[s]=l);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=r[s];typeof l=="function"?l():a(null);break}case"object":{a.current=null;break}}}}}}}const Rz=parseInt(x.version,10);function yv(e){return Rz>=e}function Fw(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(yv(19)?n?.ref:t.ref)??null}function hy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Cz(e,t){const n={};for(const r in e){const s=e[r];if(t?.hasOwnProperty(r)){const a=t[r](s);a!=null&&Object.assign(n,a);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function Az(e,t){return typeof e=="function"?e(t):e}function Nz(e,t){return typeof e=="function"?e(t):e}const vv={};function Dc(e,t,n,r,s){if(!n&&!r&&!s&&!e)return Sp(t);let a=Sp(e);return t&&(a=Gu(a,t)),n&&(a=Gu(a,n)),r&&(a=Gu(a,r)),s&&(a=Gu(a,s)),a}function Oz(e){if(e.length===0)return vv;if(e.length===1)return Sp(e[0]);let t=Sp(e[0]);for(let n=1;n<e.length;n+=1)t=Gu(t,e[n]);return t}function Sp(e){return xv(e)?{...Y_(e,vv)}:Mz(e)}function Gu(e,t){return xv(t)?Y_(t,e):Iz(e,t)}function Mz(e){const t={...e};for(const n in t){const r=t[n];W_(n,r)&&(t[n]=X_(r))}return t}function Iz(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=hy(e.style,r);break}case"className":{e[n]=Q_(e.className,r);break}default:W_(n,r)?e[n]=Dz(e[n],r):e[n]=r}}return e}function W_(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function xv(e){return typeof e=="function"}function Y_(e,t){return xv(e)?e(t):e??vv}function Dz(e,t){return t?e?n=>{if(J_(n)){const s=n;wp(s);const a=t(s);return s.baseUIHandlerPrevented||e?.(s),a}const r=t(n);return e?.(n),r}:X_(t):e}function X_(e){return e&&(t=>(J_(t)&&wp(t),e(t)))}function wp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Q_(e,t){return t?e?t+" "+e:t:e}function J_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ar(){}const lc=Object.freeze([]),hr=Object.freeze({}),zz={style:{transition:"none"}},Lz="data-base-ui-click-trigger",jz={fallbackAxisSide:"none"},Pz={fallbackAxisSide:"end"},$z={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function vn(e,t,n={}){const r=t.render,s=Bz(t,n);if(n.enabled===!1)return null;const a=n.state??hr;return qz(e,r,s,a)}function Bz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=hr,ref:l,props:c,stateAttributesMapping:p,enabled:d=!0}=t,h=d?Az(n,a):void 0,m=d?Nz(r,a):void 0,g=d?Cz(a,p):hr,y=d&&c?Fz(c):void 0,k=d?hy(g,y)??{}:hr;return typeof document<"u"&&(d?Array.isArray(l)?k.ref=Ez([k.ref,Fw(s),...l]):k.ref=ks(k.ref,Fw(s),l):ks(null,null)),d?(h!==void 0&&(k.className=Q_(k.className,h)),m!==void 0&&(k.style=hy(k.style,m)),k):hr}function Fz(e){return Array.isArray(e)?Oz(e):Dc(void 0,e)}const Uz=Symbol.for("react.lazy");function qz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=Dc(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===Uz&&(a=x.Children.toArray(t)[0]),x.cloneElement(a,s)}if(e&&typeof e=="string")return Hz(e,n);throw new Error(Xn(8))}function Hz(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}let Wo=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Gz={[Wo.startingStyle]:""},Vz={[Wo.endingStyle]:""},ia={transitionStatus(e){return e==="starting"?Gz:e==="ending"?Vz:null}};let kv=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Wo.startingStyle]="startingStyle",e[e.endingStyle=Wo.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Ep=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Kz={[Ep.popupOpen]:""},Zz={[Ep.popupOpen]:"",[Ep.pressed]:""},Wz={[kv.open]:""},Yz={[kv.closed]:""},Xz={[kv.anchorHidden]:""},Qz={open(e){return e?Kz:null}},Jz={open(e){return e?Zz:null}},lh={open(e){return e?Wz:Yz},anchorHidden(e){return e?Xz:null}};function uh(){return typeof window<"u"}function Yn(e){return ch(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fi(e){var t;return(t=(ch(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ch(e){return uh()?e instanceof Node||e instanceof yn(e).Node:!1}function yt(e){return uh()?e instanceof Element||e instanceof yn(e).Element:!1}function It(e){return uh()?e instanceof HTMLElement||e instanceof yn(e).HTMLElement:!1}function co(e){return!uh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function ho(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Er(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function eL(e){return/^(table|td|th)$/.test(Yn(e))}function fh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const tL=/transform|translate|scale|rotate|perspective|filter/,nL=/paint|layout|strict|content/,$o=e=>!!e&&e!=="none";let sb;function Sv(e){const t=yt(e)?Er(e):e;return $o(t.transform)||$o(t.translate)||$o(t.scale)||$o(t.rotate)||$o(t.perspective)||!zc()&&($o(t.backdropFilter)||$o(t.filter))||tL.test(t.willChange||"")||nL.test(t.contain||"")}function rL(e){let t=Bi(e);for(;It(t)&&!pi(t);){if(Sv(t))return t;if(fh(t))return null;t=Bi(t)}return null}function zc(){return sb==null&&(sb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),sb}function pi(e){return/^(html|body|#document)$/.test(Yn(e))}function Er(e){return yn(e).getComputedStyle(e)}function dh(e){return yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bi(e){if(Yn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||co(e)&&e.host||Fi(e);return co(t)?t.host:t}function eR(e){const t=Bi(e);return pi(t)?e.ownerDocument?e.ownerDocument.body:e.body:It(t)&&ho(t)?t:eR(t)}function oo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=eR(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=yn(s);if(a){const c=my(l);return t.concat(l,l.visualViewport||[],ho(s)?s:[],c&&n?oo(c):[])}else return t.concat(s,oo(s,[],n))}function my(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ob=ah[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],iL=ob&&ob!==x.useLayoutEffect?ob:e=>e();function Ve(e){const t=wr(sL).current;return t.next=e,iL(t.effect),t.trampoline}function sL(){const e={next:void 0,callback:oL,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function oL(){}const aL={...ah},lL=()=>{},He=typeof document<"u"?x.useLayoutEffect:lL,tR=x.createContext(void 0);function nR(e=!1){const t=x.useContext(tR);if(t===void 0&&!e)throw new Error(Xn(16));return t}function uL(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:x.useMemo(()=>{const d={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(d.tabIndex=s,!a&&n&&(d.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(d["aria-disabled"]=n),a&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,a,s])}}function Lc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=x.useRef(null),c=nR(!0),p=a??c!==void 0,{props:d}=uL({focusableWhenDisabled:n,disabled:t,composite:p,tabIndex:r,isNativeButton:s}),h=x.useCallback(()=>{const y=l.current;ab(y)&&p&&t&&d.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,d.disabled,p]);He(h,[h]);const m=x.useCallback((y={})=>{const{onClick:k,onMouseDown:w,onKeyUp:_,onKeyDown:E,onPointerDown:R,...T}=y;return Dc({type:s?"button":void 0,onClick(A){if(t){A.preventDefault();return}k?.(A)},onMouseDown(A){t||w?.(A)},onKeyDown(A){if(t||(wp(A),E?.(A),A.baseUIHandlerPrevented))return;const N=A.target===A.currentTarget,I=A.currentTarget,H=ab(I),$=!s&&cL(I),L=N&&(s?H:!$),K=A.key==="Enter",Z=A.key===" ",q=I.getAttribute("role"),z=q?.startsWith("menuitem")||q==="option"||q==="gridcell";if(N&&p&&Z){if(A.defaultPrevented&&z)return;A.preventDefault(),$||s&&H?(I.click(),A.preventBaseUIHandler()):L&&(k?.(A),A.preventBaseUIHandler());return}L&&(!s&&(Z||K)&&A.preventDefault(),!s&&K&&k?.(A))},onKeyUp(A){if(!t){if(wp(A),_?.(A),A.target===A.currentTarget&&s&&p&&ab(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!s&&!p&&A.key===" "&&k?.(A)}},onPointerDown(A){if(t){A.preventDefault();return}R?.(A)}},s?void 0:{role:"button"},d,T)},[t,d,p,s]),g=Ve(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:g}}function ab(e){return It(e)&&e.tagName==="BUTTON"}function cL(e){return!!(e?.tagName==="A"&&e?.href)}const Ss="none",ml="trigger-press",li="trigger-hover",dp="trigger-focus",wv="outside-press",lb="item-press",ph="focus-out",Ev="escape-key",ub="list-navigation",fL="cancel-open",dL="disabled",gy="imperative-action",pL="window-resize";function _t(e,t,n,r){let s=!1,a=!1;const l=r??hr;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){a=!0},get isCanceled(){return s},get isPropagationAllowed(){return a},trigger:n,...l}}let Uw=0;function hL(e,t="mui"){const[n,r]=x.useState(e),s=e||n;return x.useEffect(()=>{n==null&&(Uw+=1,r(`${t}-${Uw}`))},[n,t]),s}const qw=aL.useId;function hh(e,t){if(qw!==void 0){const n=qw();return e??(t?`${t}-${n}`:n)}return hL(e,t)}function mh(e){return hh(e,"base-ui")}const mL=[];function gh(e){x.useEffect(e,mL)}const Mu=0;class Ei{static create(){return new Ei}currentId=Mu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Mu,n()},t)}isStarted(){return this.currentId!==Mu}clear=()=>{this.currentId!==Mu&&(clearTimeout(this.currentId),this.currentId=Mu)};disposeEffect=()=>this.clear}function ci(){const e=wr(Ei.create).current;return gh(e.disposeEffect),e}const Cl=typeof navigator<"u",cb=bL(),rR=vL(),iR=yL(),Tv=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),sR=cb.platform==="MacIntel"&&cb.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(cb.platform),oR=Cl&&/apple/i.test(navigator.vendor),by=Cl&&/android/i.test(rR)||/android/i.test(iR),gL=Cl&&rR.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,aR=iR.includes("jsdom/");function bL(){if(!Cl)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function yL(){if(!Cl)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function vL(){if(!Cl)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function Wr(e){e.preventDefault(),e.stopPropagation()}function xL(e){return"nativeEvent"in e}function lR(e){return e.pointerType===""&&e.isTrusted?!0:by&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function uR(e){return aR?!1:!by&&e.width===0&&e.height===0||by&&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 gl(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function cR(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function kL(e,t){return t!=null&&!gl(t)?0:typeof e=="function"?e():e}function Tp(e,t,n){const r=kL(e,n);return typeof r=="number"?r:r?.[t]}function Hw(e){return typeof e=="function"?e():e}function fR(e,t){return t||e==="click"||e==="mousedown"}const SL=x.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ei,currentIdRef:{current:null},currentContextRef:{current:null}});function wL(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:s}=t,a=x.useContext(SL),{currentIdRef:l,delayRef:c,timeoutMs:p,initialDelayRef:d,currentContextRef:h,hasProvider:m,timeout:g}=a,[y,k]=x.useState(!1);return He(()=>{function w(){k(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=d.current}if(l.current&&!s&&l.current===r){if(k(!1),p){const _=r;return g.start(p,()=>{n.select("open")||l.current&&l.current!==_||w()}),()=>{g.clear()}}w()}},[s,r,l,c,p,d,h,g,n]),He(()=>{if(!s)return;const w=h.current,_=l.current;g.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:k},l.current=r,c.current={open:0,close:Tp(d.current,"close")},_!==null&&_!==r?(k(!0),w?.setIsInstantPhase(!0),w?.onOpenChange(!1,_t(Ss))):(k(!1),w?.setIsInstantPhase(!1))},[s,r,n,l,c,p,d,h,g]),He(()=>()=>{h.current=null},[h]),x.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:y}),[m,c,y])}function Nt(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ji(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function qn(e){const t=wr(EL,e).current;return t.next=e,He(t.effect),t}function EL(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Sd=null;class TL{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)n[s]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const wd=new TL;class Cn{static create(){return new Cn}static request(t){return wd.request(t)}static cancel(t){return wd.cancel(t)}currentId=Sd;request(t){this.cancel(),this.currentId=wd.request(()=>{this.currentId=Sd,t()})}cancel=()=>{this.currentId!==Sd&&(wd.cancel(this.currentId),this.currentId=Sd)};disposeEffect=()=>this.cancel}function jc(){const e=wr(Cn.create).current;return gh(e.disposeEffect),e}function Ft(e){return e?.ownerDocument||document}const dR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},pR={...dR,position:"fixed",top:0,left:0},_L={...dR,position:"absolute"},_p=x.forwardRef(function(t,n){const[r,s]=x.useState();He(()=>{oR&&s("button")},[]);const a={tabIndex:0,role:r};return v.jsx("span",{...t,ref:n,style:pR,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),yy="data-base-ui-focusable",hR="active",mR="selected",gR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ao="ArrowLeft",lo="ArrowRight",_v="ArrowUp",Pc="ArrowDown";function Dr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function kt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&co(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function gr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Rp(e,t){if(!yt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(kt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function vi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function RL(e){return e.matches("html,body")}function bh(e){return It(e)&&e.matches(gR)}function CL(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${gR}`)!=null}function vy(e){return e?e.getAttribute("role")==="combobox"&&bh(e):!1}function AL(e){if(!e||aR)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Cp(e){return e?e.hasAttribute(yy)?e:e.querySelector(`[${yy}]`)||e:null}const NL=["top","right","bottom","left"],bl=Math.min,Yr=Math.max,yl=Math.round,ys=Math.floor,Pi=e=>({x:e,y:e}),OL={left:"right",right:"left",bottom:"top",top:"bottom"};function xy(e,t,n){return Yr(e,bl(t,n))}function ws(e,t){return typeof e=="function"?e(t):e}function jr(e){return e.split("-")[0]}function mo(e){return e.split("-")[1]}function Rv(e){return e==="x"?"y":"x"}function Cv(e){return e==="y"?"height":"width"}function fi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Av(e){return Rv(fi(e))}function ML(e,t,n){n===void 0&&(n=!1);const r=mo(e),s=Av(e),a=Cv(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Ap(l)),[l,Ap(l)]}function IL(e){const t=Ap(e);return[ky(e),t,ky(t)]}function ky(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Gw=["left","right"],Vw=["right","left"],DL=["top","bottom"],zL=["bottom","top"];function LL(e,t,n){switch(e){case"top":case"bottom":return n?t?Vw:Gw:t?Gw:Vw;case"left":case"right":return t?DL:zL;default:return[]}}function jL(e,t,n,r){const s=mo(e);let a=LL(jr(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(ky)))),a}function Ap(e){const t=jr(e);return OL[t]+e.slice(t.length)}function PL(e){return{top:0,right:0,bottom:0,left:0,...e}}function bR(e){return typeof e!="number"?PL(e):{top:e,right:e,bottom:e,left:e}}function uc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Ed(e,t,n){return Math.floor(e/t)!==n}function cc(e,t){return t<0||t>=e.length}function pp(e,t){return dr(e.current,{disabledIndices:t})}function Sy(e,t){return dr(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function dr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:s=1}={}){let a=t;do a+=n?-s:s;while(a>=0&&a<=e.length-1&&vs(e,a,r));return a}function yR(e,{event:t,orientation:n,loopFocus:r,onLoop:s,rtl:a,cols:l,disabledIndices:c,minIndex:p,maxIndex:d,prevIndex:h,stopEvent:m=!1}){let g=h,y;if(t.key===_v?y="up":t.key===Pc&&(y="down"),y){const k=[],w=[];let _=!1,E=0;{let $=null,L=-1;e.forEach((K,Z)=>{if(K==null)return;E+=1;const q=K.closest('[role="row"]');q&&(_=!0),(q!==$||L===-1)&&($=q,L+=1,k[L]=[]),k[L].push(Z),w[Z]=L})}let R=!1,T=0;if(_)for(const $ of k){const L=$.length;L>T&&(T=L),L!==l&&(R=!0)}const C=R&&E<e.length,A=T||l,N=$=>{if(!R||h===-1)return;const L=w[h];if(L==null)return;const K=k[L].indexOf(h),Z=$==="up"?-1:1;for(let q=L+Z,z=0;z<k.length;z+=1,q+=Z){if(q<0||q>=k.length){if(!r||C)return;if(q=q<0?k.length-1:0,s){const F=Math.min(K,k[q].length-1),U=k[q][F]??k[q][0],P=s(t,h,U);q=w[P]??q}}const j=k[q];for(let F=Math.min(K,j.length-1);F>=0;F-=1){const U=j[F];if(!vs(e,U,c))return U}}},I=$=>{if(!C||h===-1)return;const L=h%A,K=$==="up"?-A:A,Z=d-d%A,q=ys(d/A)+1;for(let z=h-L+K,j=0;j<q;j+=1,z+=K){if(z<0||z>d){if(!r)return;z=z<0?Z:0}const F=Math.min(z+A-1,d);for(let U=Math.min(z+L,F);U>=z;U-=1)if(!vs(e,U,c))return U}};m&&Wr(t);const H=N(y)??I(y);if(H!==void 0)g=H;else if(h===-1)g=y==="up"?d:p;else if(g=dr(e,{startingIndex:h,amount:A,decrement:y==="up",disabledIndices:c}),r){if(y==="up"&&(h-A<p||g<0)){const $=h%A,L=d%A,K=d-(L-$);L===$?g=d:g=L>$?K:K-A,s&&(g=s(t,h,g))}y==="down"&&h+A>d&&(g=dr(e,{startingIndex:h%A-A,amount:A,disabledIndices:c}),s&&(g=s(t,h,g)))}cc(e,g)&&(g=h)}if(n==="both"){const k=ys(h/l);t.key===(a?ao:lo)&&(m&&Wr(t),h%l!==l-1?(g=dr(e,{startingIndex:h,disabledIndices:c}),r&&Ed(g,l,k)&&(g=dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g)))):r&&(g=dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g))),Ed(g,l,k)&&(g=h)),t.key===(a?lo:ao)&&(m&&Wr(t),h%l!==0?(g=dr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),r&&Ed(g,l,k)&&(g=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}),s&&(g=s(t,h,g)))):r&&(g=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}),s&&(g=s(t,h,g))),Ed(g,l,k)&&(g=h));const w=ys(d/l)===k;cc(e,g)&&(r&&w?(g=t.key===(a?lo:ao)?d:dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g))):g=h)}return g}function vR(e,t,n){const r=[];let s=0;return e.forEach(({width:a,height:l},c)=>{let p=!1;for(n&&(s=0);!p;){const d=[];for(let h=0;h<a;h+=1)for(let m=0;m<l;m+=1)d.push(s+h+m*t);s%t+a<=t&&d.every(h=>r[h]==null)?(d.forEach(h=>{r[h]=c}),p=!0):s+=1}}),[...r]}function xR(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e);default:return-1}}function kR(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function vs(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?yh(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function yh(e){return typeof e.checkVisibility=="function"?e.checkVisibility():Er(e).display!=="none"}const $L='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function BL(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return co(n)?n.host:null}function wy(e){for(const t of Array.from(e.children))if(Yn(t)==="summary")return t;return null}function FL(e,t){const n=wy(t);return!!n&&(e===n||kt(n,e))}function SR(e){const t=e?Yn(e):"";return e!=null&&e.matches($L)&&(t!=="summary"||e.parentElement!=null&&Yn(e.parentElement)==="details"&&wy(e.parentElement)===e)&&(t!=="details"||wy(e)==null)&&(t!=="input"||e.type!=="hidden")}function wR(e){if(!SR(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=BL(t)){const n=Yn(t)==="slot";if(t.hasAttribute("inert")||t!==e&&Yn(t)==="details"&&!t.open&&!FL(e,t)||t.hasAttribute("hidden")||!n&&!yh(t))return!1}return!0}function ER(e){const t=e.tabIndex;if(t<0){const n=Yn(e);if(n==="details"||n==="audio"||n==="video"||It(e)&&e.isContentEditable)return 0}return t}function fb(e){if(Yn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function UL(e,t){const n=fb(e);if(!n)return!0;const r=t.find(s=>{const a=fb(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=fb(s);return a?.name===n.name&&a.form===n.form})===n}function TR(e){if(It(e)&&Yn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return It(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function _R(e,t){TR(e).forEach(n=>{SR(n)&&t.push(n),_R(n,t)})}function RR(e,t,n){TR(e).forEach(r=>{It(r)&&r.matches(t)&&n.push(r),RR(r,t,n)})}function Nv(e){return wR(e)&&ER(e)>=0}function CR(e){const t=[];return _R(e,t),t.filter(wR)}function vh(e){const t=CR(e);return t.filter(n=>ER(n)>=0&&UL(n,t))}function AR(e,t){const n=vh(e),r=n.length;if(r===0)return;const s=Dr(Ft(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function NR(e){return AR(Ft(e).body,1)||e}function OR(e){return AR(Ft(e).body,-1)||e}function Yu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!kt(n,r)}function qL(e){vh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Kw(e){const t=[];RR(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function $i(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...$i(e,s.id,n)])}function Zw(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(a=>a.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function fc(e){return`data-base-ui-${e}`}let Td=0;function hp(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(Td);const a=()=>e?.focus({preventScroll:n});if(s)return a(),ar;const l=requestAnimationFrame(a);return Td=l,()=>{Td===l&&(cancelAnimationFrame(l),Td=0)}}const db={inert:new WeakMap,"aria-hidden":new WeakMap},Ww="data-base-ui-inert",Ey={inert:new WeakSet,"aria-hidden":new WeakSet};let Iu=new WeakMap,pb=0;function HL(e){return Ey[e]}function MR(e){return e?co(e)?e.host:MR(e.parentNode):null}const hb=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=MR(n);return e.contains(r)?r:null}).filter(n=>n!=null),Yw=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Xw=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Yn(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function GL(e,t,n,r,{mark:s=!0,markerIgnoreElements:a=[]}){const l=r?"inert":n?"aria-hidden":null;let c=null,p=null;const d=hb(t,e),h=s?hb(t,a):[],m=new Set(h),g=s?Xw(t,Yw(d),new Set(d)).filter(w=>!m.has(w)):[],y=[],k=[];if(l){const w=db[l],_=HL(l);p=_,c=w;const E=hb(t,Array.from(t.querySelectorAll("[aria-live]"))),R=d.concat(E);Xw(t,Yw(R),new Set(R)).forEach(C=>{const A=C.getAttribute(l),N=A!==null&&A!=="false",I=(w.get(C)||0)+1;w.set(C,I),y.push(C),I===1&&N&&_.add(C),N||C.setAttribute(l,l==="inert"?"":"true")})}return s&&g.forEach(w=>{const _=(Iu.get(w)||0)+1;Iu.set(w,_),k.push(w),_===1&&w.setAttribute(Ww,"")}),pb+=1,()=>{c&&y.forEach(w=>{const E=(c.get(w)||0)-1;c.set(w,E),E||(!p?.has(w)&&l&&w.removeAttribute(l),p?.delete(w))}),s&&k.forEach(w=>{const _=(Iu.get(w)||0)-1;Iu.set(w,_),_||w.removeAttribute(Ww)}),pb-=1,pb||(db.inert=new WeakMap,db["aria-hidden"]=new WeakMap,Ey.inert=new WeakSet,Ey["aria-hidden"]=new WeakSet,Iu=new WeakMap)}}function Qw(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0,markerIgnoreElements:a=[]}=t,l=Ft(e[0]).body;return GL(e,l,n,r,{mark:s,markerIgnoreElements:a})}var Ri=G_();const IR=x.createContext(null),DR=()=>x.useContext(IR),VL=fc("portal");function zR(e={}){const{ref:t,container:n,componentProps:r=hr,elementProps:s}=e,a=hh(),c=DR()?.portalNode,[p,d]=x.useState(null),[h,m]=x.useState(null),g=Ve(_=>{_!==null&&m(_)}),y=x.useRef(null);He(()=>{if(n===null){y.current&&(y.current=null,m(null),d(null));return}if(a==null)return;const _=(n&&(ch(n)?n:n.current))??c??document.body;if(_==null){y.current&&(y.current=null,m(null),d(null));return}y.current!==_&&(y.current=_,m(null),d(_))},[n,c,a]);const k=vn("div",r,{ref:[t,g],props:[{id:a,[VL]:""},s]});return{portalNode:h,portalSubtree:p&&k?Ri.createPortal(k,p):null}}const KL=x.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,renderGuards:c,style:p,...d}=t,{portalNode:h,portalSubtree:m}=zR({container:s,ref:n,componentProps:t,elementProps:d}),g=x.useRef(null),y=x.useRef(null),k=x.useRef(null),w=x.useRef(null),[_,E]=x.useState(null),R=x.useRef(!1),T=_?.modal,C=_?.open,A=typeof c=="boolean"?c:!!_&&!_.modal&&_.open&&!!h;x.useEffect(()=>{if(!h||T)return;function I(H){h&&H.relatedTarget&&Yu(H)&&(H.type==="focusin"?R.current&&(Kw(h),R.current=!1):(qL(h),R.current=!0))}return ji(Nt(h,"focusin",I,!0),Nt(h,"focusout",I,!0))},[h,T]),x.useEffect(()=>{!h||C!==!1||(Kw(h),R.current=!1)},[C,h]);const N=x.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:y,beforeInsideRef:k,afterInsideRef:w,portalNode:h,setFocusManagerState:E}),[h]);return v.jsxs(x.Fragment,{children:[m,v.jsxs(IR.Provider,{value:N,children:[A&&h&&v.jsx(_p,{"data-type":"outside",ref:g,onFocus:I=>{if(Yu(I,h))k.current?.focus();else{const H=_?_.domReference:null;OR(H)?.focus()}}}),A&&h&&v.jsx("span",{"aria-owns":h.id,style:$z}),h&&Ri.createPortal(r,h),A&&h&&v.jsx(_p,{"data-type":"outside",ref:y,onFocus:I=>{if(Yu(I,h))w.current?.focus();else{const H=_?_.domReference:null;NR(H)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,_t(ph,I.nativeEvent))}}})]})]})});function ZL(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(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)}}}const WL=x.createContext(null),YL=x.createContext(null),xh=()=>x.useContext(WL)?.id||null,Al=e=>{const t=x.useContext(YL);return e??t};function ds(e){return e==null?e:"current"in e?e.current:e}function XL(e,t){const n=yn(gr(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"):""}const Jw=20;let io=[];function Ov(){io=io.filter(e=>e.deref()?.isConnected)}function QL(e){Ov(),e&&Yn(e)!=="body"&&(io.push(new WeakRef(e)),io.length>Jw&&(io=io.slice(-Jw)))}function mb(){return Ov(),io[io.length-1]?.deref()}function JL(e){return e?Nv(e)?e:vh(e)[0]||e:null}function e2(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():yh(e)}function eE(e,t){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=CR(e).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return Nv(a)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function t2(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:p=!0,openInteractionType:d="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:g,externalTree:y,getInsideElements:k}=e,w="rootStore"in t?t.rootStore:t,_=w.useState("open"),E=w.useState("domReferenceElement"),R=w.useState("floatingElement"),{events:T,dataRef:C}=w.context,A=Ve(()=>C.current.floatingContext?.nodeId),N=s===!1,I=vy(E)&&N,H=x.useRef(["content"]),$=qn(s),L=qn(a),K=qn(d),Z=Al(y),q=DR(),z=x.useRef(!1),j=x.useRef(!1),F=x.useRef(!1),U=x.useRef(null),P=x.useRef(""),W=x.useRef(""),D=x.useRef(null),B=x.useRef(null),G=ks(D,g,q?.beforeInsideRef),O=ks(B,q?.afterInsideRef),ie=ci(),te=ci(),ne=jc(),le=q!=null,pe=Cp(R),ye=Ve((he=pe)=>he?vh(he):[]),Se=Ve(()=>k?.().filter(he=>he!=null)??[]);x.useEffect(()=>{if(r||!c)return;function he(Re){Re.key==="Tab"&&kt(pe,Dr(Ft(pe)))&&ye().length===0&&!I&&Wr(Re)}const Te=Ft(pe);return Nt(Te,"keydown",he)},[r,E,pe,c,H,I,ye]),x.useEffect(()=>{if(r||!_)return;const he=Ft(pe);function Te(){F.current=!1}function Re(ve){const xe=gr(ve),Me=Se(),Ce=kt(R,xe)||kt(E,xe)||kt(q?.portalNode,xe)||Me.some(Pe=>Pe===xe||kt(Pe,xe));F.current=!Ce,W.current=ve.pointerType||"keyboard",xe?.closest(`[${Lz}]`)&&(j.current=!0)}function Oe(){W.current="keyboard"}return ji(Nt(he,"pointerdown",Re,!0),Nt(he,"pointerup",Te,!0),Nt(he,"pointercancel",Te,!0),Nt(he,"keydown",Oe,!0))},[r,R,E,pe,_,q,Se]),x.useEffect(()=>{if(r||!p)return;const he=Ft(pe);function Te(){j.current=!0,te.start(0,()=>{j.current=!1})}function Re(Me){const Ce=gr(Me);Nv(Ce)&&(U.current=Ce)}function Oe(Me){const Ce=Me.relatedTarget,Pe=Me.currentTarget,ge=gr(Me);queueMicrotask(()=>{const fe=A(),oe=w.context.triggerElements,re=Se(),_e=Ce?.hasAttribute(fc("focus-guard"))&&[D.current,B.current,q?.beforeInsideRef.current,q?.afterInsideRef.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,ds(m),ds(h)].includes(Ce),J=!(kt(E,Ce)||kt(R,Ce)||kt(Ce,R)||kt(q?.portalNode,Ce)||re.some(ue=>ue===Ce||kt(ue,Ce))||Ce!=null&&oe.hasElement(Ce)||oe.hasMatchingElement(ue=>kt(ue,Ce))||_e||Z&&($i(Z.nodesRef.current,fe).find(ue=>kt(ue.context?.elements.floating,Ce)||kt(ue.context?.elements.domReference,Ce))||Zw(Z.nodesRef.current,fe).find(ue=>[ue.context?.elements.floating,Cp(ue.context?.elements.floating)].includes(Ce)||ue.context?.elements.domReference===Ce)));if(Pe===E&&pe&&eE(pe,H),l&&Pe!==E&&!e2(ge)&&Dr(he)===he.body){if(It(pe)&&(pe.focus(),l==="popup")){ne.request(()=>{pe.focus()});return}const ue=ye(),Ie=U.current,Be=(Ie&&ue.includes(Ie)?Ie:null)||ue[ue.length-1]||pe;It(Be)&&Be.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(I||!c)&&Ce&&J&&!j.current&&(I||Ce!==mb())&&(z.current=!0,w.setOpen(!1,_t(ph,Me)))})}function ve(){F.current||(C.current.insideReactTree=!0,ie.start(0,()=>{C.current.insideReactTree=!1}))}const xe=It(E)?E:null;if(!(!R&&!xe))return ji(xe&&Nt(xe,"focusout",Oe),xe&&Nt(xe,"pointerdown",Te),R&&Nt(R,"focusin",Re),R&&Nt(R,"focusout",Oe),R&&q&&Nt(R,"focusout",ve,!0))},[r,E,R,pe,c,Z,q,w,p,l,ye,I,A,H,C,ie,te,ne,h,m,Se]),x.useEffect(()=>{if(r||!R||!_)return;const he=Array.from(q?.portalNode?.querySelectorAll(`[${fc("portal")}]`)||[]),Re=(Z?Zw(Z.nodesRef.current,A()):[]).find(Pe=>vy(Pe.context?.elements.domReference||null))?.context?.elements.domReference,ve=[...[R,...he,D.current,B.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,...Se()],Re,ds(m),ds(h),I?E:null].filter(Pe=>Pe!=null),xe=Qw(ve,{ariaHidden:c||I,mark:!1}),Me=[R,...he].filter(Pe=>Pe!=null),Ce=Qw(Me);return()=>{Ce(),xe()}},[_,r,E,R,c,H,q,I,Z,A,h,m,Se]),He(()=>{if(!_||r||!It(pe))return;const he=Ft(pe),Te=Dr(he);queueMicrotask(()=>{const Re=$.current,Oe=typeof Re=="function"?Re(K.current||""):Re;if(Oe===void 0||Oe===!1||kt(pe,Te))return;let xe=null;const Me=()=>(xe==null&&(xe=ye(pe)),xe[0]||pe);let Ce;Oe===!0||Oe===null?Ce=Me():Ce=ds(Oe),Ce=Ce||Me(),hp(Ce,{preventScroll:Ce===pe})})},[r,_,pe,N,ye,$,K]),He(()=>{if(r||!pe)return;const he=Ft(pe),Te=Dr(he);QL(Te);function Re(ve){if(ve.open||(P.current=XL(ve.nativeEvent,W.current)),ve.reason===li&&ve.nativeEvent.type==="mouseleave"&&(z.current=!0),ve.reason===wv)if(ve.nested)z.current=!1;else if(lR(ve.nativeEvent)||uR(ve.nativeEvent))z.current=!1;else{let xe=!1;Ft(pe).createElement("div").focus({get preventScroll(){return xe=!0,!1}}),xe?z.current=!1:z.current=!0}}T.on("openchange",Re);function Oe(){const ve=L.current;let xe=typeof ve=="function"?ve(P.current):ve;if(xe===void 0||xe===!1)return null;if(xe===null&&(xe=!0),typeof xe=="boolean"){const Ce=E||mb();return Ce&&Ce.isConnected?Ce:null}const Me=E||mb();return ds(xe)||Me||null}return()=>{T.off("openchange",Re);const ve=Dr(he),xe=Se(),Me=kt(R,ve)||xe.some(ge=>ge===ve||kt(ge,ve))||Z&&$i(Z.nodesRef.current,A(),!1).some(ge=>kt(ge.context?.elements.floating,ve)),Ce=L.current,Pe=Oe();queueMicrotask(()=>{const ge=JL(Pe),fe=typeof Ce!="boolean";Ce&&!z.current&&It(ge)&&(!(!fe&&ge!==ve&&ve!==he.body)||Me)&&ge.focus({preventScroll:!0}),z.current=!1})}},[r,R,pe,L,C,T,Z,E,A,Se]),He(()=>{if(!Tv||_||!R)return;const he=Dr(Ft(R));!It(he)||!bh(he)||kt(R,he)&&he.blur()},[_,R]),He(()=>{if(!(r||!q))return q.setFocusManagerState({modal:c,closeOnFocusOut:p,open:_,onOpenChange:w.setOpen,domReference:E}),()=>{q.setFocusManagerState(null)}},[r,q,c,_,w,p,E]),He(()=>{if(!(r||!pe))return eE(pe,H),()=>{queueMicrotask(Ov)}},[r,pe,H]);const ze=!r&&(c?!I:!0)&&(le||c);return v.jsxs(x.Fragment,{children:[ze&&v.jsx(_p,{"data-type":"inside",ref:G,onFocus:he=>{if(c){const Te=ye();hp(Te[Te.length-1])}else q?.portalNode&&(z.current=!1,Yu(he,q.portalNode)?NR(E)?.focus():ds(m??q.beforeOutsideRef)?.focus())}}),n,ze&&v.jsx(_p,{"data-type":"inside",ref:O,onFocus:he=>{c?hp(ye()[0]):q?.portalNode&&(p&&(z.current=!0),Yu(he,q.portalNode)?OR(E)?.focus():ds(h??q.afterOutsideRef)?.focus())}})]})}function n2(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:p=!0,touchOpenDelay:d=0,reason:h=ml}=t,m=x.useRef(void 0),g=jc(),y=ci(),k=x.useMemo(()=>({onPointerDown(w){m.current=w.pointerType},onMouseDown(w){const _=m.current,E=w.nativeEvent,R=n.select("open");if(w.button!==0||a==="click"||gl(_,!0)&&c)return;const T=r.current.openEvent,C=T?.type,A=n.select("domReferenceElement")!==w.currentTarget,N=R&&A||!(R&&l&&(!(T&&p)||C==="click"||C==="mousedown")),I=gr(E);if(bh(I)){const $=_t(h,E,I);N&&_==="touch"&&d>0?y.start(d,()=>{n.setOpen(!0,$)}):n.setOpen(N,$);return}const H=w.currentTarget;g.request(()=>{const $=_t(h,E,H);N&&_==="touch"&&d>0?y.start(d,()=>{n.setOpen(!0,$)}):n.setOpen(N,$)})},onClick(w){if(a==="mousedown-only")return;const _=m.current;if(a==="mousedown"&&_){m.current=void 0;return}if(gl(_,!0)&&c)return;const E=n.select("open"),R=r.current.openEvent,T=n.select("domReferenceElement")!==w.currentTarget,C=E&&T||!(E&&l&&(!(R&&p)||cR(R))),A=_t(h,w.nativeEvent,w.currentTarget);C&&_==="touch"&&d>0?y.start(d,()=>{n.setOpen(!0,A)}):n.setOpen(C,A)},onKeyDown(){m.current=void 0}}),[r,a,c,n,p,l,g,y,d,h]);return x.useMemo(()=>s?{reference:k}:hr,[s,k])}function r2(e,t){let n=null,r=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",p=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let d=a.width,h=a.height,m=a.x,g=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),m-=n||0,g-=r||0,d=0,h=0,!s||p?(d=t.axis==="y"?a.width:0,h=t.axis==="x"?a.height:0,m=l&&t.x!=null?t.x:m,g=c&&t.y!=null?t.y:g):s&&!p&&(h=t.axis==="x"?a.height:h,d=t.axis==="y"?a.width:d),s=!0,{width:d,height:h,x:m,y:g,top:g,right:m+d,bottom:g+h,left:m}}}}function tE(e){return e!=null&&e.clientX!=null}function i2(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:c=!0,axis:p="both"}=t,d=x.useRef(!1),h=x.useRef(null),[m,g]=x.useState(),[y,k]=x.useState([]),w=Ve((C,A,N)=>{d.current||l.current.openEvent&&!tE(l.current.openEvent)||n.set("positionReference",r2(N??a,{x:C,y:A,axis:p,dataRef:l,pointerType:m}))}),_=Ve(C=>{r?h.current||k([]):w(C.clientX,C.clientY,C.currentTarget)}),E=gl(m)?s:r,R=x.useCallback(()=>{if(!E||!c)return;const C=yn(s);function A(N){const I=gr(N);kt(s,I)?(h.current?.(),h.current=null):w(N.clientX,N.clientY)}if(!l.current.openEvent||tE(l.current.openEvent)){const N=()=>{h.current?.(),h.current=null};return h.current=Nt(C,"mousemove",A),N}n.set("positionReference",a)},[E,c,s,l,a,n,w]);x.useEffect(()=>R(),[R,y]),x.useEffect(()=>{c&&!s&&(d.current=!1)},[c,s]),x.useEffect(()=>{!c&&r&&(d.current=!0)},[c,r]);const T=x.useMemo(()=>{function C(A){g(A.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:_,onMouseEnter:_}},[_]);return x.useMemo(()=>c?{reference:T,trigger:T}:{},[c,T])}const s2={intentional:"onClick",sloppy:"onPointerDown"};function o2(){return!1}function a2(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function LR(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),{dataRef:a}=n.context,{enabled:l=!0,escapeKey:c=!0,outsidePress:p=!0,outsidePressEvent:d="sloppy",referencePress:h=o2,referencePressEvent:m="sloppy",bubbles:g,externalTree:y}=t,k=Al(y),w=Ve(typeof p=="function"?p:()=>!1),_=typeof p=="function"?w:p,E=_!==!1,R=Ve(()=>d),T=x.useRef(!1),C=x.useRef(!1),A=x.useRef(!1),{escapeKey:N,outsidePress:I}=a2(g),H=x.useRef(null),$=ci(),L=ci(),K=Ve(()=>{L.clear(),a.current.insideReactTree=!1}),Z=x.useRef(!1),q=x.useRef(""),z=Ve(h),j=Ve(B=>{if(!r||!l||!c||B.key!=="Escape"||Z.current)return;const G=a.current.floatingContext?.nodeId,O=k?$i(k.nodesRef.current,G):[];if(!N&&O.length>0){let ne=!0;if(O.forEach(le=>{le.context?.open&&!le.context.dataRef.current.__escapeKeyBubbles&&(ne=!1)}),!ne)return}const ie=xL(B)?B.nativeEvent:B,te=_t(Ev,ie);n.setOpen(!1,te),!N&&!te.isPropagationAllowed&&B.stopPropagation()}),F=Ve(()=>{a.current.insideReactTree=!0,L.start(0,K)});x.useEffect(()=>{if(!r||!l)return;a.current.__escapeKeyBubbles=N,a.current.__outsidePressBubbles=I;const B=new Ei,G=new Ei;function O(){B.clear(),Z.current=!0}function ie(){B.start(zc()?5:0,()=>{Z.current=!1})}function te(){A.current=!0,G.start(0,()=>{A.current=!1})}function ne(){T.current=!1,C.current=!1}function le(){const oe=q.current,re=oe==="pen"||!oe?"mouse":oe,_e=R(),J=typeof _e=="function"?_e():_e;return typeof J=="string"?J:J[re]}function pe(oe){const re=le();return re==="intentional"&&oe.type!=="click"||re==="sloppy"&&oe.type==="click"}function ye(oe){const re=a.current.floatingContext?.nodeId,_e=k&&$i(k.nodesRef.current,re).some(J=>vi(oe,J.context?.elements.floating));return vi(oe,n.select("floatingElement"))||vi(oe,n.select("domReferenceElement"))||_e}function Se(oe){if(pe(oe)){K();return}if(a.current.insideReactTree){K();return}const re=gr(oe),_e=`[${fc("inert")}]`,J=yt(re)?re.getRootNode():null,ue=Array.from((co(J)?J:Ft(n.select("floatingElement"))).querySelectorAll(_e)),Ie=n.context.triggerElements;if(re&&(Ie.hasElement(re)||Ie.hasMatchingElement(ot=>kt(ot,re))))return;let Be=yt(re)?re:null;for(;Be&&!pi(Be);){const ot=Bi(Be);if(pi(ot)||!yt(ot))break;Be=ot}if(ue.length&&yt(re)&&!RL(re)&&!kt(re,n.select("floatingElement"))&&ue.every(ot=>!kt(Be,ot)))return;if(It(re)&&!("touches"in oe)){const ot=pi(re),it=Er(re),nt=/auto|scroll/,vt=ot||nt.test(it.overflowX),st=ot||nt.test(it.overflowY),xt=vt&&re.clientWidth>0&&re.scrollWidth>re.clientWidth,We=st&&re.clientHeight>0&&re.scrollHeight>re.clientHeight,Ot=it.direction==="rtl",Fe=We&&(Ot?oe.offsetX<=re.offsetWidth-re.clientWidth:oe.offsetX>re.clientWidth),Ke=xt&&oe.offsetY>re.clientHeight;if(Fe||Ke)return}if(ye(oe))return;if(le()==="intentional"&&A.current){G.clear(),A.current=!1;return}if(typeof _=="function"&&!_(oe))return;const Ze=a.current.floatingContext?.nodeId,Ye=k?$i(k.nodesRef.current,Ze):[];if(Ye.length>0){let ot=!0;if(Ye.forEach(it=>{it.context?.open&&!it.context.dataRef.current.__outsidePressBubbles&&(ot=!1)}),!ot)return}n.setOpen(!1,_t(wv,oe)),K()}function ze(oe){le()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!l||vi(oe,n.select("floatingElement"))||vi(oe,n.select("domReferenceElement"))||Se(oe)}function he(oe){if(le()!=="sloppy"||!n.select("open")||!l||vi(oe,n.select("floatingElement"))||vi(oe,n.select("domReferenceElement")))return;const re=oe.touches[0];re&&(H.current={startTime:Date.now(),startX:re.clientX,startY:re.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$.start(1e3,()=>{H.current&&(H.current.dismissOnTouchEnd=!1,H.current.dismissOnMouseDown=!1)}))}function Te(oe,re){const _e=gr(oe);if(!_e)return;const J=Nt(_e,oe.type,()=>{re(oe),J()})}function Re(oe){q.current="touch",Te(oe,he)}function Oe(oe){$.clear(),oe.type==="pointerdown"&&(q.current=oe.pointerType),!(oe.type==="mousedown"&&H.current&&!H.current.dismissOnMouseDown)&&Te(oe,re=>{re.type==="pointerdown"?ze(re):Se(re)})}function ve(oe){if(!T.current)return;const re=C.current;if(ne(),le()==="intentional"){if(oe.type==="pointercancel"){re&&te();return}if(!ye(oe)){if(re){te();return}typeof _=="function"&&!_(oe)||(G.clear(),A.current=!0,K())}}}function xe(oe){if(le()!=="sloppy"||!H.current||vi(oe,n.select("floatingElement"))||vi(oe,n.select("domReferenceElement")))return;const re=oe.touches[0];if(!re)return;const _e=Math.abs(re.clientX-H.current.startX),J=Math.abs(re.clientY-H.current.startY),ue=Math.sqrt(_e*_e+J*J);ue>5&&(H.current.dismissOnTouchEnd=!0),ue>10&&(Se(oe),$.clear(),H.current=null)}function Me(oe){Te(oe,xe)}function Ce(oe){le()!=="sloppy"||!H.current||vi(oe,n.select("floatingElement"))||vi(oe,n.select("domReferenceElement"))||(H.current.dismissOnTouchEnd&&Se(oe),$.clear(),H.current=null)}function Pe(oe){Te(oe,Ce)}const ge=Ft(s),fe=ji(c&&ji(Nt(ge,"keydown",j),Nt(ge,"compositionstart",O),Nt(ge,"compositionend",ie)),E&&ji(Nt(ge,"click",Oe,!0),Nt(ge,"pointerdown",Oe,!0),Nt(ge,"pointerup",ve,!0),Nt(ge,"pointercancel",ve,!0),Nt(ge,"mousedown",Oe,!0),Nt(ge,"mouseup",ve,!0),Nt(ge,"touchstart",Re,!0),Nt(ge,"touchmove",Me,!0),Nt(ge,"touchend",Pe,!0)));return()=>{fe(),B.clear(),G.clear(),ne(),A.current=!1}},[a,s,c,E,_,r,l,N,I,j,K,R,k,n,$]),x.useEffect(K,[_,K]);const U=x.useMemo(()=>({onKeyDown:j,[s2[m]]:B=>{z()&&n.setOpen(!1,_t(ml,B.nativeEvent))},...m!=="intentional"&&{onClick(B){z()&&n.setOpen(!1,_t(ml,B.nativeEvent))}}}),[j,n,m,z]),P=Ve(B=>{if(!r||!l||B.button!==0)return;const G=gr(B.nativeEvent);kt(n.select("floatingElement"),G)&&(T.current||(T.current=!0,C.current=!1))}),W=Ve(B=>{!r||!l||(B.defaultPrevented||B.nativeEvent.defaultPrevented)&&T.current&&(C.current=!0)}),D=x.useMemo(()=>({onKeyDown:j,onPointerDown:W,onMouseDown:W,onClickCapture:F,onMouseDownCapture(B){F(),P(B)},onPointerDownCapture(B){F(),P(B)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[j,F,P,W]);return x.useMemo(()=>l?{reference:U,floating:D,trigger:U}:{},[l,U,D])}function nE(e,t,n){let{reference:r,floating:s}=e;const a=fi(t),l=Av(t),c=Cv(l),p=jr(t),d=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,g=r[c]/2-s[c]/2;let y;switch(p){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}switch(mo(t)){case"start":y[l]-=g*(n&&d?-1:1);break;case"end":y[l]+=g*(n&&d?-1:1);break}return y}async function l2(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:p}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:g=!1,padding:y=0}=ws(t,e),k=bR(y),_=c[g?m==="floating"?"reference":"floating":m],E=uc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(_)))==null||n?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:p})),R=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(T))?await(a.getScale==null?void 0:a.getScale(T))||{x:1,y:1}:{x:1,y:1},A=uc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:R,offsetParent:T,strategy:p}):R);return{top:(E.top-A.top+k.top)/C.y,bottom:(A.bottom-E.bottom+k.bottom)/C.y,left:(E.left-A.left+k.left)/C.x,right:(A.right-E.right+k.right)/C.x}}const u2=50,c2=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:l2},p=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=nE(d,r,p),g=r,y=0;const k={};for(let w=0;w<a.length;w++){const _=a[w];if(!_)continue;const{name:E,fn:R}=_,{x:T,y:C,data:A,reset:N}=await R({x:h,y:m,initialPlacement:r,placement:g,strategy:s,middlewareData:k,rects:d,platform:c,elements:{reference:e,floating:t}});h=T??h,m=C??m,k[E]={...k[E],...A},N&&y<u2&&(y++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(d=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:h,y:m}=nE(d,g,p)),w=-1)}return{x:h,y:m,placement:g,strategy:s,middlewareData:k}},f2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:c,platform:p,elements:d}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:w=!0,..._}=ws(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=jr(s),R=fi(c),T=jr(c)===c,C=await(p.isRTL==null?void 0:p.isRTL(d.floating)),A=g||(T||!w?[Ap(c)]:IL(c)),N=k!=="none";!g&&N&&A.push(...jL(c,w,k,C));const I=[c,...A],H=await p.detectOverflow(t,_),$=[];let L=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&$.push(H[E]),m){const z=ML(s,l,C);$.push(H[z[0]],H[z[1]])}if(L=[...L,{placement:s,overflows:$}],!$.every(z=>z<=0)){var K,Z;const z=(((K=a.flip)==null?void 0:K.index)||0)+1,j=I[z];if(j&&(!(m==="alignment"?R!==fi(j):!1)||L.every(P=>fi(P.placement)===R?P.overflows[0]>0:!0)))return{data:{index:z,overflows:L},reset:{placement:j}};let F=(Z=L.filter(U=>U.overflows[0]<=0).sort((U,P)=>U.overflows[1]-P.overflows[1])[0])==null?void 0:Z.placement;if(!F)switch(y){case"bestFit":{var q;const U=(q=L.filter(P=>{if(N){const W=fi(P.placement);return W===R||W==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(W=>W>0).reduce((W,D)=>W+D,0)]).sort((P,W)=>P[1]-W[1])[0])==null?void 0:q[0];U&&(F=U);break}case"initialPlacement":F=c;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function rE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iE(e){return NL.some(t=>e[t]>=0)}const d2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=ws(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=rE(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:iE(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=rE(l,n.floating);return{data:{escapedOffsets:c,escaped:iE(c)}}}default:return{}}}}},jR=new Set(["left","top"]);async function p2(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=jr(n),c=mo(n),p=fi(n)==="y",d=jR.has(l)?-1:1,h=a&&p?-1:1,m=ws(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:k}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof k=="number"&&(y=c==="end"?k*-1:k),p?{x:y*h,y:g*d}:{x:g*d,y:y*h}}const h2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:c}=t,p=await p2(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+p.x,y:a+p.y,data:{...p,placement:l}}}}},m2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:p={fn:E=>{let{x:R,y:T}=E;return{x:R,y:T}}},...d}=ws(e,t),h={x:n,y:r},m=await a.detectOverflow(t,d),g=fi(jr(s)),y=Rv(g);let k=h[y],w=h[g];if(l){const E=y==="y"?"top":"left",R=y==="y"?"bottom":"right",T=k+m[E],C=k-m[R];k=xy(T,k,C)}if(c){const E=g==="y"?"top":"left",R=g==="y"?"bottom":"right",T=w+m[E],C=w-m[R];w=xy(T,w,C)}const _=p.fn({...t,[y]:k,[g]:w});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[y]:l,[g]:c}}}}}},g2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:p=!0,crossAxis:d=!0}=ws(e,t),h={x:n,y:r},m=fi(s),g=Rv(m);let y=h[g],k=h[m];const w=ws(c,t),_=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(p){const T=g==="y"?"height":"width",C=a.reference[g]-a.floating[T]+_.mainAxis,A=a.reference[g]+a.reference[T]-_.mainAxis;y<C?y=C:y>A&&(y=A)}if(d){var E,R;const T=g==="y"?"width":"height",C=jR.has(jr(s)),A=a.reference[m]-a.floating[T]+(C&&((E=l.offset)==null?void 0:E[m])||0)+(C?0:_.crossAxis),N=a.reference[m]+a.reference[T]+(C?0:((R=l.offset)==null?void 0:R[m])||0)-(C?_.crossAxis:0);k<A?k=A:k>N&&(k=N)}return{[g]:y,[m]:k}}}},b2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:l,elements:c}=t,{apply:p=()=>{},...d}=ws(e,t),h=await l.detectOverflow(t,d),m=jr(s),g=mo(s),y=fi(s)==="y",{width:k,height:w}=a.floating;let _,E;m==="top"||m==="bottom"?(_=m,E=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(E=m,_=g==="end"?"top":"bottom");const R=w-h.top-h.bottom,T=k-h.left-h.right,C=bl(w-h[_],R),A=bl(k-h[E],T),N=!t.middlewareData.shift;let I=C,H=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(H=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=R),N&&!g){const L=Yr(h.left,0),K=Yr(h.right,0),Z=Yr(h.top,0),q=Yr(h.bottom,0);y?H=k-2*(L!==0||K!==0?L+K:Yr(h.left,h.right)):I=w-2*(Z!==0||q!==0?Z+q:Yr(h.top,h.bottom))}await p({...t,availableWidth:H,availableHeight:I});const $=await l.getDimensions(c.floating);return k!==$.width||w!==$.height?{reset:{rects:!0}}:{}}}};function PR(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=It(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=yl(n)!==a||yl(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function Mv(e){return yt(e)?e:e.contextElement}function sl(e){const t=Mv(e);if(!It(t))return Pi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=PR(t);let l=(a?yl(n.width):n.width)/r,c=(a?yl(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const y2=Pi(0);function $R(e){const t=yn(e);return!zc()||!t.visualViewport?y2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function v2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function Yo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Mv(e);let l=Pi(1);t&&(r?yt(r)&&(l=sl(r)):l=sl(e));const c=v2(a,n,r)?$R(a):Pi(0);let p=(s.left+c.x)/l.x,d=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a){const g=yn(a),y=r&&yt(r)?yn(r):r;let k=g,w=my(k);for(;w&&r&&y!==k;){const _=sl(w),E=w.getBoundingClientRect(),R=Er(w),T=E.left+(w.clientLeft+parseFloat(R.paddingLeft))*_.x,C=E.top+(w.clientTop+parseFloat(R.paddingTop))*_.y;p*=_.x,d*=_.y,h*=_.x,m*=_.y,p+=T,d+=C,k=yn(w),w=my(k)}}return uc({width:h,height:m,x:p,y:d})}function kh(e,t){const n=dh(e).scrollLeft;return t?t.left+n:Yo(Fi(e)).left+n}function BR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-kh(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function x2(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Fi(r),c=t?fh(t.floating):!1;if(r===l||c&&a)return n;let p={scrollLeft:0,scrollTop:0},d=Pi(1);const h=Pi(0),m=It(r);if((m||!m&&!a)&&((Yn(r)!=="body"||ho(l))&&(p=dh(r)),m)){const y=Yo(r);d=sl(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=l&&!m&&!a?BR(l,p):Pi(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-p.scrollLeft*d.x+h.x+g.x,y:n.y*d.y-p.scrollTop*d.y+h.y+g.y}}function k2(e){return Array.from(e.getClientRects())}function S2(e){const t=Fi(e),n=dh(e),r=e.ownerDocument.body,s=Yr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Yr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+kh(e);const c=-n.scrollTop;return Er(r).direction==="rtl"&&(l+=Yr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:l,y:c}}const sE=25;function w2(e,t){const n=yn(e),r=Fi(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,p=0;if(s){a=s.width,l=s.height;const h=zc();(!h||h&&t==="fixed")&&(c=s.offsetLeft,p=s.offsetTop)}const d=kh(r);if(d<=0){const h=r.ownerDocument,m=h.body,g=getComputedStyle(m),y=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,k=Math.abs(r.clientWidth-m.clientWidth-y);k<=sE&&(a-=k)}else d<=sE&&(a+=d);return{width:a,height:l,x:c,y:p}}function E2(e,t){const n=Yo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=It(e)?sl(e):Pi(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,p=s*a.x,d=r*a.y;return{width:l,height:c,x:p,y:d}}function oE(e,t,n){let r;if(t==="viewport")r=w2(e,n);else if(t==="document")r=S2(Fi(e));else if(yt(t))r=E2(t,n);else{const s=$R(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return uc(r)}function FR(e,t){const n=Bi(e);return n===t||!yt(n)||pi(n)?!1:Er(n).position==="fixed"||FR(n,t)}function T2(e,t){const n=t.get(e);if(n)return n;let r=oo(e,[],!1).filter(c=>yt(c)&&Yn(c)!=="body"),s=null;const a=Er(e).position==="fixed";let l=a?Bi(e):e;for(;yt(l)&&!pi(l);){const c=Er(l),p=Sv(l);!p&&c.position==="fixed"&&(s=null),(a?!p&&!s:!p&&c.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||ho(l)&&!p&&FR(e,l))?r=r.filter(h=>h!==l):s=c,l=Bi(l)}return t.set(e,r),r}function _2(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?fh(t)?[]:T2(t,this._c):[].concat(n),r],c=oE(t,l[0],s);let p=c.top,d=c.right,h=c.bottom,m=c.left;for(let g=1;g<l.length;g++){const y=oE(t,l[g],s);p=Yr(y.top,p),d=bl(y.right,d),h=bl(y.bottom,h),m=Yr(y.left,m)}return{width:d-m,height:h-p,x:m,y:p}}function R2(e){const{width:t,height:n}=PR(e);return{width:t,height:n}}function C2(e,t,n){const r=It(t),s=Fi(t),a=n==="fixed",l=Yo(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const p=Pi(0);function d(){p.x=kh(s)}if(r||!r&&!a)if((Yn(t)!=="body"||ho(s))&&(c=dh(t)),r){const y=Yo(t,!0,a,t);p.x=y.x+t.clientLeft,p.y=y.y+t.clientTop}else s&&d();a&&!r&&s&&d();const h=s&&!r&&!a?BR(s,c):Pi(0),m=l.left+c.scrollLeft-p.x-h.x,g=l.top+c.scrollTop-p.y-h.y;return{x:m,y:g,width:l.width,height:l.height}}function gb(e){return Er(e).position==="static"}function aE(e,t){if(!It(e)||Er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fi(e)===n&&(n=n.ownerDocument.body),n}function UR(e,t){const n=yn(e);if(fh(e))return n;if(!It(e)){let s=Bi(e);for(;s&&!pi(s);){if(yt(s)&&!gb(s))return s;s=Bi(s)}return n}let r=aE(e,t);for(;r&&eL(r)&&gb(r);)r=aE(r,t);return r&&pi(r)&&gb(r)&&!Sv(r)?n:r||rL(e)||n}const A2=async function(e){const t=this.getOffsetParent||UR,n=this.getDimensions,r=await n(e.floating);return{reference:C2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function N2(e){return Er(e).direction==="rtl"}const qR={convertOffsetParentRelativeRectToViewportRelativeRect:x2,getDocumentElement:Fi,getClippingRect:_2,getOffsetParent:UR,getElementRects:A2,getClientRects:k2,getDimensions:R2,getScale:sl,isElement:yt,isRTL:N2};function HR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function O2(e,t){let n=null,r;const s=Fi(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,p){c===void 0&&(c=!1),p===void 0&&(p=1),a();const d=e.getBoundingClientRect(),{left:h,top:m,width:g,height:y}=d;if(c||t(),!g||!y)return;const k=ys(m),w=ys(s.clientWidth-(h+g)),_=ys(s.clientHeight-(m+y)),E=ys(h),T={rootMargin:-k+"px "+-w+"px "+-_+"px "+-E+"px",threshold:Yr(0,bl(1,p))||1};let C=!0;function A(N){const I=N[0].intersectionRatio;if(I!==p){if(!C)return l();I?l(!1,I):r=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!HR(d,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(A,{...T,root:s.ownerDocument})}catch{n=new IntersectionObserver(A,T)}n.observe(e)}return l(!0),a}function Np(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,d=Mv(e),h=s||a?[...d?oo(d):[],...t?oo(t):[]]:[];h.forEach(E=>{s&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const m=d&&c?O2(d,n):null;let g=-1,y=null;l&&(y=new ResizeObserver(E=>{let[R]=E;R&&R.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(t)})),n()}),d&&!p&&y.observe(d),t&&y.observe(t));let k,w=p?Yo(e):null;p&&_();function _(){const E=Yo(e);w&&!HR(w,E)&&n(),w=E,k=requestAnimationFrame(_)}return n(),()=>{var E;h.forEach(R=>{s&&R.removeEventListener("scroll",n),a&&R.removeEventListener("resize",n)}),m?.(),(E=y)==null||E.disconnect(),y=null,p&&cancelAnimationFrame(k)}}const M2=h2,I2=m2,D2=f2,z2=b2,L2=d2,j2=g2,P2=(e,t,n)=>{const r=new Map,s={platform:qR,...n},a={...s.platform,_c:r};return c2(e,t,{...s,platform:a})};var $2=typeof document<"u",B2=function(){},mp=$2?x.useLayoutEffect:B2;function Op(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,s;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(!Op(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!Op(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function GR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lE(e,t){const n=GR(e);return Math.round(t*n)/n}function bb(e){const t=x.useRef(e);return mp(()=>{t.current=e}),t}function VR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:p,open:d}=e,[h,m]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=x.useState(r);Op(g,r)||y(r);const[k,w]=x.useState(null),[_,E]=x.useState(null),R=x.useCallback(P=>{P!==N.current&&(N.current=P,w(P))},[]),T=x.useCallback(P=>{P!==I.current&&(I.current=P,E(P))},[]),C=a||k,A=l||_,N=x.useRef(null),I=x.useRef(null),H=x.useRef(h),$=p!=null,L=bb(p),K=bb(s),Z=bb(d),q=x.useCallback(()=>{if(!N.current||!I.current)return;const P={placement:t,strategy:n,middleware:g};K.current&&(P.platform=K.current),P2(N.current,I.current,P).then(W=>{const D={...W,isPositioned:Z.current!==!1};z.current&&!Op(H.current,D)&&(H.current=D,Ri.flushSync(()=>{m(D)}))})},[g,t,n,K,Z]);mp(()=>{d===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,m(P=>({...P,isPositioned:!1})))},[d]);const z=x.useRef(!1);mp(()=>(z.current=!0,()=>{z.current=!1}),[]),mp(()=>{if(C&&(N.current=C),A&&(I.current=A),C&&A){if(L.current)return L.current(C,A,q);q()}},[C,A,q,L,$]);const j=x.useMemo(()=>({reference:N,floating:I,setReference:R,setFloating:T}),[R,T]),F=x.useMemo(()=>({reference:C,floating:A}),[C,A]),U=x.useMemo(()=>{const P={position:n,left:0,top:0};if(!F.floating)return P;const W=lE(F.floating,h.x),D=lE(F.floating,h.y);return c?{...P,transform:"translate("+W+"px, "+D+"px)",...GR(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:D}},[n,c,F.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:q,refs:j,elements:F,floatingStyles:U}),[h,q,j,F,U])}const Iv=(e,t)=>{const n=M2(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dv=(e,t)=>{const n=I2(e);return{name:n.name,fn:n.fn,options:[e,t]}},F2=(e,t)=>({fn:j2(e).fn,options:[e,t]}),zv=(e,t)=>{const n=D2(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lv=(e,t)=>{const n=z2(e);return{name:n.name,fn:n.fn,options:[e,t]}},U2=(e,t)=>{const n=L2(e);return{name:n.name,fn:n.fn,options:[e,t]}},rt=(e,t,n,r,s,a,...l)=>{if(l.length>0)throw new Error(Xn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var yb={exports:{}},vb={};var uE;function q2(){if(uE)return vb;uE=1;var e=Ic();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(m,g){var y=g(),k=r({inst:{value:y,getSnapshot:g}}),w=k[0].inst,_=k[1];return a(function(){w.value=y,w.getSnapshot=g,p(w)&&_({inst:w})},[m,y,g]),s(function(){return p(w)&&_({inst:w}),m(function(){p(w)&&_({inst:w})})},[m]),l(y),y}function p(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!n(m,y)}catch{return!0}}function d(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return vb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,vb}var cE;function KR(){return cE||(cE=1,yb.exports=q2()),yb.exports}var jv=KR(),xb={exports:{}},kb={};var fE;function H2(){if(fE)return kb;fE=1;var e=Ic(),t=KR();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,p=e.useDebugValue;return kb.useSyncExternalStoreWithSelector=function(d,h,m,g,y){var k=a(null);if(k.current===null){var w={hasValue:!1,value:null};k.current=w}else w=k.current;k=c(function(){function E(N){if(!R){if(R=!0,T=N,N=g(N),y!==void 0&&w.hasValue){var I=w.value;if(y(I,N))return C=I}return C=N}if(I=C,r(T,N))return I;var H=g(N);return y!==void 0&&y(I,H)?(T=N,I):(T=N,C=H)}var R=!1,T,C,A=m===void 0?null:m;return[function(){return E(h())},A===null?void 0:function(){return E(A())}]},[h,m,g,y]);var _=s(d,k[0],k[1]);return l(function(){w.hasValue=!0,w.value=_},[_]),p(_),_},kb}var dE;function G2(){return dE||(dE=1,xb.exports=H2()),xb.exports}var V2=G2();const Ty=[];let _y;function K2(){return _y}function Z2(e){Ty.push(e)}function ZR(e){const t=(n,r)=>{const s=wr(Y2).current;let a;try{_y=s;for(const l of Ty)l.before(s);a=e(n,r);for(const l of Ty)l.after(s);s.didInitialize=!0}finally{_y=void 0}return a};return t.displayName=e.displayName||e.name,t}function W2(e){return x.forwardRef(ZR(e))}function Y2(){return{didInitialize:!1}}const X2=yv(19),Q2=X2?ej:tj;function bt(e,t,n,r,s){return Q2(e,t,n,r,s)}function J2(e,t,n,r,s){const a=x.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return jv.useSyncExternalStore(e.subscribe,a,a)}Z2({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){const r=e.syncHooks[n],s=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,s))&&(t=!0,r.value=s,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const s of e.syncHooks)n.add(s.store);const r=[];for(const s of n)r.push(s.subscribe(t));return()=>{for(const s of r)s()}}),jv.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function ej(e,t,n,r,s){const a=K2();if(!a)return J2(e,t,n,r,s);const l=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,s))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=s,c.didChange=!0)):(c={store:e,selector:t,a1:n,a2:r,a3:s,value:t(e.getSnapshot(),n,r,s),didChange:!1},a.syncHooks.push(c)),c.value}function tj(e,t,n,r,s){return V2.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class WR{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,s){return bt(this,t,n,r,s)}}class YR extends WR{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){x.useDebugValue(t),He(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;He(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);He(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){x.useDebugValue(t);const r=n!==void 0;He(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,s){const a=this.selectors[t];return a(this.state,n,r,s)}useState(t,n,r,s){return x.useDebugValue(t),bt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){x.useDebugValue(t);const r=Ve(n??ar);this.context[t]=r}useStateSetter(t){const n=x.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let s=r(this.state);return n(s,s,this),this.subscribe(a=>{const l=r(a);if(!Object.is(s,l)){const c=s;s=l,n(l,c,this)}})}}function nj(){const[,e]=x.useState({});return x.useCallback(()=>{e({})},[])}const rj={open:rt(e=>e.open),transitionStatus:rt(e=>e.transitionStatus),domReferenceElement:rt(e=>e.domReferenceElement),referenceElement:rt(e=>e.positionReference??e.referenceElement),floatingElement:rt(e=>e.floatingElement),floatingId:rt(e=>e.floatingId)};class Pv extends YR{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:a,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:ZL(),nested:r,triggerElements:a},rj),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&cR(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function $c(e,t=!1,n=!1){const[r,s]=x.useState(e&&t?"idle":void 0),[a,l]=x.useState(e);return e&&!a&&(l(!0),s("starting")),!e&&a&&r!=="ending"&&!n&&s("ending"),!e&&!a&&r==="ending"&&s(void 0),He(()=>{if(!e&&a&&r!=="ending"&&n){const c=Cn.request(()=>{s("ending")});return()=>{Cn.cancel(c)}}},[e,a,r,n]),He(()=>{if(!e||t)return;const c=Cn.request(()=>{s(void 0)});return()=>{Cn.cancel(c)}},[t,e]),He(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=Cn.request(()=>{s("idle")});return()=>{Cn.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function XR(e,t=!1,n=!0){const r=jc();return Ve((s,a=null)=>{r.cancel();const l=ds(e);if(l==null)return;const c=l,p=()=>{Ri.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function d(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||p()}).catch(()=>{if(n){a?.aborted||p();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&d()})}if(t){const h=Wo.startingStyle;if(!c.hasAttribute(h)){r.request(d);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),d())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(d)})}function sa(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=Ve(s),l=XR(r,n,!1);x.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}function ij(e,t){const n=x.useRef(null),r=x.useRef(null);return x.useCallback(s=>{if(e!==void 0){if(n.current!==null){const a=n.current,l=r.current,c=t.context.triggerElements.getById(a);l&&c===l&&t.context.triggerElements.delete(a),n.current=null,r.current=null}s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s))}},[t,e])}function sj(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=ij(e,n),l=Ve(c=>{if(a(c),!c||!n.select("open"))return;const p=n.select("activeTriggerId");if(p===e){n.update({activeTriggerElement:c,...r});return}p==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return He(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function oj(e){const t=e.useState("open");He(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,s]=n.value;e.update({activeTriggerId:r,activeTriggerElement:s})}}},[t,e])}function aj(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=$c(e);t.useSyncedValues({mounted:r,transitionStatus:a});const l=Ve(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return sa({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:a}}class $v{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function lj(){return new Pv({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new $v,floatingId:"",syncOnly:!1,nested:!1,onOpenChange:void 0})}function uj(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:lj(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:hr,inactiveTriggerProps:hr,popupProps:hr}}const _d=rt(e=>e.triggerIdProp??e.activeTriggerId),cj={open:rt(e=>e.openProp??e.open),mounted:rt(e=>e.mounted),transitionStatus:rt(e=>e.transitionStatus),floatingRootContext:rt(e=>e.floatingRootContext),preventUnmountingOnClose:rt(e=>e.preventUnmountingOnClose),payload:rt(e=>e.payload),activeTriggerId:_d,activeTriggerElement:rt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:rt((e,t)=>t!==void 0&&_d(e)===t),isOpenedByTrigger:rt((e,t)=>t!==void 0&&_d(e)===t&&e.open),isMountedByTrigger:rt((e,t)=>t!==void 0&&_d(e)===t&&e.mounted),triggerProps:rt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:rt(e=>e.popupProps),popupElement:rt(e=>e.popupElement),positionerElement:rt(e=>e.positionerElement)};function QR(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=hh(),a=xh()!=null,l=wr(()=>new Pv({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new $v,floatingId:s,syncOnly:!1,nested:a})).current;return He(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=yt(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,s,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=a,l}function fj(e={}){const{nodeId:t,externalTree:n}=e,r=QR(e),s=e.rootContext||r,a={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[l,c]=x.useState(null),p=x.useRef(null),d=Al(n);He(()=>{a.domReference&&(p.current=a.domReference)},[a.domReference]);const h=VR({...e,elements:{...a,...l&&{reference:l}}}),m=x.useCallback(H=>{const $=yt(H)?{getBoundingClientRect:()=>H.getBoundingClientRect(),getClientRects:()=>H.getClientRects(),contextElement:H}:H;c($),h.refs.setReference($)},[h.refs]),[g,y]=x.useState(void 0),[k,w]=x.useState(null);s.useSyncedValue("referenceElement",g??null);const _=yt(g)?g:null;s.useSyncedValue("domReferenceElement",g===void 0?a.domReference:_),s.useSyncedValue("floatingElement",k);const E=x.useCallback(H=>{(yt(H)||H===null)&&(p.current=H,y(H)),(yt(h.refs.reference.current)||h.refs.reference.current===null||H!==null&&!yt(H))&&h.refs.setReference(H)},[h.refs,y]),R=x.useCallback(H=>{w(H),h.refs.setFloating(H)},[h.refs]),T=x.useMemo(()=>({...h.refs,setReference:E,setFloating:R,setPositionReference:m,domReference:p}),[h.refs,E,R,m]),C=x.useMemo(()=>({...h.elements,domReference:a.domReference}),[h.elements,a.domReference]),A=s.useState("open"),N=s.useState("floatingId"),I=x.useMemo(()=>({...h,dataRef:s.context.dataRef,open:A,onOpenChange:s.setOpen,events:s.context.events,floatingId:N,refs:T,elements:C,nodeId:t,rootStore:s}),[h,T,C,t,s,A,N]);return He(()=>{s.context.dataRef.current.floatingContext=I;const H=d?.nodesRef.current.find($=>$.id===t);H&&(H.context=I)}),x.useMemo(()=>({...h,context:I,refs:T,elements:C,rootStore:s}),[h,T,C,I,s])}function dj(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,s=hh(),a=xh()!=null,l=t.useState("open"),c=t.useState("activeTriggerElement"),p=t.useState(n?"popupElement":"positionerElement"),d=t.context.triggerElements,h=wr(()=>new Pv({open:l,transitionStatus:void 0,referenceElement:c,floatingElement:p,triggerElements:d,onOpenChange:r,floatingId:s,syncOnly:!0,nested:a})).current;return He(()=>{const m={open:l,floatingId:s,referenceElement:c,floatingElement:p};yt(c)&&(m.domReferenceElement=c),h.state.positionReference===h.state.referenceElement&&(m.positionReference=c),h.update(m)},[l,s,c,p,h]),h.context.onOpenChange=r,h.context.nested=a,h}const Sb=gL&&oR;function pj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:s}=n.context,{enabled:a=!0,delay:l}=t,c=x.useRef(!1),p=x.useRef(null),d=ci(),h=x.useRef(!0);x.useEffect(()=>{const g=n.select("domReferenceElement");if(!a)return;const y=yn(g);function k(){const E=n.select("domReferenceElement");!n.select("open")&&It(E)&&E===Dr(Ft(E))&&(c.current=!0)}function w(){h.current=!0}function _(){h.current=!1}return ji(Nt(y,"blur",k),Sb&&Nt(y,"keydown",w,!0),Sb&&Nt(y,"pointerdown",_,!0))},[n,a]),x.useEffect(()=>{if(!a)return;function g(y){if(y.reason===ml||y.reason===Ev){const k=n.select("domReferenceElement");yt(k)&&(p.current=k,c.current=!0)}}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,a,n]);const m=x.useMemo(()=>({onMouseLeave(){c.current=!1,p.current=null},onFocus(g){const y=g.currentTarget;if(c.current){if(p.current===y)return;c.current=!1,p.current=null}const k=gr(g.nativeEvent);if(yt(k)){if(Sb&&!g.relatedTarget){if(!h.current&&!bh(k))return}else if(!AL(k))return}const w=Rp(g.relatedTarget,n.context.triggerElements),{nativeEvent:_,currentTarget:E}=g,R=typeof l=="function"?l():l;if(n.select("open")&&w||R===0||R===void 0){n.setOpen(!0,_t(dp,_,E));return}d.start(R,()=>{c.current||n.setOpen(!0,_t(dp,_,E))})},onBlur(g){c.current=!1,p.current=null;const y=g.relatedTarget,k=g.nativeEvent,w=yt(y)&&y.hasAttribute(fc("focus-guard"))&&y.getAttribute("data-type")==="outside";d.start(0,()=>{const _=n.select("domReferenceElement"),E=Dr(Ft(_));!y&&E===_||kt(s.current.floatingContext?.refs.floating.current,E)||kt(_,E)||w||Rp(y??E,n.context.triggerElements)||n.setOpen(!1,_t(dp,k))})}}),[s,n,d,l]);return x.useMemo(()=>a?{reference:m,trigger:m}:{},[a,m])}class Bv{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 Ei,this.restTimeout=new Ei,this.handleCloseOptions=void 0}static create(){return new Bv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Mp=new WeakMap;function Ip(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Mp.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Mp.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function JR(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Mp.get(n);a&&a!==e&&Ip(a),Ip(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,Mp.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function eC(e){const t=wr(Bv.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),gh(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function hj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:c=!0,closeDelay:p=0,nodeId:d}=t,h=eC(n),m=Al(),g=xh(),y=Ve(()=>fR(l.current.openEvent?.type,h.interactedInside)),k=Ve(()=>{const C=l.current.openEvent?.type;return C?.includes("mouse")&&C!=="mousedown"}),w=Ve(C=>Rp(C,n.context.triggerElements)),_=x.useCallback(C=>{const A=Tp(p,"close",h.pointerType),N=()=>{n.setOpen(!1,_t(li,C)),m?.events.emit("floating.closed",C)};A?h.openChangeTimeout.start(A,N):(h.openChangeTimeout.clear(),N())},[p,n,h,m]),E=Ve(()=>{Ip(h)}),R=Ve(C=>{const A=gr(C);if(!CL(A)){h.interactedInside=!1;return}h.interactedInside=A?.closest("[aria-haspopup]")!=null});He(()=>{r||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,E())},[r,h,E]),x.useEffect(()=>E,[E]),He(()=>{if(c&&r&&h.handleCloseOptions?.blockPointerEvents&&k()&&yt(a)&&s){const C=a,A=s,N=Ft(s),I=m?.nodesRef.current.find($=>$.id===g)?.context?.elements.floating;I&&(I.style.pointerEvents="");const H=h.handleCloseOptions?.getScope?.()??h.pointerEventsScopeElement??I??C.closest("[data-rootownerid]")??N.body;return JR(h,{scopeElement:H,referenceElement:C,floatingElement:A}),()=>{E()}}},[c,r,a,s,h,k,m,g,E]);const T=ci();x.useEffect(()=>{if(!c)return;function C(){h.openChangeTimeout.clear(),T.clear(),m?.events.off("floating.closed",N),E()}function A(H){if(m&&g&&$i(m.nodesRef.current,g).length>0){m.events.on("floating.closed",N);return}if(w(H.relatedTarget))return;const $=l.current.floatingContext?.nodeId??d,L=H.relatedTarget;if(!(m&&$&&yt(L)&&$i(m.nodesRef.current,$,!1).some(Z=>kt(Z.context?.elements.floating,L)))){if(h.handler){h.handler(H);return}E(),y()||_(H)}}function N(H){!m||!g||$i(m.nodesRef.current,g).length>0||T.start(0,()=>{m.events.off("floating.closed",N),n.setOpen(!1,_t(li,H)),m.events.emit("floating.closed",H)})}const I=s;return ji(I&&Nt(I,"mouseenter",C),I&&Nt(I,"mouseleave",A),I&&Nt(I,"pointerdown",R,!0),()=>{m?.events.off("floating.closed",N)})},[c,s,n,l,d,y,w,_,E,R,h,m,g,T])}const mj={current:null};function gj(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:s}=n.context,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:p=!1,restMs:d=0,move:h=!0,triggerElementRef:m=mj,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:k,isClosing:w}=t,_=Al(g),E=eC(n),R=x.useRef(!1),T=qn(c),C=qn(l),A=qn(d),N=qn(a),I=qn(w);y&&(E.handleCloseOptions=T.current?.__options);const H=Ve(()=>fR(r.current.openEvent?.type,E.interactedInside)),$=Ve(z=>Rp(z,n.context.triggerElements)),L=Ve((z,j,F)=>{const U=n.context.triggerElements;if(U.hasElement(j))return!z||!kt(z,j);if(!yt(F))return!1;const P=F;return U.hasMatchingElement(W=>kt(W,P))&&(!z||!kt(z,P))}),K=Ve((z,j=!0)=>{const F=Tp(C.current,"close",E.pointerType);F?E.openChangeTimeout.start(F,()=>{n.setOpen(!1,_t(li,z)),_?.events.emit("floating.closed",z)}):j&&(E.openChangeTimeout.clear(),n.setOpen(!1,_t(li,z)),_?.events.emit("floating.closed",z))}),Z=Ve(()=>{if(!E.handler)return;Ft(n.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0}),q=Ve(()=>{Ip(E)});return x.useEffect(()=>Z,[Z]),x.useEffect(()=>{if(!a)return;function z(j){j.open?R.current=!1:(R.current=j.reason===li,Z(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return s.on("openchange",z),()=>{s.off("openchange",z)}},[a,s,E,Z]),x.useEffect(()=>{if(!a)return;const z=m.current??(y?n.select("domReferenceElement"):null);if(!yt(z))return;function j(U){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,p&&!gl(E.pointerType))return;const P=Hw(A.current),W=Tp(C.current,"open",E.pointerType),D=gr(U),B=U.currentTarget??null,G=n.select("domReferenceElement");let O=B;if(yt(D)&&!n.context.triggerElements.hasElement(D)){for(const he of n.context.triggerElements.elements())if(kt(he,D)){O=he;break}}yt(B)&&yt(G)&&!n.context.triggerElements.hasElement(B)&&kt(B,G)&&(O=G);const ie=O==null?!1:L(G,O,D),te=n.select("open"),ne=I.current?.()??n.select("transitionStatus")==="ending",le=!te&&ne&&R.current,pe=!ie&&yt(O)&&yt(G)&&kt(G,O)&&le,ye=P>0&&!W,Se=ie&&(te||le)||pe,ze=!te||ie;if(Se){n.setOpen(!0,_t(li,U,O));return}ye||(W?E.openChangeTimeout.start(W,()=>{ze&&n.setOpen(!0,_t(li,U,O))}):ze&&n.setOpen(!0,_t(li,U,O)))}function F(U){if(H()){q();return}Z();const P=n.select("domReferenceElement"),W=Ft(P);E.restTimeout.clear(),E.restTimeoutPending=!1;const D=r.current.floatingContext??k?.();if($(U.relatedTarget))return;if(T.current&&D){n.select("open")||E.openChangeTimeout.clear();const O=m.current;E.handler=T.current({...D,tree:_,x:U.clientX,y:U.clientY,onClose(){q(),Z(),N.current&&!H()&&O===n.select("domReferenceElement")&&K(U,!0)}}),W.addEventListener("mousemove",E.handler),E.handler(U);return}(E.pointerType!=="touch"||!kt(n.select("floatingElement"),U.relatedTarget))&&K(U)}return h?ji(Nt(z,"mousemove",j,{once:!0}),Nt(z,"mouseenter",j),Nt(z,"mouseleave",F)):ji(Nt(z,"mouseenter",j),Nt(z,"mouseleave",F))},[Z,q,r,C,K,n,a,T,E,y,L,H,$,p,h,A,m,_,N,k,I]),x.useMemo(()=>{if(!a)return;function z(j){E.pointerType=j.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(j){const{nativeEvent:F}=j,U=j.currentTarget,P=n.select("domReferenceElement"),W=n.select("open"),D=L(P,U,j.target);if(p&&!gl(E.pointerType))return;if(W&&D&&E.handleCloseOptions?.blockPointerEvents){const O=n.select("floatingElement");if(O){const ie=E.handleCloseOptions?.getScope?.()??U.ownerDocument.body;JR(E,{scopeElement:ie,referenceElement:U,floatingElement:O})}}const B=Hw(A.current);if(W&&!D||B===0||!D&&E.restTimeoutPending&&j.movementX**2+j.movementY**2<2)return;E.restTimeout.clear();function G(){if(E.restTimeoutPending=!1,H())return;const O=n.select("open");!E.blockMouseMove&&(!O||D)&&n.setOpen(!0,_t(li,F,U))}E.pointerType==="touch"?Ri.flushSync(()=>{G()}):D&&W?G():(E.restTimeoutPending=!0,E.restTimeout.start(B,G))}}},[a,E,H,L,p,n,A])}function tC(e=[]){const t=e.map(d=>d?.reference),n=e.map(d=>d?.floating),r=e.map(d=>d?.item),s=e.map(d=>d?.trigger),a=x.useCallback(d=>Rd(d,e,"reference"),t),l=x.useCallback(d=>Rd(d,e,"floating"),n),c=x.useCallback(d=>Rd(d,e,"item"),r),p=x.useCallback(d=>Rd(d,e,"trigger"),s);return x.useMemo(()=>({getReferenceProps:a,getFloatingProps:l,getItemProps:c,getTriggerProps:p}),[a,l,c,p])}function Rd(e,t,n){const r=new Map,s=n==="item",a={};n==="floating"&&(a.tabIndex=-1,a[yy]="");for(const l in e)s&&e&&(l===hR||l===mR)||(a[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const p=t[l]?.[n];typeof p=="function"?c=e?p(e):null:c=p,c&&pE(a,c,s,r)}return pE(a,e,s,r),a}function pE(e,t,n,r){for(const s in t){const a=t[s];n&&(s===hR||s===mR)||(s.startsWith("on")?(r.has(s)||r.set(s,[]),typeof a=="function"&&(r.get(s)?.push(a),e[s]=(...l)=>r.get(s)?.map(c=>c(...l)).find(c=>c!==void 0))):e[s]=a)}}function bj(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const yj="Escape";function Sh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Cd(e,t){return Sh(t,e===_v||e===Pc,e===ao||e===lo)}function wb(e,t,n){return Sh(t,e===Pc,n?e===ao:e===lo)||e==="Enter"||e===" "||e===""}function vj(e,t,n){return Sh(t,n?e===ao:e===lo,e===Pc)}function xj(e,t,n,r){const s=n?e===lo:e===ao,a=e===_v;return t==="both"||t==="horizontal"&&r&&r>1?e===yj:Sh(t,s,a)}function kj(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:p,onNavigate:d=()=>{},enabled:h=!0,selectedIndex:m=null,allowEscape:g=!1,loopFocus:y=!1,nested:k=!1,rtl:w=!1,virtual:_=!1,focusItemOnOpen:E="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:T=!0,disabledIndices:C=void 0,orientation:A="vertical",parentOrientation:N,cols:I=1,id:H,resetOnPointerLeave:$=!0,externalTree:L}=t,K=Cp(s),Z=qn(K),q=xh(),z=Al(L);He(()=>{l.current.orientation=A},[l,A]);const j=vy(a),F=x.useRef(E),U=x.useRef(m??-1),P=x.useRef(null),W=x.useRef(!0),D=Ve(ge=>{d(U.current===-1?null:U.current,ge)}),B=x.useRef(D),G=x.useRef(!!s),O=x.useRef(r),ie=x.useRef(!1),te=x.useRef(!1),ne=x.useRef(null),le=qn(C),pe=qn(r),ye=qn(m),Se=qn($),ze=Ve(()=>{function ge(_e){_?z?.events.emit("virtualfocus",_e):ne.current=hp(_e,{sync:ie.current,preventScroll:!0})}const fe=c.current[U.current],oe=te.current;fe&&ge(fe),(ie.current?_e=>_e():requestAnimationFrame)(()=>{const _e=c.current[U.current]||fe;if(!_e)return;fe||ge(_e),Re&&(oe||!W.current)&&_e.scrollIntoView?.({block:"nearest",inline:"nearest"})})});He(()=>{h&&(r&&s?(U.current=m??-1,F.current&&m!=null&&(te.current=!0,D())):G.current&&(U.current=-1,B.current()))},[h,r,s,m,D]),He(()=>{if(h){if(!r){ie.current=!1;return}if(s)if(p==null){if(ie.current=!1,ye.current!=null)return;if(G.current&&(U.current=-1,ze()),(!O.current||!G.current)&&F.current&&(P.current!=null||F.current===!0&&P.current==null)){let ge=0;const fe=()=>{c.current[0]==null?(ge<2&&(ge?requestAnimationFrame:queueMicrotask)(fe),ge+=1):(U.current=P.current==null||wb(P.current,A,w)||k?pp(c):Sy(c),P.current=null,D())};fe()}}else cc(c.current,p)||(U.current=p,ze(),te.current=!1)}},[h,r,s,p,ye,k,c,A,w,D,ze,le]),He(()=>{if(!h||s||!z||_||!G.current)return;const ge=z.nodesRef.current,fe=ge.find(_e=>_e.id===q)?.context?.elements.floating,oe=Dr(Ft(s)),re=ge.some(_e=>_e.context&&kt(_e.context.elements.floating,oe));fe&&!re&&W.current&&fe.focus({preventScroll:!0})},[h,s,z,q,_]),He(()=>{B.current=D,O.current=r,G.current=!!s}),He(()=>{r||(P.current=null,F.current=E)},[r,E]);const he=p!=null,Te=Ve(ge=>{if(!pe.current)return;const fe=c.current.indexOf(ge.currentTarget);fe!==-1&&(U.current!==fe||p!==fe)&&(U.current=fe,D(ge))}),Re=x.useMemo(()=>({onFocus(fe){ie.current=!0,Te(fe)},onClick:({currentTarget:fe})=>fe.focus({preventScroll:!0}),onMouseMove(fe){ie.current=!0,te.current=!1,R&&Te(fe)},onPointerLeave(fe){if(!pe.current||!W.current||fe.pointerType==="touch")return;ie.current=!0;const oe=fe.relatedTarget;if(!bj(fe)&&!(!R||c.current.includes(oe))&&Se.current&&(ne.current?.(),ne.current=null,U.current=-1,D(fe),!_)){const re=Z.current,_e=Dr(Ft(re));re&&kt(re,_e)&&re.focus({preventScroll:!0})}}}),[Te,pe,Z,R,c,D,Se,_]),Oe=x.useCallback(()=>N??z?.nodesRef.current.find(ge=>ge.id===q)?.context?.dataRef?.current.orientation,[q,z,N]),ve=Ve(ge=>{if(W.current=!1,ie.current=!0,ge.which===229||!pe.current&&ge.currentTarget===Z.current)return;if(k&&xj(ge.key,A,w,I)){Cd(ge.key,Oe())||Wr(ge),n.setOpen(!1,_t(ub,ge.nativeEvent)),It(a)&&(_?z?.events.emit("virtualfocus",a):a.focus());return}const fe=U.current,oe=pp(c,C),re=Sy(c,C);if(j||(ge.key==="Home"&&(Wr(ge),U.current=oe,D(ge)),ge.key==="End"&&(Wr(ge),U.current=re,D(ge))),I>1){const _e=Array.from({length:c.current.length},()=>({width:1,height:1})),J=vR(_e,I,!1),ue=J.findIndex(Ze=>Ze!=null&&!vs(c.current,Ze,C)),Ie=J.reduce((Ze,Ye,ot)=>Ye!=null&&!vs(c.current,Ye,C)?ot:Ze,-1),Be=J[yR(J.map(Ze=>Ze!=null?c.current[Ze]:null),{event:ge,orientation:A,loopFocus:y,rtl:w,cols:I,disabledIndices:kR([...(typeof C!="function"?C:null)||c.current.map((Ze,Ye)=>vs(c.current,Ye,C)?Ye:void 0),void 0],J),minIndex:ue,maxIndex:Ie,prevIndex:xR(U.current>re?oe:U.current,_e,J,I,ge.key===Pc?"bl":ge.key===(w?ao:lo)?"tr":"tl"),stopEvent:!0})];if(Be!=null&&(U.current=Be,D(ge)),A==="both")return}if(Cd(ge.key,A)){if(Wr(ge),r&&!_&&Dr(ge.currentTarget.ownerDocument)===ge.currentTarget){U.current=wb(ge.key,A,w)?oe:re,D(ge);return}wb(ge.key,A,w)?y?fe>=re?g&&fe!==c.current.length?U.current=-1:(ie.current=!1,U.current=oe):U.current=dr(c.current,{startingIndex:fe,disabledIndices:C}):U.current=Math.min(re,dr(c.current,{startingIndex:fe,disabledIndices:C})):y?fe<=oe?g&&fe!==-1?U.current=c.current.length:(ie.current=!1,U.current=re):U.current=dr(c.current,{startingIndex:fe,decrement:!0,disabledIndices:C}):U.current=Math.max(oe,dr(c.current,{startingIndex:fe,decrement:!0,disabledIndices:C})),cc(c.current,U.current)&&(U.current=-1),D(ge)}}),xe=x.useMemo(()=>_&&r&&he&&{"aria-activedescendant":`${H}-${p}`},[_,r,he,H,p]),Me=x.useMemo(()=>({"aria-orientation":A==="both"?void 0:A,...j?{}:xe,onKeyDown(ge){if(ge.key==="Tab"&&ge.shiftKey&&r&&!_){const fe=gr(ge.nativeEvent);if(fe&&!kt(Z.current,fe))return;Wr(ge),n.setOpen(!1,_t(ph,ge.nativeEvent)),It(a)&&a.focus();return}ve(ge)},onPointerMove(){W.current=!0}}),[xe,ve,Z,A,j,n,r,_,a]),Ce=x.useMemo(()=>{function ge(oe){E==="auto"&&lR(oe.nativeEvent)&&(F.current=!_)}function fe(oe){F.current=E,E==="auto"&&uR(oe.nativeEvent)&&(F.current=!0)}return{onKeyDown(oe){const re=n.select("open");W.current=!1;const _e=oe.key.startsWith("Arrow"),J=vj(oe.key,Oe(),w),ue=Cd(oe.key,A),Ie=(k?J:ue)||oe.key==="Enter"||oe.key.trim()==="";if(_&&re)return ve(oe);if(!(!re&&!T&&_e)){if(Ie){const Be=Cd(oe.key,Oe());P.current=k&&Be?null:oe.key}if(k){J&&(Wr(oe),re?(U.current=pp(c,le.current),D(oe)):n.setOpen(!0,_t(ub,oe.nativeEvent,oe.currentTarget)));return}ue&&(ye.current!=null&&(U.current=ye.current),Wr(oe),!re&&T?n.setOpen(!0,_t(ub,oe.nativeEvent,oe.currentTarget)):ve(oe),re&&D(oe))}},onFocus(oe){n.select("open")&&!_&&(U.current=-1,D(oe))},onPointerDown:fe,onPointerEnter:fe,onMouseDown:ge,onClick:ge}},[ve,le,E,c,k,D,n,T,A,Oe,w,ye,_]),Pe=x.useMemo(()=>({...xe,...Ce}),[xe,Ce]);return x.useMemo(()=>h?{reference:Pe,floating:Me,item:Re,trigger:Ce}:{},[h,Pe,Me,Ce,Re])}function Sj(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,s=n.useState("open"),{listRef:a,elementsRef:l,activeIndex:c,onMatch:p,onTypingChange:d,enabled:h=!0,resetMs:m=750,selectedIndex:g=null}=t,y=ci(),k=x.useRef(""),w=x.useRef(g??c??-1),_=x.useRef(null);He(()=>{!s&&g!==null||(y.clear(),_.current=null,k.current!==""&&(k.current=""))},[s,g,y]),He(()=>{s&&k.current===""&&(w.current=g??c??-1)},[s,g,c]);const E=Ve(N=>{N?r.current.typing||(r.current.typing=N,d?.(N)):r.current.typing&&(r.current.typing=N,d?.(N))}),R=Ve(N=>{function I(j){const F=l?.current[j];return!F||yh(F)}function H(j,F,U=0){if(j.length===0)return-1;const P=(U%j.length+j.length)%j.length,W=F.toLocaleLowerCase();for(let D=0;D<j.length;D+=1){const B=(P+D)%j.length;if(!(!j[B]?.toLocaleLowerCase().startsWith(W)||!I(B)))return B}return-1}const $=a.current;if(k.current.length>0&&N.key===" "&&(Wr(N),E(!0)),k.current.length>0&&k.current[0]!==" "&&H($,k.current)===-1&&N.key!==" "&&E(!1),$==null||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;s&&N.key!==" "&&(Wr(N),E(!0));const L=k.current==="";L&&(w.current=g??c??-1),$.every(j=>j?j[0]?.toLocaleLowerCase()!==j[1]?.toLocaleLowerCase():!0)&&k.current===N.key&&(k.current="",w.current=_.current),k.current+=N.key,y.start(m,()=>{k.current="",w.current=_.current,E(!1)});const q=((L?g??c??-1:w.current)??0)+1,z=H($,k.current,q);z!==-1?(p?.(z),_.current=z):N.key!==" "&&(k.current="",E(!1))}),T=Ve(N=>{const I=N.relatedTarget,H=n.select("domReferenceElement"),$=n.select("floatingElement"),L=kt(H,I),K=kt($,I);L||K||(y.clear(),k.current="",w.current=_.current,E(!1))}),C=x.useMemo(()=>({onKeyDown:R,onBlur:T}),[R,T]),A=x.useMemo(()=>({onKeyDown:R,onBlur:T}),[R,T]);return x.useMemo(()=>h?{reference:C,floating:A}:{},[h,C,A])}const hE=.1,wj=hE*hE,rn=.5;function Ad(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Nd(e,t,n,r,s,a,l,c,p,d){let h=!1;return Ad(e,t,n,r,s,a)&&(h=!h),Ad(e,t,s,a,l,c)&&(h=!h),Ad(e,t,l,c,p,d)&&(h=!h),Ad(e,t,p,d,n,r)&&(h=!h),h}function Ej(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Od(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),p=Math.min(r,a),d=Math.max(r,a);return e>=l&&e<=c&&t>=p&&t<=d}function Tj(e={}){const{blockPointerEvents:t=!1}=e,n=new Ei,r=({x:s,y:a,placement:l,elements:c,onClose:p,nodeId:d,tree:h})=>{const m=l?.split("-")[0];let g=!1,y=null,k=null,w=typeof performance<"u"?performance.now():0;function _(R,T){const C=performance.now(),A=C-w;if(y===null||k===null||A===0)return y=R,k=T,w=C,!1;const N=R-y,I=T-k,H=N*N+I*I,$=A*A*wj;return y=R,k=T,w=C,H<$}function E(){n.clear(),p()}return function(T){n.clear();const C=c.domReference,A=c.floating;if(!C||!A||m==null||s==null||a==null)return;const{clientX:N,clientY:I}=T,H=gr(T),$=T.type==="mouseleave",L=kt(A,H),K=kt(C,H);if(L&&(g=!0,!$))return;if(K&&(g=!1,!$)){g=!0;return}if($&&yt(T.relatedTarget)&&kt(A,T.relatedTarget))return;function Z(){return!!(h&&$i(h.nodesRef.current,d).length>0)}function q(){Z()||E()}if(Z())return;const z=C.getBoundingClientRect(),j=A.getBoundingClientRect(),F=s>j.right-j.width/2,U=a>j.bottom-j.height/2,P=j.width>z.width,W=j.height>z.height,D=(P?z:j).left,B=(P?z:j).right,G=(W?z:j).top,O=(W?z:j).bottom;if(m==="top"&&a>=z.bottom-1||m==="bottom"&&a<=z.top+1||m==="left"&&s>=z.right-1||m==="right"&&s<=z.left+1){q();return}let ie=!1;switch(m){case"top":ie=Od(N,I,D,z.top+1,B,j.bottom-1);break;case"bottom":ie=Od(N,I,D,j.top+1,B,z.bottom-1);break;case"left":ie=Od(N,I,j.right-1,O,z.left+1,G);break;case"right":ie=Od(N,I,z.right-1,O,j.left+1,G);break}if(ie)return;if(g&&!Ej(N,I,z)){q();return}if(!$&&_(N,I)){q();return}let te=!1;switch(m){case"top":{const ne=P?rn/2:rn*4,le=P||F?s+ne:s-ne,pe=P?s-ne:F?s+ne:s-ne,ye=a+rn+1,Se=F||P?j.bottom-rn:j.top,ze=F?P?j.bottom-rn:j.top:j.bottom-rn;te=Nd(N,I,le,ye,pe,ye,j.left,Se,j.right,ze);break}case"bottom":{const ne=P?rn/2:rn*4,le=P||F?s+ne:s-ne,pe=P?s-ne:F?s+ne:s-ne,ye=a-rn,Se=F||P?j.top+rn:j.bottom,ze=F?P?j.top+rn:j.bottom:j.top+rn;te=Nd(N,I,le,ye,pe,ye,j.left,Se,j.right,ze);break}case"left":{const ne=W?rn/2:rn*4,le=W||U?a+ne:a-ne,pe=W?a-ne:U?a+ne:a-ne,ye=s+rn+1,Se=U||W?j.right-rn:j.left,ze=U?W?j.right-rn:j.left:j.right-rn;te=Nd(N,I,Se,j.top,ze,j.bottom,ye,le,ye,pe);break}case"right":{const ne=W?rn/2:rn*4,le=W||U?a+ne:a-ne,pe=W?a-ne:U?a+ne:a-ne,ye=s-rn,Se=U||W?j.left+rn:j.right,ze=U?W?j.left+rn:j.right:j.left+rn;te=Nd(N,I,ye,le,ye,pe,Se,j.top,ze,j.bottom);break}}te?g||n.start(40,q):q()}};return r.__options={...e,blockPointerEvents:t},r}const ol="ArrowUp",qo="ArrowDown",dc="ArrowLeft",al="ArrowRight",Bc="Home",Fc="End",nC=new Set([dc,al]),_j=new Set([dc,al,Bc,Fc]),rC=new Set([ol,qo]),Rj=new Set([ol,qo,Bc,Fc]),iC=new Set([...nC,...rC]),Cj=new Set([...iC,Bc,Fc]),Aj=new Set([ol,qo,dc,al,Bc,Fc]),Nj="Shift",Oj="Control",Mj="Alt",Ij="Meta",Dj=new Set([Nj,Oj,Mj,Ij]);function zj(e){return It(e)&&e.tagName==="INPUT"}function mE(e){return!!(zj(e)&&e.selectionStart!=null||It(e)&&e.tagName==="TEXTAREA")}function gE(e,t,n,r){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,a=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const p=bE(e,t,"left"),d=Md(e),h=Md(t);n==="ltr"&&(p+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?s=p+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:p-h.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(s=p-h.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(p-h.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?s=p-h.scrollMarginLeft-d.scrollPaddingLeft:p+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(s=p+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const p=bE(e,t,"top"),d=Md(e),h=Md(t);p-h.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?a=p-h.scrollMarginTop-d.scrollPaddingTop:p+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(a=p+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function bE(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[r],t.offsetParent!==e);)t=t.offsetParent;return s}function Md(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function Lj(e){return yv(19)?e:e?"true":void 0}const jj=x.forwardRef(function(t,n){const{cutout:r,...s}=t;let a;if(r){const l=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${l.left}px ${l.top}px,${l.left}px ${l.bottom}px,${l.right}px ${l.bottom}px,${l.right}px ${l.top}px,${l.left}px ${l.top}px)`}return v.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})});function sC(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}let yE={},vE={},xE="";function Pj(e){if(typeof document>"u")return!1;const t=Ft(e);return yn(t).innerWidth-t.documentElement.clientWidth>0}function $j(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Ft(e),r=n.documentElement,s=n.body,a=ho(r)?r:s,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const p=a.offsetWidth;a.style.overflowY="hidden";const d=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,p===d}function Bj(e){const t=Ft(e),n=t.documentElement,r=t.body,s=ho(n)?n:r,a={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,a)}}function Fj(e){const t=Ft(e),n=t.documentElement,r=t.body,s=yn(n);let a=0,l=0,c=!1;const p=Cn.create();if(Tv&&(s.visualViewport?.scale??1)!==1)return()=>{};function d(){const y=s.getComputedStyle(n),k=s.getComputedStyle(r),E=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,yE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},xE=n.style.scrollBehavior,vE={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};const R=n.scrollHeight>n.clientHeight,T=n.scrollWidth>n.clientWidth,C=y.overflowY==="scroll"||k.overflowY==="scroll",A=y.overflowX==="scroll"||k.overflowX==="scroll",N=Math.max(0,s.innerWidth-r.clientWidth),I=Math.max(0,s.innerHeight-r.clientHeight),H=parseFloat(k.marginTop)+parseFloat(k.marginBottom),$=parseFloat(k.marginLeft)+parseFloat(k.marginRight),L=ho(n)?n:r;if(c=$j(e),c){n.style.scrollbarGutter=E,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(R||C)&&(n.style.overflowY="scroll"),(T||A)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:H||I?`calc(100dvh - ${H+I}px)`:"100dvh",width:$||N?`calc(100vw - ${$+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,yE),Object.assign(r.style,vE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=xE)}function m(){h(),p.request(d)}d();const g=Nt(s,"resize",m);return()=>{p.cancel(),h(),typeof s.removeEventListener=="function"&&g()}}class Uj{lockCount=0;restore=null;timeoutLock=Ei.create();timeoutUnlock=Ei.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Ft(t).documentElement,s=yn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=ar;return}const a=sR||!Pj(t);this.restore=a?Bj(t):Fj(t)}}const qj=new Uj;function Hj(e=!0,t=null){He(()=>{if(e)return qj.acquire(t)},[e,t])}function Gj(e){const t=x.useRef(""),n=x.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:x.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:n}}function oC(e,t){const n=x.useRef(e),r=Ve(t);He(()=>{n.current!==e&&r(n.current)},[e,r]),He(()=>{n.current=e},[e])}function Vj(e){const[t,n]=x.useState(null),r=Ve((l,c)=>{e||n(c||(sR?"touch":""))});oC(e,l=>{l&&!e&&n(null)});const{onClick:s,onPointerDown:a}=Gj(r);return x.useMemo(()=>({openMethod:t,triggerProps:{onClick:s,onPointerDown:a}}),[t,s,a])}const Kj={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-bower":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""},Zj={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-bower":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""};function Wj(e,t="outline"){return t==="filled"?Zj[e]:Kj[e]}const Yj=new Set(["ui-progress-spin","cursor-icon-spin"]);function Xj(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&Yj.has(t.animationName)&&(t.startTime=0)}const Ry=x.createContext(void 0);function Ts({iconSize:e,iconButtonSize:t,iconButtonSubtleHover:n,buttonSize:r,buttonVariant:s,menuSize:a,disabled:l,children:c}){const p=x.useContext(Ry),d=x.useMemo(()=>({iconSize:e??p?.iconSize,iconButtonSize:t??p?.iconButtonSize,iconButtonSubtleHover:n??p?.iconButtonSubtleHover,buttonSize:r??p?.buttonSize,buttonVariant:s??p?.buttonVariant,menuSize:a??p?.menuSize,disabled:l??p?.disabled}),[r,s,l,t,n,e,a,p]);return v.jsx(Ry.Provider,{value:d,children:c})}function Nl(){return x.useContext(Ry)}const Qj="sm",Kt={base:{kKX8nH:"ui-1j61x8r",k63SB2:"ui-etm3q0",kGuDYH:"ui-1tachi3",kMv6JI:"ui-1qt6sjn",kLWn49:"ui-o5v014",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kMwMTN:"ui-1heor9g",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kXLuUW:"ui-xymvpz",kMnn75:"ui-krqix3",kJwUce:"ui-1403hyl",k9WMMc:"ui-2b8uid",kP9fke:"ui-6mezaz",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kfSwDN:"ui-87ps6o",kO7zv1:"ui-1winvzj","--icon-size":"ui-1u4itkb","--icon-weight":"ui-1q5xvfy",kgeoSG:"ui-1yj7g93",$$css:!0},noPresetSize:{$$css:!0},sizeXs:{"--icon-size":"ui-aiyo0p",$$css:!0},sizeSm:{"--icon-size":"ui-1u4itkb",$$css:!0},sizeBase:{"--icon-size":"ui-xfpx3u",$$css:!0},sizeLg:{"--icon-size":"ui-1qxde8p",$$css:!0},sizeXl:{"--icon-size":"ui-dyy2ci",$$css:!0},size2xl:{"--icon-size":"ui-7lg4th",$$css:!0},noColor:{$$css:!0},colorPrimary:{kMwMTN:"ui-1nqczng",$$css:!0},colorSecondary:{kMwMTN:"ui-1mh7f6w",$$css:!0},colorTertiary:{kMwMTN:"ui-1lbmi28",$$css:!0},colorQuaternary:{kMwMTN:"ui-1qh17o",$$css:!0},colorGitAdded:{kMwMTN:"ui-15wwr8d",$$css:!0},colorGitModified:{kMwMTN:"ui-eedwss",$$css:!0},colorGitRemoved:{kMwMTN:"ui-fowoju",$$css:!0},colorGitUntracked:{kMwMTN:"ui-1p7vtww",$$css:!0},colorCyan:{kMwMTN:"ui-1rbygr4",$$css:!0},colorBlue:{kMwMTN:"ui-101qeuz",$$css:!0},colorRed:{kMwMTN:"ui-ku4wcm",$$css:!0},colorGreen:{kMwMTN:"ui-p6nzhx",$$css:!0},colorYellow:{kMwMTN:"ui-1hn9r2r",$$css:!0},colorMagenta:{kMwMTN:"ui-pwp9en",$$css:!0},colorOrange:{kMwMTN:"ui-4qtrdv",$$css:!0},colorPurple:{kMwMTN:"ui-1b0hn6l",$$css:!0},colorAccent:{kMwMTN:"ui-scuw3h",$$css:!0},colorBrand:{kMwMTN:"ui-v3vxec",$$css:!0},noModifier:{$$css:!0},modifierSpin:{kKVMdj:"ui-138fvbv",k44tkh:"ui-lmf4m6",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0},modifierDisabled:{kSiTet:"ui-ti2d7y",$$css:!0},modifierHidden:{k33iCy:"ui-lshs6z",$$css:!0},capTrim:{kQypYc:"ui-14ymb62",$$css:!0}};function Jj(e,t,n){return[Kt.base,eP(e),tP(t),nP(n)]}function eP(e){if(typeof e=="number")return Kt.noPresetSize;switch(e){case"xs":return Kt.sizeXs;case"sm":return Kt.sizeSm;case"base":return Kt.sizeBase;case"lg":return Kt.sizeLg;case"xl":return Kt.sizeXl;case"2xl":return Kt.size2xl}}function tP(e){switch(e){case"primary":return Kt.colorPrimary;case"secondary":return Kt.colorSecondary;case"tertiary":return Kt.colorTertiary;case"quaternary":return Kt.colorQuaternary;case"git-added":return Kt.colorGitAdded;case"git-modified":return Kt.colorGitModified;case"git-removed":return Kt.colorGitRemoved;case"git-untracked":return Kt.colorGitUntracked;case"cyan":return Kt.colorCyan;case"blue":return Kt.colorBlue;case"red":return Kt.colorRed;case"green":return Kt.colorGreen;case"yellow":return Kt.colorYellow;case"magenta":return Kt.colorMagenta;case"orange":return Kt.colorOrange;case"purple":return Kt.colorPurple;case"accent":return Kt.colorAccent;case"brand":return Kt.colorBrand;case void 0:return Kt.noColor}}function nP(e){switch(e){case"spin":return Kt.modifierSpin;case"disabled":return Kt.modifierDisabled;case"hidden":return Kt.modifierHidden;case void 0:return Kt.noModifier}}function Nn({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,style:p,title:d,"aria-label":h,"aria-hidden":m,ref:g}){const y=Nl(),k=x.useCallback(C=>{typeof g=="function"?g(C):g&&(g.current=C),C&&t==="spin"&&n&&Xj(C)},[g,t,n]),w=s??y?.iconSize??Qj,_=typeof w=="number",E=Wj(e,r),R={...E?{"--cursor-icon-content":`"${E}"`}:{},..._?{"--icon-size":`${w}px`}:{},...p},T=wn({rootClass:"ui-icon",stylexStyles:[Jj(w,a,t),l&&Kt.capTrim],className:Sn("cursor-icon",c),style:R});return v.jsx("i",{ref:k,className:T.className,"data-icon-name":e,"data-size":_?void 0:w,"data-color":a,style:T.style,title:d??h,"aria-hidden":m??(h?void 0:!0)})}const rP=x.createContext({root:null});function Ol(){return x.useContext(rP).root}const iP={dropdown:"--ui-portal-layer-z-index-dropdown",tooltip:"--ui-portal-layer-z-index-tooltip",modal:"--ui-portal-layer-z-index-modal",popover:"--ui-portal-layer-z-index-popover"},sP={},oP=3e3,aP=10;let kE=oP;function lP(){const e=kE;return kE+=aP,{zIndex:e,release:()=>{}}}const uP=x.createContext(null);function cP(){return x.useContext(uP)}function Uc(e,t){const n=cP(),[r,s]=x.useState(null);x.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??lP();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=x.useMemo(()=>r===null?sP:{[iP[e]]:String(r)},[r,e]);return x.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const aC=x.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:p,...d}=t,{getButtonProps:h,buttonRef:m}=Lc({disabled:a,focusableWhenDisabled:l,native:c});return vn("button",t,{state:{disabled:a},ref:[n,m],props:[d,h]})}),Xu={appearance:{kWkggS:"ui-elcf9h ui-g74ub2 ui-rtw4ju ui-sb1tfo",kMwMTN:"ui-gl2jp8 ui-qfdz8i",ku685b:"ui-1ccstgr",k1ekBW:"ui-fvdr79",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},press:{k3aq6I:"ui-3oybdh ui-e60hhf ui-uupxpy",k3nNDw:"ui-1g0ag68",k6sLGO:"ui-1dwv3re ui-1m8dlog",$$css:!0},colors:{"--ui-button-bg":"ui-111vzy2 ui-t5wej4 ui-1sjyo5b ui-qonjy5 ui-10044h7 ui-1drs4uv ui-13jyg4j ui-1j69ez6 ui-302ab4 ui-g2i9b0 ui-r4lqou ui-pao5x2 ui-1ro2ofv ui-30b146","--ui-button-bg-hover":"ui-10ckxxq ui-oscw6f ui-8d82ot ui-mos3b0 ui-1t8wa0f ui-lqo1w6 ui-2wqsua ui-qk0cz2 ui-1kvkcw9 ui-1m41tzx ui-1mteyat ui-jlo7vo ui-177gn09 ui-16088v2","--ui-button-fg":"ui-18rr0f6 ui-1o44y6p ui-i60mju ui-ikqzok ui-rwu1v7 ui-1vzhgcd ui-6tdgcd ui-11yajtv ui-1q0um21 ui-ad8cx6","--ui-button-fg-hover":"ui-nas032 ui-kadu3d ui-11ldjh5 ui-13zxv71 ui-qrgd1v ui-1b2v7cv ui-woi75s ui-1f4h542 ui-1t883ao ui-1hodyhg",$$css:!0}},fP={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},fo={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},xs={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},lC={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},dP={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},pP={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},hP={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Ml={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Fv={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},Du={root:{kB7OPa:"ui-9f619",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",k63SB2:"ui-20ajya",khDVqt:"ui-uxw1ft",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-9r1u3d ui-e9wtb7","--ui-button-bg":"ui-1gwrc9l ui-y7d307 ui-1luhpj5 ui-14iu9ww","--ui-button-bg-hover":"ui-s16ggv ui-nywj2b ui-hqa6pe ui-e032zu","--ui-button-fg":"ui-1j06k8m ui-qalphj ui-qcpbnv ui-ub8mre ui-alrmhx","--ui-button-fg-hover":"ui-1zbqel ui-1w2jsj1 ui-dwlvx9 ui-1389b1p ui-13ie2ji","--ui-md-state-color":"ui-1w18epr",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kfSwDN:"ui-87ps6o",kFalU9:"ui-ggy1nq",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",kSiTet:"ui-1hc1fzr ui-1szrgyu",kfzvcC:"ui-67bb7w ui-7gqb9v",k9WMMc:"ui-2b8uid",$$css:!0},alignLeft:{kjj79g:"ui-1nhvcw1",$$css:!0},revealRowActive:{k1xSpc:"ui-1s85apg ui-i8sxwt ui-14aajud",kmuXW:"ui-2lah0s",$$css:!0},frameContent:{kE3dHu:"ui-1uhho1l",kpe85a:"ui-1xpa7k",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},mP={xs:{kZKoxP:"ui-1vatr1o",kLKAdn:"ui-exx8yu",kpe85a:"ui-g31tg3",kGO01o:"ui-18d9i69",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",kOIVth:"ui-xhr3t",$$css:!0},sm:{kZKoxP:"ui-1a6rlst",kLKAdn:"ui-exx8yu",kpe85a:"ui-g31tg3",kGO01o:"ui-18d9i69",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kZKoxP:"ui-1e94bgo",kLKAdn:"ui-exx8yu",kpe85a:"ui-17v7654",kGO01o:"ui-18d9i69",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",kOIVth:"ui-11twubx",$$css:!0},lg:{kZKoxP:"ui-170hpbr",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",kOIVth:"ui-pkkfsy",$$css:!0},xl:{kZKoxP:"ui-t8t6p",kLKAdn:"ui-exx8yu",kpe85a:"ui-16b7oty",kGO01o:"ui-18d9i69",kE3dHu:"ui-o7x2bt",kaIpWk:"ui-1043rbw",$$css:!0}},gP={xs:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0},sm:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0},md:{kLKAdn:"ui-exx8yu",kpe85a:"ui-16b7oty",kGO01o:"ui-18d9i69",kE3dHu:"ui-o7x2bt",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1jkygx",kGO01o:"ui-18d9i69",kE3dHu:"ui-1o7kk3e",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yraood",kGO01o:"ui-18d9i69",kE3dHu:"ui-1jpuwqu",$$css:!0}},SE={labelGroup:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},kbs:{kMv6JI:"ui-y1aii3",k63SB2:"ui-20ajya",kSiTet:"ui-byyjgo ui-s6mkfk",$$css:!0}},xi={root:Du.root,fontSmoothing:Fv.root,align:{center:null,left:Du.alignLeft},reveal:{always:null,rowActive:Du.revealRowActive},frame:{container:null,content:Du.frameContent},shape:{rounded:null,pill:Du.shapePill},size:mP,pillSize:gP,typography:{xs:fo.root,sm:xs.root,md:xs.root,lg:xs.root,xl:lC.root},labelGroup:SE.labelGroup,kbs:[fo.root,SE.kbs]},bP="md",yP="primary",vP="neutral",xP={xs:"sm",sm:"base",md:"sm",lg:"sm",xl:"lg"},kP={primary:yP,secondary:vP,text:"default"};function zn({variant:e,color:t,size:n,shape:r="rounded",frame:s="container",reveal:a="always",align:l,disabled:c,children:p,kbs:d,className:h,style:m,rootStyle:g,...y}){const k=Nl(),w=e??k?.buttonVariant??"tint",_=n??k?.buttonSize??bP,E=c??k?.disabled,R=t??kP[w],T=An(xi.root,xi.fontSmoothing,Xu.appearance,(w==="primary"||w==="secondary")&&Xu.colors,xi.size[_],xi.typography[_],xi.align[l??"center"],xi.reveal[a],xi.shape[r],r==="pill"&&xi.pillSize[_],xi.frame[s],g,{"ui--default-marker":"ui--default-marker",$$css:!0});let C=p;if(d!=null){const A=An(xi.labelGroup),N=An(xi.kbs);C=v.jsxs("span",{className:Sn("ui-button__label-group",A.className),style:A.style,children:[p,v.jsx("span",{className:Sn("ui-button__kbs",N.className),style:N.style,children:d})]})}return v.jsx(aC,{...y,className:Sn("ui-button",T.className,h),style:{...T.style,...m},"data-variant":w,"data-size":_,"data-shape":r!=="rounded"?r:void 0,"data-frame":s!=="container"?s:void 0,"data-color":R,"data-align":l==="left"?l:void 0,"data-reveal":a!=="always"?a:void 0,disabled:E,children:v.jsx(Ts,{iconSize:xP[_],children:C})})}function qc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function pc({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=x.useRef(e!==void 0),[a,l]=x.useState(t),c=s?e:a,p=x.useCallback(d=>{s||l(d)},[]);return[c,p]}let wE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",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})({}),EE=(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})({});const SP={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Vu={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},wP={disabled:!1,...Vu},Hc={valid(e){return e===null?null:e?{[EE.valid]:""}:{[EE.invalid]:""}}};function EP(e){return x.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[wE.checked]:""}:{[wE.unchecked]:""}},...Hc}),[e.indeterminate])}const TP=x.createContext({invalid:void 0,name:void 0,validityData:{state:SP,errors:[],error:"",value:"",initialValue:null},setValidityData:ar,disabled:void 0,touched:Vu.touched,setTouched:ar,dirty:Vu.dirty,setDirty:ar,filled:Vu.filled,setFilled:ar,focused:Vu.focused,setFocused:ar,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:wP,markedDirtyRef:{current:!1},registerFieldControl:ar,validation:{getValidationProps:(e=hr)=>e,getInputValidationProps:(e=hr)=>e,inputRef:{current:null},commit:async()=>{}}});function Gc(e=!0){const t=x.useContext(TP);if(t.setValidityData===ar&&!e)throw new Error(Xn(28));return t}function uC(e,t){const{enabled:n=!0,getValue:r,id:s,value:a}=t,{registerFieldControl:l}=Gc(),c=x.useRef(null);c.current||(c.current=Symbol()),He(()=>{const p=c.current;if(!(!p||!n))return l(p,{controlRef:e,getValue:r,id:s,value:a}),()=>{l(p,void 0)}},[e,n,r,s,l,a])}const _P=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ar,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function RP(){return x.useContext(_P)}const CP=x.createContext({controlId:void 0,registerControlId:ar,labelId:void 0,setLabelId:ar,messageIds:[],setMessageIds:ar,getDescriptionProps:e=>e});function Uv(){return x.useContext(CP)}const AP=x.createContext(void 0);function NP(){const e=x.useContext(AP);if(e===void 0)throw new Error(Xn(14));return e}const OP=x.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,p=NP(),d=p.checked||p.indeterminate,{mounted:h,transitionStatus:m,setMounted:g}=$c(d),y=x.useRef(null),k={...p,transitionStatus:m};sa({open:d,ref:y,onComplete(){d||g(!1)}});const w=EP(p),_=x.useMemo(()=>({...w,...ia,...Hc}),[w]),E=l||h,R=vn("span",t,{ref:[n,y],state:k,stateAttributesMapping:_,props:c});return E?R:null}),MP="md",TE={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kMeerF:"ui-1k57tk5 ui-1gv1zob",k3XXqK:"ui-1t137rt ui-1rsevuf",kjBf7l:"ui-1uczgqu ui-14qs42y",kInvED:"ui-1wfwxd8 ui-1i57s2w",kSiTet:"ui-1hc1fzr ui-1goyyu5",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kaIpWk:"ui-12oqio5",kMwMTN:"ui-1lriclw",kWkggS:"ui-i07v4r ui-190xqy7",kVAM5u:"ui-1tjqsyf ui-14ytyh1",k3aq6I:"ui-3oybdh ui-78fr0e",k3nNDw:"ui-1g0ag68",k1ekBW:"ui-1lxufdw",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-2s4hoy",kZKoxP:"ui-px1j5t",$$css:!0},md:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},lg:{kzqmXN:"ui-1xx3ewh",kZKoxP:"ui-14dyci",$$css:!0}},IP={primary:{"--ui-checkbox-bg":"ui-x0sf4j","--ui-checkbox-border":"ui-14p436a","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},green:{"--ui-checkbox-bg":"ui-1g72fie","--ui-checkbox-border":"ui-165ap9x","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},neutral:{"--ui-checkbox-bg":"ui-1rpsy8r","--ui-checkbox-border":"ui-mtpsoh","--ui-checkbox-glyph":"ui-qnctk6",$$css:!0}},DP={sm:9,md:10,lg:11},_E={"--icon-weight":"700"};function zP({indeterminate:e,interactive:t,size:n,variant:r}){const s=An(TE.root,TE[n],IP[r]),a={className:"ui-10l6tqk ui-10a8y8t ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-n9if97 ui-7pq1vu ui-sagj69 ui-6ekqhr ui-g01cxk ui-hhdk15 ui-nyzrob ui-h98lc ui-1nrvvgt ui-cntms"},l=DP[n];return v.jsx("span",{"aria-hidden":"true",className:Sn("ui-checkbox__box",s.className),style:s.style,children:t?v.jsx(OP,{className:Sn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,p)=>v.jsx("span",{...c,children:v.jsx(Nn,{name:p.indeterminate?"minus":"check",size:l,style:_E})}),style:a.style}):v.jsx("span",{className:Sn("ui-checkbox__icon",a.className),style:a.style,children:v.jsx(Nn,{name:e?"minus":"check",size:l,style:_E})})})}function cC({checked:e,disabled:t,indeterminate:n=!1,size:r=MP,variant:s="primary"}){const a={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker"};return v.jsx("span",{"aria-hidden":"true",className:Sn("ui-checkbox",a.className),style:a.style,"data-component":"checkbox","data-size":r,"data-variant":s,"data-checked":e||void 0,"data-disabled":t||void 0,"data-indeterminate":n||void 0,children:v.jsx(zP,{indeterminate:n,interactive:!1,size:r,variant:s})})}function LP(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,a=t!==void 0,[l,c]=pc({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:p,setMounted:d,transitionStatus:h}=$c(l,!0,!0),[m,g]=x.useState(l),[{height:y,width:k},w]=x.useState({height:void 0,width:void 0}),_=mh(),[E,R]=x.useState(),T=E??_,[C,A]=x.useState(!1),[N,I]=x.useState(!1),H=x.useRef(null),$=x.useRef(null),L=x.useRef(null),K=x.useRef(null),Z=XR(K,!1),q=Ve(z=>{const j=!l,F=_t(ml,z.nativeEvent);if(r(j,F),F.isCanceled)return;const U=K.current;$.current==="css-animation"&&U!=null&&U.style.removeProperty("animation-name"),!C&&!N&&($.current!=null&&$.current!=="css-animation"&&!p&&j&&d(!0),$.current==="css-animation"&&(!m&&j&&g(!0),!p&&j&&d(!0))),c(j),$.current==="none"&&p&&!j&&d(!1)});return He(()=>{a&&$.current==="none"&&!l&&d(!1)},[a,l,t,d]),x.useMemo(()=>({abortControllerRef:H,animationTypeRef:$,disabled:s,handleTrigger:q,height:y,mounted:p,open:l,panelId:T,panelRef:K,runOnceAnimationsFinish:Z,setDimensions:w,setHiddenUntilFound:A,setKeepMounted:I,setMounted:d,setOpen:c,setPanelIdState:R,setVisible:g,transitionDimensionRef:L,transitionStatus:h,visible:m,width:k}),[H,$,s,q,y,p,l,T,K,Z,w,A,I,d,c,g,L,h,m,k])}const fC=x.createContext(void 0);function dC(){const e=x.useContext(fC);if(e===void 0)throw new Error(Xn(15));return e}let Qu=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Wo.startingStyle]="startingStyle",e[e.endingStyle=Wo.endingStyle]="endingStyle",e})({}),jP=(function(e){return e.panelOpen="data-panel-open",e})({});const PP={[Qu.open]:""},$P={[Qu.closed]:""},BP={open(e){return e?{[jP.panelOpen]:""}:null}},FP={open(e){return e?PP:$P}},pC={...FP,...ia},UP=x.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:p,style:d,...h}=t,m=Ve(c),g=LP({open:p,defaultOpen:a,onOpenChange:m,disabled:l}),y=x.useMemo(()=>({open:g.open,disabled:g.disabled,transitionStatus:g.transitionStatus}),[g.open,g.disabled,g.transitionStatus]),k=x.useMemo(()=>({...g,onOpenChange:m,state:y}),[g,m,y]),w=vn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:pC});return v.jsx(fC.Provider,{value:k,children:w})}),qP={...BP,...ia},RE=x.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=dC(),{className:p,disabled:d=c,id:h,render:m,nativeButton:g=!0,style:y,...k}=t,{getButtonProps:w,buttonRef:_}=Lc({disabled:d,focusableWhenDisabled:!0,native:g}),E=x.useMemo(()=>({"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a}),[r,s,a]);return vn("button",t,{state:l,ref:[n,_],props:[E,k,w],stateAttributesMapping:qP})});let HP=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function GP(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:s,hiddenUntilFound:a,keepMounted:l,id:c,mounted:p,onOpenChange:d,open:h,panelRef:m,runOnceAnimationsFinish:g,setDimensions:y,setMounted:k,setOpen:w,setVisible:_,transitionDimensionRef:E,visible:R,width:T}=e,C=x.useRef(!1),A=x.useRef(null),N=x.useRef(h),I=x.useRef(h),H=jc(),$=x.useMemo(()=>n.current==="css-animation"?!R:!h&&!p,[h,p,R,n]),L=Ve(Z=>{if(!Z)return;if(n.current==null||E.current==null){const j=getComputedStyle(Z),F=j.animationName!=="none"&&j.animationName!=="",U=j.transitionDuration!=="0s"&&j.transitionDuration!=="";F&&U||(j.animationName==="none"&&j.transitionDuration!=="0s"?n.current="css-transition":j.animationName!=="none"&&j.transitionDuration==="0s"?n.current="css-animation":n.current="none"),Z.getAttribute(HP.orientation)==="horizontal"||j.transitionProperty.indexOf("width")>-1?E.current="width":E.current="height"}if(n.current!=="css-transition")return;(s===void 0||T===void 0)&&(y({height:Z.scrollHeight,width:Z.scrollWidth}),I.current&&Z.style.setProperty("transition-duration","0s"));let q=-1,z=-1;return q=Cn.request(()=>{I.current=!1,z=Cn.request(()=>{setTimeout(()=>{Z.style.removeProperty("transition-duration")})})}),()=>{Cn.cancel(q),Cn.cancel(z)}}),K=ks(r,m,L);return He(()=>{if(n.current!=="css-transition")return;const Z=m.current;if(!Z)return;let q=-1;if(t.current!=null&&(t.current.abort(),t.current=null),h){const z={"justify-content":Z.style.justifyContent,"align-items":Z.style.alignItems,"align-content":Z.style.alignContent,"justify-items":Z.style.justifyItems};Object.keys(z).forEach(j=>{Z.style.setProperty(j,"initial","important")}),!I.current&&!l&&Z.setAttribute(Qu.startingStyle,""),y({height:Z.scrollHeight,width:Z.scrollWidth}),q=Cn.request(()=>{Object.entries(z).forEach(([j,F])=>{F===""?Z.style.removeProperty(j):Z.style.setProperty(j,F)})})}else{if(Z.scrollHeight===0&&Z.scrollWidth===0)return;y({height:Z.scrollHeight,width:Z.scrollWidth});const z=new AbortController;t.current=z;const j=z.signal;let F=null;const U=Qu.endingStyle;return F=new MutationObserver(P=>{P.some(D=>D.type==="attributes"&&D.attributeName===U)&&(F?.disconnect(),F=null,g(()=>{y({height:0,width:0}),Z.style.removeProperty("content-visibility"),k(!1),t.current===z&&(t.current=null)},j))}),F.observe(Z,{attributes:!0,attributeFilter:[U]}),()=>{F?.disconnect(),H.cancel(),t.current===z&&(z.abort(),t.current=null)}}return()=>{Cn.cancel(q)}},[t,n,H,a,l,p,h,m,g,y,k]),He(()=>{if(n.current!=="css-animation")return;const Z=m.current;Z&&(A.current=Z.style.animationName||A.current,Z.style.setProperty("animation-name","none"),y({height:Z.scrollHeight,width:Z.scrollWidth}),!N.current&&!C.current&&Z.style.removeProperty("animation-name"),h?(t.current!=null&&(t.current.abort(),t.current=null),k(!0),_(!0)):(t.current=new AbortController,g(()=>{k(!1),_(!1),t.current=null},t.current.signal)))},[t,n,h,m,g,y,k,_,R]),gh(()=>{const Z=Cn.request(()=>{N.current=!1});return()=>Cn.cancel(Z)}),He(()=>{if(!a)return;const Z=m.current;if(!Z)return;let q=-1,z=-1;return h&&C.current&&(Z.style.transitionDuration="0s",y({height:Z.scrollHeight,width:Z.scrollWidth}),q=Cn.request(()=>{C.current=!1,z=Cn.request(()=>{setTimeout(()=>{Z.style.removeProperty("transition-duration")})})})),()=>{Cn.cancel(q),Cn.cancel(z)}},[a,h,m,y]),He(()=>{const Z=m.current;Z&&a&&$&&(Z.setAttribute("hidden","until-found"),n.current==="css-transition"&&Z.setAttribute(Qu.startingStyle,""))},[a,$,n,m]),x.useEffect(function(){const q=m.current;if(!q)return;function z(j){C.current=!0,w(!0),d(!0,_t(Ss,j))}return Nt(q,"beforematch",z)},[d,m,w]),x.useMemo(()=>({props:{hidden:$,id:c,ref:K}}),[$,c,K])}let CE=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const VP=x.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:p,...d}=t,{abortControllerRef:h,animationTypeRef:m,height:g,mounted:y,onOpenChange:k,open:w,panelId:_,panelRef:E,runOnceAnimationsFinish:R,setDimensions:T,setHiddenUntilFound:C,setKeepMounted:A,setMounted:N,setPanelIdState:I,setOpen:H,setVisible:$,state:L,transitionDimensionRef:K,visible:Z,width:q,transitionStatus:z}=dC(),j=s??!1,F=a??!1;He(()=>{if(c)return I(c),()=>{I(void 0)}},[c,I]),He(()=>{C(j)},[C,j]),He(()=>{A(F)},[A,F]);const{props:U}=GP({abortControllerRef:h,animationTypeRef:m,externalRef:n,height:g,hiddenUntilFound:j,id:_,keepMounted:F,mounted:y,onOpenChange:k,open:w,panelRef:E,runOnceAnimationsFinish:R,setDimensions:T,setMounted:N,setOpen:H,setVisible:$,transitionDimensionRef:K,visible:Z,width:q});sa({open:w&&z==="idle",ref:E,onComplete(){w&&T({height:void 0,width:void 0})}});const P=x.useMemo(()=>({...L,transitionStatus:z}),[L,z]),W=vn("div",t,{state:P,ref:[n,E],props:[U,{style:{[CE.collapsiblePanelHeight]:g===void 0?"auto":`${g}px`,[CE.collapsiblePanelWidth]:q===void 0?"auto":`${q}px`}},d],stateAttributesMapping:pC});return F||j||y?W:null}),AE={buttonReset:{kWkggS:"ui-jbqb8w",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",keoZOQ:"ui-dj266r",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k71WvV:"ui-14z9mp",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-1heor9g",k9WMMc:"ui-1yc453h",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-1bqaal",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0},detailsButton:{ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kkrTdU:"ui-1ypdohk",kMnn75:"ui-ujl8zx",k1TLXF:"ui-r5o5jz ui-9ojkr9 ui-1e7jyuc",k1ekBW:"ui-eirdtl",kIyJzY:"ui-7pq1vu ui-6xbvzw ui-1nk6rg0",kAMwcw:"ui-1bt1wk1",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0}};function KP({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:p,tone:d}){const h={0:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},4:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy"},2:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},6:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-ss6m8b"},1:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},5:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},3:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},7:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"}}[(d==="muted"||d==="tertiary")<<2|!!p<<1|!!a<<0],m={0:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},4:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw"},2:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},6:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b"},1:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},5:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},3:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},7:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"}}[(d==="muted")<<2|!!p<<1|!!(a&&l)<<0],g={className:"ui-2lah0s ui-1kde42o ui-4b2ntj ui-7zots3 ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},y={className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-14ju556"};return v.jsxs(v.Fragment,{children:[s!=null&&v.jsx("span",{className:Sn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),v.jsx("span",{className:Sn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&v.jsx("span",{ref:r,className:Sn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&v.jsx(Nn,{ref:t,name:"chevron-right",className:Sn("ui-collapsible-chevron",g.className),style:g.style,size:10})]})}function Ti({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,leadingIcon:s,disabled:a=!1,expandable:l=!0,loading:c=!1,shimmerDetails:p=!0,tabularNums:d=!1,tone:h="default",children:m,headerRef:g,detailsRef:y,chevronRef:k,className:w,contentClassName:_,open:E,defaultOpen:R,onOpenChange:T,...C}){const A=n!==void 0,N=l&&A,I=E!==void 0,[H,$]=x.useState(()=>R??!1),L=I?!!E:H,K=(O,ie)=>{I||$(O),T?.(O,ie)},Z=A?v.jsx("button",{type:"button",...An(AE.buttonReset,AE.detailsButton,r),disabled:a,onClick:O=>{O.stopPropagation(),n(O)},children:t}):t,q=l&&m!=null&&typeof m!="boolean",z={className:"ui-78zum5 ui-dt5ytf"},j={0:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui--default-marker"},4:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui--default-marker"},2:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1ypdohk ui--default-marker"},6:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui--default-marker"},1:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-byyjgo ui--default-marker"},5:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-byyjgo ui--default-marker"},3:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1ypdohk ui-byyjgo ui--default-marker"},7:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-byyjgo ui--default-marker"}}[!!(l&&!A)<<2|!!(l&&!a)<<1|!!a<<0],F={0:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"},1:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"}}[!a<<0],U={className:"ui-2lah0s ui-1kde42o ui-4b2ntj ui-7zots3 ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1 ui-1hc1fzr"},P={className:"ui-rvj5dj ui-1kd3hbs ui-1tu4anv ui-18ke684 ui-xohm7r ui-pv8u57 ui-1qn9uv2 ui-4wkmsb ui-g3p6pi ui-1ys8gui"},W={className:"ui-6ikm8r ui-10wlt62 ui-2lwn1j"},D={className:"ui-78zum5 ui-dt5ytf ui-1y48gol ui-1vdilah ui-1hc1fzr ui-19991ni ui-4wkmsb ui-g3p6pi ui-1bt1wk1"},B={"data-component":"collapsible-header",className:Sn("ui-collapsible-header",j.className),style:j.style},G=v.jsx(KP,{action:e,chevronRef:k,details:Z,detailsRef:y,leadingIcon:s,loading:c,shimmerDetails:p,showChevron:l&&!A,tabularNums:d,tone:h});return v.jsxs(UP,{...C,open:N?L:E,defaultOpen:N?void 0:R,onOpenChange:N?K:T,disabled:a,"data-expandable":l?"":void 0,"data-loading":c?"":void 0,className:Sn("ui-collapsible",z.className,w),style:z.style,children:[N?v.jsxs("div",{...B,ref:g,onClick:()=>{a||K(!L)},children:[G,v.jsx(RE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:F.className,style:F.style,...q?null:{"aria-controls":void 0},onClick:O=>{a||O.stopPropagation()},children:v.jsx(Nn,{ref:k,name:"chevron-right",className:Sn("ui-collapsible-chevron",U.className),style:U.style,size:10})})]}):l?v.jsx(RE,{...B,ref:g,...q?null:{"aria-controls":void 0},onClick:O=>{a||O.stopPropagation()},children:G}):v.jsx("div",{...B,ref:g,children:G}),q&&v.jsx(VP,{keepMounted:!0,className:Sn("ui-collapsible-content-view",P.className),style:P.style,children:v.jsx("div",{className:W.className,style:W.style,children:v.jsx("div",{className:Sn("ui-collapsible-content",D.className,_),style:D.style,children:m})})})]})}function ZP(e){return vn(e.defaultTagName??"div",e,e)}var WP=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Dp=WP.join(","),hC=typeof Element>"u",vl=hC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zp=!hC&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Lp=function(t,n){var r;n===void 0&&(n=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=s===""||s==="true",l=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Lp(t.parentNode));return l},YP=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},mC=function(t,n,r){if(Lp(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Dp));return n&&vl.call(t,Dp)&&s.unshift(t),s=s.filter(r),s},jp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!Lp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),p=c.length?c:l.children,d=jp(p,!0,r);r.flatten?s.push.apply(s,d):s.push({scopeParent:l,candidates:d})}else{var h=vl.call(l,Dp);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),g=!Lp(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&g){var y=jp(m===!0?l.children:m.children,!0,r);r.flatten?s.push.apply(s,y):s.push({scopeParent:l,candidates:y})}else a.unshift.apply(a,l.children)}}return s},gC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||YP(t))&&!gC(t)?0:t.tabIndex},XP=function(t,n){var r=bC(t);return r<0&&n&&!gC(t)?0:r},QP=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},yC=function(t){return t.tagName==="INPUT"},JP=function(t){return yC(t)&&t.type==="hidden"},e$=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},t$=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},n$=function(t){if(!t.name)return!0;var n=t.form||zp(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(t.name));else try{s=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=t$(s,t.form);return!a||a===t},r$=function(t){return yC(t)&&t.type==="radio"},i$=function(t){return r$(t)&&!n$(t)},s$=function(t){var n,r=t&&zp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,p;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(p=t.ownerDocument)!==null&&p!==void 0&&p.contains(t));!a&&s;){var d,h,m;r=zp(s),s=(d=r)===null||d===void 0?void 0:d.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},NE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},o$=function(t,n){var r=n.displayCheck,s=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var l=vl.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(vl.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var p=t;t;){var d=t.parentElement,h=zp(t);if(d&&!d.shadowRoot&&s(d)===!0)return NE(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=p}if(s$(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return NE(t);return!1},a$=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return vl.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Cy=function(t,n){return!(n.disabled||JP(n)||o$(n,t)||e$(n)||a$(n))},Ay=function(t,n){return!(i$(n)||bC(n)<0||!Cy(t,n))},l$=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},vC=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,p=XP(c,l),d=l?vC(s.candidates):c;p===0?l?n.push.apply(n,d):n.push(c):r.push({documentOrder:a,tabIndex:p,item:s,isScope:l,content:d})}),r.sort(QP).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},wh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=jp([t],n.includeContainer,{filter:Ay.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:l$}):r=mC(t,n.includeContainer,Ay.bind(null,n)),vC(r)},u$=function(t,n){n=n||{};var r;return n.getShadowRoot?r=jp([t],n.includeContainer,{filter:Cy.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=mC(t,n.includeContainer,Cy.bind(null,n)),r},xC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return vl.call(t,Dp)===!1?!1:Ay(n,t)};function c$(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function kC(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function f$(){return/apple/i.test(navigator.vendor)}function Ny(){const e=/android/i;return e.test(c$())||e.test(kC())}function d$(){return kC().includes("jsdom/")}const OE="data-floating-ui-focusable",p$="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Eb="ArrowLeft",Tb="ArrowRight",h$="ArrowUp",m$="ArrowDown";function no(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&co(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ro(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _b(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function g$(e){return e.matches("html,body")}function pr(e){return e?.ownerDocument||document}function SC(e){return It(e)&&e.matches(p$)}function Oy(e){return e?e.getAttribute("role")==="combobox"&&SC(e):!1}function Pp(e){return e?e.hasAttribute(OE)?e:e.querySelector("["+OE+"]")||e:null}function Vo(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...Vo(e,s.id,n)])}function b$(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),Vo(e,a).forEach(p=>{s(p.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function ME(e,t){var n;let r=[],s=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;s;){const a=e.find(l=>l.id===s);s=a?.parentId,a&&(r=r.concat(a))}return r}function or(e){e.preventDefault(),e.stopPropagation()}function y$(e){return"nativeEvent"in e}function wC(e){return e.mozInputSource===0&&e.isTrusted?!0:Ny()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function EC(e){return d$()?!1:!Ny()&&e.width===0&&e.height===0||Ny()&&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 hc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var v$=typeof document<"u",x$=function(){},on=v$?x.useLayoutEffect:x$;const k$={...ah};function Wn(e){const t=x.useRef(e);return on(()=>{t.current=e}),t}const S$=k$.useInsertionEffect,w$=S$||(e=>e());function Dn(e){const t=x.useRef(()=>{});return w$(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function Id(e,t,n){return Math.floor(e/t)!==n}function Ju(e,t){return t<0||t>=e.current.length}function Rb(e,t){return fr(e,{disabledIndices:t})}function IE(e,t){return fr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function fr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=t===void 0?{}:t,l=n;do l+=r?-a:a;while(l>=0&&l<=e.current.length-1&&gp(e,l,s));return l}function E$(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:p,maxIndex:d,prevIndex:h,stopEvent:m=!1}=t,g=h;if(n.key===h$){if(m&&or(n),h===-1)g=d;else if(g=fr(e,{startingIndex:g,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<p||g<0)){const y=h%l,k=d%l,w=d-(k-y);k===y?g=d:g=k>y?w:w-l}Ju(e,g)&&(g=h)}if(n.key===m$&&(m&&or(n),h===-1?g=p:(g=fr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>d&&(g=fr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),Ju(e,g)&&(g=h)),r==="both"){const y=ys(h/l);n.key===(a?Eb:Tb)&&(m&&or(n),h%l!==l-1?(g=fr(e,{startingIndex:h,disabledIndices:c}),s&&Id(g,l,y)&&(g=fr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(g=fr(e,{startingIndex:h-h%l-1,disabledIndices:c})),Id(g,l,y)&&(g=h)),n.key===(a?Tb:Eb)&&(m&&or(n),h%l!==0?(g=fr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&Id(g,l,y)&&(g=fr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(g=fr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),Id(g,l,y)&&(g=h));const k=ys(d/l)===y;Ju(e,g)&&(s&&k?g=n.key===(a?Tb:Eb)?d:fr(e,{startingIndex:h-h%l-1,disabledIndices:c}):g=h)}return g}function T$(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:p}=a,d=!1;for(n&&(s=0);!d;){const h=[];for(let m=0;m<c;m++)for(let g=0;g<p;g++)h.push(s+m+g*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),d=!0):s++}}),[...r]}function _$(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function R$(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function gp(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Vc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function TC(e,t){const n=wh(e,Vc()),r=n.length;if(r===0)return;const s=no(pr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function _C(e){return TC(pr(e).body,1)||e}function RC(e){return TC(pr(e).body,-1)||e}function ec(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xr(n,r)}function C$(e){wh(e,Vc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function DE(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Kc(e){const t=x.useRef(void 0),n=x.useCallback(r=>{const s=e.map(a=>{if(a!=null){if(typeof a=="function"){const l=a,c=l(r);return typeof c=="function"?c:()=>{l(null)}}return a.current=r,()=>{a.current=null}}});return()=>{s.forEach(a=>a?.())}},e);return x.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function A$(e,t){const 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}const CC=x.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function AC(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=x.useState(()=>new Set),l=x.useCallback(d=>{a(h=>new Set(h).add(d))},[]),c=x.useCallback(d=>{a(h=>{const m=new Set(h);return m.delete(d),m})},[]),p=x.useMemo(()=>{const d=new Map;return Array.from(s.keys()).sort(A$).forEach((m,g)=>{d.set(m,g)}),d},[s]);return v.jsx(CC.Provider,{value:x.useMemo(()=>({register:l,unregister:c,map:p,elementsRef:n,labelsRef:r}),[l,c,p,n,r]),children:t})}function Eh(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=x.useContext(CC),[c,p]=x.useState(null),d=x.useRef(null),h=x.useCallback(m=>{if(d.current=m,c!==null&&(a.current[c]=m,l)){var g;const y=t!==void 0;l.current[c]=y?t:(g=m?.textContent)!=null?g:null}},[c,a,l,t]);return on(()=>{const m=d.current;if(m)return n(m),()=>{r(m)}},[n,r]),on(()=>{const m=d.current?s.get(d.current):null;m!=null&&p(m)},[s]),x.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const N$="data-floating-ui-focusable",zE="active",LE="selected",Zc="ArrowLeft",Wc="ArrowRight",NC="ArrowUp",Th="ArrowDown",O$={...ah};let jE=!1,M$=0;const PE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+M$++;function I$(){const[e,t]=x.useState(()=>jE?PE():void 0);return on(()=>{e==null&&t(PE())},[]),x.useEffect(()=>{jE=!0},[]),e}const D$=O$.useId,_h=D$||I$;function OC(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const MC=x.createContext(null),IC=x.createContext(null),go=()=>{var e;return((e=x.useContext(MC))==null?void 0:e.id)||null},bo=()=>x.useContext(IC);function DC(e){const t=_h(),n=bo(),s=go();return on(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function zC(e){const{children:t,id:n}=e,r=go();return v.jsx(MC.Provider,{value:x.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function z$(e){const{children:t}=e,n=x.useRef([]),r=x.useCallback(l=>{n.current=[...n.current,l]},[]),s=x.useCallback(l=>{n.current=n.current.filter(c=>c!==l)},[]),[a]=x.useState(()=>OC());return v.jsx(IC.Provider,{value:x.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function xl(e){return"data-floating-ui-"+e}function cr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const $E=xl("safe-polygon");function Cb(e,t,n){if(n&&!hc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Ab(e){return typeof e=="function"?e():e}function LC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:p=0,handleClose:d=null,mouseOnly:h=!1,restMs:m=0,move:g=!0}=t,y=bo(),k=go(),w=Wn(d),_=Wn(p),E=Wn(n),R=Wn(m),T=x.useRef(),C=x.useRef(-1),A=x.useRef(),N=x.useRef(-1),I=x.useRef(!0),H=x.useRef(!1),$=x.useRef(()=>{}),L=x.useRef(!1),K=Dn(()=>{var U;const P=(U=s.current.openEvent)==null?void 0:U.type;return P?.includes("mouse")&&P!=="mousedown"});x.useEffect(()=>{if(!c)return;function U(P){let{open:W}=P;W||(cr(C),cr(N),I.current=!0,L.current=!1)}return a.on("openchange",U),()=>{a.off("openchange",U)}},[c,a]),x.useEffect(()=>{if(!c||!w.current||!n)return;function U(W){K()&&r(!1,W,"hover")}const P=pr(l.floating).documentElement;return P.addEventListener("mouseleave",U),()=>{P.removeEventListener("mouseleave",U)}},[l.floating,n,r,c,w,K]);const Z=x.useCallback(function(U,P,W){P===void 0&&(P=!0),W===void 0&&(W="hover");const D=Cb(_.current,"close",T.current);D&&!A.current?(cr(C),C.current=window.setTimeout(()=>r(!1,U,W),D)):P&&(cr(C),r(!1,U,W))},[_,r]),q=Dn(()=>{$.current(),A.current=void 0}),z=Dn(()=>{if(H.current){const U=pr(l.floating).body;U.style.pointerEvents="",U.removeAttribute($E),H.current=!1}}),j=Dn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);x.useEffect(()=>{if(!c)return;function U(G){if(cr(C),I.current=!1,h&&!hc(T.current)||Ab(R.current)>0&&!Cb(_.current,"open"))return;const O=Cb(_.current,"open",T.current);O?C.current=window.setTimeout(()=>{E.current||r(!0,G,"hover")},O):n||r(!0,G,"hover")}function P(G){if(j()){z();return}$.current();const O=pr(l.floating);if(cr(N),L.current=!1,w.current&&s.current.floatingContext){n||cr(C),A.current=w.current({...s.current.floatingContext,tree:y,x:G.clientX,y:G.clientY,onClose(){z(),q(),j()||Z(G,!0,"safe-polygon")}});const te=A.current;O.addEventListener("mousemove",te),$.current=()=>{O.removeEventListener("mousemove",te)};return}(T.current!=="touch"||!xr(l.floating,G.relatedTarget))&&Z(G)}function W(G){j()||s.current.floatingContext&&(w.current==null||w.current({...s.current.floatingContext,tree:y,x:G.clientX,y:G.clientY,onClose(){z(),q(),j()||Z(G)}})(G))}function D(){cr(C)}function B(G){j()||Z(G,!1)}if(yt(l.domReference)){const G=l.domReference,O=l.floating;return n&&G.addEventListener("mouseleave",W),g&&G.addEventListener("mousemove",U,{once:!0}),G.addEventListener("mouseenter",U),G.addEventListener("mouseleave",P),O&&(O.addEventListener("mouseleave",W),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",B)),()=>{n&&G.removeEventListener("mouseleave",W),g&&G.removeEventListener("mousemove",U),G.removeEventListener("mouseenter",U),G.removeEventListener("mouseleave",P),O&&(O.removeEventListener("mouseleave",W),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",B))}}},[l,c,e,h,g,Z,q,z,r,n,E,y,_,w,s,j,R]),on(()=>{var U;if(c&&n&&(U=w.current)!=null&&(U=U.__options)!=null&&U.blockPointerEvents&&K()){H.current=!0;const W=l.floating;if(yt(l.domReference)&&W){var P;const D=pr(l.floating).body;D.setAttribute($E,"");const B=l.domReference,G=y==null||(P=y.nodesRef.current.find(O=>O.id===k))==null||(P=P.context)==null?void 0:P.elements.floating;return G&&(G.style.pointerEvents=""),D.style.pointerEvents="none",B.style.pointerEvents="auto",W.style.pointerEvents="auto",()=>{D.style.pointerEvents="",B.style.pointerEvents="",W.style.pointerEvents=""}}}},[c,n,k,l,y,w,K]),on(()=>{n||(T.current=void 0,L.current=!1,q(),z())},[n,q,z]),x.useEffect(()=>()=>{q(),cr(C),cr(N),z()},[c,l.domReference,q,z]);const F=x.useMemo(()=>{function U(P){T.current=P.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(P){const{nativeEvent:W}=P;function D(){!I.current&&!E.current&&r(!0,W,"hover")}h&&!hc(T.current)||n||Ab(R.current)===0||L.current&&P.movementX**2+P.movementY**2<2||(cr(N),T.current==="touch"?D():(L.current=!0,N.current=window.setTimeout(D,Ab(R.current))))}}},[h,r,n,E,R]);return x.useMemo(()=>c?{reference:F}:{},[c,F])}let BE=0;function Uo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(BE);const a=()=>e?.focus({preventScroll:n});s?a():BE=requestAnimationFrame(a)}function Nb(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&co(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function L$(e){return"composedPath"in e?e.composedPath()[0]:e.target}function j$(e){return e?.ownerDocument||document}const ll={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function FE(e){return e==="inert"?ll.inert:e==="aria-hidden"?ll["aria-hidden"]:ll.none}let Dd=new WeakSet,zd={},Ob=0;const P$=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,jC=e=>e&&(e.host||jC(e.parentNode)),$$=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=jC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function B$(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=$$(t,e),c=new Set,p=new Set(l),d=[];zd[s]||(zd[s]=new WeakMap);const h=zd[s];l.forEach(m),g(t),c.clear();function m(y){!y||c.has(y)||(c.add(y),y.parentNode&&m(y.parentNode))}function g(y){!y||p.has(y)||[].forEach.call(y.children,k=>{if(Yn(k)!=="script")if(c.has(k))g(k);else{const w=a?k.getAttribute(a):null,_=w!==null&&w!=="false",E=FE(a),R=(E.get(k)||0)+1,T=(h.get(k)||0)+1;E.set(k,R),h.set(k,T),d.push(k),R===1&&_&&Dd.add(k),T===1&&k.setAttribute(s,""),!_&&a&&k.setAttribute(a,a==="inert"?"":"true")}})}return Ob++,()=>{d.forEach(y=>{const k=FE(a),_=(k.get(y)||0)-1,E=(h.get(y)||0)-1;k.set(y,_),h.set(y,E),_||(!Dd.has(y)&&a&&y.removeAttribute(a),Dd.delete(y)),E||y.removeAttribute(s)}),Ob--,Ob||(ll.inert=new WeakMap,ll["aria-hidden"]=new WeakMap,ll.none=new WeakMap,Dd=new WeakSet,zd={})}}function UE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=j$(e[0]).body;return B$(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Rh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},$p=x.forwardRef(function(t,n){const[r,s]=x.useState();on(()=>{f$()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[xl("focus-guard")]:"",style:Rh};return v.jsx("span",{...t,...a})}),PC=x.createContext(null),qE=xl("portal");function F$(e){e===void 0&&(e={});const{id:t,root:n}=e,r=_h(),s=$C(),[a,l]=x.useState(null),c=x.useRef(null);return on(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),on(()=>{if(!r||c.current)return;const p=t?document.getElementById(t):null;if(!p)return;const d=document.createElement("div");d.id=r,d.setAttribute(qE,""),p.appendChild(d),c.current=d,l(d)},[t,r]),on(()=>{if(n===null||!r||c.current)return;let p=n||s?.portalNode;p&&!ch(p)&&(p=p.current),p=p||document.body;let d=null;t&&(d=document.createElement("div"),d.id=t,p.appendChild(d));const h=document.createElement("div");h.id=r,h.setAttribute(qE,""),p=d||p,p.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function qv(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=F$({id:n,root:r}),[l,c]=x.useState(null),p=x.useRef(null),d=x.useRef(null),h=x.useRef(null),m=x.useRef(null),g=l?.modal,y=l?.open,k=!!l&&!l.modal&&l.open&&s&&!!(r||a);return x.useEffect(()=>{if(!a||!s||g)return;function w(_){a&&ec(_)&&(_.type==="focusin"?DE:C$)(a)}return a.addEventListener("focusin",w,!0),a.addEventListener("focusout",w,!0),()=>{a.removeEventListener("focusin",w,!0),a.removeEventListener("focusout",w,!0)}},[a,s,g]),x.useEffect(()=>{a&&(y||DE(a))},[y,a]),v.jsxs(PC.Provider,{value:x.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:p,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[k&&a&&v.jsx($p,{"data-type":"outside",ref:p,onFocus:w=>{if(ec(w,a)){var _;(_=h.current)==null||_.focus()}else{const E=l?l.domReference:null,R=RC(E);R?.focus()}}}),k&&a&&v.jsx("span",{"aria-owns":a.id,style:Rh}),a&&Ri.createPortal(t,a),k&&a&&v.jsx($p,{"data-type":"outside",ref:d,onFocus:w=>{if(ec(w,a)){var _;(_=m.current)==null||_.focus()}else{const E=l?l.domReference:null,R=_C(E);R?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,w.nativeEvent,"focus-out")}}})]})}const $C=()=>x.useContext(PC);function HE(e){return x.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const U$=20;let so=[];function Hv(){so=so.filter(e=>e.isConnected)}function q$(e){Hv(),e&&Yn(e)!=="body"&&(so.push(e),so.length>U$&&(so=so.slice(-20)))}function GE(){return Hv(),so[so.length-1]}function H$(e){const t=Vc();return xC(e,t)?e:wh(e,t)[0]||e}function VE(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Vc(),a=u$(e,r).filter(c=>{const p=c.getAttribute("data-tabindex")||"";return xC(c,r)||c.hasAttribute("data-tabindex")&&!p.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const G$=x.forwardRef(function(t,n){return v.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Rh})});function Gv(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:p=!1,modal:d=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:g=!1,getInsideElements:y=()=>[]}=e,{open:k,onOpenChange:w,events:_,dataRef:E,elements:{domReference:R,floating:T}}=t,C=Dn(()=>{var he;return(he=E.current.floatingContext)==null?void 0:he.nodeId}),A=Dn(y),N=typeof l=="number"&&l<0,I=Oy(R)&&N,H=P$(),$=H?a:!0,L=!$||H&&g,K=Wn(s),Z=Wn(l),q=Wn(c),z=bo(),j=$C(),F=x.useRef(null),U=x.useRef(null),P=x.useRef(!1),W=x.useRef(!1),D=x.useRef(-1),B=x.useRef(-1),G=j!=null,O=Pp(T),ie=Dn(function(he){return he===void 0&&(he=O),he?wh(he,Vc()):[]}),te=Dn(he=>{const Te=ie(he);return K.current.map(Re=>R&&Re==="reference"?R:O&&Re==="floating"?O:Te).filter(Boolean).flat()});x.useEffect(()=>{if(r||!d)return;function he(Re){if(Re.key==="Tab"){xr(O,no(pr(O)))&&ie().length===0&&!I&&or(Re);const Oe=te(),ve=ro(Re);K.current[0]==="reference"&&ve===R&&(or(Re),Re.shiftKey?Uo(Oe[Oe.length-1]):Uo(Oe[1])),K.current[1]==="floating"&&ve===O&&Re.shiftKey&&(or(Re),Uo(Oe[0]))}}const Te=pr(O);return Te.addEventListener("keydown",he),()=>{Te.removeEventListener("keydown",he)}},[r,R,O,d,K,I,ie,te]),x.useEffect(()=>{if(r||!T)return;function he(Te){const Re=ro(Te),ve=ie().indexOf(Re);ve!==-1&&(D.current=ve)}return T.addEventListener("focusin",he),()=>{T.removeEventListener("focusin",he)}},[r,T,ie]),x.useEffect(()=>{if(r||!m)return;function he(){W.current=!0,setTimeout(()=>{W.current=!1})}function Te(ve){const xe=ve.relatedTarget,Me=ve.currentTarget,Ce=ro(ve);queueMicrotask(()=>{const Pe=C(),ge=!(xr(R,xe)||xr(T,xe)||xr(xe,T)||xr(j?.portalNode,xe)||xe!=null&&xe.hasAttribute(xl("focus-guard"))||z&&(Vo(z.nodesRef.current,Pe).find(fe=>{var oe,re;return xr((oe=fe.context)==null?void 0:oe.elements.floating,xe)||xr((re=fe.context)==null?void 0:re.elements.domReference,xe)})||ME(z.nodesRef.current,Pe).find(fe=>{var oe,re,_e;return[(oe=fe.context)==null?void 0:oe.elements.floating,Pp((re=fe.context)==null?void 0:re.elements.floating)].includes(xe)||((_e=fe.context)==null?void 0:_e.elements.domReference)===xe})));if(Me===R&&O&&VE(O,K),p&&Me!==R&&!(Ce!=null&&Ce.isConnected)&&no(pr(O))===pr(O).body){It(O)&&O.focus();const fe=D.current,oe=ie(),re=oe[fe]||oe[oe.length-1]||O;It(re)&&re.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(I||!d)&&xe&&ge&&!W.current&&xe!==GE()&&(P.current=!0,w(!1,ve,"focus-out"))})}const Re=!!(!z&&j);function Oe(){cr(B),E.current.insideReactTree=!0,B.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(T&&It(R))return R.addEventListener("focusout",Te),R.addEventListener("pointerdown",he),T.addEventListener("focusout",Te),Re&&T.addEventListener("focusout",Oe,!0),()=>{R.removeEventListener("focusout",Te),R.removeEventListener("pointerdown",he),T.removeEventListener("focusout",Te),Re&&T.removeEventListener("focusout",Oe,!0)}},[r,R,T,O,d,z,j,w,m,p,ie,I,C,K,E]);const ne=x.useRef(null),le=x.useRef(null),pe=HE([ne,j?.beforeInsideRef]),ye=HE([le,j?.afterInsideRef]);x.useEffect(()=>{var he,Te;if(r||!T)return;const Re=Array.from((j==null||(he=j.portalNode)==null?void 0:he.querySelectorAll("["+xl("portal")+"]"))||[]),ve=(Te=(z?ME(z.nodesRef.current,C()):[]).find(Ce=>{var Pe;return Oy(((Pe=Ce.context)==null?void 0:Pe.elements.domReference)||null)}))==null||(Te=Te.context)==null?void 0:Te.elements.domReference,xe=[T,ve,...Re,...A(),F.current,U.current,ne.current,le.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,K.current.includes("reference")||I?R:null].filter(Ce=>Ce!=null),Me=d||I?UE(xe,!L,L):UE(xe);return()=>{Me()}},[r,R,T,d,K,j,I,$,L,z,C,A]),on(()=>{if(r||!It(O))return;const he=pr(O),Te=no(he);queueMicrotask(()=>{const Re=te(O),Oe=Z.current,ve=(typeof Oe=="number"?Re[Oe]:Oe.current)||O,xe=xr(O,Te);!N&&!xe&&k&&Uo(ve,{preventScroll:ve===O})})},[r,k,O,N,te,Z]),on(()=>{if(r||!O)return;const he=pr(O),Te=no(he);q$(Te);function Re(xe){let{reason:Me,event:Ce,nested:Pe}=xe;if(["hover","safe-polygon"].includes(Me)&&Ce.type==="mouseleave"&&(P.current=!0),Me==="outside-press")if(Pe)P.current=!1;else if(wC(Ce)||EC(Ce))P.current=!1;else{let ge=!1;document.createElement("div").focus({get preventScroll(){return ge=!0,!1}}),ge?P.current=!1:P.current=!0}}_.on("openchange",Re);const Oe=he.createElement("span");Oe.setAttribute("tabindex","-1"),Oe.setAttribute("aria-hidden","true"),Object.assign(Oe.style,Rh),G&&R&&R.insertAdjacentElement("afterend",Oe);function ve(){if(typeof q.current=="boolean"){const xe=R||GE();return xe&&xe.isConnected?xe:Oe}return q.current.current||Oe}return()=>{_.off("openchange",Re);const xe=no(he),Me=xr(T,xe)||z&&Vo(z.nodesRef.current,C(),!1).some(Pe=>{var ge;return xr((ge=Pe.context)==null?void 0:ge.elements.floating,xe)}),Ce=ve();queueMicrotask(()=>{const Pe=H$(Ce);q.current&&!P.current&&It(Pe)&&(!(Pe!==xe&&xe!==he.body)||Me)&&Pe.focus({preventScroll:!0}),Oe.remove()})}},[r,T,O,q,E,_,z,G,R,C]),x.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(Hv)}),[r]),on(()=>{if(!r&&j)return j.setFocusManagerState({modal:d,closeOnFocusOut:m,open:k,onOpenChange:w,domReference:R}),()=>{j.setFocusManagerState(null)}},[r,j,d,k,w,m,R]),on(()=>{r||O&&VE(O,K)},[r,O,K]);function Se(he){return r||!h||!d?null:v.jsx(G$,{ref:he==="start"?F:U,onClick:Te=>w(!1,Te.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const ze=!r&&$&&(d?!I:!0)&&(G||d);return v.jsxs(v.Fragment,{children:[ze&&v.jsx($p,{"data-type":"inside",ref:pe,onFocus:he=>{if(d){const Re=te();Uo(s[0]==="reference"?Re[0]:Re[Re.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(P.current=!1,ec(he,j.portalNode)){const Re=_C(R);Re?.focus()}else{var Te;(Te=j.beforeOutsideRef.current)==null||Te.focus()}}}),!I&&Se("start"),n,Se("end"),ze&&v.jsx($p,{"data-type":"inside",ref:ye,onFocus:he=>{if(d)Uo(te()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(m&&(P.current=!0),ec(he,j.portalNode)){const Re=RC(R);Re?.focus()}else{var Te;(Te=j.afterOutsideRef.current)==null||Te.focus()}}})]})}function KE(e){return It(e.target)&&e.target.tagName==="BUTTON"}function V$(e){return It(e.target)&&e.target.tagName==="A"}function ZE(e){return SC(e)}function BC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:p=!0,ignoreMouse:d=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,g=x.useRef(),y=x.useRef(!1),k=x.useMemo(()=>({onPointerDown(w){g.current=w.pointerType},onMouseDown(w){const _=g.current;w.button===0&&c!=="click"&&(hc(_,!0)&&d||(n&&p&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,w.nativeEvent,"click"):(w.preventDefault(),r(!0,w.nativeEvent,"click"))))},onClick(w){const _=g.current;if(c==="mousedown"&&g.current){g.current=void 0;return}hc(_,!0)&&d||(n&&p&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,w.nativeEvent,"click"):r(!0,w.nativeEvent,"click"))},onKeyDown(w){g.current=void 0,!(w.defaultPrevented||!h||KE(w))&&(w.key===" "&&!ZE(a)&&(w.preventDefault(),y.current=!0),!V$(w)&&w.key==="Enter"&&r(!(n&&p),w.nativeEvent,"click"))},onKeyUp(w){w.defaultPrevented||!h||KE(w)||ZE(a)||w.key===" "&&y.current&&(y.current=!1,r(!(n&&p),w.nativeEvent,"click"))}}),[s,a,c,d,h,r,n,m,p]);return x.useMemo(()=>l?{reference:k}:{},[l,k])}const K$={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Z$={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},WE=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function FC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:g=!1,bubbles:y,capture:k}=t,w=bo(),_=Dn(typeof p=="function"?p:()=>!1),E=typeof p=="function"?_:p,R=x.useRef(!1),{escapeKey:T,outsidePress:C}=WE(y),{escapeKey:A,outsidePress:N}=WE(k),I=x.useRef(!1),H=Dn(z=>{var j;if(!n||!l||!c||z.key!=="Escape"||I.current)return;const F=(j=a.current.floatingContext)==null?void 0:j.nodeId,U=w?Vo(w.nodesRef.current,F):[];if(!T&&(z.stopPropagation(),U.length>0)){let P=!0;if(U.forEach(W=>{var D;if((D=W.context)!=null&&D.open&&!W.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,y$(z)?z.nativeEvent:z,"escape-key")}),$=Dn(z=>{var j;const F=()=>{var U;H(z),(U=ro(z))==null||U.removeEventListener("keydown",F)};(j=ro(z))==null||j.addEventListener("keydown",F)}),L=Dn(z=>{var j;const F=a.current.insideReactTree;a.current.insideReactTree=!1;const U=R.current;if(R.current=!1,d==="click"&&U||F||typeof E=="function"&&!E(z))return;const P=ro(z),W="["+xl("inert")+"]",D=pr(s.floating).querySelectorAll(W);let B=yt(P)?P:null;for(;B&&!pi(B);){const te=Bi(B);if(pi(te)||!yt(te))break;B=te}if(D.length&&yt(P)&&!g$(P)&&!xr(P,s.floating)&&Array.from(D).every(te=>!xr(B,te)))return;if(It(P)&&q){const te=pi(P),ne=Er(P),le=/auto|scroll/,pe=te||le.test(ne.overflowX),ye=te||le.test(ne.overflowY),Se=pe&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,ze=ye&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,he=ne.direction==="rtl",Te=ze&&(he?z.offsetX<=P.offsetWidth-P.clientWidth:z.offsetX>P.clientWidth),Re=Se&&z.offsetY>P.clientHeight;if(Te||Re)return}const G=(j=a.current.floatingContext)==null?void 0:j.nodeId,O=w&&Vo(w.nodesRef.current,G).some(te=>{var ne;return _b(z,(ne=te.context)==null?void 0:ne.elements.floating)});if(_b(z,s.floating)||_b(z,s.domReference)||O)return;const ie=w?Vo(w.nodesRef.current,G):[];if(ie.length>0){let te=!0;if(ie.forEach(ne=>{var le;if((le=ne.context)!=null&&le.open&&!ne.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,z,"outside-press")}),K=Dn(z=>{var j;const F=()=>{var U;L(z),(U=ro(z))==null||U.removeEventListener(d,F)};(j=ro(z))==null||j.addEventListener(d,F)});x.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=T,a.current.__outsidePressBubbles=C;let z=-1;function j(D){r(!1,D,"ancestor-scroll")}function F(){window.clearTimeout(z),I.current=!0}function U(){z=window.setTimeout(()=>{I.current=!1},zc()?5:0)}const P=pr(s.floating);c&&(P.addEventListener("keydown",A?$:H,A),P.addEventListener("compositionstart",F),P.addEventListener("compositionend",U)),E&&P.addEventListener(d,N?K:L,N);let W=[];return g&&(yt(s.domReference)&&(W=oo(s.domReference)),yt(s.floating)&&(W=W.concat(oo(s.floating))),!yt(s.reference)&&s.reference&&s.reference.contextElement&&(W=W.concat(oo(s.reference.contextElement)))),W=W.filter(D=>{var B;return D!==((B=P.defaultView)==null?void 0:B.visualViewport)}),W.forEach(D=>{D.addEventListener("scroll",j,{passive:!0})}),()=>{c&&(P.removeEventListener("keydown",A?$:H,A),P.removeEventListener("compositionstart",F),P.removeEventListener("compositionend",U)),E&&P.removeEventListener(d,N?K:L,N),W.forEach(D=>{D.removeEventListener("scroll",j)}),window.clearTimeout(z)}},[a,s,c,E,d,n,r,g,l,T,C,H,A,$,L,N,K]),x.useEffect(()=>{a.current.insideReactTree=!1},[a,E,d]);const Z=x.useMemo(()=>({onKeyDown:H,...h&&{[K$[m]]:z=>{r(!1,z.nativeEvent,"reference-press")},...m!=="click"&&{onClick(z){r(!1,z.nativeEvent,"reference-press")}}}}),[H,r,h,m]),q=x.useMemo(()=>({onKeyDown:H,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[Z$[d]]:()=>{a.current.insideReactTree=!0}}),[H,d,a]);return x.useMemo(()=>l?{reference:Z,floating:q}:{},[l,Z,q])}function W$(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=_h(),a=x.useRef({}),[l]=x.useState(()=>OC()),c=go()!=null,[p,d]=x.useState(r.reference),h=Dn((y,k,w)=>{a.current.openEvent=y?k:void 0,l.emit("openchange",{open:y,event:k,reason:w,nested:c}),n?.(y,k,w)}),m=x.useMemo(()=>({setPositionReference:d}),[]),g=x.useMemo(()=>({reference:p||r.reference||null,floating:r.floating||null,domReference:r.reference}),[p,r.reference,r.floating]);return x.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:g,events:l,floatingId:s,refs:m}),[t,h,g,l,s,m])}function UC(e){e===void 0&&(e={});const{nodeId:t}=e,n=W$({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=x.useState(null),[c,p]=x.useState(null),h=s?.domReference||a,m=x.useRef(null),g=bo();on(()=>{h&&(m.current=h)},[h]);const y=VR({...e,elements:{...s,...c&&{reference:c}}}),k=x.useCallback(T=>{const C=yt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;p(C),y.refs.setReference(C)},[y.refs]),w=x.useCallback(T=>{(yt(T)||T===null)&&(m.current=T,l(T)),(yt(y.refs.reference.current)||y.refs.reference.current===null||T!==null&&!yt(T))&&y.refs.setReference(T)},[y.refs]),_=x.useMemo(()=>({...y.refs,setReference:w,setPositionReference:k,domReference:m}),[y.refs,w,k]),E=x.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),R=x.useMemo(()=>({...y,...r,refs:_,elements:E,nodeId:t}),[y,_,E,t,r]);return on(()=>{r.dataRef.current.floatingContext=R;const T=g?.nodesRef.current.find(C=>C.id===t);T&&(T.context=R)}),x.useMemo(()=>({...y,context:R,refs:_,elements:E}),[y,_,E,R])}function Mb(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[zE]:l,[LE]:c,...p}=e;a=p}return{...n==="floating"&&{tabIndex:-1,[N$]:""},...a,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(p=>{let[d,h]=p;if(!(s&&[zE,LE].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var m;(m=r.get(d))==null||m.push(h),l[d]=function(){for(var g,y=arguments.length,k=new Array(y),w=0;w<y;w++)k[w]=arguments[w];return(g=r.get(d))==null?void 0:g.map(_=>_(...k)).find(_=>_!==void 0)}}}else l[d]=h}),l),{})}}function qC(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),s=x.useCallback(c=>Mb(c,e,"reference"),t),a=x.useCallback(c=>Mb(c,e,"floating"),n),l=x.useCallback(c=>Mb(c,e,"item"),r);return x.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const Y$="Escape";function Ch(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ld(e,t){return Ch(t,e===NC||e===Th,e===Zc||e===Wc)}function Ib(e,t,n){return Ch(t,e===Th,n?e===Zc:e===Wc)||e==="Enter"||e===" "||e===""}function YE(e,t,n){return Ch(t,n?e===Zc:e===Wc,e===Th)}function XE(e,t,n,r){const s=n?e===Wc:e===Zc,a=e===NC;return t==="both"||t==="horizontal"&&r&&r>1?e===Y$:Ch(t,s,a)}function HC(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:p=()=>{},enabled:d=!0,selectedIndex:h=null,allowEscape:m=!1,loop:g=!1,nested:y=!1,rtl:k=!1,virtual:w=!1,focusItemOnOpen:_="auto",focusItemOnHover:E=!0,openOnArrowKeyDown:R=!0,disabledIndices:T=void 0,orientation:C="vertical",parentOrientation:A,cols:N=1,scrollItemIntoView:I=!0,virtualItemRef:H,itemSizes:$,dense:L=!1}=t,K=Pp(s.floating),Z=Wn(K),q=go(),z=bo();on(()=>{e.dataRef.current.orientation=C},[e,C]);const j=Dn(()=>{p(P.current===-1?null:P.current)}),F=Oy(s.domReference),U=x.useRef(_),P=x.useRef(h??-1),W=x.useRef(null),D=x.useRef(!0),B=x.useRef(j),G=x.useRef(!!s.floating),O=x.useRef(n),ie=x.useRef(!1),te=x.useRef(!1),ne=Wn(T),le=Wn(n),pe=Wn(I),ye=Wn(h),[Se,ze]=x.useState(),[he,Te]=x.useState(),Re=Dn(()=>{function fe(J){if(w){var ue;(ue=J.id)!=null&&ue.endsWith("-fui-option")&&(J.id=a+"-"+Math.random().toString(16).slice(2,10)),ze(J.id),z?.events.emit("virtualfocus",J),H&&(H.current=J)}else Uo(J,{sync:ie.current,preventScroll:!0})}const oe=l.current[P.current],re=te.current;oe&&fe(oe),(ie.current?J=>J():requestAnimationFrame)(()=>{const J=l.current[P.current]||oe;if(!J)return;oe||fe(J);const ue=pe.current;ue&&ve&&(re||!D.current)&&(J.scrollIntoView==null||J.scrollIntoView(typeof ue=="boolean"?{block:"nearest",inline:"nearest"}:ue))})});on(()=>{d&&(n&&s.floating?U.current&&h!=null&&(te.current=!0,P.current=h,j()):G.current&&(P.current=-1,B.current()))},[d,n,s.floating,h,j]),on(()=>{if(d&&n&&s.floating)if(c==null){if(ie.current=!1,ye.current!=null)return;if(G.current&&(P.current=-1,Re()),(!O.current||!G.current)&&U.current&&(W.current!=null||U.current===!0&&W.current==null)){let fe=0;const oe=()=>{l.current[0]==null?(fe<2&&(fe?requestAnimationFrame:queueMicrotask)(oe),fe++):(P.current=W.current==null||Ib(W.current,C,k)||y?Rb(l,ne.current):IE(l,ne.current),W.current=null,j())};oe()}}else Ju(l,c)||(P.current=c,Re(),te.current=!1)},[d,n,s.floating,c,ye,y,l,C,k,j,Re,ne]),on(()=>{var fe;if(!d||s.floating||!z||w||!G.current)return;const oe=z.nodesRef.current,re=(fe=oe.find(ue=>ue.id===q))==null||(fe=fe.context)==null?void 0:fe.elements.floating,_e=no(pr(s.floating)),J=oe.some(ue=>ue.context&&xr(ue.context.elements.floating,_e));re&&!J&&D.current&&re.focus({preventScroll:!0})},[d,s.floating,z,q,w]),on(()=>{if(!d||!z||!w||q)return;function fe(oe){Te(oe.id),H&&(H.current=oe)}return z.events.on("virtualfocus",fe),()=>{z.events.off("virtualfocus",fe)}},[d,z,w,q,H]),on(()=>{B.current=j,O.current=n,G.current=!!s.floating}),on(()=>{n||(W.current=null,U.current=_)},[n,_]);const Oe=c!=null,ve=x.useMemo(()=>{function fe(re){if(!le.current)return;const _e=l.current.indexOf(re);_e!==-1&&P.current!==_e&&(P.current=_e,j())}return{onFocus(re){let{currentTarget:_e}=re;ie.current=!0,fe(_e)},onClick:re=>{let{currentTarget:_e}=re;return _e.focus({preventScroll:!0})},onMouseMove(re){let{currentTarget:_e}=re;ie.current=!0,te.current=!1,E&&fe(_e)},onPointerLeave(re){let{pointerType:_e}=re;if(!(!D.current||_e==="touch")&&(ie.current=!0,!!E&&(P.current=-1,j(),!w))){var J;(J=Z.current)==null||J.focus({preventScroll:!0})}}}},[le,Z,E,l,j,w]),xe=x.useCallback(()=>{var fe;return A??(z==null||(fe=z.nodesRef.current.find(oe=>oe.id===q))==null||(fe=fe.context)==null||(fe=fe.dataRef)==null?void 0:fe.current.orientation)},[q,z,A]),Me=Dn(fe=>{if(D.current=!1,ie.current=!0,fe.which===229||!le.current&&fe.currentTarget===Z.current)return;if(y&&XE(fe.key,C,k,N)){Ld(fe.key,xe())||or(fe),r(!1,fe.nativeEvent,"list-navigation"),It(s.domReference)&&(w?z?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const oe=P.current,re=Rb(l,T),_e=IE(l,T);if(F||(fe.key==="Home"&&(or(fe),P.current=re,j()),fe.key==="End"&&(or(fe),P.current=_e,j())),N>1){const J=$||Array.from({length:l.current.length},()=>({width:1,height:1})),ue=T$(J,N,L),Ie=ue.findIndex(Ye=>Ye!=null&&!gp(l,Ye,T)),Be=ue.reduce((Ye,ot,it)=>ot!=null&&!gp(l,ot,T)?it:Ye,-1),Ze=ue[E$({current:ue.map(Ye=>Ye!=null?l.current[Ye]:null)},{event:fe,orientation:C,loop:g,rtl:k,cols:N,disabledIndices:R$([...(typeof T!="function"?T:null)||l.current.map((Ye,ot)=>gp(l,ot,T)?ot:void 0),void 0],ue),minIndex:Ie,maxIndex:Be,prevIndex:_$(P.current>_e?re:P.current,J,ue,N,fe.key===Th?"bl":fe.key===(k?Zc:Wc)?"tr":"tl"),stopEvent:!0})];if(Ze!=null&&(P.current=Ze,j()),C==="both")return}if(Ld(fe.key,C)){if(or(fe),n&&!w&&no(fe.currentTarget.ownerDocument)===fe.currentTarget){P.current=Ib(fe.key,C,k)?re:_e,j();return}Ib(fe.key,C,k)?g?P.current=oe>=_e?m&&oe!==l.current.length?-1:re:fr(l,{startingIndex:oe,disabledIndices:T}):P.current=Math.min(_e,fr(l,{startingIndex:oe,disabledIndices:T})):g?P.current=oe<=re?m&&oe!==-1?l.current.length:_e:fr(l,{startingIndex:oe,decrement:!0,disabledIndices:T}):P.current=Math.max(re,fr(l,{startingIndex:oe,decrement:!0,disabledIndices:T})),Ju(l,P.current)&&(P.current=-1),j()}}),Ce=x.useMemo(()=>w&&n&&Oe&&{"aria-activedescendant":he||Se},[w,n,Oe,he,Se]),Pe=x.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...F?{}:Ce,onKeyDown:Me,onPointerMove(){D.current=!0}}),[Ce,Me,C,F]),ge=x.useMemo(()=>{function fe(re){_==="auto"&&wC(re.nativeEvent)&&(U.current=!0)}function oe(re){U.current=_,_==="auto"&&EC(re.nativeEvent)&&(U.current=!0)}return{...Ce,onKeyDown(re){D.current=!1;const _e=re.key.startsWith("Arrow"),J=["Home","End"].includes(re.key),ue=_e||J,Ie=YE(re.key,C,k),Be=XE(re.key,C,k,N),Ze=YE(re.key,xe(),k),Ye=Ld(re.key,C),ot=(y?Ze:Ye)||re.key==="Enter"||re.key.trim()==="";if(w&&n){const st=z?.nodesRef.current.find(We=>We.parentId==null),xt=z&&st?b$(z.nodesRef.current,st.id):null;if(ue&&xt&&H){const We=new KeyboardEvent("keydown",{key:re.key,bubbles:!0});if(Ie||Be){var it,nt;const Ot=((it=xt.context)==null?void 0:it.elements.domReference)===re.currentTarget,Fe=Be&&!Ot?(nt=xt.context)==null?void 0:nt.elements.domReference:Ie?l.current.find(Ke=>Ke?.id===Se):null;Fe&&(or(re),Fe.dispatchEvent(We),Te(void 0))}if((Ye||J)&&xt.context&&xt.context.open&&xt.parentId&&re.currentTarget!==xt.context.elements.domReference){var vt;or(re),(vt=xt.context.elements.domReference)==null||vt.dispatchEvent(We);return}}return Me(re)}if(!(!n&&!R&&_e)){if(ot){const st=Ld(re.key,xe());W.current=y&&st?null:re.key}if(y){Ze&&(or(re),n?(P.current=Rb(l,ne.current),j()):r(!0,re.nativeEvent,"list-navigation"));return}Ye&&(h!=null&&(P.current=h),or(re),!n&&R?r(!0,re.nativeEvent,"list-navigation"):Me(re),n&&j())}},onFocus(){n&&!w&&(P.current=-1,j())},onPointerDown:oe,onPointerEnter:oe,onMouseDown:fe,onClick:fe}},[Se,Ce,N,Me,ne,_,l,y,j,r,n,R,C,xe,k,h,z,w,H]);return x.useMemo(()=>d?{reference:ge,floating:Pe,item:ve}:{},[d,ge,Pe,ve])}const X$=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function GC(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:p="dialog"}=t,d=_h(),h=((n=a.domReference)==null?void 0:n.id)||d,m=x.useMemo(()=>{var R;return((R=Pp(a.floating))==null?void 0:R.id)||l},[a.floating,l]),g=(r=X$.get(p))!=null?r:p,k=go()!=null,w=x.useMemo(()=>g==="tooltip"||p==="label"?{["aria-"+(p==="label"?"labelledby":"describedby")]:s?m:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":s?m:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:h},...g==="menu"&&k&&{role:"menuitem"},...p==="select"&&{"aria-autocomplete":"none"},...p==="combobox"&&{"aria-autocomplete":"list"}},[g,m,k,s,h,p]),_=x.useMemo(()=>{const R={id:m,...g&&{role:g}};return g==="tooltip"||p==="label"?R:{...R,...g==="menu"&&{"aria-labelledby":h}}},[g,m,h,p]),E=x.useCallback(R=>{let{active:T,selected:C}=R;const A={role:"option",...T&&{id:m+"-fui-option"}};switch(p){case"select":case"combobox":return{...A,"aria-selected":C}}return{}},[m,p]);return x.useMemo(()=>c?{reference:w,floating:_,item:E}:{},[c,w,_,E])}const QE=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Va(e,t){return typeof e=="function"?e(t):e}function Q$(e,t){const[n,r]=x.useState(e);return e&&!n&&r(!0),x.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function J$(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,l=(typeof s=="number"?s:s.close)||0,[c,p]=x.useState("unmounted"),d=Q$(n,l);return!d&&c==="close"&&p("unmounted"),on(()=>{if(r){if(n){p("initial");const h=requestAnimationFrame(()=>{Ri.flushSync(()=>{p("open")})});return()=>{cancelAnimationFrame(h)}}p("close")}},[n,r]),{isMounted:d,status:c}}function VC(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,p=c.split("-")[0],d=x.useMemo(()=>({side:p,placement:c}),[p,c]),h=typeof l=="number",m=(h?l:l.open)||0,g=(h?l:l.close)||0,[y,k]=x.useState(()=>({...Va(a,d),...Va(n,d)})),{isMounted:w,status:_}=J$(e,{duration:l}),E=Wn(n),R=Wn(r),T=Wn(s),C=Wn(a);return on(()=>{const A=Va(E.current,d),N=Va(T.current,d),I=Va(C.current,d),H=Va(R.current,d)||Object.keys(A).reduce(($,L)=>($[L]="",$),{});if(_==="initial"&&k($=>({transitionProperty:$.transitionProperty,...I,...A})),_==="open"&&k({transitionProperty:Object.keys(H).map(QE).join(","),transitionDuration:m+"ms",...I,...H}),_==="close"){const $=N||A;k({transitionProperty:Object.keys($).map(QE).join(","),transitionDuration:g+"ms",...I,...$})}},[g,T,E,R,C,m,_,d]),{isMounted:w,styles:y}}function KC(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:p,enabled:d=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:g=[],selectedIndex:y=null}=t,k=x.useRef(-1),w=x.useRef(""),_=x.useRef((n=y??l)!=null?n:-1),E=x.useRef(null),R=Dn(c),T=Dn(p),C=Wn(h),A=Wn(g);on(()=>{r&&(cr(k),E.current=null,w.current="")},[r]),on(()=>{if(r&&w.current===""){var L;_.current=(L=y??l)!=null?L:-1}},[r,y,l]);const N=Dn(L=>{L?s.current.typing||(s.current.typing=L,T(L)):s.current.typing&&(s.current.typing=L,T(L))}),I=Dn(L=>{function K(F,U,P){const W=C.current?C.current(U,P):U.find(D=>D?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return W?F.indexOf(W):-1}const Z=a.current;if(w.current.length>0&&w.current[0]!==" "&&(K(Z,Z,w.current)===-1?N(!1):L.key===" "&&or(L)),Z==null||A.current.includes(L.key)||L.key.length!==1||L.ctrlKey||L.metaKey||L.altKey)return;r&&L.key!==" "&&(or(L),N(!0)),Z.every(F=>{var U,P;return F?((U=F[0])==null?void 0:U.toLocaleLowerCase())!==((P=F[1])==null?void 0:P.toLocaleLowerCase()):!0})&&w.current===L.key&&(w.current="",_.current=E.current),w.current+=L.key,cr(k),k.current=window.setTimeout(()=>{w.current="",_.current=E.current,N(!1)},m);const z=_.current,j=K(Z,[...Z.slice((z||0)+1),...Z.slice(0,(z||0)+1)],w.current);j!==-1?(R(j),E.current=j):L.key!==" "&&(w.current="",N(!1))}),H=x.useMemo(()=>({onKeyDown:I}),[I]),$=x.useMemo(()=>({onKeyDown:I,onKeyUp(L){L.key===" "&&N(!1)}}),[I,N]);return x.useMemo(()=>d?{reference:H,floating:$}:{},[d,H,$])}function ZC(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...ZC(e,s.id,n)])}function JE(e,t){const[n,r]=e;let s=!1;const a=t.length;for(let l=0,c=a-1;l<a;c=l++){const[p,d]=t[l]||[0,0],[h,m]=t[c]||[0,0];d>=r!=m>=r&&n<=(h-p)*(r-d)/(m-d)+p&&(s=!s)}return s}function e3(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function WC(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,s={current:-1};let a=!1,l=null,c=null,p=typeof performance<"u"?performance.now():0;function d(m,g){const y=performance.now(),k=y-p;if(l===null||c===null||k===0)return l=m,c=g,p=y,null;const w=m-l,_=g-c,R=Math.sqrt(w*w+_*_)/k;return l=m,c=g,p=y,R}const h=m=>{let{x:g,y,placement:k,elements:w,onClose:_,nodeId:E,tree:R}=m;return function(C){function A(){cr(s),_()}if(cr(s),!w.domReference||!w.floating||k==null||g==null||y==null)return;const{clientX:N,clientY:I}=C,H=[N,I],$=L$(C),L=C.type==="mouseleave",K=Nb(w.floating,$),Z=Nb(w.domReference,$),q=w.domReference.getBoundingClientRect(),z=w.floating.getBoundingClientRect(),j=k.split("-")[0],F=g>z.right-z.width/2,U=y>z.bottom-z.height/2,P=e3(H,q),W=z.width>q.width,D=z.height>q.height,B=(W?q:z).left,G=(W?q:z).right,O=(D?q:z).top,ie=(D?q:z).bottom;if(K&&(a=!0,!L))return;if(Z&&(a=!1),Z&&!L){a=!0;return}if(L&&yt(C.relatedTarget)&&Nb(w.floating,C.relatedTarget)||R&&ZC(R.nodesRef.current,E).length)return;if(j==="top"&&y>=q.bottom-1||j==="bottom"&&y<=q.top+1||j==="left"&&g>=q.right-1||j==="right"&&g<=q.left+1)return A();let te=[];switch(j){case"top":te=[[B,q.top+1],[B,z.bottom-1],[G,z.bottom-1],[G,q.top+1]];break;case"bottom":te=[[B,z.top+1],[B,q.bottom-1],[G,q.bottom-1],[G,z.top+1]];break;case"left":te=[[z.right-1,ie],[z.right-1,O],[q.left+1,O],[q.left+1,ie]];break;case"right":te=[[q.right-1,ie],[q.right-1,O],[z.left+1,O],[z.left+1,ie]];break}function ne(le){let[pe,ye]=le;switch(j){case"top":{const Se=[W?pe+t/2:F?pe+t*4:pe-t*4,ye+t+1],ze=[W?pe-t/2:F?pe+t*4:pe-t*4,ye+t+1],he=[[z.left,F||W?z.bottom-t:z.top],[z.right,F?W?z.bottom-t:z.top:z.bottom-t]];return[Se,ze,...he]}case"bottom":{const Se=[W?pe+t/2:F?pe+t*4:pe-t*4,ye-t],ze=[W?pe-t/2:F?pe+t*4:pe-t*4,ye-t],he=[[z.left,F||W?z.top+t:z.bottom],[z.right,F?W?z.top+t:z.bottom:z.top+t]];return[Se,ze,...he]}case"left":{const Se=[pe+t+1,D?ye+t/2:U?ye+t*4:ye-t*4],ze=[pe+t+1,D?ye-t/2:U?ye+t*4:ye-t*4];return[...[[U||D?z.right-t:z.left,z.top],[U?D?z.right-t:z.left:z.right-t,z.bottom]],Se,ze]}case"right":{const Se=[pe-t,D?ye+t/2:U?ye+t*4:ye-t*4],ze=[pe-t,D?ye-t/2:U?ye+t*4:ye-t*4],he=[[U||D?z.left+t:z.right,z.top],[U?D?z.left+t:z.right:z.left+t,z.bottom]];return[Se,ze,...he]}}}if(!JE([N,I],te)){if(a&&!P)return A();if(!L&&r){const le=d(C.clientX,C.clientY);if(le!==null&&le<.1)return A()}JE([N,I],ne([g,y]))?!a&&r&&(s.current=window.setTimeout(A,40)):A()}}};return h.__options={blockPointerEvents:n},h}function Ne(e,t,n){function r(c,p){var d;Object.defineProperty(c,"_zod",{value:c._zod??{},enumerable:!1}),(d=c._zod).traits??(d.traits=new Set),c._zod.traits.add(e),t(c,p);for(const h in l.prototype)h in c||Object.defineProperty(c,h,{value:l.prototype[h].bind(c)});c._zod.constr=l,c._zod.def=p}const s=n?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:e});function l(c){var p;const d=n?.Parent?new a:this;r(d,c),(p=d._zod).deferred??(p.deferred=[]);for(const h of d._zod.deferred)h();return d}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class ul extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class YC extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const XC={};function Xo(e){return XC}function t3(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function My(e,t){return typeof t=="bigint"?t.toString():t}function Vv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Kv(e){return e==null}function Zv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const e1=Symbol("evaluating");function pn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==e1)return r===void 0&&(r=e1,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function oa(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function aa(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function t1(e){return JSON.stringify(e)}const QC="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Bp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const n3=Vv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function mc(e){if(Bp(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(Bp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function JC(e){return mc(e)?{...e}:Array.isArray(e)?[...e]:e}const r3=new Set(["string","number","symbol"]);function Ah(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function wt(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new 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 i3(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function s3(e,t){const n=e._zod.def,r=aa(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return oa(this,"shape",s),s},checks:[]});return yo(e,r)}function o3(e,t){const n=e._zod.def,r=aa(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return oa(this,"shape",s),s},checks:[]});return yo(e,r)}function a3(e,t){if(!mc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const s=aa(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return oa(this,"shape",a),a},checks:[]});return yo(e,s)}function l3(e,t){if(!mc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return oa(this,"shape",r),r},checks:e._zod.def.checks};return yo(e,n)}function u3(e,t){const n=aa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return oa(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return yo(e,n)}function c3(e,t,n){const r=aa(t._zod.def,{get shape(){const s=t._zod.def.shape,a={...s};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(const l in s)a[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return oa(this,"shape",a),a},checks:[]});return yo(t,r)}function f3(e,t,n){const r=aa(t._zod.def,{get shape(){const s=t._zod.def.shape,a={...s};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=new e({type:"nonoptional",innerType:s[l]}))}else for(const l in s)a[l]=new e({type:"nonoptional",innerType:s[l]});return oa(this,"shape",a),a},checks:[]});return yo(t,r)}function nl(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 eA(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function jd(e){return typeof e=="string"?e:e?.message}function Qo(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=jd(e.inst?._zod.def?.error?.(e))??jd(t?.error?.(e))??jd(n.customError?.(e))??jd(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Wv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gc(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const tA=(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,My,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},nA=Ne("$ZodError",tA),rA=Ne("$ZodError",tA,{Parent:Error});function d3(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function p3(e,t){const n=t||function(a){return a.message},r={_errors:[]},s=a=>{for(const l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>s({issues:c}));else if(l.code==="invalid_key")s({issues:l.issues});else if(l.code==="invalid_element")s({issues:l.issues});else if(l.path.length===0)r._errors.push(n(l));else{let c=r,p=0;for(;p<l.path.length;){const d=l.path[p];p===l.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(n(l))):c[d]=c[d]||{_errors:[]},c=c[d],p++}}};return s(e),r}const Yv=e=>(t,n,r,s)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise)throw new ul;if(l.issues.length){const c=new(s?.Err??e)(l.issues.map(p=>Qo(p,a,Xo())));throw QC(c,s?.callee),c}return l.value},Xv=e=>async(t,n,r,s)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(s?.Err??e)(l.issues.map(p=>Qo(p,a,Xo())));throw QC(c,s?.callee),c}return l.value},Nh=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new ul;return a.issues.length?{success:!1,error:new(e??nA)(a.issues.map(l=>Qo(l,s,Xo())))}:{success:!0,data:a.value}},h3=Nh(rA),Oh=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},s);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(l=>Qo(l,s,Xo())))}:{success:!0,data:a.value}},m3=Oh(rA),g3=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Yv(e)(t,n,s)},b3=e=>(t,n,r)=>Yv(e)(t,n,r),y3=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Xv(e)(t,n,s)},v3=e=>async(t,n,r)=>Xv(e)(t,n,r),x3=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nh(e)(t,n,s)},k3=e=>(t,n,r)=>Nh(e)(t,n,r),S3=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Oh(e)(t,n,s)},w3=e=>async(t,n,r)=>Oh(e)(t,n,r),E3=/^[cC][^\s-]{8,}$/,T3=/^[0-9a-z]+$/,_3=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,R3=/^[0-9a-vA-V]{20}$/,C3=/^[A-Za-z0-9]{27}$/,A3=/^[a-zA-Z0-9_-]{21}$/,N3=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,O3=/^([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})$/,n1=e=>e?new 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)$/,M3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,I3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function D3(){return new RegExp(I3,"u")}const z3=/^(?:(?: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])$/,L3=/^(([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}|:))$/,j3=/^((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])$/,P3=/^(([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])$/,$3=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,iA=/^[A-Za-z0-9_-]*$/,B3=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,F3=/^\+(?:[0-9]){6,14}[0-9]$/,sA="(?:(?:\\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])))",U3=new RegExp(`^${sA}$`);function oA(e){const 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 q3(e){return new RegExp(`^${oA(e)}$`)}function H3(e){const t=oA({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${sA}T(?:${r})$`)}const G3=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},V3=/^(?:true|false)$/i,K3=/^[^A-Z]*$/,Z3=/^[^a-z]*$/,Ui=Ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),W3=Ne("$ZodCheckMaxLength",(e,t)=>{var n;Ui.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Kv(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const l=Wv(s);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Y3=Ne("$ZodCheckMinLength",(e,t)=>{var n;Ui.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Kv(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const l=Wv(s);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),X3=Ne("$ZodCheckLengthEquals",(e,t)=>{var n;Ui.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Kv(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,a=s.length;if(a===t.length)return;const l=Wv(s),c=a>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Mh=Ne("$ZodCheckStringFormat",(e,t)=>{var n,r;Ui.init(e,t),e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Q3=Ne("$ZodCheckRegex",(e,t)=>{Mh.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})}}),J3=Ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=K3),Mh.init(e,t)}),e6=Ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Z3),Mh.init(e,t)}),t6=Ne("$ZodCheckIncludes",(e,t)=>{Ui.init(e,t);const n=Ah(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),n6=Ne("$ZodCheckStartsWith",(e,t)=>{Ui.init(e,t);const n=new RegExp(`^${Ah(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),r6=Ne("$ZodCheckEndsWith",(e,t)=>{Ui.init(e,t);const n=new RegExp(`.*${Ah(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),i6=Ne("$ZodCheckOverwrite",(e,t)=>{Ui.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class s6{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
10
+ `).filter(l=>l),s=Math.min(...r.map(l=>l.length-l.trimStart().length)),a=r.map(l=>l.slice(s)).map(l=>" ".repeat(this.indent*2)+l);for(const l of a)this.content.push(l)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...n,s.join(`
11
+ `))}}const o6={major:4,minor:1,patch:11},Hn=Ne("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=o6;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const a of s._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,c,p)=>{let d=nl(l),h;for(const m of c){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(d)continue;const g=l.issues.length,y=m._zod.check(l);if(y instanceof Promise&&p?.async===!1)throw new ul;if(h||y instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await y,l.issues.length!==g&&(d||(d=nl(l,g)))});else{if(l.issues.length===g)continue;d||(d=nl(l,g))}}return h?h.then(()=>l):l},a=(l,c,p)=>{if(nl(l))return l.aborted=!0,l;const d=s(c,r,p);if(d instanceof Promise){if(p.async===!1)throw new ul;return d.then(h=>e._zod.parse(h,p))}return e._zod.parse(d,p)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const d=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return d instanceof Promise?d.then(h=>a(h,l,c)):a(d,l,c)}const p=e._zod.parse(l,c);if(p instanceof Promise){if(c.async===!1)throw new ul;return p.then(d=>s(d,r,c))}return s(p,r,c)}}e["~standard"]={validate:s=>{try{const a=h3(e,s);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return m3(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}}),Qv=Ne("$ZodString",(e,t)=>{Hn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??G3(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}}),xn=Ne("$ZodStringFormat",(e,t)=>{Mh.init(e,t),Qv.init(e,t)}),a6=Ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=O3),xn.init(e,t)}),l6=Ne("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=n1(r))}else t.pattern??(t.pattern=n1());xn.init(e,t)}),u6=Ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=M3),xn.init(e,t)}),c6=Ne("$ZodURL",(e,t)=>{xn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:B3.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.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=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),f6=Ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=D3()),xn.init(e,t)}),d6=Ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=A3),xn.init(e,t)}),p6=Ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=E3),xn.init(e,t)}),h6=Ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=T3),xn.init(e,t)}),m6=Ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=_3),xn.init(e,t)}),g6=Ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=R3),xn.init(e,t)}),b6=Ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=C3),xn.init(e,t)}),y6=Ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=H3(t)),xn.init(e,t)}),v6=Ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=U3),xn.init(e,t)}),x6=Ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=q3(t)),xn.init(e,t)}),k6=Ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=N3),xn.init(e,t)}),S6=Ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=z3),xn.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),w6=Ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=L3),xn.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.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})}}}),E6=Ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=j3),xn.init(e,t)}),T6=Ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=P3),xn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,a]=r;if(!a)throw new Error;const l=Number(a);if(`${l}`!==a)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function aA(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const _6=Ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=$3),xn.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{aA(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function R6(e){if(!iA.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return aA(n)}const C6=Ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=iA),xn.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{R6(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),A6=Ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=F3),xn.init(e,t)});function N6(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const O6=Ne("$ZodJWT",(e,t)=>{xn.init(e,t),e._zod.check=n=>{N6(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),M6=Ne("$ZodBoolean",(e,t)=>{Hn.init(e,t),e._zod.pattern=V3,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),I6=Ne("$ZodUnknown",(e,t)=>{Hn.init(e,t),e._zod.parse=n=>n}),D6=Ne("$ZodNever",(e,t)=>{Hn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function r1(e,t,n){e.issues.length&&t.issues.push(...eA(n,e.issues)),t.value[n]=e.value}const z6=Ne("$ZodArray",(e,t)=>{Hn.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const a=[];for(let l=0;l<s.length;l++){const c=s[l],p=t.element._zod.run({value:c,issues:[]},r);p instanceof Promise?a.push(p.then(d=>r1(d,n,l))):r1(p,n,l)}return a.length?Promise.all(a).then(()=>n):n}});function Fp(e,t,n,r){e.issues.length&&t.issues.push(...eA(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function lA(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=i3(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function uA(e,t,n,r,s,a){const l=[],c=s.keySet,p=s.catchall._zod,d=p.def.type;for(const h of Object.keys(t)){if(c.has(h))continue;if(d==="never"){l.push(h);continue}const m=p.run({value:t[h],issues:[]},r);m instanceof Promise?e.push(m.then(g=>Fp(g,n,h,t))):Fp(m,n,h,t)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const L6=Ne("$ZodObject",(e,t)=>{if(Hn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const p={...c};return Object.defineProperty(t,"shape",{value:p}),p}})}const r=Vv(()=>lA(t));pn(e._zod,"propValues",()=>{const c=t.shape,p={};for(const d in c){const h=c[d]._zod;if(h.values){p[d]??(p[d]=new Set);for(const m of h.values)p[d].add(m)}}return p});const s=Bp,a=t.catchall;let l;e._zod.parse=(c,p)=>{l??(l=r.value);const d=c.value;if(!s(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c;c.value={};const h=[],m=l.shape;for(const g of l.keys){const k=m[g]._zod.run({value:d[g],issues:[]},p);k instanceof Promise?h.push(k.then(w=>Fp(w,c,g,d))):Fp(k,c,g,d)}return a?uA(h,d,c,p,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),j6=Ne("$ZodObjectJIT",(e,t)=>{L6.init(e,t);const n=e._zod.parse,r=Vv(()=>lA(t)),s=g=>{const y=new s6(["shape","payload","ctx"]),k=r.value,w=T=>{const C=t1(T);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};y.write("const input = payload.value;");const _=Object.create(null);let E=0;for(const T of k.keys)_[T]=`key_${E++}`;y.write("const newResult = {};");for(const T of k.keys){const C=_[T],A=t1(T);y.write(`const ${C} = ${w(T)};`),y.write(`
12
+ if (${C}.issues.length) {
13
+ payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
14
+ ...iss,
15
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
16
+ })));
17
+ }
18
+
19
+
20
+ if (${C}.value === undefined) {
21
+ if (${A} in input) {
22
+ newResult[${A}] = undefined;
23
+ }
24
+ } else {
25
+ newResult[${A}] = ${C}.value;
26
+ }
27
+
28
+ `)}y.write("payload.value = newResult;"),y.write("return payload;");const R=y.compile();return(T,C)=>R(g,T,C)};let a;const l=Bp,c=!XC.jitless,d=c&&n3.value,h=t.catchall;let m;e._zod.parse=(g,y)=>{m??(m=r.value);const k=g.value;return l(k)?c&&d&&y?.async===!1&&y.jitless!==!0?(a||(a=s(t.shape)),g=a(g,y),h?uA([],k,g,y,m,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:k,inst:e}),g)}});function i1(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const s=e.filter(a=>!nl(a));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(l=>Qo(l,r,Xo())))}),t)}const P6=Ne("$ZodUnion",(e,t)=>{Hn.init(e,t),pn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),pn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),pn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),pn(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${s.map(a=>Zv(a.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(s,a)=>{if(n)return r(s,a);let l=!1;const c=[];for(const p of t.options){const d=p._zod.run({value:s.value,issues:[]},a);if(d instanceof Promise)c.push(d),l=!0;else{if(d.issues.length===0)return d;c.push(d)}}return l?Promise.all(c).then(p=>i1(p,s,e,a)):i1(c,s,e,a)}}),$6=Ne("$ZodIntersection",(e,t)=>{Hn.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,a=t.left._zod.run({value:s,issues:[]},r),l=t.right._zod.run({value:s,issues:[]},r);return a instanceof Promise||l instanceof Promise?Promise.all([a,l]).then(([p,d])=>s1(n,p,d)):s1(n,a,l)}});function Iy(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(mc(e)&&mc(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(const a of r){const l=Iy(e[a],t[a]);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};s[a]=l.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=e[r],a=t[r],l=Iy(s,a);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function s1(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),nl(e))return e;const r=Iy(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const B6=Ne("$ZodEnum",(e,t)=>{Hn.init(e,t);const n=t3(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>r3.has(typeof s)).map(s=>typeof s=="string"?Ah(s):s.toString()).join("|")})$`),e._zod.parse=(s,a)=>{const l=s.value;return r.has(l)||s.issues.push({code:"invalid_value",values:n,input:l,inst:e}),s}}),F6=Ne("$ZodTransform",(e,t)=>{Hn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new YC(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(l=>(n.value=l,n));if(s instanceof Promise)throw new ul;return n.value=s,n}});function o1(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const U6=Ne("$ZodOptional",(e,t)=>{Hn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",pn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),pn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Zv(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>o1(a,n.value)):o1(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),q6=Ne("$ZodNullable",(e,t)=>{Hn.init(e,t),pn(e._zod,"optin",()=>t.innerType._zod.optin),pn(e._zod,"optout",()=>t.innerType._zod.optout),pn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Zv(n.source)}|null)$`):void 0}),pn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),H6=Ne("$ZodDefault",(e,t)=>{Hn.init(e,t),e._zod.optin="optional",pn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>a1(a,t)):a1(s,t)}});function a1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const G6=Ne("$ZodPrefault",(e,t)=>{Hn.init(e,t),e._zod.optin="optional",pn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),V6=Ne("$ZodNonOptional",(e,t)=>{Hn.init(e,t),pn(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>l1(a,e)):l1(s,e)}});function l1(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const K6=Ne("$ZodCatch",(e,t)=>{Hn.init(e,t),pn(e._zod,"optin",()=>t.innerType._zod.optin),pn(e._zod,"optout",()=>t.innerType._zod.optout),pn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(l=>Qo(l,r,Xo()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(a=>Qo(a,r,Xo()))},input:n.value}),n.issues=[]),n)}}),Z6=Ne("$ZodPipe",(e,t)=>{Hn.init(e,t),pn(e._zod,"values",()=>t.in._zod.values),pn(e._zod,"optin",()=>t.in._zod.optin),pn(e._zod,"optout",()=>t.out._zod.optout),pn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(l=>Pd(l,t.in,r)):Pd(a,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(a=>Pd(a,t.out,r)):Pd(s,t.out,r)}});function Pd(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const W6=Ne("$ZodReadonly",(e,t)=>{Hn.init(e,t),pn(e._zod,"propValues",()=>t.innerType._zod.propValues),pn(e._zod,"values",()=>t.innerType._zod.values),pn(e._zod,"optin",()=>t.innerType._zod.optin),pn(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(u1):u1(s)}});function u1(e){return e.value=Object.freeze(e.value),e}const Y6=Ne("$ZodCustom",(e,t)=>{Ui.init(e,t),Hn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(a=>c1(a,n,r,e));c1(s,n,r,e)}});function c1(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(gc(s))}}class X6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Q6(){return new X6}const $d=Q6();function J6(e,t){return new e({type:"string",...wt(t)})}function eB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...wt(t)})}function f1(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...wt(t)})}function tB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...wt(t)})}function nB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...wt(t)})}function rB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...wt(t)})}function iB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...wt(t)})}function sB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...wt(t)})}function oB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...wt(t)})}function aB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...wt(t)})}function lB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...wt(t)})}function uB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...wt(t)})}function cB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...wt(t)})}function fB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...wt(t)})}function dB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...wt(t)})}function pB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...wt(t)})}function hB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...wt(t)})}function mB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...wt(t)})}function gB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...wt(t)})}function bB(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...wt(t)})}function yB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...wt(t)})}function vB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...wt(t)})}function xB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...wt(t)})}function kB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...wt(t)})}function SB(e,t){return new e({type:"string",format:"date",check:"string_format",...wt(t)})}function wB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...wt(t)})}function EB(e,t){return new e({type:"string",format:"duration",check:"string_format",...wt(t)})}function TB(e,t){return new e({type:"boolean",...wt(t)})}function _B(e){return new e({type:"unknown"})}function RB(e,t){return new e({type:"never",...wt(t)})}function cA(e,t){return new W3({check:"max_length",...wt(t),maximum:e})}function Up(e,t){return new Y3({check:"min_length",...wt(t),minimum:e})}function fA(e,t){return new X3({check:"length_equals",...wt(t),length:e})}function CB(e,t){return new Q3({check:"string_format",format:"regex",...wt(t),pattern:e})}function AB(e){return new J3({check:"string_format",format:"lowercase",...wt(e)})}function NB(e){return new e6({check:"string_format",format:"uppercase",...wt(e)})}function OB(e,t){return new t6({check:"string_format",format:"includes",...wt(t),includes:e})}function MB(e,t){return new n6({check:"string_format",format:"starts_with",...wt(t),prefix:e})}function IB(e,t){return new r6({check:"string_format",format:"ends_with",...wt(t),suffix:e})}function Yc(e){return new i6({check:"overwrite",tx:e})}function DB(e){return Yc(t=>t.normalize(e))}function zB(){return Yc(e=>e.trim())}function LB(){return Yc(e=>e.toLowerCase())}function jB(){return Yc(e=>e.toUpperCase())}function PB(e,t,n){return new e({type:"array",element:t,...wt(n)})}function $B(e,t,n){return new e({type:"custom",check:"custom",fn:t,...wt(n)})}function BB(e){const t=FB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(gc(r,n.value,t._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(gc(s))}},e(n.value,n)));return t}function FB(e,t){const n=new Ui({check:"custom",...wt(t)});return n._zod.check=e,n}const UB=Ne("ZodISODateTime",(e,t)=>{y6.init(e,t),En.init(e,t)});function qB(e){return kB(UB,e)}const HB=Ne("ZodISODate",(e,t)=>{v6.init(e,t),En.init(e,t)});function GB(e){return SB(HB,e)}const VB=Ne("ZodISOTime",(e,t)=>{x6.init(e,t),En.init(e,t)});function KB(e){return wB(VB,e)}const ZB=Ne("ZodISODuration",(e,t)=>{k6.init(e,t),En.init(e,t)});function WB(e){return EB(ZB,e)}const YB=(e,t)=>{nA.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>p3(e,n)},flatten:{value:n=>d3(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,My,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,My,2)}},isEmpty:{get(){return e.issues.length===0}}})},mi=Ne("ZodError",YB,{Parent:Error}),XB=Yv(mi),QB=Xv(mi),JB=Nh(mi),e4=Oh(mi),t4=g3(mi),n4=b3(mi),r4=y3(mi),i4=v3(mi),s4=x3(mi),o4=k3(mi),a4=S3(mi),l4=w3(mi),Vn=Ne("ZodType",(e,t)=>(Hn.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(aa(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>yo(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>XB(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>JB(e,n,r),e.parseAsync=async(n,r)=>QB(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>e4(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>t4(e,n,r),e.decode=(n,r)=>n4(e,n,r),e.encodeAsync=async(n,r)=>r4(e,n,r),e.decodeAsync=async(n,r)=>i4(e,n,r),e.safeEncode=(n,r)=>s4(e,n,r),e.safeDecode=(n,r)=>o4(e,n,r),e.safeEncodeAsync=async(n,r)=>a4(e,n,r),e.safeDecodeAsync=async(n,r)=>l4(e,n,r),e.refine=(n,r)=>e.check(J4(n,r)),e.superRefine=n=>e.check(eF(n)),e.overwrite=n=>e.check(Yc(n)),e.optional=()=>h1(e),e.nullable=()=>m1(e),e.nullish=()=>h1(m1(e)),e.nonoptional=n=>V4(e,n),e.array=()=>I4(e),e.or=n=>L4([e,n]),e.and=n=>P4(e,n),e.transform=n=>g1(e,B4(n)),e.default=n=>q4(e,n),e.prefault=n=>G4(e,n),e.catch=n=>Z4(e,n),e.pipe=n=>g1(e,n),e.readonly=()=>X4(e),e.describe=n=>{const r=e.clone();return $d.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return $d.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return $d.get(e);const r=e.clone();return $d.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),dA=Ne("_ZodString",(e,t)=>{Qv.init(e,t),Vn.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(CB(...r)),e.includes=(...r)=>e.check(OB(...r)),e.startsWith=(...r)=>e.check(MB(...r)),e.endsWith=(...r)=>e.check(IB(...r)),e.min=(...r)=>e.check(Up(...r)),e.max=(...r)=>e.check(cA(...r)),e.length=(...r)=>e.check(fA(...r)),e.nonempty=(...r)=>e.check(Up(1,...r)),e.lowercase=r=>e.check(AB(r)),e.uppercase=r=>e.check(NB(r)),e.trim=()=>e.check(zB()),e.normalize=(...r)=>e.check(DB(...r)),e.toLowerCase=()=>e.check(LB()),e.toUpperCase=()=>e.check(jB())}),u4=Ne("ZodString",(e,t)=>{Qv.init(e,t),dA.init(e,t),e.email=n=>e.check(eB(c4,n)),e.url=n=>e.check(sB(f4,n)),e.jwt=n=>e.check(xB(_4,n)),e.emoji=n=>e.check(oB(d4,n)),e.guid=n=>e.check(f1(d1,n)),e.uuid=n=>e.check(tB(Bd,n)),e.uuidv4=n=>e.check(nB(Bd,n)),e.uuidv6=n=>e.check(rB(Bd,n)),e.uuidv7=n=>e.check(iB(Bd,n)),e.nanoid=n=>e.check(aB(p4,n)),e.guid=n=>e.check(f1(d1,n)),e.cuid=n=>e.check(lB(h4,n)),e.cuid2=n=>e.check(uB(m4,n)),e.ulid=n=>e.check(cB(g4,n)),e.base64=n=>e.check(bB(w4,n)),e.base64url=n=>e.check(yB(E4,n)),e.xid=n=>e.check(fB(b4,n)),e.ksuid=n=>e.check(dB(y4,n)),e.ipv4=n=>e.check(pB(v4,n)),e.ipv6=n=>e.check(hB(x4,n)),e.cidrv4=n=>e.check(mB(k4,n)),e.cidrv6=n=>e.check(gB(S4,n)),e.e164=n=>e.check(vB(T4,n)),e.datetime=n=>e.check(qB(n)),e.date=n=>e.check(GB(n)),e.time=n=>e.check(KB(n)),e.duration=n=>e.check(WB(n))});function pA(e){return J6(u4,e)}const En=Ne("ZodStringFormat",(e,t)=>{xn.init(e,t),dA.init(e,t)}),c4=Ne("ZodEmail",(e,t)=>{u6.init(e,t),En.init(e,t)}),d1=Ne("ZodGUID",(e,t)=>{a6.init(e,t),En.init(e,t)}),Bd=Ne("ZodUUID",(e,t)=>{l6.init(e,t),En.init(e,t)}),f4=Ne("ZodURL",(e,t)=>{c6.init(e,t),En.init(e,t)}),d4=Ne("ZodEmoji",(e,t)=>{f6.init(e,t),En.init(e,t)}),p4=Ne("ZodNanoID",(e,t)=>{d6.init(e,t),En.init(e,t)}),h4=Ne("ZodCUID",(e,t)=>{p6.init(e,t),En.init(e,t)}),m4=Ne("ZodCUID2",(e,t)=>{h6.init(e,t),En.init(e,t)}),g4=Ne("ZodULID",(e,t)=>{m6.init(e,t),En.init(e,t)}),b4=Ne("ZodXID",(e,t)=>{g6.init(e,t),En.init(e,t)}),y4=Ne("ZodKSUID",(e,t)=>{b6.init(e,t),En.init(e,t)}),v4=Ne("ZodIPv4",(e,t)=>{S6.init(e,t),En.init(e,t)}),x4=Ne("ZodIPv6",(e,t)=>{w6.init(e,t),En.init(e,t)}),k4=Ne("ZodCIDRv4",(e,t)=>{E6.init(e,t),En.init(e,t)}),S4=Ne("ZodCIDRv6",(e,t)=>{T6.init(e,t),En.init(e,t)}),w4=Ne("ZodBase64",(e,t)=>{_6.init(e,t),En.init(e,t)}),E4=Ne("ZodBase64URL",(e,t)=>{C6.init(e,t),En.init(e,t)}),T4=Ne("ZodE164",(e,t)=>{A6.init(e,t),En.init(e,t)}),_4=Ne("ZodJWT",(e,t)=>{O6.init(e,t),En.init(e,t)}),R4=Ne("ZodBoolean",(e,t)=>{M6.init(e,t),Vn.init(e,t)});function C4(e){return TB(R4,e)}const A4=Ne("ZodUnknown",(e,t)=>{I6.init(e,t),Vn.init(e,t)});function p1(){return _B(A4)}const N4=Ne("ZodNever",(e,t)=>{D6.init(e,t),Vn.init(e,t)});function O4(e){return RB(N4,e)}const M4=Ne("ZodArray",(e,t)=>{z6.init(e,t),Vn.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(Up(n,r)),e.nonempty=n=>e.check(Up(1,n)),e.max=(n,r)=>e.check(cA(n,r)),e.length=(n,r)=>e.check(fA(n,r)),e.unwrap=()=>e.element});function I4(e,t){return PB(M4,e,t)}const D4=Ne("ZodObject",(e,t)=>{j6.init(e,t),Vn.init(e,t),pn(e,"shape",()=>t.shape),e.keyof=()=>hA(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:p1()}),e.loose=()=>e.clone({...e._zod.def,catchall:p1()}),e.strict=()=>e.clone({...e._zod.def,catchall:O4()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>a3(e,n),e.safeExtend=n=>l3(e,n),e.merge=n=>u3(e,n),e.pick=n=>s3(e,n),e.omit=n=>o3(e,n),e.partial=(...n)=>c3(mA,e,n[0]),e.required=(...n)=>f3(gA,e,n[0])});function Jv(e,t){const n={type:"object",shape:e??{},...wt(t)};return new D4(n)}const z4=Ne("ZodUnion",(e,t)=>{P6.init(e,t),Vn.init(e,t),e.options=t.options});function L4(e,t){return new z4({type:"union",options:e,...wt(t)})}const j4=Ne("ZodIntersection",(e,t)=>{$6.init(e,t),Vn.init(e,t)});function P4(e,t){return new j4({type:"intersection",left:e,right:t})}const Dy=Ne("ZodEnum",(e,t)=>{B6.init(e,t),Vn.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const a={};for(const l of r)if(n.has(l))a[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Dy({...t,checks:[],...wt(s),entries:a})},e.exclude=(r,s)=>{const a={...t.entries};for(const l of r)if(n.has(l))delete a[l];else throw new Error(`Key ${l} not found in enum`);return new Dy({...t,checks:[],...wt(s),entries:a})}});function hA(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Dy({type:"enum",entries:n,...wt(t)})}const $4=Ne("ZodTransform",(e,t)=>{F6.init(e,t),Vn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new YC(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(gc(a,n.value,t));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(gc(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(a=>(n.value=a,n)):(n.value=s,n)}});function B4(e){return new $4({type:"transform",transform:e})}const mA=Ne("ZodOptional",(e,t)=>{U6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function h1(e){return new mA({type:"optional",innerType:e})}const F4=Ne("ZodNullable",(e,t)=>{q6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function m1(e){return new F4({type:"nullable",innerType:e})}const U4=Ne("ZodDefault",(e,t)=>{H6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function q4(e,t){return new U4({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():JC(t)}})}const H4=Ne("ZodPrefault",(e,t)=>{G6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function G4(e,t){return new H4({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():JC(t)}})}const gA=Ne("ZodNonOptional",(e,t)=>{V6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function V4(e,t){return new gA({type:"nonoptional",innerType:e,...wt(t)})}const K4=Ne("ZodCatch",(e,t)=>{K6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Z4(e,t){return new K4({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const W4=Ne("ZodPipe",(e,t)=>{Z6.init(e,t),Vn.init(e,t),e.in=t.in,e.out=t.out});function g1(e,t){return new W4({type:"pipe",in:e,out:t})}const Y4=Ne("ZodReadonly",(e,t)=>{W6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function X4(e){return new Y4({type:"readonly",innerType:e})}const Q4=Ne("ZodCustom",(e,t)=>{Y6.init(e,t),Vn.init(e,t)});function J4(e,t={}){return $B(Q4,e,t)}function eF(e){return BB(e)}function bA(e,t){var a;let n=null;const r=()=>(n===null&&(n=t()),n);return a=class{constructor(c){this.type=e,this.payload=c}static get schema(){return r()}},a.type=e,a}const ms=class ms{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return ms.instance||(ms.instance=new ms),ms.instance}static subscribe(t){return ms.getInstance().subscribeToChanges(t)}static isDragActive(){return ms.getInstance().hasData()}notifyListeners(){for(const t of this.listeners)t()}subscribeToChanges(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setData(t){this.data!==t&&(this.data=t,this.notifyListeners())}getData(){return this.data}getValidatedData(t){if(!this.data)return null;for(const n of t)if(this.data instanceof n)return n.schema.safeParse(this.data.payload).success?this.data:null;return null}hasAnyClass(t){return this.data?t.some(n=>this.data instanceof n):!1}clearData(){this.data!==null&&(this.data=null,this.notifyListeners())}hasData(){return this.data!==null}};ms.instance=null;let di=ms;function Db(e,t){if(!t?.length||!e.dataTransfer)return!1;for(const n of e.dataTransfer.types)for(const r of t)if(n.toLowerCase()===r.toLowerCase())return!0;return!1}function tF(e,t){const n=e.relatedTarget;if(n!==null&&t.contains(n))return!1;const r=t.defaultView;return r?e.clientX<=0||e.clientY<=0||e.clientX>=r.innerWidth||e.clientY>=r.innerHeight:!0}function nF(e){const{accept:t,disabled:n=!1,acceptNativeTypes:r,onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c}=e,p=x.useRef(null),d=x.useRef(null),h=x.useRef(0),m=x.useRef(null),[g,y]=x.useState(!1),[k,w]=x.useState(!1),_=x.useRef(g);_.current=g;const E=x.useCallback(()=>{h.current=0,y(!1),w(!1)},[]),R=x.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)},[]);x.useEffect(()=>{if(!g)return;const I=d.current?.ownerDocument??document,H=()=>{R(),E()};return I.addEventListener("mousemove",H,!0),()=>{I.removeEventListener("mousemove",H,!0)}},[g,R,E]);const T=x.useRef({onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c});T.current={onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c};const C=x.useRef(r);C.current=r;const A=x.useMemo(()=>Array.isArray(t)?t:[t],[t]),N=x.useCallback(I=>{if(d.current=I,p.current&&(p.current(),p.current=null),h.current=0,I!==null&&(y(!1),w(!1)),!I||n)return;const H=di.getInstance(),$=P=>{if(h.current++,h.current===1){y(!0);const W=!n&&H.hasAnyClass(A),D=W||!n&&Db(P,C.current);w(D);const B=W?H.getValidatedData(A):null;T.current.onDragEnter?.(P,B)}},L=P=>{h.current=Math.max(0,h.current-1),h.current===0&&(R(),E(),T.current.onDragLeave?.(P))},K=P=>{const W=!n&&H.hasAnyClass(A),D=!W&&!n&&Db(P,C.current);if(W||D){if(P.preventDefault(),P.dataTransfer&&(P.dataTransfer.dropEffect=W?"move":"copy"),h.current===0){h.current=1,y(!0),w(!0);const B=W?H.getValidatedData(A):null;T.current.onDragEnter?.(P,B)}if(T.current.onDragOver&&m.current===null){const B=W?H.getValidatedData(A):null;m.current=requestAnimationFrame(()=>{m.current=null,T.current.onDragOver?.(P,B)})}}},Z=P=>{if(P.preventDefault(),R(),E(),H.hasAnyClass(A)){const W=H.getValidatedData(A),{onDrop:D}=T.current;D&&(D(P,W),P.stopPropagation())}else if(Db(P,C.current)){const{onDrop:W}=T.current;W&&(W(P,null),P.stopPropagation())}};I.addEventListener("dragenter",$),I.addEventListener("dragleave",L),I.addEventListener("dragover",K),I.addEventListener("drop",Z);const q=I.ownerDocument,z=()=>{(h.current!==0||_.current)&&(R(),E())},j=()=>z(),F=()=>z(),U=P=>{tF(P,q)&&z()};q.addEventListener("drop",j,!0),q.addEventListener("dragend",F,!0),q.addEventListener("dragleave",U,!0),p.current=()=>{I.removeEventListener("dragenter",$),I.removeEventListener("dragleave",L),I.removeEventListener("dragover",K),I.removeEventListener("drop",Z),q.removeEventListener("drop",j,!0),q.removeEventListener("dragend",F,!0),q.removeEventListener("dragleave",U,!0),m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)}},[n,A,E,R]);return x.useEffect(()=>()=>{p.current&&(p.current(),p.current=null)},[]),{ref:N,isOver:g,canDrop:k,isDropBlocked:g&&!k}}function rF(){const e=x.useRef(void 0),t=x.useCallback(()=>{const r=e.current;r!==void 0&&(e.current=void 0,cancelAnimationFrame(r))},[]),n=x.useCallback(r=>{t(),e.current=requestAnimationFrame(s=>{e.current=void 0,r(s)})},[t]);return x.useEffect(()=>t,[t]),x.useMemo(()=>({dispose:t,request:n}),[t,n])}function zy({deltaX:e,deltaY:t,mapVerticalWheelToHorizontal:n,axisBehavior:r="dominant",mappedBehavior:s="dominant"}){if(n){let c;return s==="dominant"&&Math.abs(t)>Math.abs(e)?c=t:c=e||t,c===0?null:c}if(r==="raw")return e===0?null:e;const a=Math.abs(e),l=Math.abs(t);return e===0||a<=l?null:e}const iF="hover",sF=4,oF=20;class aF{constructor(){this._trackSize=0,this._viewportSize=0,this._scrollSize=0,this._scrollPosition=0,this._isScrollable=!1,this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0}setDimensions(t,n,r,s){const a=Math.round(t),l=Math.round(n),c=Math.round(r),p=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===p?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=p,this._recompute(),!0)}setScrollPosition(t){const n=Math.round(t);return this._scrollPosition===n?!1:(this._scrollPosition=n,this._thumbPosition=this._computeThumbPosition(),!0)}_recompute(){if(this._isScrollable=this._scrollSize>0&&this._viewportSize>0&&this._scrollSize>this._viewportSize,!this._isScrollable||this._trackSize<=0){this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0;return}const t=Math.floor(this._trackSize*this._viewportSize/this._scrollSize);this._thumbSize=Math.min(this._trackSize,Math.max(oF,t));const n=this._trackSize-this._thumbSize,r=this._scrollSize-this._viewportSize;this._thumbRatio=r>0?n/r:0,this._thumbPosition=this._computeThumbPosition()}_computeThumbPosition(){return!this._isScrollable||this._thumbRatio===0?0:Math.round(this._scrollPosition*this._thumbRatio)}isScrollable(){return this._isScrollable}getThumbSize(){return this._thumbSize}getThumbPosition(){return this._thumbPosition}getScrollPositionFromThumbDelta(t,n){return!this._isScrollable||this._thumbRatio===0?0:Math.round(n+t/this._thumbRatio)}getScrollPositionFromTrackOffset(t){if(!this._isScrollable||this._thumbRatio===0)return 0;const n=Math.max(0,Math.min(this._trackSize-this._thumbSize,t-this._thumbSize/2));return Math.round(n/this._thumbRatio)}}const il=class il{constructor(t){this.thumbInsetStart=0,this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null,this.resizeObserver=null,this.boundOnScroll=null,this.boundOnThumbDown=null,this.boundOnTrackDown=null,this.boundOnWheel=null,this.dragCleanup=null,this.pendingSyncThumbFrame=null,this.viewport=t.viewport,this.content=t.content,this.scrollbar=t.scrollbar,this.thumb=t.thumb,this.state=new aF,this.direction=t.direction,this.mapVerticalWheelToHorizontal=t.mapVerticalWheelToHorizontal??!1}get horizontal(){return this.direction==="horizontal"}attach(){this.attachScrollListener(),this.attachResizeObserver(),this.attachPointerEvents(),this.attachWheelForwarding(),this.scheduleSyncThumb()}detach(){this.detachScrollListener(),this.detachResizeObserver(),this.detachPointerEvents(),this.detachWheelForwarding(),this.pendingSyncThumbFrame!==null&&(cancelAnimationFrame(this.pendingSyncThumbFrame),this.pendingSyncThumbFrame=null),this.horizontalWheelResetTimer&&(clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=null),this.horizontalWheelAxisLock=null}attachScrollListener(){this.boundOnScroll=this.handleScroll.bind(this),this.viewport.addEventListener("scroll",this.boundOnScroll,{passive:!0})}detachScrollListener(){this.boundOnScroll&&(this.viewport.removeEventListener("scroll",this.boundOnScroll),this.boundOnScroll=null)}handleScroll(){const t=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop;if(this.state.setScrollPosition(t)){const n=this.state.getThumbPosition();this.thumb.style.transform=this.getThumbTransform(n)}}attachResizeObserver(){this.resizeObserver=new ResizeObserver(()=>this.scheduleSyncThumb()),this.resizeObserver.observe(this.viewport),this.resizeObserver.observe(this.content),this.resizeObserver.observe(this.scrollbar)}detachResizeObserver(){this.resizeObserver?.disconnect(),this.resizeObserver=null}scheduleSyncThumb(){this.pendingSyncThumbFrame===null&&(this.pendingSyncThumbFrame=requestAnimationFrame(()=>{this.pendingSyncThumbFrame=null,this.syncThumb()}))}syncThumb(){this.thumbInsetStart=this.getThumbInsetStart();const t=this.readDimensions();this.state.setDimensions(t.trackSize,t.viewportSize,t.scrollSize,t.scrollPos)&&this.applyThumbStyle()}readDimensions(){const t=Math.max(0,this.scrollbar.clientHeight-this.thumbInsetStart);return{trackSize:this.horizontal?this.scrollbar.clientWidth:t,viewportSize:this.horizontal?this.viewport.clientWidth:this.viewport.clientHeight,scrollSize:this.horizontal?this.viewport.scrollWidth:this.viewport.scrollHeight,scrollPos:this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop}}applyThumbStyle(){const t=this.state.getThumbSize(),n=this.state.getThumbPosition();this.horizontal?(this.thumb.style.width=`${t}px`,this.thumb.style.height="",this.thumb.style.transform=this.getThumbTransform(n)):(this.thumb.style.height=`${t}px`,this.thumb.style.width="",this.thumb.style.transform=this.getThumbTransform(n)),this.scrollbar.dataset.scrollable=this.state.isScrollable()?"true":"false"}attachPointerEvents(){this.boundOnThumbDown=this.handleThumbDown.bind(this),this.boundOnTrackDown=this.handleTrackDown.bind(this),this.thumb.addEventListener("pointerdown",this.boundOnThumbDown),this.scrollbar.addEventListener("pointerdown",this.boundOnTrackDown)}detachPointerEvents(){this.boundOnThumbDown&&(this.thumb.removeEventListener("pointerdown",this.boundOnThumbDown),this.boundOnThumbDown=null),this.boundOnTrackDown&&(this.scrollbar.removeEventListener("pointerdown",this.boundOnTrackDown),this.boundOnTrackDown=null),this.dragCleanup?.(),this.dragCleanup=null}handleThumbDown(t){if(t.button!==0)return;t.preventDefault();const n=this.horizontal?t.clientX:t.clientY,r=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop,s=t.pointerId;this.thumb.setPointerCapture(s),this.thumb.classList.add("ui-scroll-area__thumb--active");const a=c=>{const p=(this.horizontal?c.clientX:c.clientY)-n,d=this.state.getScrollPositionFromThumbDelta(p,r);this.horizontal?this.viewport.scrollLeft=d:this.viewport.scrollTop=d},l=()=>{this.thumb.classList.remove("ui-scroll-area__thumb--active");try{this.thumb.releasePointerCapture(s)}catch{}this.thumb.removeEventListener("pointermove",a),this.thumb.removeEventListener("pointerup",l),this.thumb.removeEventListener("pointercancel",l),this.dragCleanup=null};this.thumb.addEventListener("pointermove",a),this.thumb.addEventListener("pointerup",l),this.thumb.addEventListener("pointercancel",l),this.dragCleanup=l}handleTrackDown(t){if(t.button!==0||t.target===this.thumb)return;const n=this.scrollbar.getBoundingClientRect(),r=this.horizontal?t.clientX-n.left:t.clientY-n.top-this.thumbInsetStart,s=this.state.getScrollPositionFromTrackOffset(r);this.horizontal?this.viewport.scrollLeft=s:this.viewport.scrollTop=s}attachWheelForwarding(){this.boundOnWheel=t=>{if(this.horizontal){const n=this.viewport.scrollWidth-this.viewport.clientWidth;if(n<=0)return;let r=null;if(this.mapVerticalWheelToHorizontal)r=zy({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!0,mappedBehavior:"prefer-horizontal"});else{if(this.horizontalWheelAxisLock||(this.horizontalWheelAxisLock=Math.abs(t.deltaX)>Math.abs(t.deltaY)?"x":"y"),this.horizontalWheelResetTimer&&clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=setTimeout(()=>{this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null},il.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=zy({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!1,axisBehavior:"raw"}),r===null){t.preventDefault(),t.stopPropagation();return}}if(r===null)return;const s=Math.max(0,Math.min(n,this.viewport.scrollLeft+r));this.viewport.scrollLeft=s,t.preventDefault(),t.stopPropagation()}else this.viewport.scrollTop+=t.deltaY},this.scrollbar.addEventListener("wheel",this.boundOnWheel,{passive:!1})}detachWheelForwarding(){this.boundOnWheel&&(this.scrollbar.removeEventListener("wheel",this.boundOnWheel),this.boundOnWheel=null)}getThumbTransform(t){return this.horizontal?`translateX(${t}px)`:`translateY(${t+this.thumbInsetStart}px)`}getThumbInsetStart(){if(this.horizontal)return 0;const t=getComputedStyle(this.scrollbar).getPropertyValue(il.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};il.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",il.WHEEL_GESTURE_RESET_MS=150;let qp=il;const lF={base:{"--scrollbar-size":"ui-1ekbvf6","--scrollbar-inset":"ui-1logqu4","--scrollbar-thumb-top-offset":"ui-1fx8caa","--scroll-area-scroll-padding":"ui-8ddqcf",kVAEAm:"ui-1n2onr6",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",k1xSpc:"ui-rvj5dj",k52YG4:"ui-ypqxfk",$$css:!0}},Ku={base:{kJuA4N:"ui-175mniq",kAzted:"ui-2lwn1j",kskxy:"ui-mz0i5r",kaIpWk:"ui-1pjcqnp",kXHlph:"ui-6ikm8r",kORKVm:"ui-1odjw0f",kaPefq:"ui-1fu52t7",kC2sXz:"ui-1ufbpdf",k9lH4S:"ui-3oazx1",kphCe6:"ui-19l4kpp",kvh3hx:"ui-1t1jukp",kacamN:"ui-1e4zzel",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0},horizontal:{kXHlph:"ui-w2csxc",kORKVm:"ui-10wlt62",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kvh3hx:"ui-7p5m3t",kacamN:"ui-y5w88m",$$css:!0},both:{kXHlph:"ui-w2csxc",kORKVm:"ui-1odjw0f",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kZeWKH:"ui-ish69e",$$css:!0},maskGeometry:{kn1fP1:"ui-3b2oae",kJcbqH:"ui-16fucec",$$css:!0},mask:e=>[{kX1K2I:e!=null?"ui-wjwp01":e,kAExgp:e!=null?"ui-11jd449":e,$$css:!0},{"--x-maskImage":e??void 0,"--x-WebkitMaskImage":e??void 0}]};function uF(e,t,n,r){return`linear-gradient(to bottom, rgba(0, 0, 0, ${n}) 0px, black ${e}, black calc(100% - ${t}), rgba(0, 0, 0, ${r}) 100%)`}function cF(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}const zb={base:{kB7OPa:"ui-9f619",kzqmXN:"ui-eq5yr9",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-193iq5w",kAzted:"ui-1us19tq",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",$$css:!0},horizontal:{kzqmXN:"ui-14atkfc",kZKoxP:"ui-g7h5cd",kXwgrk:"ui-1q0g3np",$$css:!0},both:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-1x1rfll",kZKoxP:"ui-t7dq6l",kXwgrk:"ui-dt5ytf",$$css:!0}},zu={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1n327nk",k87sOh:"ui-16271f3",kCIrl2:"ui-zkb8sy",krVfgx:"ui-1c87l4o",kbCHJM:"ui-1t8mvi6",kzqmXN:"ui-790ffn",kfzvcC:"ui-67bb7w",k1xSpc:"ui-1lliihq ui-y36ywk",$$css:!0},horizontal:{k87sOh:"ui-80663w",kCIrl2:"ui-zkb8sy",krVfgx:"ui-1gncbth",kbCHJM:"ui-17roi93",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",$$css:!0},bothVertical:{krVfgx:"ui-1143y87",$$css:!0},bothHorizontal:{kCIrl2:"ui-1u4w851",$$css:!0},visibilityNever:{k1xSpc:"ui-1s85apg",$$css:!0}},Lb={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kCIrl2:"ui-3m8u43",krVfgx:"ui-dd4er5",kbCHJM:"ui-u96u03",kAzted:"ui-4jlmx6",kzqmXN:"ui-790ffn",kaIpWk:"ui-1i4c3av",kWkggS:"ui-1m4ooaa ui-1kik0b9 ui-19p5jqy ui-gk890x",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w",k3aq6I:"ui-oww4n8",k1ekBW:"ui-1e8aii2",kIyJzY:"ui-1vaoic9 ui-144st5w",kAMwcw:"ui-1aiz5cx",$$css:!0},horizontal:{k87sOh:"ui-13vifvy",kCIrl2:"ui-wukr4l",krVfgx:"ui-1ey2m1c",kbCHJM:"ui-u96u03",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",kAzted:"ui-65nank",k7Eaqz:"ui-cbmsab",$$css:!0},hoverHidden:{kSiTet:"ui-g01cxk ui-4gyw5p ui-gorybd",$$css:!0}};function fF(){return lF.base}function dF({direction:e,masked:t}){return[Ku.base,e==="horizontal"?Ku.horizontal:null,e==="both"?Ku.both:null,t?Ku.maskGeometry:null]}function pF(e){return[zb.base,e==="horizontal"?zb.horizontal:null,e==="both"?zb.both:null]}function b1({direction:e,orientation:t,visibility:n}){return[zu.base,t==="horizontal"?zu.horizontal:null,e==="both"&&t==="vertical"?zu.bothVertical:null,e==="both"&&t==="horizontal"?zu.bothHorizontal:null,n==="never"?zu.visibilityNever:null]}function y1(e,t){return[Lb.base,e==="horizontal"?Lb.horizontal:null,t?Lb.hoverHidden:null]}const hF=1e4,Fd=5,yA=x.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:p,contentStyle:d,overlay:h,style:m,scrollbarVisibility:g=iF,isScrollbarRevealed:y=!1,direction:k="vertical",topFadeSize:w,bottomFadeSize:_,topFadeStartOpacity:E=0,bottomFadeStartOpacity:R=0,autoScrollToBottom:T=!1,scrollTrigger:C,autoScrollPauseTimeout:A=hF,onScrollStateChange:N,mapVerticalWheelToHorizontal:I=!1,scrollPadding:H=sF,scrollbarInset:$,onPointerEnter:L,onPointerLeave:K,...Z},q){const z=x.useRef(null),j=x.useRef(null),F=x.useRef(null),U=x.useRef(null),P=x.useRef(null),W=x.useRef(null),D=x.useRef(null),B=k!=="horizontal",G=k!=="vertical",O=I&&!B,[ie,te]=x.useState(!1),[ne,le]=x.useState(!1),[pe,ye]=x.useState(!1),Se=x.useRef(!1);Se.current=pe;const ze=x.useRef(0),he=x.useRef(0),Te=x.useRef(null),Re=x.useRef(null);x.useLayoutEffect(()=>{const Fe=j.current,Ke=F.current;if(!Fe||!Ke)return;const ht=[];if(B){const Xe=U.current,Y=P.current;Xe&&Y&&ht.push(new qp({viewport:Fe,content:Ke,scrollbar:Xe,thumb:Y,direction:"vertical",mapVerticalWheelToHorizontal:O}))}if(G){const Xe=W.current,Y=D.current;Xe&&Y&&ht.push(new qp({viewport:Fe,content:Ke,scrollbar:Xe,thumb:Y,direction:"horizontal",mapVerticalWheelToHorizontal:O}))}if(ht.length!==0){for(const Xe of ht)Xe.attach();return()=>{for(const Xe of ht)Xe.detach()}}},[B,G,O]);const Oe=x.useCallback(()=>{const Fe=j.current;return Fe?{scrollTop:Fe.scrollTop,scrollHeight:Fe.scrollHeight,clientHeight:Fe.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),ve=x.useCallback((Fe=!1)=>{const Ke=j.current;Ke&&Ke.scrollTo({top:Ke.scrollHeight,behavior:Fe?"smooth":"instant"})},[]),xe=x.useCallback((Fe=!1)=>{const Ke=j.current;Ke&&Ke.scrollTo({top:0,behavior:Fe?"smooth":"instant"})},[]),Me=x.useCallback(()=>{Re.current===null&&(Re.current=requestAnimationFrame(()=>{Re.current=null,!Se.current&&ve(!1)}))},[ve]),Ce=x.useCallback(()=>{T&&(Se.current||Me())},[T,Me]);x.useImperativeHandle(q,()=>({scrollToBottom:ve,scrollToTop:xe,requestAutoScroll:Ce,getScrollPosition:Oe,get rootElement(){return z.current},get viewportElement(){return j.current}}),[ve,xe,Ce,Oe]);const Pe=x.useCallback(()=>{const Fe=j.current;if(!Fe)return;const{scrollTop:Ke,scrollHeight:ht,clientHeight:Xe}=Fe,{isAtTop:Y,isAtBottom:X}=cF({scrollTop:Ke,scrollHeight:ht,clientHeight:Xe,threshold:Fd});te(!Y),le(!X),N?.({isAtBottom:X,isAtTop:Y}),X&&Se.current&&(ye(!1),Te.current&&(clearTimeout(Te.current),Te.current=null));const we=ht<he.current-Fd,Ge=ht>he.current+Fd,ct=Ke<ze.current-Fd;ct&&!we&&!X&&T&&!Se.current&&(ye(!0),Te.current&&clearTimeout(Te.current),Te.current=setTimeout(()=>{ye(!1),Te.current=null},A)),Ge&&T&&!Se.current&&!X&&!ct&&Me(),we&&T&&!Se.current&&!X&&Me(),ze.current=Ke,he.current=ht},[N,T,A,Me]),ge=rF(),fe=x.useCallback(()=>{ge.request(Pe)},[ge,Pe]);x.useEffect(()=>{const Fe=j.current,Ke=F.current;if(!Fe)return;const ht=()=>{fe()};Fe.addEventListener("scroll",ht,{passive:!0});const Xe=new ResizeObserver(Pe);return Xe.observe(Fe),Ke&&Xe.observe(Ke),()=>{Fe.removeEventListener("scroll",ht),Xe.disconnect(),ge.dispose()}},[Pe,fe,ge]),x.useEffect(()=>{C!==void 0&&T&&(Se.current||Me())},[C,T,Me]),x.useEffect(()=>{if(!B)return;const Fe=j.current;if(!Fe)return;const Ke=ht=>{const Xe=ht.deltaY;if(Xe===0)return;const Y=Fe.scrollHeight-Fe.clientHeight;if(Y<=0)return;const X=Fe.scrollTop,we=X<=0&&Xe<0,Ge=X>=Y-.5&&Xe>0;we||Ge||ht.stopPropagation()};return Fe.addEventListener("wheel",Ke,{passive:!0}),()=>Fe.removeEventListener("wheel",Ke)},[B]),x.useEffect(()=>{if(!G)return;const Fe=j.current;if(!Fe)return;const Ke=Xe=>{const Y=zy({deltaX:Xe.deltaX,deltaY:Xe.deltaY,mapVerticalWheelToHorizontal:O});if(Y===null)return;const X=Fe.scrollWidth-Fe.clientWidth;if(X<=0)return;const we=Fe.scrollLeft;if(!(Y<0&&we<=0)&&!(Y>0&&we>=X-.5)){if(!O){Xe.stopPropagation();return}Xe.preventDefault(),Fe.scrollLeft=we+Y}},ht=O?{passive:!1,capture:!0}:{passive:!0,capture:!0};return Fe.addEventListener("wheel",Ke,ht),()=>Fe.removeEventListener("wheel",Ke,ht)},[G,O]);const oe=w!==void 0||_!==void 0,re=w??24,_e=_??24,J=g==="hover",[ue,Ie]=x.useState(!1);x.useLayoutEffect(()=>{J&&Ie(z.current?.matches(":hover")??!1)},[J]);const Be=x.useCallback(Fe=>{Ie(!0),L?.(Fe)},[L]),Ze=x.useCallback(Fe=>{Ie(!1),K?.(Fe)},[K]),Ye=J&&!ue&&!y;x.useEffect(()=>()=>{Te.current&&clearTimeout(Te.current),Re.current!==null&&(cancelAnimationFrame(Re.current),Re.current=null)},[]);const ot={"--scroll-area-scroll-padding":`${H}px`,...$!==void 0?{"--scrollbar-inset":`${$}px`}:void 0},it=wn({rootClass:"ui-scroll-area",stylexStyles:[fF(),c],className:Sn(oe&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...ot,...m}}),nt=wn({rootClass:"ui-scroll-area__viewport",stylexStyles:[dF({direction:k,masked:oe}),p,oe?Ku.mask(uF(ie?`${re}px`:"0px",ne?`${_e}px`:"0px",E,R)):null],className:l}),vt=wn({rootClass:"ui-scroll-area__content",stylexStyles:[pF(k),d]}),st=wn({rootClass:"ui-scroll-area__scrollbar",stylexStyles:b1({direction:k,orientation:"vertical",visibility:g})}),xt=An(y1("vertical",Ye)),We=wn({rootClass:"ui-scroll-area__scrollbar",stylexStyles:b1({direction:k,orientation:"horizontal",visibility:g})}),Ot=An(y1("horizontal",Ye));return v.jsxs("div",{ref:z,className:it.className,style:it.style,"data-scroll-padding":H,"data-visibility":g,"data-direction":k,...Z,onPointerEnter:J?Be:L,onPointerLeave:J?Ze:K,children:[v.jsx("div",{ref:j,className:nt.className,style:nt.style,children:v.jsx("div",{ref:F,className:vt.className,style:vt.style,children:t})}),h,B&&v.jsx("div",{ref:U,className:st.className,style:st.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:v.jsx("div",{ref:P,className:xt.className,style:xt.style,"data-orientation":"vertical"})}),G&&v.jsx("div",{ref:W,className:We.className,style:We.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:v.jsx("div",{ref:D,className:Ot.className,style:Ot.style,"data-orientation":"horizontal"})})]})}),Hp=x.createContext(!1);function vA({children:e,dismiss:t}){const n=x.use(Hp);return v.jsx(Hp.Provider,{value:n||t,children:e})}function Ly(e,t,n){const[r,s]=x.useState(t),a=e!==void 0?e:r,l=x.useCallback(c=>{const p=typeof c=="function"?c(a):c;e===void 0&&s(p),n?.(p)},[e,a,n]);return[a,l]}const jb={fontFamily:{sans:"var(--cursor-font-family, var(--vscode-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif))",mono:"var(--cursor-font-family-mono, var(--monaco-monospace-font, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace))"},scrollbar:{verticalSize:"var(--vscode-scrollbar-vertical-size, 14px)",horizontalSize:"var(--vscode-scrollbar-horizontal-size, 12px)",thumbBackground:"var(--vscode-scrollbarSlider-background)",thumbHoverBackground:"var(--vscode-scrollbarSlider-hoverBackground)",thumbActiveBackground:"var(--vscode-scrollbarSlider-activeBackground)"},syntax:{foreground:"#d6d6dd",background:"#181818",keyword:"#82d2ce",string:"#e394dc",function:"#efb080",number:"#ebc88d",comment:"#E4E4E45E",constant:"#f8c762",parameter:"#d6d6dd",punctuation:"#d6d6dd",link:"#87c3ff",stringExpression:"#e394dc"}},mF={1:1,2:2},jy={instant:50,fast:100,normal:150,slow:200,slower:300},xA={default:"ease",in:"ease-in",out:"ease-out",inOut:"ease-in-out",inStrong:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",outStrong:"cubic-bezier(0.165, 0.84, 0.44, 1)",outQuint:"cubic-bezier(0.16, 1, 0.3, 1)",inOutStrong:"cubic-bezier(0.77, 0, 0.175, 1)"},gF={"ne-0.25":-1,"ne-0.5":-2,"ne-0.75":-3,"ne-1":-4,"ne-1.25":-5,"ne-1.5":-6,"ne-1.75":-7,"ne-2":-8,"ne-2.25":-9,"ne-2.5":-10,"ne-2.75":-11,"ne-3":-12,"ne-3.25":-13,"ne-3.5":-14,"ne-3.75":-15,"ne-4":-16,"ne-4.25":-17,"ne-4.5":-18,"ne-4.75":-19,"ne-5":-20,"0.25":1,"0.5":2,"0.75":3,1:4,"1.25":5,"1.5":6,"1.75":7,2:8,"2.25":9,"2.5":10,"2.75":11,3:12,"3.25":13,"3.5":14,"3.75":15,4:16,"4.25":17,"4.5":18,"4.75":19,5:20,"5.5":22,6:24,"6.5":26,7:28,"7.5":30,8:32,"8.5":34,9:36,"9.5":38,10:40,11:44,12:48,13:52,14:56,15:60,16:64,17:68,18:72,19:76,20:80},bF={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,full:9999},yF={xs:20,sm:24,base:28,lg:32},vF={xs:11,sm:12,base:13,lg:14},xF={xs:14,sm:16,base:18,lg:20},kF={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},SF=.98,wF=2,v1={open:jy.fast,close:jy.fast},EF=xA.outQuint;function kA(e){const[t,n]=e.split("-");switch(t){case"top":case"right":case"bottom":case"left":return{side:t,alignment:n==="start"||n==="end"?n:void 0};default:throw new Error(`Unsupported floating placement: ${e}`)}}function TF(e){const{side:t,alignment:n}=kA(e);switch(t){case"top":return`${x1(n)} bottom`;case"right":return`left ${k1(n)}`;case"bottom":return`${x1(n)} top`;case"left":return`right ${k1(n)}`}}function _F(e,t={}){const{side:n}=kA(e),r=t.offset??wF,s=t.scale??SF;switch(n){case"top":return`translate3d(0, ${r}px, 0) scale(${s})`;case"right":return`translate3d(-${r}px, 0, 0) scale(${s})`;case"bottom":return`translate3d(0, -${r}px, 0) scale(${s})`;case"left":return`translate3d(${r}px, 0, 0) scale(${s})`}}function RF(e,t){return{opacity:0,transform:_F(e,t)}}function CF(e){return{transformOrigin:TF(e),transitionTimingFunction:EF}}function AF({closeDuration:e=v1.close,transform:t}={}){return{duration:{open:v1.open,close:e},initial:({placement:n})=>RF(n,t),common:({placement:n})=>CF(n)}}function x1(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function k1(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}function NF(){const e=x.useRef(!0),t=x.useRef(void 0),n=x.useCallback(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),r=x.useCallback((s,a)=>{e.current&&(n(),t.current=setTimeout(()=>{t.current=void 0,s()},a))},[n]);return x.useEffect(()=>(e.current=!0,()=>{e.current=!1,n()}),[n]),x.useMemo(()=>({cancel:n,schedule:r}),[n,r])}const OF=300,SA=x.createContext(null);function wA({children:e}){const[t,n]=x.useState(null),r=NF(),s=x.useCallback(c=>{r.cancel(),n(c)},[r]),a=x.useCallback(c=>{r.schedule(()=>{n(p=>p===c?null:p)},OF)},[r]),l=x.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return v.jsx(SA.Provider,{value:l,children:e})}function MF(e,t){const n=x.useContext(SA),r=n?.markOpen,s=n?.markClosed;return x.useEffect(()=>{if(!(!t||e==null||r==null||s==null))return r(e),()=>s(e)},[t,e,r,s]),{activeId:n?.activeId??null}}const Il="data-ui-menu-item-region",EA=x.createContext("body");function tc({value:e,children:t}){return v.jsx(EA.Provider,{value:e,children:t})}function Xc(){return x.useContext(EA)}const IF='[role="menuitem"]',S1=["pointermove","mousemove"];function TA(e){if(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="Home"||e.key==="End")return!0;if(!e.ctrlKey||e.metaKey)return!1;const t=e.key.toLowerCase();return t==="n"||t==="p"}function DF(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function zF(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(Il)===t)return r;return null}function _A(e,t,n){queueMicrotask(()=>{const r=zF(e,t);n(r??null)})}function RA(e,t){if(!(e instanceof Element))return null;const n=e.closest(IF);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function LF(e,t){if(!e)return()=>{};for(const n of S1)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of S1)e.removeEventListener(n,t)}}function w1({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=DF(r,n);if(!a)return!1;e.preventDefault(),e.stopPropagation();const l=document.activeElement===e.currentTarget;return a.focus(),a.dispatchEvent(new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0})),l&&document.activeElement===a&&s?.(),!0}function CA(){const[e,t]=x.useState(!0),n=x.useCallback(()=>{t(!1)},[]),r=x.useCallback(()=>{t(!0)},[]),s=x.useCallback(()=>{t(!0)},[]);return{focusItemOnHoverEnabled:e,markKeyboardNavigation:n,markPointerNavigation:r,resetFocusItemOnHover:s}}const jF=50;function PF(e,t){x.useLayoutEffect(()=>{if(!e)return;const n=t.current;if(!(n instanceof HTMLElement))return;const r=n.closest('[role="menu"]');if(r!=null)return r.style.pointerEvents="none",n.style.pointerEvents="auto",()=>{r.style.pointerEvents="",n.style.pointerEvents=""}},[e,t])}function $F(){return{name:"bottomAnchor",fn({y:e,placement:t,rects:n,elements:r}){if(!t.startsWith("top"))return{};const s=r.floating.offsetParent,a=s===document.body&&window.getComputedStyle(s).position==="static";return{data:{bottom:(!s||s===document.documentElement||a?document.documentElement.clientHeight||window.innerHeight:s.clientHeight)-e-n.floating.height}}}}}function Ih(e=200){const t=x.useRef(0);return x.useEffect(()=>{const n=()=>{t.current=Date.now()+e};return window.addEventListener("focus",n),()=>{window.removeEventListener("focus",n)}},[e]),x.useCallback(n=>{const r=n.target,s=r instanceof Node?r.ownerDocument:document,a=Date.now(),l=s?.hasFocus()??document.hasFocus(),c=a>=t.current;return l&&c},[])}const BF={open:0,close:0},FF={opacity:1,transform:"none"},ex=x.createContext(null);function Ci(){const e=x.useContext(ex);if(!e)throw new Error("Menu components must be used within <Menu>");return e}function UF({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:p=!0,closeOnSelect:d,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:g=!0,focusItemOnOpen:y=!1,virtualFocus:k=!1,shouldKeepOpenDuringDrag:w=!1,lockPositionWhileOpen:_=!1,enableClick:E=!0,strategy:R}){const T=DC(),[C,A]=Ly(t,n,r),[N,I]=x.useState(""),H=x.useRef(null),[$,L]=x.useState(!1),[K,Z]=x.useState(!1),[q,z]=Ly(s,null,a),{focusItemOnHoverEnabled:j,markKeyboardNavigation:F,markPointerNavigation:U,resetFocusItemOnHover:P}=CA(),W=x.useRef([]),D=x.useRef([]),B=x.useRef(null),G=x.useCallback(_e=>{A(_e),_e?(I(""),B.current=null):z(null),P()},[P,A,z]),O=x.useRef(!1);x.useEffect(()=>{const _e=O.current;O.current=C,!_e&&C&&I(""),_e!==C&&P()},[C,P]);const{refs:ie,floatingStyles:te,middlewareData:ne,context:le,update:pe}=UC({nodeId:T,open:C,onOpenChange:G,placement:l,strategy:R,middleware:[Iv(c),...p?[zv()]:[],Dv(),Lv({padding:8,apply({availableHeight:_e,elements:J}){J.floating.style.setProperty("--ui-menu-available-height",`${Math.max(0,Math.floor(_e))}px`)}}),$F()],whileElementsMounted:_?void 0:Np,transform:!1}),ye=LC(le,{enabled:K,delay:{open:75},handleClose:WC({blockPointerEvents:!0,requireIntent:!1})}),Se=BC(le,{enabled:E&&!K}),ze=Ih(),he=x.useCallback(_e=>w&&di.getInstance().hasData()?!1:ze(_e),[w,ze]),Te=FC(le,{outsidePressEvent:"click",outsidePress:he}),Re=GC(le,{role:"menu"}),Oe=HC(le,{listRef:W,activeIndex:q,onNavigate:z,loop:!1,virtual:k||$,focusItemOnOpen:y,focusItemOnHover:j}),ve=KC(le,{listRef:D,activeIndex:q,onMatch:$?void 0:z,enabled:!$}),{getReferenceProps:xe,getFloatingProps:Me,getItemProps:Ce}=qC([ye,Se,Te,Re,Oe,ve]),Pe=x.useCallback(_e=>({...xe(_e),ref:ie.setReference,"aria-haspopup":"menu","aria-expanded":C}),[xe,ie.setReference,C]),ge=m?{duration:BF,initial:FF}:AF(h?{closeDuration:0}:void 0),{isMounted:fe,styles:oe}=VC(le,ge),re=x.useMemo(()=>({isOpen:C,isMounted:fe,setIsOpen:A,activeIndex:q,setActiveIndex:z,markKeyboardNavigation:F,markPointerNavigation:U,virtualFocus:k,searchValue:N,setSearchValue:I,hasSearchInput:$,setHasSearchInput:L,enableHover:K,setHasHoverTrigger:Z,closeOnSelect:d,returnFocusOnSelect:g,nodeId:T,listRef:W,labelsRef:D,searchInputRef:H,refs:ie,floatingStyles:te,middlewareData:ne,transitionStyles:oe,context:le,updateFloating:pe,getReferenceProps:xe,getFloatingProps:Me,getItemProps:Ce,getTriggerProps:Pe,dismissCauseRef:B,shouldAllowPointerInteraction:he}),[C,fe,A,q,z,F,U,k,N,$,K,d,g,T,ie,te,ne,oe,le,pe,xe,Me,Ce,Pe,he]);return v.jsx(zC,{id:T,children:v.jsx(ex.Provider,{value:re,children:v.jsx(wA,{children:e})})})}const AA=x.createContext(null);function Qc(){const e=x.useContext(AA);if(!e)throw new Error("MenuItem must be used within Menu.Content or Menu.SubContent");return e}function NA({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1}){const c=x.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l}),[t,n,r,s,a,l]);return v.jsx(AA.Provider,{value:c,children:e})}const OA=x.createContext(void 0);function Dh(e){const t=x.useContext(OA);if(t===void 0&&!e)throw new Error(Xn(72));return t}const qF={...cj,disabled:rt(e=>e.disabled),instantType:rt(e=>e.instantType),isInstantPhase:rt(e=>e.isInstantPhase),trackCursorAxis:rt(e=>e.trackCursorAxis),disableHoverablePopup:rt(e=>e.disableHoverablePopup),lastOpenChangeReason:rt(e=>e.openChangeReason),closeOnClick:rt(e=>e.closeOnClick),closeDelay:rt(e=>e.closeDelay),hasViewport:rt(e=>e.hasViewport)};class zh extends YR{constructor(t){super({...HF(),...t},{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new $v},qF)}setOpen=(t,n)=>{const r=n.reason,s=r===li,a=t&&r===dp,l=!t&&(r===ml||r===Ev);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);const c=()=>{const p={open:t,openChangeReason:r};a?p.instantType="focus":l?p.instantType="dismiss":r===li&&(p.instantType=void 0);const d=n.trigger?.id??null;(d||t)&&(p.activeTriggerId=d,p.activeTriggerElement=n.trigger??null),this.update(p)};s?Ri.flushSync(c):c()};static useStore(t,n){const r=wr(()=>new zh(n)).current,s=t??r,a=dj({popupStore:s,onOpenChange:s.setOpen});return s.state.floatingRootContext=a,s}}function HF(){return{...uj(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const MA=ZR(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:p,onOpenChangeComplete:d,handle:h,triggerId:m,defaultTriggerId:g=null,children:y}=t,k=zh.useStore(h?.store,{open:r,openProp:s,activeTriggerId:g,triggerIdProp:m});sC(()=>{s===void 0&&k.state.open===!1&&r===!0&&k.update({open:!0,activeTriggerId:g})}),k.useControlledProp("openProp",s),k.useControlledProp("triggerIdProp",m),k.useContextCallback("onOpenChange",p),k.useContextCallback("onOpenChangeComplete",d);const w=k.useState("open"),_=!n&&w,E=k.useState("activeTriggerId"),R=k.useState("payload");k.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),He(()=>{w&&n&&k.setOpen(!1,_t(dL))},[w,n,k]),k.useSyncedValue("disabled",n),oj(k);const{forceUnmount:T,transitionStatus:C}=aj(_,k),A=k.select("floatingRootContext"),N=k.useState("isInstantPhase"),I=k.useState("instantType"),H=k.useState("lastOpenChangeReason"),$=x.useRef(null);He(()=>{C==="ending"&&H===Ss||C!=="ending"&&N?(I!=="delay"&&($.current=I),k.set("instantType","delay")):$.current!==null&&(k.set("instantType",$.current),$.current=null)},[C,N,H,I,k]),He(()=>{_&&E==null&&k.set("payload",void 0)},[k,E,_]);const L=x.useCallback(()=>{k.setOpen(!1,GF(k,gy))},[k]);x.useImperativeHandle(c,()=>({unmount:T,close:L}),[T,L]);const K=LR(A,{enabled:!n,referencePress:()=>k.select("closeOnClick")}),Z=i2(A,{enabled:!n&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:q,getFloatingProps:z,getTriggerProps:j}=tC([K,Z]),F=x.useMemo(()=>q(),[q]),U=x.useMemo(()=>j(),[j]),P=x.useMemo(()=>z(),[z]);return k.useSyncedValues({activeTriggerProps:F,inactiveTriggerProps:U,popupProps:P}),v.jsx(OA.Provider,{value:k,children:typeof y=="function"?y({payload:R}):y})});function GF(e,t){const n=_t(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const VF=x.createContext(void 0);function KF(){return x.useContext(VF)}let ZF=(function(e){return e[e.popupOpen=Ep.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const WF=600,IA=W2(function(t,n){const{className:r,render:s,handle:a,payload:l,disabled:c,delay:p,closeOnClick:d=!0,closeDelay:h,id:m,style:g,...y}=t,k=Dh(!0),w=a?.store??k;if(!w)throw new Error(Xn(82));const _=mh(m),E=w.useState("isTriggerActive",_),R=w.useState("isOpenedByTrigger",_),T=w.useState("floatingRootContext"),C=x.useRef(null),A=p??WF,N=h??0,{registerTrigger:I,isMountedByThisTrigger:H}=sj(_,C,w,{payload:l,closeOnClick:d,closeDelay:N}),$=KF(),{delayRef:L,isInstantPhase:K,hasProvider:Z}=wL(T,{open:R});w.useSyncedValue("isInstantPhase",K);const q=w.useState("disabled"),z=c??q,j=w.useState("trackCursorAxis"),F=w.useState("disableHoverablePopup"),U=gj(T,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!F&&j!=="both"?Tj():null,restMs(){const G=$?.delay,O=typeof L.current=="object"?L.current.open:void 0;let ie=A;return Z&&(O!==0?ie=p??G??A:ie=0),ie},delay(){const G=typeof L.current=="object"?L.current.close:void 0;let O=N;return h==null&&Z&&(O=G),{close:O}},triggerElementRef:C,isActiveTrigger:E,isClosing:()=>w.select("transitionStatus")==="ending"}),P=pj(T,{enabled:!z}).reference,W={open:R},D=w.useState("triggerProps",H);return vn("button",t,{state:W,ref:[n,I,C],props:[U,P,D,{onPointerDown(){w.set("closeOnClick",d)},id:_,[ZF.triggerDisabled]:z?"":void 0},y],stateAttributesMapping:Qz})}),DA=x.createContext(void 0);function YF(){const e=x.useContext(DA);if(e===void 0)throw new Error(Xn(70));return e}const XF=x.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...p}=t,{portalNode:d,portalSubtree:h}=zR({container:s,ref:n,componentProps:t,elementProps:p});return!h&&!d?null:v.jsxs(x.Fragment,{children:[h,d&&Ri.createPortal(r,d)]})}),zA=x.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Dh().useState("mounted")||r?v.jsx(DA.Provider,{value:r,children:v.jsx(XF,{ref:n,...s})}):null}),LA=x.createContext(void 0);function QF(){const e=x.useContext(LA);if(e===void 0)throw new Error(Xn(71));return e}const JF=x.createContext(void 0);function tx(){return x.useContext(JF)?.direction??"ltr"}const eU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:p}=t,{element:d,padding:h=0,offsetParent:m="real"}=ws(e,t)||{};if(d==null)return{};const g=bR(h),y={x:n,y:r},k=Av(s),w=Cv(k),_=await l.getDimensions(d),E=k==="y",R=E?"top":"left",T=E?"bottom":"right",C=E?"clientHeight":"clientWidth",A=a.reference[w]+a.reference[k]-y[k]-a.floating[w],N=y[k]-a.reference[k],I=m==="real"?await l.getOffsetParent?.(d):c.floating;let H=c.floating[C]||a.floating[w];(!H||!await l.isElement?.(I))&&(H=c.floating[C]||a.floating[w]);const $=A/2-N/2,L=H/2-_[w]/2-1,K=Math.min(g[R],L),Z=Math.min(g[T],L),q=K,z=H-_[w]-Z,j=H/2-_[w]/2+$,F=xy(q,j,z),U=!p.arrow&&mo(s)!=null&&j!==F&&a.reference[w]/2-(j<q?K:Z)-_[w]/2<0,P=U?j<q?j-q:j-z:0;return{[k]:y[k]+P,data:{[k]:F,centerOffset:j-F-P,...U&&{alignmentOffset:P}},reset:U}}}),tU=(e,t)=>({...eU(e),options:[e,t]}),nU={name:"hide",async fn(e){const{width:t,height:n,x:r,y:s}=e.rects.reference,a=t===0&&n===0&&r===0&&s===0;return{data:{referenceHidden:(await U2().fn(e)).data?.referenceHidden||a}}}},bp={sideX:"left",sideY:"top"},rU={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,p=yn(s),d=p.getComputedStyle(s);if(!(d.transitionDuration!=="0s"&&d.transitionDuration!==""))return{x:t,y:n,data:bp};const m=await a.getOffsetParent?.(s);let g={width:0,height:0};if(l==="fixed"&&p?.visualViewport)g={width:p.visualViewport.width,height:p.visualViewport.height};else if(m===p){const R=Ft(s);g={width:R.documentElement.clientWidth,height:R.documentElement.clientHeight}}else await a.isElement?.(m)&&(g=await a.getDimensions(m));const y=jr(c);let k=t,w=n;y==="left"&&(k=g.width-(t+r.width)),y==="top"&&(w=g.height-(n+r.height));const _=y==="left"?"right":bp.sideX,E=y==="top"?"bottom":bp.sideY;return{x:k,y:w,data:{sideX:_,sideY:E}}}};function jA(e,t,n){const 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 E1(e,t,n){const{rects:r,placement:s}=e;return{side:jA(t,jr(s),n),align:mo(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function PA(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:p=5,sticky:d=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,keepMounted:g=!1,floatingRootContext:y,mounted:k,collisionAvoidance:w,shiftCrossAxis:_=!1,nodeId:E,adaptiveOrigin:R,lazyFlip:T=!1,externalTree:C}=e,[A,N]=x.useState(null);!k&&A!==null&&N(null);const I=w.side||"flip",H=w.align||"flip",$=w.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,K=Ve(L),Z=L?K:t,q=qn(t),z=qn(k),F=tx()==="rtl",U=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":F?"left":"right","inline-start":F?"right":"left"}[r],P=a==="center"?U:`${U}-${a}`;let W=p;const D=1,B=r==="bottom"?D:0,G=r==="top"?D:0,O=r==="right"?D:0,ie=r==="left"?D:0;typeof W=="number"?W={top:W+B,right:W+ie,bottom:W+G,left:W+O}:W&&(W={top:(W.top||0)+B,right:(W.right||0)+ie,bottom:(W.bottom||0)+G,left:(W.left||0)+O});const te={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:W},ne=x.useRef(null),le=qn(s),pe=qn(l),ze=[Iv(We=>{const Ot=E1(We,r,F),Fe=typeof le.current=="function"?le.current(Ot):le.current,Ke=typeof pe.current=="function"?pe.current(Ot):pe.current;return{mainAxis:Fe,crossAxis:Ke,alignmentAxis:Ke}},[typeof s!="function"?s:0,typeof l!="function"?l:0,F,r])],he=H==="none"&&I!=="shift",Te=!he&&(d||_||I==="shift"),Re=I==="none"?null:zv({...te,padding:{top:W.top+D,right:W.right+D,bottom:W.bottom+D,left:W.left+D},mainAxis:!_&&I==="flip",crossAxis:H==="flip"?"alignment":!1,fallbackAxisSideDirection:$}),Oe=he?null:Dv(We=>{const Ot=Ft(We.elements.floating).documentElement;return{...te,rootBoundary:_?{x:0,y:0,width:Ot.clientWidth,height:Ot.clientHeight}:void 0,mainAxis:H!=="none",crossAxis:Te,limiter:d||_?void 0:F2(Fe=>{if(!ne.current)return{};const{width:Ke,height:ht}=ne.current.getBoundingClientRect(),Xe=fi(jr(Fe.placement)),Y=Xe==="y"?Ke:ht,X=Xe==="y"?W.left+W.right:W.top+W.bottom;return{offset:Y/2+X/2}})}},[te,d,_,W,H]);I==="shift"||H==="shift"||a==="center"?ze.push(Oe,Re):ze.push(Re,Oe),ze.push(Lv({...te,apply({elements:{floating:We},availableWidth:Ot,availableHeight:Fe,rects:Ke}){if(!z.current)return;const ht=We.style;ht.setProperty("--available-width",`${Ot}px`),ht.setProperty("--available-height",`${Fe}px`);const Xe=yn(We).devicePixelRatio||1,{x:Y,y:X,width:we,height:Ge}=Ke.reference,ct=(Math.round((Y+we)*Xe)-Math.round(Y*Xe))/Xe,St=(Math.round((X+Ge)*Xe)-Math.round(X*Xe))/Xe;ht.setProperty("--anchor-width",`${ct}px`),ht.setProperty("--anchor-height",`${St}px`)}}),tU(()=>({element:ne.current||Ft(ne.current).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(We){const{elements:Ot,middlewareData:Fe,placement:Ke,rects:ht,y:Xe}=We,Y=jr(Ke),X=fi(Y),we=ne.current,Ge=Fe.arrow?.x||0,ct=Fe.arrow?.y||0,St=we?.clientWidth||0,$e=we?.clientHeight||0,Le=Ge+St/2,qe=ct+$e/2,Wt=Math.abs(Fe.shift?.y||0),tt=ht.reference.height/2,Dt=typeof s=="function"?s(E1(We,r,F)):s,Kn=Wt>Dt,Qn={top:`${Le}px calc(100% + ${Dt}px)`,bottom:`${Le}px ${-Dt}px`,left:`calc(100% + ${Dt}px) ${qe}px`,right:`${-Dt}px ${qe}px`}[Y],Tn=`${Le}px ${ht.reference.y+tt-Xe}px`;return Ot.floating.style.setProperty("--transform-origin",Te&&X==="y"&&Kn?Tn:Qn),{}}},nU,R),He(()=>{!k&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[k,y]);const ve=x.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:xe,elements:Me,x:Ce,y:Pe,middlewareData:ge,update:fe,placement:oe,context:re,isPositioned:_e,floatingStyles:J}=fj({rootContext:y,open:g?k:void 0,placement:P,middleware:ze,strategy:n,whileElementsMounted:g?void 0:(...We)=>Np(...We,ve),nodeId:E,externalTree:C}),{sideX:ue,sideY:Ie}=ge.adaptiveOrigin||bp,Be=_e?n:"fixed",Ze=x.useMemo(()=>{const We=R?{position:Be,[ue]:Ce,[Ie]:Pe}:{position:Be,...J};return _e||(We.opacity=0),We},[R,Be,ue,Ce,Ie,Pe,J,_e]),Ye=x.useRef(null);He(()=>{if(!k)return;const We=q.current,Ot=typeof We=="function"?We():We,Ke=(T1(Ot)?Ot.current:Ot)||null||null;Ke!==Ye.current&&(xe.setPositionReference(Ke),Ye.current=Ke)},[k,xe,Z,q]),x.useEffect(()=>{if(!k)return;const We=q.current;typeof We!="function"&&T1(We)&&We.current!==Ye.current&&(xe.setPositionReference(We.current),Ye.current=We.current)},[k,xe,Z,q]),x.useEffect(()=>{if(g&&k&&Me.domReference&&Me.floating)return Np(Me.domReference,Me.floating,fe,ve)},[g,k,Me,fe,ve]);const ot=jr(oe),it=jA(r,ot,F),nt=mo(oe)||"center",vt=!!ge.hide?.referenceHidden;He(()=>{T&&k&&_e&&N(ot)},[T,k,_e,ot]);const st=x.useMemo(()=>({position:"absolute",top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),xt=ge.arrow?.centerOffset!==0;return x.useMemo(()=>({positionerStyles:Ze,arrowStyles:st,arrowRef:ne,arrowUncentered:xt,side:it,align:nt,physicalSide:ot,anchorHidden:vt,refs:xe,context:re,isPositioned:_e,update:fe}),[Ze,st,ne,xt,it,nt,ot,vt,xe,re,_e,fe])}function T1(e){return e!=null&&"current"in e}function nx(e){return e==="starting"?zz:hr}function $A(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const p={...n};return c&&(p.pointerEvents="none"),vn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:p},nx(r),s],stateAttributesMapping:lh})}const BA=x.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:p="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:g=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:w=!1,collisionAvoidance:_=Pz,style:E,...R}=t,T=Dh(),C=YF(),A=T.useState("open"),N=T.useState("mounted"),I=T.useState("trackCursorAxis"),H=T.useState("disableHoverablePopup"),$=T.useState("floatingRootContext"),L=T.useState("instantType"),K=T.useState("transitionStatus"),Z=T.useState("hasViewport"),q=PA({anchor:a,positionMethod:l,floatingRootContext:$,mounted:N,side:c,sideOffset:d,align:p,alignOffset:h,collisionBoundary:m,collisionPadding:g,sticky:k,arrowPadding:y,disableAnchorTracking:w,keepMounted:C,collisionAvoidance:_,adaptiveOrigin:Z?rU:void 0}),z=x.useMemo(()=>({open:A,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:I!=="none"?"tracking-cursor":L}),[A,q.side,q.align,q.anchorHidden,I,L]),j=$A(t,z,{styles:q.positionerStyles,transitionStatus:K,props:R,refs:[n,T.useStateSetter("positionerElement")],hidden:!N,inert:!A||I==="both"||H});return v.jsx(LA.Provider,{value:q,children:j})}),iU={...lh,...ia},FA=x.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=Dh(),{side:p,align:d}=QF(),h=c.useState("open"),m=c.useState("instantType"),g=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext");sa({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const w=c.useState("disabled"),_=c.useState("closeDelay");return hj(k,{enabled:!w,closeDelay:_}),vn("div",t,{state:{open:h,side:p,align:d,instant:m,transitionStatus:g},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,nx(g),l],stateAttributesMapping:iU})});function sU(e){const[t,n]=x.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function _1(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=It(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(yl(n)!==a||yl(r)!==l)&&(n=a,r=l),{width:n,height:r}}class oU{constructor(){this.store=new zh}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(Xn(81,t));this.store.setOpen(!0,_t(gy,void 0,n))}close(){this.store.setOpen(!1,_t(gy,void 0,void 0))}get isOpen(){return this.store.state.open}}function aU(){return new oU}const lU={root:{k6sLGO:"ui-1q1rmc8",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-6o7n8i",kAMwcw:"ui-19frgs0",kIyJzY:"ui-7pq1vu ui-1fdgx8g ui-sagj69",kSiTet:"ui-1hc1fzr ui-1hw7zpd ui-iyypsa",k3aq6I:"ui-1c071of ui-17ll0io ui-2um2vg ui-1ahjy9u ui-s2p038 ui-fld6f8 ui-14hpypv ui-1296zyv ui-1h7md5i",$$css:!0}},UA=lU.root,qA={positioner:{kY2c9j:"ui-2hst0z",$$css:!0},surface:{kB7OPa:"ui-9f619",kWkggS:"ui-f1vpex",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-2kampu",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-hnkhp4",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-1jfuf7k",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1l09f48",kaIpWk:"ui-1m7fhj7",kGVxlE:"ui-14cu5b6",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},HA=qA.positioner,GA=qA.surface,VA="top",rx=300,Lh=100;function uU(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function cU(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function fU(e){return e?{side:"flip",align:"shift",fallbackAxisSide:"none"}:{side:"flip",align:"shift",fallbackAxisSide:"start"}}function ix(e,t,n){const{side:r,align:s}=x.useMemo(()=>uU(e),[e]),{sideOffset:a,alignOffset:l}=x.useMemo(()=>cU(t),[t]),c=x.useMemo(()=>fU(n),[n]);return{side:r,align:s,sideOffset:a,alignOffset:l,collisionAvoidance:c}}function R1(e){const t=x.useRef(e);return x.useLayoutEffect(()=>{t.current=e},[e]),t}function dU(e,t){const n=R1(e),r=R1(t);return x.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const p=c.target,d=a.defaultView?.Element;if(d===void 0||!(p instanceof d))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&p.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const pU=Lh;function KA(e,t){return t?Math.max(e,pU):e}const hU={base:{kzqmXN:"ui-ezivpi",kLKAdn:"ui-uve7l6 ui-6qmaip",kpe85a:"ui-1yxiud8 ui-1qgu5t4",kGO01o:"ui-1rgtt3y ui-l66g7a",kE3dHu:"ui-yab65l ui-1ri4ohi",ks0D6T:"ui-w5ewwj ui-1f7jnj6",kHjlTd:"ui-j0a0fe",kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",k1xSpc:"ui-1lliihq ui-106y27v",kXwgrk:"ui-1q0g3np ui-7b3dt5",kGNEyG:"ui-13iwyz6 ui-wai511",$$css:!0}};function ZA(){return hU.base}const WA=x.createContext(null),YA=x.createContext(null);function Gp({children:e,placement:t=VA,offset:n=8,delay:r,closeDelay:s,sameAxisOnly:a=!1,disabled:l=!1,surfaceStyle:c,surfaceClassName:p,claimPortalLayer:d=!1,onOpenChange:h}){const m=x.use(WA),g=m?.open??r??rx,y=m?.close??s??Lh,k=x.useMemo(()=>aU(),[]),w=x.useRef(null),[_,E]=x.useState(!1),[R,T]=x.useState(!1),[C,A]=x.useState(!1),N=x.use(Hp),I=x.useCallback((q,z)=>{w.current=q,T(z),A(!1)},[]),H=x.useCallback(q=>{w.current===q&&(A(!0),k.close(),w.current=null,T(!1))},[k]),$=x.useCallback(q=>{q||(w.current=null,T(!1)),E(q),h?.(q)},[h]),{portalLayerStyles:L}=Uc("tooltip",d&&_),K=N||C,Z=x.useMemo(()=>({handle:k,delay:g,closeDelay:y,markTriggerActive:I,closeIfTriggerActive:H}),[k,g,y,I,H]);return v.jsxs(YA.Provider,{value:Z,children:[e,v.jsx(mU,{activeInteractive:R,disabled:l,handle:k,offset:n,onOpenChange:$,placement:t,positionerStyle:d?L:void 0,sameAxisOnly:a,suppressPopup:K,surfaceClassName:p,surfaceStyle:c})]})}function mU({handle:e,activeInteractive:t,placement:n,offset:r,sameAxisOnly:s,disabled:a,suppressPopup:l,surfaceStyle:c,surfaceClassName:p,positionerStyle:d,onOpenChange:h}){const m=Ol(),g=ix(n,r,s);return v.jsx(MA,{disabled:a||l,disableHoverablePopup:!t,handle:e,onOpenChange:h,children:({payload:y})=>l||y?.content===null||y?.content===void 0?null:v.jsx(bU,{align:g.align,alignOffset:g.alignOffset,collisionAvoidance:g.collisionAvoidance,handle:e,payload:y,portalRoot:m,positionerStyle:d,side:g.side,sideOffset:g.sideOffset,surfaceClassName:p,surfaceStyle:c})})}function gU({content:e,popupRef:t}){return x.useLayoutEffect(()=>{t.current!==null&&(t.current.scrollTop=0)},[t]),typeof e=="function"?e():e}function bU({payload:e,handle:t,portalRoot:n,surfaceStyle:r,surfaceClassName:s,positionerStyle:a,side:l,align:c,sideOffset:p,alignOffset:d,collisionAvoidance:h}){const m=x.useRef(null),g=dU(t,e.triggerId),y=x.useCallback(_=>{m.current=_;const E=g(_);if(_!==null)return()=>{m.current===_&&(m.current=null),E?.()}},[g]),k=An(HA),w=wn({rootClass:"ui-tooltip",stylexStyles:[GA,ZA(),UA,r,e.surfaceStyle],className:Sn(s,e.tooltipClassName)});return v.jsx(zA,{container:n??void 0,children:v.jsx(BA,{align:c,alignOffset:d,className:k.className,collisionAvoidance:h,collisionPadding:8,side:l,sideOffset:p,style:{...k.style,...a},children:v.jsx(FA,{"aria-label":e.ariaLabel,className:w.className,ref:y,role:"tooltip",style:w.style,children:v.jsx(gU,{content:e.content,popupRef:m},e.contentKey)})})})}function yU({handle:e,children:t,content:n,contentKey:r,disabled:s=!1,surfaceStyle:a,tooltipClassName:l,delay:c,closeDelay:p,interactive:d=!1,"aria-label":h,id:m,onMouseEnter:g,onFocus:y,onPotentialActivate:k,...w}){const _=x.useId(),E=m??_,R=x.Children.only(t),T=x.isValidElement(R),C=x.useCallback(I=>{k?.(E,d),g?.(I)},[d,g,k,E]),A=x.useCallback(I=>{k?.(E,d),y?.(I)},[d,y,k,E]),N=x.useMemo(()=>({ariaLabel:h,content:n,contentKey:r??E,surfaceStyle:a,tooltipClassName:l,triggerId:E}),[h,n,r,a,l,E]);return T?v.jsx(IA,{...w,closeDelay:p,delay:c,disabled:s,handle:e,id:E,onFocus:A,onMouseEnter:C,payload:N,render:R}):v.jsx(v.Fragment,{children:t})}function vU({children:e,content:t,disabled:n=!1,delay:r,closeDelay:s,interactive:a=!1,"aria-label":l,id:c,...p}){const d=x.use(YA),h=x.useId(),m=c??h;if(x.useLayoutEffect(()=>{if(d==null)return;const y=d.closeIfTriggerActive;return()=>{y(m)}},[d,m]),d==null)return v.jsx(v.Fragment,{children:e});const g=KA(s??d.closeDelay??Lh,a);return v.jsx(yU,{...p,"aria-label":l,closeDelay:g,content:t,delay:r??d.delay??rx,disabled:n,handle:d.handle,id:m,interactive:a,onPotentialActivate:d.markTriggerActive,children:e})}(function(e){e.Trigger=vU})(Gp||(Gp={}));const Pb={base:{"--ui-menu-row-padding-block":"ui-kd6fbz","--ui-menu-row-padding-inline":"ui-1ucplye","--ui-menu-row-gap":"ui-1fi38xd","--ui-menu-row-border-radius":"ui-1swa0pb","--ui-menu-item-left-width":"ui-1bm229x","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-so2ig8","--ui-menu-section-title-padding-inline":"ui-e020nh",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kY2c9j:"ui-fc2p8",kWkggS:"ui-f1vpex",kaIpWk:"ui-1043rbw",kGVxlE:"ui-137jh17",kVAEAm:"ui-1n2onr6",kMv6JI:"ui-1acoasx",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kMwMTN:"ui-1wd3ewq",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",k6sLGO:"ui-1q1rmc8",k3aq6I:"ui-17dzmu4",kgyCeQ:"ui-lp1x4z",kdrBUz:"ui-7iibnf",kHBbk8:"ui-c8icb0",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",ktR8K2:"ui-awy1a7",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-ldcgda",kloYau:"ui-2q1x1w",$$css:!0},sizeMd:{"--ui-menu-row-padding-block":"ui-1jjxvf6","--ui-menu-row-padding-inline":"ui-18k90n9","--ui-menu-row-gap":"ui-vzyzmz","--ui-menu-item-left-width":"ui-eurstk","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-14atyw8","--ui-menu-section-title-padding-inline":"ui-mhevzc","--ui-menu-row-border-radius":"ui-1jr1u8k",kaIpWk:"ui-1m7fhj7",$$css:!0},hasAttachment:{kWkggS:"ui-jbqb8w",kGVxlE:"ui-1gnnqk1",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",khm7nJ:"ui-3r2rup",kc3QkE:"ui-1h1zc6f",$$css:!0}},xU={base:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kY2c9j:"ui-cfsmg2",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kysU6D:"ui-jyslct",kkrTdU:"ui-t0e3qv",kWkggS:"ui-jbqb8w",kY4cRS:"ui-lvsv26",$$css:!0}},_i={inner:{kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",k2VNRW:"ui-3gzrov",$$css:!0},layout:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",$$css:!0},bodyScroll:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",$$css:!0},header:{kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0},footer:{kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j",$$css:!0},layoutCard:{kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-137jh17",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-ldcgda",kloYau:"ui-2q1x1w",$$css:!0},attachment:{kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-137jh17",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-ldcgda",kloYau:"ui-2q1x1w",$$css:!0},list:{kH6xsr:"ui-3ct3a4",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-12mrbbr",$$css:!0},virtualizedList:{kOIVth:"ui-xhr3t",$$css:!0},virtualizedRow:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",$$css:!0},virtualizedScroller:{kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0}},ai={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-1kk7d6x",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kLKAdn:"ui-1xgckd",kpe85a:"ui-9cta2o",kGO01o:"ui-1mv37q2",kE3dHu:"ui-1166h4g",kaIpWk:"ui-1w5zb4f",kkrTdU:"ui-1ypdohk",kWkggS:"ui-jbqb8w",$$css:!0},focused:{kWkggS:"ui-flfp0o",$$css:!0},submenuHover:{kWkggS:"ui-qjnua1",$$css:!0},selected:{kWkggS:"ui-i07v4r",$$css:!0},disabled:{kMwMTN:"ui-4b2ntj",kkrTdU:"ui-t0e3qv",$$css:!0},disabledFocused:{kWkggS:"ui-jbqb8w",$$css:!0},hasDescription:{kGNEyG:"ui-1cy8zhl",$$css:!0},muted:{kMwMTN:"ui-1e4uaio",$$css:!0},mutedFocused:{kMwMTN:"ui-19aaqeu",$$css:!0},indent:{kE3dHu:"ui-20x7kn",$$css:!0},expanded:{kWkggS:"ui-flfp0o",$$css:!0},topAlign:{kGNEyG:"ui-1cy8zhl",$$css:!0}},Si={left:{kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1kvrb00",kZKoxP:"ui-1gv9yxp",$$css:!0},leftDescription:{kGNEyG:"ui-1cy8zhl",kLKAdn:"ui-uve7l6",$$css:!0},leftWide:{kzqmXN:"ui-1td3qas",$$css:!0},content:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",$$css:!0},right:{kmuXW:"ui-2lah0s",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kMwMTN:"ui-19aaqeu",$$css:!0},rightDescription:{kGNEyG:"ui-1cy8zhl",keoZOQ:"ui-1k5org8",$$css:!0},rightDisabled:{kMwMTN:"ui-1e4uaio",$$css:!0},submenuRight:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-euugli",kUk6DE:"ui-98rzlu",kLWn49:"ui-1evy7pa",$$css:!0},title:{kzqmXN:"ui-h8yej3",kUk6DE:"ui-98rzlu",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},description:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj",$$css:!0}},Ko={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",$$css:!0},wrapperInline:{kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",kOIVth:"ui-ehausa",$$css:!0},title:{kMwMTN:"ui-1wd3ewq",$$css:!0},titleInline:{kzQI83:"ui-1ikap7u",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitle:{kMwMTN:"ui-4b2ntj",$$css:!0},subtitleInline:{kzQI83:"ui-gyuaek",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitleWrap:{khDVqt:"ui-eaf4i8",kXHlph:"ui-1plvlek",kORKVm:"ui-ryxfnj",kg5iWk:"ui-brixnn",$$css:!0}},Vp={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-12mrbbr",kDDIq6:"ui-1xlr596",kSOckA:"ui-1g2vuzn",kMvyRg:"ui-ythbmo",keqDnY:"ui-1avyhxm",kqzSUC:"ui-66k34r",k4XnTM:"ui-1xwbszb",k3fB1G:"ui-k09vcf",kJePX0:"ui-1w8lxg1",kfctMW:"ui-cy3hch",kiBhmJ:"ui-daw2lg",k8c0Y5:"ui-1w1m56g",kgJ9Hf:"ui-1tyhgdo",kaDzy6:"ui-1s44eir",kMY8PA:"ui-uj3c0",kjtpqk:"ui-1eu76s7",kpiC9T:"ui-1v6oizs",kaGYpq:"ui-7j25xs",kDXkox:"ui-gacwfc",kQfWG7:"ui-18byea3",k8jt7o:"ui-1b7fwf8",$$css:!0},title:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1bjvzyu",kGO01o:"ui-cnij5n",kE3dHu:"ui-qqt8gd",kMwMTN:"ui-4b2ntj",$$css:!0},titleAction:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",$$css:!0},textAction:{kmuXW:"ui-2lah0s",kEafiO:"ui-972fbf",kWqL5O:"ui-gfja2r",kt9PQ7:"ui-1qhh985",kZ1KPB:"ui-yj58a3",kWkggS:"ui-jbqb8w",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-4b2ntj ui-7gh5u8",kkrTdU:"ui-1ypdohk",kaIpWk:"ui-1e1y6u3",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},kU={divider:{k1xSpc:"ui-1lliihq",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j",keoZOQ:"ui-qzbcqm",km5ZXQ:"ui-1v0icgf",k1K539:"ui-15m4i5y",koQZXg:"ui-gmkh7b",kfzvcC:"ui-47corl",$$css:!0}},SU={row:{kLKAdn:"ui-fs8kq3",kpe85a:"ui-9cta2o",kGO01o:"ui-b6dno7",kE3dHu:"ui-1166h4g",$$css:!0}},XA={surface:{kzqmXN:"ui-1oysuqx",kskxy:"ui-uyqlj2",kORKVm:"ui-1odjw0f",kfzvcC:"ui-67bb7w",k5wCbM:"ui-1597r2g",k6w4Gs:"ui-xkn5u1",$$css:!0},surfaceWide:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-c74ic2",$$css:!0}},Kp={empty:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1jkygx",kGO01o:"ui-cnij5n",kE3dHu:"ui-1o7kk3e",kMwMTN:"ui-4b2ntj",k9WMMc:"ui-2b8uid",$$css:!0},emptyIndent:{kE3dHu:"ui-1hl851k",$$css:!0},loading:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-ehausa",kLKAdn:"ui-13ly8rp",kpe85a:"ui-1jkygx",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1o7kk3e",kMwMTN:"ui-4b2ntj",$$css:!0},loadingSpinner:{kKVMdj:"ui-138fvbv",k44tkh:"ui-1q3qbx4 ui-1s1fvk8",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0}};function wU(e,t=!1){return[Pb.base,xs.root,e==="md"&&Pb.sizeMd,t&&Pb.hasAttachment]}function EU(){return xU.base}function TU(){return _i.inner}function _U(e=!1){return[_i.layout,e&&_i.layoutCard]}function RU(){return _i.attachment}function CU(){return _i.bodyScroll}function AU(){return _i.header}function NU(){return _i.footer}function OU(e=!1){return[_i.list,e&&_i.virtualizedList]}function MU(){return _i.virtualizedRow}function IU(){return _i.virtualizedScroller}function sx(e={}){return[ai.base,e.selected&&ai.selected,e.inSubmenu&&!e.disabled&&ai.submenuHover,e.focused&&ai.focused,e.expanded&&ai.expanded,e.disabled&&ai.disabled,e.disabled&&e.focused&&ai.disabledFocused,e.hasDescription&&ai.hasDescription,e.variant==="muted"&&ai.muted,e.variant==="muted"&&e.focused&&ai.mutedFocused,e.indent&&ai.indent,e.topAlign&&ai.topAlign]}function DU(e={}){return[Si.left,e.hasDescription&&Si.leftDescription,e.wideLeft&&Si.leftWide]}function zU(){return Si.content}function LU(e={}){return[Si.right,e.hasDescription&&Si.rightDescription,e.disabled&&Si.rightDisabled]}function jU(){return Si.submenuRight}function PU(){return Si.wrapper}function $U(){return[Ml.root,Si.title]}function BU(){return[fo.root,Ml.root,Si.description]}function FU(e){return[Ko.wrapper,e&&Ko.wrapperInline]}function UU(e){return[Ml.root,Ko.title,e&&Ko.titleInline]}function qU({inline:e,wrap:t}){return[fo.root,Ml.root,Ko.subtitle,e&&Ko.subtitleInline,t&&Ko.subtitleWrap]}function HU(){return SU.row}function GU(){return Vp.wrapper}function VU(e){return[fo.root,Vp.title,e&&Vp.titleAction]}function KU(){return Vp.textAction}function ZU(){return kU.divider}function QA(){return XA.surface}function WU(){return XA.surfaceWide}function YU(e){return[fo.root,Kp.empty,e&&Kp.emptyIndent]}function XU(){return[xs.root,Kp.loading]}function QU(){return Kp.loadingSpinner}const JU="ui-menu",ox="ui-menu__backdrop",e9="ui-menu__list",t9="ui-menu__content",n9="ui-menu__layout",r9="ui-menu__body-scroll",i9="ui-menu__header",s9="ui-menu__footer",o9="ui-menu__attachment",a9="ui-menu__row",l9="ui-menu__item-left",u9="ui-menu__item-content",c9="ui-menu__item-right",f9="ui-menu__item-wrapper",d9="ui-menu__item-title",p9="ui-menu__item-description",h9="ui-menu__text-wrapper",m9="ui-menu__title",g9="ui-menu__subtitle",b9="ui-menu__search-row",y9="ui-menu__section",v9="ui-menu__section-title",x9="ui-menu__section-text-action",k9="ui-menu__virtualized-section-divider",S9="ui-menu__submenu-trigger",w9="ui-menu__submenu-right-section",E9="ui-menu__toggle-row",JA="ui-menu__tooltip",T9="ui-menu__empty",_9="ui-menu__loading",R9="ui-menu__loading-spinner",C9="ui-menu__virtualized-row",A9="ui-menu__virtualized-scroller";function Ht(e,t,n={}){return wn({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function ax({className:e,size:t,style:n,hasAttachment:r=!1}){return Ht(JU,wU(t,r),{className:e,style:n})}function eN(e){return Ht(ox,EU(),{style:e})}function lx(e=!1){return Ht(e9,OU(e),{className:e?"ui-menu__list--virtualized":void 0})}function ux(){return Ht(t9,TU())}function tN(e,t=!1){return Ht(n9,_U(t),{style:e})}function N9(){return Ht(o9,RU())}function O9(){return Ht(r9,CU())}function nN(){return Ht(i9,AU())}function rN(){return Ht(s9,NU())}function cx(e={}){return Ht(a9,[{"ui--default-marker":"ui--default-marker",$$css:!0},sx(e)],{className:e.className})}function M9(e={}){return Ht(E9,sx(e),{className:e.className})}function I9(e={}){return Ht(S9,sx(e),{className:e.className})}function D9(e={}){return Ht(l9,DU(e))}function z9(){return Ht(u9,zU())}function L9(e={}){return Ht(c9,LU(e))}function fx(){return Ht(f9,PU())}function dx(){return Ht(d9,$U())}function px(){return Ht(p9,BU())}function j9(e){return Ht(h9,FU(e))}function P9(e){return Ht(m9,UU(e))}function $9({inline:e,wrap:t}){return Ht(g9,qU({inline:e,wrap:t}))}function B9(e){return Ht(b9,HU(),{className:e})}function C1(){return Ht(y9,GU())}function iN(e){return Ht(v9,VU(e))}function F9(){return Ht(x9,KU())}function U9(){return Ht(k9,ZU())}function q9(){return Ht(w9,jU())}function H9(e){return Ht(T9,YU(e))}function G9(){return Ht(_9,XU())}function V9(){return Ht(C9,MU())}function K9(){return Ht(A9,IU())}const jh=Ht(JA,QA()).className,Z9=Ht(R9,QU()).className,Zp="submenuOpenChange",hx=x.createContext(null);function Ph(){return x.use(hx)}function mx({children:e,layerNodeId:t}){const n=bo(),[r,s]=x.useState(new Set);x.useEffect(()=>{if(!n)return;const c=p=>{p.parentId===t&&s(d=>{const h=new Set(d);return p.isOpen?h.add(p.nodeId):h.delete(p.nodeId),h})};return n.events.on(Zp,c),()=>{n.events.off(Zp,c)}},[n,t]);const a=r.size>0,l=x.useMemo(()=>({hasOpenChild:a}),[a]);return v.jsx(hx.Provider,{value:l,children:v.jsx(Gp,{claimPortalLayer:!0,disabled:a,offset:6,placement:"right-start",sameAxisOnly:!0,surfaceClassName:JA,surfaceStyle:QA(),children:e})})}function sN({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=x.use(hx);return c==null?v.jsx(v.Fragment,{children:e}):v.jsx(Gp.Trigger,{closeDelay:a,content:t,contentKey:n,delay:s,disabled:r||c.hasOpenChild,interactive:!0,surfaceStyle:l,children:e})}function W9(e,t){const n=bo(),r=go();x.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(Zp,s),()=>{t&&n.events.emit(Zp,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}const Y9=360,oN="--ui-menu-available-width",X9="320px";function Lu(e){return typeof e=="number"?`${e}px`:e}function $b(e){return`min(${e}, var(${oN}, 100vw))`}function gx(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":Lu(t??"200px");return s?{width:l==="max-content"?l:$b(l),...n!=null&&{minWidth:$b(Lu(n))},maxWidth:$b(r!=null?Lu(r):X9)}:{width:l,...n!=null&&{minWidth:Lu(n)},...r!=null&&{maxWidth:Lu(r)}}}const Q9=bA("@@menu-content-noop",()=>Jv({}));function J9({children:e,header:t,footer:n,attachment:r,"aria-label":s,"data-testid":a,className:l,style:c,maxHeight:p,width:d,minWidth:h,maxWidth:m,size:g,backdrop:y,adaptiveHeight:k=!0,returnFocus:w,onKeyDownCapture:_,droppable:E,ref:R}){const T=Nl(),{isOpen:C,isMounted:A,activeIndex:N,setActiveIndex:I,setIsOpen:H,markKeyboardNavigation:$,markPointerNavigation:L,virtualFocus:K,searchValue:Z,setSearchValue:q,hasSearchInput:z,searchInputRef:j,enableHover:F,closeOnSelect:U,nodeId:P,listRef:W,labelsRef:D,refs:B,floatingStyles:G,middlewareData:O,transitionStyles:ie,context:te,getFloatingProps:ne,getItemProps:le,dismissCauseRef:pe,returnFocusOnSelect:ye}=Ci(),Se=y??!F,ze=x.useRef(null),he=K&&!z,Te=Ih(),Re=x.useSyncExternalStore(di.subscribe,di.isDragActive,di.isDragActive),Oe=te.placement.startsWith("top"),ve=Oe&&A?O.bottomAnchor?.bottom??null:null,xe=x.useRef(null),Me=x.useRef(N),Ce=x.useRef(!1);x.useLayoutEffect(()=>{Me.current=N},[N]),x.useLayoutEffect(()=>{if(!C){Ce.current=!1;return}const X=$e=>{TA($e)&&(Ce.current=!0,$())},we=$e=>{const Le=RA($e,W);Le==null||Le===Me.current||I(Le)},Ge=$e=>{const Le=Ce.current;Ce.current=!1,L(),Le&&we($e.target)},ct=ze.current;document.addEventListener("keydown",X,!0);const St=LF(ct,Ge);return()=>{document.removeEventListener("keydown",X,!0),St()}},[C,W,$,L,I]),x.useLayoutEffect(()=>{if(!C){xe.current=null;return}if(!K||N==null||xe.current===N||(xe.current=N,!Ce.current))return;const X=W.current[N]??null;if(!X)return;const we=requestAnimationFrame(()=>{X.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(we)},[C,K,N,W]);const Pe=x.useCallback(X=>{if(X.key==="Escape"){pe.current="escape";return}if(X.ctrlKey&&!X.metaKey){const Ge=X.key.toLowerCase();if(Ge==="n"||Ge==="p"){X.preventDefault();const ct=W.current,St=ct.length;if(St===0)return;const $e=Me.current,Le=Ge==="n"?1:-1;let qe=$e==null?Ge==="n"?0:St-1:$e+Le;for(;qe>=0&&qe<St;){if(ct[qe]!=null){I(qe);return}qe+=Le}return}}if(!z)return;if(X.key.length===1&&!X.ctrlKey&&!X.metaKey&&!X.altKey){if(document.activeElement===j.current)return;X.preventDefault(),X.stopPropagation(),j.current?.focus(),q(Z+X.key),_A(W,"body",I)}},[pe,z,W,j,Z,I,q]),ge=x.useCallback(X=>{Te(X.nativeEvent)&&(pe.current="backdrop",H(!1))},[pe,H,Te]),fe=x.useCallback(X=>{if(!Te(X.nativeEvent))return;X.preventDefault(),pe.current="backdrop",H(!1);const ct=document.elementsFromPoint(X.clientX,X.clientY).find(St=>!St.classList.contains(ox));ct&&ct.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:X.clientX,clientY:X.clientY,screenX:X.screenX,screenY:X.screenY,button:X.button,buttons:X.buttons,ctrlKey:X.ctrlKey,shiftKey:X.shiftKey,altKey:X.altKey,metaKey:X.metaKey}))},[pe,H,Te]),oe=E!=null,{ref:re,isOver:_e,isDropBlocked:J}=nF({accept:E?.accept??Q9,disabled:!oe||(E?.disabled??!1),onDragEnter:E?.onDragEnter,onDragOver:E?.onDragOver,onDragLeave:E?.onDragLeave,onDrop:E?.onDrop}),ue=Kc([B.setFloating,ze,R,oe?re:null]),Ie=Ol(),{zIndex:Be,portalLayerStyles:Ze}=Uc("popover",A);if(!A)return null;const Ye=g??T?.menuSize??"sm",ot={...G,...ie,...Ze,...Be!==null?{zIndex:Be}:{},...c,...gx({width:d,minWidth:h,maxWidth:m}),...Oe&&ve!==null?{top:"auto",bottom:ve}:{}},it={...Ze,...Be!==null?{zIndex:Be-1}:{},pointerEvents:oe&&Re?"none":void 0},nt=p==null?void 0:k?`min(${typeof p=="number"?`${p}px`:p}, var(--ui-menu-available-height, 100vh))`:p,vt=r!=null,st=eN(it),xt=ax({className:l,size:Ye,style:vt&&nt!==void 0?{...ot,maxHeight:nt}:ot,hasAttachment:vt}),We=tN(vt||nt===void 0?void 0:{maxHeight:nt},vt),Ot=nN(),Fe=O9(),Ke=ux(),ht=lx(),Xe=rN(),Y=N9();return v.jsxs(qv,{...Ie?{root:Ie}:{},children:[Se&&v.jsx("div",{className:st.className,style:st.style,onClick:ge,onContextMenu:fe,role:"none"}),v.jsx(Gv,{context:te,initialFocus:he?-1:j,returnFocus:w??(pe.current!=="backdrop"&&(pe.current!=="selection"||ye)),modal:!he,children:v.jsx("div",{ref:ue,className:xt.className,style:xt.style,tabIndex:-1,"data-size":Ye,"data-drop-active":oe&&_e&&!J?"":void 0,"data-drop-blocked":oe&&J?"":void 0,...a?{"data-testid":a}:{},...vt?{"aria-label":s??"Menu"}:{},...ne({onKeyDown:Pe,onKeyDownCapture:_,onMouseDown:K?X=>{X.stopPropagation()}:void 0}),children:v.jsx(Ts,{menuSize:Ye,children:v.jsx(vA,{dismiss:!C,children:v.jsx(mx,{layerNodeId:P,children:v.jsx(NA,{activeIndex:N,setIsOpen:H,getItemProps:le,searchValue:Z,closeOnSelect:U,virtualFocus:K,children:v.jsxs(AC,{elementsRef:W,labelsRef:D,children:[v.jsxs("div",{className:We.className,style:We.style,...vt?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?v.jsx("div",{className:Ot.className,style:Ot.style,children:v.jsx(tc,{value:"header",children:t})}):null,v.jsx(yA,{className:Fe.className,style:Fe.style,maxHeight:"none",children:v.jsx("div",{className:Ke.className,style:Ke.style,children:v.jsx("ul",{role:"presentation",className:ht.className,style:ht.style,children:e})})}),n!=null?v.jsx("div",{className:Xe.className,style:Xe.style,children:v.jsx(tc,{value:"footer",children:n})}):null]}),r!=null?v.jsx("div",{className:Y.className,style:Y.style,children:v.jsx("div",{className:Ke.className,style:Ke.style,children:v.jsx(tc,{value:"footer",children:r})})}):null]})})})})})})})]})}function eq({children:e,indent:t=!1}){const n=H9(t);return v.jsx("div",{className:n.className,style:n.style,"data-indent":t||void 0,children:e})}const tq=x.createContext(null);function nq(){return x.useContext(tq)}const rq="application/x-cursor-draggable",iq=/\bElectron\/\d+/,Ud=oq("ui-i9pz9s"),sq="data-no-drag";let Ho=!1,A1=!1;function oq(e){return e?.split(/\s+/).filter(Boolean)??[]}function qd(e,t,n){for(const r of t)e.classList.toggle(r,n)}function aq(){if(A1||typeof document>"u")return;A1=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){Ho=!1;return}Ho=t.target.closest(`[${sq}]`)!==null},{capture:!0});const e=()=>{Ho=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function lq(){return typeof navigator>"u"?!0:!iq.test(navigator.userAgent)}function uq({id:e,data:t,disabled:n=!1,dragImageOffset:r,onDragStart:s,onDragEnd:a}){const l=nq(),c=x.useRef(null),p=x.useRef({onDragStart:s,onDragEnd:a});p.current={onDragStart:s,onDragEnd:a};const d=x.useRef(t);d.current=t;const h=x.useRef(r);h.current=r;const m=x.useRef(l);m.current=l;const g=l?.activeDragId===e,y=x.useRef(g);return y.current=g,x.useEffect(()=>{const w=c.current;if(w)return qd(w,Ud,!n&&g),()=>{qd(w,Ud,!1)}},[n,g]),x.useEffect(()=>{const w=c.current;if(!w)return;if(n){w.removeAttribute("aria-grabbed");return}const _=g?"true":"false";w.getAttribute("aria-grabbed")!==_&&w.setAttribute("aria-grabbed",_)},[n,g]),{ref:x.useCallback(w=>{if(c.current=w,!w)return;qd(w,Ud,!n&&y.current);const _=!n;if(w.draggable!==_&&(w.draggable=_),n)return;aq();const E=di.getInstance(),R=C=>{if(Ho){Ho=!1,C.preventDefault(),C.stopPropagation();return}const A=d.current;E.setData(A);const N=w.ownerDocument,I=()=>{N.removeEventListener("dragend",I,!0),N.removeEventListener("drop",I,!0),N.removeEventListener("mousemove",I,!0),setTimeout(()=>{E.getData()===A&&(E.clearData(),Ho=!1,m.current?.setDragging(null,null))},0)};if(N.addEventListener("dragend",I,!0),N.addEventListener("drop",I,!0),N.addEventListener("mousemove",I,!0),C.dataTransfer){const H=lq();C.dataTransfer.effectAllowed=H?"copyMove":"move",C.dataTransfer.setData(rq,A.type),H&&C.dataTransfer.setData("text/plain",A.type);const $=h.current;$&&C.dataTransfer.setDragImage(w,$.x,$.y)}m.current?.setDragging(e,A,{x:C.clientX,y:C.clientY}),p.current.onDragStart?.(C)},T=C=>{E.clearData(),Ho=!1,m.current?.setDragging(null,null),p.current.onDragEnd?.(C)};return w.addEventListener("dragstart",R),w.addEventListener("dragend",T),()=>{w.removeEventListener("dragstart",R),w.removeEventListener("dragend",T),qd(w,Ud,!1)}},[e,n]),isDragging:g}}const fn={base:{kMv6JI:"ui-1acoasx",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",$$css:!0},sizeInherit:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kb6lSQ:"ui-4gjf66",$$css:!0},variantCode:{kMv6JI:"ui-ul7cyv",$$css:!0},weightRegular:{k63SB2:"ui-20ajya",$$css:!0},weightMedium:{k63SB2:"ui-1yl5bsf",$$css:!0},weightSemibold:{k63SB2:"ui-13ebx5f",$$css:!0},weightBold:{k63SB2:"ui-1v8v64w",$$css:!0},colorPrimary:{kMwMTN:"ui-1wd3ewq",$$css:!0},colorSecondary:{kMwMTN:"ui-19aaqeu",$$css:!0},colorTertiary:{kMwMTN:"ui-4b2ntj",$$css:!0},colorQuaternary:{kMwMTN:"ui-1e4uaio",$$css:!0},colorActive:{kMwMTN:"ui-7qsbfx",$$css:!0},colorFocused:{kMwMTN:"ui-zlszhr",$$css:!0},colorRed:{kMwMTN:"ui-1jh5svw",$$css:!0},colorRedSecondary:{kMwMTN:"ui-o7cye4",$$css:!0},colorYellow:{kMwMTN:"ui-1izesbo",$$css:!0},colorYellowSecondary:{kMwMTN:"ui-14nh9a",$$css:!0},colorGreen:{kMwMTN:"ui-1w5rjie",$$css:!0},colorGreenSecondary:{kMwMTN:"ui-dki84f",$$css:!0},colorMagenta:{kMwMTN:"ui-xjecij",$$css:!0},colorMagentaSecondary:{kMwMTN:"ui-29qggb",$$css:!0},colorCyan:{kMwMTN:"ui-1d0l12",$$css:!0},colorCyanSecondary:{kMwMTN:"ui-l34bp",$$css:!0},colorOrange:{kMwMTN:"ui-11pqmr",$$css:!0},colorOrangeSecondary:{kMwMTN:"ui-11nfuof",$$css:!0},truncateStart:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",ksoyAI:"ui-zyj77d",k9WMMc:"ui-dpxx8g",$$css:!0}},cq={xs:fP.root,sm:fo.root,md:xs.root,lg:lC.root,xl:dP.root,"2xl":pP.root,"3xl":hP.root,inherit:fn.sizeInherit},fq={regular:fn.weightRegular,medium:fn.weightMedium,semibold:fn.weightSemibold,bold:fn.weightBold},dq={primary:fn.colorPrimary,secondary:fn.colorSecondary,tertiary:fn.colorTertiary,quaternary:fn.colorQuaternary,active:fn.colorActive,focused:fn.colorFocused,red:fn.colorRed,"red-secondary":fn.colorRedSecondary,yellow:fn.colorYellow,"yellow-secondary":fn.colorYellowSecondary,green:fn.colorGreen,"green-secondary":fn.colorGreenSecondary,magenta:fn.colorMagenta,"magenta-secondary":fn.colorMagentaSecondary,cyan:fn.colorCyan,"cyan-secondary":fn.colorCyanSecondary,orange:fn.colorOrange,"orange-secondary":fn.colorOrangeSecondary};function pq({color:e,size:t,truncate:n,variant:r,weight:s}){return[fn.base,Fv.root,cq[t],fq[s],r==="code"?fn.variantCode:null,e?dq[e]:null,n==="start"?fn.truncateStart:null,n==="end"?Ml.root:null]}function Wp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,className:p,style:d,ref:h,...m}){const g=a===!0?"end":a===!1?void 0:a??void 0,{className:y,style:k}=An(pq({color:s,size:n,truncate:g,variant:t,weight:r}));return v.jsx(e,{ref:h,className:Sn("ui-text",y,p),style:{...k,...d},"data-variant":t,"data-size":n,"data-weight":r,"data-color":s,"data-truncate":g,"data-numeric":l||void 0,...m,children:g==="start"?v.jsxs(v.Fragment,{children:["⁦",c,"⁩"]}):c})}function $h({children:e,content:t,placement:n=VA,offset:r=8,openDelay:s=rx,closeDelay:a=Lh,disabled:l=!1,defaultOpen:c,open:p,anchor:d,"aria-label":h,className:m,surfaceStyle:g,sameAxisOnly:y=!1,interactive:k=!1,onOpenChange:w,onOpenChangeComplete:_,ref:E,...R}){const T=x.use(WA),C=x.use(Hp),A=l||C,N=x.Children.only(e),I=x.isValidElement(N),H=Ol(),$=T?.open??s,L=T?.close??a,K=KA(L,k),{side:Z,align:q,sideOffset:z,alignOffset:j,collisionAvoidance:F}=ix(n,r,y),U=An(HA),P=wn({rootClass:"ui-tooltip",stylexStyles:[GA,ZA(),UA,g],className:m});return I?v.jsxs(MA,{defaultOpen:c,disabled:A,disableHoverablePopup:!k,onOpenChange:w,onOpenChangeComplete:_,open:p,children:[v.jsx(IA,{...R,closeDelay:K,delay:$,disabled:A,ref:E,render:N}),C?null:v.jsx(zA,{container:H??void 0,children:v.jsx(BA,{align:q,alignOffset:j,anchor:d,className:U.className,collisionAvoidance:F,collisionPadding:8,side:Z,sideOffset:z,style:U.style,children:v.jsx(FA,{"aria-label":h,className:P.className,role:"tooltip",style:P.style,children:typeof t=="function"?t():t})})})]}):v.jsx(v.Fragment,{children:e})}function bx({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return Ph()!=null?v.jsx(sN,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):v.jsx($h,{className:jh,closeDelay:a,content:t,disabled:r,interactive:l,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:c,children:e})}function kl({children:e,disabled:t=!1,hasDescription:n=!1,leading:r,trailing:s,rightFallback:a,trailingAccessory:l,wideLeft:c=!1}){const p=s??a,d=p!=null||l!=null,h=D9({hasDescription:n,wideLeft:c}),m=z9(),g=L9({disabled:t,hasDescription:n});return v.jsxs(Ts,{iconSize:"base",children:[r!=null?v.jsx("span",{className:h.className,style:h.style,children:r}):null,v.jsx("div",{className:m.className,style:m.style,children:e}),d?v.jsxs("span",{className:g.className,style:g.style,children:[p,l]}):null]})}const aN=x.createContext(!1);function Jc(){return x.useContext(aN)}const Bh=x.createContext(null);function Fh(){const e=x.useContext(Bh);if(!e)throw new Error("SubMenu components must be used within <Menu.SubMenu>");return e}function lN({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:p=!1,onOpenChange:d,hoverOpenDelay:h,dismissOnReferenceScroll:m=!1,suppressSiblingPointerGuard:g=!1,virtualFocus:y=!1}){const k=DC(),[w,_]=Ly(c,p,d),E=c!==void 0,R=t==="hover"&&(!E||r==null),[T,C]=x.useState(null),{focusItemOnHoverEnabled:A,markKeyboardNavigation:N,markPointerNavigation:I,resetFocusItemOnHover:H}=CA(),[$,L]=x.useState(""),[K,Z]=x.useState(!1),q=x.useRef([]),z=x.useRef([]),j=x.useRef(null);W9(k,w);const F=vq();x.useEffect(()=>{F&&F.setSubMenuOpen(w)},[w,F]);const U=x.useRef(w);x.useEffect(()=>{const J=U.current;U.current=w,J!==w&&(L(""),w||C(null),H())},[w,H]);const P=x.useCallback(J=>{_(J)},[_]);x.useEffect(()=>{if(F)return F.registerSubMenuOpener(()=>P(!0)),()=>{F.registerSubMenuOpener(null)}},[F,P]);const W=x.useCallback((J,ue,Ie)=>{const Be=j.current;!J&&t==="hover"&&(Ie==="hover"||Ie==="safe-polygon")&&Be?.value&&Be.ownerDocument.activeElement===Be||P(J)},[P,t]),D=x.useCallback(()=>{P(!1)},[P]),G=n??(t==="hover"?"right-start":"bottom-start"),O={mainAxis:-2,alignmentAxis:-2},ne=s??(a?O:t==="hover"?O:4),{refs:le,floatingStyles:pe,context:ye}=UC({nodeId:k,open:w,onOpenChange:W,placement:G,middleware:[Iv(ne),zv(),Dv({crossAxis:G.startsWith("left")||G.startsWith("right")}),Lv({padding:8,apply({availableWidth:J,elements:ue}){ue.floating.style.setProperty(oN,`${Math.max(0,Math.floor(J))}px`)}})],whileElementsMounted:Np,transform:!1});x.useLayoutEffect(()=>{const J=r?.current;J&&le.setReference(J)}),PF(R&&w&&!g,le.domReference);const{activeId:Se}=MF(k,w),ze=Se!=null?0:h??75,he=LC(ye,{enabled:R,delay:{open:ze},handleClose:WC({blockPointerEvents:!1,requireIntent:!1})}),Te=BC(ye,{enabled:t==="click"&&!E}),Re=Ih(),Oe=FC(ye,{ancestorScroll:m,bubbles:!0,outsidePressEvent:"click",outsidePress:Re}),ve=GC(ye,{role:"menu"}),xe=HC(ye,{listRef:q,activeIndex:T,onNavigate:C,nested:!0,loop:!0,focusItemOnOpen:!y,virtual:K||y,focusItemOnHover:A}),Me=KC(ye,{listRef:z,activeIndex:T,onMatch:K?void 0:C,enabled:!K&&!y}),{getReferenceProps:Ce,getFloatingProps:Pe,getItemProps:ge}=qC([he,Te,Oe,ve,xe,Me]),fe=x.useCallback(()=>({...Ce(),ref:r?void 0:le.setReference,"aria-haspopup":"menu","aria-expanded":w}),[Ce,le.setReference,w,r]),{isMounted:oe,styles:re}=VC(ye,{duration:{open:0,close:jF},initial:{opacity:0,transform:"scale(1)"}}),_e=x.useMemo(()=>({isOpen:w,isMounted:oe,setIsOpen:P,closeFromKeyboard:D,activeIndex:T,setActiveIndex:C,markKeyboardNavigation:N,markPointerNavigation:I,trigger:t,closeOnSelect:l,nodeId:k,listRef:q,labelsRef:z,searchInputRef:j,searchValue:$,setSearchValue:L,hasSearchInput:K,setHasSearchInput:Z,refs:le,floatingStyles:pe,transitionStyles:re,context:ye,getReferenceProps:Ce,getFloatingProps:Pe,getItemProps:ge,getTriggerProps:fe,virtualFocus:y}),[w,oe,P,D,T,t,N,I,l,k,$,K,y,le,pe,re,ye,Ce,Pe,ge,fe]);return v.jsx(zC,{id:k,children:v.jsx(Bh.Provider,{value:_e,children:e})})}function hq({children:e,disabled:t=!1,label:n,leading:r,trailing:s}){const{activeIndex:a,getItemProps:l}=Qc(),{shouldAllowPointerInteraction:c}=Ci(),p=Fh(),d=Xc(),h=d==="body",m=n??(typeof e=="string"?e:""),{ref:g,index:y}=Eh({label:m||null}),k=a===y,w=Kc([g,p.refs.setReference]),_=v.jsx(Nn,{name:"chevron-right",color:"tertiary"}),E=I9({disabled:t,expanded:p.isOpen,focused:k}),R={role:"menuitem","aria-haspopup":"menu","aria-expanded":p.isOpen,"data-expanded":p.isOpen||void 0,tabIndex:k?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":k||void 0,[Il]:d,className:E.className,style:E.style,...p.getReferenceProps(l({onMouseDown(A){c(A.nativeEvent)||(A.preventDefault(),A.stopPropagation())},onClick(A){c(A.nativeEvent)||(A.preventDefault(),A.stopPropagation())},onKeyDown(A){A.key==="ArrowRight"&&!t&&(A.preventDefault(),A.stopPropagation(),p.setIsOpen(!0))}}))},T=q9(),C=v.jsx(kl,{disabled:t,leading:r,trailing:s!=null?v.jsx("div",{className:T.className,style:T.style,children:s}):void 0,rightFallback:_,children:e});return h?v.jsx("li",{ref:w,...R,children:C}):v.jsx("div",{ref:w,...R,children:C})}function mq({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=Fh(),c=t??(typeof e=="string"?e:""),p=h=>{a.disabled||(r?.(h),!h.defaultPrevented&&h.key==="ArrowRight"&&(h.preventDefault(),h.stopPropagation(),l.setIsOpen(!0)))},d=n?v.jsx(Nn,{name:"chevron-right",color:"tertiary"}):void 0;return v.jsx(fN,{...a,itemLabel:c,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:p,trailingAccessory:d,children:e})}function gq({children:e,"aria-label":t,"data-testid":n,className:r,width:s,minWidth:a,maxWidth:l,maxHeight:c,size:p,contentPadding:d}){const h=Nl(),m=Fh(),g=Ol(),{portalLayerStyles:y}=Uc("popover",m.isMounted),k=p??h?.menuSize??"sm",{virtualFocus:w}=m;if(!m.isMounted)return null;const _={...m.floatingStyles,...m.transitionStyles,...y,...gx({width:s,minWidth:a,maxWidth:l,clampToAvailableWidth:!0})},E=ax({className:r,size:k,style:_}),R=ux(),T=lx(),C=N=>{N.stopPropagation()},A=N=>{m.markPointerNavigation();const I=RA(N,m.listRef);I!=null&&I!==m.activeIndex&&m.setActiveIndex(I)};return v.jsx(qv,{...g?{root:g}:{},children:v.jsx(Gv,{context:m.context,disabled:w,initialFocus:m.hasSearchInput?m.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:m.trigger==="click",children:v.jsx("div",{ref:m.refs.setFloating,className:E.className,style:E.style,"data-submenu":"","data-size":k,...n?{"data-testid":n}:{},...m.getFloatingProps({onClick:C,onMouseMove(N){A(N.target)},onPointerMove(N){A(N.target)},onKeyDown(N){if(TA(N)&&m.markKeyboardNavigation(),N.key==="ArrowLeft"||N.key==="Escape"){N.preventDefault(),N.stopPropagation(),m.closeFromKeyboard();const I=m.refs.domReference.current;I instanceof HTMLElement&&I.focus()}}}),children:v.jsx(aN.Provider,{value:!0,children:v.jsx(Ts,{menuSize:k,children:v.jsx(yA,{maxHeight:c,children:v.jsx("div",{className:R.className,style:d===void 0?R.style:{...R.style,padding:d,scrollPaddingBlock:d},children:v.jsx(mx,{layerNodeId:m.nodeId,children:v.jsx(NA,{activeIndex:m.activeIndex,setIsOpen:m.setIsOpen,getItemProps:m.getItemProps,searchValue:m.searchValue,closeOnSelect:m.closeOnSelect,virtualFocus:w,children:v.jsx(AC,{elementsRef:m.listRef,labelsRef:m.labelsRef,children:v.jsx("ul",{role:"menu","aria-label":t??"Submenu",className:T.className,style:T.style,children:v.jsx(wA,{children:e})})})})})})})})})})})})}function yx(){const e=x.useContext(Bh),{setIsOpen:t,dismissCauseRef:n}=Ci();return x.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function vx(e,t){const{searchValue:n}=Qc();return t||!n||!e?!0:e.toLowerCase().includes(n.toLowerCase())}const bq=bA("@@menu-item-noop",()=>Jv({})),yq=new bq({}),uN=x.createContext(null);function vq(){return x.useContext(uN)}function cN({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return vx(s,n)?v.jsx(fN,{...r,itemLabel:s,children:e}):null}function fN({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:p,onKeyDown:d,leading:h,trailing:m,tooltip:g,tooltipOpenDelay:y=0,tooltipCloseDelay:k=0,tooltipSurface:w="default",closeOnSelect:_,description:E,variant:R="default",selected:T=!1,indent:C=!1,wideLeftSection:A=!1,draggable:N,ref:I,itemLabel:H,referenceRef:$,itemPropsTransform:L,trailingAccessory:K}){const{activeIndex:Z,setIsOpen:q,getItemProps:z,closeOnSelect:j,virtualFocus:F}=Qc(),{shouldAllowPointerInteraction:U}=Ci(),P=Jc(),W=yx(),D=Xc(),B=D==="body",G=_??j??!0,{ref:O,index:ie}=Eh({label:H||null}),te=Z===ie,[ne,le]=x.useState(!1);Ph();const pe=x.useRef(null),ye=x.useId(),Se=N!=null,ze=N?.mode==="pointer",he=x.useSyncExternalStore(di.subscribe,di.isDragActive,di.isDragActive),Te=x.useRef(null),Re=x.useRef(null),Oe=x.useRef(null),ve=x.useRef(null),xe=x.useRef(!1),[Me,Ce]=x.useState(null),{ref:Pe,isDragging:ge}=uq({id:N?.id??`menu-item-${ye}`,data:N?.data??yq,disabled:!Se||ze||(N?.disabled??!1),dragImageOffset:N?.dragImageOffset,onDragStart:N?.onDragStart,onDragEnd:N?.onDragEnd}),fe=Kc([O,$,I,Se&&!ze?Pe:null]),oe=x.useCallback(X=>{pe.current=X},[]),re=x.useMemo(()=>({setSubMenuOpen:le,isSubMenuOpen:ne,registerSubMenuOpener:oe}),[ne,oe]);x.useEffect(()=>()=>{Te.current?.(),Oe.current!=null&&cancelAnimationFrame(Oe.current)},[]);const _e=x.useCallback(()=>{Oe.current=null;const X=Re.current,we=ve.current;!X||!we||(X.style.transform=`translate3d(${we.x+8}px, ${we.y+8}px, 0)`)},[]),J=x.useCallback(X=>{ve.current=X,Oe.current==null&&(Oe.current=requestAnimationFrame(_e))},[_e]),ue=x.useCallback(X=>{Re.current=X,_e()},[_e]),Ie=()=>{if(a)return;const X={defaultPrevented:!1,preventDefault:()=>{X.defaultPrevented=!0}};p?.(X),G&&!X.defaultPrevented&&W(q)},Be=X=>{if(xe.current){xe.current=!1,X.preventDefault(),X.stopPropagation();return}if(!U(X.nativeEvent)){X.preventDefault(),X.stopPropagation();return}Ie()},Ze=x.useCallback(X=>{if(!U(X.nativeEvent)){X.preventDefault(),X.stopPropagation();return}if(l?.(X),!X.defaultPrevented){if(ze&&N!=null&&!N.disabled&&X.button===0){Te.current?.();const we=di.getInstance(),Ge=X.currentTarget,ct={clientX:X.clientX,clientY:X.clientY,isDragging:!1},St=()=>{document.removeEventListener("mousemove",$e,!0),document.removeEventListener("mouseup",Le,!0),Oe.current!=null&&(cancelAnimationFrame(Oe.current),Oe.current=null),ve.current=null,Te.current=null,we.clearData(),setTimeout(()=>{xe.current=!1},0)},$e=qe=>{const Wt=qe.clientX-ct.clientX,tt=qe.clientY-ct.clientY;if(!(!ct.isDragging&&Math.hypot(Wt,tt)<4)){if(!ct.isDragging){ct.isDragging=!0,xe.current=!0,we.setData(N.data);const Dt=Ge.getBoundingClientRect().width;J({x:qe.clientX,y:qe.clientY}),Ce(Dt),N.onPointerDragStart?.(qe)}qe.preventDefault(),J({x:qe.clientX,y:qe.clientY}),N.onPointerDragMove?.(qe)}},Le=qe=>{if(!ct.isDragging){St();return}qe.preventDefault(),Ce(null),N.onPointerDragEnd?.(qe),St()};Te.current=St,document.addEventListener("mousemove",$e,!0),document.addEventListener("mouseup",Le,!0)}F&&!Se&&X.preventDefault()}},[N,Se,ze,l,J,U,F]),Ye=x.useCallback(X=>{if(!U(X.nativeEvent)){X.preventDefault(),X.stopPropagation();return}c?.(X)},[c,U]),it=z({onClick:Be,onKeyDown:X=>{a||(d?.(X),!X.defaultPrevented&&((X.key==="Enter"||X.key===" ")&&(X.preventDefault(),X.stopPropagation(),Ie()),X.key==="ArrowRight"&&pe.current&&(X.preventDefault(),X.stopPropagation(),pe.current())))},onMouseDown:Ze,onAuxClick:Ye}),nt=L?.(it)??it,vt=m!=null?v.jsx(uN.Provider,{value:re,children:m}):void 0,st=fx(),xt=dx(),We=px(),Ot=E!=null?v.jsxs("div",{className:st.className,style:st.style,children:[v.jsx("div",{className:xt.className,style:xt.style,children:e}),v.jsx("div",{className:We.className,style:We.style,children:E})]}):e,Fe=he||ne,Ke=cx({disabled:a,expanded:r===!0,focused:!he&&te,hasDescription:E!=null,indent:C,inSubmenu:P,selected:T,variant:R}),ht={role:"menuitem",tabIndex:te?0:-1,...n!==void 0?{"aria-haspopup":n}:{},...r!==void 0?{"aria-expanded":r}:{},"aria-disabled":a||void 0,"data-expanded":r===!0||void 0,draggable:ze?!1:void 0,"data-disabled":a||void 0,"data-focused":!he&&te?!0:void 0,"data-menu-draggable":Se||void 0,"data-selected":T||void 0,"data-has-description":E!=null||void 0,"data-variant":R!=="default"?R:void 0,"data-indent":C||void 0,"data-wide-left":A||void 0,"data-dragging":ge||Me!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[Il]:D,className:Ke.className,style:Ke.style,...nt},Xe=Me!=null&&N?.preview!=null?Ri.createPortal(v.jsx("div",{"aria-hidden":"true",ref:ue,style:{left:0,pointerEvents:"none",position:"fixed",top:0,transform:"translate3d(-9999px, -9999px, 0)",width:Me,willChange:"transform",zIndex:1e4},children:N.preview}),document.body):null,Y=B?v.jsxs("li",{ref:fe,...ht,children:[v.jsx(kl,{disabled:a,hasDescription:E!=null,leading:h,trailing:vt,trailingAccessory:K,wideLeft:A,children:Ot}),Xe]}):v.jsxs("div",{ref:fe,...ht,children:[v.jsx(kl,{disabled:a,hasDescription:E!=null,leading:h,trailing:vt,trailingAccessory:K,wideLeft:A,children:Ot}),Xe]});return g!=null?v.jsx(bx,{closeDelay:k,content:g,disabled:Fe,openDelay:y,surfaceStyle:w==="wide"?WU():void 0,children:Y}):Y}function xx(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=Uv(),l=mh(t),c=n?s:void 0,p=wr(()=>Symbol("labelable-control")),d=x.useRef(!1),h=x.useRef(t!=null),m=Ve(()=>{!d.current||a===ar||(d.current=!1,a(p.current,void 0))});return He(()=>{if(a===ar)return;let g;if(n){const y=r?.current;yt(y)&&y.closest("label")!=null?g=t??null:g=c??l}else if(t!=null)h.current=!0,g=t;else if(h.current)g=l;else{m();return}if(g===void 0){m();return}d.current=!0,a(p.current,g)},[t,r,c,a,n,l,p,m]),x.useEffect(()=>m,[m]),s??l}const xq=x.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:p=!1,onValueChange:d,defaultValue:h,autoFocus:m=!1,style:g,...y}=t,{state:k,name:w,disabled:_,setTouched:E,setDirty:R,validityData:T,setFocused:C,setFilled:A,validationMode:N,validation:I}=Gc(),H=_||p,$=w??l,L={...k,disabled:H},{labelId:K}=Uv(),Z=xx({id:a});He(()=>{const W=c!=null;I.inputRef.current?.value||W&&c!==""?A(!0):W&&c===""&&A(!1)},[I.inputRef,A,c]);const q=x.useRef(null);He(()=>{m&&q.current===Dr(Ft(q.current))&&C(!0)},[m,C]);const[z]=pc({controlled:c,default:h,name:"FieldControl",state:"value"}),j=c!==void 0,F=j?z:void 0,U=Ve(()=>I.inputRef.current?.value);return uC(I.inputRef,{id:Z,value:F,getValue:U}),vn("input",t,{ref:[n,q],state:L,props:[{id:Z,disabled:H,name:$,ref:I.inputRef,"aria-labelledby":K,autoFocus:m,...j?{value:F}:{defaultValue:h},onChange(W){const D=W.currentTarget.value;d?.(D,_t(Ss,W.nativeEvent)),R(D!==T.initialValue),A(D!=="")},onFocus(){C(!0)},onBlur(W){E(!0),C(!1),N==="onBlur"&&I.commit(W.currentTarget.value)},onKeyDown(W){W.currentTarget.tagName==="INPUT"&&W.key==="Enter"&&(E(!0),I.commit(W.currentTarget.value))}},I.getInputValidationProps(),y],stateAttributesMapping:Hc})}),kq=x.forwardRef(function(t,n){return v.jsx(xq,{ref:n,...t})}),Sq=x.createContext(void 0);function wq(){return x.useContext(Sq)}const Bb={base:{kVAEAm:"ui-10l6tqk",krVfgx:"ui-r0fw0u",kCIrl2:"ui-7zl9wm",kzqmXN:"ui-jwey39",kZKoxP:"ui-wbbb81",kaIpWk:"ui-16rqkct",kfzvcC:"ui-47corl",$$css:!0},colorBlue:{kWkggS:"ui-1b558e3",$$css:!0},colorGreen:{kWkggS:"ui-15xcjd2",$$css:!0}};function Eq(e){return[Bb.base,e==="green"?Bb.colorGreen:Bb.colorBlue]}function Tq({color:e="blue",className:t}){const n=wn({rootClass:"ui-indicator-dot",stylexStyles:Eq(e),className:t});return v.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const _q={root:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kmuXW:"ui-2lah0s",kB7OPa:"ui-9f619",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1e1y6u3 ui-zmqr1 ui-id2qid ui-1twr5m9 ui-12ip6lu",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kWkggS:"ui-px7pq3 ui-vzb8ri ui-1trtblk",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:"ui-1szrgyu",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kjBf7l:"ui-1uczgqu ui-1725o6r",kInvED:"ui-1wfwxd8 ui-7s97pk",kfzvcC:"ui-67bb7w ui-7gqb9v",kFalU9:"ui-ggy1nq",kVAEAm:"ui-1fxuinm",$$css:!0}},Rq={root:{"--ui-button-bg":"ui-1ny5ihx ui-1a4icse ui-11avru9 ui-gc53xt ui-aq07m7 ui-xrmxsc","--ui-button-bg-hover":"ui-19r40ui ui-dq8yea ui-1rlkm3m ui-16yx911 ui-158em9s ui-1pjq0pd ui-akc1e3 ui-tggix7 ui-1vwqxyx","--ui-button-fg":"ui-1ob79qu ui-1yx7ign ui-1a1fpz7 ui-1kzwtjc ui-135v23r ui-won08w ui-1uhjvfl ui-15er956 ui-19o3xs9 ui-84m9o2 ui-2e8925 ui-6ihjvw ui-1y5zcs1 ui-naf39y ui-1jvl9fz ui-1vrtm4l ui-7owuad","--ui-button-fg-hover":"ui-dargq2 ui-642cp ui-1c2l02l ui-9di03z ui-13rrmb8 ui-i858fd ui-e0u7db ui-yotk09 ui-jkwokp ui-1gocfna ui-1m105qf ui-5v9tdr ui-zwyx12 ui-11n8ln3 ui-1by8bgs ui-1lb5e6d ui-15t60d",$$css:!0}},Cq={xs:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},sm:{kzqmXN:"ui-1pwdyn5",kZKoxP:"ui-1vatr1o",$$css:!0},md:{kzqmXN:"ui-16bvwqk",kZKoxP:"ui-1a6rlst",$$css:!0},lg:{kzqmXN:"ui-1eu7oa3",kZKoxP:"ui-1e94bgo",$$css:!0}},Aq={xs:{keoZOQ:"ui-u4j5zy",km5ZXQ:"ui-oxmne4",k1K539:"ui-11y930c",koQZXg:"ui-1vidcv1",$$css:!0},sm:{keoZOQ:"ui-zrgnep",km5ZXQ:"ui-1erxc0b",k1K539:"ui-11b1quy",koQZXg:"ui-3zwt15",$$css:!0},md:{keoZOQ:"ui-vqhhvk",km5ZXQ:"ui-1bxntau",k1K539:"ui-1dy9ubm",koQZXg:"ui-rwqdqc",$$css:!0},lg:{keoZOQ:"ui-kv60qn",km5ZXQ:"ui-1t00xno",k1K539:"ui-1hi8m59",koQZXg:"ui-eqy94b",$$css:!0}},Hd={root:_q.root,appearance:Rq.root,size:Cq,contentFrame:Aq},Nq="md";function po({icon:e,iconVariant:t="outline",variant:n="default",shape:r="rounded",frame:s="container",size:a,pressed:l,subtleHover:c,suppressHoverBackground:p=!1,color:d,isSuccess:h=!1,className:m,style:g,disabled:y,indicatorDot:k=!1,indicatorDotColor:w="blue","aria-label":_,"aria-labelledby":E,...R}){const T=Nl(),C=a??T?.iconButtonSize??Nq,A=C==="lg"?"base":"sm",N=c??T?.iconButtonSubtleHover??!1,I=y??T?.disabled,$=l!==void 0||(n==="toggle"||n==="tab"),L=$?l??!1:!1,K=h?"check":e,Z=An(Hd.root,Hd.appearance,Xu.appearance,Xu.press,(n==="primary"||n==="secondary")&&Xu.colors,Hd.size[C],s==="content"&&Hd.contentFrame[C]);return v.jsxs(aC,{...R,className:Sn("ui-icon-button",Z.className,m),style:{...Z.style,...g},"data-variant":n,"data-shape":r!=="rounded"?r:void 0,"data-frame":s,"data-size":C,"data-color":d,"data-indicator-dot":k||void 0,"data-pressed":$?L:void 0,"data-subtle-hover":N||void 0,"data-suppress-hover-background":p||void 0,disabled:I,"aria-label":_,"aria-labelledby":E,"aria-pressed":l,children:[typeof K=="string"?v.jsx(Nn,{name:K,variant:t,size:A,"aria-hidden":"true"}):v.jsx("span",{...{0:{className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014 ui-1u4itkb"},1:{className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014 ui-xfpx3u"}}[(A==="base")<<0],"aria-hidden":"true",children:K}),k?v.jsx(Tq,{color:w}):null]})}function Oq(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function kx(e){if(!(Oq()?e.metaKey:e.ctrlKey)||e.shiftKey||e.altKey)return!1;switch(e.key.toLowerCase()){case"a":return e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),e.currentTarget.select(),!0;case"c":case"v":case"x":case"z":return e.nativeEvent.stopImmediatePropagation(),!0;default:return!1}}const Gd={base:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},monoInput:{kGuDYH:"ui-pr5cyi",$$css:!0}};function Mq({className:e,disabled:t=!1,mono:n=!1,ref:r,style:s,onKeyDown:a,...l}){const c=wn({rootClass:"ui-input-group__input",stylexStyles:[Gd.base,t?Gd.disabled:null,n?Gd.mono:null,n?Gd.monoInput:null],className:e,style:s}),p=x.useCallback(d=>{a?.(d),!d.defaultPrevented&&kx(d)},[a]);return v.jsx("input",{ref:r,className:c.className,style:c.style,disabled:t,onKeyDown:p,...l})}const Lr={base:{"--ui-input-group-border-width":"ui-1cx02xk","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4","--input-group-button-inset":"ui-1c59nzh",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kzqmXN:"ui-h8yej3",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j ui-9afaxg ui-4vz0kq",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-141kqco ui-7asvek ui-ajihsc",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba ui-illscj ui-1rfq9xa",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1arpupx ui-vv26sj ui-15k81bw",kaIpWk:"ui-1043rbw",kLKAdn:"ui-e8kt42",kpe85a:"ui-1b1zv1o",kGO01o:"ui-1ftrzfz",kE3dHu:"ui-1bgzvkm",kWkggS:"ui-flfp0o",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},disabled:{kLZC3w:"ui-1aeic0j",k26BEO:"ui-141kqco",kL6WhQ:"ui-17fyfba",kaZRDh:"ui-1arpupx",kkrTdU:"ui-1h6gzvc",kSiTet:"ui-byyjgo",$$css:!0},sizeBase:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-xlcw59","--input-group-button-inset":"ui-1ethuh",kZKoxP:"ui-1e94bgo",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1u9w55t",kZKoxP:"ui-170hpbr",kOIVth:"ui-pkkfsy",$$css:!0},sizeXl:{"--ui-input-group-padding-block":"ui-17wxzvn","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1ethuh",kOIVth:"ui-ehausa",$$css:!0},layoutTextarea:{kGNEyG:"ui-1cy8zhl",kZKoxP:"ui-t7dq6l",kAzted:"ui-16ry4p3",$$css:!0},layoutTextareaBase:{kAzted:"ui-t6xkjb",$$css:!0},layoutTextareaLg:{kAzted:"ui-16ry4p3",$$css:!0},frameContent:{kzqmXN:"ui-q8za26",kqGvvJ:"ui-1k4kybs",kUOVxO:"ui-d1nd0v",$$css:!0},variantElevated:{kWkggS:"ui-f1vpex",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-qjnua1 ui-aig341",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",$$css:!0},variantUnfilled:{"--ui-input-group-border-width":"ui-qkl0tc","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4",kWkggS:"ui-jbqb8w",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kOIVth:"ui-137clkk",kGVxlE:"ui-1gnnqk1 ui-15ysqaf",$$css:!0},variantUnfilledSize:{kZKoxP:"ui-t7dq6l",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},Vd={field:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",kAzted:"ui-10fesj9",kHenm0:"ui-tt52l0",kORKVm:"ui-10wlt62",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},collapseBlur:{kskxy:"ui-1kxtfma ui-5u5ifr",kORKVm:"ui-10wlt62",$$css:!0}},Sl={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",koQZXg:"ui-j3b58b ui-fn0i77",km5ZXQ:"ui-1yf7rl7 ui-1qpi6ia",$$css:!0},textareaLayout:{kAzted:"ui-1tn5z8q",$$css:!0}},N1={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0}},Iq={base:Lr.sizeBase,lg:Lr.sizeLg,xl:Lr.sizeXl},Dq={base:Lr.layoutTextareaBase,lg:Lr.layoutTextareaLg,xl:null},zq={container:null,content:Lr.frameContent},Lq={default:null,elevated:Lr.variantElevated,ghost:Lr.variantGhost,unfilled:Lr.variantUnfilled},jq={rounded:null,pill:Lr.shapePill},dN=x.createContext(null);function la(){const e=x.useContext(dN);if(!e)throw new Error("InputGroup compound components must be used within InputGroup.Root");return e}const Pq={base:"sm",lg:"base",xl:"lg"},$q={base:"xs",lg:"sm",xl:"md"},Bq={base:"xs",lg:"sm",xl:"md"};function O1({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:p,children:d}){const h=wq(),m=l||h?.disabled===!0,g=wn({rootClass:"ui-input-group",stylexStyles:[Lr.base,Iq[n],s==="textarea"?Lr.layoutTextarea:null,s==="textarea"?Dq[n]:null,zq[t],Lq[e],e==="unfilled"?Lr.variantUnfilledSize:null,jq[r],m?Lr.disabled:null,c],className:p});return v.jsx(dN.Provider,{value:{disabled:m,layout:s,mono:a},children:v.jsx(Ts,{iconSize:Pq[n],iconButtonSize:$q[n],buttonSize:Bq[n],disabled:m||void 0,children:v.jsx("div",{className:g.className,style:g.style,"data-variant":e,"data-frame":t,"data-size":n,"data-shape":r!=="rounded"?r:void 0,"data-layout":s==="textarea"?"textarea":void 0,"data-mono":a||void 0,"data-disabled":m||void 0,children:d})})})}function Fq({className:e,disabled:t,ref:n,style:r,...s}){const a=la(),l=a.disabled||t===!0;return v.jsx(kq,{...s,className:e,disabled:l,ref:n,render:v.jsx(Mq,{mono:a.mono}),style:r})}function Uq({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:p,minRows:d=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:g=!1,rows:y,value:k,placeholder:w,focusedPlaceholder:_,...E}){const R=la(),T=R.disabled||t===!0,C=wn({rootClass:"ui-input-group__textarea",stylexStyles:[Vd.field,T?Vd.disabled:null,R.mono?Vd.mono:null,g?Vd.collapseBlur:null,r],className:e,style:s}),A=x.useRef(null),N=Kc([A,n]),[I,H]=x.useState(!1),$=d<1?1:d,L=h===void 0?void 0:h<$?$:h,K=x.useCallback(()=>{if(!m)return;const P=A.current;if(!P)return;if(L===$&&(y===void 0||y===$)){P.style.height="",P.style.overflowY="auto";return}P.style.height="auto";const W=window.getComputedStyle(P),D=Number.parseFloat(W.lineHeight),B=Number.parseFloat(W.paddingTop)||0,G=Number.parseFloat(W.paddingBottom)||0,O=Number.parseFloat(W.borderTopWidth)||0,ie=Number.parseFloat(W.borderBottomWidth)||0,te=B+G+O+ie,ne=Number.isFinite(D)&&D>0?te+D*$:0,le=L!==void 0&&Number.isFinite(D)&&D>0?te+D*L:void 0,pe=Math.max(P.scrollHeight,ne),ye=le!==void 0?Math.min(pe,le):pe;P.style.height=`${ye}px`,P.style.overflowY=le!==void 0&&P.scrollHeight>le?"auto":"hidden"},[m,L,$,y]);x.useLayoutEffect(()=>{K()},[k,K]);const Z=x.useCallback(P=>{a?.(P),!P.defaultPrevented&&kx(P)},[a]),q=x.useCallback(P=>{l?.(P),P.defaultPrevented||K()},[l,K]),z=x.useCallback(P=>{H(!0),c?.(P)},[c]),j=x.useCallback(P=>{H(!1),p?.(P)},[p]),F=y??$,U=I&&_!==void 0?_:w;return v.jsx("textarea",{ref:N,className:C.className,style:C.style,disabled:T,onKeyDown:Z,rows:F,value:k,placeholder:U,...E,"data-textarea-collapse-blur":g?"":void 0,onInput:q,onFocus:z,onBlur:j})}function qq({className:e,ref:t,...n}){const r=la(),s=wn({rootClass:"ui-input-group__addon",stylexStyles:[Sl.base,r.layout==="textarea"?Sl.textareaLayout:null],className:e});return v.jsx("span",{className:s.className,style:s.style,children:v.jsx(Nn,{ref:t,...n})})}function Hq({className:e,disabled:t,ref:n,...r}){const s=la(),a=s.disabled?!0:t,l=wn({rootClass:"ui-input-group__addon",stylexStyles:[Sl.base,s.layout==="textarea"?Sl.textareaLayout:null],className:e});return v.jsx("span",{className:l.className,style:l.style,children:v.jsx(po,{ref:n,disabled:a,...r})})}function Gq({className:e,disabled:t,ref:n,...r}){const s=la(),a=s.disabled?!0:t,l=wn({rootClass:"ui-input-group__addon",stylexStyles:[Sl.base,s.layout==="textarea"?Sl.textareaLayout:null],className:e});return v.jsx("span",{className:l.className,style:l.style,children:v.jsx(zn,{ref:n,disabled:a,...r})})}function Vq({className:e,children:t}){const n=la(),r=wn({rootClass:"ui-input-group__span",stylexStyles:[N1.base,n.mono?N1.mono:null],className:e});return v.jsx("span",{className:r.className,style:r.style,children:t})}const Kd=Object.assign(O1,{Root:O1,Input:Fq,Textarea:Uq,Icon:qq,IconButton:Hq,Button:Gq,Span:Vq,useContext:la});function Uh({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,...c}){return v.jsxs(Kd.Root,{className:e,variant:t,size:n,disabled:s,children:[a!=null&&v.jsx(Kd.Icon,{name:a}),v.jsx(Kd.Input,{ref:r,...c}),l!=null&&v.jsx(Kd.Icon,{name:l})]})}function pN(){const e=x.useContext(Bh),t=x.useContext(ex),n=e??t;if(!n)throw new Error("useMenuLayerContext must be used within a <Menu> or <Menu.SubMenu>");return n}function Kq({placeholder:e="Search...","aria-label":t,className:n,value:r,onValueChange:s,autoFocus:a=!1}){const c=Xc()==="body",p=Jc(),{searchValue:d,setSearchValue:h,searchInputRef:m,activeIndex:g,setActiveIndex:y,listRef:k,setHasSearchInput:w}=pN(),_=x.useRef(null),E=r!==void 0&&s!==void 0,T=!E||a||p?m:_,C=E?r:d;x.useEffect(()=>{if(!E)return w(!0),()=>w(!1)},[E,w]),x.useLayoutEffect(()=>{if(E&&!a)return;const $=m.current;if(!$)return;$.focus({preventScroll:!0});const L=requestAnimationFrame(()=>{document.activeElement!==$&&$.focus({preventScroll:!0})});return()=>cancelAnimationFrame(L)},[E,a,m]);const A=$=>{E?s($.target.value):(h($.target.value),_A(k,"body",y),s?.($.target.value))},N=$=>{if(kx($))return;if($.ctrlKey&&!$.metaKey){const K=$.key.toLowerCase();if(K==="n"||K==="p"){$.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes($.key)&&!$.metaKey&&!$.ctrlKey&&!$.altKey&&$.stopPropagation(),E&&$.key==="Enter"){$.preventDefault(),$.stopPropagation();return}if(!E&&$.key==="Enter"&&g!=null){$.preventDefault();const K=k.current[g];K&&(K.click(),m.current?.focus())}if($.key==="ArrowRight"){const K=$.currentTarget;if(!(K.selectionStart===K.value.length&&K.selectionEnd===K.value.length)){$.stopPropagation();return}w1({event:$,direction:"ArrowRight",activeIndex:g,listRef:k,restoreFocus:()=>m.current?.focus()});return}if($.key==="ArrowLeft"){const K=$.currentTarget;if(!(K.selectionStart===0&&K.selectionEnd===0)){$.stopPropagation();return}w1({event:$,direction:"ArrowLeft",activeIndex:g,listRef:k,restoreFocus:()=>m.current?.focus()})}},I=B9(n),H=v.jsx(Uh,{ref:T,type:"text",variant:"unfilled",size:"base",value:C,onChange:A,onKeyDown:N,placeholder:e,"aria-label":t??"Search menu items"});return c?v.jsx("li",{className:I.className,style:I.style,role:"none",children:H}):v.jsx("div",{className:I.className,style:I.style,role:"none",children:H})}function Zq({children:e,title:t,textAction:n,tooltip:r,noDivider:s}){const a=C1(),l=iN(n!=null),c=F9(),p=v.jsxs("div",{role:"group","aria-label":typeof t=="string"?t:void 0,className:a.className,style:a.style,"data-menu-section":!0,"data-no-divider":s||void 0,children:[t&&v.jsxs("div",{role:"presentation",className:l.className,style:l.style,"data-has-action":n!=null||void 0,children:[v.jsx("span",{children:t}),n!=null?v.jsx("button",{type:"button",className:c.className,style:c.style,onClick:n.onClick,children:n.label}):null]}),e]});if(r!=null){const d=C1();return v.jsx($h,{content:r,placement:"right",offset:6,openDelay:0,closeDelay:0,className:jh,sameAxisOnly:!0,children:v.jsx("div",{className:d.className,style:d.style,"data-menu-section":!0,"data-no-divider":s||void 0,children:p})})}return p}const Wq=x.createContext(void 0);function Yq(){const e=x.useContext(Wq);if(e===void 0)throw new Error(Xn(63));return e}let M1=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",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})({});const Xq={...Hc,checked(e){return e?{[M1.checked]:""}:{[M1.unchecked]:""}}},Qq=x.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{state:c}=Gc(),p=Yq(),d={...c,...p};return vn("span",t,{state:d,ref:n,stateAttributesMapping:Xq,props:l})}),Jq="md",I1={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kmuXW:"ui-2lah0s",kaIpWk:"ui-1i4c3av",kMeerF:"ui-1k57tk5 ui-x510wv",k3XXqK:"ui-1t137rt ui-15veape",kjBf7l:"ui-1uczgqu ui-1whe2fk",kInvED:"ui-1wfwxd8 ui-1edn9mt",kSiTet:"ui-1hc1fzr ui-vlaemc",kWkggS:"ui-59yu97 ui-1jnhqrh",k1ekBW:"ui-15406qy",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-23j0i4",kZKoxP:"ui-1vatr1o","--ui-switch-thumb-travel":"ui-sc32xf",$$css:!0},md:{kzqmXN:"ui-1td3qas",kZKoxP:"ui-1a6rlst","--ui-switch-thumb-travel":"ui-9pb0k7",$$css:!0},lg:{kzqmXN:"ui-1guw455",kZKoxP:"ui-1e94bgo","--ui-switch-thumb-travel":"ui-1c3f5sz",$$css:!0}},e8={primary:{"--ui-switch-active-bg":"ui-i0s8m6",$$css:!0},green:{"--ui-switch-active-bg":"ui-1g3p0vo",$$css:!0},neutral:{"--ui-switch-active-bg":"ui-742exl",$$css:!0}};function t8({interactive:e,size:t,variant:n}){const r=v.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-12peec7 ui-10z6xd1 ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?v.jsx(Qq,{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r}):v.jsx("span",{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r});return v.jsx("span",{"aria-hidden":"true",...An(I1.root,I1[t],e8[n]),children:s})}function n8({checked:e,disabled:t,size:n=Jq,variant:r="green"}){return v.jsx("span",{"aria-hidden":"true","data-component":"switch","data-size":n,"data-variant":r,"data-checked":e||void 0,"data-disabled":t||void 0,className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker",children:v.jsx(t8,{interactive:!1,size:n,variant:r})})}function r8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return vx(s,n)?v.jsx(i8,{...r,itemLabel:s,children:e}):null}function i8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,trailing:p,tooltip:d,closeOnSelect:h,topAlign:m=!1,itemLabel:g}){const{activeIndex:y,getItemProps:k,setIsOpen:w,closeOnSelect:_}=Qc(),{shouldAllowPointerInteraction:E}=Ci(),R=Jc(),T=yx(),C=Xc(),A=C==="body",N=h??_??!1,[I,H]=x.useState(r),$=n!==void 0,L=$?n:I,{ref:K,index:Z}=Eh({label:g||null}),q=y===Z,z=Ph(),j=x.useCallback(()=>{if(a)return;const O=!L;$||H(O);const ie={defaultPrevented:!1,preventDefault:()=>{ie.defaultPrevented=!0}};s?.(O,ie),N&&!ie.defaultPrevented&&T(w)},[a,L,$,s,N,w,T]),F=x.useCallback(O=>{if(!E(O.nativeEvent)){O.preventDefault(),O.stopPropagation();return}O.preventDefault(),O.stopPropagation(),j()},[j,E]),U=x.useCallback(O=>{a||(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),j())},[a,j]),P=k({onClick:F,onKeyDown:U}),W=M9({disabled:a,focused:q,inSubmenu:R,topAlign:m}),D={role:"menuitemcheckbox","aria-checked":L,tabIndex:q?0:-1,"aria-disabled":a||void 0,"data-checked":L||void 0,"data-disabled":a||void 0,"data-focused":q||void 0,"data-top-align":m||void 0,...t?{"data-testid":t}:{},[Il]:C,className:W.className,style:W.style,...P},B=v.jsx(kl,{disabled:a,leading:c,trailing:p,trailingAccessory:v.jsx(n8,{checked:L,disabled:a,size:"sm",variant:l}),children:e}),G=A?v.jsx("li",{ref:K,...D,children:B}):v.jsx("div",{ref:K,...D,children:B});return d!=null?v.jsx($h,{content:d,placement:"right",offset:6,openDelay:0,closeDelay:0,disabled:z?.hasOpenChild??!1,className:jh,sameAxisOnly:!0,children:G}):G}function s8({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=j9(n),a=P9(n),l=$9({inline:n,wrap:r});return v.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[v.jsx(Wp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?v.jsx(Wp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const o8=24;function a8({title:e,divider:t}){const n=iN(!1),r=U9();return v.jsxs(v.Fragment,{children:[t?v.jsx("div",{role:"presentation","aria-hidden":"true",className:r.className,style:r.style}):null,e!==void 0?v.jsx("div",{role:"presentation",className:n.className,style:{...n.style,height:o8,boxSizing:"border-box",overflow:"hidden"},children:v.jsx("span",{children:e})}):null]})}const bc=typeof window<"u"?x.useLayoutEffect:x.useEffect;function D1(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function l8({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:p}=x.useMemo(()=>({styleHeight:D1(l?.height),styleWidth:D1(l?.width)}),[l?.height,l?.width]),[d,h]=x.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&p!==void 0;return bc(()=>{if(s===null||m)return;const g=new ResizeObserver(y=>{for(const k of y){const{contentRect:w,target:_}=k;s===_&&h(E=>E.height===w.height&&E.width===w.width?E:{height:w.height,width:w.width})}});return g.observe(s,{box:e}),()=>{g?.unobserve(s)}},[e,m,s,c,p]),x.useMemo(()=>({height:c??d.height,width:p??d.width}),[d,c,p])}function u8(e){const t=x.useRef(()=>{throw new Error("Cannot call during render.")});return bc(()=>{t.current=e},[e]),x.useCallback(n=>t.current?.(n),[t])}function Fb({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function uo(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function nc(e,t){if(e===t)return!0;if(!!e!=!!t||(uo(e!==void 0),uo(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(const n in e)if(!Object.is(t[n],e[n]))return!1;return!0}function hN({cachedBounds:e,itemCount:t,itemSize:n}){if(t===0)return 0;if(typeof n=="number")return t*n;{const r=e.get(e.size===0?0:e.size-1);uo(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function c8({align:e,cachedBounds:t,index:n,itemCount:r,itemSize:s,containerScrollOffset:a,containerSize:l}){if(n<0||n>=r)throw RangeError(`Invalid index specified: ${n}`,{cause:`Index ${n} is not within the range of 0 - ${r-1}`});const c=hN({cachedBounds:t,itemCount:r,itemSize:s}),p=t.get(n),d=Math.max(0,Math.min(c-l,p.scrollOffset)),h=Math.max(0,p.scrollOffset-l+p.size);switch(e==="smart"&&(a>=h&&a<=d?e="auto":e="center"),e){case"start":return d;case"end":return h;case"center":return p.scrollOffset<=l/2?0:p.scrollOffset+p.size/2>=c-l/2?c-l:p.scrollOffset+p.size/2-l/2;default:return a>=h&&a<=d?a:a<h?h:d}}function z1({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,p=0,d=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,p=Math.max(0,l-s);h<a;){const m=e.get(h);if(m.scrollOffset+m.size>=t+n)break;h++}return c=Math.min(a,h),d=Math.min(r-1,c+s),l<0&&(l=0,c=-1,p=0,d=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:p,stopIndexOverscan:d}}function f8({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(uo(s<e,`Invalid index ${s}`);r.size-1<s;){const l=r.size;let c;switch(typeof n){case"function":{c=n(l,t);break}case"number":{c=n;break}}if(l===0)r.set(l,{size:c,scrollOffset:0});else{const p=r.get(l-1);uo(p!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:p.scrollOffset+p.size,size:c})}}const a=r.get(s);return uo(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function d8({itemCount:e,itemProps:t,itemSize:n}){return x.useMemo(()=>f8({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function p8({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(uo(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),uo(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function h8({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:p,overscanCount:d}){const[h,m]=x.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:g,startIndexOverscan:y,stopIndexVisible:k,stopIndexOverscan:w}={startIndexVisible:Math.min(a-1,h.startIndexVisible),startIndexOverscan:Math.min(a-1,h.startIndexOverscan),stopIndexVisible:Math.min(a-1,h.stopIndexVisible),stopIndexOverscan:Math.min(a-1,h.stopIndexOverscan)},{height:_=n,width:E=n}=l8({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),R=x.useRef({height:0,width:0}),T=_,C=p8({containerSize:T,itemSize:c});x.useLayoutEffect(()=>{if(typeof p=="function"){const L=R.current;(L.height!==_||L.width!==E)&&(p({height:_,width:E},{...L}),L.height=_,L.width=E)}},[_,p,E]);const A=d8({itemCount:a,itemProps:l,itemSize:C}),N=x.useCallback(L=>A.get(L),[A]),I=x.useCallback(()=>hN({cachedBounds:A,itemCount:a,itemSize:C}),[A,a,C]),H=x.useCallback(L=>{const K=Fb({containerElement:e,direction:r,isRtl:s,scrollOffset:L});return z1({cachedBounds:A,containerScrollOffset:K,containerSize:T,itemCount:a,overscanCount:d})},[A,e,T,r,s,a,d]);bc(()=>{const L=e?.scrollTop??0;m(H(L))},[e,r,H]),bc(()=>{if(!e)return;const L=()=>{m(K=>{const{scrollLeft:Z,scrollTop:q}=e,z=Fb({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),j=z1({cachedBounds:A,containerScrollOffset:z,containerSize:T,itemCount:a,overscanCount:d});return nc(j,K)?K:j})};return e.addEventListener("scroll",L),()=>{e.removeEventListener("scroll",L)}},[A,e,T,r,a,d]);const $=u8(({align:L="auto",containerScrollOffset:K,index:Z})=>{let q=c8({align:L,cachedBounds:A,containerScrollOffset:K,containerSize:T,index:Z,itemCount:a,itemSize:C});if(e){if(q=Fb({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),typeof e.scrollTo!="function"){const z=H(q);nc(h,z)||m(z)}return q}});return{getCellBounds:N,getEstimatedSize:I,scrollToIndex:$,startIndexOverscan:y,startIndexVisible:g,stopIndexOverscan:w,stopIndexVisible:k}}function m8(e){return x.useMemo(()=>e,Object.values(e))}function g8(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return nc(n,a)&&nc(r,l)&&nc(s,c)}function b8(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const y8="data-react-window-index";function v8({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:p,rowHeight:d,rowProps:h,tagName:m="div",style:g,...y}){const k=m8(h),w=x.useMemo(()=>x.memo(c,g8),[c]),[_,E]=x.useState(null),R=b8(d),T=x.useMemo(()=>R?q=>d.getRowHeight(q)??d.getAverageRowHeight():d,[R,d]),{getCellBounds:C,getEstimatedSize:A,scrollToIndex:N,startIndexOverscan:I,startIndexVisible:H,stopIndexOverscan:$,stopIndexVisible:L}=h8({containerElement:_,containerStyle:g,defaultContainerSize:n,direction:"vertical",itemCount:p,itemProps:k,itemSize:T,onResize:s,overscanCount:l});x.useImperativeHandle(r,()=>({get element(){return _},scrollToRow({align:q="auto",behavior:z="auto",index:j}){const F=N({align:q,containerScrollOffset:_?.scrollTop??0,index:j});typeof _?.scrollTo=="function"&&_.scrollTo({behavior:z,top:F})}}),[_,N]),bc(()=>{if(!_)return;const q=Array.from(_.children).filter((z,j)=>{if(z.hasAttribute("aria-hidden"))return!1;const F=`${I+j}`;return z.setAttribute(y8,F),!0});if(R)return d.observeRowElements(q)},[_,R,d,I,$]),x.useEffect(()=>{I>=0&&$>=0&&a&&a({startIndex:H,stopIndex:L},{startIndex:I,stopIndex:$})},[a,I,H,$,L]);const K=x.useMemo(()=>{const q=[];if(p>0)for(let z=I;z<=$;z++){const j=C(z);q.push(x.createElement(w,{...k,ariaAttributes:{"aria-posinset":z+1,"aria-setsize":p,role:"listitem"},key:z,index:z,style:{position:"absolute",left:0,transform:`translateY(${j.scrollOffset}px)`,height:R?void 0:j.size,width:"100%"}}))}return q},[w,C,R,p,k,I,$]),Z=v.jsx("div",{"aria-hidden":!0,style:{height:A(),width:"100%",zIndex:-1}});return x.createElement(m,{role:"list",...y,className:t,ref:E,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...g}},K,e,Z)}const mN=x.createContext(null);function x8(){const e=x.useContext(mN);if(!e)throw new Error("VirtualizedMenuItem must be used within Menu.VirtualizedContent");return e}function k8({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}){const c=x.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}),[t,n,r,s,a,l]);return v.jsx(mN.Provider,{value:c,children:e})}const S8=4,L1="ui-menu--virtualized";function w8({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,p=V9();return v.jsx("div",{className:p.className,style:{...t,...p.style},onMouseMove:()=>a(e),children:s(l,e,c)})}function E8({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:p,style:d,maxHeight:h,width:m="200px",size:g,backdrop:y,closeOnSelect:k=!0,overscanCount:w=5,renderActivePreview:_,ref:E}){const R=Nl(),{isOpen:T,isMounted:C,activeIndex:A,setActiveIndex:N,setIsOpen:I,virtualFocus:H,enableHover:$,nodeId:L,listRef:K,labelsRef:Z,searchValue:q,refs:z,floatingStyles:j,middlewareData:F,transitionStyles:U,context:P,getFloatingProps:W,getItemProps:D,dismissCauseRef:B,returnFocusOnSelect:G}=Ci(),O=x.useRef(null),ie=x.useRef(null),te=x.useRef(A);te.current=A;const ne=x.useRef(null),[le,pe]=x.useState(null),[ye,Se]=x.useState(null),ze=y??!$,he=Ih(),{portalLayerStyles:Te}=Uc("popover",C),Re=x.useRef(null);x.useEffect(()=>{r?Z.current=e.map(Y=>r(Y)):Z.current=e.map(()=>null),K.current.length!==e.length&&(K.current.length=e.length)},[e,r,Z,K]);const Oe=P.placement.startsWith("top"),ve=Oe&&C?F.bottomAnchor?.bottom??null:null,xe=x.useRef(null);x.useLayoutEffect(()=>{if(!T){xe.current=null,Re.current=null;return}if(A==null||xe.current===A)return;xe.current=A;const Y=Re.current===A;Re.current=null,!Y&&(A<0||A>=e.length||ie.current?.scrollToRow({index:A,align:"smart",behavior:"instant"}))},[T,A,e.length]);const Me=x.useRef(q),Ce=x.useRef(T);x.useEffect(()=>{const Y=Me.current,X=Ce.current;Me.current=q,Ce.current=T,!(!T||!X||Y===q)&&(e.length>0&&ie.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),N(e.length>0?0:null))},[T,e.length,q,N]);const Pe=x.useCallback((Y,X)=>{ne.current=Y,pe(we=>we===Y?we:Y),Se(we=>we===X?we:X)},[]);x.useLayoutEffect(()=>{if(!T||A==null||A<0||A>=e.length){Pe(null,null);return}const Y=K.current[A];Y!=null&&Pe(Y,A)},[A,T,e.length,K,Pe]);const ge=x.useCallback((Y,X)=>{Y===te.current&&X!=null&&Pe(X,Y)},[Pe]),fe=x.useCallback(Y=>{A!==Y&&(Re.current=Y,N(Y))},[A,N]),oe=x.useCallback(Y=>{Y.key==="Escape"&&(B.current="escape")},[B]),re=x.useCallback(Y=>{he(Y.nativeEvent)&&(B.current="backdrop",I(!1))},[B,I,he]),_e=x.useCallback(Y=>{if(!he(Y.nativeEvent))return;Y.preventDefault(),B.current="backdrop",I(!1);const Ge=document.elementsFromPoint(Y.clientX,Y.clientY).find(ct=>!ct.classList.contains(ox));Ge&&Ge.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Y.clientX,clientY:Y.clientY,screenX:Y.screenX,screenY:Y.screenY,button:Y.button,buttons:Y.buttons,ctrlKey:Y.ctrlKey,shiftKey:Y.shiftKey,altKey:Y.altKey,metaKey:Y.metaKey}))},[B,I,he]),J=Kc([z.setFloating,O,E]),ue=Ol();if(!C)return null;const Ie=h??Y9,Be=typeof t=="number"?e.length*t:e.reduce((Y,X,we)=>Y+t(we),0),Ze=Math.min(Be,Math.max(0,Ie-S8*2)),Ye=g??R?.menuSize??"sm",ot={...j,...U,...d,...gx({width:m}),...Te,...Oe&&ve!==null?{top:"auto",bottom:ve}:{}},it=eN(Te),nt=ax({className:p?`${L1} ${p}`:L1,size:Ye,style:ot}),vt=tN(),st=nN(),xt=ux(),We=lx(!0),Ot=K9(),Fe=rN(),Ke=T&&ye!=null&&ye>=0&&ye<e.length&&le!=null&&_!=null?_(ye,{rowElement:le,menuContentElement:O.current}):null,ht=Ke!=null&&le!=null,Xe={items:e,activeIndex:A,renderItem:n,onMouseMove:fe};return v.jsxs(qv,{...ue?{root:ue}:{},children:[ze&&v.jsx("div",{className:it.className,style:it.style,onClick:re,onContextMenu:_e,role:"none"}),v.jsx(Gv,{context:P,initialFocus:-1,returnFocus:B.current!=="backdrop"&&(B.current!=="selection"||G),modal:!H&&T,children:v.jsx("div",{ref:J,className:nt.className,style:nt.style,tabIndex:-1,"data-size":Ye,...W({onKeyDown:oe,onMouseDown:H?Y=>{Y.stopPropagation()}:void 0}),children:v.jsx(Ts,{menuSize:Ye,children:v.jsx("div",{className:vt.className,style:vt.style,role:"menu","aria-label":c??"Menu",children:v.jsx(vA,{dismiss:!T,children:v.jsx(mx,{layerNodeId:L,children:v.jsxs(k8,{activeIndex:A,setIsOpen:I,getItemProps:D,listRef:K,closeOnSelect:k,onRowElementChange:ge,children:[s!=null?v.jsx("div",{className:st.className,style:st.style,children:v.jsx(tc,{value:"header",children:s})}):null,e.length>0?v.jsx("div",{className:xt.className,style:xt.style,children:v.jsx("div",{className:We.className,style:We.style,role:"presentation",children:v.jsx(v8,{listRef:ie,className:Ot.className,rowComponent:w8,rowProps:Xe,rowCount:e.length,rowHeight:t,overscanCount:w,style:{height:Ze,width:"100%",overflowX:"hidden",scrollbarWidth:"none"}})})}):l,a!=null?v.jsx("div",{className:Fe.className,style:Fe.style,children:v.jsx(tc,{value:"footer",children:a})}):null,_!=null?v.jsx(lN,{open:ht,placement:"right-start",anchorRef:ne,offset:6,closeOnSelect:!1,virtualFocus:!0,children:ht?Ke:null}):null]})})})})})})})]})}function T8({index:e,children:t,disabled:n=!1,onSelect:r,leading:s,trailing:a,wideLeftSection:l=!1,tooltip:c,tooltipContentKey:p,closeOnSelect:d,description:h,variant:m="default",checked:g,ref:y}){const{shouldAllowPointerInteraction:k}=Ci(),w=Jc(),{activeIndex:_,setIsOpen:E,getItemProps:R,listRef:T,closeOnSelect:C,onRowElementChange:A}=x8(),N=d??C??!0,I=_===e,H=x.useCallback(G=>{T.current[e]=G,A?.(e,G),typeof y=="function"?y(G):y&&(y.current=G)},[e,T,A,y]),$=()=>{if(n)return;const G={defaultPrevented:!1,preventDefault:()=>{G.defaultPrevented=!0}};r?.(G),N&&!G.defaultPrevented&&E(!1)},Z=R({onClick:G=>{if(!k(G.nativeEvent)){G.preventDefault(),G.stopPropagation();return}$()},onKeyDown:G=>{n||(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),$())}}),q=fx(),z=dx(),j=px(),F=h!=null?v.jsxs("div",{className:q.className,style:q.style,children:[v.jsx("div",{className:z.className,style:z.style,children:t}),v.jsx("div",{className:j.className,style:j.style,children:h})]}):t,U=cx({disabled:n,focused:I,hasDescription:h!=null,inSubmenu:w,variant:m}),P=g!==void 0,W=P&&s==null?v.jsx(cC,{checked:g,disabled:n}):s,D=P?{role:"menuitemcheckbox","aria-checked":g,"data-checked":g||void 0}:{role:"menuitem"},B=v.jsx("li",{ref:H,...D,tabIndex:I?0:-1,"aria-disabled":n||void 0,"data-disabled":n||void 0,"data-focused":I||void 0,"data-has-description":h!=null||void 0,"data-variant":m!=="default"?m:void 0,"data-wide-left":l||void 0,[Il]:"body",className:U.className,style:U.style,...Z,children:v.jsx(kl,{disabled:n,hasDescription:h!=null,leading:W,trailing:a,wideLeft:l,children:F})});return c!=null?v.jsx(bx,{content:c,contentKey:p,children:B}):B}const qh={root:{kUk6DE:"ui-98rzlu",kZKoxP:"ui-5yr21d",kAzted:"ui-2lwn1j",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kORKVm:"ui-1odjw0f",kLKAdn:"ui-1jowytg",kpe85a:"ui-1o9oefx",kGO01o:"ui-10ha4xm",kE3dHu:"ui-1cc8a3a",kB7OPa:"ui-9f619",$$css:!0},content:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-6s0dn4",k9WMMc:"ui-2b8uid",ks0D6T:"ui-1dt7z5j",kzqmXN:"ui-izo9zl",kOIVth:"ui-11twubx",$$css:!0},message:{kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0},actions:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kwnvtZ:"ui-1a02dak",kOIVth:"ui-ehausa",keoZOQ:"ui-1e66mq1",$$css:!0}};function _8(){return qh.root}function R8(){return qh.content}function C8(){return qh.message}function A8(){return qh.actions}function yc({message:e,actions:t,errorText:n,className:r}){const s=wn({rootClass:"ui-empty-state",stylexStyles:_8(),className:r}),a=An(R8()),l=An(C8()),c=An(A8());return v.jsx("div",{className:s.className,style:s.style,children:v.jsxs("div",{className:a.className,style:a.style,children:[v.jsx(Wp,{as:"p",className:l.className,style:l.style,color:"tertiary",size:"lg",children:e}),n!=null?v.jsx(Wp,{as:"p",className:l.className,style:l.style,color:"red",size:"lg",children:n}):null,t!=null?v.jsx("div",{className:c.className,style:c.style,children:t}):null]})})}const gN=x.createContext(null);function bN(){const e=x.useContext(gN);if(!e)throw new Error("Menu.ExpandableSection components must be used within <Menu.ExpandableSection>");return e}function N8({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=x.useState(t),l=n!==void 0,c=l?n:s,p=h=>{l||a(h),r?.(h)},d=()=>p(!c);return v.jsx(gN.Provider,{value:{expanded:c,setExpanded:p,toggle:d},children:e})}function O8({children:e,leading:t,trailing:n,label:r}){const{expanded:s,setExpanded:a,toggle:l}=bN(),c=typeof t=="function"?t(s):t,p=d=>{if(d.key==="ArrowRight"&&!s){d.preventDefault(),d.stopPropagation(),a(!0);return}d.key==="ArrowLeft"&&s&&(d.preventDefault(),d.stopPropagation(),a(!1))};return v.jsx(cN,{closeOnSelect:!1,wideLeftSection:!0,leading:c,trailing:n,label:r??(typeof e=="string"?e:void 0),onKeyDown:p,onSelect:l,children:e})}function M8({children:e}){const{expanded:t}=bN();return t?v.jsx(v.Fragment,{children:e}):null}function I8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return vx(s,n)?v.jsx(D8,{...r,itemLabel:s,children:e}):null}function D8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:p,tooltipOpenDelay:d=0,tooltipCloseDelay:h=0,closeOnSelect:m,itemLabel:g}){const{activeIndex:y,getItemProps:k,setIsOpen:w,closeOnSelect:_}=Qc(),{shouldAllowPointerInteraction:E}=Ci(),R=Jc(),T=yx(),C=Xc(),A=C==="body",N=m??_??!1,[I,H]=x.useState(r),$=n!==void 0,L=$?n:I,{ref:K,index:Z}=Eh({label:g||null}),q=y===Z,z=Ph(),j=x.useCallback(()=>{if(a)return;const Se=!L;$||H(Se);const ze={defaultPrevented:!1,preventDefault:()=>{ze.defaultPrevented=!0}};s?.(Se,ze),N&&!ze.defaultPrevented&&T(w)},[a,L,$,s,N,w,T]),F=x.useCallback(Se=>{if(!E(Se.nativeEvent)){Se.preventDefault(),Se.stopPropagation();return}Se.preventDefault(),Se.stopPropagation(),j()},[j,E]),U=x.useCallback(Se=>{a||(Se.key==="Enter"||Se.key===" ")&&(Se.preventDefault(),Se.stopPropagation(),j())},[a,j]),P=k({onClick:F,onKeyDown:U}),W=c!=null,D=cx({disabled:a,focused:q,hasDescription:W,inSubmenu:R}),B={role:"menuitemcheckbox","aria-checked":L,tabIndex:q?0:-1,"aria-disabled":a||void 0,"data-checked":L||void 0,"data-disabled":a||void 0,"data-focused":q||void 0,"data-has-description":W||void 0,...t?{"data-testid":t}:{},[Il]:C,className:D.className,style:D.style,...P},G=v.jsx(cC,{checked:L,disabled:a}),O=fx(),ie=dx(),te=px(),ne=W?v.jsxs("div",{className:O.className,style:O.style,children:[v.jsx("div",{className:ie.className,style:ie.style,children:e}),v.jsx("div",{className:te.className,style:te.style,children:c})]}):e,le=v.jsx(kl,{disabled:a,hasDescription:W,leading:G,trailing:l,children:ne}),pe=p!=null&&z!=null,ye=A?v.jsx("li",{ref:K,...B,children:le}):v.jsx("div",{ref:K,...B,children:le});return pe?v.jsx(sN,{closeDelay:h,content:p,openDelay:d,children:ye}):p!=null?v.jsx($h,{content:p,placement:"right",offset:6,openDelay:d,closeDelay:h,className:jh,sameAxisOnly:!0,interactive:!0,children:ye}):ye}function z8({children:e}){const t=G9();return v.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[v.jsx(Nn,{name:"loading",size:"base",className:Z9}),v.jsx("span",{children:e??"Loading..."})]})}function j1({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:p,closeOnSelect:d,instantClose:h,instantTransitions:m,returnFocusOnSelect:g,focusItemOnOpen:y,virtualFocus:k,shouldKeepOpenDuringDrag:w,lockPositionWhileOpen:_}){return v.jsx(UF,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:p,closeOnSelect:d,instantClose:h,instantTransitions:m,returnFocusOnSelect:g,focusItemOnOpen:y,virtualFocus:k,shouldKeepOpenDuringDrag:w,lockPositionWhileOpen:_,children:e})}function L8(e){return go()===null?v.jsx(z$,{children:v.jsx(j1,{...e})}):v.jsx(j1,{...e})}function yN(e,t,n){const{ref:r,...s}=n,a=ZP({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function j8({children:e,disabled:t=!1}){const{getTriggerProps:n}=Ci();return yN(e,t,n())}function P8({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Ci();x.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return yN(e,n,{...l,onPointerDown:c=>{l.onPointerDown?.(c),c.button===2&&a(!1)},onContextMenu:c=>{l.onContextMenu?.(c),a(!1),c.stopPropagation()},onClick:c=>{t&&(c.preventDefault(),c.stopPropagation(),t(c))}})}const $8=Object.assign(lN,{useContext:Fh}),ju=Object.assign(L8,{useContext:Ci,useLayerContext:pN,Trigger:j8,HoverTrigger:P8,Content:J9,Item:cN,CheckboxItem:I8,TextItem:s8,SwitchItem:r8,Section:Zq,SearchInput:Kq,EmptyState:eq,LoadingState:z8,ExpandableSection:N8,ExpandableSectionTrigger:O8,ExpandableSectionContent:M8,SubMenu:$8,SubMenuItem:mq,SubMenuTrigger:hq,SubMenuContent:gq,VirtualizedContent:E8,VirtualizedItem:T8,VirtualizedSectionHeader:a8}),vN="data-composite-item-active",xN=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function B8(){return x.useContext(xN)}let kN=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function SN(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:p,elementsRef:d,labelsRef:h,nextIndexRef:m}=B8(),g=x.useRef(-1),[y,k]=x.useState(a??(s===kN.GuessFromOrder?()=>{if(g.current===-1){const E=m.current;m.current+=1,g.current=E}return g.current}:-1)),w=x.useRef(null),_=x.useCallback(E=>{if(w.current=E,y!==-1&&E!==null&&(d.current[y]=E,h)){const R=t!==void 0;h.current[y]=R?t:r?.current?.textContent??E.textContent}},[y,d,h,t,r]);return He(()=>{if(a!=null)return;const E=w.current;if(E)return l(E,n),()=>{c(E)}},[a,l,c,n]),He(()=>{if(a==null)return p(E=>{const R=w.current?E.get(w.current)?.index:null;R!=null&&k(R)})},[a,p,k]),x.useMemo(()=>({ref:_,index:y}),[y,_])}function F8(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=nR(),{ref:s,index:a}=SN(e),l=n===a,c=x.useRef(null),p=ks(s,c);return{compositeProps:x.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(a)},onMouseMove(){const h=c.current;if(!t||!h)return;const m=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!m&&h.focus()}}),[l,r,a,t]),compositeRef:p,index:a}}function Py(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Sx(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=Ve(s),l=x.useRef(0),c=wr(q8).current,p=wr(U8).current,[d,h]=x.useState(0),m=x.useRef(d),g=Ve((E,R)=>{p.set(E,R??null),m.current+=1,h(m.current)}),y=Ve(E=>{p.delete(E),m.current+=1,h(m.current)}),k=x.useMemo(()=>{const E=new Map;return Array.from(p.keys()).filter(T=>T.isConnected).sort(H8).forEach((T,C)=>{const A=p.get(T)??{};E.set(T,{...A,index:C})}),E},[p,d]);He(()=>{if(typeof MutationObserver!="function"||k.size===0)return;const E=new MutationObserver(R=>{const T=new Set,C=A=>T.has(A)?T.delete(A):T.add(A);R.forEach(A=>{A.removedNodes.forEach(C),A.addedNodes.forEach(C)}),T.size===0&&(m.current+=1,h(m.current))});return k.forEach((R,T)=>{T.parentElement&&E.observe(T.parentElement,{childList:!0})}),()=>{E.disconnect()}},[k]),He(()=>{m.current===d&&(n.current.length!==k.size&&(n.current.length=k.size),r&&r.current.length!==k.size&&(r.current.length=k.size),l.current=k.size),a(k)},[a,k,n,r,d]),He(()=>()=>{n.current=[]},[n]),He(()=>()=>{r&&(r.current=[])},[r]);const w=Ve(E=>(c.add(E),()=>{c.delete(E)}));He(()=>{c.forEach(E=>E(k))},[c,k]);const _=x.useMemo(()=>({register:g,unregister:y,subscribeMapChange:w,elementsRef:n,labelsRef:r,nextIndexRef:l}),[g,y,w,n,r,l]);return v.jsx(xN.Provider,{value:_,children:t})}function U8(){return new Map}function q8(){return new Set}function H8(e,t){const 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}function G8(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const V8=[];function K8(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,onLoop:s,dense:a=!1,orientation:l="both",direction:c,highlightedIndex:p,onHighlightedIndexChange:d,rootRef:h,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:y,modifierKeys:k=V8}=e,[w,_]=x.useState(0),E=n>1,R=x.useRef(null),T=ks(R,h),C=x.useRef([]),A=x.useRef(!1),N=p??w,I=Ve((K,Z=!1)=>{if((d??_)(K),Z){const q=C.current[K];gE(R.current,q,c,l)}}),H=Ve(K=>{if(K.size===0||A.current)return;A.current=!0;const Z=Array.from(K.keys()),q=Z.find(j=>j?.hasAttribute(vN))??null,z=q?Z.indexOf(q):-1;z!==-1&&I(z),gE(R.current,q,c,l)}),$=Ve((K,Z,q)=>s?s?.(K,Z,q,C):q),L=x.useMemo(()=>({"aria-orientation":l==="both"?void 0:l,ref:T,onFocus(K){const Z=R.current,q=gr(K.nativeEvent);!Z||q==null||!mE(q)||q.setSelectionRange(0,q.value.length??0)},onKeyDown(K){const Z=m?Cj:iC;if(!Z.has(K.key)||Z8(K,k)||!R.current)return;const z=c==="rtl",j=z?dc:al,F={horizontal:j,vertical:qo,both:j}[l],U=z?al:dc,P={horizontal:U,vertical:ol,both:U}[l],W=gr(K.nativeEvent);if(W!=null&&mE(W)&&!G8(W)){const ne=W.selectionStart,le=W.selectionEnd,pe=W.value??"";if(ne==null||K.shiftKey||ne!==le||K.key!==P&&ne<pe.length||K.key!==F&&ne>0)return}let D=N;const B=pp(C,y),G=Sy(C,y);if(E){const ne=t||Array.from({length:C.current.length},()=>({width:1,height:1})),le=vR(ne,n,a),pe=le.findIndex(Se=>Se!=null&&!vs(C.current,Se,y)),ye=le.reduce((Se,ze,he)=>ze!=null&&!vs(C.current,ze,y)?he:Se,-1);D=le[yR(le.map(Se=>Se!=null?C.current[Se]:null),{event:K,orientation:l,loopFocus:r,onLoop:$,cols:n,disabledIndices:kR([...y||C.current.map((Se,ze)=>vs(C.current,ze)?ze:void 0),void 0],le),minIndex:pe,maxIndex:ye,prevIndex:xR(N>G?B:N,ne,le,n,K.key===qo?"bl":K.key===al?"tr":"tl"),rtl:z})]}const O={horizontal:[j],vertical:[qo],both:[j,qo]}[l],ie={horizontal:[U],vertical:[ol],both:[U,ol]}[l],te=E?Z:{horizontal:m?_j:nC,vertical:m?Rj:rC,both:Z}[l];m&&(K.key===Bc?D=B:K.key===Fc&&(D=G)),D===N&&(O.includes(K.key)||ie.includes(K.key))&&(r&&D===G&&O.includes(K.key)?(D=B,s&&(D=s(K,N,D,C))):r&&D===B&&ie.includes(K.key)?(D=G,s&&(D=s(K,N,D,C))):D=dr(C.current,{startingIndex:D,decrement:ie.includes(K.key),disabledIndices:y})),D!==N&&!cc(C.current,D)&&(g&&K.stopPropagation(),te.has(K.key)&&K.preventDefault(),I(D,!0),queueMicrotask(()=>{C.current[D]?.focus()}))}}),[n,a,c,y,C,m,N,E,t,r,s,$,T,k,I,l,g]);return x.useMemo(()=>({props:L,highlightedIndex:N,onHighlightedIndexChange:I,elementsRef:C,disabledIndices:y,onMapChange:H,relayKeyboardEvent:L.onKeyDown}),[L,N,I,C,y,H])}function Z8(e,t){for(const n of Dj.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function W8(e){const{render:t,className:n,style:r,refs:s=lc,props:a=lc,state:l=hr,stateAttributesMapping:c,highlightedIndex:p,onHighlightedIndexChange:d,orientation:h,dense:m,itemSizes:g,loopFocus:y,onLoop:k,cols:w,enableHomeAndEndKeys:_,onMapChange:E,stopEventPropagation:R=!0,rootRef:T,disabledIndices:C,modifierKeys:A,highlightItemOnHover:N=!1,tag:I="div",...H}=e,$=tx(),{props:L,highlightedIndex:K,onHighlightedIndexChange:Z,elementsRef:q,onMapChange:z,relayKeyboardEvent:j}=K8({itemSizes:g,cols:w,loopFocus:y,onLoop:k,dense:m,orientation:h,highlightedIndex:p,onHighlightedIndexChange:d,rootRef:T,stopEventPropagation:R,enableHomeAndEndKeys:_,direction:$,disabledIndices:C,modifierKeys:A}),F=vn(I,e,{state:l,ref:s,props:[L,...a,H],stateAttributesMapping:c}),U=x.useMemo(()=>({highlightedIndex:K,onHighlightedIndexChange:Z,highlightItemOnHover:N,relayKeyboardEvent:j}),[K,Z,N,j]);return v.jsx(tR.Provider,{value:U,children:v.jsx(Sx,{elementsRef:q,onMapChange:P=>{E?.(P),z(P)},children:F})})}const wN=x.createContext(void 0);function wx(){const e=x.useContext(wN);if(e===void 0)throw new Error(Xn(64));return e}let Y8=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Ex={tabActivationDirection:e=>({[Y8.activationDirection]:e})},X8=x.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:p,style:d,...h}=t,m=Object.hasOwn(t,"defaultValue"),g=x.useRef([]),[y,k]=x.useState(()=>new Map),[w,_]=pc({controlled:p,default:s,name:"Tabs",state:"value"}),E=p!==void 0,[R,T]=x.useState(()=>new Map),C=x.useCallback(O=>{if(O===void 0)return null;for(const[ie,te]of R.entries())if(te!=null&&O===(te.value??te.index))return ie;return null},[R]),[A,N]=x.useState(()=>({previousValue:w,tabActivationDirection:"none"})),{previousValue:I,tabActivationDirection:H}=A;let $=H,L=!1;I!==w&&($=P1(I,w,l,R),L=I!=null&&w!=null&&C(w)==null);const K=L?I:w,Z=I!==K||H!==$;He(()=>{Z&&N({previousValue:K,tabActivationDirection:$})},[K,Z,$]);const q=Ve((O,ie)=>{const te=P1(w,O,l,R);ie.activationDirection=te,a?.(O,ie),!ie.isCanceled&&_(O)}),z=Ve((O,ie)=>{k(te=>{if(te.get(O)===ie)return te;const ne=new Map(te);return ne.set(O,ie),ne})}),j=Ve((O,ie)=>{k(te=>{if(!te.has(O)||te.get(O)!==ie)return te;const ne=new Map(te);return ne.delete(O),ne})}),F=x.useCallback(O=>y.get(O),[y]),U=x.useCallback(O=>{for(const ie of R.values())if(O===ie?.value)return ie?.id},[R]),P=x.useMemo(()=>({getTabElementBySelectedValue:C,getTabIdByPanelValue:U,getTabPanelIdByValue:F,onValueChange:q,orientation:l,registerMountedTabPanel:z,setTabMap:T,unregisterMountedTabPanel:j,tabActivationDirection:$,value:w}),[C,U,F,q,l,z,T,j,$,w]),W=x.useMemo(()=>{for(const O of R.values())if(O!=null&&O.value===w)return O},[R,w]),D=x.useMemo(()=>{for(const O of R.values())if(O!=null&&!O.disabled)return O.value},[R]);He(()=>{if(E||R.size===0)return;const O=W?.disabled,ie=W==null&&w!==null;if(m&&O&&w===s||!O&&!ie)return;const ne=D??null;w!==ne&&(_(ne),N(le=>le.tabActivationDirection==="none"?le:{...le,tabActivationDirection:"none"}))},[s,D,m,E,W,_,R,w]);const G=vn("div",t,{state:{orientation:l,tabActivationDirection:$},ref:n,props:h,stateAttributesMapping:Ex});return v.jsx(wN.Provider,{value:P,children:v.jsx(Sx,{elementsRef:g,children:G})})});function P1(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[p,d]of r.entries()){if(d==null)continue;const h=d.value??d.index;if(e===h&&(s=p),t===h&&(a=p),s!=null&&a!=null)break}if(s==null||a==null)return s!==a&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const l=s.getBoundingClientRect(),c=a.getBoundingClientRect();if(n==="horizontal"){if(c.left<l.left)return"left";if(c.left>l.left)return"right"}else{if(c.top<l.top)return"up";if(c.top>l.top)return"down"}return"none"}const EN=x.createContext(void 0);function TN(){const e=x.useContext(EN);if(e===void 0)throw new Error(Xn(65));return e}const Q8=x.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:p=!0,style:d,...h}=t,{value:m,getTabPanelIdByValue:g,orientation:y}=wx(),{activateOnFocus:k,highlightedTabIndex:w,onTabActivation:_,registerTabResizeObserverElement:E,setHighlightedTabIndex:R,tabsListElement:T}=TN(),C=mh(c),A=x.useMemo(()=>({disabled:s,id:C,value:l}),[s,C,l]),{compositeProps:N,compositeRef:I,index:H}=F8({metadata:A}),$=l===m,L=x.useRef(!1),K=x.useRef(null);x.useEffect(()=>{const G=K.current;if(G)return E(G)},[E]),He(()=>{if(L.current){L.current=!1;return}if(!($&&H>-1&&w!==H))return;const G=T;if(G!=null){const O=Dr(Ft(G));if(O&&kt(G,O))return}s||R(H)},[$,H,w,R,s,T]);const{getButtonProps:Z,buttonRef:q}=Lc({disabled:s,native:p,focusableWhenDisabled:!0}),z=g(l),j=x.useRef(!1),F=x.useRef(!1);function U(G){$||s||_(l,_t(Ss,G.nativeEvent,void 0,{activationDirection:"none"}))}function P(G){$||(H>-1&&!s&&R(H),!s&&k&&(!j.current||j.current&&F.current)&&_(l,_t(Ss,G.nativeEvent,void 0,{activationDirection:"none"})))}function W(G){if($||s)return;j.current=!0;function O(){j.current=!1,F.current=!1}(!G.button||G.button===0)&&(F.current=!0,Ft(G.currentTarget).addEventListener("pointerup",O,{once:!0}))}return vn("button",t,{state:{disabled:s,active:$,orientation:y},ref:[n,q,I,K],props:[N,{role:"tab","aria-controls":z,"aria-selected":$,id:C,onClick:U,onFocus:P,onPointerDown:W,[vN]:$?"":void 0,onKeyDownCapture(){L.current=!0}},h,Z]})});function J8(){return ar}function e5(){return!1}function t5(){return!0}function n5(){return jv.useSyncExternalStore(J8,e5,t5)}const r5='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let Ka=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const i5=x.createContext(void 0),s5={disableStyleElements:!1};function _N(){return x.useContext(i5)??s5}const o5={...Ex,activeTabPosition:()=>null,activeTabSize:()=>null},a5=x.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:p}=_N(),{getTabElementBySelectedValue:d,orientation:h,tabActivationDirection:m,value:g}=wx(),{tabsListElement:y,registerIndicatorUpdateListener:k}=TN(),w=n5(),_=nj();x.useEffect(()=>k(_),[k,_]);let E=0,R=0,T=0,C=0,A=0,N=0,I=!1;if(g!=null&&y!=null){const z=d(g);if(I=!0,z!=null){const{width:j,height:F}=_1(z),{width:U,height:P}=_1(y),W=z.getBoundingClientRect(),D=y.getBoundingClientRect(),B=U>0?D.width/U:1,G=P>0?D.height/P:1;if(Math.abs(B)>Number.EPSILON&&Math.abs(G)>Number.EPSILON){const ie=W.left-D.left,te=W.top-D.top;E=ie/B+y.scrollLeft-y.clientLeft,T=te/G+y.scrollTop-y.clientTop}else E=z.offsetLeft,T=z.offsetTop;A=j,N=F,R=y.scrollWidth-E-A,C=y.scrollHeight-T-N}}const H=x.useMemo(()=>I?{left:E,right:R,top:T,bottom:C}:null,[E,R,T,C,I]),$=x.useMemo(()=>I?{width:A,height:N}:null,[A,N,I]),L=x.useMemo(()=>{if(I)return{[Ka.activeTabLeft]:`${E}px`,[Ka.activeTabRight]:`${R}px`,[Ka.activeTabTop]:`${T}px`,[Ka.activeTabBottom]:`${C}px`,[Ka.activeTabWidth]:`${A}px`,[Ka.activeTabHeight]:`${N}px`}},[E,R,T,C,A,N,I]),K=I&&A>0&&N>0,q=vn("span",t,{state:{orientation:h,activeTabPosition:H,activeTabSize:$,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:L,hidden:!K},c,{suppressHydrationWarning:!0}],stateAttributesMapping:o5});return g==null?null:v.jsxs(x.Fragment,{children:[q,w&&a&&v.jsx("script",{nonce:p,dangerouslySetInnerHTML:{__html:r5},suppressHydrationWarning:!0})]})}),l5=x.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...p}=t,{onValueChange:d,orientation:h,value:m,setTabMap:g,tabActivationDirection:y}=wx(),[k,w]=x.useState(0),[_,E]=x.useState(null),R=x.useRef(new Set),T=x.useRef(new Set),C=x.useRef(null),A=Ve(()=>{R.current.forEach(Z=>{Z()})});x.useEffect(()=>{if(typeof ResizeObserver>"u")return;const Z=new ResizeObserver(()=>{R.current.size&&A()});return C.current=Z,_&&Z.observe(_),T.current.forEach(q=>{Z.observe(q)}),()=>{Z.disconnect(),C.current=null}},[_,A]);const N=Ve(Z=>(R.current.add(Z),()=>{R.current.delete(Z)})),I=Ve(Z=>(T.current.add(Z),C.current?.observe(Z),()=>{T.current.delete(Z),C.current?.unobserve(Z)})),H=Ve((Z,q)=>{Z!==m&&d(Z,q)}),$={orientation:h,tabActivationDirection:y},L={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},K=x.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:k,registerIndicatorUpdateListener:N,registerTabResizeObserverElement:I,onTabActivation:H,setHighlightedTabIndex:w,tabsListElement:_}),[r,k,N,I,H,w,_]);return v.jsx(EN.Provider,{value:K,children:v.jsx(W8,{render:l,className:s,style:c,state:$,refs:[n,E],props:[L,p],stateAttributesMapping:Ex,highlightedIndex:k,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:w,onMapChange:g,disabledIndices:lc})})}),$1={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kzQI83:"ui-1iyjqo2",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},default:{kWkggS:"ui-flfp0o",$$css:!0}},u5={sm:{kmVPX3:"ui-1e29tyv",kaIpWk:"ui-1sxf85j",$$css:!0},md:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0}},c5={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1ja2u2z",kfzvcC:"ui-47corl",kB7OPa:"ui-9f619",kbCHJM:"ui-vbikie",k87sOh:"ui-10uur0e",kzqmXN:"ui-offw1",kZKoxP:"ui-1gezbiy",kWkggS:"ui-i07v4r",k1ekBW:"ui-98hnz2",kIyJzY:"ui-1bqoo3p ui-sagj69",kAMwcw:"ui-1tkypeg",$$css:!0}},f5={sm:{kaIpWk:"ui-1bl94mz",$$css:!0},md:{kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kaIpWk:"ui-1e1y6u3",$$css:!0}},Ub={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzQI83:"ui-1c4vz4f",kmuXW:"ui-2lah0s",kCS8Yb:"ui-dl72j9",khDVqt:"ui-uxw1ft",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr ui-1szrgyu",kFalU9:"ui-ggy1nq",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},fullWidth:{kzQI83:"ui-1iyjqo2",kCS8Yb:"ui-1r8uery",$$css:!0},compact:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w ui-x05fgs",$$css:!0}},d5={sm:{kZKoxP:"ui-jmh96e",kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1bl94mz",$$css:!0},md:{kZKoxP:"ui-1a6rlst",kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kZKoxP:"ui-1e94bgo",kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1e1y6u3",$$css:!0}},p5={sm:{kZKoxP:"ui-1a6rlst",kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kZKoxP:"ui-1e94bgo",kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kZKoxP:"ui-170hpbr",kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",$$css:!0}},RN=x.createContext(null);function h5(){const e=x.use(RN);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function m5({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",disabled:a=!1,fullWidth:l=!1,children:c,"aria-label":p,"aria-labelledby":d,...h}){const m=x.useMemo(()=>({variant:r,size:s,disabled:a,fullWidth:l}),[a,l,s,r]);return v.jsx(RN.Provider,{value:m,children:v.jsx(X8,{...h,value:e,defaultValue:t,onValueChange:n,"data-component":"segmented-control","data-size":s,"data-variant":r,...{0:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-eq5yr9 ui-193iq5w"},1:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-193iq5w ui-h8yej3"}}[!!l<<0],children:v.jsxs(l5,{activateOnFocus:!0,"aria-label":p,"aria-labelledby":d,"data-component":"segmented-control-list",...An($1.base,r==="default"&&$1.default,r==="default"&&u5[s]),children:[c,r==="default"?v.jsx(a5,{"data-component":"segmented-control-indicator",...An(c5.base,f5[s])}):null]})})})}function g5({value:e,disabled:t=!1,children:n,...r}){const s=h5();return v.jsx(Q8,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,...An(Ub.base,s.size==="sm"?fo.root:xs.root,s.variant==="default"?d5[s.size]:p5[s.size],s.variant==="compact"&&Ub.compact,s.fullWidth&&Ub.fullWidth),children:n})}const B1=Object.assign(m5,{Item:g5}),CN="lg",bn={base:{kysU6D:"ui-jyslct",kWkggS:"ui-jbqb8w",kB7OPa:"ui-9f619",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-1wd3ewq",kkrTdU:"ui-1ypdohk ui-1s07b3s",kFalU9:"ui-ggy1nq",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1v8p93f",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-he5wa1",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-16stqrj",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1g4hjc",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",kSiTet:"ui-1hc1fzr ui-ijokvz",kfzvcC:"ui-67bb7w ui-aqnwrm",$$css:!0},animated:{k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},variantDefault:{kWkggS:"ui-jbqb8w ui-1eethpc ui-10meh72",kLZC3w:"ui-1aeic0j",k26BEO:"ui-141kqco",kL6WhQ:"ui-17fyfba",kaZRDh:"ui-1arpupx",$$css:!0},variantOutline:{kWkggS:"ui-jbqb8w ui-q24i1q ui-10meh72",kLZC3w:"ui-2kampu ui-1tu4jgf ui-be7lqd",k26BEO:"ui-hnkhp4 ui-164kjn4 ui-1fput1a",kL6WhQ:"ui-1jfuf7k ui-1eracs6 ui-196izg0",kaZRDh:"ui-1l09f48 ui-zjd83m ui-1ts6nmb",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-1eethpc ui-10co6l2 ui-17lihdz",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-vvdyaj ui-1yqz6nd",$$css:!0},sizeLg:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1pmtzvq",kGO01o:"ui-cnij5n",kE3dHu:"ui-v48mlq",$$css:!0},sizeMd:{kLKAdn:"ui-493x5y",kpe85a:"ui-g31tg3",kGO01o:"ui-b6dno7",kE3dHu:"ui-1lfpczk",$$css:!0},variantFilled:{kE3dHu:"ui-yab65l",kWkggS:"ui-i07v4r ui-18954eb ui-o0awiz",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",$$css:!0},shapeRounded:{kaIpWk:"ui-1043rbw",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0},variantUnfilled:{kWkggS:"ui-jbqb8w ui-1n5bzlp",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1yqz6nd",$$css:!0},frameContentLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",koQZXg:"ui-ya9nqx",km5ZXQ:"ui-17w4s1c",$$css:!0},frameContentMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",koQZXg:"ui-ns639v",km5ZXQ:"ui-1gl7awr",$$css:!0},frameContentFilledLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",koQZXg:"ui-1rdd0cc",km5ZXQ:"ui-17w4s1c",$$css:!0},frameContentFilledMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",koQZXg:"ui-1rdd0cc",km5ZXQ:"ui-1gl7awr",$$css:!0},frameContentUnfilledLg:{keoZOQ:"ui-1csnclf",k1K539:"ui-1bip7cd",koQZXg:"ui-1jvqspy",km5ZXQ:"ui-1xoqnk6",$$css:!0},frameContentUnfilledMd:{keoZOQ:"ui-13e19h0",k1K539:"ui-affzeg",koQZXg:"ui-13ywka",km5ZXQ:"ui-ds3n82",$$css:!0},frameContentHugFalseLg:{kzqmXN:"ui-lai49p",$$css:!0},frameContentHugFalseMd:{kzqmXN:"ui-u0r5jw",$$css:!0},frameContentHugFalseFilledLg:{kzqmXN:"ui-15uee3t",$$css:!0},frameContentHugFalseFilledMd:{kzqmXN:"ui-aiknzh",$$css:!0},frameContentHugFalseUnfilledLg:{kzqmXN:"ui-3pyy6g",$$css:!0},frameContentHugFalseUnfilledMd:{kzqmXN:"ui-yc13g",$$css:!0},hugFalse:{kzqmXN:"ui-h8yej3",kjj79g:"ui-13a6bvl",$$css:!0}},F1={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-dpxx8g",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj",$$css:!0}},qb={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",$$css:!0},muted:{kMwMTN:"ui-1lbmi28",$$css:!0},ghostOpen:{kMwMTN:"ui-1mh7f6w",$$css:!0}},Zd={base:{kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",$$css:!0},ghost:{kMwMTN:"ui-1lbmi28",$$css:!0},open:{kMwMTN:"ui-7qsbfx",$$css:!0},ghostOpen:{kMwMTN:"ui-1mh7f6w",$$css:!0}},b5="sm";function y5(e){return[bn.base,xs.root,{"ui--default-marker":"ui--default-marker",$$css:!0},e.animated?bn.animated:null,S5(e.variant),w5(e.size),e.variant==="filled"?bn.variantFilled:null,e.hug?null:bn.hugFalse,e.shape==="pill"?bn.shapePill:bn.shapeRounded,e.frame==="content"?E5(e):null,e.frame==="content"&&!e.hug?T5(e):null]}function v5(e){return[Ml.root,Fv.root,F1.base,e?F1.placeholder:null]}function x5(e,t){return[qb.base,e==="ghost"||e==="unfilled"?qb.muted:null,e==="ghost"&&t?qb.ghostOpen:null]}function k5(e,t){return[Zd.base,e==="ghost"?Zd.ghost:null,t&&e!=="ghost"?Zd.open:null,t&&e==="ghost"?Zd.ghostOpen:null]}function S5(e){switch(e){case"default":return bn.variantDefault;case"outline":return bn.variantOutline;case"filled":return null;case"ghost":return bn.variantGhost;case"unfilled":return bn.variantUnfilled}}function w5(e){switch(e){case"lg":return bn.sizeLg;case"md":case"base":return bn.sizeMd}}function E5(e){const t=e.size==="lg";return e.variant==="filled"?t?bn.frameContentFilledLg:bn.frameContentFilledMd:e.variant==="unfilled"?t?bn.frameContentUnfilledLg:bn.frameContentUnfilledMd:t?bn.frameContentLg:bn.frameContentMd}function T5(e){const t=e.size==="lg";return e.variant==="filled"?t?bn.frameContentHugFalseFilledLg:bn.frameContentHugFalseFilledMd:e.variant==="unfilled"?t?bn.frameContentHugFalseUnfilledLg:bn.frameContentHugFalseUnfilledMd:t?bn.frameContentHugFalseLg:bn.frameContentHugFalseMd}function _5({children:e,variant:t="default",frame:n="container",shape:r="rounded",size:s=CN,hug:a=!0,className:l,style:c,disabled:p=!1,id:d,leading:h,trailing:m,open:g=!1,animated:y=!1,placeholder:k,hideChevron:w=!1,ref:_,...E}){const R=e==null&&k!=null,T=wn({rootClass:"ui-select-trigger",stylexStyles:y5({animated:y,frame:n,hug:a,shape:r,size:s,variant:t}),className:l,style:c}),C=wn({rootClass:"ui-select-label",stylexStyles:v5(R)}),A=An(x5(t,g)),N=wn({rootClass:"ui-select-icon",stylexStyles:k5(t,g)});return v.jsxs("button",{...E,ref:_,type:"button",id:d,className:T.className,style:T.style,"data-variant":t,"data-component":"select","data-frame":n,"data-shape":r,"data-size":s,"data-hug":a,"data-open":g,"data-popup-open":g||void 0,"data-disabled":p||void 0,"data-animated":y||void 0,disabled:p,children:[h!=null&&v.jsx("span",{className:A.className,style:A.style,children:h}),v.jsx("span",{className:C.className,style:C.style,"data-placeholder":R||void 0,children:R?k:e}),m!=null&&v.jsx("span",{className:A.className,style:A.style,children:m}),w?null:v.jsx(Nn,{name:t==="filled"||t==="ghost"||t==="unfilled"?"chevron-down":"chevrons-up-down",size:10,className:N.className,style:N.style})]})}const AN=x.createContext(null),NN=x.createContext(null);function _s(){const e=x.useContext(AN);if(e===null)throw new Error(Xn(60));return e}function ON(){const e=x.useContext(NN);if(e===null)throw new Error(Xn(61));return e}const R5=(e,t)=>Object.is(e,t);function wl(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function C5(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:wl(t,r,n))}function rc(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:wl(r,t,n))}function A5(e,t,n){return e.filter(r=>!wl(t,r,n))}function MN(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function N5(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(MN(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function IN(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 Py(e)}function Qa(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Py(e.value):Py(e)}function DN(e,t,n){function r(){return IN(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)){const s=t,a=MN(s)?s.flatMap(l=>l.items):s;if(e==null||typeof e!="object"){const l=a.find(c=>c.value===e);return l&&l.label!=null?l.label:r()}if("value"in e){const l=a.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return r()}function O5(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(v.jsx(x.Fragment,{children:DN(s,t,n)},a)),r),[])}const gt={id:rt(e=>e.id),labelId:rt(e=>e.labelId),modal:rt(e=>e.modal),multiple:rt(e=>e.multiple),items:rt(e=>e.items),itemToStringLabel:rt(e=>e.itemToStringLabel),itemToStringValue:rt(e=>e.itemToStringValue),isItemEqualToValue:rt(e=>e.isItemEqualToValue),value:rt(e=>e.value),hasSelectedValue:rt(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Qa(t,r)!==""}),hasNullItemLabel:rt((e,t)=>t?N5(e.items):!1),open:rt(e=>e.open),mounted:rt(e=>e.mounted),forceMount:rt(e=>e.forceMount),transitionStatus:rt(e=>e.transitionStatus),openMethod:rt(e=>e.openMethod),activeIndex:rt(e=>e.activeIndex),selectedIndex:rt(e=>e.selectedIndex),isActive:rt((e,t)=>e.activeIndex===t),isSelected:rt((e,t,n)=>{const r=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(a=>wl(n,a,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:wl(n,s,r)}),isSelectedByFocus:rt((e,t)=>e.selectedIndex===t),popupProps:rt(e=>e.popupProps),triggerProps:rt(e=>e.triggerProps),triggerElement:rt(e=>e.triggerElement),positionerElement:rt(e=>e.positionerElement),listElement:rt(e=>e.listElement),scrollUpArrowVisible:rt(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:rt(e=>e.scrollDownArrowVisible),hasScrollArrows:rt(e=>e.hasScrollArrows)};function Zu(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const ps=1;function zN(e,t){return Math.max(0,e-t)}function M5(e,t){if(t<=0)return 0;const n=Zu(e,0,t),r=n,s=t-n,a=r<=ps,l=s<=ps;return a&&l?r<=s?0:t:a?0:l?t:n}function I5(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:p,form:d,autoComplete:h,disabled:m=!1,readOnly:g=!1,required:y=!1,modal:k=!0,actionsRef:w,inputRef:_,onOpenChangeComplete:E,items:R,multiple:T=!1,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N=R5,highlightItemOnHover:I=!0,children:H}=e,{clearErrors:$}=RP(),{setDirty:L,setTouched:K,setFocused:Z,shouldValidateOnChange:q,validityData:z,setFilled:j,name:F,disabled:U,validation:P,validationMode:W}=Gc(),D=xx({id:t}),B=U||m,G=F??p,[O,ie]=pc({controlled:n,default:T?r??lc:r,name:"Select",state:"value"}),[te,ne]=pc({controlled:a,default:l,name:"Select",state:"open"}),le=x.useRef([]),pe=x.useRef([]),ye=x.useRef(null),Se=x.useRef(null),ze=x.useRef(0),he=x.useRef(null),Te=x.useRef([]),Re=x.useRef(!1),Oe=x.useRef(!1),ve=x.useRef(null),xe=x.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Me=x.useRef(!1),{mounted:Ce,setMounted:Pe,transitionStatus:ge}=$c(te),{openMethod:fe,triggerProps:oe}=Vj(te),re=wr(()=>new WR({id:D,labelId:void 0,modal:k,multiple:T,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N,value:O,open:te,mounted:Ce,transitionStatus:ge,items:R,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,_e=bt(re,gt.activeIndex),J=bt(re,gt.selectedIndex),ue=bt(re,gt.triggerElement),Ie=bt(re,gt.positionerElement),Be=sU(fe),Ze=fe??Be,Ye=x.useMemo(()=>T&&Array.isArray(O)&&O.length===0?"":Qa(O,A),[T,O,A]),ot=x.useMemo(()=>T&&Array.isArray(O)?O.map(tt=>Qa(tt,A)):Qa(O,A),[T,O,A]),it=qn(re.state.triggerElement),nt=Ve(()=>ot);uC(it,{id:D,value:O,getValue:nt});const vt=x.useRef(O);He(()=>{O!==vt.current&&re.set("forceMount",!0)},[re,O]),He(()=>{j(T?Array.isArray(O)&&O.length>0:O!=null)},[T,O,j]),He(function(){if(te)return;const Dt=Te.current;if(T){const Qn=Array.isArray(O)?O:[];if(Qn.length===0){re.set("selectedIndex",null);return}const Tn=Qn[Qn.length-1],an=rc(Dt,Tn,N);re.set("selectedIndex",an===-1?null:an);return}const Kn=rc(Dt,O,N);re.set("selectedIndex",Kn===-1?null:Kn)},[T,te,O,Te,N,re]),oC(O,()=>{$(G),L(O!==z.initialValue),q()?P.commit(O):P.commit(O,!0)});const st=Ve((tt,Dt)=>{if(c?.(tt,Dt),!Dt.isCanceled&&(ne(tt),!tt&&(Dt.reason===ph||Dt.reason===wv)&&(K(!0),Z(!1),W==="onBlur"&&P.commit(O)),!tt&&re.state.activeIndex!==null)){const Kn=le.current[re.state.activeIndex];queueMicrotask(()=>{Kn?.setAttribute("tabindex","-1")})}}),xt=Ve(()=>{Pe(!1),re.update({activeIndex:null,openMethod:null}),E?.(!1)});sa({enabled:!w,open:te,ref:ye,onComplete(){te||xt()}}),x.useImperativeHandle(w,()=>({unmount:xt}),[xt]);const We=Ve((tt,Dt)=>{s?.(tt,Dt),!Dt.isCanceled&&ie(tt)}),Ot=Ve(()=>{const tt=re.state.listElement||ye.current;if(!tt)return;const Dt=zN(tt.scrollHeight,tt.clientHeight),Kn=M5(tt.scrollTop,Dt),Qn=Kn>0,Tn=Kn<Dt;re.state.scrollUpArrowVisible!==Qn&&re.set("scrollUpArrowVisible",Qn),re.state.scrollDownArrowVisible!==Tn&&re.set("scrollDownArrowVisible",Tn)}),Fe=QR({open:te,onOpenChange:st,elements:{reference:ue,floating:Ie}}),Ke=n2(Fe,{enabled:!g&&!B,event:"mousedown"}),ht=LR(Fe,{bubbles:!1}),Xe=kj(Fe,{enabled:!g&&!B,listRef:le,activeIndex:_e,selectedIndex:J,disabledIndices:lc,onNavigate(tt){tt===null&&!te||re.set("activeIndex",tt)},focusItemOnHover:I}),Y=Sj(Fe,{enabled:!g&&!B&&(te||!T),listRef:pe,activeIndex:_e,selectedIndex:J,onMatch(tt){te?re.set("activeIndex",tt):We(Te.current[tt],_t("none"))},onTypingChange(tt){Re.current=tt}}),{getReferenceProps:X,getFloatingProps:we,getItemProps:Ge}=tC([Ke,ht,Xe,Y]),ct=x.useMemo(()=>Dc(X(),oe,D?{id:D}:hr),[X,oe,D]);sC(()=>{re.update({popupProps:we(),triggerProps:ct})}),He(()=>{re.update({id:D,modal:k,multiple:T,value:O,open:te,mounted:Ce,transitionStatus:ge,popupProps:we(),triggerProps:ct,items:R,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N,openMethod:Ze})},[re,D,k,T,O,te,Ce,ge,we,ct,R,C,A,N,Ze]);const St=x.useMemo(()=>({store:re,name:G,required:y,disabled:B,readOnly:g,multiple:T,itemToStringLabel:C,itemToStringValue:A,highlightItemOnHover:I,setValue:We,setOpen:st,listRef:le,popupRef:ye,scrollHandlerRef:Se,handleScrollArrowVisibility:Ot,scrollArrowsMountedCountRef:ze,getItemProps:Ge,events:Fe.context.events,valueRef:he,valuesRef:Te,labelsRef:pe,typingRef:Re,selectionRef:xe,selectedItemTextRef:ve,validation:P,onOpenChangeComplete:E,keyboardActiveRef:Oe,alignItemWithTriggerActiveRef:Me,initialValueRef:vt}),[re,G,y,B,g,T,C,A,I,We,st,Ge,Fe.context.events,P,E,Ot]),$e=ks(_,P.inputRef),Le=T&&Array.isArray(O)&&O.length>0,qe=T?void 0:G,Wt=x.useMemo(()=>!T||!Array.isArray(O)||!G?null:O.map(tt=>{const Dt=Qa(tt,A);return v.jsx("input",{type:"hidden",form:d,name:G,value:Dt},Dt)}),[T,O,d,G,A]);return v.jsx(AN.Provider,{value:St,children:v.jsxs(NN.Provider,{value:Fe,children:[H,v.jsx("input",{...P.getInputValidationProps({onFocus(){re.state.triggerElement?.focus({focusVisible:!0})},onChange(tt){if(tt.nativeEvent.defaultPrevented)return;const Dt=tt.currentTarget.value,Kn=_t(Ss,tt.nativeEvent);function Qn(){if(T)return;const Tn=Te.current.find(an=>Qa(an,A).toLowerCase()===Dt.toLowerCase()||IN(an,C).toLowerCase()===Dt.toLowerCase());Tn!=null&&(L(Tn!==z.initialValue),We(Tn,Kn),q()&&P.commit(Tn))}re.set("forceMount",!0),queueMicrotask(Qn)}}),id:D&&qe==null?`${D}-hidden-input`:void 0,form:d,name:qe,autoComplete:h,value:Ye,disabled:B,required:y&&!Le,readOnly:g,ref:$e,style:G?_L:pR,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Wt]})})}function D5(e,t){return e??t}function z5(e){const t=e.getBoundingClientRect(),n=yn(e),r=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||s.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,p=parseFloat(s.width)||0,d=parseFloat(s.height)||0,h=Math.max(t.width,l,p),m=Math.max(t.height,c,d),g=h-t.width,y=m-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-y/2,bottom:t.bottom+y/2}}const Wd=2,L5=400,U1=200,j5={...Jz,...Hc,value:()=>null},P5=x.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:p,...d}=t,{setTouched:h,setFocused:m,validationMode:g,state:y,disabled:k}=Gc(),{labelId:w}=Uv(),{store:_,setOpen:E,selectionRef:R,validation:T,readOnly:C,required:A,alignItemWithTriggerActiveRef:N,disabled:I,keyboardActiveRef:H}=_s(),$=k||I||l,L=bt(_,gt.open),K=bt(_,gt.value),Z=bt(_,gt.triggerProps),q=bt(_,gt.positionerElement),z=bt(_,gt.listElement),j=bt(_,gt.id),F=bt(_,gt.labelId),U=bt(_,gt.hasSelectedValue),P=!U&&L,W=bt(_,gt.hasNullItemLabel,P),D=a??j,B=D5(w,F);xx({id:D});const G=qn(q),O=x.useRef(null),{getButtonProps:ie,buttonRef:te}=Lc({disabled:$,native:c}),ne=Ve(Oe=>{_.set("triggerElement",Oe)}),le=ks(n,O,te,ne),pe=ci(),ye=ci(),Se=ci(),ze=ci();x.useEffect(()=>{if(L)return!(U||W)?Se.start(L5,()=>{R.current.allowUnselectedMouseUp=!0,R.current.allowSelectedMouseUp=!0}):ze.start(U1,()=>{R.current.allowUnselectedMouseUp=!0,Se.start(U1,()=>{R.current.allowSelectedMouseUp=!0})}),()=>{Se.clear(),ze.clear()};R.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ye.clear()},[L,U,W,R,ye,Se,ze]);const he=x.useMemo(()=>z?.id??Cp(q)?.id,[z,q]),Te=Dc(Z,{id:D,role:"combobox","aria-expanded":L?"true":"false","aria-haspopup":"listbox","aria-controls":L?he:void 0,"aria-labelledby":B,"aria-readonly":C||void 0,"aria-required":A||void 0,tabIndex:$?-1:0,ref:le,onFocus(Oe){m(!0),L&&N.current&&E(!1,_t(Ss,Oe.nativeEvent)),pe.start(0,()=>{_.set("forceMount",!0)})},onBlur(Oe){kt(q,Oe.relatedTarget)||(h(!0),m(!1),g==="onBlur"&&T.commit(K))},onPointerMove(){H.current=!1},onKeyDown(){H.current=!0},onMouseDown(Oe){if(L)return;const ve=Ft(Oe.currentTarget);function xe(Me){if(!O.current)return;const Ce=Me.target;if(kt(O.current,Ce)||kt(G.current,Ce)||Ce===O.current)return;const Pe=z5(O.current);Me.clientX>=Pe.left-Wd&&Me.clientX<=Pe.right+Wd&&Me.clientY>=Pe.top-Wd&&Me.clientY<=Pe.bottom+Wd||E(!1,_t(fL,Me))}ye.start(0,()=>{ve.addEventListener("mouseup",xe,{once:!0})})}},T.getValidationProps,d,ie);Te.role="combobox";const Re={...y,open:L,disabled:$,value:K,readOnly:C,placeholder:!U};return vn("button",t,{ref:[n,O],state:Re,stateAttributesMapping:j5,props:Te})}),$5={value:()=>null},B5=x.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...p}=t,{store:d,valueRef:h}=_s(),m=bt(d,gt.value),g=bt(d,gt.items),y=bt(d,gt.itemToStringLabel),k=bt(d,gt.hasSelectedValue),w=!k&&l!=null&&a==null,_=bt(d,gt.hasNullItemLabel,w),E={value:m,placeholder:!k};let R=null;return typeof a=="function"?R=a(m):a!=null?R=a:!k&&l!=null&&!_?R=l:Array.isArray(m)?R=O5(m,g,y):R=DN(m,g,y),vn("span",t,{state:E,ref:[n,h],props:[{children:R},p],stateAttributesMapping:$5})}),F5=x.createContext(void 0),U5=x.forwardRef(function(t,n){const{store:r}=_s(),s=bt(r,gt.mounted),a=bt(r,gt.forceMount);return s||a?v.jsx(F5.Provider,{value:!0,children:v.jsx(KL,{ref:n,...t})}):null}),q5={...lh,...ia},H5=x.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,{store:c}=_s(),p=bt(c,gt.open),d=bt(c,gt.mounted),h=bt(c,gt.transitionStatus);return vn("div",t,{state:{open:p,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:q5})}),LN=x.createContext(void 0);function jN(){const e=x.useContext(LN);if(!e)throw new Error(Xn(59));return e}function Yp(e,t){e&&Object.assign(e.style,t)}const PN={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},G5=20;function V5(e,t,n,r){const[s,a]=x.useState(!1);He(()=>{if(!e||!t||n==null){a(!1);return}const l=Ft(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-G5)},[e,t,n]),Hj(e&&(!t||s),r)}const K5={position:"fixed"},Z5=x.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:p="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:g,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:w,alignItemWithTrigger:_=!0,collisionAvoidance:E=jz,style:R,...T}=t,{store:C,listRef:A,labelsRef:N,alignItemWithTriggerActiveRef:I,selectedItemTextRef:H,valuesRef:$,initialValueRef:L,popupRef:K,setValue:Z}=_s(),q=ON(),z=bt(C,gt.open),j=bt(C,gt.mounted),F=bt(C,gt.modal),U=bt(C,gt.value),P=bt(C,gt.openMethod),W=bt(C,gt.positionerElement),D=bt(C,gt.triggerElement),B=bt(C,gt.isItemEqualToValue),G=bt(C,gt.transitionStatus),O=x.useRef(null),ie=x.useRef(null),[te,ne]=x.useState(_),le=j&&te&&P!=="touch";!j&&te!==_&&ne(_),He(()=>{j||(gt.scrollUpArrowVisible(C.state)&&C.set("scrollUpArrowVisible",!1),gt.scrollDownArrowVisible(C.state)&&C.set("scrollDownArrowVisible",!1))},[C,j]),x.useImperativeHandle(I,()=>le),V5((le||F)&&z,P==="touch",W,D);const pe=PA({anchor:r,floatingRootContext:q,positionMethod:s,mounted:j,side:c,sideOffset:d,align:p,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:g,sticky:k,disableAnchorTracking:w??le,collisionAvoidance:E,keepMounted:!0}),ye=le?"none":pe.side,Se=le?K5:pe.positionerStyles,ze={open:z,side:ye,align:pe.align,anchorHidden:pe.anchorHidden},he=Ve(xe=>{C.set("positionerElement",xe)}),Te=$A(t,ze,{styles:Se,transitionStatus:G,props:T,refs:[n,he],hidden:!j,inert:!z}),Re=x.useRef(0),Oe=Ve(xe=>{if(xe.size===0&&Re.current===0||$.current.length===0)return;const Me=Re.current;if(Re.current=xe.size,xe.size===Me)return;const Ce=_t(Ss);if(Me!==0&&!C.state.multiple&&U!==null&&rc($.current,U,B)===-1){const ge=L.current,oe=ge!=null&&rc($.current,ge,B)!==-1?ge:null;Z(oe,Ce),oe===null&&(C.set("selectedIndex",null),H.current=null)}if(Me!==0&&C.state.multiple&&Array.isArray(U)){const Pe=fe=>rc($.current,fe,B)!==-1,ge=U.filter(fe=>Pe(fe));(ge.length!==U.length||ge.some(fe=>!C5(U,fe,B)))&&(Z(ge,Ce),ge.length===0&&(C.set("selectedIndex",null),H.current=null))}if(z&&le){C.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Pe={height:""};Yp(W,Pe),Yp(K.current,Pe)}}),ve=x.useMemo(()=>({...pe,side:ye,alignItemWithTriggerActive:le,setControlledAlignItemWithTrigger:ne,scrollUpArrowRef:O,scrollDownArrowRef:ie}),[pe,ye,le,ne]);return v.jsx(Sx,{elementsRef:A,labelsRef:N,onMapChange:Oe,children:v.jsxs(LN.Provider,{value:ve,children:[j&&F&&v.jsx(jj,{inert:Lj(!z),cutout:D}),Te]})})}),Yd="base-ui-disable-scrollbar",$y={className:Yd,getElement(e){return v.jsx("style",{nonce:e,href:Yd,precedence:"base-ui:low",children:`.${Yd}{scrollbar-width:none}.${Yd}::-webkit-scrollbar{display:none}`})}},W5=x.createContext(void 0);function Y5(e){return x.useContext(W5)}const X5={...lh,...ia},Q5=x.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:p,popupRef:d,onOpenChangeComplete:h,setOpen:m,valueRef:g,selectedItemTextRef:y,keyboardActiveRef:k,multiple:w,handleScrollArrowVisibility:_,scrollHandlerRef:E,listRef:R,highlightItemOnHover:T}=_s(),{side:C,align:A,alignItemWithTriggerActive:N,isPositioned:I,setControlledAlignItemWithTrigger:H,scrollDownArrowRef:$,scrollUpArrowRef:L}=jN(),K=Y5()!=null,Z=ON(),q=tx(),{nonce:z,disableStyleElements:j}=_N(),F=bt(p,gt.id),U=bt(p,gt.open),P=bt(p,gt.mounted),W=bt(p,gt.popupProps),D=bt(p,gt.transitionStatus),B=bt(p,gt.triggerElement),G=bt(p,gt.positionerElement),O=bt(p,gt.listElement),ie=x.useRef(!1),te=x.useRef(!1),ne=x.useRef({}),le=jc(),pe=Ve(he=>{if(!G||!d.current||!te.current)return;if(ie.current||!N){_();return}const Te=G.style.top==="0px",Re=G.style.bottom==="0px";if(!Te&&!Re){_();return}const Oe=H1(G),ve=Wu(G.getBoundingClientRect().height,"y",Oe),xe=Ft(G),Me=getComputedStyle(G),Ce=parseFloat(Me.marginTop),Pe=parseFloat(Me.marginBottom),ge=q1(getComputedStyle(d.current)),fe=Math.min(xe.documentElement.clientHeight-Ce-Pe,ge),oe=he.scrollTop,re=Xd(he);let _e=0,J=null,ue=!1,Ie=!1;const Be=it=>{G.style.height=`${it}px`},Ze=(it,nt)=>{const vt=Zu(it,0,fe-ve);vt>0&&Be(ve+vt),he.scrollTop=nt,fe-(ve+vt)<=ps&&(ie.current=!0),_()},Ye=Te?re-oe:oe,ot=Math.min(ve+Ye,fe);if(_e=ot,Ye<=ps){Ze(Ye,Te?re:0);return}if(fe-ot>ps)Te?Ie=!0:J=0;else if(ue=!0,Re&&oe<re){const it=ve+Ye-fe;J=oe-(Ye-it)}if(_e=Math.ceil(_e),_e!==0&&Be(_e),Ie||J!=null){const it=Xd(he),nt=Ie?it:Zu(J,0,it);Math.abs(he.scrollTop-nt)>ps&&(he.scrollTop=nt)}(ue||_e>=fe-ps)&&(ie.current=!0),_()});x.useImperativeHandle(E,()=>pe,[pe]),sa({open:U,ref:d,onComplete(){U&&h?.(!0)}});const ye={open:U,transitionStatus:D,side:C,align:A};He(()=>{!G||!d.current||Object.keys(ne.current).length||(ne.current={top:G.style.top||"0",left:G.style.left||"0",right:G.style.right,height:G.style.height,bottom:G.style.bottom,minHeight:G.style.minHeight,maxHeight:G.style.maxHeight,marginTop:G.style.marginTop,marginBottom:G.style.marginBottom})},[d,G]),He(()=>{U||N||(te.current=!1,ie.current=!1,Yp(G,ne.current))},[U,N,G,d]),He(()=>{const he=d.current;if(!U||!B||!G||!he||N&&!I||p.state.transitionStatus==="ending")return;if(!N){te.current=!0,le.request(_),he.style.removeProperty("--transform-origin");return}const Te=J5(he);he.style.removeProperty("--transform-origin");try{const Re=y.current,Oe=g.current,ve=getComputedStyle(G),xe=getComputedStyle(he),Me=Ft(B),Ce=yn(G),Pe=H1(B),ge=Qd(B.getBoundingClientRect(),Pe),fe=Qd(G.getBoundingClientRect(),Pe),oe=ge.height,re=O||he,_e=re.scrollHeight,J=parseFloat(xe.borderBottomWidth),ue=parseFloat(ve.marginTop)||10,Ie=parseFloat(ve.marginBottom)||10,Be=parseFloat(ve.minHeight)||100,Ze=q1(xe),Ye=5,ot=5,it=20,nt=Me.documentElement.clientHeight-ue-Ie,vt=Me.documentElement.clientWidth,st=nt-ge.bottom+oe;let xt,We=q==="rtl"?ge.right-fe.width:ge.left,Ot=0;if(Re&&Oe){const $e=Qd(Oe.getBoundingClientRect(),Pe);xt=Qd(Re.getBoundingClientRect(),Pe),We=fe.left+(q==="rtl"?$e.right-xt.right:$e.left-xt.left);const Le=$e.top-ge.top+$e.height/2;Ot=xt.top-fe.top+xt.height/2-Le}const Fe=st+Ot+Ie+J;let Ke=Math.min(nt,Fe);const ht=nt-ue-Ie,Xe=Fe-Ke,Y=vt-ot;G.style.left=`${Zu(We,Ye,Y-fe.width)}px`,G.style.height=`${Ke}px`,G.style.maxHeight="auto",G.style.marginTop=`${ue}px`,G.style.marginBottom=`${Ie}px`,he.style.height="100%";const X=Xd(re),we=Xe>=X-ps;we&&(Ke=Math.min(nt,fe.height)-(Xe-X));const Ge=ge.top<it||ge.bottom>nt-it||Math.ceil(Ke)+ps<Math.min(_e,Be),ct=(Ce.visualViewport?.scale??1)!==1&&Tv;if(Ge||ct){te.current=!0,Yp(G,ne.current),H(!1);return}const St=Math.max(Be,Ke);if(we){const $e=Math.max(0,nt-Fe);G.style.top=fe.height>=ht?"0":`${$e}px`,G.style.height=`${Ke}px`,re.scrollTop=Xd(re)}else G.style.bottom="0",re.scrollTop=Xe;if(xt){const $e=fe.top,Le=fe.height,qe=xt.top+xt.height/2,Wt=Le>0?(qe-$e)/Le*100:50,tt=Zu(Wt,0,100);he.style.setProperty("--transform-origin",`50% ${tt}%`)}(St===nt||Ke>=Ze)&&(ie.current=!0),_(),T&&p.state.selectedIndex===null&&p.state.activeIndex===null&&R.current[0]!=null&&p.set("activeIndex",0),te.current=!0}finally{Te()}},[p,U,G,B,g,y,d,_,N,H,le,$,L,O,R,T,q,I]),x.useEffect(()=>{if(!N||!G||!U)return;const he=yn(G);function Te(Re){m(!1,_t(pL,Re))}return Nt(he,"resize",Te)},[m,N,G,U]);const Se={...O?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":w||void 0,id:`${F}-list`},onKeyDown(he){k.current=!0,K&&Aj.has(he.key)&&he.stopPropagation()},onMouseMove(){k.current=!1},onScroll(he){O||pe(he.currentTarget)},...N&&{style:O?{height:"100%"}:PN}},ze=vn("div",t,{ref:[n,d],state:ye,stateAttributesMapping:X5,props:[W,Se,nx(D),{className:!O&&N?$y.className:void 0},c]});return v.jsxs(x.Fragment,{children:[!j&&$y.getElement(z),v.jsx(t2,{context:Z,modal:!1,disabled:!P,returnFocus:l,restoreFocus:!0,children:ze})]})});function q1(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Xd(e){return zN(e.scrollHeight,e.clientHeight)}function H1(e){return qR.getScale(e)}function Wu(e,t,n){return e/n[t]}function Qd(e,t){return uc({x:Wu(e.x,"x",t),y:Wu(e.y,"y",t),width:Wu(e.width,"x",t),height:Wu(e.height,"y",t)})}const G1=[["transform","none"],["scale","1"],["translate","0 0"]];function J5(e){const{style:t}=e,n={};for(const[r,s]of G1)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of G1){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const eH=x.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,{store:c,scrollHandlerRef:p}=_s(),{alignItemWithTriggerActive:d}=jN(),h=bt(c,gt.hasScrollArrows),m=bt(c,gt.openMethod),g=bt(c,gt.multiple),k={id:`${bt(c,gt.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(_){p.current?.(_.currentTarget)},...d&&{style:PN},className:h&&m!=="touch"?$y.className:void 0},w=Ve(_=>{c.set("listElement",_)});return vn("div",t,{ref:[n,w],props:[k,l]})}),$N=x.createContext(void 0);function Tx(){const e=x.useContext($N);if(!e)throw new Error(Xn(57));return e}const tH=x.memo(x.forwardRef(function(t,n){const{render:r,className:s,value:a=null,label:l,disabled:c=!1,nativeButton:p=!1,style:d,...h}=t,m=x.useRef(null),g=SN({label:l,textRef:m,indexGuessBehavior:kN.GuessFromOrder}),{store:y,getItemProps:k,setOpen:w,setValue:_,selectionRef:E,typingRef:R,valuesRef:T,multiple:C,selectedItemTextRef:A}=_s(),N=bt(y,gt.isActive,g.index),I=bt(y,gt.isSelected,g.index,a),H=bt(y,gt.isSelectedByFocus,g.index),$=bt(y,gt.isItemEqualToValue),L=g.index,K=L!==-1,Z=x.useRef(null),q=qn(L);He(()=>{if(!K)return;const te=T.current;return te[L]=a,()=>{delete te[L]}},[K,L,a,T]),He(()=>{if(!K)return;const te=y.state.value;let ne=te;C&&Array.isArray(te)&&te.length>0&&(ne=te[te.length-1]),ne!==void 0&&wl(a,ne,$)&&(y.set("selectedIndex",L),m.current&&(A.current=m.current))},[K,L,C,$,y,a,A]);const z={disabled:c,selected:I,highlighted:N},j=k({active:N,selected:I});j.id=void 0;const F=x.useRef(null),U=x.useRef("mouse"),P=x.useRef(!1),{getButtonProps:W,buttonRef:D}=Lc({disabled:c,focusableWhenDisabled:!0,native:p,composite:!0});function B(te){const ne=y.state.value;if(C){const le=Array.isArray(ne)?ne:[],pe=I?A5(le,a,$):[...le,a];_(pe,_t(lb,te))}else _(a,_t(lb,te)),w(!1,_t(lb,te))}const G={role:"option","aria-selected":I,tabIndex:N?0:-1,onTouchStart(){E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(te){F.current=te.key,y.set("activeIndex",L),te.key===" "&&R.current&&te.preventDefault()},onClick(te){P.current=!1,!(te.type==="keydown"&&F.current===null)&&(c||te.type==="keydown"&&F.current===" "&&R.current||U.current!=="touch"&&!N||(F.current=null,B(te.nativeEvent)))},onPointerEnter(te){U.current=te.pointerType},onPointerDown(te){U.current=te.pointerType,P.current=!0},onMouseUp(){if(c)return;if(P.current){P.current=!1;return}const te=!E.current.allowSelectedMouseUp&&I,ne=!E.current.allowUnselectedMouseUp&&!I;te||ne||U.current!=="touch"&&!N||Z.current?.click()}},O=vn("div",t,{ref:[D,n,g.ref,Z],state:z,props:[j,G,h,W]}),ie=x.useMemo(()=>({selected:I,indexRef:q,textRef:m,selectedByFocus:H,hasRegistered:K}),[I,q,m,H,K]);return v.jsx($N.Provider,{value:ie,children:O})})),nH=x.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=Tx();return r||s?v.jsx(rH,{...t,ref:n}):null}),rH=x.memo(x.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=Tx(),p=x.useRef(null),{transitionStatus:d,setMounted:h}=$c(c),g=vn("span",e,{ref:[t,p],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:ia});return sa({open:c,ref:p,onComplete(){c||h(!1)}}),g})),iH=x.memo(x.forwardRef(function(t,n){const{indexRef:r,textRef:s,selectedByFocus:a,hasRegistered:l}=Tx(),{selectedItemTextRef:c}=_s(),{className:p,render:d,style:h,...m}=t,g=x.useCallback(k=>{if(!k||!l)return;const w=c.current===null||!c.current.isConnected;(a||w&&r.current===0)&&(c.current=k)},[c,r,a,l]);return vn("div",t,{ref:[g,n,s],props:m})})),Pu={backdrop:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kWkggS:"ui-jbqb8w",$$css:!0},backdropZIndex:e=>[{kY2c9j:e!=null?"ui-r3buco":e,$$css:!0},{"--x-zIndex":e??void 0}],popup:{kB7OPa:"ui-9f619",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kskxy:"ui-2pj5ht",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kVAEAm:"ui-1n2onr6",kHBbk8:"ui-c8icb0",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",kWkggS:"ui-f1vpex",kaIpWk:"ui-1043rbw",kGVxlE:"ui-137jh17",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kSiTet:"ui-1hc1fzr ui-1i2unn7",k3aq6I:"ui-3oybdh ui-1ejle5f",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-6o7n8i",kIyJzY:"ui-7pq1vu ui-sagj69",kAMwcw:"ui-6ekqhr",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-ldcgda",kloYau:"ui-2q1x1w",$$css:!0},sizeMd:{kaIpWk:"ui-1m7fhj7",$$css:!0},width:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},sH={root:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-1p5sq7k",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kLKAdn:"ui-1uagpmz",kpe85a:"ui-1qto6us",kGO01o:"ui-1aqjmib",kE3dHu:"ui-4aj6wr",kaIpWk:"ui-1e1y6u3",kkrTdU:"ui-1ypdohk ui-mh7c9n",kMwMTN:"ui-1wd3ewq ui-1kosevp",kWkggS:"ui-jbqb8w ui-1sbws7q",$$css:!0}},oH={sm:{"--ui-select-row-padding-block":"ui-gd7qnp","--ui-select-row-padding-inline":"ui-14f2bk","--ui-select-row-gap":"ui-vsfftw",$$css:!0},md:{"--ui-select-row-padding-block":"ui-fn83ix","--ui-select-row-padding-inline":"ui-x09acf","--ui-select-row-gap":"ui-8yiove",$$css:!0}},BN=x.createContext(null);function _x(){const e=x.useContext(BN);if(!e)throw new Error("Select internals must be used within Select");return e}function aH(){const e=_x(),t=e.hasValue?v.jsx(B5,{}):void 0;return v.jsx(P5,{disabled:e.disabled,id:e.id,...e.ariaLabel!==void 0?{"aria-label":e.ariaLabel}:{},...e.ariaLabelledBy!==void 0?{"aria-labelledby":e.ariaLabelledBy}:{},render:e.renderTrigger??((n,r)=>v.jsx(_5,{...n,animated:e.animated,className:Sn(n.className,e.className),disabled:e.disabled,frame:e.frame,hug:e.hug,leading:e.leading,open:r.open,placeholder:e.placeholder,trailing:e.trailing,shape:e.shape,size:e.size,variant:e.variant})),children:t})}function lH({children:e}){const t=_x(),n=Ol(),{zIndex:r,portalLayerStyles:s}=Uc("popover",t.open),a=ix(t.placement,t.offset,!1),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth??200,c=wn({rootClass:"ui-select-content",stylexStyles:[Pu.popup,t.menuSize==="md"&&Pu.sizeMd,Pu.width(l)]});return v.jsxs(U5,{container:n??void 0,style:s,children:[v.jsx(H5,{"data-component":"select-backdrop",...An(Pu.backdrop,r!==null&&Pu.backdropZIndex(r-1))}),v.jsx(Z5,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",side:a.side,sideOffset:a.sideOffset,className:"ui-fc2p8",children:v.jsx(Q5,{className:c.className,"data-component":"select-popup","data-size":t.menuSize,style:c.style,children:v.jsx(Ts,{menuSize:t.menuSize,children:v.jsx(eH,{"aria-label":t.ariaLabel??"Select an option",className:"ui-78zum5 ui-dt5ytf ui-12mrbbr ui-2lwn1j ui-6ikm8r ui-1odjw0f ui-f6zju3 ui-g31tg3 ui-cnij5n ui-43mhey ui-3gzrov",children:e})})})})]})}function uH({option:e}){const t=_x(),n=v.jsxs(tH,{disabled:e.disabled,label:typeof e.label=="string"?e.label:void 0,value:e.value,"data-component":"select-item",...An(sH.root,oH[t.menuSize],xs.root),children:[e.leading!=null?v.jsx("span",{className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-19aaqeu",children:e.leading}):null,v.jsx(iH,{className:"ui-98rzlu ui-euugli",children:e.label}),e.trailing!=null?v.jsx("span",{className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-19aaqeu",children:e.trailing}):null,v.jsx(nH,{"data-component":"select-item-indicator",className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-19aaqeu",children:v.jsx(Nn,{name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:v.jsx(bx,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function cH({value:e,defaultValue:t,onChange:n,onValueChange:r,open:s,defaultOpen:a,onOpenChange:l,options:c,placeholder:p,variant:d="default",frame:h="container",shape:m="rounded",size:g=CN,menuSize:y,contentWidth:k,matchAnchorWidth:w=!1,hug:_=!0,disabled:E=!1,animated:R=!1,className:T,renderTrigger:C,placement:A="bottom-start",offset:N=4,"aria-label":I,"aria-labelledby":H,id:$,leading:L,trailing:K,...Z}){const[q,z]=x.useState(t),j=e!==void 0,F=j?e:q,U=F!=null&&c.some(ne=>ne.value===F),[P,W]=x.useState(a??!1),D=s??P,B=y??"sm",G=x.useCallback((ne,le)=>{r?.(ne,le),!le.isCanceled&&(j||z(ne),ne!==null&&n?.(ne))},[j,n,r]),O=x.useCallback((ne,le)=>{l?.(ne,le),!le.isCanceled&&s===void 0&&W(ne)},[l,s]),ie=x.useMemo(()=>({hasValue:U,variant:d,frame:h,shape:m,size:g,menuSize:B,hug:_,disabled:E,animated:R,open:D,placement:A,offset:N,id:$,ariaLabel:I,ariaLabelledBy:H,placeholder:p,leading:L,trailing:K,className:T,renderTrigger:C,contentWidth:k,matchAnchorWidth:w}),[R,I,H,T,k,E,h,_,U,$,D,L,w,N,A,p,B,K,C,m,g,d]),te=c.map(ne=>({label:ne.label,value:ne.value}));return v.jsx(BN.Provider,{value:ie,children:v.jsx(Ts,{iconSize:b5,children:v.jsxs(I5,{...Z,defaultOpen:a,defaultValue:t,disabled:E,id:$,items:te,onOpenChange:O,onValueChange:G,open:s,value:e,children:[v.jsx(aH,{}),v.jsx(lH,{children:c.map((ne,le)=>v.jsx(uH,{option:ne},typeof ne.value=="string"||typeof ne.value=="number"?String(ne.value):le))})]})})})}const V1=e=>Number.isFinite(e)?e:0;function fH(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(V1(e*1e3)%1e3),nanoseconds:Math.trunc(V1(e*1e6)%1e3)}}function dH(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function pH(e){switch(typeof e){case"number":{if(Number.isFinite(e))return fH(e);break}case"bigint":return dH(e)}throw new TypeError("Expected a finite number or bigint")}const hH=e=>e===0||e===0n,mH=(e,t)=>t===1||t===1n?e:`${e}s`,gH=1e-7,bH=24n*60n*60n*1000n;function yH(e,t){const n=typeof e=="bigint";if(!n&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};const r=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[];const a=(h,m)=>{const g=Math.floor(h*10**m+gH);return(Math.round(g)/10**m).toFixed(m)},l=(h,m,g,y)=>{if(!((s.length===0||!t.colonNotation)&&hH(h)&&!(t.colonNotation&&g==="m"))){if(y??=String(h),t.colonNotation){const k=y.includes(".")?y.split(".")[0].length:y.length,w=s.length>0?2:1;y="0".repeat(Math.max(0,w-k))+y}else y+=t.verbose?" "+mH(m,h):g;s.push(y)}},c=pH(e),p=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(p)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(p,"day","d"):(l(p/365n,"year","y"),l(p%365n,"day","d")),l(Number(c.hours),"hour","h")),l(Number(c.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const h=Number(c.seconds),m=Number(c.milliseconds),g=Number(c.microseconds),y=Number(c.nanoseconds);if(l(h,"second","s"),t.formatSubMilliseconds)l(m,"millisecond","ms"),l(g,"microsecond","µs"),l(y,"nanosecond","ns");else{const k=m+g/1e3+y/1e6,w=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,_=k>=1?Math.round(k):Math.ceil(k),E=w?k.toFixed(w):_;l(Number.parseFloat(E),"millisecond","ms",E)}}else{const h=(n?Number(e%bH):e)/1e3%60,m=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,g=a(h,m),y=t.keepDecimalsOnWholeSeconds?g:g.replace(/\.0+$/,"");l(Number.parseFloat(y),"second","s",y)}if(s.length===0)return r+"0"+(t.verbose?" milliseconds":"ms");const d=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(d)}var FN="en",Rx={},By={};function UN(){return FN}function qN(e){FN=e}function vH(e){return Rx[e]}function HN(e){if(!e)throw new Error("No locale data passed");Rx[e.locale]=e,By[e.locale.toLowerCase()]=e.locale}function K1(e){if(Rx[e])return e;if(By[e.toLowerCase()])return By[e.toLowerCase()]}function GN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return Z1(e);case"best fit":return Z1(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function Z1(e){var t=K1(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=K1(e);if(r)return r}}var ee={af:function(t){return t==1?"one":"other"},ak:function(t){return t==0||t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"},ast:function(t){var n=String(t).split("."),r=!n[1];return t==1&&r?"one":"other"},be:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return s==1&&a!=11?"one":s>=2&&s<=4&&(a<12||a>14)?"few":r&&s==0||s>=5&&s<=9||a>=11&&a<=14?"many":"other"},blo:function(t){return t==0?"zero":t==1?"one":"other"},br:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2),l=r&&n[0].slice(-6);return s==1&&a!=11&&a!=71&&a!=91?"one":s==2&&a!=12&&a!=72&&a!=92?"two":(s==3||s==4||s==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&r&&l==0?"many":"other"},bs:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),p=s.slice(-1),d=s.slice(-2);return a&&l==1&&c!=11||p==1&&d!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||p>=2&&p<=4&&(d<12||d>14)?"few":"other"},ca:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1&&a?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ceb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=s.slice(-1);return a&&(r==1||r==2||r==3)||a&&l!=4&&l!=6&&l!=9||!a&&c!=4&&c!=6&&c!=9?"one":"other"},cs:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return t==1||!s&&(r==0||r==1)?"one":"other"},dsb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-2),c=s.slice(-2);return a&&l==1||c==1?"one":a&&l==2||c==2?"two":a&&(l==3||l==4)||c==3||c==4?"few":"other"},dz:function(t){return"other"},es:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t>=0&&t<2?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ga:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return r==1&&s||r==0&&!s?"one":r==2&&s?"two":"other"},is:function(t){var n=String(t).split("."),r=n[0],s=(n[1]||"").replace(/0+$/,""),a=Number(n[0])==t,l=r.slice(-1),c=r.slice(-2);return a&&l==1&&c!=11||s%10==1&&s%100!=11?"one":"other"},lt:function(t){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,a=s&&n[0].slice(-1),l=s&&n[0].slice(-2);return a==1&&(l<11||l>19)?"one":a>=2&&a<=9&&(l<11||l>19)?"few":r!=0?"many":"other"},lv:function(t){var n=String(t).split("."),r=n[1]||"",s=r.length,a=Number(n[0])==t,l=a&&n[0].slice(-1),c=a&&n[0].slice(-2),p=r.slice(-2),d=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&p>=11&&p<=19?"zero":l==1&&c!=11||s==2&&d==1&&p!=11||s!=2&&d==1?"one":"other"},mk:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),p=s.slice(-1),d=s.slice(-2);return a&&l==1&&c!=11||p==1&&d!=11?"one":"other"},mt:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==1?"one":t==2?"two":t==0||s>=3&&s<=10?"few":s>=11&&s<=19?"many":"other"},pl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return t==1&&s?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&r!=1&&(a==0||a==1)||s&&a>=5&&a<=9||s&&l>=12&&l<=14?"many":"other"},pt:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return s==0||s==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ro:function(t){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,a=s&&n[0].slice(-2);return t==1&&r?"one":!r||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return s&&a==1&&l!=11?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&a==0||s&&a>=5&&a<=9||s&&l>=11&&l<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"";return t==0||t==1||r==0&&s==1?"one":"other"},sl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-2);return s&&a==1?"one":s&&a==2?"two":s&&(a==3||a==4)||!s?"few":"other"}};ee.as=ee.am;ee.az=ee.af;ee.bal=ee.af;ee.bg=ee.af;ee.bn=ee.am;ee.brx=ee.af;ee.ce=ee.af;ee.chr=ee.af;ee.csw=ee.ak;ee.cv=ee.blo;ee.de=ee.ast;ee.doi=ee.am;ee.ee=ee.af;ee.el=ee.af;ee.en=ee.ast;ee.eo=ee.af;ee.et=ee.ast;ee.eu=ee.af;ee.fa=ee.am;ee.fi=ee.ast;ee.fil=ee.ceb;ee.fo=ee.af;ee.fur=ee.af;ee.fy=ee.ast;ee.gl=ee.ast;ee.gu=ee.am;ee.ha=ee.af;ee.hi=ee.am;ee.hr=ee.bs;ee.hsb=ee.dsb;ee.hu=ee.af;ee.hy=ee.ff;ee.ia=ee.ast;ee.id=ee.dz;ee.ie=ee.ast;ee.ig=ee.dz;ee.ii=ee.dz;ee.it=ee.ca;ee.ja=ee.dz;ee.jgo=ee.af;ee.jv=ee.dz;ee.ka=ee.af;ee.kea=ee.dz;ee.kk=ee.af;ee.kl=ee.af;ee.km=ee.dz;ee.kn=ee.am;ee.ko=ee.dz;ee.kok=ee.am;ee.ks=ee.af;ee.ksh=ee.blo;ee.ku=ee.af;ee.ky=ee.af;ee.lb=ee.af;ee.lkt=ee.dz;ee.lld=ee.ca;ee.lo=ee.dz;ee.ml=ee.af;ee.mn=ee.af;ee.mr=ee.af;ee.ms=ee.dz;ee.my=ee.dz;ee.nb=ee.af;ee.ne=ee.af;ee.nl=ee.ast;ee.nn=ee.af;ee.no=ee.af;ee.nqo=ee.dz;ee.nso=ee.ak;ee.om=ee.af;ee.or=ee.af;ee.pa=ee.ak;ee.pcm=ee.am;ee.ps=ee.af;ee.rm=ee.af;ee.sah=ee.dz;ee.sc=ee.ast;ee.scn=ee.ca;ee.sd=ee.af;ee.sk=ee.cs;ee.so=ee.af;ee.sq=ee.af;ee.sr=ee.bs;ee.su=ee.dz;ee.sv=ee.ast;ee.sw=ee.ast;ee.syr=ee.af;ee.ta=ee.af;ee.te=ee.af;ee.th=ee.dz;ee.ti=ee.ak;ee.tk=ee.af;ee.tn=ee.af;ee.to=ee.dz;ee.tr=ee.af;ee.ug=ee.af;ee.uk=ee.ru;ee.ur=ee.ast;ee.uz=ee.af;ee.vec=ee.ca;ee.vi=ee.dz;ee.wae=ee.af;ee.wo=ee.dz;ee.xh=ee.af;ee.yi=ee.ast;ee.yo=ee.dz;ee.yue=ee.dz;ee.zh=ee.dz;ee.zu=ee.am;function W1(e){return e==="pt-PT"?e:kH(e)}var xH=/^([a-z0-9]+)/i;function kH(e){var t=e.match(xH);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function SH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EH(r.key),r)}}function wH(e,t,n){return t&&Y1(e.prototype,t),n&&Y1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function EH(e){var t=TH(e,"string");return vc(t)=="symbol"?t:t+""}function TH(e,t){if(vc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fy=(function(){function e(t,n){SH(this,e);var r=e.supportedLocalesOf(t);if(r.length===0)throw new RangeError("Unsupported locale: "+t);if(n&&n.type!=="cardinal")throw new RangeError('Only "cardinal" "type" is supported');this.$=ee[W1(r[0])]}return wH(e,[{key:"select",value:function(n){return this.$(n)}}],[{key:"supportedLocalesOf",value:function(n){return typeof n=="string"&&(n=[n]),n.filter(function(r){return ee[W1(r)]})}}]),e})();function El(e){"@babel/helpers - typeof";return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(e)}function X1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Q1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X1(Object(n),!0).forEach(function(r){_H(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _H(e,t,n){return(t=VN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J1(e,t){return NH(e)||AH(e,t)||CH(e,t)||RH()}function RH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CH(e,t){if(e){if(typeof e=="string")return eT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eT(e,t):void 0}}function eT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function AH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],p=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(p=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);p=!0);}catch(h){d=!0,s=h}finally{try{if(!p&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}function NH(e){if(Array.isArray(e))return e}function OH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VN(r.key),r)}}function IH(e,t,n){return t&&MH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function VN(e){var t=DH(e,"string");return El(t)=="symbol"?t:t+""}function DH(e,t){if(El(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(El(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zH=["second","minute","hour","day","week","month","quarter","year"],LH=["auto","always"],jH=["long","short","narrow"],PH=["lookup","best fit"],Es=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};OH(this,e);var r=n.numeric,s=n.style,a=n.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",r!==void 0){if(LH.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(jH.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(PH.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(UN()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");Fy.supportedLocalesOf(this.locale).length>0?this.pluralRules=new Fy(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=GN(this.locale,{localeMatcher:this.localeMatcher})}return IH(e,[{key:"format",value:function(){var n=tT(arguments),r=J1(n,2),s=r[0],a=r[1];return this.getRule(s,a).replace("{0}",this.formatNumber(Math.abs(s)))}},{key:"formatToParts",value:function(){var n=tT(arguments),r=J1(n,2),s=r[0],a=r[1],l=this.getRule(s,a),c=l.indexOf("{0}");if(c<0)return[{type:"literal",value:l}];var p=[];return c>0&&p.push({type:"literal",value:l.slice(0,c)}),p=p.concat(this.formatNumberToParts(Math.abs(s)).map(function(d){return Q1(Q1({},d),{},{unit:a})})),c+3<l.length-1&&p.push({type:"literal",value:l.slice(c+3)}),p}},{key:"getRule",value:function(n,r){var s=vH(this.locale)[this.style][r];if(typeof s=="string")return s;if(this.numeric==="auto"){if(n===-2||n===-1){var a=s["previous".concat(n===-1?"":"-"+Math.abs(n))];if(a)return a}else if(n===1||n===2){var l=s["next".concat(n===1?"":"-"+Math.abs(n))];if(l)return l}else if(n===0&&s.current)return s.current}var c=s[qH(n)?"past":"future"];if(typeof c=="string")return c;var p=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[p]||c.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"formatNumberToParts",value:function(n){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(n):[{type:"integer",value:this.formatNumber(n)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}]),e})();Es.supportedLocalesOf=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(n){return GN(n,t)})};Es.addLocale=HN;Es.addDefaultLocale=function(e){HN(e),qN(e.locale)};Es.setDefaultLocale=qN;Es.getDefaultLocale=UN;Es.PluralRules=Fy;var Hb='Invalid "unit" argument';function $H(e){if(El(e)==="symbol")throw new TypeError(Hb);if(typeof e!="string")throw new RangeError("".concat(Hb,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),zH.indexOf(e)<0)throw new RangeError("".concat(Hb,": ").concat(e));return e}var BH='Invalid "number" argument';function FH(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(BH,": ").concat(e));return e}function UH(e){return 1/e===-1/0}function qH(e){return e<0||e===0&&UH(e)}function tT(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[FH(e[0]),$H(e[1])]}function Jo(e){"@babel/helpers - typeof";return Jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jo(e)}function HH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,KH(r.key),r)}}function VH(e,t,n){return t&&GH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KH(e){var t=ZH(e,"string");return Jo(t)=="symbol"?t:t+""}function ZH(e,t){if(Jo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nT=(function(){function e(){HH(this,e),this.cache={}}return VH(e,[{key:"get",value:function(){for(var n=this.cache,r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];for(var l=0,c=s;l<c.length;l++){var p=c[l];if(Jo(n)!=="object")return;n=n[p]}return n}},{key:"put",value:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];for(var a=r.pop(),l=r.pop(),c=this.cache,p=0,d=r;p<d.length;p++){var h=d[p];Jo(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function Uy(e){"@babel/helpers - typeof";return Uy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uy(e)}function WH(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=YH(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YH(e,t){if(e){if(typeof e=="string")return rT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rT(e,t):void 0}}function rT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function XH(e,t){for(var n=WH(e),r;!(r=n()).done;){var s=r.value;if(t(s))return s;for(var a=s.split("-");a.length>1;)if(a.pop(),s=a.join("-"),t(s))return s}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function QH(){var e=(typeof Intl>"u"?"undefined":Uy(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function qy(e){"@babel/helpers - typeof";return qy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qy(e)}function JH(e){return t7(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var e7={}.constructor;function t7(e){return qy(e)!==void 0&&e!==null&&e.constructor===e7}var gs=60,Xp=60*gs,Zo=24*Xp,Hy=7*Zo,Gy=30.44*Zo,KN=146097/400*Zo;function cl(e){switch(e){case"second":return 1;case"minute":return gs;case"hour":return Xp;case"day":return Zo;case"week":return Hy;case"month":return Gy;case"year":return KN}}function ZN(e){return e.factor!==void 0?e.factor:cl(e.unit||e.formatAs)||1}function xc(e){return e==="floor"?Math.floor:Math.round}function Cx(e){return e==="floor"?1:.5}function Vy(e){"@babel/helpers - typeof";return Vy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vy(e)}function WN(e,t){var n=t.prevStep,r=t.timestamp,s=t.now,a=t.future,l=t.round,c;return n&&(n.id||n.unit)&&(c=e["threshold_for_".concat(n.id||n.unit)]),c===void 0&&e.threshold!==void 0&&(c=e.threshold,typeof c=="function"&&(c=c(s,a))),c===void 0&&(c=e.minTime),Vy(c)==="object"&&(n&&n.id&&c[n.id]!==void 0?c=c[n.id]:c=c.default),typeof c=="function"&&(c=c(r,{future:a,getMinTimeForUnit:function(d,h){return iT(d,h||n&&n.formatAs,{round:l})}})),c===void 0&&e.test&&(e.test(r,{now:s,future:a})?c=0:c=9007199254740991),c===void 0&&(n?e.formatAs&&n.formatAs&&(c=iT(e.formatAs,n.formatAs,{round:l})):c=0),c===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),c}function iT(e,t,n){var r=n.round,s=cl(e),a=cl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-Cx(r))}function kc(e){"@babel/helpers - typeof";return kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(e)}function sT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function n7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sT(Object(n),!0).forEach(function(r){r7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r7(e,t,n){return(t=i7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i7(e){var t=s7(e,"string");return kc(t)=="symbol"?t:t+""}function s7(e,t){if(kc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=l7(e,l);var c=a7(e,t,{now:r,future:s,round:a});{if(c){var p=e[e.indexOf(c)-1],d=e[e.indexOf(c)+1];return[p,c,d]}return[void 0,void 0,e[0]]}}function a7(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=YN(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var p=xc(a)(Math.abs(t)/ZN(c)/c.granularity)*c.granularity;if(p===0&&l>0)return e[l-1]}return c}}}function YN(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=WN(e[r],n7({prevStep:e[r-1],timestamp:n.now-t*1e3},n));return s===void 0||Math.abs(t)<s?r-1:r===e.length-1?r:YN(e,t,n,r+1)}function l7(e,t){return e.filter(function(n){var r=n.unit,s=n.formatAs;return r=r||s,r?t.indexOf(r)>=0:!0})}function u7(e,t,n){var r=n.now,s=n.round;if(cl(e)){var a=cl(e)*1e3,l=t>r,c=Math.abs(t-r),p=xc(s)(c/a)*a;return l?p>0?c-p+f7(s,a):c-p+1:-(c-p)+c7(s,a)}}function c7(e,t){return Cx(e)*t}function f7(e,t){return(1-Cx(e))*t+1}var d7=365*24*60*60*1e3,XN=1e3*d7;function p7(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,p=e.getTime?e.getTime():e,d=function(k){return u7(k,p,{now:a,round:c})},h=m7(l?t:s,p,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(p,{getTimeToNextUpdateForUnit:d,getRoundFunction:xc,now:a,future:l,round:c})),m===void 0)){var g=t.unit||t.formatAs;g&&(m=d(g))}return m===void 0?h:Math.min(m,h)}}function h7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=WN(e,{timestamp:t,now:r,future:s,round:a,prevStep:l});if(c!==void 0)return s?t-c*1e3+1:c===0&&t===r?XN:t+c*1e3}function m7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=h7(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:XN}var QN={};function rl(e){return QN[e]}function JN(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");QN[e.locale]=e}const g7=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],Ky={steps:g7,labels:"long"};function Sc(e){"@babel/helpers - typeof";return Sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sc(e)}function oT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function aT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oT(Object(n),!0).forEach(function(r){b7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b7(e,t,n){return(t=y7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y7(e){var t=v7(e,"string");return Sc(t)=="symbol"?t:t+""}function v7(e,t){if(Sc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Zy=aT(aT({},Ky),{},{steps:Ky.steps.filter(function(e){return e.formatAs!=="second"})}),eO=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:gs,unit:"minute"},{threshold:2.5*gs,granularity:5,factor:gs,unit:"minute"},{threshold:22.5*gs,factor:.5*Xp,unit:"half-hour"},{threshold:42.5*gs,threshold_for_minute:52.5*gs,factor:Xp,unit:"hour"},{threshold:20.5/24*Zo,factor:Zo,unit:"day"},{threshold:5.5*Zo,factor:Hy,unit:"week"},{threshold:3.5*Hy,factor:Gy,unit:"month"},{threshold:10.5*Gy,factor:KN,unit:"year"}],lT={gradation:eO,flavour:"long",units:["now","minute","hour","day","week","month","year"]},x7={gradation:eO,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function tO(e){return e instanceof Date?e:new Date(e)}var Wy=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Li={},k7={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonth||(Li[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),Li[n].dayMonth.format(tO(t))}},S7={minTime:function(t,n){var r=n.future;if(r){var s=new Date(new Date(t).getFullYear(),0).getTime()-1;return(t-s)/1e3}else{var a=new Date(new Date(t).getFullYear()+1,0).getTime();return(a-t)/1e3}},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonthYear||(Li[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),Li[n].dayMonthYear.format(tO(t))}};QH()?Wy.push(k7,S7):Wy.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const ea={steps:Wy,labels:["mini","short-time","narrow","short"]};function wc(e){"@babel/helpers - typeof";return wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wc(e)}function uT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function cT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(n),!0).forEach(function(r){w7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w7(e,t,n){return(t=E7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E7(e){var t=T7(e,"string");return wc(t)=="symbol"?t:t+""}function T7(e,t){if(wc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const _7=cT(cT({},ea),{},{steps:[{formatAs:"now"}].concat(ea.steps)});function Ec(e){"@babel/helpers - typeof";return Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ec(e)}function fT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function dT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fT(Object(n),!0).forEach(function(r){R7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R7(e,t,n){return(t=C7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C7(e){var t=A7(e,"string");return Ec(t)=="symbol"?t:t+""}function A7(e,t){if(Ec(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ec(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Yy=dT(dT({},ea),{},{steps:ea.steps.filter(function(e){return e.formatAs!=="second"})});function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function pT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function hT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(n),!0).forEach(function(r){N7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N7(e,t,n){return(t=O7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O7(e){var t=M7(e,"string");return Tc(t)=="symbol"?t:t+""}function M7(e,t){if(Tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const I7=hT(hT({},Yy),{},{steps:[{formatAs:"now"}].concat(Yy.steps)});function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function mT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Jd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mT(Object(n),!0).forEach(function(r){D7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D7(e,t,n){return(t=z7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z7(e){var t=L7(e,"string");return _c(t)=="symbol"?t:t+""}function L7(e,t){if(_c(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_c(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const j7=Jd(Jd({},ea),{},{steps:ea.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?Jd(Jd({},e),{},{minTime:gs}):e})}),Rc={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function Cc(e){"@babel/helpers - typeof";return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}function gT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function bT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gT(Object(n),!0).forEach(function(r){P7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P7(e,t,n){return(t=$7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $7(e){var t=B7(e,"string");return Cc(t)=="symbol"?t:t+""}function B7(e,t){if(Cc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const F7=bT(bT({},Rc),{},{steps:[{formatAs:"now"}].concat(Rc.steps)});function Ac(e){"@babel/helpers - typeof";return Ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ac(e)}function yT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function vT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yT(Object(n),!0).forEach(function(r){U7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function U7(e,t,n){return(t=q7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q7(e){var t=H7(e,"string");return Ac(t)=="symbol"?t:t+""}function H7(e,t){if(Ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Xy=vT(vT({},Rc),{},{steps:Rc.steps.filter(function(e){return e.formatAs!=="second"})});function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function xT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function kT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xT(Object(n),!0).forEach(function(r){G7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G7(e,t,n){return(t=V7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V7(e){var t=K7(e,"string");return Nc(t)=="symbol"?t:t+""}function K7(e,t){if(Nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Z7=kT(kT({},Xy),{},{steps:[{formatAs:"now"}].concat(Xy.steps)});function W7(e){switch(e){case"default":case"round":return Ky;case"round-minute":return Zy;case"approximate":return lT;case"time":case"approximate-time":return x7;case"mini":return Rc;case"mini-now":return F7;case"mini-minute":return Xy;case"mini-minute-now":return Z7;case"twitter":return ea;case"twitter-now":return _7;case"twitter-minute":return Yy;case"twitter-minute-now":return I7;case"twitter-first-minute":return j7;default:return lT}}function ta(e){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ta(e)}function Y7(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=nO(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X7(e,t){return eG(e)||J7(e,t)||nO(e,t)||Q7()}function Q7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nO(e,t){if(e){if(typeof e=="string")return ST(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ST(e,t):void 0}}function ST(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function J7(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],p=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(p=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);p=!0);}catch(h){d=!0,s=h}finally{try{if(!p&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}function eG(e){if(Array.isArray(e))return e}function tG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iG(r.key),r)}}function rG(e,t,n){return t&&nG(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iG(e){var t=sG(e,"string");return ta(t)=="symbol"?t:t+""}function sG(e,t){if(ta(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ta(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zr=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.polyfill;tG(this,e),typeof t=="string"&&(t=[t]),this.locale=XH(t.concat(e.getDefaultLocale()),rl),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Es,this.IntlPluralRules=Es.PluralRules),this.relativeTimeFormatCache=new nT,this.pluralRulesCache=new nT}return rG(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!cG(r)?(s=r,r=void 0):s={}),r||(r=Zy),typeof r=="string"&&(r=W7(r));var l=oG(n),c=this.getLabels(r.flavour||r.labels),p=c.labels,d=c.labelsType,h=s.round||r.round,m,g=Date.now();r.now!==void 0&&(m=r.now),m===void 0&&s.now!==void 0&&(m=s.now),m===void 0&&(m=g);var y=function(N){var I=N.now,H=(I-l)/1e3,$=s.future||H<0,L=uG(p,rl(a.locale).now,rl(a.locale).long,$);if(r.custom){var K=r.custom({now:I,date:new Date(l),time:l,elapsed:H,locale:a.locale});if(K!==void 0)return{getText:function(){return K},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var Z=lG(r.units,p,L),q=o7(r.gradation||r.steps||Zy.steps,H,{now:I,units:Z,round:h,future:$}),z=X7(q,3),j=z[0],F=z[1],U=z[2],P=function(){return a.formatDateForStep(l,F,H,{labels:p,labelsType:d,nowLabel:L,now:I,future:$,round:h})||""},W=function(){var B=p7(l,F,{nextStep:U,prevStep:j,now:I,future:$,round:h});if(typeof B=="number")return s.getTimeToNextUpdateUncapped?B:iO(B)};return{getText:P,getTextRefreshDelay:W}},k=y({now:m}),w=k.getText,_=k.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[w(),_()];if(s.refresh){var E=6e4,R,T=function A(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E;R=fG(function(){var I=y({now:m+(Date.now()-g)}),H=I.getText,$=I.getTextRefreshDelay;s.refresh(H()),A($())},N)};T(_());var C=function(){clearTimeout(R)};return[w(),C]}return w()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,p=a.labelsType,d=a.nowLabel,h=a.now,m=a.future,g=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(E,R){return l.formatValue(R,E,{labels:c,future:m})},now:h,future:m});var y=r.unit||r.formatAs;if(!y)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(y==="now")return d;var k=Math.abs(s)/ZN(r);r.granularity&&(k=xc(g)(k/r.granularity)*r.granularity);var w=-1*Math.sign(s)*xc(g)(k);switch(w===0&&(m?w=0:w=-0),p){case"long":case"short":case"narrow":return this.getFormatter(p).format(w,y);default:return this.formatValue(w,y,{labels:c,future:m})}}}},{key:"formatValue",value:function(n,r,s){var a=s.labels,l=s.future;return this.getFormattingRule(a,r,n,{future:l}).replace("{0}",this.formatNumber(Math.abs(n)))}},{key:"getFormattingRule",value:function(n,r,s,a){var l=a.future;if(this.locale,n=n[r],typeof n=="string")return n;var c=s===0?l?"future":"past":s<0?"past":"future",p=n[c]||n;if(typeof p=="string")return p;var d=this.getPluralRules().select(Math.abs(s));return p[d]||p.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"getFormatter",value:function(n){return this.relativeTimeFormatCache.get(this.locale,n)||this.relativeTimeFormatCache.put(this.locale,n,new this.IntlRelativeTimeFormat(this.locale,{style:n}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof n=="string"&&(n=[n]),n=n.map(function(c){switch(c){case"tiny":case"mini-time":return"mini";default:return c}}),n=n.concat("long");for(var r=rl(this.locale),s=Y7(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),rO="en";zr.getDefaultLocale=function(){return rO};zr.setDefaultLocale=function(e){Qy=!0,rO=e};zr.addDefaultLocale=function(e){Qy&&zr.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(zr.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),Qy=!0,zr.addLocale(e),zr.setDefaultLocale(e.locale)};var Qy=!1;zr.addLocale=function(e){JN(e),Es.addLocale(e)};zr.locale=zr.addLocale;zr.addLabels=function(e,t,n){var r=rl(e);r||(JN({locale:e}),r=rl(e)),r[t]=n};function oG(e){if(e.constructor===Date||aG(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(ta(e),", ").concat(e))}function aG(e){return ta(e)==="object"&&typeof e.getTime=="function"}function lG(e,t,n){var r=Object.keys(t);return n&&r.push("now"),e&&(r=e.filter(function(s){return s==="now"||r.indexOf(s)>=0})),r}function uG(e,t,n,r){var s=e.now||t&&t.now;if(s)return typeof s=="string"?s:r?s.future:s.past;if(n&&n.second&&n.second.current)return n.second.current}function cG(e){return typeof e=="string"||JH(e)}function fG(e,t){return setTimeout(e,iO(t))}function iO(e){return Math.min(e,dG)}var dG=2147483647;const sO={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}};zr.addLocale(sO);zr.addDefaultLocale(sO);const pG=new zr("en-US");function sr(e,t){let n=typeof e=="string"?e:JSON.stringify(e);return n===void 0&&(n=""),n.length>t?`${n.slice(0,t-1)}…`:n}function bs(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function hG(e,t){const n=String(e??"").replace(/\s+/g," ").trim();if(n.length<=t)return n;const r=t-1,s=Math.max(1,Math.floor(r*.35)),a=Math.max(1,r-s);return`${n.slice(0,s)}…${n.slice(n.length-a)}`}function fl(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function hi(e){return e==null||!Number.isFinite(e)?"—":yH(e)}function Ax(e){const t=Math.ceil(e/1e3);if(e<1e3)return"1s";if(t<60)return`${t}s`;if(t>=3600){const s=Math.floor(t/3600),a=Math.floor(t%3600/60);return a>0?`${s}h ${a}m`:`${s}h`}const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}const mG=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function wT(e){return e==null||!Number.isFinite(e)?"—":mG.format(e)}function Hh(e,t=Date.now()){const n=fl(e);return n===null?null:pG.format(Math.min(n,t),"mini",{now:t})}function Tl(e,t=8e3){if(e==null)return"";let n;try{n=typeof e=="string"?e:JSON.stringify(e,null,2)}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}const gG=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function Qp(e){return e==null||!Number.isFinite(e)?"0":gG.format(e)}function Jy(e){const t=String(e||"").trim();if(!t)return[];if(t.charAt(0)==="[")try{const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}const n=[];for(const r of t.split(/\n/)){const s=r.trim();if(s)try{n.push(JSON.parse(s))}catch{}}return n}function bG(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean);return t.hostname==="github.com"&&n.length>=4&&n[2]==="pull"||t.hostname==="review.cursor.com"&&n[0]==="pr"?!0:(t.hostname==="origin.cursor.com"||t.hostname.endsWith(".origin-staging.com")||t.hostname==="localhost")&&n.length>=4&&n[2]==="github"}catch{return!1}}function oO(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}const ET=e=>{let t;const n=new Set,r=(d,h)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const g=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,g))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>p,subscribe:d=>(n.add(d),()=>n.delete(d))},p=t=e(r,s,c);return c},yG=(e=>e?ET(e):ET),vG=e=>e;function xG(e,t=vG){const n=Hu.useSyncExternalStore(e.subscribe,Hu.useCallback(()=>t(e.getState()),[e,t]),Hu.useCallback(()=>t(e.getInitialState()),[e,t]));return Hu.useDebugValue(n),n}const kG=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,SG=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function wG(e=window.location.pathname,t=window.location.hostname){const n=SG.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=kG.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function EG(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function aO(e=window.location,t=window.history){const n=e.hash.startsWith("#")?e.hash.slice(1):e.hash;if(n==="")return"";const s=new URLSearchParams(n).get("access")?.trim()??"";return s===""?"":(t.replaceState(null,"",`${e.pathname}${e.search}`),s)}function TG(e,t=window){const n=()=>{const r=aO(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}class _G{constructor(t,n,r=()=>""){this.basePath=t,this.getToken=n,this.getAliasToken=r}url(t){return(this.basePath||"")+t}headers(t){const n={...t},r=this.getToken().trim();r&&(n.authorization=`Bearer ${r}`);const s=this.getAliasToken().trim();return s&&(n["x-agent-alias-token"]=s),n}async request(t,n={}){const r=await fetch(this.url(t),{...n,headers:this.headers(n.headers)}),s=await r.text();let a=null;try{a=s?JSON.parse(s):null}catch{a=null}return{status:r.status,ok:r.ok,body:a}}postJson(t,n){return this.request(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}health(){return this.request("/v1/health")}info(){return this.request("/v1/info")}logs(t=-1){const n=t<0?"":`?after=${t}`;return this.request(`/v1/logs${n}`)}meta(){return this.request("/v1/meta")}sessions(){return this.request("/v1/sessions")}abs(){return this.request("/v1/abs")}agents(){return this.request("/v1/agents")}createSession(t){return this.postJson("/v1/session",{message:t})}followUp(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}`,{message:n,continuationToken:r})}stopSession(t){return this.postJson(`/v1/session/${encodeURIComponent(t)}/stop`,{})}resolveApproval(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,{decision:r})}dispatchSchedule(t){return this.request(`/v1/dev/schedules/${encodeURIComponent(t)}`,{method:"POST"})}evalsList(){return this.request("/v1/dev/evals")}evalsListRuns(){return this.request("/v1/dev/evals/runs")}evalsStartRun(t={}){return this.postJson("/v1/dev/evals/runs",t)}evalsRunStatus(t){return this.request(`/v1/dev/evals/runs/${encodeURIComponent(t)}`)}evalsCancelRun(t){return this.postJson(`/v1/dev/evals/runs/${encodeURIComponent(t)}/cancel`,{})}reviewStart(t){return this.postJson("/v1/channels/review",{prUrl:t})}reviewPoll(t){return this.request(`/v1/channels/review/${encodeURIComponent(t)}`)}asrReviewersProgress(t){return this.request(`/v1/channels/asr-progress/${encodeURIComponent(t)}`)}channelRequest(t,n,r={}){let s=n;if(r.query!==void 0){const l=new URLSearchParams;for(const[p,d]of Object.entries(r.query))d!==""&&l.set(p,d);const c=l.toString();c!==""&&(s=`${n}?${c}`)}const a={method:t.toUpperCase()};return r.body!==void 0&&(a.headers={"content-type":"application/json"},a.body=JSON.stringify(r.body)),this.request(s,a)}streamFetch(t,n,r){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/stream?startIndex=${n}`),{signal:r,headers:this.headers()})}eventsText(t){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/events`),{headers:this.headers()})}eventsDownloadUrl(t){return this.url(`/v1/session/${encodeURIComponent(t)}/events`)}}const RG=["chat","trace","raw","logs","evals","abs"],yp="cursor-playground",lO=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function CG(e){return typeof e=="string"&&RG.includes(e)}function AG(e,t){if(!lO.includes(t)||typeof e!="object"||e===null)return null;const n=e;return n.source!==yp?null:n.type==="hello"?{source:yp,type:"hello"}:n.type==="set-view"&&CG(n.view)?{source:yp,type:"set-view",view:n.view}:null}function NG(e){const t=n=>{const r=AG(n.data,n.origin);r!==null&&e(r)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}function OG(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return lO.includes(n)?n:null}function TT(e,t=OG()){if(t===null)return;const n={source:yp,type:"state",view:e};window.parent.postMessage(n,t)}function uO(e){return e!=="http"}function MG(e){if(!e.seeded)return{openSidebar:!1,selectSessionId:null};const t=e.sessions.filter(r=>!e.knownIds.has(r.sessionId)&&uO(r.channelId)&&r.running===!0);if(t.length===0)return{openSidebar:!1,selectSessionId:null};const n=t[0];return n===void 0?{openSidebar:!1,selectSessionId:null}:{openSidebar:e.embedded&&!e.sidebarOpen,selectSessionId:e.currentSessionId===null?n.sessionId:null}}function IG(e){return e.filter(t=>uO(t.channelId)&&t.running===!0).length}const DG=new Set(["github","slack"]);function zG(e){return/^\s*\//.test(e)}function Nx(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&DG.has(n.kind)))for(const r of n.routes??[]){const s=BG(n.id,r.path);if(s===null)continue;const a={name:s,channelId:n.id,method:r.method.toUpperCase(),url:r.url,path:r.path};r.description!==void 0&&(a.description=r.description),r.bodySchema!==void 0&&(a.bodySchema=r.bodySchema),r.querySchema!==void 0&&(a.querySchema=r.querySchema),t.push(a)}return t.sort((n,r)=>{const s=n.name.localeCompare(r.name);return s!==0?s:Jp(n.method)-Jp(r.method)}),t}function cO(e){const t=new Set,n=[];for(const r of e)t.has(r.name)||(t.add(r.name),n.push(r.name));return n}function LG(e,t){const n=e.trim().toLowerCase();if(!n.startsWith("/"))return[];const r=new Set,s=[];for(const a of t)a.name.toLowerCase().startsWith(n)&&(r.has(a.name)||(r.add(a.name),s.push(a)));return s}function jG(e){if(e.length===0)return"No channel slash commands on this agent. Send a normal message to chat on http.";const t=["Channel slash commands (from `/v1/info` routes):",""],n=new Map;for(const r of e){const s=n.get(r.name)??[];s.push(r),n.set(r.name,s)}for(const[r,s]of n){const a=s.map(d=>d.method).join("|"),l=s.find(d=>d.description)?.description??"",c=Ox(s[0]),p=fO(c);t.push(p?`- \`${r}\` (${a}) — ${l}${l?" ":""}${p}`:`- \`${r}\` (${a})${l?` — ${l}`:""}`)}return t.push("","Args: JSON object, `key=value` flags, or a positional value for the first required string field.","Example: `/drive https://github.com/org/repo/pull/1 mode=suggest`"),t.join(`
33
+ `)}function PG(e,t){const n=e.trim(),r=/^(\/[^\s]+)(?:\s+([\s\S]*))?$/.exec(n);if(r===null)return{ok:!1,error:"Expected `/command` optionally followed by args."};const s=r[1],a=(r[2]??"").trim(),l=t.filter(m=>m.name===s);if(l.length===0){const m=cO(t);return{ok:!1,error:m.length===0?`Unknown command \`${s}\`. No channel commands on this agent.`:`Unknown command \`${s}\`. Try ${m.map(g=>`\`${g}\``).join(", ")} or \`/help\`.`,commandName:s}}const c=$G(l,a),p=Ox(c),d=qG(a,p);if(!d.ok)return{ok:!1,error:d.error,commandName:s};const h=FG(p,d.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${fO(p)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:VG(d.value)}:{ok:!0,command:c,body:d.value,query:c.querySchema!==void 0?KG(d.value,c.querySchema):void 0}}function $G(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>Jp(a.method)-Jp(l.method)),r=dO(t);if(r!==null){let a=null,l=-1;for(const c of n){const p=Ox(c),d=UG(p,r);d>l&&(l=d,a=c)}if(a!==null&&l>0)return a}const s=n.find(a=>a.method==="GET");return s!==void 0?s:n[0]}function BG(e,t){const n=e.trim();if(n==="")return null;const r=t===""||t==="/"?"":t.startsWith("/")?t.replace(/\/+$/,""):`/${t.replace(/\/+$/,"")}`;return r.includes(":")?null:`/${n}${r}`}function Jp(e){switch(e.toUpperCase()){case"GET":return 0;case"POST":return 1;case"PUT":return 2;case"PATCH":return 3;case"DELETE":return 4;default:return 9}}function Ox(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function fO(e){if(e===void 0)return"";const t=Gh(e);if(t===void 0)return"";const n=Vh(e),r=[];for(const s of n)t[s]?.type==="string"?r.push(`<${s}>`):r.push(`${s}=…`);for(const s of Object.keys(t))n.has(s)||r.push(`[${s}=…]`);return r.length>0?`Usage: ${r.join(" ")}`:""}function Gh(e){if(e===void 0||e.type!=="object")return;const t=e.properties;if(!(typeof t!="object"||t===null||Array.isArray(t)))return t}function Vh(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function FG(e,t){const n=Vh(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function UG(e,t){const n=Gh(e);if(n===void 0)return 0;let r=0;for(const s of Object.keys(t))s in n?r+=2:r-=1;for(const s of Vh(e))s in t&&(r+=3);return r}function dO(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);if(typeof n=="object"&&n!==null&&!Array.isArray(n))return n}catch{return null}return null}function qG(e,t){if(e==="")return{ok:!0,value:{}};const n=dO(e);if(n!==null)return{ok:!0,value:n};if(e.startsWith("{"))return{ok:!1,error:"Args look like JSON but failed to parse."};const r=Gh(t),s={},a=[];for(const l of HG(e)){const c=l.indexOf("=");if(c>0){const p=l.slice(0,c),d=l.slice(c+1);s[p]=GG(d,r?.[p])}else a.push(l)}if(a.length>0){const l=[...Vh(t)],c=(l.length>0?l:Object.keys(r??{})).filter(d=>{const h=r?.[d];return h===void 0||h.type==="string"||h.type===void 0}),p=c.find(d=>s[d]===void 0)??c[0];if(p===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[p]=a[0]:s[p]=a.join(" ")}return{ok:!0,value:s}}function HG(e){const t=[];let n="",r=null;for(let s=0;s<e.length;s++){const a=e[s];if(r!==null){a===r?r=null:n+=a;continue}if(a==='"'||a==="'"){r=a;continue}if(/\s/.test(a)){n!==""&&(t.push(n),n="");continue}n+=a}return n!==""&&t.push(n),t}function GG(e,t){const n=t?.type;if(n==="number"||n==="integer"){const r=Number(e);return Number.isFinite(r)?r:e}if(n==="boolean"){if(e==="true")return!0;if(e==="false")return!1}if(n==="array"||n==="object")try{return JSON.parse(e)}catch{return e}return e}function VG(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function KG(e,t){const n=Gh(t);if(n===void 0)return;const r={};for(const s of Object.keys(n)){const a=e[s];a!=null&&(r[s]=typeof a=="string"?a:String(a))}return Object.keys(r).length>0?r:void 0}const ZG=new Set(["action.result","actions.requested","action.approval_requested","action.approval_resolved"]),WG=new Set(["actions.requested","action.result","action.approval_requested","action.approval_resolved","subagent.called","subagent.completed"]),YG=new Set(["message.received","turn.started","message.completed","reasoning.appended","reasoning.completed","actions.requested","action.approval_requested","action.approval_resolved","action.result","subagent.called","subagent.completed","turn.completed","turn.failed","agent.bound","session.failed"]);function pO(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function XG(){const e=wG()!==null,t=e?aO():"";return{meta:{name:"agent",dev:!1,basePath:pO()},info:null,health:"unknown",sessions:[],current:null,localTrace:!1,view:"chat",running:!1,turnStartedAt:null,queued:[],composerDraft:null,authToken:"",aliasToken:t,aliasHosted:e,embedded:e&&EG(),transcript:[],traceEvents:[],barTitle:"No session",barId:"",externalUrl:null,drawerOpen:!1,sidebarOpen:!1,bridged:!1,toast:null,evalCases:[],evalConfig:null,evalRun:null,evalRuns:[],evalNavReturn:!1}}const Go=yG(()=>XG());class QG{constructor(){this.api=new _G(pO(),()=>this.state.authToken,()=>this.state.aliasToken),this.items=[],this.itemIndex=new Map,this.toolIds=new Set,this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds=new Map,this.nestedReasoningIds=new Map,this.idSeq=0,this.streamAbort=null,this.lastIndex=-1,this.toastTimer=null,this.evalPollTimer=null,this.evalRestoreGeneration=0,this.evalPollGeneration=0,this.evalRestoreInFlight=null,this.booted=!1,this.aliasStreamInterrupted=!1,this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.flushingQueue=!1,this.queueHeld=!1,this.knownSessionIds=new Set,this.sessionsSeeded=!1,this.subscribe=Go.subscribe,this.getState=()=>Go.getState()}get state(){return Go.getState()}set(t){Go.setState(t)}commitTranscript(){this.set({transcript:this.items.slice()})}toast(t){this.set({toast:t}),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>this.set({toast:null}),4e3)}setAuthToken(t){this.set({authToken:t})}async signInWithAliasToken(t){const n=t.trim();if(n==="")return{ok:!1,error:"Enter the deployment's alias token."};this.set({aliasToken:n});const r=await this.api.health();return r.ok?(this.aliasStreamInterrupted=!1,this.booted=!1,await this.boot(),{ok:!0}):(this.set({aliasToken:""}),r.status===404?{ok:!1,error:"That token was not accepted. Check it and try again."}:{ok:!1,error:`Could not reach the agent (HTTP ${r.status}).`})}acceptAliasTokenHandoff(t){if(this.set({aliasToken:t}),!this.booted){this.boot();return}if(!this.aliasStreamInterrupted)return;this.aliasStreamInterrupted=!1;const n=this.state.current;n!==null&&this.streamAbort===null&&this.startStream(n.sessionId,this.lastIndex+1)}noteAliasAuthLoss(t){return!this.state.aliasHosted||t!==401&&t!==404||this.state.aliasToken.trim()===""?!1:(this.aliasStreamInterrupted=this.streamAbort!==null,this.stopStream(),this.set({aliasToken:""}),!0)}setDrawerOpen(t){this.set({drawerOpen:t})}setSidebarOpen(t){this.set({sidebarOpen:t})}nextId(t){return this.idSeq+=1,`${t}-${this.idSeq}`}push(t){this.itemIndex.set(t.id,this.items.length),this.items.push(t)}update(t,n){const r=this.itemIndex.get(t);r!==void 0&&(this.items[r]={...this.items[r],...n})}resetTranscript(){this.items=[],this.itemIndex.clear(),this.toolIds.clear(),this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds.clear(),this.nestedReasoningIds.clear(),this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.queueHeld=!1}subagentToolCallId(t){return`sub:${t}`}ensureSubagentTool(t,n){const r=this.subagentToolCallId(t),s=this.itemIndex.has(this.toolItemId(r));return this.upsertTool(r,s?"":"subagent:task",null,n)}getToolItem(t){const n=this.itemIndex.get(t);if(n===void 0)return null;const r=this.items[n];return r?.kind==="tool"?r:null}updateSubagentChildren(t,n,r=null){const s=this.ensureSubagentTool(t,r),a=this.getToolItem(s);if(a===null)return;const l=n([...a.children??[]]);this.update(s,{children:l})}upsertNestedTool(t,n,r,s,a){this.updateSubagentChildren(t,l=>{const c=l.findIndex(p=>p.kind==="tool"&&p.callId===n);if(c>=0){const p=l[c];if(p?.kind!=="tool")return l;const d=l.slice();return d[c]={...p,name:r||p.name,args:s??p.args},d}return l.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:s??null,status:"running",output:null,startedAt:a??Date.now(),endedAt:null}),l},a)}finishNestedTool(t,n,r,s,a,l){this.updateSubagentChildren(t,c=>{const p=c.findIndex(g=>g.kind==="tool"&&g.callId===n),d=s==null?"(no output)":sr(s,4e3);if(p<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:d,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[p];if(h?.kind!=="tool")return c;const m=c.slice();return m[p]={...h,name:r||h.name,status:a?"error":"done",output:d,outputRaw:s,endedAt:l??Date.now()},m},l)}ensureNestedAssistant(t){const n=this.nestedAssistantIds.get(t);if(n)return n;const r=this.nextId("nested-asst");return this.nestedAssistantIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"assistant",id:r,text:"",streaming:!0}),s)),r}ensureNestedReasoning(t){const n=this.nestedReasoningIds.get(t);if(n)return n;const r=this.nextId("nested-think");return this.nestedReasoningIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"reasoning",id:r,text:"",open:!0}),s)),r}updateNestedChild(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(p=>p.id===n);if(a<0)return s;const l=s[a];if(l===void 0)return s;const c=s.slice();return c[a]={...l,...r},c})}pushUser(t){this.assistantId=null,this.reasoningId=null,this.push({kind:"user",id:this.nextId("user"),text:String(t??"")})}pushDivider(t,n=!1,r){this.push({kind:"divider",id:this.nextId("div"),text:t,fail:n,url:r})}ensureAssistant(){if(this.assistantId)return this.assistantId;const t=this.nextId("asst");return this.push({kind:"assistant",id:t,text:"",streaming:!0}),this.assistantId=t,t}ensureReasoning(){if(this.reasoningId)return this.reasoningId;const t=this.nextId("think");return this.push({kind:"reasoning",id:t,text:"",open:!0}),this.reasoningId=t,t}toolItemId(t){return`tool:${t}`}upsertTool(t,n,r,s){const a=this.toolItemId(t);if(this.itemIndex.has(a)){const l={};if(n&&(l.name=n),r!=null&&(l.args=r),s!==null){const c=this.getToolItem(a);c!==null&&c.startedAt===null&&(l.startedAt=s)}return Object.keys(l).length>0&&this.update(a,l),a}return this.push({kind:"tool",id:a,callId:t,name:n,args:r??null,status:"running",output:null,startedAt:s??Date.now(),endedAt:null}),this.toolIds.add(a),a}markAwaiting(t,n,r){const s=this.upsertTool(t,n,r,Date.now());this.update(s,{status:"awaiting",output:"Parked for human approval. Approve or deny to continue the turn."})}clearAwaiting(t,n){const r=this.toolItemId(t);this.itemIndex.has(r)&&this.update(r,{status:"running",output:n==="deny"?"Denied — tool will not execute.":"Approved — executing…"})}finishTool(t,n,r,s,a){const l=this.upsertTool(t,n,null,a),c=r==null?"(no output)":sr(r,4e3);this.update(l,{status:s?"error":"done",output:c,outputRaw:r,endedAt:a??Date.now()}),this.activeTurnId===null&&!this.hasOpenTools()&&this.setRunning(!1)}hasOpenTools(){for(const t of this.toolIds){const n=this.itemIndex.get(t);if(n===void 0)continue;const r=this.items[n];if(r.kind==="tool"&&(r.status==="running"||r.status==="awaiting"))return!0}return!1}finalizeOpenTools(t,n){const r=t??Date.now();for(const s of this.toolIds){const a=this.itemIndex.get(s);if(a===void 0)continue;const l=this.items[a];l.kind==="tool"&&(l.status==="done"||l.status==="error"||l.status!=="awaiting"&&this.update(s,{status:"orphan",endedAt:r,output:n}))}}beginDiscardStaleTurnBody(){this.discardTurnBody=!0,this.activeTurnId=null}applyChat(t){if(this.discardTurnBody){if(t.type==="turn.started")this.discardTurnBody=!1;else if(t.type!=="message.received"&&t.type!=="agent.bound")return}else if(this.activeTurnId!==null&&t.turnId!==void 0&&t.turnId!==this.activeTurnId&&!WG.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=fl(t.at)||Date.now();switch(t.type){case"message.received":this.pushUser(n.text);break;case"agent.bound":this.pushDivider(n.url?`cloud agent ${n.sdkAgentId}`:`agent ${n.sdkAgentId}`,!1,typeof n.url=="string"?n.url:void 0);break;case"turn.started":this.activeTurnId=t.turnId??null,this.activeTurnStartedAt=fl(t.at),this.setRunning(!0);break;case"reasoning.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedReasoning(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureReasoning(),{text:String(n.text??"")});break;case"reasoning.completed":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.nestedReasoningIds.get(n.parentCallId);s&&(this.updateNestedChild(n.parentCallId,s,{open:!1}),this.nestedReasoningIds.delete(n.parentCallId))}else this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null);break;case"message.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureAssistant(),{text:String(n.text??"")});break;case"message.completed":{if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??""),streaming:!1}),this.nestedAssistantIds.delete(n.parentCallId)}else{const s=this.ensureAssistant();this.update(s,{text:String(n.text??""),streaming:!1}),this.assistantId=null}break}case"actions.requested":this.setRunning(!0);for(const s of n.calls||[]){const a=typeof s.parentCallId=="string"&&s.parentCallId!==""?s.parentCallId:typeof n.parentCallId=="string"&&n.parentCallId!==""?n.parentCallId:void 0;a!==void 0?this.upsertNestedTool(a,s.callId,s.toolName,s.args,r):s.toolName==="task"||this.upsertTool(s.callId,s.toolName,s.args,r)}break;case"action.approval_requested":this.markAwaiting(n.callId,n.toolName,n.args);break;case"action.approval_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.result":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.finishNestedTool(n.parentCallId,n.callId,n.toolName,n.output,!!n.isError,r):n.toolName==="task"||this.finishTool(n.callId,n.toolName,n.output,!!n.isError,r);break;case"subagent.called":this.setRunning(!0),this.upsertTool(this.subagentToolCallId(n.callId),`subagent:${n.name||"task"}`,n.description,r);break;case"subagent.completed":this.nestedAssistantIds.delete(n.callId),this.nestedReasoningIds.delete(n.callId),this.finishTool(this.subagentToolCallId(n.callId),"","completed",!1,r);break;case"turn.completed":{this.activeTurnId=null,this.finalizeOpenTools(r,"(no result — turn completed before the tool reported back)");const s=this.activeTurnStartedAt;this.activeTurnStartedAt=null,this.push({kind:"turn-end",id:this.nextId("turn"),ms:s!==null&&fl(t.at)!==null?Math.max(0,r-s):null,inTokens:typeof n.usage?.inputTokens=="number"?n.usage.inputTokens:void 0,outTokens:typeof n.usage?.outputTokens=="number"?n.usage.outputTokens:void 0}),this.setRunning(this.hasOpenTools());break}case"turn.failed":this.activeTurnId=null,this.activeTurnStartedAt=null,this.finalizeOpenTools(r,`(no result — turn failed: ${n.message||"unknown"})`),this.pushDivider(`turn failed: ${n.message}`,!0),this.setRunning(this.hasOpenTools());break;case"session.waiting":this.setRunning(this.hasOpenTools()),this.refreshSessions();break;case"session.completed":this.finalizeOpenTools(r,"(no result — session completed)"),this.pushDivider("task session completed"),this.setRunning(!1),this.refreshSessions();break;case"session.failed":this.finalizeOpenTools(r,`(no result — session failed: ${n.message||"unknown"})`),this.pushDivider(`session failed: ${n.message}`,!0),this.setRunning(!1),this.refreshSessions();break}}handleEvent(t){this.state.traceEvents.push(t),this.applyChat(t),this.commitTranscript(),this.set({traceEvents:this.state.traceEvents.slice()})}setRunning(t){this.set({running:t,turnStartedAt:t?this.activeTurnStartedAt:null}),t||queueMicrotask(()=>this.maybeFlushQueue())}setView(t){const n=t==="trace"||t==="raw"||t==="logs"||t==="evals"||t==="abs"?t:"chat";this.set({view:n,...n==="evals"?{evalNavReturn:!1}:{}});try{const r=new URL(window.location.href);n==="chat"?r.searchParams.delete("view"):r.searchParams.set("view",n),history.replaceState(null,"",r.toString())}catch{}n==="evals"&&(this.refreshEvalRuns(),this.restoreEvalRun())}backToEvals(){this.set({evalNavReturn:!1}),this.setView("evals")}async refreshSessions(){let t;try{t=await this.api.sessions()}catch{return}if(!t.ok||!t.body){this.noteAliasAuthLoss(t.status);return}const n=t.body.sessions||[],r=MG({knownIds:this.knownSessionIds,sessions:n,currentSessionId:this.state.current?.sessionId??null,sidebarOpen:this.state.sidebarOpen,embedded:this.state.embedded,seeded:this.sessionsSeeded});this.knownSessionIds=new Set(n.map(a=>a.sessionId)),this.sessionsSeeded=!0;const s={sessions:n};if(r.openSidebar&&(s.sidebarOpen=!0),this.state.current){const a=n.find(l=>l.sessionId===this.state.current?.sessionId);a?.continuationToken&&(s.current={...this.state.current,continuationToken:a.continuationToken})}if(this.set(s),r.selectSessionId!==null){const a=n.find(l=>l.sessionId===r.selectSessionId);a!==void 0&&this.selectSession(a)}}isCurrent(t){return this.state.current!==null&&this.state.current.sessionId===t}stopStream(){this.streamAbort&&(this.streamAbort.abort(),this.streamAbort=null)}startStream(t,n){this.stopStream();const r=new AbortController;this.streamAbort=r,this.api.streamFetch(t,n,r.signal).then(async s=>{if(!s.ok||!s.body){this.toast(`Stream failed (${s.status})`);return}const a=s.body.getReader(),l=new TextDecoder;let c="";for(;;){const p=await a.read();if(p.done){this.scheduleReconnect(t,r);return}c+=l.decode(p.value,{stream:!0});const d=c.split(`
34
+ `);c=d.pop()||"";for(const h of d){if(r.signal.aborted)return;if(!h||!h.trim())continue;let m=null;try{m=JSON.parse(h)}catch{continue}m!==null&&(m.index!==void 0&&(this.lastIndex=m.index),this.handleEvent(m),ZG.has(m.type)&&await new Promise(g=>requestAnimationFrame(()=>g(null))))}}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}scheduleReconnect(t,n){n.signal.aborted||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},1e3)}selectSession(t){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,continuationToken:t.continuationToken,externalUrl:t.externalUrl||null},running:!!t.running,turnStartedAt:null,queued:[],composerDraft:null,barTitle:t.title||"Session",barId:t.sessionId,externalUrl:t.externalUrl||null,transcript:[],traceEvents:[]}),this.syncSessionUrl(t.sessionId),this.refreshSessions(),t.running?this.startStream(t.sessionId,0):this.loadEventsSnapshot(t.sessionId).then(()=>{this.isCurrent(t.sessionId)&&this.startStream(t.sessionId,this.lastIndex+1)})}syncSessionUrl(t){try{const n=new URL(window.location.href);t?n.searchParams.set("sessionId",t):n.searchParams.delete("sessionId"),history.replaceState(null,"",n.toString())}catch{}}async loadEventsSnapshot(t){this.stopStream();try{const n=await this.api.eventsText(t);if(!n.ok){this.toast(`Could not load trace (${n.status}) — falling back to stream`),this.startStream(t,0);return}const r=await n.text();this.ingestEventsCompact(Jy(r))}catch(n){this.toast(`Trace load failed: ${JG(n)}`),this.startStream(t,0)}}ingestEventsCompact(t){this.resetTranscript();for(const n of t)typeof n.index=="number"&&n.index>this.lastIndex&&(this.lastIndex=n.index),YG.has(n.type)&&this.applyChat(n);this.setRunning(this.hasOpenTools()),this.set({traceEvents:t.slice(),transcript:this.items.slice()})}deselectSession(){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.set({current:null,localTrace:!1,running:!1,turnStartedAt:null,queued:[],composerDraft:null,transcript:[],traceEvents:[],barTitle:"No session",barId:"",externalUrl:null}),this.syncSessionUrl(null),this.refreshSessions()}loadLocalTrace(t,n){this.stopStream(),this.resetTranscript(),this.lastIndex=-1;const r=Jy(t);if(r.length===0){this.toast("No session events found in that file."),this.deselectSession();return}const s=r[0].sessionId||"local-trace";this.set({current:null,localTrace:!0,running:!1,turnStartedAt:null,queued:[],composerDraft:null,barTitle:"Trace",barId:`${n||s} · ${r.length} events`,externalUrl:null}),this.setView("trace"),this.syncSessionUrl(null),this.ingestEventsCompact(r),this.toast(`Loaded ${r.length} events — Trace timeline ready`)}slashCommands(){return Nx(this.state.info?.channels)}hasReviewChannel(){return(this.state.info?.channels||[]).some(t=>t.id==="review")}shouldUseReview(t){return this.state.current===null&&this.hasReviewChannel()&&bG(t)}async sendMessage(t,n={}){const r=t.trim();if(!r||this.state.localTrace)return!1;const s=this.state.current;if(zG(r))return this.invokeSlashCommand(r);if(this.shouldUseReview(r))return this.invokeSlashCommand(`/review ${r}`);if(this.queueHeld=!1,s!==null&&this.state.running&&!n.force)return this.queueMessage(r),!0;if(s===null){this.setRunning(!0);const a=await this.api.createSession(r);return!a.ok||!a.body?(this.setRunning(!1),this.toast(`Create failed: ${sr(a.body,160)}`),!1):(this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:a.body.sessionId,channelId:"http",mode:"chat",continuationToken:a.body.continuationToken},barTitle:"Session",barId:a.body.sessionId,externalUrl:null,transcript:[],traceEvents:[]}),this.syncSessionUrl(a.body.sessionId),this.startStream(a.body.sessionId,0),this.refreshSessions(),!0)}return this.setRunning(!0),this.beginDiscardStaleTurnBody(),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,r,!0)}async postFollowUp(t,n,r){const s=await this.api.followUp(t.sessionId,n,t.continuationToken);if(s.ok&&s.body)return this.set({current:{...t,continuationToken:s.body.continuationToken}}),!0;if(s.body?.error==="stale_continuation_token"&&r){await this.refreshSessions();const a=this.state.current??t;return this.postFollowUp(a,n,!1)}return this.setRunning(!1),this.toast(`Send failed: ${sr(s.body,160)}`),!1}queueMessage(t){this.set({queued:[...this.state.queued,{id:this.nextId("queued"),text:t}]})}removeQueued(t){this.set({queued:this.state.queued.filter(n=>n.id!==t)})}clearQueue(){this.set({queued:[]})}editQueued(t){const n=this.state.queued.find(r=>r.id===t);n!==void 0&&(this.removeQueued(t),this.set({composerDraft:n.text}))}consumeComposerDraft(){this.set({composerDraft:null})}async sendQueuedNow(t){const n=this.state.queued.find(s=>s.id===t);if(n===void 0)return;this.removeQueued(t),this.queueHeld=!1,await this.sendMessage(n.text,{force:!0})||this.requeueFront(n)}requeueFront(t){this.set({queued:[t,...this.state.queued]}),this.queueHeld=!0}maybeFlushQueue(){if(this.flushingQueue||this.queueHeld)return;const{running:t,queued:n,localTrace:r,current:s}=this.state;if(t||r||s===null||n.length===0)return;const[a,...l]=n;a!==void 0&&(this.flushingQueue=!0,this.set({queued:l}),this.setRunning(!0),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,a.text,!0).then(c=>{c||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1}))}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||!this.state.running)return;this.state.queued.length>0&&(this.queueHeld=!0),this.beginDiscardStaleTurnBody(),this.stopStream(),this.setRunning(!1),this.assistantId&&(this.update(this.assistantId,{streaming:!1}),this.assistantId=null),this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null),this.finalizeOpenTools(Date.now(),"(no result — turn interrupted)"),this.pushDivider("turn interrupted"),this.commitTranscript();const n=await this.api.stopSession(t);if(!n.ok){this.toast(`Stop failed: ${sr(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r)return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${sr(s.body,160)}`)}async dispatchSchedule(t){const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${sr(n.body,120)}`);return}await this.refreshSessions();const r=n.body.sessionIds?.[0],s=this.state.sessions.find(a=>a.sessionId===r);s&&this.selectSession(s)}async refreshEvalCases(){const t=await this.api.evalsList();if(!t.ok||!t.body){t.status!==0&&this.toast(`Could not list evals (${t.status}): ${sr(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async refreshEvalRuns(){const t=await this.api.evalsListRuns();!t.ok||t.body===null||this.set({evalRuns:t.body.runs})}async selectEvalRun(t){const n=t.trim();if(n==="")return;const r=this.state.evalRuns.find(a=>a.runId===n);if(r!==void 0&&r.status!=="running"){this.applyRestoredEvalRun(r),this.setView("evals");return}const s=await this.api.evalsRunStatus(n);if(!s.ok||s.body===null){this.toast(`Eval run not found: ${n}`);return}this.applyRestoredEvalRun(s.body),this.setView("evals"),this.refreshEvalRuns()}async restoreEvalRun(){return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=nV();if(n!==null){const p=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(p.ok&&p.body){this.applyRestoredEvalRun(p.body),this.refreshEvalRuns();return}}const r=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration)return;const s=r.ok?r.body:null;if(s!==null&&this.set({evalRuns:s.runs}),s?.activeRunId!==void 0){const p=s.activeRunId,d=s.runs.find(h=>h.runId===p)??await this.fetchEvalRunIfCurrent(t,p);if(t!==this.evalRestoreGeneration)return;if(d!==void 0){this.state.evalRun?.runId===d.runId?(this.set({evalRun:d}),d.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(d.runId)):this.applyRestoredEvalRun(d);return}}const a=this.state.evalRun;if(a!==null){a.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(a.runId);return}const l=tV(this.state.meta.basePath);if(l!==null){const p=await this.api.evalsRunStatus(l);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(p.ok&&p.body){this.applyRestoredEvalRun(p.body);return}}if(s===null)return;const c=s.runs[0];c!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(c)}async fetchEvalRunIfCurrent(t,n){const r=await this.api.evalsRunStatus(n);if(t===this.evalRestoreGeneration)return r.ok&&r.body?r.body:void 0}applyRestoredEvalRun(t){this.set({evalRun:t}),this.mergeEvalRunIntoList(t),ep(this.state.meta.basePath,t.runId),rV(t.runId),t.status==="running"&&this.startEvalRunPoll(t.runId)}mergeEvalRunIntoList(t){const n=this.state.evalRuns.filter(r=>r.runId!==t.runId);this.set({evalRuns:[t,...n]})}async startEvalRun(t){if(this.state.evalRun?.status==="running"){this.toast("An eval run is already in progress");return}this.evalRestoreGeneration+=1;const n=await this.api.evalsStartRun(t===void 0||t.length===0?{}:{filterIds:t});if(!n.ok||!n.body){this.toast(`Eval start failed: ${sr(n.body,160)}`);return}this.set({evalRun:n.body}),ep(this.state.meta.basePath,n.body.runId),this.setView("evals"),this.toast(`Eval ID: ${n.body.runId}`),this.startEvalRunPoll(n.body.runId),this.refreshEvalRuns()}async cancelEvalRun(t){const n=t??this.state.evalRun?.runId;if(n===void 0||n===""){this.toast("No eval run to cancel");return}const r=await this.api.evalsCancelRun(n);if(!r.ok||!r.body){this.toast(`Eval cancel failed: ${sr(r.body,160)}`);return}this.set({evalRun:r.body}),ep(this.state.meta.basePath,r.body.runId),this.toast(`Cancelled Eval ID ${r.body.runId}`),r.body.status==="running"?this.startEvalRunPoll(r.body.runId):this.stopEvalRunPoll(),this.refreshEvalRuns()}stopEvalRunPoll(){this.evalPollTimer!==null&&(clearInterval(this.evalPollTimer),this.evalPollTimer=null)}startEvalRunPoll(t){this.stopEvalRunPoll();const n=++this.evalPollGeneration;let r=!1,s=!1;const a=async()=>{if(!(n!==this.evalPollGeneration||r)){r=!0;try{const l=await this.api.evalsRunStatus(t);if(n!==this.evalPollGeneration||!l.ok||!l.body)return;if(this.set({evalRun:l.body}),ep(this.state.meta.basePath,l.body.runId),this.mergeEvalRunIntoList(l.body),l.body.status!=="running"){if(this.stopEvalRunPoll(),this.refreshSessions(),this.refreshEvalRuns(),s||n!==this.evalPollGeneration)return;s=!0;const{passed:c,failed:p,total:d}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${p} failed, ${d} total`)}}finally{r=!1}}};a(),this.evalPollTimer=setInterval(()=>{a()},1500)}async openEvalCaseSession(t){this.set({evalNavReturn:!0}),await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.setView("chat")}async openEvalCaseTrace(t){this.set({evalNavReturn:!0}),await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.setView("trace")}async openSessionFromChannelResponse(t,n){const r=typeof n?.sessionId=="string"&&n.sessionId.trim()!==""?n.sessionId:null;if(r===null)return!1;await this.refreshSessions();const s=this.state.sessions.find(c=>c.sessionId===r),a=typeof n.status=="string"?n.status:void 0,l=a===void 0||a==="started"||a==="running";if(s!==void 0)this.selectSession({...s,running:l?!0:!!s.running});else{const c=typeof n.continuationToken=="string"?n.continuationToken:typeof n.key=="string"?n.key:void 0,p=typeof n.pr=="string"?n.pr:typeof n.title=="string"?n.title:"Session";this.selectSession({sessionId:r,channelId:t,mode:typeof n.mode=="string"?n.mode:"task",title:p,turnCount:0,running:l,continuationToken:c,externalUrl:typeof n.agentUrl=="string"?n.agentUrl:null})}return this.setView("chat"),this.setDrawerOpen(!1),!0}async openSessionById(t){const n=t.trim();if(n==="")return;await this.refreshSessions();const r=this.state.sessions.find(s=>s.sessionId===n);r!==void 0?this.selectSession(r):this.selectSession({sessionId:n,channelId:"http",mode:"conversation",title:"Session",turnCount:0,running:!1}),this.setView("chat")}async invokeSlashCommand(t){const n=t.trim(),r=this.slashCommands();if(/^\/help(?:\s|$)/i.test(n)){this.resetTranscript(),this.pushUser(n);const l=this.ensureAssistant();return this.update(l,{text:jG(r),streaming:!1}),this.assistantId=null,this.set({localTrace:!1,current:null,barTitle:"Help",barId:"",externalUrl:null,running:!1,turnStartedAt:null}),this.syncSessionUrl(null),this.commitTranscript(),!0}const s=PG(n,r);if(!s.ok)return this.toast(s.error),!1;this.setRunning(!0),this.resetTranscript(),this.pushUser(n);const a=this.ensureAssistant();this.update(a,{text:`Running \`${s.command.name}\` (${s.command.method} ${s.command.url})…`}),this.set({localTrace:!1,current:null,barTitle:s.command.name,barId:s.command.method,externalUrl:null,transcript:this.items.slice()}),this.syncSessionUrl(null);try{const l=await this.api.channelRequest(s.command.method,s.command.url,{body:s.body,query:s.query});return l.ok?await this.openSessionFromChannelResponse(s.command.channelId,l.body)?(this.assistantId=null,!0):(this.setRunning(!1),this.update(a,{text:"```json\n"+eV(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${sr(l.body,400)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0)}catch(l){return this.setRunning(!1),this.update(a,{text:`Command failed: ${l instanceof Error?l.message:String(l)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0}}async boot(){if(this.booted||this.state.aliasHosted&&this.state.aliasToken.trim()==="")return;this.booted=!0;const t=await this.api.meta();t.ok&&t.body&&this.set({meta:{name:t.body.name??"agent",dev:!!t.body.dev,basePath:this.api.basePath,indexPath:t.body.indexPath}}),this.api.health().then(s=>{this.set({health:s.ok?"ok":"bad"})}),this.api.info().then(s=>{s.ok&&s.body?this.set({info:s.body}):s.status===401&&(this.noteAliasAuthLoss(s.status)||this.toast("Unauthorized: set a bearer token (top right) that matches the channel auth."))});let n=null,r=null;try{const s=new URL(window.location.href);n=s.searchParams.get("sessionId"),r=s.searchParams.get("view")}catch{}if(r?this.setView(r):this.state.bridged||this.setView("chat"),await this.refreshSessions(),this.refreshEvalCases(),this.refreshEvalRuns(),this.restoreEvalRun(),n){const s=this.state.sessions.find(a=>a.sessionId===n);s?this.selectSession(s):this.toast(`Session not found: ${n}`)}setInterval(()=>{this.refreshSessions()},this.state.meta.dev?2e3:5e3)}modelLabel(){return oO(this.state.info?.model)}}function JG(e){return e instanceof Error?e.message:String(e)}function eV(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function hO(e){return`agent-serve:evalRunId:${e||"/"}`}function tV(e){try{const t=sessionStorage.getItem(hO(e));return t!==null&&t!==""?t:null}catch{return null}}function nV(){try{const e=new URL(window.location.href).searchParams.get("evalRunId");if(e===null)return null;const t=e.trim();return t===""?null:t}catch{return null}}function rV(e){try{const t=new URL(window.location.href);if(t.searchParams.get("evalRunId")===e)return;t.searchParams.set("evalRunId",e),history.replaceState(null,"",t.toString())}catch{}}function ep(e,t){try{sessionStorage.setItem(hO(e),t)}catch{}}const ut=new QG;ut.getState().aliasHosted&&TG(e=>ut.acceptAliasTokenHandoff(e));if(ut.getState().embedded){NG(t=>{t.type==="hello"?(Go.setState({bridged:!0}),TT(ut.getState().view)):ut.setView(t.view)});let e=null;Go.subscribe(t=>{!t.bridged||t.view===e||(e=t.view,TT(t.view))})}function lt(e){return xG(Go,e)}function iV(e){const t=[{key:"turns",value:String(e.turns)},{key:"fail",value:String(e.turnFailures)},{key:"tools",value:String(e.toolCalls)},{key:"tool err",value:String(e.toolErrors)},{key:"tokens",value:String(e.inputTokens+e.outputTokens)},{key:"wall",value:hi(e.wallTimeMs)}];for(const[n,r]of Object.entries(e.custom).sort(([s],[a])=>s.localeCompare(a)))t.push({key:n,value:String(r)});return t}function mO(e){return e.turns>0||e.turnFailures>0||e.toolCalls>0||e.toolErrors>0||e.inputTokens>0||e.outputTokens>0||e.wallTimeMs>0||Object.keys(e.custom).length>0}function gO({metrics:e}){return v.jsx("div",{className:"ab-metrics",children:iV(e).map(t=>v.jsxs("span",{className:"ab-metric",children:[v.jsx("span",{className:"ab-metric-k",children:t.key}),v.jsx("span",{className:"ab-metric-v",children:t.value})]},t.key))})}function sV({arm:e}){const t=e.variantLabel??e.variant,n=e.sessions>0||mO(e.metrics);return v.jsxs("div",{className:"ab-arm",children:[v.jsxs("div",{className:"ab-arm-head",children:[v.jsx("span",{className:"ab-kind",children:"Arm"}),v.jsx("span",{className:"ab-arm-name",children:t}),v.jsxs("span",{className:"ab-arm-n",children:[e.sessions," session",e.sessions===1?"":"s"]})]}),e.description!==void 0?v.jsx("div",{className:"ab-arm-desc",children:e.description}):null,n?v.jsx(gO,{metrics:e.metrics}):null]})}function oV({row:e,active:t}){return v.jsxs("button",{type:"button",className:`ab-session${t?" active":""}`,onClick:()=>{ut.selectSession({sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,turnCount:e.turnCount,...e.title===void 0?{}:{title:e.title},...e.updatedAt===void 0?{}:{updatedAt:e.updatedAt}}),ut.setView("chat")},children:[v.jsxs("div",{className:"ab-session-head",children:[v.jsx("span",{className:"ab-session-id",children:e.title||e.sessionId}),v.jsxs("span",{className:"ab-session-meta",children:[e.channelId,e.updatedAt!==void 0?` · ${Hh(e.updatedAt)??e.updatedAt}`:""]})]}),v.jsx("div",{className:"ab-session-arms",children:e.assignments.map(n=>{const r=n.variant===null,s=r?"Skipped":n.variantLabel??n.variant;return v.jsxs("div",{className:"ab-assignment",children:[v.jsxs("div",{className:"ab-assignment-row",children:[v.jsx("span",{className:"ab-assignment-exp",children:n.experiment}),v.jsx("span",{className:"ab-assignment-arrow","aria-hidden":!0,children:"→"}),v.jsx(ra,{variant:r?"neutral":"accent",size:"sm",pill:!0,children:s})]}),n.metrics!==void 0&&mO(n.metrics)?v.jsx(gO,{metrics:n.metrics}):null]},`${e.sessionId}:${n.experiment}`)})})]})}function aV(){const e=lt(y=>y.current),[t,n]=x.useState(null),[r,s]=x.useState(null),[a,l]=x.useState(!0),c=x.useRef(!1),p=x.useCallback(async()=>{if(!c.current){c.current=!0,l(!0),s(null);try{const y=await ut.api.abs();if(!y.ok||y.body===null){s(`Failed to load A/Bs (${y.status})`),n(null);return}n(y.body)}catch(y){s(y instanceof Error?y.message:String(y)),n(null)}finally{l(!1),c.current=!1}}},[]);if(x.useEffect(()=>{p();const y=setInterval(()=>{p()},4e3);return()=>clearInterval(y)},[p]),a&&t===null)return v.jsx("div",{className:"pg-abs",children:v.jsxs("div",{className:"ab-empty",children:[v.jsx("span",{className:"spin"})," Loading A/B metrics…"]})});if(r!==null&&t===null)return v.jsxs("div",{className:"pg-abs",children:[v.jsx("div",{className:"ab-empty ab-error",children:r}),v.jsx(zn,{variant:"secondary",size:"sm",onClick:()=>{p()},children:"Retry"})]});const d=t?.experiments??[],h=t?.sessions??[];if(d.length===0&&h.length===0)return v.jsx("div",{className:"pg-abs",children:v.jsxs("div",{className:"ab-empty",children:["No A/B experiments loaded.",v.jsxs("div",{className:"ab-hint",children:["Author ",v.jsx("code",{children:"agent/ab.ts"})," with ",v.jsx("code",{children:"defineAB"}),", then run sessions — enrollment lands as durable ",v.jsx("code",{children:"ab.assigned"})," ","events at session create. Optional"," ",v.jsx("code",{children:"agent/ab.config.ts"})," controls fold retention and sample / snapshot persistence."]})]})});const g=t?.config?.maxPlaygroundSessions??200;return v.jsxs("div",{className:"pg-abs",children:[v.jsxs("div",{className:"ab-toolbar",children:[v.jsx("span",{className:"ab-toolbar-title",children:"A/B metrics"}),v.jsxs("span",{className:"ab-toolbar-meta",children:["last ",g," sessions"]}),r!==null?v.jsx("span",{className:"ab-error",children:r}):null,v.jsx("span",{className:"grow"}),v.jsx(zn,{variant:"secondary",size:"sm",onClick:()=>{p()},children:"Refresh"})]}),v.jsxs("section",{className:"ab-section",children:[v.jsx("h3",{children:"Experiments"}),d.length===0?v.jsx("div",{className:"ab-empty",children:"No declared experiments."}):v.jsx("div",{className:"ab-exp-list",children:d.map(y=>v.jsxs("div",{className:"ab-exp-card",children:[v.jsxs("div",{className:"ab-exp-card-head",children:[v.jsx("span",{className:"ab-kind",children:"Experiment"}),v.jsx("span",{className:"ab-exp-name",children:y.name}),y.skipped>0?v.jsxs(ra,{variant:"neutral",size:"sm",pill:!0,children:[y.skipped," skipped"]}):null]}),v.jsx("div",{className:"ab-arm-list",children:y.arms.map(k=>v.jsx(sV,{arm:k},k.variant))})]},y.name))})]}),v.jsxs("section",{className:"ab-section",children:[v.jsx("h3",{children:"Sessions"}),h.length===0?v.jsx("div",{className:"ab-empty",children:"No enrolled sessions yet. Start a chat to assign arms."}):v.jsx("div",{className:"ab-session-list",children:h.map(y=>v.jsx(oV,{row:y,active:e?.sessionId===y.sessionId},y.sessionId))})]})]})}function lV(){const[e,t]=x.useState(""),[n,r]=x.useState(null),[s,a]=x.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const p=await ut.signInWithAliasToken(e);a(!1),p.ok||r(p.error)}return v.jsx("div",{className:"pg-alias-signin",children:v.jsxs("div",{className:"pg-alias-signin-box",children:[v.jsx("h1",{children:"agent-serve playground"}),v.jsx("p",{children:"This deployment requires its alias token."}),n!==null?v.jsx("div",{className:"pg-alias-signin-error",children:n}):null,v.jsxs("form",{onSubmit:c=>{l(c)},children:[v.jsx(Uh,{type:"password",size:"base","aria-label":"Alias token",placeholder:"adt_…",autoComplete:"off",autoFocus:!0,value:e,onChange:c=>t(c.target.value),disabled:s}),v.jsx(zn,{type:"submit",variant:"primary",disabled:s||e.trim()==="",children:s?"Checking…":"Open playground"})]}),v.jsxs("div",{className:"pg-alias-signin-hint",children:["The alias token was shown once when the agent was deployed. Lost it?",v.jsx("code",{children:"agentkit rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function uV(){return v.jsx("div",{className:"pg-alias-signin",children:v.jsxs("div",{className:"pg-alias-signin-box",children:[v.jsx("h1",{children:"Playground disconnected"}),v.jsx("p",{children:"This playground connects through your Cursor dashboard. Use Reconnect on the dashboard, or reload the page."})]})})}function cV(e){const{localTrace:t,current:n,running:r,slashNames:s,hasReview:a}=e;if(t)return{disabled:!0,hint:"Local trace (view only). Click New or pick a live session to chat."};if(n===null){const p=s.length>0?` Slash commands: ${s.slice(0,4).join(", ")}${s.length>4?", …":""}, /help.`:"";return a?{disabled:!1,hint:`Paste a PR URL for /review, type a channel command, or send a message for a new http session.${p}`}:{disabled:!1,hint:`Sending creates a new http session.${p}`}}if(n.mode==="task"||n.channelId!=="http")return n.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:n.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${n.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${n.channelId}” channel take follow-ups through that channel; watch only here.`};if(!n.continuationToken)return{disabled:!0,hint:"This session has no continuation token; watch only."};const c=s.length>0?` Channel commands (${s.slice(0,3).join(", ")}${s.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:r?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${c}`}}function fV(){const e=lt(t=>t.queued);return e.length===0?null:v.jsx("div",{className:"pg-queue",role:"list","aria-label":"Queued messages",children:e.map(t=>v.jsxs("div",{className:"pg-queue-item",role:"listitem",children:[v.jsx("button",{type:"button",className:"pg-queue-label",title:"Edit queued message",onClick:()=>ut.editQueued(t.id),children:t.text}),v.jsxs("span",{className:"pg-queue-actions",children:[v.jsx(po,{icon:"arrow-up",size:"sm",variant:"default","aria-label":"Send now (interrupts the running turn)",onClick:()=>{ut.sendQueuedNow(t.id)}}),v.jsx(po,{icon:"x",size:"sm",variant:"default","aria-label":"Remove queued message",onClick:()=>ut.removeQueued(t.id)})]})]},t.id))})}function dV(){const[e,t]=x.useState(""),[n,r]=x.useState(0),s=lt(A=>A.localTrace),a=lt(A=>A.current),l=lt(A=>A.running),c=lt(A=>A.composerDraft),p=lt(A=>A.info),d=(p?.channels||[]).some(A=>A.id==="review");x.useEffect(()=>{c!==null&&(t(A=>A.trim()?`${A} ${c}`:c),ut.consumeComposerDraft())},[c]);const h=x.useMemo(()=>Nx(p?.channels),[p]),m=x.useMemo(()=>cO(h),[h]),g=x.useMemo(()=>{if(s)return null;const A=e.replace(/^\s+/,"");return!A.startsWith("/")||/\s/.test(A)?null:A},[e,s]),y=x.useMemo(()=>g===null?[]:LG(g,h),[g,h]),k=g!==null&&y.length>0,{disabled:w,hint:_}=cV({localTrace:s,current:a,running:l,slashNames:m,hasReview:d}),E=l&&a!==null&&!s,R=async(A=e,N=!1)=>{if(!A.trim())return;await ut.sendMessage(A,{force:N})&&(t(""),r(0))},T=A=>{t(`${A} `),r(0)},C=A=>{if(k){if(A.key==="ArrowDown"){A.preventDefault(),r(N=>(N+1)%y.length);return}if(A.key==="ArrowUp"){A.preventDefault(),r(N=>(N-1+y.length)%y.length);return}if(A.key==="Tab"||A.key==="Enter"&&!A.shiftKey){const N=y[n]??y[0];if(N!==void 0&&g!==N.name){A.preventDefault(),T(N.name);return}}if(A.key==="Escape"){A.preventDefault(),t(""),r(0);return}}A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),R(e,A.metaKey||A.ctrlKey))};return v.jsxs("div",{className:"pg-composer",children:[k?v.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[y.map((A,N)=>v.jsx("li",{children:v.jsxs("button",{type:"button",role:"option","aria-selected":N===n,className:N===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:I=>{I.preventDefault(),T(A.name)},onMouseEnter:()=>r(N),children:[v.jsx("code",{className:"pg-slash-name",children:A.name}),v.jsx("span",{className:"pg-slash-method",children:A.method}),A.description?v.jsx("span",{className:"pg-slash-desc",children:A.description}):null]})},`${A.name}:${A.method}`)),v.jsxs("li",{className:"pg-slash-footer",children:[v.jsx("code",{children:"/help"})," lists all channel commands"]})]}):null,v.jsxs("div",{className:"inner",children:[v.jsx(fV,{}),v.jsxs("div",{className:w&&!E?"pg-prompt disabled":"pg-prompt",children:[v.jsx("textarea",{className:"pg-prompt-input",rows:1,placeholder:m.length>0?`Message the agent, or ${m[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":k?"list":void 0,"aria-expanded":k,value:e,onChange:A=>{t(A.target.value),r(0)},onKeyDown:C,disabled:w}),v.jsxs("div",{className:"pg-prompt-toolbar",children:[v.jsx("span",{className:"pg-prompt-hint",title:_,children:_}),E&&!e.trim()?v.jsx(po,{icon:"square",iconVariant:"filled",variant:"secondary",shape:"circle",size:"lg","aria-label":"Stop the running turn",onClick:()=>{ut.stopTurn()}}):v.jsx(po,{icon:"arrow-up",variant:"primary",color:"monochrome",shape:"circle",size:"lg","aria-label":l?"Queue message (⌘Enter sends now)":"Send message",disabled:w||!e.trim(),onClick:()=>{R()}})]})]})]})]})}const pV="agent-serve.playground.try.";function bO(e,t){return`${pV}${e}:${t}`}function _T(e,t){try{const n=localStorage.getItem(bO(e,t));if(n===null)return null;const r=JSON.parse(n);if(typeof r!="object"||r===null||Array.isArray(r))return null;const s=r,a={};return typeof s.body=="string"&&(a.body=s.body),typeof s.query=="string"&&(a.query=s.query),a}catch{return null}}function hV(e,t,n){try{localStorage.setItem(bO(e,t),JSON.stringify(n))}catch{}}function RT(e){if(e===void 0)return"{}";const t=e.properties;if(e.type!=="object"||t===void 0)return"{}";const n={};for(const[r,s]of Object.entries(t)){const a=s.type;a==="string"?n[r]="":a==="number"||a==="integer"?n[r]=0:a==="boolean"?n[r]=!1:a==="array"?n[r]=[]:a==="object"?n[r]={}:n[r]=null}return JSON.stringify(n,null,2)}function CT({label:e,schema:t}){if(t===void 0)return v.jsxs("div",{className:"pg-try-schema-missing",children:["No ",e," schema on this route — body is free-form JSON."]});const n=t.properties,r=new Set(Array.isArray(t.required)?t.required.filter(s=>typeof s=="string"):[]);return n===void 0||Object.keys(n).length===0?v.jsxs("details",{className:"pg-try-schema",children:[v.jsxs("summary",{children:[e," schema"]}),v.jsx("pre",{children:JSON.stringify(t,null,2)})]}):v.jsxs("details",{className:"pg-try-schema",open:!0,children:[v.jsxs("summary",{children:[e," schema"]}),v.jsx("ul",{children:Object.entries(n).map(([s,a])=>{const l=typeof a.type=="string"?a.type:"any",c=typeof a.description=="string"?a.description:null;return v.jsxs("li",{children:[v.jsx("code",{children:s}),r.has(s)?v.jsx("span",{className:"req",children:" required"}):v.jsx("span",{className:"opt",children:" optional"}),v.jsxs("span",{className:"type",children:[" · ",l]}),c?v.jsx("div",{className:"desc",children:c}):null]},s)})})]})}function yO(e,t){const n=e.trim();if(n==="")return{ok:!0,value:{}};try{const r=JSON.parse(n);return typeof r!="object"||r===null||Array.isArray(r)?{ok:!1,error:`${t} must be a JSON object`}:{ok:!0,value:r}}catch(r){return{ok:!1,error:`${t}: ${r instanceof Error?r.message:String(r)}`}}}function tp(e){return`'${e.replace(/'/g,"'\\''")}'`}function mV(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",tp(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",tp("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",tp(r))}return t.push(tp(e.absoluteUrl)),t.join(" ")}function gV(e,t,n){let r=ut.api.url(e);if(n){const s=yO(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,p]of Object.entries(s.value)){if(p==null)continue;const d=typeof p=="string"?p:String(p);d!==""&&a.set(c,d)}const l=a.toString();l!==""&&(r=`${r}?${l}`)}try{return{ok:!0,url:new URL(r,window.location.origin).toString()}}catch(s){return{ok:!1,error:`URL: ${s instanceof Error?s.message:String(s)}`}}}function bV({channelId:e,route:t,onClose:n}){const r=t.method.toUpperCase(),s=r!=="GET"&&r!=="HEAD",a=t.querySchema!==void 0||r==="GET"||r==="HEAD",l=lt(I=>I.authToken),[c,p]=x.useState(()=>{const I=_T(r,t.url);return I?.query!==void 0&&I.query.trim()!==""?I.query:RT(t.querySchema)}),[d,h]=x.useState(()=>{const I=_T(r,t.url);return I?.body!==void 0&&I.body.trim()!==""?I.body:RT(t.bodySchema)}),[m,g]=x.useState(!1),[y,k]=x.useState(!1),[w,_]=x.useState(null),[E,R]=x.useState(null);x.useEffect(()=>{const I=H=>{H.key==="Escape"&&n()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n]);const T=I=>{const H={};s&&(H.body=I.body??d),a&&(H.query=I.query??c),hV(r,t.url,H)},C=()=>{T({body:d,query:c}),n()},A=async()=>{if(_(null),k(!1),s&&d.trim()!=="")try{JSON.parse(d)}catch($){_(`Body: ${$ instanceof Error?$.message:String($)}`);return}const I=gV(t.url,c,a);if(!I.ok){_(I.error);return}const H=mV({method:r,absoluteUrl:I.url,token:l,hasBody:s,bodyText:d});try{await navigator.clipboard.writeText(H),k(!0),ut.toast("Copied curl to clipboard"),window.setTimeout(()=>k(!1),1500)}catch($){_(`Copy failed: ${$ instanceof Error?$.message:String($)}`)}},N=async()=>{_(null),R(null);let I;if(a){const $=yO(c,"Query");if(!$.ok){_($.error);return}I={};for(const[L,K]of Object.entries($.value))K!=null&&(I[L]=typeof K=="string"?K:String(K))}let H;if(s){const $=d.trim();if($==="")H={};else try{H=JSON.parse($)}catch(L){_(`Body: ${L instanceof Error?L.message:String(L)}`);return}}T({body:d,query:c}),g(!0);try{const $=await ut.api.channelRequest(r,t.url,{body:s?H:void 0,query:I});if($.ok&&$.body&&await ut.openSessionFromChannelResponse(e,$.body)){n();return}R({status:$.status,body:$.body})}catch($){_($ instanceof Error?$.message:String($))}finally{g(!1)}};return v.jsx("div",{className:"pg-try-backdrop",role:"presentation",onClick:C,children:v.jsxs("div",{className:"pg-try-modal",role:"dialog","aria-modal":"true","aria-label":`Try ${r} ${t.url}`,onClick:I=>I.stopPropagation(),children:[v.jsxs("div",{className:"pg-try-head",children:[v.jsxs("div",{children:[v.jsxs("div",{className:"pg-try-title",children:[v.jsx("span",{className:"pg-try-method",children:r})," ",v.jsx("code",{children:t.url})]}),v.jsxs("div",{className:"pg-try-sub",children:["channel ",v.jsx("code",{children:e}),t.description?` · ${t.description}`:null]})]}),v.jsx("button",{type:"button",className:"link-btn",onClick:C,children:"Close"})]}),v.jsxs("div",{className:"pg-try-body",children:[a?v.jsxs(v.Fragment,{children:[v.jsx(CT,{label:"Query",schema:t.querySchema}),v.jsxs("label",{className:"pg-try-field",children:[v.jsx("span",{children:"Query (JSON object → search params)"}),v.jsx("textarea",{value:c,onChange:I=>p(I.target.value),spellCheck:!1,rows:6})]})]}):null,s?v.jsxs(v.Fragment,{children:[v.jsx(CT,{label:"Body",schema:t.bodySchema}),v.jsxs("label",{className:"pg-try-field",children:[v.jsx("span",{children:"Body (JSON)"}),v.jsx("textarea",{value:d,onChange:I=>h(I.target.value),spellCheck:!1,rows:10})]})]}):null,w?v.jsx("div",{className:"pg-try-error",children:w}):null,E?v.jsxs("div",{className:"pg-try-result",children:[v.jsxs("div",{className:"pg-try-status",children:["Status ",v.jsx("code",{children:E.status})]}),v.jsx("pre",{children:JSON.stringify(E.body,null,2)})]}):null]}),v.jsxs("div",{className:"pg-try-foot",children:[v.jsx(zn,{variant:"secondary",size:"sm",onClick:()=>{A()},children:y?"Copied":"Copy curl"}),v.jsx("div",{className:"pg-try-foot-spacer"}),v.jsx(zn,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),v.jsx(zn,{variant:"primary",size:"sm",disabled:m,onClick:()=>{N()},children:m?"Sending…":"Send"})]})]})})}const vO="agent-serve.playground.drawerWidth",Gb=340,ev=280,tv=720;function vp(e){return Math.min(tv,Math.max(ev,e))}function yV(){try{const e=localStorage.getItem(vO);if(e===null)return Gb;const t=Number.parseInt(e,10);return Number.isFinite(t)?vp(t):Gb}catch{return Gb}}function Bo({title:e,children:t}){return v.jsxs(v.Fragment,{children:[v.jsx("h4",{children:e}),t]})}function Za({name:e,detail:t}){return v.jsxs("div",{className:"item",children:[v.jsx("div",{className:"n",children:e}),t?v.jsx("div",{className:"d",children:t}):null]})}function vV(){const e=lt(T=>T.drawerOpen),t=lt(T=>T.info),[n,r]=x.useState(null),[s,a]=x.useState(yV),[l,c]=x.useState(!1),p=x.useRef(s);p.current=s,x.useEffect(()=>{try{localStorage.setItem(vO,String(s))}catch{}},[s]);const d=x.useCallback(T=>{T.preventDefault();const C=T.currentTarget,A=T.clientX,N=p.current;C.setPointerCapture(T.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const I=$=>{a(vp(N+($.clientX-A)))},H=$=>{C.releasePointerCapture($.pointerId),C.removeEventListener("pointermove",I),C.removeEventListener("pointerup",H),C.removeEventListener("pointercancel",H),c(!1),document.body.classList.remove("pg-resizing-drawer")};C.addEventListener("pointermove",I),C.addEventListener("pointerup",H),C.addEventListener("pointercancel",H)},[]),h=t?.tools??[],m=t?.skills??[],g=t?.subagents??[],y=t?.connections??[],k=t?.channels??[],w=t?.hooks??[],_=t?.abs??[],E=x.useMemo(()=>{const T=new Map;for(const C of Nx(k))T.set(`${C.method}:${C.url}`,C.name);return T},[k]),R=t!==null&&h.length===0&&m.length===0&&g.length===0&&y.length===0&&k.length===0&&w.length===0&&_.length===0;return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:e?l?"pg-drawer open resizing":"pg-drawer open":"pg-drawer",style:{width:s},children:[v.jsx("div",{className:l?"pg-drawer-resizer dragging":"pg-drawer-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize agent surface","aria-valuenow":s,"aria-valuemin":ev,"aria-valuemax":tv,tabIndex:0,onPointerDown:d,onKeyDown:T=>{T.key==="ArrowLeft"?(T.preventDefault(),a(C=>vp(C-16))):T.key==="ArrowRight"?(T.preventDefault(),a(C=>vp(C+16))):T.key==="Home"?(T.preventDefault(),a(ev)):T.key==="End"&&(T.preventDefault(),a(tv))}}),v.jsxs("div",{className:"head",children:[v.jsx("span",{children:"Agent surface"}),v.jsx("button",{type:"button",className:"link-btn",onClick:()=>ut.setDrawerOpen(!1),children:"Close"})]}),v.jsxs("div",{className:"body",children:[t===null?v.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,R?v.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?v.jsx(Bo,{title:"Tools",children:h.map(T=>v.jsx(Za,{name:T.name,detail:T.description},T.name))}):null,m.length?v.jsx(Bo,{title:"Skills",children:m.map(T=>v.jsx(Za,{name:T.name,detail:T.description},T.name))}):null,g.length?v.jsx(Bo,{title:"Subagents",children:g.map(T=>v.jsx(Za,{name:T.name,detail:T.description},T.name))}):null,y.length?v.jsx(Bo,{title:"MCP Connections",children:y.map(T=>v.jsx(Za,{name:T.name,detail:T.transport},T.name))}):null,k.length?v.jsx(Bo,{title:"Channels",children:k.map(T=>v.jsxs("div",{className:"item",children:[v.jsx("div",{className:"n",children:T.id}),(T.routes??[]).length===0?v.jsx("div",{className:"d",children:"(events only)"}):v.jsx("div",{className:"channel-routes",children:(T.routes??[]).map(C=>{const A=T.id!=="http",N=`${C.method} ${C.url}`,I=E.get(`${C.method.toUpperCase()}:${C.url}`);return A?v.jsxs("div",{className:"channel-route",children:[v.jsx("code",{children:N}),I?v.jsx("code",{className:"channel-slash",title:"Composer slash command",children:I}):null,v.jsx("button",{type:"button",className:"link-btn",onClick:()=>r({channelId:T.id,route:C}),children:"Try"})]},N):v.jsx("div",{className:"channel-route",children:v.jsx("code",{children:N})},N)})})]},T.id))}):null,w.length?v.jsx(Bo,{title:"Hooks",children:w.map(T=>v.jsx(Za,{name:T},T))}):null,_.length?v.jsx(Bo,{title:"A/Bs",children:_.map(T=>v.jsx(Za,{name:T},T))}):null]})]}),n?v.jsx(bV,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}function Ii(e){const t=e.at??null,n=e.ms??null;let r=e.startAt??null;return r===null&&t!==null&&n!==null&&n>0&&(r=t-n),r===null&&(r=t),{...e,startAt:r,at:t,ms:n}}function xO(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="",c=null,p=1,d=0,h=0;function m(k){return n&&n.endedAt===null||(n={turnId:k?.turnId||`turn_${t.length+1}`,startedAt:k?.at?fl(k.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function g(k){m({turnId:k.turnId,at:null}).rows.push(k),k.ms&&k.ms>p&&(p=k.ms)}function y(k){if(a===null)return;const w=m(),_=k!==null&&a!==null?Math.max(0,k-a):null,E=l.trim()||void 0;w.rows.push(Ii({kind:"think",label:E?bs(E,80):"thinking",body:E,ms:_,at:k,startAt:a})),_&&_>p&&(p=_),a=null,l=""}for(const k of e){const w=k.data||{},_=fl(k.at);switch(k.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=k.turnId||n.turnId,n.startedAt=_,n.provisional=!1):(n={turnId:k.turnId||`turn_${t.length+1}`,startedAt:_,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",c=null;break;case"message.received":g(Ii({kind:"user",label:bs(w.text,140),body:typeof w.text=="string"?w.text:void 0,at:_,startAt:_,ms:0,turnId:k.turnId}));break;case"reasoning.appended":if(typeof w.parentCallId=="string"&&w.parentCallId!=="")break;a===null&&(a=_),typeof w.text=="string"&&(l=w.text);break;case"reasoning.completed":if(typeof w.parentCallId=="string"&&w.parentCallId!=="")break;y(_);break;case"message.appended":if(typeof w.parentCallId=="string"&&w.parentCallId!=="")break;c===null&&(c=_);break;case"message.completed":{if(typeof w.parentCallId=="string"&&w.parentCallId!==""){const T=w.parentCallId;g(Ii({kind:"agent",label:bs(w.text,160)||"(empty reply)",body:typeof w.text=="string"?w.text:void 0,at:_,startAt:_,ms:0,turnId:k.turnId,depth:1,parentCallId:T}));break}const E=c??_,R=E!==null&&_!==null?Math.max(0,_-E):null;g(Ii({kind:"agent",label:bs(w.text,160)||"(empty reply)",body:typeof w.text=="string"?w.text:void 0,at:_,startAt:E,ms:R,turnId:k.turnId})),R&&R>p&&(p=R),c=null;break}case"actions.requested":for(const E of w.calls||[]){const R=typeof E.parentCallId=="string"&&E.parentCallId!==""?E.parentCallId:typeof w.parentCallId=="string"&&w.parentCallId!==""?w.parentCallId:void 0;if(R===void 0&&E.toolName==="task")continue;const T=R===void 0?E.callId:`${R}:${E.callId}`;r[T]={name:E.toolName,args:E.args,start:_,turnId:k.turnId,parentCallId:R}}break;case"action.result":{const E=w.callId;if(E==null)break;const R=typeof w.parentCallId=="string"&&w.parentCallId!==""?w.parentCallId:void 0;if(R===void 0&&w.toolName==="task"){delete r[E];break}const T=R===void 0?E:`${R}:${E}`,C=r[T];delete r[T];const A=C&&C.start!==null&&_!==null?_-C.start:null;d+=1,w.isError&&(h+=1);{const N=w.toolName||C?.name||"tool",I=C?.args;g(Ii({kind:"tool",label:N+(I?` ${bs(sr(I,60),60)}`:""),toolName:N,callId:typeof E=="string"?E:String(E),toolArgs:I,toolOutput:w.output,body:typeof w.output=="string"?w.output:w.output!=null?sr(w.output,4e3):void 0,ms:A,error:!!w.isError,at:_,startAt:C?.start??null,turnId:k.turnId,depth:R===void 0?0:1,parentCallId:R}))}A&&A>p&&(p=A);break}case"subagent.called":{const E=`task:${w.name||"subagent"}`,R=typeof w.callId=="string"?w.callId:String(w.callId);r[`sub:${R}`]={name:E,args:w.description,start:_,turnId:k.turnId};const T=m(k);T.rows.push(Ii({kind:"tool",label:E,toolName:E,callId:R,toolArgs:w.description,ms:null,at:_,startAt:_,turnId:k.turnId,depth:0})),s.set(R,{turn:T,index:T.rows.length-1});break}case"subagent.completed":{const E=typeof w.callId=="string"?w.callId:String(w.callId),R=`sub:${E}`,T=r[R];delete r[R];const C=T&&T.start!==null&&_!==null?_-T.start:null;d+=1;const A=s.get(E);s.delete(E);const N=A!==void 0?A.turn.rows[A.index]:void 0;N!==void 0&&N.kind==="tool"?(N.ms=C,N.at=_,C&&C>p&&(p=C)):g(Ii({kind:"tool",label:T?.name||"subagent",toolName:T?.name||"subagent",callId:E,toolArgs:T?.args,ms:C,at:_,startAt:T?.start??null,turnId:k.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(k.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const E=m(k);if((k.type==="turn.completed"||k.type==="turn.failed")&&(E.endedAt=_,E.usage=w.usage||null,E.failed=k.type==="turn.failed",E.error=w.message,E.startedAt!==null&&E.endedAt!==null)){const R=E.endedAt-E.startedAt;R>p&&(p=R),E.wallMs=R}if(y(_),c!==null&&_!==null){const R=Math.max(0,_-c);E.rows.push(Ii({kind:"agent",label:"(streaming…)",ms:R,at:_,startAt:c})),c=null}for(const R of Object.keys(r)){const T=r[R],C=T.start!==null&&_!==null?_-T.start:null;E.rows.push(Ii({kind:"tool",label:`${T.name||"tool"} (no result)`,ms:C,error:!0,at:_,startAt:T.start,turnId:T.turnId})),C&&C>p&&(p=C)}r={},(k.type==="turn.completed"||k.type==="turn.failed")&&(n=null);break}}}for(const k of Object.keys(r)){const w=r[k];g(Ii({kind:"tool",label:`${w.name||"tool"} (running…)`,ms:null,at:w.start,startAt:w.start,turnId:w.turnId}))}return{turns:t,maxWallMs:p,totalTools:d,failedTools:h,eventCount:e.length}}function xV(e,t=6){if(!Number.isFinite(e)||e<=0)return[0];const n=e/Math.max(2,t-1),r=10**Math.floor(Math.log10(Math.max(n,1))),s=[1,2,2.5,5,10].map(c=>c*r),a=s.find(c=>n/c<=1.5)??s[s.length-1],l=[0];for(let c=a;c<e-a*.25&&(l.push(c),!(l.length>=t-1));c+=a);return l[l.length-1]!==e&&l.push(e),l}function kV({case:e}){const t=Object.entries(e.metrics??{});return t.length===0?null:v.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:t.map(([n,r])=>v.jsxs("span",{className:"eval-metric",title:n,children:[v.jsx("span",{className:"eval-metric-name",children:n}),v.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))})}const SV="VulnScanner";function dl(e,t){const n=e?.[t];if(n===void 0)return;const r=String(n).trim();return r===""?void 0:r}function wV(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function EV({case:e}){const t=dl(e.metrics,"recall");if(t===void 0){const n=Object.entries(e.metrics??{});return n.length===0?null:v.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:n.map(([r,s])=>v.jsxs("span",{className:"eval-metric",title:r,children:[v.jsx("span",{className:"eval-metric-name",children:r}),v.jsx("span",{className:"eval-metric-value",children:String(s)})]},r))})}return v.jsxs("div",{className:"eval-metrics","aria-label":"Eval metrics",children:[v.jsxs("span",{className:"eval-metric eval-metric-recall",title:"recall",children:[v.jsx("span",{className:"eval-metric-name",children:"recall"}),v.jsx("span",{className:"eval-metric-value",children:t})]}),Object.entries(e.metrics??{}).filter(([n])=>n!=="recall"&&n!=="matched"&&n!=="missing").map(([n,r])=>v.jsxs("span",{className:"eval-metric",title:n,children:[v.jsx("span",{className:"eval-metric-name",children:n}),v.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))]})}function TV({case:e}){const t=dl(e.metrics,"matched"),n=dl(e.metrics,"missing");return t===void 0&&n===void 0?null:v.jsxs("div",{className:"eval-case-recall-detail",children:[t!==void 0?`matched=[${t}]`:null,t!==void 0&&n!==void 0?" ":null,n!==void 0?`missing=[${n}]`:null]})}function _V({run:e}){const t=[...e.cases].reverse().find(r=>wV(r)&&dl(r.metrics,"recall")!==void 0),n=dl(t?.metrics,"recall")??[...e.cases].map(r=>dl(r.metrics,"recall")).find(r=>r!==void 0);return n===void 0?null:v.jsxs("span",{className:"eval-run-recall",title:"Suite recall",children:[v.jsx("span",{className:"eval-run-recall-label",children:"recall"}),v.jsx("span",{className:"eval-run-recall-value",children:n})]})}const RV={RunSummary:_V,CaseMetrics:EV,CaseExtras:TV},CV=Object.freeze(Object.defineProperty({__proto__:null,agentName:SV,default:RV},Symbol.toStringTag,{value:"Module"})),AV=Object.assign({"../../../../../../factory/vulnerability-scanner/agent/playground/evals.tsx":CV});function NV(e){return/\/(?:examples|factory)\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const kO=new Map;for(const[e,t]of Object.entries(AV)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=NV(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)kO.set(a,t.default)}function OV(e){if(!(e===void 0||e.trim()===""))return kO.get(e.trim())}function SO(e,t=200){const[n,r]=x.useState(e);return x.useEffect(()=>{if(e){r(!0);return}if(!n)return;const s=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(s)},[e,n,t]),e||n}const MV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench"},IV={user:"User message",agent:"Assistant message",think:"Thinking",tool:"Tool call"};function DV({row:e}){const[t,n]=x.useState(!1),r=e.body!==void 0&&e.body.length>0||e.toolArgs!==void 0||e.toolOutput!==void 0,s=t&&r,a=SO(s);return v.jsxs("div",{className:`eval-step eval-step-${e.kind}${e.error?" error":""}`,children:[v.jsxs("button",{type:"button",className:"eval-step-head",disabled:!r,onClick:()=>n(l=>!l),"aria-expanded":t,children:[v.jsx("span",{className:"eval-step-kind",title:IV[e.kind],children:v.jsx(Nn,{name:MV[e.kind],size:"sm",color:e.error?"red":"secondary"})}),v.jsx("span",{className:"eval-step-label",title:e.label,children:e.kind==="tool"&&e.toolName!==void 0?e.toolName:e.label}),e.ms!=null&&e.ms>0?v.jsx("span",{className:"eval-step-ms",children:hi(e.ms)}):null,r?v.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:v.jsx(Nn,{name:"chevron-right",size:10})}):null]}),a?v.jsx("div",{className:s?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:v.jsxs("div",{className:"eval-step-detail",children:[e.kind==="tool"&&e.toolArgs!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"args"}),v.jsx("pre",{children:Tl(e.toolArgs)})]}):null,e.kind==="tool"&&e.toolOutput!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:e.error?"error":"result"}),v.jsx("pre",{children:typeof e.toolOutput=="string"?e.toolOutput:Tl(e.toolOutput)})]}):null,e.kind!=="tool"&&e.body!==void 0?v.jsx("div",{className:"eval-step-block",children:v.jsx("pre",{children:e.body})}):null,e.kind==="tool"&&e.body!==void 0&&e.toolOutput===void 0?v.jsx("div",{className:"eval-step-block",children:v.jsx("pre",{children:e.body})}):null]})}):null]})}function zV({sessionId:e,live:t}){const[n,r]=x.useState([]),[s,a]=x.useState(null),[l,c]=x.useState(!0),[p,d]=x.useState(!1),h=x.useRef(null);x.useEffect(()=>{let g=!1;const y=new AbortController;return c(!0),a(null),r([]),d(!1),(async()=>{let k=-1;try{const w=await ut.api.eventsText(e);if(g)return;if(w.ok){const _=await w.text();if(g)return;const E=Jy(_);for(const R of E)typeof R.index=="number"&&R.index>k&&(k=R.index);r(E)}}catch(w){g||a(w instanceof Error?w.message:String(w))}finally{g||c(!1)}if(!(!t||g)){d(!0);try{const w=await ut.api.streamFetch(e,k+1,y.signal);if(!w.ok||!w.body){g||(a(`Stream failed (${w.status})`),d(!1));return}const _=w.body.getReader(),E=new TextDecoder;let R="";for(;;){const{done:T,value:C}=await _.read();if(T||g)break;R+=E.decode(C,{stream:!0});const A=R.split(`
35
+ `);R=A.pop()??"";const N=[];for(const I of A){const H=I.trim();if(H)try{const $=JSON.parse(H);N.push($),typeof $.index=="number"&&$.index>k&&(k=$.index)}catch{}}N.length>0&&!g&&r(I=>[...I,...N])}}catch(w){!g&&!(w instanceof DOMException&&w.name==="AbortError")&&a(w instanceof Error?w.message:String(w))}finally{g||d(!1)}}})(),()=>{g=!0,y.abort()}},[e,t]),x.useEffect(()=>{t&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,t]);const m=x.useMemo(()=>xO(n),[n]);return l&&n.length===0?v.jsxs("div",{className:"eval-trace",children:[v.jsx("span",{className:"spin"})," Loading session trace…"]}):s!==null&&n.length===0?v.jsx("div",{className:"eval-error",children:s}):m.turns.length===0?v.jsx("div",{className:"eval-trace",children:v.jsx("div",{className:"eval-trace-empty",children:t?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"spin"})," Waiting for first events…"]}):"No events in this session."})}):v.jsxs("div",{className:"eval-trace",children:[v.jsxs("div",{className:"eval-trace-meta",children:[m.eventCount," events · ",m.totalTools," tool",m.totalTools===1?"":"s",m.failedTools>0?` · ${m.failedTools} failed`:"",t||p?v.jsxs(v.Fragment,{children:[" · ",v.jsxs("span",{className:"eval-live",children:[v.jsx("span",{className:"spin"})," live"]})]}):null]}),s!==null?v.jsx("div",{className:"eval-error",children:s}):null,m.turns.map((g,y)=>v.jsxs("div",{className:"eval-turn",children:[v.jsxs("div",{className:"eval-turn-head",children:["Turn ",y+1,g.failed?" · failed":"",g.wallMs!=null&&g.wallMs>0?` · ${hi(g.wallMs)}`:""]}),g.rows.map((k,w)=>v.jsx(DV,{row:k},`${g.turnId}-${w}-${k.kind}`))]},g.turnId)),v.jsx("div",{ref:h})]})}function LV({c:e}){const t=e.inputs??[],n=e.toolCalls??[];return t.length>0||e.finalText!==void 0||n.length>0||e.tools!==void 0&&e.tools.length>0?v.jsxs("div",{className:"eval-io",children:[v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Inputs"}),t.length===0?v.jsx("div",{className:"eval-trace-empty",children:"None yet"}):t.map((s,a)=>v.jsxs("div",{className:"eval-step-block",children:[v.jsxs("div",{className:"eval-step-block-label",children:["message ",t.length>1?a+1:""]}),v.jsx("pre",{children:s})]},`in-${a}`))]}),v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Tool calls"}),n.length===0?v.jsx("div",{className:"eval-trace-empty",children:e.tools&&e.tools.length>0?e.tools.join(", "):"None"}):n.map((s,a)=>v.jsxs("div",{className:`eval-step eval-step-tool${s.isError?" error":""}`,children:[v.jsxs("div",{className:"eval-step-head",style:{cursor:"default"},children:[v.jsx("span",{className:"eval-step-kind",title:"Tool call",children:v.jsx(Nn,{name:"wrench",size:"sm",color:s.isError?"red":"secondary"})}),v.jsx("span",{className:"eval-step-label",children:s.toolName})]}),v.jsxs("div",{className:"eval-step-detail",children:[s.args!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"args"}),v.jsx("pre",{children:Tl(s.args)})]}):null,s.output!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:s.isError?"error":"result"}),v.jsx("pre",{children:typeof s.output=="string"?s.output:Tl(s.output)})]}):null]})]},`tc-${a}-${s.toolName}`))]}),v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Output"}),e.finalText!==void 0&&e.finalText!==""?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"final reply"}),v.jsx("pre",{children:e.finalText})]}):v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for reply…":"No final reply"})]})]}):v.jsx("div",{className:"eval-io",children:v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for inputs / outputs…":"No captured inputs or outputs."})})}function jV({c:e,batchRunning:t,customization:n}){const[r,s]=x.useState(!1),[a,l]=x.useState(!1),c=r||a,p=SO(c),d=x.useRef({io:!1,expanded:!1});c&&(d.current={io:a,expanded:r});const h=c?a:d.current.io,m=c?r:d.current.expanded,g=e.status==="pending"?"Queued":e.status==="running"?"Running":e.ok===!0?"Pass":"Fail",y=e.status==="done"?e.ok===!0?"success":"danger":e.status==="running"?"accent":"neutral",k=e.sessionId!==void 0||e.status==="done"||e.status==="running",w=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0,_=n?.CaseMetrics,E=n?.CaseExtras;return v.jsxs("div",{className:`eval-case${r||a?" expanded":""}`,children:[v.jsxs("div",{className:"eval-case-head",children:[v.jsxs("button",{type:"button",className:"eval-id-btn",disabled:!k,"aria-expanded":r,title:k?r?"Collapse":"Expand live trace":void 0,onClick:()=>s(R=>!R),children:[v.jsx("span",{className:r?"eval-chevron open":"eval-chevron",children:v.jsx(Nn,{name:"chevron-right",size:10})}),v.jsx(ra,{variant:y,size:"sm",children:g}),v.jsx("span",{className:"eval-id",children:e.id})]}),e.durationMs!==void 0?v.jsxs("span",{className:"eval-dur",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null,w?v.jsx(zn,{variant:a?"secondary":"ghost",size:"sm",onClick:()=>l(R=>!R),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?v.jsxs(v.Fragment,{children:[v.jsx(zn,{variant:"ghost",size:"sm",onClick:()=>{ut.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),v.jsx(zn,{variant:"ghost",size:"sm",onClick:()=>{ut.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]}),e.description!==void 0?v.jsx("div",{className:"eval-desc",children:e.description}):null,_!==void 0?v.jsx(_,{case:e,batchRunning:t}):v.jsx(kV,{case:e}),E!==void 0?v.jsx(E,{case:e,batchRunning:t}):null,e.error!==void 0?v.jsxs("div",{className:"eval-error",children:["error: ",e.error]}):null,e.assertions!==void 0&&e.assertions.length>0?v.jsx("ul",{className:"eval-assertions",children:e.assertions.map(R=>v.jsxs("li",{className:R.passed?"":"fail",children:[R.passed?"✓":"✗"," ",R.name,R.detail!==void 0?` (${R.detail})`:""]},`${R.name}-${R.passed}-${R.detail??""}`))}):null,e.logs!==void 0&&e.logs.length>0?v.jsx("ul",{className:"eval-assertions eval-logs",children:e.logs.map((R,T)=>v.jsx("li",{children:R},`${T}:${R}`))}):null,p?v.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?v.jsx(LV,{c:e}):null,m&&e.sessionId!==void 0?v.jsx(zV,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,m&&e.sessionId===void 0?v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"spin"})," ",AT(e)?"Aggregating sibling cases…":"Waiting for session…"]}):AT(e)?v.jsxs(v.Fragment,{children:["Suite summary (no agent session)",e.finalText!==void 0?v.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]}):v.jsxs(v.Fragment,{children:["No session for this case",e.finalText!==void 0?v.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]})}):null]}):null]})}function AT(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function NT({runs:e,selectedId:t}){return e.length===0?null:v.jsxs("div",{className:"eval-history","aria-label":"Recent eval runs",children:[v.jsx("div",{className:"eval-history-label",children:"Recent runs"}),v.jsx("div",{className:"eval-history-list",children:e.map(n=>{const r=n.runId===t,s=Hh(n.finishedAt??n.startedAt);return v.jsxs("button",{type:"button",className:r?"eval-history-chip active":"eval-history-chip",title:n.runId,onClick:()=>{ut.selectEvalRun(n.runId)},children:[n.status==="running"?v.jsx("span",{className:"spin"}):null,v.jsx("span",{className:"eval-history-chip-id",children:n.runId}),v.jsxs("span",{className:"eval-history-chip-meta",children:[n.summary.passed,"/",n.summary.total,s!==null?` · ${s}`:""]})]},n.runId)})})]})}function PV(){const e=lt(g=>g.evalRun),t=lt(g=>g.evalRuns),n=lt(g=>g.evalCases),r=lt(g=>g.evalConfig),s=lt(g=>g.meta.name),a=x.useMemo(()=>OV(s),[s]),l=e?.status==="running",c=a?.RunSummary;if(e===null)return v.jsxs("div",{className:"pg-evals",children:[v.jsx(NT,{runs:t,selectedId:void 0}),v.jsxs("div",{className:"eval-empty",children:[v.jsx("p",{children:"No eval run selected."}),v.jsxs("p",{className:"eval-hint",children:[n.length>0?`${n.length} case${n.length===1?"":"s"} discovered.`:"No evals/ cases found for this agent.",r?.maxConcurrency!==void 0?` Concurrency: ${r.maxConcurrency}.`:""]}),n.length>0?v.jsx("p",{className:"eval-hint",children:r?.durableRuns===!0?`Runs persist via the agent/storage.ts evals table (keeps last ${r.maxPlaygroundRuns??20}).`:`Runs stay in memory only (last ${r?.maxPlaygroundRuns??20}); lost when serve exits. Add an evals table to agent/storage.ts to keep them.`}):null,n.length>0?v.jsx(zn,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{ut.startEvalRun()},children:"Run all"}):null]})]});const{summary:p,status:d}=e,h=d==="failed"||d==="cancelled"?"danger":l?"accent":"success",m=d==="failed"?"Failed":d==="cancelled"?"Cancelled":l?"Running":"Completed";return v.jsxs("div",{className:"pg-evals",children:[v.jsx(NT,{runs:t,selectedId:e.runId}),v.jsxs("div",{className:"eval-summary",children:[v.jsx(ra,{variant:h,size:"sm",children:m}),v.jsx("span",{className:"eval-id",title:"Eval ID",children:e.runId}),v.jsxs("span",{children:[p.done,"/",p.total," done · ",p.passed," passed ·"," ",p.failed," failed"]}),c!==void 0?v.jsx(c,{run:e}):null,l?v.jsx("span",{className:"spin"}):null,e.error!==void 0?v.jsx("span",{className:"eval-error",children:e.error}):null,v.jsxs("div",{className:"eval-actions",children:[l?v.jsx(zn,{variant:"secondary",size:"sm",onClick:()=>{ut.cancelEvalRun(e.runId)},children:"Cancel"}):null,n.length>0?v.jsx(zn,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{ut.startEvalRun()},children:"Run all"}):null]})]}),v.jsx("div",{className:"eval-case-list",children:e.cases.map(g=>v.jsx(jV,{c:g,batchRunning:l,customization:a},g.id))})]})}function Wa(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,p,d;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((k,w)=>r[w]!==k)))return s;r=m;let y;if(n.key&&((p=n.debug)!=null&&p.call(n))&&(y=Date.now()),s=t(...m),n.key&&((d=n.debug)!=null&&d.call(n))){const k=Math.round((Date.now()-h)*100)/100,w=Math.round((Date.now()-y)*100)/100,_=w/16,E=(R,T)=>{for(R=String(R);R.length<T;)R=" "+R;return R};console.info(`%c⏱ ${E(w,5)} /${E(k,5)} ms`,`
36
+ font-size: .6rem;
37
+ font-weight: bold;
38
+ color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(s),a=!1,s}return l.updateDeps=c=>{r=c},l}function OT(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const $V=(e,t)=>Math.abs(e-t)<1.01,BV=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},MT=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},FV=e=>e,UV=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},qV=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:p}=l;t({width:Math.round(c),height:Math.round(p)})};if(s(MT(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const p=l[0];if(p?.borderBoxSize){const d=p.borderBoxSize[0];if(d){s({width:d.inlineSize,height:d.blockSize});return}}s(MT(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},IT={passive:!0},DT=typeof window>"u"?!0:"onscrollend"in window,HV=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&DT?()=>{}:BV(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:m,isRtl:g}=e.options;s=m?n.scrollLeft*(g&&-1||1):n.scrollTop,a(),t(s,h)},c=l(!0),p=l(!1);n.addEventListener("scroll",c,IT);const d=e.options.useScrollendEvent&&DT;return d&&n.addEventListener("scrollend",p,IT),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",p)}},GV=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},VV=(e,{adjustments:t=0,behavior:n},r)=>{var s,a;const l=e+t;(a=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class KV{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var n,r,s;return((s=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{const l=()=>{const c=a.target,p=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(p)&&this.resizeItem(p,this.options.measureElement(c,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var a;return(a=r())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=r())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:FV,rangeExtractor:UV,onChange:()=>{},measureElement:GV,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Wa(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,a=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(s.has(c.lane))continue;const p=a.get(c.lane);if(p==null||c.end>p.end?a.set(c.lane,c):c.end<p.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=Wa(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=Wa(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},p)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const g of this.laneAssignments.keys())g>=n&&this.laneAssignments.delete(g);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(g=>{this.itemSizeCache.set(g.key,g.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,d),m=new Array(c).fill(void 0);for(let g=0;g<d;g++){const y=h[g];y&&(m[y.lane]=g)}for(let g=d;g<n;g++){const y=a(g),k=this.laneAssignments.get(g);let w,_;if(k!==void 0&&this.options.lanes>1){w=k;const C=m[w],A=C!==void 0?h[C]:void 0;_=A?A.end+this.options.gap:r+s}else{const C=this.options.lanes===1?h[g-1]:this.getFurthestMeasurement(h,g);_=C?C.end+this.options.gap:r+s,w=C?C.lane:g%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(g,w)}const E=p.get(y),R=typeof E=="number"?E:this.options.estimateSize(g),T=_+R;h[g]={index:g,start:_,size:R,end:T,key:y,lane:w},m[w]=g}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Wa(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?ZV({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Wa(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,a,l)=>a===null||l===null?[]:n({startIndex:a,endIndex:l,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,s-a),c=Math.min(this.options.count-1,s+a);return n>=l&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((l,c)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(c))});return}const r=this.indexFromElement(n),s=this.options.getItemKey(r),a=this.elementsCache.get(s);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(s,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var s;const a=this.measurementsCache[n];if(!a)return;const l=this.itemSizeCache.get(a.key)??a.size,c=r-l;c!==0&&(((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,c,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,r)),this.notify(!1))},this.getVirtualItems=Wa(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],p=r[c];s.push(p)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return OT(r[wO(0,r.length-1,s=>OT(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+a?"end":"start"),r==="center"?n+=(s-a)/2:r==="end"&&(n-=a);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getSize(),a=this.getScrollOffset(),l=this.measurementsCache[n];if(!l)return;if(r==="auto")if(l.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(l.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,l.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:s="auto"}={})=>{const a=this.getOffsetForAlignment(n,r),l=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:s="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,r);if(!a)return;const[l,c]=a,p=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:p,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const a=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&a.some(c=>c===null);){const c=r[l];a[c.lane]===null&&(a[c.lane]=c.end),l--}s=Math.max(...a.filter(c=>c!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,a=1,l=s!==this.scrollState.lastTargetOffset;if(!l&&$V(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.scrollState=null;return}}else this.scrollState.stableFrames=0,l&&(this.scrollState.lastTargetOffset=s,this.scrollState.behavior="auto",this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const wO=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,a=n(s);if(a<r)e=s+1;else if(a>r)t=s-1;else return s}return e>0?e-1:0};function ZV({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=p=>e[p].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=wO(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const p=Array(r).fill(0);for(;c<s&&p.some(h=>h<n+t);){const h=e[c];p[h.lane]=h.end,c++}const d=Array(r).fill(n+t);for(;l>=0&&d.some(h=>h>=n);){const h=e[l];d[h.lane]=h.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const zT=typeof document<"u"?x.useLayoutEffect:x.useEffect;function WV({useFlushSync:e=!0,...t}){const n=x.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?Ri.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=x.useState(()=>new KV(r));return s.setOptions(r),zT(()=>s._didMount(),[]),zT(()=>s._willUpdate()),s}function EO(e){return WV({observeElementRect:qV,observeElementOffset:HV,scrollToFn:VV,...e})}function YV(){const[e,t]=x.useState([]),[n,r]=x.useState(null),s=x.useRef(-1),a=x.useRef(null),l=e.length,c=EO({count:l,getScrollElement:()=>a.current,estimateSize:()=>18,overscan:24});return x.useEffect(()=>{let p=!1;const d=async()=>{const m=await ut.api.logs(s.current);if(p)return;if(!m.ok||m.body===null){r(`logs failed (${m.status})`);return}r(null);const g=m.body.entries??[];g.length>0&&(s.current=m.body.nextAfter,t(y=>{const k=y.concat(g);return k.length>2e3?k.slice(k.length-2e3):k}))};d();const h=window.setInterval(()=>{d()},1e3);return()=>{p=!0,window.clearInterval(h)}},[]),x.useEffect(()=>{l>0&&c.scrollToIndex(l-1,{align:"end"})},[l,c]),n!==null&&l===0?v.jsx("div",{className:"pg-raw",children:v.jsx(yc,{className:"pg-empty",message:n})}):l===0?v.jsx("div",{className:"pg-raw",children:v.jsx(yc,{className:"pg-empty",message:"Waiting for agent logs… webhook captures and session activity appear here."})}):v.jsxs("div",{className:"pg-raw",children:[v.jsx("div",{className:"head",children:"Agent logs"}),v.jsx("div",{className:"raw-lines",ref:a,children:v.jsx("div",{style:{height:c.getTotalSize(),position:"relative",width:"100%"},children:c.getVirtualItems().map(p=>{const d=e[p.index];if(d===void 0)return null;const h=d.at.slice(11,19);return v.jsxs("div",{"data-index":p.index,ref:c.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${p.start}px)`},children:[v.jsxs("span",{className:"elog-time",children:[h," "]}),v.jsx("span",{children:d.line})]},p.key)})})})]})}const TO=48;function XV(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function QV(e,t=TO){return XV(e)<=t}function Vb(e){e.scrollTop=e.scrollHeight}function _O(e){const{contentKey:t,latchKey:n,thresholdPx:r=TO}=e,s=x.useRef(null),a=x.useRef(!0);return x.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=QV(l,r)};return l.addEventListener("scroll",c,{passive:!0}),()=>l.removeEventListener("scroll",c)},[r,t,n]),x.useLayoutEffect(()=>{if(n===void 0)return;a.current=!0;const l=s.current;l&&Vb(l)},[n]),x.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&Vb(l)},[t]),x.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&Vb(l)};c();const p=new Set,d=new ResizeObserver(c),h=y=>{p.has(y)||(p.add(y),d.observe(y))},m=y=>{h(y);for(const k of y.children)m(k)};m(l);const g=new MutationObserver(y=>{for(const k of y)k.addedNodes.forEach(w=>{w instanceof Element&&m(w)});c()});return g.observe(l,{childList:!0,subtree:!0}),()=>{d.disconnect(),g.disconnect()}},[t,n]),{scrollRef:s}}function JV(){const e=lt(a=>a.traceEvents),t=lt(a=>a.current),n=e.length,{scrollRef:r}=_O({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=EO({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?v.jsx("div",{className:"pg-raw",children:v.jsx(yc,{className:"pg-empty",message:"Select a session or Open trace to see the raw event stream."})}):v.jsxs("div",{className:"pg-raw",children:[v.jsx("div",{className:"head",children:"Raw NDJSON stream"}),v.jsx("div",{className:"raw-lines",ref:r,children:v.jsx("div",{style:{height:s.getTotalSize(),position:"relative",width:"100%"},children:s.getVirtualItems().map(a=>{const l=e[a.index];return v.jsxs("div",{"data-index":a.index,ref:s.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${a.start}px)`},children:[v.jsx("span",{children:`[${l.index??a.index}] `}),v.jsx("span",{className:"etype",children:l.type}),v.jsx("span",{children:` ${sr(l.data,240)}`})]},a.key)})})})]})}const RO="agent-serve.playground.sidebarWidth",Kb=280,nv=200,rv=560,eK={github:"logo-github",slack:"logo-slack"};function xp(e){return Math.min(rv,Math.max(nv,e))}function tK(){try{const e=localStorage.getItem(RO);if(e===null)return Kb;const t=Number.parseInt(e,10);return Number.isFinite(t)?xp(t):Kb}catch{return Kb}}function nK({channelId:e,mode:t,running:n}){if(n)return v.jsx("span",{className:"spin"});const r=eK[e]??(t==="task"?"clock":null);return r===null?null:v.jsx("span",{className:"session-mark",title:e,children:v.jsx(Nn,{name:r,size:"sm",color:"secondary"})})}function rK({summary:e}){const n=lt(c=>c.current)?.sessionId===e.sessionId,r=`${e.turnCount} turn${e.turnCount===1?"":"s"}`,s=Hh(e.updatedAt),a=(()=>{if(!e.updatedAt)return null;const c=new Date(e.updatedAt);return Number.isNaN(c.getTime())?`Last turn ${e.updatedAt}`:`Last turn ${c.toLocaleString()}`})(),l=[e.sessionId,`${e.channelId} · ${r}`,a].filter(Boolean).join(`
39
+ `);return v.jsxs("button",{type:"button",className:n?"session-item active":"session-item",onClick:()=>{ut.selectSession(e),ut.setView("chat")},title:l,children:[v.jsx(nK,{channelId:e.channelId,mode:e.mode,running:e.running===!0}),v.jsx("span",{className:e.title?"name":"name name-id",children:e.title||e.sessionId}),e.externalUrl?v.jsx("a",{className:"ext-link",href:e.externalUrl,target:"_blank",rel:"noopener noreferrer",title:"Open in Slack",onClick:c=>c.stopPropagation(),children:v.jsx(Nn,{name:"link-external",size:"xs",color:"tertiary"})}):null,s!==null?v.jsx("span",{className:"session-when",children:s}):null]})}function iK(e){try{return localStorage.getItem(`agent-serve.playground.section.${e}`)==="1"}catch{return!1}}function CO({id:e,label:t,actions:n,children:r}){const[s,a]=x.useState(()=>iK(e)),l=()=>{a(c=>{const p=!c;try{localStorage.setItem(`agent-serve.playground.section.${e}`,p?"1":"0")}catch{}return p})};return v.jsxs("div",{className:"side-section",children:[v.jsxs("div",{className:s?"side-head":"side-head collapsed",children:[v.jsxs("button",{type:"button",className:"side-head-toggle","aria-expanded":s,onClick:l,children:[v.jsx("span",{className:"side-head-label",children:t}),v.jsx("span",{className:"side-head-chevron",children:v.jsx(Nn,{name:"chevron-right",size:10})})]}),n!==void 0?v.jsx("span",{className:"actions",children:n}):null]}),v.jsx("div",{className:s?"side-section-body":"side-section-body collapsed","aria-hidden":!s,inert:s?void 0:!0,children:r})]})}function np({icon:e,label:t,onClick:n,title:r}){return v.jsxs("button",{type:"button",className:"side-nav-item",onClick:n,title:r,children:[v.jsx(Nn,{name:e,size:"base",color:"secondary"}),v.jsx("span",{className:"label",children:t})]})}function sK(){const e=lt(r=>r.info),t=lt(r=>r.meta.dev),n=e?.schedules||[];return n.length===0?null:v.jsx(CO,{id:"schedules",label:"Schedules",children:v.jsx("div",{className:"schedule-list",children:n.map(r=>v.jsxs("div",{className:"schedule-item",children:[v.jsxs("div",{children:[v.jsx("div",{className:"schedule-name",children:r.name}),v.jsx("div",{className:"cron",children:r.cron})]}),v.jsx(zn,{variant:"ghost",size:"sm",disabled:!t,title:t?void 0:"Start the server with --dev to dispatch schedules by hand",onClick:()=>{ut.dispatchSchedule(r.name)},children:"Dispatch"})]},r.name))})})}function oK(e){return e==="running"?"Running":e==="failed"?"Failed":e==="cancelled"?"Cancelled":"Done"}function aK({run:e}){const n=lt(p=>p.evalRun?.runId)===e.runId,{summary:r,status:s}=e,a=Hh(e.finishedAt??e.startedAt),l=`${r.passed}/${r.total}`,c=[e.runId,oK(s),`${r.done}/${r.total} done · ${r.passed} passed · ${r.failed} failed`,e.startedAt].join(`
40
+ `);return v.jsxs("button",{type:"button",className:n?"eval-run-item active":"eval-run-item",onClick:()=>{ut.selectEvalRun(e.runId)},title:c,children:[v.jsxs("span",{className:"eval-run-item-main",children:[s==="running"?v.jsx("span",{className:"spin"}):null,v.jsx("span",{className:"eval-run-item-id",children:e.runId})]}),v.jsxs("span",{className:"eval-run-item-meta",children:[v.jsx("span",{className:"eval-run-item-counts",children:l}),a!==null?v.jsx("span",{className:"eval-run-item-time",children:a}):null]})]})}function lK(){const e=lt(s=>s.evalCases),t=lt(s=>s.evalRun),n=lt(s=>s.evalRuns),r=t?.status==="running";return e.length===0&&t===null&&n.length===0?null:v.jsxs(CO,{id:"evals",label:"Evals",actions:v.jsxs(v.Fragment,{children:[v.jsx(zn,{variant:"ghost",size:"sm",disabled:r||e.length===0,title:r?"Eval run in progress":void 0,onClick:()=>{ut.startEvalRun()},children:"Run all"}),t!==null||n.length>0?v.jsx(zn,{variant:"ghost",size:"sm",onClick:()=>ut.setView("evals"),children:"Results"}):null]}),children:[e.length===0?v.jsx("div",{className:"eval-side-empty",children:"No evals/ cases found"}):v.jsx("div",{className:"schedule-list",children:e.map(s=>{const a=s.id.endsWith("/overall")||(s.tags?.includes("summary")??!1);return v.jsxs("div",{className:"schedule-item",children:[v.jsxs("div",{children:[v.jsx("div",{className:"eval-side-id",children:s.id}),s.tags!==void 0&&s.tags.length>0?v.jsx("div",{className:"cron",children:s.tags.join(", ")}):null]}),v.jsx(zn,{variant:"ghost",size:"sm",disabled:r,title:a?`Runs full ${s.fileId} suite (summary needs siblings)`:void 0,onClick:()=>{ut.startEvalRun([s.id])},children:"Run"})]},s.id)})}),n.length>0?v.jsxs("div",{className:"eval-recent-runs",children:[v.jsx("div",{className:"eval-recent-runs-label",children:"Recent runs"}),v.jsx("div",{className:"eval-run-list",children:n.map(s=>v.jsx(aK,{run:s},s.runId))})]}):null]})}function uK(){const e=lt(R=>R.meta.name),t=lt(R=>R.meta.dev),n=lt(R=>R.meta.indexPath),r=lt(R=>R.health),s=lt(R=>R.info),a=lt(R=>R.sessions),l=x.useRef(null),[c,p]=x.useState(tK),[d,h]=x.useState(!1),[m,g]=x.useState(""),y=x.useRef(c);y.current=c;const k=x.useMemo(()=>{const R=m.trim().toLowerCase();return R===""?a:a.filter(T=>T.sessionId.toLowerCase().includes(R))},[a,m]),w=x.useCallback(R=>{R?.preventDefault();const T=m.trim();if(T==="")return;const C=a.find(A=>A.sessionId===T);if(C!==void 0){ut.selectSession(C),ut.setView("chat");return}if(k.length===1){ut.selectSession(k[0]),ut.setView("chat");return}k.length===0&&ut.openSessionById(T)},[m,a,k]);x.useEffect(()=>{try{localStorage.setItem(RO,String(c))}catch{}},[c]);const _=x.useCallback(R=>{R.preventDefault();const T=R.currentTarget,C=R.clientX,A=y.current;T.setPointerCapture(R.pointerId),h(!0),document.body.classList.add("pg-resizing-sidebar");const N=H=>{p(xp(A+(H.clientX-C)))},I=H=>{T.releasePointerCapture(H.pointerId),T.removeEventListener("pointermove",N),T.removeEventListener("pointerup",I),T.removeEventListener("pointercancel",I),h(!1),document.body.classList.remove("pg-resizing-sidebar")};T.addEventListener("pointermove",N),T.addEventListener("pointerup",I),T.addEventListener("pointercancel",I)},[]),E=R=>{if(!R)return;const T=new FileReader;T.onload=()=>{ut.loadLocalTrace(String(T.result||""),R.name)},T.readAsText(R)};return v.jsxs("div",{className:"pg-sidebar",style:{width:c},children:[v.jsx("div",{className:d?"pg-sidebar-resizer dragging":"pg-sidebar-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar","aria-valuenow":c,"aria-valuemin":nv,"aria-valuemax":rv,tabIndex:0,onPointerDown:_,onKeyDown:R=>{R.key==="ArrowLeft"?(R.preventDefault(),p(T=>xp(T-16))):R.key==="ArrowRight"?(R.preventDefault(),p(T=>xp(T+16))):R.key==="Home"?(R.preventDefault(),p(nv)):R.key==="End"&&(R.preventDefault(),p(rv))}}),v.jsxs("div",{className:"side-nav",children:[v.jsx(np,{icon:"pencil-square",label:"New Chat",onClick:()=>ut.deselectSession()}),v.jsx(np,{icon:"folder-open",label:"Open Trace",title:"Open a saved events.ndjson trace",onClick:()=>l.current?.click()}),v.jsx(np,{icon:"squares",label:"Agent Surface",title:"Tools, skills, connections, and channels",onClick:()=>ut.setDrawerOpen(!0)}),n?v.jsx(np,{icon:"grid",label:"All Agents",title:"Back to the agents index",onClick:()=>{window.location.href=n}}):null]}),v.jsxs("div",{className:"side-section",children:[v.jsx("div",{className:"side-head",children:v.jsx("span",{className:"side-head-label",children:"Sessions"})}),v.jsx("form",{className:"session-search",onSubmit:w,children:v.jsx(Uh,{type:"search",size:"base","aria-label":"Search by session ID",placeholder:"Search sessions",startIcon:"magnifying-glass",value:m,onChange:R=>g(R.target.value),title:"Filter the list, or press Enter to open a session by ID"})})]}),v.jsx("input",{ref:l,type:"file",accept:".ndjson,application/x-ndjson,application/json,.json",style:{display:"none"},onChange:R=>{E(R.target.files?.[0]),R.target.value=""}}),v.jsxs("div",{className:"session-list",children:[k.map(R=>v.jsx(rK,{summary:R},R.sessionId)),m.trim()!==""&&k.length===0?v.jsx("div",{className:"session-search-empty",children:"No matching sessions. Press Enter to open by ID."}):null]}),v.jsx(sK,{}),v.jsx(lK,{}),v.jsxs("div",{className:"side-footer",children:[v.jsxs("span",{className:"side-avatar","aria-hidden":"true",children:[(e||"a").slice(0,1).toUpperCase(),v.jsx("span",{className:`dot ${r}`})]}),v.jsxs("span",{className:"side-footer-main",children:[v.jsx("span",{className:"side-footer-name",children:e}),v.jsx("span",{className:"side-footer-sub",children:oO(s?.model)})]}),t?v.jsx(ra,{variant:"warn",size:"sm",children:"dev"}):null]})]})}function cK(){const e=lt(t=>t.toast);return e?v.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const LT=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"logs",label:"Logs"},{value:"evals",label:"Evals"},{value:"abs",label:"A/Bs"}],AO="(max-width: 640px)";function fK(e){const t=window.matchMedia(AO);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function dK(){return x.useSyncExternalStore(fK,()=>window.matchMedia(AO).matches)}function pK(){const e=lt(T=>T.barTitle),t=lt(T=>T.barId),n=lt(T=>T.externalUrl),r=lt(T=>T.current),s=lt(T=>T.view),a=lt(T=>T.authToken),l=lt(T=>T.aliasHosted),c=lt(T=>T.embedded),p=lt(T=>T.bridged),d=lt(T=>T.sidebarOpen),h=lt(T=>T.sessions),m=lt(T=>T.evalNavReturn),g=lt(T=>T.evalRun),y=dK(),k=r?.sessionId??null,w=m&&s!=="evals"&&g!==null,_=c&&!d?IG(h):0,E=async()=>{if(k)try{const T=await ut.api.eventsText(k);if(!T.ok){ut.toast(`Download failed (${T.status})`);return}const C=await T.blob(),A=URL.createObjectURL(C),N=document.createElement("a");N.href=A,N.download=`${k}.events.ndjson`,document.body.appendChild(N),N.click(),N.remove(),URL.revokeObjectURL(A)}catch(T){ut.toast(`Download failed: ${T instanceof Error?T.message:String(T)}`)}},R=y?v.jsx(cH,{size:"base","aria-label":"Visualization mode",value:s,onValueChange:T=>ut.setView(T??"chat"),options:LT}):v.jsx(B1,{size:"sm",variant:"compact",value:s,onValueChange:T=>ut.setView(T),"aria-label":"Visualization mode",children:LT.map(T=>v.jsx(B1.Item,{value:T.value,children:T.label},T.value))});return v.jsxs("div",{className:"pg-topbar",children:[c?v.jsxs("span",{className:"pg-sidebar-toggle",children:[v.jsx(po,{icon:"layout-sidebar-left",size:"sm","aria-label":d?"Hide sessions":_>0?`Show sessions (${_} running)`:"Show sessions",onClick:()=>ut.setSidebarOpen(!d)}),_>0?v.jsx("span",{className:"pg-sidebar-toggle-badge","aria-hidden":"true"}):null]}):null,w?v.jsx(zn,{variant:"secondary",size:"sm",onClick:()=>ut.backToEvals(),title:"Return to eval results",children:"← Back to Evals"}):null,v.jsx("span",{className:"session-title",children:e}),t?v.jsx("span",{className:"session-id",children:t}):null,c?null:v.jsxs(v.Fragment,{children:[n?v.jsx("a",{className:"tlink",href:n,target:"_blank",rel:"noopener noreferrer",title:"Open the source conversation",children:"Open in Slack"}):null,k?v.jsx(zn,{variant:"ghost",size:"sm",onClick:()=>{E()},title:"Download this session's event log",children:"Download"}):null]}),v.jsx("span",{className:"grow"}),p?null:R,c&&(k!==null||n!==null)?v.jsxs(ju,{children:[v.jsx(ju.Trigger,{children:v.jsx(po,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),v.jsxs(ju.Content,{"aria-label":"Session actions",size:"sm",children:[n!==null?v.jsx(ju.Item,{onSelect:()=>window.open(n,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,k!==null?v.jsx(ju.Item,{onSelect:()=>{E()},children:"Download event log"}):null]})]}):null,l?null:v.jsx("div",{className:"pg-token",children:v.jsx(Uh,{type:"password",size:"base","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:T=>ut.setAuthToken(T.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const hK={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench"},NO={user:"User message",agent:"Assistant message",think:"Thinking",tool:"Tool call"};function mK(e){if(e.error)return"danger";switch(e.kind){case"user":return"accent";case"agent":return"success";default:return"neutral"}}function gK(e){if(e.startedAt!=null)return e.startedAt;let t=Number.POSITIVE_INFINITY;for(const n of e.rows){const r=n.startAt??n.at;r!=null&&r<t&&(t=r)}return Number.isFinite(t)?t:0}function bK(e,t){if(e.wallMs!=null&&e.wallMs>0)return e.wallMs;if(e.endedAt!=null&&e.endedAt>t)return e.endedAt-t;let n=0;for(const r of e.rows){const a=(r.startAt??r.at??t)+(r.ms!=null&&r.ms>0?r.ms:0);a-t>n&&(n=a-t)}return Math.max(n,1)}function yK(e,t,n,r,s){const a=e.startAt??e.at??r,l=Math.max(0,a-r),c=e.ms!=null&&e.ms>0?e.ms:e.ms===0?0:null,p=c===null||c===0,d=s*.012,h=p?d:Math.max(c,d),m=Math.max(0,Math.min(100,l/s*100)),g=Math.max(.9,Math.min(100-m,h/s*100));return{id:`${n}-${t}`,row:e,turnId:n,wallMs:s,startMs:l,durMs:h,trueDurMs:c,leftPct:m,widthPct:g,instant:p}}function OO(e){return e===null?"—":e===0?"instant":hi(e)}function cs({label:e,value:t}){return v.jsxs("div",{children:[v.jsx("dt",{children:e}),v.jsx("dd",{title:t,children:t})]})}function vK({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,p=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",d=n.body?.trim()||"",h=n.toolArgs!=null?Tl(n.toolArgs):"",m=n.toolOutput!=null?Tl(n.toolOutput):n.kind==="tool"&&d?d:"";return v.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[v.jsxs("div",{className:"trace-detail-head",children:[v.jsxs(ra,{variant:mK(n),size:"sm",children:[NO[n.kind],n.error?" · error":""]}),v.jsx("button",{type:"button",className:"link-btn",onClick:t,children:"Close"})]}),n.toolName?v.jsx("div",{className:"trace-detail-title",children:n.toolName}):null,n.kind!=="tool"&&d?v.jsx("pre",{className:"trace-detail-body",children:d}):null,n.kind!=="tool"&&!d&&n.label?v.jsx("div",{className:"trace-detail-label",children:n.label}):null,v.jsxs("dl",{className:"trace-detail-meta",children:[v.jsx(cs,{label:"Turn",value:r}),n.error?v.jsx(cs,{label:"Status",value:"error"}):null,v.jsx(cs,{label:"Start +",value:hi(s)}),v.jsx(cs,{label:"End +",value:hi(c)}),v.jsx(cs,{label:"Duration",value:OO(a)}),v.jsx(cs,{label:"% of turn",value:p}),v.jsx(cs,{label:"Started",value:wT(n.startAt)}),v.jsx(cs,{label:"Ended",value:wT(n.at)}),n.callId?v.jsx(cs,{label:"Call id",value:n.callId}):null]}),h?v.jsxs("div",{className:"trace-detail-section",children:[v.jsx("div",{className:"trace-detail-section-title",children:"Args"}),v.jsx("pre",{className:"trace-detail-body",children:h})]}):null,m?v.jsxs("div",{className:"trace-detail-section",children:[v.jsx("div",{className:"trace-detail-section-title",children:n.error?"Error":"Output"}),v.jsx("pre",{className:"trace-detail-body",children:m})]}):null]})}function xK({span:e,selected:t,onSelect:n}){const{row:r}=e,s=`${r.kind}${r.error?" error":""}`,a=OO(e.trueDurMs),l=e.widthPct>=8,c=r.depth??0;return v.jsxs("button",{type:"button",className:`wf-row ${s}${t?" selected":""}${c>0?" nested":""}`,onClick:n,"aria-pressed":t,style:c>0?{paddingLeft:`${8+c*14}px`}:void 0,children:[v.jsx("span",{className:"wf-kind",title:NO[r.kind],children:v.jsx(Nn,{name:hK[r.kind],size:"sm",color:r.error?"red":"secondary"})}),v.jsx("span",{className:"wf-name",title:r.label,children:c>0?`↳ ${r.label||"—"}`:r.label||"—"}),v.jsx("span",{className:"wf-track","aria-hidden":"true",children:v.jsx("span",{className:`wf-bar ${s}${e.instant?" instant":""}`,style:{left:`${e.leftPct}%`,width:`${e.widthPct}%`},children:l?v.jsx("span",{className:"wf-bar-label",children:a}):null})}),v.jsx("span",{className:"wf-dur",children:a})]})}function kK({turn:e,index:t,selectedId:n,onSelect:r}){const s=gK(e),a=bK(e,s),l=x.useMemo(()=>e.rows.map((d,h)=>yK(d,h,e.turnId,s,a)),[e,s,a]),c=x.useMemo(()=>xV(a),[a]),p=[];return e.wallMs!==void 0&&p.push(`Worked for ${Ax(e.wallMs)}`),e.usage&&p.push(`in ${Qp(e.usage.inputTokens)} · out ${Qp(e.usage.outputTokens)}`),v.jsxs("div",{className:"trace-turn",children:[v.jsxs("div",{className:"thead",children:[v.jsxs("span",{className:"thead-title",children:["Turn ",t+1,v.jsx("code",{className:"thead-id",children:e.turnId}),e.failed?v.jsx(ra,{variant:"danger",size:"sm",children:"failed"}):null]}),v.jsx("span",{className:"wall",children:p.join(" · ")||"In progress"})]}),v.jsxs("div",{className:"wf",children:[v.jsxs("div",{className:"wf-ruler","aria-hidden":"true",children:[v.jsx("span",{className:"wf-kind"}),v.jsx("span",{className:"wf-name"}),v.jsx("span",{className:"wf-track wf-ruler-track",children:c.map(d=>v.jsxs("span",{className:"wf-tick",style:{left:`${d/a*100}%`},children:[v.jsx("span",{className:"wf-tick-line"}),v.jsx("span",{className:"wf-tick-label",children:hi(d)})]},d))}),v.jsx("span",{className:"wf-dur"})]}),l.length===0?v.jsx("div",{className:"trace-empty-turn",children:"No timed spans in this turn."}):l.map(d=>v.jsx(xK,{span:d,selected:n===d.id,onSelect:()=>r(n===d.id?null:d)},d.id))]})]})}function SK(){const e=lt(a=>a.traceEvents),t=x.useMemo(()=>xO(e),[e]),[n,r]=x.useState(null);if(!e.length)return v.jsx("div",{className:"pg-trace",children:v.jsx(yc,{className:"pg-empty",message:"Select a session or Open trace to see the timeline."})});const s=[`${t.eventCount} events`,`${t.turns.length} turn${t.turns.length===1?"":"s"}`,`${t.totalTools} tool call${t.totalTools===1?"":"s"}`,t.failedTools?`${t.failedTools} error${t.failedTools===1?"":"s"}`:null].filter(Boolean).join(" · ");return v.jsx("div",{className:"pg-trace",children:v.jsxs("div",{className:"trace-rows",children:[v.jsx("div",{className:"trace-summary",children:s}),v.jsxs("div",{className:`trace-layout${n?" has-detail":""}`,children:[v.jsx("div",{className:"trace-main",children:t.turns.map((a,l)=>v.jsx(kK,{turn:a,index:l,selectedId:n?.id??null,onSelect:r},`${a.turnId||"turn"}-${l}`))}),n?v.jsx(vK,{span:n,onClose:()=>r(null)}):null]})]})})}function wK(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const EK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_K={};function jT(e,t){return(_K.jsx?TK:EK).test(e)}const RK=/[ \t\n\f\r]/g;function CK(e){return typeof e=="object"?e.type==="text"?PT(e.value):!1:PT(e)}function PT(e){return e.replace(RK,"")===""}class ef{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ef.prototype.normal={};ef.prototype.property={};ef.prototype.space=void 0;function MO(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ef(n,r,t)}function iv(e){return e.toLowerCase()}class Pr{constructor(t,n){this.attribute=n,this.property=t}}Pr.prototype.attribute="";Pr.prototype.booleanish=!1;Pr.prototype.boolean=!1;Pr.prototype.commaOrSpaceSeparated=!1;Pr.prototype.commaSeparated=!1;Pr.prototype.defined=!1;Pr.prototype.mustUseProperty=!1;Pr.prototype.number=!1;Pr.prototype.overloadedBoolean=!1;Pr.prototype.property="";Pr.prototype.spaceSeparated=!1;Pr.prototype.space=void 0;let AK=0;const At=ua(),Un=ua(),sv=ua(),je=ua(),dn=ua(),pl=ua(),Zr=ua();function ua(){return 2**++AK}const ov=Object.freeze(Object.defineProperty({__proto__:null,boolean:At,booleanish:Un,commaOrSpaceSeparated:Zr,commaSeparated:pl,number:je,overloadedBoolean:sv,spaceSeparated:dn},Symbol.toStringTag,{value:"Module"})),Zb=Object.keys(ov);class Mx extends Pr{constructor(t,n,r,s){let a=-1;if(super(t,n),$T(this,"space",s),typeof r=="number")for(;++a<Zb.length;){const l=Zb[a];$T(this,Zb[a],(r&ov[l])===ov[l])}}}Mx.prototype.defined=!0;function $T(e,t,n){n&&(e[t]=n)}function Dl(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Mx(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[iv(r)]=r,n[iv(a.attribute)]=r}return new ef(t,n,e.space)}const IO=Dl({properties:{ariaActiveDescendant:null,ariaAtomic:Un,ariaAutoComplete:null,ariaBusy:Un,ariaChecked:Un,ariaColCount:je,ariaColIndex:je,ariaColSpan:je,ariaControls:dn,ariaCurrent:null,ariaDescribedBy:dn,ariaDetails:null,ariaDisabled:Un,ariaDropEffect:dn,ariaErrorMessage:null,ariaExpanded:Un,ariaFlowTo:dn,ariaGrabbed:Un,ariaHasPopup:null,ariaHidden:Un,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dn,ariaLevel:je,ariaLive:null,ariaModal:Un,ariaMultiLine:Un,ariaMultiSelectable:Un,ariaOrientation:null,ariaOwns:dn,ariaPlaceholder:null,ariaPosInSet:je,ariaPressed:Un,ariaReadOnly:Un,ariaRelevant:null,ariaRequired:Un,ariaRoleDescription:dn,ariaRowCount:je,ariaRowIndex:je,ariaRowSpan:je,ariaSelected:Un,ariaSetSize:je,ariaSort:null,ariaValueMax:je,ariaValueMin:je,ariaValueNow:je,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function DO(e,t){return t in e?e[t]:t}function zO(e,t){return DO(e,t.toLowerCase())}const NK=Dl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pl,acceptCharset:dn,accessKey:dn,action:null,allow:null,allowFullScreen:At,allowPaymentRequest:At,allowUserMedia:At,alt:null,as:null,async:At,autoCapitalize:null,autoComplete:dn,autoFocus:At,autoPlay:At,blocking:dn,capture:null,charSet:null,checked:At,cite:null,className:dn,cols:je,colSpan:null,content:null,contentEditable:Un,controls:At,controlsList:dn,coords:je|pl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:At,defer:At,dir:null,dirName:null,disabled:At,download:sv,draggable:Un,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:At,formTarget:null,headers:dn,height:je,hidden:sv,high:je,href:null,hrefLang:null,htmlFor:dn,httpEquiv:dn,id:null,imageSizes:null,imageSrcSet:null,inert:At,inputMode:null,integrity:null,is:null,isMap:At,itemId:null,itemProp:dn,itemRef:dn,itemScope:At,itemType:dn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:At,low:je,manifest:null,max:null,maxLength:je,media:null,method:null,min:null,minLength:je,multiple:At,muted:At,name:null,nonce:null,noModule:At,noValidate:At,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:At,optimum:je,pattern:null,ping:dn,placeholder:null,playsInline:At,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:At,referrerPolicy:null,rel:dn,required:At,reversed:At,rows:je,rowSpan:je,sandbox:dn,scope:null,scoped:At,seamless:At,selected:At,shadowRootClonable:At,shadowRootDelegatesFocus:At,shadowRootMode:null,shape:null,size:je,sizes:null,slot:null,span:je,spellCheck:Un,src:null,srcDoc:null,srcLang:null,srcSet:null,start:je,step:null,style:null,tabIndex:je,target:null,title:null,translate:null,type:null,typeMustMatch:At,useMap:null,value:Un,width:je,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dn,axis:null,background:null,bgColor:null,border:je,borderColor:null,bottomMargin:je,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:At,declare:At,event:null,face:null,frame:null,frameBorder:null,hSpace:je,leftMargin:je,link:null,longDesc:null,lowSrc:null,marginHeight:je,marginWidth:je,noResize:At,noHref:At,noShade:At,noWrap:At,object:null,profile:null,prompt:null,rev:null,rightMargin:je,rules:null,scheme:null,scrolling:Un,standby:null,summary:null,text:null,topMargin:je,valueType:null,version:null,vAlign:null,vLink:null,vSpace:je,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:At,disableRemotePlayback:At,prefix:null,property:null,results:je,security:null,unselectable:null},space:"html",transform:zO}),OK=Dl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Zr,accentHeight:je,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:je,amplitude:je,arabicForm:null,ascent:je,attributeName:null,attributeType:null,azimuth:je,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:je,by:null,calcMode:null,capHeight:je,className:dn,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:je,diffuseConstant:je,direction:null,display:null,dur:null,divisor:je,dominantBaseline:null,download:At,dx:null,dy:null,edgeMode:null,editable:null,elevation:je,enableBackground:null,end:null,event:null,exponent:je,externalResourcesRequired:null,fill:null,fillOpacity:je,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:pl,g2:pl,glyphName:pl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:je,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:je,horizOriginX:je,horizOriginY:je,id:null,ideographic:je,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:je,k:je,k1:je,k2:je,k3:je,k4:je,kernelMatrix:Zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:je,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:je,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:je,overlineThickness:je,paintOrder:null,panose1:null,path:null,pathLength:je,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:je,pointsAtY:je,pointsAtZ:je,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zr,rev:Zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zr,requiredFeatures:Zr,requiredFonts:Zr,requiredFormats:Zr,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:je,specularExponent:je,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:je,strikethroughThickness:je,string:null,stroke:null,strokeDashArray:Zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:je,strokeOpacity:je,strokeWidth:null,style:null,surfaceScale:je,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zr,tabIndex:je,tableValues:null,target:null,targetX:je,targetY:je,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:je,underlineThickness:je,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:je,values:null,vAlphabetic:je,vMathematical:je,vectorEffect:null,vHanging:je,vIdeographic:je,version:null,vertAdvY:je,vertOriginX:je,vertOriginY:je,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:je,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:DO}),LO=Dl({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()}}),jO=Dl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:zO}),PO=Dl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),MK={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"},IK=/[A-Z]/g,BT=/-[a-z]/g,DK=/^data[-\w.:]+$/i;function zK(e,t){const n=iv(t);let r=t,s=Pr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&DK.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(BT,jK);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!BT.test(a)){let l=a.replace(IK,LK);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=Mx}return new s(r,t)}function LK(e){return"-"+e.toLowerCase()}function jK(e){return e.charAt(1).toUpperCase()}const PK=MO([IO,NK,LO,jO,PO],"html"),Ix=MO([IO,OK,LO,jO,PO],"svg");function $K(e){return e.join(" ").trim()}var Ya={},Wb,FT;function BK(){if(FT)return Wb;FT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,p=`
41
+ `,d="/",h="*",m="",g="comment",y="declaration";Wb=function(w,_){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];_=_||{};var E=1,R=1;function T(q){var z=q.match(t);z&&(E+=z.length);var j=q.lastIndexOf(p);R=~j?q.length-j:R+q.length}function C(){var q={line:E,column:R};return function(z){return z.position=new A(q),H(),z}}function A(q){this.start=q,this.end={line:E,column:R},this.source=_.source}A.prototype.content=w;function N(q){var z=new Error(_.source+":"+E+":"+R+": "+q);if(z.reason=q,z.filename=_.source,z.line=E,z.column=R,z.source=w,!_.silent)throw z}function I(q){var z=q.exec(w);if(z){var j=z[0];return T(j),w=w.slice(j.length),z}}function H(){I(n)}function $(q){var z;for(q=q||[];z=L();)z!==!1&&q.push(z);return q}function L(){var q=C();if(!(d!=w.charAt(0)||h!=w.charAt(1))){for(var z=2;m!=w.charAt(z)&&(h!=w.charAt(z)||d!=w.charAt(z+1));)++z;if(z+=2,m===w.charAt(z-1))return N("End of comment missing");var j=w.slice(2,z-2);return R+=2,T(j),w=w.slice(z),R+=2,q({type:g,comment:j})}}function K(){var q=C(),z=I(r);if(z){if(L(),!I(s))return N("property missing ':'");var j=I(a),F=q({type:y,property:k(z[0].replace(e,m)),value:j?k(j[0].replace(e,m)):m});return I(l),F}}function Z(){var q=[];$(q);for(var z;z=K();)z!==!1&&(q.push(z),$(q));return q}return H(),Z()};function k(w){return w?w.replace(c,m):m}return Wb}var UT;function FK(){if(UT)return Ya;UT=1;var e=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.default=n;var t=e(BK());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var l=(0,t.default)(r),c=typeof s=="function";return l.forEach(function(p){if(p.type==="declaration"){var d=p.property,h=p.value;c?s(d,h,p):h&&(a=a||{},a[d]=h)}}),a}return Ya}var $u={},qT;function UK(){if(qT)return $u;qT=1,Object.defineProperty($u,"__esModule",{value:!0}),$u.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||n.test(d)||e.test(d)},l=function(d,h){return h.toUpperCase()},c=function(d,h){return"".concat(h,"-")},p=function(d,h){return h===void 0&&(h={}),a(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(s,c):d=d.replace(r,c),d.replace(t,l))};return $u.camelCase=p,$u}var Bu,HT;function qK(){if(HT)return Bu;HT=1;var e=Bu&&Bu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(FK()),n=UK();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,p){c&&p&&(l[(0,n.camelCase)(c,a)]=p)}),l}return r.default=r,Bu=r,Bu}var HK=qK();const GK=oh(HK),$O=BO("end"),Dx=BO("start");function BO(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function VK(e){const t=Dx(e),n=$O(e);if(t&&n)return{start:t,end:n}}function ic(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?GT(e.position):"start"in e||"end"in e?GT(e):"line"in e||"column"in e?av(e):""}function av(e){return VT(e&&e.line)+":"+VT(e&&e.column)}function GT(e){return av(e&&e.start)+"-"+av(e&&e.end)}function VT(e){return e&&typeof e=="number"?e:1}class br extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(l=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?a.ruleId=r:(a.source=r.slice(0,p),a.ruleId=r.slice(p+1))}if(!a.place&&a.ancestors&&a.ancestors){const p=a.ancestors[a.ancestors.length-1];p&&(a.place=p.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=ic(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}br.prototype.file="";br.prototype.name="";br.prototype.reason="";br.prototype.message="";br.prototype.stack="";br.prototype.column=void 0;br.prototype.line=void 0;br.prototype.ancestors=void 0;br.prototype.cause=void 0;br.prototype.fatal=void 0;br.prototype.place=void 0;br.prototype.ruleId=void 0;br.prototype.source=void 0;const zx={}.hasOwnProperty,KK=new Map,ZK=/[A-Z]/g,WK=new Set(["table","tbody","thead","tfoot","tr"]),YK=new Set(["td","th"]),FO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function XK(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=sZ(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=iZ(n,t.jsx,t.jsxs)}const s={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"?Ix:PK,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=UO(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function UO(e,t,n){if(t.type==="element")return QK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return JK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tZ(e,t,n);if(t.type==="mdxjsEsm")return eZ(e,t);if(t.type==="root")return nZ(e,t,n);if(t.type==="text")return rZ(e,t)}function QK(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Ix,e.schema=s),e.ancestors.push(t);const a=HO(e,t.tagName,!1),l=oZ(e,t);let c=jx(e,t);return WK.has(t.tagName)&&(c=c.filter(function(p){return typeof p=="string"?!CK(p):!0})),qO(e,l,a,t),Lx(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function JK(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Oc(e,t.position)}function eZ(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Oc(e,t.position)}function tZ(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Ix,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:HO(e,t.name,!0),l=aZ(e,t),c=jx(e,t);return qO(e,l,a,t),Lx(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function nZ(e,t,n){const r={};return Lx(r,jx(e,t)),e.create(t,e.Fragment,r,n)}function rZ(e,t){return t.value}function qO(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Lx(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function iZ(e,t,n){return r;function r(s,a,l,c){const d=Array.isArray(l.children)?n:t;return c?d(a,l,c):d(a,l)}}function sZ(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),p=Dx(r);return t(s,a,l,c,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function oZ(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&zx.call(t.properties,s)){const a=lZ(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&YK.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function aZ(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Oc(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Oc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function jx(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:KK;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const p=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(p){const d=s.get(p)||0;l=p+"-"+d,s.set(p,d+1)}}const c=UO(e,a,l);c!==void 0&&n.push(c)}return n}function lZ(e,t,n){const r=zK(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?wK(n):$K(n)),r.property==="style"){let s=typeof n=="object"?n:uZ(e,String(n));return e.stylePropertyNameCase==="css"&&(s=cZ(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?MK[r.property]||r.property:r.attribute,n]}}function uZ(e,t){try{return GK(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new br("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=FO+"#cannot-parse-style-attribute",s}}function HO(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,l;for(;++a<s.length;){const c=jT(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=jT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return zx.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Oc(e)}function Oc(e,t){const n=new br("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=FO+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cZ(e){const t={};let n;for(n in e)zx.call(e,n)&&(t[fZ(n)]=e[n]);return t}function fZ(e){let t=e.replace(ZK,dZ);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function dZ(e){return"-"+e.toLowerCase()}const Yb={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"]},pZ={};function Px(e,t){const n=pZ,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return GO(e,r,s)}function GO(e,t,n){if(hZ(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 KT(e.children,t,n)}return Array.isArray(e)?KT(e,t,n):""}function KT(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=GO(e[s],t,n);return r.join("")}function hZ(e){return!!(e&&typeof e=="object")}const ZT=document.createElement("i");function $x(e){const t="&"+e+";";ZT.innerHTML=t;const n=ZT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xr(e,t,n,r){const s=e.length;let a=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function ui(e,t){return e.length>0?(Xr(e,e.length,0,t),e):t}const WT={}.hasOwnProperty;function VO(e){const t={};let n=-1;for(;++n<e.length;)mZ(t,e[n]);return t}function mZ(e,t){let n;for(n in t){const s=(WT.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){WT.call(s,l)||(s[l]=[]);const c=a[l];gZ(s[l],Array.isArray(c)?c:c?[c]:[])}}}function gZ(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xr(e,0,0,r)}function KO(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function wi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sr=vo(/[A-Za-z]/),mr=vo(/[\dA-Za-z]/),bZ=vo(/[#-'*+\--9=?A-Z^-~]/);function eh(e){return e!==null&&(e<32||e===127)}const lv=vo(/\d/),yZ=vo(/[\dA-Fa-f]/),vZ=vo(/[!-/:-@[-`{-~]/);function dt(e){return e!==null&&e<-2}function un(e){return e!==null&&(e<0||e===32)}function jt(e){return e===-2||e===-1||e===32}const Kh=vo(new RegExp("\\p{P}|\\p{S}","u")),na=vo(/\s/);function vo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&mr(e.charCodeAt(n+1))&&mr(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),s=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function qt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(p){return jt(p)?(e.enter(n),c(p)):t(p)}function c(p){return jt(p)&&a++<s?(e.consume(p),c):(e.exit(n),t(p))}}const xZ={tokenize:kZ};function kZ(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),qt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return dt(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const SZ={tokenize:wZ},YT={tokenize:EZ};function wZ(e){const t=this,n=[];let r=0,s,a,l;return c;function c(T){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,p,d)(T)}return d(T)}function p(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const C=t.events.length;let A=C,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){N=t.events[A][1].end;break}E(r);let I=C;for(;I<t.events.length;)t.events[I][1].end={...N},I++;return Xr(t.events,A+1,0,t.events.slice(C)),t.events.length=I,d(T)}return c(T)}function d(T){if(r===n.length){if(!s)return g(T);if(s.currentConstruct&&s.currentConstruct.concrete)return k(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(YT,h,m)(T)}function h(T){return s&&R(),E(r),g(T)}function m(T){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,k(T)}function g(T){return t.containerState={},e.attempt(YT,y,k)(T)}function y(T){return r++,n.push([t.currentConstruct,t.containerState]),g(T)}function k(T){if(T===null){s&&R(),E(0),e.consume(T);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),w(T)}function w(T){if(T===null){_(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return dt(T)?(e.consume(T),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(T),w)}function _(T,C){const A=t.sliceStream(T);if(C&&A.push(null),T.previous=a,a&&(a.next=T),a=T,s.defineSkip(T.start),s.write(A),t.parser.lazy[T.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<l&&(!s.events[N][1].end||s.events[N][1].end.offset>l))return;const I=t.events.length;let H=I,$,L;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if($){L=t.events[H][1].end;break}$=!0}for(E(r),N=I;N<t.events.length;)t.events[N][1].end={...L},N++;Xr(t.events,H+1,0,t.events.slice(I)),t.events.length=N}}function E(T){let C=n.length;for(;C-- >T;){const A=n[C];t.containerState=A[1],A[0].exit.call(t,e)}n.length=T}function R(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function EZ(e,t,n){return qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _l(e){if(e===null||un(e)||na(e))return 1;if(Kh(e))return 2}function Zh(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const uv={name:"attention",resolveAll:TZ,tokenize:_Z};function TZ(e,t){let n=-1,r,s,a,l,c,p,d,h;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;p=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},g={...e[n][1].start};XT(m,-p),XT(g,p),l={type:p>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},a={type:p>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:p>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=ui(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=ui(d,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),d=ui(d,Zh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=ui(d,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=ui(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Xr(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _Z(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=_l(r);let a;return l;function l(p){return a=p,e.enter("attentionSequence"),c(p)}function c(p){if(p===a)return e.consume(p),c;const d=e.exit("attentionSequence"),h=_l(p),m=!h||h===2&&s||n.includes(p),g=!s||s===2&&h||n.includes(r);return d._open=!!(a===42?m:m&&(s||!g)),d._close=!!(a===42?g:g&&(h||!m)),t(p)}}function XT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const RZ={name:"autolink",tokenize:CZ};function CZ(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Sr(y)?(e.consume(y),l):y===64?n(y):d(y)}function l(y){return y===43||y===45||y===46||mr(y)?(r=1,c(y)):d(y)}function c(y){return y===58?(e.consume(y),r=0,p):(y===43||y===45||y===46||mr(y))&&r++<32?(e.consume(y),c):(r=0,d(y))}function p(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||eh(y)?n(y):(e.consume(y),p)}function d(y){return y===64?(e.consume(y),h):bZ(y)?(e.consume(y),d):n(y)}function h(y){return mr(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):g(y)}function g(y){if((y===45||mr(y))&&r++<63){const k=y===45?g:m;return e.consume(y),k}return n(y)}}const tf={partial:!0,tokenize:AZ};function AZ(e,t,n){return r;function r(a){return jt(a)?qt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||dt(a)?t(a):n(a)}}const ZO={continuation:{tokenize:OZ},exit:MZ,name:"blockQuote",tokenize:NZ};function NZ(e,t,n){const r=this;return s;function s(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return jt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function OZ(e,t,n){const r=this;return s;function s(l){return jt(l)?qt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(ZO,t,n)(l)}}function MZ(e){e.exit("blockQuote")}const WO={name:"characterEscape",tokenize:IZ};function IZ(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return vZ(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const YO={name:"characterReference",tokenize:DZ};function DZ(e,t,n){const r=this;let s=0,a,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),p}function p(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,l=mr,h(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=yZ,h):(e.enter("characterReferenceValue"),a=7,l=lv,h(m))}function h(m){if(m===59&&s){const g=e.exit("characterReferenceValue");return l===mr&&!$x(r.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&s++<a?(e.consume(m),h):n(m)}}const QT={partial:!0,tokenize:LZ},JT={concrete:!0,name:"codeFenced",tokenize:zZ};function zZ(e,t,n){const r=this,s={partial:!0,tokenize:A};let a=0,l=0,c;return p;function p(N){return d(N)}function d(N){const I=r.events[r.events.length-1];return a=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(N)}function h(N){return N===c?(l++,e.consume(N),h):l<3?n(N):(e.exit("codeFencedFenceSequence"),jt(N)?qt(e,m,"whitespace")(N):m(N))}function m(N){return N===null||dt(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(QT,w,C)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||dt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(N)):jt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qt(e,y,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),g)}function y(N){return N===null||dt(N)?m(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(N))}function k(N){return N===null||dt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===c?n(N):(e.consume(N),k)}function w(N){return e.attempt(s,C,_)(N)}function _(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),E}function E(N){return a>0&&jt(N)?qt(e,R,"linePrefix",a+1)(N):R(N)}function R(N){return N===null||dt(N)?e.check(QT,w,C)(N):(e.enter("codeFlowValue"),T(N))}function T(N){return N===null||dt(N)?(e.exit("codeFlowValue"),R(N)):(e.consume(N),T)}function C(N){return e.exit("codeFenced"),t(N)}function A(N,I,H){let $=0;return L;function L(j){return N.enter("lineEnding"),N.consume(j),N.exit("lineEnding"),K}function K(j){return N.enter("codeFencedFence"),jt(j)?qt(N,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):Z(j)}function Z(j){return j===c?(N.enter("codeFencedFenceSequence"),q(j)):H(j)}function q(j){return j===c?($++,N.consume(j),q):$>=l?(N.exit("codeFencedFenceSequence"),jt(j)?qt(N,z,"whitespace")(j):z(j)):H(j)}function z(j){return j===null||dt(j)?(N.exit("codeFencedFence"),I(j)):H(j)}}}function LZ(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Xb={name:"codeIndented",tokenize:PZ},jZ={partial:!0,tokenize:$Z};function PZ(e,t,n){const r=this;return s;function s(d){return e.enter("codeIndented"),qt(e,a,"linePrefix",5)(d)}function a(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?p(d):dt(d)?e.attempt(jZ,l,p)(d):(e.enter("codeFlowValue"),c(d))}function c(d){return d===null||dt(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),c)}function p(d){return e.exit("codeIndented"),t(d)}}function $Z(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):dt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):qt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):dt(l)?s(l):n(l)}}const BZ={name:"codeText",previous:UZ,resolve:FZ,tokenize:qZ};function FZ(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function UZ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qZ(e,t,n){let r=0,s,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),p(m))}function p(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),p):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):dt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),p):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||dt(m)?(e.exit("codeTextData"),p(m)):(e.consume(m),d)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",d(m))}}class HZ{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Fu(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Fu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Fu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Fu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Fu(this.left,n.reverse())}}}function Fu(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 XO(e){const t={};let n=-1,r,s,a,l,c,p,d;const h=new HZ(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,a=0,a<p.length&&p[a][1].type==="lineEndingBlank"&&(a+=2),a<p.length&&p[a][1].type==="content"))for(;++a<p.length&&p[a][1].type!=="content";)p[a][1].type==="chunkText"&&(p[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,GZ(h,n)),n=t[n],d=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(h.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...h.get(s)[1].start},c=h.slice(s,n),c.unshift(r),h.splice(s,n-s+1,c))}}return Xr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function GZ(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,p=[],d={};let h,m,g=-1,y=n,k=0,w=0;const _=[w];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++g<c.length;)c[g][0]==="exit"&&c[g-1][0]==="enter"&&c[g][1].type===c[g-1][1].type&&c[g][1].start.line!==c[g][1].end.line&&(w=g+1,_.push(w),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):_.pop(),g=_.length;g--;){const E=c.slice(_[g],_[g+1]),R=a.pop();p.push([R,R+E.length-1]),e.splice(R,2,E)}for(p.reverse(),g=-1;++g<p.length;)d[k+p[g][0]]=k+p[g][1],k+=p[g][1]-p[g][0]-1;return d}const VZ={resolve:ZZ,tokenize:WZ},KZ={partial:!0,tokenize:YZ};function ZZ(e){return XO(e),e}function WZ(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):dt(c)?e.check(KZ,l,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function YZ(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),qt(e,a,"linePrefix")}function a(l){if(l===null||dt(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function QO(e,t,n,r,s,a,l,c,p){const d=p||Number.POSITIVE_INFINITY;let h=0;return m;function m(E){return E===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(E),e.exit(a),g):E===null||E===32||E===41||eh(E)?n(E):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(E))}function g(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(E))}function y(E){return E===62?(e.exit("chunkString"),e.exit(c),g(E)):E===null||E===60||dt(E)?n(E):(e.consume(E),E===92?k:y)}function k(E){return E===60||E===62||E===92?(e.consume(E),y):y(E)}function w(E){return!h&&(E===null||E===41||un(E))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(E)):h<d&&E===40?(e.consume(E),h++,w):E===41?(e.consume(E),h--,w):E===null||E===32||E===40||eh(E)?n(E):(e.consume(E),E===92?_:w)}function _(E){return E===40||E===41||E===92?(e.consume(E),w):w(E)}}function JO(e,t,n,r,s,a){const l=this;let c=0,p;return d;function d(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),h}function h(y){return c>999||y===null||y===91||y===93&&!p||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):dt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||dt(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),p||(p=!jt(y)),y===92?g:m)}function g(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function eM(e,t,n,r,s,a){let l;return c;function c(g){return g===34||g===39||g===40?(e.enter(r),e.enter(s),e.consume(g),e.exit(s),l=g===40?41:g,p):n(g)}function p(g){return g===l?(e.enter(s),e.consume(g),e.exit(s),e.exit(r),t):(e.enter(a),d(g))}function d(g){return g===l?(e.exit(a),p(l)):g===null?n(g):dt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),qt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===l||g===null||dt(g)?(e.exit("chunkString"),d(g)):(e.consume(g),g===92?m:h)}function m(g){return g===l||g===92?(e.consume(g),h):h(g)}}function sc(e,t){let n;return r;function r(s){return dt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):jt(s)?qt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const XZ={name:"definition",tokenize:JZ},QZ={partial:!0,tokenize:eW};function JZ(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return JO.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=wi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),p):n(y)}function p(y){return un(y)?sc(e,d)(y):d(y)}function d(y){return QO(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(QZ,m,m)(y)}function m(y){return jt(y)?qt(e,g,"whitespace")(y):g(y)}function g(y){return y===null||dt(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function eW(e,t,n){return r;function r(c){return un(c)?sc(e,s)(c):n(c)}function s(c){return eM(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return jt(c)?qt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||dt(c)?t(c):n(c)}}const tW={name:"hardBreakEscape",tokenize:nW};function nW(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return dt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const rW={name:"headingAtx",resolve:iW,tokenize:sW};function iW(e,t){let n=e.length-2,r=3,s,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&&(s={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"},Xr(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function sW(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||un(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),p(h)):h===null||dt(h)?(e.exit("atxHeading"),t(h)):jt(h)?qt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function p(h){return h===35?(e.consume(h),p):(e.exit("atxHeadingSequence"),c(h))}function d(h){return h===null||h===35||un(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),d)}}const oW=["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"],e_=["pre","script","style","textarea"],aW={concrete:!0,name:"htmlFlow",resolveTo:cW,tokenize:fW},lW={partial:!0,tokenize:pW},uW={partial:!0,tokenize:dW};function cW(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 fW(e,t,n){const r=this;let s,a,l,c,p;return d;function d(O){return h(O)}function h(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),g):O===47?(e.consume(O),a=!0,w):O===63?(e.consume(O),s=3,r.interrupt?t:D):Sr(O)?(e.consume(O),l=String.fromCharCode(O),_):n(O)}function g(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,c=0,k):Sr(O)?(e.consume(O),s=4,r.interrupt?t:D):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:D):n(O)}function k(O){const ie="CDATA[";return O===ie.charCodeAt(c++)?(e.consume(O),c===ie.length?r.interrupt?t:Z:k):n(O)}function w(O){return Sr(O)?(e.consume(O),l=String.fromCharCode(O),_):n(O)}function _(O){if(O===null||O===47||O===62||un(O)){const ie=O===47,te=l.toLowerCase();return!ie&&!a&&e_.includes(te)?(s=1,r.interrupt?t(O):Z(O)):oW.includes(l.toLowerCase())?(s=6,ie?(e.consume(O),E):r.interrupt?t(O):Z(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?R(O):T(O))}return O===45||mr(O)?(e.consume(O),l+=String.fromCharCode(O),_):n(O)}function E(O){return O===62?(e.consume(O),r.interrupt?t:Z):n(O)}function R(O){return jt(O)?(e.consume(O),R):L(O)}function T(O){return O===47?(e.consume(O),L):O===58||O===95||Sr(O)?(e.consume(O),C):jt(O)?(e.consume(O),T):L(O)}function C(O){return O===45||O===46||O===58||O===95||mr(O)?(e.consume(O),C):A(O)}function A(O){return O===61?(e.consume(O),N):jt(O)?(e.consume(O),A):T(O)}function N(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),p=O,I):jt(O)?(e.consume(O),N):H(O)}function I(O){return O===p?(e.consume(O),p=null,$):O===null||dt(O)?n(O):(e.consume(O),I)}function H(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||un(O)?A(O):(e.consume(O),H)}function $(O){return O===47||O===62||jt(O)?T(O):n(O)}function L(O){return O===62?(e.consume(O),K):n(O)}function K(O){return O===null||dt(O)?Z(O):jt(O)?(e.consume(O),K):n(O)}function Z(O){return O===45&&s===2?(e.consume(O),F):O===60&&s===1?(e.consume(O),U):O===62&&s===4?(e.consume(O),B):O===63&&s===3?(e.consume(O),D):O===93&&s===5?(e.consume(O),W):dt(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(lW,G,q)(O)):O===null||dt(O)?(e.exit("htmlFlowData"),q(O)):(e.consume(O),Z)}function q(O){return e.check(uW,z,G)(O)}function z(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),j}function j(O){return O===null||dt(O)?q(O):(e.enter("htmlFlowData"),Z(O))}function F(O){return O===45?(e.consume(O),D):Z(O)}function U(O){return O===47?(e.consume(O),l="",P):Z(O)}function P(O){if(O===62){const ie=l.toLowerCase();return e_.includes(ie)?(e.consume(O),B):Z(O)}return Sr(O)&&l.length<8?(e.consume(O),l+=String.fromCharCode(O),P):Z(O)}function W(O){return O===93?(e.consume(O),D):Z(O)}function D(O){return O===62?(e.consume(O),B):O===45&&s===2?(e.consume(O),D):Z(O)}function B(O){return O===null||dt(O)?(e.exit("htmlFlowData"),G(O)):(e.consume(O),B)}function G(O){return e.exit("htmlFlow"),t(O)}}function dW(e,t,n){const r=this;return s;function s(l){return dt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function pW(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(tf,t,n)}}const hW={name:"htmlText",tokenize:mW};function mW(e,t,n){const r=this;let s,a,l;return c;function c(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),p}function p(D){return D===33?(e.consume(D),d):D===47?(e.consume(D),A):D===63?(e.consume(D),T):Sr(D)?(e.consume(D),H):n(D)}function d(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,k):Sr(D)?(e.consume(D),R):n(D)}function h(D){return D===45?(e.consume(D),y):n(D)}function m(D){return D===null?n(D):D===45?(e.consume(D),g):dt(D)?(l=m,U(D)):(e.consume(D),m)}function g(D){return D===45?(e.consume(D),y):m(D)}function y(D){return D===62?F(D):D===45?g(D):m(D)}function k(D){const B="CDATA[";return D===B.charCodeAt(a++)?(e.consume(D),a===B.length?w:k):n(D)}function w(D){return D===null?n(D):D===93?(e.consume(D),_):dt(D)?(l=w,U(D)):(e.consume(D),w)}function _(D){return D===93?(e.consume(D),E):w(D)}function E(D){return D===62?F(D):D===93?(e.consume(D),E):w(D)}function R(D){return D===null||D===62?F(D):dt(D)?(l=R,U(D)):(e.consume(D),R)}function T(D){return D===null?n(D):D===63?(e.consume(D),C):dt(D)?(l=T,U(D)):(e.consume(D),T)}function C(D){return D===62?F(D):T(D)}function A(D){return Sr(D)?(e.consume(D),N):n(D)}function N(D){return D===45||mr(D)?(e.consume(D),N):I(D)}function I(D){return dt(D)?(l=I,U(D)):jt(D)?(e.consume(D),I):F(D)}function H(D){return D===45||mr(D)?(e.consume(D),H):D===47||D===62||un(D)?$(D):n(D)}function $(D){return D===47?(e.consume(D),F):D===58||D===95||Sr(D)?(e.consume(D),L):dt(D)?(l=$,U(D)):jt(D)?(e.consume(D),$):F(D)}function L(D){return D===45||D===46||D===58||D===95||mr(D)?(e.consume(D),L):K(D)}function K(D){return D===61?(e.consume(D),Z):dt(D)?(l=K,U(D)):jt(D)?(e.consume(D),K):$(D)}function Z(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),s=D,q):dt(D)?(l=Z,U(D)):jt(D)?(e.consume(D),Z):(e.consume(D),z)}function q(D){return D===s?(e.consume(D),s=void 0,j):D===null?n(D):dt(D)?(l=q,U(D)):(e.consume(D),q)}function z(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||un(D)?$(D):(e.consume(D),z)}function j(D){return D===47||D===62||un(D)?$(D):n(D)}function F(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function U(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),P}function P(D){return jt(D)?qt(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):W(D)}function W(D){return e.enter("htmlTextData"),l(D)}}const Bx={name:"labelEnd",resolveAll:vW,resolveTo:xW,tokenize:kW},gW={tokenize:SW},bW={tokenize:wW},yW={tokenize:EW};function vW(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Xr(e,0,e.length,n),e}function xW(e,t){let n=e.length,r=0,s,a,l,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const p={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",p,t],["enter",d,t]],c=ui(c,e.slice(a+1,a+r+3)),c=ui(c,[["enter",h,t]]),c=ui(c,Zh(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=ui(c,[["exit",h,t],e[l-2],e[l-1],["exit",d,t]]),c=ui(c,e.slice(l+1)),c=ui(c,[["exit",p,t]]),Xr(e,a,e.length,c),e}function kW(e,t,n){const r=this;let s=r.events.length,a,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(g){return a?a._inactive?m(g):(l=r.parser.defined.includes(wi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),p):n(g)}function p(g){return g===40?e.attempt(gW,h,l?h:m)(g):g===91?e.attempt(bW,h,l?d:m)(g):l?h(g):m(g)}function d(g){return e.attempt(yW,h,m)(g)}function h(g){return t(g)}function m(g){return a._balanced=!0,n(g)}}function SW(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return un(m)?sc(e,a)(m):a(m)}function a(m){return m===41?h(m):QO(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return un(m)?sc(e,p)(m):h(m)}function c(m){return n(m)}function p(m){return m===34||m===39||m===40?eM(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function d(m){return un(m)?sc(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function wW(e,t,n){const r=this;return s;function s(c){return JO.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(wi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function EW(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const TW={name:"labelStartImage",resolveAll:Bx.resolveAll,tokenize:_W};function _W(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const RW={name:"labelStartLink",resolveAll:Bx.resolveAll,tokenize:CW};function CW(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Qb={name:"lineEnding",tokenize:AW};function AW(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),qt(e,t,"linePrefix")}}const kp={name:"thematicBreak",tokenize:NW};function NW(e,t,n){let r=0,s;return a;function a(d){return e.enter("thematicBreak"),l(d)}function l(d){return s=d,c(d)}function c(d){return d===s?(e.enter("thematicBreakSequence"),p(d)):r>=3&&(d===null||dt(d))?(e.exit("thematicBreak"),t(d)):n(d)}function p(d){return d===s?(e.consume(d),r++,p):(e.exit("thematicBreakSequence"),jt(d)?qt(e,c,"whitespace")(d):c(d))}}const Ir={continuation:{tokenize:DW},exit:LW,name:"list",tokenize:IW},OW={partial:!0,tokenize:jW},MW={partial:!0,tokenize:zW};function IW(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return c;function c(y){const k=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:lv(y)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(kp,n,d)(y):d(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(y)}return n(y)}function p(y){return lv(y)&&++l<10?(e.consume(y),p):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),d(y)):n(y)}function d(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(tf,r.interrupt?n:h,e.attempt(OW,g,m))}function h(y){return r.containerState.initialBlankLine=!0,a++,g(y)}function m(y){return jt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function DW(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tf,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!jt(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(MW,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,qt(e,e.attempt(Ir,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function zW(e,t,n){const r=this;return qt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function LW(e){e.exit(this.containerState.type)}function jW(e,t,n){const r=this;return qt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!jt(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const t_={name:"setextUnderline",resolveTo:PW,tokenize:$W};function PW(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function $W(e,t,n){const r=this;let s;return a;function a(d){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),c(d)}function c(d){return d===s?(e.consume(d),c):(e.exit("setextHeadingLineSequence"),jt(d)?qt(e,p,"lineSuffix")(d):p(d))}function p(d){return d===null||dt(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const BW={tokenize:FW};function FW(e){const t=this,n=e.attempt(tf,r,e.attempt(this.parser.constructs.flowInitial,s,qt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(VZ,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const UW={resolveAll:nM()},qW=tM("string"),HW=tM("text");function tM(e){return{resolveAll:nM(e==="text"?GW:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,l,c);return l;function l(h){return d(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),p}function p(h){return d(h)?(n.exit("data"),a(h)):(n.consume(h),p)}function d(h){if(h===null)return!0;const m=s[h];let g=-1;if(m)for(;++g<m.length;){const y=m[g];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function nM(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function GW(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,l=-1,c=0,p;for(;a--;){const d=s[a];if(typeof d=="string"){for(l=d.length;d.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(d===-2)p=!0,c++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const d={type:n===e.length||p||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const VW={42:Ir,43:Ir,45:Ir,48:Ir,49:Ir,50:Ir,51:Ir,52:Ir,53:Ir,54:Ir,55:Ir,56:Ir,57:Ir,62:ZO},KW={91:XZ},ZW={[-2]:Xb,[-1]:Xb,32:Xb},WW={35:rW,42:kp,45:[t_,kp],60:aW,61:t_,95:kp,96:JT,126:JT},YW={38:YO,92:WO},XW={[-5]:Qb,[-4]:Qb,[-3]:Qb,33:TW,38:YO,42:uv,60:[RZ,hW],91:RW,92:[tW,WO],93:Bx,95:uv,96:BZ},QW={null:[uv,UW]},JW={null:[42,95]},eY={null:[]},tY=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:JW,contentInitial:KW,disable:eY,document:VW,flow:WW,flowInitial:ZW,insideSpan:QW,string:YW,text:XW},Symbol.toStringTag,{value:"Module"}));function nY(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let l=[],c=[];const p={attempt:I(A),check:I(N),consume:R,enter:T,exit:C,interrupt:I(N,{interrupt:!0})},d={code:null,containerState:{},defineSkip:w,events:[],now:k,parser:e,previous:null,sliceSerialize:g,sliceStream:y,write:m};let h=t.tokenize.call(d,p);return t.resolveAll&&a.push(t),d;function m(K){return l=ui(l,K),_(),l[l.length-1]!==null?[]:(H(t,0),d.events=Zh(a,d.events,d),d.events)}function g(K,Z){return iY(y(K),Z)}function y(K){return rY(l,K)}function k(){const{_bufferIndex:K,_index:Z,line:q,column:z,offset:j}=r;return{_bufferIndex:K,_index:Z,line:q,column:z,offset:j}}function w(K){s[K.line]=K.column,L()}function _(){let K;for(;r._index<l.length;){const Z=l[r._index];if(typeof Z=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<Z.length;)E(Z.charCodeAt(r._bufferIndex));else E(Z)}}function E(K){h=h(K)}function R(K){dt(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,L()):K!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=K}function T(K,Z){const q=Z||{};return q.type=K,q.start=k(),d.events.push(["enter",q,d]),c.push(q),q}function C(K){const Z=c.pop();return Z.end=k(),d.events.push(["exit",Z,d]),Z}function A(K,Z){H(K,Z.from)}function N(K,Z){Z.restore()}function I(K,Z){return q;function q(z,j,F){let U,P,W,D;return Array.isArray(z)?G(z):"tokenize"in z?G([z]):B(z);function B(ne){return le;function le(pe){const ye=pe!==null&&ne[pe],Se=pe!==null&&ne.null,ze=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return G(ze)(pe)}}function G(ne){return U=ne,P=0,ne.length===0?F:O(ne[P])}function O(ne){return le;function le(pe){return D=$(),W=ne,ne.partial||(d.currentConstruct=ne),ne.name&&d.parser.constructs.disable.null.includes(ne.name)?te():ne.tokenize.call(Z?Object.assign(Object.create(d),Z):d,p,ie,te)(pe)}}function ie(ne){return K(W,D),j}function te(ne){return D.restore(),++P<U.length?O(U[P]):F}}}function H(K,Z){K.resolveAll&&!a.includes(K)&&a.push(K),K.resolve&&Xr(d.events,Z,d.events.length-Z,K.resolve(d.events.slice(Z),d)),K.resolveTo&&(d.events=K.resolveTo(d.events,d))}function $(){const K=k(),Z=d.previous,q=d.currentConstruct,z=d.events.length,j=Array.from(c);return{from:z,restore:F};function F(){r=K,d.previous=Z,d.currentConstruct=q,d.events.length=z,c=j,L()}}function L(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function rY(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,a)];else{if(l=e.slice(n,s),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function iY(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
42
+ `;break}case-3:{l=`\r
43
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(a)}s=a===-2,r.push(l)}return r.join("")}function sY(e){const r={constructs:VO([tY,...(e||{}).extensions||[]]),content:s(xZ),defined:[],document:s(SZ),flow:s(BW),lazy:{},string:s(qW),text:s(HW)};return r;function s(a){return l;function l(c){return nY(r,a,c)}}}function oY(e){for(;!XO(e););return e}const n_=/[\0\t\n\r]/g;function aY(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const p=[];let d,h,m,g,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(n_.lastIndex=m,d=n_.exec(a),g=d&&d.index!==void 0?d.index:a.length,y=a.charCodeAt(g),!d){t=a.slice(m);break}if(y===10&&m===g&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),m<g&&(p.push(a.slice(m,g)),e+=g-m),y){case 0:{p.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,p.push(-2);e++<h;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:r=!0,e=1}m=g+1}return c&&(r&&p.push(-5),t&&p.push(t),p.push(null)),p}}const lY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uY(e){return e.replace(lY,cY)}function cY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return KO(n.slice(a?2:1),a?16:10)}return $x(n)||e}const rM={}.hasOwnProperty;function fY(e,t,n){return typeof t!="string"&&(n=t,t=void 0),dY(n)(oY(sY(n).document().write(aY()(e,t,!0))))}function dY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ce),autolinkProtocol:$,autolinkEmail:$,atxHeading:a(Oe),blockQuote:a(Se),characterEscape:$,characterReference:$,codeFenced:a(ze),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(ze,l),codeText:a(he,l),codeTextData:$,data:$,codeFlowValue:$,definition:a(Te),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Re),hardBreakEscape:a(ve),hardBreakTrailing:a(ve),htmlFlow:a(xe,l),htmlFlowData:$,htmlText:a(xe,l),htmlTextData:$,image:a(Me),label:l,link:a(Ce),listItem:a(ge),listItemValue:g,listOrdered:a(Pe,m),listUnordered:a(Pe),paragraph:a(fe),reference:O,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Oe),strong:a(oe),thematicBreak:a(_e)},exit:{atxHeading:p(),atxHeadingSequence:A,autolink:p(),autolinkEmail:ye,autolinkProtocol:pe,blockQuote:p(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:ne,characterReference:le,codeFenced:p(_),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:k,codeFlowValue:L,codeIndented:p(E),codeText:p(j),codeTextData:L,data:L,definition:p(),definitionDestinationString:C,definitionLabelString:R,definitionTitleString:T,emphasis:p(),hardBreakEscape:p(Z),hardBreakTrailing:p(Z),htmlFlow:p(q),htmlFlowData:L,htmlText:p(z),htmlTextData:L,image:p(U),label:W,labelText:P,lineEnding:K,link:p(F),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ie,resourceDestinationString:D,resourceTitleString:B,resource:G,setextHeading:p(H),setextHeadingLineSequence:I,setextHeadingText:N,strong:p(),thematicBreak:p()}};iM(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ue={type:"root",children:[]};const Ie={stack:[ue],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:h,data:n},Be=[];let Ze=-1;for(;++Ze<J.length;)if(J[Ze][1].type==="listOrdered"||J[Ze][1].type==="listUnordered")if(J[Ze][0]==="enter")Be.push(Ze);else{const Ye=Be.pop();Ze=s(J,Ye,Ze)}for(Ze=-1;++Ze<J.length;){const Ye=t[J[Ze][0]];rM.call(Ye,J[Ze][1].type)&&Ye[J[Ze][1].type].call(Object.assign({sliceSerialize:J[Ze][2].sliceSerialize},Ie),J[Ze][1])}if(Ie.tokenStack.length>0){const Ye=Ie.tokenStack[Ie.tokenStack.length-1];(Ye[1]||r_).call(Ie,void 0,Ye[0])}for(ue.position={start:to(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:to(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)ue=t.transforms[Ze](ue)||ue;return ue}function s(J,ue,Ie){let Be=ue-1,Ze=-1,Ye=!1,ot,it,nt,vt;for(;++Be<=Ie;){const st=J[Be];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?Ze++:Ze--,vt=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(ot&&!vt&&!Ze&&!nt&&(nt=Be),vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:vt=void 0}if(!Ze&&st[0]==="enter"&&st[1].type==="listItemPrefix"||Ze===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(ot){let xt=Be;for(it=void 0;xt--;){const We=J[xt];if(We[1].type==="lineEnding"||We[1].type==="lineEndingBlank"){if(We[0]==="exit")continue;it&&(J[it][1].type="lineEndingBlank",Ye=!0),We[1].type="lineEnding",it=xt}else if(!(We[1].type==="linePrefix"||We[1].type==="blockQuotePrefix"||We[1].type==="blockQuotePrefixWhitespace"||We[1].type==="blockQuoteMarker"||We[1].type==="listItemIndent"))break}nt&&(!it||nt<it)&&(ot._spread=!0),ot.end=Object.assign({},it?J[it][1].start:st[1].end),J.splice(it||Be,0,["exit",ot,st[2]]),Be++,Ie++}if(st[1].type==="listItemPrefix"){const xt={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};ot=xt,J.splice(Be,0,["enter",xt,st[2]]),Be++,Ie++,nt=void 0,vt=!0}}}return J[ue][1]._spread=Ye,Ie}function a(J,ue){return Ie;function Ie(Be){c.call(this,J(Be),Be),ue&&ue.call(this,Be)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(J,ue,Ie){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ue,Ie||void 0]),J.position={start:to(ue.start),end:void 0}}function p(J){return ue;function ue(Ie){J&&J.call(this,Ie),d.call(this,Ie)}}function d(J,ue){const Ie=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==J.type&&(ue?ue.call(this,J,Be[0]):(Be[1]||r_).call(this,J,Be[0]));else throw new Error("Cannot close `"+J.type+"` ("+ic({start:J.start,end:J.end})+"): it’s not open");Ie.position.end=to(J.end)}function h(){return Px(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(J){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=J}function k(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=J}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J.replace(/(\r?\n|\r)$/g,"")}function R(J){const ue=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=ue,Ie.identifier=wi(this.sliceSerialize(J)).toLowerCase()}function T(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.title=J}function C(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.url=J}function A(J){const ue=this.stack[this.stack.length-1];if(!ue.depth){const Ie=this.sliceSerialize(J).length;ue.depth=Ie}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function I(J){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function $(J){const Ie=this.stack[this.stack.length-1].children;let Be=Ie[Ie.length-1];(!Be||Be.type!=="text")&&(Be=re(),Be.position={start:to(J.start),end:void 0},Ie.push(Be)),this.stack.push(Be)}function L(J){const ue=this.stack.pop();ue.value+=this.sliceSerialize(J),ue.position.end=to(J.end)}function K(J){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=ue.children[ue.children.length-1];Ie.position.end=to(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&($.call(this,J),L.call(this,J))}function Z(){this.data.atHardBreak=!0}function q(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function z(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function j(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function F(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ue,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function U(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ue,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function P(J){const ue=this.sliceSerialize(J),Ie=this.stack[this.stack.length-2];Ie.label=uY(ue),Ie.identifier=wi(ue).toLowerCase()}function W(){const J=this.stack[this.stack.length-1],ue=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const Be=J.children;Ie.children=Be}else Ie.alt=ue}function D(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.url=J}function B(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.title=J}function G(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ie(J){const ue=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=ue,Ie.identifier=wi(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function te(J){this.data.characterReferenceType=J.type}function ne(J){const ue=this.sliceSerialize(J),Ie=this.data.characterReferenceType;let Be;Ie?(Be=KO(ue,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=$x(ue);const Ze=this.stack[this.stack.length-1];Ze.value+=Be}function le(J){const ue=this.stack.pop();ue.position.end=to(J.end)}function pe(J){L.call(this,J);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(J)}function ye(J){L.call(this,J);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(J)}function Se(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function he(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function Oe(){return{type:"heading",depth:0,children:[]}}function ve(){return{type:"break"}}function xe(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function Ce(){return{type:"link",title:null,url:"",children:[]}}function Pe(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function ge(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function fe(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function re(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function to(e){return{line:e.line,column:e.column,offset:e.offset}}function iM(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?iM(e,r):pY(e,r)}}function pY(e,t){let n;for(n in t)if(rM.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function r_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ic({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ic({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ic({start:t.start,end:t.end})+") is still open")}function hY(e){const t=this;t.parser=n;function n(r){return fY(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mY(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gY(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
44
+ `}]}function bY(e,t){const n=t.value?t.value+`
45
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function yY(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vY(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xY(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=zl(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,p);const d={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,d),e.applyData(t,d)}function kY(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SY(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function sM(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function wY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sM(e,t);const s={src:zl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function EY(e,t){const n={src:zl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function TY(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function _Y(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sM(e,t);const s={href:zl(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function RY(e,t){const n={href:zl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function CY(e,t,n){const r=e.all(t),s=n?AY(n):oM(t),a={},l=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const h=r[c];(s||c!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
46
+ `}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const p=r[r.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
47
+ `});const d={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,d),e.applyData(t,d)}function AY(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=oM(n[r])}return t}function oM(e){const t=e.spread;return t??e.children.length>1}function NY(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const 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 OY(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MY(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function IY(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DY(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Dx(t.children[1]),p=$O(t.children[t.children.length-1]);c&&p&&(l.position={start:c,end:p}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function zY(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let p=-1;const d=[];for(;++p<c;){const m=t.children[p],g={},y=l?l[p]:void 0;y&&(g.align=y);let k={type:"element",tagName:a,properties:g,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),d.push(k)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,h),e.applyData(t,h)}function LY(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const i_=9,s_=32;function jY(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(o_(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(o_(t.slice(s),s>0,!1)),a.join("")}function o_(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===i_||a===s_;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===i_||a===s_;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function PY(e,t){const n={type:"text",value:jY(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $Y(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const BY={blockquote:mY,break:gY,code:bY,delete:yY,emphasis:vY,footnoteReference:xY,heading:kY,html:SY,imageReference:wY,image:EY,inlineCode:TY,linkReference:_Y,link:RY,listItem:CY,list:NY,paragraph:OY,root:MY,strong:IY,table:DY,tableCell:LY,tableRow:zY,text:PY,thematicBreak:$Y,toml:rp,yaml:rp,definition:rp,footnoteDefinition:rp};function rp(){}const aM=-1,Wh=0,oc=1,th=2,Fx=3,Ux=4,qx=5,Hx=6,lM=7,uM=8,a_=typeof self=="object"?self:globalThis,FY=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=t[s];switch(a){case Wh:case aM:return n(l,s);case oc:{const c=n([],s);for(const p of l)c.push(r(p));return c}case th:{const c=n({},s);for(const[p,d]of l)c[r(p)]=r(d);return c}case Fx:return n(new Date(l),s);case Ux:{const{source:c,flags:p}=l;return n(new RegExp(c,p),s)}case qx:{const c=n(new Map,s);for(const[p,d]of l)c.set(r(p),r(d));return c}case Hx:{const c=n(new Set,s);for(const p of l)c.add(r(p));return c}case lM:{const{name:c,message:p}=l;return n(new a_[c](p),s)}case uM:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new a_[a](l),s)};return r},l_=e=>FY(new Map,e)(0),Xa="",{toString:UY}={},{keys:qY}=Object,Uu=e=>{const t=typeof e;if(t!=="object"||!e)return[Wh,t];const n=UY.call(e).slice(8,-1);switch(n){case"Array":return[oc,Xa];case"Object":return[th,Xa];case"Date":return[Fx,Xa];case"RegExp":return[Ux,Xa];case"Map":return[qx,Xa];case"Set":return[Hx,Xa];case"DataView":return[oc,n]}return n.includes("Array")?[oc,n]:n.includes("Error")?[lM,n]:[th,n]},ip=([e,t])=>e===Wh&&(t==="function"||t==="symbol"),HY=(e,t,n,r)=>{const s=(l,c)=>{const p=r.push(l)-1;return n.set(c,p),p},a=l=>{if(n.has(l))return n.get(l);let[c,p]=Uu(l);switch(c){case Wh:{let h=l;switch(p){case"bigint":c=uM,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);h=null;break;case"undefined":return s([aM],l)}return s([c,h],l)}case oc:{if(p){let g=l;return p==="DataView"?g=new Uint8Array(l.buffer):p==="ArrayBuffer"&&(g=new Uint8Array(l)),s([p,[...g]],l)}const h=[],m=s([c,h],l);for(const g of l)h.push(a(g));return m}case th:{if(p)switch(p){case"BigInt":return s([p,l.toString()],l);case"Boolean":case"Number":case"String":return s([p,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const g of qY(l))(e||!ip(Uu(l[g])))&&h.push([a(g),a(l[g])]);return m}case Fx:return s([c,l.toISOString()],l);case Ux:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case qx:{const h=[],m=s([c,h],l);for(const[g,y]of l)(e||!(ip(Uu(g))||ip(Uu(y))))&&h.push([a(g),a(y)]);return m}case Hx:{const h=[],m=s([c,h],l);for(const g of l)(e||!ip(Uu(g)))&&h.push(a(g));return m}}const{message:d}=l;return s([c,{name:p,message:d}],l)};return a},u_=(e,{json:t,lossy:n}={})=>{const r=[];return HY(!(t||n),!!t,new Map,r)(e),r},nh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?l_(u_(e,t)):structuredClone(e):(e,t)=>l_(u_(e,t));function GY(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function VY(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function KY(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||GY,r=e.options.footnoteBackLabel||VY,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let p=-1;for(;++p<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[p]);if(!d)continue;const h=e.all(d),m=String(d.identifier).toUpperCase(),g=zl(m.toLowerCase());let y=0;const k=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++y<=w;){k.length>0&&k.push({type:"text",value:" "});let R=typeof n=="string"?n:n(p,y);typeof R=="string"&&(R={type:"text",value:R}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,y),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const _=h[h.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const R=_.children[_.children.length-1];R&&R.type==="text"?R.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...k)}else h.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(d,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...nh(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
48
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
49
+ `}]}}const nf=(function(e){if(e==null)return XY;if(typeof e=="function")return Yh(e);if(typeof e=="object")return Array.isArray(e)?ZY(e):WY(e);if(typeof e=="string")return YY(e);throw new Error("Expected function, string, or object as test")});function ZY(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=nf(e[n]);return Yh(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function WY(e){const t=e;return Yh(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function YY(e){return Yh(t);function t(n){return n&&n.type===e}}function Yh(e){return t;function t(n,r,s){return!!(QY(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function XY(){return!0}function QY(e){return e!==null&&typeof e=="object"&&"type"in e}const cM=[],JY=!0,cv=!1,eX="skip";function fM(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=nf(s),l=r?-1:1;c(e,void 0,[])();function c(p,d,h){const m=p&&typeof p=="object"?p:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(p.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=cM,k,w,_;if((!t||a(p,d,h[h.length-1]||void 0))&&(y=tX(n(p,h)),y[0]===cv))return y;if("children"in p&&p.children){const E=p;if(E.children&&y[0]!==eX)for(w=(r?E.children.length:-1)+l,_=h.concat(E);w>-1&&w<E.children.length;){const R=E.children[w];if(k=c(R,w,_)(),k[0]===cv)return k;w=typeof k[1]=="number"?k[1]:w+l}}return y}}}function tX(e){return Array.isArray(e)?e:typeof e=="number"?[JY,e]:e==null?cM:[e]}function Xh(e,t,n,r){let s,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,s=n):(a=t,l=n,s=r),fM(e,a,c,s);function c(p,d){const h=d[d.length-1],m=h?h.children.indexOf(p):void 0;return l(p,m,h)}}const fv={}.hasOwnProperty,nX={};function rX(e,t){const n=t||nX,r=new Map,s=new Map,a=new Map,l={...BY,...n.handlers},c={all:d,applyData:sX,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:p,options:n,patch:iX,wrap:aX};return Xh(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,g=String(h.identifier).toUpperCase();m.has(g)||m.set(g,h)}}),c;function p(h,m){const g=h.type,y=c.handlers[g];if(fv.call(c.handlers,g)&&y)return y(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(g)){if("children"in h){const{children:w,..._}=h,E=nh(_);return E.children=c.all(h),E}return nh(h)}return(c.options.unknownHandler||oX)(c,h,m)}function d(h){const m=[];if("children"in h){const g=h.children;let y=-1;for(;++y<g.length;){const k=c.one(g[y],h);if(k){if(y&&g[y-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=c_(k.value)),!Array.isArray(k)&&k.type==="element")){const w=k.children[0];w&&w.type==="text"&&(w.value=c_(w.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function iX(e,t){e.position&&(t.position=VK(e))}function sX(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,nh(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function oX(e,t){const n=t.data||{},r="value"in t&&!(fv.call(n,"hProperties")||fv.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 aX(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
50
+ `});++r<e.length;)r&&n.push({type:"text",value:`
51
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
52
+ `}),n}function c_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function f_(e,t){const n=rX(e,t),r=n.one(e,void 0),s=KY(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
53
+ `},s),a}function lX(e,t){return e&&"run"in e?async function(n,r){const s=f_(n,{file:r,...t});await e.run(s,r)}:function(n,r){return f_(n,{file:r,...e||t})}}function d_(e){if(e)throw e}var Jb,p_;function uX(){if(p_)return Jb;p_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},a=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var h=e.call(d,"constructor"),m=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!h&&!m)return!1;var g;for(g in d);return typeof g>"u"||e.call(d,g)},l=function(d,h){n&&h.name==="__proto__"?n(d,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):d[h.name]=h.newValue},c=function(d,h){if(h==="__proto__")if(e.call(d,h)){if(r)return r(d,h).value}else return;return d[h]};return Jb=function p(){var d,h,m,g,y,k,w=arguments[0],_=1,E=arguments.length,R=!1;for(typeof w=="boolean"&&(R=w,w=arguments[1]||{},_=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});_<E;++_)if(d=arguments[_],d!=null)for(h in d)m=c(w,h),g=c(d,h),w!==g&&(R&&g&&(a(g)||(y=s(g)))?(y?(y=!1,k=m&&s(m)?m:[]):k=m&&a(m)?m:{},l(w,{name:h,newValue:p(R,k,g)})):typeof g<"u"&&l(w,{name:h,newValue:g}));return w},Jb}var cX=uX();const ey=oh(cX);function dv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function fX(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...s);function c(p,...d){const h=e[++a];let m=-1;if(p){l(p);return}for(;++m<s.length;)(d[m]===null||d[m]===void 0)&&(d[m]=s[m]);s=d,h?dX(h,c)(...d):l(null,...d)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function dX(e,t){let n;return r;function r(...l){const c=e.length>l.length;let p;c&&l.push(s);try{p=e.apply(this,l)}catch(d){const h=d;if(c&&n)throw h;return s(h)}c||(p&&p.then&&typeof p.then=="function"?p.then(a,s):p instanceof Error?s(p):a(p))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const zi={basename:pX,dirname:hX,extname:mX,join:gX,sep:"/"};function pX(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rf(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else l<0&&(a=!0,l=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function hX(e){if(rf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function mX(e){rf(e);let t=e.length,n=-1,r=0,s=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function gX(...e){let t=-1,n;for(;++t<e.length;)rf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bX(n)}function bX(e){rf(e);const t=e.codePointAt(0)===47;let n=yX(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function yX(e,t){let n="",r=0,s=-1,a=0,l=-1,c,p;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(s===l-1||a===1))if(s!==l-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(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",r=0):(n=n.slice(0,p),r=n.length-1-n.lastIndexOf("/")),s=l,a=0;continue}}else if(n.length>0){n="",r=0,s=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function rf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vX={cwd:xX};function xX(){return"/"}function pv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kX(e){if(typeof e=="string")e=new URL(e);else if(!pv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return SX(e)}function SX(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const ty=["history","path","basename","stem","extname","dirname"];class dM{constructor(t){let n;t?pv(t)?n={path:t}:typeof t=="string"||wX(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vX.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ty.length;){const a=ty[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)ty.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?zi.basename(this.path):void 0}set basename(t){ry(t,"basename"),ny(t,"basename"),this.path=zi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?zi.dirname(this.path):void 0}set dirname(t){h_(this.basename,"dirname"),this.path=zi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?zi.extname(this.path):void 0}set extname(t){if(ny(t,"extname"),h_(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pv(t)&&(t=kX(t)),ry(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?zi.basename(this.path,this.extname):void 0}set stem(t){ry(t,"stem"),ny(t,"stem"),this.path=zi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new br(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ny(e,t){if(e&&e.includes(zi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zi.sep+"`")}function ry(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function h_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EX=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),TX={}.hasOwnProperty;class Gx extends EX{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=fX()}copy(){const t=new Gx;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ey(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(oy("data",this.frozen),this.namespace[t]=n,this):TX.call(this.namespace,t)&&this.namespace[t]||void 0:t?(oy("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=sp(t),r=this.parser||this.Parser;return iy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),iy("process",this.parser||this.Parser),sy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=sp(t),p=r.parse(c);r.run(p,c,function(h,m,g){if(h||!m||!g)return d(h);const y=m,k=r.stringify(y,g);CX(k)?g.value=k:g.result=k,d(h,g)});function d(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),iy("processSync",this.parser||this.Parser),sy("processSync",this.compiler||this.Compiler),this.process(t,s),g_("processSync","process",n),r;function s(a,l){n=!0,d_(a),r=l}}run(t,n,r){m_(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const p=sp(n);s.run(t,p,d);function d(h,m,g){const y=m||t;h?c(h):l?l(y):r(void 0,y,g)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),g_("runSync","run",r),s;function a(l,c){d_(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=sp(n),s=this.compiler||this.Compiler;return sy("stringify",s),m_(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(oy("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(d){if(typeof d=="function")p(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...m]=d;p(h,m)}else l(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function l(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(d.plugins),d.settings&&(s.settings=ey(!0,s.settings,d.settings))}function c(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const m=d[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function p(d,h){let m=-1,g=-1;for(;++m<r.length;)if(r[m][0]===d){g=m;break}if(g===-1)r.push([d,...h]);else if(h.length>0){let[y,...k]=h;const w=r[g][1];dv(w)&&dv(y)&&(y=ey(!0,w,y)),r[g]=[d,y,...k]}}}}const _X=new Gx().freeze();function iy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function sy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function oy(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function m_(e){if(!dv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function g_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function sp(e){return RX(e)?e:new dM(e)}function RX(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function CX(e){return typeof e=="string"||AX(e)}function AX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NX="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",b_=[],y_={allowDangerousHtml:!0},OX=/^(https?|ircs?|mailto|xmpp)$/i,MX=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function IX(e){const t=DX(e),n=zX(e);return LX(t.runSync(t.parse(n),n),e)}function DX(e){const t=e.rehypePlugins||b_,n=e.remarkPlugins||b_,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...y_}:y_;return _X().use(hY).use(n).use(lX,r).use(t)}function zX(e){const t=e.children||"",n=new dM;return typeof t=="string"&&(n.value=t),n}function LX(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,p=t.urlTransform||jX;for(const h of MX)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+NX+h.id,void 0);return Xh(e,d),XK(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function d(h,m,g){if(h.type==="raw"&&g&&typeof m=="number")return l?g.children.splice(m,1):g.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in Yb)if(Object.hasOwn(Yb,y)&&Object.hasOwn(h.properties,y)){const k=h.properties[y],w=Yb[y];(w===null||w.includes(h.tagName))&&(h.properties[y]=p(String(k||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,g)),y&&g&&typeof m=="number")return c&&h.children?g.children.splice(m,1,...h.children):g.children.splice(m,1),m}}}function jX(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||OX.test(e.slice(0,t))?e:""}const v_=(function(e,t,n){const r=nf(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),ca=(function(e){if(e==null)return BX;if(typeof e=="string")return $X(e);if(typeof e=="object")return PX(e);if(typeof e=="function")return Vx(e);throw new Error("Expected function, string, or array as `test`")});function PX(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ca(e[n]);return Vx(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function $X(e){return Vx(t);function t(n){return n.tagName===e}}function Vx(e){return t;function t(n,r,s){return!!(FX(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function BX(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function FX(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const x_=/\n/g,k_=/[\t ]+/g,hv=ca("br"),S_=ca(WX),UX=ca("p"),w_=ca("tr"),qX=ca(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",ZX,YX]),pM=ca(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function HX(e,t){const n=t||{},r="children"in e?e.children:[],s=pM(e),a=gM(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...mM(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...hM(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?hv(r[c+1]):s}));const p=[];let d;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?d!==void 0&&h>d&&(d=h):h&&(d!==void 0&&d>-1&&p.push(`
54
+ `.repeat(d)||" "),d=-1,p.push(h))}return p.join("")}function hM(e,t,n){return e.type==="element"?GX(e,t,n):e.type==="text"?n.whitespace==="normal"?mM(e,n):VX(e):[]}function GX(e,t,n){const r=gM(e,n),s=e.children||[];let a=-1,l=[];if(qX(e))return l;let c,p;for(hv(e)||w_(e)&&v_(t,e,w_)?p=`
55
+ `:UX(e)?(c=2,p=2):pM(e)&&(c=1,p=1);++a<s.length;)l=l.concat(hM(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?hv(s[a+1]):p}));return S_(e)&&v_(t,e,S_)&&l.push(" "),c&&l.unshift(c),p&&l.push(p),l}function mM(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){x_.lastIndex=a;const p=x_.exec(n),d=p&&"index"in p?p.index:n.length;r.push(KX(n.slice(a,d).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,d===n.length?t.breakAfter:!0)),a=d+1}let l=-1,c;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(s.push(r[l]),c=void 0):r[l]?(typeof c=="number"&&s.push(c),s.push(r[l]),c=0):(l===0||l===r.length-1)&&s.push(0);return s}function VX(e){return[String(e.value)]}function KX(e,t,n){const r=[];let s=0,a;for(;s<e.length;){k_.lastIndex=s;const l=k_.exec(e);a=l?l.index:e.length,!s&&!a&&l&&!t&&r.push(""),s!==a&&r.push(e.slice(s,a)),s=l?a+l[0].length:a}return s!==a&&!n&&r.push(""),r.join(" ")}function gM(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function ZX(e){return!!(e.properties||{}).hidden}function WX(e){return e.tagName==="td"||e.tagName==="th"}function YX(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function XX(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(d,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],E=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:w,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},A={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[A,m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:N.concat([{begin:/\(/,end:/\)/,keywords:C,contains:N.concat(["self"]),relevance:0}]),relevance:0},H={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[d,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(I,H,A,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function QX(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=XX(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function JX(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(c);const p={match:/\\"/},d={className:"string",begin:/'/,end:/'/},h={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},g=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],y=e.SHEBANG({binary:`(${g.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],_=["true","false"],E={match:/(\/[a-z._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],A=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:_,built_in:[...R,...T,"set","shopt",...C,...A]},contains:[y,e.SHEBANG(),k,m,a,l,E,c,p,d,h,n]}}function eQ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(d,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",_={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},E=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:E.concat([{begin:/\(/,end:/\)/,keywords:_,contains:E.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(g,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:_,disableAutodetect:!0,illegal:"</",contains:[].concat(R,T,E,[m,{begin:e.IDENT_RE+"::",keywords:_},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:d,keywords:_}}}function tQ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(d,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],E=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:w,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},A={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[A,m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:N.concat([{begin:/\(/,end:/\)/,keywords:C,contains:N.concat(["self"]),relevance:0}]),relevance:0},H={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[d,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(I,H,A,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function nQ(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],l={keyword:s.concat(a),built_in:t,literal:r},c=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),p={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},h={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(h,{illegal:/\n/}),g={className:"subst",begin:/\{/,end:/\}/,keywords:l},y=e.inherit(g,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]},_=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});g.contains=[w,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,e.C_BLOCK_COMMENT_MODE],y.contains=[_,k,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const E={variants:[d,w,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},R={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",C={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},E,p,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,R,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,R,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+T+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,R],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[E,p,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C]}}const rQ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),iQ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],sQ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],oQ=[...iQ,...sQ],aQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),lQ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),uQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),cQ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function fQ(e){const t=e.regex,n=rQ(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",a=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",c=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+lQ.join("|")+")"},{begin:":(:)?("+uQ.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+cQ.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:aQ.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+oQ.join("|")+")\\b"}]}}function dQ(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function pQ(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,illegal:/["']/}]}]}}function hQ(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function mQ(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[r,a,s,l,n,"self"],relevance:0},p=/[A-Za-z0-9_-]+/,d=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(p,d,h),g=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:g,className:"attr",starts:{end:/$/,contains:[r,c,a,s,l,n]}}]}}var Ja="[0-9](_*[0-9])*",op=`\\.(${Ja})`,ap="[0-9a-fA-F](_*[0-9a-fA-F])*",E_={className:"number",variants:[{begin:`(\\b(${Ja})((${op})|\\.)?|(${op}))[eE][+-]?(${Ja})[fFdD]?\\b`},{begin:`\\b(${Ja})((${op})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${op})[fFdD]?\\b`},{begin:`\\b(${Ja})[fFdD]\\b`},{begin:`\\b0[xX]((${ap})\\.?|(${ap})?\\.(${ap}))[pP][+-]?(${Ja})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ap})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function bM(e,t,n){return n===-1?"":e.replace(t,r=>bM(e,t,n-1))}function gQ(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+bM("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},d={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,E_,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},E_,d]}}const T_="[A-Za-z$_][0-9A-Za-z$_]*",bQ=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],yQ=["true","false","null","undefined","NaN","Infinity"],yM=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],vM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],vQ=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],xQ=[].concat(xM,yM,vM);function kQ(e){const t=e.regex,n=(P,{after:W})=>{const D="</"+P[0].slice(1);return P.input.indexOf(D,W)!==-1},r=T_,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,W)=>{const D=P[0].length+P.index,B=P.input[D];if(B==="<"||B===","){W.ignoreMatch();return}B===">"&&(n(P,{after:D})||W.ignoreMatch());let G;const O=P.input.substring(D);if(G=O.match(/^\s*=/)){W.ignoreMatch();return}if((G=O.match(/^\s+extends\s+/))&&G.index===0){W.ignoreMatch();return}}},c={$pattern:T_,keyword:bQ,literal:yQ,built_in:xQ,"variable.language":vQ},p="[0-9](_?[0-9])*",d=`\\.(${p})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${d})|\\.)?|(${d}))[eE][+-]?(${p})\\b`},{begin:`\\b(${h})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},R={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,w,_,{match:/\$\d+/},m];g.contains=T.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(T)});const C=[].concat(R,g.contains),A=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A},I={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...yM,...vM]}},$={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(P){return t.concat("(?!",P.join("|"),")")}const q={match:t.concat(/\b/,Z([...xM,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},j={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:A,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),$,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,w,_,R,{match:/\$\d+/},m,H,{scope:"attr",match:r+t.lookahead(":"),relevance:0},U,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},q,K,I,j,{match:/\$[(.]/}]}}function SQ(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var el="[0-9](_*[0-9])*",lp=`\\.(${el})`,up="[0-9a-fA-F](_*[0-9a-fA-F])*",wQ={className:"number",variants:[{begin:`(\\b(${el})((${lp})|\\.)?|(${lp}))[eE][+-]?(${el})[fFdD]?\\b`},{begin:`\\b(${el})((${lp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${lp})[fFdD]?\\b`},{begin:`\\b(${el})[fFdD]\\b`},{begin:`\\b0[xX]((${up})\\.?|(${up})?\\.(${up}))[pP][+-]?(${el})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${up})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function EQ(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(l);const c={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},p={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},d=wQ,h=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},g=m;return g.variants[1].contains=[m],m.variants[1].contains=[g],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,h,n,r,c,p,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,h],relevance:0},e.C_LINE_COMMENT_MODE,h,c,p,l,e.C_NUMBER_MODE]},h]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},c,p]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
56
+ `},d]}}const TQ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),_Q=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],RQ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],CQ=[..._Q,...RQ],AQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),kM=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),SM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),NQ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),OQ=kM.concat(SM).sort().reverse();function MQ(e){const t=TQ(e),n=OQ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],p=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},d=function(T,C,A){return{className:T,begin:C,relevance:A}},h={$pattern:/[a-z-]+/,keyword:r,attribute:AQ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p("'"),p('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,d("variable","@@?"+s,10),d("variable","@\\{"+s+"\\}"),d("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const g=c.concat({begin:/\{/,end:/\}/,contains:l}),y={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(c)},k={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+NQ.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:h,returnEnd:!0,contains:c,relevance:0}},_={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:g}},E={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,d("keyword","all\\b"),d("variable","@\\{"+s+"\\}"),{begin:"\\b("+CQ.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,d("selector-tag",a,0),d("selector-id","#"+a),d("selector-class","\\."+a,0),d("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+kM.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+SM.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:g},{begin:"!important"},t.FUNCTION_DISPATCH]},R={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[E]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,_,R,k,E,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function IQ(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function DQ(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,s,a,l]}}function zQ(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,p={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},d={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(d,{contains:[]}),g=e.inherit(h,{contains:[]});d.contains.push(g),h.contains.push(m);let y=[n,p];return[d,h,m,g].forEach(E=>{E.contains=E.contains.concat(y)}),y=y.concat(d,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},n,a,d,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,p,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function LQ(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,c={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},p={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:c,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+p.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:p,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function jQ(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},l={begin:/->\{/,end:/\}/},c={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},p={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[c]},d={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},h=[e.BACKSLASH_ESCAPE,a,p],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(w,_,E="\\1")=>{const R=E==="\\1"?E:t.concat(E,_);return t.concat(t.concat("(?:",w,")"),_,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,E,r)},y=(w,_,E)=>t.concat(t.concat("(?:",w,")"),_,/(?:\\.|[^\\\/])*?/,E,r),k=[p,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:h,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},d,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:g("s|tr|y",t.either(...m,{capture:!0}))},{begin:g("s|tr|y","\\(","\\)")},{begin:g("s|tr|y","\\[","\\]")},{begin:g("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:y("(?:m|qr)?",/\//,/\//)},{begin:y("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:y("m|qr",/\(/,/\)/)},{begin:y("m|qr",/\[/,/\]/)},{begin:y("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c,d]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=k,l.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:k}}function PQ(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+r},c={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},p={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},d=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(p)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(p),"on:begin":(z,j)=>{j.data._beginMatch=z[1]||z[2]},"on:end":(z,j)=>{j.data._beginMatch!==z[1]&&j.ignoreMatch()}},g=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
57
+ ]`,k={scope:"string",variants:[h,d,m,g]},w={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},_=["false","null","true"],E=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],R=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:E,literal:(z=>{const j=[];return z.forEach(F=>{j.push(F),F.toLowerCase()===F?j.push(F.toUpperCase()):j.push(F.toLowerCase())}),j})(_),built_in:R},A=z=>z.map(j=>j.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",A(R).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},I=t.concat(r,"\\b(?!\\()"),H={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),I],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),I],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},$={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[$,l,H,e.C_BLOCK_COMMENT_MODE,k,w,N]},K={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",A(E).join("\\b|"),"|",A(R).join("\\b|"),"\\b)"),r,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(K);const Z=[$,H,e.C_BLOCK_COMMENT_MODE,k,w,N],q={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:_,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:_,keyword:["new","array"]},contains:["self",...Z]},...Z,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:C,contains:[q,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},c,{scope:"variable.language",match:/\$this\b/},l,K,H,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",q,l,H,e.C_BLOCK_COMMENT_MODE,k,w]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},k,w]}}function $Q(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function BQ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function FQ(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},p={className:"meta",begin:/^(>>>|\.\.\.) /},d={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},h={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p,h,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p,h,d]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,h,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,d]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},g="[0-9](_?[0-9])*",y=`(\\b(${g}))?\\.(${g})|\\b(${g})\\.`,k=`\\b|${r.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${g})|(${y}))[eE][+-]?(${g})[jJ]?(?=${k})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${g})[jJ](?=${k})`}]},_={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",p,w,m,e.HASH_COMMENT_MODE]}]};return d.contains=[m,w,p],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[p,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,_,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,E,m]}]}}function UQ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function qQ(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function HQ(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(r,/(::\w+)*/),l={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},c={className:"doctag",begin:"@[A-Za-z]+"},p={begin:"#<",end:">"},d=[e.COMMENT("#","$",{contains:[c]}),e.COMMENT("^=begin","^=end",{contains:[c],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],h={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,h],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,h]})]}]},g="[1-9](_?[0-9])*|0",y="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${g})(\\.(${y}))?([eE][+-]?(${y})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},N=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:l},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,h],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(p,d),relevance:0}].concat(p,d);h.contains=N,w.contains=N;const L=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:N}}];return d.unshift(p),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(d).concat(N)}}function GQ(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",c=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],p=["true","false","Some","None","Ok","Err"],d=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],h=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:h,keyword:c,literal:p,built_in:d},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:d,type:h}},{className:"punctuation",begin:"->"},a]}}const VQ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),KQ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ZQ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],WQ=[...KQ,...ZQ],YQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),XQ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),QQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),JQ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function eJ(e){const t=VQ(e),n=QQ,r=XQ,s="@[a-z-]+",a="and or not only",c={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+WQ.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+JQ.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,c,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:YQ.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},c,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function tJ(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function nJ(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],c=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],p=["add","asc","collation","desc","final","first","last","view"],d=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],h=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],m=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],g=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],y=h,k=[...d,...p].filter(A=>!h.includes(A)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},_={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function R(A){return t.concat(/\b/,t.either(...A.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:R(g),relevance:0};function C(A,{exceptions:N,when:I}={}){const H=I;return N=N||[],A.map($=>$.match(/\|\d+$/)||N.includes($)?$:H($)?`${$}|0`:$)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(k,{when:A=>A.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:R(l)},T,E,w,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,_]}}function wM(e){return e?typeof e=="string"?e:e.source:null}function qu(e){return sn("(?=",e,")")}function sn(...e){return e.map(n=>wM(n)).join("")}function rJ(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function kr(...e){return"("+(rJ(e).capture?"":"?:")+e.map(r=>wM(r)).join("|")+")"}const Kx=e=>sn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),iJ=["Protocol","Type"].map(Kx),__=["init","self"].map(Kx),sJ=["Any","Self"],ay=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],R_=["false","nil","true"],oJ=["assignment","associativity","higherThan","left","lowerThan","none","right"],aJ=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],C_=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],EM=kr(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),TM=kr(EM,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ly=sn(EM,TM,"*"),_M=kr(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),rh=kr(_M,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Di=sn(_M,rh,"*"),cp=sn(/[A-Z]/,rh,"*"),lJ=["attached","autoclosure",sn(/convention\(/,kr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",sn(/objc\(/,Di,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],uJ=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function cJ(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,kr(...iJ,...__)],className:{2:"keyword"}},a={match:sn(/\./,kr(...ay)),relevance:0},l=ay.filter(ve=>typeof ve=="string").concat(["_|0"]),c=ay.filter(ve=>typeof ve!="string").concat(sJ).map(Kx),p={variants:[{className:"keyword",match:kr(...c,...__)}]},d={$pattern:kr(/\b\w+/,/#\w+/),keyword:l.concat(aJ),literal:R_},h=[s,a,p],m={match:sn(/\./,kr(...C_)),relevance:0},g={className:"built_in",match:sn(/\b/,kr(...C_),/(?=\()/)},y=[m,g],k={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:ly},{match:`\\.(\\.|${TM})+`}]},_=[k,w],E="([0-9]_*)+",R="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${E})(\\.(${E}))?([eE][+-]?(${E}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${E}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(ve="")=>({className:"subst",variants:[{match:sn(/\\/,ve,/[0\\tnr"']/)},{match:sn(/\\/,ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),A=(ve="")=>({className:"subst",match:sn(/\\/,ve,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(ve="")=>({className:"subst",label:"interpol",begin:sn(/\\/,ve,/\(/),end:/\)/}),I=(ve="")=>({begin:sn(ve,/"""/),end:sn(/"""/,ve),contains:[C(ve),A(ve),N(ve)]}),H=(ve="")=>({begin:sn(ve,/"/),end:sn(/"/,ve),contains:[C(ve),N(ve)]}),$={className:"string",variants:[I(),I("#"),I("##"),I("###"),H(),H("#"),H("##"),H("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],K={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},Z=ve=>{const xe=sn(ve,/\//),Me=sn(/\//,ve);return{begin:xe,end:Me,contains:[...L,{scope:"comment",begin:`#(?!.*${Me})`,end:/$/}]}},q={scope:"regexp",variants:[Z("###"),Z("##"),Z("#"),K]},z={match:sn(/`/,Di,/`/)},j={className:"variable",match:/\$\d+/},F={className:"variable",match:`\\$${rh}+`},U=[z,j,F],P={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:uJ,contains:[..._,T,$]}]}},W={scope:"keyword",match:sn(/@/,kr(...lJ),qu(kr(/\(/,/\s+/)))},D={scope:"meta",match:sn(/@/,Di)},B=[P,W,D],G={match:qu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:sn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,rh,"+")},{className:"type",match:cp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:sn(/\s+&\s+/,qu(cp)),relevance:0}]},O={begin:/</,end:/>/,keywords:d,contains:[...r,...h,...B,k,G]};G.contains.push(O);const ie={match:sn(Di,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:d,contains:["self",ie,...r,q,...h,...y,..._,T,$,...U,...B,G]},ne={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,G]},le={begin:kr(qu(sn(Di,/\s*:/)),qu(sn(Di,/\s+/,Di,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Di}]},pe={begin:/\(/,end:/\)/,keywords:d,contains:[le,...r,...h,..._,T,$,...B,G,te],endsParent:!0,illegal:/["']/},ye={match:[/(func|macro)/,/\s+/,kr(z.match,Di,ly)],className:{1:"keyword",3:"title.function"},contains:[ne,pe,t],illegal:[/\[/,/%/]},Se={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ne,pe,t],illegal:/\[|%/},ze={match:[/operator/,/\s+/,ly],className:{1:"keyword",3:"title"}},he={begin:[/precedencegroup/,/\s+/,cp],className:{1:"keyword",3:"title"},contains:[G],keywords:[...oJ,...R_],end:/}/},Te={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Re={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Oe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Di,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:d,contains:[ne,...h,{begin:/:/,end:/\{/,keywords:d,contains:[{scope:"title.class.inherited",match:cp},...h],relevance:0}]};for(const ve of $.variants){const xe=ve.contains.find(Ce=>Ce.label==="interpol");xe.keywords=d;const Me=[...h,...y,..._,T,$,...U];xe.contains=[...Me,{begin:/\(/,end:/\)/,contains:["self",...Me]}]}return{name:"Swift",keywords:d,contains:[...r,ye,Se,Te,Re,Oe,ze,he,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},q,...h,...y,..._,T,$,...U,...B,G,te]}}const ih="[A-Za-z$_][0-9A-Za-z$_]*",RM=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],CM=["true","false","null","undefined","NaN","Infinity"],AM=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],NM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],OM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],MM=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],IM=[].concat(OM,AM,NM);function fJ(e){const t=e.regex,n=(P,{after:W})=>{const D="</"+P[0].slice(1);return P.input.indexOf(D,W)!==-1},r=ih,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,W)=>{const D=P[0].length+P.index,B=P.input[D];if(B==="<"||B===","){W.ignoreMatch();return}B===">"&&(n(P,{after:D})||W.ignoreMatch());let G;const O=P.input.substring(D);if(G=O.match(/^\s*=/)){W.ignoreMatch();return}if((G=O.match(/^\s+extends\s+/))&&G.index===0){W.ignoreMatch();return}}},c={$pattern:ih,keyword:RM,literal:CM,built_in:IM,"variable.language":MM},p="[0-9](_?[0-9])*",d=`\\.(${p})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${d})|\\.)?|(${d}))[eE][+-]?(${p})\\b`},{begin:`\\b(${h})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},R={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,w,_,{match:/\$\d+/},m];g.contains=T.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(T)});const C=[].concat(R,g.contains),A=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A},I={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...AM,...NM]}},$={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Z(P){return t.concat("(?!",P.join("|"),")")}const q={match:t.concat(/\b/,Z([...OM,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},j={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:A,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),$,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,w,_,R,{match:/\$\d+/},m,H,{scope:"attr",match:r+t.lookahead(":"),relevance:0},U,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},q,K,I,j,{match:/\$[(.]/}]}}function dJ(e){const t=e.regex,n=fJ(e),r=ih,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},p=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],d={$pattern:ih,keyword:RM.concat(p),literal:CM,built_in:IM.concat(s),"variable.language":MM},h={className:"meta",begin:"@"+r},m=(w,_,E)=>{const R=w.contains.findIndex(T=>T.label===_);if(R===-1)throw new Error("can not find mode to replace");w.contains.splice(R,1,E)};Object.assign(n.keywords,d),n.exports.PARAMS_CONTAINS.push(h);const g=n.contains.find(w=>w.scope==="attr"),y=Object.assign({},g,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,g,y]),n.contains=n.contains.concat([h,a,l,y]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",c);const k=n.contains.find(w=>w.label==="func.def");return k.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function pJ(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,c=/\d{1,2}(:\d{1,2}){1,2}/,p={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,s),/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(a,s),/ +/,t.either(l,c),/ *#/)}]},d={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},h={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),g=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,p,d,h,m,g,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[g]}]}}function hJ(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},c={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},p={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},d={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,l,s,e.QUOTE_STRING_MODE,p,d,c]}}function mJ(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=e.inherit(a,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"string"}),p=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),d={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,p,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,p,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[p]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:d}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function gJ(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},c=e.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),g={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},y={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},k={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},_=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},g,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},k,w,a,l],E=[..._];return E.pop(),E.push(c),y.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:_}}const bJ={arduino:QX,bash:JX,c:eQ,cpp:tQ,csharp:nQ,css:fQ,diff:dQ,go:pQ,graphql:hQ,ini:mQ,java:gQ,javascript:kQ,json:SQ,kotlin:EQ,less:MQ,lua:IQ,makefile:DQ,markdown:zQ,objectivec:LQ,perl:jQ,php:PQ,"php-template":$Q,plaintext:BQ,python:FQ,"python-repl":UQ,r:qQ,ruby:HQ,rust:GQ,scss:eJ,shell:tJ,sql:nJ,swift:cJ,typescript:dJ,vbnet:pJ,wasm:hJ,xml:mJ,yaml:gJ};var uy,A_;function yJ(){if(A_)return uy;A_=1;function e(Y){return Y instanceof Map?Y.clear=Y.delete=Y.set=function(){throw new Error("map is read-only")}:Y instanceof Set&&(Y.add=Y.clear=Y.delete=function(){throw new Error("set is read-only")}),Object.freeze(Y),Object.getOwnPropertyNames(Y).forEach(X=>{const we=Y[X],Ge=typeof we;(Ge==="object"||Ge==="function")&&!Object.isFrozen(we)&&e(we)}),Y}class t{constructor(X){X.data===void 0&&(X.data={}),this.data=X.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Y){return Y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(Y,...X){const we=Object.create(null);for(const Ge in Y)we[Ge]=Y[Ge];return X.forEach(function(Ge){for(const ct in Ge)we[ct]=Ge[ct]}),we}const s="</span>",a=Y=>!!Y.scope,l=(Y,{prefix:X})=>{if(Y.startsWith("language:"))return Y.replace("language:","language-");if(Y.includes(".")){const we=Y.split(".");return[`${X}${we.shift()}`,...we.map((Ge,ct)=>`${Ge}${"_".repeat(ct+1)}`)].join(" ")}return`${X}${Y}`};class c{constructor(X,we){this.buffer="",this.classPrefix=we.classPrefix,X.walk(this)}addText(X){this.buffer+=n(X)}openNode(X){if(!a(X))return;const we=l(X.scope,{prefix:this.classPrefix});this.span(we)}closeNode(X){a(X)&&(this.buffer+=s)}value(){return this.buffer}span(X){this.buffer+=`<span class="${X}">`}}const p=(Y={})=>{const X={children:[]};return Object.assign(X,Y),X};class d{constructor(){this.rootNode=p(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(X){this.top.children.push(X)}openNode(X){const we=p({scope:X});this.add(we),this.stack.push(we)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(X){return this.constructor._walk(X,this.rootNode)}static _walk(X,we){return typeof we=="string"?X.addText(we):we.children&&(X.openNode(we),we.children.forEach(Ge=>this._walk(X,Ge)),X.closeNode(we)),X}static _collapse(X){typeof X!="string"&&X.children&&(X.children.every(we=>typeof we=="string")?X.children=[X.children.join("")]:X.children.forEach(we=>{d._collapse(we)}))}}class h extends d{constructor(X){super(),this.options=X}addText(X){X!==""&&this.add(X)}startScope(X){this.openNode(X)}endScope(){this.closeNode()}__addSublanguage(X,we){const Ge=X.root;we&&(Ge.scope=`language:${we}`),this.add(Ge)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(Y){return Y?typeof Y=="string"?Y:Y.source:null}function g(Y){return w("(?=",Y,")")}function y(Y){return w("(?:",Y,")*")}function k(Y){return w("(?:",Y,")?")}function w(...Y){return Y.map(we=>m(we)).join("")}function _(Y){const X=Y[Y.length-1];return typeof X=="object"&&X.constructor===Object?(Y.splice(Y.length-1,1),X):{}}function E(...Y){return"("+(_(Y).capture?"":"?:")+Y.map(Ge=>m(Ge)).join("|")+")"}function R(Y){return new RegExp(Y.toString()+"|").exec("").length-1}function T(Y,X){const we=Y&&Y.exec(X);return we&&we.index===0}const C=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function A(Y,{joinWith:X}){let we=0;return Y.map(Ge=>{we+=1;const ct=we;let St=m(Ge),$e="";for(;St.length>0;){const Le=C.exec(St);if(!Le){$e+=St;break}$e+=St.substring(0,Le.index),St=St.substring(Le.index+Le[0].length),Le[0][0]==="\\"&&Le[1]?$e+="\\"+String(Number(Le[1])+ct):($e+=Le[0],Le[0]==="("&&we++)}return $e}).map(Ge=>`(${Ge})`).join(X)}const N=/\b\B/,I="[a-zA-Z]\\w*",H="[a-zA-Z_]\\w*",$="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",K="\\b(0b[01]+)",Z="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",q=(Y={})=>{const X=/^#![ ]*\//;return Y.binary&&(Y.begin=w(X,/.*\b/,Y.binary,/\b.*/)),r({scope:"meta",begin:X,end:/$/,relevance:0,"on:begin":(we,Ge)=>{we.index!==0&&Ge.ignoreMatch()}},Y)},z={begin:"\\\\[\\s\\S]",relevance:0},j={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[z]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[z]},U={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},P=function(Y,X,we={}){const Ge=r({scope:"comment",begin:Y,end:X,contains:[]},we);Ge.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ct=E("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ge.contains.push({begin:w(/[ ]+/,"(",ct,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ge},W=P("//","$"),D=P("/\\*","\\*/"),B=P("#","$"),G={scope:"number",begin:$,relevance:0},O={scope:"number",begin:L,relevance:0},ie={scope:"number",begin:K,relevance:0},te={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[z,{begin:/\[/,end:/\]/,relevance:0,contains:[z]}]},ne={scope:"title",begin:I,relevance:0},le={scope:"title",begin:H,relevance:0},pe={begin:"\\.\\s*"+H,relevance:0};var Se=Object.freeze({__proto__:null,APOS_STRING_MODE:j,BACKSLASH_ESCAPE:z,BINARY_NUMBER_MODE:ie,BINARY_NUMBER_RE:K,COMMENT:P,C_BLOCK_COMMENT_MODE:D,C_LINE_COMMENT_MODE:W,C_NUMBER_MODE:O,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(Y){return Object.assign(Y,{"on:begin":(X,we)=>{we.data._beginMatch=X[1]},"on:end":(X,we)=>{we.data._beginMatch!==X[1]&&we.ignoreMatch()}})},HASH_COMMENT_MODE:B,IDENT_RE:I,MATCH_NOTHING_RE:N,METHOD_GUARD:pe,NUMBER_MODE:G,NUMBER_RE:$,PHRASAL_WORDS_MODE:U,QUOTE_STRING_MODE:F,REGEXP_MODE:te,RE_STARTERS_RE:Z,SHEBANG:q,TITLE_MODE:ne,UNDERSCORE_IDENT_RE:H,UNDERSCORE_TITLE_MODE:le});function ze(Y,X){Y.input[Y.index-1]==="."&&X.ignoreMatch()}function he(Y,X){Y.className!==void 0&&(Y.scope=Y.className,delete Y.className)}function Te(Y,X){X&&Y.beginKeywords&&(Y.begin="\\b("+Y.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Y.__beforeBegin=ze,Y.keywords=Y.keywords||Y.beginKeywords,delete Y.beginKeywords,Y.relevance===void 0&&(Y.relevance=0))}function Re(Y,X){Array.isArray(Y.illegal)&&(Y.illegal=E(...Y.illegal))}function Oe(Y,X){if(Y.match){if(Y.begin||Y.end)throw new Error("begin & end are not supported with match");Y.begin=Y.match,delete Y.match}}function ve(Y,X){Y.relevance===void 0&&(Y.relevance=1)}const xe=(Y,X)=>{if(!Y.beforeMatch)return;if(Y.starts)throw new Error("beforeMatch cannot be used with starts");const we=Object.assign({},Y);Object.keys(Y).forEach(Ge=>{delete Y[Ge]}),Y.keywords=we.keywords,Y.begin=w(we.beforeMatch,g(we.begin)),Y.starts={relevance:0,contains:[Object.assign(we,{endsParent:!0})]},Y.relevance=0,delete we.beforeMatch},Me=["of","and","for","in","not","or","if","then","parent","list","value"],Ce="keyword";function Pe(Y,X,we=Ce){const Ge=Object.create(null);return typeof Y=="string"?ct(we,Y.split(" ")):Array.isArray(Y)?ct(we,Y):Object.keys(Y).forEach(function(St){Object.assign(Ge,Pe(Y[St],X,St))}),Ge;function ct(St,$e){X&&($e=$e.map(Le=>Le.toLowerCase())),$e.forEach(function(Le){const qe=Le.split("|");Ge[qe[0]]=[St,ge(qe[0],qe[1])]})}}function ge(Y,X){return X?Number(X):fe(Y)?0:1}function fe(Y){return Me.includes(Y.toLowerCase())}const oe={},re=Y=>{console.error(Y)},_e=(Y,...X)=>{console.log(`WARN: ${Y}`,...X)},J=(Y,X)=>{oe[`${Y}/${X}`]||(console.log(`Deprecated as of ${Y}. ${X}`),oe[`${Y}/${X}`]=!0)},ue=new Error;function Ie(Y,X,{key:we}){let Ge=0;const ct=Y[we],St={},$e={};for(let Le=1;Le<=X.length;Le++)$e[Le+Ge]=ct[Le],St[Le+Ge]=!0,Ge+=R(X[Le-1]);Y[we]=$e,Y[we]._emit=St,Y[we]._multi=!0}function Be(Y){if(Array.isArray(Y.begin)){if(Y.skip||Y.excludeBegin||Y.returnBegin)throw re("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ue;if(typeof Y.beginScope!="object"||Y.beginScope===null)throw re("beginScope must be object"),ue;Ie(Y,Y.begin,{key:"beginScope"}),Y.begin=A(Y.begin,{joinWith:""})}}function Ze(Y){if(Array.isArray(Y.end)){if(Y.skip||Y.excludeEnd||Y.returnEnd)throw re("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ue;if(typeof Y.endScope!="object"||Y.endScope===null)throw re("endScope must be object"),ue;Ie(Y,Y.end,{key:"endScope"}),Y.end=A(Y.end,{joinWith:""})}}function Ye(Y){Y.scope&&typeof Y.scope=="object"&&Y.scope!==null&&(Y.beginScope=Y.scope,delete Y.scope)}function ot(Y){Ye(Y),typeof Y.beginScope=="string"&&(Y.beginScope={_wrap:Y.beginScope}),typeof Y.endScope=="string"&&(Y.endScope={_wrap:Y.endScope}),Be(Y),Ze(Y)}function it(Y){function X($e,Le){return new RegExp(m($e),"m"+(Y.case_insensitive?"i":"")+(Y.unicodeRegex?"u":"")+(Le?"g":""))}class we{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Le,qe){qe.position=this.position++,this.matchIndexes[this.matchAt]=qe,this.regexes.push([qe,Le]),this.matchAt+=R(Le)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Le=this.regexes.map(qe=>qe[1]);this.matcherRe=X(A(Le,{joinWith:"|"}),!0),this.lastIndex=0}exec(Le){this.matcherRe.lastIndex=this.lastIndex;const qe=this.matcherRe.exec(Le);if(!qe)return null;const Wt=qe.findIndex((Dt,Kn)=>Kn>0&&Dt!==void 0),tt=this.matchIndexes[Wt];return qe.splice(0,Wt),Object.assign(qe,tt)}}class Ge{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Le){if(this.multiRegexes[Le])return this.multiRegexes[Le];const qe=new we;return this.rules.slice(Le).forEach(([Wt,tt])=>qe.addRule(Wt,tt)),qe.compile(),this.multiRegexes[Le]=qe,qe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Le,qe){this.rules.push([Le,qe]),qe.type==="begin"&&this.count++}exec(Le){const qe=this.getMatcher(this.regexIndex);qe.lastIndex=this.lastIndex;let Wt=qe.exec(Le);if(this.resumingScanAtSamePosition()&&!(Wt&&Wt.index===this.lastIndex)){const tt=this.getMatcher(0);tt.lastIndex=this.lastIndex+1,Wt=tt.exec(Le)}return Wt&&(this.regexIndex+=Wt.position+1,this.regexIndex===this.count&&this.considerAll()),Wt}}function ct($e){const Le=new Ge;return $e.contains.forEach(qe=>Le.addRule(qe.begin,{rule:qe,type:"begin"})),$e.terminatorEnd&&Le.addRule($e.terminatorEnd,{type:"end"}),$e.illegal&&Le.addRule($e.illegal,{type:"illegal"}),Le}function St($e,Le){const qe=$e;if($e.isCompiled)return qe;[he,Oe,ot,xe].forEach(tt=>tt($e,Le)),Y.compilerExtensions.forEach(tt=>tt($e,Le)),$e.__beforeBegin=null,[Te,Re,ve].forEach(tt=>tt($e,Le)),$e.isCompiled=!0;let Wt=null;return typeof $e.keywords=="object"&&$e.keywords.$pattern&&($e.keywords=Object.assign({},$e.keywords),Wt=$e.keywords.$pattern,delete $e.keywords.$pattern),Wt=Wt||/\w+/,$e.keywords&&($e.keywords=Pe($e.keywords,Y.case_insensitive)),qe.keywordPatternRe=X(Wt,!0),Le&&($e.begin||($e.begin=/\B|\b/),qe.beginRe=X(qe.begin),!$e.end&&!$e.endsWithParent&&($e.end=/\B|\b/),$e.end&&(qe.endRe=X(qe.end)),qe.terminatorEnd=m(qe.end)||"",$e.endsWithParent&&Le.terminatorEnd&&(qe.terminatorEnd+=($e.end?"|":"")+Le.terminatorEnd)),$e.illegal&&(qe.illegalRe=X($e.illegal)),$e.contains||($e.contains=[]),$e.contains=[].concat(...$e.contains.map(function(tt){return vt(tt==="self"?$e:tt)})),$e.contains.forEach(function(tt){St(tt,qe)}),$e.starts&&St($e.starts,Le),qe.matcher=ct(qe),qe}if(Y.compilerExtensions||(Y.compilerExtensions=[]),Y.contains&&Y.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Y.classNameAliases=r(Y.classNameAliases||{}),St(Y)}function nt(Y){return Y?Y.endsWithParent||nt(Y.starts):!1}function vt(Y){return Y.variants&&!Y.cachedVariants&&(Y.cachedVariants=Y.variants.map(function(X){return r(Y,{variants:null},X)})),Y.cachedVariants?Y.cachedVariants:nt(Y)?r(Y,{starts:Y.starts?r(Y.starts):null}):Object.isFrozen(Y)?r(Y):Y}var st="11.11.1";class xt extends Error{constructor(X,we){super(X),this.name="HTMLInjectionError",this.html=we}}const We=n,Ot=r,Fe=Symbol("nomatch"),Ke=7,ht=function(Y){const X=Object.create(null),we=Object.create(null),Ge=[];let ct=!0;const St="Could not find the language '{}', did you forget to load/include a language module?",$e={disableAutodetect:!0,name:"Plain text",contains:[]};let Le={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function qe(De){return Le.noHighlightRe.test(De)}function Wt(De){let at=De.className+" ";at+=De.parentNode?De.parentNode.className:"";const Mt=Le.languageDetectRe.exec(at);if(Mt){const Yt=yr(Mt[1]);return Yt||(_e(St.replace("{}",Mt[1])),_e("Falling back to no-highlight mode for this block.",De)),Yt?Mt[1]:"no-highlight"}return at.split(/\s+/).find(Yt=>qe(Yt)||yr(Yt))}function tt(De,at,Mt){let Yt="",On="";typeof at=="object"?(Yt=De,Mt=at.ignoreIllegals,On=at.language):(J("10.7.0","highlight(lang, code, ...args) has been deprecated."),J("10.7.0",`Please use highlight(code, options) instead.
58
+ https://github.com/highlightjs/highlight.js/issues/2277`),On=De,Yt=at),Mt===void 0&&(Mt=!0);const lr={code:Yt,language:On};ko("before:highlight",lr);const $r=lr.result?lr.result:Dt(lr.language,lr.code,Mt);return $r.code=lr.code,ko("after:highlight",$r),$r}function Dt(De,at,Mt,Yt){const On=Object.create(null);function lr(Ue,Je){return Ue.keywords[Je]}function $r(){if(!mt.keywords){jn.addText(Xt);return}let Ue=0;mt.keywordPatternRe.lastIndex=0;let Je=mt.keywordPatternRe.exec(Xt),Tt="";for(;Je;){Tt+=Xt.substring(Ue,Je.index);const Pt=er.case_insensitive?Je[0].toLowerCase():Je[0],kn=lr(mt,Pt);if(kn){const[Qr,Fl]=kn;if(jn.addText(Tt),Tt="",On[Pt]=(On[Pt]||0)+1,On[Pt]<=Ke&&(Ns+=Fl),Qr.startsWith("_"))Tt+=Je[0];else{const pf=er.classNameAliases[Qr]||Qr;Br(Je[0],pf)}}else Tt+=Je[0];Ue=mt.keywordPatternRe.lastIndex,Je=mt.keywordPatternRe.exec(Xt)}Tt+=Xt.substring(Ue),jn.addText(Tt)}function Tr(){if(Xt==="")return;let Ue=null;if(typeof mt.subLanguage=="string"){if(!X[mt.subLanguage]){jn.addText(Xt);return}Ue=Dt(mt.subLanguage,Xt,!0,df[mt.subLanguage]),df[mt.subLanguage]=Ue._top}else Ue=Qn(Xt,mt.subLanguage.length?mt.subLanguage:null);mt.relevance>0&&(Ns+=Ue.relevance),jn.__addSublanguage(Ue._emitter,Ue.language)}function cn(){mt.subLanguage!=null?Tr():$r(),Xt=""}function Br(Ue,Je){Ue!==""&&(jn.startScope(Je),jn.addText(Ue),jn.endScope())}function cf(Ue,Je){let Tt=1;const Pt=Je.length-1;for(;Tt<=Pt;){if(!Ue._emit[Tt]){Tt++;continue}const kn=er.classNameAliases[Ue[Tt]]||Ue[Tt],Qr=Je[Tt];kn?Br(Qr,kn):(Xt=Qr,$r(),Xt=""),Tt++}}function pa(Ue,Je){return Ue.scope&&typeof Ue.scope=="string"&&jn.openNode(er.classNameAliases[Ue.scope]||Ue.scope),Ue.beginScope&&(Ue.beginScope._wrap?(Br(Xt,er.classNameAliases[Ue.beginScope._wrap]||Ue.beginScope._wrap),Xt=""):Ue.beginScope._multi&&(cf(Ue.beginScope,Je),Xt="")),mt=Object.create(Ue,{parent:{value:mt}}),mt}function Pl(Ue,Je,Tt){let Pt=T(Ue.endRe,Tt);if(Pt){if(Ue["on:end"]){const kn=new t(Ue);Ue["on:end"](Je,kn),kn.isMatchIgnored&&(Pt=!1)}if(Pt){for(;Ue.endsParent&&Ue.parent;)Ue=Ue.parent;return Ue}}if(Ue.endsWithParent)return Pl(Ue.parent,Je,Tt)}function ha(Ue){return mt.matcher.regexIndex===0?(Xt+=Ue[0],1):(Os=!0,0)}function Qh(Ue){const Je=Ue[0],Tt=Ue.rule,Pt=new t(Tt),kn=[Tt.__beforeBegin,Tt["on:begin"]];for(const Qr of kn)if(Qr&&(Qr(Ue,Pt),Pt.isMatchIgnored))return ha(Je);return Tt.skip?Xt+=Je:(Tt.excludeBegin&&(Xt+=Je),cn(),!Tt.returnBegin&&!Tt.excludeBegin&&(Xt=Je)),pa(Tt,Ue),Tt.returnBegin?0:Je.length}function _r(Ue){const Je=Ue[0],Tt=at.substring(Ue.index),Pt=Pl(mt,Ue,Tt);if(!Pt)return Fe;const kn=mt;mt.endScope&&mt.endScope._wrap?(cn(),Br(Je,mt.endScope._wrap)):mt.endScope&&mt.endScope._multi?(cn(),cf(mt.endScope,Ue)):kn.skip?Xt+=Je:(kn.returnEnd||kn.excludeEnd||(Xt+=Je),cn(),kn.excludeEnd&&(Xt=Je));do mt.scope&&jn.closeNode(),!mt.skip&&!mt.subLanguage&&(Ns+=mt.relevance),mt=mt.parent;while(mt!==Pt.parent);return Pt.starts&&pa(Pt.starts,Ue),kn.returnEnd?0:Je.length}function $l(){const Ue=[];for(let Je=mt;Je!==er;Je=Je.parent)Je.scope&&Ue.unshift(Je.scope);Ue.forEach(Je=>jn.openNode(Je))}let So={};function ma(Ue,Je){const Tt=Je&&Je[0];if(Xt+=Ue,Tt==null)return cn(),0;if(So.type==="begin"&&Je.type==="end"&&So.index===Je.index&&Tt===""){if(Xt+=at.slice(Je.index,Je.index+1),!ct){const Pt=new Error(`0 width match regex (${De})`);throw Pt.languageName=De,Pt.badRule=So.rule,Pt}return 1}if(So=Je,Je.type==="begin")return Qh(Je);if(Je.type==="illegal"&&!Mt){const Pt=new Error('Illegal lexeme "'+Tt+'" for mode "'+(mt.scope||"<unnamed>")+'"');throw Pt.mode=mt,Pt}else if(Je.type==="end"){const Pt=_r(Je);if(Pt!==Fe)return Pt}if(Je.type==="illegal"&&Tt==="")return Xt+=`
59
+ `,1;if(Bl>1e5&&Bl>Je.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Xt+=Tt,Tt.length}const er=yr(De);if(!er)throw re(St.replace("{}",De)),new Error('Unknown language: "'+De+'"');const ff=it(er);let ga="",mt=Yt||ff;const df={},jn=new Le.__emitter(Le);$l();let Xt="",Ns=0,Ki=0,Bl=0,Os=!1;try{if(er.__emitTokens)er.__emitTokens(at,jn);else{for(mt.matcher.considerAll();;){Bl++,Os?Os=!1:mt.matcher.considerAll(),mt.matcher.lastIndex=Ki;const Ue=mt.matcher.exec(at);if(!Ue)break;const Je=at.substring(Ki,Ue.index),Tt=ma(Je,Ue);Ki=Ue.index+Tt}ma(at.substring(Ki))}return jn.finalize(),ga=jn.toHTML(),{language:De,value:ga,relevance:Ns,illegal:!1,_emitter:jn,_top:mt}}catch(Ue){if(Ue.message&&Ue.message.includes("Illegal"))return{language:De,value:We(at),illegal:!0,relevance:0,_illegalBy:{message:Ue.message,index:Ki,context:at.slice(Ki-100,Ki+100),mode:Ue.mode,resultSoFar:ga},_emitter:jn};if(ct)return{language:De,value:We(at),illegal:!1,relevance:0,errorRaised:Ue,_emitter:jn,_top:mt};throw Ue}}function Kn(De){const at={value:We(De),illegal:!1,relevance:0,_top:$e,_emitter:new Le.__emitter(Le)};return at._emitter.addText(De),at}function Qn(De,at){at=at||Le.languages||Object.keys(X);const Mt=Kn(De),Yt=at.filter(yr).filter(Cs).map(cn=>Dt(cn,De,!1));Yt.unshift(Mt);const On=Yt.sort((cn,Br)=>{if(cn.relevance!==Br.relevance)return Br.relevance-cn.relevance;if(cn.language&&Br.language){if(yr(cn.language).supersetOf===Br.language)return 1;if(yr(Br.language).supersetOf===cn.language)return-1}return 0}),[lr,$r]=On,Tr=lr;return Tr.secondBest=$r,Tr}function Tn(De,at,Mt){const Yt=at&&we[at]||Mt;De.classList.add("hljs"),De.classList.add(`language-${Yt}`)}function an(De){let at=null;const Mt=Wt(De);if(qe(Mt))return;if(ko("before:highlightElement",{el:De,language:Mt}),De.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",De);return}if(De.children.length>0&&(Le.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(De)),Le.throwUnescapedHTML))throw new xt("One of your code blocks includes unescaped HTML.",De.innerHTML);at=De;const Yt=at.textContent,On=Mt?tt(Yt,{language:Mt,ignoreIllegals:!0}):Qn(Yt);De.innerHTML=On.value,De.dataset.highlighted="yes",Tn(De,Mt,On.language),De.result={language:On.language,re:On.relevance,relevance:On.relevance},On.secondBest&&(De.secondBest={language:On.secondBest.language,relevance:On.secondBest.relevance}),ko("after:highlightElement",{el:De,result:On,text:Yt})}function Jn(De){Le=Ot(Le,De)}const Hi=()=>{da(),J("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ll(){da(),J("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let af=!1;function da(){function De(){da()}if(document.readyState==="loading"){af||window.addEventListener("DOMContentLoaded",De,!1),af=!0;return}document.querySelectorAll(Le.cssSelector).forEach(an)}function lf(De,at){let Mt=null;try{Mt=at(Y)}catch(Yt){if(re("Language definition for '{}' could not be registered.".replace("{}",De)),ct)re(Yt);else throw Yt;Mt=$e}Mt.name||(Mt.name=De),X[De]=Mt,Mt.rawDefinition=at.bind(null,Y),Mt.aliases&&Gi(Mt.aliases,{languageName:De})}function xo(De){delete X[De];for(const at of Object.keys(we))we[at]===De&&delete we[at]}function jl(){return Object.keys(X)}function yr(De){return De=(De||"").toLowerCase(),X[De]||X[we[De]]}function Gi(De,{languageName:at}){typeof De=="string"&&(De=[De]),De.forEach(Mt=>{we[Mt.toLowerCase()]=at})}function Cs(De){const at=yr(De);return at&&!at.disableAutodetect}function As(De){De["before:highlightBlock"]&&!De["before:highlightElement"]&&(De["before:highlightElement"]=at=>{De["before:highlightBlock"](Object.assign({block:at.el},at))}),De["after:highlightBlock"]&&!De["after:highlightElement"]&&(De["after:highlightElement"]=at=>{De["after:highlightBlock"](Object.assign({block:at.el},at))})}function Ln(De){As(De),Ge.push(De)}function uf(De){const at=Ge.indexOf(De);at!==-1&&Ge.splice(at,1)}function ko(De,at){const Mt=De;Ge.forEach(function(Yt){Yt[Mt]&&Yt[Mt](at)})}function Vi(De){return J("10.7.0","highlightBlock will be removed entirely in v12.0"),J("10.7.0","Please use highlightElement now."),an(De)}Object.assign(Y,{highlight:tt,highlightAuto:Qn,highlightAll:da,highlightElement:an,highlightBlock:Vi,configure:Jn,initHighlighting:Hi,initHighlightingOnLoad:Ll,registerLanguage:lf,unregisterLanguage:xo,listLanguages:jl,getLanguage:yr,registerAliases:Gi,autoDetection:Cs,inherit:Ot,addPlugin:Ln,removePlugin:uf}),Y.debugMode=function(){ct=!1},Y.safeMode=function(){ct=!0},Y.versionString=st,Y.regex={concat:w,lookahead:g,either:E,optional:k,anyNumberOfTimes:y};for(const De in Se)typeof Se[De]=="object"&&e(Se[De]);return Object.assign(Y,Se),Y},Xe=ht({});return Xe.newInstance=()=>ht({}),uy=Xe,Xe.HighlightJS=Xe,Xe.default=Xe,uy}var vJ=yJ();const xJ=oh(vJ),N_={},kJ="hljs-";function SJ(e){const t=xJ.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(p,d,h){const m=h||N_,g=typeof m.prefix=="string"?m.prefix:kJ;if(!t.getLanguage(p))throw new Error("Unknown language: `"+p+"` is not registered");t.configure({__emitter:wJ,classPrefix:g});const y=t.highlight(d,{ignoreIllegals:!0,language:p});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const k=y._emitter.root,w=k.data;return w.language=y.language,w.relevance=y.relevance,k}function r(p,d){const m=(d||N_).subset||s();let g=-1,y=0,k;for(;++g<m.length;){const w=m[g];if(!t.getLanguage(w))continue;const _=n(w,p,d);_.data&&_.data.relevance!==void 0&&_.data.relevance>y&&(y=_.data.relevance,k=_)}return k||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(p,d){if(typeof p=="string")t.registerLanguage(p,d);else{let h;for(h in p)Object.hasOwn(p,h)&&t.registerLanguage(h,p[h])}}function l(p,d){if(typeof p=="string")t.registerAliases(typeof d=="string"?d:[...d],{languageName:p});else{let h;for(h in p)if(Object.hasOwn(p,h)){const m=p[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(p){return!!t.getLanguage(p)}}class wJ{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],s=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):r.children.push(...s)}openNode(t){const n=this,r=t.split(".").map(function(l,c){return c?l+"_".repeat(c):n.options.classPrefix+l}),s=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};s.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const EJ={};function TJ(e){const t=e||EJ,n=t.aliases,r=t.detect||!1,s=t.languages||bJ,a=t.plainText,l=t.prefix,c=t.subset;let p="hljs";const d=SJ(s);if(n&&d.registerAlias(n),l){const h=l.indexOf("-");p=h===-1?l:l.slice(0,h)}return function(h,m){Xh(h,"element",function(g,y,k){if(g.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const w=_J(g);if(w===!1||!w&&!r||w&&a&&a.includes(w))return;Array.isArray(g.properties.className)||(g.properties.className=[]),g.properties.className.includes(p)||g.properties.className.unshift(p);const _=HX(g,{whitespace:"pre"});let E;try{E=w?d.highlight(w,_,{prefix:l}):d.highlightAuto(_,{prefix:l,subset:c})}catch(R){const T=R;if(w&&/Unknown language/.test(T.message)){m.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[k,g],cause:T,place:g.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!w&&E.data&&E.data.language&&g.properties.className.push("language-"+E.data.language),E.children.length>0&&(g.children=E.children)})}}function _J(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!r&&s.slice(0,5)==="lang-"&&(r=s.slice(5)),!r&&s.slice(0,9)==="language-"&&(r=s.slice(9))}return r}function O_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function RJ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function CJ(e,t,n){const s=nf((n||{}).ignore||[]),a=AJ(t);let l=-1;for(;++l<a.length;)fM(e,"text",c);function c(d,h){let m=-1,g;for(;++m<h.length;){const y=h[m],k=g?g.children:void 0;if(s(y,k?k.indexOf(y):void 0,g))return;g=y}if(g)return p(d,h)}function p(d,h){const m=h[h.length-1],g=a[l][0],y=a[l][1];let k=0;const _=m.children.indexOf(d);let E=!1,R=[];g.lastIndex=0;let T=g.exec(d.value);for(;T;){const C=T.index,A={index:T.index,input:T.input,stack:[...h,d]};let N=y(...T,A);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?g.lastIndex=C+1:(k!==C&&R.push({type:"text",value:d.value.slice(k,C)}),Array.isArray(N)?R.push(...N):N&&R.push(N),k=C+T[0].length,E=!0),!g.global)break;T=g.exec(d.value)}return E?(k<d.value.length&&R.push({type:"text",value:d.value.slice(k)}),m.children.splice(_,1,...R)):R=[d],_+R.length}}function AJ(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([NJ(s[0]),OJ(s[1])])}return t}function NJ(e){return typeof e=="string"?new RegExp(RJ(e),"g"):e}function OJ(e){return typeof e=="function"?e:function(){return e}}const cy="phrasing",fy=["autolink","link","image","label"];function MJ(){return{transforms:[$J],enter:{literalAutolink:DJ,literalAutolinkEmail:dy,literalAutolinkHttp:dy,literalAutolinkWww:dy},exit:{literalAutolink:PJ,literalAutolinkEmail:jJ,literalAutolinkHttp:zJ,literalAutolinkWww:LJ}}}function IJ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cy,notInConstruct:fy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cy,notInConstruct:fy},{character:":",before:"[ps]",after:"\\/",inConstruct:cy,notInConstruct:fy}]}}function DJ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function dy(e){this.config.enter.autolinkProtocol.call(this,e)}function zJ(e){this.config.exit.autolinkProtocol.call(this,e)}function LJ(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function jJ(e){this.config.exit.autolinkEmail.call(this,e)}function PJ(e){this.exit(e)}function $J(e){CJ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,BJ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FJ]],{ignore:["link","linkReference"]})}function BJ(e,t,n,r,s){let a="";if(!DM(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!UJ(n)))return!1;const l=qJ(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function FJ(e,t,n,r){return!DM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function UJ(e){const 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 qJ(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=O_(e,"(");let a=O_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function DM(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||na(n)||Kh(n))&&(!t||n!==47)}zM.peek=QJ;function HJ(){this.buffer()}function GJ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function VJ(){this.buffer()}function KJ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ZJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=wi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WJ(e){this.exit(e)}function YJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=wi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function XJ(e){this.exit(e)}function QJ(){return"["}function zM(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=s.move("]"),a}function JJ(){return{enter:{gfmFootnoteCallString:HJ,gfmFootnoteCall:GJ,gfmFootnoteDefinitionLabelString:VJ,gfmFootnoteDefinition:KJ},exit:{gfmFootnoteCallString:ZJ,gfmFootnoteCall:WJ,gfmFootnoteDefinitionLabelString:YJ,gfmFootnoteDefinition:XJ}}}function eee(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:zM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let p=c.move("[^");const d=a.enter("footnoteDefinition"),h=a.enter("label");return p+=c.move(a.safe(a.associationId(r),{before:p,after:"]"})),h(),p+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),p+=c.move((t?`
60
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?LM:tee))),d(),p}}function tee(e,t,n){return t===0?e:LM(e,t,n)}function LM(e,t,n){return(n?"":" ")+e}const nee=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jM.peek=aee;function ree(){return{canContainEols:["delete"],enter:{strikethrough:see},exit:{strikethrough:oee}}}function iee(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:nee}],handlers:{delete:jM}}}function see(e){this.enter({type:"delete",children:[]},e)}function oee(e){this.exit(e)}function jM(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),a(),l}function aee(){return"~"}function lee(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||cee,s=[],a=[],l=[],c=[];let p=0,d=-1;for(;++d<e.length;){const k=[],w=[];let _=-1;for(e[d].length>p&&(p=e[d].length);++_<e[d].length;){const E=uee(e[d][_]);if(t.alignDelimiters!==!1){const R=r(E);w[_]=R,(c[_]===void 0||R>c[_])&&(c[_]=R)}k.push(E)}a[d]=k,l[d]=w}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<p;)s[h]=M_(n[h]);else{const k=M_(n);for(;++h<p;)s[h]=k}h=-1;const m=[],g=[];for(;++h<p;){const k=s[h];let w="",_="";k===99?(w=":",_=":"):k===108?w=":":k===114&&(_=":");let E=t.alignDelimiters===!1?1:Math.max(1,c[h]-w.length-_.length);const R=w+"-".repeat(E)+_;t.alignDelimiters!==!1&&(E=w.length+E+_.length,E>c[h]&&(c[h]=E),g[h]=E),m[h]=R}a.splice(1,0,m),l.splice(1,0,g),d=-1;const y=[];for(;++d<a.length;){const k=a[d],w=l[d];h=-1;const _=[];for(;++h<p;){const E=k[h]||"";let R="",T="";if(t.alignDelimiters!==!1){const C=c[h]-(w[h]||0),A=s[h];A===114?R=" ".repeat(C):A===99?C%2?(R=" ".repeat(C/2+.5),T=" ".repeat(C/2-.5)):(R=" ".repeat(C/2),T=R):T=" ".repeat(C)}t.delimiterStart!==!1&&!h&&_.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&E==="")&&(t.delimiterStart!==!1||h)&&_.push(" "),t.alignDelimiters!==!1&&_.push(R),_.push(E),t.alignDelimiters!==!1&&_.push(T),t.padding!==!1&&_.push(" "),(t.delimiterEnd!==!1||h!==p-1)&&_.push("|")}y.push(t.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return y.join(`
61
+ `)}function uee(e){return e==null?"":String(e)}function cee(e){return e.length}function M_(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function fee(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),dee);return s(),l}function dee(e,t,n){return">"+(n?"":" ")+e}function pee(e,t){return I_(e,t.inConstruct,!0)&&!I_(e,t.notInConstruct,!1)}function I_(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 D_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
62
+ `&&pee(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
63
+ `}function hee(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>l&&(l=a):a=1,s=r+t.length,r=n.indexOf(t,s);return l}function mee(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 gee(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function bee(e,t,n,r){const s=gee(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(mee(e,n)){const m=n.enter("codeIndented"),g=n.indentLines(a,yee);return m(),g}const c=n.createTracker(r),p=s.repeat(Math.max(hee(a,s)+1,3)),d=n.enter("codeFenced");let h=c.move(p);if(e.lang){const m=n.enter(`codeFencedLang${l}`);h+=c.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,{before:h,after:`
64
+ `,encode:["`"],...c.current()})),m()}return h+=c.move(`
65
+ `),a&&(h+=c.move(a+`
66
+ `)),h+=c.move(p),d(),h}function yee(e,t,n){return(n?"":" ")+e}function Zx(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function vee(e,t,n,r){const s=Zx(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const p=n.createTracker(r);let d=p.move("[");return d+=p.move(n.safe(n.associationId(e),{before:d,after:"]",...p.current()})),d+=p.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(n.safe(e.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(c=n.enter("destinationRaw"),d+=p.move(n.safe(e.url,{before:d,after:e.title?" ":`
67
+ `,...p.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=p.move(" "+s),d+=p.move(n.safe(e.title,{before:d,after:s,...p.current()})),d+=p.move(s),c()),l(),d}function xee(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Mc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function sh(e,t,n){const r=_l(e),s=_l(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}PM.peek=kee;function PM(e,t,n,r){const s=xee(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let p=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=p.charCodeAt(0),h=sh(r.before.charCodeAt(r.before.length-1),d,s);h.inside&&(p=Mc(d)+p.slice(1));const m=p.charCodeAt(p.length-1),g=sh(r.after.charCodeAt(0),m,s);g.inside&&(p=p.slice(0,-1)+Mc(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+p+y}function kee(e,t,n){return n.options.emphasis||"*"}function See(e,t){let n=!1;return Xh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,cv}),!!((!e.depth||e.depth<3)&&Px(e)&&(t.options.setext||n))}function wee(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(See(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),g=n.containerPhrasing(e,{...a.current(),before:`
68
+ `,after:`
69
+ `});return m(),h(),g+`
70
+ `+(s===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
71
+ `))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),p=n.enter("phrasing");a.move(l+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
72
+ `,...a.current()});return/^[\t ]/.test(d)&&(d=Mc(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,n.options.closeAtx&&(d+=" "+l),p(),c(),d}$M.peek=Eee;function $M(e){return e.value||""}function Eee(){return"<"}BM.peek=Tee;function BM(e,t,n,r){const s=Zx(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const p=n.createTracker(r);let d=p.move("![");return d+=p.move(n.safe(e.alt,{before:d,after:"]",...p.current()})),d+=p.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(n.safe(e.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(c=n.enter("destinationRaw"),d+=p.move(n.safe(e.url,{before:d,after:e.title?" ":")",...p.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=p.move(" "+s),d+=p.move(n.safe(e.title,{before:d,after:s,...p.current()})),d+=p.move(s),c()),d+=p.move(")"),l(),d}function Tee(){return"!"}FM.peek=_ee;function FM(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let p=c.move("![");const d=n.safe(e.alt,{before:p,after:"]",...c.current()});p+=c.move(d+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:p,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!d||d!==m?p+=c.move(m+"]"):s==="shortcut"?p=p.slice(0,-1):p+=c.move("]"),p}function _ee(){return"!"}UM.peek=Ree;function UM(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let p;if(l.atBreak)for(;p=c.exec(r);){let d=p.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(p.index+1)}}return s+r+s}function Ree(){return"`"}function qM(e,t){const n=Px(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))}HM.peek=Cee;function HM(e,t,n,r){const s=Zx(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,p;if(qM(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=h,m}c=n.enter("link"),p=n.enter("label");let d=l.move("[");return d+=l.move(n.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(p=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),p(),e.title&&(p=n.enter(`title${a}`),d+=l.move(" "+s),d+=l.move(n.safe(e.title,{before:d,after:s,...l.current()})),d+=l.move(s),p()),d+=l.move(")"),c(),d}function Cee(e,t,n){return qM(e,n)?"<":"["}GM.peek=Aee;function GM(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let p=c.move("[");const d=n.containerPhrasing(e,{before:p,after:"]",...c.current()});p+=c.move(d+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:p,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!d||d!==m?p+=c.move(m+"]"):s==="shortcut"?p=p.slice(0,-1):p+=c.move("]"),p}function Aee(){return"["}function Wx(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Nee(e){const t=Wx(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Oee(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function VM(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Mee(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?Oee(n):Wx(n);const c=e.ordered?l==="."?")":".":Nee(n);let p=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.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&&(p=!0),VM(n)===l&&h){let m=-1;for(;++m<e.children.length;){const g=e.children[m];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(l=c),n.bulletCurrent=l;const d=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),d}function Iee(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Dee(e,t,n,r){const s=Iee(n);let a=n.bulletCurrent||Wx(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 l=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const p=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,c.current()),h);return p(),d;function h(m,g,y){return g?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function zee(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const Lee=nf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jee(e,t,n,r){return(e.children.some(function(l){return Lee(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Pee(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}KM.peek=$ee;function KM(e,t,n,r){const s=Pee(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let p=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=p.charCodeAt(0),h=sh(r.before.charCodeAt(r.before.length-1),d,s);h.inside&&(p=Mc(d)+p.slice(1));const m=p.charCodeAt(p.length-1),g=sh(r.after.charCodeAt(0),m,s);g.inside&&(p=p.slice(0,-1)+Mc(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+p+y}function $ee(e,t,n){return n.options.strong||"*"}function Bee(e,t,n,r){return n.safe(e.value,r)}function Fee(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Uee(e,t,n){const r=(VM(n)+(n.options.ruleSpaces?" ":"")).repeat(Fee(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ZM={blockquote:fee,break:D_,code:bee,definition:vee,emphasis:PM,hardBreak:D_,heading:wee,html:$M,image:BM,imageReference:FM,inlineCode:UM,link:HM,linkReference:GM,list:Mee,listItem:Dee,paragraph:zee,root:jee,strong:KM,text:Bee,thematicBreak:Uee};function qee(){return{enter:{table:Hee,tableData:z_,tableHeader:z_,tableRow:Vee},exit:{codeText:Kee,table:Gee,tableData:py,tableHeader:py,tableRow:py}}}function Hee(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Gee(e){this.exit(e),this.data.inTable=void 0}function Vee(e){this.enter({type:"tableRow",children:[]},e)}function py(e){this.exit(e)}function z_(e){this.enter({type:"tableCell",children:[]},e)}function Kee(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Zee));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Zee(e,t){return t==="|"?t:e}function Wee(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
73
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:l,tableCell:p,tableRow:c}};function l(y,k,w,_){return d(h(y,w,_),y.align)}function c(y,k,w,_){const E=m(y,w,_),R=d([E]);return R.slice(0,R.indexOf(`
74
+ `))}function p(y,k,w,_){const E=w.enter("tableCell"),R=w.enter("phrasing"),T=w.containerPhrasing(y,{..._,before:a,after:a});return R(),E(),T}function d(y,k){return lee(y,{align:k,alignDelimiters:r,padding:n,stringLength:s})}function h(y,k,w){const _=y.children;let E=-1;const R=[],T=k.enter("table");for(;++E<_.length;)R[E]=m(_[E],k,w);return T(),R}function m(y,k,w){const _=y.children;let E=-1;const R=[],T=k.enter("tableRow");for(;++E<_.length;)R[E]=p(_[E],y,k,w);return T(),R}function g(y,k,w){let _=ZM.inlineCode(y,k,w);return w.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function Yee(){return{exit:{taskListCheckValueChecked:L_,taskListCheckValueUnchecked:L_,paragraph:Qee}}}function Xee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Jee}}}function L_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Qee(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,l;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Jee(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let p=ZM.listItem(e,t,n,{...r,...c.current()});return a&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),p;function d(h){return h+l}}function ete(){return[MJ(),JJ(),ree(),qee(),Yee()]}function tte(e){return{extensions:[IJ(),eee(e),iee(),Wee(e),Xee()]}}const nte={tokenize:lte,partial:!0},WM={tokenize:ute,partial:!0},YM={tokenize:cte,partial:!0},XM={tokenize:fte,partial:!0},rte={tokenize:dte,partial:!0},QM={name:"wwwAutolink",tokenize:ote,previous:eI},JM={name:"protocolAutolink",tokenize:ate,previous:tI},Rs={name:"emailAutolink",tokenize:ste,previous:nI},qi={};function ite(){return{text:qi}}let Fo=48;for(;Fo<123;)qi[Fo]=Rs,Fo++,Fo===58?Fo=65:Fo===91&&(Fo=97);qi[43]=Rs;qi[45]=Rs;qi[46]=Rs;qi[95]=Rs;qi[72]=[Rs,JM];qi[104]=[Rs,JM];qi[87]=[Rs,QM];qi[119]=[Rs,QM];function ste(e,t,n){const r=this;let s,a;return l;function l(m){return!mv(m)||!nI.call(r,r.previous)||Yx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return mv(m)?(e.consume(m),c):m===64?(e.consume(m),p):n(m)}function p(m){return m===46?e.check(rte,h,d)(m):m===45||m===95||mr(m)?(a=!0,e.consume(m),p):h(m)}function d(m){return e.consume(m),s=!0,p}function h(m){return a&&s&&Sr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function ote(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!eI.call(r,r.previous)||Yx(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(nte,e.attempt(WM,e.attempt(YM,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function ate(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&tI.call(r,r.previous)&&!Yx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Sr(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const g=s.toLowerCase();if(g==="http"||g==="https")return e.consume(m),p}return n(m)}function p(m){return m===47?(e.consume(m),a?d:(a=!0,p)):n(m)}function d(m){return m===null||eh(m)||un(m)||na(m)||Kh(m)?n(m):e.attempt(WM,e.attempt(YM,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function lte(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function ute(e,t,n){let r,s,a;return l;function l(d){return d===46||d===95?e.check(XM,p,c)(d):d===null||un(d)||na(d)||d!==45&&Kh(d)?p(d):(a=!0,e.consume(d),l)}function c(d){return d===95?r=!0:(s=r,r=void 0),e.consume(d),l}function p(d){return s||r||!a?n(d):t(d)}}function cte(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(XM,t,a)(l):l===null||un(l)||na(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function fte(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||un(c)||na(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||un(c)||na(c)?t(c):r(c)}function a(c){return Sr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):Sr(c)?(e.consume(c),l):n(c)}}function dte(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return mr(a)?n(a):t(a)}}function eI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||un(e)}function tI(e){return!Sr(e)}function nI(e){return!(e===47||mv(e))}function mv(e){return e===43||e===45||e===46||e===95||mr(e)}function Yx(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const pte={tokenize:kte,partial:!0};function hte(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yte,continuation:{tokenize:vte},exit:xte}},text:{91:{name:"gfmFootnoteCall",tokenize:bte},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:mte,resolveTo:gte}}}}function mte(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const p=r.events[s][1];if(p.type==="labelImage"){l=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return c;function c(p){if(!l||!l._balanced)return n(p);const d=wi(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),t(p))}}function gte(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function bte(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),p}function p(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(a>999||m===93&&!l||m===null||m===91||un(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return s.includes(wi(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return un(m)||(l=!0),a++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function yte(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return p;function p(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(k)}function h(k){if(l>999||k===93&&!c||k===null||k===91||un(k))return n(k);if(k===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=wi(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return un(k)||(c=!0),l++,e.consume(k),k===92?m:h}function m(k){return k===91||k===92||k===93?(e.consume(k),l++,h):h(k)}function g(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(a)||s.push(a),qt(e,y,"gfmFootnoteDefinitionWhitespace")):n(k)}function y(k){return t(k)}}function vte(e,t,n){return e.check(tf,t,e.attempt(pte,t,n))}function xte(e){e.exit("gfmFootnoteDefinition")}function kte(e,t,n){const r=this;return qt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function Ste(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,c){let p=-1;for(;++p<l.length;)if(l[p][0]==="enter"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._close){let d=p;for(;d--;)if(l[d][0]==="exit"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._open&&l[p][1].end.offset-l[p][1].start.offset===l[d][1].end.offset-l[d][1].start.offset){l[p][1].type="strikethroughSequence",l[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[d][1].start),end:Object.assign({},l[p][1].end)},m={type:"strikethroughText",start:Object.assign({},l[d][1].end),end:Object.assign({},l[p][1].start)},g=[["enter",h,c],["enter",l[d][1],c],["exit",l[d][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Xr(g,g.length,0,Zh(y,l.slice(d+1,p),c)),Xr(g,g.length,0,[["exit",m,c],["enter",l[p][1],c],["exit",l[p][1],c],["exit",h,c]]),Xr(l,d-1,p-d+3,g),p=d+g.length-2;break}}for(p=-1;++p<l.length;)l[p][1].type==="strikethroughSequenceTemporary"&&(l[p][1].type="data");return l}function a(l,c,p){const d=this.previous,h=this.events;let m=0;return g;function g(k){return d===126&&h[h.length-1][1].type!=="characterEscape"?p(k):(l.enter("strikethroughSequenceTemporary"),y(k))}function y(k){const w=_l(d);if(k===126)return m>1?p(k):(l.consume(k),m++,y);if(m<2&&!n)return p(k);const _=l.exit("strikethroughSequenceTemporary"),E=_l(k);return _._open=!E||E===2&&!!w,_._close=!w||w===2&&!!E,c(k)}}}class wte{constructor(){this.map=[]}add(t,n,r){Ete(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function Ete(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function Tte(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function _te(){return{flow:{null:{name:"table",tokenize:Rte,resolveAll:Cte}}}}function Rte(e,t,n){const r=this;let s=0,a=0,l;return c;function c(L){let K=r.events.length-1;for(;K>-1;){const z=r.events[K][1].type;if(z==="lineEnding"||z==="linePrefix")K--;else break}const Z=K>-1?r.events[K][1].type:null,q=Z==="tableHead"||Z==="tableRow"?N:p;return q===N&&r.parser.lazy[r.now().line]?n(L):q(L)}function p(L){return e.enter("tableHead"),e.enter("tableRow"),d(L)}function d(L){return L===124||(l=!0,a+=1),h(L)}function h(L){return L===null?n(L):dt(L)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),y):n(L):jt(L)?qt(e,h,"whitespace")(L):(a+=1,l&&(l=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(L)))}function m(L){return L===null||L===124||un(L)?(e.exit("data"),h(L)):(e.consume(L),L===92?g:m)}function g(L){return L===92||L===124?(e.consume(L),m):m(L)}function y(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),l=!1,jt(L)?qt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):k(L))}function k(L){return L===45||L===58?_(L):L===124?(l=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),w):A(L)}function w(L){return jt(L)?qt(e,_,"whitespace")(L):_(L)}function _(L){return L===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),E):L===45?(a+=1,E(L)):L===null||dt(L)?C(L):A(L)}function E(L){return L===45?(e.enter("tableDelimiterFiller"),R(L)):A(L)}function R(L){return L===45?(e.consume(L),R):L===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(L))}function T(L){return jt(L)?qt(e,C,"whitespace")(L):C(L)}function C(L){return L===124?k(L):L===null||dt(L)?!l||s!==a?A(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):A(L)}function A(L){return n(L)}function N(L){return e.enter("tableRow"),I(L)}function I(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),I):L===null||dt(L)?(e.exit("tableRow"),t(L)):jt(L)?qt(e,I,"whitespace")(L):(e.enter("data"),H(L))}function H(L){return L===null||L===124||un(L)?(e.exit("data"),I(L)):(e.consume(L),L===92?$:H)}function $(L){return L===92||L===124?(e.consume(L),H):H(L)}}function Cte(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,p=0,d,h,m;const g=new wte;for(;++n<e.length;){const y=e[n],k=y[1];y[0]==="enter"?k.type==="tableHead"?(c=!1,p!==0&&(j_(g,t,p,d,h),h=void 0,p=0),d={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},g.add(n,0,[["enter",d,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},g.add(n,0,[["enter",h,t]])),s=k.type==="tableDelimiterRow"?2:h?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=fp(g,t,a,s,void 0,m),a=[0,0,0,0]),l[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],m=fp(g,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):k.type==="tableHead"?(c=!0,p=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=n,a[1]!==0?(l[0]=l[1],m=fp(g,t,a,s,n,m)):l[1]!==0&&(m=fp(g,t,l,s,n,m)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(p!==0&&j_(g,t,p,d,h),g.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Tte(t.events,n))}return e}function fp(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},tl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const p=tl(t.events,n[1]);if(a={type:l,start:Object.assign({},p),end:Object.assign({},p)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=tl(t.events,n[2]),h=tl(t.events,n[3]),m={type:c,start:Object.assign({},d),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const g=t.events[n[2]],y=t.events[n[3]];if(g[1].end=Object.assign({},y[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,w=n[3]-n[2]-1;e.add(k,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},tl(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function j_(e,t,n,r,s){const a=[],l=tl(t.events,n);s&&(s.end=Object.assign({},l),a.push(["exit",s,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function tl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Ate={name:"tasklistCheck",tokenize:Ote};function Nte(){return{text:{91:Ate}}}function Ote(e,t,n){const r=this;return s;function s(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),a)}function a(p){return un(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),l):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),l):n(p)}function l(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(p)}function c(p){return dt(p)?t(p):jt(p)?e.check({tokenize:Mte},t,n)(p):n(p)}}function Mte(e,t,n){return qt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function Ite(e){return VO([ite(),hte(),Ste(e),_te(),Nte()])}const Dte={};function zte(e){const t=this,n=e||Dte,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Ite(n)),a.push(ete()),l.push(tte(n))}function Lte(e){return v.jsx("div",{className:"md-table-wrap",children:v.jsx("table",{...e})})}function rI(e){return v.jsx("span",{className:"md-cell",children:e})}function jte({children:e,...t}){return v.jsx("th",{...t,children:rI(e)})}function Pte({children:e,...t}){return v.jsx("td",{...t,children:rI(e)})}function gv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(gv).join(""):x.isValidElement(e)?gv(e.props.children):""}function $te({children:e,...t}){const[n,r]=x.useState(!1),s=x.useRef(void 0),a=x.useCallback(()=>{navigator.clipboard.writeText(gv(e)),r(!0),clearTimeout(s.current),s.current=setTimeout(()=>r(!1),2e3)},[e]);return v.jsxs("div",{className:"md-pre-wrap",children:[v.jsx("pre",{...t,children:e}),v.jsx("span",{className:"md-copy",children:v.jsx(po,{icon:n?"check":"copy",size:"sm",variant:"default","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const Bte={table:Lte,th:jte,td:Pte,pre:$te},Rl=x.memo(function({text:t,className:n}){return v.jsx("div",{className:n?`md ${n}`:"md",children:v.jsx(IX,{remarkPlugins:[zte],rehypePlugins:[[TJ,{detect:!1}]],components:Bte,children:t??""})})});function Fte(e){switch(e){case"done":return{name:"check-circle",color:"secondary"};case"error":return{name:"x-circle",color:"red"};case"awaiting":return{name:"clock",color:"yellow"};case"orphan":return{name:"slash-circle",color:"tertiary"};default:return{name:"spinner",color:"blue",modifier:"spin"}}}function sf(e){const[t,n]=x.useState(()=>Date.now()),r=e.status==="running"||e.status==="awaiting";x.useEffect(()=>{if(!r||e.endedAt!=null)return;const a=setInterval(()=>n(Date.now()),250);return()=>clearInterval(a)},[r,e.endedAt]);const s=e.endedAt??(r?t:e.startedAt??t);return e.startedAt!=null?Math.max(0,s-e.startedAt):null}function fa({status:e}){const t=Fte(e);return v.jsx(Nn,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function of({callId:e}){return v.jsxs("div",{className:"approval-bar",children:[v.jsx("span",{children:"Awaiting human approval"}),v.jsx(zn,{variant:"secondary",color:"green",size:"sm",onClick:()=>{ut.submitApproval(e,"approve")},children:"Approve"}),v.jsx(zn,{variant:"secondary",color:"red",size:"sm",onClick:()=>{ut.submitApproval(e,"deny")},children:"Deny"})]})}function Xx(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function hl(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const Ute=Object.assign({}),iI=new Map;for(const[e,t]of Object.entries(Ute)){if(t?.default==null)continue;const n=typeof t.toolName=="string"&&t.toolName.trim()!==""?t.toolName.trim():void 0,r=e.split("/").pop()?.replace(/\.(tsx|ts)$/,""),s=n??r;s&&iI.set(s,t.default)}function qte(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function P_(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e;if("stdout"in t||"stderr"in t||"exitCode"in t)return t}return null}function Hte(e){const t=P_(e.outputRaw);if(t)return t;if(e.output)try{return P_(JSON.parse(e.output))}catch{}return null}function $_(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const Gte=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=sf(t),a=qte(t.args),l=Hte(t),c=$_(l?.stdout??""),p=$_(l?.stderr??""),d=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&d?"error":t.status,m=[a?bs(a,80):"shell"];return d&&m.push(`exit ${l?.exitCode}`),m.push(hi(s)),v.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[v.jsxs(Ti,{action:"shell",details:m.join(" · "),leadingIcon:v.jsx(fa,{status:h}),open:n,onOpenChange:g=>r(g),tabularNums:!0,children:[a?v.jsx("pre",{className:"shell-cmd",children:a}):null,c?v.jsx("pre",{className:"shell-std",children:c}):null,p?v.jsx("pre",{className:"shell-std shell-err",children:p}):null,!c&&!p?v.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),t.status==="awaiting"?v.jsx(of,{callId:t.callId}):null]})}),Vte=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=sf(t),a=hl(Xx(t.args),"path"),l=Kte(t),c=[a?hG(a,80):"read",hi(s)];return v.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[v.jsxs(Ti,{action:"read",details:c.join(" · "),leadingIcon:v.jsx(fa,{status:t.status}),open:n,onOpenChange:p=>r(p),tabularNums:!0,children:[a?v.jsx("pre",{className:"tool-primary",children:a}):null,l!=null?l?v.jsx("pre",{className:"tool-body",children:l}):v.jsx("div",{className:"tool-empty",children:"(empty file)"}):v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(of,{callId:t.callId}):null]})});function Kte(e){const t=B_(e.outputRaw);if(t!=null)return t;if(e.output)try{return B_(JSON.parse(e.output))}catch{}return null}function B_(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e.content;if(typeof t=="string")return t}if(typeof e=="string")try{const t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t)){const n=t.content;if(typeof n=="string")return n}}catch{return e}return null}const Zte=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=sf(t),a=Xx(t.args),l=hl(a,"glob_pattern","globPattern"),c=hl(a,"target_directory","targetDirectory"),p=Wte(t),d=[l?bs(l,80):"glob",hi(s)];return v.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[v.jsxs(Ti,{action:"glob",details:d.join(" · "),leadingIcon:v.jsx(fa,{status:t.status}),open:n,onOpenChange:h=>r(h),tabularNums:!0,children:[l?v.jsx("pre",{className:"tool-primary",children:l}):null,c?v.jsx("pre",{className:"tool-meta",children:c}):null,p!=null?p.length>0?v.jsx("pre",{className:"tool-body",children:p.join(`
75
+ `)}):v.jsx("div",{className:"tool-empty",children:"(no matches)"}):v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(of,{callId:t.callId}):null]})});function Wte(e){const t=F_(e.outputRaw);if(t!=null)return t;if(e.output)try{return F_(JSON.parse(e.output))}catch{}return null}function F_(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t.files;return Array.isArray(n)?n.filter(r=>typeof r=="string"):null}const Yte=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=sf(t),a=Xx(t.args),l=hl(a,"pattern"),c=hl(a,"path"),p=hl(a,"glob"),d=[l?bs(l,80):"grep",hi(s)],h=[c,p?`glob ${p}`:""].filter(Boolean).join(`
76
+ `);return v.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[v.jsxs(Ti,{action:"grep",details:d.join(" · "),leadingIcon:v.jsx(fa,{status:t.status}),open:n,onOpenChange:m=>r(m),tabularNums:!0,children:[l?v.jsx("pre",{className:"tool-primary",children:l}):null,h?v.jsx("pre",{className:"tool-meta",children:h}):null,v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(of,{callId:t.callId}):null]})}),Xte=x.memo(function({text:t,open:n}){const[r,s]=x.useState(!1);return n?v.jsx("div",{className:"pg-subagent-reasoning",children:v.jsx(Ti,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:v.jsx(Rl,{text:t,className:"body"})})}):v.jsx("div",{className:"pg-subagent-reasoning",children:v.jsx(Ti,{action:"Thought",defaultOpen:!1,tone:"muted",children:v.jsx(Rl,{text:t,className:"body"})})})}),Qte=x.memo(function({child:t}){if(t.kind==="assistant")return v.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:v.jsx(Rl,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return v.jsx(Xte,{text:t.text,open:t.open});const n=t.args==null?"":sr(t.args,80),r=t.status==="running"?"running…":t.status==="error"?"error":t.status==="done"?"done":t.status;return v.jsxs("div",{className:`pg-subagent-tool ${t.status}`,children:[v.jsxs("div",{className:"pg-subagent-tool-head",children:[v.jsx(fa,{status:t.status}),v.jsx("span",{className:"pg-subagent-tool-name",children:t.name}),n?v.jsx("span",{className:"pg-subagent-tool-args",children:n}):null,v.jsx("span",{className:"pg-subagent-tool-status",children:r})]}),t.output?v.jsx("pre",{className:"pg-subagent-tool-out",children:t.output}):null]})});function Jte(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r!==void 0&&r.kind==="tool")return r.status==="running"?`Running ${r.name}`:r.status==="error"?`Failed ${r.name}`:`Ran ${r.name}`}return e.status==="running"?"Generating":e.status==="error"?"Error":"Completed"}const ene=x.memo(function({item:t}){const n=t.children??[],r=n.length>0,[s,a]=x.useState(t.status==="running"),l=t.name.replace(/^subagent:/,"")||"subagent",c=typeof t.args=="string"?t.args:t.args==null?"":sr(t.args,100),p=t.status==="running",d=c?bs(c,120):l;return v.jsxs("div",{className:`pg-tool pg-subagent-card ${t.status}`,children:[v.jsxs("button",{type:"button",className:"pg-subagent-head","aria-expanded":s,onClick:()=>a(h=>!h),children:[v.jsx("span",{className:"pg-subagent-status",children:v.jsx(fa,{status:t.status})}),v.jsxs("span",{className:"pg-subagent-titles",children:[v.jsx("span",{className:p?"pg-subagent-title shimmer":"pg-subagent-title",children:d}),v.jsxs("span",{className:"pg-subagent-subtitle",children:[Jte(t,n)," · ",l]})]}),v.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:v.jsx(Nn,{name:"chevron-right",size:10})})]}),v.jsx("div",{className:s?"pg-subagent-clip":"pg-subagent-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:v.jsx("div",{className:"pg-subagent-body",children:r?n.map(h=>v.jsx(Qte,{child:h},h.id)):v.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})}),tne=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=sf(t),a=t.args==null?"":sr(t.args,120),l=hi(s);return v.jsxs("div",{className:`pg-tool ${t.status}`,children:[v.jsx(Ti,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:v.jsx(fa,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:v.jsx("div",{className:"out",children:t.output??"running…"})}),t.status==="awaiting"?v.jsx(of,{callId:t.callId}):null]})}),nne={shell:e=>v.jsx(Gte,{item:e}),read:e=>v.jsx(Vte,{item:e}),glob:e=>v.jsx(Zte,{item:e}),grep:e=>v.jsx(Yte,{item:e})};function rne(e){return e.name.startsWith("subagent:")}const ine=x.memo(function({item:t}){if(rne(t))return v.jsx(ene,{item:t});const n=iI.get(t.name);if(n)return v.jsx(n,{item:t});const r=nne[t.name];return r?r(t):v.jsx(tne,{item:t})}),sne=x.memo(function({text:t}){return v.jsx("div",{className:"msg user",children:v.jsx("div",{className:"bubble",children:t})})}),one=x.memo(function({text:t,streaming:n}){return v.jsx("div",{className:"msg assistant",children:v.jsx(Rl,{text:t,className:n?"bubble streaming":"bubble"})})}),ane=x.memo(function({text:t,open:n}){const[r,s]=x.useState(!1);return n?v.jsx("div",{className:"pg-reasoning",children:v.jsx(Ti,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:v.jsx(Rl,{text:t,className:"body"})})}):v.jsx("div",{className:"pg-reasoning",children:v.jsx(Ti,{action:"Thought",defaultOpen:!1,tone:"muted",children:v.jsx(Rl,{text:t,className:"body"})})})}),lne=x.memo(function({text:t,fail:n,url:r}){return v.jsxs("div",{className:n?"divider fail":"divider",children:[t,r?v.jsxs(v.Fragment,{children:[" · ",v.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:r})]}):null]})});function ac(e){switch(e.kind){case"user":return v.jsx(sne,{text:e.text},e.id);case"assistant":return v.jsx(one,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return v.jsx(ane,{text:e.text,open:e.open},e.id);case"tool":return v.jsx(ine,{item:e},e.id);case"divider":return v.jsx(lne,{text:e.text,fail:e.fail,url:e.url},e.id);case"turn-end":return null;default:return null}}function U_(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function une({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=x.useState(void 0),c=a??s,p=r.inTokens!==void 0||r.outTokens!==void 0?`${Qp(r.inTokens)} in · ${Qp(r.outTokens)} out tokens`:void 0;return v.jsxs(v.Fragment,{children:[e.length>0?v.jsx("div",{className:"pg-turn-group",title:p,children:v.jsx(Ti,{action:"Worked",details:r.ms!==null?`for ${Ax(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:v.jsx("div",{className:"pg-turn-group-content",children:e.map(ac)})})}):null,t.map(ac),n?ac(n):null]})}function cne({startMs:e}){const[t,n]=x.useState(()=>Date.now());return x.useEffect(()=>{const r=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(r)},[]),v.jsx("div",{className:"pg-turn-group",children:v.jsx(Ti,{action:"Working",details:`for ${Ax(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function fne(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(ac(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(ac(l));break;case"turn-end":{const c=s[s.length-1],p=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,d=p===null?s:s.slice(0,-1),h=d.filter(g=>!U_(g)),m=d.filter(U_);r.push(v.jsx(une,{steps:h,cards:m,final:p,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(v.jsx(cne,{startMs:t},"working")),a(),r}function dne(){const e=lt(h=>h.transcript),t=lt(h=>h.current),n=lt(h=>h.localTrace),r=lt(h=>h.running),s=lt(h=>h.turnStartedAt),a=e.length===0&&t===null&&!n,l=x.useMemo(()=>e.map(h=>{switch(h.kind){case"user":case"assistant":case"reasoning":return`${h.id}:${h.text.length}`;case"tool":return`${h.id}:${h.status}:${h.output?.length??0}`;case"divider":return`${h.id}:${h.text}`;case"turn-end":return h.id;default:return h}}).join("|"),[e]),c=e.findLast(h=>h.kind==="user")?.id??"",p=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:d}=_O({contentKey:l,latchKey:p});return v.jsx("div",{ref:d,className:a?"pg-transcript is-empty":"pg-transcript",children:a?v.jsx(yc,{className:"pg-empty",message:"Start a session to talk to your agent — type below, pick a session, or Open trace, then use the Trace tab for a timeline with tool timings."}):fne(e,r?s:null)})}function pne(){const e=lt(l=>l.view),t=lt(l=>l.drawerOpen),n=lt(l=>l.aliasHosted),r=lt(l=>l.aliasToken),s=lt(l=>l.embedded),a=lt(l=>l.sidebarOpen);return x.useEffect(()=>{ut.boot()},[]),n&&r.trim()===""?s?v.jsx(uV,{}):v.jsx(lV,{}):v.jsxs("div",{className:"pg-app",children:[!s||a?v.jsx(uK,{}):null,v.jsxs("div",{className:"pg-main",children:[v.jsx(pK,{}),v.jsxs("div",{className:"pg-columns",children:[e==="chat"?v.jsxs("div",{className:"pg-transcript-wrap",children:[v.jsx(dne,{}),v.jsx(dV,{})]}):null,e==="trace"?v.jsx(SK,{}):null,e==="raw"?v.jsx(JV,{}):null,e==="logs"?v.jsx(YV,{}):null,e==="evals"?v.jsx(PV,{}):null,e==="abs"?v.jsx(aV,{}):null]})]}),t?v.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>ut.setDrawerOpen(!1)}):null,v.jsx(vV,{}),v.jsx(cK,{})]})}const hne={name:"dark",appearance:"dark",highContrast:!1,sidebar:"#181818",chrome:"#141414",editor:"#181818",base:"#F0F0F0",accent:"#599CE7",actionLabel:"#191c22",brand:"#F54E00",focus:"#F0F0F0",success:"#3FA266",warn:"#F1B467",danger:"#E34671",added:"#70B489",modified:"#F1B467",removed:"#FC6B83",untracked:"#88C0D0",terminalAnsiBlack:"#242424",terminalAnsiRed:"#FC6B83",terminalAnsiYellow:"#D2943E",terminalAnsiGreen:"#3FA266",terminalAnsiCyan:"#88C0D0",terminalAnsiBlue:"#81A1C1",terminalAnsiMagenta:"#B48EAD",terminalAnsiWhite:"#F0F0F0",terminalAnsiBrightBlack:"#F0F0F099",terminalAnsiBrightRed:"#FC6B83",terminalAnsiBrightYellow:"#F1B467",terminalAnsiBrightGreen:"#70B489",terminalAnsiBrightCyan:"#88C0D0",terminalAnsiBrightBlue:"#87A6C4",terminalAnsiBrightMagenta:"#B48EAD",terminalAnsiBrightWhite:"#F0F0F0",red:"#FC6B83",orange:"#D08770",yellow:"#F1B467",green:"#3FA266",cyan:"#81A1C1",blue:"#7BAFE9",magenta:"#B48EAD",purple:"#9386F2",diffAddedLineBackground:"#3FA26633",diffAddedTextBackground:"#3FA26622",diffRemovedLineBackground:"#B8004933",diffRemovedTextBackground:"#B8004922"},mne={name:"light",appearance:"light",highContrast:!1,sidebar:"#F3F3F3",chrome:"#F8F8F8",editor:"#FCFCFC",base:"#141414",accent:"#2778C1",actionLabel:"#FCFCFC",brand:"#F54E00",focus:"#2778C1",success:"#007041",warn:"#A46700",danger:"#BE1744",added:"#007041",modified:"#A46700",removed:"#BE1744",untracked:"#176C74",terminalAnsiBlack:"#141414",terminalAnsiRed:"#BE1744",terminalAnsiYellow:"#8B5700",terminalAnsiGreen:"#007041",terminalAnsiCyan:"#176C74",terminalAnsiBlue:"#0064B0",terminalAnsiMagenta:"#92156A",terminalAnsiWhite:"#FCFCFC",terminalAnsiBrightBlack:"#141414BD",terminalAnsiBrightRed:"#CE405B",terminalAnsiBrightYellow:"#A46700",terminalAnsiBrightGreen:"#00854C",terminalAnsiBrightCyan:"#3B7E84",terminalAnsiBrightBlue:"#2778C1",terminalAnsiBrightMagenta:"#B54E90",terminalAnsiBrightWhite:"#FFFFFF",red:"#BE1744",orange:"#CD4500",yellow:"#A46700",green:"#007041",cyan:"#176C74",blue:"#2778C1",magenta:"#92156A",purple:"#7565CC",diffAddedLineBackground:"#00AF6624",diffAddedTextBackground:"#00B06838",diffRemovedLineBackground:"#FF617B38",diffRemovedTextBackground:"#FF617B57"},gne=Jv({name:pA(),appearance:hA(["light","dark"]),highContrast:C4()}),Qx=["sidebar","chrome","editor","base","accent","actionLabel","brand","focus","success","warn","danger","added","modified","removed","untracked","terminalAnsiBlack","terminalAnsiRed","terminalAnsiYellow","terminalAnsiGreen","terminalAnsiCyan","terminalAnsiBlue","terminalAnsiMagenta","terminalAnsiWhite","terminalAnsiBrightBlack","terminalAnsiBrightRed","terminalAnsiBrightYellow","terminalAnsiBrightGreen","terminalAnsiBrightCyan","terminalAnsiBrightBlue","terminalAnsiBrightMagenta","terminalAnsiBrightWhite","red","orange","yellow","green","cyan","blue","magenta","purple","diffAddedLineBackground","diffAddedTextBackground","diffRemovedLineBackground","diffRemovedTextBackground"],bne=Object.fromEntries(Qx.map(e=>[e,pA()]));gne.extend(bne);function yne(e){const t={};for(const n of Qx){const r=e[n],s=qc(n);t[s]=r}return t}function vne(e,t){return Object.keys(e).sort((n,r)=>n.localeCompare(r)).map(n=>`${t}--cursor-${n}: ${e[n]};`)}function xne(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}new Set(Qx);const kne={foreground:{op:"ref",ref:"base"},textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:74},textTertiary:{op:"mixTransparent",ref:"base",percent:60},textQuaternary:{op:"mixTransparent",ref:"base",percent:36},textInvert:{op:"ref",ref:"editor"},textActive:{op:"ref",ref:"textPrimary"},textFocused:{op:"ref",ref:"textPrimary"},textGitAddedPrimary:{op:"ref",ref:"added"},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:78},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:64},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:40},textGitModifiedPrimary:{op:"ref",ref:"modified"},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:78},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:64},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:40},textGitRemovedPrimary:{op:"ref",ref:"removed"},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:78},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:64},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:40},textGitUntrackedPrimary:{op:"ref",ref:"untracked"},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:78},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:64},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:40},textRedPrimary:{op:"ref",ref:"red"},textRedSecondary:{op:"mixTransparent",ref:"red",percent:78},textYellowPrimary:{op:"ref",ref:"yellow"},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:78},textGreenPrimary:{op:"ref",ref:"green"},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:78},textMagentaPrimary:{op:"ref",ref:"magenta"},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:78},textPurplePrimary:{op:"ref",ref:"purple"},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:78},textCyanPrimary:{op:"ref",ref:"cyan"},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:78},textBluePrimary:{op:"ref",ref:"blue"},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:78},textOrangePrimary:{op:"ref",ref:"orange"},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:78},textAccent:{op:"ref",ref:"accent"},textLink:{op:"ref",ref:"textBluePrimary"},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:66},iconTertiary:{op:"mixTransparent",ref:"base",percent:52},iconQuaternary:{op:"mixTransparent",ref:"base",percent:28},iconGitAddedPrimary:{op:"ref",ref:"added"},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:70},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:56},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:32},iconGitModifiedPrimary:{op:"ref",ref:"modified"},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:70},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:56},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:32},iconGitRemovedPrimary:{op:"ref",ref:"removed"},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:70},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:56},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:32},iconGitUntrackedPrimary:{op:"ref",ref:"untracked"},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:70},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:56},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:32},iconAccentPrimary:{op:"ref",ref:"accent"},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:70},iconRedPrimary:{op:"ref",ref:"red"},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:70},iconYellowPrimary:{op:"ref",ref:"yellow"},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:70},iconGreenPrimary:{op:"ref",ref:"green"},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:70},iconMagentaPrimary:{op:"ref",ref:"magenta"},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:70},iconCyanPrimary:{op:"ref",ref:"cyan"},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:70},iconBluePrimary:{op:"ref",ref:"blue"},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:70},iconOrangePrimary:{op:"ref",ref:"orange"},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:70},iconPurplePrimary:{op:"ref",ref:"purple"},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:70},bgPrimary:{op:"mixTransparent",ref:"base",percent:20},bgSecondary:{op:"mixTransparent",ref:"base",percent:14},bgTertiary:{op:"mixTransparent",ref:"base",percent:8},bgQuaternary:{op:"mixTransparent",ref:"base",percent:6},bgQuinary:{op:"mixTransparent",ref:"base",percent:4},bgElevated:{op:"ref",ref:"editor"},bgChrome:{op:"ref",ref:"chrome"},bgCard:{op:"ref",ref:"bgQuaternary"},bgInput:{op:"ref",ref:"editor"},bgEditor:{op:"ref",ref:"editor"},bgSidebar:{op:"ref",ref:"sidebar"},bgDiffInserted:{op:"ref",ref:"diffAddedLineBackground"},bgDiffRemoved:{op:"ref",ref:"diffRemovedLineBackground"},bgGitAddedPrimary:{op:"ref",ref:"added"},bgGitAddedHover:{op:"mixTwo",k1:"base",p1:10,k2:"added"},bgGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:24},bgGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:12},bgGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:8},bgGitModifiedPrimary:{op:"ref",ref:"modified"},bgGitModifiedHover:{op:"mixTwo",k1:"base",p1:10,k2:"modified"},bgGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:24},bgGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:12},bgGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:8},bgGitRemovedPrimary:{op:"ref",ref:"removed"},bgGitRemovedHover:{op:"mixTwo",k1:"base",p1:10,k2:"removed"},bgGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:24},bgGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:12},bgGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:8},bgGitUntrackedPrimary:{op:"ref",ref:"untracked"},bgGitUntrackedHover:{op:"mixTwo",k1:"base",p1:10,k2:"untracked"},bgGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:24},bgGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:12},bgGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:8},bgActive:{op:"mixTransparent",ref:"base",percent:16},bgFocused:{op:"mixTransparent",ref:"base",percent:22},bgRedPrimary:{op:"ref",ref:"red"},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:12},bgYellowPrimary:{op:"ref",ref:"yellow"},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:12},bgGreenPrimary:{op:"ref",ref:"green"},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:12},bgMagentaPrimary:{op:"ref",ref:"magenta"},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:12},bgCyanPrimary:{op:"ref",ref:"cyan"},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:12},bgBluePrimary:{op:"ref",ref:"blue"},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:12},bgOrangePrimary:{op:"ref",ref:"orange"},bgOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:12},bgPurplePrimary:{op:"ref",ref:"purple"},bgPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:12},bgPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:8},bgAccent:{op:"ref",ref:"accent"},bgAccentHover:{op:"mixTwo",k1:"base",p1:10,k2:"accent"},bgAccentSecondary:{op:"mixTransparent",ref:"accent",percent:24},bgAccentTertiary:{op:"mixTransparent",ref:"accent",percent:12},bgAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:8},strokePrimary:{op:"mixTransparent",ref:"base",percent:20},strokeSecondary:{op:"mixTransparent",ref:"base",percent:12},strokeTertiary:{op:"mixTransparent",ref:"base",percent:8},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:8,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:4},strokeFocused:{op:"ref",ref:"focus",fadePercent:15},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:0},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:56},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:56},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:56},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:56},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:56},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:32},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:56},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:32},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:56},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:32},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:56},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:32},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:56},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:32},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:56},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:32},strokeOrangePrimary:{op:"mixTransparent",ref:"orange",percent:56},strokeOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:32},shadowPrimary:{op:"mixBlack",blackPercent:20},shadowSecondary:{op:"mixTransparent",ref:"shadowPrimary",percent:60},shadowTertiary:{op:"mixTransparent",ref:"shadowPrimary",percent:30},shadowWorkbench:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,primaryMixPercent:40}]},boxShadowSm:{op:"shadow",candidates:[{x:0,y:2,blur:8,spread:0,shadowToken:"shadowSecondary"}]},boxShadowBase:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowPrimary"}]},boxShadowSoft:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowTertiary"}]},boxShadowLg:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"rgba(255, 255, 255, 0.05)"},{x:0,y:0,blur:3,spread:0,shadowToken:"shadowSecondary"},{x:0,y:16,blur:24,spread:0,shadowToken:"shadowTertiary"}]},boxShadowXl:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"rgba(255, 255, 255, 0.05)"},{x:0,y:0,blur:6,spread:8,shadowToken:"shadowSecondary"},{x:0,y:24,blur:16,spread:6,shadowToken:"shadowTertiary"}]},buttonSecondaryBackground:{op:"ref",ref:"bgTertiary"},buttonSecondaryForeground:{op:"ref",ref:"textPrimary"},buttonSecondaryHoverBackground:{op:"ref",ref:"bgSecondary"},titlebarActiveForeground:{op:"ref",ref:"textSecondary"},titlebarInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterForeground:{op:"ref",ref:"textSecondary"},commandCenterBackground:{op:"ref",ref:"bgTertiary"},commandCenterBorder:{op:"ref",ref:"strokeSecondary"},commandCenterActiveForeground:{op:"ref",ref:"textSecondary"},commandCenterActiveBorder:{op:"ref",ref:"strokePrimary"},commandCenterActiveBackground:{op:"ref",ref:"bgSecondary"},commandCenterInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterInactiveBorder:{op:"ref",ref:"strokeSecondary"},terminalBackground:{op:"ref",ref:"chrome"},terminalForeground:{op:"ref",ref:"textPrimary"},terminalSelectionBackground:{op:"mixTransparent",ref:"base",percent:12},scrollbarThumbBackground:{op:"mixTransparentOverlay",ref:"base",percent:14},scrollbarThumbHoverBackground:{op:"mixTransparentOverlay",ref:"base",percent:22},scrollbarThumbActiveBackground:{op:"mixTransparentOverlay",ref:"base",percent:26},scrollbarShadow:{op:"ref",ref:"shadowPrimary"},progressBarBackground:{op:"ref",ref:"accent"},toolbarHoverBackground:{op:"ref",ref:"bgTertiary"},inputBorder:{op:"ref",ref:"strokeSecondary"},inputPlaceholderForeground:{op:"ref",ref:"textQuaternary"},editorForeground:{op:"ref",ref:"textPrimary"},editorLineHighlightBackground:{op:"mixTransparent",ref:"base",percent:8},editorLineNumberForeground:{op:"ref",ref:"textTertiary"},editorLineNumberActiveForeground:{op:"ref",ref:"textPrimary"},editorCursorForeground:{op:"ref",ref:"textPrimary"},editorSelectionBackground:{op:"mixTransparent",ref:"accent",percent:42},editorInactiveSelectionBackground:{op:"mixTransparent",ref:"accent",percent:30},editorSelectionHighlightBackground:{op:"mixTransparentAlpha",key:"accent",percent:32,alpha:128/255},editorWidgetBackground:{op:"ref",ref:"bgElevated"},editorWidgetBorder:{op:"ref",ref:"strokeSecondary"},editorWidgetForeground:{op:"ref",ref:"textPrimary"},editorGutterBackground:{op:"ref",ref:"editor"},editorWhitespaceForeground:{op:"mixTransparent",ref:"base",percent:22},editorBracketMatchBackground:{op:"mixTransparent",ref:"success",percent:22},editorBracketMatchBorder:{op:"mixTransparent",ref:"base",percent:52},editorIndentGuideBackground:{op:"mixTransparent",ref:"base",percent:22},editorIndentGuideActiveBackground:{op:"mixTransparent",ref:"base",percent:40},editorFindMatchBackground:{op:"mixTransparent",ref:"warn",percent:72},editorFindMatchHighlightBackground:{op:"mixTransparentOverlay",ref:"warn",percent:32},textCodeBlockBackground:{op:"ref",ref:"bgElevated"},textLinkActive:{op:"ref",ref:"accent"}},q_={textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:84},textTertiary:{op:"mixTransparent",ref:"base",percent:72},textQuaternary:{op:"mixTransparent",ref:"base",percent:60},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:88},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:76},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:64},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:88},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:76},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:64},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:88},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:76},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:64},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:88},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:76},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:64},textRedSecondary:{op:"mixTransparent",ref:"red",percent:88},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:88},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:88},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:88},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:88},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:88},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:88},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:88},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:80},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:68},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:56},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:80},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:68},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:56},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:80},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:68},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:56},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:80},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:68},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:56},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:80},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:80},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:80},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:80},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:80},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:80},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:80},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:80},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:80},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:76},iconTertiary:{op:"mixTransparent",ref:"base",percent:64},iconQuaternary:{op:"mixTransparent",ref:"base",percent:52},bgPrimary:{op:"mixTransparent",ref:"base",percent:36},bgSecondary:{op:"mixTransparent",ref:"base",percent:24},bgTertiary:{op:"mixTransparent",ref:"base",percent:14},bgQuaternary:{op:"mixTransparent",ref:"base",percent:8},bgQuinary:{op:"mixTransparent",ref:"base",percent:5},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:24},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:24},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:24},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:24},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:24},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:24},strokePrimary:{op:"mixTransparent",ref:"base",percent:48},strokeSecondary:{op:"mixTransparent",ref:"base",percent:36},strokeTertiary:{op:"mixTransparent",ref:"base",percent:28},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:28,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:20},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:80},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:80},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:80},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:80},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:80},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:56},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:80},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:56},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:80},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:56},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:80},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:56},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:80},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:56},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:80},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:56},strokeFocused:{op:"ref",ref:"focus",fadePercent:100},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:36}},Sne={light:{shadowPrimary:{op:"mixBlack",blackPercent:6}},dark:{},lightHighContrast:{...q_},darkHighContrast:{...q_}};function hs(e){return`var(--cursor-${qc(e)})`}function wne(e){const t=e.inset?"inset ":"",n=`${e.x}px ${e.y}px ${e.blur}px ${e.spread}px`;return"literalColor"in e?`${t}${n} ${e.literalColor}`:"shadowToken"in e?`${t}${n} ${hs(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${hs("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function Ene(e){return e.map(wne).join(", ")}function Tne(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${hs(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${hs(e.k1)} ${e.p1}%, ${hs(e.k2)})`;case"mixBlackChrome":return`color-mix(in srgb, #000000 ${e.blackPercent}%, ${hs("chrome")})`;case"mixBlack":return`color-mix(in srgb, #000000 ${e.blackPercent}%, transparent)`;case"ref":return e.fadePercent!==void 0?`color-mix(in srgb, ${hs(e.ref)} ${e.fadePercent}%, transparent)`:hs(e.ref);case"shadow":return Ene(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${hs(e.key)} ${e.percent}%, transparent)`;default:return e}}function _ne(e){const t=Sne[e];return Object.entries(kne).map(([n,r])=>({name:qc(n),expr:t[n]??r}))}function Rne(e){const t=_ne(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${Tne(s)};`);return n}function Cne(e){const t=yne(e),n=vne(t," "),r=xne(e),s=Rne(r).join(`
77
+ `);return`:root {
78
+ ${n.join(`
79
+ `)}
80
+ }
81
+ :root {
82
+ ${s}
83
+ }`}const bv={fontFamily:jb.fontFamily,scrollbar:jb.scrollbar,syntax:jb.syntax},Ane=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function Nne(e,t){const n=qc(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function fs(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${Nne(e,s)}: ${l};`)}}function One(e={}){const t=e.selector??":root",n=e.theme??bv,r=[`${t} {`];for(const{key:s,cssMid:a}of Ane)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${qc(l)}: ${c};`);return fs("duration",jy,r,"ms"),fs("easing",xA,r),fs("spacing",gF,r,"px"),fs("radius",bF,r,"px"),fs("height",yF,r,"px"),fs("font-size",vF,r,"px"),fs("line-height",xF,r,"px"),fs("letter-spacing",kF,r,"px"),fs("elevation",mF,r),r.push("}"),r.join(`
84
+ `)}function Mne(e){const t=Cne(e.core),n=One(e.nonColor??{});return`${t}
85
+ ${n}`}function Ine(e){if(!e)return"default";const t=e.toLowerCase().replace(/_/g,"-");return t==="ja"||t.startsWith("ja-")?"ja":t==="ko"||t.startsWith("ko-")?"ko":t==="zh-tw"||t==="zh-hk"||t==="zh-mo"||t.includes("hant")?"zh-Hant":t==="zh"||t.startsWith("zh-")?"zh-Hans":"default"}function Dne(e,t){switch(e){case"mac":switch(t){case"zh-Hans":return'-apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif';case"zh-Hant":return'-apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif';case"ja":return'-apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif';case"ko":return'-apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif';default:return"-apple-system, BlinkMacSystemFont, sans-serif"}case"windows":switch(t){case"zh-Hans":return'"Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif';case"zh-Hant":return'"Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif';case"ja":return'"Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif';case"ko":return'"Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif';default:return'"Segoe WPC", "Segoe UI", sans-serif'}case"linux":switch(t){case"zh-Hans":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif';case"zh-Hant":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif';case"ja":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif';case"ko":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif';default:return'system-ui, "Ubuntu", "Droid Sans", sans-serif'}default:return e}}function zne(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function Lne(e){return Dne(e.platform,Ine(e.locale))}function jne(e){switch(e){case"mac":return'"SF Mono", Monaco, Menlo, Courier, monospace';case"windows":return'Consolas, "Courier New", monospace';case"linux":return'"Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace';default:return e}}const H_="agent-serve-cursor-theme";function Pne(e=window.location.search){return new URLSearchParams(e).get("theme")==="light"?"light":"dark"}function $ne(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=zne(navigator.userAgent,navigator.platform),r=Mne({core:e==="light"?mne:hne,nonColor:{theme:{...bv,fontFamily:{...bv.fontFamily,sans:Lne({platform:n,locale:navigator.language}),mono:jne(n)}}}});let s=document.getElementById(H_);s==null&&(s=document.createElement("style"),s.id=H_,document.head.appendChild(s)),s.textContent=r}$ne(Pne());const sI=document.getElementById("root");if(sI===null)throw new Error("Playground bootstrap failed: #root element is missing.");bz.createRoot(sI).render(v.jsx(x.StrictMode,{children:v.jsx(Ts,{menuSize:"md",children:v.jsx(pne,{})})}));