@cursor/july 0.1.11 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/agent-serve.js +32 -9
- package/dist/channels/github/api.d.ts.map +1 -1
- package/dist/channels/github/api.js +11 -4
- package/dist/channels/github/cursor-account.d.ts +21 -1
- package/dist/channels/github/cursor-account.d.ts.map +1 -1
- package/dist/channels/github/cursor-account.js +29 -1
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +1 -1
- package/dist/channels/github/instrument.d.ts +20 -0
- package/dist/channels/github/instrument.d.ts.map +1 -0
- package/dist/channels/slack/api.d.ts +9 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +40 -7
- package/dist/channels/slack/eval-directive.d.ts +3 -0
- package/dist/channels/slack/eval-directive.d.ts.map +1 -1
- package/dist/channels/slack/eval-directive.js +20 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.BcXUGca7.js → app.CKFFLL4Z.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DGWkvXJc.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CWur6XGZ.js → VPLocalSearchBox.BXk19JBN.js} +1 -1
- package/dist/docs/assets/chunks/{theme.BnvulOX2.js → theme.BXSPBMyn.js} +2 -2
- package/dist/docs/assets/{evals.md.DAgEc_hL.js → evals.md.DYOjkRCX.js} +10 -4
- package/dist/docs/assets/{evals.md.DAgEc_hL.lean.js → evals.md.DYOjkRCX.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.B74NrVzb.js → reference_cli.md.DnYfr5V2.js} +4 -1
- package/dist/docs/assets/{reference_http-api.md.Dx_nmDG6.js → reference_http-api.md.BncLd3PZ.js} +2 -2
- package/dist/docs/assets/{reference_http-api.md.Dx_nmDG6.lean.js → reference_http-api.md.BncLd3PZ.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +3 -3
- package/dist/docs/concepts.html +3 -3
- package/dist/docs/deployment.html +3 -3
- package/dist/docs/evals.html +13 -7
- package/dist/docs/example-agents/approval-buddy.html +3 -3
- package/dist/docs/example-agents/benny.html +3 -3
- package/dist/docs/example-agents/bugbot.html +3 -3
- package/dist/docs/example-agents/codebase-wiki.html +3 -3
- package/dist/docs/example-agents/codeowners-review.html +3 -3
- package/dist/docs/example-agents/concierge.html +3 -3
- package/dist/docs/example-agents/fsd.html +3 -3
- package/dist/docs/example-agents/index.html +3 -3
- package/dist/docs/example-agents/knowledge-base.html +3 -3
- package/dist/docs/example-agents/oncall.html +3 -3
- package/dist/docs/example-agents/security-reviewer.html +3 -3
- package/dist/docs/example-agents/slack-agent.html +3 -3
- package/dist/docs/example-agents/weather-agent.html +3 -3
- package/dist/docs/guides/agent-to-agent.html +3 -3
- package/dist/docs/guides/cloud-runtime.html +3 -3
- package/dist/docs/guides/github.html +3 -3
- package/dist/docs/guides/human-in-the-loop.html +3 -3
- package/dist/docs/guides/mcp-oauth.html +3 -3
- package/dist/docs/guides/slack.html +3 -3
- package/dist/docs/guides/webhooks.html +3 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +3 -3
- package/dist/docs/index.html +3 -3
- package/dist/docs/quickstart.html +3 -3
- package/dist/docs/reference/agent-config.html +3 -3
- package/dist/docs/reference/channels.html +3 -3
- package/dist/docs/reference/cli.html +8 -5
- package/dist/docs/reference/connections.html +3 -3
- package/dist/docs/reference/hooks.html +3 -3
- package/dist/docs/reference/http-api.html +5 -5
- package/dist/docs/reference/instructions.html +3 -3
- package/dist/docs/reference/playground.html +3 -3
- package/dist/docs/reference/project-layout.html +3 -3
- package/dist/docs/reference/prompt.html +3 -3
- package/dist/docs/reference/schedules.html +3 -3
- package/dist/docs/reference/sessions.html +3 -3
- package/dist/docs/reference/skills.html +3 -3
- package/dist/docs/reference/subagents.html +3 -3
- package/dist/docs/reference/tools.html +3 -3
- package/dist/docs/scaffolding-agents.html +3 -3
- package/dist/docs/storage.html +3 -3
- package/dist/docs/troubleshooting.html +3 -3
- package/dist/evals.d.ts +41 -2
- package/dist/evals.d.ts.map +1 -1
- package/dist/evals.js +53 -16
- package/dist/internal/cli-ax.d.ts +4 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +163 -33
- package/dist/internal/cli-deploy.d.ts +8 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +92 -12
- package/dist/internal/cli-mcp-oauth.d.ts +14 -2
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +95 -2
- package/dist/internal/cursor/backend-client.d.ts +34 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +73 -9
- package/dist/internal/cursor/credentials.d.ts +7 -1
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +9 -3
- package/dist/internal/cursor-account-mcp-auth.d.ts +55 -0
- package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -0
- package/dist/internal/cursor-account-mcp-auth.js +175 -0
- package/dist/internal/cursor-event-relay.d.ts +2 -0
- package/dist/internal/cursor-event-relay.d.ts.map +1 -1
- package/dist/internal/cursor-event-relay.js +3 -0
- package/dist/internal/deploy-client.d.ts +6 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +13 -0
- package/dist/internal/eval-run-store.d.ts +15 -0
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-run-store.js +87 -8
- package/dist/internal/eval-runner.d.ts +12 -0
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/eval-runner.js +97 -22
- package/dist/internal/evals-client.d.ts +9 -1
- package/dist/internal/evals-client.d.ts.map +1 -1
- package/dist/internal/evals-client.js +43 -0
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +74 -7
- package/dist/internal/map-pool.d.ts +6 -1
- package/dist/internal/map-pool.d.ts.map +1 -1
- package/dist/internal/map-pool.js +8 -1
- package/dist/internal/mcp-host.d.ts +13 -0
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +68 -13
- package/dist/internal/run-client.d.ts +5 -1
- package/dist/internal/run-client.d.ts.map +1 -1
- package/dist/internal/run-client.js +26 -5
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +57 -4
- package/dist/internal/session-engine.d.ts +13 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +49 -0
- package/dist/internal/storage-coordinator.d.ts +7 -0
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +29 -4
- package/dist/playground/assets/index-CuXb4j4V.css +1 -0
- package/dist/playground/assets/index-DeyYpOit.js +86 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/evals.md +46 -11
- package/docs/reference/cli.md +3 -0
- package/docs/reference/http-api.md +2 -1
- package/package.json +1 -1
- package/src/bin/agent-serve.ts +38 -8
- package/src/channels/github/api.ts +12 -1
- package/src/channels/github/cursor-account.ts +51 -1
- package/src/channels/github/github-channel.ts +4 -1
- package/src/channels/slack/api.ts +57 -8
- package/src/channels/slack/eval-directive.ts +24 -1
- package/src/evals.ts +104 -25
- package/src/internal/cli-ax.ts +192 -16
- package/src/internal/cli-deploy.ts +140 -13
- package/src/internal/cli-mcp-oauth.ts +122 -3
- package/src/internal/cursor/backend-client.ts +104 -1
- package/src/internal/cursor/credentials.ts +10 -2
- package/src/internal/cursor-account-mcp-auth.ts +241 -0
- package/src/internal/cursor-event-relay.ts +5 -0
- package/src/internal/deploy-client.ts +16 -0
- package/src/internal/eval-run-store.ts +89 -6
- package/src/internal/eval-runner.ts +113 -18
- package/src/internal/evals-client.ts +81 -0
- package/src/internal/http-channel.ts +87 -6
- package/src/internal/map-pool.ts +8 -1
- package/src/internal/mcp-host.ts +74 -16
- package/src/internal/run-client.ts +32 -1
- package/src/internal/server.ts +69 -2
- package/src/internal/session-engine.ts +58 -0
- package/src/internal/storage-coordinator.ts +32 -6
- package/src/types.ts +10 -0
- package/dist/channels/slack/post-update-delivery.d.ts +0 -85
- package/dist/channels/slack/post-update-delivery.d.ts.map +0 -1
- package/dist/channels/slack/post-update-delivery.js +0 -318
- package/dist/docs/assets/chunks/@localSearchIndexroot.BIbvK8M1.js +0 -1
- package/dist/internal/corp-ca.d.ts +0 -9
- package/dist/internal/corp-ca.d.ts.map +0 -1
- package/dist/internal/corp-ca.js +0 -44
- package/dist/playground/assets/index-BIGLubwK.js +0 -86
- package/dist/playground/assets/index-C17ZQKDG.css +0 -1
- package/docs/.vitepress/cache/deps/package.json +0 -3
- /package/dist/docs/assets/{reference_cli.md.B74NrVzb.lean.js → reference_cli.md.DnYfr5V2.lean.js} +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
function sz(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 sh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qg={exports:{}},Nu={};var Rw;function oz(){if(Rw)return Nu;Rw=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 Nu.Fragment=t,Nu.jsx=n,Nu.jsxs=n,Nu}var Cw;function az(){return Cw||(Cw=1,Qg.exports=oz()),Qg.exports}var v=az(),Jg={exports:{}},Et={};var Aw;function lz(){if(Aw)return Et;Aw=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"),d=Symbol.for("react.suspense"),p=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 x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,_={};function E(B,G,O){this.props=B,this.context=G,this.refs=_,this.updater=O||x}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||x}var C=T.prototype=new R;C.constructor=T,S(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=d,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=S({},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:p,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 Nw;function Dc(){return Nw||(Nw=1,Jg.exports=lz()),Jg.exports}var k=Dc();const Gu=sh(k),oh=sz({__proto__:null,default:Gu},[k]);var eb={exports:{}},Ou={},tb={exports:{}},nb={};var Ow;function uz(){return Ow||(Ow=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 d=[],p=[],h=1,m=null,g=3,y=!1,x=!1,S=!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(p);U!==null;){if(U.callback===null)r(p);else if(U.startTime<=F)r(p),U.sortIndex=U.expirationTime,t(d,U);else break;U=n(p)}}function A(F){if(S=!1,C(F),!x)if(n(d)!==null)x=!0,N||(N=!0,Z());else{var U=n(p);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:{x=!1,S&&(S=!1,R(I),I=-1),y=!0;var P=g;try{t:{for(C(F),m=n(d);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(d)&&r(d),C(F)}else r(d);m=n(d)}if(m!==null)U=!0;else{var B=n(p);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(p,F),n(d)===null&&F===n(p)&&(S?(R(I),I=-1):S=!0,j(A,P-W))):(F.sortIndex=D,t(d,F),x||y||(x=!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}}}})(nb)),nb}var Mw;function cz(){return Mw||(Mw=1,tb.exports=uz()),tb.exports}var rb={exports:{}},ur={};var Iw;function fz(){if(Iw)return ur;Iw=1;var e=Dc();function t(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)p+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+d+"; visit "+p+" 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(d,p,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:d,containerInfo:p,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return ur.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ur.createPortal=function(d,p){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return a(d,p,null,h)},ur.flushSync=function(d){var p=l.T,h=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=p,r.p=h,r.d.f()}},ur.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(d,p))},ur.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},ur.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var h=p.as,m=c(h,p.crossOrigin),g=typeof p.integrity=="string"?p.integrity:void 0,y=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;h==="style"?r.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:y}):h==="script"&&r.d.X(d,{crossOrigin:m,integrity:g,fetchPriority:y,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},ur.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var h=c(p.as,p.crossOrigin);r.d.M(d,{crossOrigin:h,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(d)},ur.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var h=p.as,m=c(h,p.crossOrigin);r.d.L(d,h,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},ur.preloadModule=function(d,p){if(typeof d=="string")if(p){var h=c(p.as,p.crossOrigin);r.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:h,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(d)},ur.requestFormReset=function(d){r.d.r(d)},ur.unstable_batchedUpdates=function(d,p){return d(p)},ur.useFormState=function(d,p,h){return l.H.useFormState(d,p,h)},ur.useFormStatus=function(){return l.H.useHostTransitionStatus()},ur.version="19.2.6",ur}var Dw;function U_(){if(Dw)return rb.exports;Dw=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(),rb.exports=fz(),rb.exports}var zw;function dz(){if(zw)return Ou;zw=1;var e=cz(),t=Dc(),n=U_();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 d(i){if(a(i)!==i)throw Error(r(188))}function p(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 w=b.alternate;if(w===null){if(f=b.return,f!==null){u=f;continue}break}if(b.child===w.child){for(w=b.child;w;){if(w===u)return d(b),i;if(w===f)return d(b),o;w=w.sibling}throw Error(r(188))}if(u.return!==f.return)u=b,f=w;else{for(var M=!1,V=b.child;V;){if(V===u){M=!0,u=b,f=w;break}if(V===f){M=!0,f=b,u=w;break}V=V.sibling}if(!M){for(V=w.child;V;){if(V===u){M=!0,u=w,f=b;break}if(V===f){M=!0,f=w,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"),x=Symbol.for("react.portal"),S=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 S: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 x: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)?YS(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=YS(o),i=XS(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=XS(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),_u._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 w=f.DetermineComponentFrameRoot(),M=w[0],V=w[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 xe=`
|
|
6
|
+
`+Q[f].replace(" at new "," at ");return i.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",i.displayName)),xe}while(1<=f&&0<=b);break}}}finally{Oe=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Re(u):""}function ke(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+=ke(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,kt=Math.log,We=Math.LN2;function Ot(i){return i>>>=0,i===0?32:31-(kt(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,w=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var V=f&134217727;return V!==0?(f=V&~w,f!==0?b=Xe(f):(M&=V,M!==0?b=Xe(M):u||(u=V&~i,u!==0&&(b=Xe(u))))):(V=f&~w,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&w)===0&&(w=b&-b,u=o&-o,w>=u||w===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 ut(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,w){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 xe=31-st(u),Ae=1<<xe;V[xe]=0,Q[xe]=-1;var me=de[xe];if(me!==null)for(de[xe]=null,xe=0;xe<me.length;xe++){var be=me[xe];be!==null&&(be.lane&=-536870913)}u&=~Ae}f!==0&&Le(i,f,0),w!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=w&~(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:kw(i.type))}function Qn(i,o){var u=U.p;try{return U.p=i,o()}finally{U.p=u}}var _n=Math.random().toString(36).slice(2),an="__reactFiber$"+_n,Jn="__reactProps$"+_n,Gi="__reactContainer$"+_n,jl="__reactEvents$"+_n,of="__reactListeners$"+_n,pa="__reactHandles$"+_n,af="__reactResources$"+_n,xo="__reactMarker$"+_n;function Pl(i){delete i[an],delete i[Jn],delete i[jl],delete i[of],delete i[pa]}function yr(i){var o=i[an];if(o)return o;for(var u=i.parentNode;u;){if(o=u[Gi]||u[an]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=iw(i);i!==null;){if(u=i[an])return u;i=iw(i)}return o}i=u,u=i.parentNode}return null}function Vi(i){if(i=i[an]||i[Gi]){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[af];return o||(o=i[af]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Ln(i){i[xo]=!0}var lf=new Set,So={};function Ki(i,o){De(i,o),De(i+"Capture",o)}function De(i,o){for(So[i]=o,i=0;i<o.length;i++)lf.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 uf(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,w=f.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return b.call(this)},set:function(M){u=""+M,w.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 ha(i){if(!i._valueTracker){var o=Br(i)?"checked":"value";i._valueTracker=uf(i,o,""+i[o])}}function $l(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 ma(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 Xh=/[\n"\\]/g;function _r(i){return i.replace(Xh,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Bl(i,o,u,f,b,w,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?ga(i,M,cn(o)):u!=null?ga(i,M,cn(u)):f!=null&&i.removeAttribute("value"),b==null&&w!=null&&(i.defaultChecked=!!w),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 wo(i,o,u,f,b,w,M,V){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),o!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||o!=null)){ha(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),ha(i)}function ga(i,o,u){o==="number"&&ma(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 cf(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 ba(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),ha(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 ff=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||ff.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 w in o)o.hasOwnProperty(w)&&jn(i,w,o[w])}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 Zi=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"]]),Fl=/^[\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 Fl.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,Sn=null;function Jr(i){var o=Vi(i);if(o&&(i=o.stateNode)){var u=i[Jn]||null;e:switch(i=o.stateNode,o.type){case"input":if(Bl(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));Bl(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&&$l(f)}break e;case"textarea":cf(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&er(i,!!u.multiple,o,!1)}}}var Ul=!1;function df(i,o,u){if(Ul)return i(o,u);Ul=!0;try{var f=i(o);return f}finally{if(Ul=!1,(Pt!==null||Sn!==null)&&(Jf(),Pt&&(o=Pt,i=Sn,Sn=Pt=null,Jr(o),i)))for(o=0;o<i.length;o++)Jr(i[o])}}function ql(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 Wi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qh=!1;if(Wi)try{var Hl={};Object.defineProperty(Hl,"passive",{get:function(){Qh=!0}}),window.addEventListener("test",Hl,Hl),window.removeEventListener("test",Hl,Hl)}catch{Qh=!1}var Ms=null,Jh=null,pf=null;function Xk(){if(pf)return pf;var i,o=Jh,u=o.length,f,b="value"in Ms?Ms.value:Ms.textContent,w=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[w-f];f++);return pf=b.slice(i,1<f?1-f:void 0)}function hf(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 mf(){return!0}function Qk(){return!1}function Rr(i){function o(u,f,b,w,M){this._reactName=u,this._targetInst=b,this.type=f,this.nativeEvent=w,this.target=M,this.currentTarget=null;for(var V in i)i.hasOwnProperty(V)&&(u=i[V],this[V]=u?u(w):w[V]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?mf:Qk,this.isPropagationStopped=Qk,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=mf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=mf)},persist:function(){},isPersistent:mf}),o}var Eo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gf=Rr(Eo),Gl=m({},Eo,{view:0,detail:0}),rI=Rr(Gl),em,tm,Vl,bf=m({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rm,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!==Vl&&(Vl&&i.type==="mousemove"?(em=i.screenX-Vl.screenX,tm=i.screenY-Vl.screenY):tm=em=0,Vl=i),em)},movementY:function(i){return"movementY"in i?i.movementY:tm}}),Jk=Rr(bf),iI=m({},bf,{dataTransfer:0}),sI=Rr(iI),oI=m({},Gl,{relatedTarget:0}),nm=Rr(oI),aI=m({},Eo,{animationName:0,elapsedTime:0,pseudoElement:0}),lI=Rr(aI),uI=m({},Eo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),cI=Rr(uI),fI=m({},Eo,{data:0}),ex=Rr(fI),dI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pI={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"},hI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mI(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=hI[i])?!!o[i]:!1}function rm(){return mI}var gI=m({},Gl,{key:function(i){if(i.key){var o=dI[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=hf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?pI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rm,charCode:function(i){return i.type==="keypress"?hf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?hf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),bI=Rr(gI),yI=m({},bf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tx=Rr(yI),vI=m({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rm}),kI=Rr(vI),xI=m({},Eo,{propertyName:0,elapsedTime:0,pseudoElement:0}),SI=Rr(xI),wI=m({},bf,{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}),EI=Rr(wI),TI=m({},Eo,{newState:0,oldState:0}),_I=Rr(TI),RI=[9,13,27,32],im=Wi&&"CompositionEvent"in window,Kl=null;Wi&&"documentMode"in document&&(Kl=document.documentMode);var CI=Wi&&"TextEvent"in window&&!Kl,nx=Wi&&(!im||Kl&&8<Kl&&11>=Kl),rx=" ",ix=!1;function sx(i,o){switch(i){case"keyup":return RI.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ox(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ya=!1;function AI(i,o){switch(i){case"compositionend":return ox(o);case"keypress":return o.which!==32?null:(ix=!0,rx);case"textInput":return i=o.data,i===rx&&ix?null:i;default:return null}}function NI(i,o){if(ya)return i==="compositionend"||!im&&sx(i,o)?(i=Xk(),pf=Jh=Ms=null,ya=!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 nx&&o.locale!=="ko"?null:o.data;default:return null}}var OI={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 ax(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!OI[i.type]:o==="textarea"}function lx(i,o,u,f){Pt?Sn?Sn.push(f):Sn=[f]:Pt=f,o=od(o,"onChange"),0<o.length&&(u=new gf("onChange","change",null,u,f),i.push({event:u,listeners:o}))}var Zl=null,Wl=null;function MI(i){HS(i,0)}function yf(i){var o=Cs(i);if($l(o))return i}function ux(i,o){if(i==="change")return o}var cx=!1;if(Wi){var sm;if(Wi){var om="oninput"in document;if(!om){var fx=document.createElement("div");fx.setAttribute("oninput","return;"),om=typeof fx.oninput=="function"}sm=om}else sm=!1;cx=sm&&(!document.documentMode||9<document.documentMode)}function dx(){Zl&&(Zl.detachEvent("onpropertychange",px),Wl=Zl=null)}function px(i){if(i.propertyName==="value"&&yf(Wl)){var o=[];lx(o,Wl,i,Tt(i)),df(MI,o)}}function II(i,o,u){i==="focusin"?(dx(),Zl=o,Wl=u,Zl.attachEvent("onpropertychange",px)):i==="focusout"&&dx()}function DI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return yf(Wl)}function zI(i,o){if(i==="click")return yf(o)}function LI(i,o){if(i==="input"||i==="change")return yf(o)}function jI(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Fr=typeof Object.is=="function"?Object.is:jI;function Yl(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 hx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function mx(i,o){var u=hx(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=hx(u)}}function gx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?gx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function bx(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=ma(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=ma(i.document)}return o}function am(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 PI=Wi&&"documentMode"in document&&11>=document.documentMode,va=null,lm=null,Xl=null,um=!1;function yx(i,o,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;um||va==null||va!==ma(f)||(f=va,"selectionStart"in f&&am(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}),Xl&&Yl(Xl,f)||(Xl=f,f=od(lm,"onSelect"),0<f.length&&(o=new gf("onSelect","select",null,o,u),i.push({event:o,listeners:f}),o.target=va)))}function To(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var ka={animationend:To("Animation","AnimationEnd"),animationiteration:To("Animation","AnimationIteration"),animationstart:To("Animation","AnimationStart"),transitionrun:To("Transition","TransitionRun"),transitionstart:To("Transition","TransitionStart"),transitioncancel:To("Transition","TransitionCancel"),transitionend:To("Transition","TransitionEnd")},cm={},vx={};Wi&&(vx=document.createElement("div").style,"AnimationEvent"in window||(delete ka.animationend.animation,delete ka.animationiteration.animation,delete ka.animationstart.animation),"TransitionEvent"in window||delete ka.transitionend.transition);function _o(i){if(cm[i])return cm[i];if(!ka[i])return i;var o=ka[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in vx)return cm[i]=o[u];return i}var kx=_o("animationend"),xx=_o("animationiteration"),Sx=_o("animationstart"),$I=_o("transitionrun"),BI=_o("transitionstart"),FI=_o("transitioncancel"),wx=_o("transitionend"),Ex=new Map,fm="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(" ");fm.push("scrollEnd");function bi(i,o){Ex.set(i,o),Ki(o,[i])}var vf=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)},ei=[],xa=0,dm=0;function kf(){for(var i=xa,o=dm=xa=0;o<i;){var u=ei[o];ei[o++]=null;var f=ei[o];ei[o++]=null;var b=ei[o];ei[o++]=null;var w=ei[o];if(ei[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}w!==0&&Tx(u,b,w)}}function xf(i,o,u,f){ei[xa++]=i,ei[xa++]=o,ei[xa++]=u,ei[xa++]=f,dm|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function pm(i,o,u,f){return xf(i,o,u,f),Sf(i)}function Ro(i,o){return xf(i,null,null,o),Sf(i)}function Tx(i,o,u){i.lanes|=u;var f=i.alternate;f!==null&&(f.lanes|=u);for(var b=!1,w=i.return;w!==null;)w.childLanes|=u,f=w.alternate,f!==null&&(f.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(b=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,b&&o!==null&&(b=31-st(u),i=w.hiddenUpdates,f=i[b],f===null?i[b]=[o]:f.push(o),o.lane=u|536870912),w):null}function Sf(i){if(50<vu)throw vu=0,Sg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Sa={};function UI(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 UI(i,o,u,f)}function hm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Yi(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 _x(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 wf(i,o,u,f,b,w){var M=0;if(f=i,typeof i=="function")hm(i)&&(M=1);else if(typeof i=="string")M=KD(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=w,i;case S:return Co(u.children,b,w,o);case _:M=8,b|=24;break;case E:return i=Ur(12,u,o,b|2),i.elementType=E,i.lanes=w,i;case A:return i=Ur(13,u,o,b),i.elementType=A,i.lanes=w,i;case N:return i=Ur(19,u,o,b),i.elementType=N,i.lanes=w,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=w,o}function Co(i,o,u,f){return i=Ur(7,i,f,o),i.lanes=u,i}function mm(i,o,u){return i=Ur(6,i,null,o),i.lanes=u,i}function Rx(i){var o=Ur(18,null,null,0);return o.stateNode=i,o}function gm(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 Cx=new WeakMap;function ti(i,o){if(typeof i=="object"&&i!==null){var u=Cx.get(i);return u!==void 0?u:(o={value:i,source:o,stack:Me(o)},Cx.set(i,o),o)}return{value:i,source:o,stack:Me(o)}}var wa=[],Ea=0,Ef=null,Ql=0,ni=[],ri=0,Is=null,Ai=1,Ni="";function Xi(i,o){wa[Ea++]=Ql,wa[Ea++]=Ef,Ef=i,Ql=o}function Ax(i,o,u){ni[ri++]=Ai,ni[ri++]=Ni,ni[ri++]=Is,Is=i;var f=Ai;i=Ni;var b=32-st(f)-1;f&=~(1<<b),u+=1;var w=32-st(o)+b;if(30<w){var M=b-b%5;w=(f&(1<<M)-1).toString(32),f>>=M,b-=M,Ai=1<<32-st(o)+b|u<<b|f,Ni=w+i}else Ai=1<<w|u<<b|f,Ni=i}function bm(i){i.return!==null&&(Xi(i,1),Ax(i,1,0))}function ym(i){for(;i===Ef;)Ef=wa[--Ea],wa[Ea]=null,Ql=wa[--Ea],wa[Ea]=null;for(;i===Is;)Is=ni[--ri],ni[ri]=null,Ni=ni[--ri],ni[ri]=null,Ai=ni[--ri],ni[ri]=null}function Nx(i,o){ni[ri++]=Ai,ni[ri++]=Ni,ni[ri++]=Is,Ai=o.id,Ni=o.overflow,Is=i}var tr=null,hn=null,Ut=!1,Ds=null,ii=!1,vm=Error(r(519));function zs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Jl(ti(o,i)),vm}function Ox(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),wo(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),ba(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||ZS(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 Mx(i){for(tr=i.return;tr;)switch(tr.tag){case 5:case 31:case 13:ii=!1;return;case 27:case 3:ii=!0;return;default:tr=tr.return}}function Ta(i){if(i!==tr)return!1;if(!Ut)return Mx(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")||jg(i.type,i.memoizedProps)),u=!u),u&&hn&&zs(i),Mx(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));hn=rw(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));hn=rw(i)}else o===27?(o=hn,Ws(i.type)?(i=Ug,Ug=null,hn=i):hn=o):hn=tr?oi(i.stateNode.nextSibling):null;return!0}function Ao(){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 Jl(i){Ds===null?Ds=[i]:Ds.push(i)}var xm=B(null),No=null,Qi=null;function Ls(i,o,u){O(xm,o._currentValue),o._currentValue=u}function Ji(i){i._currentValue=xm.current,G(xm)}function Sm(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 wm(i,o,u,f){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var w=b.dependencies;if(w!==null){var M=b.child;w=w.firstContext;e:for(;w!==null;){var V=w;w=b;for(var Q=0;Q<o.length;Q++)if(V.context===o[Q]){w.lanes|=u,V=w.alternate,V!==null&&(V.lanes|=u),Sm(w.return,u,i),f||(M=null);break e}w=V.next}}else if(b.tag===18){if(M=b.return,M===null)throw Error(r(341));M.lanes|=u,w=M.alternate,w!==null&&(w.lanes|=u),Sm(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 _a(i,o,u,f){i=null;for(var b=o,w=!1;b!==null;){if(!w){if((b.flags&524288)!==0)w=!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(_u):i=[_u])}b=b.return}i!==null&&wm(o,i,u,f),o.flags|=262144}function Tf(i){for(i=i.firstContext;i!==null;){if(!Fr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Oo(i){No=i,Qi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function nr(i){return Ix(No,i)}function _f(i,o){return No===null&&Oo(i),Ix(i,o)}function Ix(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},Qi===null){if(i===null)throw Error(r(308));Qi=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else Qi=Qi.next=o;return u}var qI=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()})}},HI=e.unstable_scheduleCallback,GI=e.unstable_NormalPriority,Pn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Em(){return{controller:new qI,data:new Map,refCount:0}}function eu(i){i.refCount--,i.refCount===0&&HI(GI,function(){i.controller.abort()})}var tu=null,Tm=0,Ra=0,Ca=null;function VI(i,o){if(tu===null){var u=tu=[];Tm=0,Ra=Cg(),Ca={status:"pending",value:void 0,then:function(f){u.push(f)}}}return Tm++,o.then(Dx,Dx),o}function Dx(){if(--Tm===0&&tu!==null){Ca!==null&&(Ca.status="fulfilled");var i=tu;tu=null,Ra=0,Ca=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function KI(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 zx=F.S;F.S=function(i,o){yS=re(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&VI(i,o),zx!==null&&zx(i,o)};var Mo=B(null);function _m(){var i=Mo.current;return i!==null?i:ln.pooledCache}function Rf(i,o){o===null?O(Mo,Mo.current):O(Mo,o.pool)}function Lx(){var i=_m();return i===null?null:{parent:Pn._currentValue,pool:i}}var Aa=Error(r(460)),Rm=Error(r(474)),Cf=Error(r(542)),Af={then:function(){}};function jx(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Px(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,Bx(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,Bx(i),i}throw Do=o,Aa}}function Io(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Do=u,Aa):u}}var Do=null;function $x(){if(Do===null)throw Error(r(459));var i=Do;return Do=null,i}function Bx(i){if(i===Aa||i===Cf)throw Error(r(483))}var Na=null,nu=0;function Nf(i){var o=nu;return nu+=1,Na===null&&(Na=[]),Px(Na,i,o)}function ru(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Of(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 Fx(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=Yi(ae,se),ae.index=0,ae.sibling=null,ae}function w(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=mm(ce,ae.mode,Ee),se.return=ae,se):(se=b(se,ce),se.return=ae,se)}function Q(ae,se,ce,Ee){var ct=ce.type;return ct===S?xe(ae,se,ce.props.children,Ee,ce.key):se!==null&&(se.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===H&&Io(ct)===se.type)?(se=b(se,ce.props),ru(se,ce),se.return=ae,se):(se=wf(ce.type,ce.key,ce.props,null,ae.mode,Ee),ru(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=gm(ce,ae.mode,Ee),se.return=ae,se):(se=b(se,ce.children||[]),se.return=ae,se)}function xe(ae,se,ce,Ee,ct){return se===null||se.tag!==7?(se=Co(ce,ae.mode,Ee,ct),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=mm(""+se,ae.mode,ce),se.return=ae,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case y:return ce=wf(se.type,se.key,se.props,null,ae.mode,ce),ru(ce,se),ce.return=ae,ce;case x:return se=gm(se,ae.mode,ce),se.return=ae,se;case H:return se=Io(se),Ae(ae,se,ce)}if(j(se)||Z(se))return se=Co(se,ae.mode,ce,null),se.return=ae,se;if(typeof se.then=="function")return Ae(ae,Nf(se),ce);if(se.$$typeof===T)return Ae(ae,_f(ae,se),ce);Of(ae,se)}return null}function me(ae,se,ce,Ee){var ct=se!==null?se.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return ct!==null?null:V(ae,se,""+ce,Ee);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return ce.key===ct?Q(ae,se,ce,Ee):null;case x:return ce.key===ct?de(ae,se,ce,Ee):null;case H:return ce=Io(ce),me(ae,se,ce,Ee)}if(j(ce)||Z(ce))return ct!==null?null:xe(ae,se,ce,Ee,null);if(typeof ce.then=="function")return me(ae,se,Nf(ce),Ee);if(ce.$$typeof===T)return me(ae,se,_f(ae,ce),Ee);Of(ae,ce)}return null}function be(ae,se,ce,Ee,ct){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return ae=ae.get(ce)||null,V(se,ae,""+Ee,ct);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,ct);case x:return ae=ae.get(Ee.key===null?ce:Ee.key)||null,de(se,ae,Ee,ct);case H:return Ee=Io(Ee),be(ae,se,ce,Ee,ct)}if(j(Ee)||Z(Ee))return ae=ae.get(ce)||null,xe(se,ae,Ee,ct,null);if(typeof Ee.then=="function")return be(ae,se,ce,Nf(Ee),ct);if(Ee.$$typeof===T)return be(ae,se,ce,_f(se,Ee),ct);Of(se,Ee)}return null}function Qe(ae,se,ce,Ee){for(var ct=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=w(Vt,se,Ct),Gt===null?ct=Vt:Gt.sibling=Vt,Gt=Vt,et=Bt}if(Ct===ce.length)return u(ae,et),Ut&&Xi(ae,Ct),ct;if(et===null){for(;Ct<ce.length;Ct++)et=Ae(ae,ce[Ct],Ee),et!==null&&(se=w(et,se,Ct),Gt===null?ct=et:Gt.sibling=et,Gt=et);return Ut&&Xi(ae,Ct),ct}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=w(Bt,se,Ct),Gt===null?ct=Bt:Gt.sibling=Bt,Gt=Bt);return i&&et.forEach(function(eo){return o(ae,eo)}),Ut&&Xi(ae,Ct),ct}function pt(ae,se,ce,Ee){if(ce==null)throw Error(r(151));for(var ct=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=w(eo,se,Ct),Gt===null?ct=eo:Gt.sibling=eo,Gt=eo,et=Bt}if(Vt.done)return u(ae,et),Ut&&Xi(ae,Ct),ct;if(et===null){for(;!Vt.done;Ct++,Vt=ce.next())Vt=Ae(ae,Vt.value,Ee),Vt!==null&&(se=w(Vt,se,Ct),Gt===null?ct=Vt:Gt.sibling=Vt,Gt=Vt);return Ut&&Xi(ae,Ct),ct}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=w(Vt,se,Ct),Gt===null?ct=Vt:Gt.sibling=Vt,Gt=Vt);return i&&et.forEach(function(iz){return o(ae,iz)}),Ut&&Xi(ae,Ct),ct}function nn(ae,se,ce,Ee){if(typeof ce=="object"&&ce!==null&&ce.type===S&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:e:{for(var ct=ce.key;se!==null;){if(se.key===ct){if(ct=ce.type,ct===S){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===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===H&&Io(ct)===se.type){u(ae,se.sibling),Ee=b(se,ce.props),ru(Ee,ce),Ee.return=ae,ae=Ee;break e}u(ae,se);break}else o(ae,se);se=se.sibling}ce.type===S?(Ee=Co(ce.props.children,ae.mode,Ee,ce.key),Ee.return=ae,ae=Ee):(Ee=wf(ce.type,ce.key,ce.props,null,ae.mode,Ee),ru(Ee,ce),Ee.return=ae,ae=Ee)}return M(ae);case x:e:{for(ct=ce.key;se!==null;){if(se.key===ct)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=gm(ce,ae.mode,Ee),Ee.return=ae,ae=Ee}return M(ae);case H:return ce=Io(ce),nn(ae,se,ce,Ee)}if(j(ce))return Qe(ae,se,ce,Ee);if(Z(ce)){if(ct=Z(ce),typeof ct!="function")throw Error(r(150));return ce=ct.call(ce),pt(ae,se,ce,Ee)}if(typeof ce.then=="function")return nn(ae,se,Nf(ce),Ee);if(ce.$$typeof===T)return nn(ae,se,_f(ae,ce),Ee);Of(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=mm(ce,ae.mode,Ee),Ee.return=ae,ae=Ee),M(ae)):u(ae,se)}return function(ae,se,ce,Ee){try{nu=0;var ct=nn(ae,se,ce,Ee);return Na=null,ct}catch(et){if(et===Aa||et===Cf)throw et;var Gt=Ur(29,et,null,ae.mode);return Gt.lanes=Ee,Gt.return=ae,Gt}}}var zo=Fx(!0),Ux=Fx(!1),js=!1;function Cm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Am(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=Sf(i),Tx(i,null,u),o}return xf(i,f,o,u),Sf(i)}function iu(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 Nm(i,o){var u=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var b=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?b=w=M:w=w.next=M,u=u.next}while(u!==null);w===null?b=w=o:w=w.next=o}else b=w=o;u={baseState:f.baseState,firstBaseUpdate:b,lastBaseUpdate:w,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 Om=!1;function su(){if(Om){var i=Ca;if(i!==null)throw i}}function ou(i,o,u,f){Om=!1;var b=i.updateQueue;js=!1;var w=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?w=de:M.next=de,M=Q;var xe=i.alternate;xe!==null&&(xe=xe.updateQueue,V=xe.lastBaseUpdate,V!==M&&(V===null?xe.firstBaseUpdate=de:V.next=de,xe.lastBaseUpdate=Q))}if(w!==null){var Ae=b.baseState;M=0,xe=de=Q=null,V=w;do{var me=V.lane&-536870913,be=me!==V.lane;if(be?($t&me)===me:(f&me)===me){me!==0&&me===Ra&&(Om=!0),xe!==null&&(xe=xe.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},xe===null?(de=xe=be,Q=Ae):xe=xe.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);xe===null&&(Q=Ae),b.baseState=Q,b.firstBaseUpdate=de,b.lastBaseUpdate=xe,w===null&&(b.shared.lanes=0),Hs|=M,i.lanes=M,i.memoizedState=Ae}}function qx(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Hx(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)qx(u[i],o)}var Oa=B(null),Mf=B(0);function Gx(i,o){i=ls,O(Mf,i),O(Oa,o),ls=i|o.baseLanes}function Mm(){O(Mf,ls),O(Oa,Oa.current)}function Im(){ls=Mf.current,G(Oa),G(Mf)}var qr=B(null),si=null;function Bs(i){var o=i.alternate;O(Mn,Mn.current&1),O(qr,i),si===null&&(o===null||Oa.current!==null||o.memoizedState!==null)&&(si=i)}function Dm(i){O(Mn,Mn.current),O(qr,i),si===null&&(si=i)}function Vx(i){i.tag===22?(O(Mn,Mn.current),O(qr,i),si===null&&(si=i)):Fs()}function Fs(){O(Mn,Mn.current),O(qr,qr.current)}function Hr(i){G(qr),si===i&&(si=null),G(Mn)}var Mn=B(0);function If(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Bg(u)||Fg(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 es=0,Rt=null,en=null,$n=null,Df=!1,Ma=!1,Lo=!1,zf=0,au=0,Ia=null,ZI=0;function Rn(){throw Error(r(321))}function zm(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 Lm(i,o,u,f,b,w){return es=w,Rt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,F.H=i===null||i.memoizedState===null?A0:Xm,Lo=!1,w=u(f,b),Lo=!1,Ma&&(w=Zx(o,u,f,b)),Kx(i),w}function Kx(i){F.H=cu;var o=en!==null&&en.next!==null;if(es=0,$n=en=Rt=null,Df=!1,au=0,Ia=null,o)throw Error(r(300));i===null||Bn||(i=i.dependencies,i!==null&&Tf(i)&&(Bn=!0))}function Zx(i,o,u,f){Rt=i;var b=0;do{if(Ma&&(Ia=null),au=0,Ma=!1,25<=b)throw Error(r(301));if(b+=1,$n=en=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}F.H=N0,w=o(u,f)}while(Ma);return w}function WI(){var i=F.H,o=i.useState()[0];return o=typeof o.then=="function"?lu(o):o,i=i.useState()[0],(en!==null?en.memoizedState:null)!==i&&(Rt.flags|=1024),o}function jm(){var i=zf!==0;return zf=0,i}function Pm(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function $m(i){if(Df){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Df=!1}es=0,$n=en=Rt=null,Ma=!1,au=zf=0,Ia=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 Lf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function lu(i){var o=au;return au+=1,Ia===null&&(Ia=[]),i=Px(Ia,i,o),o=Rt,($n===null?o.memoizedState:$n.next)===null&&(o=o.alternate,F.H=o===null||o.memoizedState===null?A0:Xm),i}function jf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return lu(i);if(i.$$typeof===T)return nr(i)}throw Error(r(438,String(i)))}function Bm(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=Lf(),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 ts(i,o){return typeof o=="function"?o(i):o}function Pf(i){var o=In();return Fm(o,en,i)}function Fm(i,o,u){var f=i.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=u;var b=i.baseQueue,w=f.pending;if(w!==null){if(b!==null){var M=b.next;b.next=w.next,w.next=M}o.baseQueue=b=w,f.pending=null}if(w=i.baseState,b===null)i.memoizedState=w;else{o=b.next;var V=M=null,Q=null,de=o,xe=!1;do{var Ae=de.lane&-536870913;if(Ae!==de.lane?($t&Ae)===Ae:(es&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===Ra&&(xe=!0);else if((es&me)===me){de=de.next,me===Ra&&(xe=!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=w):Q=Q.next=Ae,Rt.lanes|=me,Hs|=me;Ae=de.action,Lo&&u(w,Ae),w=de.hasEagerState?de.eagerState:u(w,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=w):Q=Q.next=me,Rt.lanes|=Ae,Hs|=Ae;de=de.next}while(de!==null&&de!==o);if(Q===null?M=w:Q.next=V,!Fr(w,i.memoizedState)&&(Bn=!0,xe&&(u=Ca,u!==null)))throw u;i.memoizedState=w,i.baseState=M,i.baseQueue=Q,f.lastRenderedState=w}return b===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function Um(i){var o=In(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var f=u.dispatch,b=u.pending,w=o.memoizedState;if(b!==null){u.pending=null;var M=b=b.next;do w=i(w,M.action),M=M.next;while(M!==b);Fr(w,o.memoizedState)||(Bn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,f]}function Wx(i,o,u){var f=Rt,b=In(),w=Ut;if(w){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,Gm(Qx.bind(null,f,b,i),[i]),b.getSnapshot!==o||M||$n!==null&&$n.memoizedState.tag&1){if(f.flags|=2048,Da(9,{destroy:void 0},Xx.bind(null,f,b,u,o),null),ln===null)throw Error(r(349));w||(es&127)!==0||Yx(f,o,u)}return u}function Yx(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Rt.updateQueue,o===null?(o=Lf(),Rt.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function Xx(i,o,u,f){o.value=u,o.getSnapshot=f,Jx(o)&&e0(i)}function Qx(i,o,u){return u(function(){Jx(o)&&e0(i)})}function Jx(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Fr(i,u)}catch{return!0}}function e0(i){var o=Ro(i,2);o!==null&&Mr(o,i,2)}function qm(i){var o=vr();if(typeof i=="function"){var u=i;if(i=u(),Lo){vt(!0);try{u()}finally{vt(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:i},o}function t0(i,o,u,f){return i.baseState=u,Fm(i,en,typeof f=="function"?f:ts)}function YI(i,o,u,f,b){if(Ff(i))throw Error(r(485));if(i=o.action,i!==null){var w={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){w.listeners.push(M)}};F.T!==null?u(!0):w.isTransition=!1,f(w),u=o.pending,u===null?(w.next=o.pending=w,n0(o,w)):(w.next=u.next,o.pending=u.next=w)}}function n0(i,o){var u=o.action,f=o.payload,b=i.state;if(o.isTransition){var w=F.T,M={};F.T=M;try{var V=u(b,f),Q=F.S;Q!==null&&Q(M,V),r0(i,o,V)}catch(de){Hm(i,o,de)}finally{w!==null&&M.types!==null&&(w.types=M.types),F.T=w}}else try{w=u(b,f),r0(i,o,w)}catch(de){Hm(i,o,de)}}function r0(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){i0(i,o,f)},function(f){return Hm(i,o,f)}):i0(i,o,u)}function i0(i,o,u){o.status="fulfilled",o.value=u,s0(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,n0(i,u)))}function Hm(i,o,u){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do o.status="rejected",o.reason=u,s0(o),o=o.next;while(o!==f)}i.action=null}function s0(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function o0(i,o){return o}function a0(i,o){if(Ut){var u=ln.formState;if(u!==null){e:{var f=Rt;if(Ut){if(hn){t:{for(var b=hn,w=ii;b.nodeType!==8;){if(!w){b=null;break t}if(b=oi(b.nextSibling),b===null){b=null;break t}}w=b.data,b=w==="F!"||w==="F"?b:null}if(b){hn=oi(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:o0,lastRenderedState:o},u.queue=f,u=_0.bind(null,Rt,f),f.dispatch=u,f=qm(!1),w=Ym.bind(null,Rt,!1,f.queue),f=vr(),b={state:o,dispatch:null,action:i,pending:null},f.queue=b,u=YI.bind(null,Rt,b,w,u),b.dispatch=u,f.memoizedState=i,[o,u,!1]}function l0(i){var o=In();return u0(o,en,i)}function u0(i,o,u){if(o=Fm(i,o,o0)[0],i=Pf(ts)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var f=lu(o)}catch(M){throw M===Aa?Cf:M}else f=o;o=In();var b=o.queue,w=b.dispatch;return u!==o.memoizedState&&(Rt.flags|=2048,Da(9,{destroy:void 0},XI.bind(null,b,u),null)),[f,w,i]}function XI(i,o){i.action=o}function c0(i){var o=In(),u=en;if(u!==null)return u0(o,u,i);In(),o=o.memoizedState,u=In();var f=u.queue.dispatch;return u.memoizedState=i,[o,f,!1]}function Da(i,o,u,f){return i={tag:i,create:u,deps:f,inst:o,next:null},o=Rt.updateQueue,o===null&&(o=Lf(),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 f0(){return In().memoizedState}function $f(i,o,u,f){var b=vr();Rt.flags|=i,b.memoizedState=Da(1|o,{destroy:void 0},u,f===void 0?null:f)}function Bf(i,o,u,f){var b=In();f=f===void 0?null:f;var w=b.memoizedState.inst;en!==null&&f!==null&&zm(f,en.memoizedState.deps)?b.memoizedState=Da(o,w,u,f):(Rt.flags|=i,b.memoizedState=Da(1|o,w,u,f))}function d0(i,o){$f(8390656,8,i,o)}function Gm(i,o){Bf(2048,8,i,o)}function QI(i){Rt.flags|=4;var o=Rt.updateQueue;if(o===null)o=Lf(),Rt.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function p0(i){var o=In().memoizedState;return QI({ref:o,nextImpl:i}),function(){if((Zt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function h0(i,o){return Bf(4,2,i,o)}function m0(i,o){return Bf(4,4,i,o)}function g0(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 b0(i,o,u){u=u!=null?u.concat([i]):null,Bf(4,4,g0.bind(null,o,i),u)}function Vm(){}function y0(i,o){var u=In();o=o===void 0?null:o;var f=u.memoizedState;return o!==null&&zm(o,f[1])?f[0]:(u.memoizedState=[i,o],i)}function v0(i,o){var u=In();o=o===void 0?null:o;var f=u.memoizedState;if(o!==null&&zm(o,f[1]))return f[0];if(f=i(),Lo){vt(!0);try{i()}finally{vt(!1)}}return u.memoizedState=[f,o],f}function Km(i,o,u){return u===void 0||(es&1073741824)!==0&&($t&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=kS(),Rt.lanes|=i,Hs|=i,u)}function k0(i,o,u,f){return Fr(u,o)?u:Oa.current!==null?(i=Km(i,u,f),Fr(i,o)||(Bn=!0),i):(es&42)===0||(es&1073741824)!==0&&($t&261930)===0?(Bn=!0,i.memoizedState=u):(i=kS(),Rt.lanes|=i,Hs|=i,o)}function x0(i,o,u,f,b){var w=U.p;U.p=w!==0&&8>w?w:8;var M=F.T,V={};F.T=V,Ym(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 xe=KI(Q,f);uu(i,o,xe,Kr(i))}else uu(i,o,f,Kr(i))}catch(Ae){uu(i,o,{then:function(){},status:"rejected",reason:Ae},Kr())}finally{U.p=w,M!==null&&V.types!==null&&(M.types=V.types),F.T=M}}function JI(){}function Zm(i,o,u,f){if(i.tag!==5)throw Error(r(476));var b=S0(i).queue;x0(i,b,o,P,u===null?JI:function(){return w0(i),u(f)})}function S0(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:ts,lastRenderedState:P},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function w0(i){var o=S0(i);o.next===null&&(o=i.alternate.memoizedState),uu(i,o.next.queue,{},Kr())}function Wm(){return nr(_u)}function E0(){return In().memoizedState}function T0(){return In().memoizedState}function eD(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),iu(f,o,u)),o={cache:Em()},i.payload=o;return}o=o.return}}function tD(i,o,u){var f=Kr();u={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ff(i)?R0(o,u):(u=pm(i,o,u,f),u!==null&&(Mr(u,i,f),C0(u,o,f)))}function _0(i,o,u){var f=Kr();uu(i,o,u,f)}function uu(i,o,u,f){var b={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Ff(i))R0(o,b);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var M=o.lastRenderedState,V=w(M,u);if(b.hasEagerState=!0,b.eagerState=V,Fr(V,M))return xf(i,o,b,0),ln===null&&kf(),!1}catch{}if(u=pm(i,o,b,f),u!==null)return Mr(u,i,f),C0(u,o,f),!0}return!1}function Ym(i,o,u,f){if(f={lane:2,revertLane:Cg(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Ff(i)){if(o)throw Error(r(479))}else o=pm(i,u,f,2),o!==null&&Mr(o,i,2)}function Ff(i){var o=i.alternate;return i===Rt||o!==null&&o===Rt}function R0(i,o){Ma=Df=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function C0(i,o,u){if((u&4194048)!==0){var f=o.lanes;f&=i.pendingLanes,u|=f,o.lanes=u,qe(i,u)}}var cu={readContext:nr,use:jf,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useLayoutEffect:Rn,useInsertionEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useSyncExternalStore:Rn,useId:Rn,useHostTransitionStatus:Rn,useFormState:Rn,useActionState:Rn,useOptimistic:Rn,useMemoCache:Rn,useCacheRefresh:Rn};cu.useEffectEvent=Rn;var A0={readContext:nr,use:jf,useCallback:function(i,o){return vr().memoizedState=[i,o===void 0?null:o],i},useContext:nr,useEffect:d0,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,$f(4194308,4,g0.bind(null,o,i),u)},useLayoutEffect:function(i,o){return $f(4194308,4,i,o)},useInsertionEffect:function(i,o){$f(4,2,i,o)},useMemo:function(i,o){var u=vr();o=o===void 0?null:o;var f=i();if(Lo){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(Lo){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=tD.bind(null,Rt,i),[f.memoizedState,i]},useRef:function(i){var o=vr();return i={current:i},o.memoizedState=i},useState:function(i){i=qm(i);var o=i.queue,u=_0.bind(null,Rt,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Vm,useDeferredValue:function(i,o){var u=vr();return Km(u,i,o)},useTransition:function(){var i=qm(!1);return i=x0.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||Yx(f,o,u)}b.memoizedState=u;var w={value:u,getSnapshot:o};return b.queue=w,d0(Qx.bind(null,f,w,i),[i]),f.flags|=2048,Da(9,{destroy:void 0},Xx.bind(null,f,w,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=zf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=ZI++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:Wm,useFormState:a0,useActionState:a0,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=Ym.bind(null,Rt,!0,u),u.dispatch=o,[i,o]},useMemoCache:Bm,useCacheRefresh:function(){return vr().memoizedState=eD.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)}}},Xm={readContext:nr,use:jf,useCallback:y0,useContext:nr,useEffect:Gm,useImperativeHandle:b0,useInsertionEffect:h0,useLayoutEffect:m0,useMemo:v0,useReducer:Pf,useRef:f0,useState:function(){return Pf(ts)},useDebugValue:Vm,useDeferredValue:function(i,o){var u=In();return k0(u,en.memoizedState,i,o)},useTransition:function(){var i=Pf(ts)[0],o=In().memoizedState;return[typeof i=="boolean"?i:lu(i),o]},useSyncExternalStore:Wx,useId:E0,useHostTransitionStatus:Wm,useFormState:l0,useActionState:l0,useOptimistic:function(i,o){var u=In();return t0(u,en,i,o)},useMemoCache:Bm,useCacheRefresh:T0};Xm.useEffectEvent=p0;var N0={readContext:nr,use:jf,useCallback:y0,useContext:nr,useEffect:Gm,useImperativeHandle:b0,useInsertionEffect:h0,useLayoutEffect:m0,useMemo:v0,useReducer:Um,useRef:f0,useState:function(){return Um(ts)},useDebugValue:Vm,useDeferredValue:function(i,o){var u=In();return en===null?Km(u,i,o):k0(u,en.memoizedState,i,o)},useTransition:function(){var i=Um(ts)[0],o=In().memoizedState;return[typeof i=="boolean"?i:lu(i),o]},useSyncExternalStore:Wx,useId:E0,useHostTransitionStatus:Wm,useFormState:c0,useActionState:c0,useOptimistic:function(i,o){var u=In();return en!==null?t0(u,en,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Bm,useCacheRefresh:T0};N0.useEffectEvent=p0;function Qm(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 Jm={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),iu(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),iu(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),iu(o,i,u))}};function O0(i,o,u,f,b,w,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,w,M):o.prototype&&o.prototype.isPureReactComponent?!Yl(u,f)||!Yl(b,w):!0}function M0(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&&Jm.enqueueReplaceState(o,o.state,null)}function jo(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 I0(i){vf(i)}function D0(i){console.error(i)}function z0(i){vf(i)}function Uf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(f){setTimeout(function(){throw f})}}function L0(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 eg(i,o,u){return u=Ps(u),u.tag=3,u.payload={element:null},u.callback=function(){Uf(i,o)},u}function j0(i){return i=Ps(i),i.tag=3,i}function P0(i,o,u,f){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var w=f.value;i.payload=function(){return b(w)},i.callback=function(){L0(o,u,f)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){L0(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 nD(i,o,u,f,b){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(o=u.alternate,o!==null&&_a(o,u,b,!0),u=qr.current,u!==null){switch(u.tag){case 31:case 13:return si===null?ed():u.alternate===null&&Cn===0&&(Cn=3),u.flags&=-257,u.flags|=65536,u.lanes=b,f===Af?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([f]):o.add(f),Tg(i,f,b)),!1;case 22:return u.flags|=65536,f===Af?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)),Tg(i,f,b)),!1}throw Error(r(435,u.tag))}return Tg(i,f,b),ed(),!1}if(Ut)return o=qr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=b,f!==vm&&(i=Error(r(422),{cause:f}),Jl(ti(i,u)))):(f!==vm&&(o=Error(r(423),{cause:f}),Jl(ti(o,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,f=ti(f,u),b=eg(i.stateNode,f,b),Nm(i,b),Cn!==4&&(Cn=2)),!1;var w=Error(r(520),{cause:f});if(w=ti(w,u),yu===null?yu=[w]:yu.push(w),Cn!==4&&(Cn=2),o===null)return!0;f=ti(f,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=eg(u.stateNode,f,i),Nm(u,i),!1;case 1:if(o=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Gs===null||!Gs.has(w))))return u.flags|=65536,b&=-b,u.lanes|=b,b=j0(b),P0(b,i,u,f),Nm(u,b),!1}u=u.return}while(u!==null);return!1}var tg=Error(r(461)),Bn=!1;function rr(i,o,u,f){o.child=i===null?Ux(o,null,u,f):zo(o,i.child,u,f)}function $0(i,o,u,f,b){u=u.render;var w=o.ref;if("ref"in f){var M={};for(var V in f)V!=="ref"&&(M[V]=f[V])}else M=f;return Oo(o),f=Lm(i,o,u,M,w,b),V=jm(),i!==null&&!Bn?(Pm(i,o,b),ns(i,o,b)):(Ut&&V&&bm(o),o.flags|=1,rr(i,o,f,b),o.child)}function B0(i,o,u,f,b){if(i===null){var w=u.type;return typeof w=="function"&&!hm(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,F0(i,o,w,f,b)):(i=wf(u.type,null,f,o,o.mode,b),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!ug(i,b)){var M=w.memoizedProps;if(u=u.compare,u=u!==null?u:Yl,u(M,f)&&i.ref===o.ref)return ns(i,o,b)}return o.flags|=1,i=Yi(w,f),i.ref=o.ref,i.return=o,o.child=i}function F0(i,o,u,f,b){if(i!==null){var w=i.memoizedProps;if(Yl(w,f)&&i.ref===o.ref)if(Bn=!1,o.pendingProps=f=w,ug(i,b))(i.flags&131072)!==0&&(Bn=!0);else return o.lanes=i.lanes,ns(i,o,b)}return ng(i,o,u,f,b)}function U0(i,o,u,f){var b=f.children,w=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(w=w!==null?w.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&~w}else f=0,o.child=null;return q0(i,o,w,u,f)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Rf(o,w!==null?w.cachePool:null),w!==null?Gx(o,w):Mm(),Vx(o);else return f=o.lanes=536870912,q0(i,o,w!==null?w.baseLanes|u:u,u,f)}else w!==null?(Rf(o,w.cachePool),Gx(o,w),Fs(),o.memoizedState=null):(i!==null&&Rf(o,null),Mm(),Fs());return rr(i,o,b,u),o.child}function fu(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function q0(i,o,u,f,b){var w=_m();return w=w===null?null:{parent:Pn._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&Rf(o,null),Mm(),Vx(o),i!==null&&_a(i,o,f,!0),o.childLanes=b,null}function qf(i,o){return o=Gf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function H0(i,o,u){return zo(o,i.child,null,u),i=qf(o,o.pendingProps),i.flags|=2,Hr(o),o.memoizedState=null,i}function rD(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=qf(o,f),o.lanes=536870912,fu(null,i);if(Dm(o),(i=hn)?(i=nw(i,ii),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=Rx(i),u.return=o,o.child=u,tr=o,hn=null)):i=null,i===null)throw zs(o);return o.lanes=536870912,null}return qf(o,f)}var w=i.memoizedState;if(w!==null){var M=w.dehydrated;if(Dm(o),b)if(o.flags&256)o.flags&=-257,o=H0(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||_a(i,o,u,!1),b=(u&i.childLanes)!==0,Bn||b){if(f=ln,f!==null&&(M=Wt(f,u),M!==0&&M!==w.retryLane))throw w.retryLane=M,Ro(i,M),Mr(f,i,M),tg;ed(),o=H0(i,o,u)}else i=w.treeContext,hn=oi(M.nextSibling),tr=o,Ut=!0,Ds=null,ii=!1,i!==null&&Nx(o,i),o=qf(o,f),o.flags|=4096;return o}return i=Yi(i.child,{mode:f.mode,children:f.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Hf(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 ng(i,o,u,f,b){return Oo(o),u=Lm(i,o,u,f,void 0,b),f=jm(),i!==null&&!Bn?(Pm(i,o,b),ns(i,o,b)):(Ut&&f&&bm(o),o.flags|=1,rr(i,o,u,b),o.child)}function G0(i,o,u,f,b,w){return Oo(o),o.updateQueue=null,u=Zx(o,f,u,b),Kx(i),f=jm(),i!==null&&!Bn?(Pm(i,o,w),ns(i,o,w)):(Ut&&f&&bm(o),o.flags|=1,rr(i,o,u,w),o.child)}function V0(i,o,u,f,b){if(Oo(o),o.stateNode===null){var w=Sa,M=u.contextType;typeof M=="object"&&M!==null&&(w=nr(M)),w=new u(f,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Jm,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=f,w.state=o.memoizedState,w.refs={},Cm(o),M=u.contextType,w.context=typeof M=="object"&&M!==null?nr(M):Sa,w.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(Qm(o,u,M,f),w.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(M=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),M!==w.state&&Jm.enqueueReplaceState(w,w.state,null),ou(o,f,w,b),su(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),f=!0}else if(i===null){w=o.stateNode;var V=o.memoizedProps,Q=jo(u,V);w.props=Q;var de=w.context,xe=u.contextType;M=Sa,typeof xe=="object"&&xe!==null&&(M=nr(xe));var Ae=u.getDerivedStateFromProps;xe=typeof Ae=="function"||typeof w.getSnapshotBeforeUpdate=="function",V=o.pendingProps!==V,xe||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(V||de!==M)&&M0(o,w,f,M),js=!1;var me=o.memoizedState;w.state=me,ou(o,f,w,b),su(),de=o.memoizedState,V||me!==de||js?(typeof Ae=="function"&&(Qm(o,u,Ae,f),de=o.memoizedState),(Q=js||O0(o,u,Q,f,me,de,M))?(xe||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=de),w.props=f,w.state=de,w.context=M,f=Q):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{w=o.stateNode,Am(i,o),M=o.memoizedProps,xe=jo(u,M),w.props=xe,Ae=o.pendingProps,me=w.context,de=u.contextType,Q=Sa,typeof de=="object"&&de!==null&&(Q=nr(de)),V=u.getDerivedStateFromProps,(de=typeof V=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==Ae||me!==Q)&&M0(o,w,f,Q),js=!1,me=o.memoizedState,w.state=me,ou(o,f,w,b),su();var be=o.memoizedState;M!==Ae||me!==be||js||i!==null&&i.dependencies!==null&&Tf(i.dependencies)?(typeof V=="function"&&(Qm(o,u,V,f),be=o.memoizedState),(xe=js||O0(o,u,xe,f,me,be,Q)||i!==null&&i.dependencies!==null&&Tf(i.dependencies))?(de||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(f,be,Q),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(f,be,Q)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=be),w.props=f,w.state=be,w.context=Q,f=xe):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),f=!1)}return w=f,Hf(i,o),f=(o.flags&128)!==0,w||f?(w=o.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:w.render(),o.flags|=1,i!==null&&f?(o.child=zo(o,i.child,null,b),o.child=zo(o,null,u,b)):rr(i,o,u,b),o.memoizedState=w.state,i=o.child):i=ns(i,o,b),i}function K0(i,o,u,f){return Ao(),o.flags|=256,rr(i,o,u,f),o.child}var rg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ig(i){return{baseLanes:i,cachePool:Lx()}}function sg(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Vr),i}function Z0(i,o,u){var f=o.pendingProps,b=!1,w=(o.flags&128)!==0,M;if((M=w)||(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=nw(i,ii),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=Rx(i),u.return=o,o.child=u,tr=o,hn=null)):i=null,i===null)throw zs(o);return Fg(i)?o.lanes=32:o.lanes=536870912,null}var V=f.children;return f=f.fallback,b?(Fs(),b=o.mode,V=Gf({mode:"hidden",children:V},b),f=Co(f,b,u,null),V.return=o,f.return=o,V.sibling=f,o.child=V,f=o.child,f.memoizedState=ig(u),f.childLanes=sg(i,M,u),o.memoizedState=rg,fu(null,f)):(Bs(o),og(o,V))}var Q=i.memoizedState;if(Q!==null&&(V=Q.dehydrated,V!==null)){if(w)o.flags&256?(Bs(o),o.flags&=-257,o=ag(i,o,u)):o.memoizedState!==null?(Fs(),o.child=i.child,o.flags|=128,o=null):(Fs(),V=f.fallback,b=o.mode,f=Gf({mode:"visible",children:f.children},b),V=Co(V,b,u,null),V.flags|=2,f.return=o,V.return=o,f.sibling=V,o.child=f,zo(o,i.child,null,u),f=o.child,f.memoizedState=ig(u),f.childLanes=sg(i,M,u),o.memoizedState=rg,o=fu(null,f));else if(Bs(o),Fg(V)){if(M=V.nextSibling&&V.nextSibling.dataset,M)var de=M.dgst;M=de,f=Error(r(419)),f.stack="",f.digest=M,Jl({value:f,source:null,stack:null}),o=ag(i,o,u)}else if(Bn||_a(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,Ro(i,f),Mr(M,i,f),tg;Bg(V)||ed(),o=ag(i,o,u)}else Bg(V)?(o.flags|=192,o.child=i.child,o=null):(i=Q.treeContext,hn=oi(V.nextSibling),tr=o,Ut=!0,Ds=null,ii=!1,i!==null&&Nx(o,i),o=og(o,f.children),o.flags|=4096);return o}return b?(Fs(),V=f.fallback,b=o.mode,Q=i.child,de=Q.sibling,f=Yi(Q,{mode:"hidden",children:f.children}),f.subtreeFlags=Q.subtreeFlags&65011712,de!==null?V=Yi(de,V):(V=Co(V,b,u,null),V.flags|=2),V.return=o,f.return=o,f.sibling=V,o.child=f,fu(null,f),f=o.child,V=i.child.memoizedState,V===null?V=ig(u):(b=V.cachePool,b!==null?(Q=Pn._currentValue,b=b.parent!==Q?{parent:Q,pool:Q}:b):b=Lx(),V={baseLanes:V.baseLanes|u,cachePool:b}),f.memoizedState=V,f.childLanes=sg(i,M,u),o.memoizedState=rg,fu(i.child,f)):(Bs(o),u=i.child,i=u.sibling,u=Yi(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 og(i,o){return o=Gf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Gf(i,o){return i=Ur(22,i,null,o),i.lanes=0,i}function ag(i,o,u){return zo(o,i.child,null,u),i=og(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function W0(i,o,u){i.lanes|=o;var f=i.alternate;f!==null&&(f.lanes|=o),Sm(i.return,o,u)}function lg(i,o,u,f,b,w){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:b,treeForkCount:w}:(M.isBackwards=o,M.rendering=null,M.renderingStartTime=0,M.last=f,M.tail=u,M.tailMode=b,M.treeForkCount=w)}function Y0(i,o,u){var f=o.pendingProps,b=f.revealOrder,w=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?Ql:0,!V&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&W0(i,u,o);else if(i.tag===19)W0(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&&If(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=o.child,o.child=null):(b=u.sibling,u.sibling=null),lg(o,!1,b,u,w,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&&If(i)===null){o.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}lg(o,!0,u,null,w,f);break;case"together":lg(o,!1,null,null,void 0,f);break;default:o.memoizedState=null}return o.child}function ns(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Hs|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(_a(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=Yi(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=Yi(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function ug(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Tf(i)))}function iD(i,o,u){switch(o.tag){case 3:pe(o,o.stateNode.containerInfo),Ls(o,Pn,i.memoizedState.cache),Ao();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,Dm(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?Z0(i,o,u):(Bs(o),i=ns(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||(_a(i,o,u,!1),f=(u&o.childLanes)!==0),b){if(f)return Y0(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,U0(i,o,u,o.pendingProps);case 24:Ls(o,Pn,i.memoizedState.cache)}return ns(i,o,u)}function X0(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Bn=!0;else{if(!ug(i,u)&&(o.flags&128)===0)return Bn=!1,iD(i,o,u);Bn=(i.flags&131072)!==0}else Bn=!1,Ut&&(o.flags&1048576)!==0&&Ax(o,Ql,o.index);switch(o.lanes=0,o.tag){case 16:e:{var f=o.pendingProps;if(i=Io(o.elementType),o.type=i,typeof i=="function")hm(i)?(f=jo(i,f),o.tag=1,o=V0(null,o,i,f,u)):(o.tag=0,o=ng(null,o,i,f,u));else{if(i!=null){var b=i.$$typeof;if(b===C){o.tag=11,o=$0(null,o,i,f,u);break e}else if(b===I){o.tag=14,o=B0(null,o,i,f,u);break e}}throw o=z(i)||i,Error(r(306,o,""))}}return o;case 0:return ng(i,o,o.type,o.pendingProps,u);case 1:return f=o.type,b=jo(f,o.pendingProps),V0(i,o,f,b,u);case 3:e:{if(pe(o,o.stateNode.containerInfo),i===null)throw Error(r(387));f=o.pendingProps;var w=o.memoizedState;b=w.element,Am(i,o),ou(o,f,null,u);var M=o.memoizedState;if(f=M.cache,Ls(o,Pn,f),f!==w.cache&&wm(o,[Pn],u,!0),su(),f=M.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:M.cache},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){o=K0(i,o,f,u);break e}else if(f!==b){b=ti(Error(r(424)),o),Jl(b),o=K0(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=oi(i.firstChild),tr=o,Ut=!0,Ds=null,ii=!0,u=Ux(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ao(),f===b){o=ns(i,o,u);break e}rr(i,o,f,u)}o=o.child}return o;case 26:return Hf(i,o),i===null?(u=lw(o.type,null,o.pendingProps,null))?o.memoizedState=u:Ut||(u=o.type,i=o.pendingProps,f=ad(ne.current).createElement(u),f[an]=o,f[Jn]=i,ir(f,u,i),Ln(f),o.stateNode=f):o.memoizedState=lw(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Se(o),i===null&&Ut&&(f=o.stateNode=sw(o.type,o.pendingProps,ne.current),tr=o,ii=!0,b=hn,Ws(o.type)?(Ug=b,hn=oi(f.firstChild)):hn=b),rr(i,o,o.pendingProps.children,u),Hf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Ut&&((b=f=hn)&&(f=DD(f,o.type,o.pendingProps,ii),f!==null?(o.stateNode=f,tr=o,hn=oi(f.firstChild),ii=!1,b=!0):b=!1),b||zs(o)),Se(o),b=o.type,w=o.pendingProps,M=i!==null?i.memoizedProps:null,f=w.children,jg(b,w)?f=null:M!==null&&jg(b,M)&&(o.flags|=32),o.memoizedState!==null&&(b=Lm(i,o,WI,null,null,u),_u._currentValue=b),Hf(i,o),rr(i,o,f,u),o.child;case 6:return i===null&&Ut&&((i=u=hn)&&(u=zD(u,o.pendingProps,ii),u!==null?(o.stateNode=u,tr=o,hn=null,i=!0):i=!1),i||zs(o)),null;case 13:return Z0(i,o,u);case 4:return pe(o,o.stateNode.containerInfo),f=o.pendingProps,i===null?o.child=zo(o,null,f,u):rr(i,o,f,u),o.child;case 11:return $0(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,Oo(o),b=nr(b),f=f(b),o.flags|=1,rr(i,o,f,u),o.child;case 14:return B0(i,o,o.type,o.pendingProps,u);case 15:return F0(i,o,o.type,o.pendingProps,u);case 19:return Y0(i,o,u);case 31:return rD(i,o,u);case 22:return U0(i,o,u,o.pendingProps);case 24:return Oo(o),f=nr(Pn),i===null?(b=_m(),b===null&&(b=ln,w=Em(),b.pooledCache=w,w.refCount++,w!==null&&(b.pooledCacheLanes|=u),b=w),o.memoizedState={parent:f,cache:b},Cm(o),Ls(o,Pn,b)):((i.lanes&u)!==0&&(Am(i,o),ou(o,null,null,u),su()),b=i.memoizedState,w=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=w.cache,Ls(o,Pn,f),f!==b.cache&&wm(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 rs(i){i.flags|=4}function cg(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(ES())i.flags|=8192;else throw Do=Af,Rm}else i.flags&=-16777217}function Q0(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!pw(o))if(ES())i.flags|=8192;else throw Do=Af,Rm}function Vf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Ge():536870912,i.lanes|=o,Pa|=o)}function du(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 sD(i,o,u){var f=o.pendingProps;switch(ym(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),Ji(Pn),ye(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Ta(o)?rs(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,km())),mn(o),null;case 26:var b=o.type,w=o.memoizedState;return i===null?(rs(o),w!==null?(mn(o),Q0(o,w)):(mn(o),cg(o,b,null,f,u))):w?w!==i.memoizedState?(rs(o),mn(o),Q0(o,w)):(mn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==f&&rs(o),mn(o),cg(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&&rs(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return mn(o),null}i=ie.current,Ta(o)?Ox(o):(i=sw(b,f,u),o.stateNode=i,rs(o))}return mn(o),null;case 5:if(ze(o),b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==f&&rs(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return mn(o),null}if(w=ie.current,Ta(o))Ox(o);else{var M=ad(ne.current);switch(w){case 1:w=M.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:w=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":w=M.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":w=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":w=M.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof f.is=="string"?M.createElement("select",{is:f.is}):M.createElement("select"),f.multiple?w.multiple=!0:f.size&&(w.size=f.size);break;default:w=typeof f.is=="string"?M.createElement(b,{is:f.is}):M.createElement(b)}}w[an]=o,w[Jn]=f;e:for(M=o.child;M!==null;){if(M.tag===5||M.tag===6)w.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=w;e:switch(ir(w,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&&rs(o)}}return mn(o),cg(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==f&&rs(o);else{if(typeof f!="string"&&o.stateNode===null)throw Error(r(166));if(i=ne.current,Ta(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||ZS(i.nodeValue,u)),i||zs(o,!0)}else i=ad(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=Ta(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 Ao(),(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=Ta(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 Ao(),(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),w=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(w=f.memoizedState.cachePool.pool),w!==b&&(f.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),Vf(o,o.updateQueue),mn(o),null);case 4:return ye(),i===null&&Mg(o.stateNode.containerInfo),mn(o),null;case 10:return Ji(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,w=f.rendering,w===null)if(b)du(f,!1);else{if(Cn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=If(i),w!==null){for(o.flags|=128,du(f,!1),i=w.updateQueue,o.updateQueue=i,Vf(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)_x(u,i),u=u.sibling;return O(Mn,Mn.current&1|2),Ut&&Xi(o,f.treeForkCount),o.child}i=i.sibling}f.tail!==null&&re()>Xf&&(o.flags|=128,b=!0,du(f,!1),o.lanes=4194304)}else{if(!b)if(i=If(w),i!==null){if(o.flags|=128,b=!0,i=i.updateQueue,o.updateQueue=i,Vf(o,i),du(f,!0),f.tail===null&&f.tailMode==="hidden"&&!w.alternate&&!Ut)return mn(o),null}else 2*re()-f.renderingStartTime>Xf&&u!==536870912&&(o.flags|=128,b=!0,du(f,!1),o.lanes=4194304);f.isBackwards?(w.sibling=o.child,o.child=w):(i=f.last,i!==null?i.sibling=w:o.child=w,f.last=w)}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&&Xi(o,f.treeForkCount),i):(mn(o),null);case 22:case 23:return Hr(o),Im(),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&&Vf(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(Mo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),Ji(Pn),mn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function oD(i,o){switch(ym(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Ji(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));Ao()}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));Ao()}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 Ji(o.type),null;case 22:case 23:return Hr(o),Im(),i!==null&&G(Mo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return Ji(Pn),null;case 25:return null;default:return null}}function J0(i,o){switch(ym(o),o.tag){case 3:Ji(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:Ji(o.type);break;case 22:case 23:Hr(o),Im(),i!==null&&G(Mo);break;case 24:Ji(Pn)}}function pu(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 w=u.create,M=u.inst;f=w(),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 w=b.next;f=w;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(xe){Jt(b,Q,xe)}}}f=f.next}while(f!==w)}}catch(xe){Jt(o,o.return,xe)}}function eS(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Hx(o,u)}catch(f){Jt(i,i.return,f)}}}function tS(i,o,u){u.props=jo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(f){Jt(i,o,f)}}function hu(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 nS(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 fg(i,o,u){try{var f=i.stateNode;CD(f,i.type,u,o),f[Jn]=o}catch(b){Jt(i,i.return,b)}}function rS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ws(i.type)||i.tag===4}function dg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||rS(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 pg(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(pg(i,o,u),i=i.sibling;i!==null;)pg(i,o,u),i=i.sibling}function Kf(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(Kf(i,o,u),i=i.sibling;i!==null;)Kf(i,o,u),i=i.sibling}function iS(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(w){Jt(i,i.return,w)}}var is=!1,Fn=!1,hg=!1,sS=typeof WeakSet=="function"?WeakSet:Set,Zn=null;function aD(i,o){if(i=i.containerInfo,zg=hd,i=bx(i),am(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,w=f.focusNode;f=f.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var M=0,V=-1,Q=-1,de=0,xe=0,Ae=i,me=null;t:for(;;){for(var be;Ae!==u||b!==0&&Ae.nodeType!==3||(V=M+b),Ae!==w||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===w&&++xe===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(Lg={focusedElem:i,selectionRange:u},hd=!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,w=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&&w!==null){i=void 0,u=o,b=w.memoizedProps,w=w.memoizedState,f=u.stateNode;try{var Qe=jo(u.type,b);i=f.getSnapshotBeforeUpdate(Qe,w),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)$g(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":$g(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 oS(i,o,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:os(i,u),f&4&&pu(5,u);break;case 1:if(os(i,u),f&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(M){Jt(u,u.return,M)}else{var b=jo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(b,o,i.__reactInternalSnapshotBeforeUpdate)}catch(M){Jt(u,u.return,M)}}f&64&&eS(u),f&512&&hu(u,u.return);break;case 3:if(os(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{Hx(i,o)}catch(M){Jt(u,u.return,M)}}break;case 27:o===null&&f&4&&iS(u);case 26:case 5:os(i,u),o===null&&f&4&&nS(u),f&512&&hu(u,u.return);break;case 12:os(i,u);break;case 31:os(i,u),f&4&&uS(i,u);break;case 13:os(i,u),f&4&&cS(i,u),f&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=gD.bind(null,u),LD(i,u))));break;case 22:if(f=u.memoizedState!==null||is,!f){o=o!==null&&o.memoizedState!==null||Fn,b=is;var w=Fn;is=f,(Fn=o)&&!w?as(i,u,(u.subtreeFlags&8772)!==0):os(i,u),is=b,Fn=w}break;case 30:break;default:os(i,u)}}function aS(i){var o=i.alternate;o!==null&&(i.alternate=null,aS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Pl(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 ss(i,o,u){for(u=u.child;u!==null;)lS(i,o,u),u=u.sibling}function lS(i,o,u){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(it,u)}catch{}switch(u.tag){case 26:Fn||Oi(u,o),ss(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),ss(i,o,u),wu(u.stateNode),gn=f,Cr=b;break;case 5:Fn||Oi(u,o);case 6:if(f=gn,b=Cr,gn=null,ss(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(w){Jt(u,o,w)}else try{gn.removeChild(u.stateNode)}catch(w){Jt(u,o,w)}break;case 18:gn!==null&&(Cr?(i=gn,ew(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Va(i)):ew(gn,u.stateNode));break;case 4:f=gn,b=Cr,gn=u.stateNode.containerInfo,Cr=!0,ss(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),ss(i,o,u);break;case 1:Fn||(Oi(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"&&tS(u,o,f)),ss(i,o,u);break;case 21:ss(i,o,u);break;case 22:Fn=(f=Fn)||u.memoizedState!==null,ss(i,o,u),Fn=f;break;default:ss(i,o,u)}}function uS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Va(i)}catch(u){Jt(o,o.return,u)}}}function cS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Va(i)}catch(u){Jt(o,o.return,u)}}function lD(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new sS),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new sS),o;default:throw Error(r(435,i.tag))}}function Zf(i,o){var u=lD(i);o.forEach(function(f){if(!u.has(f)){u.add(f);var b=bD.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],w=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));lS(w,M,b),gn=null,Cr=!1,w=b.alternate,w!==null&&(w.return=null),b.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)fS(o,i),o=o.sibling}var yi=null;function fS(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),pu(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&&is&&(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=yi;if(Ar(o,i),Nr(i),f&512&&(Fn||u===null||Oi(u,u.return)),f&4){var w=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":w=b.getElementsByTagName("title")[0],(!w||w[xo]||w[an]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=b.createElement(f),b.head.insertBefore(w,b.querySelector("head > title"))),ir(w,f,u),w[an]=i,Ln(w),f=w;break e;case"link":var M=fw("link","href",b).get(f+(u.href||""));if(M){for(var V=0;V<M.length;V++)if(w=M[V],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(V,1);break t}}w=b.createElement(f),ir(w,f,u),b.head.appendChild(w);break;case"meta":if(M=fw("meta","content",b).get(f+(u.content||""))){for(V=0;V<M.length;V++)if(w=M[V],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(V,1);break t}}w=b.createElement(f),ir(w,f,u),b.head.appendChild(w);break;default:throw Error(r(468,f))}w[an]=i,Ln(w),f=w}i.stateNode=f}else dw(b,i.type,i.stateNode);else i.stateNode=cw(b,f,i.memoizedProps);else w!==f?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,f===null?dw(b,i.type,i.stateNode):cw(b,f,i.memoizedProps)):f===null&&i.stateNode!==null&&fg(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&&fg(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,fg(i,b,u!==null?u.memoizedProps:b)),f&1024&&(hg=!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(cd=null,b=yi,yi=ld(o.containerInfo),Ar(o,i),yi=b,Nr(i),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Va(o.containerInfo)}catch(Qe){Jt(i,i.return,Qe)}hg&&(hg=!1,dS(i));break;case 4:f=yi,yi=ld(i.stateNode.containerInfo),Ar(o,i),Nr(i),yi=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,Zf(i,f)));break;case 13:Ar(o,i),Nr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Yf=re()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,Zf(i,f)));break;case 22:b=i.memoizedState!==null;var Q=u!==null&&u.memoizedState!==null,de=is,xe=Fn;if(is=de||b,Fn=xe||Q,Ar(o,i),Fn=xe,is=de,Nr(i),f&8192)e:for(o=i.stateNode,o._visibility=b?o._visibility&-2:o._visibility|1,b&&(u===null||Q||is||Fn||Po(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){Q=u=o;try{if(w=Q.stateNode,b)M=w.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?tw(be,!0):tw(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,Zf(i,u))));break;case 19:Ar(o,i),Nr(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,Zf(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(rS(f)){u=f;break}f=f.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var b=u.stateNode,w=dg(i);Kf(i,w,b);break;case 5:var M=u.stateNode;u.flags&32&&(mt(M,""),u.flags&=-33);var V=dg(i);Kf(i,V,M);break;case 3:case 4:var Q=u.stateNode.containerInfo,de=dg(i);pg(i,de,Q);break;default:throw Error(r(161))}}catch(xe){Jt(i,i.return,xe)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function dS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;dS(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function os(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)oS(i,o.alternate,o),o=o.sibling}function Po(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),Po(o);break;case 1:Oi(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&tS(o,o.return,u),Po(o);break;case 27:wu(o.stateNode);case 26:case 5:Oi(o,o.return),Po(o);break;case 22:o.memoizedState===null&&Po(o);break;case 30:Po(o);break;default:Po(o)}i=i.sibling}}function as(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var f=o.alternate,b=i,w=o,M=w.flags;switch(w.tag){case 0:case 11:case 15:as(b,w,u),pu(4,w);break;case 1:if(as(b,w,u),f=w,b=f.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(de){Jt(f,f.return,de)}if(f=w,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++)qx(Q[b],V)}catch(de){Jt(f,f.return,de)}}u&&M&64&&eS(w),hu(w,w.return);break;case 27:iS(w);case 26:case 5:as(b,w,u),u&&f===null&&M&4&&nS(w),hu(w,w.return);break;case 12:as(b,w,u);break;case 31:as(b,w,u),u&&M&4&&uS(b,w);break;case 13:as(b,w,u),u&&M&4&&cS(b,w);break;case 22:w.memoizedState===null&&as(b,w,u),hu(w,w.return);break;case 30:break;default:as(b,w,u)}o=o.sibling}}function mg(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&&eu(u))}function gg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&eu(i))}function vi(i,o,u,f){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)pS(i,o,u,f),o=o.sibling}function pS(i,o,u,f){var b=o.flags;switch(o.tag){case 0:case 11:case 15:vi(i,o,u,f),b&2048&&pu(9,o);break;case 1:vi(i,o,u,f);break;case 3:vi(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&&eu(i)));break;case 12:if(b&2048){vi(i,o,u,f),i=o.stateNode;try{var w=o.memoizedProps,M=w.id,V=w.onPostCommit;typeof V=="function"&&V(M,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Q){Jt(o,o.return,Q)}}else vi(i,o,u,f);break;case 31:vi(i,o,u,f);break;case 13:vi(i,o,u,f);break;case 23:break;case 22:w=o.stateNode,M=o.alternate,o.memoizedState!==null?w._visibility&2?vi(i,o,u,f):mu(i,o):w._visibility&2?vi(i,o,u,f):(w._visibility|=2,za(i,o,u,f,(o.subtreeFlags&10256)!==0||!1)),b&2048&&mg(M,o);break;case 24:vi(i,o,u,f),b&2048&&gg(o.alternate,o);break;default:vi(i,o,u,f)}}function za(i,o,u,f,b){for(b=b&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=i,M=o,V=u,Q=f,de=M.flags;switch(M.tag){case 0:case 11:case 15:za(w,M,V,Q,b),pu(8,M);break;case 23:break;case 22:var xe=M.stateNode;M.memoizedState!==null?xe._visibility&2?za(w,M,V,Q,b):mu(w,M):(xe._visibility|=2,za(w,M,V,Q,b)),b&&de&2048&&mg(M.alternate,M);break;case 24:za(w,M,V,Q,b),b&&de&2048&&gg(M.alternate,M);break;default:za(w,M,V,Q,b)}o=o.sibling}}function mu(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:mu(u,f),b&2048&&mg(f.alternate,f);break;case 24:mu(u,f),b&2048&&gg(f.alternate,f);break;default:mu(u,f)}o=o.sibling}}var gu=8192;function La(i,o,u){if(i.subtreeFlags&gu)for(i=i.child;i!==null;)hS(i,o,u),i=i.sibling}function hS(i,o,u){switch(i.tag){case 26:La(i,o,u),i.flags&gu&&i.memoizedState!==null&&ZD(u,yi,i.memoizedState,i.memoizedProps);break;case 5:La(i,o,u);break;case 3:case 4:var f=yi;yi=ld(i.stateNode.containerInfo),La(i,o,u),yi=f;break;case 22:i.memoizedState===null&&(f=i.alternate,f!==null&&f.memoizedState!==null?(f=gu,gu=16777216,La(i,o,u),gu=f):La(i,o,u));break;default:La(i,o,u)}}function mS(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 bu(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,bS(f,i)}mS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)gS(i),i=i.sibling}function gS(i){switch(i.tag){case 0:case 11:case 15:bu(i),i.flags&2048&&Us(9,i,i.return);break;case 3:bu(i);break;case 12:bu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Wf(i)):bu(i);break;default:bu(i)}}function Wf(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,bS(f,i)}mS(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Us(8,o,o.return),Wf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,Wf(o));break;default:Wf(o)}i=i.sibling}}function bS(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:eu(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,w=f.return;if(aS(f),f===u){Zn=null;break e}if(b!==null){b.return=w,Zn=b;break e}Zn=w}}}var uD={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}},cD=typeof WeakMap=="function"?WeakMap:Map,Zt=0,ln=null,zt=null,$t=0,Qt=0,Gr=null,qs=!1,ja=!1,bg=!1,ls=0,Cn=0,Hs=0,$o=0,yg=0,Vr=0,Pa=0,yu=null,Or=null,vg=!1,Yf=0,yS=0,Xf=1/0,Qf=null,Gs=null,Gn=0,Vs=null,$a=null,us=0,kg=0,xg=null,vS=null,vu=0,Sg=null;function Kr(){return(Zt&2)!==0&&$t!==0?$t&-$t:F.T!==null?Cg():Kn()}function kS(){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)&&(Ba(i,0),Ks(i,$t,Vr,!1)),St(i,u),((Zt&2)===0||i!==ln)&&(i===ln&&((Zt&2)===0&&($o|=u),Cn===4&&Ks(i,$t,Vr,!1)),Mi(i))}function xS(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?pD(i,o):Eg(i,o,!0),w=f;do{if(b===0){ja&&!f&&Ks(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!fD(u)){b=Eg(i,o,!1),w=!1;continue}if(b===2){if(w=o,i.errorRecoveryDisabledLanes&w)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=yu;var Q=V.current.memoizedState.isDehydrated;if(Q&&(Ba(V,M).flags|=256),M=Eg(V,M,!1),M!==2){if(bg&&!Q){V.errorRecoveryDisabledLanes|=w,$o|=w,b=4;break e}w=Or,Or=b,w!==null&&(Or===null?Or=w:Or.push.apply(Or,w))}b=M}if(w=!1,b!==2)continue}}if(b===1){Ba(i,0),Ks(i,o,0,!0);break}e:{switch(f=i,w=b,w){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=Yf+300-re(),10<b)){if(Ks(f,o,Vr,!qs),Y(f,0,!0)!==0)break e;us=o,f.timeoutHandle=QS(SS.bind(null,f,u,Or,Qf,vg,o,Vr,$o,Pa,qs,w,"Throttled",-0,0),b);break e}SS(f,u,Or,Qf,vg,o,Vr,$o,Pa,qs,w,null,-0,0)}}break}while(!0);Mi(i)}function SS(i,o,u,f,b,w,M,V,Q,de,xe,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},hS(o,w,Ae);var Qe=(w&62914560)===w?Yf-re():(w&4194048)===w?yS-re():0;if(Qe=WD(Ae,Qe),Qe!==null){us=w,i.cancelPendingCommit=Qe(NS.bind(null,i,o,w,u,f,b,M,V,Q,xe,Ae,null,me,be)),Ks(i,w,M,!de);return}}NS(i,o,w,u,f,b,M,V,Q)}function fD(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],w=b.getSnapshot;b=b.value;try{if(!Fr(w(),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&=~yg,o&=~$o,i.suspendedLanes|=o,i.pingedLanes&=~o,f&&(i.warmLanes|=o),f=i.expirationTimes;for(var b=o;0<b;){var w=31-st(b),M=1<<w;f[w]=-1,b&=~M}u!==0&&Le(i,u,o)}function Jf(){return(Zt&6)===0?(ku(0),!1):!0}function wg(){if(zt!==null){if(Qt===0)var i=zt.return;else i=zt,Qi=No=null,$m(i),Na=null,nu=0,i=zt;for(;i!==null;)J0(i.alternate,i),i=i.return;zt=null}}function Ba(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,OD(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),us=0,wg(),ln=i,zt=u=Yi(i.current,null),$t=o,Qt=0,Gr=null,qs=!1,ja=X(i,o),bg=!1,Pa=Vr=yg=$o=Hs=Cn=0,Or=yu=null,vg=!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),w=1<<b;o|=i[b],f&=~w}return ls=o,kf(),u}function wS(i,o){Rt=null,F.H=cu,o===Aa||o===Cf?(o=$x(),Qt=3):o===Rm?(o=$x(),Qt=4):Qt=o===tg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Gr=o,zt===null&&(Cn=1,Uf(i,ti(o,i.current)))}function ES(){var i=qr.current;return i===null?!0:($t&4194048)===$t?si===null:($t&62914560)===$t||($t&536870912)!==0?i===si:!1}function TS(){var i=F.H;return F.H=cu,i===null?cu:i}function _S(){var i=F.A;return F.A=uD,i}function ed(){Cn=4,qs||($t&4194048)!==$t&&qr.current!==null||(ja=!0),(Hs&134217727)===0&&($o&134217727)===0||ln===null||Ks(ln,$t,Vr,!1)}function Eg(i,o,u){var f=Zt;Zt|=2;var b=TS(),w=_S();(ln!==i||$t!==o)&&(Qf=null,Ba(i,o)),o=!1;var M=Cn;e:do try{if(Qt!==0&&zt!==null){var V=zt,Q=Gr;switch(Qt){case 8:wg(),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,Fa(i,V,Q,de),u&&ja){M=0;break e}break;default:de=Qt,Qt=0,Gr=null,Fa(i,V,Q,de)}}dD(),M=Cn;break}catch(xe){wS(i,xe)}while(!0);return o&&i.shellSuspendCounter++,Qi=No=null,Zt=f,F.H=b,F.A=w,zt===null&&(ln=null,$t=0,kf()),M}function dD(){for(;zt!==null;)RS(zt)}function pD(i,o){var u=Zt;Zt|=2;var f=TS(),b=_S();ln!==i||$t!==o?(Qf=null,Xf=re()+500,Ba(i,o)):ja=X(i,o);e:do try{if(Qt!==0&&zt!==null){o=zt;var w=Gr;t:switch(Qt){case 1:Qt=0,Gr=null,Fa(i,o,w,1);break;case 2:case 9:if(jx(w)){Qt=0,Gr=null,CS(o);break}o=function(){Qt!==2&&Qt!==9||ln!==i||(Qt=7),Mi(i)},w.then(o,o);break e;case 3:Qt=7;break e;case 4:Qt=5;break e;case 7:jx(w)?(Qt=0,Gr=null,CS(o)):(Qt=0,Gr=null,Fa(i,o,w,7));break;case 5:var M=null;switch(zt.tag){case 26:M=zt.memoizedState;case 5:case 27:var V=zt;if(M?pw(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,td(de)):zt=null}break t}}Qt=0,Gr=null,Fa(i,o,w,5);break;case 6:Qt=0,Gr=null,Fa(i,o,w,6);break;case 8:wg(),Cn=6;break e;default:throw Error(r(462))}}hD();break}catch(xe){wS(i,xe)}while(!0);return Qi=No=null,F.H=f,F.A=b,Zt=u,zt!==null?0:(ln=null,$t=0,kf(),Cn)}function hD(){for(;zt!==null&&!fe();)RS(zt)}function RS(i){var o=X0(i.alternate,i,ls);i.memoizedProps=i.pendingProps,o===null?td(i):zt=o}function CS(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=G0(u,o,o.pendingProps,o.type,void 0,$t);break;case 11:o=G0(u,o,o.pendingProps,o.type.render,o.ref,$t);break;case 5:$m(o);default:J0(u,o),o=zt=_x(o,ls),o=X0(u,o,ls)}i.memoizedProps=i.pendingProps,o===null?td(i):zt=o}function Fa(i,o,u,f){Qi=No=null,$m(o),Na=null,nu=0;var b=o.return;try{if(nD(i,b,o,u,$t)){Cn=1,Uf(i,ti(u,i.current)),zt=null;return}}catch(w){if(b!==null)throw zt=b,w;Cn=1,Uf(i,ti(u,i.current)),zt=null;return}o.flags&32768?(Ut||f===1?i=!0:ja||($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))),AS(o,i)):td(o)}function td(i){var o=i;do{if((o.flags&32768)!==0){AS(o,qs);return}i=o.return;var u=sD(o.alternate,o,ls);if(u!==null){zt=u;return}if(o=o.sibling,o!==null){zt=o;return}zt=o=i}while(o!==null);Cn===0&&(Cn=5)}function AS(i,o){do{var u=oD(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);Cn=6,zt=null}function NS(i,o,u,f,b,w,M,V,Q){i.cancelPendingCommit=null;do nd();while(Gn!==0);if((Zt&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=dm,$e(i,u,w,M,V,Q),i===ln&&(zt=ln=null,$t=0),$a=o,Vs=i,us=u,kg=w,xg=b,vS=f,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,yD(Ie,function(){return zS(),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{aD(i,o,u)}finally{Zt=M,U.p=b,F.T=f}}Gn=1,OS(),MS(),IS()}}function OS(){if(Gn===1){Gn=0;var i=Vs,o=$a,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{fS(o,i);var w=Lg,M=bx(i.containerInfo),V=w.focusedElem,Q=w.selectionRange;if(M!==V&&V&&V.ownerDocument&&gx(V.ownerDocument.documentElement,V)){if(Q!==null&&am(V)){var de=Q.start,xe=Q.end;if(xe===void 0&&(xe=de),"selectionStart"in V)V.selectionStart=de,V.selectionEnd=Math.min(xe,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=mx(V,pt),se=mx(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}}hd=!!zg,Lg=zg=null}finally{Zt=b,U.p=f,F.T=u}}i.current=o,Gn=2}}function MS(){if(Gn===2){Gn=0;var i=Vs,o=$a,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{oS(i,o.alternate,o)}finally{Zt=b,U.p=f,F.T=u}}Gn=3}}function IS(){if(Gn===4||Gn===3){Gn=0,oe();var i=Vs,o=$a,u=us,f=vS;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Gn=5:(Gn=0,$a=Vs=null,DS(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 w=i.onRecoverableError,M=0;M<f.length;M++){var V=f[M];w(V.value,{componentStack:V.stack})}}finally{F.T=o,U.p=b}}(us&3)!==0&&nd(),Mi(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===Sg?vu++:(vu=0,Sg=i):vu=0,ku(0)}}function DS(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,eu(o)))}function nd(){return OS(),MS(),IS(),zS()}function zS(){if(Gn!==5)return!1;var i=Vs,o=kg;kg=0;var u=Dt(us),f=F.T,b=U.p;try{U.p=32>u?32:u,F.T=null,u=xg,xg=null;var w=Vs,M=us;if(Gn=0,$a=Vs=null,us=0,(Zt&6)!==0)throw Error(r(331));var V=Zt;if(Zt|=4,gS(w.current),pS(w,w.current,M,u),Zt=V,ku(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(it,w)}catch{}return!0}finally{U.p=b,F.T=f,DS(i,o)}}function LS(i,o,u){o=ti(u,o),o=eg(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)LS(i,i,u);else for(;o!==null;){if(o.tag===3){LS(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=ti(u,i),u=j0(2),f=$s(o,u,2),f!==null&&(P0(u,f,o,i),St(f,2),Mi(f));break}}o=o.return}}function Tg(i,o,u){var f=i.pingCache;if(f===null){f=i.pingCache=new cD;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)||(bg=!0,b.add(u),i=mD.bind(null,i,o,u),o.then(i,i))}function mD(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&&(Cn===4||Cn===3&&($t&62914560)===$t&&300>re()-Yf?(Zt&2)===0&&Ba(i,0):yg|=u,Pa===$t&&(Pa=0)),Mi(i)}function jS(i,o){o===0&&(o=Ge()),i=Ro(i,o),i!==null&&(St(i,o),Mi(i))}function gD(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),jS(i,u)}function bD(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),jS(i,u)}function yD(i,o){return Pe(i,o)}var rd=null,Ua=null,_g=!1,id=!1,Rg=!1,Zs=0;function Mi(i){i!==Ua&&i.next===null&&(Ua===null?rd=Ua=i:Ua=Ua.next=i),id=!0,_g||(_g=!0,kD())}function ku(i,o){if(!Rg&&id){Rg=!0;do for(var u=!1,f=rd;f!==null;){if(i!==0){var b=f.pendingLanes;if(b===0)var w=0;else{var M=f.suspendedLanes,V=f.pingedLanes;w=(1<<31-st(42|i)+1)-1,w&=b&~(M&~V),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,FS(f,w))}else w=$t,w=Y(f,f===ln?w:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(w&3)===0||X(f,w)||(u=!0,FS(f,w));f=f.next}while(u);Rg=!1}}function vD(){PS()}function PS(){id=_g=!1;var i=0;Zs!==0&&ND()&&(i=Zs);for(var o=re(),u=null,f=rd;f!==null;){var b=f.next,w=$S(f,o);w===0?(f.next=null,u===null?rd=b:u.next=b,b===null&&(Ua=u)):(u=f,(i!==0||(w&3)!==0)&&(id=!0)),f=b}Gn!==0&&Gn!==5||ku(i),Zs!==0&&(Zs=0)}function $S(i,o){for(var u=i.suspendedLanes,f=i.pingedLanes,b=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var M=31-st(w),V=1<<M,Q=b[M];Q===-1?((V&u)===0||(V&f)!==0)&&(b[M]=we(V,o)):Q<=o&&(i.expiredLanes|=V),w&=~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=BS.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 BS(i,o){if(Gn!==0&&Gn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(nd()&&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:(xS(i,f,o),$S(i,re()),i.callbackNode!=null&&i.callbackNode===u?BS.bind(null,i):null)}function FS(i,o){if(nd())return null;xS(i,o,!0)}function kD(){MD(function(){(Zt&6)!==0?Pe(J,vD):PS()})}function Cg(){if(Zs===0){var i=Ra;i===0&&(i=Fe,Fe<<=1,(Fe&261888)===0&&(Fe=256)),Zs=i}return Zs}function US(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Os(""+i)}function qS(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 xD(i,o,u,f,b){if(o==="submit"&&u&&u.stateNode===b){var w=US((b[Jn]||null).action),M=f.submitter;M&&(o=(o=M[Jn]||null)?US(o.formAction):M.getAttribute("formAction"),o!==null&&(w=o,M=null));var V=new gf("action","action",null,f,b);i.push({event:V,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Zs!==0){var Q=M?qS(b,M):new FormData(b);Zm(u,{pending:!0,data:Q,method:b.method,action:w},null,Q)}}else typeof w=="function"&&(V.preventDefault(),Q=M?qS(b,M):new FormData(b),Zm(u,{pending:!0,data:Q,method:b.method,action:w},w,Q))},currentTarget:b}]})}}for(var Ag=0;Ag<fm.length;Ag++){var Ng=fm[Ag],SD=Ng.toLowerCase(),wD=Ng[0].toUpperCase()+Ng.slice(1);bi(SD,"on"+wD)}bi(kx,"onAnimationEnd"),bi(xx,"onAnimationIteration"),bi(Sx,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi($I,"onTransitionRun"),bi(BI,"onTransitionStart"),bi(FI,"onTransitionCancel"),bi(wx,"onTransitionEnd"),De("onMouseEnter",["mouseout","mouseover"]),De("onMouseLeave",["mouseout","mouseover"]),De("onPointerEnter",["pointerout","pointerover"]),De("onPointerLeave",["pointerout","pointerover"]),Ki("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ki("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ki("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ki("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ki("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(" "),ED=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xu));function HS(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 w=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!==w&&b.isPropagationStopped())break e;w=V,b.currentTarget=de;try{w(b)}catch(xe){vf(xe)}b.currentTarget=null,w=Q}else for(M=0;M<f.length;M++){if(V=f[M],Q=V.instance,de=V.currentTarget,V=V.listener,Q!==w&&b.isPropagationStopped())break e;w=V,b.currentTarget=de;try{w(b)}catch(xe){vf(xe)}b.currentTarget=null,w=Q}}}}function Lt(i,o){var u=o[jl];u===void 0&&(u=o[jl]=new Set);var f=i+"__bubble";u.has(f)||(GS(o,i,2,!1),u.add(f))}function Og(i,o,u){var f=0;o&&(f|=4),GS(u,i,f,o)}var sd="_reactListening"+Math.random().toString(36).slice(2);function Mg(i){if(!i[sd]){i[sd]=!0,lf.forEach(function(u){u!=="selectionchange"&&(ED.has(u)||Og(u,!1,i),Og(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[sd]||(o[sd]=!0,Og("selectionchange",!1,o))}}function GS(i,o,u,f){switch(kw(o)){case 2:var b=QD;break;case 8:b=JD;break;default:b=Kg}u=b.bind(null,o,u,i),b=void 0,!Qh||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 Ig(i,o,u,f,b){var w=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=w=M;continue e}V=V.parentNode}}f=f.return}df(function(){var de=w,xe=Tt(u),Ae=[];e:{var me=Ex.get(i);if(me!==void 0){var be=gf,Qe=i;switch(i){case"keypress":if(hf(u)===0)break e;case"keydown":case"keyup":be=bI;break;case"focusin":Qe="focus",be=nm;break;case"focusout":Qe="blur",be=nm;break;case"beforeblur":case"afterblur":be=nm;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=Jk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=sI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=kI;break;case kx:case xx:case Sx:be=lI;break;case wx:be=SI;break;case"scroll":case"scrollend":be=rI;break;case"wheel":be=EI;break;case"copy":case"cut":case"paste":be=cI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=tx;break;case"toggle":case"beforetoggle":be=_I}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=ql(se,ae),Ee!=null&&pt.push(Su(se,Ee,ce))),nn)break;se=se.return}0<pt.length&&(me=new be(me,Qe,null,u,xe),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[Gi]))break e;if((be||me)&&(me=xe.window===xe?xe:(me=xe.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=Jk,Ee="onMouseLeave",ae="onMouseEnter",se="mouse",(i==="pointerout"||i==="pointerover")&&(pt=tx,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,xe),me.target=nn,me.relatedTarget=ce,Ee=null,yr(xe)===de&&(pt=new pt(ae,se+"enter",Qe,u,xe),pt.target=ce,pt.relatedTarget=nn,Ee=pt),nn=Ee,be&&Qe)t:{for(pt=TD,ae=be,se=Qe,ce=0,Ee=ae;Ee;Ee=pt(Ee))ce++;Ee=0;for(var ct=se;ct;ct=pt(ct))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&&VS(Ae,me,be,pt,!1),Qe!==null&&nn!==null&&VS(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=ux;else if(ax(me))if(cx)Gt=LI;else{Gt=DI;var et=II}else be=me.nodeName,!be||be.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?de&&Ns(de.elementType)&&(Gt=ux):Gt=zI;if(Gt&&(Gt=Gt(i,de))){lx(Ae,Gt,u,xe);break e}et&&et(i,me,de),i==="focusout"&&de&&me.type==="number"&&de.memoizedProps.value!=null&&ga(me,"number",me.value)}switch(et=de?Cs(de):window,i){case"focusin":(ax(et)||et.contentEditable==="true")&&(va=et,lm=de,Xl=null);break;case"focusout":Xl=lm=va=null;break;case"mousedown":um=!0;break;case"contextmenu":case"mouseup":case"dragend":um=!1,yx(Ae,u,xe);break;case"selectionchange":if(PI)break;case"keydown":case"keyup":yx(Ae,u,xe)}var Ct;if(im)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 ya?sx(i,u)&&(Bt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Bt="onCompositionStart");Bt&&(nx&&u.locale!=="ko"&&(ya||Bt!=="onCompositionStart"?Bt==="onCompositionEnd"&&ya&&(Ct=Xk()):(Ms=xe,Jh="value"in Ms?Ms.value:Ms.textContent,ya=!0)),et=od(de,Bt),0<et.length&&(Bt=new ex(Bt,i,null,u,xe),Ae.push({event:Bt,listeners:et}),Ct?Bt.data=Ct:(Ct=ox(u),Ct!==null&&(Bt.data=Ct)))),(Ct=CI?AI(i,u):NI(i,u))&&(Bt=od(de,"onBeforeInput"),0<Bt.length&&(et=new ex("onBeforeInput","beforeinput",null,u,xe),Ae.push({event:et,listeners:Bt}),et.data=Ct)),xD(Ae,i,de,u,xe)}HS(Ae,o)})}function Su(i,o,u){return{instance:i,listener:o,currentTarget:u}}function od(i,o){for(var u=o+"Capture",f=[];i!==null;){var b=i,w=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||w===null||(b=ql(i,u),b!=null&&f.unshift(Su(i,b,w)),b=ql(i,o),b!=null&&f.push(Su(i,b,w))),i.tag===3)return f;i=i.return}return[]}function TD(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function VS(i,o,u,f,b){for(var w=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=ql(u,w),de!=null&&M.unshift(Su(u,de,Q))):b||(de=ql(u,w),de!=null&&M.push(Su(u,de,Q)))),u=u.return}M.length!==0&&i.push({event:o,listeners:M})}var _D=/\r\n?/g,RD=/\u0000|\uFFFD/g;function KS(i){return(typeof i=="string"?i:""+i).replace(_D,`
|
|
9
|
+
`).replace(RD,"")}function ZS(i,o){return o=KS(o),KS(i)===o}function tn(i,o,u,f,b,w){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,w);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 w=="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=Zi.get(u)||u,lr(i,u,f))}}function Dg(i,o,u,f,b,w){switch(u){case"style":Xt(i,f,w);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(!So.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),o=u.slice(2,b?u.length-7:void 0),w=i[Jn]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(o,w,b),typeof f=="function")){typeof w!="function"&&w!==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,w;for(w in u)if(u.hasOwnProperty(w)){var M=u[w];if(M!=null)switch(w){case"src":f=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:tn(i,o,w,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=w=M=b=null,Q=null,de=null;for(f in u)if(u.hasOwnProperty(f)){var xe=u[f];if(xe!=null)switch(f){case"name":b=xe;break;case"type":M=xe;break;case"checked":Q=xe;break;case"defaultChecked":de=xe;break;case"value":w=xe;break;case"defaultValue":V=xe;break;case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(r(137,o));break;default:tn(i,o,f,xe,u,null)}}wo(i,w,V,Q,de,M,b,!1);return;case"select":Lt("invalid",i),f=M=w=null;for(b in u)if(u.hasOwnProperty(b)&&(V=u[b],V!=null))switch(b){case"value":w=V;break;case"defaultValue":M=V;break;case"multiple":f=V;default:tn(i,o,b,V,u,null)}o=w,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),w=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":w=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:tn(i,o,M,V,u,null)}ba(i,f,b,w);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(xe in u)u.hasOwnProperty(xe)&&(f=u[xe],f!==void 0&&Dg(i,o,xe,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 CD(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,w=null,M=null,V=null,Q=null,de=null,xe=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":w=be;break;case"name":b=be;break;case"checked":de=be;break;case"defaultChecked":xe=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)}}Bl(i,M,V,Q,de,xe,w,b);return;case"select":be=M=V=me=null;for(w in u)if(Q=u[w],u.hasOwnProperty(w)&&Q!=null)switch(w){case"value":break;case"multiple":be=Q;default:f.hasOwnProperty(w)||tn(i,o,w,null,f,Q)}for(b in f)if(w=f[b],Q=u[b],f.hasOwnProperty(b)&&(w!=null||Q!=null))switch(b){case"value":me=w;break;case"defaultValue":V=w;break;case"multiple":M=w;default:w!==Q&&tn(i,o,b,w,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],w=u[M],f.hasOwnProperty(M)&&(b!=null||w!=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!==w&&tn(i,o,M,b,f,w)}cf(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)&&Dg(i,o,nn,void 0,f,me);for(xe in f)me=f[xe],be=u[xe],!f.hasOwnProperty(xe)||me===be||me===void 0&&be===void 0||Dg(i,o,xe,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 WS(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AD(){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],w=b.transferSize,M=b.initiatorType,V=b.duration;if(w&&V&&WS(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 xe=Q.transferSize,Ae=Q.initiatorType;xe&&WS(Ae)&&(Q=Q.responseEnd,M+=xe*(Q<V?1:(V-de)/(Q-de)))}if(--f,o+=8*(w+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 zg=null,Lg=null;function ad(i){return i.nodeType===9?i:i.ownerDocument}function YS(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 XS(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 jg(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 Pg=null;function ND(){var i=window.event;return i&&i.type==="popstate"?i===Pg?!1:(Pg=i,!0):(Pg=null,!1)}var QS=typeof setTimeout=="function"?setTimeout:void 0,OD=typeof clearTimeout=="function"?clearTimeout:void 0,JS=typeof Promise=="function"?Promise:void 0,MD=typeof queueMicrotask=="function"?queueMicrotask:typeof JS<"u"?function(i){return JS.resolve(null).then(i).catch(ID)}:QS;function ID(i){setTimeout(function(){throw i})}function Ws(i){return i==="head"}function ew(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),Va(o);return}f--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")f++;else if(u==="html")wu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,wu(u);for(var w=u.firstChild;w;){var M=w.nextSibling,V=w.nodeName;w[xo]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=M}}else u==="body"&&wu(i.ownerDocument.body);u=b}while(u);Va(o)}function tw(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 $g(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":$g(u),Pl(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function DD(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(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==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(w=i.getAttribute("src"),(w!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var w=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=oi(i.nextSibling),i===null)break}return null}function zD(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=oi(i.nextSibling),i===null))return null;return i}function nw(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=oi(i.nextSibling),i===null))return null;return i}function Bg(i){return i.data==="$?"||i.data==="$~"}function Fg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function LD(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 oi(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 Ug=null;function rw(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return oi(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function iw(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 sw(i,o,u){switch(o=ad(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 wu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Pl(i)}var ai=new Map,ow=new Set;function ld(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var cs=U.d;U.d={f:jD,r:PD,D:$D,C:BD,L:FD,m:UD,X:HD,S:qD,M:GD};function jD(){var i=cs.f(),o=Jf();return i||o}function PD(i){var o=Vi(i);o!==null&&o.tag===5&&o.type==="form"?w0(o):cs.r(i)}var qa=typeof document>"u"?null:document;function aw(i,o,u){var f=qa;if(f&&typeof o=="string"&&o){var b=_r(o);b='link[rel="'+i+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),ow.has(b)||(ow.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 $D(i){cs.D(i),aw("dns-prefetch",i,null)}function BD(i,o){cs.C(i,o),aw("preconnect",i,o)}function FD(i,o,u){cs.L(i,o,u);var f=qa;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 w=b;switch(o){case"style":w=Ha(i);break;case"script":w=Ga(i)}ai.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),ai.set(w,i),f.querySelector(b)!==null||o==="style"&&f.querySelector(Eu(w))||o==="script"&&f.querySelector(Tu(w))||(o=f.createElement("link"),ir(o,"link",i),Ln(o),f.head.appendChild(o)))}}function UD(i,o){cs.m(i,o);var u=qa;if(u&&i){var f=o&&typeof o.as=="string"?o.as:"script",b='link[rel="modulepreload"][as="'+_r(f)+'"][href="'+_r(i)+'"]',w=b;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Ga(i)}if(!ai.has(w)&&(i=m({rel:"modulepreload",href:i},o),ai.set(w,i),u.querySelector(b)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Tu(w)))return}f=u.createElement("link"),ir(f,"link",i),Ln(f),u.head.appendChild(f)}}}function qD(i,o,u){cs.S(i,o,u);var f=qa;if(f&&i){var b=As(f).hoistableStyles,w=Ha(i);o=o||"default";var M=b.get(w);if(!M){var V={loading:0,preload:null};if(M=f.querySelector(Eu(w)))V.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=ai.get(w))&&qg(i,u);var Q=M=f.createElement("link");Ln(Q),ir(Q,"link",i),Q._p=new Promise(function(de,xe){Q.onload=de,Q.onerror=xe}),Q.addEventListener("load",function(){V.loading|=1}),Q.addEventListener("error",function(){V.loading|=2}),V.loading|=4,ud(M,o,f)}M={type:"stylesheet",instance:M,count:1,state:V},b.set(w,M)}}}function HD(i,o){cs.X(i,o);var u=qa;if(u&&i){var f=As(u).hoistableScripts,b=Ga(i),w=f.get(b);w||(w=u.querySelector(Tu(b)),w||(i=m({src:i,async:!0},o),(o=ai.get(b))&&Hg(i,o),w=u.createElement("script"),Ln(w),ir(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},f.set(b,w))}}function GD(i,o){cs.M(i,o);var u=qa;if(u&&i){var f=As(u).hoistableScripts,b=Ga(i),w=f.get(b);w||(w=u.querySelector(Tu(b)),w||(i=m({src:i,async:!0,type:"module"},o),(o=ai.get(b))&&Hg(i,o),w=u.createElement("script"),Ln(w),ir(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},f.set(b,w))}}function lw(i,o,u,f){var b=(b=ne.current)?ld(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=Ha(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=Ha(u.href);var w=As(b).hoistableStyles,M=w.get(i);if(M||(b=b.ownerDocument||b,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,M),(w=b.querySelector(Eu(i)))&&!w._p&&(M.instance=w,M.state.loading=5),ai.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},ai.set(i,u),w||VD(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=Ga(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 Ha(i){return'href="'+_r(i)+'"'}function Eu(i){return'link[rel="stylesheet"]['+i+"]"}function uw(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function VD(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 Ga(i){return'[src="'+_r(i)+'"]'}function Tu(i){return"script[async]"+i}function cw(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),ud(f,u.precedence,i),o.instance=f;case"stylesheet":b=Ha(u.href);var w=i.querySelector(Eu(b));if(w)return o.state.loading|=4,o.instance=w,Ln(w),w;f=uw(u),(b=ai.get(b))&&qg(f,b),w=(i.ownerDocument||i).createElement("link"),Ln(w);var M=w;return M._p=new Promise(function(V,Q){M.onload=V,M.onerror=Q}),ir(w,"link",f),o.state.loading|=4,ud(w,u.precedence,i),o.instance=w;case"script":return w=Ga(u.src),(b=i.querySelector(Tu(w)))?(o.instance=b,Ln(b),b):(f=u,(b=ai.get(w))&&(f=m({},u),Hg(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,ud(f,u.precedence,i));return o.instance}function ud(i,o,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=f.length?f[f.length-1]:null,w=b,M=0;M<f.length;M++){var V=f[M];if(V.dataset.precedence===o)w=V;else if(w!==b)break}w?w.parentNode.insertBefore(i,w.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function qg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Hg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var cd=null;function fw(i,o,u){if(cd===null){var f=new Map,b=cd=new Map;b.set(u,f)}else b=cd,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 w=u[b];if(!(w[xo]||w[an]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var M=w.getAttribute(o)||"";M=i+M;var V=f.get(M);V?V.push(w):f.set(M,[w])}}return f}function dw(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function KD(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 pw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function ZD(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=Ha(f.href),w=o.querySelector(Eu(b));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=fd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,Ln(w);return}w=o.ownerDocument||o,f=uw(f),(b=ai.get(b))&&qg(f,b),w=w.createElement("link"),Ln(w);var M=w;M._p=new Promise(function(V,Q){M.onload=V,M.onerror=Q}),ir(w,"link",f),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=fd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var Gg=0;function WD(i,o){return i.stylesheets&&i.count===0&&pd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var f=setTimeout(function(){if(i.stylesheets&&pd(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&Gg===0&&(Gg=62500*AD());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&pd(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>Gg?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(f),clearTimeout(b)}}:null}function fd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var dd=null;function pd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,dd=new Map,o.forEach(YD,i),dd=null,fd.call(i))}function YD(i,o){if(!(o.state.loading&4)){var u=dd.get(i);if(u)var f=u.get(null);else{u=new Map,dd.set(i,u);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<b.length;w++){var M=b[w];(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"),w=u.get(M)||f,w===f&&u.set(null,b),u.set(M,b),this.count++,f=fd.bind(this),b.addEventListener("load",f),b.addEventListener("error",f),w?w.parentNode.insertBefore(b,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),o.state.loading|=4}}var _u={$$typeof:T,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function XD(i,o,u,f,b,w,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=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=f,this.onUncaughtError=b,this.onCaughtError=w,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function hw(i,o,u,f,b,w,M,V,Q,de,xe,Ae){return i=new XD(i,o,u,M,Q,de,xe,Ae,V),o=1,w===!0&&(o|=24),w=Ur(3,null,null,o),i.current=w,w.stateNode=i,o=Em(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:f,isDehydrated:u,cache:o},Cm(w),i}function mw(i){return i?(i=Sa,i):Sa}function gw(i,o,u,f,b,w){b=mw(b),f.context===null?f.context=b:f.pendingContext=b,f=Ps(o),f.payload={element:u},w=w===void 0?null:w,w!==null&&(f.callback=w),u=$s(i,f,o),u!==null&&(Mr(u,i,o),iu(u,i,o))}function bw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Vg(i,o){bw(i,o),(i=i.alternate)&&bw(i,o)}function yw(i){if(i.tag===13||i.tag===31){var o=Ro(i,67108864);o!==null&&Mr(o,i,67108864),Vg(i,67108864)}}function vw(i){if(i.tag===13||i.tag===31){var o=Kr();o=tt(o);var u=Ro(i,o);u!==null&&Mr(u,i,o),Vg(i,o)}}var hd=!0;function QD(i,o,u,f){var b=F.T;F.T=null;var w=U.p;try{U.p=2,Kg(i,o,u,f)}finally{U.p=w,F.T=b}}function JD(i,o,u,f){var b=F.T;F.T=null;var w=U.p;try{U.p=8,Kg(i,o,u,f)}finally{U.p=w,F.T=b}}function Kg(i,o,u,f){if(hd){var b=Zg(f);if(b===null)Ig(i,o,f,md,u),xw(i,f);else if(tz(b,i,o,u,f))f.stopPropagation();else if(xw(i,f),o&4&&-1<ez.indexOf(i)){for(;b!==null;){var w=Vi(b);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var M=Xe(w.pendingLanes);if(M!==0){var V=w;for(V.pendingLanes|=2,V.entangledLanes|=2;M;){var Q=1<<31-st(M);V.entanglements[1]|=Q,M&=~Q}Mi(w),(Zt&6)===0&&(Xf=re()+500,ku(0))}}break;case 31:case 13:V=Ro(w,2),V!==null&&Mr(V,w,2),Jf(),Vg(w,2)}if(w=Zg(f),w===null&&Ig(i,o,f,md,u),w===b)break;b=w}b!==null&&f.stopPropagation()}else Ig(i,o,f,null,u)}}function Zg(i){return i=Tt(i),Wg(i)}var md=null;function Wg(i){if(md=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 md=i,null}function kw(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 Yg=!1,Ys=null,Xs=null,Qs=null,Ru=new Map,Cu=new Map,Js=[],ez="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 xw(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":Ru.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cu.delete(o.pointerId)}}function Au(i,o,u,f,b,w){return i===null||i.nativeEvent!==w?(i={blockedOn:o,domEventName:u,eventSystemFlags:f,nativeEvent:w,targetContainers:[b]},o!==null&&(o=Vi(o),o!==null&&yw(o)),i):(i.eventSystemFlags|=f,o=i.targetContainers,b!==null&&o.indexOf(b)===-1&&o.push(b),i)}function tz(i,o,u,f,b){switch(o){case"focusin":return Ys=Au(Ys,i,o,u,f,b),!0;case"dragenter":return Xs=Au(Xs,i,o,u,f,b),!0;case"mouseover":return Qs=Au(Qs,i,o,u,f,b),!0;case"pointerover":var w=b.pointerId;return Ru.set(w,Au(Ru.get(w)||null,i,o,u,f,b)),!0;case"gotpointercapture":return w=b.pointerId,Cu.set(w,Au(Cu.get(w)||null,i,o,u,f,b)),!0}return!1}function Sw(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(){vw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,Qn(i.priority,function(){vw(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 gd(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Zg(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=Vi(u),o!==null&&yw(o),i.blockedOn=u,!1;o.shift()}return!0}function ww(i,o,u){gd(i)&&u.delete(o)}function nz(){Yg=!1,Ys!==null&&gd(Ys)&&(Ys=null),Xs!==null&&gd(Xs)&&(Xs=null),Qs!==null&&gd(Qs)&&(Qs=null),Ru.forEach(ww),Cu.forEach(ww)}function bd(i,o){i.blockedOn===o&&(i.blockedOn=null,Yg||(Yg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,nz)))}var yd=null;function Ew(i){yd!==i&&(yd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){yd===i&&(yd=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(Wg(f||u)===null)continue;break}var w=Vi(u);w!==null&&(i.splice(o,3),o-=3,Zm(w,{pending:!0,data:b,method:u.method,action:f},f,b))}}))}function Va(i){function o(Q){return bd(Q,i)}Ys!==null&&bd(Ys,i),Xs!==null&&bd(Xs,i),Qs!==null&&bd(Qs,i),Ru.forEach(o),Cu.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);)Sw(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],w=u[f+1],M=b[Jn]||null;if(typeof w=="function")M||Ew(u);else if(M){var V=null;if(w&&w.hasAttribute("formAction")){if(b=w,M=w[Jn]||null)V=M.formAction;else if(Wg(b)!==null)continue}else V=M.action;typeof V=="function"?u[f+1]=V:(u.splice(f,3),f-=3),Ew(u)}}}function Tw(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.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 w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.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 Xg(i){this._internalRoot=i}vd.prototype.render=Xg.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,f=Kr();gw(u,f,i,o,null,null)},vd.prototype.unmount=Xg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;gw(i.current,2,null,i,null,null),Jf(),o[Gi]=null}};function vd(i){this._internalRoot=i}vd.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&&Sw(i)}};var _w=t.version;if(_w!=="19.2.6")throw Error(r(527,_w,"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=p(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var rz={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(rz),nt=kd}catch{}}return Ou.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,f="",b=I0,w=D0,M=z0;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&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError)),o=hw(i,1,!1,null,null,u,f,null,b,w,M,Tw),i[Gi]=o.current,Mg(i),new Xg(o)},Ou.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var f=!1,b="",w=I0,M=D0,V=z0,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(V=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),o=hw(i,1,!0,o,u??null,f,b,Q,w,M,V,Tw),o.context=mw(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[Gi]=o.current,Mg(i),new vd(o)},Ou.version="19.2.6",Ou}var Lw;function pz(){if(Lw)return eb.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(),eb.exports=dz(),eb.exports}var hz=pz(),Mu={},jw;function mz(){if(jw)return Mu;jw=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.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 p=[],h="",m=null,g="",y=a?null:e,x=new Array(arguments.length),S=0;S<arguments.length;S++)x[S]=arguments[S];for(;x.length>0;){var _=x.pop();if(!(_==null||_===!1)){if(Array.isArray(_)){for(var E=0;E<_.length;E++)x.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],p.push.apply(p,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?p.includes(N)||(p.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&&(p.includes(K)||(Z!=null&&(m==null&&(m={}),L==null&&(L={}),L[K]=Z),p.push(K),y=null))}L!=null&&(m=Object.assign(L,m))}}}var q=[h,m,g];return q}}var r=Mu.styleq=n();return r.factory=n,Mu}var gz=mz();function Nn(...e){const[t,n,r]=gz.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 q_(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=q_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bz(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=q_(e))&&(r&&(r+=" "),r+=t);return r}function wn(...e){return bz(e)}function En({rootClass:e,stylexStyles:t,className:n,style:r}){const s=Nn(t);return{className:wn(e,s.className,n),style:{...s.style,...r}}}const Si={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 yz({pill:e,size:t,variant:n}){return[Si.base,t==="sm"?Si.sizeSm:Si.sizeBase,e?[Si.pill,t==="sm"?Si.pillSizeSm:Si.pillSizeBase]:null,vz(n)]}function vz(e){switch(e){case"accent":return Si.variantAccent;case"neutral":return Si.variantNeutral;case"success":return Si.variantSuccess;case"warn":return Si.variantWarn;case"danger":return Si.variantDanger}}function sa({children:e,variant:t="neutral",size:n="base",pill:r=!1,as:s="span",className:a,style:l,...c}){const d=En({rootClass:"ui-status-badge",stylexStyles:yz({pill:r,size:n,variant:t}),className:a,style:l});return v.jsx(s,{className:d.className,style:d.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function kz(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=kz("https://base-ui.com/production-error","Base UI"),Pw={};function wr(e,t){const n=k.useRef(Pw);return n.current===Pw&&(n.current=e(t)),n}function xs(e,t,n,r){const s=wr(H_).current;return Sz(s,e,t,n,r)&&G_(s,[e,t,n,r]),s.callback}function xz(e){const t=wr(H_).current;return wz(t,e)&&G_(t,e),t.callback}function H_(){return{callback:null,cleanup:null,refs:[]}}function Sz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function wz(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function G_(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 Ez=parseInt(k.version,10);function bv(e){return Ez>=e}function $w(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(bv(19)?n?.ref:t.ref)??null}function py(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Tz(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 _z(e,t){return typeof e=="function"?e(t):e}function Rz(e,t){return typeof e=="function"?e(t):e}const yv={};function zc(e,t,n,r,s){if(!n&&!r&&!s&&!e)return xp(t);let a=xp(e);return t&&(a=Vu(a,t)),n&&(a=Vu(a,n)),r&&(a=Vu(a,r)),s&&(a=Vu(a,s)),a}function Cz(e){if(e.length===0)return yv;if(e.length===1)return xp(e[0]);let t=xp(e[0]);for(let n=1;n<e.length;n+=1)t=Vu(t,e[n]);return t}function xp(e){return vv(e)?{...K_(e,yv)}:Az(e)}function Vu(e,t){return vv(t)?K_(t,e):Nz(e,t)}function Az(e){const t={...e};for(const n in t){const r=t[n];V_(n,r)&&(t[n]=Z_(r))}return t}function Nz(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=py(e.style,r);break}case"className":{e[n]=W_(e.className,r);break}default:V_(n,r)?e[n]=Oz(e[n],r):e[n]=r}}return e}function V_(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 vv(e){return typeof e=="function"}function K_(e,t){return vv(e)?e(t):e??yv}function Oz(e,t){return t?e?n=>{if(Y_(n)){const s=n;Sp(s);const a=t(s);return s.baseUIHandlerPrevented||e?.(s),a}const r=t(n);return e?.(n),r}:Z_(t):e}function Z_(e){return e&&(t=>(Y_(t)&&Sp(t),e(t)))}function Sp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function W_(e,t){return t?e?t+" "+e:t:e}function Y_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ar(){}const uc=Object.freeze([]),hr=Object.freeze({}),Mz={style:{transition:"none"}},Iz="data-base-ui-click-trigger",Dz={fallbackAxisSide:"none"},zz={fallbackAxisSide:"end"},Lz={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function kn(e,t,n={}){const r=t.render,s=jz(t,n);if(n.enabled===!1)return null;const a=n.state??hr;return Bz(e,r,s,a)}function jz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=hr,ref:l,props:c,stateAttributesMapping:d,enabled:p=!0}=t,h=p?_z(n,a):void 0,m=p?Rz(r,a):void 0,g=p?Tz(a,d):hr,y=p&&c?Pz(c):void 0,x=p?py(g,y)??{}:hr;return typeof document<"u"&&(p?Array.isArray(l)?x.ref=xz([x.ref,$w(s),...l]):x.ref=xs(x.ref,$w(s),l):xs(null,null)),p?(h!==void 0&&(x.className=W_(x.className,h)),m!==void 0&&(x.style=py(x.style,m)),x):hr}function Pz(e){return Array.isArray(e)?Cz(e):zc(void 0,e)}const $z=Symbol.for("react.lazy");function Bz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=zc(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===$z&&(a=k.Children.toArray(t)[0]),k.cloneElement(a,s)}if(e&&typeof e=="string")return Fz(e,n);throw new Error(Xn(8))}function Fz(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}let Xo=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Uz={[Xo.startingStyle]:""},qz={[Xo.endingStyle]:""},oa={transitionStatus(e){return e==="starting"?Uz:e==="ending"?qz:null}};let kv=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xo.startingStyle]="startingStyle",e[e.endingStyle=Xo.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),wp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Hz={[wp.popupOpen]:""},Gz={[wp.popupOpen]:"",[wp.pressed]:""},Vz={[kv.open]:""},Kz={[kv.closed]:""},Zz={[kv.anchorHidden]:""},Wz={open(e){return e?Hz:null}},Yz={open(e){return e?Gz:null}},ah={open(e){return e?Vz:Kz},anchorHidden(e){return e?Zz:null}};function lh(){return typeof window<"u"}function Yn(e){return uh(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ui(e){var t;return(t=(uh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uh(e){return lh()?e instanceof Node||e instanceof yn(e).Node:!1}function yt(e){return lh()?e instanceof Element||e instanceof yn(e).Element:!1}function It(e){return lh()?e instanceof HTMLElement||e instanceof yn(e).HTMLElement:!1}function co(e){return!lh()||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 Xz(e){return/^(table|td|th)$/.test(Yn(e))}function ch(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Qz=/transform|translate|scale|rotate|perspective|filter/,Jz=/paint|layout|strict|content/,Bo=e=>!!e&&e!=="none";let ib;function xv(e){const t=yt(e)?Er(e):e;return Bo(t.transform)||Bo(t.translate)||Bo(t.scale)||Bo(t.rotate)||Bo(t.perspective)||!Lc()&&(Bo(t.backdropFilter)||Bo(t.filter))||Qz.test(t.willChange||"")||Jz.test(t.contain||"")}function eL(e){let t=Fi(e);for(;It(t)&&!hi(t);){if(xv(t))return t;if(ch(t))return null;t=Fi(t)}return null}function Lc(){return ib==null&&(ib=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ib}function hi(e){return/^(html|body|#document)$/.test(Yn(e))}function Er(e){return yn(e).getComputedStyle(e)}function fh(e){return yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(Yn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||co(e)&&e.host||Ui(e);return co(t)?t.host:t}function X_(e){const t=Fi(e);return hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:It(t)&&ho(t)?t:X_(t)}function oo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=X_(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=yn(s);if(a){const c=hy(l);return t.concat(l,l.visualViewport||[],ho(s)?s:[],c&&n?oo(c):[])}else return t.concat(s,oo(s,[],n))}function hy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const sb=oh[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],tL=sb&&sb!==k.useLayoutEffect?sb:e=>e();function Ve(e){const t=wr(nL).current;return t.next=e,tL(t.effect),t.trampoline}function nL(){const e={next:void 0,callback:rL,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function rL(){}const iL={...oh},sL=()=>{},He=typeof document<"u"?k.useLayoutEffect:sL,Q_=k.createContext(void 0);function J_(e=!1){const t=k.useContext(Q_);if(t===void 0&&!e)throw new Error(Xn(16));return t}function oL(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:k.useMemo(()=>{const p={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(p.tabIndex=s,!a&&n&&(p.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(p["aria-disabled"]=n),a&&(!t||c)&&(p.disabled=n),p},[r,n,t,l,c,a,s])}}function jc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=k.useRef(null),c=J_(!0),d=a??c!==void 0,{props:p}=oL({focusableWhenDisabled:n,disabled:t,composite:d,tabIndex:r,isNativeButton:s}),h=k.useCallback(()=>{const y=l.current;ob(y)&&d&&t&&p.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,p.disabled,d]);He(h,[h]);const m=k.useCallback((y={})=>{const{onClick:x,onMouseDown:S,onKeyUp:_,onKeyDown:E,onPointerDown:R,...T}=y;return zc({type:s?"button":void 0,onClick(A){if(t){A.preventDefault();return}x?.(A)},onMouseDown(A){t||S?.(A)},onKeyDown(A){if(t||(Sp(A),E?.(A),A.baseUIHandlerPrevented))return;const N=A.target===A.currentTarget,I=A.currentTarget,H=ob(I),$=!s&&aL(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&&d&&Z){if(A.defaultPrevented&&z)return;A.preventDefault(),$||s&&H?(I.click(),A.preventBaseUIHandler()):L&&(x?.(A),A.preventBaseUIHandler());return}L&&(!s&&(Z||K)&&A.preventDefault(),!s&&K&&x?.(A))},onKeyUp(A){if(!t){if(Sp(A),_?.(A),A.target===A.currentTarget&&s&&d&&ob(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!s&&!d&&A.key===" "&&x?.(A)}},onPointerDown(A){if(t){A.preventDefault();return}R?.(A)}},s?void 0:{role:"button"},p,T)},[t,p,d,s]),g=Ve(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:g}}function ob(e){return It(e)&&e.tagName==="BUTTON"}function aL(e){return!!(e?.tagName==="A"&&e?.href)}const Ss="none",hl="trigger-press",ui="trigger-hover",fp="trigger-focus",Sv="outside-press",ab="item-press",dh="focus-out",wv="escape-key",lb="list-navigation",lL="cancel-open",uL="disabled",my="imperative-action",cL="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 Bw=0;function fL(e,t="mui"){const[n,r]=k.useState(e),s=e||n;return k.useEffect(()=>{n==null&&(Bw+=1,r(`${t}-${Bw}`))},[n,t]),s}const Fw=iL.useId;function ph(e,t){if(Fw!==void 0){const n=Fw();return e??(t?`${t}-${n}`:n)}return fL(e,t)}function hh(e){return ph(e,"base-ui")}const dL=[];function mh(e){k.useEffect(e,dL)}const Iu=0;class Ti{static create(){return new Ti}currentId=Iu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Iu,n()},t)}isStarted(){return this.currentId!==Iu}clear=()=>{this.currentId!==Iu&&(clearTimeout(this.currentId),this.currentId=Iu)};disposeEffect=()=>this.clear}function fi(){const e=wr(Ti.create).current;return mh(e.disposeEffect),e}const Rl=typeof navigator<"u",ub=hL(),eR=gL(),tR=mL(),Ev=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),nR=ub.platform==="MacIntel"&&ub.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(ub.platform),rR=Rl&&/apple/i.test(navigator.vendor),gy=Rl&&/android/i.test(eR)||/android/i.test(tR),pL=Rl&&eR.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,iR=tR.includes("jsdom/");function hL(){if(!Rl)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 mL(){if(!Rl)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function gL(){if(!Rl)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function Wr(e){e.preventDefault(),e.stopPropagation()}function bL(e){return"nativeEvent"in e}function sR(e){return e.pointerType===""&&e.isTrusted?!0:gy&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function oR(e){return iR?!1:!gy&&e.width===0&&e.height===0||gy&&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 ml(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function aR(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function yL(e,t){return t!=null&&!ml(t)?0:typeof e=="function"?e():e}function Ep(e,t,n){const r=yL(e,n);return typeof r=="number"?r:r?.[t]}function Uw(e){return typeof e=="function"?e():e}function lR(e,t){return t||e==="click"||e==="mousedown"}const vL=k.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ti,currentIdRef:{current:null},currentContextRef:{current:null}});function kL(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:s}=t,a=k.useContext(vL),{currentIdRef:l,delayRef:c,timeoutMs:d,initialDelayRef:p,currentContextRef:h,hasProvider:m,timeout:g}=a,[y,x]=k.useState(!1);return He(()=>{function S(){x(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=p.current}if(l.current&&!s&&l.current===r){if(x(!1),d){const _=r;return g.start(d,()=>{n.select("open")||l.current&&l.current!==_||S()}),()=>{g.clear()}}S()}},[s,r,l,c,d,p,h,g,n]),He(()=>{if(!s)return;const S=h.current,_=l.current;g.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:x},l.current=r,c.current={open:0,close:Ep(p.current,"close")},_!==null&&_!==r?(x(!0),S?.setIsInstantPhase(!0),S?.onOpenChange(!1,_t(Ss))):(x(!1),S?.setIsInstantPhase(!1))},[s,r,n,l,c,d,p,h,g]),He(()=>()=>{h.current=null},[h]),k.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 Pi(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function qn(e){const t=wr(xL,e).current;return t.next=e,He(t.effect),t}function xL(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const xd=null;class SL{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 Sd=new SL;class An{static create(){return new An}static request(t){return Sd.request(t)}static cancel(t){return Sd.cancel(t)}currentId=xd;request(t){this.cancel(),this.currentId=Sd.request(()=>{this.currentId=xd,t()})}cancel=()=>{this.currentId!==xd&&(Sd.cancel(this.currentId),this.currentId=xd)};disposeEffect=()=>this.cancel}function Pc(){const e=wr(An.create).current;return mh(e.disposeEffect),e}function Ft(e){return e?.ownerDocument||document}const uR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},cR={...uR,position:"fixed",top:0,left:0},wL={...uR,position:"absolute"},Tp=k.forwardRef(function(t,n){const[r,s]=k.useState();He(()=>{rR&&s("button")},[]);const a={tabIndex:0,role:r};return v.jsx("span",{...t,ref:n,style:cR,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),by="data-base-ui-focusable",fR="active",dR="selected",pR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ao="ArrowLeft",lo="ArrowRight",Tv="ArrowUp",$c="ArrowDown";function Dr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function xt(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 _p(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(xt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function ki(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 EL(e){return e.matches("html,body")}function gh(e){return It(e)&&e.matches(pR)}function TL(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${pR}`)!=null}function yy(e){return e?e.getAttribute("role")==="combobox"&&gh(e):!1}function _L(e){if(!e||iR)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Rp(e){return e?e.hasAttribute(by)?e:e.querySelector(`[${by}]`)||e:null}const RL=["top","right","bottom","left"],gl=Math.min,Yr=Math.max,bl=Math.round,ys=Math.floor,$i=e=>({x:e,y:e}),CL={left:"right",right:"left",bottom:"top",top:"bottom"};function vy(e,t,n){return Yr(e,gl(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 _v(e){return e==="x"?"y":"x"}function Rv(e){return e==="y"?"height":"width"}function di(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Cv(e){return _v(di(e))}function AL(e,t,n){n===void 0&&(n=!1);const r=mo(e),s=Cv(e),a=Rv(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Cp(l)),[l,Cp(l)]}function NL(e){const t=Cp(e);return[ky(e),t,ky(t)]}function ky(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qw=["left","right"],Hw=["right","left"],OL=["top","bottom"],ML=["bottom","top"];function IL(e,t,n){switch(e){case"top":case"bottom":return n?t?Hw:qw:t?qw:Hw;case"left":case"right":return t?OL:ML;default:return[]}}function DL(e,t,n,r){const s=mo(e);let a=IL(jr(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(ky)))),a}function Cp(e){const t=jr(e);return CL[t]+e.slice(t.length)}function zL(e){return{top:0,right:0,bottom:0,left:0,...e}}function hR(e){return typeof e!="number"?zL(e):{top:e,right:e,bottom:e,left:e}}function cc(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 wd(e,t,n){return Math.floor(e/t)!==n}function fc(e,t){return t<0||t>=e.length}function dp(e,t){return dr(e.current,{disabledIndices:t})}function xy(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 mR(e,{event:t,orientation:n,loopFocus:r,onLoop:s,rtl:a,cols:l,disabledIndices:c,minIndex:d,maxIndex:p,prevIndex:h,stopEvent:m=!1}){let g=h,y;if(t.key===Tv?y="up":t.key===$c&&(y="down"),y){const x=[],S=[];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,x[L]=[]),x[L].push(Z),S[Z]=L})}let R=!1,T=0;if(_)for(const $ of x){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=S[h];if(L==null)return;const K=x[L].indexOf(h),Z=$==="up"?-1:1;for(let q=L+Z,z=0;z<x.length;z+=1,q+=Z){if(q<0||q>=x.length){if(!r||C)return;if(q=q<0?x.length-1:0,s){const F=Math.min(K,x[q].length-1),U=x[q][F]??x[q][0],P=s(t,h,U);q=S[P]??q}}const j=x[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=p-p%A,q=ys(p/A)+1;for(let z=h-L+K,j=0;j<q;j+=1,z+=K){if(z<0||z>p){if(!r)return;z=z<0?Z:0}const F=Math.min(z+A-1,p);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"?p:d;else if(g=dr(e,{startingIndex:h,amount:A,decrement:y==="up",disabledIndices:c}),r){if(y==="up"&&(h-A<d||g<0)){const $=h%A,L=p%A,K=p-(L-$);L===$?g=p:g=L>$?K:K-A,s&&(g=s(t,h,g))}y==="down"&&h+A>p&&(g=dr(e,{startingIndex:h%A-A,amount:A,disabledIndices:c}),s&&(g=s(t,h,g)))}fc(e,g)&&(g=h)}if(n==="both"){const x=ys(h/l);t.key===(a?ao:lo)&&(m&&Wr(t),h%l!==l-1?(g=dr(e,{startingIndex:h,disabledIndices:c}),r&&wd(g,l,x)&&(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))),wd(g,l,x)&&(g=h)),t.key===(a?lo:ao)&&(m&&Wr(t),h%l!==0?(g=dr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),r&&wd(g,l,x)&&(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))),wd(g,l,x)&&(g=h));const S=ys(p/l)===x;fc(e,g)&&(r&&S?(g=t.key===(a?lo:ao)?p:dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g))):g=h)}return g}function gR(e,t,n){const r=[];let s=0;return e.forEach(({width:a,height:l},c)=>{let d=!1;for(n&&(s=0);!d;){const p=[];for(let h=0;h<a;h+=1)for(let m=0;m<l;m+=1)p.push(s+h+m*t);s%t+a<=t&&p.every(h=>r[h]==null)?(p.forEach(h=>{r[h]=c}),d=!0):s+=1}}),[...r]}function bR(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 yR(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?bh(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function bh(e){return typeof e.checkVisibility=="function"?e.checkVisibility():Er(e).display!=="none"}const LL='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function jL(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 Sy(e){for(const t of Array.from(e.children))if(Yn(t)==="summary")return t;return null}function PL(e,t){const n=Sy(t);return!!n&&(e===n||xt(n,e))}function vR(e){const t=e?Yn(e):"";return e!=null&&e.matches(LL)&&(t!=="summary"||e.parentElement!=null&&Yn(e.parentElement)==="details"&&Sy(e.parentElement)===e)&&(t!=="details"||Sy(e)==null)&&(t!=="input"||e.type!=="hidden")}function kR(e){if(!vR(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=jL(t)){const n=Yn(t)==="slot";if(t.hasAttribute("inert")||t!==e&&Yn(t)==="details"&&!t.open&&!PL(e,t)||t.hasAttribute("hidden")||!n&&!bh(t))return!1}return!0}function xR(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 cb(e){if(Yn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function $L(e,t){const n=cb(e);if(!n)return!0;const r=t.find(s=>{const a=cb(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=cb(s);return a?.name===n.name&&a.form===n.form})===n}function SR(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 wR(e,t){SR(e).forEach(n=>{vR(n)&&t.push(n),wR(n,t)})}function ER(e,t,n){SR(e).forEach(r=>{It(r)&&r.matches(t)&&n.push(r),ER(r,t,n)})}function Av(e){return kR(e)&&xR(e)>=0}function TR(e){const t=[];return wR(e,t),t.filter(kR)}function yh(e){const t=TR(e);return t.filter(n=>xR(n)>=0&&$L(n,t))}function _R(e,t){const n=yh(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 RR(e){return _R(Ft(e).body,1)||e}function CR(e){return _R(Ft(e).body,-1)||e}function Xu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xt(n,r)}function BL(e){yh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Gw(e){const t=[];ER(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 Bi(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...Bi(e,s.id,n)])}function Vw(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 dc(e){return`data-base-ui-${e}`}let Ed=0;function pp(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(Ed);const a=()=>e?.focus({preventScroll:n});if(s)return a(),ar;const l=requestAnimationFrame(a);return Ed=l,()=>{Ed===l&&(cancelAnimationFrame(l),Ed=0)}}const fb={inert:new WeakMap,"aria-hidden":new WeakMap},Kw="data-base-ui-inert",wy={inert:new WeakSet,"aria-hidden":new WeakSet};let Du=new WeakMap,db=0;function FL(e){return wy[e]}function AR(e){return e?co(e)?e.host:AR(e.parentNode):null}const pb=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=AR(n);return e.contains(r)?r:null}).filter(n=>n!=null),Zw=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Ww=(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 UL(e,t,n,r,{mark:s=!0,markerIgnoreElements:a=[]}){const l=r?"inert":n?"aria-hidden":null;let c=null,d=null;const p=pb(t,e),h=s?pb(t,a):[],m=new Set(h),g=s?Ww(t,Zw(p),new Set(p)).filter(S=>!m.has(S)):[],y=[],x=[];if(l){const S=fb[l],_=FL(l);d=_,c=S;const E=pb(t,Array.from(t.querySelectorAll("[aria-live]"))),R=p.concat(E);Ww(t,Zw(R),new Set(R)).forEach(C=>{const A=C.getAttribute(l),N=A!==null&&A!=="false",I=(S.get(C)||0)+1;S.set(C,I),y.push(C),I===1&&N&&_.add(C),N||C.setAttribute(l,l==="inert"?"":"true")})}return s&&g.forEach(S=>{const _=(Du.get(S)||0)+1;Du.set(S,_),x.push(S),_===1&&S.setAttribute(Kw,"")}),db+=1,()=>{c&&y.forEach(S=>{const E=(c.get(S)||0)-1;c.set(S,E),E||(!d?.has(S)&&l&&S.removeAttribute(l),d?.delete(S))}),s&&x.forEach(S=>{const _=(Du.get(S)||0)-1;Du.set(S,_),_||S.removeAttribute(Kw)}),db-=1,db||(fb.inert=new WeakMap,fb["aria-hidden"]=new WeakMap,wy.inert=new WeakSet,wy["aria-hidden"]=new WeakSet,Du=new WeakMap)}}function Yw(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0,markerIgnoreElements:a=[]}=t,l=Ft(e[0]).body;return UL(e,l,n,r,{mark:s,markerIgnoreElements:a})}var Ri=U_();const NR=k.createContext(null),OR=()=>k.useContext(NR),qL=dc("portal");function MR(e={}){const{ref:t,container:n,componentProps:r=hr,elementProps:s}=e,a=ph(),c=OR()?.portalNode,[d,p]=k.useState(null),[h,m]=k.useState(null),g=Ve(_=>{_!==null&&m(_)}),y=k.useRef(null);He(()=>{if(n===null){y.current&&(y.current=null,m(null),p(null));return}if(a==null)return;const _=(n&&(uh(n)?n:n.current))??c??document.body;if(_==null){y.current&&(y.current=null,m(null),p(null));return}y.current!==_&&(y.current=_,m(null),p(_))},[n,c,a]);const x=kn("div",r,{ref:[t,g],props:[{id:a,[qL]:""},s]});return{portalNode:h,portalSubtree:d&&x?Ri.createPortal(x,d):null}}const HL=k.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,renderGuards:c,style:d,...p}=t,{portalNode:h,portalSubtree:m}=MR({container:s,ref:n,componentProps:t,elementProps:p}),g=k.useRef(null),y=k.useRef(null),x=k.useRef(null),S=k.useRef(null),[_,E]=k.useState(null),R=k.useRef(!1),T=_?.modal,C=_?.open,A=typeof c=="boolean"?c:!!_&&!_.modal&&_.open&&!!h;k.useEffect(()=>{if(!h||T)return;function I(H){h&&H.relatedTarget&&Xu(H)&&(H.type==="focusin"?R.current&&(Gw(h),R.current=!1):(BL(h),R.current=!0))}return Pi(Nt(h,"focusin",I,!0),Nt(h,"focusout",I,!0))},[h,T]),k.useEffect(()=>{!h||C!==!1||(Gw(h),R.current=!1)},[C,h]);const N=k.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:y,beforeInsideRef:x,afterInsideRef:S,portalNode:h,setFocusManagerState:E}),[h]);return v.jsxs(k.Fragment,{children:[m,v.jsxs(NR.Provider,{value:N,children:[A&&h&&v.jsx(Tp,{"data-type":"outside",ref:g,onFocus:I=>{if(Xu(I,h))x.current?.focus();else{const H=_?_.domReference:null;CR(H)?.focus()}}}),A&&h&&v.jsx("span",{"aria-owns":h.id,style:Lz}),h&&Ri.createPortal(r,h),A&&h&&v.jsx(Tp,{"data-type":"outside",ref:y,onFocus:I=>{if(Xu(I,h))S.current?.focus();else{const H=_?_.domReference:null;RR(H)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,_t(dh,I.nativeEvent))}}})]})]})});function GL(){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 VL=k.createContext(null),KL=k.createContext(null),vh=()=>k.useContext(VL)?.id||null,Cl=e=>{const t=k.useContext(KL);return e??t};function ps(e){return e==null?e:"current"in e?e.current:e}function ZL(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 Xw=20;let io=[];function Nv(){io=io.filter(e=>e.deref()?.isConnected)}function WL(e){Nv(),e&&Yn(e)!=="body"&&(io.push(new WeakRef(e)),io.length>Xw&&(io=io.slice(-Xw)))}function hb(){return Nv(),io[io.length-1]?.deref()}function YL(e){return e?Av(e)?e:yh(e)[0]||e:null}function XL(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():bh(e)}function Qw(e,t){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=TR(e).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return Av(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 QL(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:d=!0,openInteractionType:p="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:g,externalTree:y,getInsideElements:x}=e,S="rootStore"in t?t.rootStore:t,_=S.useState("open"),E=S.useState("domReferenceElement"),R=S.useState("floatingElement"),{events:T,dataRef:C}=S.context,A=Ve(()=>C.current.floatingContext?.nodeId),N=s===!1,I=yy(E)&&N,H=k.useRef(["content"]),$=qn(s),L=qn(a),K=qn(p),Z=Cl(y),q=OR(),z=k.useRef(!1),j=k.useRef(!1),F=k.useRef(!1),U=k.useRef(null),P=k.useRef(""),W=k.useRef(""),D=k.useRef(null),B=k.useRef(null),G=xs(D,g,q?.beforeInsideRef),O=xs(B,q?.afterInsideRef),ie=fi(),te=fi(),ne=Pc(),le=q!=null,pe=Rp(R),ye=Ve((he=pe)=>he?yh(he):[]),Se=Ve(()=>x?.().filter(he=>he!=null)??[]);k.useEffect(()=>{if(r||!c)return;function he(Re){Re.key==="Tab"&&xt(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]),k.useEffect(()=>{if(r||!_)return;const he=Ft(pe);function Te(){F.current=!1}function Re(ve){const ke=gr(ve),Me=Se(),Ce=xt(R,ke)||xt(E,ke)||xt(q?.portalNode,ke)||Me.some(Pe=>Pe===ke||xt(Pe,ke));F.current=!Ce,W.current=ve.pointerType||"keyboard",ke?.closest(`[${Iz}]`)&&(j.current=!0)}function Oe(){W.current="keyboard"}return Pi(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]),k.useEffect(()=>{if(r||!d)return;const he=Ft(pe);function Te(){j.current=!0,te.start(0,()=>{j.current=!1})}function Re(Me){const Ce=gr(Me);Av(Ce)&&(U.current=Ce)}function Oe(Me){const Ce=Me.relatedTarget,Pe=Me.currentTarget,ge=gr(Me);queueMicrotask(()=>{const fe=A(),oe=S.context.triggerElements,re=Se(),_e=Ce?.hasAttribute(dc("focus-guard"))&&[D.current,B.current,q?.beforeInsideRef.current,q?.afterInsideRef.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,ps(m),ps(h)].includes(Ce),J=!(xt(E,Ce)||xt(R,Ce)||xt(Ce,R)||xt(q?.portalNode,Ce)||re.some(ue=>ue===Ce||xt(ue,Ce))||Ce!=null&&oe.hasElement(Ce)||oe.hasMatchingElement(ue=>xt(ue,Ce))||_e||Z&&(Bi(Z.nodesRef.current,fe).find(ue=>xt(ue.context?.elements.floating,Ce)||xt(ue.context?.elements.domReference,Ce))||Vw(Z.nodesRef.current,fe).find(ue=>[ue.context?.elements.floating,Rp(ue.context?.elements.floating)].includes(Ce)||ue.context?.elements.domReference===Ce)));if(Pe===E&&pe&&Qw(pe,H),l&&Pe!==E&&!XL(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!==hb())&&(z.current=!0,S.setOpen(!1,_t(dh,Me)))})}function ve(){F.current||(C.current.insideReactTree=!0,ie.start(0,()=>{C.current.insideReactTree=!1}))}const ke=It(E)?E:null;if(!(!R&&!ke))return Pi(ke&&Nt(ke,"focusout",Oe),ke&&Nt(ke,"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,S,d,l,ye,I,A,H,C,ie,te,ne,h,m,Se]),k.useEffect(()=>{if(r||!R||!_)return;const he=Array.from(q?.portalNode?.querySelectorAll(`[${dc("portal")}]`)||[]),Re=(Z?Vw(Z.nodesRef.current,A()):[]).find(Pe=>yy(Pe.context?.elements.domReference||null))?.context?.elements.domReference,ve=[...[R,...he,D.current,B.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,...Se()],Re,ps(m),ps(h),I?E:null].filter(Pe=>Pe!=null),ke=Yw(ve,{ariaHidden:c||I,mark:!1}),Me=[R,...he].filter(Pe=>Pe!=null),Ce=Yw(Me);return()=>{Ce(),ke()}},[_,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||xt(pe,Te))return;let ke=null;const Me=()=>(ke==null&&(ke=ye(pe)),ke[0]||pe);let Ce;Oe===!0||Oe===null?Ce=Me():Ce=ps(Oe),Ce=Ce||Me(),pp(Ce,{preventScroll:Ce===pe})})},[r,_,pe,N,ye,$,K]),He(()=>{if(r||!pe)return;const he=Ft(pe),Te=Dr(he);WL(Te);function Re(ve){if(ve.open||(P.current=ZL(ve.nativeEvent,W.current)),ve.reason===ui&&ve.nativeEvent.type==="mouseleave"&&(z.current=!0),ve.reason===Sv)if(ve.nested)z.current=!1;else if(sR(ve.nativeEvent)||oR(ve.nativeEvent))z.current=!1;else{let ke=!1;Ft(pe).createElement("div").focus({get preventScroll(){return ke=!0,!1}}),ke?z.current=!1:z.current=!0}}T.on("openchange",Re);function Oe(){const ve=L.current;let ke=typeof ve=="function"?ve(P.current):ve;if(ke===void 0||ke===!1)return null;if(ke===null&&(ke=!0),typeof ke=="boolean"){const Ce=E||hb();return Ce&&Ce.isConnected?Ce:null}const Me=E||hb();return ps(ke)||Me||null}return()=>{T.off("openchange",Re);const ve=Dr(he),ke=Se(),Me=xt(R,ve)||ke.some(ge=>ge===ve||xt(ge,ve))||Z&&Bi(Z.nodesRef.current,A(),!1).some(ge=>xt(ge.context?.elements.floating,ve)),Ce=L.current,Pe=Oe();queueMicrotask(()=>{const ge=YL(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(!Ev||_||!R)return;const he=Dr(Ft(R));!It(he)||!gh(he)||xt(R,he)&&he.blur()},[_,R]),He(()=>{if(!(r||!q))return q.setFocusManagerState({modal:c,closeOnFocusOut:d,open:_,onOpenChange:S.setOpen,domReference:E}),()=>{q.setFocusManagerState(null)}},[r,q,c,_,S,d,E]),He(()=>{if(!(r||!pe))return Qw(pe,H),()=>{queueMicrotask(Nv)}},[r,pe,H]);const ze=!r&&(c?!I:!0)&&(le||c);return v.jsxs(k.Fragment,{children:[ze&&v.jsx(Tp,{"data-type":"inside",ref:G,onFocus:he=>{if(c){const Te=ye();pp(Te[Te.length-1])}else q?.portalNode&&(z.current=!1,Xu(he,q.portalNode)?RR(E)?.focus():ps(m??q.beforeOutsideRef)?.focus())}}),n,ze&&v.jsx(Tp,{"data-type":"inside",ref:O,onFocus:he=>{c?pp(ye()[0]):q?.portalNode&&(d&&(z.current=!0),Xu(he,q.portalNode)?CR(E)?.focus():ps(h??q.afterOutsideRef)?.focus())}})]})}function JL(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:d=!0,touchOpenDelay:p=0,reason:h=hl}=t,m=k.useRef(void 0),g=Pc(),y=fi(),x=k.useMemo(()=>({onPointerDown(S){m.current=S.pointerType},onMouseDown(S){const _=m.current,E=S.nativeEvent,R=n.select("open");if(S.button!==0||a==="click"||ml(_,!0)&&c)return;const T=r.current.openEvent,C=T?.type,A=n.select("domReferenceElement")!==S.currentTarget,N=R&&A||!(R&&l&&(!(T&&d)||C==="click"||C==="mousedown")),I=gr(E);if(gh(I)){const $=_t(h,E,I);N&&_==="touch"&&p>0?y.start(p,()=>{n.setOpen(!0,$)}):n.setOpen(N,$);return}const H=S.currentTarget;g.request(()=>{const $=_t(h,E,H);N&&_==="touch"&&p>0?y.start(p,()=>{n.setOpen(!0,$)}):n.setOpen(N,$)})},onClick(S){if(a==="mousedown-only")return;const _=m.current;if(a==="mousedown"&&_){m.current=void 0;return}if(ml(_,!0)&&c)return;const E=n.select("open"),R=r.current.openEvent,T=n.select("domReferenceElement")!==S.currentTarget,C=E&&T||!(E&&l&&(!(R&&d)||aR(R))),A=_t(h,S.nativeEvent,S.currentTarget);C&&_==="touch"&&p>0?y.start(p,()=>{n.setOpen(!0,A)}):n.setOpen(C,A)},onKeyDown(){m.current=void 0}}),[r,a,c,n,d,l,g,y,p,h]);return k.useMemo(()=>s?{reference:x}:hr,[s,x])}function e2(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",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let p=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,p=0,h=0,!s||d?(p=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&&!d&&(h=t.axis==="x"?a.height:h,p=t.axis==="y"?a.width:p),s=!0,{width:p,height:h,x:m,y:g,top:g,right:m+p,bottom:g+h,left:m}}}}function Jw(e){return e!=null&&e.clientX!=null}function t2(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:d="both"}=t,p=k.useRef(!1),h=k.useRef(null),[m,g]=k.useState(),[y,x]=k.useState([]),S=Ve((C,A,N)=>{p.current||l.current.openEvent&&!Jw(l.current.openEvent)||n.set("positionReference",e2(N??a,{x:C,y:A,axis:d,dataRef:l,pointerType:m}))}),_=Ve(C=>{r?h.current||x([]):S(C.clientX,C.clientY,C.currentTarget)}),E=ml(m)?s:r,R=k.useCallback(()=>{if(!E||!c)return;const C=yn(s);function A(N){const I=gr(N);xt(s,I)?(h.current?.(),h.current=null):S(N.clientX,N.clientY)}if(!l.current.openEvent||Jw(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,S]);k.useEffect(()=>R(),[R,y]),k.useEffect(()=>{c&&!s&&(p.current=!1)},[c,s]),k.useEffect(()=>{!c&&r&&(p.current=!0)},[c,r]);const T=k.useMemo(()=>{function C(A){g(A.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:_,onMouseEnter:_}},[_]);return k.useMemo(()=>c?{reference:T,trigger:T}:{},[c,T])}const n2={intentional:"onClick",sloppy:"onPointerDown"};function r2(){return!1}function i2(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function IR(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:d=!0,outsidePressEvent:p="sloppy",referencePress:h=r2,referencePressEvent:m="sloppy",bubbles:g,externalTree:y}=t,x=Cl(y),S=Ve(typeof d=="function"?d:()=>!1),_=typeof d=="function"?S:d,E=_!==!1,R=Ve(()=>p),T=k.useRef(!1),C=k.useRef(!1),A=k.useRef(!1),{escapeKey:N,outsidePress:I}=i2(g),H=k.useRef(null),$=fi(),L=fi(),K=Ve(()=>{L.clear(),a.current.insideReactTree=!1}),Z=k.useRef(!1),q=k.useRef(""),z=Ve(h),j=Ve(B=>{if(!r||!l||!c||B.key!=="Escape"||Z.current)return;const G=a.current.floatingContext?.nodeId,O=x?Bi(x.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=bL(B)?B.nativeEvent:B,te=_t(wv,ie);n.setOpen(!1,te),!N&&!te.isPropagationAllowed&&B.stopPropagation()}),F=Ve(()=>{a.current.insideReactTree=!0,L.start(0,K)});k.useEffect(()=>{if(!r||!l)return;a.current.__escapeKeyBubbles=N,a.current.__outsidePressBubbles=I;const B=new Ti,G=new Ti;function O(){B.clear(),Z.current=!0}function ie(){B.start(Lc()?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=x&&Bi(x.nodesRef.current,re).some(J=>ki(oe,J.context?.elements.floating));return ki(oe,n.select("floatingElement"))||ki(oe,n.select("domReferenceElement"))||_e}function Se(oe){if(pe(oe)){K();return}if(a.current.insideReactTree){K();return}const re=gr(oe),_e=`[${dc("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=>xt(ot,re))))return;let Be=yt(re)?re:null;for(;Be&&!hi(Be);){const ot=Fi(Be);if(hi(ot)||!yt(ot))break;Be=ot}if(ue.length&&yt(re)&&!EL(re)&&!xt(re,n.select("floatingElement"))&&ue.every(ot=>!xt(Be,ot)))return;if(It(re)&&!("touches"in oe)){const ot=hi(re),it=Er(re),nt=/auto|scroll/,vt=ot||nt.test(it.overflowX),st=ot||nt.test(it.overflowY),kt=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=kt&&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=x?Bi(x.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(Sv,oe)),K()}function ze(oe){le()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!l||ki(oe,n.select("floatingElement"))||ki(oe,n.select("domReferenceElement"))||Se(oe)}function he(oe){if(le()!=="sloppy"||!n.select("open")||!l||ki(oe,n.select("floatingElement"))||ki(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 ke(oe){if(le()!=="sloppy"||!H.current||ki(oe,n.select("floatingElement"))||ki(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,ke)}function Ce(oe){le()!=="sloppy"||!H.current||ki(oe,n.select("floatingElement"))||ki(oe,n.select("domReferenceElement"))||(H.current.dismissOnTouchEnd&&Se(oe),$.clear(),H.current=null)}function Pe(oe){Te(oe,Ce)}const ge=Ft(s),fe=Pi(c&&Pi(Nt(ge,"keydown",j),Nt(ge,"compositionstart",O),Nt(ge,"compositionend",ie)),E&&Pi(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,x,n,$]),k.useEffect(K,[_,K]);const U=k.useMemo(()=>({onKeyDown:j,[n2[m]]:B=>{z()&&n.setOpen(!1,_t(hl,B.nativeEvent))},...m!=="intentional"&&{onClick(B){z()&&n.setOpen(!1,_t(hl,B.nativeEvent))}}}),[j,n,m,z]),P=Ve(B=>{if(!r||!l||B.button!==0)return;const G=gr(B.nativeEvent);xt(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=k.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 k.useMemo(()=>l?{reference:U,floating:D,trigger:U}:{},[l,U,D])}function eE(e,t,n){let{reference:r,floating:s}=e;const a=di(t),l=Cv(t),c=Rv(l),d=jr(t),p=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(d){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&&p?-1:1);break;case"end":y[l]+=g*(n&&p?-1:1);break}return y}async function s2(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:d}=e,{boundary:p="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:g=!1,padding:y=0}=ws(t,e),x=hR(y),_=c[g?m==="floating"?"reference":"floating":m],E=cc(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:p,rootBoundary:h,strategy:d})),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=cc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:R,offsetParent:T,strategy:d}):R);return{top:(E.top-A.top+x.top)/C.y,bottom:(A.bottom-E.bottom+x.bottom)/C.y,left:(E.left-A.left+x.left)/C.x,right:(A.right-E.right+x.right)/C.x}}const o2=50,a2=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:s2},d=await(l.isRTL==null?void 0:l.isRTL(t));let p=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=eE(p,r,d),g=r,y=0;const x={};for(let S=0;S<a.length;S++){const _=a[S];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:x,rects:p,platform:c,elements:{reference:e,floating:t}});h=T??h,m=C??m,x[E]={...x[E],...A},N&&y<o2&&(y++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(p=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:h,y:m}=eE(p,g,d)),S=-1)}return{x:h,y:m,placement:g,strategy:s,middlewareData:x}},l2=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:d,elements:p}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,..._}=ws(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=jr(s),R=di(c),T=jr(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(p.floating)),A=g||(T||!S?[Cp(c)]:NL(c)),N=x!=="none";!g&&N&&A.push(...DL(c,S,x,C));const I=[c,...A],H=await d.detectOverflow(t,_),$=[];let L=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&$.push(H[E]),m){const z=AL(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!==di(j):!1)||L.every(P=>di(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=di(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 tE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nE(e){return RL.some(t=>e[t]>=0)}const u2=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=tE(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:nE(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=tE(l,n.floating);return{data:{escapedOffsets:c,escaped:nE(c)}}}default:return{}}}}},DR=new Set(["left","top"]);async function c2(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),d=di(n)==="y",p=DR.has(l)?-1:1,h=a&&d?-1:1,m=ws(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*h,y:g*p}:{x:g*p,y:y*h}}const f2=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,d=await c2(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:a+d.y,data:{...d,placement:l}}}}},d2=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:d={fn:E=>{let{x:R,y:T}=E;return{x:R,y:T}}},...p}=ws(e,t),h={x:n,y:r},m=await a.detectOverflow(t,p),g=di(jr(s)),y=_v(g);let x=h[y],S=h[g];if(l){const E=y==="y"?"top":"left",R=y==="y"?"bottom":"right",T=x+m[E],C=x-m[R];x=vy(T,x,C)}if(c){const E=g==="y"?"top":"left",R=g==="y"?"bottom":"right",T=S+m[E],C=S-m[R];S=vy(T,S,C)}const _=d.fn({...t,[y]:x,[g]:S});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[y]:l,[g]:c}}}}}},p2=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:d=!0,crossAxis:p=!0}=ws(e,t),h={x:n,y:r},m=di(s),g=_v(m);let y=h[g],x=h[m];const S=ws(c,t),_=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){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(p){var E,R;const T=g==="y"?"width":"height",C=DR.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);x<A?x=A:x>N&&(x=N)}return{[g]:y,[m]:x}}}},h2=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:d=()=>{},...p}=ws(e,t),h=await l.detectOverflow(t,p),m=jr(s),g=mo(s),y=di(s)==="y",{width:x,height:S}=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=S-h.top-h.bottom,T=x-h.left-h.right,C=gl(S-h[_],R),A=gl(x-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=x-2*(L!==0||K!==0?L+K:Yr(h.left,h.right)):I=S-2*(Z!==0||q!==0?Z+q:Yr(h.top,h.bottom))}await d({...t,availableWidth:H,availableHeight:I});const $=await l.getDimensions(c.floating);return x!==$.width||S!==$.height?{reset:{rects:!0}}:{}}}};function zR(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=bl(n)!==a||bl(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function Ov(e){return yt(e)?e:e.contextElement}function ol(e){const t=Ov(e);if(!It(t))return $i(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=zR(t);let l=(a?bl(n.width):n.width)/r,c=(a?bl(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const m2=$i(0);function LR(e){const t=yn(e);return!Lc()||!t.visualViewport?m2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function g2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function Qo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ov(e);let l=$i(1);t&&(r?yt(r)&&(l=ol(r)):l=ol(e));const c=g2(a,n,r)?LR(a):$i(0);let d=(s.left+c.x)/l.x,p=(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 x=g,S=hy(x);for(;S&&r&&y!==x;){const _=ol(S),E=S.getBoundingClientRect(),R=Er(S),T=E.left+(S.clientLeft+parseFloat(R.paddingLeft))*_.x,C=E.top+(S.clientTop+parseFloat(R.paddingTop))*_.y;d*=_.x,p*=_.y,h*=_.x,m*=_.y,d+=T,p+=C,x=yn(S),S=hy(x)}}return cc({width:h,height:m,x:d,y:p})}function kh(e,t){const n=fh(e).scrollLeft;return t?t.left+n:Qo(Ui(e)).left+n}function jR(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 b2(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Ui(r),c=t?ch(t.floating):!1;if(r===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},p=$i(1);const h=$i(0),m=It(r);if((m||!m&&!a)&&((Yn(r)!=="body"||ho(l))&&(d=fh(r)),m)){const y=Qo(r);p=ol(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=l&&!m&&!a?jR(l,d):$i(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-d.scrollLeft*p.x+h.x+g.x,y:n.y*p.y-d.scrollTop*p.y+h.y+g.y}}function y2(e){return Array.from(e.getClientRects())}function v2(e){const t=Ui(e),n=fh(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 rE=25;function k2(e,t){const n=yn(e),r=Ui(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,d=0;if(s){a=s.width,l=s.height;const h=Lc();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const p=kh(r);if(p<=0){const h=r.ownerDocument,m=h.body,g=getComputedStyle(m),y=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=rE&&(a-=x)}else p<=rE&&(a+=p);return{width:a,height:l,x:c,y:d}}function x2(e,t){const n=Qo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=It(e)?ol(e):$i(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,p=r*a.y;return{width:l,height:c,x:d,y:p}}function iE(e,t,n){let r;if(t==="viewport")r=k2(e,n);else if(t==="document")r=v2(Ui(e));else if(yt(t))r=x2(t,n);else{const s=LR(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return cc(r)}function PR(e,t){const n=Fi(e);return n===t||!yt(n)||hi(n)?!1:Er(n).position==="fixed"||PR(n,t)}function S2(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?Fi(e):e;for(;yt(l)&&!hi(l);){const c=Er(l),d=xv(l);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||ho(l)&&!d&&PR(e,l))?r=r.filter(h=>h!==l):s=c,l=Fi(l)}return t.set(e,r),r}function w2(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?ch(t)?[]:S2(t,this._c):[].concat(n),r],c=iE(t,l[0],s);let d=c.top,p=c.right,h=c.bottom,m=c.left;for(let g=1;g<l.length;g++){const y=iE(t,l[g],s);d=Yr(y.top,d),p=gl(y.right,p),h=gl(y.bottom,h),m=Yr(y.left,m)}return{width:p-m,height:h-d,x:m,y:d}}function E2(e){const{width:t,height:n}=zR(e);return{width:t,height:n}}function T2(e,t,n){const r=It(t),s=Ui(t),a=n==="fixed",l=Qo(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=$i(0);function p(){d.x=kh(s)}if(r||!r&&!a)if((Yn(t)!=="body"||ho(s))&&(c=fh(t)),r){const y=Qo(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&p();a&&!r&&s&&p();const h=s&&!r&&!a?jR(s,c):$i(0),m=l.left+c.scrollLeft-d.x-h.x,g=l.top+c.scrollTop-d.y-h.y;return{x:m,y:g,width:l.width,height:l.height}}function mb(e){return Er(e).position==="static"}function sE(e,t){if(!It(e)||Er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ui(e)===n&&(n=n.ownerDocument.body),n}function $R(e,t){const n=yn(e);if(ch(e))return n;if(!It(e)){let s=Fi(e);for(;s&&!hi(s);){if(yt(s)&&!mb(s))return s;s=Fi(s)}return n}let r=sE(e,t);for(;r&&Xz(r)&&mb(r);)r=sE(r,t);return r&&hi(r)&&mb(r)&&!xv(r)?n:r||eL(e)||n}const _2=async function(e){const t=this.getOffsetParent||$R,n=this.getDimensions,r=await n(e.floating);return{reference:T2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function R2(e){return Er(e).direction==="rtl"}const BR={convertOffsetParentRelativeRectToViewportRelativeRect:b2,getDocumentElement:Ui,getClippingRect:w2,getOffsetParent:$R,getElementRects:_2,getClientRects:y2,getDimensions:E2,getScale:ol,isElement:yt,isRTL:R2};function FR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C2(e,t){let n=null,r;const s=Ui(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const p=e.getBoundingClientRect(),{left:h,top:m,width:g,height:y}=p;if(c||t(),!g||!y)return;const x=ys(m),S=ys(s.clientWidth-(h+g)),_=ys(s.clientHeight-(m+y)),E=ys(h),T={rootMargin:-x+"px "+-S+"px "+-_+"px "+-E+"px",threshold:Yr(0,gl(1,d))||1};let C=!0;function A(N){const I=N[0].intersectionRatio;if(I!==d){if(!C)return l();I?l(!1,I):r=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!FR(p,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 Ap(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:d=!1}=r,p=Ov(e),h=s||a?[...p?oo(p):[],...t?oo(t):[]]:[];h.forEach(E=>{s&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const m=p&&c?C2(p,n):null;let g=-1,y=null;l&&(y=new ResizeObserver(E=>{let[R]=E;R&&R.target===p&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(t)})),n()}),p&&!d&&y.observe(p),t&&y.observe(t));let x,S=d?Qo(e):null;d&&_();function _(){const E=Qo(e);S&&!FR(S,E)&&n(),S=E,x=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,d&&cancelAnimationFrame(x)}}const A2=f2,N2=d2,O2=l2,M2=h2,I2=u2,D2=p2,z2=(e,t,n)=>{const r=new Map,s={platform:BR,...n},a={...s.platform,_c:r};return a2(e,t,{...s,platform:a})};var L2=typeof document<"u",j2=function(){},hp=L2?k.useLayoutEffect:j2;function Np(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(!Np(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)&&!Np(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function UR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oE(e,t){const n=UR(e);return Math.round(t*n)/n}function gb(e){const t=k.useRef(e);return hp(()=>{t.current=e}),t}function qR(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:d,open:p}=e,[h,m]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=k.useState(r);Np(g,r)||y(r);const[x,S]=k.useState(null),[_,E]=k.useState(null),R=k.useCallback(P=>{P!==N.current&&(N.current=P,S(P))},[]),T=k.useCallback(P=>{P!==I.current&&(I.current=P,E(P))},[]),C=a||x,A=l||_,N=k.useRef(null),I=k.useRef(null),H=k.useRef(h),$=d!=null,L=gb(d),K=gb(s),Z=gb(p),q=k.useCallback(()=>{if(!N.current||!I.current)return;const P={placement:t,strategy:n,middleware:g};K.current&&(P.platform=K.current),z2(N.current,I.current,P).then(W=>{const D={...W,isPositioned:Z.current!==!1};z.current&&!Np(H.current,D)&&(H.current=D,Ri.flushSync(()=>{m(D)}))})},[g,t,n,K,Z]);hp(()=>{p===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,m(P=>({...P,isPositioned:!1})))},[p]);const z=k.useRef(!1);hp(()=>(z.current=!0,()=>{z.current=!1}),[]),hp(()=>{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=k.useMemo(()=>({reference:N,floating:I,setReference:R,setFloating:T}),[R,T]),F=k.useMemo(()=>({reference:C,floating:A}),[C,A]),U=k.useMemo(()=>{const P={position:n,left:0,top:0};if(!F.floating)return P;const W=oE(F.floating,h.x),D=oE(F.floating,h.y);return c?{...P,transform:"translate("+W+"px, "+D+"px)",...UR(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:D}},[n,c,F.floating,h.x,h.y]);return k.useMemo(()=>({...h,update:q,refs:j,elements:F,floatingStyles:U}),[h,q,j,F,U])}const Mv=(e,t)=>{const n=A2(e);return{name:n.name,fn:n.fn,options:[e,t]}},Iv=(e,t)=>{const n=N2(e);return{name:n.name,fn:n.fn,options:[e,t]}},P2=(e,t)=>({fn:D2(e).fn,options:[e,t]}),Dv=(e,t)=>{const n=O2(e);return{name:n.name,fn:n.fn,options:[e,t]}},zv=(e,t)=>{const n=M2(e);return{name:n.name,fn:n.fn,options:[e,t]}},$2=(e,t)=>{const n=I2(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 bb={exports:{}},yb={};var aE;function B2(){if(aE)return yb;aE=1;var e=Dc();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(),x=r({inst:{value:y,getSnapshot:g}}),S=x[0].inst,_=x[1];return a(function(){S.value=y,S.getSnapshot=g,d(S)&&_({inst:S})},[m,y,g]),s(function(){return d(S)&&_({inst:S}),m(function(){d(S)&&_({inst:S})})},[m]),l(y),y}function d(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!n(m,y)}catch{return!0}}function p(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return yb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,yb}var lE;function HR(){return lE||(lE=1,bb.exports=B2()),bb.exports}var Lv=HR(),vb={exports:{}},kb={};var uE;function F2(){if(uE)return kb;uE=1;var e=Dc(),t=HR();function n(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return kb.useSyncExternalStoreWithSelector=function(p,h,m,g,y){var x=a(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=c(function(){function E(N){if(!R){if(R=!0,T=N,N=g(N),y!==void 0&&S.hasValue){var I=S.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(p,x[0],x[1]);return l(function(){S.hasValue=!0,S.value=_},[_]),d(_),_},kb}var cE;function U2(){return cE||(cE=1,vb.exports=F2()),vb.exports}var q2=U2();const Ey=[];let Ty;function H2(){return Ty}function G2(e){Ey.push(e)}function GR(e){const t=(n,r)=>{const s=wr(K2).current;let a;try{Ty=s;for(const l of Ey)l.before(s);a=e(n,r);for(const l of Ey)l.after(s);s.didInitialize=!0}finally{Ty=void 0}return a};return t.displayName=e.displayName||e.name,t}function V2(e){return k.forwardRef(GR(e))}function K2(){return{didInitialize:!1}}const Z2=bv(19),W2=Z2?X2:Q2;function bt(e,t,n,r,s){return W2(e,t,n,r,s)}function Y2(e,t,n,r,s){const a=k.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return Lv.useSyncExternalStore(e.subscribe,a,a)}G2({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()}}),Lv.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function X2(e,t,n,r,s){const a=H2();if(!a)return Y2(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 Q2(e,t,n,r,s){return q2.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class VR{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 KR extends VR{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){k.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){k.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 k.useDebugValue(t),bt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){k.useDebugValue(t);const r=Ve(n??ar);this.context[t]=r}useStateSetter(t){const n=k.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 J2(){const[,e]=k.useState({});return k.useCallback(()=>{e({})},[])}const ej={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 jv extends KR{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:GL(),nested:r,triggerElements:a},ej),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&aR(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 Bc(e,t=!1,n=!1){const[r,s]=k.useState(e&&t?"idle":void 0),[a,l]=k.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=An.request(()=>{s("ending")});return()=>{An.cancel(c)}}},[e,a,r,n]),He(()=>{if(!e||t)return;const c=An.request(()=>{s(void 0)});return()=>{An.cancel(c)}},[t,e]),He(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=An.request(()=>{s("idle")});return()=>{An.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function ZR(e,t=!1,n=!0){const r=Pc();return Ve((s,a=null)=>{r.cancel();const l=ps(e);if(l==null)return;const c=l,d=()=>{Ri.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function p(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||d()}).catch(()=>{if(n){a?.aborted||d();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&p()})}if(t){const h=Xo.startingStyle;if(!c.hasAttribute(h)){r.request(p);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),p())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(p)})}function aa(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=Ve(s),l=ZR(r,n,!1);k.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}function tj(e,t){const n=k.useRef(null),r=k.useRef(null);return k.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 nj(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=tj(e,n),l=Ve(c=>{if(a(c),!c||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:c,...r});return}d==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 rj(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 ij(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=Bc(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 aa({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:a}}class Pv{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 sj(){return new jv({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Pv,floatingId:"",syncOnly:!1,nested:!1,onOpenChange:void 0})}function oj(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:sj(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:hr,inactiveTriggerProps:hr,popupProps:hr}}const Td=rt(e=>e.triggerIdProp??e.activeTriggerId),aj={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:Td,activeTriggerElement:rt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:rt((e,t)=>t!==void 0&&Td(e)===t),isOpenedByTrigger:rt((e,t)=>t!==void 0&&Td(e)===t&&e.open),isMountedByTrigger:rt((e,t)=>t!==void 0&&Td(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 WR(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=ph(),a=vh()!=null,l=wr(()=>new jv({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Pv,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 lj(e={}){const{nodeId:t,externalTree:n}=e,r=WR(e),s=e.rootContext||r,a={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[l,c]=k.useState(null),d=k.useRef(null),p=Cl(n);He(()=>{a.domReference&&(d.current=a.domReference)},[a.domReference]);const h=qR({...e,elements:{...a,...l&&{reference:l}}}),m=k.useCallback(H=>{const $=yt(H)?{getBoundingClientRect:()=>H.getBoundingClientRect(),getClientRects:()=>H.getClientRects(),contextElement:H}:H;c($),h.refs.setReference($)},[h.refs]),[g,y]=k.useState(void 0),[x,S]=k.useState(null);s.useSyncedValue("referenceElement",g??null);const _=yt(g)?g:null;s.useSyncedValue("domReferenceElement",g===void 0?a.domReference:_),s.useSyncedValue("floatingElement",x);const E=k.useCallback(H=>{(yt(H)||H===null)&&(d.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=k.useCallback(H=>{S(H),h.refs.setFloating(H)},[h.refs]),T=k.useMemo(()=>({...h.refs,setReference:E,setFloating:R,setPositionReference:m,domReference:d}),[h.refs,E,R,m]),C=k.useMemo(()=>({...h.elements,domReference:a.domReference}),[h.elements,a.domReference]),A=s.useState("open"),N=s.useState("floatingId"),I=k.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=p?.nodesRef.current.find($=>$.id===t);H&&(H.context=I)}),k.useMemo(()=>({...h,context:I,refs:T,elements:C,rootStore:s}),[h,T,C,I,s])}function uj(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,s=ph(),a=vh()!=null,l=t.useState("open"),c=t.useState("activeTriggerElement"),d=t.useState(n?"popupElement":"positionerElement"),p=t.context.triggerElements,h=wr(()=>new jv({open:l,transitionStatus:void 0,referenceElement:c,floatingElement:d,triggerElements:p,onOpenChange:r,floatingId:s,syncOnly:!0,nested:a})).current;return He(()=>{const m={open:l,floatingId:s,referenceElement:c,floatingElement:d};yt(c)&&(m.domReferenceElement=c),h.state.positionReference===h.state.referenceElement&&(m.positionReference=c),h.update(m)},[l,s,c,d,h]),h.context.onOpenChange=r,h.context.nested=a,h}const xb=pL&&rR;function cj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:s}=n.context,{enabled:a=!0,delay:l}=t,c=k.useRef(!1),d=k.useRef(null),p=fi(),h=k.useRef(!0);k.useEffect(()=>{const g=n.select("domReferenceElement");if(!a)return;const y=yn(g);function x(){const E=n.select("domReferenceElement");!n.select("open")&&It(E)&&E===Dr(Ft(E))&&(c.current=!0)}function S(){h.current=!0}function _(){h.current=!1}return Pi(Nt(y,"blur",x),xb&&Nt(y,"keydown",S,!0),xb&&Nt(y,"pointerdown",_,!0))},[n,a]),k.useEffect(()=>{if(!a)return;function g(y){if(y.reason===hl||y.reason===wv){const x=n.select("domReferenceElement");yt(x)&&(d.current=x,c.current=!0)}}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,a,n]);const m=k.useMemo(()=>({onMouseLeave(){c.current=!1,d.current=null},onFocus(g){const y=g.currentTarget;if(c.current){if(d.current===y)return;c.current=!1,d.current=null}const x=gr(g.nativeEvent);if(yt(x)){if(xb&&!g.relatedTarget){if(!h.current&&!gh(x))return}else if(!_L(x))return}const S=_p(g.relatedTarget,n.context.triggerElements),{nativeEvent:_,currentTarget:E}=g,R=typeof l=="function"?l():l;if(n.select("open")&&S||R===0||R===void 0){n.setOpen(!0,_t(fp,_,E));return}p.start(R,()=>{c.current||n.setOpen(!0,_t(fp,_,E))})},onBlur(g){c.current=!1,d.current=null;const y=g.relatedTarget,x=g.nativeEvent,S=yt(y)&&y.hasAttribute(dc("focus-guard"))&&y.getAttribute("data-type")==="outside";p.start(0,()=>{const _=n.select("domReferenceElement"),E=Dr(Ft(_));!y&&E===_||xt(s.current.floatingContext?.refs.floating.current,E)||xt(_,E)||S||_p(y??E,n.context.triggerElements)||n.setOpen(!1,_t(fp,x))})}}),[s,n,p,l]);return k.useMemo(()=>a?{reference:m,trigger:m}:{},[a,m])}class $v{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 Ti,this.restTimeout=new Ti,this.handleCloseOptions=void 0}static create(){return new $v}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Op=new WeakMap;function Mp(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Op.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Op.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function YR(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Op.get(n);a&&a!==e&&Mp(a),Mp(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,Op.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function XR(e){const t=wr($v.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),mh(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function fj(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:d=0,nodeId:p}=t,h=XR(n),m=Cl(),g=vh(),y=Ve(()=>lR(l.current.openEvent?.type,h.interactedInside)),x=Ve(()=>{const C=l.current.openEvent?.type;return C?.includes("mouse")&&C!=="mousedown"}),S=Ve(C=>_p(C,n.context.triggerElements)),_=k.useCallback(C=>{const A=Ep(d,"close",h.pointerType),N=()=>{n.setOpen(!1,_t(ui,C)),m?.events.emit("floating.closed",C)};A?h.openChangeTimeout.start(A,N):(h.openChangeTimeout.clear(),N())},[d,n,h,m]),E=Ve(()=>{Mp(h)}),R=Ve(C=>{const A=gr(C);if(!TL(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]),k.useEffect(()=>E,[E]),He(()=>{if(c&&r&&h.handleCloseOptions?.blockPointerEvents&&x()&&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 YR(h,{scopeElement:H,referenceElement:C,floatingElement:A}),()=>{E()}}},[c,r,a,s,h,x,m,g,E]);const T=fi();k.useEffect(()=>{if(!c)return;function C(){h.openChangeTimeout.clear(),T.clear(),m?.events.off("floating.closed",N),E()}function A(H){if(m&&g&&Bi(m.nodesRef.current,g).length>0){m.events.on("floating.closed",N);return}if(S(H.relatedTarget))return;const $=l.current.floatingContext?.nodeId??p,L=H.relatedTarget;if(!(m&&$&&yt(L)&&Bi(m.nodesRef.current,$,!1).some(Z=>xt(Z.context?.elements.floating,L)))){if(h.handler){h.handler(H);return}E(),y()||_(H)}}function N(H){!m||!g||Bi(m.nodesRef.current,g).length>0||T.start(0,()=>{m.events.off("floating.closed",N),n.setOpen(!1,_t(ui,H)),m.events.emit("floating.closed",H)})}const I=s;return Pi(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,p,y,S,_,E,R,h,m,g,T])}const dj={current:null};function pj(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:d=!1,restMs:p=0,move:h=!0,triggerElementRef:m=dj,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:x,isClosing:S}=t,_=Cl(g),E=XR(n),R=k.useRef(!1),T=qn(c),C=qn(l),A=qn(p),N=qn(a),I=qn(S);y&&(E.handleCloseOptions=T.current?.__options);const H=Ve(()=>lR(r.current.openEvent?.type,E.interactedInside)),$=Ve(z=>_p(z,n.context.triggerElements)),L=Ve((z,j,F)=>{const U=n.context.triggerElements;if(U.hasElement(j))return!z||!xt(z,j);if(!yt(F))return!1;const P=F;return U.hasMatchingElement(W=>xt(W,P))&&(!z||!xt(z,P))}),K=Ve((z,j=!0)=>{const F=Ep(C.current,"close",E.pointerType);F?E.openChangeTimeout.start(F,()=>{n.setOpen(!1,_t(ui,z)),_?.events.emit("floating.closed",z)}):j&&(E.openChangeTimeout.clear(),n.setOpen(!1,_t(ui,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(()=>{Mp(E)});return k.useEffect(()=>Z,[Z]),k.useEffect(()=>{if(!a)return;function z(j){j.open?R.current=!1:(R.current=j.reason===ui,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]),k.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,d&&!ml(E.pointerType))return;const P=Uw(A.current),W=Ep(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(xt(he,D)){O=he;break}}yt(B)&&yt(G)&&!n.context.triggerElements.hasElement(B)&&xt(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)&&xt(G,O)&&le,ye=P>0&&!W,Se=ie&&(te||le)||pe,ze=!te||ie;if(Se){n.setOpen(!0,_t(ui,U,O));return}ye||(W?E.openChangeTimeout.start(W,()=>{ze&&n.setOpen(!0,_t(ui,U,O))}):ze&&n.setOpen(!0,_t(ui,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??x?.();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"||!xt(n.select("floatingElement"),U.relatedTarget))&&K(U)}return h?Pi(Nt(z,"mousemove",j,{once:!0}),Nt(z,"mouseenter",j),Nt(z,"mouseleave",F)):Pi(Nt(z,"mouseenter",j),Nt(z,"mouseleave",F))},[Z,q,r,C,K,n,a,T,E,y,L,H,$,d,h,A,m,_,N,x,I]),k.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(d&&!ml(E.pointerType))return;if(W&&D&&E.handleCloseOptions?.blockPointerEvents){const O=n.select("floatingElement");if(O){const ie=E.handleCloseOptions?.getScope?.()??U.ownerDocument.body;YR(E,{scopeElement:ie,referenceElement:U,floatingElement:O})}}const B=Uw(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(ui,F,U))}E.pointerType==="touch"?Ri.flushSync(()=>{G()}):D&&W?G():(E.restTimeoutPending=!0,E.restTimeout.start(B,G))}}},[a,E,H,L,d,n,A])}function QR(e=[]){const t=e.map(p=>p?.reference),n=e.map(p=>p?.floating),r=e.map(p=>p?.item),s=e.map(p=>p?.trigger),a=k.useCallback(p=>_d(p,e,"reference"),t),l=k.useCallback(p=>_d(p,e,"floating"),n),c=k.useCallback(p=>_d(p,e,"item"),r),d=k.useCallback(p=>_d(p,e,"trigger"),s);return k.useMemo(()=>({getReferenceProps:a,getFloatingProps:l,getItemProps:c,getTriggerProps:d}),[a,l,c,d])}function _d(e,t,n){const r=new Map,s=n==="item",a={};n==="floating"&&(a.tabIndex=-1,a[by]="");for(const l in e)s&&e&&(l===fR||l===dR)||(a[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const d=t[l]?.[n];typeof d=="function"?c=e?d(e):null:c=d,c&&fE(a,c,s,r)}return fE(a,e,s,r),a}function fE(e,t,n,r){for(const s in t){const a=t[s];n&&(s===fR||s===dR)||(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 hj(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 mj="Escape";function xh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Rd(e,t){return xh(t,e===Tv||e===$c,e===ao||e===lo)}function Sb(e,t,n){return xh(t,e===$c,n?e===ao:e===lo)||e==="Enter"||e===" "||e===""}function gj(e,t,n){return xh(t,n?e===ao:e===lo,e===$c)}function bj(e,t,n,r){const s=n?e===lo:e===ao,a=e===Tv;return t==="both"||t==="horizontal"&&r&&r>1?e===mj:xh(t,s,a)}function yj(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:d,onNavigate:p=()=>{},enabled:h=!0,selectedIndex:m=null,allowEscape:g=!1,loopFocus:y=!1,nested:x=!1,rtl:S=!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=Rp(s),Z=qn(K),q=vh(),z=Cl(L);He(()=>{l.current.orientation=A},[l,A]);const j=yy(a),F=k.useRef(E),U=k.useRef(m??-1),P=k.useRef(null),W=k.useRef(!0),D=Ve(ge=>{p(U.current===-1?null:U.current,ge)}),B=k.useRef(D),G=k.useRef(!!s),O=k.useRef(r),ie=k.useRef(!1),te=k.useRef(!1),ne=k.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=pp(_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(d==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||Sb(P.current,A,S)||x?dp(c):xy(c),P.current=null,D())};fe()}}else fc(c.current,d)||(U.current=d,ze(),te.current=!1)}},[h,r,s,d,ye,x,c,A,S,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&&xt(_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=d!=null,Te=Ve(ge=>{if(!pe.current)return;const fe=c.current.indexOf(ge.currentTarget);fe!==-1&&(U.current!==fe||d!==fe)&&(U.current=fe,D(ge))}),Re=k.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(!hj(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&&xt(re,_e)&&re.focus({preventScroll:!0})}}}),[Te,pe,Z,R,c,D,Se,_]),Oe=k.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(x&&bj(ge.key,A,S,I)){Rd(ge.key,Oe())||Wr(ge),n.setOpen(!1,_t(lb,ge.nativeEvent)),It(a)&&(_?z?.events.emit("virtualfocus",a):a.focus());return}const fe=U.current,oe=dp(c,C),re=xy(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=gR(_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[mR(J.map(Ze=>Ze!=null?c.current[Ze]:null),{event:ge,orientation:A,loopFocus:y,rtl:S,cols:I,disabledIndices:yR([...(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:bR(U.current>re?oe:U.current,_e,J,I,ge.key===$c?"bl":ge.key===(S?ao:lo)?"tr":"tl"),stopEvent:!0})];if(Be!=null&&(U.current=Be,D(ge)),A==="both")return}if(Rd(ge.key,A)){if(Wr(ge),r&&!_&&Dr(ge.currentTarget.ownerDocument)===ge.currentTarget){U.current=Sb(ge.key,A,S)?oe:re,D(ge);return}Sb(ge.key,A,S)?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})),fc(c.current,U.current)&&(U.current=-1),D(ge)}}),ke=k.useMemo(()=>_&&r&&he&&{"aria-activedescendant":`${H}-${d}`},[_,r,he,H,d]),Me=k.useMemo(()=>({"aria-orientation":A==="both"?void 0:A,...j?{}:ke,onKeyDown(ge){if(ge.key==="Tab"&&ge.shiftKey&&r&&!_){const fe=gr(ge.nativeEvent);if(fe&&!xt(Z.current,fe))return;Wr(ge),n.setOpen(!1,_t(dh,ge.nativeEvent)),It(a)&&a.focus();return}ve(ge)},onPointerMove(){W.current=!0}}),[ke,ve,Z,A,j,n,r,_,a]),Ce=k.useMemo(()=>{function ge(oe){E==="auto"&&sR(oe.nativeEvent)&&(F.current=!_)}function fe(oe){F.current=E,E==="auto"&&oR(oe.nativeEvent)&&(F.current=!0)}return{onKeyDown(oe){const re=n.select("open");W.current=!1;const _e=oe.key.startsWith("Arrow"),J=gj(oe.key,Oe(),S),ue=Rd(oe.key,A),Ie=(x?J:ue)||oe.key==="Enter"||oe.key.trim()==="";if(_&&re)return ve(oe);if(!(!re&&!T&&_e)){if(Ie){const Be=Rd(oe.key,Oe());P.current=x&&Be?null:oe.key}if(x){J&&(Wr(oe),re?(U.current=dp(c,le.current),D(oe)):n.setOpen(!0,_t(lb,oe.nativeEvent,oe.currentTarget)));return}ue&&(ye.current!=null&&(U.current=ye.current),Wr(oe),!re&&T?n.setOpen(!0,_t(lb,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,x,D,n,T,A,Oe,S,ye,_]),Pe=k.useMemo(()=>({...ke,...Ce}),[ke,Ce]);return k.useMemo(()=>h?{reference:Pe,floating:Me,item:Re,trigger:Ce}:{},[h,Pe,Me,Ce,Re])}function vj(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:d,onTypingChange:p,enabled:h=!0,resetMs:m=750,selectedIndex:g=null}=t,y=fi(),x=k.useRef(""),S=k.useRef(g??c??-1),_=k.useRef(null);He(()=>{!s&&g!==null||(y.clear(),_.current=null,x.current!==""&&(x.current=""))},[s,g,y]),He(()=>{s&&x.current===""&&(S.current=g??c??-1)},[s,g,c]);const E=Ve(N=>{N?r.current.typing||(r.current.typing=N,p?.(N)):r.current.typing&&(r.current.typing=N,p?.(N))}),R=Ve(N=>{function I(j){const F=l?.current[j];return!F||bh(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(x.current.length>0&&N.key===" "&&(Wr(N),E(!0)),x.current.length>0&&x.current[0]!==" "&&H($,x.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=x.current==="";L&&(S.current=g??c??-1),$.every(j=>j?j[0]?.toLocaleLowerCase()!==j[1]?.toLocaleLowerCase():!0)&&x.current===N.key&&(x.current="",S.current=_.current),x.current+=N.key,y.start(m,()=>{x.current="",S.current=_.current,E(!1)});const q=((L?g??c??-1:S.current)??0)+1,z=H($,x.current,q);z!==-1?(d?.(z),_.current=z):N.key!==" "&&(x.current="",E(!1))}),T=Ve(N=>{const I=N.relatedTarget,H=n.select("domReferenceElement"),$=n.select("floatingElement"),L=xt(H,I),K=xt($,I);L||K||(y.clear(),x.current="",S.current=_.current,E(!1))}),C=k.useMemo(()=>({onKeyDown:R,onBlur:T}),[R,T]),A=k.useMemo(()=>({onKeyDown:R,onBlur:T}),[R,T]);return k.useMemo(()=>h?{reference:C,floating:A}:{},[h,C,A])}const dE=.1,kj=dE*dE,rn=.5;function Cd(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Ad(e,t,n,r,s,a,l,c,d,p){let h=!1;return Cd(e,t,n,r,s,a)&&(h=!h),Cd(e,t,s,a,l,c)&&(h=!h),Cd(e,t,l,c,d,p)&&(h=!h),Cd(e,t,d,p,n,r)&&(h=!h),h}function xj(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Nd(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),d=Math.min(r,a),p=Math.max(r,a);return e>=l&&e<=c&&t>=d&&t<=p}function Sj(e={}){const{blockPointerEvents:t=!1}=e,n=new Ti,r=({x:s,y:a,placement:l,elements:c,onClose:d,nodeId:p,tree:h})=>{const m=l?.split("-")[0];let g=!1,y=null,x=null,S=typeof performance<"u"?performance.now():0;function _(R,T){const C=performance.now(),A=C-S;if(y===null||x===null||A===0)return y=R,x=T,S=C,!1;const N=R-y,I=T-x,H=N*N+I*I,$=A*A*kj;return y=R,x=T,S=C,H<$}function E(){n.clear(),d()}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=xt(A,H),K=xt(C,H);if(L&&(g=!0,!$))return;if(K&&(g=!1,!$)){g=!0;return}if($&&yt(T.relatedTarget)&&xt(A,T.relatedTarget))return;function Z(){return!!(h&&Bi(h.nodesRef.current,p).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=Nd(N,I,D,z.top+1,B,j.bottom-1);break;case"bottom":ie=Nd(N,I,D,j.top+1,B,z.bottom-1);break;case"left":ie=Nd(N,I,j.right-1,O,z.left+1,G);break;case"right":ie=Nd(N,I,z.right-1,O,j.left+1,G);break}if(ie)return;if(g&&!xj(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=Ad(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=Ad(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=Ad(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=Ad(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 al="ArrowUp",Ho="ArrowDown",pc="ArrowLeft",ll="ArrowRight",Fc="Home",Uc="End",JR=new Set([pc,ll]),wj=new Set([pc,ll,Fc,Uc]),eC=new Set([al,Ho]),Ej=new Set([al,Ho,Fc,Uc]),tC=new Set([...JR,...eC]),Tj=new Set([...tC,Fc,Uc]),_j=new Set([al,Ho,pc,ll,Fc,Uc]),Rj="Shift",Cj="Control",Aj="Alt",Nj="Meta",Oj=new Set([Rj,Cj,Aj,Nj]);function Mj(e){return It(e)&&e.tagName==="INPUT"}function pE(e){return!!(Mj(e)&&e.selectionStart!=null||It(e)&&e.tagName==="TEXTAREA")}function hE(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 d=mE(e,t,"left"),p=Od(e),h=Od(t);n==="ltr"&&(d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-p.scrollPaddingRight?s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+p.scrollPaddingRight:d-h.scrollMarginLeft<e.scrollLeft+p.scrollPaddingLeft&&(s=d-h.scrollMarginLeft-p.scrollPaddingLeft)),n==="rtl"&&(d-h.scrollMarginRight<e.scrollLeft+p.scrollPaddingLeft?s=d-h.scrollMarginLeft-p.scrollPaddingLeft:d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-p.scrollPaddingRight&&(s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+p.scrollPaddingRight))}if(c&&r!=="horizontal"){const d=mE(e,t,"top"),p=Od(e),h=Od(t);d-h.scrollMarginTop<e.scrollTop+p.scrollPaddingTop?a=d-h.scrollMarginTop-p.scrollPaddingTop:d+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-p.scrollPaddingBottom&&(a=d+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+p.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function mE(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 Od(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 Ij(e){return bv(19)?e:e?"true":void 0}const Dj=k.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 nC(e){const t=k.useRef(!0);t.current&&(t.current=!1,e())}let gE={},bE={},yE="";function zj(e){if(typeof document>"u")return!1;const t=Ft(e);return yn(t).innerWidth-t.documentElement.clientWidth>0}function Lj(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 d=a.offsetWidth;a.style.overflowY="hidden";const p=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,d===p}function jj(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 Pj(e){const t=Ft(e),n=t.documentElement,r=t.body,s=yn(n);let a=0,l=0,c=!1;const d=An.create();if(Ev&&(s.visualViewport?.scale??1)!==1)return()=>{};function p(){const y=s.getComputedStyle(n),x=s.getComputedStyle(r),E=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,gE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},yE=n.style.scrollBehavior,bE={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"||x.overflowY==="scroll",A=y.overflowX==="scroll"||x.overflowX==="scroll",N=Math.max(0,s.innerWidth-r.clientWidth),I=Math.max(0,s.innerHeight-r.clientHeight),H=parseFloat(x.marginTop)+parseFloat(x.marginBottom),$=parseFloat(x.marginLeft)+parseFloat(x.marginRight),L=ho(n)?n:r;if(c=Lj(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,gE),Object.assign(r.style,bE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=yE)}function m(){h(),d.request(p)}p();const g=Nt(s,"resize",m);return()=>{d.cancel(),h(),typeof s.removeEventListener=="function"&&g()}}class $j{lockCount=0;restore=null;timeoutLock=Ti.create();timeoutUnlock=Ti.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=nR||!zj(t);this.restore=a?jj(t):Pj(t)}}const Bj=new $j;function Fj(e=!0,t=null){He(()=>{if(e)return Bj.acquire(t)},[e,t])}function Uj(e){const t=k.useRef(""),n=k.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:k.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 rC(e,t){const n=k.useRef(e),r=Ve(t);He(()=>{n.current!==e&&r(n.current)},[e,r]),He(()=>{n.current=e},[e])}function qj(e){const[t,n]=k.useState(null),r=Ve((l,c)=>{e||n(c||(nR?"touch":""))});rC(e,l=>{l&&!e&&n(null)});const{onClick:s,onPointerDown:a}=Uj(r);return k.useMemo(()=>({openMethod:t,triggerProps:{onClick:s,onPointerDown:a}}),[t,s,a])}const Hj={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:""},Gj={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 Vj(e,t="outline"){return t==="filled"?Gj[e]:Hj[e]}const Kj=new Set(["ui-progress-spin","cursor-icon-spin"]);function Zj(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&Kj.has(t.animationName)&&(t.startTime=0)}const _y=k.createContext(void 0);function Ts({iconSize:e,iconButtonSize:t,iconButtonSubtleHover:n,buttonSize:r,buttonVariant:s,menuSize:a,disabled:l,children:c}){const d=k.useContext(_y),p=k.useMemo(()=>({iconSize:e??d?.iconSize,iconButtonSize:t??d?.iconButtonSize,iconButtonSubtleHover:n??d?.iconButtonSubtleHover,buttonSize:r??d?.buttonSize,buttonVariant:s??d?.buttonVariant,menuSize:a??d?.menuSize,disabled:l??d?.disabled}),[r,s,l,t,n,e,a,d]);return v.jsx(_y.Provider,{value:p,children:c})}function Al(){return k.useContext(_y)}const Wj="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 Yj(e,t,n){return[Kt.base,Xj(e),Qj(t),Jj(n)]}function Xj(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 Qj(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 Jj(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 vn({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,style:d,title:p,"aria-label":h,"aria-hidden":m,ref:g}){const y=Al(),x=k.useCallback(C=>{typeof g=="function"?g(C):g&&(g.current=C),C&&t==="spin"&&n&&Zj(C)},[g,t,n]),S=s??y?.iconSize??Wj,_=typeof S=="number",E=Vj(e,r),R={...E?{"--cursor-icon-content":`"${E}"`}:{},..._?{"--icon-size":`${S}px`}:{},...d},T=En({rootClass:"ui-icon",stylexStyles:[Yj(S,a,t),l&&Kt.capTrim],className:wn("cursor-icon",c),style:R});return v.jsx("i",{ref:x,className:T.className,"data-icon-name":e,"data-size":_?void 0:S,"data-color":a,style:T.style,title:p??h,"aria-hidden":m??(h?void 0:!0)})}const eP=k.createContext({root:null});function Nl(){return k.useContext(eP).root}const tP={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"},nP={},rP=3e3,iP=10;let vE=rP;function sP(){const e=vE;return vE+=iP,{zIndex:e,release:()=>{}}}const oP=k.createContext(null);function aP(){return k.useContext(oP)}function qc(e,t){const n=aP(),[r,s]=k.useState(null);k.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??sP();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=k.useMemo(()=>r===null?nP:{[tP[e]]:String(r)},[r,e]);return k.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const iC=k.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:d,...p}=t,{getButtonProps:h,buttonRef:m}=jc({disabled:a,focusableWhenDisabled:l,native:c});return kn("button",t,{state:{disabled:a},ref:[n,m],props:[p,h]})}),Qu={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}},lP={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}},ks={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},sC={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},uP={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},cP={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},fP={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Ol={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Bv={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},zu={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}},dP={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}},pP={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}},kE={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:zu.root,fontSmoothing:Bv.root,align:{center:null,left:zu.alignLeft},reveal:{always:null,rowActive:zu.revealRowActive},frame:{container:null,content:zu.frameContent},shape:{rounded:null,pill:zu.shapePill},size:dP,pillSize:pP,typography:{xs:fo.root,sm:ks.root,md:ks.root,lg:ks.root,xl:sC.root},labelGroup:kE.labelGroup,kbs:[fo.root,kE.kbs]},hP="md",mP="primary",gP="neutral",bP={xs:"sm",sm:"base",md:"sm",lg:"sm",xl:"lg"},yP={primary:mP,secondary:gP,text:"default"};function zn({variant:e,color:t,size:n,shape:r="rounded",frame:s="container",reveal:a="always",align:l,disabled:c,children:d,kbs:p,className:h,style:m,rootStyle:g,...y}){const x=Al(),S=e??x?.buttonVariant??"tint",_=n??x?.buttonSize??hP,E=c??x?.disabled,R=t??yP[S],T=Nn(xi.root,xi.fontSmoothing,Qu.appearance,(S==="primary"||S==="secondary")&&Qu.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=d;if(p!=null){const A=Nn(xi.labelGroup),N=Nn(xi.kbs);C=v.jsxs("span",{className:wn("ui-button__label-group",A.className),style:A.style,children:[d,v.jsx("span",{className:wn("ui-button__kbs",N.className),style:N.style,children:p})]})}return v.jsx(iC,{...y,className:wn("ui-button",T.className,h),style:{...T.style,...m},"data-variant":S,"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:bP[_],children:C})})}function Hc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function hc({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=k.useRef(e!==void 0),[a,l]=k.useState(t),c=s?e:a,d=k.useCallback(p=>{s||l(p)},[]);return[c,d]}let xE=(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})({}),SE=(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 vP={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ku={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},kP={disabled:!1,...Ku},Gc={valid(e){return e===null?null:e?{[SE.valid]:""}:{[SE.invalid]:""}}};function xP(e){return k.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[xE.checked]:""}:{[xE.unchecked]:""}},...Gc}),[e.indeterminate])}const SP=k.createContext({invalid:void 0,name:void 0,validityData:{state:vP,errors:[],error:"",value:"",initialValue:null},setValidityData:ar,disabled:void 0,touched:Ku.touched,setTouched:ar,dirty:Ku.dirty,setDirty:ar,filled:Ku.filled,setFilled:ar,focused:Ku.focused,setFocused:ar,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:kP,markedDirtyRef:{current:!1},registerFieldControl:ar,validation:{getValidationProps:(e=hr)=>e,getInputValidationProps:(e=hr)=>e,inputRef:{current:null},commit:async()=>{}}});function Vc(e=!0){const t=k.useContext(SP);if(t.setValidityData===ar&&!e)throw new Error(Xn(28));return t}function oC(e,t){const{enabled:n=!0,getValue:r,id:s,value:a}=t,{registerFieldControl:l}=Vc(),c=k.useRef(null);c.current||(c.current=Symbol()),He(()=>{const d=c.current;if(!(!d||!n))return l(d,{controlRef:e,getValue:r,id:s,value:a}),()=>{l(d,void 0)}},[e,n,r,s,l,a])}const wP=k.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ar,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function EP(){return k.useContext(wP)}const TP=k.createContext({controlId:void 0,registerControlId:ar,labelId:void 0,setLabelId:ar,messageIds:[],setMessageIds:ar,getDescriptionProps:e=>e});function Fv(){return k.useContext(TP)}const _P=k.createContext(void 0);function RP(){const e=k.useContext(_P);if(e===void 0)throw new Error(Xn(14));return e}const CP=k.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,d=RP(),p=d.checked||d.indeterminate,{mounted:h,transitionStatus:m,setMounted:g}=Bc(p),y=k.useRef(null),x={...d,transitionStatus:m};aa({open:p,ref:y,onComplete(){p||g(!1)}});const S=xP(d),_=k.useMemo(()=>({...S,...oa,...Gc}),[S]),E=l||h,R=kn("span",t,{ref:[n,y],state:x,stateAttributesMapping:_,props:c});return E?R:null}),AP="md",wE={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}},NP={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}},OP={sm:9,md:10,lg:11},EE={"--icon-weight":"700"};function MP({indeterminate:e,interactive:t,size:n,variant:r}){const s=Nn(wE.root,wE[n],NP[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=OP[n];return v.jsx("span",{"aria-hidden":"true",className:wn("ui-checkbox__box",s.className),style:s.style,children:t?v.jsx(CP,{className:wn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,d)=>v.jsx("span",{...c,children:v.jsx(vn,{name:d.indeterminate?"minus":"check",size:l,style:EE})}),style:a.style}):v.jsx("span",{className:wn("ui-checkbox__icon",a.className),style:a.style,children:v.jsx(vn,{name:e?"minus":"check",size:l,style:EE})})})}function aC({checked:e,disabled:t,indeterminate:n=!1,size:r=AP,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:wn("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(MP,{indeterminate:n,interactive:!1,size:r,variant:s})})}function IP(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,a=t!==void 0,[l,c]=hc({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:d,setMounted:p,transitionStatus:h}=Bc(l,!0,!0),[m,g]=k.useState(l),[{height:y,width:x},S]=k.useState({height:void 0,width:void 0}),_=hh(),[E,R]=k.useState(),T=E??_,[C,A]=k.useState(!1),[N,I]=k.useState(!1),H=k.useRef(null),$=k.useRef(null),L=k.useRef(null),K=k.useRef(null),Z=ZR(K,!1),q=Ve(z=>{const j=!l,F=_t(hl,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"&&!d&&j&&p(!0),$.current==="css-animation"&&(!m&&j&&g(!0),!d&&j&&p(!0))),c(j),$.current==="none"&&d&&!j&&p(!1)});return He(()=>{a&&$.current==="none"&&!l&&p(!1)},[a,l,t,p]),k.useMemo(()=>({abortControllerRef:H,animationTypeRef:$,disabled:s,handleTrigger:q,height:y,mounted:d,open:l,panelId:T,panelRef:K,runOnceAnimationsFinish:Z,setDimensions:S,setHiddenUntilFound:A,setKeepMounted:I,setMounted:p,setOpen:c,setPanelIdState:R,setVisible:g,transitionDimensionRef:L,transitionStatus:h,visible:m,width:x}),[H,$,s,q,y,d,l,T,K,Z,S,A,I,p,c,g,L,h,m,x])}const lC=k.createContext(void 0);function uC(){const e=k.useContext(lC);if(e===void 0)throw new Error(Xn(15));return e}let Ju=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xo.startingStyle]="startingStyle",e[e.endingStyle=Xo.endingStyle]="endingStyle",e})({}),DP=(function(e){return e.panelOpen="data-panel-open",e})({});const zP={[Ju.open]:""},LP={[Ju.closed]:""},jP={open(e){return e?{[DP.panelOpen]:""}:null}},PP={open(e){return e?zP:LP}},cC={...PP,...oa},$P=k.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:d,style:p,...h}=t,m=Ve(c),g=IP({open:d,defaultOpen:a,onOpenChange:m,disabled:l}),y=k.useMemo(()=>({open:g.open,disabled:g.disabled,transitionStatus:g.transitionStatus}),[g.open,g.disabled,g.transitionStatus]),x=k.useMemo(()=>({...g,onOpenChange:m,state:y}),[g,m,y]),S=kn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:cC});return v.jsx(lC.Provider,{value:x,children:S})}),BP={...jP,...oa},TE=k.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=uC(),{className:d,disabled:p=c,id:h,render:m,nativeButton:g=!0,style:y,...x}=t,{getButtonProps:S,buttonRef:_}=jc({disabled:p,focusableWhenDisabled:!0,native:g}),E=k.useMemo(()=>({"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a}),[r,s,a]);return kn("button",t,{state:l,ref:[n,_],props:[E,x,S],stateAttributesMapping:BP})});let FP=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function UP(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:s,hiddenUntilFound:a,keepMounted:l,id:c,mounted:d,onOpenChange:p,open:h,panelRef:m,runOnceAnimationsFinish:g,setDimensions:y,setMounted:x,setOpen:S,setVisible:_,transitionDimensionRef:E,visible:R,width:T}=e,C=k.useRef(!1),A=k.useRef(null),N=k.useRef(h),I=k.useRef(h),H=Pc(),$=k.useMemo(()=>n.current==="css-animation"?!R:!h&&!d,[h,d,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(FP.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=An.request(()=>{I.current=!1,z=An.request(()=>{setTimeout(()=>{Z.style.removeProperty("transition-duration")})})}),()=>{An.cancel(q),An.cancel(z)}}),K=xs(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(Ju.startingStyle,""),y({height:Z.scrollHeight,width:Z.scrollWidth}),q=An.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=Ju.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"),x(!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()=>{An.cancel(q)}},[t,n,H,a,l,d,h,m,g,y,x]),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),x(!0),_(!0)):(t.current=new AbortController,g(()=>{x(!1),_(!1),t.current=null},t.current.signal)))},[t,n,h,m,g,y,x,_,R]),mh(()=>{const Z=An.request(()=>{N.current=!1});return()=>An.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=An.request(()=>{C.current=!1,z=An.request(()=>{setTimeout(()=>{Z.style.removeProperty("transition-duration")})})})),()=>{An.cancel(q),An.cancel(z)}},[a,h,m,y]),He(()=>{const Z=m.current;Z&&a&&$&&(Z.setAttribute("hidden","until-found"),n.current==="css-transition"&&Z.setAttribute(Ju.startingStyle,""))},[a,$,n,m]),k.useEffect(function(){const q=m.current;if(!q)return;function z(j){C.current=!0,S(!0),p(!0,_t(Ss,j))}return Nt(q,"beforematch",z)},[p,m,S]),k.useMemo(()=>({props:{hidden:$,id:c,ref:K}}),[$,c,K])}let _E=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const qP=k.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:d,...p}=t,{abortControllerRef:h,animationTypeRef:m,height:g,mounted:y,onOpenChange:x,open:S,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}=uC(),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}=UP({abortControllerRef:h,animationTypeRef:m,externalRef:n,height:g,hiddenUntilFound:j,id:_,keepMounted:F,mounted:y,onOpenChange:x,open:S,panelRef:E,runOnceAnimationsFinish:R,setDimensions:T,setMounted:N,setOpen:H,setVisible:$,transitionDimensionRef:K,visible:Z,width:q});aa({open:S&&z==="idle",ref:E,onComplete(){S&&T({height:void 0,width:void 0})}});const P=k.useMemo(()=>({...L,transitionStatus:z}),[L,z]),W=kn("div",t,{state:P,ref:[n,E],props:[U,{style:{[_E.collapsiblePanelHeight]:g===void 0?"auto":`${g}px`,[_E.collapsiblePanelWidth]:q===void 0?"auto":`${q}px`}},p],stateAttributesMapping:cC});return F||j||y?W:null}),RE={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 HP({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:d,tone:p}){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"}}[(p==="muted"||p==="tertiary")<<2|!!d<<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"}}[(p==="muted")<<2|!!d<<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:wn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),v.jsx("span",{className:wn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&v.jsx("span",{ref:r,className:wn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&v.jsx(vn,{ref:t,name:"chevron-right",className:wn("ui-collapsible-chevron",g.className),style:g.style,size:10})]})}function mi({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,leadingIcon:s,disabled:a=!1,expandable:l=!0,loading:c=!1,shimmerDetails:d=!0,tabularNums:p=!1,tone:h="default",children:m,headerRef:g,detailsRef:y,chevronRef:x,className:S,contentClassName:_,open:E,defaultOpen:R,onOpenChange:T,...C}){const A=n!==void 0,N=l&&A,I=E!==void 0,[H,$]=k.useState(()=>R??!1),L=I?!!E:H,K=(O,ie)=>{I||$(O),T?.(O,ie)},Z=A?v.jsx("button",{type:"button",...Nn(RE.buttonReset,RE.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:wn("ui-collapsible-header",j.className),style:j.style},G=v.jsx(HP,{action:e,chevronRef:x,details:Z,detailsRef:y,leadingIcon:s,loading:c,shimmerDetails:d,showChevron:l&&!A,tabularNums:p,tone:h});return v.jsxs($P,{...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:wn("ui-collapsible",z.className,S),style:z.style,children:[N?v.jsxs("div",{...B,ref:g,onClick:()=>{a||K(!L)},children:[G,v.jsx(TE,{"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(vn,{ref:x,name:"chevron-right",className:wn("ui-collapsible-chevron",U.className),style:U.style,size:10})})]}):l?v.jsx(TE,{...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(qP,{keepMounted:!0,className:wn("ui-collapsible-content-view",P.className),style:P.style,children:v.jsx("div",{className:W.className,style:W.style,children:v.jsx("div",{className:wn("ui-collapsible-content",D.className,_),style:D.style,children:m})})})]})}function GP(e){return kn(e.defaultTagName??"div",e,e)}var VP=["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] *)"],Ip=VP.join(","),fC=typeof Element>"u",yl=fC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Dp=!fC&&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},zp=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]"):zp(t.parentNode));return l},KP=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},dC=function(t,n,r){if(zp(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Ip));return n&&yl.call(t,Ip)&&s.unshift(t),s=s.filter(r),s},Lp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!zp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),d=c.length?c:l.children,p=Lp(d,!0,r);r.flatten?s.push.apply(s,p):s.push({scopeParent:l,candidates:p})}else{var h=yl.call(l,Ip);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),g=!zp(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&g){var y=Lp(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},pC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||KP(t))&&!pC(t)?0:t.tabIndex},ZP=function(t,n){var r=hC(t);return r<0&&n&&!pC(t)?0:r},WP=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},mC=function(t){return t.tagName==="INPUT"},YP=function(t){return mC(t)&&t.type==="hidden"},XP=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QP=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JP=function(t){if(!t.name)return!0;var n=t.form||Dp(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=QP(s,t.form);return!a||a===t},e$=function(t){return mC(t)&&t.type==="radio"},t$=function(t){return e$(t)&&!JP(t)},n$=function(t){var n,r=t&&Dp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,d;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&s;){var p,h,m;r=Dp(s),s=(p=r)===null||p===void 0?void 0:p.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},CE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},r$=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=yl.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(yl.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var p=t.parentElement,h=Dp(t);if(p&&!p.shadowRoot&&s(p)===!0)return CE(t);t.assignedSlot?t=t.assignedSlot:!p&&h!==t.ownerDocument?t=h.host:t=p}t=d}if(n$(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return CE(t);return!1},i$=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 yl.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Ry=function(t,n){return!(n.disabled||YP(n)||r$(n,t)||XP(n)||i$(n))},Cy=function(t,n){return!(t$(n)||hC(n)<0||!Ry(t,n))},s$=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},gC=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,d=ZP(c,l),p=l?gC(s.candidates):c;d===0?l?n.push.apply(n,p):n.push(c):r.push({documentOrder:a,tabIndex:d,item:s,isScope:l,content:p})}),r.sort(WP).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},Sh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Lp([t],n.includeContainer,{filter:Cy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:s$}):r=dC(t,n.includeContainer,Cy.bind(null,n)),gC(r)},o$=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Lp([t],n.includeContainer,{filter:Ry.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=dC(t,n.includeContainer,Ry.bind(null,n)),r},bC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yl.call(t,Ip)===!1?!1:Cy(n,t)};function a$(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function yC(){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 l$(){return/apple/i.test(navigator.vendor)}function Ay(){const e=/android/i;return e.test(a$())||e.test(yC())}function u$(){return yC().includes("jsdom/")}const AE="data-floating-ui-focusable",c$="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",wb="ArrowLeft",Eb="ArrowRight",f$="ArrowUp",d$="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 kr(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 Tb(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 p$(e){return e.matches("html,body")}function pr(e){return e?.ownerDocument||document}function vC(e){return It(e)&&e.matches(c$)}function Ny(e){return e?e.getAttribute("role")==="combobox"&&vC(e):!1}function jp(e){return e?e.hasAttribute(AE)?e:e.querySelector("["+AE+"]")||e:null}function Ko(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,...Ko(e,s.id,n)])}function h$(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),Ko(e,a).forEach(d=>{s(d.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function NE(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 m$(e){return"nativeEvent"in e}function kC(e){return e.mozInputSource===0&&e.isTrusted?!0:Ay()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function xC(e){return u$()?!1:!Ay()&&e.width===0&&e.height===0||Ay()&&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 mc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var g$=typeof document<"u",b$=function(){},on=g$?k.useLayoutEffect:b$;const y$={...oh};function Wn(e){const t=k.useRef(e);return on(()=>{t.current=e}),t}const v$=y$.useInsertionEffect,k$=v$||(e=>e());function Dn(e){const t=k.useRef(()=>{});return k$(()=>{t.current=e}),k.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 Md(e,t,n){return Math.floor(e/t)!==n}function ec(e,t){return t<0||t>=e.current.length}function _b(e,t){return fr(e,{disabledIndices:t})}function OE(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&&mp(e,l,s));return l}function x$(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:d,maxIndex:p,prevIndex:h,stopEvent:m=!1}=t,g=h;if(n.key===f$){if(m&&or(n),h===-1)g=p;else if(g=fr(e,{startingIndex:g,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<d||g<0)){const y=h%l,x=p%l,S=p-(x-y);x===y?g=p:g=x>y?S:S-l}ec(e,g)&&(g=h)}if(n.key===d$&&(m&&or(n),h===-1?g=d:(g=fr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>p&&(g=fr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),ec(e,g)&&(g=h)),r==="both"){const y=ys(h/l);n.key===(a?wb:Eb)&&(m&&or(n),h%l!==l-1?(g=fr(e,{startingIndex:h,disabledIndices:c}),s&&Md(g,l,y)&&(g=fr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(g=fr(e,{startingIndex:h-h%l-1,disabledIndices:c})),Md(g,l,y)&&(g=h)),n.key===(a?Eb:wb)&&(m&&or(n),h%l!==0?(g=fr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&Md(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})),Md(g,l,y)&&(g=h));const x=ys(p/l)===y;ec(e,g)&&(s&&x?g=n.key===(a?Eb:wb)?p:fr(e,{startingIndex:h-h%l-1,disabledIndices:c}):g=h)}return g}function S$(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:d}=a,p=!1;for(n&&(s=0);!p;){const h=[];for(let m=0;m<c;m++)for(let g=0;g<d;g++)h.push(s+m+g*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),p=!0):s++}}),[...r]}function w$(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 E$(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function mp(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 Kc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function SC(e,t){const n=Sh(e,Kc()),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 wC(e){return SC(pr(e).body,1)||e}function EC(e){return SC(pr(e).body,-1)||e}function tc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!kr(n,r)}function T$(e){Sh(e,Kc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ME(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 Zc(e){const t=k.useRef(void 0),n=k.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 k.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function _$(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 TC=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function _C(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=k.useState(()=>new Set),l=k.useCallback(p=>{a(h=>new Set(h).add(p))},[]),c=k.useCallback(p=>{a(h=>{const m=new Set(h);return m.delete(p),m})},[]),d=k.useMemo(()=>{const p=new Map;return Array.from(s.keys()).sort(_$).forEach((m,g)=>{p.set(m,g)}),p},[s]);return v.jsx(TC.Provider,{value:k.useMemo(()=>({register:l,unregister:c,map:d,elementsRef:n,labelsRef:r}),[l,c,d,n,r]),children:t})}function wh(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=k.useContext(TC),[c,d]=k.useState(null),p=k.useRef(null),h=k.useCallback(m=>{if(p.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=p.current;if(m)return n(m),()=>{r(m)}},[n,r]),on(()=>{const m=p.current?s.get(p.current):null;m!=null&&d(m)},[s]),k.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const R$="data-floating-ui-focusable",IE="active",DE="selected",Wc="ArrowLeft",Yc="ArrowRight",RC="ArrowUp",Eh="ArrowDown",C$={...oh};let zE=!1,A$=0;const LE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+A$++;function N$(){const[e,t]=k.useState(()=>zE?LE():void 0);return on(()=>{e==null&&t(LE())},[]),k.useEffect(()=>{zE=!0},[]),e}const O$=C$.useId,Th=O$||N$;function CC(){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 AC=k.createContext(null),NC=k.createContext(null),go=()=>{var e;return((e=k.useContext(AC))==null?void 0:e.id)||null},bo=()=>k.useContext(NC);function OC(e){const t=Th(),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 MC(e){const{children:t,id:n}=e,r=go();return v.jsx(AC.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function M$(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(l=>{n.current=[...n.current,l]},[]),s=k.useCallback(l=>{n.current=n.current.filter(c=>c!==l)},[]),[a]=k.useState(()=>CC());return v.jsx(NC.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function vl(e){return"data-floating-ui-"+e}function cr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const jE=vl("safe-polygon");function Rb(e,t,n){if(n&&!mc(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 Cb(e){return typeof e=="function"?e():e}function IC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:d=0,handleClose:p=null,mouseOnly:h=!1,restMs:m=0,move:g=!0}=t,y=bo(),x=go(),S=Wn(p),_=Wn(d),E=Wn(n),R=Wn(m),T=k.useRef(),C=k.useRef(-1),A=k.useRef(),N=k.useRef(-1),I=k.useRef(!0),H=k.useRef(!1),$=k.useRef(()=>{}),L=k.useRef(!1),K=Dn(()=>{var U;const P=(U=s.current.openEvent)==null?void 0:U.type;return P?.includes("mouse")&&P!=="mousedown"});k.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]),k.useEffect(()=>{if(!c||!S.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,S,K]);const Z=k.useCallback(function(U,P,W){P===void 0&&(P=!0),W===void 0&&(W="hover");const D=Rb(_.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(jE),H.current=!1}}),j=Dn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);k.useEffect(()=>{if(!c)return;function U(G){if(cr(C),I.current=!1,h&&!mc(T.current)||Cb(R.current)>0&&!Rb(_.current,"open"))return;const O=Rb(_.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,S.current&&s.current.floatingContext){n||cr(C),A.current=S.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"||!kr(l.floating,G.relatedTarget))&&Z(G)}function W(G){j()||s.current.floatingContext&&(S.current==null||S.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,_,S,s,j,R]),on(()=>{var U;if(c&&n&&(U=S.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(jE,"");const B=l.domReference,G=y==null||(P=y.nodesRef.current.find(O=>O.id===x))==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,x,l,y,S,K]),on(()=>{n||(T.current=void 0,L.current=!1,q(),z())},[n,q,z]),k.useEffect(()=>()=>{q(),cr(C),cr(N),z()},[c,l.domReference,q,z]);const F=k.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&&!mc(T.current)||n||Cb(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,Cb(R.current))))}}},[h,r,n,E,R]);return k.useMemo(()=>c?{reference:F}:{},[c,F])}let PE=0;function qo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(PE);const a=()=>e?.focus({preventScroll:n});s?a():PE=requestAnimationFrame(a)}function Ab(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 I$(e){return"composedPath"in e?e.composedPath()[0]:e.target}function D$(e){return e?.ownerDocument||document}const ul={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function $E(e){return e==="inert"?ul.inert:e==="aria-hidden"?ul["aria-hidden"]:ul.none}let Id=new WeakSet,Dd={},Nb=0;const z$=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,DC=e=>e&&(e.host||DC(e.parentNode)),L$=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=DC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function j$(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=L$(t,e),c=new Set,d=new Set(l),p=[];Dd[s]||(Dd[s]=new WeakMap);const h=Dd[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||d.has(y)||[].forEach.call(y.children,x=>{if(Yn(x)!=="script")if(c.has(x))g(x);else{const S=a?x.getAttribute(a):null,_=S!==null&&S!=="false",E=$E(a),R=(E.get(x)||0)+1,T=(h.get(x)||0)+1;E.set(x,R),h.set(x,T),p.push(x),R===1&&_&&Id.add(x),T===1&&x.setAttribute(s,""),!_&&a&&x.setAttribute(a,a==="inert"?"":"true")}})}return Nb++,()=>{p.forEach(y=>{const x=$E(a),_=(x.get(y)||0)-1,E=(h.get(y)||0)-1;x.set(y,_),h.set(y,E),_||(!Id.has(y)&&a&&y.removeAttribute(a),Id.delete(y)),E||y.removeAttribute(s)}),Nb--,Nb||(ul.inert=new WeakMap,ul["aria-hidden"]=new WeakMap,ul.none=new WeakMap,Id=new WeakSet,Dd={})}}function BE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=D$(e[0]).body;return j$(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const _h={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},Pp=k.forwardRef(function(t,n){const[r,s]=k.useState();on(()=>{l$()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[vl("focus-guard")]:"",style:_h};return v.jsx("span",{...t,...a})}),zC=k.createContext(null),FE=vl("portal");function P$(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Th(),s=LC(),[a,l]=k.useState(null),c=k.useRef(null);return on(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),on(()=>{if(!r||c.current)return;const d=t?document.getElementById(t):null;if(!d)return;const p=document.createElement("div");p.id=r,p.setAttribute(FE,""),d.appendChild(p),c.current=p,l(p)},[t,r]),on(()=>{if(n===null||!r||c.current)return;let d=n||s?.portalNode;d&&!uh(d)&&(d=d.current),d=d||document.body;let p=null;t&&(p=document.createElement("div"),p.id=t,d.appendChild(p));const h=document.createElement("div");h.id=r,h.setAttribute(FE,""),d=p||d,d.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function Uv(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=P$({id:n,root:r}),[l,c]=k.useState(null),d=k.useRef(null),p=k.useRef(null),h=k.useRef(null),m=k.useRef(null),g=l?.modal,y=l?.open,x=!!l&&!l.modal&&l.open&&s&&!!(r||a);return k.useEffect(()=>{if(!a||!s||g)return;function S(_){a&&tc(_)&&(_.type==="focusin"?ME:T$)(a)}return a.addEventListener("focusin",S,!0),a.addEventListener("focusout",S,!0),()=>{a.removeEventListener("focusin",S,!0),a.removeEventListener("focusout",S,!0)}},[a,s,g]),k.useEffect(()=>{a&&(y||ME(a))},[y,a]),v.jsxs(zC.Provider,{value:k.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:d,afterOutsideRef:p,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[x&&a&&v.jsx(Pp,{"data-type":"outside",ref:d,onFocus:S=>{if(tc(S,a)){var _;(_=h.current)==null||_.focus()}else{const E=l?l.domReference:null,R=EC(E);R?.focus()}}}),x&&a&&v.jsx("span",{"aria-owns":a.id,style:_h}),a&&Ri.createPortal(t,a),x&&a&&v.jsx(Pp,{"data-type":"outside",ref:p,onFocus:S=>{if(tc(S,a)){var _;(_=m.current)==null||_.focus()}else{const E=l?l.domReference:null,R=wC(E);R?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const LC=()=>k.useContext(zC);function UE(e){return k.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const $$=20;let so=[];function qv(){so=so.filter(e=>e.isConnected)}function B$(e){qv(),e&&Yn(e)!=="body"&&(so.push(e),so.length>$$&&(so=so.slice(-20)))}function qE(){return qv(),so[so.length-1]}function F$(e){const t=Kc();return bC(e,t)?e:Sh(e,t)[0]||e}function HE(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Kc(),a=o$(e,r).filter(c=>{const d=c.getAttribute("data-tabindex")||"";return bC(c,r)||c.hasAttribute("data-tabindex")&&!d.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 U$=k.forwardRef(function(t,n){return v.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:_h})});function Hv(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:d=!1,modal:p=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:g=!1,getInsideElements:y=()=>[]}=e,{open:x,onOpenChange:S,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=Ny(R)&&N,H=z$(),$=H?a:!0,L=!$||H&&g,K=Wn(s),Z=Wn(l),q=Wn(c),z=bo(),j=LC(),F=k.useRef(null),U=k.useRef(null),P=k.useRef(!1),W=k.useRef(!1),D=k.useRef(-1),B=k.useRef(-1),G=j!=null,O=jp(T),ie=Dn(function(he){return he===void 0&&(he=O),he?Sh(he,Kc()):[]}),te=Dn(he=>{const Te=ie(he);return K.current.map(Re=>R&&Re==="reference"?R:O&&Re==="floating"?O:Te).filter(Boolean).flat()});k.useEffect(()=>{if(r||!p)return;function he(Re){if(Re.key==="Tab"){kr(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?qo(Oe[Oe.length-1]):qo(Oe[1])),K.current[1]==="floating"&&ve===O&&Re.shiftKey&&(or(Re),qo(Oe[0]))}}const Te=pr(O);return Te.addEventListener("keydown",he),()=>{Te.removeEventListener("keydown",he)}},[r,R,O,p,K,I,ie,te]),k.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]),k.useEffect(()=>{if(r||!m)return;function he(){W.current=!0,setTimeout(()=>{W.current=!1})}function Te(ve){const ke=ve.relatedTarget,Me=ve.currentTarget,Ce=ro(ve);queueMicrotask(()=>{const Pe=C(),ge=!(kr(R,ke)||kr(T,ke)||kr(ke,T)||kr(j?.portalNode,ke)||ke!=null&&ke.hasAttribute(vl("focus-guard"))||z&&(Ko(z.nodesRef.current,Pe).find(fe=>{var oe,re;return kr((oe=fe.context)==null?void 0:oe.elements.floating,ke)||kr((re=fe.context)==null?void 0:re.elements.domReference,ke)})||NE(z.nodesRef.current,Pe).find(fe=>{var oe,re,_e;return[(oe=fe.context)==null?void 0:oe.elements.floating,jp((re=fe.context)==null?void 0:re.elements.floating)].includes(ke)||((_e=fe.context)==null?void 0:_e.elements.domReference)===ke})));if(Me===R&&O&&HE(O,K),d&&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||!p)&&ke&&ge&&!W.current&&ke!==qE()&&(P.current=!0,S(!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,p,z,j,S,m,d,ie,I,C,K,E]);const ne=k.useRef(null),le=k.useRef(null),pe=UE([ne,j?.beforeInsideRef]),ye=UE([le,j?.afterInsideRef]);k.useEffect(()=>{var he,Te;if(r||!T)return;const Re=Array.from((j==null||(he=j.portalNode)==null?void 0:he.querySelectorAll("["+vl("portal")+"]"))||[]),ve=(Te=(z?NE(z.nodesRef.current,C()):[]).find(Ce=>{var Pe;return Ny(((Pe=Ce.context)==null?void 0:Pe.elements.domReference)||null)}))==null||(Te=Te.context)==null?void 0:Te.elements.domReference,ke=[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=p||I?BE(ke,!L,L):BE(ke);return()=>{Me()}},[r,R,T,p,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,ke=kr(O,Te);!N&&!ke&&x&&qo(ve,{preventScroll:ve===O})})},[r,x,O,N,te,Z]),on(()=>{if(r||!O)return;const he=pr(O),Te=no(he);B$(Te);function Re(ke){let{reason:Me,event:Ce,nested:Pe}=ke;if(["hover","safe-polygon"].includes(Me)&&Ce.type==="mouseleave"&&(P.current=!0),Me==="outside-press")if(Pe)P.current=!1;else if(kC(Ce)||xC(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,_h),G&&R&&R.insertAdjacentElement("afterend",Oe);function ve(){if(typeof q.current=="boolean"){const ke=R||qE();return ke&&ke.isConnected?ke:Oe}return q.current.current||Oe}return()=>{_.off("openchange",Re);const ke=no(he),Me=kr(T,ke)||z&&Ko(z.nodesRef.current,C(),!1).some(Pe=>{var ge;return kr((ge=Pe.context)==null?void 0:ge.elements.floating,ke)}),Ce=ve();queueMicrotask(()=>{const Pe=F$(Ce);q.current&&!P.current&&It(Pe)&&(!(Pe!==ke&&ke!==he.body)||Me)&&Pe.focus({preventScroll:!0}),Oe.remove()})}},[r,T,O,q,E,_,z,G,R,C]),k.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(qv)}),[r]),on(()=>{if(!r&&j)return j.setFocusManagerState({modal:p,closeOnFocusOut:m,open:x,onOpenChange:S,domReference:R}),()=>{j.setFocusManagerState(null)}},[r,j,p,x,S,m,R]),on(()=>{r||O&&HE(O,K)},[r,O,K]);function Se(he){return r||!h||!p?null:v.jsx(U$,{ref:he==="start"?F:U,onClick:Te=>S(!1,Te.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const ze=!r&&$&&(p?!I:!0)&&(G||p);return v.jsxs(v.Fragment,{children:[ze&&v.jsx(Pp,{"data-type":"inside",ref:pe,onFocus:he=>{if(p){const Re=te();qo(s[0]==="reference"?Re[0]:Re[Re.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(P.current=!1,tc(he,j.portalNode)){const Re=wC(R);Re?.focus()}else{var Te;(Te=j.beforeOutsideRef.current)==null||Te.focus()}}}),!I&&Se("start"),n,Se("end"),ze&&v.jsx(Pp,{"data-type":"inside",ref:ye,onFocus:he=>{if(p)qo(te()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(m&&(P.current=!0),tc(he,j.portalNode)){const Re=EC(R);Re?.focus()}else{var Te;(Te=j.afterOutsideRef.current)==null||Te.focus()}}})]})}function GE(e){return It(e.target)&&e.target.tagName==="BUTTON"}function q$(e){return It(e.target)&&e.target.tagName==="A"}function VE(e){return vC(e)}function jC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:d=!0,ignoreMouse:p=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,g=k.useRef(),y=k.useRef(!1),x=k.useMemo(()=>({onPointerDown(S){g.current=S.pointerType},onMouseDown(S){const _=g.current;S.button===0&&c!=="click"&&(mc(_,!0)&&p||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const _=g.current;if(c==="mousedown"&&g.current){g.current=void 0;return}mc(_,!0)&&p||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){g.current=void 0,!(S.defaultPrevented||!h||GE(S))&&(S.key===" "&&!VE(a)&&(S.preventDefault(),y.current=!0),!q$(S)&&S.key==="Enter"&&r(!(n&&d),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!h||GE(S)||VE(a)||S.key===" "&&y.current&&(y.current=!1,r(!(n&&d),S.nativeEvent,"click"))}}),[s,a,c,p,h,r,n,m,d]);return k.useMemo(()=>l?{reference:x}:{},[l,x])}const H$={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},G$={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},KE=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 PC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:g=!1,bubbles:y,capture:x}=t,S=bo(),_=Dn(typeof d=="function"?d:()=>!1),E=typeof d=="function"?_:d,R=k.useRef(!1),{escapeKey:T,outsidePress:C}=KE(y),{escapeKey:A,outsidePress:N}=KE(x),I=k.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=S?Ko(S.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,m$(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,p==="click"&&U||F||typeof E=="function"&&!E(z))return;const P=ro(z),W="["+vl("inert")+"]",D=pr(s.floating).querySelectorAll(W);let B=yt(P)?P:null;for(;B&&!hi(B);){const te=Fi(B);if(hi(te)||!yt(te))break;B=te}if(D.length&&yt(P)&&!p$(P)&&!kr(P,s.floating)&&Array.from(D).every(te=>!kr(B,te)))return;if(It(P)&&q){const te=hi(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=S&&Ko(S.nodesRef.current,G).some(te=>{var ne;return Tb(z,(ne=te.context)==null?void 0:ne.elements.floating)});if(Tb(z,s.floating)||Tb(z,s.domReference)||O)return;const ie=S?Ko(S.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(p,F)};(j=ro(z))==null||j.addEventListener(p,F)});k.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},Lc()?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(p,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(p,N?K:L,N),W.forEach(D=>{D.removeEventListener("scroll",j)}),window.clearTimeout(z)}},[a,s,c,E,p,n,r,g,l,T,C,H,A,$,L,N,K]),k.useEffect(()=>{a.current.insideReactTree=!1},[a,E,p]);const Z=k.useMemo(()=>({onKeyDown:H,...h&&{[H$[m]]:z=>{r(!1,z.nativeEvent,"reference-press")},...m!=="click"&&{onClick(z){r(!1,z.nativeEvent,"reference-press")}}}}),[H,r,h,m]),q=k.useMemo(()=>({onKeyDown:H,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[G$[p]]:()=>{a.current.insideReactTree=!0}}),[H,p,a]);return k.useMemo(()=>l?{reference:Z,floating:q}:{},[l,Z,q])}function V$(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=Th(),a=k.useRef({}),[l]=k.useState(()=>CC()),c=go()!=null,[d,p]=k.useState(r.reference),h=Dn((y,x,S)=>{a.current.openEvent=y?x:void 0,l.emit("openchange",{open:y,event:x,reason:S,nested:c}),n?.(y,x,S)}),m=k.useMemo(()=>({setPositionReference:p}),[]),g=k.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return k.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:g,events:l,floatingId:s,refs:m}),[t,h,g,l,s,m])}function $C(e){e===void 0&&(e={});const{nodeId:t}=e,n=V$({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=k.useState(null),[c,d]=k.useState(null),h=s?.domReference||a,m=k.useRef(null),g=bo();on(()=>{h&&(m.current=h)},[h]);const y=qR({...e,elements:{...s,...c&&{reference:c}}}),x=k.useCallback(T=>{const C=yt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;d(C),y.refs.setReference(C)},[y.refs]),S=k.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]),_=k.useMemo(()=>({...y.refs,setReference:S,setPositionReference:x,domReference:m}),[y.refs,S,x]),E=k.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),R=k.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)}),k.useMemo(()=>({...y,context:R,refs:_,elements:E}),[y,_,E,R])}function Ob(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[IE]:l,[DE]:c,...d}=e;a=d}return{...n==="floating"&&{tabIndex:-1,[R$]:""},...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(d=>{let[p,h]=d;if(!(s&&[IE,DE].includes(p)))if(p.indexOf("on")===0){if(r.has(p)||r.set(p,[]),typeof h=="function"){var m;(m=r.get(p))==null||m.push(h),l[p]=function(){for(var g,y=arguments.length,x=new Array(y),S=0;S<y;S++)x[S]=arguments[S];return(g=r.get(p))==null?void 0:g.map(_=>_(...x)).find(_=>_!==void 0)}}}else l[p]=h}),l),{})}}function BC(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=k.useCallback(c=>Ob(c,e,"reference"),t),a=k.useCallback(c=>Ob(c,e,"floating"),n),l=k.useCallback(c=>Ob(c,e,"item"),r);return k.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const K$="Escape";function Rh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function zd(e,t){return Rh(t,e===RC||e===Eh,e===Wc||e===Yc)}function Mb(e,t,n){return Rh(t,e===Eh,n?e===Wc:e===Yc)||e==="Enter"||e===" "||e===""}function ZE(e,t,n){return Rh(t,n?e===Wc:e===Yc,e===Eh)}function WE(e,t,n,r){const s=n?e===Yc:e===Wc,a=e===RC;return t==="both"||t==="horizontal"&&r&&r>1?e===K$:Rh(t,s,a)}function FC(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:d=()=>{},enabled:p=!0,selectedIndex:h=null,allowEscape:m=!1,loop:g=!1,nested:y=!1,rtl:x=!1,virtual:S=!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=jp(s.floating),Z=Wn(K),q=go(),z=bo();on(()=>{e.dataRef.current.orientation=C},[e,C]);const j=Dn(()=>{d(P.current===-1?null:P.current)}),F=Ny(s.domReference),U=k.useRef(_),P=k.useRef(h??-1),W=k.useRef(null),D=k.useRef(!0),B=k.useRef(j),G=k.useRef(!!s.floating),O=k.useRef(n),ie=k.useRef(!1),te=k.useRef(!1),ne=Wn(T),le=Wn(n),pe=Wn(I),ye=Wn(h),[Se,ze]=k.useState(),[he,Te]=k.useState(),Re=Dn(()=>{function fe(J){if(S){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 qo(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(()=>{p&&(n&&s.floating?U.current&&h!=null&&(te.current=!0,P.current=h,j()):G.current&&(P.current=-1,B.current()))},[p,n,s.floating,h,j]),on(()=>{if(p&&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||Mb(W.current,C,x)||y?_b(l,ne.current):OE(l,ne.current),W.current=null,j())};oe()}}else ec(l,c)||(P.current=c,Re(),te.current=!1)},[p,n,s.floating,c,ye,y,l,C,x,j,Re,ne]),on(()=>{var fe;if(!p||s.floating||!z||S||!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&&kr(ue.context.elements.floating,_e));re&&!J&&D.current&&re.focus({preventScroll:!0})},[p,s.floating,z,q,S]),on(()=>{if(!p||!z||!S||q)return;function fe(oe){Te(oe.id),H&&(H.current=oe)}return z.events.on("virtualfocus",fe),()=>{z.events.off("virtualfocus",fe)}},[p,z,S,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=k.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(),!S))){var J;(J=Z.current)==null||J.focus({preventScroll:!0})}}}},[le,Z,E,l,j,S]),ke=k.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&&WE(fe.key,C,x,N)){zd(fe.key,ke())||or(fe),r(!1,fe.nativeEvent,"list-navigation"),It(s.domReference)&&(S?z?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const oe=P.current,re=_b(l,T),_e=OE(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=S$(J,N,L),Ie=ue.findIndex(Ye=>Ye!=null&&!mp(l,Ye,T)),Be=ue.reduce((Ye,ot,it)=>ot!=null&&!mp(l,ot,T)?it:Ye,-1),Ze=ue[x$({current:ue.map(Ye=>Ye!=null?l.current[Ye]:null)},{event:fe,orientation:C,loop:g,rtl:x,cols:N,disabledIndices:E$([...(typeof T!="function"?T:null)||l.current.map((Ye,ot)=>mp(l,ot,T)?ot:void 0),void 0],ue),minIndex:Ie,maxIndex:Be,prevIndex:w$(P.current>_e?re:P.current,J,ue,N,fe.key===Eh?"bl":fe.key===(x?Wc:Yc)?"tr":"tl"),stopEvent:!0})];if(Ze!=null&&(P.current=Ze,j()),C==="both")return}if(zd(fe.key,C)){if(or(fe),n&&!S&&no(fe.currentTarget.ownerDocument)===fe.currentTarget){P.current=Mb(fe.key,C,x)?re:_e,j();return}Mb(fe.key,C,x)?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})),ec(l,P.current)&&(P.current=-1),j()}}),Ce=k.useMemo(()=>S&&n&&Oe&&{"aria-activedescendant":he||Se},[S,n,Oe,he,Se]),Pe=k.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...F?{}:Ce,onKeyDown:Me,onPointerMove(){D.current=!0}}),[Ce,Me,C,F]),ge=k.useMemo(()=>{function fe(re){_==="auto"&&kC(re.nativeEvent)&&(U.current=!0)}function oe(re){U.current=_,_==="auto"&&xC(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=ZE(re.key,C,x),Be=WE(re.key,C,x,N),Ze=ZE(re.key,ke(),x),Ye=zd(re.key,C),ot=(y?Ze:Ye)||re.key==="Enter"||re.key.trim()==="";if(S&&n){const st=z?.nodesRef.current.find(We=>We.parentId==null),kt=z&&st?h$(z.nodesRef.current,st.id):null;if(ue&&kt&&H){const We=new KeyboardEvent("keydown",{key:re.key,bubbles:!0});if(Ie||Be){var it,nt;const Ot=((it=kt.context)==null?void 0:it.elements.domReference)===re.currentTarget,Fe=Be&&!Ot?(nt=kt.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)&&kt.context&&kt.context.open&&kt.parentId&&re.currentTarget!==kt.context.elements.domReference){var vt;or(re),(vt=kt.context.elements.domReference)==null||vt.dispatchEvent(We);return}}return Me(re)}if(!(!n&&!R&&_e)){if(ot){const st=zd(re.key,ke());W.current=y&&st?null:re.key}if(y){Ze&&(or(re),n?(P.current=_b(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&&!S&&(P.current=-1,j())},onPointerDown:oe,onPointerEnter:oe,onMouseDown:fe,onClick:fe}},[Se,Ce,N,Me,ne,_,l,y,j,r,n,R,C,ke,x,h,z,S,H]);return k.useMemo(()=>p?{reference:ge,floating:Pe,item:ve}:{},[p,ge,Pe,ve])}const Z$=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function UC(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:d="dialog"}=t,p=Th(),h=((n=a.domReference)==null?void 0:n.id)||p,m=k.useMemo(()=>{var R;return((R=jp(a.floating))==null?void 0:R.id)||l},[a.floating,l]),g=(r=Z$.get(d))!=null?r:d,x=go()!=null,S=k.useMemo(()=>g==="tooltip"||d==="label"?{["aria-"+(d==="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"&&x&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[g,m,x,s,h,d]),_=k.useMemo(()=>{const R={id:m,...g&&{role:g}};return g==="tooltip"||d==="label"?R:{...R,...g==="menu"&&{"aria-labelledby":h}}},[g,m,h,d]),E=k.useCallback(R=>{let{active:T,selected:C}=R;const A={role:"option",...T&&{id:m+"-fui-option"}};switch(d){case"select":case"combobox":return{...A,"aria-selected":C}}return{}},[m,d]);return k.useMemo(()=>c?{reference:S,floating:_,item:E}:{},[c,S,_,E])}const YE=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ka(e,t){return typeof e=="function"?e(t):e}function W$(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function Y$(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,d]=k.useState("unmounted"),p=W$(n,l);return!p&&c==="close"&&d("unmounted"),on(()=>{if(r){if(n){d("initial");const h=requestAnimationFrame(()=>{Ri.flushSync(()=>{d("open")})});return()=>{cancelAnimationFrame(h)}}d("close")}},[n,r]),{isMounted:p,status:c}}function qC(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,d=c.split("-")[0],p=k.useMemo(()=>({side:d,placement:c}),[d,c]),h=typeof l=="number",m=(h?l:l.open)||0,g=(h?l:l.close)||0,[y,x]=k.useState(()=>({...Ka(a,p),...Ka(n,p)})),{isMounted:S,status:_}=Y$(e,{duration:l}),E=Wn(n),R=Wn(r),T=Wn(s),C=Wn(a);return on(()=>{const A=Ka(E.current,p),N=Ka(T.current,p),I=Ka(C.current,p),H=Ka(R.current,p)||Object.keys(A).reduce(($,L)=>($[L]="",$),{});if(_==="initial"&&x($=>({transitionProperty:$.transitionProperty,...I,...A})),_==="open"&&x({transitionProperty:Object.keys(H).map(YE).join(","),transitionDuration:m+"ms",...I,...H}),_==="close"){const $=N||A;x({transitionProperty:Object.keys($).map(YE).join(","),transitionDuration:g+"ms",...I,...$})}},[g,T,E,R,C,m,_,p]),{isMounted:S,styles:y}}function HC(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:d,enabled:p=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:g=[],selectedIndex:y=null}=t,x=k.useRef(-1),S=k.useRef(""),_=k.useRef((n=y??l)!=null?n:-1),E=k.useRef(null),R=Dn(c),T=Dn(d),C=Wn(h),A=Wn(g);on(()=>{r&&(cr(x),E.current=null,S.current="")},[r]),on(()=>{if(r&&S.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(S.current.length>0&&S.current[0]!==" "&&(K(Z,Z,S.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})&&S.current===L.key&&(S.current="",_.current=E.current),S.current+=L.key,cr(x),x.current=window.setTimeout(()=>{S.current="",_.current=E.current,N(!1)},m);const z=_.current,j=K(Z,[...Z.slice((z||0)+1),...Z.slice(0,(z||0)+1)],S.current);j!==-1?(R(j),E.current=j):L.key!==" "&&(S.current="",N(!1))}),H=k.useMemo(()=>({onKeyDown:I}),[I]),$=k.useMemo(()=>({onKeyDown:I,onKeyUp(L){L.key===" "&&N(!1)}}),[I,N]);return k.useMemo(()=>p?{reference:H,floating:$}:{},[p,H,$])}function GC(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,...GC(e,s.id,n)])}function XE(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[d,p]=t[l]||[0,0],[h,m]=t[c]||[0,0];p>=r!=m>=r&&n<=(h-d)*(r-p)/(m-p)+d&&(s=!s)}return s}function X$(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function VC(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,d=typeof performance<"u"?performance.now():0;function p(m,g){const y=performance.now(),x=y-d;if(l===null||c===null||x===0)return l=m,c=g,d=y,null;const S=m-l,_=g-c,R=Math.sqrt(S*S+_*_)/x;return l=m,c=g,d=y,R}const h=m=>{let{x:g,y,placement:x,elements:S,onClose:_,nodeId:E,tree:R}=m;return function(C){function A(){cr(s),_()}if(cr(s),!S.domReference||!S.floating||x==null||g==null||y==null)return;const{clientX:N,clientY:I}=C,H=[N,I],$=I$(C),L=C.type==="mouseleave",K=Ab(S.floating,$),Z=Ab(S.domReference,$),q=S.domReference.getBoundingClientRect(),z=S.floating.getBoundingClientRect(),j=x.split("-")[0],F=g>z.right-z.width/2,U=y>z.bottom-z.height/2,P=X$(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)&&Ab(S.floating,C.relatedTarget)||R&&GC(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(!XE([N,I],te)){if(a&&!P)return A();if(!L&&r){const le=p(C.clientX,C.clientY);if(le!==null&&le<.1)return A()}XE([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,d){var p;Object.defineProperty(c,"_zod",{value:c._zod??{},enumerable:!1}),(p=c._zod).traits??(p.traits=new Set),c._zod.traits.add(e),t(c,d);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=d}const s=n?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:e});function l(c){var d;const p=n?.Parent?new a:this;r(p,c),(d=p._zod).deferred??(d.deferred=[]);for(const h of p._zod.deferred)h();return p}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 cl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class KC extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const ZC={};function Jo(e){return ZC}function Q$(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 Oy(e,t){return typeof t=="bigint"?t.toString():t}function Gv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Vv(e){return e==null}function Kv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const QE=Symbol("evaluating");function pn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==QE)return r===void 0&&(r=QE,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function la(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ua(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function JE(e){return JSON.stringify(e)}const WC="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $p(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const J$=Gv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function gc(e){if($p(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!($p(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function YC(e){return gc(e)?{...e}:Array.isArray(e)?[...e]:e}const e3=new Set(["string","number","symbol"]);function Ch(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 t3(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function n3(e,t){const n=e._zod.def,r=ua(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 la(this,"shape",s),s},checks:[]});return yo(e,r)}function r3(e,t){const n=e._zod.def,r=ua(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 la(this,"shape",s),s},checks:[]});return yo(e,r)}function i3(e,t){if(!gc(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=ua(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return la(this,"shape",a),a},checks:[]});return yo(e,s)}function s3(e,t){if(!gc(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 la(this,"shape",r),r},checks:e._zod.def.checks};return yo(e,n)}function o3(e,t){const n=ua(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return la(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return yo(e,n)}function a3(e,t,n){const r=ua(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 la(this,"shape",a),a},checks:[]});return yo(t,r)}function l3(e,t,n){const r=ua(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 la(this,"shape",a),a},checks:[]});return yo(t,r)}function rl(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 XC(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Ld(e){return typeof e=="string"?e:e?.message}function ea(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=Ld(e.inst?._zod.def?.error?.(e))??Ld(t?.error?.(e))??Ld(n.customError?.(e))??Ld(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Zv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function bc(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const QC=(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,Oy,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},JC=Ne("$ZodError",QC),eA=Ne("$ZodError",QC,{Parent:Error});function u3(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 c3(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,d=0;for(;d<l.path.length;){const p=l.path[d];d===l.path.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(n(l))):c[p]=c[p]||{_errors:[]},c=c[p],d++}}};return s(e),r}const Wv=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 cl;if(l.issues.length){const c=new(s?.Err??e)(l.issues.map(d=>ea(d,a,Jo())));throw WC(c,s?.callee),c}return l.value},Yv=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(d=>ea(d,a,Jo())));throw WC(c,s?.callee),c}return l.value},Ah=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 cl;return a.issues.length?{success:!1,error:new(e??JC)(a.issues.map(l=>ea(l,s,Jo())))}:{success:!0,data:a.value}},f3=Ah(eA),Nh=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=>ea(l,s,Jo())))}:{success:!0,data:a.value}},d3=Nh(eA),p3=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Wv(e)(t,n,s)},h3=e=>(t,n,r)=>Wv(e)(t,n,r),m3=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Yv(e)(t,n,s)},g3=e=>async(t,n,r)=>Yv(e)(t,n,r),b3=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ah(e)(t,n,s)},y3=e=>(t,n,r)=>Ah(e)(t,n,r),v3=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nh(e)(t,n,s)},k3=e=>async(t,n,r)=>Nh(e)(t,n,r),x3=/^[cC][^\s-]{8,}$/,S3=/^[0-9a-z]+$/,w3=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,E3=/^[0-9a-vA-V]{20}$/,T3=/^[A-Za-z0-9]{27}$/,_3=/^[a-zA-Z0-9_-]{21}$/,R3=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,C3=/^([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})$/,e1=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)$/,A3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,N3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function O3(){return new RegExp(N3,"u")}const M3=/^(?:(?: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])$/,I3=/^(([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}|:))$/,D3=/^((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])$/,z3=/^(([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])$/,L3=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tA=/^[A-Za-z0-9_-]*$/,j3=/^(?=.{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])?)*\.?$/,P3=/^\+(?:[0-9]){6,14}[0-9]$/,nA="(?:(?:\\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])))",$3=new RegExp(`^${nA}$`);function rA(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 B3(e){return new RegExp(`^${rA(e)}$`)}function F3(e){const t=rA({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(`^${nA}T(?:${r})$`)}const U3=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},q3=/^(?:true|false)$/i,H3=/^[^A-Z]*$/,G3=/^[^a-z]*$/,qi=Ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),V3=Ne("$ZodCheckMaxLength",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Vv(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=Zv(s);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),K3=Ne("$ZodCheckMinLength",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Vv(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=Zv(s);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Z3=Ne("$ZodCheckLengthEquals",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Vv(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=Zv(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})}}),Oh=Ne("$ZodCheckStringFormat",(e,t)=>{var n,r;qi.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=()=>{})}),W3=Ne("$ZodCheckRegex",(e,t)=>{Oh.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})}}),Y3=Ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=H3),Oh.init(e,t)}),X3=Ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=G3),Oh.init(e,t)}),Q3=Ne("$ZodCheckIncludes",(e,t)=>{qi.init(e,t);const n=Ch(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})}}),J3=Ne("$ZodCheckStartsWith",(e,t)=>{qi.init(e,t);const n=new RegExp(`^${Ch(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})}}),e6=Ne("$ZodCheckEndsWith",(e,t)=>{qi.init(e,t);const n=new RegExp(`.*${Ch(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})}}),t6=Ne("$ZodCheckOverwrite",(e,t)=>{qi.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class n6{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 r6={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=r6;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,d)=>{let p=rl(l),h;for(const m of c){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(p)continue;const g=l.issues.length,y=m._zod.check(l);if(y instanceof Promise&&d?.async===!1)throw new cl;if(h||y instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await y,l.issues.length!==g&&(p||(p=rl(l,g)))});else{if(l.issues.length===g)continue;p||(p=rl(l,g))}}return h?h.then(()=>l):l},a=(l,c,d)=>{if(rl(l))return l.aborted=!0,l;const p=s(c,r,d);if(p instanceof Promise){if(d.async===!1)throw new cl;return p.then(h=>e._zod.parse(h,d))}return e._zod.parse(p,d)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const p=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return p instanceof Promise?p.then(h=>a(h,l,c)):a(p,l,c)}const d=e._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new cl;return d.then(p=>s(p,r,c))}return s(d,r,c)}}e["~standard"]={validate:s=>{try{const a=f3(e,s);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return d3(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}}),Xv=Ne("$ZodString",(e,t)=>{Hn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??U3(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)=>{Oh.init(e,t),Xv.init(e,t)}),i6=Ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=C3),xn.init(e,t)}),s6=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=e1(r))}else t.pattern??(t.pattern=e1());xn.init(e,t)}),o6=Ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=A3),xn.init(e,t)}),a6=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:j3.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})}}}),l6=Ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=O3()),xn.init(e,t)}),u6=Ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=_3),xn.init(e,t)}),c6=Ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=x3),xn.init(e,t)}),f6=Ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=S3),xn.init(e,t)}),d6=Ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=w3),xn.init(e,t)}),p6=Ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=E3),xn.init(e,t)}),h6=Ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=T3),xn.init(e,t)}),m6=Ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=F3(t)),xn.init(e,t)}),g6=Ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$3),xn.init(e,t)}),b6=Ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=B3(t)),xn.init(e,t)}),y6=Ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=R3),xn.init(e,t)}),v6=Ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=M3),xn.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),k6=Ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=I3),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})}}}),x6=Ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=D3),xn.init(e,t)}),S6=Ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=z3),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 iA(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const w6=Ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=L3),xn.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{iA(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function E6(e){if(!tA.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return iA(n)}const T6=Ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tA),xn.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{E6(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_6=Ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=P3),xn.init(e,t)});function R6(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 C6=Ne("$ZodJWT",(e,t)=>{xn.init(e,t),e._zod.check=n=>{R6(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),A6=Ne("$ZodBoolean",(e,t)=>{Hn.init(e,t),e._zod.pattern=q3,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}}),N6=Ne("$ZodUnknown",(e,t)=>{Hn.init(e,t),e._zod.parse=n=>n}),O6=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 t1(e,t,n){e.issues.length&&t.issues.push(...XC(n,e.issues)),t.value[n]=e.value}const M6=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],d=t.element._zod.run({value:c,issues:[]},r);d instanceof Promise?a.push(d.then(p=>t1(p,n,l))):t1(d,n,l)}return a.length?Promise.all(a).then(()=>n):n}});function Bp(e,t,n,r){e.issues.length&&t.issues.push(...XC(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function sA(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=t3(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function oA(e,t,n,r,s,a){const l=[],c=s.keySet,d=s.catchall._zod,p=d.def.type;for(const h of Object.keys(t)){if(c.has(h))continue;if(p==="never"){l.push(h);continue}const m=d.run({value:t[h],issues:[]},r);m instanceof Promise?e.push(m.then(g=>Bp(g,n,h,t))):Bp(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 I6=Ne("$ZodObject",(e,t)=>{if(Hn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...c};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Gv(()=>sA(t));pn(e._zod,"propValues",()=>{const c=t.shape,d={};for(const p in c){const h=c[p]._zod;if(h.values){d[p]??(d[p]=new Set);for(const m of h.values)d[p].add(m)}}return d});const s=$p,a=t.catchall;let l;e._zod.parse=(c,d)=>{l??(l=r.value);const p=c.value;if(!s(p))return c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c;c.value={};const h=[],m=l.shape;for(const g of l.keys){const x=m[g]._zod.run({value:p[g],issues:[]},d);x instanceof Promise?h.push(x.then(S=>Bp(S,c,g,p))):Bp(x,c,g,p)}return a?oA(h,p,c,d,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),D6=Ne("$ZodObjectJIT",(e,t)=>{I6.init(e,t);const n=e._zod.parse,r=Gv(()=>sA(t)),s=g=>{const y=new n6(["shape","payload","ctx"]),x=r.value,S=T=>{const C=JE(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 x.keys)_[T]=`key_${E++}`;y.write("const newResult = {};");for(const T of x.keys){const C=_[T],A=JE(T);y.write(`const ${C} = ${S(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=$p,c=!ZC.jitless,p=c&&J$.value,h=t.catchall;let m;e._zod.parse=(g,y)=>{m??(m=r.value);const x=g.value;return l(x)?c&&p&&y?.async===!1&&y.jitless!==!0?(a||(a=s(t.shape)),g=a(g,y),h?oA([],x,g,y,m,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),g)}});function n1(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=>!rl(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=>ea(l,r,Jo())))}),t)}const z6=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=>Kv(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 d of t.options){const p=d._zod.run({value:s.value,issues:[]},a);if(p instanceof Promise)c.push(p),l=!0;else{if(p.issues.length===0)return p;c.push(p)}}return l?Promise.all(c).then(d=>n1(d,s,e,a)):n1(c,s,e,a)}}),L6=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(([d,p])=>r1(n,d,p)):r1(n,a,l)}});function My(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(gc(e)&&gc(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=My(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=My(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 r1(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),rl(e))return e;const r=My(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 j6=Ne("$ZodEnum",(e,t)=>{Hn.init(e,t);const n=Q$(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>e3.has(typeof s)).map(s=>typeof s=="string"?Ch(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}}),P6=Ne("$ZodTransform",(e,t)=>{Hn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new KC(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 cl;return n.value=s,n}});function i1(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const $6=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(`^(${Kv(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=>i1(a,n.value)):i1(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),B6=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(`^(${Kv(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)}),F6=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=>s1(a,t)):s1(s,t)}});function s1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const U6=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))}),q6=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=>o1(a,e)):o1(s,e)}});function o1(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 H6=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=>ea(l,r,Jo()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(a=>ea(a,r,Jo()))},input:n.value}),n.issues=[]),n)}}),G6=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=>jd(l,t.in,r)):jd(a,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(a=>jd(a,t.out,r)):jd(s,t.out,r)}});function jd(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const V6=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(a1):a1(s)}});function a1(e){return e.value=Object.freeze(e.value),e}const K6=Ne("$ZodCustom",(e,t)=>{qi.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=>l1(a,n,r,e));l1(s,n,r,e)}});function l1(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(bc(s))}}class Z6{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 W6(){return new Z6}const Pd=W6();function Y6(e,t){return new e({type:"string",...wt(t)})}function X6(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...wt(t)})}function u1(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...wt(t)})}function Q6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...wt(t)})}function J6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...wt(t)})}function eB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...wt(t)})}function tB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...wt(t)})}function nB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...wt(t)})}function rB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...wt(t)})}function iB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...wt(t)})}function sB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...wt(t)})}function oB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...wt(t)})}function aB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...wt(t)})}function lB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...wt(t)})}function uB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...wt(t)})}function cB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...wt(t)})}function fB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...wt(t)})}function dB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...wt(t)})}function pB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...wt(t)})}function hB(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...wt(t)})}function mB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...wt(t)})}function gB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...wt(t)})}function bB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...wt(t)})}function yB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...wt(t)})}function vB(e,t){return new e({type:"string",format:"date",check:"string_format",...wt(t)})}function kB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...wt(t)})}function xB(e,t){return new e({type:"string",format:"duration",check:"string_format",...wt(t)})}function SB(e,t){return new e({type:"boolean",...wt(t)})}function wB(e){return new e({type:"unknown"})}function EB(e,t){return new e({type:"never",...wt(t)})}function aA(e,t){return new V3({check:"max_length",...wt(t),maximum:e})}function Fp(e,t){return new K3({check:"min_length",...wt(t),minimum:e})}function lA(e,t){return new Z3({check:"length_equals",...wt(t),length:e})}function TB(e,t){return new W3({check:"string_format",format:"regex",...wt(t),pattern:e})}function _B(e){return new Y3({check:"string_format",format:"lowercase",...wt(e)})}function RB(e){return new X3({check:"string_format",format:"uppercase",...wt(e)})}function CB(e,t){return new Q3({check:"string_format",format:"includes",...wt(t),includes:e})}function AB(e,t){return new J3({check:"string_format",format:"starts_with",...wt(t),prefix:e})}function NB(e,t){return new e6({check:"string_format",format:"ends_with",...wt(t),suffix:e})}function Xc(e){return new t6({check:"overwrite",tx:e})}function OB(e){return Xc(t=>t.normalize(e))}function MB(){return Xc(e=>e.trim())}function IB(){return Xc(e=>e.toLowerCase())}function DB(){return Xc(e=>e.toUpperCase())}function zB(e,t,n){return new e({type:"array",element:t,...wt(n)})}function LB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...wt(n)})}function jB(e){const t=PB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(bc(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(bc(s))}},e(n.value,n)));return t}function PB(e,t){const n=new qi({check:"custom",...wt(t)});return n._zod.check=e,n}const $B=Ne("ZodISODateTime",(e,t)=>{m6.init(e,t),Tn.init(e,t)});function BB(e){return yB($B,e)}const FB=Ne("ZodISODate",(e,t)=>{g6.init(e,t),Tn.init(e,t)});function UB(e){return vB(FB,e)}const qB=Ne("ZodISOTime",(e,t)=>{b6.init(e,t),Tn.init(e,t)});function HB(e){return kB(qB,e)}const GB=Ne("ZodISODuration",(e,t)=>{y6.init(e,t),Tn.init(e,t)});function VB(e){return xB(GB,e)}const KB=(e,t)=>{JC.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>c3(e,n)},flatten:{value:n=>u3(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Oy,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Oy,2)}},isEmpty:{get(){return e.issues.length===0}}})},gi=Ne("ZodError",KB,{Parent:Error}),ZB=Wv(gi),WB=Yv(gi),YB=Ah(gi),XB=Nh(gi),QB=p3(gi),JB=h3(gi),e4=m3(gi),t4=g3(gi),n4=b3(gi),r4=y3(gi),i4=v3(gi),s4=k3(gi),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(ua(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)=>ZB(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>YB(e,n,r),e.parseAsync=async(n,r)=>WB(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>XB(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>QB(e,n,r),e.decode=(n,r)=>JB(e,n,r),e.encodeAsync=async(n,r)=>e4(e,n,r),e.decodeAsync=async(n,r)=>t4(e,n,r),e.safeEncode=(n,r)=>n4(e,n,r),e.safeDecode=(n,r)=>r4(e,n,r),e.safeEncodeAsync=async(n,r)=>i4(e,n,r),e.safeDecodeAsync=async(n,r)=>s4(e,n,r),e.refine=(n,r)=>e.check(Y4(n,r)),e.superRefine=n=>e.check(X4(n)),e.overwrite=n=>e.check(Xc(n)),e.optional=()=>d1(e),e.nullable=()=>p1(e),e.nullish=()=>d1(p1(e)),e.nonoptional=n=>q4(e,n),e.array=()=>N4(e),e.or=n=>I4([e,n]),e.and=n=>z4(e,n),e.transform=n=>h1(e,j4(n)),e.default=n=>B4(e,n),e.prefault=n=>U4(e,n),e.catch=n=>G4(e,n),e.pipe=n=>h1(e,n),e.readonly=()=>Z4(e),e.describe=n=>{const r=e.clone();return Pd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Pd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Pd.get(e);const r=e.clone();return Pd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),uA=Ne("_ZodString",(e,t)=>{Xv.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(TB(...r)),e.includes=(...r)=>e.check(CB(...r)),e.startsWith=(...r)=>e.check(AB(...r)),e.endsWith=(...r)=>e.check(NB(...r)),e.min=(...r)=>e.check(Fp(...r)),e.max=(...r)=>e.check(aA(...r)),e.length=(...r)=>e.check(lA(...r)),e.nonempty=(...r)=>e.check(Fp(1,...r)),e.lowercase=r=>e.check(_B(r)),e.uppercase=r=>e.check(RB(r)),e.trim=()=>e.check(MB()),e.normalize=(...r)=>e.check(OB(...r)),e.toLowerCase=()=>e.check(IB()),e.toUpperCase=()=>e.check(DB())}),o4=Ne("ZodString",(e,t)=>{Xv.init(e,t),uA.init(e,t),e.email=n=>e.check(X6(a4,n)),e.url=n=>e.check(nB(l4,n)),e.jwt=n=>e.check(bB(w4,n)),e.emoji=n=>e.check(rB(u4,n)),e.guid=n=>e.check(u1(c1,n)),e.uuid=n=>e.check(Q6($d,n)),e.uuidv4=n=>e.check(J6($d,n)),e.uuidv6=n=>e.check(eB($d,n)),e.uuidv7=n=>e.check(tB($d,n)),e.nanoid=n=>e.check(iB(c4,n)),e.guid=n=>e.check(u1(c1,n)),e.cuid=n=>e.check(sB(f4,n)),e.cuid2=n=>e.check(oB(d4,n)),e.ulid=n=>e.check(aB(p4,n)),e.base64=n=>e.check(hB(k4,n)),e.base64url=n=>e.check(mB(x4,n)),e.xid=n=>e.check(lB(h4,n)),e.ksuid=n=>e.check(uB(m4,n)),e.ipv4=n=>e.check(cB(g4,n)),e.ipv6=n=>e.check(fB(b4,n)),e.cidrv4=n=>e.check(dB(y4,n)),e.cidrv6=n=>e.check(pB(v4,n)),e.e164=n=>e.check(gB(S4,n)),e.datetime=n=>e.check(BB(n)),e.date=n=>e.check(UB(n)),e.time=n=>e.check(HB(n)),e.duration=n=>e.check(VB(n))});function cA(e){return Y6(o4,e)}const Tn=Ne("ZodStringFormat",(e,t)=>{xn.init(e,t),uA.init(e,t)}),a4=Ne("ZodEmail",(e,t)=>{o6.init(e,t),Tn.init(e,t)}),c1=Ne("ZodGUID",(e,t)=>{i6.init(e,t),Tn.init(e,t)}),$d=Ne("ZodUUID",(e,t)=>{s6.init(e,t),Tn.init(e,t)}),l4=Ne("ZodURL",(e,t)=>{a6.init(e,t),Tn.init(e,t)}),u4=Ne("ZodEmoji",(e,t)=>{l6.init(e,t),Tn.init(e,t)}),c4=Ne("ZodNanoID",(e,t)=>{u6.init(e,t),Tn.init(e,t)}),f4=Ne("ZodCUID",(e,t)=>{c6.init(e,t),Tn.init(e,t)}),d4=Ne("ZodCUID2",(e,t)=>{f6.init(e,t),Tn.init(e,t)}),p4=Ne("ZodULID",(e,t)=>{d6.init(e,t),Tn.init(e,t)}),h4=Ne("ZodXID",(e,t)=>{p6.init(e,t),Tn.init(e,t)}),m4=Ne("ZodKSUID",(e,t)=>{h6.init(e,t),Tn.init(e,t)}),g4=Ne("ZodIPv4",(e,t)=>{v6.init(e,t),Tn.init(e,t)}),b4=Ne("ZodIPv6",(e,t)=>{k6.init(e,t),Tn.init(e,t)}),y4=Ne("ZodCIDRv4",(e,t)=>{x6.init(e,t),Tn.init(e,t)}),v4=Ne("ZodCIDRv6",(e,t)=>{S6.init(e,t),Tn.init(e,t)}),k4=Ne("ZodBase64",(e,t)=>{w6.init(e,t),Tn.init(e,t)}),x4=Ne("ZodBase64URL",(e,t)=>{T6.init(e,t),Tn.init(e,t)}),S4=Ne("ZodE164",(e,t)=>{_6.init(e,t),Tn.init(e,t)}),w4=Ne("ZodJWT",(e,t)=>{C6.init(e,t),Tn.init(e,t)}),E4=Ne("ZodBoolean",(e,t)=>{A6.init(e,t),Vn.init(e,t)});function T4(e){return SB(E4,e)}const _4=Ne("ZodUnknown",(e,t)=>{N6.init(e,t),Vn.init(e,t)});function f1(){return wB(_4)}const R4=Ne("ZodNever",(e,t)=>{O6.init(e,t),Vn.init(e,t)});function C4(e){return EB(R4,e)}const A4=Ne("ZodArray",(e,t)=>{M6.init(e,t),Vn.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(Fp(n,r)),e.nonempty=n=>e.check(Fp(1,n)),e.max=(n,r)=>e.check(aA(n,r)),e.length=(n,r)=>e.check(lA(n,r)),e.unwrap=()=>e.element});function N4(e,t){return zB(A4,e,t)}const O4=Ne("ZodObject",(e,t)=>{D6.init(e,t),Vn.init(e,t),pn(e,"shape",()=>t.shape),e.keyof=()=>fA(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:f1()}),e.loose=()=>e.clone({...e._zod.def,catchall:f1()}),e.strict=()=>e.clone({...e._zod.def,catchall:C4()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>i3(e,n),e.safeExtend=n=>s3(e,n),e.merge=n=>o3(e,n),e.pick=n=>n3(e,n),e.omit=n=>r3(e,n),e.partial=(...n)=>a3(dA,e,n[0]),e.required=(...n)=>l3(pA,e,n[0])});function Qv(e,t){const n={type:"object",shape:e??{},...wt(t)};return new O4(n)}const M4=Ne("ZodUnion",(e,t)=>{z6.init(e,t),Vn.init(e,t),e.options=t.options});function I4(e,t){return new M4({type:"union",options:e,...wt(t)})}const D4=Ne("ZodIntersection",(e,t)=>{L6.init(e,t),Vn.init(e,t)});function z4(e,t){return new D4({type:"intersection",left:e,right:t})}const Iy=Ne("ZodEnum",(e,t)=>{j6.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 Iy({...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 Iy({...t,checks:[],...wt(s),entries:a})}});function fA(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Iy({type:"enum",entries:n,...wt(t)})}const L4=Ne("ZodTransform",(e,t)=>{P6.init(e,t),Vn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new KC(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(bc(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(bc(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(a=>(n.value=a,n)):(n.value=s,n)}});function j4(e){return new L4({type:"transform",transform:e})}const dA=Ne("ZodOptional",(e,t)=>{$6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function d1(e){return new dA({type:"optional",innerType:e})}const P4=Ne("ZodNullable",(e,t)=>{B6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function p1(e){return new P4({type:"nullable",innerType:e})}const $4=Ne("ZodDefault",(e,t)=>{F6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function B4(e,t){return new $4({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():YC(t)}})}const F4=Ne("ZodPrefault",(e,t)=>{U6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function U4(e,t){return new F4({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():YC(t)}})}const pA=Ne("ZodNonOptional",(e,t)=>{q6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function q4(e,t){return new pA({type:"nonoptional",innerType:e,...wt(t)})}const H4=Ne("ZodCatch",(e,t)=>{H6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function G4(e,t){return new H4({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const V4=Ne("ZodPipe",(e,t)=>{G6.init(e,t),Vn.init(e,t),e.in=t.in,e.out=t.out});function h1(e,t){return new V4({type:"pipe",in:e,out:t})}const K4=Ne("ZodReadonly",(e,t)=>{V6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Z4(e){return new K4({type:"readonly",innerType:e})}const W4=Ne("ZodCustom",(e,t)=>{K6.init(e,t),Vn.init(e,t)});function Y4(e,t={}){return LB(W4,e,t)}function X4(e){return jB(e)}function hA(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 gs=class gs{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return gs.instance||(gs.instance=new gs),gs.instance}static subscribe(t){return gs.getInstance().subscribeToChanges(t)}static isDragActive(){return gs.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}};gs.instance=null;let pi=gs;function Ib(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 Q4(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 J4(e){const{accept:t,disabled:n=!1,acceptNativeTypes:r,onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c}=e,d=k.useRef(null),p=k.useRef(null),h=k.useRef(0),m=k.useRef(null),[g,y]=k.useState(!1),[x,S]=k.useState(!1),_=k.useRef(g);_.current=g;const E=k.useCallback(()=>{h.current=0,y(!1),S(!1)},[]),R=k.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)},[]);k.useEffect(()=>{if(!g)return;const I=p.current?.ownerDocument??document,H=()=>{R(),E()};return I.addEventListener("mousemove",H,!0),()=>{I.removeEventListener("mousemove",H,!0)}},[g,R,E]);const T=k.useRef({onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c});T.current={onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c};const C=k.useRef(r);C.current=r;const A=k.useMemo(()=>Array.isArray(t)?t:[t],[t]),N=k.useCallback(I=>{if(p.current=I,d.current&&(d.current(),d.current=null),h.current=0,I!==null&&(y(!1),S(!1)),!I||n)return;const H=pi.getInstance(),$=P=>{if(h.current++,h.current===1){y(!0);const W=!n&&H.hasAnyClass(A),D=W||!n&&Ib(P,C.current);S(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&&Ib(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),S(!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(Ib(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=>{Q4(P,q)&&z()};q.addEventListener("drop",j,!0),q.addEventListener("dragend",F,!0),q.addEventListener("dragleave",U,!0),d.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 k.useEffect(()=>()=>{d.current&&(d.current(),d.current=null)},[]),{ref:N,isOver:g,canDrop:x,isDropBlocked:g&&!x}}function eF(){const e=k.useRef(void 0),t=k.useCallback(()=>{const r=e.current;r!==void 0&&(e.current=void 0,cancelAnimationFrame(r))},[]),n=k.useCallback(r=>{t(),e.current=requestAnimationFrame(s=>{e.current=void 0,r(s)})},[t]);return k.useEffect(()=>t,[t]),k.useMemo(()=>({dispose:t,request:n}),[t,n])}function Dy({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 tF="hover",nF=4,rF=20;class iF{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),d=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===d?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=d,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(rF,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 sl=class sl{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 iF,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 d=(this.horizontal?c.clientX:c.clientY)-n,p=this.state.getScrollPositionFromThumbDelta(d,r);this.horizontal?this.viewport.scrollLeft=p:this.viewport.scrollTop=p},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=Dy({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},sl.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Dy({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(sl.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};sl.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",sl.WHEEL_GESTURE_RESET_MS=150;let Up=sl;const sF={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}},Zu={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 oF(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 aF(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}const Db={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}},Lu={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}},zb={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 lF(){return sF.base}function uF({direction:e,masked:t}){return[Zu.base,e==="horizontal"?Zu.horizontal:null,e==="both"?Zu.both:null,t?Zu.maskGeometry:null]}function cF(e){return[Db.base,e==="horizontal"?Db.horizontal:null,e==="both"?Db.both:null]}function m1({direction:e,orientation:t,visibility:n}){return[Lu.base,t==="horizontal"?Lu.horizontal:null,e==="both"&&t==="vertical"?Lu.bothVertical:null,e==="both"&&t==="horizontal"?Lu.bothHorizontal:null,n==="never"?Lu.visibilityNever:null]}function g1(e,t){return[zb.base,e==="horizontal"?zb.horizontal:null,t?zb.hoverHidden:null]}const fF=1e4,Bd=5,mA=k.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:d,contentStyle:p,overlay:h,style:m,scrollbarVisibility:g=tF,isScrollbarRevealed:y=!1,direction:x="vertical",topFadeSize:S,bottomFadeSize:_,topFadeStartOpacity:E=0,bottomFadeStartOpacity:R=0,autoScrollToBottom:T=!1,scrollTrigger:C,autoScrollPauseTimeout:A=fF,onScrollStateChange:N,mapVerticalWheelToHorizontal:I=!1,scrollPadding:H=nF,scrollbarInset:$,onPointerEnter:L,onPointerLeave:K,...Z},q){const z=k.useRef(null),j=k.useRef(null),F=k.useRef(null),U=k.useRef(null),P=k.useRef(null),W=k.useRef(null),D=k.useRef(null),B=x!=="horizontal",G=x!=="vertical",O=I&&!B,[ie,te]=k.useState(!1),[ne,le]=k.useState(!1),[pe,ye]=k.useState(!1),Se=k.useRef(!1);Se.current=pe;const ze=k.useRef(0),he=k.useRef(0),Te=k.useRef(null),Re=k.useRef(null);k.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 Up({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 Up({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=k.useCallback(()=>{const Fe=j.current;return Fe?{scrollTop:Fe.scrollTop,scrollHeight:Fe.scrollHeight,clientHeight:Fe.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),ve=k.useCallback((Fe=!1)=>{const Ke=j.current;Ke&&Ke.scrollTo({top:Ke.scrollHeight,behavior:Fe?"smooth":"instant"})},[]),ke=k.useCallback((Fe=!1)=>{const Ke=j.current;Ke&&Ke.scrollTo({top:0,behavior:Fe?"smooth":"instant"})},[]),Me=k.useCallback(()=>{Re.current===null&&(Re.current=requestAnimationFrame(()=>{Re.current=null,!Se.current&&ve(!1)}))},[ve]),Ce=k.useCallback(()=>{T&&(Se.current||Me())},[T,Me]);k.useImperativeHandle(q,()=>({scrollToBottom:ve,scrollToTop:ke,requestAutoScroll:Ce,getScrollPosition:Oe,get rootElement(){return z.current},get viewportElement(){return j.current}}),[ve,ke,Ce,Oe]);const Pe=k.useCallback(()=>{const Fe=j.current;if(!Fe)return;const{scrollTop:Ke,scrollHeight:ht,clientHeight:Xe}=Fe,{isAtTop:Y,isAtBottom:X}=aF({scrollTop:Ke,scrollHeight:ht,clientHeight:Xe,threshold:Bd});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-Bd,Ge=ht>he.current+Bd,ut=Ke<ze.current-Bd;ut&&!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&&!ut&&Me(),we&&T&&!Se.current&&!X&&Me(),ze.current=Ke,he.current=ht},[N,T,A,Me]),ge=eF(),fe=k.useCallback(()=>{ge.request(Pe)},[ge,Pe]);k.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]),k.useEffect(()=>{C!==void 0&&T&&(Se.current||Me())},[C,T,Me]),k.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]),k.useEffect(()=>{if(!G)return;const Fe=j.current;if(!Fe)return;const Ke=Xe=>{const Y=Dy({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=S!==void 0||_!==void 0,re=S??24,_e=_??24,J=g==="hover",[ue,Ie]=k.useState(!1);k.useLayoutEffect(()=>{J&&Ie(z.current?.matches(":hover")??!1)},[J]);const Be=k.useCallback(Fe=>{Ie(!0),L?.(Fe)},[L]),Ze=k.useCallback(Fe=>{Ie(!1),K?.(Fe)},[K]),Ye=J&&!ue&&!y;k.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=En({rootClass:"ui-scroll-area",stylexStyles:[lF(),c],className:wn(oe&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...ot,...m}}),nt=En({rootClass:"ui-scroll-area__viewport",stylexStyles:[uF({direction:x,masked:oe}),d,oe?Zu.mask(oF(ie?`${re}px`:"0px",ne?`${_e}px`:"0px",E,R)):null],className:l}),vt=En({rootClass:"ui-scroll-area__content",stylexStyles:[cF(x),p]}),st=En({rootClass:"ui-scroll-area__scrollbar",stylexStyles:m1({direction:x,orientation:"vertical",visibility:g})}),kt=Nn(g1("vertical",Ye)),We=En({rootClass:"ui-scroll-area__scrollbar",stylexStyles:m1({direction:x,orientation:"horizontal",visibility:g})}),Ot=Nn(g1("horizontal",Ye));return v.jsxs("div",{ref:z,className:it.className,style:it.style,"data-scroll-padding":H,"data-visibility":g,"data-direction":x,...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:kt.className,style:kt.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"})})]})}),qp=k.createContext(!1);function gA({children:e,dismiss:t}){const n=k.use(qp);return v.jsx(qp.Provider,{value:n||t,children:e})}function zy(e,t,n){const[r,s]=k.useState(t),a=e!==void 0?e:r,l=k.useCallback(c=>{const d=typeof c=="function"?c(a):c;e===void 0&&s(d),n?.(d)},[e,a,n]);return[a,l]}const Lb={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"}},dF={1:1,2:2},Ly={instant:50,fast:100,normal:150,slow:200,slower:300},bA={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)"},pF={"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},hF={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,full:9999},mF={xs:20,sm:24,base:28,lg:32},gF={xs:11,sm:12,base:13,lg:14},bF={xs:14,sm:16,base:18,lg:20},yF={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},vF=.98,kF=2,b1={open:Ly.fast,close:Ly.fast},xF=bA.outQuint;function yA(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 SF(e){const{side:t,alignment:n}=yA(e);switch(t){case"top":return`${y1(n)} bottom`;case"right":return`left ${v1(n)}`;case"bottom":return`${y1(n)} top`;case"left":return`right ${v1(n)}`}}function wF(e,t={}){const{side:n}=yA(e),r=t.offset??kF,s=t.scale??vF;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 EF(e,t){return{opacity:0,transform:wF(e,t)}}function TF(e){return{transformOrigin:SF(e),transitionTimingFunction:xF}}function _F({closeDuration:e=b1.close,transform:t}={}){return{duration:{open:b1.open,close:e},initial:({placement:n})=>EF(n,t),common:({placement:n})=>TF(n)}}function y1(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function v1(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}function RF(){const e=k.useRef(!0),t=k.useRef(void 0),n=k.useCallback(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),r=k.useCallback((s,a)=>{e.current&&(n(),t.current=setTimeout(()=>{t.current=void 0,s()},a))},[n]);return k.useEffect(()=>(e.current=!0,()=>{e.current=!1,n()}),[n]),k.useMemo(()=>({cancel:n,schedule:r}),[n,r])}const CF=300,vA=k.createContext(null);function kA({children:e}){const[t,n]=k.useState(null),r=RF(),s=k.useCallback(c=>{r.cancel(),n(c)},[r]),a=k.useCallback(c=>{r.schedule(()=>{n(d=>d===c?null:d)},CF)},[r]),l=k.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return v.jsx(vA.Provider,{value:l,children:e})}function AF(e,t){const n=k.useContext(vA),r=n?.markOpen,s=n?.markClosed;return k.useEffect(()=>{if(!(!t||e==null||r==null||s==null))return r(e),()=>s(e)},[t,e,r,s]),{activeId:n?.activeId??null}}const Ml="data-ui-menu-item-region",xA=k.createContext("body");function nc({value:e,children:t}){return v.jsx(xA.Provider,{value:e,children:t})}function Qc(){return k.useContext(xA)}const NF='[role="menuitem"]',k1=["pointermove","mousemove"];function SA(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 OF(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function MF(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(Ml)===t)return r;return null}function wA(e,t,n){queueMicrotask(()=>{const r=MF(e,t);n(r??null)})}function EA(e,t){if(!(e instanceof Element))return null;const n=e.closest(NF);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function IF(e,t){if(!e)return()=>{};for(const n of k1)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of k1)e.removeEventListener(n,t)}}function x1({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=OF(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 TA(){const[e,t]=k.useState(!0),n=k.useCallback(()=>{t(!1)},[]),r=k.useCallback(()=>{t(!0)},[]),s=k.useCallback(()=>{t(!0)},[]);return{focusItemOnHoverEnabled:e,markKeyboardNavigation:n,markPointerNavigation:r,resetFocusItemOnHover:s}}const DF=50;function zF(e,t){k.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 LF(){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 Mh(e=200){const t=k.useRef(0);return k.useEffect(()=>{const n=()=>{t.current=Date.now()+e};return window.addEventListener("focus",n),()=>{window.removeEventListener("focus",n)}},[e]),k.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 jF={open:0,close:0},PF={opacity:1,transform:"none"},Jv=k.createContext(null);function Ci(){const e=k.useContext(Jv);if(!e)throw new Error("Menu components must be used within <Menu>");return e}function $F({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:d=!0,closeOnSelect:p,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:g=!0,focusItemOnOpen:y=!1,virtualFocus:x=!1,shouldKeepOpenDuringDrag:S=!1,lockPositionWhileOpen:_=!1,enableClick:E=!0,strategy:R}){const T=OC(),[C,A]=zy(t,n,r),[N,I]=k.useState(""),H=k.useRef(null),[$,L]=k.useState(!1),[K,Z]=k.useState(!1),[q,z]=zy(s,null,a),{focusItemOnHoverEnabled:j,markKeyboardNavigation:F,markPointerNavigation:U,resetFocusItemOnHover:P}=TA(),W=k.useRef([]),D=k.useRef([]),B=k.useRef(null),G=k.useCallback(_e=>{A(_e),_e?(I(""),B.current=null):z(null),P()},[P,A,z]),O=k.useRef(!1);k.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}=$C({nodeId:T,open:C,onOpenChange:G,placement:l,strategy:R,middleware:[Mv(c),...d?[Dv()]:[],Iv(),zv({padding:8,apply({availableHeight:_e,elements:J}){J.floating.style.setProperty("--ui-menu-available-height",`${Math.max(0,Math.floor(_e))}px`)}}),LF()],whileElementsMounted:_?void 0:Ap,transform:!1}),ye=IC(le,{enabled:K,delay:{open:75},handleClose:VC({blockPointerEvents:!0,requireIntent:!1})}),Se=jC(le,{enabled:E&&!K}),ze=Mh(),he=k.useCallback(_e=>S&&pi.getInstance().hasData()?!1:ze(_e),[S,ze]),Te=PC(le,{outsidePressEvent:"click",outsidePress:he}),Re=UC(le,{role:"menu"}),Oe=FC(le,{listRef:W,activeIndex:q,onNavigate:z,loop:!1,virtual:x||$,focusItemOnOpen:y,focusItemOnHover:j}),ve=HC(le,{listRef:D,activeIndex:q,onMatch:$?void 0:z,enabled:!$}),{getReferenceProps:ke,getFloatingProps:Me,getItemProps:Ce}=BC([ye,Se,Te,Re,Oe,ve]),Pe=k.useCallback(_e=>({...ke(_e),ref:ie.setReference,"aria-haspopup":"menu","aria-expanded":C}),[ke,ie.setReference,C]),ge=m?{duration:jF,initial:PF}:_F(h?{closeDuration:0}:void 0),{isMounted:fe,styles:oe}=qC(le,ge),re=k.useMemo(()=>({isOpen:C,isMounted:fe,setIsOpen:A,activeIndex:q,setActiveIndex:z,markKeyboardNavigation:F,markPointerNavigation:U,virtualFocus:x,searchValue:N,setSearchValue:I,hasSearchInput:$,setHasSearchInput:L,enableHover:K,setHasHoverTrigger:Z,closeOnSelect:p,returnFocusOnSelect:g,nodeId:T,listRef:W,labelsRef:D,searchInputRef:H,refs:ie,floatingStyles:te,middlewareData:ne,transitionStyles:oe,context:le,updateFloating:pe,getReferenceProps:ke,getFloatingProps:Me,getItemProps:Ce,getTriggerProps:Pe,dismissCauseRef:B,shouldAllowPointerInteraction:he}),[C,fe,A,q,z,F,U,x,N,$,K,p,g,T,ie,te,ne,oe,le,pe,ke,Me,Ce,Pe,he]);return v.jsx(MC,{id:T,children:v.jsx(Jv.Provider,{value:re,children:v.jsx(kA,{children:e})})})}const _A=k.createContext(null);function Jc(){const e=k.useContext(_A);if(!e)throw new Error("MenuItem must be used within Menu.Content or Menu.SubContent");return e}function RA({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1}){const c=k.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l}),[t,n,r,s,a,l]);return v.jsx(_A.Provider,{value:c,children:e})}const CA=k.createContext(void 0);function Ih(e){const t=k.useContext(CA);if(t===void 0&&!e)throw new Error(Xn(72));return t}const BF={...aj,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 Dh extends KR{constructor(t){super({...FF(),...t},{popupRef:k.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Pv},BF)}setOpen=(t,n)=>{const r=n.reason,s=r===ui,a=t&&r===fp,l=!t&&(r===hl||r===wv);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);const c=()=>{const d={open:t,openChangeReason:r};a?d.instantType="focus":l?d.instantType="dismiss":r===ui&&(d.instantType=void 0);const p=n.trigger?.id??null;(p||t)&&(d.activeTriggerId=p,d.activeTriggerElement=n.trigger??null),this.update(d)};s?Ri.flushSync(c):c()};static useStore(t,n){const r=wr(()=>new Dh(n)).current,s=t??r,a=uj({popupStore:s,onOpenChange:s.setOpen});return s.state.floatingRootContext=a,s}}function FF(){return{...oj(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const AA=GR(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:d,onOpenChangeComplete:p,handle:h,triggerId:m,defaultTriggerId:g=null,children:y}=t,x=Dh.useStore(h?.store,{open:r,openProp:s,activeTriggerId:g,triggerIdProp:m});nC(()=>{s===void 0&&x.state.open===!1&&r===!0&&x.update({open:!0,activeTriggerId:g})}),x.useControlledProp("openProp",s),x.useControlledProp("triggerIdProp",m),x.useContextCallback("onOpenChange",d),x.useContextCallback("onOpenChangeComplete",p);const S=x.useState("open"),_=!n&&S,E=x.useState("activeTriggerId"),R=x.useState("payload");x.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),He(()=>{S&&n&&x.setOpen(!1,_t(uL))},[S,n,x]),x.useSyncedValue("disabled",n),rj(x);const{forceUnmount:T,transitionStatus:C}=ij(_,x),A=x.select("floatingRootContext"),N=x.useState("isInstantPhase"),I=x.useState("instantType"),H=x.useState("lastOpenChangeReason"),$=k.useRef(null);He(()=>{C==="ending"&&H===Ss||C!=="ending"&&N?(I!=="delay"&&($.current=I),x.set("instantType","delay")):$.current!==null&&(x.set("instantType",$.current),$.current=null)},[C,N,H,I,x]),He(()=>{_&&E==null&&x.set("payload",void 0)},[x,E,_]);const L=k.useCallback(()=>{x.setOpen(!1,UF(x,my))},[x]);k.useImperativeHandle(c,()=>({unmount:T,close:L}),[T,L]);const K=IR(A,{enabled:!n,referencePress:()=>x.select("closeOnClick")}),Z=t2(A,{enabled:!n&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:q,getFloatingProps:z,getTriggerProps:j}=QR([K,Z]),F=k.useMemo(()=>q(),[q]),U=k.useMemo(()=>j(),[j]),P=k.useMemo(()=>z(),[z]);return x.useSyncedValues({activeTriggerProps:F,inactiveTriggerProps:U,popupProps:P}),v.jsx(CA.Provider,{value:x,children:typeof y=="function"?y({payload:R}):y})});function UF(e,t){const n=_t(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const qF=k.createContext(void 0);function HF(){return k.useContext(qF)}let GF=(function(e){return e[e.popupOpen=wp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const VF=600,NA=V2(function(t,n){const{className:r,render:s,handle:a,payload:l,disabled:c,delay:d,closeOnClick:p=!0,closeDelay:h,id:m,style:g,...y}=t,x=Ih(!0),S=a?.store??x;if(!S)throw new Error(Xn(82));const _=hh(m),E=S.useState("isTriggerActive",_),R=S.useState("isOpenedByTrigger",_),T=S.useState("floatingRootContext"),C=k.useRef(null),A=d??VF,N=h??0,{registerTrigger:I,isMountedByThisTrigger:H}=nj(_,C,S,{payload:l,closeOnClick:p,closeDelay:N}),$=HF(),{delayRef:L,isInstantPhase:K,hasProvider:Z}=kL(T,{open:R});S.useSyncedValue("isInstantPhase",K);const q=S.useState("disabled"),z=c??q,j=S.useState("trackCursorAxis"),F=S.useState("disableHoverablePopup"),U=pj(T,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!F&&j!=="both"?Sj():null,restMs(){const G=$?.delay,O=typeof L.current=="object"?L.current.open:void 0;let ie=A;return Z&&(O!==0?ie=d??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:()=>S.select("transitionStatus")==="ending"}),P=cj(T,{enabled:!z}).reference,W={open:R},D=S.useState("triggerProps",H);return kn("button",t,{state:W,ref:[n,I,C],props:[U,P,D,{onPointerDown(){S.set("closeOnClick",p)},id:_,[GF.triggerDisabled]:z?"":void 0},y],stateAttributesMapping:Wz})}),OA=k.createContext(void 0);function KF(){const e=k.useContext(OA);if(e===void 0)throw new Error(Xn(70));return e}const ZF=k.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...d}=t,{portalNode:p,portalSubtree:h}=MR({container:s,ref:n,componentProps:t,elementProps:d});return!h&&!p?null:v.jsxs(k.Fragment,{children:[h,p&&Ri.createPortal(r,p)]})}),MA=k.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Ih().useState("mounted")||r?v.jsx(OA.Provider,{value:r,children:v.jsx(ZF,{ref:n,...s})}):null}),IA=k.createContext(void 0);function WF(){const e=k.useContext(IA);if(e===void 0)throw new Error(Xn(71));return e}const YF=k.createContext(void 0);function ek(){return k.useContext(YF)?.direction??"ltr"}const XF=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:d}=t,{element:p,padding:h=0,offsetParent:m="real"}=ws(e,t)||{};if(p==null)return{};const g=hR(h),y={x:n,y:r},x=Cv(s),S=Rv(x),_=await l.getDimensions(p),E=x==="y",R=E?"top":"left",T=E?"bottom":"right",C=E?"clientHeight":"clientWidth",A=a.reference[S]+a.reference[x]-y[x]-a.floating[S],N=y[x]-a.reference[x],I=m==="real"?await l.getOffsetParent?.(p):c.floating;let H=c.floating[C]||a.floating[S];(!H||!await l.isElement?.(I))&&(H=c.floating[C]||a.floating[S]);const $=A/2-N/2,L=H/2-_[S]/2-1,K=Math.min(g[R],L),Z=Math.min(g[T],L),q=K,z=H-_[S]-Z,j=H/2-_[S]/2+$,F=vy(q,j,z),U=!d.arrow&&mo(s)!=null&&j!==F&&a.reference[S]/2-(j<q?K:Z)-_[S]/2<0,P=U?j<q?j-q:j-z:0;return{[x]:y[x]+P,data:{[x]:F,centerOffset:j-F-P,...U&&{alignmentOffset:P}},reset:U}}}),QF=(e,t)=>({...XF(e),options:[e,t]}),JF={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 $2().fn(e)).data?.referenceHidden||a}}}},gp={sideX:"left",sideY:"top"},eU={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,d=yn(s),p=d.getComputedStyle(s);if(!(p.transitionDuration!=="0s"&&p.transitionDuration!==""))return{x:t,y:n,data:gp};const m=await a.getOffsetParent?.(s);let g={width:0,height:0};if(l==="fixed"&&d?.visualViewport)g={width:d.visualViewport.width,height:d.visualViewport.height};else if(m===d){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 x=t,S=n;y==="left"&&(x=g.width-(t+r.width)),y==="top"&&(S=g.height-(n+r.height));const _=y==="left"?"right":gp.sideX,E=y==="top"?"bottom":gp.sideY;return{x,y:S,data:{sideX:_,sideY:E}}}};function DA(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 S1(e,t,n){const{rects:r,placement:s}=e;return{side:DA(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 zA(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:d=5,sticky:p=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,keepMounted:g=!1,floatingRootContext:y,mounted:x,collisionAvoidance:S,shiftCrossAxis:_=!1,nodeId:E,adaptiveOrigin:R,lazyFlip:T=!1,externalTree:C}=e,[A,N]=k.useState(null);!x&&A!==null&&N(null);const I=S.side||"flip",H=S.align||"flip",$=S.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,K=Ve(L),Z=L?K:t,q=qn(t),z=qn(x),F=ek()==="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=d;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=k.useRef(null),le=qn(s),pe=qn(l),ze=[Mv(We=>{const Ot=S1(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&&(p||_||I==="shift"),Re=I==="none"?null:Dv({...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:Iv(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:p||_?void 0:P2(Fe=>{if(!ne.current)return{};const{width:Ke,height:ht}=ne.current.getBoundingClientRect(),Xe=di(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,p,_,W,H]);I==="shift"||H==="shift"||a==="center"?ze.push(Oe,Re):ze.push(Re,Oe),ze.push(zv({...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,ut=(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",`${ut}px`),ht.setProperty("--anchor-height",`${St}px`)}}),QF(()=>({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=di(Y),we=ne.current,Ge=Fe.arrow?.x||0,ut=Fe.arrow?.y||0,St=we?.clientWidth||0,$e=we?.clientHeight||0,Le=Ge+St/2,qe=ut+$e/2,Wt=Math.abs(Fe.shift?.y||0),tt=ht.reference.height/2,Dt=typeof s=="function"?s(S1(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],_n=`${Le}px ${ht.reference.y+tt-Xe}px`;return Ot.floating.style.setProperty("--transform-origin",Te&&X==="y"&&Kn?_n:Qn),{}}},JF,R),He(()=>{!x&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[x,y]);const ve=k.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:ke,elements:Me,x:Ce,y:Pe,middlewareData:ge,update:fe,placement:oe,context:re,isPositioned:_e,floatingStyles:J}=lj({rootContext:y,open:g?x:void 0,placement:P,middleware:ze,strategy:n,whileElementsMounted:g?void 0:(...We)=>Ap(...We,ve),nodeId:E,externalTree:C}),{sideX:ue,sideY:Ie}=ge.adaptiveOrigin||gp,Be=_e?n:"fixed",Ze=k.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=k.useRef(null);He(()=>{if(!x)return;const We=q.current,Ot=typeof We=="function"?We():We,Ke=(w1(Ot)?Ot.current:Ot)||null||null;Ke!==Ye.current&&(ke.setPositionReference(Ke),Ye.current=Ke)},[x,ke,Z,q]),k.useEffect(()=>{if(!x)return;const We=q.current;typeof We!="function"&&w1(We)&&We.current!==Ye.current&&(ke.setPositionReference(We.current),Ye.current=We.current)},[x,ke,Z,q]),k.useEffect(()=>{if(g&&x&&Me.domReference&&Me.floating)return Ap(Me.domReference,Me.floating,fe,ve)},[g,x,Me,fe,ve]);const ot=jr(oe),it=DA(r,ot,F),nt=mo(oe)||"center",vt=!!ge.hide?.referenceHidden;He(()=>{T&&x&&_e&&N(ot)},[T,x,_e,ot]);const st=k.useMemo(()=>({position:"absolute",top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),kt=ge.arrow?.centerOffset!==0;return k.useMemo(()=>({positionerStyles:Ze,arrowStyles:st,arrowRef:ne,arrowUncentered:kt,side:it,align:nt,physicalSide:ot,anchorHidden:vt,refs:ke,context:re,isPositioned:_e,update:fe}),[Ze,st,ne,kt,it,nt,ot,vt,ke,re,_e,fe])}function w1(e){return e!=null&&"current"in e}function tk(e){return e==="starting"?Mz:hr}function LA(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const d={...n};return c&&(d.pointerEvents="none"),kn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:d},tk(r),s],stateAttributesMapping:ah})}const jA=k.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:d="center",sideOffset:p=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:g=5,arrowPadding:y=5,sticky:x=!1,disableAnchorTracking:S=!1,collisionAvoidance:_=zz,style:E,...R}=t,T=Ih(),C=KF(),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=zA({anchor:a,positionMethod:l,floatingRootContext:$,mounted:N,side:c,sideOffset:p,align:d,alignOffset:h,collisionBoundary:m,collisionPadding:g,sticky:x,arrowPadding:y,disableAnchorTracking:S,keepMounted:C,collisionAvoidance:_,adaptiveOrigin:Z?eU:void 0}),z=k.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=LA(t,z,{styles:q.positionerStyles,transitionStatus:K,props:R,refs:[n,T.useStateSetter("positionerElement")],hidden:!N,inert:!A||I==="both"||H});return v.jsx(IA.Provider,{value:q,children:j})}),tU={...ah,...oa},PA=k.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=Ih(),{side:d,align:p}=WF(),h=c.useState("open"),m=c.useState("instantType"),g=c.useState("transitionStatus"),y=c.useState("popupProps"),x=c.useState("floatingRootContext");aa({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const S=c.useState("disabled"),_=c.useState("closeDelay");return fj(x,{enabled:!S,closeDelay:_}),kn("div",t,{state:{open:h,side:d,align:p,instant:m,transitionStatus:g},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,tk(g),l],stateAttributesMapping:tU})});function nU(e){const[t,n]=k.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function E1(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(bl(n)!==a||bl(r)!==l)&&(n=a,r=l),{width:n,height:r}}class rU{constructor(){this.store=new Dh}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(my,void 0,n))}close(){this.store.setOpen(!1,_t(my,void 0,void 0))}get isOpen(){return this.store.state.open}}function iU(){return new rU}const sU={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}},$A=sU.root,BA={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}},FA=BA.positioner,UA=BA.surface,qA="top",nk=300,zh=100;function oU(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function aU(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function lU(e){return e?{side:"flip",align:"shift",fallbackAxisSide:"none"}:{side:"flip",align:"shift",fallbackAxisSide:"start"}}function rk(e,t,n){const{side:r,align:s}=k.useMemo(()=>oU(e),[e]),{sideOffset:a,alignOffset:l}=k.useMemo(()=>aU(t),[t]),c=k.useMemo(()=>lU(n),[n]);return{side:r,align:s,sideOffset:a,alignOffset:l,collisionAvoidance:c}}function T1(e){const t=k.useRef(e);return k.useLayoutEffect(()=>{t.current=e},[e]),t}function uU(e,t){const n=T1(e),r=T1(t);return k.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const d=c.target,p=a.defaultView?.Element;if(p===void 0||!(d instanceof p))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&d.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const cU=zh;function HA(e,t){return t?Math.max(e,cU):e}const fU={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 GA(){return fU.base}const VA=k.createContext(null),KA=k.createContext(null);function Hp({children:e,placement:t=qA,offset:n=8,delay:r,closeDelay:s,sameAxisOnly:a=!1,disabled:l=!1,surfaceStyle:c,surfaceClassName:d,claimPortalLayer:p=!1,onOpenChange:h}){const m=k.use(VA),g=m?.open??r??nk,y=m?.close??s??zh,x=k.useMemo(()=>iU(),[]),S=k.useRef(null),[_,E]=k.useState(!1),[R,T]=k.useState(!1),[C,A]=k.useState(!1),N=k.use(qp),I=k.useCallback((q,z)=>{S.current=q,T(z),A(!1)},[]),H=k.useCallback(q=>{S.current===q&&(A(!0),x.close(),S.current=null,T(!1))},[x]),$=k.useCallback(q=>{q||(S.current=null,T(!1)),E(q),h?.(q)},[h]),{portalLayerStyles:L}=qc("tooltip",p&&_),K=N||C,Z=k.useMemo(()=>({handle:x,delay:g,closeDelay:y,markTriggerActive:I,closeIfTriggerActive:H}),[x,g,y,I,H]);return v.jsxs(KA.Provider,{value:Z,children:[e,v.jsx(dU,{activeInteractive:R,disabled:l,handle:x,offset:n,onOpenChange:$,placement:t,positionerStyle:p?L:void 0,sameAxisOnly:a,suppressPopup:K,surfaceClassName:d,surfaceStyle:c})]})}function dU({handle:e,activeInteractive:t,placement:n,offset:r,sameAxisOnly:s,disabled:a,suppressPopup:l,surfaceStyle:c,surfaceClassName:d,positionerStyle:p,onOpenChange:h}){const m=Nl(),g=rk(n,r,s);return v.jsx(AA,{disabled:a||l,disableHoverablePopup:!t,handle:e,onOpenChange:h,children:({payload:y})=>l||y?.content===null||y?.content===void 0?null:v.jsx(hU,{align:g.align,alignOffset:g.alignOffset,collisionAvoidance:g.collisionAvoidance,handle:e,payload:y,portalRoot:m,positionerStyle:p,side:g.side,sideOffset:g.sideOffset,surfaceClassName:d,surfaceStyle:c})})}function pU({content:e,popupRef:t}){return k.useLayoutEffect(()=>{t.current!==null&&(t.current.scrollTop=0)},[t]),typeof e=="function"?e():e}function hU({payload:e,handle:t,portalRoot:n,surfaceStyle:r,surfaceClassName:s,positionerStyle:a,side:l,align:c,sideOffset:d,alignOffset:p,collisionAvoidance:h}){const m=k.useRef(null),g=uU(t,e.triggerId),y=k.useCallback(_=>{m.current=_;const E=g(_);if(_!==null)return()=>{m.current===_&&(m.current=null),E?.()}},[g]),x=Nn(FA),S=En({rootClass:"ui-tooltip",stylexStyles:[UA,GA(),$A,r,e.surfaceStyle],className:wn(s,e.tooltipClassName)});return v.jsx(MA,{container:n??void 0,children:v.jsx(jA,{align:c,alignOffset:p,className:x.className,collisionAvoidance:h,collisionPadding:8,side:l,sideOffset:d,style:{...x.style,...a},children:v.jsx(PA,{"aria-label":e.ariaLabel,className:S.className,ref:y,role:"tooltip",style:S.style,children:v.jsx(pU,{content:e.content,popupRef:m},e.contentKey)})})})}function mU({handle:e,children:t,content:n,contentKey:r,disabled:s=!1,surfaceStyle:a,tooltipClassName:l,delay:c,closeDelay:d,interactive:p=!1,"aria-label":h,id:m,onMouseEnter:g,onFocus:y,onPotentialActivate:x,...S}){const _=k.useId(),E=m??_,R=k.Children.only(t),T=k.isValidElement(R),C=k.useCallback(I=>{x?.(E,p),g?.(I)},[p,g,x,E]),A=k.useCallback(I=>{x?.(E,p),y?.(I)},[p,y,x,E]),N=k.useMemo(()=>({ariaLabel:h,content:n,contentKey:r??E,surfaceStyle:a,tooltipClassName:l,triggerId:E}),[h,n,r,a,l,E]);return T?v.jsx(NA,{...S,closeDelay:d,delay:c,disabled:s,handle:e,id:E,onFocus:A,onMouseEnter:C,payload:N,render:R}):v.jsx(v.Fragment,{children:t})}function gU({children:e,content:t,disabled:n=!1,delay:r,closeDelay:s,interactive:a=!1,"aria-label":l,id:c,...d}){const p=k.use(KA),h=k.useId(),m=c??h;if(k.useLayoutEffect(()=>{if(p==null)return;const y=p.closeIfTriggerActive;return()=>{y(m)}},[p,m]),p==null)return v.jsx(v.Fragment,{children:e});const g=HA(s??p.closeDelay??zh,a);return v.jsx(mU,{...d,"aria-label":l,closeDelay:g,content:t,delay:r??p.delay??nk,disabled:n,handle:p.handle,id:m,interactive:a,onPotentialActivate:p.markTriggerActive,children:e})}(function(e){e.Trigger=gU})(Hp||(Hp={}));const jb={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}},bU={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}},li={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}},wi={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}},Zo={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}},Gp={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}},yU={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}},vU={row:{kLKAdn:"ui-fs8kq3",kpe85a:"ui-9cta2o",kGO01o:"ui-b6dno7",kE3dHu:"ui-1166h4g",$$css:!0}},ZA={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}},Vp={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 kU(e,t=!1){return[jb.base,ks.root,e==="md"&&jb.sizeMd,t&&jb.hasAttachment]}function xU(){return bU.base}function SU(){return _i.inner}function wU(e=!1){return[_i.layout,e&&_i.layoutCard]}function EU(){return _i.attachment}function TU(){return _i.bodyScroll}function _U(){return _i.header}function RU(){return _i.footer}function CU(e=!1){return[_i.list,e&&_i.virtualizedList]}function AU(){return _i.virtualizedRow}function NU(){return _i.virtualizedScroller}function ik(e={}){return[li.base,e.selected&&li.selected,e.inSubmenu&&!e.disabled&&li.submenuHover,e.focused&&li.focused,e.expanded&&li.expanded,e.disabled&&li.disabled,e.disabled&&e.focused&&li.disabledFocused,e.hasDescription&&li.hasDescription,e.variant==="muted"&&li.muted,e.variant==="muted"&&e.focused&&li.mutedFocused,e.indent&&li.indent,e.topAlign&&li.topAlign]}function OU(e={}){return[wi.left,e.hasDescription&&wi.leftDescription,e.wideLeft&&wi.leftWide]}function MU(){return wi.content}function IU(e={}){return[wi.right,e.hasDescription&&wi.rightDescription,e.disabled&&wi.rightDisabled]}function DU(){return wi.submenuRight}function zU(){return wi.wrapper}function LU(){return[Ol.root,wi.title]}function jU(){return[fo.root,Ol.root,wi.description]}function PU(e){return[Zo.wrapper,e&&Zo.wrapperInline]}function $U(e){return[Ol.root,Zo.title,e&&Zo.titleInline]}function BU({inline:e,wrap:t}){return[fo.root,Ol.root,Zo.subtitle,e&&Zo.subtitleInline,t&&Zo.subtitleWrap]}function FU(){return vU.row}function UU(){return Gp.wrapper}function qU(e){return[fo.root,Gp.title,e&&Gp.titleAction]}function HU(){return Gp.textAction}function GU(){return yU.divider}function WA(){return ZA.surface}function VU(){return ZA.surfaceWide}function KU(e){return[fo.root,Vp.empty,e&&Vp.emptyIndent]}function ZU(){return[ks.root,Vp.loading]}function WU(){return Vp.loadingSpinner}const YU="ui-menu",sk="ui-menu__backdrop",XU="ui-menu__list",QU="ui-menu__content",JU="ui-menu__layout",e9="ui-menu__body-scroll",t9="ui-menu__header",n9="ui-menu__footer",r9="ui-menu__attachment",i9="ui-menu__row",s9="ui-menu__item-left",o9="ui-menu__item-content",a9="ui-menu__item-right",l9="ui-menu__item-wrapper",u9="ui-menu__item-title",c9="ui-menu__item-description",f9="ui-menu__text-wrapper",d9="ui-menu__title",p9="ui-menu__subtitle",h9="ui-menu__search-row",m9="ui-menu__section",g9="ui-menu__section-title",b9="ui-menu__section-text-action",y9="ui-menu__virtualized-section-divider",v9="ui-menu__submenu-trigger",k9="ui-menu__submenu-right-section",x9="ui-menu__toggle-row",YA="ui-menu__tooltip",S9="ui-menu__empty",w9="ui-menu__loading",E9="ui-menu__loading-spinner",T9="ui-menu__virtualized-row",_9="ui-menu__virtualized-scroller";function Ht(e,t,n={}){return En({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function ok({className:e,size:t,style:n,hasAttachment:r=!1}){return Ht(YU,kU(t,r),{className:e,style:n})}function XA(e){return Ht(sk,xU(),{style:e})}function ak(e=!1){return Ht(XU,CU(e),{className:e?"ui-menu__list--virtualized":void 0})}function lk(){return Ht(QU,SU())}function QA(e,t=!1){return Ht(JU,wU(t),{style:e})}function R9(){return Ht(r9,EU())}function C9(){return Ht(e9,TU())}function JA(){return Ht(t9,_U())}function eN(){return Ht(n9,RU())}function uk(e={}){return Ht(i9,[{"ui--default-marker":"ui--default-marker",$$css:!0},ik(e)],{className:e.className})}function A9(e={}){return Ht(x9,ik(e),{className:e.className})}function N9(e={}){return Ht(v9,ik(e),{className:e.className})}function O9(e={}){return Ht(s9,OU(e))}function M9(){return Ht(o9,MU())}function I9(e={}){return Ht(a9,IU(e))}function ck(){return Ht(l9,zU())}function fk(){return Ht(u9,LU())}function dk(){return Ht(c9,jU())}function D9(e){return Ht(f9,PU(e))}function z9(e){return Ht(d9,$U(e))}function L9({inline:e,wrap:t}){return Ht(p9,BU({inline:e,wrap:t}))}function j9(e){return Ht(h9,FU(),{className:e})}function _1(){return Ht(m9,UU())}function tN(e){return Ht(g9,qU(e))}function P9(){return Ht(b9,HU())}function $9(){return Ht(y9,GU())}function B9(){return Ht(k9,DU())}function F9(e){return Ht(S9,KU(e))}function U9(){return Ht(w9,ZU())}function q9(){return Ht(T9,AU())}function H9(){return Ht(_9,NU())}const Lh=Ht(YA,WA()).className,G9=Ht(E9,WU()).className,Kp="submenuOpenChange",pk=k.createContext(null);function jh(){return k.use(pk)}function hk({children:e,layerNodeId:t}){const n=bo(),[r,s]=k.useState(new Set);k.useEffect(()=>{if(!n)return;const c=d=>{d.parentId===t&&s(p=>{const h=new Set(p);return d.isOpen?h.add(d.nodeId):h.delete(d.nodeId),h})};return n.events.on(Kp,c),()=>{n.events.off(Kp,c)}},[n,t]);const a=r.size>0,l=k.useMemo(()=>({hasOpenChild:a}),[a]);return v.jsx(pk.Provider,{value:l,children:v.jsx(Hp,{claimPortalLayer:!0,disabled:a,offset:6,placement:"right-start",sameAxisOnly:!0,surfaceClassName:YA,surfaceStyle:WA(),children:e})})}function nN({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=k.use(pk);return c==null?v.jsx(v.Fragment,{children:e}):v.jsx(Hp.Trigger,{closeDelay:a,content:t,contentKey:n,delay:s,disabled:r||c.hasOpenChild,interactive:!0,surfaceStyle:l,children:e})}function V9(e,t){const n=bo(),r=go();k.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(Kp,s),()=>{t&&n.events.emit(Kp,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}const K9=360,rN="--ui-menu-available-width",Z9="320px";function ju(e){return typeof e=="number"?`${e}px`:e}function Pb(e){return`min(${e}, var(${rN}, 100vw))`}function mk(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":ju(t??"200px");return s?{width:l==="max-content"?l:Pb(l),...n!=null&&{minWidth:Pb(ju(n))},maxWidth:Pb(r!=null?ju(r):Z9)}:{width:l,...n!=null&&{minWidth:ju(n)},...r!=null&&{maxWidth:ju(r)}}}const W9=hA("@@menu-content-noop",()=>Qv({}));function Y9({children:e,header:t,footer:n,attachment:r,"aria-label":s,"data-testid":a,className:l,style:c,maxHeight:d,width:p,minWidth:h,maxWidth:m,size:g,backdrop:y,adaptiveHeight:x=!0,returnFocus:S,onKeyDownCapture:_,droppable:E,ref:R}){const T=Al(),{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=k.useRef(null),he=K&&!z,Te=Mh(),Re=k.useSyncExternalStore(pi.subscribe,pi.isDragActive,pi.isDragActive),Oe=te.placement.startsWith("top"),ve=Oe&&A?O.bottomAnchor?.bottom??null:null,ke=k.useRef(null),Me=k.useRef(N),Ce=k.useRef(!1);k.useLayoutEffect(()=>{Me.current=N},[N]),k.useLayoutEffect(()=>{if(!C){Ce.current=!1;return}const X=$e=>{SA($e)&&(Ce.current=!0,$())},we=$e=>{const Le=EA($e,W);Le==null||Le===Me.current||I(Le)},Ge=$e=>{const Le=Ce.current;Ce.current=!1,L(),Le&&we($e.target)},ut=ze.current;document.addEventListener("keydown",X,!0);const St=IF(ut,Ge);return()=>{document.removeEventListener("keydown",X,!0),St()}},[C,W,$,L,I]),k.useLayoutEffect(()=>{if(!C){ke.current=null;return}if(!K||N==null||ke.current===N||(ke.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=k.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 ut=W.current,St=ut.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(ut[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),wA(W,"body",I)}},[pe,z,W,j,Z,I,q]),ge=k.useCallback(X=>{Te(X.nativeEvent)&&(pe.current="backdrop",H(!1))},[pe,H,Te]),fe=k.useCallback(X=>{if(!Te(X.nativeEvent))return;X.preventDefault(),pe.current="backdrop",H(!1);const ut=document.elementsFromPoint(X.clientX,X.clientY).find(St=>!St.classList.contains(sk));ut&&ut.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}=J4({accept:E?.accept??W9,disabled:!oe||(E?.disabled??!1),onDragEnter:E?.onDragEnter,onDragOver:E?.onDragOver,onDragLeave:E?.onDragLeave,onDrop:E?.onDrop}),ue=Zc([B.setFloating,ze,R,oe?re:null]),Ie=Nl(),{zIndex:Be,portalLayerStyles:Ze}=qc("popover",A);if(!A)return null;const Ye=g??T?.menuSize??"sm",ot={...G,...ie,...Ze,...Be!==null?{zIndex:Be}:{},...c,...mk({width:p,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=d==null?void 0:x?`min(${typeof d=="number"?`${d}px`:d}, var(--ui-menu-available-height, 100vh))`:d,vt=r!=null,st=XA(it),kt=ok({className:l,size:Ye,style:vt&&nt!==void 0?{...ot,maxHeight:nt}:ot,hasAttachment:vt}),We=QA(vt||nt===void 0?void 0:{maxHeight:nt},vt),Ot=JA(),Fe=C9(),Ke=lk(),ht=ak(),Xe=eN(),Y=R9();return v.jsxs(Uv,{...Ie?{root:Ie}:{},children:[Se&&v.jsx("div",{className:st.className,style:st.style,onClick:ge,onContextMenu:fe,role:"none"}),v.jsx(Hv,{context:te,initialFocus:he?-1:j,returnFocus:S??(pe.current!=="backdrop"&&(pe.current!=="selection"||ye)),modal:!he,children:v.jsx("div",{ref:ue,className:kt.className,style:kt.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(gA,{dismiss:!C,children:v.jsx(hk,{layerNodeId:P,children:v.jsx(RA,{activeIndex:N,setIsOpen:H,getItemProps:le,searchValue:Z,closeOnSelect:U,virtualFocus:K,children:v.jsxs(_C,{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(nc,{value:"header",children:t})}):null,v.jsx(mA,{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(nc,{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(nc,{value:"footer",children:r})})}):null]})})})})})})})]})}function X9({children:e,indent:t=!1}){const n=F9(t);return v.jsx("div",{className:n.className,style:n.style,"data-indent":t||void 0,children:e})}const Q9=k.createContext(null);function J9(){return k.useContext(Q9)}const eq="application/x-cursor-draggable",tq=/\bElectron\/\d+/,Fd=rq("ui-i9pz9s"),nq="data-no-drag";let Go=!1,R1=!1;function rq(e){return e?.split(/\s+/).filter(Boolean)??[]}function Ud(e,t,n){for(const r of t)e.classList.toggle(r,n)}function iq(){if(R1||typeof document>"u")return;R1=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){Go=!1;return}Go=t.target.closest(`[${nq}]`)!==null},{capture:!0});const e=()=>{Go=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function sq(){return typeof navigator>"u"?!0:!tq.test(navigator.userAgent)}function oq({id:e,data:t,disabled:n=!1,dragImageOffset:r,onDragStart:s,onDragEnd:a}){const l=J9(),c=k.useRef(null),d=k.useRef({onDragStart:s,onDragEnd:a});d.current={onDragStart:s,onDragEnd:a};const p=k.useRef(t);p.current=t;const h=k.useRef(r);h.current=r;const m=k.useRef(l);m.current=l;const g=l?.activeDragId===e,y=k.useRef(g);return y.current=g,k.useEffect(()=>{const S=c.current;if(S)return Ud(S,Fd,!n&&g),()=>{Ud(S,Fd,!1)}},[n,g]),k.useEffect(()=>{const S=c.current;if(!S)return;if(n){S.removeAttribute("aria-grabbed");return}const _=g?"true":"false";S.getAttribute("aria-grabbed")!==_&&S.setAttribute("aria-grabbed",_)},[n,g]),{ref:k.useCallback(S=>{if(c.current=S,!S)return;Ud(S,Fd,!n&&y.current);const _=!n;if(S.draggable!==_&&(S.draggable=_),n)return;iq();const E=pi.getInstance(),R=C=>{if(Go){Go=!1,C.preventDefault(),C.stopPropagation();return}const A=p.current;E.setData(A);const N=S.ownerDocument,I=()=>{N.removeEventListener("dragend",I,!0),N.removeEventListener("drop",I,!0),N.removeEventListener("mousemove",I,!0),setTimeout(()=>{E.getData()===A&&(E.clearData(),Go=!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=sq();C.dataTransfer.effectAllowed=H?"copyMove":"move",C.dataTransfer.setData(eq,A.type),H&&C.dataTransfer.setData("text/plain",A.type);const $=h.current;$&&C.dataTransfer.setDragImage(S,$.x,$.y)}m.current?.setDragging(e,A,{x:C.clientX,y:C.clientY}),d.current.onDragStart?.(C)},T=C=>{E.clearData(),Go=!1,m.current?.setDragging(null,null),d.current.onDragEnd?.(C)};return S.addEventListener("dragstart",R),S.addEventListener("dragend",T),()=>{S.removeEventListener("dragstart",R),S.removeEventListener("dragend",T),Ud(S,Fd,!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}},aq={xs:lP.root,sm:fo.root,md:ks.root,lg:sC.root,xl:uP.root,"2xl":cP.root,"3xl":fP.root,inherit:fn.sizeInherit},lq={regular:fn.weightRegular,medium:fn.weightMedium,semibold:fn.weightSemibold,bold:fn.weightBold},uq={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 cq({color:e,size:t,truncate:n,variant:r,weight:s}){return[fn.base,Bv.root,aq[t],lq[s],r==="code"?fn.variantCode:null,e?uq[e]:null,n==="start"?fn.truncateStart:null,n==="end"?Ol.root:null]}function Zp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,className:d,style:p,ref:h,...m}){const g=a===!0?"end":a===!1?void 0:a??void 0,{className:y,style:x}=Nn(cq({color:s,size:n,truncate:g,variant:t,weight:r}));return v.jsx(e,{ref:h,className:wn("ui-text",y,d),style:{...x,...p},"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 Ph({children:e,content:t,placement:n=qA,offset:r=8,openDelay:s=nk,closeDelay:a=zh,disabled:l=!1,defaultOpen:c,open:d,anchor:p,"aria-label":h,className:m,surfaceStyle:g,sameAxisOnly:y=!1,interactive:x=!1,onOpenChange:S,onOpenChangeComplete:_,ref:E,...R}){const T=k.use(VA),C=k.use(qp),A=l||C,N=k.Children.only(e),I=k.isValidElement(N),H=Nl(),$=T?.open??s,L=T?.close??a,K=HA(L,x),{side:Z,align:q,sideOffset:z,alignOffset:j,collisionAvoidance:F}=rk(n,r,y),U=Nn(FA),P=En({rootClass:"ui-tooltip",stylexStyles:[UA,GA(),$A,g],className:m});return I?v.jsxs(AA,{defaultOpen:c,disabled:A,disableHoverablePopup:!x,onOpenChange:S,onOpenChangeComplete:_,open:d,children:[v.jsx(NA,{...R,closeDelay:K,delay:$,disabled:A,ref:E,render:N}),C?null:v.jsx(MA,{container:H??void 0,children:v.jsx(jA,{align:q,alignOffset:j,anchor:p,className:U.className,collisionAvoidance:F,collisionPadding:8,side:Z,sideOffset:z,style:U.style,children:v.jsx(PA,{"aria-label":h,className:P.className,role:"tooltip",style:P.style,children:typeof t=="function"?t():t})})})]}):v.jsx(v.Fragment,{children:e})}function gk({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return jh()!=null?v.jsx(nN,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):v.jsx(Ph,{className:Lh,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 d=s??a,p=d!=null||l!=null,h=O9({hasDescription:n,wideLeft:c}),m=M9(),g=I9({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}),p?v.jsxs("span",{className:g.className,style:g.style,children:[d,l]}):null]})}const iN=k.createContext(!1);function ef(){return k.useContext(iN)}const $h=k.createContext(null);function Bh(){const e=k.useContext($h);if(!e)throw new Error("SubMenu components must be used within <Menu.SubMenu>");return e}function sN({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:d=!1,onOpenChange:p,hoverOpenDelay:h,dismissOnReferenceScroll:m=!1,suppressSiblingPointerGuard:g=!1,virtualFocus:y=!1}){const x=OC(),[S,_]=zy(c,d,p),E=c!==void 0,R=t==="hover"&&(!E||r==null),[T,C]=k.useState(null),{focusItemOnHoverEnabled:A,markKeyboardNavigation:N,markPointerNavigation:I,resetFocusItemOnHover:H}=TA(),[$,L]=k.useState(""),[K,Z]=k.useState(!1),q=k.useRef([]),z=k.useRef([]),j=k.useRef(null);V9(x,S);const F=gq();k.useEffect(()=>{F&&F.setSubMenuOpen(S)},[S,F]);const U=k.useRef(S);k.useEffect(()=>{const J=U.current;U.current=S,J!==S&&(L(""),S||C(null),H())},[S,H]);const P=k.useCallback(J=>{_(J)},[_]);k.useEffect(()=>{if(F)return F.registerSubMenuOpener(()=>P(!0)),()=>{F.registerSubMenuOpener(null)}},[F,P]);const W=k.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=k.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}=$C({nodeId:x,open:S,onOpenChange:W,placement:G,middleware:[Mv(ne),Dv(),Iv({crossAxis:G.startsWith("left")||G.startsWith("right")}),zv({padding:8,apply({availableWidth:J,elements:ue}){ue.floating.style.setProperty(rN,`${Math.max(0,Math.floor(J))}px`)}})],whileElementsMounted:Ap,transform:!1});k.useLayoutEffect(()=>{const J=r?.current;J&&le.setReference(J)}),zF(R&&S&&!g,le.domReference);const{activeId:Se}=AF(x,S),ze=Se!=null?0:h??75,he=IC(ye,{enabled:R,delay:{open:ze},handleClose:VC({blockPointerEvents:!1,requireIntent:!1})}),Te=jC(ye,{enabled:t==="click"&&!E}),Re=Mh(),Oe=PC(ye,{ancestorScroll:m,bubbles:!0,outsidePressEvent:"click",outsidePress:Re}),ve=UC(ye,{role:"menu"}),ke=FC(ye,{listRef:q,activeIndex:T,onNavigate:C,nested:!0,loop:!0,focusItemOnOpen:!y,virtual:K||y,focusItemOnHover:A}),Me=HC(ye,{listRef:z,activeIndex:T,onMatch:K?void 0:C,enabled:!K&&!y}),{getReferenceProps:Ce,getFloatingProps:Pe,getItemProps:ge}=BC([he,Te,Oe,ve,ke,Me]),fe=k.useCallback(()=>({...Ce(),ref:r?void 0:le.setReference,"aria-haspopup":"menu","aria-expanded":S}),[Ce,le.setReference,S,r]),{isMounted:oe,styles:re}=qC(ye,{duration:{open:0,close:DF},initial:{opacity:0,transform:"scale(1)"}}),_e=k.useMemo(()=>({isOpen:S,isMounted:oe,setIsOpen:P,closeFromKeyboard:D,activeIndex:T,setActiveIndex:C,markKeyboardNavigation:N,markPointerNavigation:I,trigger:t,closeOnSelect:l,nodeId:x,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}),[S,oe,P,D,T,t,N,I,l,x,$,K,y,le,pe,re,ye,Ce,Pe,ge,fe]);return v.jsx(MC,{id:x,children:v.jsx($h.Provider,{value:_e,children:e})})}function fq({children:e,disabled:t=!1,label:n,leading:r,trailing:s}){const{activeIndex:a,getItemProps:l}=Jc(),{shouldAllowPointerInteraction:c}=Ci(),d=Bh(),p=Qc(),h=p==="body",m=n??(typeof e=="string"?e:""),{ref:g,index:y}=wh({label:m||null}),x=a===y,S=Zc([g,d.refs.setReference]),_=v.jsx(vn,{name:"chevron-right",color:"tertiary"}),E=N9({disabled:t,expanded:d.isOpen,focused:x}),R={role:"menuitem","aria-haspopup":"menu","aria-expanded":d.isOpen,"data-expanded":d.isOpen||void 0,tabIndex:x?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":x||void 0,[Ml]:p,className:E.className,style:E.style,...d.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(),d.setIsOpen(!0))}}))},T=B9(),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:S,...R,children:C}):v.jsx("div",{ref:S,...R,children:C})}function dq({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=Bh(),c=t??(typeof e=="string"?e:""),d=h=>{a.disabled||(r?.(h),!h.defaultPrevented&&h.key==="ArrowRight"&&(h.preventDefault(),h.stopPropagation(),l.setIsOpen(!0)))},p=n?v.jsx(vn,{name:"chevron-right",color:"tertiary"}):void 0;return v.jsx(lN,{...a,itemLabel:c,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:d,trailingAccessory:p,children:e})}function pq({children:e,"aria-label":t,"data-testid":n,className:r,width:s,minWidth:a,maxWidth:l,maxHeight:c,size:d,contentPadding:p}){const h=Al(),m=Bh(),g=Nl(),{portalLayerStyles:y}=qc("popover",m.isMounted),x=d??h?.menuSize??"sm",{virtualFocus:S}=m;if(!m.isMounted)return null;const _={...m.floatingStyles,...m.transitionStyles,...y,...mk({width:s,minWidth:a,maxWidth:l,clampToAvailableWidth:!0})},E=ok({className:r,size:x,style:_}),R=lk(),T=ak(),C=N=>{N.stopPropagation()},A=N=>{m.markPointerNavigation();const I=EA(N,m.listRef);I!=null&&I!==m.activeIndex&&m.setActiveIndex(I)};return v.jsx(Uv,{...g?{root:g}:{},children:v.jsx(Hv,{context:m.context,disabled:S,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":x,...n?{"data-testid":n}:{},...m.getFloatingProps({onClick:C,onMouseMove(N){A(N.target)},onPointerMove(N){A(N.target)},onKeyDown(N){if(SA(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(iN.Provider,{value:!0,children:v.jsx(Ts,{menuSize:x,children:v.jsx(mA,{maxHeight:c,children:v.jsx("div",{className:R.className,style:p===void 0?R.style:{...R.style,padding:p,scrollPaddingBlock:p},children:v.jsx(hk,{layerNodeId:m.nodeId,children:v.jsx(RA,{activeIndex:m.activeIndex,setIsOpen:m.setIsOpen,getItemProps:m.getItemProps,searchValue:m.searchValue,closeOnSelect:m.closeOnSelect,virtualFocus:S,children:v.jsx(_C,{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(kA,{children:e})})})})})})})})})})})})}function bk(){const e=k.useContext($h),{setIsOpen:t,dismissCauseRef:n}=Ci();return k.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function yk(e,t){const{searchValue:n}=Jc();return t||!n||!e?!0:e.toLowerCase().includes(n.toLowerCase())}const hq=hA("@@menu-item-noop",()=>Qv({})),mq=new hq({}),oN=k.createContext(null);function gq(){return k.useContext(oN)}function aN({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return yk(s,n)?v.jsx(lN,{...r,itemLabel:s,children:e}):null}function lN({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:d,onKeyDown:p,leading:h,trailing:m,tooltip:g,tooltipOpenDelay:y=0,tooltipCloseDelay:x=0,tooltipSurface:S="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}=Jc(),{shouldAllowPointerInteraction:U}=Ci(),P=ef(),W=bk(),D=Qc(),B=D==="body",G=_??j??!0,{ref:O,index:ie}=wh({label:H||null}),te=Z===ie,[ne,le]=k.useState(!1);jh();const pe=k.useRef(null),ye=k.useId(),Se=N!=null,ze=N?.mode==="pointer",he=k.useSyncExternalStore(pi.subscribe,pi.isDragActive,pi.isDragActive),Te=k.useRef(null),Re=k.useRef(null),Oe=k.useRef(null),ve=k.useRef(null),ke=k.useRef(!1),[Me,Ce]=k.useState(null),{ref:Pe,isDragging:ge}=oq({id:N?.id??`menu-item-${ye}`,data:N?.data??mq,disabled:!Se||ze||(N?.disabled??!1),dragImageOffset:N?.dragImageOffset,onDragStart:N?.onDragStart,onDragEnd:N?.onDragEnd}),fe=Zc([O,$,I,Se&&!ze?Pe:null]),oe=k.useCallback(X=>{pe.current=X},[]),re=k.useMemo(()=>({setSubMenuOpen:le,isSubMenuOpen:ne,registerSubMenuOpener:oe}),[ne,oe]);k.useEffect(()=>()=>{Te.current?.(),Oe.current!=null&&cancelAnimationFrame(Oe.current)},[]);const _e=k.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=k.useCallback(X=>{ve.current=X,Oe.current==null&&(Oe.current=requestAnimationFrame(_e))},[_e]),ue=k.useCallback(X=>{Re.current=X,_e()},[_e]),Ie=()=>{if(a)return;const X={defaultPrevented:!1,preventDefault:()=>{X.defaultPrevented=!0}};d?.(X),G&&!X.defaultPrevented&&W(q)},Be=X=>{if(ke.current){ke.current=!1,X.preventDefault(),X.stopPropagation();return}if(!U(X.nativeEvent)){X.preventDefault(),X.stopPropagation();return}Ie()},Ze=k.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=pi.getInstance(),Ge=X.currentTarget,ut={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(()=>{ke.current=!1},0)},$e=qe=>{const Wt=qe.clientX-ut.clientX,tt=qe.clientY-ut.clientY;if(!(!ut.isDragging&&Math.hypot(Wt,tt)<4)){if(!ut.isDragging){ut.isDragging=!0,ke.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(!ut.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=k.useCallback(X=>{if(!U(X.nativeEvent)){X.preventDefault(),X.stopPropagation();return}c?.(X)},[c,U]),it=z({onClick:Be,onKeyDown:X=>{a||(p?.(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(oN.Provider,{value:re,children:m}):void 0,st=ck(),kt=fk(),We=dk(),Ot=E!=null?v.jsxs("div",{className:st.className,style:st.style,children:[v.jsx("div",{className:kt.className,style:kt.style,children:e}),v.jsx("div",{className:We.className,style:We.style,children:E})]}):e,Fe=he||ne,Ke=uk({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)}:{},[Ml]: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(gk,{closeDelay:x,content:g,disabled:Fe,openDelay:y,surfaceStyle:S==="wide"?VU():void 0,children:Y}):Y}function vk(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=Fv(),l=hh(t),c=n?s:void 0,d=wr(()=>Symbol("labelable-control")),p=k.useRef(!1),h=k.useRef(t!=null),m=Ve(()=>{!p.current||a===ar||(p.current=!1,a(d.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}p.current=!0,a(d.current,g)},[t,r,c,a,n,l,d,m]),k.useEffect(()=>m,[m]),s??l}const bq=k.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:d=!1,onValueChange:p,defaultValue:h,autoFocus:m=!1,style:g,...y}=t,{state:x,name:S,disabled:_,setTouched:E,setDirty:R,validityData:T,setFocused:C,setFilled:A,validationMode:N,validation:I}=Vc(),H=_||d,$=S??l,L={...x,disabled:H},{labelId:K}=Fv(),Z=vk({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=k.useRef(null);He(()=>{m&&q.current===Dr(Ft(q.current))&&C(!0)},[m,C]);const[z]=hc({controlled:c,default:h,name:"FieldControl",state:"value"}),j=c!==void 0,F=j?z:void 0,U=Ve(()=>I.inputRef.current?.value);return oC(I.inputRef,{id:Z,value:F,getValue:U}),kn("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;p?.(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:Gc})}),yq=k.forwardRef(function(t,n){return v.jsx(bq,{ref:n,...t})}),vq=k.createContext(void 0);function kq(){return k.useContext(vq)}const $b={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 xq(e){return[$b.base,e==="green"?$b.colorGreen:$b.colorBlue]}function Sq({color:e="blue",className:t}){const n=En({rootClass:"ui-indicator-dot",stylexStyles:xq(e),className:t});return v.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const wq={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}},Eq={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}},Tq={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}},_q={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}},qd={root:wq.root,appearance:Eq.root,size:Tq,contentFrame:_q},Rq="md";function po({icon:e,iconVariant:t="outline",variant:n="default",shape:r="rounded",frame:s="container",size:a,pressed:l,subtleHover:c,suppressHoverBackground:d=!1,color:p,isSuccess:h=!1,className:m,style:g,disabled:y,indicatorDot:x=!1,indicatorDotColor:S="blue","aria-label":_,"aria-labelledby":E,...R}){const T=Al(),C=a??T?.iconButtonSize??Rq,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=Nn(qd.root,qd.appearance,Qu.appearance,Qu.press,(n==="primary"||n==="secondary")&&Qu.colors,qd.size[C],s==="content"&&qd.contentFrame[C]);return v.jsxs(iC,{...R,className:wn("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":p,"data-indicator-dot":x||void 0,"data-pressed":$?L:void 0,"data-subtle-hover":N||void 0,"data-suppress-hover-background":d||void 0,disabled:I,"aria-label":_,"aria-labelledby":E,"aria-pressed":l,children:[typeof K=="string"?v.jsx(vn,{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}),x?v.jsx(Sq,{color:S}):null]})}function Cq(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function kk(e){if(!(Cq()?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 Hd={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 Aq({className:e,disabled:t=!1,mono:n=!1,ref:r,style:s,onKeyDown:a,...l}){const c=En({rootClass:"ui-input-group__input",stylexStyles:[Hd.base,t?Hd.disabled:null,n?Hd.mono:null,n?Hd.monoInput:null],className:e,style:s}),d=k.useCallback(p=>{a?.(p),!p.defaultPrevented&&kk(p)},[a]);return v.jsx("input",{ref:r,className:c.className,style:c.style,disabled:t,onKeyDown:d,...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}},Gd={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}},xl={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}},C1={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}},Nq={base:Lr.sizeBase,lg:Lr.sizeLg,xl:Lr.sizeXl},Oq={base:Lr.layoutTextareaBase,lg:Lr.layoutTextareaLg,xl:null},Mq={container:null,content:Lr.frameContent},Iq={default:null,elevated:Lr.variantElevated,ghost:Lr.variantGhost,unfilled:Lr.variantUnfilled},Dq={rounded:null,pill:Lr.shapePill},uN=k.createContext(null);function ca(){const e=k.useContext(uN);if(!e)throw new Error("InputGroup compound components must be used within InputGroup.Root");return e}const zq={base:"sm",lg:"base",xl:"lg"},Lq={base:"xs",lg:"sm",xl:"md"},jq={base:"xs",lg:"sm",xl:"md"};function A1({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:d,children:p}){const h=kq(),m=l||h?.disabled===!0,g=En({rootClass:"ui-input-group",stylexStyles:[Lr.base,Nq[n],s==="textarea"?Lr.layoutTextarea:null,s==="textarea"?Oq[n]:null,Mq[t],Iq[e],e==="unfilled"?Lr.variantUnfilledSize:null,Dq[r],m?Lr.disabled:null,c],className:d});return v.jsx(uN.Provider,{value:{disabled:m,layout:s,mono:a},children:v.jsx(Ts,{iconSize:zq[n],iconButtonSize:Lq[n],buttonSize:jq[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:p})})})}function Pq({className:e,disabled:t,ref:n,style:r,...s}){const a=ca(),l=a.disabled||t===!0;return v.jsx(yq,{...s,className:e,disabled:l,ref:n,render:v.jsx(Aq,{mono:a.mono}),style:r})}function $q({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:d,minRows:p=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:g=!1,rows:y,value:x,placeholder:S,focusedPlaceholder:_,...E}){const R=ca(),T=R.disabled||t===!0,C=En({rootClass:"ui-input-group__textarea",stylexStyles:[Gd.field,T?Gd.disabled:null,R.mono?Gd.mono:null,g?Gd.collapseBlur:null,r],className:e,style:s}),A=k.useRef(null),N=Zc([A,n]),[I,H]=k.useState(!1),$=p<1?1:p,L=h===void 0?void 0:h<$?$:h,K=k.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]);k.useLayoutEffect(()=>{K()},[x,K]);const Z=k.useCallback(P=>{a?.(P),!P.defaultPrevented&&kk(P)},[a]),q=k.useCallback(P=>{l?.(P),P.defaultPrevented||K()},[l,K]),z=k.useCallback(P=>{H(!0),c?.(P)},[c]),j=k.useCallback(P=>{H(!1),d?.(P)},[d]),F=y??$,U=I&&_!==void 0?_:S;return v.jsx("textarea",{ref:N,className:C.className,style:C.style,disabled:T,onKeyDown:Z,rows:F,value:x,placeholder:U,...E,"data-textarea-collapse-blur":g?"":void 0,onInput:q,onFocus:z,onBlur:j})}function Bq({className:e,ref:t,...n}){const r=ca(),s=En({rootClass:"ui-input-group__addon",stylexStyles:[xl.base,r.layout==="textarea"?xl.textareaLayout:null],className:e});return v.jsx("span",{className:s.className,style:s.style,children:v.jsx(vn,{ref:t,...n})})}function Fq({className:e,disabled:t,ref:n,...r}){const s=ca(),a=s.disabled?!0:t,l=En({rootClass:"ui-input-group__addon",stylexStyles:[xl.base,s.layout==="textarea"?xl.textareaLayout:null],className:e});return v.jsx("span",{className:l.className,style:l.style,children:v.jsx(po,{ref:n,disabled:a,...r})})}function Uq({className:e,disabled:t,ref:n,...r}){const s=ca(),a=s.disabled?!0:t,l=En({rootClass:"ui-input-group__addon",stylexStyles:[xl.base,s.layout==="textarea"?xl.textareaLayout:null],className:e});return v.jsx("span",{className:l.className,style:l.style,children:v.jsx(zn,{ref:n,disabled:a,...r})})}function qq({className:e,children:t}){const n=ca(),r=En({rootClass:"ui-input-group__span",stylexStyles:[C1.base,n.mono?C1.mono:null],className:e});return v.jsx("span",{className:r.className,style:r.style,children:t})}const Vd=Object.assign(A1,{Root:A1,Input:Pq,Textarea:$q,Icon:Bq,IconButton:Fq,Button:Uq,Span:qq,useContext:ca});function Fh({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,...c}){return v.jsxs(Vd.Root,{className:e,variant:t,size:n,disabled:s,children:[a!=null&&v.jsx(Vd.Icon,{name:a}),v.jsx(Vd.Input,{ref:r,...c}),l!=null&&v.jsx(Vd.Icon,{name:l})]})}function cN(){const e=k.useContext($h),t=k.useContext(Jv),n=e??t;if(!n)throw new Error("useMenuLayerContext must be used within a <Menu> or <Menu.SubMenu>");return n}function Hq({placeholder:e="Search...","aria-label":t,className:n,value:r,onValueChange:s,autoFocus:a=!1}){const c=Qc()==="body",d=ef(),{searchValue:p,setSearchValue:h,searchInputRef:m,activeIndex:g,setActiveIndex:y,listRef:x,setHasSearchInput:S}=cN(),_=k.useRef(null),E=r!==void 0&&s!==void 0,T=!E||a||d?m:_,C=E?r:p;k.useEffect(()=>{if(!E)return S(!0),()=>S(!1)},[E,S]),k.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),wA(x,"body",y),s?.($.target.value))},N=$=>{if(kk($))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=x.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}x1({event:$,direction:"ArrowRight",activeIndex:g,listRef:x,restoreFocus:()=>m.current?.focus()});return}if($.key==="ArrowLeft"){const K=$.currentTarget;if(!(K.selectionStart===0&&K.selectionEnd===0)){$.stopPropagation();return}x1({event:$,direction:"ArrowLeft",activeIndex:g,listRef:x,restoreFocus:()=>m.current?.focus()})}},I=j9(n),H=v.jsx(Fh,{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 Gq({children:e,title:t,textAction:n,tooltip:r,noDivider:s}){const a=_1(),l=tN(n!=null),c=P9(),d=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 p=_1();return v.jsx(Ph,{content:r,placement:"right",offset:6,openDelay:0,closeDelay:0,className:Lh,sameAxisOnly:!0,children:v.jsx("div",{className:p.className,style:p.style,"data-menu-section":!0,"data-no-divider":s||void 0,children:d})})}return d}const Vq=k.createContext(void 0);function Kq(){const e=k.useContext(Vq);if(e===void 0)throw new Error(Xn(63));return e}let N1=(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 Zq={...Gc,checked(e){return e?{[N1.checked]:""}:{[N1.unchecked]:""}}},Wq=k.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{state:c}=Vc(),d=Kq(),p={...c,...d};return kn("span",t,{state:p,ref:n,stateAttributesMapping:Zq,props:l})}),Yq="md",O1={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}},Xq={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 Qq({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(Wq,{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",...Nn(O1.root,O1[t],Xq[n]),children:s})}function Jq({checked:e,disabled:t,size:n=Yq,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(Qq,{interactive:!1,size:n,variant:r})})}function e8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return yk(s,n)?v.jsx(t8,{...r,itemLabel:s,children:e}):null}function t8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,trailing:d,tooltip:p,closeOnSelect:h,topAlign:m=!1,itemLabel:g}){const{activeIndex:y,getItemProps:x,setIsOpen:S,closeOnSelect:_}=Jc(),{shouldAllowPointerInteraction:E}=Ci(),R=ef(),T=bk(),C=Qc(),A=C==="body",N=h??_??!1,[I,H]=k.useState(r),$=n!==void 0,L=$?n:I,{ref:K,index:Z}=wh({label:g||null}),q=y===Z,z=jh(),j=k.useCallback(()=>{if(a)return;const O=!L;$||H(O);const ie={defaultPrevented:!1,preventDefault:()=>{ie.defaultPrevented=!0}};s?.(O,ie),N&&!ie.defaultPrevented&&T(S)},[a,L,$,s,N,S,T]),F=k.useCallback(O=>{if(!E(O.nativeEvent)){O.preventDefault(),O.stopPropagation();return}O.preventDefault(),O.stopPropagation(),j()},[j,E]),U=k.useCallback(O=>{a||(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),j())},[a,j]),P=x({onClick:F,onKeyDown:U}),W=A9({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}:{},[Ml]:C,className:W.className,style:W.style,...P},B=v.jsx(kl,{disabled:a,leading:c,trailing:d,trailingAccessory:v.jsx(Jq,{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 p!=null?v.jsx(Ph,{content:p,placement:"right",offset:6,openDelay:0,closeDelay:0,disabled:z?.hasOpenChild??!1,className:Lh,sameAxisOnly:!0,children:G}):G}function n8({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=D9(n),a=z9(n),l=L9({inline:n,wrap:r});return v.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[v.jsx(Zp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?v.jsx(Zp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const r8=24;function i8({title:e,divider:t}){const n=tN(!1),r=$9();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:r8,boxSizing:"border-box",overflow:"hidden"},children:v.jsx("span",{children:e})}):null]})}const yc=typeof window<"u"?k.useLayoutEffect:k.useEffect;function M1(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function s8({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:d}=k.useMemo(()=>({styleHeight:M1(l?.height),styleWidth:M1(l?.width)}),[l?.height,l?.width]),[p,h]=k.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&d!==void 0;return yc(()=>{if(s===null||m)return;const g=new ResizeObserver(y=>{for(const x of y){const{contentRect:S,target:_}=x;s===_&&h(E=>E.height===S.height&&E.width===S.width?E:{height:S.height,width:S.width})}});return g.observe(s,{box:e}),()=>{g?.unobserve(s)}},[e,m,s,c,d]),k.useMemo(()=>({height:c??p.height,width:d??p.width}),[p,c,d])}function o8(e){const t=k.useRef(()=>{throw new Error("Cannot call during render.")});return yc(()=>{t.current=e},[e]),k.useCallback(n=>t.current?.(n),[t])}function Bb({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 rc(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 fN({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 a8({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=fN({cachedBounds:t,itemCount:r,itemSize:s}),d=t.get(n),p=Math.max(0,Math.min(c-l,d.scrollOffset)),h=Math.max(0,d.scrollOffset-l+d.size);switch(e==="smart"&&(a>=h&&a<=p?e="auto":e="center"),e){case"start":return p;case"end":return h;case"center":return d.scrollOffset<=l/2?0:d.scrollOffset+d.size/2>=c-l/2?c-l:d.scrollOffset+d.size/2-l/2;default:return a>=h&&a<=p?a:a<h?h:p}}function I1({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,d=0,p=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,d=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),p=Math.min(r-1,c+s),l<0&&(l=0,c=-1,d=0,p=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:d,stopIndexOverscan:p}}function l8({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 d=r.get(l-1);uo(d!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:d.scrollOffset+d.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 u8({itemCount:e,itemProps:t,itemSize:n}){return k.useMemo(()=>l8({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function c8({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 f8({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:d,overscanCount:p}){const[h,m]=k.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:g,startIndexOverscan:y,stopIndexVisible:x,stopIndexOverscan:S}={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}=s8({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),R=k.useRef({height:0,width:0}),T=_,C=c8({containerSize:T,itemSize:c});k.useLayoutEffect(()=>{if(typeof d=="function"){const L=R.current;(L.height!==_||L.width!==E)&&(d({height:_,width:E},{...L}),L.height=_,L.width=E)}},[_,d,E]);const A=u8({itemCount:a,itemProps:l,itemSize:C}),N=k.useCallback(L=>A.get(L),[A]),I=k.useCallback(()=>fN({cachedBounds:A,itemCount:a,itemSize:C}),[A,a,C]),H=k.useCallback(L=>{const K=Bb({containerElement:e,direction:r,isRtl:s,scrollOffset:L});return I1({cachedBounds:A,containerScrollOffset:K,containerSize:T,itemCount:a,overscanCount:p})},[A,e,T,r,s,a,p]);yc(()=>{const L=e?.scrollTop??0;m(H(L))},[e,r,H]),yc(()=>{if(!e)return;const L=()=>{m(K=>{const{scrollLeft:Z,scrollTop:q}=e,z=Bb({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),j=I1({cachedBounds:A,containerScrollOffset:z,containerSize:T,itemCount:a,overscanCount:p});return rc(j,K)?K:j})};return e.addEventListener("scroll",L),()=>{e.removeEventListener("scroll",L)}},[A,e,T,r,a,p]);const $=o8(({align:L="auto",containerScrollOffset:K,index:Z})=>{let q=a8({align:L,cachedBounds:A,containerScrollOffset:K,containerSize:T,index:Z,itemCount:a,itemSize:C});if(e){if(q=Bb({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),typeof e.scrollTo!="function"){const z=H(q);rc(h,z)||m(z)}return q}});return{getCellBounds:N,getEstimatedSize:I,scrollToIndex:$,startIndexOverscan:y,startIndexVisible:g,stopIndexOverscan:S,stopIndexVisible:x}}function d8(e){return k.useMemo(()=>e,Object.values(e))}function p8(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return rc(n,a)&&rc(r,l)&&rc(s,c)}function h8(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const m8="data-react-window-index";function g8({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:d,rowHeight:p,rowProps:h,tagName:m="div",style:g,...y}){const x=d8(h),S=k.useMemo(()=>k.memo(c,p8),[c]),[_,E]=k.useState(null),R=h8(p),T=k.useMemo(()=>R?q=>p.getRowHeight(q)??p.getAverageRowHeight():p,[R,p]),{getCellBounds:C,getEstimatedSize:A,scrollToIndex:N,startIndexOverscan:I,startIndexVisible:H,stopIndexOverscan:$,stopIndexVisible:L}=f8({containerElement:_,containerStyle:g,defaultContainerSize:n,direction:"vertical",itemCount:d,itemProps:x,itemSize:T,onResize:s,overscanCount:l});k.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]),yc(()=>{if(!_)return;const q=Array.from(_.children).filter((z,j)=>{if(z.hasAttribute("aria-hidden"))return!1;const F=`${I+j}`;return z.setAttribute(m8,F),!0});if(R)return p.observeRowElements(q)},[_,R,p,I,$]),k.useEffect(()=>{I>=0&&$>=0&&a&&a({startIndex:H,stopIndex:L},{startIndex:I,stopIndex:$})},[a,I,H,$,L]);const K=k.useMemo(()=>{const q=[];if(d>0)for(let z=I;z<=$;z++){const j=C(z);q.push(k.createElement(S,{...x,ariaAttributes:{"aria-posinset":z+1,"aria-setsize":d,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},[S,C,R,d,x,I,$]),Z=v.jsx("div",{"aria-hidden":!0,style:{height:A(),width:"100%",zIndex:-1}});return k.createElement(m,{role:"list",...y,className:t,ref:E,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...g}},K,e,Z)}const dN=k.createContext(null);function b8(){const e=k.useContext(dN);if(!e)throw new Error("VirtualizedMenuItem must be used within Menu.VirtualizedContent");return e}function y8({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}){const c=k.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}),[t,n,r,s,a,l]);return v.jsx(dN.Provider,{value:c,children:e})}const v8=4,D1="ui-menu--virtualized";function k8({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,d=q9();return v.jsx("div",{className:d.className,style:{...t,...d.style},onMouseMove:()=>a(e),children:s(l,e,c)})}function x8({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:d,style:p,maxHeight:h,width:m="200px",size:g,backdrop:y,closeOnSelect:x=!0,overscanCount:S=5,renderActivePreview:_,ref:E}){const R=Al(),{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=k.useRef(null),ie=k.useRef(null),te=k.useRef(A);te.current=A;const ne=k.useRef(null),[le,pe]=k.useState(null),[ye,Se]=k.useState(null),ze=y??!$,he=Mh(),{portalLayerStyles:Te}=qc("popover",C),Re=k.useRef(null);k.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,ke=k.useRef(null);k.useLayoutEffect(()=>{if(!T){ke.current=null,Re.current=null;return}if(A==null||ke.current===A)return;ke.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=k.useRef(q),Ce=k.useRef(T);k.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=k.useCallback((Y,X)=>{ne.current=Y,pe(we=>we===Y?we:Y),Se(we=>we===X?we:X)},[]);k.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=k.useCallback((Y,X)=>{Y===te.current&&X!=null&&Pe(X,Y)},[Pe]),fe=k.useCallback(Y=>{A!==Y&&(Re.current=Y,N(Y))},[A,N]),oe=k.useCallback(Y=>{Y.key==="Escape"&&(B.current="escape")},[B]),re=k.useCallback(Y=>{he(Y.nativeEvent)&&(B.current="backdrop",I(!1))},[B,I,he]),_e=k.useCallback(Y=>{if(!he(Y.nativeEvent))return;Y.preventDefault(),B.current="backdrop",I(!1);const Ge=document.elementsFromPoint(Y.clientX,Y.clientY).find(ut=>!ut.classList.contains(sk));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=Zc([z.setFloating,O,E]),ue=Nl();if(!C)return null;const Ie=h??K9,Be=typeof t=="number"?e.length*t:e.reduce((Y,X,we)=>Y+t(we),0),Ze=Math.min(Be,Math.max(0,Ie-v8*2)),Ye=g??R?.menuSize??"sm",ot={...j,...U,...p,...mk({width:m}),...Te,...Oe&&ve!==null?{top:"auto",bottom:ve}:{}},it=XA(Te),nt=ok({className:d?`${D1} ${d}`:D1,size:Ye,style:ot}),vt=QA(),st=JA(),kt=lk(),We=ak(!0),Ot=H9(),Fe=eN(),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(Uv,{...ue?{root:ue}:{},children:[ze&&v.jsx("div",{className:it.className,style:it.style,onClick:re,onContextMenu:_e,role:"none"}),v.jsx(Hv,{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(gA,{dismiss:!T,children:v.jsx(hk,{layerNodeId:L,children:v.jsxs(y8,{activeIndex:A,setIsOpen:I,getItemProps:D,listRef:K,closeOnSelect:x,onRowElementChange:ge,children:[s!=null?v.jsx("div",{className:st.className,style:st.style,children:v.jsx(nc,{value:"header",children:s})}):null,e.length>0?v.jsx("div",{className:kt.className,style:kt.style,children:v.jsx("div",{className:We.className,style:We.style,role:"presentation",children:v.jsx(g8,{listRef:ie,className:Ot.className,rowComponent:k8,rowProps:Xe,rowCount:e.length,rowHeight:t,overscanCount:S,style:{height:Ze,width:"100%",overflowX:"hidden",scrollbarWidth:"none"}})})}):l,a!=null?v.jsx("div",{className:Fe.className,style:Fe.style,children:v.jsx(nc,{value:"footer",children:a})}):null,_!=null?v.jsx(sN,{open:ht,placement:"right-start",anchorRef:ne,offset:6,closeOnSelect:!1,virtualFocus:!0,children:ht?Ke:null}):null]})})})})})})})]})}function S8({index:e,children:t,disabled:n=!1,onSelect:r,leading:s,trailing:a,wideLeftSection:l=!1,tooltip:c,tooltipContentKey:d,closeOnSelect:p,description:h,variant:m="default",checked:g,ref:y}){const{shouldAllowPointerInteraction:x}=Ci(),S=ef(),{activeIndex:_,setIsOpen:E,getItemProps:R,listRef:T,closeOnSelect:C,onRowElementChange:A}=b8(),N=p??C??!0,I=_===e,H=k.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(!x(G.nativeEvent)){G.preventDefault(),G.stopPropagation();return}$()},onKeyDown:G=>{n||(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),$())}}),q=ck(),z=fk(),j=dk(),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=uk({disabled:n,focused:I,hasDescription:h!=null,inSubmenu:S,variant:m}),P=g!==void 0,W=P&&s==null?v.jsx(aC,{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,[Ml]:"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(gk,{content:c,contentKey:d,children:B}):B}const Uh={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 w8(){return Uh.root}function E8(){return Uh.content}function T8(){return Uh.message}function _8(){return Uh.actions}function vc({message:e,actions:t,errorText:n,className:r}){const s=En({rootClass:"ui-empty-state",stylexStyles:w8(),className:r}),a=Nn(E8()),l=Nn(T8()),c=Nn(_8());return v.jsx("div",{className:s.className,style:s.style,children:v.jsxs("div",{className:a.className,style:a.style,children:[v.jsx(Zp,{as:"p",className:l.className,style:l.style,color:"tertiary",size:"lg",children:e}),n!=null?v.jsx(Zp,{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 pN=k.createContext(null);function hN(){const e=k.useContext(pN);if(!e)throw new Error("Menu.ExpandableSection components must be used within <Menu.ExpandableSection>");return e}function R8({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=k.useState(t),l=n!==void 0,c=l?n:s,d=h=>{l||a(h),r?.(h)},p=()=>d(!c);return v.jsx(pN.Provider,{value:{expanded:c,setExpanded:d,toggle:p},children:e})}function C8({children:e,leading:t,trailing:n,label:r}){const{expanded:s,setExpanded:a,toggle:l}=hN(),c=typeof t=="function"?t(s):t,d=p=>{if(p.key==="ArrowRight"&&!s){p.preventDefault(),p.stopPropagation(),a(!0);return}p.key==="ArrowLeft"&&s&&(p.preventDefault(),p.stopPropagation(),a(!1))};return v.jsx(aN,{closeOnSelect:!1,wideLeftSection:!0,leading:c,trailing:n,label:r??(typeof e=="string"?e:void 0),onKeyDown:d,onSelect:l,children:e})}function A8({children:e}){const{expanded:t}=hN();return t?v.jsx(v.Fragment,{children:e}):null}function N8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return yk(s,n)?v.jsx(O8,{...r,itemLabel:s,children:e}):null}function O8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:d,tooltipOpenDelay:p=0,tooltipCloseDelay:h=0,closeOnSelect:m,itemLabel:g}){const{activeIndex:y,getItemProps:x,setIsOpen:S,closeOnSelect:_}=Jc(),{shouldAllowPointerInteraction:E}=Ci(),R=ef(),T=bk(),C=Qc(),A=C==="body",N=m??_??!1,[I,H]=k.useState(r),$=n!==void 0,L=$?n:I,{ref:K,index:Z}=wh({label:g||null}),q=y===Z,z=jh(),j=k.useCallback(()=>{if(a)return;const Se=!L;$||H(Se);const ze={defaultPrevented:!1,preventDefault:()=>{ze.defaultPrevented=!0}};s?.(Se,ze),N&&!ze.defaultPrevented&&T(S)},[a,L,$,s,N,S,T]),F=k.useCallback(Se=>{if(!E(Se.nativeEvent)){Se.preventDefault(),Se.stopPropagation();return}Se.preventDefault(),Se.stopPropagation(),j()},[j,E]),U=k.useCallback(Se=>{a||(Se.key==="Enter"||Se.key===" ")&&(Se.preventDefault(),Se.stopPropagation(),j())},[a,j]),P=x({onClick:F,onKeyDown:U}),W=c!=null,D=uk({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}:{},[Ml]:C,className:D.className,style:D.style,...P},G=v.jsx(aC,{checked:L,disabled:a}),O=ck(),ie=fk(),te=dk(),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=d!=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(nN,{closeDelay:h,content:d,openDelay:p,children:ye}):d!=null?v.jsx(Ph,{content:d,placement:"right",offset:6,openDelay:p,closeDelay:h,className:Lh,sameAxisOnly:!0,interactive:!0,children:ye}):ye}function M8({children:e}){const t=U9();return v.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[v.jsx(vn,{name:"loading",size:"base",className:G9}),v.jsx("span",{children:e??"Loading..."})]})}function z1({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:p,instantClose:h,instantTransitions:m,returnFocusOnSelect:g,focusItemOnOpen:y,virtualFocus:x,shouldKeepOpenDuringDrag:S,lockPositionWhileOpen:_}){return v.jsx($F,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:p,instantClose:h,instantTransitions:m,returnFocusOnSelect:g,focusItemOnOpen:y,virtualFocus:x,shouldKeepOpenDuringDrag:S,lockPositionWhileOpen:_,children:e})}function I8(e){return go()===null?v.jsx(M$,{children:v.jsx(z1,{...e})}):v.jsx(z1,{...e})}function mN(e,t,n){const{ref:r,...s}=n,a=GP({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function D8({children:e,disabled:t=!1}){const{getTriggerProps:n}=Ci();return mN(e,t,n())}function z8({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Ci();k.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return mN(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 L8=Object.assign(sN,{useContext:Bh}),Pu=Object.assign(I8,{useContext:Ci,useLayerContext:cN,Trigger:D8,HoverTrigger:z8,Content:Y9,Item:aN,CheckboxItem:N8,TextItem:n8,SwitchItem:e8,Section:Gq,SearchInput:Hq,EmptyState:X9,LoadingState:M8,ExpandableSection:R8,ExpandableSectionTrigger:C8,ExpandableSectionContent:A8,SubMenu:L8,SubMenuItem:dq,SubMenuTrigger:fq,SubMenuContent:pq,VirtualizedContent:x8,VirtualizedItem:S8,VirtualizedSectionHeader:i8}),gN="data-composite-item-active",bN=k.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function j8(){return k.useContext(bN)}let yN=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function vN(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:d,elementsRef:p,labelsRef:h,nextIndexRef:m}=j8(),g=k.useRef(-1),[y,x]=k.useState(a??(s===yN.GuessFromOrder?()=>{if(g.current===-1){const E=m.current;m.current+=1,g.current=E}return g.current}:-1)),S=k.useRef(null),_=k.useCallback(E=>{if(S.current=E,y!==-1&&E!==null&&(p.current[y]=E,h)){const R=t!==void 0;h.current[y]=R?t:r?.current?.textContent??E.textContent}},[y,p,h,t,r]);return He(()=>{if(a!=null)return;const E=S.current;if(E)return l(E,n),()=>{c(E)}},[a,l,c,n]),He(()=>{if(a==null)return d(E=>{const R=S.current?E.get(S.current)?.index:null;R!=null&&x(R)})},[a,d,x]),k.useMemo(()=>({ref:_,index:y}),[y,_])}function P8(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=J_(),{ref:s,index:a}=vN(e),l=n===a,c=k.useRef(null),d=xs(s,c);return{compositeProps:k.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:d,index:a}}function jy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function xk(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=Ve(s),l=k.useRef(0),c=wr(B8).current,d=wr($8).current,[p,h]=k.useState(0),m=k.useRef(p),g=Ve((E,R)=>{d.set(E,R??null),m.current+=1,h(m.current)}),y=Ve(E=>{d.delete(E),m.current+=1,h(m.current)}),x=k.useMemo(()=>{const E=new Map;return Array.from(d.keys()).filter(T=>T.isConnected).sort(F8).forEach((T,C)=>{const A=d.get(T)??{};E.set(T,{...A,index:C})}),E},[d,p]);He(()=>{if(typeof MutationObserver!="function"||x.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 x.forEach((R,T)=>{T.parentElement&&E.observe(T.parentElement,{childList:!0})}),()=>{E.disconnect()}},[x]),He(()=>{m.current===p&&(n.current.length!==x.size&&(n.current.length=x.size),r&&r.current.length!==x.size&&(r.current.length=x.size),l.current=x.size),a(x)},[a,x,n,r,p]),He(()=>()=>{n.current=[]},[n]),He(()=>()=>{r&&(r.current=[])},[r]);const S=Ve(E=>(c.add(E),()=>{c.delete(E)}));He(()=>{c.forEach(E=>E(x))},[c,x]);const _=k.useMemo(()=>({register:g,unregister:y,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[g,y,S,n,r,l]);return v.jsx(bN.Provider,{value:_,children:t})}function $8(){return new Map}function B8(){return new Set}function F8(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 U8(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const q8=[];function H8(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,onLoop:s,dense:a=!1,orientation:l="both",direction:c,highlightedIndex:d,onHighlightedIndexChange:p,rootRef:h,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:y,modifierKeys:x=q8}=e,[S,_]=k.useState(0),E=n>1,R=k.useRef(null),T=xs(R,h),C=k.useRef([]),A=k.useRef(!1),N=d??S,I=Ve((K,Z=!1)=>{if((p??_)(K),Z){const q=C.current[K];hE(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(gN))??null,z=q?Z.indexOf(q):-1;z!==-1&&I(z),hE(R.current,q,c,l)}),$=Ve((K,Z,q)=>s?s?.(K,Z,q,C):q),L=k.useMemo(()=>({"aria-orientation":l==="both"?void 0:l,ref:T,onFocus(K){const Z=R.current,q=gr(K.nativeEvent);!Z||q==null||!pE(q)||q.setSelectionRange(0,q.value.length??0)},onKeyDown(K){const Z=m?Tj:tC;if(!Z.has(K.key)||G8(K,x)||!R.current)return;const z=c==="rtl",j=z?pc:ll,F={horizontal:j,vertical:Ho,both:j}[l],U=z?ll:pc,P={horizontal:U,vertical:al,both:U}[l],W=gr(K.nativeEvent);if(W!=null&&pE(W)&&!U8(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=dp(C,y),G=xy(C,y);if(E){const ne=t||Array.from({length:C.current.length},()=>({width:1,height:1})),le=gR(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[mR(le.map(Se=>Se!=null?C.current[Se]:null),{event:K,orientation:l,loopFocus:r,onLoop:$,cols:n,disabledIndices:yR([...y||C.current.map((Se,ze)=>vs(C.current,ze)?ze:void 0),void 0],le),minIndex:pe,maxIndex:ye,prevIndex:bR(N>G?B:N,ne,le,n,K.key===Ho?"bl":K.key===ll?"tr":"tl"),rtl:z})]}const O={horizontal:[j],vertical:[Ho],both:[j,Ho]}[l],ie={horizontal:[U],vertical:[al],both:[U,al]}[l],te=E?Z:{horizontal:m?wj:JR,vertical:m?Ej:eC,both:Z}[l];m&&(K.key===Fc?D=B:K.key===Uc&&(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&&!fc(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,x,I,l,g]);return k.useMemo(()=>({props:L,highlightedIndex:N,onHighlightedIndexChange:I,elementsRef:C,disabledIndices:y,onMapChange:H,relayKeyboardEvent:L.onKeyDown}),[L,N,I,C,y,H])}function G8(e,t){for(const n of Oj.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function V8(e){const{render:t,className:n,style:r,refs:s=uc,props:a=uc,state:l=hr,stateAttributesMapping:c,highlightedIndex:d,onHighlightedIndexChange:p,orientation:h,dense:m,itemSizes:g,loopFocus:y,onLoop:x,cols:S,enableHomeAndEndKeys:_,onMapChange:E,stopEventPropagation:R=!0,rootRef:T,disabledIndices:C,modifierKeys:A,highlightItemOnHover:N=!1,tag:I="div",...H}=e,$=ek(),{props:L,highlightedIndex:K,onHighlightedIndexChange:Z,elementsRef:q,onMapChange:z,relayKeyboardEvent:j}=H8({itemSizes:g,cols:S,loopFocus:y,onLoop:x,dense:m,orientation:h,highlightedIndex:d,onHighlightedIndexChange:p,rootRef:T,stopEventPropagation:R,enableHomeAndEndKeys:_,direction:$,disabledIndices:C,modifierKeys:A}),F=kn(I,e,{state:l,ref:s,props:[L,...a,H],stateAttributesMapping:c}),U=k.useMemo(()=>({highlightedIndex:K,onHighlightedIndexChange:Z,highlightItemOnHover:N,relayKeyboardEvent:j}),[K,Z,N,j]);return v.jsx(Q_.Provider,{value:U,children:v.jsx(xk,{elementsRef:q,onMapChange:P=>{E?.(P),z(P)},children:F})})}const kN=k.createContext(void 0);function Sk(){const e=k.useContext(kN);if(e===void 0)throw new Error(Xn(64));return e}let K8=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const wk={tabActivationDirection:e=>({[K8.activationDirection]:e})},Z8=k.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:d,style:p,...h}=t,m=Object.hasOwn(t,"defaultValue"),g=k.useRef([]),[y,x]=k.useState(()=>new Map),[S,_]=hc({controlled:d,default:s,name:"Tabs",state:"value"}),E=d!==void 0,[R,T]=k.useState(()=>new Map),C=k.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]=k.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:I,tabActivationDirection:H}=A;let $=H,L=!1;I!==S&&($=L1(I,S,l,R),L=I!=null&&S!=null&&C(S)==null);const K=L?I:S,Z=I!==K||H!==$;He(()=>{Z&&N({previousValue:K,tabActivationDirection:$})},[K,Z,$]);const q=Ve((O,ie)=>{const te=L1(S,O,l,R);ie.activationDirection=te,a?.(O,ie),!ie.isCanceled&&_(O)}),z=Ve((O,ie)=>{x(te=>{if(te.get(O)===ie)return te;const ne=new Map(te);return ne.set(O,ie),ne})}),j=Ve((O,ie)=>{x(te=>{if(!te.has(O)||te.get(O)!==ie)return te;const ne=new Map(te);return ne.delete(O),ne})}),F=k.useCallback(O=>y.get(O),[y]),U=k.useCallback(O=>{for(const ie of R.values())if(O===ie?.value)return ie?.id},[R]),P=k.useMemo(()=>({getTabElementBySelectedValue:C,getTabIdByPanelValue:U,getTabPanelIdByValue:F,onValueChange:q,orientation:l,registerMountedTabPanel:z,setTabMap:T,unregisterMountedTabPanel:j,tabActivationDirection:$,value:S}),[C,U,F,q,l,z,T,j,$,S]),W=k.useMemo(()=>{for(const O of R.values())if(O!=null&&O.value===S)return O},[R,S]),D=k.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&&S!==null;if(m&&O&&S===s||!O&&!ie)return;const ne=D??null;S!==ne&&(_(ne),N(le=>le.tabActivationDirection==="none"?le:{...le,tabActivationDirection:"none"}))},[s,D,m,E,W,_,R,S]);const G=kn("div",t,{state:{orientation:l,tabActivationDirection:$},ref:n,props:h,stateAttributesMapping:wk});return v.jsx(kN.Provider,{value:P,children:v.jsx(xk,{elementsRef:g,children:G})})});function L1(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[d,p]of r.entries()){if(p==null)continue;const h=p.value??p.index;if(e===h&&(s=d),t===h&&(a=d),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 xN=k.createContext(void 0);function SN(){const e=k.useContext(xN);if(e===void 0)throw new Error(Xn(65));return e}const W8=k.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:d=!0,style:p,...h}=t,{value:m,getTabPanelIdByValue:g,orientation:y}=Sk(),{activateOnFocus:x,highlightedTabIndex:S,onTabActivation:_,registerTabResizeObserverElement:E,setHighlightedTabIndex:R,tabsListElement:T}=SN(),C=hh(c),A=k.useMemo(()=>({disabled:s,id:C,value:l}),[s,C,l]),{compositeProps:N,compositeRef:I,index:H}=P8({metadata:A}),$=l===m,L=k.useRef(!1),K=k.useRef(null);k.useEffect(()=>{const G=K.current;if(G)return E(G)},[E]),He(()=>{if(L.current){L.current=!1;return}if(!($&&H>-1&&S!==H))return;const G=T;if(G!=null){const O=Dr(Ft(G));if(O&&xt(G,O))return}s||R(H)},[$,H,S,R,s,T]);const{getButtonProps:Z,buttonRef:q}=jc({disabled:s,native:d,focusableWhenDisabled:!0}),z=g(l),j=k.useRef(!1),F=k.useRef(!1);function U(G){$||s||_(l,_t(Ss,G.nativeEvent,void 0,{activationDirection:"none"}))}function P(G){$||(H>-1&&!s&&R(H),!s&&x&&(!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 kn("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,[gN]:$?"":void 0,onKeyDownCapture(){L.current=!0}},h,Z]})});function Y8(){return ar}function X8(){return!1}function Q8(){return!0}function J8(){return Lv.useSyncExternalStore(Y8,X8,Q8)}const e5='!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 Za=(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 t5=k.createContext(void 0),n5={disableStyleElements:!1};function wN(){return k.useContext(t5)??n5}const r5={...wk,activeTabPosition:()=>null,activeTabSize:()=>null},i5=k.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:d}=wN(),{getTabElementBySelectedValue:p,orientation:h,tabActivationDirection:m,value:g}=Sk(),{tabsListElement:y,registerIndicatorUpdateListener:x}=SN(),S=J8(),_=J2();k.useEffect(()=>x(_),[x,_]);let E=0,R=0,T=0,C=0,A=0,N=0,I=!1;if(g!=null&&y!=null){const z=p(g);if(I=!0,z!=null){const{width:j,height:F}=E1(z),{width:U,height:P}=E1(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=k.useMemo(()=>I?{left:E,right:R,top:T,bottom:C}:null,[E,R,T,C,I]),$=k.useMemo(()=>I?{width:A,height:N}:null,[A,N,I]),L=k.useMemo(()=>{if(I)return{[Za.activeTabLeft]:`${E}px`,[Za.activeTabRight]:`${R}px`,[Za.activeTabTop]:`${T}px`,[Za.activeTabBottom]:`${C}px`,[Za.activeTabWidth]:`${A}px`,[Za.activeTabHeight]:`${N}px`}},[E,R,T,C,A,N,I]),K=I&&A>0&&N>0,q=kn("span",t,{state:{orientation:h,activeTabPosition:H,activeTabSize:$,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:L,hidden:!K},c,{suppressHydrationWarning:!0}],stateAttributesMapping:r5});return g==null?null:v.jsxs(k.Fragment,{children:[q,S&&a&&v.jsx("script",{nonce:d,dangerouslySetInnerHTML:{__html:e5},suppressHydrationWarning:!0})]})}),s5=k.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...d}=t,{onValueChange:p,orientation:h,value:m,setTabMap:g,tabActivationDirection:y}=Sk(),[x,S]=k.useState(0),[_,E]=k.useState(null),R=k.useRef(new Set),T=k.useRef(new Set),C=k.useRef(null),A=Ve(()=>{R.current.forEach(Z=>{Z()})});k.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&&p(Z,q)}),$={orientation:h,tabActivationDirection:y},L={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},K=k.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:N,registerTabResizeObserverElement:I,onTabActivation:H,setHighlightedTabIndex:S,tabsListElement:_}),[r,x,N,I,H,S,_]);return v.jsx(xN.Provider,{value:K,children:v.jsx(V8,{render:l,className:s,style:c,state:$,refs:[n,E],props:[L,d],stateAttributesMapping:wk,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:S,onMapChange:g,disabledIndices:uc})})}),j1={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}},o5={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}},a5={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}},l5={sm:{kaIpWk:"ui-1bl94mz",$$css:!0},md:{kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kaIpWk:"ui-1e1y6u3",$$css:!0}},Fb={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}},u5={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}},c5={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}},EN=k.createContext(null);function f5(){const e=k.use(EN);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function d5({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",disabled:a=!1,fullWidth:l=!1,children:c,"aria-label":d,"aria-labelledby":p,...h}){const m=k.useMemo(()=>({variant:r,size:s,disabled:a,fullWidth:l}),[a,l,s,r]);return v.jsx(EN.Provider,{value:m,children:v.jsx(Z8,{...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(s5,{activateOnFocus:!0,"aria-label":d,"aria-labelledby":p,"data-component":"segmented-control-list",...Nn(j1.base,r==="default"&&j1.default,r==="default"&&o5[s]),children:[c,r==="default"?v.jsx(i5,{"data-component":"segmented-control-indicator",...Nn(a5.base,l5[s])}):null]})})})}function p5({value:e,disabled:t=!1,children:n,...r}){const s=f5();return v.jsx(W8,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,...Nn(Fb.base,s.size==="sm"?fo.root:ks.root,s.variant==="default"?u5[s.size]:c5[s.size],s.variant==="compact"&&Fb.compact,s.fullWidth&&Fb.fullWidth),children:n})}const P1=Object.assign(d5,{Item:p5}),TN="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}},$1={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-dpxx8g",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj",$$css:!0}},Ub={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}},Kd={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}},h5="sm";function m5(e){return[bn.base,ks.root,{"ui--default-marker":"ui--default-marker",$$css:!0},e.animated?bn.animated:null,v5(e.variant),k5(e.size),e.variant==="filled"?bn.variantFilled:null,e.hug?null:bn.hugFalse,e.shape==="pill"?bn.shapePill:bn.shapeRounded,e.frame==="content"?x5(e):null,e.frame==="content"&&!e.hug?S5(e):null]}function g5(e){return[Ol.root,Bv.root,$1.base,e?$1.placeholder:null]}function b5(e,t){return[Ub.base,e==="ghost"||e==="unfilled"?Ub.muted:null,e==="ghost"&&t?Ub.ghostOpen:null]}function y5(e,t){return[Kd.base,e==="ghost"?Kd.ghost:null,t&&e!=="ghost"?Kd.open:null,t&&e==="ghost"?Kd.ghostOpen:null]}function v5(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 k5(e){switch(e){case"lg":return bn.sizeLg;case"md":case"base":return bn.sizeMd}}function x5(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 S5(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 w5({children:e,variant:t="default",frame:n="container",shape:r="rounded",size:s=TN,hug:a=!0,className:l,style:c,disabled:d=!1,id:p,leading:h,trailing:m,open:g=!1,animated:y=!1,placeholder:x,hideChevron:S=!1,ref:_,...E}){const R=e==null&&x!=null,T=En({rootClass:"ui-select-trigger",stylexStyles:m5({animated:y,frame:n,hug:a,shape:r,size:s,variant:t}),className:l,style:c}),C=En({rootClass:"ui-select-label",stylexStyles:g5(R)}),A=Nn(b5(t,g)),N=En({rootClass:"ui-select-icon",stylexStyles:y5(t,g)});return v.jsxs("button",{...E,ref:_,type:"button",id:p,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":d||void 0,"data-animated":y||void 0,disabled:d,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?x:e}),m!=null&&v.jsx("span",{className:A.className,style:A.style,children:m}),S?null:v.jsx(vn,{name:t==="filled"||t==="ghost"||t==="unfilled"?"chevron-down":"chevrons-up-down",size:10,className:N.className,style:N.style})]})}const _N=k.createContext(null),RN=k.createContext(null);function _s(){const e=k.useContext(_N);if(e===null)throw new Error(Xn(60));return e}function CN(){const e=k.useContext(RN);if(e===null)throw new Error(Xn(61));return e}const E5=(e,t)=>Object.is(e,t);function Sl(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function T5(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:Sl(t,r,n))}function ic(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:Sl(r,t,n))}function _5(e,t,n){return e.filter(r=>!Sl(t,r,n))}function AN(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function R5(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(AN(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 NN(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 jy(e)}function Ja(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?jy(e.value):jy(e)}function ON(e,t,n){function r(){return NN(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=AN(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 C5(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(v.jsx(k.Fragment,{children:ON(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:Ja(t,r)!==""}),hasNullItemLabel:rt((e,t)=>t?R5(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=>Sl(n,a,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Sl(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 Wu(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const hs=1;function MN(e,t){return Math.max(0,e-t)}function A5(e,t){if(t<=0)return 0;const n=Wu(e,0,t),r=n,s=t-n,a=r<=hs,l=s<=hs;return a&&l?r<=s?0:t:a?0:l?t:n}function N5(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:d,form:p,autoComplete:h,disabled:m=!1,readOnly:g=!1,required:y=!1,modal:x=!0,actionsRef:S,inputRef:_,onOpenChangeComplete:E,items:R,multiple:T=!1,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N=E5,highlightItemOnHover:I=!0,children:H}=e,{clearErrors:$}=EP(),{setDirty:L,setTouched:K,setFocused:Z,shouldValidateOnChange:q,validityData:z,setFilled:j,name:F,disabled:U,validation:P,validationMode:W}=Vc(),D=vk({id:t}),B=U||m,G=F??d,[O,ie]=hc({controlled:n,default:T?r??uc:r,name:"Select",state:"value"}),[te,ne]=hc({controlled:a,default:l,name:"Select",state:"open"}),le=k.useRef([]),pe=k.useRef([]),ye=k.useRef(null),Se=k.useRef(null),ze=k.useRef(0),he=k.useRef(null),Te=k.useRef([]),Re=k.useRef(!1),Oe=k.useRef(!1),ve=k.useRef(null),ke=k.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Me=k.useRef(!1),{mounted:Ce,setMounted:Pe,transitionStatus:ge}=Bc(te),{openMethod:fe,triggerProps:oe}=qj(te),re=wr(()=>new VR({id:D,labelId:void 0,modal:x,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=nU(fe),Ze=fe??Be,Ye=k.useMemo(()=>T&&Array.isArray(O)&&O.length===0?"":Ja(O,A),[T,O,A]),ot=k.useMemo(()=>T&&Array.isArray(O)?O.map(tt=>Ja(tt,A)):Ja(O,A),[T,O,A]),it=qn(re.state.triggerElement),nt=Ve(()=>ot);oC(it,{id:D,value:O,getValue:nt});const vt=k.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 _n=Qn[Qn.length-1],an=ic(Dt,_n,N);re.set("selectedIndex",an===-1?null:an);return}const Kn=ic(Dt,O,N);re.set("selectedIndex",Kn===-1?null:Kn)},[T,te,O,Te,N,re]),rC(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===dh||Dt.reason===Sv)&&(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")})}}),kt=Ve(()=>{Pe(!1),re.update({activeIndex:null,openMethod:null}),E?.(!1)});aa({enabled:!S,open:te,ref:ye,onComplete(){te||kt()}}),k.useImperativeHandle(S,()=>({unmount:kt}),[kt]);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=MN(tt.scrollHeight,tt.clientHeight),Kn=A5(tt.scrollTop,Dt),Qn=Kn>0,_n=Kn<Dt;re.state.scrollUpArrowVisible!==Qn&&re.set("scrollUpArrowVisible",Qn),re.state.scrollDownArrowVisible!==_n&&re.set("scrollDownArrowVisible",_n)}),Fe=WR({open:te,onOpenChange:st,elements:{reference:ue,floating:Ie}}),Ke=JL(Fe,{enabled:!g&&!B,event:"mousedown"}),ht=IR(Fe,{bubbles:!1}),Xe=yj(Fe,{enabled:!g&&!B,listRef:le,activeIndex:_e,selectedIndex:J,disabledIndices:uc,onNavigate(tt){tt===null&&!te||re.set("activeIndex",tt)},focusItemOnHover:I}),Y=vj(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}=QR([Ke,ht,Xe,Y]),ut=k.useMemo(()=>zc(X(),oe,D?{id:D}:hr),[X,oe,D]);nC(()=>{re.update({popupProps:we(),triggerProps:ut})}),He(()=>{re.update({id:D,modal:x,multiple:T,value:O,open:te,mounted:Ce,transitionStatus:ge,popupProps:we(),triggerProps:ut,items:R,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N,openMethod:Ze})},[re,D,x,T,O,te,Ce,ge,we,ut,R,C,A,N,Ze]);const St=k.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:ke,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=xs(_,P.inputRef),Le=T&&Array.isArray(O)&&O.length>0,qe=T?void 0:G,Wt=k.useMemo(()=>!T||!Array.isArray(O)||!G?null:O.map(tt=>{const Dt=Ja(tt,A);return v.jsx("input",{type:"hidden",form:p,name:G,value:Dt},Dt)}),[T,O,p,G,A]);return v.jsx(_N.Provider,{value:St,children:v.jsxs(RN.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 _n=Te.current.find(an=>Ja(an,A).toLowerCase()===Dt.toLowerCase()||NN(an,C).toLowerCase()===Dt.toLowerCase());_n!=null&&(L(_n!==z.initialValue),We(_n,Kn),q()&&P.commit(_n))}re.set("forceMount",!0),queueMicrotask(Qn)}}),id:D&&qe==null?`${D}-hidden-input`:void 0,form:p,name:qe,autoComplete:h,value:Ye,disabled:B,required:y&&!Le,readOnly:g,ref:$e,style:G?wL:cR,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Wt]})})}function O5(e,t){return e??t}function M5(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,d=parseFloat(s.width)||0,p=parseFloat(s.height)||0,h=Math.max(t.width,l,d),m=Math.max(t.height,c,p),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 Zd=2,I5=400,B1=200,D5={...Yz,...Gc,value:()=>null},z5=k.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:d,...p}=t,{setTouched:h,setFocused:m,validationMode:g,state:y,disabled:x}=Vc(),{labelId:S}=Fv(),{store:_,setOpen:E,selectionRef:R,validation:T,readOnly:C,required:A,alignItemWithTriggerActiveRef:N,disabled:I,keyboardActiveRef:H}=_s(),$=x||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=O5(S,F);vk({id:D});const G=qn(q),O=k.useRef(null),{getButtonProps:ie,buttonRef:te}=jc({disabled:$,native:c}),ne=Ve(Oe=>{_.set("triggerElement",Oe)}),le=xs(n,O,te,ne),pe=fi(),ye=fi(),Se=fi(),ze=fi();k.useEffect(()=>{if(L)return!(U||W)?Se.start(I5,()=>{R.current.allowUnselectedMouseUp=!0,R.current.allowSelectedMouseUp=!0}):ze.start(B1,()=>{R.current.allowUnselectedMouseUp=!0,Se.start(B1,()=>{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=k.useMemo(()=>z?.id??Rp(q)?.id,[z,q]),Te=zc(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){xt(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 ke(Me){if(!O.current)return;const Ce=Me.target;if(xt(O.current,Ce)||xt(G.current,Ce)||Ce===O.current)return;const Pe=M5(O.current);Me.clientX>=Pe.left-Zd&&Me.clientX<=Pe.right+Zd&&Me.clientY>=Pe.top-Zd&&Me.clientY<=Pe.bottom+Zd||E(!1,_t(lL,Me))}ye.start(0,()=>{ve.addEventListener("mouseup",ke,{once:!0})})}},T.getValidationProps,p,ie);Te.role="combobox";const Re={...y,open:L,disabled:$,value:K,readOnly:C,placeholder:!U};return kn("button",t,{ref:[n,O],state:Re,stateAttributesMapping:D5,props:Te})}),L5={value:()=>null},j5=k.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...d}=t,{store:p,valueRef:h}=_s(),m=bt(p,gt.value),g=bt(p,gt.items),y=bt(p,gt.itemToStringLabel),x=bt(p,gt.hasSelectedValue),S=!x&&l!=null&&a==null,_=bt(p,gt.hasNullItemLabel,S),E={value:m,placeholder:!x};let R=null;return typeof a=="function"?R=a(m):a!=null?R=a:!x&&l!=null&&!_?R=l:Array.isArray(m)?R=C5(m,g,y):R=ON(m,g,y),kn("span",t,{state:E,ref:[n,h],props:[{children:R},d],stateAttributesMapping:L5})}),P5=k.createContext(void 0),$5=k.forwardRef(function(t,n){const{store:r}=_s(),s=bt(r,gt.mounted),a=bt(r,gt.forceMount);return s||a?v.jsx(P5.Provider,{value:!0,children:v.jsx(HL,{ref:n,...t})}):null}),B5={...ah,...oa},F5=k.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,{store:c}=_s(),d=bt(c,gt.open),p=bt(c,gt.mounted),h=bt(c,gt.transitionStatus);return kn("div",t,{state:{open:d,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!p,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:B5})}),IN=k.createContext(void 0);function DN(){const e=k.useContext(IN);if(!e)throw new Error(Xn(59));return e}function Wp(e,t){e&&Object.assign(e.style,t)}const zN={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},U5=20;function q5(e,t,n,r){const[s,a]=k.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-U5)},[e,t,n]),Fj(e&&(!t||s),r)}const H5={position:"fixed"},G5=k.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:d="center",sideOffset:p=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:g,arrowPadding:y=5,sticky:x=!1,disableAnchorTracking:S,alignItemWithTrigger:_=!0,collisionAvoidance:E=Dz,style:R,...T}=t,{store:C,listRef:A,labelsRef:N,alignItemWithTriggerActiveRef:I,selectedItemTextRef:H,valuesRef:$,initialValueRef:L,popupRef:K,setValue:Z}=_s(),q=CN(),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=k.useRef(null),ie=k.useRef(null),[te,ne]=k.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]),k.useImperativeHandle(I,()=>le),q5((le||F)&&z,P==="touch",W,D);const pe=zA({anchor:r,floatingRootContext:q,positionMethod:s,mounted:j,side:c,sideOffset:p,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:g,sticky:x,disableAnchorTracking:S??le,collisionAvoidance:E,keepMounted:!0}),ye=le?"none":pe.side,Se=le?H5:pe.positionerStyles,ze={open:z,side:ye,align:pe.align,anchorHidden:pe.anchorHidden},he=Ve(ke=>{C.set("positionerElement",ke)}),Te=LA(t,ze,{styles:Se,transitionStatus:G,props:T,refs:[n,he],hidden:!j,inert:!z}),Re=k.useRef(0),Oe=Ve(ke=>{if(ke.size===0&&Re.current===0||$.current.length===0)return;const Me=Re.current;if(Re.current=ke.size,ke.size===Me)return;const Ce=_t(Ss);if(Me!==0&&!C.state.multiple&&U!==null&&ic($.current,U,B)===-1){const ge=L.current,oe=ge!=null&&ic($.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=>ic($.current,fe,B)!==-1,ge=U.filter(fe=>Pe(fe));(ge.length!==U.length||ge.some(fe=>!T5(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:""};Wp(W,Pe),Wp(K.current,Pe)}}),ve=k.useMemo(()=>({...pe,side:ye,alignItemWithTriggerActive:le,setControlledAlignItemWithTrigger:ne,scrollUpArrowRef:O,scrollDownArrowRef:ie}),[pe,ye,le,ne]);return v.jsx(xk,{elementsRef:A,labelsRef:N,onMapChange:Oe,children:v.jsxs(IN.Provider,{value:ve,children:[j&&F&&v.jsx(Dj,{inert:Ij(!z),cutout:D}),Te]})})}),Wd="base-ui-disable-scrollbar",Py={className:Wd,getElement(e){return v.jsx("style",{nonce:e,href:Wd,precedence:"base-ui:low",children:`.${Wd}{scrollbar-width:none}.${Wd}::-webkit-scrollbar{display:none}`})}},V5=k.createContext(void 0);function K5(e){return k.useContext(V5)}const Z5={...ah,...oa},W5=k.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:d,popupRef:p,onOpenChangeComplete:h,setOpen:m,valueRef:g,selectedItemTextRef:y,keyboardActiveRef:x,multiple:S,handleScrollArrowVisibility:_,scrollHandlerRef:E,listRef:R,highlightItemOnHover:T}=_s(),{side:C,align:A,alignItemWithTriggerActive:N,isPositioned:I,setControlledAlignItemWithTrigger:H,scrollDownArrowRef:$,scrollUpArrowRef:L}=DN(),K=K5()!=null,Z=CN(),q=ek(),{nonce:z,disableStyleElements:j}=wN(),F=bt(d,gt.id),U=bt(d,gt.open),P=bt(d,gt.mounted),W=bt(d,gt.popupProps),D=bt(d,gt.transitionStatus),B=bt(d,gt.triggerElement),G=bt(d,gt.positionerElement),O=bt(d,gt.listElement),ie=k.useRef(!1),te=k.useRef(!1),ne=k.useRef({}),le=Pc(),pe=Ve(he=>{if(!G||!p.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=U1(G),ve=Yu(G.getBoundingClientRect().height,"y",Oe),ke=Ft(G),Me=getComputedStyle(G),Ce=parseFloat(Me.marginTop),Pe=parseFloat(Me.marginBottom),ge=F1(getComputedStyle(p.current)),fe=Math.min(ke.documentElement.clientHeight-Ce-Pe,ge),oe=he.scrollTop,re=Yd(he);let _e=0,J=null,ue=!1,Ie=!1;const Be=it=>{G.style.height=`${it}px`},Ze=(it,nt)=>{const vt=Wu(it,0,fe-ve);vt>0&&Be(ve+vt),he.scrollTop=nt,fe-(ve+vt)<=hs&&(ie.current=!0),_()},Ye=Te?re-oe:oe,ot=Math.min(ve+Ye,fe);if(_e=ot,Ye<=hs){Ze(Ye,Te?re:0);return}if(fe-ot>hs)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=Yd(he),nt=Ie?it:Wu(J,0,it);Math.abs(he.scrollTop-nt)>hs&&(he.scrollTop=nt)}(ue||_e>=fe-hs)&&(ie.current=!0),_()});k.useImperativeHandle(E,()=>pe,[pe]),aa({open:U,ref:p,onComplete(){U&&h?.(!0)}});const ye={open:U,transitionStatus:D,side:C,align:A};He(()=>{!G||!p.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})},[p,G]),He(()=>{U||N||(te.current=!1,ie.current=!1,Wp(G,ne.current))},[U,N,G,p]),He(()=>{const he=p.current;if(!U||!B||!G||!he||N&&!I||d.state.transitionStatus==="ending")return;if(!N){te.current=!0,le.request(_),he.style.removeProperty("--transform-origin");return}const Te=Y5(he);he.style.removeProperty("--transform-origin");try{const Re=y.current,Oe=g.current,ve=getComputedStyle(G),ke=getComputedStyle(he),Me=Ft(B),Ce=yn(G),Pe=U1(B),ge=Xd(B.getBoundingClientRect(),Pe),fe=Xd(G.getBoundingClientRect(),Pe),oe=ge.height,re=O||he,_e=re.scrollHeight,J=parseFloat(ke.borderBottomWidth),ue=parseFloat(ve.marginTop)||10,Ie=parseFloat(ve.marginBottom)||10,Be=parseFloat(ve.minHeight)||100,Ze=F1(ke),Ye=5,ot=5,it=20,nt=Me.documentElement.clientHeight-ue-Ie,vt=Me.documentElement.clientWidth,st=nt-ge.bottom+oe;let kt,We=q==="rtl"?ge.right-fe.width:ge.left,Ot=0;if(Re&&Oe){const $e=Xd(Oe.getBoundingClientRect(),Pe);kt=Xd(Re.getBoundingClientRect(),Pe),We=fe.left+(q==="rtl"?$e.right-kt.right:$e.left-kt.left);const Le=$e.top-ge.top+$e.height/2;Ot=kt.top-fe.top+kt.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=`${Wu(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=Yd(re),we=Xe>=X-hs;we&&(Ke=Math.min(nt,fe.height)-(Xe-X));const Ge=ge.top<it||ge.bottom>nt-it||Math.ceil(Ke)+hs<Math.min(_e,Be),ut=(Ce.visualViewport?.scale??1)!==1&&Ev;if(Ge||ut){te.current=!0,Wp(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=Yd(re)}else G.style.bottom="0",re.scrollTop=Xe;if(kt){const $e=fe.top,Le=fe.height,qe=kt.top+kt.height/2,Wt=Le>0?(qe-$e)/Le*100:50,tt=Wu(Wt,0,100);he.style.setProperty("--transform-origin",`50% ${tt}%`)}(St===nt||Ke>=Ze)&&(ie.current=!0),_(),T&&d.state.selectedIndex===null&&d.state.activeIndex===null&&R.current[0]!=null&&d.set("activeIndex",0),te.current=!0}finally{Te()}},[d,U,G,B,g,y,p,_,N,H,le,$,L,O,R,T,q,I]),k.useEffect(()=>{if(!N||!G||!U)return;const he=yn(G);function Te(Re){m(!1,_t(cL,Re))}return Nt(he,"resize",Te)},[m,N,G,U]);const Se={...O?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${F}-list`},onKeyDown(he){x.current=!0,K&&_j.has(he.key)&&he.stopPropagation()},onMouseMove(){x.current=!1},onScroll(he){O||pe(he.currentTarget)},...N&&{style:O?{height:"100%"}:zN}},ze=kn("div",t,{ref:[n,p],state:ye,stateAttributesMapping:Z5,props:[W,Se,tk(D),{className:!O&&N?Py.className:void 0},c]});return v.jsxs(k.Fragment,{children:[!j&&Py.getElement(z),v.jsx(QL,{context:Z,modal:!1,disabled:!P,returnFocus:l,restoreFocus:!0,children:ze})]})});function F1(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Yd(e){return MN(e.scrollHeight,e.clientHeight)}function U1(e){return BR.getScale(e)}function Yu(e,t,n){return e/n[t]}function Xd(e,t){return cc({x:Yu(e.x,"x",t),y:Yu(e.y,"y",t),width:Yu(e.width,"x",t),height:Yu(e.height,"y",t)})}const q1=[["transform","none"],["scale","1"],["translate","0 0"]];function Y5(e){const{style:t}=e,n={};for(const[r,s]of q1)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of q1){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const X5=k.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,{store:c,scrollHandlerRef:d}=_s(),{alignItemWithTriggerActive:p}=DN(),h=bt(c,gt.hasScrollArrows),m=bt(c,gt.openMethod),g=bt(c,gt.multiple),x={id:`${bt(c,gt.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(_){d.current?.(_.currentTarget)},...p&&{style:zN},className:h&&m!=="touch"?Py.className:void 0},S=Ve(_=>{c.set("listElement",_)});return kn("div",t,{ref:[n,S],props:[x,l]})}),LN=k.createContext(void 0);function Ek(){const e=k.useContext(LN);if(!e)throw new Error(Xn(57));return e}const Q5=k.memo(k.forwardRef(function(t,n){const{render:r,className:s,value:a=null,label:l,disabled:c=!1,nativeButton:d=!1,style:p,...h}=t,m=k.useRef(null),g=vN({label:l,textRef:m,indexGuessBehavior:yN.GuessFromOrder}),{store:y,getItemProps:x,setOpen:S,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=k.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&&Sl(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=x({active:N,selected:I});j.id=void 0;const F=k.useRef(null),U=k.useRef("mouse"),P=k.useRef(!1),{getButtonProps:W,buttonRef:D}=jc({disabled:c,focusableWhenDisabled:!0,native:d,composite:!0});function B(te){const ne=y.state.value;if(C){const le=Array.isArray(ne)?ne:[],pe=I?_5(le,a,$):[...le,a];_(pe,_t(ab,te))}else _(a,_t(ab,te)),S(!1,_t(ab,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=kn("div",t,{ref:[D,n,g.ref,Z],state:z,props:[j,G,h,W]}),ie=k.useMemo(()=>({selected:I,indexRef:q,textRef:m,selectedByFocus:H,hasRegistered:K}),[I,q,m,H,K]);return v.jsx(LN.Provider,{value:ie,children:O})})),J5=k.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=Ek();return r||s?v.jsx(eH,{...t,ref:n}):null}),eH=k.memo(k.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=Ek(),d=k.useRef(null),{transitionStatus:p,setMounted:h}=Bc(c),g=kn("span",e,{ref:[t,d],state:{selected:c,transitionStatus:p},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:oa});return aa({open:c,ref:d,onComplete(){c||h(!1)}}),g})),tH=k.memo(k.forwardRef(function(t,n){const{indexRef:r,textRef:s,selectedByFocus:a,hasRegistered:l}=Ek(),{selectedItemTextRef:c}=_s(),{className:d,render:p,style:h,...m}=t,g=k.useCallback(x=>{if(!x||!l)return;const S=c.current===null||!c.current.isConnected;(a||S&&r.current===0)&&(c.current=x)},[c,r,a,l]);return kn("div",t,{ref:[g,n,s],props:m})})),$u={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)}]},nH={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}},rH={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}},jN=k.createContext(null);function Tk(){const e=k.useContext(jN);if(!e)throw new Error("Select internals must be used within Select");return e}function iH(){const e=Tk(),t=e.hasValue?v.jsx(j5,{}):void 0;return v.jsx(z5,{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(w5,{...n,animated:e.animated,className:wn(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 sH({children:e}){const t=Tk(),n=Nl(),{zIndex:r,portalLayerStyles:s}=qc("popover",t.open),a=rk(t.placement,t.offset,!1),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth??200,c=En({rootClass:"ui-select-content",stylexStyles:[$u.popup,t.menuSize==="md"&&$u.sizeMd,$u.width(l)]});return v.jsxs($5,{container:n??void 0,style:s,children:[v.jsx(F5,{"data-component":"select-backdrop",...Nn($u.backdrop,r!==null&&$u.backdropZIndex(r-1))}),v.jsx(G5,{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(W5,{className:c.className,"data-component":"select-popup","data-size":t.menuSize,style:c.style,children:v.jsx(Ts,{menuSize:t.menuSize,children:v.jsx(X5,{"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 oH({option:e}){const t=Tk(),n=v.jsxs(Q5,{disabled:e.disabled,label:typeof e.label=="string"?e.label:void 0,value:e.value,"data-component":"select-item",...Nn(nH.root,rH[t.menuSize],ks.root),children:[e.leading!=null?v.jsx("span",{className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-19aaqeu",children:e.leading}):null,v.jsx(tH,{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(J5,{"data-component":"select-item-indicator",className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-19aaqeu",children:v.jsx(vn,{name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:v.jsx(gk,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function aH({value:e,defaultValue:t,onChange:n,onValueChange:r,open:s,defaultOpen:a,onOpenChange:l,options:c,placeholder:d,variant:p="default",frame:h="container",shape:m="rounded",size:g=TN,menuSize:y,contentWidth:x,matchAnchorWidth:S=!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]=k.useState(t),j=e!==void 0,F=j?e:q,U=F!=null&&c.some(ne=>ne.value===F),[P,W]=k.useState(a??!1),D=s??P,B=y??"sm",G=k.useCallback((ne,le)=>{r?.(ne,le),!le.isCanceled&&(j||z(ne),ne!==null&&n?.(ne))},[j,n,r]),O=k.useCallback((ne,le)=>{l?.(ne,le),!le.isCanceled&&s===void 0&&W(ne)},[l,s]),ie=k.useMemo(()=>({hasValue:U,variant:p,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:d,leading:L,trailing:K,className:T,renderTrigger:C,contentWidth:x,matchAnchorWidth:S}),[R,I,H,T,x,E,h,_,U,$,D,L,S,N,A,d,B,K,C,m,g,p]),te=c.map(ne=>({label:ne.label,value:ne.value}));return v.jsx(jN.Provider,{value:ie,children:v.jsx(Ts,{iconSize:h5,children:v.jsxs(N5,{...Z,defaultOpen:a,defaultValue:t,disabled:E,id:$,items:te,onOpenChange:O,onValueChange:G,open:s,value:e,children:[v.jsx(iH,{}),v.jsx(sH,{children:c.map((ne,le)=>v.jsx(oH,{option:ne},typeof ne.value=="string"||typeof ne.value=="number"?String(ne.value):le))})]})})})}const H1=e=>Number.isFinite(e)?e:0;function lH(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(H1(e*1e3)%1e3),nanoseconds:Math.trunc(H1(e*1e6)%1e3)}}function uH(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 cH(e){switch(typeof e){case"number":{if(Number.isFinite(e))return lH(e);break}case"bigint":return uH(e)}throw new TypeError("Expected a finite number or bigint")}const fH=e=>e===0||e===0n,dH=(e,t)=>t===1||t===1n?e:`${e}s`,pH=1e-7,hH=24n*60n*60n*1000n;function mH(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+pH);return(Math.round(g)/10**m).toFixed(m)},l=(h,m,g,y)=>{if(!((s.length===0||!t.colonNotation)&&fH(h)&&!(t.colonNotation&&g==="m"))){if(y??=String(h),t.colonNotation){const x=y.includes(".")?y.split(".")[0].length:y.length,S=s.length>0?2:1;y="0".repeat(Math.max(0,S-x))+y}else y+=t.verbose?" "+dH(m,h):g;s.push(y)}},c=cH(e),d=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(d)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(d,"day","d"):(l(d/365n,"year","y"),l(d%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 x=m+g/1e3+y/1e6,S=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,_=x>=1?Math.round(x):Math.ceil(x),E=S?x.toFixed(S):_;l(Number.parseFloat(E),"millisecond","ms",E)}}else{const h=(n?Number(e%hH):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 p=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(p)}var PN="en",_k={},$y={};function $N(){return PN}function BN(e){PN=e}function gH(e){return _k[e]}function FN(e){if(!e)throw new Error("No locale data passed");_k[e.locale]=e,$y[e.locale.toLowerCase()]=e.locale}function G1(e){if(_k[e])return e;if($y[e.toLowerCase()])return $y[e.toLowerCase()]}function UN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return V1(e);case"best fit":return V1(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function V1(e){var t=G1(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=G1(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),d=s.slice(-1),p=s.slice(-2);return a&&l==1&&c!=11||d==1&&p!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||d>=2&&d<=4&&(p<12||p>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),d=r.slice(-2),p=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&d>=11&&d<=19?"zero":l==1&&c!=11||s==2&&p==1&&d!=11||s!=2&&p==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),d=s.slice(-1),p=s.slice(-2);return a&&l==1&&c!=11||d==1&&p!=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 K1(e){return e==="pt-PT"?e:yH(e)}var bH=/^([a-z0-9]+)/i;function yH(e){var t=e.match(bH);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}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 vH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z1(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,xH(r.key),r)}}function kH(e,t,n){return t&&Z1(e.prototype,t),n&&Z1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xH(e){var t=SH(e,"string");return kc(t)=="symbol"?t:t+""}function SH(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 String(e)}var By=(function(){function e(t,n){vH(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[K1(r[0])]}return kH(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[K1(r)]})}}]),e})();function wl(e){"@babel/helpers - typeof";return wl=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},wl(e)}function W1(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 Y1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W1(Object(n),!0).forEach(function(r){wH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wH(e,t,n){return(t=qN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X1(e,t){return RH(e)||_H(e,t)||TH(e,t)||EH()}function EH(){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 TH(e,t){if(e){if(typeof e=="string")return Q1(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)?Q1(e,t):void 0}}function Q1(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 _H(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,p=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){p=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(p)throw s}}return c}}function RH(e){if(Array.isArray(e))return e}function CH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AH(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,qN(r.key),r)}}function NH(e,t,n){return t&&AH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qN(e){var t=OH(e,"string");return wl(t)=="symbol"?t:t+""}function OH(e,t){if(wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MH=["second","minute","hour","day","week","month","quarter","year"],IH=["auto","always"],DH=["long","short","narrow"],zH=["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]:{};CH(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(IH.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(DH.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(zH.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push($N()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");By.supportedLocalesOf(this.locale).length>0?this.pluralRules=new By(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=UN(this.locale,{localeMatcher:this.localeMatcher})}return NH(e,[{key:"format",value:function(){var n=J1(arguments),r=X1(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=J1(arguments),r=X1(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 d=[];return c>0&&d.push({type:"literal",value:l.slice(0,c)}),d=d.concat(this.formatNumberToParts(Math.abs(s)).map(function(p){return Y1(Y1({},p),{},{unit:a})})),c+3<l.length-1&&d.push({type:"literal",value:l.slice(c+3)}),d}},{key:"getRule",value:function(n,r){var s=gH(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[BH(n)?"past":"future"];if(typeof c=="string")return c;var d=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[d]||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 UN(n,t)})};Es.addLocale=FN;Es.addDefaultLocale=function(e){FN(e),BN(e.locale)};Es.setDefaultLocale=BN;Es.getDefaultLocale=$N;Es.PluralRules=By;var qb='Invalid "unit" argument';function LH(e){if(wl(e)==="symbol")throw new TypeError(qb);if(typeof e!="string")throw new RangeError("".concat(qb,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),MH.indexOf(e)<0)throw new RangeError("".concat(qb,": ").concat(e));return e}var jH='Invalid "number" argument';function PH(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(jH,": ").concat(e));return e}function $H(e){return 1/e===-1/0}function BH(e){return e<0||e===0&&$H(e)}function J1(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[PH(e[0]),LH(e[1])]}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 FH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UH(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,HH(r.key),r)}}function qH(e,t,n){return t&&UH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HH(e){var t=GH(e,"string");return ta(t)=="symbol"?t:t+""}function GH(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 eT=(function(){function e(){FH(this,e),this.cache={}}return qH(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 d=c[l];if(ta(n)!=="object")return;n=n[d]}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,d=0,p=r;d<p.length;d++){var h=p[d];ta(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function Fy(e){"@babel/helpers - typeof";return Fy=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},Fy(e)}function VH(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=KH(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 KH(e,t){if(e){if(typeof e=="string")return tT(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)?tT(e,t):void 0}}function tT(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 ZH(e,t){for(var n=VH(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 WH(){var e=(typeof Intl>"u"?"undefined":Fy(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}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 YH(e){return QH(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 XH={}.constructor;function QH(e){return Uy(e)!==void 0&&e!==null&&e.constructor===XH}var bs=60,Yp=60*bs,Wo=24*Yp,qy=7*Wo,Hy=30.44*Wo,HN=146097/400*Wo;function fl(e){switch(e){case"second":return 1;case"minute":return bs;case"hour":return Yp;case"day":return Wo;case"week":return qy;case"month":return Hy;case"year":return HN}}function GN(e){return e.factor!==void 0?e.factor:fl(e.unit||e.formatAs)||1}function xc(e){return e==="floor"?Math.floor:Math.round}function Rk(e){return e==="floor"?1:.5}function Gy(e){"@babel/helpers - typeof";return Gy=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},Gy(e)}function VN(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),Gy(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(p,h){return nT(p,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=nT(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 nT(e,t,n){var r=n.round,s=fl(e),a=fl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-Rk(r))}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 rT(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 JH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rT(Object(n),!0).forEach(function(r){e7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e7(e,t,n){return(t=t7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t7(e){var t=n7(e,"string");return Sc(t)=="symbol"?t:t+""}function n7(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)}function r7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=s7(e,l);var c=i7(e,t,{now:r,future:s,round:a});{if(c){var d=e[e.indexOf(c)-1],p=e[e.indexOf(c)+1];return[d,c,p]}return[void 0,void 0,e[0]]}}function i7(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=KN(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var d=xc(a)(Math.abs(t)/GN(c)/c.granularity)*c.granularity;if(d===0&&l>0)return e[l-1]}return c}}}function KN(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=VN(e[r],JH({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:KN(e,t,n,r+1)}function s7(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 o7(e,t,n){var r=n.now,s=n.round;if(fl(e)){var a=fl(e)*1e3,l=t>r,c=Math.abs(t-r),d=xc(s)(c/a)*a;return l?d>0?c-d+l7(s,a):c-d+1:-(c-d)+a7(s,a)}}function a7(e,t){return Rk(e)*t}function l7(e,t){return(1-Rk(e))*t+1}var u7=365*24*60*60*1e3,ZN=1e3*u7;function c7(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,d=e.getTime?e.getTime():e,p=function(x){return o7(x,d,{now:a,round:c})},h=d7(l?t:s,d,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(d,{getTimeToNextUpdateForUnit:p,getRoundFunction:xc,now:a,future:l,round:c})),m===void 0)){var g=t.unit||t.formatAs;g&&(m=p(g))}return m===void 0?h:Math.min(m,h)}}function f7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=VN(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?ZN:t+c*1e3}function d7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=f7(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:ZN}var WN={};function il(e){return WN[e]}function YN(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");WN[e.locale]=e}const p7=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],Vy={steps:p7,labels:"long"};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 iT(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 sT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iT(Object(n),!0).forEach(function(r){h7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h7(e,t,n){return(t=m7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m7(e){var t=g7(e,"string");return wc(t)=="symbol"?t:t+""}function g7(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 Ky=sT(sT({},Vy),{},{steps:Vy.steps.filter(function(e){return e.formatAs!=="second"})}),XN=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:bs,unit:"minute"},{threshold:2.5*bs,granularity:5,factor:bs,unit:"minute"},{threshold:22.5*bs,factor:.5*Yp,unit:"half-hour"},{threshold:42.5*bs,threshold_for_minute:52.5*bs,factor:Yp,unit:"hour"},{threshold:20.5/24*Wo,factor:Wo,unit:"day"},{threshold:5.5*Wo,factor:qy,unit:"week"},{threshold:3.5*qy,factor:Hy,unit:"month"},{threshold:10.5*Hy,factor:HN,unit:"year"}],oT={gradation:XN,flavour:"long",units:["now","minute","hour","day","week","month","year"]},b7={gradation:XN,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function QN(e){return e instanceof Date?e:new Date(e)}var Zy=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Li={},y7={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(QN(t))}},v7={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(QN(t))}};WH()?Zy.push(y7,v7):Zy.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const na={steps:Zy,labels:["mini","short-time","narrow","short"]};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 aT(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 lT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aT(Object(n),!0).forEach(function(r){k7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k7(e,t,n){return(t=x7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x7(e){var t=S7(e,"string");return Ec(t)=="symbol"?t:t+""}function S7(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 w7=lT(lT({},na),{},{steps:[{formatAs:"now"}].concat(na.steps)});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 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){E7(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 E7(e,t,n){return(t=T7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T7(e){var t=_7(e,"string");return Tc(t)=="symbol"?t:t+""}function _7(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 Wy=cT(cT({},na),{},{steps:na.steps.filter(function(e){return e.formatAs!=="second"})});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 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 _c(t)=="symbol"?t:t+""}function A7(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 N7=dT(dT({},Wy),{},{steps:[{formatAs:"now"}].concat(Wy.steps)});function Rc(e){"@babel/helpers - typeof";return Rc=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},Rc(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 Qd(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){O7(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 O7(e,t,n){return(t=M7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M7(e){var t=I7(e,"string");return Rc(t)=="symbol"?t:t+""}function I7(e,t){if(Rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const D7=Qd(Qd({},na),{},{steps:na.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?Qd(Qd({},e),{},{minTime:bs}):e})}),Cc={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};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 hT(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 mT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hT(Object(n),!0).forEach(function(r){z7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z7(e,t,n){return(t=L7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L7(e){var t=j7(e,"string");return Ac(t)=="symbol"?t:t+""}function j7(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 P7=mT(mT({},Cc),{},{steps:[{formatAs:"now"}].concat(Cc.steps)});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 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){$7(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 $7(e,t,n){return(t=B7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B7(e){var t=F7(e,"string");return Nc(t)=="symbol"?t:t+""}function F7(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 Yy=bT(bT({},Cc),{},{steps:Cc.steps.filter(function(e){return e.formatAs!=="second"})});function Oc(e){"@babel/helpers - typeof";return Oc=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},Oc(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 Oc(t)=="symbol"?t:t+""}function H7(e,t){if(Oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const G7=vT(vT({},Yy),{},{steps:[{formatAs:"now"}].concat(Yy.steps)});function V7(e){switch(e){case"default":case"round":return Vy;case"round-minute":return Ky;case"approximate":return oT;case"time":case"approximate-time":return b7;case"mini":return Cc;case"mini-now":return P7;case"mini-minute":return Yy;case"mini-minute-now":return G7;case"twitter":return na;case"twitter-now":return w7;case"twitter-minute":return Wy;case"twitter-minute-now":return N7;case"twitter-first-minute":return D7;default:return oT}}function ra(e){"@babel/helpers - typeof";return ra=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},ra(e)}function K7(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=JN(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 Z7(e,t){return X7(e)||Y7(e,t)||JN(e,t)||W7()}function W7(){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 JN(e,t){if(e){if(typeof e=="string")return kT(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)?kT(e,t):void 0}}function kT(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 Y7(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,p=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){p=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(p)throw s}}return c}}function X7(e){if(Array.isArray(e))return e}function Q7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J7(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,tG(r.key),r)}}function eG(e,t,n){return t&&J7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tG(e){var t=nG(e,"string");return ra(t)=="symbol"?t:t+""}function nG(e,t){if(ra(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ra(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;Q7(this,e),typeof t=="string"&&(t=[t]),this.locale=ZH(t.concat(e.getDefaultLocale()),il),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 eT,this.pluralRulesCache=new eT}return eG(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!aG(r)?(s=r,r=void 0):s={}),r||(r=Ky),typeof r=="string"&&(r=V7(r));var l=rG(n),c=this.getLabels(r.flavour||r.labels),d=c.labels,p=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=oG(d,il(a.locale).now,il(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=sG(r.units,d,L),q=r7(r.gradation||r.steps||Ky.steps,H,{now:I,units:Z,round:h,future:$}),z=Z7(q,3),j=z[0],F=z[1],U=z[2],P=function(){return a.formatDateForStep(l,F,H,{labels:d,labelsType:p,nowLabel:L,now:I,future:$,round:h})||""},W=function(){var B=c7(l,F,{nextStep:U,prevStep:j,now:I,future:$,round:h});if(typeof B=="number")return s.getTimeToNextUpdateUncapped?B:tO(B)};return{getText:P,getTextRefreshDelay:W}},x=y({now:m}),S=x.getText,_=x.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[S(),_()];if(s.refresh){var E=6e4,R,T=function A(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E;R=lG(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[S(),C]}return S()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,d=a.labelsType,p=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 p;var x=Math.abs(s)/GN(r);r.granularity&&(x=xc(g)(x/r.granularity)*r.granularity);var S=-1*Math.sign(s)*xc(g)(x);switch(S===0&&(m?S=0:S=-0),d){case"long":case"short":case"narrow":return this.getFormatter(d).format(S,y);default:return this.formatValue(S,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",d=n[c]||n;if(typeof d=="string")return d;var p=this.getPluralRules().select(Math.abs(s));return d[p]||d.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=il(this.locale),s=K7(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),eO="en";zr.getDefaultLocale=function(){return eO};zr.setDefaultLocale=function(e){Xy=!0,eO=e};zr.addDefaultLocale=function(e){Xy&&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.')),Xy=!0,zr.addLocale(e),zr.setDefaultLocale(e.locale)};var Xy=!1;zr.addLocale=function(e){YN(e),Es.addLocale(e)};zr.locale=zr.addLocale;zr.addLabels=function(e,t,n){var r=il(e);r||(YN({locale:e}),r=il(e)),r[t]=n};function rG(e){if(e.constructor===Date||iG(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(ra(e),", ").concat(e))}function iG(e){return ra(e)==="object"&&typeof e.getTime=="function"}function sG(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 oG(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 aG(e){return typeof e=="string"||YH(e)}function lG(e,t){return setTimeout(e,tO(t))}function tO(e){return Math.min(e,uG)}var uG=2147483647;const nO={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(nO);zr.addDefaultLocale(nO);const cG=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 ji(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function fG(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 dl(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function Qr(e){return e==null||!Number.isFinite(e)?"—":mH(e)}function Ck(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 dG=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function xT(e){return e==null||!Number.isFinite(e)?"—":dG.format(e)}function rO(e,t=Date.now()){const n=dl(e);return n===null?null:cG.format(Math.min(n,t),"mini",{now:t})}function El(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 pG=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function Xp(e){return e==null||!Number.isFinite(e)?"0":pG.format(e)}function Qy(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 hG(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 iO(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}const ST=e=>{let t;const n=new Set,r=(p,h)=>{const m=typeof p=="function"?p(t):p;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:()=>d,subscribe:p=>(n.add(p),()=>n.delete(p))},d=t=e(r,s,c);return c},mG=(e=>e?ST(e):ST),gG=e=>e;function bG(e,t=gG){const n=Gu.useSyncExternalStore(e.subscribe,Gu.useCallback(()=>t(e.getState()),[e,t]),Gu.useCallback(()=>t(e.getInitialState()),[e,t]));return Gu.useDebugValue(n),n}const yG=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,vG=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function kG(e=window.location.pathname,t=window.location.hostname){const n=vG.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=yG.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function xG(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function sO(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 SG(e,t=window){const n=()=>{const r=sO(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}class wG{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[d,p]of Object.entries(r.query))p!==""&&l.set(d,p);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 EG=["chat","trace","raw","logs","evals","abs"],bp="cursor-playground",oO=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function TG(e){return typeof e=="string"&&EG.includes(e)}function _G(e,t){if(!oO.includes(t)||typeof e!="object"||e===null)return null;const n=e;return n.source!==bp?null:n.type==="hello"?{source:bp,type:"hello"}:n.type==="set-view"&&TG(n.view)?{source:bp,type:"set-view",view:n.view}:null}function RG(e){const t=n=>{const r=_G(n.data,n.origin);r!==null&&e(r)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}function CG(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return oO.includes(n)?n:null}function wT(e,t=CG()){if(t===null)return;const n={source:bp,type:"state",view:e};window.parent.postMessage(n,t)}function aO(e){return e!=="http"}function AG(e){if(!e.seeded)return{openSidebar:!1,selectSessionId:null};const t=e.sessions.filter(r=>!e.knownIds.has(r.sessionId)&&aO(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 NG(e){return e.filter(t=>aO(t.channelId)&&t.running===!0).length}const OG=new Set(["github","slack"]);function MG(e){return/^\s*\//.test(e)}function Ak(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&OG.has(n.kind)))for(const r of n.routes??[]){const s=jG(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:Qp(n.method)-Qp(r.method)}),t}function lO(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 IG(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 DG(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(p=>p.method).join("|"),l=s.find(p=>p.description)?.description??"",c=Nk(s[0]),d=uO(c);t.push(d?`- \`${r}\` (${a}) — ${l}${l?" ":""}${d}`:`- \`${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 zG(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=lO(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=LG(l,a),d=Nk(c),p=BG(a,d);if(!p.ok)return{ok:!1,error:p.error,commandName:s};const h=PG(d,p.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${uO(d)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:qG(p.value)}:{ok:!0,command:c,body:p.value,query:c.querySchema!==void 0?HG(p.value,c.querySchema):void 0}}function LG(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>Qp(a.method)-Qp(l.method)),r=cO(t);if(r!==null){let a=null,l=-1;for(const c of n){const d=Nk(c),p=$G(d,r);p>l&&(l=p,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 jG(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 Qp(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 Nk(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function uO(e){if(e===void 0)return"";const t=qh(e);if(t===void 0)return"";const n=Hh(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 qh(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 Hh(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function PG(e,t){const n=Hh(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function $G(e,t){const n=qh(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 Hh(e))s in t&&(r+=3);return r}function cO(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 BG(e,t){if(e==="")return{ok:!0,value:{}};const n=cO(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=qh(t),s={},a=[];for(const l of FG(e)){const c=l.indexOf("=");if(c>0){const d=l.slice(0,c),p=l.slice(c+1);s[d]=UG(p,r?.[d])}else a.push(l)}if(a.length>0){const l=[...Hh(t)],c=(l.length>0?l:Object.keys(r??{})).filter(p=>{const h=r?.[p];return h===void 0||h.type==="string"||h.type===void 0}),d=c.find(p=>s[p]===void 0)??c[0];if(d===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[d]=a[0]:s[d]=a.join(" ")}return{ok:!0,value:s}}function FG(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 UG(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 qG(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function HG(e,t){const n=qh(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 GG=new Set(["action.result","actions.requested","action.approval_requested","action.approval_resolved"]),VG=new Set(["actions.requested","action.result","action.approval_requested","action.approval_resolved","subagent.called","subagent.completed"]),KG=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 fO(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function ZG(){const e=kG()!==null,t=e?sO():"";return{meta:{name:"agent",dev:!1,basePath:fO()},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&&xG(),transcript:[],traceEvents:[],barTitle:"No session",barId:"",externalUrl:null,drawerOpen:!1,sidebarOpen:!1,bridged:!1,toast:null,evalCases:[],evalConfig:null,evalRun:null,evalNavReturn:!1}}const Vo=mG(()=>ZG());class WG{constructor(){this.api=new wG(fO(),()=>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=Vo.subscribe,this.getState=()=>Vo.getState()}get state(){return Vo.getState()}set(t){Vo.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(d=>d.kind==="tool"&&d.callId===n);if(c>=0){const d=l[c];if(d?.kind!=="tool")return l;const p=l.slice();return p[c]={...d,name:r||d.name,args:s??d.args},p}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 d=c.findIndex(g=>g.kind==="tool"&&g.callId===n),p=s==null?"(no output)":sr(s,4e3);if(d<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:p,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[d];if(h?.kind!=="tool")return c;const m=c.slice();return m[d]={...h,name:r||h.name,status:a?"error":"done",output:p,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(d=>d.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&&!VG.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=dl(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=dl(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&&dl(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.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=AG({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 d=await a.read();if(d.done){this.scheduleReconnect(t,r);return}c+=l.decode(d.value,{stream:!0});const p=c.split(`
|
|
34
|
+
`);c=p.pop()||"";for(const h of p){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),GG.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(Qy(r))}catch(n){this.toast(`Trace load failed: ${YG(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),KG.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=Qy(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 Ak(this.state.info?.channels)}hasReviewChannel(){return(this.state.info?.channels||[]).some(t=>t.id==="review")}shouldUseReview(t){return this.state.current===null&&this.hasReviewChannel()&&hG(t)}async sendMessage(t,n={}){const r=t.trim();if(!r||this.state.localTrace)return!1;const s=this.state.current;if(MG(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 restoreEvalRun(){return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=JG();if(n!==null){const c=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(c.ok&&c.body){this.applyRestoredEvalRun(c.body);return}}const r=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration)return;if(r.ok&&r.body?.activeRunId!==void 0){const c=r.body.activeRunId,d=r.body.runs.find(p=>p.runId===c)??await this.fetchEvalRunIfCurrent(t,c);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 s=this.state.evalRun;if(s!==null){s.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(s.runId);return}const a=QG(this.state.meta.basePath);if(a!==null){const c=await this.api.evalsRunStatus(a);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(c.ok&&c.body){this.applyRestoredEvalRun(c.body);return}}if(!r.ok||!r.body)return;const l=r.body.runs[0];l!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(l)}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}),Jd(this.state.meta.basePath,t.runId),t.status==="running"&&this.startEvalRunPoll(t.runId)}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}),Jd(this.state.meta.basePath,n.body.runId),this.setView("evals"),this.toast(`Eval ID: ${n.body.runId}`),this.startEvalRunPoll(n.body.runId)}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}),Jd(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()}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}),Jd(this.state.meta.basePath,l.body.runId),l.body.status!=="running"){if(this.stopEvalRunPoll(),this.refreshSessions(),s||n!==this.evalPollGeneration)return;s=!0;const{passed:c,failed:d,total:p}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${d} failed, ${p} 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,d=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:d,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:DG(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=zG(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"+XG(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.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 iO(this.state.info?.model)}}function YG(e){return e instanceof Error?e.message:String(e)}function XG(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function dO(e){return`agent-serve:evalRunId:${e||"/"}`}function QG(e){try{const t=sessionStorage.getItem(dO(e));return t!==null&&t!==""?t:null}catch{return null}}function JG(){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 Jd(e,t){try{sessionStorage.setItem(dO(e),t)}catch{}}const lt=new WG;lt.getState().aliasHosted&&SG(e=>lt.acceptAliasTokenHandoff(e));if(lt.getState().embedded){RG(t=>{t.type==="hello"?(Vo.setState({bridged:!0}),wT(lt.getState().view)):lt.setView(t.view)});let e=null;Vo.subscribe(t=>{!t.bridged||t.view===e||(e=t.view,wT(t.view))})}function ft(e){return bG(Vo,e)}function eV(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:Qr(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 pO(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 hO({metrics:e}){return v.jsx("div",{className:"ab-metrics",children:eV(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 tV({arm:e}){const t=e.variantLabel??e.variant,n=e.sessions>0||pO(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(hO,{metrics:e.metrics}):null]})}function nV({row:e,active:t}){return v.jsxs("button",{type:"button",className:`ab-session${t?" active":""}`,onClick:()=>{lt.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}}),lt.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?` · ${rO(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(sa,{variant:r?"neutral":"accent",size:"sm",pill:!0,children:s})]}),n.metrics!==void 0&&pO(n.metrics)?v.jsx(hO,{metrics:n.metrics}):null]},`${e.sessionId}:${n.experiment}`)})})]})}function rV(){const e=ft(y=>y.current),[t,n]=k.useState(null),[r,s]=k.useState(null),[a,l]=k.useState(!0),c=k.useRef(!1),d=k.useCallback(async()=>{if(!c.current){c.current=!0,l(!0),s(null);try{const y=await lt.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(k.useEffect(()=>{d();const y=setInterval(()=>{d()},4e3);return()=>clearInterval(y)},[d]),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:()=>{d()},children:"Retry"})]});const p=t?.experiments??[],h=t?.sessions??[];if(p.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:()=>{d()},children:"Refresh"})]}),v.jsxs("section",{className:"ab-section",children:[v.jsx("h3",{children:"Experiments"}),p.length===0?v.jsx("div",{className:"ab-empty",children:"No declared experiments."}):v.jsx("div",{className:"ab-exp-list",children:p.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(sa,{variant:"neutral",size:"sm",pill:!0,children:[y.skipped," skipped"]}):null]}),v.jsx("div",{className:"ab-arm-list",children:y.arms.map(x=>v.jsx(tV,{arm:x},x.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(nV,{row:y,active:e?.sessionId===y.sessionId},y.sessionId))})]})]})}function iV(){const[e,t]=k.useState(""),[n,r]=k.useState(null),[s,a]=k.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const d=await lt.signInWithAliasToken(e);a(!1),d.ok||r(d.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(Fh,{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 sV(){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 oV(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 d=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.${d}`}:{disabled:!1,hint:`Sending creates a new http session.${d}`}}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 aV(){const e=ft(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:()=>lt.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:()=>{lt.sendQueuedNow(t.id)}}),v.jsx(po,{icon:"x",size:"sm",variant:"default","aria-label":"Remove queued message",onClick:()=>lt.removeQueued(t.id)})]})]},t.id))})}function lV(){const[e,t]=k.useState(""),[n,r]=k.useState(0),s=ft(A=>A.localTrace),a=ft(A=>A.current),l=ft(A=>A.running),c=ft(A=>A.composerDraft),d=ft(A=>A.info),p=(d?.channels||[]).some(A=>A.id==="review");k.useEffect(()=>{c!==null&&(t(A=>A.trim()?`${A} ${c}`:c),lt.consumeComposerDraft())},[c]);const h=k.useMemo(()=>Ak(d?.channels),[d]),m=k.useMemo(()=>lO(h),[h]),g=k.useMemo(()=>{if(s)return null;const A=e.replace(/^\s+/,"");return!A.startsWith("/")||/\s/.test(A)?null:A},[e,s]),y=k.useMemo(()=>g===null?[]:IG(g,h),[g,h]),x=g!==null&&y.length>0,{disabled:S,hint:_}=oV({localTrace:s,current:a,running:l,slashNames:m,hasReview:p}),E=l&&a!==null&&!s,R=async(A=e,N=!1)=>{if(!A.trim())return;await lt.sendMessage(A,{force:N})&&(t(""),r(0))},T=A=>{t(`${A} `),r(0)},C=A=>{if(x){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:[x?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(aV,{}),v.jsxs("div",{className:S&&!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":x?"list":void 0,"aria-expanded":x,value:e,onChange:A=>{t(A.target.value),r(0)},onKeyDown:C,disabled:S}),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:()=>{lt.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:S||!e.trim(),onClick:()=>{R()}})]})]})]})]})}const uV="agent-serve.playground.try.";function mO(e,t){return`${uV}${e}:${t}`}function ET(e,t){try{const n=localStorage.getItem(mO(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 cV(e,t,n){try{localStorage.setItem(mO(e,t),JSON.stringify(n))}catch{}}function TT(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 _T({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 gO(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 ep(e){return`'${e.replace(/'/g,"'\\''")}'`}function fV(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",ep(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",ep("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",ep(r))}return t.push(ep(e.absoluteUrl)),t.join(" ")}function dV(e,t,n){let r=lt.api.url(e);if(n){const s=gO(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,d]of Object.entries(s.value)){if(d==null)continue;const p=typeof d=="string"?d:String(d);p!==""&&a.set(c,p)}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 pV({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=ft(I=>I.authToken),[c,d]=k.useState(()=>{const I=ET(r,t.url);return I?.query!==void 0&&I.query.trim()!==""?I.query:TT(t.querySchema)}),[p,h]=k.useState(()=>{const I=ET(r,t.url);return I?.body!==void 0&&I.body.trim()!==""?I.body:TT(t.bodySchema)}),[m,g]=k.useState(!1),[y,x]=k.useState(!1),[S,_]=k.useState(null),[E,R]=k.useState(null);k.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??p),a&&(H.query=I.query??c),cV(r,t.url,H)},C=()=>{T({body:p,query:c}),n()},A=async()=>{if(_(null),x(!1),s&&p.trim()!=="")try{JSON.parse(p)}catch($){_(`Body: ${$ instanceof Error?$.message:String($)}`);return}const I=dV(t.url,c,a);if(!I.ok){_(I.error);return}const H=fV({method:r,absoluteUrl:I.url,token:l,hasBody:s,bodyText:p});try{await navigator.clipboard.writeText(H),x(!0),lt.toast("Copied curl to clipboard"),window.setTimeout(()=>x(!1),1500)}catch($){_(`Copy failed: ${$ instanceof Error?$.message:String($)}`)}},N=async()=>{_(null),R(null);let I;if(a){const $=gO(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 $=p.trim();if($==="")H={};else try{H=JSON.parse($)}catch(L){_(`Body: ${L instanceof Error?L.message:String(L)}`);return}}T({body:p,query:c}),g(!0);try{const $=await lt.api.channelRequest(r,t.url,{body:s?H:void 0,query:I});if($.ok&&$.body&&await lt.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(_T,{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=>d(I.target.value),spellCheck:!1,rows:6})]})]}):null,s?v.jsxs(v.Fragment,{children:[v.jsx(_T,{label:"Body",schema:t.bodySchema}),v.jsxs("label",{className:"pg-try-field",children:[v.jsx("span",{children:"Body (JSON)"}),v.jsx("textarea",{value:p,onChange:I=>h(I.target.value),spellCheck:!1,rows:10})]})]}):null,S?v.jsx("div",{className:"pg-try-error",children:S}):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 bO="agent-serve.playground.drawerWidth",Hb=340,Jy=280,ev=720;function yp(e){return Math.min(ev,Math.max(Jy,e))}function hV(){try{const e=localStorage.getItem(bO);if(e===null)return Hb;const t=Number.parseInt(e,10);return Number.isFinite(t)?yp(t):Hb}catch{return Hb}}function Fo({title:e,children:t}){return v.jsxs(v.Fragment,{children:[v.jsx("h4",{children:e}),t]})}function Wa({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 mV(){const e=ft(T=>T.drawerOpen),t=ft(T=>T.info),[n,r]=k.useState(null),[s,a]=k.useState(hV),[l,c]=k.useState(!1),d=k.useRef(s);d.current=s,k.useEffect(()=>{try{localStorage.setItem(bO,String(s))}catch{}},[s]);const p=k.useCallback(T=>{T.preventDefault();const C=T.currentTarget,A=T.clientX,N=d.current;C.setPointerCapture(T.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const I=$=>{a(yp(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??[],x=t?.channels??[],S=t?.hooks??[],_=t?.abs??[],E=k.useMemo(()=>{const T=new Map;for(const C of Ak(x))T.set(`${C.method}:${C.url}`,C.name);return T},[x]),R=t!==null&&h.length===0&&m.length===0&&g.length===0&&y.length===0&&x.length===0&&S.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":Jy,"aria-valuemax":ev,tabIndex:0,onPointerDown:p,onKeyDown:T=>{T.key==="ArrowLeft"?(T.preventDefault(),a(C=>yp(C-16))):T.key==="ArrowRight"?(T.preventDefault(),a(C=>yp(C+16))):T.key==="Home"?(T.preventDefault(),a(Jy)):T.key==="End"&&(T.preventDefault(),a(ev))}}),v.jsxs("div",{className:"head",children:[v.jsx("span",{children:"Agent surface"}),v.jsx("button",{type:"button",className:"link-btn",onClick:()=>lt.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(Fo,{title:"Tools",children:h.map(T=>v.jsx(Wa,{name:T.name,detail:T.description},T.name))}):null,m.length?v.jsx(Fo,{title:"Skills",children:m.map(T=>v.jsx(Wa,{name:T.name,detail:T.description},T.name))}):null,g.length?v.jsx(Fo,{title:"Subagents",children:g.map(T=>v.jsx(Wa,{name:T.name,detail:T.description},T.name))}):null,y.length?v.jsx(Fo,{title:"MCP Connections",children:y.map(T=>v.jsx(Wa,{name:T.name,detail:T.transport},T.name))}):null,x.length?v.jsx(Fo,{title:"Channels",children:x.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,S.length?v.jsx(Fo,{title:"Hooks",children:S.map(T=>v.jsx(Wa,{name:T},T))}):null,_.length?v.jsx(Fo,{title:"A/Bs",children:_.map(T=>v.jsx(Wa,{name:T},T))}):null]})]}),n?v.jsx(pV,{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 yO(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="",c=null,d=1,p=0,h=0;function m(x){return n&&n.endedAt===null||(n={turnId:x?.turnId||`turn_${t.length+1}`,startedAt:x?.at?dl(x.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function g(x){m({turnId:x.turnId,at:null}).rows.push(x),x.ms&&x.ms>d&&(d=x.ms)}function y(x){if(a===null)return;const S=m(),_=x!==null&&a!==null?Math.max(0,x-a):null,E=l.trim()||void 0;S.rows.push(Ii({kind:"think",label:E?ji(E,80):"thinking",body:E,ms:_,at:x,startAt:a})),_&&_>d&&(d=_),a=null,l=""}for(const x of e){const S=x.data||{},_=dl(x.at);switch(x.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=x.turnId||n.turnId,n.startedAt=_,n.provisional=!1):(n={turnId:x.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:ji(S.text,140),body:typeof S.text=="string"?S.text:void 0,at:_,startAt:_,ms:0,turnId:x.turnId}));break;case"reasoning.appended":if(typeof S.parentCallId=="string"&&S.parentCallId!=="")break;a===null&&(a=_),typeof S.text=="string"&&(l=S.text);break;case"reasoning.completed":if(typeof S.parentCallId=="string"&&S.parentCallId!=="")break;y(_);break;case"message.appended":if(typeof S.parentCallId=="string"&&S.parentCallId!=="")break;c===null&&(c=_);break;case"message.completed":{if(typeof S.parentCallId=="string"&&S.parentCallId!==""){const T=S.parentCallId;g(Ii({kind:"agent",label:ji(S.text,160)||"(empty reply)",body:typeof S.text=="string"?S.text:void 0,at:_,startAt:_,ms:0,turnId:x.turnId,depth:1,parentCallId:T}));break}const E=c??_,R=E!==null&&_!==null?Math.max(0,_-E):null;g(Ii({kind:"agent",label:ji(S.text,160)||"(empty reply)",body:typeof S.text=="string"?S.text:void 0,at:_,startAt:E,ms:R,turnId:x.turnId})),R&&R>d&&(d=R),c=null;break}case"actions.requested":for(const E of S.calls||[]){const R=typeof E.parentCallId=="string"&&E.parentCallId!==""?E.parentCallId:typeof S.parentCallId=="string"&&S.parentCallId!==""?S.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:x.turnId,parentCallId:R}}break;case"action.result":{const E=S.callId;if(E==null)break;const R=typeof S.parentCallId=="string"&&S.parentCallId!==""?S.parentCallId:void 0;if(R===void 0&&S.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;p+=1,S.isError&&(h+=1);{const N=S.toolName||C?.name||"tool",I=C?.args;g(Ii({kind:"tool",label:N+(I?` ${ji(sr(I,60),60)}`:""),toolName:N,callId:typeof E=="string"?E:String(E),toolArgs:I,toolOutput:S.output,body:typeof S.output=="string"?S.output:S.output!=null?sr(S.output,4e3):void 0,ms:A,error:!!S.isError,at:_,startAt:C?.start??null,turnId:x.turnId,depth:R===void 0?0:1,parentCallId:R}))}A&&A>d&&(d=A);break}case"subagent.called":{const E=`task:${S.name||"subagent"}`,R=typeof S.callId=="string"?S.callId:String(S.callId);r[`sub:${R}`]={name:E,args:S.description,start:_,turnId:x.turnId};const T=m(x);T.rows.push(Ii({kind:"tool",label:E,toolName:E,callId:R,toolArgs:S.description,ms:null,at:_,startAt:_,turnId:x.turnId,depth:0})),s.set(R,{turn:T,index:T.rows.length-1});break}case"subagent.completed":{const E=typeof S.callId=="string"?S.callId:String(S.callId),R=`sub:${E}`,T=r[R];delete r[R];const C=T&&T.start!==null&&_!==null?_-T.start:null;p+=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>d&&(d=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:x.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(x.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const E=m(x);if((x.type==="turn.completed"||x.type==="turn.failed")&&(E.endedAt=_,E.usage=S.usage||null,E.failed=x.type==="turn.failed",E.error=S.message,E.startedAt!==null&&E.endedAt!==null)){const R=E.endedAt-E.startedAt;R>d&&(d=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>d&&(d=C)}r={},(x.type==="turn.completed"||x.type==="turn.failed")&&(n=null);break}}}for(const x of Object.keys(r)){const S=r[x];g(Ii({kind:"tool",label:`${S.name||"tool"} (running…)`,ms:null,at:S.start,startAt:S.start,turnId:S.turnId}))}return{turns:t,maxWallMs:d,totalTools:p,failedTools:h,eventCount:e.length}}function gV(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 vO(e,t=200){const[n,r]=k.useState(e);return k.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 bV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench"},yV={user:"User message",agent:"Assistant message",think:"Thinking",tool:"Tool call"};function vV({row:e}){const[t,n]=k.useState(!1),r=e.body!==void 0&&e.body.length>0||e.toolArgs!==void 0||e.toolOutput!==void 0,s=t&&r,a=vO(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:yV[e.kind],children:v.jsx(vn,{name:bV[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:Qr(e.ms)}):null,r?v.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:v.jsx(vn,{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:El(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:El(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 kV({sessionId:e,live:t}){const[n,r]=k.useState([]),[s,a]=k.useState(null),[l,c]=k.useState(!0),[d,p]=k.useState(!1),h=k.useRef(null);k.useEffect(()=>{let g=!1;const y=new AbortController;return c(!0),a(null),r([]),p(!1),(async()=>{let x=-1;try{const S=await lt.api.eventsText(e);if(g)return;if(S.ok){const _=await S.text();if(g)return;const E=Qy(_);for(const R of E)typeof R.index=="number"&&R.index>x&&(x=R.index);r(E)}}catch(S){g||a(S instanceof Error?S.message:String(S))}finally{g||c(!1)}if(!(!t||g)){p(!0);try{const S=await lt.api.streamFetch(e,x+1,y.signal);if(!S.ok||!S.body){g||(a(`Stream failed (${S.status})`),p(!1));return}const _=S.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>x&&(x=$.index)}catch{}}N.length>0&&!g&&r(I=>[...I,...N])}}catch(S){!g&&!(S instanceof DOMException&&S.name==="AbortError")&&a(S instanceof Error?S.message:String(S))}finally{g||p(!1)}}})(),()=>{g=!0,y.abort()}},[e,t]),k.useEffect(()=>{t&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,t]);const m=k.useMemo(()=>yO(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||d?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?` · ${Qr(g.wallMs)}`:""]}),g.rows.map((x,S)=>v.jsx(vV,{row:x},`${g.turnId}-${S}-${x.kind}`))]},g.turnId)),v.jsx("div",{ref:h})]})}function xV({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(vn,{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:El(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:El(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 SV({c:e,batchRunning:t}){const[n,r]=k.useState(!1),[s,a]=k.useState(!1),l=n||s,c=vO(l),d=k.useRef({io:!1,expanded:!1});l&&(d.current={io:s,expanded:n});const p=l?s:d.current.io,h=l?n:d.current.expanded,m=e.status==="pending"?"Queued":e.status==="running"?"Running":e.ok===!0?"Pass":"Fail",g=e.status==="done"?e.ok===!0?"success":"danger":e.status==="running"?"accent":"neutral",y=e.sessionId!==void 0||e.status==="done"||e.status==="running",x=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0;return v.jsxs("div",{className:`eval-case${n||s?" expanded":""}`,children:[v.jsxs("div",{className:"eval-case-head",children:[v.jsxs("button",{type:"button",className:"eval-id-btn",disabled:!y,"aria-expanded":n,title:y?n?"Collapse":"Expand live trace":void 0,onClick:()=>r(S=>!S),children:[v.jsx("span",{className:n?"eval-chevron open":"eval-chevron",children:v.jsx(vn,{name:"chevron-right",size:10})}),v.jsx(sa,{variant:g,size:"sm",children:m}),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,x?v.jsx(zn,{variant:s?"secondary":"ghost",size:"sm",onClick:()=>a(S=>!S),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:()=>{lt.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),v.jsx(zn,{variant:"ghost",size:"sm",onClick:()=>{lt.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]}),e.description!==void 0?v.jsx("div",{className:"eval-desc",children:e.description}):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(S=>v.jsxs("li",{className:S.passed?"":"fail",children:[S.passed?"✓":"✗"," ",S.name,S.detail!==void 0?` (${S.detail})`:""]},`${S.name}-${S.passed}-${S.detail??""}`))}):null,e.logs!==void 0&&e.logs.length>0?v.jsx("ul",{className:"eval-assertions eval-logs",children:e.logs.map((S,_)=>v.jsx("li",{children:S},`${_}:${S}`))}):null,c?v.jsxs("div",{className:l?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!l,inert:l?void 0:!0,children:[p?v.jsx(xV,{c:e}):null,h&&e.sessionId!==void 0?v.jsx(kV,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,h&&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"})," Waiting for session…"]}):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 wV(){const e=ft(d=>d.evalRun),t=ft(d=>d.evalCases),n=ft(d=>d.evalConfig),r=e?.status==="running";if(e===null)return v.jsx("div",{className:"pg-evals",children:v.jsxs("div",{className:"eval-empty",children:[v.jsx("p",{children:"No eval run yet."}),v.jsxs("p",{className:"eval-hint",children:[t.length>0?`${t.length} case${t.length===1?"":"s"} discovered.`:"No evals/ cases found for this agent.",n?.maxConcurrency!==void 0?` Concurrency: ${n.maxConcurrency}.`:""]}),t.length>0?v.jsx("p",{className:"eval-hint",children:n?.durableRuns===!0?`Runs persist via the agent/storage.ts evals table (keeps last ${n.maxPlaygroundRuns??20}).`:`Runs stay in memory only (last ${n?.maxPlaygroundRuns??20}); lost when serve exits. Add an evals table to agent/storage.ts to keep them.`}):null,t.length>0?v.jsx(zn,{variant:"secondary",size:"sm",disabled:r,onClick:()=>{lt.startEvalRun()},children:"Run all"}):null]})});const{summary:s,status:a}=e,l=a==="failed"||a==="cancelled"?"danger":r?"accent":"success",c=a==="failed"?"Failed":a==="cancelled"?"Cancelled":r?"Running":"Completed";return v.jsxs("div",{className:"pg-evals",children:[v.jsxs("div",{className:"eval-summary",children:[v.jsx(sa,{variant:l,size:"sm",children:c}),v.jsx("span",{className:"eval-id",title:"Eval ID",children:e.runId}),v.jsxs("span",{children:[s.done,"/",s.total," done · ",s.passed," passed ·"," ",s.failed," failed"]}),r?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:[r?v.jsx(zn,{variant:"secondary",size:"sm",onClick:()=>{lt.cancelEvalRun(e.runId)},children:"Cancel"}):null,t.length>0?v.jsx(zn,{variant:"secondary",size:"sm",disabled:r,onClick:()=>{lt.startEvalRun()},children:"Run all"}):null]})]}),v.jsx("div",{className:"eval-case-list",children:e.cases.map(d=>v.jsx(SV,{c:d,batchRunning:r},d.id))})]})}function Ya(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,d,p;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((x,S)=>r[S]!==x)))return s;r=m;let y;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(y=Date.now()),s=t(...m),n.key&&((p=n.debug)!=null&&p.call(n))){const x=Math.round((Date.now()-h)*100)/100,S=Math.round((Date.now()-y)*100)/100,_=S/16,E=(R,T)=>{for(R=String(R);R.length<T;)R=" "+R;return R};console.info(`%c⏱ ${E(S,5)} /${E(x,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 RT(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const EV=(e,t)=>Math.abs(e-t)<1.01,TV=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},CT=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},_V=e=>e,RV=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},CV=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:d}=l;t({width:Math.round(c),height:Math.round(d)})};if(s(CT(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const d=l[0];if(d?.borderBoxSize){const p=d.borderBoxSize[0];if(p){s({width:p.inlineSize,height:p.blockSize});return}}s(CT(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},AT={passive:!0},NT=typeof window>"u"?!0:"onscrollend"in window,AV=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&NT?()=>{}:TV(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),d=l(!1);n.addEventListener("scroll",c,AT);const p=e.options.useScrollendEvent&&NT;return p&&n.addEventListener("scrollend",d,AT),()=>{n.removeEventListener("scroll",c),p&&n.removeEventListener("scrollend",d)}},NV=(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"]},OV=(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 MV{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,d=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,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:_V,rangeExtractor:RV,onChange:()=>{},measureElement:NV,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=Ya(()=>(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 d=a.get(c.lane);if(d==null||c.end>d.end?a.set(c.lane,c):c.end<d.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=Ya(()=>[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=Ya(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},d)=>{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 p=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,p),m=new Array(c).fill(void 0);for(let g=0;g<p;g++){const y=h[g];y&&(m[y.lane]=g)}for(let g=p;g<n;g++){const y=a(g),x=this.laneAssignments.get(g);let S,_;if(x!==void 0&&this.options.lanes>1){S=x;const C=m[S],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,S=C?C.lane:g%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(g,S)}const E=d.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:S},m[S]=g}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ya(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?IV({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ya(()=>{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=Ya(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],d=r[c];s.push(d)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return RT(r[kO(0,r.length-1,s=>RT(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,d=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:d,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&&EV(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 kO=(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 IV({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=kO(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const d=Array(r).fill(0);for(;c<s&&d.some(h=>h<n+t);){const h=e[c];d[h.lane]=h.end,c++}const p=Array(r).fill(n+t);for(;l>=0&&p.some(h=>h>=n);){const h=e[l];p[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 OT=typeof document<"u"?k.useLayoutEffect:k.useEffect;function DV({useFlushSync:e=!0,...t}){const n=k.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]=k.useState(()=>new MV(r));return s.setOptions(r),OT(()=>s._didMount(),[]),OT(()=>s._willUpdate()),s}function xO(e){return DV({observeElementRect:CV,observeElementOffset:AV,scrollToFn:OV,...e})}function zV(){const[e,t]=k.useState([]),[n,r]=k.useState(null),s=k.useRef(-1),a=k.useRef(null),l=e.length,c=xO({count:l,getScrollElement:()=>a.current,estimateSize:()=>18,overscan:24});return k.useEffect(()=>{let d=!1;const p=async()=>{const m=await lt.api.logs(s.current);if(d)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 x=y.concat(g);return x.length>2e3?x.slice(x.length-2e3):x}))};p();const h=window.setInterval(()=>{p()},1e3);return()=>{d=!0,window.clearInterval(h)}},[]),k.useEffect(()=>{l>0&&c.scrollToIndex(l-1,{align:"end"})},[l,c]),n!==null&&l===0?v.jsx("div",{className:"pg-raw",children:v.jsx(vc,{className:"pg-empty",message:n})}):l===0?v.jsx("div",{className:"pg-raw",children:v.jsx(vc,{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(d=>{const p=e[d.index];if(p===void 0)return null;const h=p.at.slice(11,19);return v.jsxs("div",{"data-index":d.index,ref:c.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${d.start}px)`},children:[v.jsxs("span",{className:"elog-time",children:[h," "]}),v.jsx("span",{children:p.line})]},d.key)})})})]})}const SO=48;function LV(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function jV(e,t=SO){return LV(e)<=t}function Gb(e){e.scrollTop=e.scrollHeight}function wO(e){const{contentKey:t,latchKey:n,thresholdPx:r=SO}=e,s=k.useRef(null),a=k.useRef(!0);return k.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=jV(l,r)};return l.addEventListener("scroll",c,{passive:!0}),()=>l.removeEventListener("scroll",c)},[r,t,n]),k.useLayoutEffect(()=>{if(n===void 0)return;a.current=!0;const l=s.current;l&&Gb(l)},[n]),k.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&Gb(l)},[t]),k.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&Gb(l)};c();const d=new Set,p=new ResizeObserver(c),h=y=>{d.has(y)||(d.add(y),p.observe(y))},m=y=>{h(y);for(const x of y.children)m(x)};m(l);const g=new MutationObserver(y=>{for(const x of y)x.addedNodes.forEach(S=>{S instanceof Element&&m(S)});c()});return g.observe(l,{childList:!0,subtree:!0}),()=>{p.disconnect(),g.disconnect()}},[t,n]),{scrollRef:s}}function PV(){const e=ft(a=>a.traceEvents),t=ft(a=>a.current),n=e.length,{scrollRef:r}=wO({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=xO({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?v.jsx("div",{className:"pg-raw",children:v.jsx(vc,{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 EO="agent-serve.playground.sidebarWidth",Vb=280,tv=200,nv=560,$V={github:"logo-github",slack:"logo-slack"};function vp(e){return Math.min(nv,Math.max(tv,e))}function BV(){try{const e=localStorage.getItem(EO);if(e===null)return Vb;const t=Number.parseInt(e,10);return Number.isFinite(t)?vp(t):Vb}catch{return Vb}}function FV({channelId:e,mode:t,running:n}){if(n)return v.jsx("span",{className:"spin"});const r=$V[e]??(t==="task"?"clock":null);return r===null?null:v.jsx("span",{className:"session-mark",title:e,children:v.jsx(vn,{name:r,size:"sm",color:"secondary"})})}function UV({summary:e}){const n=ft(c=>c.current)?.sessionId===e.sessionId,r=`${e.turnCount} turn${e.turnCount===1?"":"s"}`,s=rO(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:()=>{lt.selectSession(e),lt.setView("chat")},title:l,children:[v.jsx(FV,{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(vn,{name:"link-external",size:"xs",color:"tertiary"})}):null,s!==null?v.jsx("span",{className:"session-when",children:s}):null]})}function qV(e){try{return localStorage.getItem(`agent-serve.playground.section.${e}`)==="1"}catch{return!1}}function TO({id:e,label:t,actions:n,children:r}){const[s,a]=k.useState(()=>qV(e)),l=()=>{a(c=>{const d=!c;try{localStorage.setItem(`agent-serve.playground.section.${e}`,d?"1":"0")}catch{}return d})};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(vn,{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 tp({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(vn,{name:e,size:"base",color:"secondary"}),v.jsx("span",{className:"label",children:t})]})}function HV(){const e=ft(r=>r.info),t=ft(r=>r.meta.dev),n=e?.schedules||[];return n.length===0?null:v.jsx(TO,{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:()=>{lt.dispatchSchedule(r.name)},children:"Dispatch"})]},r.name))})})}function GV(){const e=ft(r=>r.evalCases),t=ft(r=>r.evalRun),n=t?.status==="running";return e.length===0&&t===null?null:v.jsx(TO,{id:"evals",label:"Evals",actions:v.jsxs(v.Fragment,{children:[v.jsx(zn,{variant:"ghost",size:"sm",disabled:n||e.length===0,title:n?"Eval run in progress":void 0,onClick:()=>{lt.startEvalRun()},children:"Run all"}),t!==null?v.jsx(zn,{variant:"ghost",size:"sm",onClick:()=>lt.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(r=>v.jsxs("div",{className:"schedule-item",children:[v.jsxs("div",{children:[v.jsx("div",{className:"eval-side-id",children:r.id}),r.tags!==void 0&&r.tags.length>0?v.jsx("div",{className:"cron",children:r.tags.join(", ")}):null]}),v.jsx(zn,{variant:"ghost",size:"sm",disabled:n,onClick:()=>{lt.startEvalRun([r.id])},children:"Run"})]},r.id))})})}function VV(){const e=ft(R=>R.meta.name),t=ft(R=>R.meta.dev),n=ft(R=>R.meta.indexPath),r=ft(R=>R.health),s=ft(R=>R.info),a=ft(R=>R.sessions),l=k.useRef(null),[c,d]=k.useState(BV),[p,h]=k.useState(!1),[m,g]=k.useState(""),y=k.useRef(c);y.current=c;const x=k.useMemo(()=>{const R=m.trim().toLowerCase();return R===""?a:a.filter(T=>T.sessionId.toLowerCase().includes(R))},[a,m]),S=k.useCallback(R=>{R?.preventDefault();const T=m.trim();if(T==="")return;const C=a.find(A=>A.sessionId===T);if(C!==void 0){lt.selectSession(C),lt.setView("chat");return}if(x.length===1){lt.selectSession(x[0]),lt.setView("chat");return}x.length===0&<.openSessionById(T)},[m,a,x]);k.useEffect(()=>{try{localStorage.setItem(EO,String(c))}catch{}},[c]);const _=k.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=>{d(vp(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=()=>{lt.loadLocalTrace(String(T.result||""),R.name)},T.readAsText(R)};return v.jsxs("div",{className:"pg-sidebar",style:{width:c},children:[v.jsx("div",{className:p?"pg-sidebar-resizer dragging":"pg-sidebar-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar","aria-valuenow":c,"aria-valuemin":tv,"aria-valuemax":nv,tabIndex:0,onPointerDown:_,onKeyDown:R=>{R.key==="ArrowLeft"?(R.preventDefault(),d(T=>vp(T-16))):R.key==="ArrowRight"?(R.preventDefault(),d(T=>vp(T+16))):R.key==="Home"?(R.preventDefault(),d(tv)):R.key==="End"&&(R.preventDefault(),d(nv))}}),v.jsxs("div",{className:"side-nav",children:[v.jsx(tp,{icon:"pencil-square",label:"New Chat",onClick:()=>lt.deselectSession()}),v.jsx(tp,{icon:"folder-open",label:"Open Trace",title:"Open a saved events.ndjson trace",onClick:()=>l.current?.click()}),v.jsx(tp,{icon:"squares",label:"Agent Surface",title:"Tools, skills, connections, and channels",onClick:()=>lt.setDrawerOpen(!0)}),n?v.jsx(tp,{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:S,children:v.jsx(Fh,{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:[x.map(R=>v.jsx(UV,{summary:R},R.sessionId)),m.trim()!==""&&x.length===0?v.jsx("div",{className:"session-search-empty",children:"No matching sessions. Press Enter to open by ID."}):null]}),v.jsx(HV,{}),v.jsx(GV,{}),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:iO(s?.model)})]}),t?v.jsx(sa,{variant:"warn",size:"sm",children:"dev"}):null]})]})}function KV(){const e=ft(t=>t.toast);return e?v.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const MT=[{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"}],_O="(max-width: 640px)";function ZV(e){const t=window.matchMedia(_O);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function WV(){return k.useSyncExternalStore(ZV,()=>window.matchMedia(_O).matches)}function YV(){const e=ft(T=>T.barTitle),t=ft(T=>T.barId),n=ft(T=>T.externalUrl),r=ft(T=>T.current),s=ft(T=>T.view),a=ft(T=>T.authToken),l=ft(T=>T.aliasHosted),c=ft(T=>T.embedded),d=ft(T=>T.bridged),p=ft(T=>T.sidebarOpen),h=ft(T=>T.sessions),m=ft(T=>T.evalNavReturn),g=ft(T=>T.evalRun),y=WV(),x=r?.sessionId??null,S=m&&s!=="evals"&&g!==null,_=c&&!p?NG(h):0,E=async()=>{if(x)try{const T=await lt.api.eventsText(x);if(!T.ok){lt.toast(`Download failed (${T.status})`);return}const C=await T.blob(),A=URL.createObjectURL(C),N=document.createElement("a");N.href=A,N.download=`${x}.events.ndjson`,document.body.appendChild(N),N.click(),N.remove(),URL.revokeObjectURL(A)}catch(T){lt.toast(`Download failed: ${T instanceof Error?T.message:String(T)}`)}},R=y?v.jsx(aH,{size:"base","aria-label":"Visualization mode",value:s,onValueChange:T=>lt.setView(T??"chat"),options:MT}):v.jsx(P1,{size:"sm",variant:"compact",value:s,onValueChange:T=>lt.setView(T),"aria-label":"Visualization mode",children:MT.map(T=>v.jsx(P1.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":p?"Hide sessions":_>0?`Show sessions (${_} running)`:"Show sessions",onClick:()=>lt.setSidebarOpen(!p)}),_>0?v.jsx("span",{className:"pg-sidebar-toggle-badge","aria-hidden":"true"}):null]}):null,S?v.jsx(zn,{variant:"secondary",size:"sm",onClick:()=>lt.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,x?v.jsx(zn,{variant:"ghost",size:"sm",onClick:()=>{E()},title:"Download this session's event log",children:"Download"}):null]}),v.jsx("span",{className:"grow"}),d?null:R,c&&(x!==null||n!==null)?v.jsxs(Pu,{children:[v.jsx(Pu.Trigger,{children:v.jsx(po,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),v.jsxs(Pu.Content,{"aria-label":"Session actions",size:"sm",children:[n!==null?v.jsx(Pu.Item,{onSelect:()=>window.open(n,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,x!==null?v.jsx(Pu.Item,{onSelect:()=>{E()},children:"Download event log"}):null]})]}):null,l?null:v.jsx("div",{className:"pg-token",children:v.jsx(Fh,{type:"password",size:"base","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:T=>lt.setAuthToken(T.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const XV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench"},RO={user:"User message",agent:"Assistant message",think:"Thinking",tool:"Tool call"};function QV(e){if(e.error)return"danger";switch(e.kind){case"user":return"accent";case"agent":return"success";default:return"neutral"}}function JV(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 eK(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 tK(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,d=c===null||c===0,p=s*.012,h=d?p:Math.max(c,p),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:d}}function CO(e){return e===null?"—":e===0?"instant":Qr(e)}function fs({label:e,value:t}){return v.jsxs("div",{children:[v.jsx("dt",{children:e}),v.jsx("dd",{title:t,children:t})]})}function nK({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,d=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",p=n.body?.trim()||"",h=n.toolArgs!=null?El(n.toolArgs):"",m=n.toolOutput!=null?El(n.toolOutput):n.kind==="tool"&&p?p:"";return v.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[v.jsxs("div",{className:"trace-detail-head",children:[v.jsxs(sa,{variant:QV(n),size:"sm",children:[RO[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"&&p?v.jsx("pre",{className:"trace-detail-body",children:p}):null,n.kind!=="tool"&&!p&&n.label?v.jsx("div",{className:"trace-detail-label",children:n.label}):null,v.jsxs("dl",{className:"trace-detail-meta",children:[v.jsx(fs,{label:"Turn",value:r}),n.error?v.jsx(fs,{label:"Status",value:"error"}):null,v.jsx(fs,{label:"Start +",value:Qr(s)}),v.jsx(fs,{label:"End +",value:Qr(c)}),v.jsx(fs,{label:"Duration",value:CO(a)}),v.jsx(fs,{label:"% of turn",value:d}),v.jsx(fs,{label:"Started",value:xT(n.startAt)}),v.jsx(fs,{label:"Ended",value:xT(n.at)}),n.callId?v.jsx(fs,{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 rK({span:e,selected:t,onSelect:n}){const{row:r}=e,s=`${r.kind}${r.error?" error":""}`,a=CO(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:RO[r.kind],children:v.jsx(vn,{name:XV[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 iK({turn:e,index:t,selectedId:n,onSelect:r}){const s=JV(e),a=eK(e,s),l=k.useMemo(()=>e.rows.map((p,h)=>tK(p,h,e.turnId,s,a)),[e,s,a]),c=k.useMemo(()=>gV(a),[a]),d=[];return e.wallMs!==void 0&&d.push(`Worked for ${Ck(e.wallMs)}`),e.usage&&d.push(`in ${Xp(e.usage.inputTokens)} · out ${Xp(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(sa,{variant:"danger",size:"sm",children:"failed"}):null]}),v.jsx("span",{className:"wall",children:d.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(p=>v.jsxs("span",{className:"wf-tick",style:{left:`${p/a*100}%`},children:[v.jsx("span",{className:"wf-tick-line"}),v.jsx("span",{className:"wf-tick-label",children:Qr(p)})]},p))}),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(p=>v.jsx(rK,{span:p,selected:n===p.id,onSelect:()=>r(n===p.id?null:p)},p.id))]})]})}function sK(){const e=ft(a=>a.traceEvents),t=k.useMemo(()=>yO(e),[e]),[n,r]=k.useState(null);if(!e.length)return v.jsx("div",{className:"pg-trace",children:v.jsx(vc,{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(iK,{turn:a,index:l,selectedId:n?.id??null,onSelect:r},`${a.turnId||"turn"}-${l}`))}),n?v.jsx(nK,{span:n,onClose:()=>r(null)}):null]})]})})}function oK(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const aK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uK={};function IT(e,t){return(uK.jsx?lK:aK).test(e)}const cK=/[ \t\n\f\r]/g;function fK(e){return typeof e=="object"?e.type==="text"?DT(e.value):!1:DT(e)}function DT(e){return e.replace(cK,"")===""}class tf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}tf.prototype.normal={};tf.prototype.property={};tf.prototype.space=void 0;function AO(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new tf(n,r,t)}function rv(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 dK=0;const At=fa(),Un=fa(),iv=fa(),je=fa(),dn=fa(),pl=fa(),Zr=fa();function fa(){return 2**++dK}const sv=Object.freeze(Object.defineProperty({__proto__:null,boolean:At,booleanish:Un,commaOrSpaceSeparated:Zr,commaSeparated:pl,number:je,overloadedBoolean:iv,spaceSeparated:dn},Symbol.toStringTag,{value:"Module"})),Kb=Object.keys(sv);class Ok extends Pr{constructor(t,n,r,s){let a=-1;if(super(t,n),zT(this,"space",s),typeof r=="number")for(;++a<Kb.length;){const l=Kb[a];zT(this,Kb[a],(r&sv[l])===sv[l])}}}Ok.prototype.defined=!0;function zT(e,t,n){n&&(e[t]=n)}function Il(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Ok(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[rv(r)]=r,n[rv(a.attribute)]=r}return new tf(t,n,e.space)}const NO=Il({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 OO(e,t){return t in e?e[t]:t}function MO(e,t){return OO(e,t.toLowerCase())}const pK=Il({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:iv,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:iv,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:MO}),hK=Il({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:OO}),IO=Il({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()}}),DO=Il({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:MO}),zO=Il({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"},gK=/[A-Z]/g,LT=/-[a-z]/g,bK=/^data[-\w.:]+$/i;function yK(e,t){const n=rv(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"&&bK.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(LT,kK);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!LT.test(a)){let l=a.replace(gK,vK);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=Ok}return new s(r,t)}function vK(e){return"-"+e.toLowerCase()}function kK(e){return e.charAt(1).toUpperCase()}const xK=AO([NO,pK,IO,DO,zO],"html"),Mk=AO([NO,hK,IO,DO,zO],"svg");function SK(e){return e.join(" ").trim()}var Xa={},Zb,jT;function wK(){if(jT)return Zb;jT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
40
|
+
`,p="/",h="*",m="",g="comment",y="declaration";Zb=function(S,_){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];_=_||{};var E=1,R=1;function T(q){var z=q.match(t);z&&(E+=z.length);var j=q.lastIndexOf(d);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=S;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=S,!_.silent)throw z}function I(q){var z=q.exec(S);if(z){var j=z[0];return T(j),S=S.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(!(p!=S.charAt(0)||h!=S.charAt(1))){for(var z=2;m!=S.charAt(z)&&(h!=S.charAt(z)||p!=S.charAt(z+1));)++z;if(z+=2,m===S.charAt(z-1))return N("End of comment missing");var j=S.slice(2,z-2);return R+=2,T(j),S=S.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:x(z[0].replace(e,m)),value:j?x(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 x(S){return S?S.replace(c,m):m}return Zb}var PT;function EK(){if(PT)return Xa;PT=1;var e=Xa&&Xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.default=n;var t=e(wK());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(d){if(d.type==="declaration"){var p=d.property,h=d.value;c?s(p,h,d):h&&(a=a||{},a[p]=h)}}),a}return Xa}var Bu={},$T;function TK(){if($T)return Bu;$T=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(p){return!p||n.test(p)||e.test(p)},l=function(p,h){return h.toUpperCase()},c=function(p,h){return"".concat(h,"-")},d=function(p,h){return h===void 0&&(h={}),a(p)?p:(p=p.toLowerCase(),h.reactCompat?p=p.replace(s,c):p=p.replace(r,c),p.replace(t,l))};return Bu.camelCase=d,Bu}var Fu,BT;function _K(){if(BT)return Fu;BT=1;var e=Fu&&Fu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(EK()),n=TK();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(l[(0,n.camelCase)(c,a)]=d)}),l}return r.default=r,Fu=r,Fu}var RK=_K();const CK=sh(RK),LO=jO("end"),Ik=jO("start");function jO(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 AK(e){const t=Ik(e),n=LO(e);if(t&&n)return{start:t,end:n}}function sc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?FT(e.position):"start"in e||"end"in e?FT(e):"line"in e||"column"in e?ov(e):""}function ov(e){return UT(e&&e.line)+":"+UT(e&&e.column)}function FT(e){return ov(e&&e.start)+"-"+ov(e&&e.end)}function UT(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 d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.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=sc(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 Dk={}.hasOwnProperty,NK=new Map,OK=/[A-Z]/g,MK=new Set(["table","tbody","thead","tfoot","tr"]),IK=new Set(["td","th"]),PO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DK(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=UK(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=FK(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"?Mk:xK,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=$O(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function $O(e,t,n){if(t.type==="element")return zK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return LK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return PK(e,t,n);if(t.type==="mdxjsEsm")return jK(e,t);if(t.type==="root")return $K(e,t,n);if(t.type==="text")return BK(e,t)}function zK(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Mk,e.schema=s),e.ancestors.push(t);const a=FO(e,t.tagName,!1),l=qK(e,t);let c=Lk(e,t);return MK.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!fK(d):!0})),BO(e,l,a,t),zk(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function LK(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)}Mc(e,t.position)}function jK(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mc(e,t.position)}function PK(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Mk,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:FO(e,t.name,!0),l=HK(e,t),c=Lk(e,t);return BO(e,l,a,t),zk(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function $K(e,t,n){const r={};return zk(r,Lk(e,t)),e.create(t,e.Fragment,r,n)}function BK(e,t){return t.value}function BO(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zk(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function FK(e,t,n){return r;function r(s,a,l,c){const p=Array.isArray(l.children)?n:t;return c?p(a,l,c):p(a,l)}}function UK(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),d=Ik(r);return t(s,a,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function qK(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Dk.call(t.properties,s)){const a=GK(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&IK.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 HK(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 Mc(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 Mc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Lk(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:NK;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const p=s.get(d)||0;l=d+"-"+p,s.set(d,p+1)}}const c=$O(e,a,l);c!==void 0&&n.push(c)}return n}function GK(e,t,n){const r=yK(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?oK(n):SK(n)),r.property==="style"){let s=typeof n=="object"?n:VK(e,String(n));return e.stylePropertyNameCase==="css"&&(s=KK(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?mK[r.property]||r.property:r.attribute,n]}}function VK(e,t){try{return CK(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=PO+"#cannot-parse-style-attribute",s}}function FO(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=IT(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=IT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Dk.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mc(e)}function Mc(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=PO+"#cannot-handle-mdx-estrees-without-createevaluater",n}function KK(e){const t={};let n;for(n in e)Dk.call(e,n)&&(t[ZK(n)]=e[n]);return t}function ZK(e){let t=e.replace(OK,WK);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function WK(e){return"-"+e.toLowerCase()}const Wb={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"]},YK={};function jk(e,t){const n=YK,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return UO(e,r,s)}function UO(e,t,n){if(XK(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 qT(e.children,t,n)}return Array.isArray(e)?qT(e,t,n):""}function qT(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=UO(e[s],t,n);return r.join("")}function XK(e){return!!(e&&typeof e=="object")}const HT=document.createElement("i");function Pk(e){const t="&"+e+";";HT.innerHTML=t;const n=HT.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 ci(e,t){return e.length>0?(Xr(e,e.length,0,t),e):t}const GT={}.hasOwnProperty;function qO(e){const t={};let n=-1;for(;++n<e.length;)QK(t,e[n]);return t}function QK(e,t){let n;for(n in t){const s=(GT.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){GT.call(s,l)||(s[l]=[]);const c=a[l];JK(s[l],Array.isArray(c)?c:c?[c]:[])}}}function JK(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 HO(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 Ei(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sr=vo(/[A-Za-z]/),mr=vo(/[\dA-Za-z]/),eZ=vo(/[#-'*+\--9=?A-Z^-~]/);function Jp(e){return e!==null&&(e<32||e===127)}const av=vo(/\d/),tZ=vo(/[\dA-Fa-f]/),nZ=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 Gh=vo(new RegExp("\\p{P}|\\p{S}","u")),ia=vo(/\s/);function vo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Dl(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(d){return jt(d)?(e.enter(n),c(d)):t(d)}function c(d){return jt(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const rZ={tokenize:iZ};function iZ(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 d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,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:oZ},VT={tokenize:aZ};function oZ(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,d,p)(T)}return p(T)}function d(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,p(T)}return c(T)}function p(T){if(r===n.length){if(!s)return g(T);if(s.currentConstruct&&s.currentConstruct.concrete)return x(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(VT,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,x(T)}function g(T){return t.containerState={},e.attempt(VT,y,x)(T)}function y(T){return r++,n.push([t.currentConstruct,t.containerState]),g(T)}function x(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}),S(T)}function S(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),S)}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 aZ(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 Tl(e){if(e===null||un(e)||ia(e))return 1;if(Gh(e))return 2}function Vh(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 lv={name:"attention",resolveAll:lZ,tokenize:uZ};function lZ(e,t){let n=-1,r,s,a,l,c,d,p,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;d=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};KT(m,-d),KT(g,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=ci(p,[["enter",e[r][1],t],["exit",e[r][1],t]])),p=ci(p,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),p=ci(p,Vh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),p=ci(p,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,p=ci(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Xr(e,r-1,n-r+3,p),n=r+p.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function uZ(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Tl(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const p=e.exit("attentionSequence"),h=Tl(d),m=!h||h===2&&s||n.includes(d),g=!s||s===2&&h||n.includes(r);return p._open=!!(a===42?m:m&&(s||!g)),p._close=!!(a===42?g:g&&(h||!m)),t(d)}}function KT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const cZ={name:"autolink",tokenize:fZ};function fZ(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):p(y)}function l(y){return y===43||y===45||y===46||mr(y)?(r=1,c(y)):p(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||mr(y))&&r++<32?(e.consume(y),c):(r=0,p(y))}function d(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||Jp(y)?n(y):(e.consume(y),d)}function p(y){return y===64?(e.consume(y),h):eZ(y)?(e.consume(y),p):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 x=y===45?g:m;return e.consume(y),x}return n(y)}}const nf={partial:!0,tokenize:dZ};function dZ(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 GO={continuation:{tokenize:hZ},exit:mZ,name:"blockQuote",tokenize:pZ};function pZ(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 hZ(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(GO,t,n)(l)}}function mZ(e){e.exit("blockQuote")}const VO={name:"characterEscape",tokenize:gZ};function gZ(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 nZ(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const KO={name:"characterReference",tokenize:bZ};function bZ(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"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,l=mr,h(m))}function p(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=tZ,h):(e.enter("characterReferenceValue"),a=7,l=av,h(m))}function h(m){if(m===59&&s){const g=e.exit("characterReferenceValue");return l===mr&&!Pk(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 ZT={partial:!0,tokenize:vZ},WT={concrete:!0,name:"codeFenced",tokenize:yZ};function yZ(e,t,n){const r=this,s={partial:!0,tokenize:A};let a=0,l=0,c;return d;function d(N){return p(N)}function p(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(ZT,S,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"}),x(N))}function x(N){return N===null||dt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===c?n(N):(e.consume(N),x)}function S(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(ZT,S,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 vZ(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 Yb={name:"codeIndented",tokenize:xZ},kZ={partial:!0,tokenize:SZ};function xZ(e,t,n){const r=this;return s;function s(p){return e.enter("codeIndented"),qt(e,a,"linePrefix",5)(p)}function a(p){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(p):n(p)}function l(p){return p===null?d(p):dt(p)?e.attempt(kZ,l,d)(p):(e.enter("codeFlowValue"),c(p))}function c(p){return p===null||dt(p)?(e.exit("codeFlowValue"),l(p)):(e.consume(p),c)}function d(p){return e.exit("codeIndented"),t(p)}}function SZ(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 wZ={name:"codeText",previous:TZ,resolve:EZ,tokenize:_Z};function EZ(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 TZ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _Z(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"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):dt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),p(m))}function p(m){return m===null||m===32||m===96||dt(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),p)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",p(m))}}class RZ{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&&Uu(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),Uu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Uu(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);Uu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Uu(this.left,n.reverse())}}}function Uu(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 ZO(e){const t={};let n=-1,r,s,a,l,c,d,p;const h=new RZ(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"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,CZ(h,n)),n=t[n],p=!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)),!p}function CZ(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,d=[],p={};let h,m,g=-1,y=n,x=0,S=0;const _=[S];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&&(S=g+1,_.push(S),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();d.push([R,R+E.length-1]),e.splice(R,2,E)}for(d.reverse(),g=-1;++g<d.length;)p[x+d[g][0]]=x+d[g][1],x+=d[g][1]-d[g][0]-1;return p}const AZ={resolve:OZ,tokenize:MZ},NZ={partial:!0,tokenize:IZ};function OZ(e){return ZO(e),e}function MZ(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(NZ,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 IZ(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 WO(e,t,n,r,s,a,l,c,d){const p=d||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||Jp(E)?n(E):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(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?x:y)}function x(E){return E===60||E===62||E===92?(e.consume(E),y):y(E)}function S(E){return!h&&(E===null||E===41||un(E))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(E)):h<p&&E===40?(e.consume(E),h++,S):E===41?(e.consume(E),h--,S):E===null||E===32||E===40||Jp(E)?n(E):(e.consume(E),E===92?_:S)}function _(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function YO(e,t,n,r,s,a){const l=this;let c=0,d;return p;function p(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&&!d||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),d||(d=!jt(y)),y===92?g:m)}function g(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function XO(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,d):n(g)}function d(g){return g===l?(e.enter(s),e.consume(g),e.exit(s),e.exit(r),t):(e.enter(a),p(g))}function p(g){return g===l?(e.exit(a),d(l)):g===null?n(g):dt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),qt(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===l||g===null||dt(g)?(e.exit("chunkString"),p(g)):(e.consume(g),g===92?m:h)}function m(g){return g===l||g===92?(e.consume(g),h):h(g)}}function oc(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 DZ={name:"definition",tokenize:LZ},zZ={partial:!0,tokenize:jZ};function LZ(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return YO.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=Ei(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return un(y)?oc(e,p)(y):p(y)}function p(y){return WO(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(zZ,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 jZ(e,t,n){return r;function r(c){return un(c)?oc(e,s)(c):n(c)}function s(c){return XO(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 PZ={name:"hardBreakEscape",tokenize:$Z};function $Z(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 BZ={name:"headingAtx",resolve:FZ,tokenize:UZ};function FZ(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 UZ(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"),d(h)):h===null||dt(h)?(e.exit("atxHeading"),t(h)):jt(h)?qt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),p(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),c(h))}function p(h){return h===null||h===35||un(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),p)}}const qZ=["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"],YT=["pre","script","style","textarea"],HZ={concrete:!0,name:"htmlFlow",resolveTo:KZ,tokenize:ZZ},GZ={partial:!0,tokenize:YZ},VZ={partial:!0,tokenize:WZ};function KZ(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 ZZ(e,t,n){const r=this;let s,a,l,c,d;return p;function p(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,S):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,x):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 x(O){const ie="CDATA[";return O===ie.charCodeAt(c++)?(e.consume(O),c===ie.length?r.interrupt?t:Z:x):n(O)}function S(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&&YT.includes(te)?(s=1,r.interrupt?t(O):Z(O)):qZ.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),d=O,I):jt(O)?(e.consume(O),N):H(O)}function I(O){return O===d?(e.consume(O),d=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(GZ,G,q)(O)):O===null||dt(O)?(e.exit("htmlFlowData"),q(O)):(e.consume(O),Z)}function q(O){return e.check(VZ,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 YT.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 WZ(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 YZ(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(nf,t,n)}}const XZ={name:"htmlText",tokenize:QZ};function QZ(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),d}function d(D){return D===33?(e.consume(D),p):D===47?(e.consume(D),A):D===63?(e.consume(D),T):Sr(D)?(e.consume(D),H):n(D)}function p(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,x):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 x(D){const B="CDATA[";return D===B.charCodeAt(a++)?(e.consume(D),a===B.length?S:x):n(D)}function S(D){return D===null?n(D):D===93?(e.consume(D),_):dt(D)?(l=S,U(D)):(e.consume(D),S)}function _(D){return D===93?(e.consume(D),E):S(D)}function E(D){return D===62?F(D):D===93?(e.consume(D),E):S(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 $k={name:"labelEnd",resolveAll:nW,resolveTo:rW,tokenize:iW},JZ={tokenize:sW},eW={tokenize:oW},tW={tokenize:aW};function nW(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 rW(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 d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},p={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",d,t],["enter",p,t]],c=ci(c,e.slice(a+1,a+r+3)),c=ci(c,[["enter",h,t]]),c=ci(c,Vh(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=ci(c,[["exit",h,t],e[l-2],e[l-1],["exit",p,t]]),c=ci(c,e.slice(l+1)),c=ci(c,[["exit",d,t]]),Xr(e,a,e.length,c),e}function iW(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(Ei(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),d):n(g)}function d(g){return g===40?e.attempt(JZ,h,l?h:m)(g):g===91?e.attempt(eW,h,l?p:m)(g):l?h(g):m(g)}function p(g){return e.attempt(tW,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)?oc(e,a)(m):a(m)}function a(m){return m===41?h(m):WO(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return un(m)?oc(e,d)(m):h(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?XO(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function p(m){return un(m)?oc(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 oW(e,t,n){const r=this;return s;function s(c){return YO.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Ei(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function aW(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 lW={name:"labelStartImage",resolveAll:$k.resolveAll,tokenize:uW};function uW(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 cW={name:"labelStartLink",resolveAll:$k.resolveAll,tokenize:fW};function fW(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 Xb={name:"lineEnding",tokenize:dW};function dW(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:pW};function pW(e,t,n){let r=0,s;return a;function a(p){return e.enter("thematicBreak"),l(p)}function l(p){return s=p,c(p)}function c(p){return p===s?(e.enter("thematicBreakSequence"),d(p)):r>=3&&(p===null||dt(p))?(e.exit("thematicBreak"),t(p)):n(p)}function d(p){return p===s?(e.consume(p),r++,d):(e.exit("thematicBreakSequence"),jt(p)?qt(e,c,"whitespace")(p):c(p))}}const Ir={continuation:{tokenize:bW},exit:vW,name:"list",tokenize:gW},hW={partial:!0,tokenize:kW},mW={partial:!0,tokenize:yW};function gW(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 x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:av(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(kp,n,p)(y):p(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return av(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),p(y)):n(y)}function p(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(nf,r.interrupt?n:h,e.attempt(hW,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 bW(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(nf,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 yW(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 vW(e){e.exit(this.containerState.type)}function kW(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 XT={name:"setextUnderline",resolveTo:xW,tokenize:SW};function xW(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 SW(e,t,n){const r=this;let s;return a;function a(p){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=p,l(p)):n(p)}function l(p){return e.enter("setextHeadingLineSequence"),c(p)}function c(p){return p===s?(e.consume(p),c):(e.exit("setextHeadingLineSequence"),jt(p)?qt(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||dt(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const wW={tokenize:EW};function EW(e){const t=this,n=e.attempt(nf,r,e.attempt(this.parser.constructs.flowInitial,s,qt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(AZ,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 TW={resolveAll:JO()},_W=QO("string"),RW=QO("text");function QO(e){return{resolveAll:JO(e==="text"?CW: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 p(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return p(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function p(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 JO(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 CW(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,d;for(;a--;){const p=s[a];if(typeof p=="string"){for(l=p.length;p.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(p===-2)d=!0,c++;else if(p!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const p={type:n===e.length||d||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={...p.start},r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const AW={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:GO},NW={91:DZ},OW={[-2]:Yb,[-1]:Yb,32:Yb},MW={35:BZ,42:kp,45:[XT,kp],60:HZ,61:XT,95:kp,96:WT,126:WT},IW={38:KO,92:VO},DW={[-5]:Xb,[-4]:Xb,[-3]:Xb,33:lW,38:KO,42:lv,60:[cZ,XZ],91:cW,92:[PZ,VO],93:$k,95:lv,96:wZ},zW={null:[lv,TW]},LW={null:[42,95]},jW={null:[]},PW=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:LW,contentInitial:NW,disable:jW,document:AW,flow:MW,flowInitial:OW,insideSpan:zW,string:IW,text:DW},Symbol.toStringTag,{value:"Module"}));function $W(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 d={attempt:I(A),check:I(N),consume:R,enter:T,exit:C,interrupt:I(N,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:e,previous:null,sliceSerialize:g,sliceStream:y,write:m};let h=t.tokenize.call(p,d);return t.resolveAll&&a.push(t),p;function m(K){return l=ci(l,K),_(),l[l.length-1]!==null?[]:(H(t,0),p.events=Vh(a,p.events,p),p.events)}function g(K,Z){return FW(y(K),Z)}function y(K){return BW(l,K)}function x(){const{_bufferIndex:K,_index:Z,line:q,column:z,offset:j}=r;return{_bufferIndex:K,_index:Z,line:q,column:z,offset:j}}function S(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++)),p.previous=K}function T(K,Z){const q=Z||{};return q.type=K,q.start=x(),p.events.push(["enter",q,p]),c.push(q),q}function C(K){const Z=c.pop();return Z.end=x(),p.events.push(["exit",Z,p]),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||(p.currentConstruct=ne),ne.name&&p.parser.constructs.disable.null.includes(ne.name)?te():ne.tokenize.call(Z?Object.assign(Object.create(p),Z):p,d,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(p.events,Z,p.events.length-Z,K.resolve(p.events.slice(Z),p)),K.resolveTo&&(p.events=K.resolveTo(p.events,p))}function $(){const K=x(),Z=p.previous,q=p.currentConstruct,z=p.events.length,j=Array.from(c);return{from:z,restore:F};function F(){r=K,p.previous=Z,p.currentConstruct=q,p.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 BW(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 FW(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=`
|
|
41
|
+
`;break}case-3:{l=`\r
|
|
42
|
+
`;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 UW(e){const r={constructs:qO([PW,...(e||{}).extensions||[]]),content:s(rZ),defined:[],document:s(sZ),flow:s(wW),lazy:{},string:s(_W),text:s(RW)};return r;function s(a){return l;function l(c){return $W(r,a,c)}}}function qW(e){for(;!ZO(e););return e}const QT=/[\0\t\n\r]/g;function HW(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const d=[];let p,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(QT.lastIndex=m,p=QT.exec(a),g=p&&p.index!==void 0?p.index:a.length,y=a.charCodeAt(g),!p){t=a.slice(m);break}if(y===10&&m===g&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<g&&(d.push(a.slice(m,g)),e+=g-m),y){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=g+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const GW=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VW(e){return e.replace(GW,KW)}function KW(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return HO(n.slice(a?2:1),a?16:10)}return Pk(n)||e}const eM={}.hasOwnProperty;function ZW(e,t,n){return typeof t!="string"&&(n=t,t=void 0),WW(n)(qW(UW(n).document().write(HW()(e,t,!0))))}function WW(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(ke,l),htmlFlowData:$,htmlText:a(ke,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:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:ye,autolinkProtocol:pe,blockQuote:d(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:ne,characterReference:le,codeFenced:d(_),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:L,codeIndented:d(E),codeText:d(j),codeTextData:L,data:L,definition:d(),definitionDestinationString:C,definitionLabelString:R,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(Z),hardBreakTrailing:d(Z),htmlFlow:d(q),htmlFlowData:L,htmlText:d(z),htmlTextData:L,image:d(U),label:W,labelText:P,lineEnding:K,link:d(F),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ie,resourceDestinationString:D,resourceTitleString:B,resource:G,setextHeading:d(H),setextHeadingLineSequence:I,setextHeadingText:N,strong:d(),thematicBreak:d()}};tM(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:p,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]];eM.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]||JT).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 kt=Be;for(it=void 0;kt--;){const We=J[kt];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=kt}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 kt={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};ot=kt,J.splice(Be,0,["enter",kt,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 d(J){return ue;function ue(Ie){J&&J.call(this,Ie),p.call(this,Ie)}}function p(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]||JT).call(this,J,Be[0]));else throw new Error("Cannot close `"+J.type+"` ("+sc({start:J.start,end:J.end})+"): it’s not open");Ie.position.end=to(J.end)}function h(){return jk(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 x(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=J}function S(){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=Ei(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=VW(ue),Ie.identifier=Ei(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=Ei(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=HO(ue,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=Pk(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 ke(){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 tM(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?tM(e,r):YW(e,r)}}function YW(e,t){let n;for(n in t)if(eM.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 JT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+sc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+sc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+sc({start:t.start,end:t.end})+") is still open")}function XW(e){const t=this;t.parser=n;function n(r){return ZW(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function QW(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 JW(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
43
|
+
`}]}function eY(e,t){const n=t.value?t.value+`
|
|
44
|
+
`:"",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 tY(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nY(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rY(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Dl(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 d={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,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,p),e.applyData(t,p)}function iY(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 nM(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 oY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nM(e,t);const s={src:Dl(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 aY(e,t){const n={src:Dl(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 lY(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 uY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nM(e,t);const s={href:Dl(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 cY(e,t){const n={href:Dl(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 fY(e,t,n){const r=e.all(t),s=n?dY(n):rM(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:`
|
|
45
|
+
`}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
46
|
+
`});const p={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,p),e.applyData(t,p)}function dY(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=rM(n[r])}return t}function rM(e){const t=e.spread;return t??e.children.length>1}function pY(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 hY(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 gY(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bY(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=Ik(t.children[1]),d=LO(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),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 yY(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 d=-1;const p=[];for(;++d<c;){const m=t.children[d],g={},y=l?l[d]:void 0;y&&(g.align=y);let x={type:"element",tagName:a,properties:g,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),p.push(x)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,h),e.applyData(t,h)}function vY(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const e_=9,t_=32;function kY(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(n_(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(n_(t.slice(s),s>0,!1)),a.join("")}function n_(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===e_||a===t_;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===e_||a===t_;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function xY(e,t){const n={type:"text",value:kY(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function SY(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const wY={blockquote:QW,break:JW,code:eY,delete:tY,emphasis:nY,footnoteReference:rY,heading:iY,html:sY,imageReference:oY,image:aY,inlineCode:lY,linkReference:uY,link:cY,listItem:fY,list:pY,paragraph:hY,root:mY,strong:gY,table:bY,tableCell:vY,tableRow:yY,text:xY,thematicBreak:SY,toml:np,yaml:np,definition:np,footnoteDefinition:np};function np(){}const iM=-1,Kh=0,ac=1,eh=2,Bk=3,Fk=4,Uk=5,qk=6,sM=7,oM=8,r_=typeof self=="object"?self:globalThis,EY=(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 Kh:case iM:return n(l,s);case ac:{const c=n([],s);for(const d of l)c.push(r(d));return c}case eh:{const c=n({},s);for(const[d,p]of l)c[r(d)]=r(p);return c}case Bk:return n(new Date(l),s);case Fk:{const{source:c,flags:d}=l;return n(new RegExp(c,d),s)}case Uk:{const c=n(new Map,s);for(const[d,p]of l)c.set(r(d),r(p));return c}case qk:{const c=n(new Set,s);for(const d of l)c.add(r(d));return c}case sM:{const{name:c,message:d}=l;return n(new r_[c](d),s)}case oM: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 r_[a](l),s)};return r},i_=e=>EY(new Map,e)(0),Qa="",{toString:TY}={},{keys:_Y}=Object,qu=e=>{const t=typeof e;if(t!=="object"||!e)return[Kh,t];const n=TY.call(e).slice(8,-1);switch(n){case"Array":return[ac,Qa];case"Object":return[eh,Qa];case"Date":return[Bk,Qa];case"RegExp":return[Fk,Qa];case"Map":return[Uk,Qa];case"Set":return[qk,Qa];case"DataView":return[ac,n]}return n.includes("Array")?[ac,n]:n.includes("Error")?[sM,n]:[eh,n]},rp=([e,t])=>e===Kh&&(t==="function"||t==="symbol"),RY=(e,t,n,r)=>{const s=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},a=l=>{if(n.has(l))return n.get(l);let[c,d]=qu(l);switch(c){case Kh:{let h=l;switch(d){case"bigint":c=oM,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return s([iM],l)}return s([c,h],l)}case ac:{if(d){let g=l;return d==="DataView"?g=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(g=new Uint8Array(l)),s([d,[...g]],l)}const h=[],m=s([c,h],l);for(const g of l)h.push(a(g));return m}case eh:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const g of _Y(l))(e||!rp(qu(l[g])))&&h.push([a(g),a(l[g])]);return m}case Bk:return s([c,l.toISOString()],l);case Fk:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case Uk:{const h=[],m=s([c,h],l);for(const[g,y]of l)(e||!(rp(qu(g))||rp(qu(y))))&&h.push([a(g),a(y)]);return m}case qk:{const h=[],m=s([c,h],l);for(const g of l)(e||!rp(qu(g)))&&h.push(a(g));return m}}const{message:p}=l;return s([c,{name:d,message:p}],l)};return a},s_=(e,{json:t,lossy:n}={})=>{const r=[];return RY(!(t||n),!!t,new Map,r)(e),r},th=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?i_(s_(e,t)):structuredClone(e):(e,t)=>i_(s_(e,t));function CY(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 AY(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function NY(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||CY,r=e.options.footnoteBackLabel||AY,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[d]);if(!p)continue;const h=e.all(p),m=String(p.identifier).toUpperCase(),g=Dl(m.toLowerCase());let y=0;const x=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){x.length>0&&x.push({type:"text",value:" "});let R=typeof n=="string"?n:n(d,y);typeof R=="string"&&(R={type:"text",value:R}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,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(...x)}else h.push(...x);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(p,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...th(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
47
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
48
|
+
`}]}}const rf=(function(e){if(e==null)return DY;if(typeof e=="function")return Zh(e);if(typeof e=="object")return Array.isArray(e)?OY(e):MY(e);if(typeof e=="string")return IY(e);throw new Error("Expected function, string, or object as test")});function OY(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rf(e[n]);return Zh(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function MY(e){const t=e;return Zh(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function IY(e){return Zh(t);function t(n){return n&&n.type===e}}function Zh(e){return t;function t(n,r,s){return!!(zY(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function DY(){return!0}function zY(e){return e!==null&&typeof e=="object"&&"type"in e}const aM=[],LY=!0,uv=!1,jY="skip";function lM(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=rf(s),l=r?-1:1;c(e,void 0,[])();function c(d,p,h){const m=d&&typeof d=="object"?d:{};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 ("+(d.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=aM,x,S,_;if((!t||a(d,p,h[h.length-1]||void 0))&&(y=PY(n(d,h)),y[0]===uv))return y;if("children"in d&&d.children){const E=d;if(E.children&&y[0]!==jY)for(S=(r?E.children.length:-1)+l,_=h.concat(E);S>-1&&S<E.children.length;){const R=E.children[S];if(x=c(R,S,_)(),x[0]===uv)return x;S=typeof x[1]=="number"?x[1]:S+l}}return y}}}function PY(e){return Array.isArray(e)?e:typeof e=="number"?[LY,e]:e==null?aM:[e]}function Wh(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),lM(e,a,c,s);function c(d,p){const h=p[p.length-1],m=h?h.children.indexOf(d):void 0;return l(d,m,h)}}const cv={}.hasOwnProperty,$Y={};function BY(e,t){const n=t||$Y,r=new Map,s=new Map,a=new Map,l={...wY,...n.handlers},c={all:p,applyData:UY,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:FY,wrap:HY};return Wh(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 d(h,m){const g=h.type,y=c.handlers[g];if(cv.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:S,..._}=h,E=th(_);return E.children=c.all(h),E}return th(h)}return(c.options.unknownHandler||qY)(c,h,m)}function p(h){const m=[];if("children"in h){const g=h.children;let y=-1;for(;++y<g.length;){const x=c.one(g[y],h);if(x){if(y&&g[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=o_(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=o_(S.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function FY(e,t){e.position&&(t.position=AK(e))}function UY(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,th(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function qY(e,t){const n=t.data||{},r="value"in t&&!(cv.call(n,"hProperties")||cv.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 HY(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
49
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
50
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
51
|
+
`}),n}function o_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function a_(e,t){const n=BY(e,t),r=n.one(e,void 0),s=NY(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
52
|
+
`},s),a}function GY(e,t){return e&&"run"in e?async function(n,r){const s=a_(n,{file:r,...t});await e.run(s,r)}:function(n,r){return a_(n,{file:r,...e||t})}}function l_(e){if(e)throw e}var Qb,u_;function VY(){if(u_)return Qb;u_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},a=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var h=e.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!h&&!m)return!1;var g;for(g in p);return typeof g>"u"||e.call(p,g)},l=function(p,h){n&&h.name==="__proto__"?n(p,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):p[h.name]=h.newValue},c=function(p,h){if(h==="__proto__")if(e.call(p,h)){if(r)return r(p,h).value}else return;return p[h]};return Qb=function d(){var p,h,m,g,y,x,S=arguments[0],_=1,E=arguments.length,R=!1;for(typeof S=="boolean"&&(R=S,S=arguments[1]||{},_=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});_<E;++_)if(p=arguments[_],p!=null)for(h in p)m=c(S,h),g=c(p,h),S!==g&&(R&&g&&(a(g)||(y=s(g)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},l(S,{name:h,newValue:d(R,x,g)})):typeof g<"u"&&l(S,{name:h,newValue:g}));return S},Qb}var KY=VY();const Jb=sh(KY);function fv(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 ZY(){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(d,...p){const h=e[++a];let m=-1;if(d){l(d);return}for(;++m<s.length;)(p[m]===null||p[m]===void 0)&&(p[m]=s[m]);s=p,h?WY(h,c)(...p):l(null,...p)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function WY(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(s);try{d=e.apply(this,l)}catch(p){const h=p;if(c&&n)throw h;return s(h)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const zi={basename:YY,dirname:XY,extname:QY,join:JY,sep:"/"};function YY(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');sf(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 XY(e){if(sf(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 QY(e){sf(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 JY(...e){let t=-1,n;for(;++t<e.length;)sf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":eX(n)}function eX(e){sf(e);const t=e.codePointAt(0)===47;let n=tX(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function tX(e,t){let n="",r=0,s=-1,a=0,l=-1,c,d;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(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),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 sf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const nX={cwd:rX};function rX(){return"/"}function dv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function iX(e){if(typeof e=="string")e=new URL(e);else if(!dv(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 ey=["history","path","basename","stem","extname","dirname"];class uM{constructor(t){let n;t?dv(t)?n={path:t}:typeof t=="string"||oX(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":nX.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ey.length;){const a=ey[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)ey.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?zi.basename(this.path):void 0}set basename(t){ny(t,"basename"),ty(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){c_(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(ty(t,"extname"),c_(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){dv(t)&&(t=iX(t)),ny(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){ny(t,"stem"),ty(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 ty(e,t){if(e&&e.includes(zi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zi.sep+"`")}function ny(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function c_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function oX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const aX=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),lX={}.hasOwnProperty;class Hk extends aX{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=ZY()}copy(){const t=new Hk;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Jb(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sy("data",this.frozen),this.namespace[t]=n,this):lX.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sy("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=ip(t),r=this.parser||this.Parser;return ry("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ry("process",this.parser||this.Parser),iy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=ip(t),d=r.parse(c);r.run(d,c,function(h,m,g){if(h||!m||!g)return p(h);const y=m,x=r.stringify(y,g);fX(x)?g.value=x:g.result=x,p(h,g)});function p(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),ry("processSync",this.parser||this.Parser),iy("processSync",this.compiler||this.Compiler),this.process(t,s),d_("processSync","process",n),r;function s(a,l){n=!0,l_(a),r=l}}run(t,n,r){f_(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 d=ip(n);s.run(t,d,p);function p(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),d_("runSync","run",r),s;function a(l,c){l_(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=ip(n),s=this.compiler||this.Compiler;return iy("stringify",s),f_(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(sy("use",this.frozen),t!=null)if(typeof t=="function")d(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(p){if(typeof p=="function")d(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[h,...m]=p;d(h,m)}else l(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function l(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(s.settings=Jb(!0,s.settings,p.settings))}function c(p){let h=-1;if(p!=null)if(Array.isArray(p))for(;++h<p.length;){const m=p[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function d(p,h){let m=-1,g=-1;for(;++m<r.length;)if(r[m][0]===p){g=m;break}if(g===-1)r.push([p,...h]);else if(h.length>0){let[y,...x]=h;const S=r[g][1];fv(S)&&fv(y)&&(y=Jb(!0,S,y)),r[g]=[p,y,...x]}}}}const uX=new Hk().freeze();function ry(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function iy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sy(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 f_(e){if(!fv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function d_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ip(e){return cX(e)?e:new uM(e)}function cX(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fX(e){return typeof e=="string"||dX(e)}function dX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pX="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",p_=[],h_={allowDangerousHtml:!0},hX=/^(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 gX(e){const t=bX(e),n=yX(e);return vX(t.runSync(t.parse(n),n),e)}function bX(e){const t=e.rehypePlugins||p_,n=e.remarkPlugins||p_,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...h_}:h_;return uX().use(XW).use(n).use(GY,r).use(t)}function yX(e){const t=e.children||"",n=new uM;return typeof t=="string"&&(n.value=t),n}function vX(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||kX;for(const h of mX)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+pX+h.id,void 0);return Wh(e,p),DK(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function p(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 Wb)if(Object.hasOwn(Wb,y)&&Object.hasOwn(h.properties,y)){const x=h.properties[y],S=Wb[y];(S===null||S.includes(h.tagName))&&(h.properties[y]=d(String(x||""),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 kX(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||hX.test(e.slice(0,t))?e:""}const m_=(function(e,t,n){const r=rf(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]}),da=(function(e){if(e==null)return wX;if(typeof e=="string")return SX(e);if(typeof e=="object")return xX(e);if(typeof e=="function")return Gk(e);throw new Error("Expected function, string, or array as `test`")});function xX(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=da(e[n]);return Gk(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function SX(e){return Gk(t);function t(n){return n.tagName===e}}function Gk(e){return t;function t(n,r,s){return!!(EX(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function wX(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function EX(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const g_=/\n/g,b_=/[\t ]+/g,pv=da("br"),y_=da(MX),TX=da("p"),v_=da("tr"),_X=da(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",OX,IX]),cM=da(["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 RX(e,t){const n=t||{},r="children"in e?e.children:[],s=cM(e),a=pM(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...dM(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...fM(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?pv(r[c+1]):s}));const d=[];let p;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?p!==void 0&&h>p&&(p=h):h&&(p!==void 0&&p>-1&&d.push(`
|
|
53
|
+
`.repeat(p)||" "),p=-1,d.push(h))}return d.join("")}function fM(e,t,n){return e.type==="element"?CX(e,t,n):e.type==="text"?n.whitespace==="normal"?dM(e,n):AX(e):[]}function CX(e,t,n){const r=pM(e,n),s=e.children||[];let a=-1,l=[];if(_X(e))return l;let c,d;for(pv(e)||v_(e)&&m_(t,e,v_)?d=`
|
|
54
|
+
`:TX(e)?(c=2,d=2):cM(e)&&(c=1,d=1);++a<s.length;)l=l.concat(fM(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?pv(s[a+1]):d}));return y_(e)&&m_(t,e,y_)&&l.push(" "),c&&l.unshift(c),d&&l.push(d),l}function dM(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){g_.lastIndex=a;const d=g_.exec(n),p=d&&"index"in d?d.index:n.length;r.push(NX(n.slice(a,p).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,p===n.length?t.breakAfter:!0)),a=p+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 AX(e){return[String(e.value)]}function NX(e,t,n){const r=[];let s=0,a;for(;s<e.length;){b_.lastIndex=s;const l=b_.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 pM(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 OX(e){return!!(e.properties||{}).hidden}function MX(e){return e.tagName==="td"||e.tagName==="th"}function IX(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function DX(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"},p={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(p,{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*\\(",x=["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"],S=["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:S,keyword:x,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,p],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:[p,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,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 zX(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=DX(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 LX(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 d={match:/\\"/},p={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}),x={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["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:S,literal:_,built_in:[...R,...T,"set","shopt",...C,...A]},contains:[y,e.SHEBANG(),x,m,a,l,E,c,d,p,h,n]}}function jX(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/}]},p={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(p,{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,p],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,p,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,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:p,keywords:_}}}function PX(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"},p={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(p,{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*\\(",x=["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"],S=["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:S,keyword:x,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,p],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:[p,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,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 $X(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)*"}),d={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},p={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/}),x={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]},_=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});g.contains=[S,x,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],y.contains=[_,x,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const E={variants:[p,S,x,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,d,{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,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C]}}const BX=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_-]*/}}),FX=["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"],UX=["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"],qX=[...FX,...UX],HX=["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(),GX=["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(),VX=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),KX=["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 ZX(e){const t=e.regex,n=BX(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:":("+GX.join("|")+")"},{begin:":(:)?("+VX.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+KX.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:HX.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+qX.join("|")+")\\b"}]}}function WX(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 YX(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 XX(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 QX(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},d=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(d,p,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 el="[0-9](_*[0-9])*",sp=`\\.(${el})`,op="[0-9a-fA-F](_*[0-9a-fA-F])*",k_={className:"number",variants:[{begin:`(\\b(${el})((${sp})|\\.)?|(${sp}))[eE][+-]?(${el})[fFdD]?\\b`},{begin:`\\b(${el})((${sp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${sp})[fFdD]?\\b`},{begin:`\\b(${el})[fFdD]\\b`},{begin:`\\b0[xX]((${op})\\.?|(${op})?\\.(${op}))[pP][+-]?(${el})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${op})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function hM(e,t,n){return n===-1?"":e.replace(t,r=>hM(e,t,n-1))}function JX(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+hM("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={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"]},p={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,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:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[p,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,k_,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},k_,p]}}const x_="[A-Za-z$_][0-9A-Za-z$_]*",eQ=["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"],tQ=["true","false","null","undefined","NaN","Infinity"],mM=["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"],gM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],bM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],nQ=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],rQ=[].concat(bM,mM,gM);function iQ(e){const t=e.regex,n=(P,{after:W})=>{const D="</"+P[0].slice(1);return P.input.indexOf(D,W)!==-1},r=x_,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:x_,keyword:eQ,literal:tQ,built_in:rQ,"variable.language":nQ},d="[0-9](_?[0-9])*",p=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${p})|\\.)?|(${p}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${p})\\b|\\.)?|(${p})\\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"}},x={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},S={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,x,S,_,{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:{_:[...mM,...gM]}},$={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([...bM,"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,x,S,_,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 tl="[0-9](_*[0-9])*",ap=`\\.(${tl})`,lp="[0-9a-fA-F](_*[0-9a-fA-F])*",oQ={className:"number",variants:[{begin:`(\\b(${tl})((${ap})|\\.)?|(${ap}))[eE][+-]?(${tl})[fFdD]?\\b`},{begin:`\\b(${tl})((${ap})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ap})[fFdD]?\\b`},{begin:`\\b(${tl})[fFdD]\\b`},{begin:`\\b0[xX]((${lp})\\.?|(${lp})?\\.(${lp}))[pP][+-]?(${tl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${lp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function aQ(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+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},p=oQ,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,d,{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,d,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,d]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
55
|
+
`},p]}}const lQ=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_-]*/}}),uQ=["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"],cQ=["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"],fQ=[...uQ,...cQ],dQ=["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(),yM=["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(),vM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),pQ=["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(),hQ=yM.concat(vM).sort().reverse();function mQ(e){const t=lQ(e),n=hQ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],d=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},p=function(T,C,A){return{className:T,begin:C,relevance:A}},h={$pattern:/[a-z-]+/,keyword:r,attribute:dQ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,p("variable","@@?"+s,10),p("variable","@\\{"+s+"\\}"),p("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)},x={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+pQ.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},S={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,p("keyword","all\\b"),p("variable","@\\{"+s+"\\}"),{begin:"\\b("+fQ.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,p("selector-tag",a,0),p("selector-id","#"+a),p("selector-class","\\."+a,0),p("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+yM.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+vM.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,S,_,R,x,E,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function gQ(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 bQ(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 yQ(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+.-]*/,d={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}]},p={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(p,{contains:[]}),g=e.inherit(h,{contains:[]});p.contains.push(g),h.contains.push(m);let y=[n,d];return[p,h,m,g].forEach(E=>{E.contains=E.contains.concat(y)}),y=y.concat(p,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,p,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,d,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function vQ(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"]},d={$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:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function kQ(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*\(.*?\))?/},d={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]},p={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,d],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(S,_,E="\\1")=>{const R=E==="\\1"?E:t.concat(E,_);return t.concat(t.concat("(?:",S,")"),_,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,E,r)},y=(S,_,E)=>t.concat(t.concat("(?:",S,")"),_,/(?:\\.|[^\\\/])*?/,E,r),x=[d,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}]},p,{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,p]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=x,l.contains=x,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:x}}function xQ(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:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},p=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"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=`[
|
|
56
|
+
]`,x={scope:"string",variants:[h,p,m,g]},S={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,x,S,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,x,S,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,x,S]}]},{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]},x,S]}}function SQ(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 wQ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function EQ(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"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},p={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,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,h,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,h,p]},{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,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,p]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},g="[0-9](_?[0-9])*",y=`(\\b(${g}))?\\.(${g})|\\b(${g})\\.`,x=`\\b|${r.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${g})|(${y}))[eE][+-]?(${g})[jJ]?(?=${x})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${x})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${x})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${x})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${x})`},{begin:`\\b(${g})[jJ](?=${x})`}]},_={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",d,S,m,e.HASH_COMMENT_MODE]}]};return p.contains=[m,S,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[d,S,{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:[S,E,m]}]}}function TQ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function _Q(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 RQ(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]+"},d={begin:"#<",end:">"},p=[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])*",x={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"}]},S={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:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},x,{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(d,p),relevance:0}].concat(d,p);h.contains=N,S.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 p.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(p).concat(N)}}function CQ(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"],d=["true","false","Some","None","Ok","Err"],p=["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:d,built_in:p},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:p,type:h}},{className:"punctuation",begin:"->"},a]}}const AQ=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_-]*/}}),NQ=["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"],OQ=["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"],MQ=[...NQ,...OQ],IQ=["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(),DQ=["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(),zQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),LQ=["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 jQ(e){const t=AQ(e),n=zQ,r=DQ,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("+MQ.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("+LQ.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:IQ.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 PQ(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function $Q(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"],d=["add","asc","collation","desc","final","first","last","view"],p=["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,x=[...p,...d].filter(A=>!h.includes(A)),S={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(x,{when:A=>A.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:R(l)},T,E,S,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,_]}}function kM(e){return e?typeof e=="string"?e:e.source:null}function Hu(e){return sn("(?=",e,")")}function sn(...e){return e.map(n=>kM(n)).join("")}function BQ(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function xr(...e){return"("+(BQ(e).capture?"":"?:")+e.map(r=>kM(r)).join("|")+")"}const Vk=e=>sn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),FQ=["Protocol","Type"].map(Vk),S_=["init","self"].map(Vk),UQ=["Any","Self"],oy=["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"],w_=["false","nil","true"],qQ=["assignment","associativity","higherThan","left","lowerThan","none","right"],HQ=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],E_=["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"],xM=xr(/[/=\-+!*%<>&|^~?]/,/[\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]/),SM=xr(xM,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ay=sn(xM,SM,"*"),wM=xr(/[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]/),nh=xr(wM,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Di=sn(wM,nh,"*"),up=sn(/[A-Z]/,nh,"*"),GQ=["attached","autoclosure",sn(/convention\(/,xr("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"],VQ=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function KQ(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,xr(...FQ,...S_)],className:{2:"keyword"}},a={match:sn(/\./,xr(...oy)),relevance:0},l=oy.filter(ve=>typeof ve=="string").concat(["_|0"]),c=oy.filter(ve=>typeof ve!="string").concat(UQ).map(Vk),d={variants:[{className:"keyword",match:xr(...c,...S_)}]},p={$pattern:xr(/\b\w+/,/#\w+/),keyword:l.concat(HQ),literal:w_},h=[s,a,d],m={match:sn(/\./,xr(...E_)),relevance:0},g={className:"built_in",match:sn(/\b/,xr(...E_),/(?=\()/)},y=[m,g],x={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:ay},{match:`\\.(\\.|${SM})+`}]},_=[x,S],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 ke=sn(ve,/\//),Me=sn(/\//,ve);return{begin:ke,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:`\\$${nh}+`},U=[z,j,F],P={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:VQ,contains:[..._,T,$]}]}},W={scope:"keyword",match:sn(/@/,xr(...GQ),Hu(xr(/\(/,/\s+/)))},D={scope:"meta",match:sn(/@/,Di)},B=[P,W,D],G={match:Hu(/\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)/,nh,"+")},{className:"type",match:up,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:sn(/\s+&\s+/,Hu(up)),relevance:0}]},O={begin:/</,end:/>/,keywords:p,contains:[...r,...h,...B,x,G]};G.contains.push(O);const ie={match:sn(Di,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:p,contains:["self",ie,...r,q,...h,...y,..._,T,$,...U,...B,G]},ne={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,G]},le={begin:xr(Hu(sn(Di,/\s*:/)),Hu(sn(Di,/\s+/,Di,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Di}]},pe={begin:/\(/,end:/\)/,keywords:p,contains:[le,...r,...h,..._,T,$,...B,G,te],endsParent:!0,illegal:/["']/},ye={match:[/(func|macro)/,/\s+/,xr(z.match,Di,ay)],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+/,ay],className:{1:"keyword",3:"title"}},he={begin:[/precedencegroup/,/\s+/,up],className:{1:"keyword",3:"title"},contains:[G],keywords:[...qQ,...w_],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:p,contains:[ne,...h,{begin:/:/,end:/\{/,keywords:p,contains:[{scope:"title.class.inherited",match:up},...h],relevance:0}]};for(const ve of $.variants){const ke=ve.contains.find(Ce=>Ce.label==="interpol");ke.keywords=p;const Me=[...h,...y,..._,T,$,...U];ke.contains=[...Me,{begin:/\(/,end:/\)/,contains:["self",...Me]}]}return{name:"Swift",keywords:p,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 rh="[A-Za-z$_][0-9A-Za-z$_]*",EM=["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"],TM=["true","false","null","undefined","NaN","Infinity"],_M=["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"],RM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],CM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],AM=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],NM=[].concat(CM,_M,RM);function ZQ(e){const t=e.regex,n=(P,{after:W})=>{const D="</"+P[0].slice(1);return P.input.indexOf(D,W)!==-1},r=rh,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:rh,keyword:EM,literal:TM,built_in:NM,"variable.language":AM},d="[0-9](_?[0-9])*",p=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${p})|\\.)?|(${p}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${p})\\b|\\.)?|(${p})\\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"}},x={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},S={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,x,S,_,{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:{_:[..._M,...RM]}},$={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([...CM,"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,x,S,_,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 WQ(e){const t=e.regex,n=ZQ(e),r=rh,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['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],p={$pattern:rh,keyword:EM.concat(d),literal:TM,built_in:NM.concat(s),"variable.language":AM},h={className:"meta",begin:"@"+r},m=(S,_,E)=>{const R=S.contains.findIndex(T=>T.label===_);if(R===-1)throw new Error("can not find mode to replace");S.contains.splice(R,1,E)};Object.assign(n.keywords,p),n.exports.PARAMS_CONTAINS.push(h);const g=n.contains.find(S=>S.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 x=n.contains.find(S=>S.label==="func.def");return x.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function YQ(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}/,d={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),/ *#/)}]},p={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,d,p,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 XQ(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/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},p={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,d,p,c]}}function QQ(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"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),p={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,d,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,d,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],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:p}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function JQ(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},x={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},S={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},x,S,a,l],E=[..._];return E.pop(),E.push(c),y.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:_}}const eJ={arduino:zX,bash:LX,c:jX,cpp:PX,csharp:$X,css:ZX,diff:WX,go:YX,graphql:XX,ini:QX,java:JX,javascript:iQ,json:sQ,kotlin:aQ,less:mQ,lua:gQ,makefile:bQ,markdown:yQ,objectivec:vQ,perl:kQ,php:xQ,"php-template":SQ,plaintext:wQ,python:EQ,"python-repl":TQ,r:_Q,ruby:RQ,rust:CQ,scss:jQ,shell:PQ,sql:$Q,swift:KQ,typescript:WQ,vbnet:YQ,wasm:XQ,xml:QQ,yaml:JQ};var ly,T_;function tJ(){if(T_)return ly;T_=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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}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 ut in Ge)we[ut]=Ge[ut]}),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,ut)=>`${Ge}${"_".repeat(ut+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 d=(Y={})=>{const X={children:[]};return Object.assign(X,Y),X};class p{constructor(){this.rootNode=d(),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=d({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=>{p._collapse(we)}))}}class h extends p{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 S("(?=",Y,")")}function y(Y){return S("(?:",Y,")*")}function x(Y){return S("(?:",Y,")?")}function S(...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 ut=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])+ut):($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=S(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 ut=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:S(/[ ]+/,"(",ut,/[.]?[:]?([.][ ]|[ ])/,"){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 ke=(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=S(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"?ut(we,Y.split(" ")):Array.isArray(Y)?ut(we,Y):Object.keys(Y).forEach(function(St){Object.assign(Ge,Pe(Y[St],X,St))}),Ge;function ut(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 ut=Y[we],St={},$e={};for(let Le=1;Le<=X.length;Le++)$e[Le+Ge]=ut[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 ut($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,ke].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=ut(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 kt 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 ut=!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.
|
|
57
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),On=De,Yt=at),Mt===void 0&&(Mt=!0);const lr={code:Yt,language:On};So("before:highlight",lr);const $r=lr.result?lr.result:Dt(lr.language,lr.code,Mt);return $r.code=lr.code,So("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],Sn=lr(mt,Pt);if(Sn){const[Jr,Ul]=Sn;if(jn.addText(Tt),Tt="",On[Pt]=(On[Pt]||0)+1,On[Pt]<=Ke&&(Ns+=Ul),Jr.startsWith("_"))Tt+=Je[0];else{const df=er.classNameAliases[Jr]||Jr;Br(Je[0],df)}}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,ff[mt.subLanguage]),ff[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 uf(Ue,Je){let Tt=1;const Pt=Je.length-1;for(;Tt<=Pt;){if(!Ue._emit[Tt]){Tt++;continue}const Sn=er.classNameAliases[Ue[Tt]]||Ue[Tt],Jr=Je[Tt];Sn?Br(Jr,Sn):(Xt=Jr,$r(),Xt=""),Tt++}}function ha(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&&(uf(Ue.beginScope,Je),Xt="")),mt=Object.create(Ue,{parent:{value:mt}}),mt}function $l(Ue,Je,Tt){let Pt=T(Ue.endRe,Tt);if(Pt){if(Ue["on:end"]){const Sn=new t(Ue);Ue["on:end"](Je,Sn),Sn.isMatchIgnored&&(Pt=!1)}if(Pt){for(;Ue.endsParent&&Ue.parent;)Ue=Ue.parent;return Ue}}if(Ue.endsWithParent)return $l(Ue.parent,Je,Tt)}function ma(Ue){return mt.matcher.regexIndex===0?(Xt+=Ue[0],1):(Os=!0,0)}function Xh(Ue){const Je=Ue[0],Tt=Ue.rule,Pt=new t(Tt),Sn=[Tt.__beforeBegin,Tt["on:begin"]];for(const Jr of Sn)if(Jr&&(Jr(Ue,Pt),Pt.isMatchIgnored))return ma(Je);return Tt.skip?Xt+=Je:(Tt.excludeBegin&&(Xt+=Je),cn(),!Tt.returnBegin&&!Tt.excludeBegin&&(Xt=Je)),ha(Tt,Ue),Tt.returnBegin?0:Je.length}function _r(Ue){const Je=Ue[0],Tt=at.substring(Ue.index),Pt=$l(mt,Ue,Tt);if(!Pt)return Fe;const Sn=mt;mt.endScope&&mt.endScope._wrap?(cn(),Br(Je,mt.endScope._wrap)):mt.endScope&&mt.endScope._multi?(cn(),uf(mt.endScope,Ue)):Sn.skip?Xt+=Je:(Sn.returnEnd||Sn.excludeEnd||(Xt+=Je),cn(),Sn.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&&ha(Pt.starts,Ue),Sn.returnEnd?0:Je.length}function Bl(){const Ue=[];for(let Je=mt;Je!==er;Je=Je.parent)Je.scope&&Ue.unshift(Je.scope);Ue.forEach(Je=>jn.openNode(Je))}let wo={};function ga(Ue,Je){const Tt=Je&&Je[0];if(Xt+=Ue,Tt==null)return cn(),0;if(wo.type==="begin"&&Je.type==="end"&&wo.index===Je.index&&Tt===""){if(Xt+=at.slice(Je.index,Je.index+1),!ut){const Pt=new Error(`0 width match regex (${De})`);throw Pt.languageName=De,Pt.badRule=wo.rule,Pt}return 1}if(wo=Je,Je.type==="begin")return Xh(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+=`
|
|
58
|
+
`,1;if(Fl>1e5&&Fl>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 cf=it(er);let ba="",mt=Yt||cf;const ff={},jn=new Le.__emitter(Le);Bl();let Xt="",Ns=0,Zi=0,Fl=0,Os=!1;try{if(er.__emitTokens)er.__emitTokens(at,jn);else{for(mt.matcher.considerAll();;){Fl++,Os?Os=!1:mt.matcher.considerAll(),mt.matcher.lastIndex=Zi;const Ue=mt.matcher.exec(at);if(!Ue)break;const Je=at.substring(Zi,Ue.index),Tt=ga(Je,Ue);Zi=Ue.index+Tt}ga(at.substring(Zi))}return jn.finalize(),ba=jn.toHTML(),{language:De,value:ba,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:Zi,context:at.slice(Zi-100,Zi+100),mode:Ue.mode,resultSoFar:ba},_emitter:jn};if(ut)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 _n(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(So("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 kt("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",_n(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}),So("after:highlightElement",{el:De,result:On,text:Yt})}function Jn(De){Le=Ot(Le,De)}const Gi=()=>{pa(),J("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function jl(){pa(),J("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let of=!1;function pa(){function De(){pa()}if(document.readyState==="loading"){of||window.addEventListener("DOMContentLoaded",De,!1),of=!0;return}document.querySelectorAll(Le.cssSelector).forEach(an)}function af(De,at){let Mt=null;try{Mt=at(Y)}catch(Yt){if(re("Language definition for '{}' could not be registered.".replace("{}",De)),ut)re(Yt);else throw Yt;Mt=$e}Mt.name||(Mt.name=De),X[De]=Mt,Mt.rawDefinition=at.bind(null,Y),Mt.aliases&&Vi(Mt.aliases,{languageName:De})}function xo(De){delete X[De];for(const at of Object.keys(we))we[at]===De&&delete we[at]}function Pl(){return Object.keys(X)}function yr(De){return De=(De||"").toLowerCase(),X[De]||X[we[De]]}function Vi(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 lf(De){const at=Ge.indexOf(De);at!==-1&&Ge.splice(at,1)}function So(De,at){const Mt=De;Ge.forEach(function(Yt){Yt[Mt]&&Yt[Mt](at)})}function Ki(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:pa,highlightElement:an,highlightBlock:Ki,configure:Jn,initHighlighting:Gi,initHighlightingOnLoad:jl,registerLanguage:af,unregisterLanguage:xo,listLanguages:Pl,getLanguage:yr,registerAliases:Vi,autoDetection:Cs,inherit:Ot,addPlugin:Ln,removePlugin:lf}),Y.debugMode=function(){ut=!1},Y.safeMode=function(){ut=!0},Y.versionString=st,Y.regex={concat:S,lookahead:g,either:E,optional:x,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({}),ly=Xe,Xe.HighlightJS=Xe,Xe.default=Xe,ly}var nJ=tJ();const rJ=sh(nJ),__={},iJ="hljs-";function sJ(e){const t=rJ.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(d,p,h){const m=h||__,g=typeof m.prefix=="string"?m.prefix:iJ;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:oJ,classPrefix:g});const y=t.highlight(p,{ignoreIllegals:!0,language:d});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const x=y._emitter.root,S=x.data;return S.language=y.language,S.relevance=y.relevance,x}function r(d,p){const m=(p||__).subset||s();let g=-1,y=0,x;for(;++g<m.length;){const S=m[g];if(!t.getLanguage(S))continue;const _=n(S,d,p);_.data&&_.data.relevance!==void 0&&_.data.relevance>y&&(y=_.data.relevance,x=_)}return x||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(d,p){if(typeof d=="string")t.registerLanguage(d,p);else{let h;for(h in d)Object.hasOwn(d,h)&&t.registerLanguage(h,d[h])}}function l(d,p){if(typeof d=="string")t.registerAliases(typeof p=="string"?p:[...p],{languageName:d});else{let h;for(h in d)if(Object.hasOwn(d,h)){const m=d[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(d){return!!t.getLanguage(d)}}class oJ{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 aJ={};function lJ(e){const t=e||aJ,n=t.aliases,r=t.detect||!1,s=t.languages||eJ,a=t.plainText,l=t.prefix,c=t.subset;let d="hljs";const p=sJ(s);if(n&&p.registerAlias(n),l){const h=l.indexOf("-");d=h===-1?l:l.slice(0,h)}return function(h,m){Wh(h,"element",function(g,y,x){if(g.tagName!=="code"||!x||x.type!=="element"||x.tagName!=="pre")return;const S=uJ(g);if(S===!1||!S&&!r||S&&a&&a.includes(S))return;Array.isArray(g.properties.className)||(g.properties.className=[]),g.properties.className.includes(d)||g.properties.className.unshift(d);const _=RX(g,{whitespace:"pre"});let E;try{E=S?p.highlight(S,_,{prefix:l}):p.highlightAuto(_,{prefix:l,subset:c})}catch(R){const T=R;if(S&&/Unknown language/.test(T.message)){m.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[x,g],cause:T,place:g.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!S&&E.data&&E.data.language&&g.properties.className.push("language-"+E.data.language),E.children.length>0&&(g.children=E.children)})}}function uJ(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 R_(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 cJ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function fJ(e,t,n){const s=rf((n||{}).ignore||[]),a=dJ(t);let l=-1;for(;++l<a.length;)lM(e,"text",c);function c(p,h){let m=-1,g;for(;++m<h.length;){const y=h[m],x=g?g.children:void 0;if(s(y,x?x.indexOf(y):void 0,g))return;g=y}if(g)return d(p,h)}function d(p,h){const m=h[h.length-1],g=a[l][0],y=a[l][1];let x=0;const _=m.children.indexOf(p);let E=!1,R=[];g.lastIndex=0;let T=g.exec(p.value);for(;T;){const C=T.index,A={index:T.index,input:T.input,stack:[...h,p]};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:(x!==C&&R.push({type:"text",value:p.value.slice(x,C)}),Array.isArray(N)?R.push(...N):N&&R.push(N),x=C+T[0].length,E=!0),!g.global)break;T=g.exec(p.value)}return E?(x<p.value.length&&R.push({type:"text",value:p.value.slice(x)}),m.children.splice(_,1,...R)):R=[p],_+R.length}}function dJ(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([pJ(s[0]),hJ(s[1])])}return t}function pJ(e){return typeof e=="string"?new RegExp(cJ(e),"g"):e}function hJ(e){return typeof e=="function"?e:function(){return e}}const uy="phrasing",cy=["autolink","link","image","label"];function mJ(){return{transforms:[SJ],enter:{literalAutolink:bJ,literalAutolinkEmail:fy,literalAutolinkHttp:fy,literalAutolinkWww:fy},exit:{literalAutolink:xJ,literalAutolinkEmail:kJ,literalAutolinkHttp:yJ,literalAutolinkWww:vJ}}}function gJ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:cy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:cy},{character:":",before:"[ps]",after:"\\/",inConstruct:uy,notInConstruct:cy}]}}function bJ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fy(e){this.config.enter.autolinkProtocol.call(this,e)}function yJ(e){this.config.exit.autolinkProtocol.call(this,e)}function vJ(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 kJ(e){this.config.exit.autolinkEmail.call(this,e)}function xJ(e){this.exit(e)}function SJ(e){fJ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,wJ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),EJ]],{ignore:["link","linkReference"]})}function wJ(e,t,n,r,s){let a="";if(!OM(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!TJ(n)))return!1;const l=_J(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 EJ(e,t,n,r){return!OM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function TJ(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 _J(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=R_(e,"(");let a=R_(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 OM(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ia(n)||Gh(n))&&(!t||n!==47)}MM.peek=zJ;function RJ(){this.buffer()}function CJ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function AJ(){this.buffer()}function NJ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function OJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ei(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MJ(e){this.exit(e)}function IJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ei(this.sliceSerialize(e)).toLowerCase(),n.label=t}function DJ(e){this.exit(e)}function zJ(){return"["}function MM(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 LJ(){return{enter:{gfmFootnoteCallString:RJ,gfmFootnoteCall:CJ,gfmFootnoteDefinitionLabelString:AJ,gfmFootnoteDefinition:NJ},exit:{gfmFootnoteCallString:OJ,gfmFootnoteCall:MJ,gfmFootnoteDefinitionLabelString:IJ,gfmFootnoteDefinition:DJ}}}function jJ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:MM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let d=c.move("[^");const p=a.enter("footnoteDefinition"),h=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
59
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?IM:PJ))),p(),d}}function PJ(e,t,n){return t===0?e:IM(e,t,n)}function IM(e,t,n){return(n?"":" ")+e}const $J=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];DM.peek=HJ;function BJ(){return{canContainEols:["delete"],enter:{strikethrough:UJ},exit:{strikethrough:qJ}}}function FJ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$J}],handlers:{delete:DM}}}function UJ(e){this.enter({type:"delete",children:[]},e)}function qJ(e){this.exit(e)}function DM(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 HJ(){return"~"}function GJ(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||KJ,s=[],a=[],l=[],c=[];let d=0,p=-1;for(;++p<e.length;){const x=[],S=[];let _=-1;for(e[p].length>d&&(d=e[p].length);++_<e[p].length;){const E=VJ(e[p][_]);if(t.alignDelimiters!==!1){const R=r(E);S[_]=R,(c[_]===void 0||R>c[_])&&(c[_]=R)}x.push(E)}a[p]=x,l[p]=S}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<d;)s[h]=C_(n[h]);else{const x=C_(n);for(;++h<d;)s[h]=x}h=-1;const m=[],g=[];for(;++h<d;){const x=s[h];let S="",_="";x===99?(S=":",_=":"):x===108?S=":":x===114&&(_=":");let E=t.alignDelimiters===!1?1:Math.max(1,c[h]-S.length-_.length);const R=S+"-".repeat(E)+_;t.alignDelimiters!==!1&&(E=S.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),p=-1;const y=[];for(;++p<a.length;){const x=a[p],S=l[p];h=-1;const _=[];for(;++h<d;){const E=x[h]||"";let R="",T="";if(t.alignDelimiters!==!1){const C=c[h]-(S[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!==d-1)&&_.push("|")}y.push(t.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return y.join(`
|
|
60
|
+
`)}function VJ(e){return e==null?"":String(e)}function KJ(e){return e.length}function C_(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 ZJ(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()),WJ);return s(),l}function WJ(e,t,n){return">"+(n?"":" ")+e}function YJ(e,t){return A_(e,t.inConstruct,!0)&&!A_(e,t.notInConstruct,!1)}function A_(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 N_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
61
|
+
`&&YJ(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
62
|
+
`}function XJ(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 QJ(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 JJ(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 eee(e,t,n,r){const s=JJ(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(QJ(e,n)){const m=n.enter("codeIndented"),g=n.indentLines(a,tee);return m(),g}const c=n.createTracker(r),d=s.repeat(Math.max(XJ(a,s)+1,3)),p=n.enter("codeFenced");let h=c.move(d);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:`
|
|
63
|
+
`,encode:["`"],...c.current()})),m()}return h+=c.move(`
|
|
64
|
+
`),a&&(h+=c.move(a+`
|
|
65
|
+
`)),h+=c.move(d),p(),h}function tee(e,t,n){return(n?"":" ")+e}function Kk(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 nee(e,t,n,r){const s=Kk(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let p=d.move("[");return p+=d.move(n.safe(n.associationId(e),{before:p,after:"]",...d.current()})),p+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(n.safe(e.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(c=n.enter("destinationRaw"),p+=d.move(n.safe(e.url,{before:p,after:e.title?" ":`
|
|
66
|
+
`,...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),p+=d.move(" "+s),p+=d.move(n.safe(e.title,{before:p,after:s,...d.current()})),p+=d.move(s),c()),l(),p}function ree(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 Ic(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ih(e,t,n){const r=Tl(e),s=Tl(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}}zM.peek=iee;function zM(e,t,n,r){const s=ree(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const p=d.charCodeAt(0),h=ih(r.before.charCodeAt(r.before.length-1),p,s);h.inside&&(d=Ic(p)+d.slice(1));const m=d.charCodeAt(d.length-1),g=ih(r.after.charCodeAt(0),m,s);g.inside&&(d=d.slice(0,-1)+Ic(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+d+y}function iee(e,t,n){return n.options.emphasis||"*"}function see(e,t){let n=!1;return Wh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,uv}),!!((!e.depth||e.depth<3)&&jk(e)&&(t.options.setext||n))}function oee(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:`
|
|
67
|
+
`,after:`
|
|
68
|
+
`});return m(),h(),g+`
|
|
69
|
+
`+(s===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
|
|
70
|
+
`))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(l+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
|
|
71
|
+
`,...a.current()});return/^[\t ]/.test(p)&&(p=Ic(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),d(),c(),p}LM.peek=aee;function LM(e){return e.value||""}function aee(){return"<"}jM.peek=lee;function jM(e,t,n,r){const s=Kk(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let p=d.move("![");return p+=d.move(n.safe(e.alt,{before:p,after:"]",...d.current()})),p+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(n.safe(e.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(c=n.enter("destinationRaw"),p+=d.move(n.safe(e.url,{before:p,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),p+=d.move(" "+s),p+=d.move(n.safe(e.title,{before:p,after:s,...d.current()})),p+=d.move(s),c()),p+=d.move(")"),l(),p}function lee(){return"!"}PM.peek=uee;function PM(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const p=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(p+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!p||p!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function uee(){return"!"}$M.peek=cee;function $M(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 d;if(l.atBreak)for(;d=c.exec(r);){let p=d.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(d.index+1)}}return s+r+s}function cee(){return"`"}function BM(e,t){const n=jk(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))}FM.peek=fee;function FM(e,t,n,r){const s=Kk(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(BM(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"),d=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(e,{before:p,after:"](",...l.current()})),p+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(e.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(d=n.enter("destinationRaw"),p+=l.move(n.safe(e.url,{before:p,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${a}`),p+=l.move(" "+s),p+=l.move(n.safe(e.title,{before:p,after:s,...l.current()})),p+=l.move(s),d()),p+=l.move(")"),c(),p}function fee(e,t,n){return BM(e,n)?"<":"["}UM.peek=dee;function UM(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const p=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(p+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!p||p!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function dee(){return"["}function Zk(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 pee(e){const t=Zk(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 hee(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 qM(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?hee(n):Zk(n);const c=e.ordered?l==="."?")":".":pee(n);let d=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&&(d=!0),qM(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"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const p=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),p}function gee(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 bee(e,t,n,r){const s=gee(n);let a=n.bulletCurrent||Zk(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 d=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,c.current()),h);return d(),p;function h(m,g,y){return g?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function yee(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const vee=rf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function kee(e,t,n,r){return(e.children.some(function(l){return vee(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function xee(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}HM.peek=See;function HM(e,t,n,r){const s=xee(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const p=d.charCodeAt(0),h=ih(r.before.charCodeAt(r.before.length-1),p,s);h.inside&&(d=Ic(p)+d.slice(1));const m=d.charCodeAt(d.length-1),g=ih(r.after.charCodeAt(0),m,s);g.inside&&(d=d.slice(0,-1)+Ic(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+d+y}function See(e,t,n){return n.options.strong||"*"}function wee(e,t,n,r){return n.safe(e.value,r)}function Eee(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 Tee(e,t,n){const r=(qM(n)+(n.options.ruleSpaces?" ":"")).repeat(Eee(n));return n.options.ruleSpaces?r.slice(0,-1):r}const GM={blockquote:ZJ,break:N_,code:eee,definition:nee,emphasis:zM,hardBreak:N_,heading:oee,html:LM,image:jM,imageReference:PM,inlineCode:$M,link:FM,linkReference:UM,list:mee,listItem:bee,paragraph:yee,root:kee,strong:HM,text:wee,thematicBreak:Tee};function _ee(){return{enter:{table:Ree,tableData:O_,tableHeader:O_,tableRow:Aee},exit:{codeText:Nee,table:Cee,tableData:dy,tableHeader:dy,tableRow:dy}}}function Ree(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 Cee(e){this.exit(e),this.data.inTable=void 0}function Aee(e){this.enter({type:"tableRow",children:[]},e)}function dy(e){this.exit(e)}function O_(e){this.enter({type:"tableCell",children:[]},e)}function Nee(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Oee));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Oee(e,t){return t==="|"?t:e}function Mee(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
72
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:l,tableCell:d,tableRow:c}};function l(y,x,S,_){return p(h(y,S,_),y.align)}function c(y,x,S,_){const E=m(y,S,_),R=p([E]);return R.slice(0,R.indexOf(`
|
|
73
|
+
`))}function d(y,x,S,_){const E=S.enter("tableCell"),R=S.enter("phrasing"),T=S.containerPhrasing(y,{..._,before:a,after:a});return R(),E(),T}function p(y,x){return GJ(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function h(y,x,S){const _=y.children;let E=-1;const R=[],T=x.enter("table");for(;++E<_.length;)R[E]=m(_[E],x,S);return T(),R}function m(y,x,S){const _=y.children;let E=-1;const R=[],T=x.enter("tableRow");for(;++E<_.length;)R[E]=d(_[E],y,x,S);return T(),R}function g(y,x,S){let _=GM.inlineCode(y,x,S);return S.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function Iee(){return{exit:{taskListCheckValueChecked:M_,taskListCheckValueUnchecked:M_,paragraph:zee}}}function Dee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Lee}}}function M_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function zee(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 Lee(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 d=GM.listItem(e,t,n,{...r,...c.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),d;function p(h){return h+l}}function jee(){return[mJ(),LJ(),BJ(),_ee(),Iee()]}function Pee(e){return{extensions:[gJ(),jJ(e),FJ(),Mee(e),Dee()]}}const $ee={tokenize:Gee,partial:!0},VM={tokenize:Vee,partial:!0},KM={tokenize:Kee,partial:!0},ZM={tokenize:Zee,partial:!0},Bee={tokenize:Wee,partial:!0},WM={name:"wwwAutolink",tokenize:qee,previous:XM},YM={name:"protocolAutolink",tokenize:Hee,previous:QM},Rs={name:"emailAutolink",tokenize:Uee,previous:JM},Hi={};function Fee(){return{text:Hi}}let Uo=48;for(;Uo<123;)Hi[Uo]=Rs,Uo++,Uo===58?Uo=65:Uo===91&&(Uo=97);Hi[43]=Rs;Hi[45]=Rs;Hi[46]=Rs;Hi[95]=Rs;Hi[72]=[Rs,YM];Hi[104]=[Rs,YM];Hi[87]=[Rs,WM];Hi[119]=[Rs,WM];function Uee(e,t,n){const r=this;let s,a;return l;function l(m){return!hv(m)||!JM.call(r,r.previous)||Wk(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return hv(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(Bee,h,p)(m):m===45||m===95||mr(m)?(a=!0,e.consume(m),d):h(m)}function p(m){return e.consume(m),s=!0,d}function h(m){return a&&s&&Sr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function qee(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!XM.call(r,r.previous)||Wk(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($ee,e.attempt(VM,e.attempt(KM,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Hee(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&QM.call(r,r.previous)&&!Wk(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),d}return n(m)}function d(m){return m===47?(e.consume(m),a?p:(a=!0,d)):n(m)}function p(m){return m===null||Jp(m)||un(m)||ia(m)||Gh(m)?n(m):e.attempt(VM,e.attempt(KM,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Gee(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 Vee(e,t,n){let r,s,a;return l;function l(p){return p===46||p===95?e.check(ZM,d,c)(p):p===null||un(p)||ia(p)||p!==45&&Gh(p)?d(p):(a=!0,e.consume(p),l)}function c(p){return p===95?r=!0:(s=r,r=void 0),e.consume(p),l}function d(p){return s||r||!a?n(p):t(p)}}function Kee(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(ZM,t,a)(l):l===null||un(l)||ia(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function Zee(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)||ia(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||un(c)||ia(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 Wee(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return mr(a)?n(a):t(a)}}function XM(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||un(e)}function QM(e){return!Sr(e)}function JM(e){return!(e===47||hv(e))}function hv(e){return e===43||e===45||e===46||e===95||mr(e)}function Wk(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 Yee={tokenize:ite,partial:!0};function Xee(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tte,continuation:{tokenize:nte},exit:rte}},text:{91:{name:"gfmFootnoteCall",tokenize:ete},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Qee,resolveTo:Jee}}}}function Qee(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const p=Ei(r.sliceSerialize({start:l.end,end:r.now()}));return p.codePointAt(0)!==94||!a.includes(p.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function Jee(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 ete(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"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(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(Ei(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:p}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,p):p(m)}}function tte(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(x)}function h(x){if(l>999||x===93&&!c||x===null||x===91||un(x))return n(x);if(x===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Ei(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return un(x)||(c=!0),l++,e.consume(x),x===92?m:h}function m(x){return x===91||x===92||x===93?(e.consume(x),l++,h):h(x)}function g(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),qt(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function nte(e,t,n){return e.check(nf,t,e.attempt(Yee,t,n))}function rte(e){e.exit("gfmFootnoteDefinition")}function ite(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 d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let p=d;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[d][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[d][1].start)},g=[["enter",h,c],["enter",l[p][1],c],["exit",l[p][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Xr(g,g.length,0,Vh(y,l.slice(p+1,d),c)),Xr(g,g.length,0,[["exit",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",h,c]]),Xr(l,p-1,d-p+3,g),d=p+g.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,c,d){const p=this.previous,h=this.events;let m=0;return g;function g(x){return p===126&&h[h.length-1][1].type!=="characterEscape"?d(x):(l.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const S=Tl(p);if(x===126)return m>1?d(x):(l.consume(x),m++,y);if(m<2&&!n)return d(x);const _=l.exit("strikethroughSequenceTemporary"),E=Tl(x);return _._open=!E||E===2&&!!S,_._close=!S||S===2&&!!E,c(x)}}}class ote{constructor(){this.map=[]}add(t,n,r){ate(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 ate(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 lte(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 ute(){return{flow:{null:{name:"table",tokenize:cte,resolveAll:fte}}}}function cte(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:d;return q===N&&r.parser.lazy[r.now().line]?n(L):q(L)}function d(L){return e.enter("tableHead"),e.enter("tableRow"),p(L)}function p(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,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):x(L))}function x(L){return L===45||L===58?_(L):L===124?(l=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),S):A(L)}function S(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?x(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 fte(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,p,h,m;const g=new ote;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(I_(g,t,d,p,h),h=void 0,d=0),p={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},g.add(n,0,[["enter",p,t]])):x.type==="tableRow"||x.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({},x.start),end:Object.assign({},x.end)},g.add(n,0,[["enter",h,t]])),s=x.type==="tableDelimiterRow"?2:h?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=cp(g,t,a,s,void 0,m),a=[0,0,0,0]),l[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],m=cp(g,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):x.type==="tableHead"?(c=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],m=cp(g,t,a,s,n,m)):l[1]!==0&&(m=cp(g,t,l,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&I_(g,t,d,p,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=lte(t.events,n))}return e}function cp(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},nl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=nl(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const p=nl(t.events,n[2]),h=nl(t.events,n[3]),m={type:c,start:Object.assign({},p),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 x=n[2]+1,S=n[3]-n[2]-1;e.add(x,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},nl(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function I_(e,t,n,r,s){const a=[],l=nl(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 nl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dte={name:"tasklistCheck",tokenize:hte};function pte(){return{text:{91:dte}}}function hte(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return un(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return dt(d)?t(d):jt(d)?e.check({tokenize:mte},t,n)(d):n(d)}}function mte(e,t,n){return qt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function gte(e){return qO([Fee(),Xee(),ste(e),ute(),pte()])}const bte={};function yte(e){const t=this,n=e||bte,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(gte(n)),a.push(jee()),l.push(Pee(n))}function vte(e){return v.jsx("div",{className:"md-table-wrap",children:v.jsx("table",{...e})})}function eI(e){return v.jsx("span",{className:"md-cell",children:e})}function kte({children:e,...t}){return v.jsx("th",{...t,children:eI(e)})}function xte({children:e,...t}){return v.jsx("td",{...t,children:eI(e)})}function mv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(mv).join(""):k.isValidElement(e)?mv(e.props.children):""}function Ste({children:e,...t}){const[n,r]=k.useState(!1),s=k.useRef(void 0),a=k.useCallback(()=>{navigator.clipboard.writeText(mv(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 wte={table:vte,th:kte,td:xte,pre:Ste},_l=k.memo(function({text:t,className:n}){return v.jsx("div",{className:n?`md ${n}`:"md",children:v.jsx(gX,{remarkPlugins:[yte],rehypePlugins:[[lJ,{detect:!1}]],components:wte,children:t??""})})});function Ete(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 zl(e){const[t,n]=k.useState(()=>Date.now()),r=e.status==="running"||e.status==="awaiting";k.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 ko({status:e}){const t=Ete(e);return v.jsx(vn,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function Ll({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:()=>{lt.submitApproval(e,"approve")},children:"Approve"}),v.jsx(zn,{variant:"secondary",color:"red",size:"sm",onClick:()=>{lt.submitApproval(e,"deny")},children:"Deny"})]})}function Yh(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Yo(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const Tte="run_reviewers";function _te(e){const t=Yh(e),n=Yo(t,"runId");return n===""?null:n}function Rte(e,t){const[n,r]=k.useState(null),s=e!=null&&(t==="running"||t==="awaiting");return k.useEffect(()=>{if(e==null){r(null);return}let a=!1,l;const c=async()=>{const d=await lt.api.asrReviewersProgress(e);a||(d.ok&&d.body&&Array.isArray(d.body.jobs)&&r(d.body),!a&&s&&(l=setTimeout(()=>{c()},500)))};return c(),()=>{a=!0,l!==void 0&&clearTimeout(l)}},[e,s]),k.useEffect(()=>{if(e==null||s)return;let a=!1;return lt.api.asrReviewersProgress(e).then(l=>{a||l.ok&&l.body&&Array.isArray(l.body.jobs)&&r(l.body)}),()=>{a=!0}},[e,s]),n}function D_(e){switch(e){case"done":return{name:"check-circle",color:"green"};case"failed":return{name:"x-circle",color:"red"};case"running":return{name:"spinner",color:"blue",modifier:"spin"};default:return{name:"clock",color:"tertiary"}}}function Cte({job:e}){const t=e.filesOrAreasReviewed??[],n=e.whyNoMoreCandidates?.trim()??"",r=e.candidateSummaries??[];return t.length===0&&n===""&&r.length===0&&!e.error?null:v.jsxs("div",{className:"asr-job-detail",children:[e.error?v.jsx("div",{className:"asr-job-error",children:e.error}):null,t.length>0?v.jsxs("div",{className:"asr-job-files",children:[v.jsx("span",{className:"asr-job-detail-label",children:"reviewed"}),v.jsx("pre",{children:t.join(`
|
|
74
|
+
`)})]}):null,n!==""?v.jsxs("div",{className:"asr-job-reasoning",children:[v.jsx("span",{className:"asr-job-detail-label",children:"reasoning"}),v.jsx("pre",{children:n})]}):null,r.length>0?v.jsx("ul",{className:"asr-job-candidates",children:r.map(s=>v.jsxs("li",{children:[v.jsx("span",{className:"asr-cand-sev",children:s.severity??"candidate"}),s.location?v.jsx("span",{className:"asr-cand-loc",children:s.location}):null,s.description?v.jsx("span",{className:"asr-cand-desc",children:s.description}):null]},s.candidateId))}):null]})}function Ate({job:e}){const t=e.reason?.trim()??"";return!e.error&&t===""&&!e.description&&!e.location&&!e.candidateMatch?null:v.jsxs("div",{className:"asr-job-detail",children:[e.error?v.jsx("div",{className:"asr-job-error",children:e.error}):null,e.location||e.description?v.jsxs("div",{className:"asr-job-files",children:[v.jsx("span",{className:"asr-job-detail-label",children:"candidate"}),v.jsx("pre",{children:[e.severity,e.location,e.description].filter(Boolean).join(`
|
|
75
|
+
`)})]}):null,e.candidateMatch?v.jsxs("div",{className:"asr-job-files",children:[v.jsx("span",{className:"asr-job-detail-label",children:"match"}),v.jsx("pre",{children:e.candidateMatch})]}):null,t!==""?v.jsxs("div",{className:"asr-job-reasoning",children:[v.jsx("span",{className:"asr-job-detail-label",children:"reasoning"}),v.jsx("pre",{children:t})]}):null]})}const Nte=k.memo(function({item:t}){const[n,r]=k.useState(()=>t.status==="running"||t.status==="awaiting"),s=zl(t),a=_te(t.args),l=Rte(a,t.status),c=l?.jobs??[],d=l?.triage?.jobs??[],p=c.filter(x=>x.status==="running").length,h=c.filter(x=>x.status==="done"||x.status==="failed").length,m=c.length>0&&c.every(x=>x.status==="done"||x.status==="failed"),g=c.reduce((x,S)=>x+(typeof S.candidates=="number"?S.candidates:0),0),y=[];return a&&y.push(ji(a,36)),c.length>0&&y.push(t.status==="running"?`${p} running · ${h}/${c.length}`:`${h}/${c.length} jobs`),d.length>0&&l?.triage&&y.push(`triage ${l.triage.completed}/${l.triage.enqueued||d.length}`),y.push(Qr(s)),k.useEffect(()=>{(t.status==="running"||t.status==="awaiting")&&r(!0)},[t.status]),v.jsxs("div",{className:`pg-tool pg-run-reviewers ${t.status}`,children:[v.jsxs(mi,{action:t.name,details:y.join(" · "),leadingIcon:v.jsx(ko,{status:t.status}),open:n,onOpenChange:x=>r(x),tabularNums:!0,children:[c.length>0?v.jsx("ul",{className:"asr-jobs",children:c.map(x=>{const S=D_(x.status),_=[];return typeof x.candidates=="number"&&_.push(`${x.candidates} candidate(s)`),v.jsxs("li",{className:`asr-job ${x.status}`,children:[v.jsxs("div",{className:"asr-job-row",children:[v.jsx(vn,{name:S.name,color:S.color,...S.modifier?{modifier:S.modifier}:{}}),v.jsx("span",{className:"asr-job-label",children:x.label}),_.length>0?v.jsx("span",{className:"asr-job-meta",children:_.join(" · ")}):null]}),v.jsx(Cte,{job:x})]},x.label)})}):v.jsx("div",{className:"out",children:t.status==="running"||t.status==="awaiting"?"starting reviewers…":t.output??"no reviewer jobs"}),d.length>0||l?.triage&&(l.triage.enqueued>0||l.triage.completed>0)?v.jsxs("div",{className:"asr-triage-section",children:[v.jsxs("div",{className:"asr-triage",children:["triage"," ",l?.triage?`${l.triage.completed}/${l.triage.enqueued||d.length}`:`${d.length}`,l?.triage&&(l.triage.confirmed>0||l.triage.rejected>0)?` · ${l.triage.confirmed} confirmed · ${l.triage.rejected} rejected`:""]}),d.length>0?v.jsx("ul",{className:"asr-jobs asr-triage-jobs",children:d.map(x=>{const S=D_(x.status),_=[];return x.triageStatus?_.push(x.triageStatus):x.status==="running"?_.push("running"):x.status==="failed"&&_.push("failed"),x.moduleId&&_.push(x.moduleId),v.jsxs("li",{className:`asr-job asr-triage-job ${x.status}${x.triageStatus?` triage-${x.triageStatus}`:""}`,children:[v.jsxs("div",{className:"asr-job-row",children:[v.jsx(vn,{name:S.name,color:S.color,...S.modifier?{modifier:S.modifier}:{}}),v.jsx("span",{className:"asr-job-label",children:x.candidateId}),_.length>0?v.jsx("span",{className:"asr-job-meta",children:_.join(" · ")}):null]}),v.jsx(Ate,{job:x})]},x.candidateId)})}):null]}):m&&g===0?v.jsx("div",{className:"asr-triage",children:"triage idle · no candidates"}):null]}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})}),Ote=Object.freeze(Object.defineProperty({__proto__:null,default:Nte,toolName:Tte},Symbol.toStringTag,{value:"Module"})),Mte=Object.assign({"../../../../examples/security-reviewer/agent/playground/tools/run_reviewers.tsx":Ote}),tI=new Map;for(const[e,t]of Object.entries(Mte)){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&&tI.set(s,t.default)}function Ite(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function z_(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 Dte(e){const t=z_(e.outputRaw);if(t)return t;if(e.output)try{return z_(JSON.parse(e.output))}catch{}return null}function L_(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const zte=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=zl(t),a=Ite(t.args),l=Dte(t),c=L_(l?.stdout??""),d=L_(l?.stderr??""),p=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&p?"error":t.status,m=[a?ji(a,80):"shell"];return p&&m.push(`exit ${l?.exitCode}`),m.push(Qr(s)),v.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[v.jsxs(mi,{action:"shell",details:m.join(" · "),leadingIcon:v.jsx(ko,{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,d?v.jsx("pre",{className:"shell-std shell-err",children:d}):null,!c&&!d?v.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})}),Lte=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=zl(t),a=Yo(Yh(t.args),"path"),l=jte(t),c=[a?fG(a,80):"read",Qr(s)];return v.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[v.jsxs(mi,{action:"read",details:c.join(" · "),leadingIcon:v.jsx(ko,{status:t.status}),open:n,onOpenChange:d=>r(d),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(Ll,{callId:t.callId}):null]})});function jte(e){const t=j_(e.outputRaw);if(t!=null)return t;if(e.output)try{return j_(JSON.parse(e.output))}catch{}return null}function j_(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 Pte=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=zl(t),a=Yh(t.args),l=Yo(a,"glob_pattern","globPattern"),c=Yo(a,"target_directory","targetDirectory"),d=$te(t),p=[l?ji(l,80):"glob",Qr(s)];return v.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[v.jsxs(mi,{action:"glob",details:p.join(" · "),leadingIcon:v.jsx(ko,{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,d!=null?d.length>0?v.jsx("pre",{className:"tool-body",children:d.join(`
|
|
76
|
+
`)}):v.jsx("div",{className:"tool-empty",children:"(no matches)"}):v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})});function $te(e){const t=P_(e.outputRaw);if(t!=null)return t;if(e.output)try{return P_(JSON.parse(e.output))}catch{}return null}function P_(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 Bte=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=zl(t),a=Yh(t.args),l=Yo(a,"pattern"),c=Yo(a,"path"),d=Yo(a,"glob"),p=[l?ji(l,80):"grep",Qr(s)],h=[c,d?`glob ${d}`:""].filter(Boolean).join(`
|
|
77
|
+
`);return v.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[v.jsxs(mi,{action:"grep",details:p.join(" · "),leadingIcon:v.jsx(ko,{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(Ll,{callId:t.callId}):null]})}),Fte=k.memo(function({text:t,open:n}){const[r,s]=k.useState(!1);return n?v.jsx("div",{className:"pg-subagent-reasoning",children:v.jsx(mi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:v.jsx(_l,{text:t,className:"body"})})}):v.jsx("div",{className:"pg-subagent-reasoning",children:v.jsx(mi,{action:"Thought",defaultOpen:!1,tone:"muted",children:v.jsx(_l,{text:t,className:"body"})})})}),Ute=k.memo(function({child:t}){if(t.kind==="assistant")return v.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:v.jsx(_l,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return v.jsx(Fte,{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(ko,{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 qte(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 Hte=k.memo(function({item:t}){const n=t.children??[],r=n.length>0,[s,a]=k.useState(t.status==="running"),l=t.name.replace(/^subagent:/,"")||"subagent",c=typeof t.args=="string"?t.args:t.args==null?"":sr(t.args,100),d=t.status==="running",p=c?ji(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(ko,{status:t.status})}),v.jsxs("span",{className:"pg-subagent-titles",children:[v.jsx("span",{className:d?"pg-subagent-title shimmer":"pg-subagent-title",children:p}),v.jsxs("span",{className:"pg-subagent-subtitle",children:[qte(t,n)," · ",l]})]}),v.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:v.jsx(vn,{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(Ute,{child:h},h.id)):v.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})}),Gte=k.memo(function({item:t}){const[n,r]=k.useState(!1),s=zl(t),a=t.args==null?"":sr(t.args,120),l=Qr(s);return v.jsxs("div",{className:`pg-tool ${t.status}`,children:[v.jsx(mi,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:v.jsx(ko,{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(Ll,{callId:t.callId}):null]})}),Vte={shell:e=>v.jsx(zte,{item:e}),read:e=>v.jsx(Lte,{item:e}),glob:e=>v.jsx(Pte,{item:e}),grep:e=>v.jsx(Bte,{item:e})};function Kte(e){return e.name.startsWith("subagent:")}const Zte=k.memo(function({item:t}){if(Kte(t))return v.jsx(Hte,{item:t});const n=tI.get(t.name);if(n)return v.jsx(n,{item:t});const r=Vte[t.name];return r?r(t):v.jsx(Gte,{item:t})}),Wte=k.memo(function({text:t}){return v.jsx("div",{className:"msg user",children:v.jsx("div",{className:"bubble",children:t})})}),Yte=k.memo(function({text:t,streaming:n}){return v.jsx("div",{className:"msg assistant",children:v.jsx(_l,{text:t,className:n?"bubble streaming":"bubble"})})}),Xte=k.memo(function({text:t,open:n}){const[r,s]=k.useState(!1);return n?v.jsx("div",{className:"pg-reasoning",children:v.jsx(mi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:v.jsx(_l,{text:t,className:"body"})})}):v.jsx("div",{className:"pg-reasoning",children:v.jsx(mi,{action:"Thought",defaultOpen:!1,tone:"muted",children:v.jsx(_l,{text:t,className:"body"})})})}),Qte=k.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 lc(e){switch(e.kind){case"user":return v.jsx(Wte,{text:e.text},e.id);case"assistant":return v.jsx(Yte,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return v.jsx(Xte,{text:e.text,open:e.open},e.id);case"tool":return v.jsx(Zte,{item:e},e.id);case"divider":return v.jsx(Qte,{text:e.text,fail:e.fail,url:e.url},e.id);case"turn-end":return null;default:return null}}function $_(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function Jte({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=k.useState(void 0),c=a??s,d=r.inTokens!==void 0||r.outTokens!==void 0?`${Xp(r.inTokens)} in · ${Xp(r.outTokens)} out tokens`:void 0;return v.jsxs(v.Fragment,{children:[e.length>0?v.jsx("div",{className:"pg-turn-group",title:d,children:v.jsx(mi,{action:"Worked",details:r.ms!==null?`for ${Ck(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:v.jsx("div",{className:"pg-turn-group-content",children:e.map(lc)})})}):null,t.map(lc),n?lc(n):null]})}function ene({startMs:e}){const[t,n]=k.useState(()=>Date.now());return k.useEffect(()=>{const r=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(r)},[]),v.jsx("div",{className:"pg-turn-group",children:v.jsx(mi,{action:"Working",details:`for ${Ck(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function tne(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(lc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(lc(l));break;case"turn-end":{const c=s[s.length-1],d=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,p=d===null?s:s.slice(0,-1),h=p.filter(g=>!$_(g)),m=p.filter($_);r.push(v.jsx(Jte,{steps:h,cards:m,final:d,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(v.jsx(ene,{startMs:t},"working")),a(),r}function nne(){const e=ft(h=>h.transcript),t=ft(h=>h.current),n=ft(h=>h.localTrace),r=ft(h=>h.running),s=ft(h=>h.turnStartedAt),a=e.length===0&&t===null&&!n,l=k.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??"",d=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:p}=wO({contentKey:l,latchKey:d});return v.jsx("div",{ref:p,className:a?"pg-transcript is-empty":"pg-transcript",children:a?v.jsx(vc,{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."}):tne(e,r?s:null)})}function rne(){const e=ft(l=>l.view),t=ft(l=>l.drawerOpen),n=ft(l=>l.aliasHosted),r=ft(l=>l.aliasToken),s=ft(l=>l.embedded),a=ft(l=>l.sidebarOpen);return k.useEffect(()=>{lt.boot()},[]),n&&r.trim()===""?s?v.jsx(sV,{}):v.jsx(iV,{}):v.jsxs("div",{className:"pg-app",children:[!s||a?v.jsx(VV,{}):null,v.jsxs("div",{className:"pg-main",children:[v.jsx(YV,{}),v.jsxs("div",{className:"pg-columns",children:[e==="chat"?v.jsxs("div",{className:"pg-transcript-wrap",children:[v.jsx(nne,{}),v.jsx(lV,{})]}):null,e==="trace"?v.jsx(sK,{}):null,e==="raw"?v.jsx(PV,{}):null,e==="logs"?v.jsx(zV,{}):null,e==="evals"?v.jsx(wV,{}):null,e==="abs"?v.jsx(rV,{}):null]})]}),t?v.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>lt.setDrawerOpen(!1)}):null,v.jsx(mV,{}),v.jsx(KV,{})]})}const ine={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"},sne={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"},one=Qv({name:cA(),appearance:fA(["light","dark"]),highContrast:T4()}),Yk=["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"],ane=Object.fromEntries(Yk.map(e=>[e,cA()]));one.extend(ane);function lne(e){const t={};for(const n of Yk){const r=e[n],s=Hc(n);t[s]=r}return t}function une(e,t){return Object.keys(e).sort((n,r)=>n.localeCompare(r)).map(n=>`${t}--cursor-${n}: ${e[n]};`)}function cne(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}new Set(Yk);const fne={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"}},B_={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}},dne={light:{shadowPrimary:{op:"mixBlack",blackPercent:6}},dark:{},lightHighContrast:{...B_},darkHighContrast:{...B_}};function ms(e){return`var(--cursor-${Hc(e)})`}function pne(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} ${ms(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${ms("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function hne(e){return e.map(pne).join(", ")}function mne(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${ms(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${ms(e.k1)} ${e.p1}%, ${ms(e.k2)})`;case"mixBlackChrome":return`color-mix(in srgb, #000000 ${e.blackPercent}%, ${ms("chrome")})`;case"mixBlack":return`color-mix(in srgb, #000000 ${e.blackPercent}%, transparent)`;case"ref":return e.fadePercent!==void 0?`color-mix(in srgb, ${ms(e.ref)} ${e.fadePercent}%, transparent)`:ms(e.ref);case"shadow":return hne(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${ms(e.key)} ${e.percent}%, transparent)`;default:return e}}function gne(e){const t=dne[e];return Object.entries(fne).map(([n,r])=>({name:Hc(n),expr:t[n]??r}))}function bne(e){const t=gne(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${mne(s)};`);return n}function yne(e){const t=lne(e),n=une(t," "),r=cne(e),s=bne(r).join(`
|
|
78
|
+
`);return`:root {
|
|
79
|
+
${n.join(`
|
|
80
|
+
`)}
|
|
81
|
+
}
|
|
82
|
+
:root {
|
|
83
|
+
${s}
|
|
84
|
+
}`}const gv={fontFamily:Lb.fontFamily,scrollbar:Lb.scrollbar,syntax:Lb.syntax},vne=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function kne(e,t){const n=Hc(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function ds(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${kne(e,s)}: ${l};`)}}function xne(e={}){const t=e.selector??":root",n=e.theme??gv,r=[`${t} {`];for(const{key:s,cssMid:a}of vne)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${Hc(l)}: ${c};`);return ds("duration",Ly,r,"ms"),ds("easing",bA,r),ds("spacing",pF,r,"px"),ds("radius",hF,r,"px"),ds("height",mF,r,"px"),ds("font-size",gF,r,"px"),ds("line-height",bF,r,"px"),ds("letter-spacing",yF,r,"px"),ds("elevation",dF,r),r.push("}"),r.join(`
|
|
85
|
+
`)}function Sne(e){const t=yne(e.core),n=xne(e.nonColor??{});return`${t}
|
|
86
|
+
${n}`}function wne(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 Ene(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 Tne(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function _ne(e){return Ene(e.platform,wne(e.locale))}function Rne(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 F_="agent-serve-cursor-theme";function Cne(e=window.location.search){return new URLSearchParams(e).get("theme")==="light"?"light":"dark"}function Ane(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=Tne(navigator.userAgent,navigator.platform),r=Sne({core:e==="light"?sne:ine,nonColor:{theme:{...gv,fontFamily:{...gv.fontFamily,sans:_ne({platform:n,locale:navigator.language}),mono:Rne(n)}}}});let s=document.getElementById(F_);s==null&&(s=document.createElement("style"),s.id=F_,document.head.appendChild(s)),s.textContent=r}Ane(Cne());const nI=document.getElementById("root");if(nI===null)throw new Error("Playground bootstrap failed: #root element is missing.");hz.createRoot(nI).render(v.jsx(k.StrictMode,{children:v.jsx(Ts,{menuSize:"md",children:v.jsx(rne,{})})}));
|