@polderlabs/bizar-dash 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/assets/index-B5X9g8B4.css +1 -0
  2. package/dist/assets/index-LqQuSp9d.js +388 -0
  3. package/dist/assets/index-LqQuSp9d.js.map +1 -0
  4. package/dist/index.html +18 -0
  5. package/package.json +67 -0
  6. package/src/cli.mjs +228 -0
  7. package/src/server/agents-store.mjs +190 -0
  8. package/src/server/api.mjs +913 -0
  9. package/src/server/browser.mjs +40 -0
  10. package/src/server/diagnostics-store.mjs +138 -0
  11. package/src/server/mods-loader.mjs +361 -0
  12. package/src/server/projects-store.mjs +198 -0
  13. package/src/server/providers-store.mjs +183 -0
  14. package/src/server/schedules-runner.mjs +150 -0
  15. package/src/server/schedules-store.mjs +233 -0
  16. package/src/server/search-store.mjs +120 -0
  17. package/src/server/server.mjs +388 -0
  18. package/src/server/state.mjs +357 -0
  19. package/src/server/tailscale-store.mjs +113 -0
  20. package/src/server/tasks-store.mjs +275 -0
  21. package/src/server/tui.mjs +844 -0
  22. package/src/server/watcher.mjs +81 -0
  23. package/src/web/App.tsx +316 -0
  24. package/src/web/components/Button.tsx +55 -0
  25. package/src/web/components/Card.tsx +40 -0
  26. package/src/web/components/EmptyState.tsx +30 -0
  27. package/src/web/components/Modal.tsx +137 -0
  28. package/src/web/components/SearchModal.tsx +185 -0
  29. package/src/web/components/Spinner.tsx +19 -0
  30. package/src/web/components/StatusBadge.tsx +25 -0
  31. package/src/web/components/Tag.tsx +28 -0
  32. package/src/web/components/Toast.tsx +142 -0
  33. package/src/web/components/Topbar.tsx +203 -0
  34. package/src/web/index.html +17 -0
  35. package/src/web/lib/api.ts +71 -0
  36. package/src/web/lib/markdown.tsx +59 -0
  37. package/src/web/lib/types.ts +388 -0
  38. package/src/web/lib/utils.ts +79 -0
  39. package/src/web/lib/ws.ts +132 -0
  40. package/src/web/main.tsx +12 -0
  41. package/src/web/styles/main.css +3148 -0
  42. package/src/web/views/Agents.tsx +406 -0
  43. package/src/web/views/Chat.tsx +527 -0
  44. package/src/web/views/Config.tsx +683 -0
  45. package/src/web/views/Mods.tsx +350 -0
  46. package/src/web/views/Overview.tsx +350 -0
  47. package/src/web/views/Plans.tsx +667 -0
  48. package/src/web/views/Schedules.tsx +299 -0
  49. package/src/web/views/Settings.tsx +571 -0
  50. package/src/web/views/Tasks.tsx +761 -0
  51. package/templates/mod/FORMAT.md +76 -0
  52. package/templates/mod/hello-mod/README.md +19 -0
  53. package/templates/mod/hello-mod/agents/greeter.md +8 -0
  54. package/templates/mod/hello-mod/commands/hello.md +6 -0
  55. package/templates/mod/hello-mod/mod.json +20 -0
  56. package/templates/mod/hello-mod/routes/ping.mjs +9 -0
  57. package/templates/mod/hello-mod/views/HelloView.tsx +10 -0
  58. package/tsconfig.json +23 -0
  59. package/vite.config.ts +24 -0
@@ -0,0 +1,388 @@
1
+ var qm=Object.defineProperty;var Qm=(e,t,n)=>t in e?qm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var nt=(e,t,n)=>Qm(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var ml=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kd={exports:{}},ql={},Xd={exports:{}},ee={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ci=Symbol.for("react.element"),Ym=Symbol.for("react.portal"),Km=Symbol.for("react.fragment"),Xm=Symbol.for("react.strict_mode"),Gm=Symbol.for("react.profiler"),Jm=Symbol.for("react.provider"),Zm=Symbol.for("react.context"),eg=Symbol.for("react.forward_ref"),tg=Symbol.for("react.suspense"),ng=Symbol.for("react.memo"),rg=Symbol.for("react.lazy"),_u=Symbol.iterator;function ig(e){return e===null||typeof e!="object"?null:(e=_u&&e[_u]||e["@@iterator"],typeof e=="function"?e:null)}var Gd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jd=Object.assign,Zd={};function Cr(e,t,n){this.props=e,this.context=t,this.refs=Zd,this.updater=n||Gd}Cr.prototype.isReactComponent={};Cr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Cr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ef(){}ef.prototype=Cr.prototype;function po(e,t,n){this.props=e,this.context=t,this.refs=Zd,this.updater=n||Gd}var mo=po.prototype=new ef;mo.constructor=po;Jd(mo,Cr.prototype);mo.isPureReactComponent=!0;var Du=Array.isArray,tf=Object.prototype.hasOwnProperty,go={current:null},nf={key:!0,ref:!0,__self:!0,__source:!0};function rf(e,t,n){var r,i={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)tf.call(t,r)&&!nf.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var u=Array(o),c=0;c<o;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:Ci,type:e,key:l,ref:s,props:i,_owner:go.current}}function lg(e,t){return{$$typeof:Ci,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function yo(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ci}function sg(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fu=/\/+/g;function ms(e,t){return typeof e=="object"&&e!==null&&e.key!=null?sg(""+e.key):t.toString(36)}function el(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ci:case Ym:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+ms(s,0):r,Du(i)?(n="",e!=null&&(n=e.replace(Fu,"$&/")+"/"),el(i,t,n,"",function(c){return c})):i!=null&&(yo(i)&&(i=lg(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Fu,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",Du(e))for(var o=0;o<e.length;o++){l=e[o];var u=r+ms(l,o);s+=el(l,t,n,u,i)}else if(u=ig(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=r+ms(l,o++),s+=el(l,t,n,u,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Mi(e,t,n){if(e==null)return e;var r=[],i=0;return el(e,r,"","",function(l){return t.call(n,l,i++)}),r}function ag(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var We={current:null},tl={transition:null},og={ReactCurrentDispatcher:We,ReactCurrentBatchConfig:tl,ReactCurrentOwner:go};function lf(){throw Error("act(...) is not supported in production builds of React.")}ee.Children={map:Mi,forEach:function(e,t,n){Mi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Mi(e,function(){t++}),t},toArray:function(e){return Mi(e,function(t){return t})||[]},only:function(e){if(!yo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ee.Component=Cr;ee.Fragment=Km;ee.Profiler=Gm;ee.PureComponent=po;ee.StrictMode=Xm;ee.Suspense=tg;ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=og;ee.act=lf;ee.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Jd({},e.props),i=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=go.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)tf.call(t,u)&&!nf.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var c=0;c<u;c++)o[c]=arguments[c+2];r.children=o}return{$$typeof:Ci,type:e.type,key:i,ref:l,props:r,_owner:s}};ee.createContext=function(e){return e={$$typeof:Zm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Jm,_context:e},e.Consumer=e};ee.createElement=rf;ee.createFactory=function(e){var t=rf.bind(null,e);return t.type=e,t};ee.createRef=function(){return{current:null}};ee.forwardRef=function(e){return{$$typeof:eg,render:e}};ee.isValidElement=yo;ee.lazy=function(e){return{$$typeof:rg,_payload:{_status:-1,_result:e},_init:ag}};ee.memo=function(e,t){return{$$typeof:ng,type:e,compare:t===void 0?null:t}};ee.startTransition=function(e){var t=tl.transition;tl.transition={};try{e()}finally{tl.transition=t}};ee.unstable_act=lf;ee.useCallback=function(e,t){return We.current.useCallback(e,t)};ee.useContext=function(e){return We.current.useContext(e)};ee.useDebugValue=function(){};ee.useDeferredValue=function(e){return We.current.useDeferredValue(e)};ee.useEffect=function(e,t){return We.current.useEffect(e,t)};ee.useId=function(){return We.current.useId()};ee.useImperativeHandle=function(e,t,n){return We.current.useImperativeHandle(e,t,n)};ee.useInsertionEffect=function(e,t){return We.current.useInsertionEffect(e,t)};ee.useLayoutEffect=function(e,t){return We.current.useLayoutEffect(e,t)};ee.useMemo=function(e,t){return We.current.useMemo(e,t)};ee.useReducer=function(e,t,n){return We.current.useReducer(e,t,n)};ee.useRef=function(e){return We.current.useRef(e)};ee.useState=function(e){return We.current.useState(e)};ee.useSyncExternalStore=function(e,t,n){return We.current.useSyncExternalStore(e,t,n)};ee.useTransition=function(){return We.current.useTransition()};ee.version="18.3.1";Xd.exports=ee;var z=Xd.exports;/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ug=z,cg=Symbol.for("react.element"),dg=Symbol.for("react.fragment"),fg=Object.prototype.hasOwnProperty,hg=ug.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pg={key:!0,ref:!0,__self:!0,__source:!0};function sf(e,t,n){var r,i={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)fg.call(t,r)&&!pg.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:cg,type:e,key:l,ref:s,props:i,_owner:hg.current}}ql.Fragment=dg;ql.jsx=sf;ql.jsxs=sf;Kd.exports=ql;var a=Kd.exports,af={exports:{}},ut={},of={exports:{}},uf={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(R,$){var j=R.length;R.push($);e:for(;0<j;){var te=j-1>>>1,se=R[te];if(0<i(se,$))R[te]=$,R[j]=se,j=te;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var $=R[0],j=R.pop();if(j!==$){R[0]=j;e:for(var te=0,se=R.length,C=se>>>1;te<C;){var Se=2*(te+1)-1,Qe=R[Se],de=Se+1,I=R[de];if(0>i(Qe,j))de<se&&0>i(I,Qe)?(R[te]=I,R[de]=j,te=de):(R[te]=Qe,R[Se]=j,te=Se);else if(de<se&&0>i(I,j))R[te]=I,R[de]=j,te=de;else break e}}return $}function i(R,$){var j=R.sortIndex-$.sortIndex;return j!==0?j:R.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var u=[],c=[],f=1,d=null,g=3,h=!1,m=!1,k=!1,E=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(R){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=R)r(c),$.sortIndex=$.expirationTime,t(u,$);else break;$=n(c)}}function S(R){if(k=!1,p(R),!m)if(n(u)!==null)m=!0,oe(w);else{var $=n(c);$!==null&&H(S,$.startTime-R)}}function w(R,$){m=!1,k&&(k=!1,x(P),P=-1),h=!0;var j=g;try{for(p($),d=n(u);d!==null&&(!(d.expirationTime>$)||R&&!L());){var te=d.callback;if(typeof te=="function"){d.callback=null,g=d.priorityLevel;var se=te(d.expirationTime<=$);$=e.unstable_now(),typeof se=="function"?d.callback=se:d===n(u)&&r(u),p($)}else r(u);d=n(u)}if(d!==null)var C=!0;else{var Se=n(c);Se!==null&&H(S,Se.startTime-$),C=!1}return C}finally{d=null,g=j,h=!1}}var v=!1,b=null,P=-1,_=5,N=-1;function L(){return!(e.unstable_now()-N<_)}function F(){if(b!==null){var R=e.unstable_now();N=R;var $=!0;try{$=b(!0,R)}finally{$?Q():(v=!1,b=null)}}else v=!1}var Q;if(typeof y=="function")Q=function(){y(F)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,q=G.port2;G.port1.onmessage=F,Q=function(){q.postMessage(null)}}else Q=function(){E(F,0)};function oe(R){b=R,v||(v=!0,Q())}function H(R,$){P=E(function(){R(e.unstable_now())},$)}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(R){R.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,oe(w))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(R){switch(g){case 1:case 2:case 3:var $=3;break;default:$=g}var j=g;g=$;try{return R()}finally{g=j}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,$){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var j=g;g=R;try{return $()}finally{g=j}},e.unstable_scheduleCallback=function(R,$,j){var te=e.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?te+j:te):j=te,R){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=j+se,R={id:f++,callback:$,priorityLevel:R,startTime:j,expirationTime:se,sortIndex:-1},j>te?(R.sortIndex=j,t(c,R),n(u)===null&&R===n(c)&&(k?(x(P),P=-1):k=!0,H(S,j-te))):(R.sortIndex=se,t(u,R),m||h||(m=!0,oe(w))),R},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(R){var $=g;return function(){var j=g;g=$;try{return R.apply(this,arguments)}finally{g=j}}}})(uf);of.exports=uf;var mg=of.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var gg=z,ot=mg;function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var cf=new Set,li={};function Bn(e,t){mr(e,t),mr(e+"Capture",t)}function mr(e,t){for(li[e]=t,e=0;e<t.length;e++)cf.add(t[e])}var qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ra=Object.prototype.hasOwnProperty,yg=/^[: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]*$/,Ou={},$u={};function xg(e){return ra.call($u,e)?!0:ra.call(Ou,e)?!1:yg.test(e)?$u[e]=!0:(Ou[e]=!0,!1)}function vg(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function kg(e,t,n,r){if(t===null||typeof t>"u"||vg(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function qe(e,t,n,r,i,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Re[e]=new qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Re[t]=new qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Re[e]=new qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Re[e]=new qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Re[e]=new qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Re[e]=new qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Re[e]=new qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Re[e]=new qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Re[e]=new qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var xo=/[\-:]([a-z])/g;function vo(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xo,vo);Re[t]=new qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xo,vo);Re[t]=new qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xo,vo);Re[t]=new qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Re[e]=new qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Re.xlinkHref=new qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Re[e]=new qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ko(e,t,n,r){var i=Re.hasOwnProperty(t)?Re[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(kg(t,n,i,r)&&(n=null),r||i===null?xg(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Xt=gg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ai=Symbol.for("react.element"),Xn=Symbol.for("react.portal"),Gn=Symbol.for("react.fragment"),wo=Symbol.for("react.strict_mode"),ia=Symbol.for("react.profiler"),df=Symbol.for("react.provider"),ff=Symbol.for("react.context"),jo=Symbol.for("react.forward_ref"),la=Symbol.for("react.suspense"),sa=Symbol.for("react.suspense_list"),So=Symbol.for("react.memo"),tn=Symbol.for("react.lazy"),hf=Symbol.for("react.offscreen"),Bu=Symbol.iterator;function Ir(e){return e===null||typeof e!="object"?null:(e=Bu&&e[Bu]||e["@@iterator"],typeof e=="function"?e:null)}var we=Object.assign,gs;function Br(e){if(gs===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);gs=t&&t[1]||""}return`
34
+ `+gs+e}var ys=!1;function xs(e,t){if(!e||ys)return"";ys=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
+ `),l=r.stack.split(`
36
+ `),s=i.length-1,o=l.length-1;1<=s&&0<=o&&i[s]!==l[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==l[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==l[o]){var u=`
37
+ `+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=o);break}}}finally{ys=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Br(e):""}function wg(e){switch(e.tag){case 5:return Br(e.type);case 16:return Br("Lazy");case 13:return Br("Suspense");case 19:return Br("SuspenseList");case 0:case 2:case 15:return e=xs(e.type,!1),e;case 11:return e=xs(e.type.render,!1),e;case 1:return e=xs(e.type,!0),e;default:return""}}function aa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gn:return"Fragment";case Xn:return"Portal";case ia:return"Profiler";case wo:return"StrictMode";case la:return"Suspense";case sa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ff:return(e.displayName||"Context")+".Consumer";case df:return(e._context.displayName||"Context")+".Provider";case jo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case So:return t=e.displayName||null,t!==null?t:aa(e.type)||"Memo";case tn:t=e._payload,e=e._init;try{return aa(e(t))}catch{}}return null}function jg(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return aa(t);case 8:return t===wo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sg(e){var t=pf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ri(e){e._valueTracker||(e._valueTracker=Sg(e))}function mf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function oa(e,t){var n=t.checked;return we({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Uu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gf(e,t){t=t.checked,t!=null&&ko(e,"checked",t,!1)}function ua(e,t){gf(e,t);var n=gn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ca(e,t.type,n):t.hasOwnProperty("defaultValue")&&ca(e,t.type,gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ca(e,t,n){(t!=="number"||gl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ur=Array.isArray;function or(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+gn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function da(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(M(91));return we({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Hu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(M(92));if(Ur(n)){if(1<n.length)throw Error(M(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:gn(n)}}function yf(e,t){var n=gn(t.value),r=gn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Wu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function xf(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?xf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _i,vf=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(_i=_i||document.createElement("div"),_i.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=_i.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function si(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Cg=["Webkit","ms","Moz","O"];Object.keys(Wr).forEach(function(e){Cg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wr[t]=Wr[e]})});function kf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wr.hasOwnProperty(e)&&Wr[e]?(""+t).trim():t+"px"}function wf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=kf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Ng=we({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ha(e,t){if(t){if(Ng[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function pa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ma=null;function Co(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ga=null,ur=null,cr=null;function qu(e){if(e=Ei(e)){if(typeof ga!="function")throw Error(M(280));var t=e.stateNode;t&&(t=Gl(t),ga(e.stateNode,e.type,t))}}function jf(e){ur?cr?cr.push(e):cr=[e]:ur=e}function Sf(){if(ur){var e=ur,t=cr;if(cr=ur=null,qu(e),t)for(e=0;e<t.length;e++)qu(t[e])}}function Cf(e,t){return e(t)}function Nf(){}var vs=!1;function bf(e,t,n){if(vs)return e(t,n);vs=!0;try{return Cf(e,t,n)}finally{vs=!1,(ur!==null||cr!==null)&&(Nf(),Sf())}}function ai(e,t){var n=e.stateNode;if(n===null)return null;var r=Gl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var ya=!1;if(qt)try{var Lr={};Object.defineProperty(Lr,"passive",{get:function(){ya=!0}}),window.addEventListener("test",Lr,Lr),window.removeEventListener("test",Lr,Lr)}catch{ya=!1}function bg(e,t,n,r,i,l,s,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var qr=!1,yl=null,xl=!1,xa=null,Eg={onError:function(e){qr=!0,yl=e}};function zg(e,t,n,r,i,l,s,o,u){qr=!1,yl=null,bg.apply(Eg,arguments)}function Pg(e,t,n,r,i,l,s,o,u){if(zg.apply(this,arguments),qr){if(qr){var c=yl;qr=!1,yl=null}else throw Error(M(198));xl||(xl=!0,xa=c)}}function Un(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Ef(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Qu(e){if(Un(e)!==e)throw Error(M(188))}function Tg(e){var t=e.alternate;if(!t){if(t=Un(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return Qu(i),e;if(l===r)return Qu(i),t;l=l.sibling}throw Error(M(188))}if(n.return!==r.return)n=i,r=l;else{for(var s=!1,o=i.child;o;){if(o===n){s=!0,n=i,r=l;break}if(o===r){s=!0,r=i,n=l;break}o=o.sibling}if(!s){for(o=l.child;o;){if(o===n){s=!0,n=l,r=i;break}if(o===r){s=!0,r=l,n=i;break}o=o.sibling}if(!s)throw Error(M(189))}}if(n.alternate!==r)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function zf(e){return e=Tg(e),e!==null?Pf(e):null}function Pf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Pf(e);if(t!==null)return t;e=e.sibling}return null}var Tf=ot.unstable_scheduleCallback,Yu=ot.unstable_cancelCallback,Ig=ot.unstable_shouldYield,Lg=ot.unstable_requestPaint,Ne=ot.unstable_now,Mg=ot.unstable_getCurrentPriorityLevel,No=ot.unstable_ImmediatePriority,If=ot.unstable_UserBlockingPriority,vl=ot.unstable_NormalPriority,Ag=ot.unstable_LowPriority,Lf=ot.unstable_IdlePriority,Ql=null,At=null;function Rg(e){if(At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(Ql,e,void 0,(e.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:Fg,_g=Math.log,Dg=Math.LN2;function Fg(e){return e>>>=0,e===0?32:31-(_g(e)/Dg|0)|0}var Di=64,Fi=4194304;function Vr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function kl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=Vr(o):(l&=s,l!==0&&(r=Vr(l)))}else s=n&~i,s!==0?r=Vr(s):l!==0&&(r=Vr(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Nt(t),i=1<<n,r|=e[n],t&=~i;return r}function Og(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $g(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Nt(l),o=1<<s,u=i[s];u===-1?(!(o&n)||o&r)&&(i[s]=Og(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function va(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Mf(){var e=Di;return Di<<=1,!(Di&4194240)&&(Di=64),e}function ks(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ni(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function Bg(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Nt(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function bo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ue=0;function Af(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Rf,Eo,_f,Df,Ff,ka=!1,Oi=[],on=null,un=null,cn=null,oi=new Map,ui=new Map,rn=[],Ug="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 submit".split(" ");function Ku(e,t){switch(e){case"focusin":case"focusout":on=null;break;case"dragenter":case"dragleave":un=null;break;case"mouseover":case"mouseout":cn=null;break;case"pointerover":case"pointerout":oi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ui.delete(t.pointerId)}}function Mr(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=Ei(t),t!==null&&Eo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Vg(e,t,n,r,i){switch(t){case"focusin":return on=Mr(on,e,t,n,r,i),!0;case"dragenter":return un=Mr(un,e,t,n,r,i),!0;case"mouseover":return cn=Mr(cn,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return oi.set(l,Mr(oi.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,ui.set(l,Mr(ui.get(l)||null,e,t,n,r,i)),!0}return!1}function Of(e){var t=Pn(e.target);if(t!==null){var n=Un(t);if(n!==null){if(t=n.tag,t===13){if(t=Ef(n),t!==null){e.blockedOn=t,Ff(e.priority,function(){_f(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ma=r,n.target.dispatchEvent(r),ma=null}else return t=Ei(n),t!==null&&Eo(t),e.blockedOn=n,!1;t.shift()}return!0}function Xu(e,t,n){nl(e)&&n.delete(t)}function Hg(){ka=!1,on!==null&&nl(on)&&(on=null),un!==null&&nl(un)&&(un=null),cn!==null&&nl(cn)&&(cn=null),oi.forEach(Xu),ui.forEach(Xu)}function Ar(e,t){e.blockedOn===t&&(e.blockedOn=null,ka||(ka=!0,ot.unstable_scheduleCallback(ot.unstable_NormalPriority,Hg)))}function ci(e){function t(i){return Ar(i,e)}if(0<Oi.length){Ar(Oi[0],e);for(var n=1;n<Oi.length;n++){var r=Oi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(on!==null&&Ar(on,e),un!==null&&Ar(un,e),cn!==null&&Ar(cn,e),oi.forEach(t),ui.forEach(t),n=0;n<rn.length;n++)r=rn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<rn.length&&(n=rn[0],n.blockedOn===null);)Of(n),n.blockedOn===null&&rn.shift()}var dr=Xt.ReactCurrentBatchConfig,wl=!0;function Wg(e,t,n,r){var i=ue,l=dr.transition;dr.transition=null;try{ue=1,zo(e,t,n,r)}finally{ue=i,dr.transition=l}}function qg(e,t,n,r){var i=ue,l=dr.transition;dr.transition=null;try{ue=4,zo(e,t,n,r)}finally{ue=i,dr.transition=l}}function zo(e,t,n,r){if(wl){var i=wa(e,t,n,r);if(i===null)Ts(e,t,r,jl,n),Ku(e,r);else if(Vg(i,e,t,n,r))r.stopPropagation();else if(Ku(e,r),t&4&&-1<Ug.indexOf(e)){for(;i!==null;){var l=Ei(i);if(l!==null&&Rf(l),l=wa(e,t,n,r),l===null&&Ts(e,t,r,jl,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else Ts(e,t,r,null,n)}}var jl=null;function wa(e,t,n,r){if(jl=null,e=Co(r),e=Pn(e),e!==null)if(t=Un(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ef(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return jl=e,null}function $f(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Mg()){case No:return 1;case If:return 4;case vl:case Ag:return 16;case Lf:return 536870912;default:return 16}default:return 16}}var sn=null,Po=null,rl=null;function Bf(){if(rl)return rl;var e,t=Po,n=t.length,r,i="value"in sn?sn.value:sn.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[l-r];r++);return rl=i.slice(e,1<r?1-r:void 0)}function il(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function $i(){return!0}function Gu(){return!1}function ct(e){function t(n,r,i,l,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?$i:Gu,this.isPropagationStopped=Gu,this}return we(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=$i)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=$i)},persist:function(){},isPersistent:$i}),t}var Nr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},To=ct(Nr),bi=we({},Nr,{view:0,detail:0}),Qg=ct(bi),ws,js,Rr,Yl=we({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Io,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Rr&&(Rr&&e.type==="mousemove"?(ws=e.screenX-Rr.screenX,js=e.screenY-Rr.screenY):js=ws=0,Rr=e),ws)},movementY:function(e){return"movementY"in e?e.movementY:js}}),Ju=ct(Yl),Yg=we({},Yl,{dataTransfer:0}),Kg=ct(Yg),Xg=we({},bi,{relatedTarget:0}),Ss=ct(Xg),Gg=we({},Nr,{animationName:0,elapsedTime:0,pseudoElement:0}),Jg=ct(Gg),Zg=we({},Nr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ey=ct(Zg),ty=we({},Nr,{data:0}),Zu=ct(ty),ny={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ry={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"},iy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ly(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=iy[e])?!!t[e]:!1}function Io(){return ly}var sy=we({},bi,{key:function(e){if(e.key){var t=ny[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=il(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ry[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Io,charCode:function(e){return e.type==="keypress"?il(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?il(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ay=ct(sy),oy=we({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ec=ct(oy),uy=we({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Io}),cy=ct(uy),dy=we({},Nr,{propertyName:0,elapsedTime:0,pseudoElement:0}),fy=ct(dy),hy=we({},Yl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),py=ct(hy),my=[9,13,27,32],Lo=qt&&"CompositionEvent"in window,Qr=null;qt&&"documentMode"in document&&(Qr=document.documentMode);var gy=qt&&"TextEvent"in window&&!Qr,Uf=qt&&(!Lo||Qr&&8<Qr&&11>=Qr),tc=" ",nc=!1;function Vf(e,t){switch(e){case"keyup":return my.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jn=!1;function yy(e,t){switch(e){case"compositionend":return Hf(t);case"keypress":return t.which!==32?null:(nc=!0,tc);case"textInput":return e=t.data,e===tc&&nc?null:e;default:return null}}function xy(e,t){if(Jn)return e==="compositionend"||!Lo&&Vf(e,t)?(e=Bf(),rl=Po=sn=null,Jn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Uf&&t.locale!=="ko"?null:t.data;default:return null}}var vy={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 rc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vy[e.type]:t==="textarea"}function Wf(e,t,n,r){jf(r),t=Sl(t,"onChange"),0<t.length&&(n=new To("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yr=null,di=null;function ky(e){nh(e,0)}function Kl(e){var t=tr(e);if(mf(t))return e}function wy(e,t){if(e==="change")return t}var qf=!1;if(qt){var Cs;if(qt){var Ns="oninput"in document;if(!Ns){var ic=document.createElement("div");ic.setAttribute("oninput","return;"),Ns=typeof ic.oninput=="function"}Cs=Ns}else Cs=!1;qf=Cs&&(!document.documentMode||9<document.documentMode)}function lc(){Yr&&(Yr.detachEvent("onpropertychange",Qf),di=Yr=null)}function Qf(e){if(e.propertyName==="value"&&Kl(di)){var t=[];Wf(t,di,e,Co(e)),bf(ky,t)}}function jy(e,t,n){e==="focusin"?(lc(),Yr=t,di=n,Yr.attachEvent("onpropertychange",Qf)):e==="focusout"&&lc()}function Sy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kl(di)}function Cy(e,t){if(e==="click")return Kl(t)}function Ny(e,t){if(e==="input"||e==="change")return Kl(t)}function by(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:by;function fi(e,t){if(Pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ra.call(t,i)||!Pt(e[i],t[i]))return!1}return!0}function sc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ac(e,t){var n=sc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sc(n)}}function Yf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kf(){for(var e=window,t=gl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=gl(e.document)}return t}function Mo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ey(e){var t=Kf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Yf(n.ownerDocument.documentElement,n)){if(r!==null&&Mo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=ac(n,l);var s=ac(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zy=qt&&"documentMode"in document&&11>=document.documentMode,Zn=null,ja=null,Kr=null,Sa=!1;function oc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Sa||Zn==null||Zn!==gl(r)||(r=Zn,"selectionStart"in r&&Mo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&fi(Kr,r)||(Kr=r,r=Sl(ja,"onSelect"),0<r.length&&(t=new To("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zn)))}function Bi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var er={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionend:Bi("Transition","TransitionEnd")},bs={},Xf={};qt&&(Xf=document.createElement("div").style,"AnimationEvent"in window||(delete er.animationend.animation,delete er.animationiteration.animation,delete er.animationstart.animation),"TransitionEvent"in window||delete er.transitionend.transition);function Xl(e){if(bs[e])return bs[e];if(!er[e])return e;var t=er[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Xf)return bs[e]=t[n];return e}var Gf=Xl("animationend"),Jf=Xl("animationiteration"),Zf=Xl("animationstart"),eh=Xl("transitionend"),th=new Map,uc="abort auxClick 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(" ");function vn(e,t){th.set(e,t),Bn(t,[e])}for(var Es=0;Es<uc.length;Es++){var zs=uc[Es],Py=zs.toLowerCase(),Ty=zs[0].toUpperCase()+zs.slice(1);vn(Py,"on"+Ty)}vn(Gf,"onAnimationEnd");vn(Jf,"onAnimationIteration");vn(Zf,"onAnimationStart");vn("dblclick","onDoubleClick");vn("focusin","onFocus");vn("focusout","onBlur");vn(eh,"onTransitionEnd");mr("onMouseEnter",["mouseout","mouseover"]);mr("onMouseLeave",["mouseout","mouseover"]);mr("onPointerEnter",["pointerout","pointerover"]);mr("onPointerLeave",["pointerout","pointerover"]);Bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Bn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hr="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(" "),Iy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hr));function cc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Pg(r,t,void 0,e),e.currentTarget=null}function nh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],u=o.instance,c=o.currentTarget;if(o=o.listener,u!==l&&i.isPropagationStopped())break e;cc(i,o,c),l=u}else for(s=0;s<r.length;s++){if(o=r[s],u=o.instance,c=o.currentTarget,o=o.listener,u!==l&&i.isPropagationStopped())break e;cc(i,o,c),l=u}}}if(xl)throw e=xa,xl=!1,xa=null,e}function ge(e,t){var n=t[za];n===void 0&&(n=t[za]=new Set);var r=e+"__bubble";n.has(r)||(rh(t,e,2,!1),n.add(r))}function Ps(e,t,n){var r=0;t&&(r|=4),rh(n,e,r,t)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function hi(e){if(!e[Ui]){e[Ui]=!0,cf.forEach(function(n){n!=="selectionchange"&&(Iy.has(n)||Ps(n,!1,e),Ps(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ui]||(t[Ui]=!0,Ps("selectionchange",!1,t))}}function rh(e,t,n,r){switch($f(t)){case 1:var i=Wg;break;case 4:i=qg;break;default:i=zo}n=i.bind(null,t,n,e),i=void 0,!ya||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ts(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;o!==null;){if(s=Pn(o),s===null)return;if(u=s.tag,u===5||u===6){r=l=s;continue e}o=o.parentNode}}r=r.return}bf(function(){var c=l,f=Co(n),d=[];e:{var g=th.get(e);if(g!==void 0){var h=To,m=e;switch(e){case"keypress":if(il(n)===0)break e;case"keydown":case"keyup":h=ay;break;case"focusin":m="focus",h=Ss;break;case"focusout":m="blur",h=Ss;break;case"beforeblur":case"afterblur":h=Ss;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Ju;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Kg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=cy;break;case Gf:case Jf:case Zf:h=Jg;break;case eh:h=fy;break;case"scroll":h=Qg;break;case"wheel":h=py;break;case"copy":case"cut":case"paste":h=ey;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ec}var k=(t&4)!==0,E=!k&&e==="scroll",x=k?g!==null?g+"Capture":null:g;k=[];for(var y=c,p;y!==null;){p=y;var S=p.stateNode;if(p.tag===5&&S!==null&&(p=S,x!==null&&(S=ai(y,x),S!=null&&k.push(pi(y,S,p)))),E)break;y=y.return}0<k.length&&(g=new h(g,m,null,n,f),d.push({event:g,listeners:k}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",g&&n!==ma&&(m=n.relatedTarget||n.fromElement)&&(Pn(m)||m[Qt]))break e;if((h||g)&&(g=f.window===f?f:(g=f.ownerDocument)?g.defaultView||g.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=c,m=m?Pn(m):null,m!==null&&(E=Un(m),m!==E||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(k=Ju,S="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(k=ec,S="onPointerLeave",x="onPointerEnter",y="pointer"),E=h==null?g:tr(h),p=m==null?g:tr(m),g=new k(S,y+"leave",h,n,f),g.target=E,g.relatedTarget=p,S=null,Pn(f)===c&&(k=new k(x,y+"enter",m,n,f),k.target=p,k.relatedTarget=E,S=k),E=S,h&&m)t:{for(k=h,x=m,y=0,p=k;p;p=qn(p))y++;for(p=0,S=x;S;S=qn(S))p++;for(;0<y-p;)k=qn(k),y--;for(;0<p-y;)x=qn(x),p--;for(;y--;){if(k===x||x!==null&&k===x.alternate)break t;k=qn(k),x=qn(x)}k=null}else k=null;h!==null&&dc(d,g,h,k,!1),m!==null&&E!==null&&dc(d,E,m,k,!0)}}e:{if(g=c?tr(c):window,h=g.nodeName&&g.nodeName.toLowerCase(),h==="select"||h==="input"&&g.type==="file")var w=wy;else if(rc(g))if(qf)w=Ny;else{w=Sy;var v=jy}else(h=g.nodeName)&&h.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(w=Cy);if(w&&(w=w(e,c))){Wf(d,w,n,f);break e}v&&v(e,g,c),e==="focusout"&&(v=g._wrapperState)&&v.controlled&&g.type==="number"&&ca(g,"number",g.value)}switch(v=c?tr(c):window,e){case"focusin":(rc(v)||v.contentEditable==="true")&&(Zn=v,ja=c,Kr=null);break;case"focusout":Kr=ja=Zn=null;break;case"mousedown":Sa=!0;break;case"contextmenu":case"mouseup":case"dragend":Sa=!1,oc(d,n,f);break;case"selectionchange":if(zy)break;case"keydown":case"keyup":oc(d,n,f)}var b;if(Lo)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Jn?Vf(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Uf&&n.locale!=="ko"&&(Jn||P!=="onCompositionStart"?P==="onCompositionEnd"&&Jn&&(b=Bf()):(sn=f,Po="value"in sn?sn.value:sn.textContent,Jn=!0)),v=Sl(c,P),0<v.length&&(P=new Zu(P,e,null,n,f),d.push({event:P,listeners:v}),b?P.data=b:(b=Hf(n),b!==null&&(P.data=b)))),(b=gy?yy(e,n):xy(e,n))&&(c=Sl(c,"onBeforeInput"),0<c.length&&(f=new Zu("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=b))}nh(d,t)})}function pi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Sl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=ai(e,n),l!=null&&r.unshift(pi(e,l,i)),l=ai(e,t),l!=null&&r.push(pi(e,l,i))),e=e.return}return r}function qn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function dc(e,t,n,r,i){for(var l=t._reactName,s=[];n!==null&&n!==r;){var o=n,u=o.alternate,c=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&c!==null&&(o=c,i?(u=ai(n,l),u!=null&&s.unshift(pi(n,u,o))):i||(u=ai(n,l),u!=null&&s.push(pi(n,u,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Ly=/\r\n?/g,My=/\u0000|\uFFFD/g;function fc(e){return(typeof e=="string"?e:""+e).replace(Ly,`
38
+ `).replace(My,"")}function Vi(e,t,n){if(t=fc(t),fc(e)!==t&&n)throw Error(M(425))}function Cl(){}var Ca=null,Na=null;function ba(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ea=typeof setTimeout=="function"?setTimeout:void 0,Ay=typeof clearTimeout=="function"?clearTimeout:void 0,hc=typeof Promise=="function"?Promise:void 0,Ry=typeof queueMicrotask=="function"?queueMicrotask:typeof hc<"u"?function(e){return hc.resolve(null).then(e).catch(_y)}:Ea;function _y(e){setTimeout(function(){throw e})}function Is(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ci(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ci(t)}function dn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function pc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var br=Math.random().toString(36).slice(2),Mt="__reactFiber$"+br,mi="__reactProps$"+br,Qt="__reactContainer$"+br,za="__reactEvents$"+br,Dy="__reactListeners$"+br,Fy="__reactHandles$"+br;function Pn(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qt]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pc(e);e!==null;){if(n=e[Mt])return n;e=pc(e)}return t}e=n,n=e.parentNode}return null}function Ei(e){return e=e[Mt]||e[Qt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function tr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(M(33))}function Gl(e){return e[mi]||null}var Pa=[],nr=-1;function kn(e){return{current:e}}function ye(e){0>nr||(e.current=Pa[nr],Pa[nr]=null,nr--)}function me(e,t){nr++,Pa[nr]=e.current,e.current=t}var yn={},$e=kn(yn),Ge=kn(!1),Rn=yn;function gr(e,t){var n=e.type.contextTypes;if(!n)return yn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Je(e){return e=e.childContextTypes,e!=null}function Nl(){ye(Ge),ye($e)}function mc(e,t,n){if($e.current!==yn)throw Error(M(168));me($e,t),me(Ge,n)}function ih(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(M(108,jg(e)||"Unknown",i));return we({},n,r)}function bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,Rn=$e.current,me($e,e),me(Ge,Ge.current),!0}function gc(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=ih(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,ye(Ge),ye($e),me($e,e)):ye(Ge),me(Ge,n)}var Ut=null,Jl=!1,Ls=!1;function lh(e){Ut===null?Ut=[e]:Ut.push(e)}function Oy(e){Jl=!0,lh(e)}function wn(){if(!Ls&&Ut!==null){Ls=!0;var e=0,t=ue;try{var n=Ut;for(ue=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ut=null,Jl=!1}catch(i){throw Ut!==null&&(Ut=Ut.slice(e+1)),Tf(No,wn),i}finally{ue=t,Ls=!1}}return null}var rr=[],ir=0,El=null,zl=0,ft=[],ht=0,_n=null,Vt=1,Ht="";function bn(e,t){rr[ir++]=zl,rr[ir++]=El,El=e,zl=t}function sh(e,t,n){ft[ht++]=Vt,ft[ht++]=Ht,ft[ht++]=_n,_n=e;var r=Vt;e=Ht;var i=32-Nt(r)-1;r&=~(1<<i),n+=1;var l=32-Nt(t)+i;if(30<l){var s=i-i%5;l=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Vt=1<<32-Nt(t)+i|n<<i|r,Ht=l+e}else Vt=1<<l|n<<i|r,Ht=e}function Ao(e){e.return!==null&&(bn(e,1),sh(e,1,0))}function Ro(e){for(;e===El;)El=rr[--ir],rr[ir]=null,zl=rr[--ir],rr[ir]=null;for(;e===_n;)_n=ft[--ht],ft[ht]=null,Ht=ft[--ht],ft[ht]=null,Vt=ft[--ht],ft[ht]=null}var st=null,lt=null,xe=!1,Ct=null;function ah(e,t){var n=mt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function yc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,st=e,lt=dn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,lt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=_n!==null?{id:Vt,overflow:Ht}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=mt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,st=e,lt=null,!0):!1;default:return!1}}function Ta(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ia(e){if(xe){var t=lt;if(t){var n=t;if(!yc(e,t)){if(Ta(e))throw Error(M(418));t=dn(n.nextSibling);var r=st;t&&yc(e,t)?ah(r,n):(e.flags=e.flags&-4097|2,xe=!1,st=e)}}else{if(Ta(e))throw Error(M(418));e.flags=e.flags&-4097|2,xe=!1,st=e}}}function xc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function Hi(e){if(e!==st)return!1;if(!xe)return xc(e),xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ba(e.type,e.memoizedProps)),t&&(t=lt)){if(Ta(e))throw oh(),Error(M(418));for(;t;)ah(e,t),t=dn(t.nextSibling)}if(xc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){lt=dn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}lt=null}}else lt=st?dn(e.stateNode.nextSibling):null;return!0}function oh(){for(var e=lt;e;)e=dn(e.nextSibling)}function yr(){lt=st=null,xe=!1}function _o(e){Ct===null?Ct=[e]:Ct.push(e)}var $y=Xt.ReactCurrentBatchConfig;function _r(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(M(309));var r=n.stateNode}if(!r)throw Error(M(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var o=i.refs;s===null?delete o[l]:o[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(M(284));if(!n._owner)throw Error(M(290,e))}return e}function Wi(e,t){throw e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vc(e){var t=e._init;return t(e._payload)}function uh(e){function t(x,y){if(e){var p=x.deletions;p===null?(x.deletions=[y],x.flags|=16):p.push(y)}}function n(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function r(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function i(x,y){return x=mn(x,y),x.index=0,x.sibling=null,x}function l(x,y,p){return x.index=p,e?(p=x.alternate,p!==null?(p=p.index,p<y?(x.flags|=2,y):p):(x.flags|=2,y)):(x.flags|=1048576,y)}function s(x){return e&&x.alternate===null&&(x.flags|=2),x}function o(x,y,p,S){return y===null||y.tag!==6?(y=Os(p,x.mode,S),y.return=x,y):(y=i(y,p),y.return=x,y)}function u(x,y,p,S){var w=p.type;return w===Gn?f(x,y,p.props.children,S,p.key):y!==null&&(y.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===tn&&vc(w)===y.type)?(S=i(y,p.props),S.ref=_r(x,y,p),S.return=x,S):(S=dl(p.type,p.key,p.props,null,x.mode,S),S.ref=_r(x,y,p),S.return=x,S)}function c(x,y,p,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==p.containerInfo||y.stateNode.implementation!==p.implementation?(y=$s(p,x.mode,S),y.return=x,y):(y=i(y,p.children||[]),y.return=x,y)}function f(x,y,p,S,w){return y===null||y.tag!==7?(y=Mn(p,x.mode,S,w),y.return=x,y):(y=i(y,p),y.return=x,y)}function d(x,y,p){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Os(""+y,x.mode,p),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ai:return p=dl(y.type,y.key,y.props,null,x.mode,p),p.ref=_r(x,null,y),p.return=x,p;case Xn:return y=$s(y,x.mode,p),y.return=x,y;case tn:var S=y._init;return d(x,S(y._payload),p)}if(Ur(y)||Ir(y))return y=Mn(y,x.mode,p,null),y.return=x,y;Wi(x,y)}return null}function g(x,y,p,S){var w=y!==null?y.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return w!==null?null:o(x,y,""+p,S);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ai:return p.key===w?u(x,y,p,S):null;case Xn:return p.key===w?c(x,y,p,S):null;case tn:return w=p._init,g(x,y,w(p._payload),S)}if(Ur(p)||Ir(p))return w!==null?null:f(x,y,p,S,null);Wi(x,p)}return null}function h(x,y,p,S,w){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(p)||null,o(y,x,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ai:return x=x.get(S.key===null?p:S.key)||null,u(y,x,S,w);case Xn:return x=x.get(S.key===null?p:S.key)||null,c(y,x,S,w);case tn:var v=S._init;return h(x,y,p,v(S._payload),w)}if(Ur(S)||Ir(S))return x=x.get(p)||null,f(y,x,S,w,null);Wi(y,S)}return null}function m(x,y,p,S){for(var w=null,v=null,b=y,P=y=0,_=null;b!==null&&P<p.length;P++){b.index>P?(_=b,b=null):_=b.sibling;var N=g(x,b,p[P],S);if(N===null){b===null&&(b=_);break}e&&b&&N.alternate===null&&t(x,b),y=l(N,y,P),v===null?w=N:v.sibling=N,v=N,b=_}if(P===p.length)return n(x,b),xe&&bn(x,P),w;if(b===null){for(;P<p.length;P++)b=d(x,p[P],S),b!==null&&(y=l(b,y,P),v===null?w=b:v.sibling=b,v=b);return xe&&bn(x,P),w}for(b=r(x,b);P<p.length;P++)_=h(b,x,P,p[P],S),_!==null&&(e&&_.alternate!==null&&b.delete(_.key===null?P:_.key),y=l(_,y,P),v===null?w=_:v.sibling=_,v=_);return e&&b.forEach(function(L){return t(x,L)}),xe&&bn(x,P),w}function k(x,y,p,S){var w=Ir(p);if(typeof w!="function")throw Error(M(150));if(p=w.call(p),p==null)throw Error(M(151));for(var v=w=null,b=y,P=y=0,_=null,N=p.next();b!==null&&!N.done;P++,N=p.next()){b.index>P?(_=b,b=null):_=b.sibling;var L=g(x,b,N.value,S);if(L===null){b===null&&(b=_);break}e&&b&&L.alternate===null&&t(x,b),y=l(L,y,P),v===null?w=L:v.sibling=L,v=L,b=_}if(N.done)return n(x,b),xe&&bn(x,P),w;if(b===null){for(;!N.done;P++,N=p.next())N=d(x,N.value,S),N!==null&&(y=l(N,y,P),v===null?w=N:v.sibling=N,v=N);return xe&&bn(x,P),w}for(b=r(x,b);!N.done;P++,N=p.next())N=h(b,x,P,N.value,S),N!==null&&(e&&N.alternate!==null&&b.delete(N.key===null?P:N.key),y=l(N,y,P),v===null?w=N:v.sibling=N,v=N);return e&&b.forEach(function(F){return t(x,F)}),xe&&bn(x,P),w}function E(x,y,p,S){if(typeof p=="object"&&p!==null&&p.type===Gn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ai:e:{for(var w=p.key,v=y;v!==null;){if(v.key===w){if(w=p.type,w===Gn){if(v.tag===7){n(x,v.sibling),y=i(v,p.props.children),y.return=x,x=y;break e}}else if(v.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===tn&&vc(w)===v.type){n(x,v.sibling),y=i(v,p.props),y.ref=_r(x,v,p),y.return=x,x=y;break e}n(x,v);break}else t(x,v);v=v.sibling}p.type===Gn?(y=Mn(p.props.children,x.mode,S,p.key),y.return=x,x=y):(S=dl(p.type,p.key,p.props,null,x.mode,S),S.ref=_r(x,y,p),S.return=x,x=S)}return s(x);case Xn:e:{for(v=p.key;y!==null;){if(y.key===v)if(y.tag===4&&y.stateNode.containerInfo===p.containerInfo&&y.stateNode.implementation===p.implementation){n(x,y.sibling),y=i(y,p.children||[]),y.return=x,x=y;break e}else{n(x,y);break}else t(x,y);y=y.sibling}y=$s(p,x.mode,S),y.return=x,x=y}return s(x);case tn:return v=p._init,E(x,y,v(p._payload),S)}if(Ur(p))return m(x,y,p,S);if(Ir(p))return k(x,y,p,S);Wi(x,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,y!==null&&y.tag===6?(n(x,y.sibling),y=i(y,p),y.return=x,x=y):(n(x,y),y=Os(p,x.mode,S),y.return=x,x=y),s(x)):n(x,y)}return E}var xr=uh(!0),ch=uh(!1),Pl=kn(null),Tl=null,lr=null,Do=null;function Fo(){Do=lr=Tl=null}function Oo(e){var t=Pl.current;ye(Pl),e._currentValue=t}function La(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function fr(e,t){Tl=e,Do=lr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xe=!0),e.firstContext=null)}function yt(e){var t=e._currentValue;if(Do!==e)if(e={context:e,memoizedValue:t,next:null},lr===null){if(Tl===null)throw Error(M(308));lr=e,Tl.dependencies={lanes:0,firstContext:e}}else lr=lr.next=e;return t}var Tn=null;function $o(e){Tn===null?Tn=[e]:Tn.push(e)}function dh(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,$o(t)):(n.next=i.next,i.next=n),t.interleaved=n,Yt(e,r)}function Yt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var nn=!1;function Bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Yt(e,n)}return i=r.interleaved,i===null?(t.next=t,$o(r)):(t.next=i.next,i.next=t),r.interleaved=t,Yt(e,n)}function ll(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bo(e,n)}}function kc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Il(e,t,n,r){var i=e.updateQueue;nn=!1;var l=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var u=o,c=u.next;u.next=null,s===null?l=c:s.next=c,s=u;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==s&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=u))}if(l!==null){var d=i.baseState;s=0,f=c=u=null,o=l;do{var g=o.lane,h=o.eventTime;if((r&g)===g){f!==null&&(f=f.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,k=o;switch(g=t,h=n,k.tag){case 1:if(m=k.payload,typeof m=="function"){d=m.call(h,d,g);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=k.payload,g=typeof m=="function"?m.call(h,d,g):m,g==null)break e;d=we({},d,g);break e;case 2:nn=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,g=i.effects,g===null?i.effects=[o]:g.push(o))}else h={eventTime:h,lane:g,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=h,u=d):f=f.next=h,s|=g;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;g=o,o=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(f===null&&(u=d),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Fn|=s,e.lanes=s,e.memoizedState=d}}function wc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(M(191,i));i.call(r)}}}var zi={},Rt=kn(zi),gi=kn(zi),yi=kn(zi);function In(e){if(e===zi)throw Error(M(174));return e}function Uo(e,t){switch(me(yi,t),me(gi,e),me(Rt,zi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fa(t,e)}ye(Rt),me(Rt,t)}function vr(){ye(Rt),ye(gi),ye(yi)}function hh(e){In(yi.current);var t=In(Rt.current),n=fa(t,e.type);t!==n&&(me(gi,e),me(Rt,n))}function Vo(e){gi.current===e&&(ye(Rt),ye(gi))}var ve=kn(0);function Ll(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ms=[];function Ho(){for(var e=0;e<Ms.length;e++)Ms[e]._workInProgressVersionPrimary=null;Ms.length=0}var sl=Xt.ReactCurrentDispatcher,As=Xt.ReactCurrentBatchConfig,Dn=0,ke=null,Pe=null,Ie=null,Ml=!1,Xr=!1,xi=0,By=0;function _e(){throw Error(M(321))}function Wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pt(e[n],t[n]))return!1;return!0}function qo(e,t,n,r,i,l){if(Dn=l,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,sl.current=e===null||e.memoizedState===null?Wy:qy,e=n(r,i),Xr){l=0;do{if(Xr=!1,xi=0,25<=l)throw Error(M(301));l+=1,Ie=Pe=null,t.updateQueue=null,sl.current=Qy,e=n(r,i)}while(Xr)}if(sl.current=Al,t=Pe!==null&&Pe.next!==null,Dn=0,Ie=Pe=ke=null,Ml=!1,t)throw Error(M(300));return e}function Qo(){var e=xi!==0;return xi=0,e}function It(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ke.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function xt(){if(Pe===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=Ie===null?ke.memoizedState:Ie.next;if(t!==null)Ie=t,Pe=e;else{if(e===null)throw Error(M(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Ie===null?ke.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function vi(e,t){return typeof t=="function"?t(e):t}function Rs(e){var t=xt(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=Pe,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var s=i.next;i.next=l.next,l.next=s}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var o=s=null,u=null,c=l;do{var f=c.lane;if((Dn&f)===f)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(o=u=d,s=r):u=u.next=d,ke.lanes|=f,Fn|=f}c=c.next}while(c!==null&&c!==l);u===null?s=r:u.next=o,Pt(r,t.memoizedState)||(Xe=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,ke.lanes|=l,Fn|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _s(e){var t=xt(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do l=e(l,s.action),s=s.next;while(s!==i);Pt(l,t.memoizedState)||(Xe=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function ph(){}function mh(e,t){var n=ke,r=xt(),i=t(),l=!Pt(r.memoizedState,i);if(l&&(r.memoizedState=i,Xe=!0),r=r.queue,Yo(xh.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,ki(9,yh.bind(null,n,r,i,t),void 0,null),Le===null)throw Error(M(349));Dn&30||gh(n,t,i)}return i}function gh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function yh(e,t,n,r){t.value=n,t.getSnapshot=r,vh(t)&&kh(e)}function xh(e,t,n){return n(function(){vh(t)&&kh(e)})}function vh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pt(e,n)}catch{return!0}}function kh(e){var t=Yt(e,1);t!==null&&bt(t,e,1,-1)}function jc(e){var t=It();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t.queue=e,e=e.dispatch=Hy.bind(null,ke,e),[t.memoizedState,e]}function ki(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function wh(){return xt().memoizedState}function al(e,t,n,r){var i=It();ke.flags|=e,i.memoizedState=ki(1|t,n,void 0,r===void 0?null:r)}function Zl(e,t,n,r){var i=xt();r=r===void 0?null:r;var l=void 0;if(Pe!==null){var s=Pe.memoizedState;if(l=s.destroy,r!==null&&Wo(r,s.deps)){i.memoizedState=ki(t,n,l,r);return}}ke.flags|=e,i.memoizedState=ki(1|t,n,l,r)}function Sc(e,t){return al(8390656,8,e,t)}function Yo(e,t){return Zl(2048,8,e,t)}function jh(e,t){return Zl(4,2,e,t)}function Sh(e,t){return Zl(4,4,e,t)}function Ch(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Nh(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4,4,Ch.bind(null,t,e),n)}function Ko(){}function bh(e,t){var n=xt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Eh(e,t){var n=xt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function zh(e,t,n){return Dn&21?(Pt(n,t)||(n=Mf(),ke.lanes|=n,Fn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xe=!0),e.memoizedState=n)}function Uy(e,t){var n=ue;ue=n!==0&&4>n?n:4,e(!0);var r=As.transition;As.transition={};try{e(!1),t()}finally{ue=n,As.transition=r}}function Ph(){return xt().memoizedState}function Vy(e,t,n){var r=pn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Th(e))Ih(t,n);else if(n=dh(e,t,n,r),n!==null){var i=He();bt(n,e,r,i),Lh(n,t,r)}}function Hy(e,t,n){var r=pn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Th(e))Ih(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,o=l(s,n);if(i.hasEagerState=!0,i.eagerState=o,Pt(o,s)){var u=t.interleaved;u===null?(i.next=i,$o(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=dh(e,t,i,r),n!==null&&(i=He(),bt(n,e,r,i),Lh(n,t,r))}}function Th(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Ih(e,t){Xr=Ml=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bo(e,n)}}var Al={readContext:yt,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},Wy={readContext:yt,useCallback:function(e,t){return It().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:Sc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,al(4194308,4,Ch.bind(null,t,e),n)},useLayoutEffect:function(e,t){return al(4194308,4,e,t)},useInsertionEffect:function(e,t){return al(4,2,e,t)},useMemo:function(e,t){var n=It();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=It();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Vy.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=It();return e={current:e},t.memoizedState=e},useState:jc,useDebugValue:Ko,useDeferredValue:function(e){return It().memoizedState=e},useTransition:function(){var e=jc(!1),t=e[0];return e=Uy.bind(null,e[1]),It().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ke,i=It();if(xe){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Le===null)throw Error(M(349));Dn&30||gh(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,Sc(xh.bind(null,r,l,e),[e]),r.flags|=2048,ki(9,yh.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=It(),t=Le.identifierPrefix;if(xe){var n=Ht,r=Vt;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=By++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},qy={readContext:yt,useCallback:bh,useContext:yt,useEffect:Yo,useImperativeHandle:Nh,useInsertionEffect:jh,useLayoutEffect:Sh,useMemo:Eh,useReducer:Rs,useRef:wh,useState:function(){return Rs(vi)},useDebugValue:Ko,useDeferredValue:function(e){var t=xt();return zh(t,Pe.memoizedState,e)},useTransition:function(){var e=Rs(vi)[0],t=xt().memoizedState;return[e,t]},useMutableSource:ph,useSyncExternalStore:mh,useId:Ph,unstable_isNewReconciler:!1},Qy={readContext:yt,useCallback:bh,useContext:yt,useEffect:Yo,useImperativeHandle:Nh,useInsertionEffect:jh,useLayoutEffect:Sh,useMemo:Eh,useReducer:_s,useRef:wh,useState:function(){return _s(vi)},useDebugValue:Ko,useDeferredValue:function(e){var t=xt();return Pe===null?t.memoizedState=e:zh(t,Pe.memoizedState,e)},useTransition:function(){var e=_s(vi)[0],t=xt().memoizedState;return[e,t]},useMutableSource:ph,useSyncExternalStore:mh,useId:Ph,unstable_isNewReconciler:!1};function jt(e,t){if(e&&e.defaultProps){t=we({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ma(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:we({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var es={isMounted:function(e){return(e=e._reactInternals)?Un(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=He(),i=pn(e),l=Wt(r,i);l.payload=t,n!=null&&(l.callback=n),t=fn(e,l,i),t!==null&&(bt(t,e,i,r),ll(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=He(),i=pn(e),l=Wt(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=fn(e,l,i),t!==null&&(bt(t,e,i,r),ll(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=He(),r=pn(e),i=Wt(n,r);i.tag=2,t!=null&&(i.callback=t),t=fn(e,i,r),t!==null&&(bt(t,e,r,n),ll(t,e,r))}};function Cc(e,t,n,r,i,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!fi(n,r)||!fi(i,l):!0}function Mh(e,t,n){var r=!1,i=yn,l=t.contextType;return typeof l=="object"&&l!==null?l=yt(l):(i=Je(t)?Rn:$e.current,r=t.contextTypes,l=(r=r!=null)?gr(e,i):yn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=es,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function Nc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&es.enqueueReplaceState(t,t.state,null)}function Aa(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Bo(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=yt(l):(l=Je(t)?Rn:$e.current,i.context=gr(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Ma(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&es.enqueueReplaceState(i,i.state,null),Il(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function kr(e,t){try{var n="",r=t;do n+=wg(r),r=r.return;while(r);var i=n}catch(l){i=`
39
+ Error generating stack: `+l.message+`
40
+ `+l.stack}return{value:e,source:t,stack:i,digest:null}}function Ds(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ra(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Yy=typeof WeakMap=="function"?WeakMap:Map;function Ah(e,t,n){n=Wt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_l||(_l=!0,Wa=r),Ra(e,t)},n}function Rh(e,t,n){n=Wt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ra(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Ra(e,t),typeof r!="function"&&(hn===null?hn=new Set([this]):hn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function bc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yy;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ox.bind(null,e,t,n),t.then(e,e))}function Ec(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function zc(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Wt(-1,1),t.tag=2,fn(n,t,1))),n.lanes|=1),e)}var Ky=Xt.ReactCurrentOwner,Xe=!1;function Ue(e,t,n,r){t.child=e===null?ch(t,null,n,r):xr(t,e.child,n,r)}function Pc(e,t,n,r,i){n=n.render;var l=t.ref;return fr(t,i),r=qo(e,t,n,r,l,i),n=Qo(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Kt(e,t,i)):(xe&&n&&Ao(t),t.flags|=1,Ue(e,t,r,i),t.child)}function Tc(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!ru(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,_h(e,t,l,r,i)):(e=dl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:fi,n(s,r)&&e.ref===t.ref)return Kt(e,t,i)}return t.flags|=1,e=mn(l,r),e.ref=t.ref,e.return=t,t.child=e}function _h(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(fi(l,r)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(Xe=!0);else return t.lanes=e.lanes,Kt(e,t,i)}return _a(e,t,n,r,i)}function Dh(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(ar,it),it|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,me(ar,it),it|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,me(ar,it),it|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,me(ar,it),it|=r;return Ue(e,t,i,n),t.child}function Fh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _a(e,t,n,r,i){var l=Je(n)?Rn:$e.current;return l=gr(t,l),fr(t,i),n=qo(e,t,n,r,l,i),r=Qo(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Kt(e,t,i)):(xe&&r&&Ao(t),t.flags|=1,Ue(e,t,n,i),t.child)}function Ic(e,t,n,r,i){if(Je(n)){var l=!0;bl(t)}else l=!1;if(fr(t,i),t.stateNode===null)ol(e,t),Mh(t,n,r),Aa(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=yt(c):(c=Je(n)?Rn:$e.current,c=gr(t,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==r||u!==c)&&Nc(t,s,r,c),nn=!1;var g=t.memoizedState;s.state=g,Il(t,r,s,i),u=t.memoizedState,o!==r||g!==u||Ge.current||nn?(typeof f=="function"&&(Ma(t,n,f,r),u=t.memoizedState),(o=nn||Cc(t,n,o,r,g,u,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,fh(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:jt(t.type,o),s.props=c,d=t.pendingProps,g=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=yt(u):(u=Je(n)?Rn:$e.current,u=gr(t,u));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==d||g!==u)&&Nc(t,s,r,u),nn=!1,g=t.memoizedState,s.state=g,Il(t,r,s,i);var m=t.memoizedState;o!==d||g!==m||Ge.current||nn?(typeof h=="function"&&(Ma(t,n,h,r),m=t.memoizedState),(c=nn||Cc(t,n,c,r,g,m,u)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=u,r=c):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Da(e,t,n,r,l,i)}function Da(e,t,n,r,i,l){Fh(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&gc(t,n,!1),Kt(e,t,l);r=t.stateNode,Ky.current=t;var o=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=xr(t,e.child,null,l),t.child=xr(t,null,o,l)):Ue(e,t,o,l),t.memoizedState=r.state,i&&gc(t,n,!0),t.child}function Oh(e){var t=e.stateNode;t.pendingContext?mc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&mc(e,t.context,!1),Uo(e,t.containerInfo)}function Lc(e,t,n,r,i){return yr(),_o(i),t.flags|=256,Ue(e,t,n,r),t.child}var Fa={dehydrated:null,treeContext:null,retryLane:0};function Oa(e){return{baseLanes:e,cachePool:null,transitions:null}}function $h(e,t,n){var r=t.pendingProps,i=ve.current,l=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),me(ve,i&1),e===null)return Ia(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=rs(s,r,0,null),e=Mn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Oa(n),t.memoizedState=Fa,e):Xo(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Xy(e,t,s,r,o,i,n);if(l){l=r.fallback,s=t.mode,i=e.child,o=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=mn(i,u),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?l=mn(o,l):(l=Mn(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?Oa(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=Fa,r}return l=e.child,e=l.sibling,r=mn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Xo(e,t){return t=rs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function qi(e,t,n,r){return r!==null&&_o(r),xr(t,e.child,null,n),e=Xo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xy(e,t,n,r,i,l,s){if(n)return t.flags&256?(t.flags&=-257,r=Ds(Error(M(422))),qi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=rs({mode:"visible",children:r.children},i,0,null),l=Mn(l,i,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&xr(t,e.child,null,s),t.child.memoizedState=Oa(s),t.memoizedState=Fa,l);if(!(t.mode&1))return qi(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(M(419)),r=Ds(l,r,void 0),qi(e,t,s,r)}if(o=(s&e.childLanes)!==0,Xe||o){if(r=Le,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,Yt(e,i),bt(r,e,i,-1))}return nu(),r=Ds(Error(M(421))),qi(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ux.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,lt=dn(i.nextSibling),st=t,xe=!0,Ct=null,e!==null&&(ft[ht++]=Vt,ft[ht++]=Ht,ft[ht++]=_n,Vt=e.id,Ht=e.overflow,_n=t),t=Xo(t,r.children),t.flags|=4096,t)}function Mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),La(e.return,t,n)}function Fs(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function Bh(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(Ue(e,t,r.children,n),r=ve.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mc(e,n,t);else if(e.tag===19)Mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(me(ve,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ll(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fs(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ll(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fs(t,!0,n,null,l);break;case"together":Fs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ol(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Kt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Fn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=mn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Gy(e,t,n){switch(t.tag){case 3:Oh(t),yr();break;case 5:hh(t);break;case 1:Je(t.type)&&bl(t);break;case 4:Uo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;me(Pl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(me(ve,ve.current&1),t.flags|=128,null):n&t.child.childLanes?$h(e,t,n):(me(ve,ve.current&1),e=Kt(e,t,n),e!==null?e.sibling:null);me(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Bh(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),me(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,Dh(e,t,n)}return Kt(e,t,n)}var Uh,$a,Vh,Hh;Uh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$a=function(){};Vh=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,In(Rt.current);var l=null;switch(n){case"input":i=oa(e,i),r=oa(e,r),l=[];break;case"select":i=we({},i,{value:void 0}),r=we({},r,{value:void 0}),l=[];break;case"textarea":i=da(e,i),r=da(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Cl)}ha(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(s in o)o.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(li.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var u=r[c];if(o=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&u!==o&&(u!=null||o!=null))if(c==="style")if(o){for(s in o)!o.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&o[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(l||(l=[]),l.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(li.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&ge("scroll",e),l||o===u||(l=[])):(l=l||[]).push(c,u))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};Hh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Dr(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function De(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Jy(e,t,n){var r=t.pendingProps;switch(Ro(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(t),null;case 1:return Je(t.type)&&Nl(),De(t),null;case 3:return r=t.stateNode,vr(),ye(Ge),ye($e),Ho(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ct!==null&&(Ya(Ct),Ct=null))),$a(e,t),De(t),null;case 5:Vo(t);var i=In(yi.current);if(n=t.type,e!==null&&t.stateNode!=null)Vh(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(M(166));return De(t),null}if(e=In(Rt.current),Hi(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Mt]=t,r[mi]=l,e=(t.mode&1)!==0,n){case"dialog":ge("cancel",r),ge("close",r);break;case"iframe":case"object":case"embed":ge("load",r);break;case"video":case"audio":for(i=0;i<Hr.length;i++)ge(Hr[i],r);break;case"source":ge("error",r);break;case"img":case"image":case"link":ge("error",r),ge("load",r);break;case"details":ge("toggle",r);break;case"input":Uu(r,l),ge("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},ge("invalid",r);break;case"textarea":Hu(r,l),ge("invalid",r)}ha(n,l),i=null;for(var s in l)if(l.hasOwnProperty(s)){var o=l[s];s==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&Vi(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&Vi(r.textContent,o,e),i=["children",""+o]):li.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ge("scroll",r)}switch(n){case"input":Ri(r),Vu(r,l,!0);break;case"textarea":Ri(r),Wu(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Cl)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=xf(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Mt]=t,e[mi]=r,Uh(e,t,!1,!1),t.stateNode=e;e:{switch(s=pa(n,r),n){case"dialog":ge("cancel",e),ge("close",e),i=r;break;case"iframe":case"object":case"embed":ge("load",e),i=r;break;case"video":case"audio":for(i=0;i<Hr.length;i++)ge(Hr[i],e);i=r;break;case"source":ge("error",e),i=r;break;case"img":case"image":case"link":ge("error",e),ge("load",e),i=r;break;case"details":ge("toggle",e),i=r;break;case"input":Uu(e,r),i=oa(e,r),ge("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=we({},r,{value:void 0}),ge("invalid",e);break;case"textarea":Hu(e,r),i=da(e,r),ge("invalid",e);break;default:i=r}ha(n,i),o=i;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?wf(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&vf(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&si(e,u):typeof u=="number"&&si(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(li.hasOwnProperty(l)?u!=null&&l==="onScroll"&&ge("scroll",e):u!=null&&ko(e,l,u,s))}switch(n){case"input":Ri(e),Vu(e,r,!1);break;case"textarea":Ri(e),Wu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+gn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?or(e,!!r.multiple,l,!1):r.defaultValue!=null&&or(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Cl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return De(t),null;case 6:if(e&&t.stateNode!=null)Hh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(M(166));if(n=In(yi.current),In(Rt.current),Hi(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mt]=t,(l=r.nodeValue!==n)&&(e=st,e!==null))switch(e.tag){case 3:Vi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Vi(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mt]=t,t.stateNode=r}return De(t),null;case 13:if(ye(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xe&&lt!==null&&t.mode&1&&!(t.flags&128))oh(),yr(),t.flags|=98560,l=!1;else if(l=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(M(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(M(317));l[Mt]=t}else yr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;De(t),l=!1}else Ct!==null&&(Ya(Ct),Ct=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ve.current&1?Te===0&&(Te=3):nu())),t.updateQueue!==null&&(t.flags|=4),De(t),null);case 4:return vr(),$a(e,t),e===null&&hi(t.stateNode.containerInfo),De(t),null;case 10:return Oo(t.type._context),De(t),null;case 17:return Je(t.type)&&Nl(),De(t),null;case 19:if(ye(ve),l=t.memoizedState,l===null)return De(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)Dr(l,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ll(e),s!==null){for(t.flags|=128,Dr(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return me(ve,ve.current&1|2),t.child}e=e.sibling}l.tail!==null&&Ne()>wr&&(t.flags|=128,r=!0,Dr(l,!1),t.lanes=4194304)}else{if(!r)if(e=Ll(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!xe)return De(t),null}else 2*Ne()-l.renderingStartTime>wr&&n!==1073741824&&(t.flags|=128,r=!0,Dr(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Ne(),t.sibling=null,n=ve.current,me(ve,r?n&1|2:n&1),t):(De(t),null);case 22:case 23:return tu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?it&1073741824&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function Zy(e,t){switch(Ro(t),t.tag){case 1:return Je(t.type)&&Nl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vr(),ye(Ge),ye($e),Ho(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Vo(t),null;case 13:if(ye(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(ve),null;case 4:return vr(),null;case 10:return Oo(t.type._context),null;case 22:case 23:return tu(),null;case 24:return null;default:return null}}var Qi=!1,Fe=!1,ex=typeof WeakSet=="function"?WeakSet:Set,O=null;function sr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Ba(e,t,n){try{n()}catch(r){je(e,t,r)}}var Ac=!1;function tx(e,t){if(Ca=wl,e=Kf(),Mo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,o=-1,u=-1,c=0,f=0,d=e,g=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(o=s+i),d!==l||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)g=d,d=h;for(;;){if(d===e)break t;if(g===n&&++c===i&&(o=s),g===l&&++f===r&&(u=s),(h=d.nextSibling)!==null)break;d=g,g=d.parentNode}d=h}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Na={focusedElem:e,selectionRange:n},wl=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var k=m.memoizedProps,E=m.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?k:jt(t.type,k),E);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(S){je(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return m=Ac,Ac=!1,m}function Gr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&Ba(t,n,l)}i=i.next}while(i!==r)}}function ts(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ua(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Wh(e){var t=e.alternate;t!==null&&(e.alternate=null,Wh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[mi],delete t[za],delete t[Dy],delete t[Fy])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function qh(e){return e.tag===5||e.tag===3||e.tag===4}function Rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Va(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cl));else if(r!==4&&(e=e.child,e!==null))for(Va(e,t,n),e=e.sibling;e!==null;)Va(e,t,n),e=e.sibling}function Ha(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ha(e,t,n),e=e.sibling;e!==null;)Ha(e,t,n),e=e.sibling}var Me=null,St=!1;function Zt(e,t,n){for(n=n.child;n!==null;)Qh(e,t,n),n=n.sibling}function Qh(e,t,n){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Ql,n)}catch{}switch(n.tag){case 5:Fe||sr(n,t);case 6:var r=Me,i=St;Me=null,Zt(e,t,n),Me=r,St=i,Me!==null&&(St?(e=Me,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Me.removeChild(n.stateNode));break;case 18:Me!==null&&(St?(e=Me,n=n.stateNode,e.nodeType===8?Is(e.parentNode,n):e.nodeType===1&&Is(e,n),ci(e)):Is(Me,n.stateNode));break;case 4:r=Me,i=St,Me=n.stateNode.containerInfo,St=!0,Zt(e,t,n),Me=r,St=i;break;case 0:case 11:case 14:case 15:if(!Fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&Ba(n,t,s),i=i.next}while(i!==r)}Zt(e,t,n);break;case 1:if(!Fe&&(sr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){je(n,t,o)}Zt(e,t,n);break;case 21:Zt(e,t,n);break;case 22:n.mode&1?(Fe=(r=Fe)||n.memoizedState!==null,Zt(e,t,n),Fe=r):Zt(e,t,n);break;default:Zt(e,t,n)}}function _c(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ex),t.forEach(function(r){var i=cx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:Me=o.stateNode,St=!1;break e;case 3:Me=o.stateNode.containerInfo,St=!0;break e;case 4:Me=o.stateNode.containerInfo,St=!0;break e}o=o.return}if(Me===null)throw Error(M(160));Qh(l,s,i),Me=null,St=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(c){je(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Yh(t,e),t=t.sibling}function Yh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wt(t,e),Tt(e),r&4){try{Gr(3,e,e.return),ts(3,e)}catch(k){je(e,e.return,k)}try{Gr(5,e,e.return)}catch(k){je(e,e.return,k)}}break;case 1:wt(t,e),Tt(e),r&512&&n!==null&&sr(n,n.return);break;case 5:if(wt(t,e),Tt(e),r&512&&n!==null&&sr(n,n.return),e.flags&32){var i=e.stateNode;try{si(i,"")}catch(k){je(e,e.return,k)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&gf(i,l),pa(o,s);var c=pa(o,l);for(s=0;s<u.length;s+=2){var f=u[s],d=u[s+1];f==="style"?wf(i,d):f==="dangerouslySetInnerHTML"?vf(i,d):f==="children"?si(i,d):ko(i,f,d,c)}switch(o){case"input":ua(i,l);break;case"textarea":yf(i,l);break;case"select":var g=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var h=l.value;h!=null?or(i,!!l.multiple,h,!1):g!==!!l.multiple&&(l.defaultValue!=null?or(i,!!l.multiple,l.defaultValue,!0):or(i,!!l.multiple,l.multiple?[]:"",!1))}i[mi]=l}catch(k){je(e,e.return,k)}}break;case 6:if(wt(t,e),Tt(e),r&4){if(e.stateNode===null)throw Error(M(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(k){je(e,e.return,k)}}break;case 3:if(wt(t,e),Tt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ci(t.containerInfo)}catch(k){je(e,e.return,k)}break;case 4:wt(t,e),Tt(e);break;case 13:wt(t,e),Tt(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(Zo=Ne())),r&4&&_c(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Fe=(c=Fe)||f,wt(t,e),Fe=c):wt(t,e),Tt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(O=e,f=e.child;f!==null;){for(d=O=f;O!==null;){switch(g=O,h=g.child,g.tag){case 0:case 11:case 14:case 15:Gr(4,g,g.return);break;case 1:sr(g,g.return);var m=g.stateNode;if(typeof m.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(k){je(r,n,k)}}break;case 5:sr(g,g.return);break;case 22:if(g.memoizedState!==null){Fc(d);continue}}h!==null?(h.return=g,O=h):Fc(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,c?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=d.stateNode,u=d.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=kf("display",s))}catch(k){je(e,e.return,k)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(k){je(e,e.return,k)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:wt(t,e),Tt(e),r&4&&_c(e);break;case 21:break;default:wt(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(qh(n)){var r=n;break e}n=n.return}throw Error(M(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(si(i,""),r.flags&=-33);var l=Rc(e);Ha(e,l,i);break;case 3:case 4:var s=r.stateNode.containerInfo,o=Rc(e);Va(e,o,s);break;default:throw Error(M(161))}}catch(u){je(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nx(e,t,n){O=e,Kh(e)}function Kh(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var i=O,l=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Qi;if(!s){var o=i.alternate,u=o!==null&&o.memoizedState!==null||Fe;o=Qi;var c=Fe;if(Qi=s,(Fe=u)&&!c)for(O=i;O!==null;)s=O,u=s.child,s.tag===22&&s.memoizedState!==null?Oc(i):u!==null?(u.return=s,O=u):Oc(i);for(;l!==null;)O=l,Kh(l),l=l.sibling;O=i,Qi=o,Fe=c}Dc(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,O=l):Dc(e)}}function Dc(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Fe||ts(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Fe)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:jt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&wc(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}wc(t,s,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&ci(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(M(163))}Fe||t.flags&512&&Ua(t)}catch(g){je(t,t.return,g)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function Fc(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function Oc(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ts(4,t)}catch(u){je(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){je(t,i,u)}}var l=t.return;try{Ua(t)}catch(u){je(t,l,u)}break;case 5:var s=t.return;try{Ua(t)}catch(u){je(t,s,u)}}}catch(u){je(t,t.return,u)}if(t===e){O=null;break}var o=t.sibling;if(o!==null){o.return=t.return,O=o;break}O=t.return}}var rx=Math.ceil,Rl=Xt.ReactCurrentDispatcher,Go=Xt.ReactCurrentOwner,gt=Xt.ReactCurrentBatchConfig,le=0,Le=null,Ee=null,Ae=0,it=0,ar=kn(0),Te=0,wi=null,Fn=0,ns=0,Jo=0,Jr=null,Ke=null,Zo=0,wr=1/0,Bt=null,_l=!1,Wa=null,hn=null,Yi=!1,an=null,Dl=0,Zr=0,qa=null,ul=-1,cl=0;function He(){return le&6?Ne():ul!==-1?ul:ul=Ne()}function pn(e){return e.mode&1?le&2&&Ae!==0?Ae&-Ae:$y.transition!==null?(cl===0&&(cl=Mf()),cl):(e=ue,e!==0||(e=window.event,e=e===void 0?16:$f(e.type)),e):1}function bt(e,t,n,r){if(50<Zr)throw Zr=0,qa=null,Error(M(185));Ni(e,n,r),(!(le&2)||e!==Le)&&(e===Le&&(!(le&2)&&(ns|=n),Te===4&&ln(e,Ae)),Ze(e,r),n===1&&le===0&&!(t.mode&1)&&(wr=Ne()+500,Jl&&wn()))}function Ze(e,t){var n=e.callbackNode;$g(e,t);var r=kl(e,e===Le?Ae:0);if(r===0)n!==null&&Yu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Yu(n),t===1)e.tag===0?Oy($c.bind(null,e)):lh($c.bind(null,e)),Ry(function(){!(le&6)&&wn()}),n=null;else{switch(Af(r)){case 1:n=No;break;case 4:n=If;break;case 16:n=vl;break;case 536870912:n=Lf;break;default:n=vl}n=rp(n,Xh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Xh(e,t){if(ul=-1,cl=0,le&6)throw Error(M(327));var n=e.callbackNode;if(hr()&&e.callbackNode!==n)return null;var r=kl(e,e===Le?Ae:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fl(e,r);else{t=r;var i=le;le|=2;var l=Jh();(Le!==e||Ae!==t)&&(Bt=null,wr=Ne()+500,Ln(e,t));do try{sx();break}catch(o){Gh(e,o)}while(!0);Fo(),Rl.current=l,le=i,Ee!==null?t=0:(Le=null,Ae=0,t=Te)}if(t!==0){if(t===2&&(i=va(e),i!==0&&(r=i,t=Qa(e,i))),t===1)throw n=wi,Ln(e,0),ln(e,r),Ze(e,Ne()),n;if(t===6)ln(e,r);else{if(i=e.current.alternate,!(r&30)&&!ix(i)&&(t=Fl(e,r),t===2&&(l=va(e),l!==0&&(r=l,t=Qa(e,l))),t===1))throw n=wi,Ln(e,0),ln(e,r),Ze(e,Ne()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(M(345));case 2:En(e,Ke,Bt);break;case 3:if(ln(e,r),(r&130023424)===r&&(t=Zo+500-Ne(),10<t)){if(kl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){He(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ea(En.bind(null,e,Ke,Bt),t);break}En(e,Ke,Bt);break;case 4:if(ln(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Nt(r);l=1<<s,s=t[s],s>i&&(i=s),r&=~l}if(r=i,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rx(r/1960))-r,10<r){e.timeoutHandle=Ea(En.bind(null,e,Ke,Bt),r);break}En(e,Ke,Bt);break;case 5:En(e,Ke,Bt);break;default:throw Error(M(329))}}}return Ze(e,Ne()),e.callbackNode===n?Xh.bind(null,e):null}function Qa(e,t){var n=Jr;return e.current.memoizedState.isDehydrated&&(Ln(e,t).flags|=256),e=Fl(e,t),e!==2&&(t=Ke,Ke=n,t!==null&&Ya(t)),e}function Ya(e){Ke===null?Ke=e:Ke.push.apply(Ke,e)}function ix(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!Pt(l(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ln(e,t){for(t&=~Jo,t&=~ns,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function $c(e){if(le&6)throw Error(M(327));hr();var t=kl(e,0);if(!(t&1))return Ze(e,Ne()),null;var n=Fl(e,t);if(e.tag!==0&&n===2){var r=va(e);r!==0&&(t=r,n=Qa(e,r))}if(n===1)throw n=wi,Ln(e,0),ln(e,t),Ze(e,Ne()),n;if(n===6)throw Error(M(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,En(e,Ke,Bt),Ze(e,Ne()),null}function eu(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(wr=Ne()+500,Jl&&wn())}}function On(e){an!==null&&an.tag===0&&!(le&6)&&hr();var t=le;le|=1;var n=gt.transition,r=ue;try{if(gt.transition=null,ue=1,e)return e()}finally{ue=r,gt.transition=n,le=t,!(le&6)&&wn()}}function tu(){it=ar.current,ye(ar)}function Ln(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ay(n)),Ee!==null)for(n=Ee.return;n!==null;){var r=n;switch(Ro(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Nl();break;case 3:vr(),ye(Ge),ye($e),Ho();break;case 5:Vo(r);break;case 4:vr();break;case 13:ye(ve);break;case 19:ye(ve);break;case 10:Oo(r.type._context);break;case 22:case 23:tu()}n=n.return}if(Le=e,Ee=e=mn(e.current,null),Ae=it=t,Te=0,wi=null,Jo=ns=Fn=0,Ke=Jr=null,Tn!==null){for(t=0;t<Tn.length;t++)if(n=Tn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=i,r.next=s}n.pending=r}Tn=null}return e}function Gh(e,t){do{var n=Ee;try{if(Fo(),sl.current=Al,Ml){for(var r=ke.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ml=!1}if(Dn=0,Ie=Pe=ke=null,Xr=!1,xi=0,Go.current=null,n===null||n.return===null){Te=1,wi=t,Ee=null;break}e:{var l=e,s=n.return,o=n,u=t;if(t=Ae,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,f=o,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var g=f.alternate;g?(f.updateQueue=g.updateQueue,f.memoizedState=g.memoizedState,f.lanes=g.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Ec(s);if(h!==null){h.flags&=-257,zc(h,s,o,l,t),h.mode&1&&bc(l,c,t),t=h,u=c;var m=t.updateQueue;if(m===null){var k=new Set;k.add(u),t.updateQueue=k}else m.add(u);break e}else{if(!(t&1)){bc(l,c,t),nu();break e}u=Error(M(426))}}else if(xe&&o.mode&1){var E=Ec(s);if(E!==null){!(E.flags&65536)&&(E.flags|=256),zc(E,s,o,l,t),_o(kr(u,o));break e}}l=u=kr(u,o),Te!==4&&(Te=2),Jr===null?Jr=[l]:Jr.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var x=Ah(l,u,t);kc(l,x);break e;case 1:o=u;var y=l.type,p=l.stateNode;if(!(l.flags&128)&&(typeof y.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(hn===null||!hn.has(p)))){l.flags|=65536,t&=-t,l.lanes|=t;var S=Rh(l,o,t);kc(l,S);break e}}l=l.return}while(l!==null)}ep(n)}catch(w){t=w,Ee===n&&n!==null&&(Ee=n=n.return);continue}break}while(!0)}function Jh(){var e=Rl.current;return Rl.current=Al,e===null?Al:e}function nu(){(Te===0||Te===3||Te===2)&&(Te=4),Le===null||!(Fn&268435455)&&!(ns&268435455)||ln(Le,Ae)}function Fl(e,t){var n=le;le|=2;var r=Jh();(Le!==e||Ae!==t)&&(Bt=null,Ln(e,t));do try{lx();break}catch(i){Gh(e,i)}while(!0);if(Fo(),le=n,Rl.current=r,Ee!==null)throw Error(M(261));return Le=null,Ae=0,Te}function lx(){for(;Ee!==null;)Zh(Ee)}function sx(){for(;Ee!==null&&!Ig();)Zh(Ee)}function Zh(e){var t=np(e.alternate,e,it);e.memoizedProps=e.pendingProps,t===null?ep(e):Ee=t,Go.current=null}function ep(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Zy(n,t),n!==null){n.flags&=32767,Ee=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,Ee=null;return}}else if(n=Jy(n,t,it),n!==null){Ee=n;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Te===0&&(Te=5)}function En(e,t,n){var r=ue,i=gt.transition;try{gt.transition=null,ue=1,ax(e,t,n,r)}finally{gt.transition=i,ue=r}return null}function ax(e,t,n,r){do hr();while(an!==null);if(le&6)throw Error(M(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(M(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Bg(e,l),e===Le&&(Ee=Le=null,Ae=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Yi||(Yi=!0,rp(vl,function(){return hr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=gt.transition,gt.transition=null;var s=ue;ue=1;var o=le;le|=4,Go.current=null,tx(e,n),Yh(n,e),Ey(Na),wl=!!Ca,Na=Ca=null,e.current=n,nx(n),Lg(),le=o,ue=s,gt.transition=l}else e.current=n;if(Yi&&(Yi=!1,an=e,Dl=i),l=e.pendingLanes,l===0&&(hn=null),Rg(n.stateNode),Ze(e,Ne()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(_l)throw _l=!1,e=Wa,Wa=null,e;return Dl&1&&e.tag!==0&&hr(),l=e.pendingLanes,l&1?e===qa?Zr++:(Zr=0,qa=e):Zr=0,wn(),null}function hr(){if(an!==null){var e=Af(Dl),t=gt.transition,n=ue;try{if(gt.transition=null,ue=16>e?16:e,an===null)var r=!1;else{if(e=an,an=null,Dl=0,le&6)throw Error(M(331));var i=le;for(le|=4,O=e.current;O!==null;){var l=O,s=l.child;if(O.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var c=o[u];for(O=c;O!==null;){var f=O;switch(f.tag){case 0:case 11:case 15:Gr(8,f,l)}var d=f.child;if(d!==null)d.return=f,O=d;else for(;O!==null;){f=O;var g=f.sibling,h=f.return;if(Wh(f),f===c){O=null;break}if(g!==null){g.return=h,O=g;break}O=h}}}var m=l.alternate;if(m!==null){var k=m.child;if(k!==null){m.child=null;do{var E=k.sibling;k.sibling=null,k=E}while(k!==null)}}O=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,O=s;else e:for(;O!==null;){if(l=O,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Gr(9,l,l.return)}var x=l.sibling;if(x!==null){x.return=l.return,O=x;break e}O=l.return}}var y=e.current;for(O=y;O!==null;){s=O;var p=s.child;if(s.subtreeFlags&2064&&p!==null)p.return=s,O=p;else e:for(s=y;O!==null;){if(o=O,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:ts(9,o)}}catch(w){je(o,o.return,w)}if(o===s){O=null;break e}var S=o.sibling;if(S!==null){S.return=o.return,O=S;break e}O=o.return}}if(le=i,wn(),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Ql,e)}catch{}r=!0}return r}finally{ue=n,gt.transition=t}}return!1}function Bc(e,t,n){t=kr(n,t),t=Ah(e,t,1),e=fn(e,t,1),t=He(),e!==null&&(Ni(e,1,t),Ze(e,t))}function je(e,t,n){if(e.tag===3)Bc(e,e,n);else for(;t!==null;){if(t.tag===3){Bc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hn===null||!hn.has(r))){e=kr(n,e),e=Rh(t,e,1),t=fn(t,e,1),e=He(),t!==null&&(Ni(t,1,e),Ze(t,e));break}}t=t.return}}function ox(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=He(),e.pingedLanes|=e.suspendedLanes&n,Le===e&&(Ae&n)===n&&(Te===4||Te===3&&(Ae&130023424)===Ae&&500>Ne()-Zo?Ln(e,0):Jo|=n),Ze(e,t)}function tp(e,t){t===0&&(e.mode&1?(t=Fi,Fi<<=1,!(Fi&130023424)&&(Fi=4194304)):t=1);var n=He();e=Yt(e,t),e!==null&&(Ni(e,t,n),Ze(e,n))}function ux(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tp(e,n)}function cx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(t),tp(e,n)}var np;np=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xe=!1,Gy(e,t,n);Xe=!!(e.flags&131072)}else Xe=!1,xe&&t.flags&1048576&&sh(t,zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ol(e,t),e=t.pendingProps;var i=gr(t,$e.current);fr(t,n),i=qo(null,t,r,e,i,n);var l=Qo();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Je(r)?(l=!0,bl(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Bo(t),i.updater=es,t.stateNode=i,i._reactInternals=t,Aa(t,r,e,n),t=Da(null,t,r,!0,l,n)):(t.tag=0,xe&&l&&Ao(t),Ue(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ol(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=fx(r),e=jt(r,e),i){case 0:t=_a(null,t,r,e,n);break e;case 1:t=Ic(null,t,r,e,n);break e;case 11:t=Pc(null,t,r,e,n);break e;case 14:t=Tc(null,t,r,jt(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jt(r,i),_a(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jt(r,i),Ic(e,t,r,i,n);case 3:e:{if(Oh(t),e===null)throw Error(M(387));r=t.pendingProps,l=t.memoizedState,i=l.element,fh(e,t),Il(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=kr(Error(M(423)),t),t=Lc(e,t,r,n,i);break e}else if(r!==i){i=kr(Error(M(424)),t),t=Lc(e,t,r,n,i);break e}else for(lt=dn(t.stateNode.containerInfo.firstChild),st=t,xe=!0,Ct=null,n=ch(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yr(),r===i){t=Kt(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return hh(t),e===null&&Ia(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,s=i.children,ba(r,i)?s=null:l!==null&&ba(r,l)&&(t.flags|=32),Fh(e,t),Ue(e,t,s,n),t.child;case 6:return e===null&&Ia(t),null;case 13:return $h(e,t,n);case 4:return Uo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xr(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jt(r,i),Pc(e,t,r,i,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,s=i.value,me(Pl,r._currentValue),r._currentValue=s,l!==null)if(Pt(l.value,s)){if(l.children===i.children&&!Ge.current){t=Kt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){s=l.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=Wt(-1,n&-n),u.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),La(l.return,n,t),o.lanes|=n;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(M(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),La(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Ue(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,fr(t,n),i=yt(i),r=r(i),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,i=jt(r,t.pendingProps),i=jt(r.type,i),Tc(e,t,r,i,n);case 15:return _h(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jt(r,i),ol(e,t),t.tag=1,Je(r)?(e=!0,bl(t)):e=!1,fr(t,n),Mh(t,r,i),Aa(t,r,i,n),Da(null,t,r,!0,e,n);case 19:return Bh(e,t,n);case 22:return Dh(e,t,n)}throw Error(M(156,t.tag))};function rp(e,t){return Tf(e,t)}function dx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mt(e,t,n,r){return new dx(e,t,n,r)}function ru(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fx(e){if(typeof e=="function")return ru(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jo)return 11;if(e===So)return 14}return 2}function mn(e,t){var n=e.alternate;return n===null?(n=mt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function dl(e,t,n,r,i,l){var s=2;if(r=e,typeof e=="function")ru(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Gn:return Mn(n.children,i,l,t);case wo:s=8,i|=8;break;case ia:return e=mt(12,n,t,i|2),e.elementType=ia,e.lanes=l,e;case la:return e=mt(13,n,t,i),e.elementType=la,e.lanes=l,e;case sa:return e=mt(19,n,t,i),e.elementType=sa,e.lanes=l,e;case hf:return rs(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case df:s=10;break e;case ff:s=9;break e;case jo:s=11;break e;case So:s=14;break e;case tn:s=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=mt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Mn(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function rs(e,t,n,r){return e=mt(22,e,r,t),e.elementType=hf,e.lanes=n,e.stateNode={isHidden:!1},e}function Os(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function $s(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ks(0),this.expirationTimes=ks(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ks(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function iu(e,t,n,r,i,l,s,o,u){return e=new hx(e,t,n,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=mt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bo(l),e}function px(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ip(e){if(!e)return yn;e=e._reactInternals;e:{if(Un(e)!==e||e.tag!==1)throw Error(M(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Je(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(M(171))}if(e.tag===1){var n=e.type;if(Je(n))return ih(e,n,t)}return t}function lp(e,t,n,r,i,l,s,o,u){return e=iu(n,r,!0,e,i,l,s,o,u),e.context=ip(null),n=e.current,r=He(),i=pn(n),l=Wt(r,i),l.callback=t??null,fn(n,l,i),e.current.lanes=i,Ni(e,i,r),Ze(e,r),e}function is(e,t,n,r){var i=t.current,l=He(),s=pn(i);return n=ip(n),t.context===null?t.context=n:t.pendingContext=n,t=Wt(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=fn(i,t,s),e!==null&&(bt(e,i,s,l),ll(e,i,s)),s}function Ol(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Uc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lu(e,t){Uc(e,t),(e=e.alternate)&&Uc(e,t)}function mx(){return null}var sp=typeof reportError=="function"?reportError:function(e){console.error(e)};function su(e){this._internalRoot=e}ls.prototype.render=su.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));is(e,t,null,null)};ls.prototype.unmount=su.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;On(function(){is(null,e,null,null)}),t[Qt]=null}};function ls(e){this._internalRoot=e}ls.prototype.unstable_scheduleHydration=function(e){if(e){var t=Df();e={blockedOn:null,target:e,priority:t};for(var n=0;n<rn.length&&t!==0&&t<rn[n].priority;n++);rn.splice(n,0,e),n===0&&Of(e)}};function au(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ss(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Vc(){}function gx(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var c=Ol(s);l.call(c)}}var s=lp(t,r,e,0,null,!1,!1,"",Vc);return e._reactRootContainer=s,e[Qt]=s.current,hi(e.nodeType===8?e.parentNode:e),On(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var c=Ol(u);o.call(c)}}var u=iu(e,0,!1,null,null,!1,!1,"",Vc);return e._reactRootContainer=u,e[Qt]=u.current,hi(e.nodeType===8?e.parentNode:e),On(function(){is(t,u,n,r)}),u}function as(e,t,n,r,i){var l=n._reactRootContainer;if(l){var s=l;if(typeof i=="function"){var o=i;i=function(){var u=Ol(s);o.call(u)}}is(t,s,e,i)}else s=gx(n,t,e,i,r);return Ol(s)}Rf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vr(t.pendingLanes);n!==0&&(bo(t,n|1),Ze(t,Ne()),!(le&6)&&(wr=Ne()+500,wn()))}break;case 13:On(function(){var r=Yt(e,1);if(r!==null){var i=He();bt(r,e,1,i)}}),lu(e,1)}};Eo=function(e){if(e.tag===13){var t=Yt(e,134217728);if(t!==null){var n=He();bt(t,e,134217728,n)}lu(e,134217728)}};_f=function(e){if(e.tag===13){var t=pn(e),n=Yt(e,t);if(n!==null){var r=He();bt(n,e,t,r)}lu(e,t)}};Df=function(){return ue};Ff=function(e,t){var n=ue;try{return ue=e,t()}finally{ue=n}};ga=function(e,t,n){switch(t){case"input":if(ua(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Gl(r);if(!i)throw Error(M(90));mf(r),ua(r,i)}}}break;case"textarea":yf(e,n);break;case"select":t=n.value,t!=null&&or(e,!!n.multiple,t,!1)}};Cf=eu;Nf=On;var yx={usingClientEntryPoint:!1,Events:[Ei,tr,Gl,jf,Sf,eu]},Fr={findFiberByHostInstance:Pn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xx={bundleType:Fr.bundleType,version:Fr.version,rendererPackageName:Fr.rendererPackageName,rendererConfig:Fr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=zf(e),e===null?null:e.stateNode},findFiberByHostInstance:Fr.findFiberByHostInstance||mx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ki=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ki.isDisabled&&Ki.supportsFiber)try{Ql=Ki.inject(xx),At=Ki}catch{}}ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yx;ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!au(t))throw Error(M(200));return px(e,t,null,n)};ut.createRoot=function(e,t){if(!au(e))throw Error(M(299));var n=!1,r="",i=sp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=iu(e,1,!1,null,null,n,!1,r,i),e[Qt]=t.current,hi(e.nodeType===8?e.parentNode:e),new su(t)};ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=zf(t),e=e===null?null:e.stateNode,e};ut.flushSync=function(e){return On(e)};ut.hydrate=function(e,t,n){if(!ss(t))throw Error(M(200));return as(null,e,t,!0,n)};ut.hydrateRoot=function(e,t,n){if(!au(e))throw Error(M(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",s=sp;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=lp(t,null,e,1,n??null,i,!1,l,s),e[Qt]=t.current,hi(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ls(t)};ut.render=function(e,t,n){if(!ss(t))throw Error(M(200));return as(null,e,t,!1,n)};ut.unmountComponentAtNode=function(e){if(!ss(e))throw Error(M(40));return e._reactRootContainer?(On(function(){as(null,null,e,!1,function(){e._reactRootContainer=null,e[Qt]=null})}),!0):!1};ut.unstable_batchedUpdates=eu;ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ss(n))throw Error(M(200));if(e==null||e._reactInternals===void 0)throw Error(M(38));return as(e,t,n,!1,r)};ut.version="18.3.1-next-f1338f8080-20240426";function ap(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ap)}catch(e){console.error(e)}}ap(),af.exports=ut;var op=af.exports,up,Hc=op;up=Hc.createRoot,Hc.hydrateRoot;/**
41
+ * @license lucide-react v0.460.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const vx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cp=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46
+ * @license lucide-react v0.460.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var kx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51
+ * @license lucide-react v0.460.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const wx=z.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:l,iconNode:s,...o},u)=>z.createElement("svg",{ref:u,...kx,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:cp("lucide",i),...o},[...s.map(([c,f])=>z.createElement(c,f)),...Array.isArray(l)?l:[l]]));/**
56
+ * @license lucide-react v0.460.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const U=(e,t)=>{const n=z.forwardRef(({className:r,...i},l)=>z.createElement(wx,{ref:l,iconNode:t,className:cp(`lucide-${vx(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61
+ * @license lucide-react v0.460.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const dp=U("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
66
+ * @license lucide-react v0.460.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const $l=U("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
71
+ * @license lucide-react v0.460.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const fp=U("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
76
+ * @license lucide-react v0.460.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const hp=U("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
81
+ * @license lucide-react v0.460.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const jx=U("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
86
+ * @license lucide-react v0.460.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const pp=U("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
91
+ * @license lucide-react v0.460.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Sx=U("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
96
+ * @license lucide-react v0.460.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const Cx=U("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
101
+ * @license lucide-react v0.460.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Nx=U("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/**
106
+ * @license lucide-react v0.460.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const mp=U("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
111
+ * @license lucide-react v0.460.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const jr=U("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
116
+ * @license lucide-react v0.460.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const bx=U("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
121
+ * @license lucide-react v0.460.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const Ex=U("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
126
+ * @license lucide-react v0.460.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const zx=U("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
131
+ * @license lucide-react v0.460.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const gp=U("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
136
+ * @license lucide-react v0.460.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const Px=U("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
141
+ * @license lucide-react v0.460.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const yp=U("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
146
+ * @license lucide-react v0.460.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const Ka=U("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
151
+ * @license lucide-react v0.460.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const Xa=U("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
156
+ * @license lucide-react v0.460.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Tx=U("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
161
+ * @license lucide-react v0.460.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const Ix=U("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
166
+ * @license lucide-react v0.460.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const xp=U("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
171
+ * @license lucide-react v0.460.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const vp=U("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
176
+ * @license lucide-react v0.460.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Lx=U("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/**
181
+ * @license lucide-react v0.460.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const kp=U("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
186
+ * @license lucide-react v0.460.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const fl=U("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
191
+ * @license lucide-react v0.460.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Mx=U("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
196
+ * @license lucide-react v0.460.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const Ax=U("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
201
+ * @license lucide-react v0.460.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const pr=U("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
206
+ * @license lucide-react v0.460.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const Rx=U("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
211
+ * @license lucide-react v0.460.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const _x=U("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
216
+ * @license lucide-react v0.460.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const Dx=U("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
221
+ * @license lucide-react v0.460.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const Fx=U("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
226
+ * @license lucide-react v0.460.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const Ga=U("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
231
+ * @license lucide-react v0.460.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const ou=U("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
236
+ * @license lucide-react v0.460.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const Wc=U("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
241
+ * @license lucide-react v0.460.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const qc=U("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
246
+ * @license lucide-react v0.460.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const wp=U("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
251
+ * @license lucide-react v0.460.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const Dt=U("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
256
+ * @license lucide-react v0.460.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const jp=U("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
261
+ * @license lucide-react v0.460.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const Ja=U("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/**
266
+ * @license lucide-react v0.460.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const vt=U("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
271
+ * @license lucide-react v0.460.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const Ox=U("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
276
+ * @license lucide-react v0.460.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const Bl=U("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
281
+ * @license lucide-react v0.460.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const uu=U("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
286
+ * @license lucide-react v0.460.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const $x=U("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
291
+ * @license lucide-react v0.460.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const cu=U("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
296
+ * @license lucide-react v0.460.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const Sp=U("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
301
+ * @license lucide-react v0.460.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const Cp=U("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
306
+ * @license lucide-react v0.460.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const Bx=U("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
311
+ * @license lucide-react v0.460.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const Np=U("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
316
+ * @license lucide-react v0.460.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const bp=U("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/**
321
+ * @license lucide-react v0.460.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const Ux=U("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
326
+ * @license lucide-react v0.460.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const Qc=U("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
331
+ * @license lucide-react v0.460.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const Vx=U("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
336
+ * @license lucide-react v0.460.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const jn=U("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
341
+ * @license lucide-react v0.460.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const Hx=U("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
346
+ * @license lucide-react v0.460.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const Pi=U("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
351
+ * @license lucide-react v0.460.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const Wx=U("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function ae(...e){return e.filter(Boolean).join(" ")}function Et(e){if(!e&&e!==0)return"";const t=typeof e=="number"?e:new Date(e).getTime();if(Number.isNaN(t))return"";const n=Date.now()-t;return n<0||n<6e4?"just now":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:n<7*864e5?`${Math.floor(n/864e5)}d ago`:new Date(t).toLocaleDateString()}function Ep(e){if(!e)return"";const t=typeof e=="number"?new Date(e):new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString()}function zp(e,t=160){return e?e.length>t?e.slice(0,t)+"…":e:""}function qx(e,t=200){let n=null;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const Qx={low:"var(--text-dim)",normal:"var(--info)",high:"var(--error)"};function Yc(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n);return(t>>>0).toString(36)}class Kc extends Error{constructor(n,r,i){super(n);nt(this,"status");nt(this,"data");this.name="ApiError",this.status=r,this.data=i}}class Yx{constructor(){nt(this,"base","/api")}async get(t){return this.req("GET",t)}async post(t,n){return this.req("POST",t,n)}async put(t,n){return this.req("PUT",t,n)}async patch(t,n){return this.req("PATCH",t,n)}async del(t){return this.req("DELETE",t)}async req(t,n,r){const i={method:t,headers:{"Content-Type":"application/json"}};r!=null&&(i.body=typeof r=="string"?r:JSON.stringify(r));const l=await fetch(this.base+n,i);if((l.headers.get("content-type")||"").includes("application/json")){const u=await l.json();if(!l.ok){const c=(u&&typeof u=="object"&&"message"in u?u.message:void 0)||`${t} ${n}: ${l.status}`;throw new Kc(c,l.status,u)}return u}const o=await l.text();if(!l.ok)throw new Kc(`${t} ${n}: ${l.status} — ${o.slice(0,200)}`,l.status,o);try{return JSON.parse(o)}catch{return o}}}const B=new Yx,Pp=[{id:"overview",label:"Overview",icon:vp},{id:"chat",label:"Chat",icon:pr},{id:"agents",label:"Agents",icon:$l},{id:"plans",label:"Plans",icon:fl},{id:"tasks",label:"Tasks",icon:Np},{id:"mods",label:"Mods",icon:Ja},{id:"schedules",label:"Schedules",icon:jr},{id:"config",label:"Config",icon:Sp},{id:"settings",label:"Settings",icon:Cp}];function Kx({activeTab:e,onTabChange:t,wsStatus:n,version:r,activeProject:i,projects:l,onProjectChange:s,onProjectsRefresh:o,onOpenSearch:u,rightSlot:c}){return a.jsxs("header",{className:"topbar",children:[a.jsxs("div",{className:"brand",children:[a.jsx("span",{className:"brand-logo","aria-hidden":!0,children:"🪩"}),a.jsx("span",{className:"brand-title",children:"Bizar"}),a.jsx("span",{className:"brand-version",children:r})]}),a.jsx(Xx,{activeProject:i,projects:l,onChange:s,onRefresh:o}),a.jsxs("button",{type:"button",className:"topbar-search",onClick:u,title:"Search (Ctrl/Cmd+K)",children:[a.jsx(uu,{size:14}),a.jsx("span",{className:"muted",children:"Search…"}),a.jsx("kbd",{children:"⌘K"})]}),a.jsx("nav",{className:"tabs",role:"tablist",children:Pp.map(f=>{const d=f.icon,g=f.id===e;return a.jsxs("button",{type:"button",role:"tab","aria-selected":g,className:ae("tab",g&&"tab-active"),onClick:()=>t(f.id),title:f.label,children:[a.jsx(d,{size:14,className:"tab-icon"}),a.jsx("span",{className:"tab-label",children:f.label})]},f.id)})}),a.jsxs("div",{className:"topbar-right",children:[c,a.jsxs("div",{className:ae("ws-status",`ws-${n}`),title:`WebSocket: ${n}`,children:[a.jsx("span",{className:"ws-dot"}),a.jsx("span",{className:"ws-label",children:n})]})]})]})}function Xx({activeProject:e,projects:t,onChange:n,onRefresh:r}){const[i,l]=z.useState(!1);z.useEffect(()=>{if(!i)return;const o=()=>l(!1);return document.addEventListener("click",o),()=>document.removeEventListener("click",o)},[i]);const s=async()=>{const o=(prompt("Project path:")||"").trim();if(o)try{await B.post("/projects",{path:o}),r()}catch(u){alert(`Add failed: ${u.message}`)}};return a.jsxs("div",{className:"project-selector",onClick:o=>o.stopPropagation(),children:[a.jsxs("button",{type:"button",className:"project-selector-btn",onClick:()=>l(o=>!o),title:"Switch active project",children:[a.jsx(Ka,{size:14}),a.jsx("span",{className:"project-selector-name",children:(e==null?void 0:e.name)||"(no project)"}),a.jsx(hp,{size:12})]}),i&&a.jsxs("div",{className:"project-selector-menu",children:[a.jsxs("div",{className:"project-selector-menu-head",children:[a.jsxs("span",{className:"muted",children:[t.length," project",t.length===1?"":"s"]}),a.jsxs("div",{className:"project-selector-menu-actions",children:[a.jsx("button",{type:"button",className:"icon-btn",onClick:r,title:"Refresh",children:a.jsx(vt,{size:12})}),a.jsx("button",{type:"button",className:"icon-btn",onClick:s,title:"Add project",children:a.jsx(Dt,{size:12})})]})]}),a.jsxs("ul",{className:"project-selector-list",children:[t.length===0&&a.jsx("li",{className:"muted project-selector-empty",children:"No projects. Add one to start."}),t.map(o=>a.jsxs("li",{className:ae("project-selector-item",(e==null?void 0:e.id)===o.id&&"active"),onClick:()=>{n(o.id),l(!1)},children:[a.jsx("span",{className:"project-selector-item-name",children:o.name}),a.jsx("span",{className:"project-selector-item-status",children:o.status})]},o.id))]})]})]})}const Tp=z.createContext(null);function Vn(){const e=z.useContext(Tp);return e||{open:()=>"",close:()=>{}}}function Gx({children:e}){const[t,n]=z.useState([]),r=z.useCallback(l=>{n(s=>{if(!l)return[];const o=s.findIndex(u=>u.id===l);return o===-1||o!==s.length-1?s:s.slice(0,-1)})},[]),i=z.useCallback(l=>{const s=`m${Math.random().toString(36).slice(2,9)}`;return n(o=>[...o,{...l,id:s}]),s},[]);return z.useEffect(()=>{if(t.length===0)return;const l=s=>{s.key==="Escape"&&(s.stopPropagation(),r())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[t.length,r]),a.jsxs(Tp.Provider,{value:{open:i,close:r},children:[e,typeof document<"u"&&op.createPortal(a.jsx("div",{className:"modal-stack","aria-hidden":t.length===0,children:t.map((l,s)=>a.jsx(Jx,{modal:l,onClose:()=>{var o;(o=l.onClose)==null||o.call(l),r(l.id)},depth:s},l.id))}),document.body)]})}function Jx({modal:e,onClose:t,depth:n}){return a.jsx("div",{className:"modal-backdrop",onClick:r=>{r.target===r.currentTarget&&t()},style:n>0?{background:"rgba(0,0,0,0.4)"}:void 0,children:a.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true",style:e.width?{maxWidth:e.width}:void 0,children:[e.title&&a.jsxs("header",{className:"modal-header",children:[a.jsx("h2",{className:"modal-title",children:e.title}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close",onClick:t,children:a.jsx(Pi,{size:16})})]}),a.jsx("div",{className:"modal-body",children:e.children}),e.footer&&a.jsx("footer",{className:"modal-footer",children:e.footer})]})})}const Ip=z.createContext(null);function dt(){const e=z.useContext(Ip);return e||{show:()=>{},info:()=>{},success:()=>{},error:()=>{},warning:()=>{},dismiss:()=>{},toasts:[]}}const Zx={info:xp,success:Cx,error:Sx,warning:Hx};function e1({children:e}){const[t,n]=z.useState([]),r=z.useRef(1),i=z.useRef(new Map),l=z.useCallback(u=>{n(f=>f.filter(d=>d.id!==u));const c=i.current.get(u);c&&(clearTimeout(c),i.current.delete(u))},[]),s=z.useCallback((u,c="info",f=4e3)=>{const d=r.current++;if(n(g=>[...g,{id:d,kind:c,message:u}]),f>0){const g=setTimeout(()=>l(d),f);i.current.set(d,g)}},[l]),o=z.useMemo(()=>({show:s,info:(u,c)=>s(u,"info",c),success:(u,c)=>s(u,"success",c),error:(u,c)=>s(u,"error",c),warning:(u,c)=>s(u,"warning",c),dismiss:l,toasts:t}),[s,l,t]);return a.jsxs(Ip.Provider,{value:o,children:[e,a.jsx(t1,{toasts:t,onDismiss:l})]})}function t1({toasts:e,onDismiss:t}){return a.jsx("div",{className:"toast-stack","aria-live":"polite",children:e.map(n=>a.jsx(n1,{toast:n,onDismiss:t},n.id))})}function n1({toast:e,onDismiss:t}){const n=Zx[e.kind];return a.jsxs("div",{className:`toast toast-${e.kind}`,role:"status",children:[a.jsx(n,{size:16,className:"toast-icon"}),a.jsx("span",{className:"toast-message",children:e.message}),a.jsx("button",{type:"button",className:"toast-close","aria-label":"Dismiss",onClick:()=>t(e.id),children:a.jsx(Pi,{size:14})})]})}const Bs=[{id:"all",label:"All"},{id:"projects",label:"Projects"},{id:"agents",label:"Agents"},{id:"tasks",label:"Tasks"},{id:"mods",label:"Mods"},{id:"schedules",label:"Schedules"},{id:"commands",label:"Commands"}];function r1({open:e,onClose:t,onSelect:n}){const r=dt(),[i,l]=z.useState(""),[s,o]=z.useState("all"),[u,c]=z.useState([]),[f,d]=z.useState(!1),[g,h]=z.useState(0),m=z.useRef(null);if(z.useEffect(()=>{e&&(l(""),c([]),h(0),setTimeout(()=>{var y;return(y=m.current)==null?void 0:y.focus()},30))},[e]),z.useEffect(()=>{if(!e)return;if(!i.trim()){c([]);return}let y=!1;d(!0);const p=setTimeout(()=>{B.get(`/search?q=${encodeURIComponent(i)}&scope=${s}`).then(S=>{y||(c(S.results||[]),h(0))}).catch(S=>{y||r.error(`Search failed: ${S.message}`)}).finally(()=>!y&&d(!1))},150);return()=>{y=!0,clearTimeout(p)}},[i,s,e,r]),!e)return null;const k={};for(const y of u)k[y.type]=k[y.type]||[],k[y.type].push(y);const E=[];for(const y of Bs.map(p=>p.id))k[y]&&E.push(...k[y]);const x=y=>{y.key==="Escape"?t():y.key==="ArrowDown"?(y.preventDefault(),h(p=>Math.min(p+1,E.length-1))):y.key==="ArrowUp"?(y.preventDefault(),h(p=>Math.max(p-1,0))):y.key==="Enter"&&E[g]&&(y.preventDefault(),n(E[g]),t())};return a.jsx("div",{className:"search-modal-backdrop",onClick:t,children:a.jsxs("div",{className:"search-modal",onClick:y=>y.stopPropagation(),children:[a.jsxs("div",{className:"search-modal-head",children:[a.jsx(uu,{size:14}),a.jsx("input",{ref:m,className:"search-modal-input",placeholder:"Search tasks, plans, agents, projects, mods…",value:i,onChange:y=>l(y.target.value),onKeyDown:x}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close",onClick:t,children:a.jsx(Pi,{size:14})})]}),a.jsx("div",{className:"search-modal-scopes",children:Bs.map(y=>a.jsx("button",{type:"button",className:ae("search-scope",s===y.id&&"search-scope-active"),onClick:()=>o(y.id),children:y.label},y.id))}),a.jsxs("div",{className:"search-modal-body",children:[f&&a.jsx("div",{className:"muted",children:"Searching…"}),!f&&i&&E.length===0&&a.jsx("div",{className:"muted",children:"No results."}),!f&&!i&&a.jsx("div",{className:"muted",children:"Type to search…"}),Bs.map(y=>{const p=k[y.id];return!p||p.length===0?null:a.jsxs("div",{className:"search-group",children:[a.jsx("div",{className:"search-group-head",children:y.label}),p.map(S=>{const w=E.indexOf(S);return a.jsxs("button",{type:"button",className:ae("search-result",w===g&&"search-result-active"),onMouseEnter:()=>h(w),onClick:()=>{n(S),t()},children:[a.jsx("span",{className:"search-result-type",children:S.type}),a.jsx("span",{className:"search-result-label",children:i1(S)})]},`${S.type}-${w}`)})]},y.id)})]}),a.jsx("div",{className:"search-modal-foot",children:a.jsx("span",{className:"muted",children:"↑↓ navigate · ↵ open · esc close"})})]})})}function i1(e){const t=e.item||{};return e.type==="project"?`${t.name} — ${t.path}`:e.type==="agent"?`${t.name} — ${t.description||t.model||""}`:e.type==="task"?`${t.title} — ${t.status||""}`:e.type==="mod"?`${t.name} v${t.version} — ${t.description||""}`:e.type==="schedule"?`${t.name} (${t.type}: ${t.schedule})`:e.type==="command"?`${t.name} — ${t.description||""}`:JSON.stringify(t).slice(0,80)}class l1{constructor(t){nt(this,"url");nt(this,"handlers",new Set);nt(this,"statusHandlers",new Set);nt(this,"ws",null);nt(this,"reconnectDelay",1e3);nt(this,"maxReconnectDelay",15e3);nt(this,"_status","connecting");nt(this,"pingTimer",null);nt(this,"closed",!1);this.url=t||(typeof location<"u"?`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws`:"ws://localhost/ws"),this.connect()}on(t){return this.handlers.add(t),()=>{this.handlers.delete(t)}}onStatus(t){return this.statusHandlers.add(t),t(this._status),()=>{this.statusHandlers.delete(t)}}get status(){return this._status}send(t){return this.ws&&this.ws.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(t)),!0):!1}close(){var t;this.closed=!0,this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=null;try{(t=this.ws)==null||t.close()}catch{}}connect(){this.setStatus("connecting");try{this.ws=new WebSocket(this.url)}catch(t){console.warn("[ws] construct failed:",t),this.scheduleReconnect();return}this.ws.addEventListener("open",()=>{this.reconnectDelay=1e3,this.setStatus("connected"),this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=setInterval(()=>{this._status==="connected"&&this.send({type:"ping"})},3e4)}),this.ws.addEventListener("close",()=>{this.setStatus("disconnected"),this.pingTimer&&(clearInterval(this.pingTimer),this.pingTimer=null),this.closed||this.scheduleReconnect()}),this.ws.addEventListener("error",()=>{console.warn("[ws] error")}),this.ws.addEventListener("message",t=>{let n;try{n=JSON.parse(t.data)}catch{console.warn("[ws] bad message");return}for(const r of this.handlers)try{r(n)}catch(i){console.error("[ws] handler error:",i)}})}scheduleReconnect(){setTimeout(()=>this.connect(),this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*1.6,this.maxReconnectDelay)}setStatus(t){this._status=t;for(const n of this.statusHandlers)try{n(t)}catch(r){console.error("[ws] status handler error:",r)}}}function ei(e){const t=typeof e=="string"?e:e.mode,n=t==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":t==="light"?"light":"dark";return typeof document<"u"&&(n==="light"?document.documentElement.setAttribute("data-theme","light"):document.documentElement.removeAttribute("data-theme")),n}function Yn(e){if(typeof document>"u")return;const t=document.documentElement;t.style.setProperty("--accent",e.accent),t.style.setProperty("--success",e.success),t.style.setProperty("--warning",e.warning),t.style.setProperty("--error",e.error),t.style.setProperty("--info",e.info),t.style.setProperty("--accent-bg",Xc(e.accent,.12)),t.style.setProperty("--accent-border",Xc(e.accent,.4)),e.fontFamily&&t.style.setProperty("--font-sans",`'${e.fontFamily}', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif`),e.fontSize&&t.style.setProperty("--base-font-size",`${e.fontSize}px`),t.dataset.compactMode=e.compactMode?"true":"false",t.dataset.animations=e.animations?"true":"false"}function Xc(e,t){const n=/^#?([0-9a-f]{6})$/i.exec(e||"");if(!n)return`rgba(139, 92, 246, ${t})`;const r=parseInt(n[1],16),i=r>>16&255,l=r>>8&255,s=r&255;return`rgba(${i}, ${l}, ${s}, ${t})`}function re({variant:e="elevated",interactive:t=!1,className:n,children:r,...i}){return a.jsx("div",{className:ae("card",`card-${e}`,t&&"card-interactive",n),...i,children:r})}function ce({children:e,className:t}){return a.jsx("h3",{className:ae("card-title",t),children:e})}function Ce({children:e,className:t}){return a.jsx("div",{className:ae("card-meta",t),children:e})}const V=z.forwardRef(function({variant:t="secondary",size:n="md",iconOnly:r=!1,loading:i=!1,disabled:l,className:s,children:o,...u},c){return a.jsxs("button",{ref:c,type:u.type??"button",disabled:l||i,className:ae("btn",`btn-${t}`,`btn-size-${n}`,r&&"btn-icon",i&&"btn-loading",s),...u,children:[i?a.jsx("span",{className:"btn-spinner","aria-hidden":!0}):null,o]})});function xn({icon:e,title:t,message:n,action:r,className:i}){return a.jsxs("div",{className:ae("empty-state",i),children:[a.jsx("div",{className:"empty-icon",children:e??a.jsx(Ix,{size:32})}),a.jsx("div",{className:"empty-title",children:t}),n&&a.jsx("div",{className:"empty-message",children:n}),r&&a.jsx("div",{className:"empty-action",children:r})]})}function _t({size:e="md",className:t,label:n}){return a.jsx("span",{className:ae("spinner",`spinner-${e}`,t),role:"status","aria-label":n||"Loading"})}function s1({snapshot:e,settings:t,setActiveTab:n,refreshSnapshot:r}){var S;const i=dt(),l=Vn(),[s,o]=z.useState(e.overview??null),[u,c]=z.useState(!e.overview),[f,d]=z.useState(e.projects||[]),[g,h]=z.useState(((S=e.activeProject)==null?void 0:S.id)||null),[m,k]=z.useState(e.mods||[]);z.useEffect(()=>{var w;e.overview&&(o(e.overview),c(!1)),d(e.projects||[]),h(((w=e.activeProject)==null?void 0:w.id)||null),k(e.mods||[])},[e.overview,e.projects,e.activeProject,e.mods]);const E=async()=>{i.info("Refreshing…",1500),await r();try{const w=await B.get("/projects");d(w.projects||[]),h(w.active||null)}catch{}},x=()=>{let w=null,v=null;l.open({title:"Add project",children:a.jsxs("div",{children:[a.jsx("label",{className:"field-label",children:"Path (absolute)"}),a.jsx("input",{ref:b=>w=b,className:"input",type:"text",placeholder:"/home/user/projects/myapp",autoFocus:!0}),a.jsx("label",{className:"field-label",style:{marginTop:12},children:"Name (optional)"}),a.jsx("input",{ref:b=>v=b,className:"input",type:"text",placeholder:"My App"})]}),footer:a.jsxs("div",{className:"modal-footer-actions",children:[a.jsx(V,{variant:"ghost",onClick:()=>l.close(),children:"Cancel"}),a.jsx(V,{variant:"primary",onClick:async()=>{const b=((w==null?void 0:w.value)||"").trim(),P=((v==null?void 0:v.value)||"").trim()||null;if(!b){i.warning("Path is required.");return}try{const _=await B.post("/projects",{path:b,name:P});d(N=>[...N.filter(L=>L.id!==_.id),_]),i.success("Project added."),l.close()}catch(_){i.error(`Add failed: ${_.message}`)}},children:"Add"})]})})},y=async w=>{try{await B.post(`/projects/${encodeURIComponent(w)}/activate`),h(w),i.success("Project activated."),await r()}catch(v){i.error(`Activate failed: ${v.message}`)}},p=async w=>{if(confirm(`Remove project "${w}" from the registry?`))try{await B.del(`/projects/${encodeURIComponent(w)}`),d(v=>v.filter(b=>b.id!==w)),g===w&&h(null),i.success("Project removed.")}catch(v){i.error(`Remove failed: ${v.message}`)}};return u||!s?a.jsxs("div",{className:"view-loading",children:[a.jsx(_t,{size:"lg"}),a.jsx("p",{children:"Loading overview…"})]}):a.jsxs("div",{className:"view view-overview",children:[a.jsxs("header",{className:"view-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx(vp,{size:18}),"System Overview"]}),a.jsxs("p",{className:"view-subtitle",children:[f.length," project",f.length===1?"":"s"," ·"," ",s.counts.agents," agents ·"," ",s.counts.sessions," session",s.counts.sessions===1?"":"s"]})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs(V,{variant:"secondary",size:"sm",onClick:x,children:[a.jsx(Dt,{size:14})," Add project"]}),a.jsxs(V,{variant:"secondary",size:"sm",onClick:E,children:[a.jsx(vt,{size:14})," Refresh"]})]})]}),a.jsxs(re,{className:"project-picker",children:[a.jsxs(ce,{children:[a.jsx(Ka,{size:14})," Projects"]}),a.jsxs(Ce,{children:['Click "Open" to switch the active project. Per-project data lives in'," ",a.jsx("code",{children:"~/.config/opencode/projects/<id>/"}),"."]}),f.length===0?a.jsx(xn,{icon:a.jsx(Ka,{size:32}),title:"No projects yet",message:"Add a project to start tracking its tasks, plans, and schedules."}):a.jsx("div",{className:"project-grid",children:f.map(w=>a.jsx(a1,{project:w,active:g===w.id,onOpen:()=>y(w.id),onRemove:()=>p(w.id)},w.id))})]}),a.jsxs("div",{className:"overview-cols",children:[a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(Wx,{size:14})," Recent activity"]}),a.jsx(Ce,{children:"Last 30 events"}),s.recentActivity.length===0?a.jsx(xn,{icon:a.jsx(yp,{size:28}),title:"No activity yet",message:"Use the chat or invoke a Bizar command to start a feed."}):a.jsx("ul",{className:"activity-list",children:s.recentActivity.slice(0,30).map((w,v)=>a.jsxs("li",{className:"activity-item",children:[a.jsx("span",{className:"activity-ts tabular-nums",children:Et(w.ts)}),a.jsx("span",{className:"activity-kind",children:w.kind}),a.jsx("span",{className:"activity-msg",children:o1(w)})]},v))})]}),a.jsxs(re,{children:[a.jsx(ce,{children:"Mods"}),a.jsxs(Ce,{children:["Extensions installed under ",a.jsx("code",{children:"~/.config/bizar/mods/"})]}),m.length===0?a.jsx("div",{className:"muted",children:"No mods installed."}):a.jsx("ul",{className:"mod-mini-list",children:m.map(w=>a.jsxs("li",{className:"mod-mini",children:[a.jsx("span",{className:"mod-mini-name",children:w.name}),a.jsxs("span",{className:"mod-mini-meta",children:["v",w.version," · ",w.type]}),a.jsx("span",{className:`mod-mini-pill ${w.enabled?"mod-mini-pill-on":"mod-mini-pill-off"}`,children:w.enabled?"on":"off"})]},w.id))})]}),a.jsxs(re,{children:[a.jsx(ce,{children:"Environment"}),a.jsx(Ce,{children:"Runtime + paths"}),a.jsxs("dl",{className:"env-table",children:[a.jsx("dt",{children:"Node"}),a.jsx("dd",{className:"mono",children:s.versions.node}),a.jsx("dt",{children:"Platform"}),a.jsx("dd",{className:"mono",children:s.versions.platform}),a.jsx("dt",{children:"Project root"}),a.jsx("dd",{className:"mono ellipsis",title:s.versions.projectRoot,children:s.versions.projectRoot}),a.jsx("dt",{children:"Bizar root"}),a.jsx("dd",{className:"mono ellipsis",title:s.versions.bizarRoot,children:s.versions.bizarRoot}),a.jsx("dt",{children:"Generated"}),a.jsx("dd",{className:"mono tabular-nums",children:Ep(s.generatedAt)})]})]})]})]})}function a1({project:e,active:t,onOpen:n,onRemove:r}){const i={active:"status-on",inactive:"status-neutral",error:"status-error"}[e.status]||"status-neutral";return a.jsxs("div",{className:`project-card ${t?"project-card-active":""}`,children:[a.jsxs("div",{className:"project-card-head",children:[a.jsx("span",{className:`project-card-status ${i}`,children:e.status}),a.jsx("div",{className:"project-card-name",children:e.name}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Remove project",title:"Remove",onClick:l=>{l.stopPropagation(),r()},children:a.jsx(jn,{size:12})})]}),a.jsx("div",{className:"project-card-path mono ellipsis",title:e.path,children:e.path}),a.jsx("div",{className:"project-card-meta",children:e.lastAccessed&&a.jsxs("span",{className:"muted",children:["Last opened ",Et(e.lastAccessed)]})}),a.jsx("div",{className:"project-card-actions",children:a.jsx(V,{variant:t?"ghost":"primary",size:"sm",onClick:n,children:t?a.jsxs(a.Fragment,{children:[a.jsx(jp,{size:12})," Active"]}):a.jsx(a.Fragment,{children:"Open"})})})]})}function o1(e){if(typeof e.message=="string")return e.message;if(typeof e.prompt=="string")return e.prompt;if(typeof e.slug=="string"){const t=typeof e.title=="string"?` title=${e.title}`:"";return`slug=${e.slug}${t}`}return typeof e.name=="string"?`name=${e.name}`:JSON.stringify(e)}function u1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const c1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,f1={};function Gc(e,t){return(f1.jsx?d1:c1).test(e)}const h1=/[ \t\n\f\r]/g;function p1(e){return typeof e=="object"?e.type==="text"?Jc(e.value):!1:Jc(e)}function Jc(e){return e.replace(h1,"")===""}class Ti{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ti.prototype.normal={};Ti.prototype.property={};Ti.prototype.space=void 0;function Lp(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ti(n,r,t)}function Za(e){return e.toLowerCase()}class et{constructor(t,n){this.attribute=n,this.property=t}}et.prototype.attribute="";et.prototype.booleanish=!1;et.prototype.boolean=!1;et.prototype.commaOrSpaceSeparated=!1;et.prototype.commaSeparated=!1;et.prototype.defined=!1;et.prototype.mustUseProperty=!1;et.prototype.number=!1;et.prototype.overloadedBoolean=!1;et.prototype.property="";et.prototype.spaceSeparated=!1;et.prototype.space=void 0;let m1=0;const Y=Hn(),be=Hn(),eo=Hn(),A=Hn(),he=Hn(),An=Hn(),rt=Hn();function Hn(){return 2**++m1}const to=Object.freeze(Object.defineProperty({__proto__:null,boolean:Y,booleanish:be,commaOrSpaceSeparated:rt,commaSeparated:An,number:A,overloadedBoolean:eo,spaceSeparated:he},Symbol.toStringTag,{value:"Module"})),Us=Object.keys(to);class du extends et{constructor(t,n,r,i){let l=-1;if(super(t,n),Zc(this,"space",i),typeof r=="number")for(;++l<Us.length;){const s=Us[l];Zc(this,Us[l],(r&to[s])===to[s])}}}du.prototype.defined=!0;function Zc(e,t,n){n&&(e[t]=n)}function Er(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new du(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Za(r)]=r,n[Za(l.attribute)]=r}return new Ti(t,n,e.space)}const Mp=Er({properties:{ariaActiveDescendant:null,ariaAtomic:be,ariaAutoComplete:null,ariaBusy:be,ariaChecked:be,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:he,ariaCurrent:null,ariaDescribedBy:he,ariaDetails:null,ariaDisabled:be,ariaDropEffect:he,ariaErrorMessage:null,ariaExpanded:be,ariaFlowTo:he,ariaGrabbed:be,ariaHasPopup:null,ariaHidden:be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:he,ariaLevel:A,ariaLive:null,ariaModal:be,ariaMultiLine:be,ariaMultiSelectable:be,ariaOrientation:null,ariaOwns:he,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:be,ariaReadOnly:be,ariaRelevant:null,ariaRequired:be,ariaRoleDescription:he,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:be,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ap(e,t){return t in e?e[t]:t}function Rp(e,t){return Ap(e,t.toLowerCase())}const g1=Er({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:An,acceptCharset:he,accessKey:he,action:null,allow:null,allowFullScreen:Y,allowPaymentRequest:Y,allowUserMedia:Y,alpha:Y,alt:null,as:null,async:Y,autoCapitalize:null,autoComplete:he,autoFocus:Y,autoPlay:Y,blocking:he,capture:null,charSet:null,checked:Y,cite:null,className:he,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:be,controls:Y,controlsList:he,coords:A|An,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Y,defer:Y,dir:null,dirName:null,disabled:Y,download:eo,draggable:be,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Y,formTarget:null,headers:he,height:A,hidden:eo,high:A,href:null,hrefLang:null,htmlFor:he,httpEquiv:he,id:null,imageSizes:null,imageSrcSet:null,inert:Y,inputMode:null,integrity:null,is:null,isMap:Y,itemId:null,itemProp:he,itemRef:he,itemScope:Y,itemType:he,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Y,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:Y,muted:Y,name:null,nonce:null,noModule:Y,noValidate:Y,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:Y,optimum:A,pattern:null,ping:he,placeholder:null,playsInline:Y,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Y,referrerPolicy:null,rel:he,required:Y,reversed:Y,rows:A,rowSpan:A,sandbox:he,scope:null,scoped:Y,seamless:Y,selected:Y,shadowRootClonable:Y,shadowRootCustomElementRegistry:Y,shadowRootDelegatesFocus:Y,shadowRootMode:null,shadowRootSerializable:Y,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:Y,useMap:null,value:be,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:he,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Y,declare:Y,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:Y,noHref:Y,noShade:Y,noWrap:Y,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:be,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Y,disablePictureInPicture:Y,disableRemotePlayback:Y,exportParts:An,part:he,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Rp}),y1=Er({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:rt,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:he,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:Y,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:An,g2:An,glyphName:An,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:he,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rt,rev:rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rt,requiredFeatures:rt,requiredFonts:rt,requiredFormats:rt,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rt,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ap}),_p=Er({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()}}),Dp=Er({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rp}),Fp=Er({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),x1={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"},v1=/[A-Z]/g,ed=/-[a-z]/g,k1=/^data[-\w.:]+$/i;function w1(e,t){const n=Za(t);let r=t,i=et;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&k1.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(ed,S1);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!ed.test(l)){let s=l.replace(v1,j1);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=du}return new i(r,t)}function j1(e){return"-"+e.toLowerCase()}function S1(e){return e.charAt(1).toUpperCase()}const C1=Lp([Mp,g1,_p,Dp,Fp],"html"),fu=Lp([Mp,y1,_p,Dp,Fp],"svg");function N1(e){return e.join(" ").trim()}var hu={},td=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,b1=/\n/g,E1=/^\s*/,z1=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,P1=/^:\s*/,T1=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,I1=/^[;\s]*/,L1=/^\s+|\s+$/g,M1=`
356
+ `,nd="/",rd="*",zn="",A1="comment",R1="declaration";function _1(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var k=m.match(b1);k&&(n+=k.length);var E=m.lastIndexOf(M1);r=~E?m.length-E:r+m.length}function l(){var m={line:n,column:r};return function(k){return k.position=new s(m),c(),k}}function s(m){this.start=m,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function o(m){var k=new Error(t.source+":"+n+":"+r+": "+m);if(k.reason=m,k.filename=t.source,k.line=n,k.column=r,k.source=e,!t.silent)throw k}function u(m){var k=m.exec(e);if(k){var E=k[0];return i(E),e=e.slice(E.length),k}}function c(){u(E1)}function f(m){var k;for(m=m||[];k=d();)k!==!1&&m.push(k);return m}function d(){var m=l();if(!(nd!=e.charAt(0)||rd!=e.charAt(1))){for(var k=2;zn!=e.charAt(k)&&(rd!=e.charAt(k)||nd!=e.charAt(k+1));)++k;if(k+=2,zn===e.charAt(k-1))return o("End of comment missing");var E=e.slice(2,k-2);return r+=2,i(E),e=e.slice(k),r+=2,m({type:A1,comment:E})}}function g(){var m=l(),k=u(z1);if(k){if(d(),!u(P1))return o("property missing ':'");var E=u(T1),x=m({type:R1,property:id(k[0].replace(td,zn)),value:E?id(E[0].replace(td,zn)):zn});return u(I1),x}}function h(){var m=[];f(m);for(var k;k=g();)k!==!1&&(m.push(k),f(m));return m}return c(),h()}function id(e){return e?e.replace(L1,zn):zn}var D1=_1,F1=ml&&ml.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hu,"__esModule",{value:!0});hu.default=$1;const O1=F1(D1);function $1(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,O1.default)(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:s,value:o}=l;i?t(s,o,l):o&&(n=n||{},n[s]=o)}),n}var os={};Object.defineProperty(os,"__esModule",{value:!0});os.camelCase=void 0;var B1=/^--[a-zA-Z0-9_-]+$/,U1=/-([a-z])/g,V1=/^[^-]+$/,H1=/^-(webkit|moz|ms|o|khtml)-/,W1=/^-(ms)-/,q1=function(e){return!e||V1.test(e)||B1.test(e)},Q1=function(e,t){return t.toUpperCase()},ld=function(e,t){return"".concat(t,"-")},Y1=function(e,t){return t===void 0&&(t={}),q1(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(W1,ld):e=e.replace(H1,ld),e.replace(U1,Q1))};os.camelCase=Y1;var K1=ml&&ml.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},X1=K1(hu),G1=os;function no(e,t){var n={};return!e||typeof e!="string"||(0,X1.default)(e,function(r,i){r&&i&&(n[(0,G1.camelCase)(r,t)]=i)}),n}no.default=no;var J1=no;const Z1=Yd(J1),Op=$p("end"),pu=$p("start");function $p(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 ev(e){const t=pu(e),n=Op(e);if(t&&n)return{start:t,end:n}}function ti(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sd(e.position):"start"in e||"end"in e?sd(e):"line"in e||"column"in e?ro(e):""}function ro(e){return ad(e&&e.line)+":"+ad(e&&e.column)}function sd(e){return ro(e&&e.start)+"-"+ro(e&&e.end)}function ad(e){return e&&typeof e=="number"?e:1}class Be extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},s=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(s=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const o=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=ti(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=s&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Be.prototype.file="";Be.prototype.name="";Be.prototype.reason="";Be.prototype.message="";Be.prototype.stack="";Be.prototype.column=void 0;Be.prototype.line=void 0;Be.prototype.ancestors=void 0;Be.prototype.cause=void 0;Be.prototype.fatal=void 0;Be.prototype.place=void 0;Be.prototype.ruleId=void 0;Be.prototype.source=void 0;const mu={}.hasOwnProperty,tv=new Map,nv=/[A-Z]/g,rv=new Set(["table","tbody","thead","tfoot","tr"]),iv=new Set(["td","th"]),Bp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lv(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=hv(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=fv(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?fu:C1,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Up(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Up(e,t,n){if(t.type==="element")return sv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return av(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return uv(e,t,n);if(t.type==="mdxjsEsm")return ov(e,t);if(t.type==="root")return cv(e,t,n);if(t.type==="text")return dv(e,t)}function sv(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=fu,e.schema=i),e.ancestors.push(t);const l=Hp(e,t.tagName,!1),s=pv(e,t);let o=yu(e,t);return rv.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!p1(u):!0})),Vp(e,s,l,t),gu(s,o),e.ancestors.pop(),e.schema=r,e.create(t,l,s,n)}function av(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)}ji(e,t.position)}function ov(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ji(e,t.position)}function uv(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=fu,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Hp(e,t.name,!0),s=mv(e,t),o=yu(e,t);return Vp(e,s,l,t),gu(s,o),e.ancestors.pop(),e.schema=r,e.create(t,l,s,n)}function cv(e,t,n){const r={};return gu(r,yu(e,t)),e.create(t,e.Fragment,r,n)}function dv(e,t){return t.value}function Vp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gu(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fv(e,t,n){return r;function r(i,l,s,o){const c=Array.isArray(s.children)?n:t;return o?c(l,s,o):c(l,s)}}function hv(e,t){return n;function n(r,i,l,s){const o=Array.isArray(l.children),u=pu(r);return t(i,l,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function pv(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&mu.call(t.properties,i)){const l=gv(e,i,t.properties[i]);if(l){const[s,o]=l;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&iv.has(t.tagName)?r=o:n[s]=o}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function mv(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const s=l.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else ji(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,l=e.evaluater.evaluateExpression(o.expression)}else ji(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function yu(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:tv;for(;++r<t.children.length;){const l=t.children[r];let s;if(e.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const o=Up(e,l,s);o!==void 0&&n.push(o)}return n}function gv(e,t,n){const r=w1(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?u1(n):N1(n)),r.property==="style"){let i=typeof n=="object"?n:yv(e,String(n));return e.stylePropertyNameCase==="css"&&(i=xv(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?x1[r.property]||r.property:r.attribute,n]}}function yv(e,t){try{return Z1(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Be("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Bp+"#cannot-parse-style-attribute",i}}function Hp(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,s;for(;++l<i.length;){const o=Gc(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(l&&o.type==="Literal"),optional:!1}:o}r=s}else r=Gc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return mu.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ji(e)}function ji(e,t){const n=new Be("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=Bp+"#cannot-handle-mdx-estrees-without-createevaluater",n}function xv(e){const t={};let n;for(n in e)mu.call(e,n)&&(t[vv(n)]=e[n]);return t}function vv(e){let t=e.replace(nv,kv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kv(e){return"-"+e.toLowerCase()}const Vs={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"]},wv={};function xu(e,t){const n=wv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wp(e,r,i)}function Wp(e,t,n){if(jv(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 od(e.children,t,n)}return Array.isArray(e)?od(e,t,n):""}function od(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wp(e[i],t,n);return r.join("")}function jv(e){return!!(e&&typeof e=="object")}const ud=document.createElement("i");function vu(e){const t="&"+e+";";ud.innerHTML=t;const n=ud.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function at(e,t,n,r){const i=e.length;let l=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);l<r.length;)s=r.slice(l,l+1e4),s.unshift(t,0),e.splice(...s),l+=1e4,t+=1e4}function pt(e,t){return e.length>0?(at(e,e.length,0,t),e):t}const cd={}.hasOwnProperty;function qp(e){const t={};let n=-1;for(;++n<e.length;)Sv(t,e[n]);return t}function Sv(e,t){let n;for(n in t){const i=(cd.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let s;if(l)for(s in l){cd.call(i,s)||(i[s]=[]);const o=l[s];Cv(i[s],Array.isArray(o)?o:o?[o]:[])}}}function Cv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);at(e,0,0,r)}function Qp(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 zt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ve=Sn(/[A-Za-z]/),Oe=Sn(/[\dA-Za-z]/),Nv=Sn(/[#-'*+\--9=?A-Z^-~]/);function Ul(e){return e!==null&&(e<32||e===127)}const io=Sn(/\d/),bv=Sn(/[\dA-Fa-f]/),Ev=Sn(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function pe(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const us=Sn(new RegExp("\\p{P}|\\p{S}","u")),$n=Sn(/\s/);function Sn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let s="";if(l===37&&Oe(e.charCodeAt(n+1))&&Oe(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(s=String.fromCharCode(l));else if(l>55295&&l<57344){const o=e.charCodeAt(n+1);l<56320&&o>56319&&o<57344?(s=String.fromCharCode(l,o),i=1):s="�"}else s=String.fromCharCode(l);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return s;function s(u){return Z(u)?(e.enter(n),o(u)):t(u)}function o(u){return Z(u)&&l++<i?(e.consume(u),o):(e.exit(n),t(u))}}const zv={tokenize:Pv};function Pv(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ie(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),l(o)}function l(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return W(o)?(e.consume(o),e.exit("chunkText"),l):(e.consume(o),s)}}const Tv={tokenize:Iv},dd={tokenize:Lv};function Iv(e){const t=this,n=[];let r=0,i,l,s;return o;function o(p){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,u,c)(p)}return c(p)}function u(p){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const S=t.events.length;let w=S,v;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){v=t.events[w][1].end;break}x(r);let b=S;for(;b<t.events.length;)t.events[b][1].end={...v},b++;return at(t.events,w+1,0,t.events.slice(S)),t.events.length=b,c(p)}return o(p)}function c(p){if(r===n.length){if(!i)return g(p);if(i.currentConstruct&&i.currentConstruct.concrete)return m(p);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(dd,f,d)(p)}function f(p){return i&&y(),x(r),g(p)}function d(p){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(p)}function g(p){return t.containerState={},e.attempt(dd,h,m)(p)}function h(p){return r++,n.push([t.currentConstruct,t.containerState]),g(p)}function m(p){if(p===null){i&&y(),x(0),e.consume(p);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(p)}function k(p){if(p===null){E(e.exit("chunkFlow"),!0),x(0),e.consume(p);return}return W(p)?(e.consume(p),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(p),k)}function E(p,S){const w=t.sliceStream(p);if(S&&w.push(null),p.previous=l,l&&(l.next=p),l=p,i.defineSkip(p.start),i.write(w),t.parser.lazy[p.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<s&&(!i.events[v][1].end||i.events[v][1].end.offset>s))return;const b=t.events.length;let P=b,_,N;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(_){N=t.events[P][1].end;break}_=!0}for(x(r),v=b;v<t.events.length;)t.events[v][1].end={...N},v++;at(t.events,P+1,0,t.events.slice(b)),t.events.length=v}}function x(p){let S=n.length;for(;S-- >p;){const w=n[S];t.containerState=w[1],w[0].exit.call(t,e)}n.length=p}function y(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Lv(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Sr(e){if(e===null||pe(e)||$n(e))return 1;if(us(e))return 2}function cs(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const lo={name:"attention",resolveAll:Mv,tokenize:Av};function Mv(e,t){let n=-1,r,i,l,s,o,u,c,f;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;u=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 d={...e[r][1].end},g={...e[n][1].start};fd(d,-u),fd(g,u),s={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=pt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=pt(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",l,t]]),c=pt(c,cs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=pt(c,[["exit",l,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=pt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,at(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Av(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Sr(r);let l;return s;function s(u){return l=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===l)return e.consume(u),o;const c=e.exit("attentionSequence"),f=Sr(u),d=!f||f===2&&i||n.includes(u),g=!i||i===2&&f||n.includes(r);return c._open=!!(l===42?d:d&&(i||!g)),c._close=!!(l===42?g:g&&(f||!d)),t(u)}}function fd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Rv={name:"autolink",tokenize:_v};function _v(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return Ve(h)?(e.consume(h),s):h===64?n(h):c(h)}function s(h){return h===43||h===45||h===46||Oe(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||Oe(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Ul(h)?n(h):(e.consume(h),u)}function c(h){return h===64?(e.consume(h),f):Nv(h)?(e.consume(h),c):n(h)}function f(h){return Oe(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):g(h)}function g(h){if((h===45||Oe(h))&&r++<63){const m=h===45?g:d;return e.consume(h),m}return n(h)}}const Ii={partial:!0,tokenize:Dv};function Dv(e,t,n){return r;function r(l){return Z(l)?ie(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||W(l)?t(l):n(l)}}const Yp={continuation:{tokenize:Ov},exit:$v,name:"blockQuote",tokenize:Fv};function Fv(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),l}return n(s)}function l(s){return Z(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Ov(e,t,n){const r=this;return i;function i(s){return Z(s)?ie(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):l(s)}function l(s){return e.attempt(Yp,t,n)(s)}}function $v(e){e.exit("blockQuote")}const Kp={name:"characterEscape",tokenize:Bv};function Bv(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Ev(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Xp={name:"characterReference",tokenize:Uv};function Uv(e,t,n){const r=this;let i=0,l,s;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),l=31,s=Oe,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,s=bv,f):(e.enter("characterReferenceValue"),l=7,s=io,f(d))}function f(d){if(d===59&&i){const g=e.exit("characterReferenceValue");return s===Oe&&!vu(r.sliceSerialize(g))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<l?(e.consume(d),f):n(d)}}const hd={partial:!0,tokenize:Hv},pd={concrete:!0,name:"codeFenced",tokenize:Vv};function Vv(e,t,n){const r=this,i={partial:!0,tokenize:w};let l=0,s=0,o;return u;function u(v){return c(v)}function c(v){const b=r.events[r.events.length-1];return l=b&&b[1].type==="linePrefix"?b[2].sliceSerialize(b[1],!0).length:0,o=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(v)}function f(v){return v===o?(s++,e.consume(v),f):s<3?n(v):(e.exit("codeFencedFenceSequence"),Z(v)?ie(e,d,"whitespace")(v):d(v))}function d(v){return v===null||W(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(hd,k,S)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||W(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(v)):Z(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,h,"whitespace")(v)):v===96&&v===o?n(v):(e.consume(v),g)}function h(v){return v===null||W(v)?d(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||W(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(v)):v===96&&v===o?n(v):(e.consume(v),m)}function k(v){return e.attempt(i,S,E)(v)}function E(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),x}function x(v){return l>0&&Z(v)?ie(e,y,"linePrefix",l+1)(v):y(v)}function y(v){return v===null||W(v)?e.check(hd,k,S)(v):(e.enter("codeFlowValue"),p(v))}function p(v){return v===null||W(v)?(e.exit("codeFlowValue"),y(v)):(e.consume(v),p)}function S(v){return e.exit("codeFenced"),t(v)}function w(v,b,P){let _=0;return N;function N(q){return v.enter("lineEnding"),v.consume(q),v.exit("lineEnding"),L}function L(q){return v.enter("codeFencedFence"),Z(q)?ie(v,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):F(q)}function F(q){return q===o?(v.enter("codeFencedFenceSequence"),Q(q)):P(q)}function Q(q){return q===o?(_++,v.consume(q),Q):_>=s?(v.exit("codeFencedFenceSequence"),Z(q)?ie(v,G,"whitespace")(q):G(q)):P(q)}function G(q){return q===null||W(q)?(v.exit("codeFencedFence"),b(q)):P(q)}}}function Hv(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l)}function l(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Hs={name:"codeIndented",tokenize:qv},Wv={partial:!0,tokenize:Qv};function qv(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ie(e,l,"linePrefix",5)(c)}function l(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):W(c)?e.attempt(Wv,s,u)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||W(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function u(c){return e.exit("codeIndented"),t(c)}}function Qv(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):W(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ie(e,l,"linePrefix",5)(s)}function l(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):W(s)?i(s):n(s)}}const Yv={name:"codeText",previous:Xv,resolve:Kv,tokenize:Gv};function Kv(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Xv(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Gv(e,t,n){let r=0,i,l;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(l=e.enter("codeTextSequence"),i=0,f(d)):W(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||W(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(l.type="codeTextData",c(d))}}class Jv{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 i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Or(this.left,r),l.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),Or(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Or(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);Or(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Or(this.left,n.reverse())}}}function Or(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 Gp(e){const t={};let n=-1,r,i,l,s,o,u,c;const f=new Jv(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Zv(f,n)),n=t[n],c=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(s=f.get(l),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=l);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},o=f.slice(i,n),o.unshift(r),f.splice(i,n-i+1,o))}}return at(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function Zv(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],c={};let f,d,g=-1,h=n,m=0,k=0;const E=[k];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++g<o.length;)o[g][0]==="exit"&&o[g-1][0]==="enter"&&o[g][1].type===o[g-1][1].type&&o[g][1].start.line!==o[g][1].end.line&&(k=g+1,E.push(k),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):E.pop(),g=E.length;g--;){const x=o.slice(E[g],E[g+1]),y=l.pop();u.push([y,y+x.length-1]),e.splice(y,2,x)}for(u.reverse(),g=-1;++g<u.length;)c[m+u[g][0]]=m+u[g][1],m+=u[g][1]-u[g][0]-1;return c}const e0={resolve:n0,tokenize:r0},t0={partial:!0,tokenize:i0};function n0(e){return Gp(e),e}function r0(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?l(o):W(o)?e.check(t0,s,l)(o):(e.consume(o),i)}function l(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function i0(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ie(e,l,"linePrefix")}function l(s){if(s===null||W(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Jp(e,t,n,r,i,l,s,o,u){const c=u||Number.POSITIVE_INFINITY;let f=0;return d;function d(x){return x===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(x),e.exit(l),g):x===null||x===32||x===41||Ul(x)?n(x):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(x))}function g(x){return x===62?(e.enter(l),e.consume(x),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(o),g(x)):x===null||x===60||W(x)?n(x):(e.consume(x),x===92?m:h)}function m(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function k(x){return!f&&(x===null||x===41||pe(x))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(x)):f<c&&x===40?(e.consume(x),f++,k):x===41?(e.consume(x),f--,k):x===null||x===32||x===40||Ul(x)?n(x):(e.consume(x),x===92?E:k)}function E(x){return x===40||x===41||x===92?(e.consume(x),k):k(x)}}function Zp(e,t,n,r,i,l){const s=this;let o=0,u;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(l),f}function f(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):W(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||W(h)||o++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!Z(h)),h===92?g:d)}function g(h){return h===91||h===92||h===93?(e.consume(h),o++,d):d(h)}}function em(e,t,n,r,i,l){let s;return o;function o(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),s=g===40?41:g,u):n(g)}function u(g){return g===s?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(l),c(g))}function c(g){return g===s?(e.exit(l),u(s)):g===null?n(g):W(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ie(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===s||g===null||W(g)?(e.exit("chunkString"),c(g)):(e.consume(g),g===92?d:f)}function d(g){return g===s||g===92?(e.consume(g),f):f(g)}}function ni(e,t){let n;return r;function r(i){return W(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const l0={name:"definition",tokenize:a0},s0={partial:!0,tokenize:o0};function a0(e,t,n){const r=this;let i;return l;function l(h){return e.enter("definition"),s(h)}function s(h){return Zp.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return pe(h)?ni(e,c)(h):c(h)}function c(h){return Jp(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(s0,d,d)(h)}function d(h){return Z(h)?ie(e,g,"whitespace")(h):g(h)}function g(h){return h===null||W(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function o0(e,t,n){return r;function r(o){return pe(o)?ni(e,i)(o):n(o)}function i(o){return em(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function l(o){return Z(o)?ie(e,s,"whitespace")(o):s(o)}function s(o){return o===null||W(o)?t(o):n(o)}}const u0={name:"hardBreakEscape",tokenize:c0};function c0(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return W(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const d0={name:"headingAtx",resolve:f0,tokenize:h0};function f0(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},at(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function h0(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||pe(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||W(f)?(e.exit("atxHeading"),t(f)):Z(f)?ie(e,o,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),o(f))}function c(f){return f===null||f===35||pe(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),c)}}const p0=["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"],md=["pre","script","style","textarea"],m0={concrete:!0,name:"htmlFlow",resolveTo:x0,tokenize:v0},g0={partial:!0,tokenize:w0},y0={partial:!0,tokenize:k0};function x0(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 v0(e,t,n){const r=this;let i,l,s,o,u;return c;function c(C){return f(C)}function f(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),g):C===47?(e.consume(C),l=!0,k):C===63?(e.consume(C),i=3,r.interrupt?t:j):Ve(C)?(e.consume(C),s=String.fromCharCode(C),E):n(C)}function g(C){return C===45?(e.consume(C),i=2,h):C===91?(e.consume(C),i=5,o=0,m):Ve(C)?(e.consume(C),i=4,r.interrupt?t:j):n(C)}function h(C){return C===45?(e.consume(C),r.interrupt?t:j):n(C)}function m(C){const Se="CDATA[";return C===Se.charCodeAt(o++)?(e.consume(C),o===Se.length?r.interrupt?t:F:m):n(C)}function k(C){return Ve(C)?(e.consume(C),s=String.fromCharCode(C),E):n(C)}function E(C){if(C===null||C===47||C===62||pe(C)){const Se=C===47,Qe=s.toLowerCase();return!Se&&!l&&md.includes(Qe)?(i=1,r.interrupt?t(C):F(C)):p0.includes(s.toLowerCase())?(i=6,Se?(e.consume(C),x):r.interrupt?t(C):F(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):l?y(C):p(C))}return C===45||Oe(C)?(e.consume(C),s+=String.fromCharCode(C),E):n(C)}function x(C){return C===62?(e.consume(C),r.interrupt?t:F):n(C)}function y(C){return Z(C)?(e.consume(C),y):N(C)}function p(C){return C===47?(e.consume(C),N):C===58||C===95||Ve(C)?(e.consume(C),S):Z(C)?(e.consume(C),p):N(C)}function S(C){return C===45||C===46||C===58||C===95||Oe(C)?(e.consume(C),S):w(C)}function w(C){return C===61?(e.consume(C),v):Z(C)?(e.consume(C),w):p(C)}function v(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),u=C,b):Z(C)?(e.consume(C),v):P(C)}function b(C){return C===u?(e.consume(C),u=null,_):C===null||W(C)?n(C):(e.consume(C),b)}function P(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||pe(C)?w(C):(e.consume(C),P)}function _(C){return C===47||C===62||Z(C)?p(C):n(C)}function N(C){return C===62?(e.consume(C),L):n(C)}function L(C){return C===null||W(C)?F(C):Z(C)?(e.consume(C),L):n(C)}function F(C){return C===45&&i===2?(e.consume(C),oe):C===60&&i===1?(e.consume(C),H):C===62&&i===4?(e.consume(C),te):C===63&&i===3?(e.consume(C),j):C===93&&i===5?(e.consume(C),$):W(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(g0,se,Q)(C)):C===null||W(C)?(e.exit("htmlFlowData"),Q(C)):(e.consume(C),F)}function Q(C){return e.check(y0,G,se)(C)}function G(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),q}function q(C){return C===null||W(C)?Q(C):(e.enter("htmlFlowData"),F(C))}function oe(C){return C===45?(e.consume(C),j):F(C)}function H(C){return C===47?(e.consume(C),s="",R):F(C)}function R(C){if(C===62){const Se=s.toLowerCase();return md.includes(Se)?(e.consume(C),te):F(C)}return Ve(C)&&s.length<8?(e.consume(C),s+=String.fromCharCode(C),R):F(C)}function $(C){return C===93?(e.consume(C),j):F(C)}function j(C){return C===62?(e.consume(C),te):C===45&&i===2?(e.consume(C),j):F(C)}function te(C){return C===null||W(C)?(e.exit("htmlFlowData"),se(C)):(e.consume(C),te)}function se(C){return e.exit("htmlFlow"),t(C)}}function k0(e,t,n){const r=this;return i;function i(s){return W(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l):n(s)}function l(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function w0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ii,t,n)}}const j0={name:"htmlText",tokenize:S0};function S0(e,t,n){const r=this;let i,l,s;return o;function o(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),u}function u(j){return j===33?(e.consume(j),c):j===47?(e.consume(j),w):j===63?(e.consume(j),p):Ve(j)?(e.consume(j),P):n(j)}function c(j){return j===45?(e.consume(j),f):j===91?(e.consume(j),l=0,m):Ve(j)?(e.consume(j),y):n(j)}function f(j){return j===45?(e.consume(j),h):n(j)}function d(j){return j===null?n(j):j===45?(e.consume(j),g):W(j)?(s=d,H(j)):(e.consume(j),d)}function g(j){return j===45?(e.consume(j),h):d(j)}function h(j){return j===62?oe(j):j===45?g(j):d(j)}function m(j){const te="CDATA[";return j===te.charCodeAt(l++)?(e.consume(j),l===te.length?k:m):n(j)}function k(j){return j===null?n(j):j===93?(e.consume(j),E):W(j)?(s=k,H(j)):(e.consume(j),k)}function E(j){return j===93?(e.consume(j),x):k(j)}function x(j){return j===62?oe(j):j===93?(e.consume(j),x):k(j)}function y(j){return j===null||j===62?oe(j):W(j)?(s=y,H(j)):(e.consume(j),y)}function p(j){return j===null?n(j):j===63?(e.consume(j),S):W(j)?(s=p,H(j)):(e.consume(j),p)}function S(j){return j===62?oe(j):p(j)}function w(j){return Ve(j)?(e.consume(j),v):n(j)}function v(j){return j===45||Oe(j)?(e.consume(j),v):b(j)}function b(j){return W(j)?(s=b,H(j)):Z(j)?(e.consume(j),b):oe(j)}function P(j){return j===45||Oe(j)?(e.consume(j),P):j===47||j===62||pe(j)?_(j):n(j)}function _(j){return j===47?(e.consume(j),oe):j===58||j===95||Ve(j)?(e.consume(j),N):W(j)?(s=_,H(j)):Z(j)?(e.consume(j),_):oe(j)}function N(j){return j===45||j===46||j===58||j===95||Oe(j)?(e.consume(j),N):L(j)}function L(j){return j===61?(e.consume(j),F):W(j)?(s=L,H(j)):Z(j)?(e.consume(j),L):_(j)}function F(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),i=j,Q):W(j)?(s=F,H(j)):Z(j)?(e.consume(j),F):(e.consume(j),G)}function Q(j){return j===i?(e.consume(j),i=void 0,q):j===null?n(j):W(j)?(s=Q,H(j)):(e.consume(j),Q)}function G(j){return j===null||j===34||j===39||j===60||j===61||j===96?n(j):j===47||j===62||pe(j)?_(j):(e.consume(j),G)}function q(j){return j===47||j===62||pe(j)?_(j):n(j)}function oe(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),t):n(j)}function H(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),R}function R(j){return Z(j)?ie(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):$(j)}function $(j){return e.enter("htmlTextData"),s(j)}}const ku={name:"labelEnd",resolveAll:E0,resolveTo:z0,tokenize:P0},C0={tokenize:T0},N0={tokenize:I0},b0={tokenize:L0};function E0(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 i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&at(e,0,e.length,n),e}function z0(e,t){let n=e.length,r=0,i,l,s,o;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[l][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,t],["enter",c,t]],o=pt(o,e.slice(l+1,l+r+3)),o=pt(o,[["enter",f,t]]),o=pt(o,cs(t.parser.constructs.insideSpan.null,e.slice(l+r+4,s-3),t)),o=pt(o,[["exit",f,t],e[s-2],e[s-1],["exit",c,t]]),o=pt(o,e.slice(s+1)),o=pt(o,[["exit",u,t]]),at(e,l,e.length,o),e}function P0(e,t,n){const r=this;let i=r.events.length,l,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return o;function o(g){return l?l._inactive?d(g):(s=r.parser.defined.includes(zt(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),u):n(g)}function u(g){return g===40?e.attempt(C0,f,s?f:d)(g):g===91?e.attempt(N0,f,s?c:d)(g):s?f(g):d(g)}function c(g){return e.attempt(b0,f,d)(g)}function f(g){return t(g)}function d(g){return l._balanced=!0,n(g)}}function T0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return pe(d)?ni(e,l)(d):l(d)}function l(d){return d===41?f(d):Jp(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return pe(d)?ni(e,u)(d):f(d)}function o(d){return n(d)}function u(d){return d===34||d===39||d===40?em(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return pe(d)?ni(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function I0(e,t,n){const r=this;return i;function i(o){return Zp.call(r,e,l,s,"reference","referenceMarker","referenceString")(o)}function l(o){return r.parser.defined.includes(zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function L0(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const M0={name:"labelStartImage",resolveAll:ku.resolveAll,tokenize:A0};function A0(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),l}function l(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const R0={name:"labelStartLink",resolveAll:ku.resolveAll,tokenize:_0};function _0(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),l}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ws={name:"lineEnding",tokenize:D0};function D0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}const hl={name:"thematicBreak",tokenize:F0};function F0(e,t,n){let r=0,i;return l;function l(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||W(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),Z(c)?ie(e,o,"whitespace")(c):o(c))}}const Ye={continuation:{tokenize:U0},exit:H0,name:"list",tokenize:B0},O0={partial:!0,tokenize:W0},$0={partial:!0,tokenize:V0};function B0(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:io(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(hl,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return io(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ii,r.interrupt?n:f,e.attempt(O0,g,d))}function f(h){return r.containerState.initialBlankLine=!0,l++,g(h)}function d(h){return Z(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),g):n(h)}function g(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function U0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ii,i,l);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ie(e,t,"listItemIndent",r.containerState.size+1)(o)}function l(o){return r.containerState.furtherBlankLines||!Z(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($0,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Ye,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function V0(e,t,n){const r=this;return ie(e,i,"listItemIndent",r.containerState.size+1);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(l):n(l)}}function H0(e){e.exit(this.containerState.type)}function W0(e,t,n){const r=this;return ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const s=r.events[r.events.length-1];return!Z(l)&&s&&s[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const gd={name:"setextUnderline",resolveTo:q0,tokenize:Q0};function q0(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",s,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Q0(e,t,n){const r=this;let i;return l;function l(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),Z(c)?ie(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||W(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Y0={tokenize:K0};function K0(e){const t=this,n=e.attempt(Ii,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(e0,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const X0={resolveAll:nm()},G0=tm("string"),J0=tm("text");function tm(e){return{resolveAll:nm(e==="text"?Z0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,s,o);return s;function s(f){return c(f)?l(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return c(f)?(n.exit("data"),l(f)):(n.consume(f),u)}function c(f){if(f===null)return!0;const d=i[f];let g=-1;if(d)for(;++g<d.length;){const h=d[g];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function nm(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function Z0(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],i=t.sliceStream(r);let l=i.length,s=-1,o=0,u;for(;l--;){const c=i[l];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)u=!0,o++;else if(c!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const c={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?s:r.start._bufferIndex+s,_index:r.start._index+l,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const ek={42:Ye,43:Ye,45:Ye,48:Ye,49:Ye,50:Ye,51:Ye,52:Ye,53:Ye,54:Ye,55:Ye,56:Ye,57:Ye,62:Yp},tk={91:l0},nk={[-2]:Hs,[-1]:Hs,32:Hs},rk={35:d0,42:hl,45:[gd,hl],60:m0,61:gd,95:hl,96:pd,126:pd},ik={38:Xp,92:Kp},lk={[-5]:Ws,[-4]:Ws,[-3]:Ws,33:M0,38:Xp,42:lo,60:[Rv,j0],91:R0,92:[u0,Kp],93:ku,95:lo,96:Yv},sk={null:[lo,X0]},ak={null:[42,95]},ok={null:[]},uk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ak,contentInitial:tk,disable:ok,document:ek,flow:rk,flowInitial:nk,insideSpan:sk,string:ik,text:lk},Symbol.toStringTag,{value:"Module"}));function ck(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let s=[],o=[];const u={attempt:b(w),check:b(v),consume:y,enter:p,exit:S,interrupt:b(v,{interrupt:!0})},c={code:null,containerState:{},defineSkip:k,events:[],now:m,parser:e,previous:null,sliceSerialize:g,sliceStream:h,write:d};let f=t.tokenize.call(c,u);return t.resolveAll&&l.push(t),c;function d(L){return s=pt(s,L),E(),s[s.length-1]!==null?[]:(P(t,0),c.events=cs(l,c.events,c),c.events)}function g(L,F){return fk(h(L),F)}function h(L){return dk(s,L)}function m(){const{_bufferIndex:L,_index:F,line:Q,column:G,offset:q}=r;return{_bufferIndex:L,_index:F,line:Q,column:G,offset:q}}function k(L){i[L.line]=L.column,N()}function E(){let L;for(;r._index<s.length;){const F=s[r._index];if(typeof F=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<F.length;)x(F.charCodeAt(r._bufferIndex));else x(F)}}function x(L){f=f(L)}function y(L){W(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,N()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=L}function p(L,F){const Q=F||{};return Q.type=L,Q.start=m(),c.events.push(["enter",Q,c]),o.push(Q),Q}function S(L){const F=o.pop();return F.end=m(),c.events.push(["exit",F,c]),F}function w(L,F){P(L,F.from)}function v(L,F){F.restore()}function b(L,F){return Q;function Q(G,q,oe){let H,R,$,j;return Array.isArray(G)?se(G):"tokenize"in G?se([G]):te(G);function te(de){return I;function I(K){const J=K!==null&&de[K],ze=K!==null&&de.null,Jt=[...Array.isArray(J)?J:J?[J]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return se(Jt)(K)}}function se(de){return H=de,R=0,de.length===0?oe:C(de[R])}function C(de){return I;function I(K){return j=_(),$=de,de.partial||(c.currentConstruct=de),de.name&&c.parser.constructs.disable.null.includes(de.name)?Qe():de.tokenize.call(F?Object.assign(Object.create(c),F):c,u,Se,Qe)(K)}}function Se(de){return L($,j),q}function Qe(de){return j.restore(),++R<H.length?C(H[R]):oe}}}function P(L,F){L.resolveAll&&!l.includes(L)&&l.push(L),L.resolve&&at(c.events,F,c.events.length-F,L.resolve(c.events.slice(F),c)),L.resolveTo&&(c.events=L.resolveTo(c.events,c))}function _(){const L=m(),F=c.previous,Q=c.currentConstruct,G=c.events.length,q=Array.from(o);return{from:G,restore:oe};function oe(){r=L,c.previous=F,c.currentConstruct=Q,c.events.length=G,o=q,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function dk(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,l)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}l>0&&s.push(e[i].slice(0,l))}return s}function fk(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let s;if(typeof l=="string")s=l;else switch(l){case-5:{s="\r";break}case-4:{s=`
357
+ `;break}case-3:{s=`\r
358
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(l)}i=l===-2,r.push(s)}return r.join("")}function hk(e){const r={constructs:qp([uk,...(e||{}).extensions||[]]),content:i(zv),defined:[],document:i(Tv),flow:i(Y0),lazy:{},string:i(G0),text:i(J0)};return r;function i(l){return s;function s(o){return ck(r,l,o)}}}function pk(e){for(;!Gp(e););return e}const yd=/[\0\t\n\r]/g;function mk(){let e=1,t="",n=!0,r;return i;function i(l,s,o){const u=[];let c,f,d,g,h;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(s||void 0).decode(l)),d=0,t="",n&&(l.charCodeAt(0)===65279&&d++,n=void 0);d<l.length;){if(yd.lastIndex=d,c=yd.exec(l),g=c&&c.index!==void 0?c.index:l.length,h=l.charCodeAt(g),!c){t=l.slice(d);break}if(h===10&&d===g&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<g&&(u.push(l.slice(d,g)),e+=g-d),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=g+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const gk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yk(e){return e.replace(gk,xk)}function xk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Qp(n.slice(l?2:1),l?16:10)}return vu(n)||e}const rm={}.hasOwnProperty;function vk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),kk(n)(pk(hk(n).document().write(mk()(e,t,!0))))}function kk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Au),autolinkProtocol:_,autolinkEmail:_,atxHeading:l(Iu),blockQuote:l(ze),characterEscape:_,characterReference:_,codeFenced:l(Jt),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:l(Jt,s),codeText:l(ps,s),codeTextData:_,data:_,codeFlowValue:_,definition:l(Fm),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:l(Om),hardBreakEscape:l(Lu),hardBreakTrailing:l(Lu),htmlFlow:l(Mu,s),htmlFlowData:_,htmlText:l(Mu,s),htmlTextData:_,image:l($m),label:s,link:l(Au),listItem:l(Bm),listItemValue:g,listOrdered:l(Ru,d),listUnordered:l(Ru),paragraph:l(Um),reference:C,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:l(Iu),strong:l(Vm),thematicBreak:l(Wm)},exit:{atxHeading:u(),atxHeadingSequence:w,autolink:u(),autolinkEmail:J,autolinkProtocol:K,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Qe,characterReferenceMarkerNumeric:Qe,characterReferenceValue:de,characterReference:I,codeFenced:u(E),codeFencedFence:k,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:N,codeIndented:u(x),codeText:u(q),codeTextData:N,data:N,definition:u(),definitionDestinationString:S,definitionLabelString:y,definitionTitleString:p,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(Q),htmlFlowData:N,htmlText:u(G),htmlTextData:N,image:u(H),label:$,labelText:R,lineEnding:L,link:u(oe),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Se,resourceDestinationString:j,resourceTitleString:te,resource:se,setextHeading:u(P),setextHeadingLineSequence:b,setextHeadingText:v,strong:u(),thematicBreak:u()}};im(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(T){let D={type:"root",children:[]};const X={stack:[D],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:f,data:n},ne=[];let fe=-1;for(;++fe<T.length;)if(T[fe][1].type==="listOrdered"||T[fe][1].type==="listUnordered")if(T[fe][0]==="enter")ne.push(fe);else{const kt=ne.pop();fe=i(T,kt,fe)}for(fe=-1;++fe<T.length;){const kt=t[T[fe][0]];rm.call(kt,T[fe][1].type)&&kt[T[fe][1].type].call(Object.assign({sliceSerialize:T[fe][2].sliceSerialize},X),T[fe][1])}if(X.tokenStack.length>0){const kt=X.tokenStack[X.tokenStack.length-1];(kt[1]||xd).call(X,void 0,kt[0])}for(D.position={start:en(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:en(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)D=t.transforms[fe](D)||D;return D}function i(T,D,X){let ne=D-1,fe=-1,kt=!1,Cn,Ot,Pr,Tr;for(;++ne<=X;){const tt=T[ne];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?fe++:fe--,Tr=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(Cn&&!Tr&&!fe&&!Pr&&(Pr=ne),Tr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tr=void 0}if(!fe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||fe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(Cn){let Wn=ne;for(Ot=void 0;Wn--;){const $t=T[Wn];if($t[1].type==="lineEnding"||$t[1].type==="lineEndingBlank"){if($t[0]==="exit")continue;Ot&&(T[Ot][1].type="lineEndingBlank",kt=!0),$t[1].type="lineEnding",Ot=Wn}else if(!($t[1].type==="linePrefix"||$t[1].type==="blockQuotePrefix"||$t[1].type==="blockQuotePrefixWhitespace"||$t[1].type==="blockQuoteMarker"||$t[1].type==="listItemIndent"))break}Pr&&(!Ot||Pr<Ot)&&(Cn._spread=!0),Cn.end=Object.assign({},Ot?T[Ot][1].start:tt[1].end),T.splice(Ot||ne,0,["exit",Cn,tt[2]]),ne++,X++}if(tt[1].type==="listItemPrefix"){const Wn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};Cn=Wn,T.splice(ne,0,["enter",Wn,tt[2]]),ne++,X++,Pr=void 0,Tr=!0}}}return T[D][1]._spread=kt,X}function l(T,D){return X;function X(ne){o.call(this,T(ne),ne),D&&D.call(this,ne)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(T,D,X){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([D,X||void 0]),T.position={start:en(D.start),end:void 0}}function u(T){return D;function D(X){T&&T.call(this,X),c.call(this,X)}}function c(T,D){const X=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==T.type&&(D?D.call(this,T,ne[0]):(ne[1]||xd).call(this,T,ne[0]));else throw new Error("Cannot close `"+T.type+"` ("+ti({start:T.start,end:T.end})+"): it’s not open");X.position.end=en(T.end)}function f(){return xu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function g(T){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function h(){const T=this.resume(),D=this.stack[this.stack.length-1];D.lang=T}function m(){const T=this.resume(),D=this.stack[this.stack.length-1];D.meta=T}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T.replace(/(\r?\n|\r)$/g,"")}function y(T){const D=this.resume(),X=this.stack[this.stack.length-1];X.label=D,X.identifier=zt(this.sliceSerialize(T)).toLowerCase()}function p(){const T=this.resume(),D=this.stack[this.stack.length-1];D.title=T}function S(){const T=this.resume(),D=this.stack[this.stack.length-1];D.url=T}function w(T){const D=this.stack[this.stack.length-1];if(!D.depth){const X=this.sliceSerialize(T).length;D.depth=X}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function b(T){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function _(T){const X=this.stack[this.stack.length-1].children;let ne=X[X.length-1];(!ne||ne.type!=="text")&&(ne=Hm(),ne.position={start:en(T.start),end:void 0},X.push(ne)),this.stack.push(ne)}function N(T){const D=this.stack.pop();D.value+=this.sliceSerialize(T),D.position.end=en(T.end)}function L(T){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=D.children[D.children.length-1];X.position.end=en(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(D.type)&&(_.call(this,T),N.call(this,T))}function F(){this.data.atHardBreak=!0}function Q(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T}function G(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T}function q(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T}function oe(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=D,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function H(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=D,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function R(T){const D=this.sliceSerialize(T),X=this.stack[this.stack.length-2];X.label=yk(D),X.identifier=zt(D).toLowerCase()}function $(){const T=this.stack[this.stack.length-1],D=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const ne=T.children;X.children=ne}else X.alt=D}function j(){const T=this.resume(),D=this.stack[this.stack.length-1];D.url=T}function te(){const T=this.resume(),D=this.stack[this.stack.length-1];D.title=T}function se(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function Se(T){const D=this.resume(),X=this.stack[this.stack.length-1];X.label=D,X.identifier=zt(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function Qe(T){this.data.characterReferenceType=T.type}function de(T){const D=this.sliceSerialize(T),X=this.data.characterReferenceType;let ne;X?(ne=Qp(D,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=vu(D);const fe=this.stack[this.stack.length-1];fe.value+=ne}function I(T){const D=this.stack.pop();D.position.end=en(T.end)}function K(T){N.call(this,T);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(T)}function J(T){N.call(this,T);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(T)}function ze(){return{type:"blockquote",children:[]}}function Jt(){return{type:"code",lang:null,meta:null,value:""}}function ps(){return{type:"inlineCode",value:""}}function Fm(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Om(){return{type:"emphasis",children:[]}}function Iu(){return{type:"heading",depth:0,children:[]}}function Lu(){return{type:"break"}}function Mu(){return{type:"html",value:""}}function $m(){return{type:"image",title:null,url:"",alt:null}}function Au(){return{type:"link",title:null,url:"",children:[]}}function Ru(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Bm(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Um(){return{type:"paragraph",children:[]}}function Vm(){return{type:"strong",children:[]}}function Hm(){return{type:"text",value:""}}function Wm(){return{type:"thematicBreak"}}}function en(e){return{line:e.line,column:e.column,offset:e.offset}}function im(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?im(e,r):wk(e,r)}}function wk(e,t){let n;for(n in t)if(rm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function xd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ti({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ti({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ti({start:t.start,end:t.end})+") is still open")}function jk(e){const t=this;t.parser=n;function n(r){return vk(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Sk(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 Ck(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
359
+ `}]}function Nk(e,t){const n=t.value?t.value+`
360
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function bk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ek(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=zr(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=l+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function Pk(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 Tk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function lm(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 i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Ik(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lm(e,t);const i={src:zr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function Lk(e,t){const n={src:zr(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 Mk(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 Ak(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lm(e,t);const i={href:zr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Rk(e,t){const n={href:zr(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 _k(e,t,n){const r=e.all(t),i=n?Dk(n):sm(t),l={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const f=r[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
361
+ `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
362
+ `});const c={type:"element",tagName:"li",properties:l,children:s};return e.patch(t,c),e.applyData(t,c)}function Dk(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=sm(n[r])}return t}function sm(e){const t=e.spread;return t??e.children.length>1}function Fk(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function Ok(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $k(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Bk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Uk(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=pu(t.children[1]),u=Op(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Vk(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<o;){const d=t.children[u],g={},h=s?s[u]:void 0;h&&(g.align=h);let m={type:"element",tagName:l,properties:g,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),c.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function Hk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const vd=9,kd=32;function Wk(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(wd(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(wd(t.slice(i),i>0,!1)),l.join("")}function wd(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===vd||l===kd;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===vd||l===kd;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function qk(e,t){const n={type:"text",value:Wk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Qk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Yk={blockquote:Sk,break:Ck,code:Nk,delete:bk,emphasis:Ek,footnoteReference:zk,heading:Pk,html:Tk,imageReference:Ik,image:Lk,inlineCode:Mk,linkReference:Ak,link:Rk,listItem:_k,list:Fk,paragraph:Ok,root:$k,strong:Bk,table:Uk,tableCell:Hk,tableRow:Vk,text:qk,thematicBreak:Qk,toml:Xi,yaml:Xi,definition:Xi,footnoteDefinition:Xi};function Xi(){}const am=-1,ds=0,ri=1,Vl=2,wu=3,ju=4,Su=5,Cu=6,om=7,um=8,Kk=typeof self=="object"?self:globalThis,jd=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Kk[e](t)},Xk=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,s]=t[i];switch(l){case ds:case am:return n(s,i);case ri:{const o=n([],i);for(const u of s)o.push(r(u));return o}case Vl:{const o=n({},i);for(const[u,c]of s)o[r(u)]=r(c);return o}case wu:return n(new Date(s),i);case ju:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Su:{const o=n(new Map,i);for(const[u,c]of s)o.set(r(u),r(c));return o}case Cu:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case om:{const{name:o,message:u}=s;return n(jd(o,u),i)}case um:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(jd(l,s),i)};return r},Sd=e=>Xk(new Map,e)(0),Qn="",{toString:Gk}={},{keys:Jk}=Object,$r=e=>{const t=typeof e;if(t!=="object"||!e)return[ds,t];const n=Gk.call(e).slice(8,-1);switch(n){case"Array":return[ri,Qn];case"Object":return[Vl,Qn];case"Date":return[wu,Qn];case"RegExp":return[ju,Qn];case"Map":return[Su,Qn];case"Set":return[Cu,Qn];case"DataView":return[ri,n]}return n.includes("Array")?[ri,n]:n.includes("Error")?[om,n]:[Vl,n]},Gi=([e,t])=>e===ds&&(t==="function"||t==="symbol"),Zk=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},l=s=>{if(n.has(s))return n.get(s);let[o,u]=$r(s);switch(o){case ds:{let f=s;switch(u){case"bigint":o=um,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([am],s)}return i([o,f],s)}case ri:{if(u){let g=s;return u==="DataView"?g=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(g=new Uint8Array(s)),i([u,[...g]],s)}const f=[],d=i([o,f],s);for(const g of s)f.push(l(g));return d}case Vl:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return l(s.toJSON());const f=[],d=i([o,f],s);for(const g of Jk(s))(e||!Gi($r(s[g])))&&f.push([l(g),l(s[g])]);return d}case wu:return i([o,s.toISOString()],s);case ju:{const{source:f,flags:d}=s;return i([o,{source:f,flags:d}],s)}case Su:{const f=[],d=i([o,f],s);for(const[g,h]of s)(e||!(Gi($r(g))||Gi($r(h))))&&f.push([l(g),l(h)]);return d}case Cu:{const f=[],d=i([o,f],s);for(const g of s)(e||!Gi($r(g)))&&f.push(l(g));return d}}const{message:c}=s;return i([o,{name:u,message:c}],s)};return l},Cd=(e,{json:t,lossy:n}={})=>{const r=[];return Zk(!(t||n),!!t,new Map,r)(e),r},Hl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Sd(Cd(e,t)):structuredClone(e):(e,t)=>Sd(Cd(e,t));function ew(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 tw(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function nw(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ew,r=e.options.footnoteBackLabel||tw,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),g=zr(d.toLowerCase());let h=0;const m=[],k=e.footnoteCounts.get(d);for(;k!==void 0&&++h<=k;){m.length>0&&m.push({type:"text",value:" "});let y=typeof n=="string"?n:n(u,h);typeof y=="string"&&(y={type:"text",value:y}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const E=f[f.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const y=E.children[E.children.length-1];y&&y.type==="text"?y.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...m)}else f.push(...m);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(f,!0)};e.patch(c,x),o.push(x)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Hl(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
363
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
364
+ `}]}}const fs=function(e){if(e==null)return sw;if(typeof e=="function")return hs(e);if(typeof e=="object")return Array.isArray(e)?rw(e):iw(e);if(typeof e=="string")return lw(e);throw new Error("Expected function, string, or object as test")};function rw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fs(e[n]);return hs(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function iw(e){const t=e;return hs(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function lw(e){return hs(t);function t(n){return n&&n.type===e}}function hs(e){return t;function t(n,r,i){return!!(aw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function sw(){return!0}function aw(e){return e!==null&&typeof e=="object"&&"type"in e}const cm=[],ow=!0,so=!1,uw="skip";function dm(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=fs(i),s=r?-1:1;o(e,void 0,[])();function o(u,c,f){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return g;function g(){let h=cm,m,k,E;if((!t||l(u,c,f[f.length-1]||void 0))&&(h=cw(n(u,f)),h[0]===so))return h;if("children"in u&&u.children){const x=u;if(x.children&&h[0]!==uw)for(k=(r?x.children.length:-1)+s,E=f.concat(x);k>-1&&k<x.children.length;){const y=x.children[k];if(m=o(y,k,E)(),m[0]===so)return m;k=typeof m[1]=="number"?m[1]:k+s}}return h}}}function cw(e){return Array.isArray(e)?e:typeof e=="number"?[ow,e]:e==null?cm:[e]}function Nu(e,t,n,r){let i,l,s;typeof t=="function"&&typeof n!="function"?(l=void 0,s=t,i=n):(l=t,s=n,i=r),dm(e,l,o,i);function o(u,c){const f=c[c.length-1],d=f?f.children.indexOf(u):void 0;return s(u,d,f)}}const ao={}.hasOwnProperty,dw={};function fw(e,t){const n=t||dw,r=new Map,i=new Map,l=new Map,s={...Yk,...n.handlers},o={all:c,applyData:pw,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:s,one:u,options:n,patch:hw,wrap:gw};return Nu(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,g=String(f.identifier).toUpperCase();d.has(g)||d.set(g,f)}}),o;function u(f,d){const g=f.type,h=o.handlers[g];if(ao.call(o.handlers,g)&&h)return h(o,f,d);if(o.options.passThrough&&o.options.passThrough.includes(g)){if("children"in f){const{children:k,...E}=f,x=Hl(E);return x.children=o.all(f),x}return Hl(f)}return(o.options.unknownHandler||mw)(o,f,d)}function c(f){const d=[];if("children"in f){const g=f.children;let h=-1;for(;++h<g.length;){const m=o.one(g[h],f);if(m){if(h&&g[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Nd(m.value)),!Array.isArray(m)&&m.type==="element")){const k=m.children[0];k&&k.type==="text"&&(k.value=Nd(k.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function hw(e,t){e.position&&(t.position=ev(e))}function pw(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&l&&Object.assign(n.properties,Hl(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function mw(e,t){const n=t.data||{},r="value"in t&&!(ao.call(n,"hProperties")||ao.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 gw(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
365
+ `});++r<e.length;)r&&n.push({type:"text",value:`
366
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
367
+ `}),n}function Nd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bd(e,t){const n=fw(e,t),r=n.one(e,void 0),i=nw(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
368
+ `},i),l}function yw(e,t){return e&&"run"in e?async function(n,r){const i=bd(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bd(n,{file:r,...e||t})}}function Ed(e){if(e)throw e}var pl=Object.prototype.hasOwnProperty,fm=Object.prototype.toString,zd=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,Td=function(t){return typeof Array.isArray=="function"?Array.isArray(t):fm.call(t)==="[object Array]"},Id=function(t){if(!t||fm.call(t)!=="[object Object]")return!1;var n=pl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&pl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||pl.call(t,i)},Ld=function(t,n){zd&&n.name==="__proto__"?zd(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Md=function(t,n){if(n==="__proto__")if(pl.call(t,n)){if(Pd)return Pd(t,n).value}else return;return t[n]},xw=function e(){var t,n,r,i,l,s,o=arguments[0],u=1,c=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},u=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=Md(o,n),i=Md(t,n),o!==i&&(f&&i&&(Id(i)||(l=Td(i)))?(l?(l=!1,s=r&&Td(r)?r:[]):s=r&&Id(r)?r:{},Ld(o,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&Ld(o,{name:n,newValue:i}));return o};const qs=Yd(xw);function oo(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 vw(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...c){const f=e[++l];let d=-1;if(u){s(u);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?kw(f,o)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function kw(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(c){const f=c;if(o&&n)throw f;return i(f)}o||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(s,...o){n||(n=!0,t(s,...o))}function l(s){i(null,s)}}const Lt={basename:ww,dirname:jw,extname:Sw,join:Cw,sep:"/"};function ww(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Li(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else s<0&&(l=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function jw(e){if(Li(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 Sw(e){Li(e);let t=e.length,n=-1,r=0,i=-1,l=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Cw(...e){let t=-1,n;for(;++t<e.length;)Li(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Nw(n)}function Nw(e){Li(e);const t=e.codePointAt(0)===47;let n=bw(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bw(e,t){let n="",r=0,i=-1,l=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||l===1))if(i!==s-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,l=0;continue}}else if(n.length>0){n="",r=0,i=s,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,l=0}else o===46&&l>-1?l++:l=-1}return n}function Li(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ew={cwd:zw};function zw(){return"/"}function uo(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Pw(e){if(typeof e=="string")e=new URL(e);else if(!uo(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 Tw(e)}function Tw(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Qs=["history","path","basename","stem","extname","dirname"];class hm{constructor(t){let n;t?uo(t)?n={path:t}:typeof t=="string"||Iw(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Ew.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Qs.length;){const l=Qs[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Qs.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Lt.basename(this.path):void 0}set basename(t){Ks(t,"basename"),Ys(t,"basename"),this.path=Lt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lt.dirname(this.path):void 0}set dirname(t){Ad(this.basename,"dirname"),this.path=Lt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lt.extname(this.path):void 0}set extname(t){if(Ys(t,"extname"),Ad(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=Lt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){uo(t)&&(t=Pw(t)),Ks(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lt.basename(this.path,this.extname):void 0}set stem(t){Ks(t,"stem"),Ys(t,"stem"),this.path=Lt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Be(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ys(e,t){if(e&&e.includes(Lt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lt.sep+"`")}function Ks(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ad(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Iw(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lw=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},Mw={}.hasOwnProperty;class bu extends Lw{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=vw()}copy(){const t=new bu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(qs(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Js("data",this.frozen),this.namespace[t]=n,this):Mw.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Js("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 i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ji(t),r=this.parser||this.Parser;return Xs("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Xs("process",this.parser||this.Parser),Gs("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,s){const o=Ji(t),u=r.parse(o);r.run(u,o,function(f,d,g){if(f||!d||!g)return c(f);const h=d,m=r.stringify(h,g);_w(m)?g.value=m:g.result=m,c(f,g)});function c(f,d){f||!d?s(f):l?l(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Xs("processSync",this.parser||this.Parser),Gs("processSync",this.compiler||this.Compiler),this.process(t,i),_d("processSync","process",n),r;function i(l,s){n=!0,Ed(l),r=s}}run(t,n,r){Rd(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(s,o){const u=Ji(n);i.run(t,u,c);function c(f,d,g){const h=d||t;f?o(f):s?s(h):r(void 0,h,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),_d("runSync","run",r),i;function l(s,o){Ed(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=Ji(n),i=this.compiler||this.Compiler;return Gs("stringify",i),Rd(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Js("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;u(f,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");o(c.plugins),c.settings&&(i.settings=qs(!0,i.settings,c.settings))}function o(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];l(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,f){let d=-1,g=-1;for(;++d<r.length;)if(r[d][0]===c){g=d;break}if(g===-1)r.push([c,...f]);else if(f.length>0){let[h,...m]=f;const k=r[g][1];oo(k)&&oo(h)&&(h=qs(!0,k,h)),r[g]=[c,h,...m]}}}}const Aw=new bu().freeze();function Xs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Gs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Js(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 Rd(e){if(!oo(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 Ji(e){return Rw(e)?e:new hm(e)}function Rw(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _w(e){return typeof e=="string"||Dw(e)}function Dw(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Fw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Dd=[],Fd={allowDangerousHtml:!0},Ow=/^(https?|ircs?|mailto|xmpp)$/i,$w=[{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:"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 Bw(e){const t=Uw(e),n=Vw(e);return Hw(t.runSync(t.parse(n),n),e)}function Uw(e){const t=e.rehypePlugins||Dd,n=e.remarkPlugins||Dd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fd}:Fd;return Aw().use(jk).use(n).use(yw,r).use(t)}function Vw(e){const t=e.children||"",n=new hm;return typeof t=="string"&&(n.value=t),n}function Hw(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,u=t.urlTransform||Ww;for(const f of $w)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Fw+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Nu(e,c),lv(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function c(f,d,g){if(f.type==="raw"&&g&&typeof d=="number")return s?g.children.splice(d,1):g.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let h;for(h in Vs)if(Object.hasOwn(Vs,h)&&Object.hasOwn(f.properties,h)){const m=f.properties[h],k=Vs[h];(k===null||k.includes(f.tagName))&&(f.properties[h]=u(String(m||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(f,d,g)),h&&g&&typeof d=="number")return o&&f.children?g.children.splice(d,1,...f.children):g.children.splice(d,1),d}}}function Ww(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ow.test(e.slice(0,t))?e:""}function Od(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function qw(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Qw(e,t,n){const i=fs((n||{}).ignore||[]),l=Yw(t);let s=-1;for(;++s<l.length;)dm(e,"text",o);function o(c,f){let d=-1,g;for(;++d<f.length;){const h=f[d],m=g?g.children:void 0;if(i(h,m?m.indexOf(h):void 0,g))return;g=h}if(g)return u(c,f)}function u(c,f){const d=f[f.length-1],g=l[s][0],h=l[s][1];let m=0;const E=d.children.indexOf(c);let x=!1,y=[];g.lastIndex=0;let p=g.exec(c.value);for(;p;){const S=p.index,w={index:p.index,input:p.input,stack:[...f,c]};let v=h(...p,w);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?g.lastIndex=S+1:(m!==S&&y.push({type:"text",value:c.value.slice(m,S)}),Array.isArray(v)?y.push(...v):v&&y.push(v),m=S+p[0].length,x=!0),!g.global)break;p=g.exec(c.value)}return x?(m<c.value.length&&y.push({type:"text",value:c.value.slice(m)}),d.children.splice(E,1,...y)):y=[c],E+y.length}}function Yw(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 i=n[r];t.push([Kw(i[0]),Xw(i[1])])}return t}function Kw(e){return typeof e=="string"?new RegExp(qw(e),"g"):e}function Xw(e){return typeof e=="function"?e:function(){return e}}const Zs="phrasing",ea=["autolink","link","image","label"];function Gw(){return{transforms:[ij],enter:{literalAutolink:Zw,literalAutolinkEmail:ta,literalAutolinkHttp:ta,literalAutolinkWww:ta},exit:{literalAutolink:rj,literalAutolinkEmail:nj,literalAutolinkHttp:ej,literalAutolinkWww:tj}}}function Jw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zs,notInConstruct:ea},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zs,notInConstruct:ea},{character:":",before:"[ps]",after:"\\/",inConstruct:Zs,notInConstruct:ea}]}}function Zw(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ta(e){this.config.enter.autolinkProtocol.call(this,e)}function ej(e){this.config.exit.autolinkProtocol.call(this,e)}function tj(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 nj(e){this.config.exit.autolinkEmail.call(this,e)}function rj(e){this.exit(e)}function ij(e){Qw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,lj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),sj]],{ignore:["link","linkReference"]})}function lj(e,t,n,r,i){let l="";if(!pm(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!aj(n)))return!1;const s=oj(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:l+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function sj(e,t,n,r){return!pm(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function aj(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 oj(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 i=Od(e,"(");let l=Od(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function pm(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||$n(n)||us(n))&&(!t||n!==47)}mm.peek=yj;function uj(){this.buffer()}function cj(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dj(){this.buffer()}function fj(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pj(e){this.exit(e)}function mj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gj(e){this.exit(e)}function yj(){return"["}function mm(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),o(),s(),l+=i.move("]"),l}function xj(){return{enter:{gfmFootnoteCallString:uj,gfmFootnoteCall:cj,gfmFootnoteDefinitionLabelString:dj,gfmFootnoteDefinition:fj},exit:{gfmFootnoteCallString:hj,gfmFootnoteCall:pj,gfmFootnoteDefinitionLabelString:mj,gfmFootnoteDefinition:gj}}}function vj(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:mm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,s){const o=l.createTracker(s);let u=o.move("[^");const c=l.enter("footnoteDefinition"),f=l.enter("label");return u+=o.move(l.safe(l.associationId(r),{before:u,after:"]"})),f(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
369
+ `:" ")+l.indentLines(l.containerFlow(r,o.current()),t?gm:kj))),c(),u}}function kj(e,t,n){return t===0?e:gm(e,t,n)}function gm(e,t,n){return(n?"":" ")+e}const wj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ym.peek=bj;function jj(){return{canContainEols:["delete"],enter:{strikethrough:Cj},exit:{strikethrough:Nj}}}function Sj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wj}],handlers:{delete:ym}}}function Cj(e){this.enter({type:"delete",children:[]},e)}function Nj(e){this.exit(e)}function ym(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),l(),s}function bj(){return"~"}function Ej(e){return e.length}function zj(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ej,l=[],s=[],o=[],u=[];let c=0,f=-1;for(;++f<e.length;){const k=[],E=[];let x=-1;for(e[f].length>c&&(c=e[f].length);++x<e[f].length;){const y=Pj(e[f][x]);if(n.alignDelimiters!==!1){const p=i(y);E[x]=p,(u[x]===void 0||p>u[x])&&(u[x]=p)}k.push(y)}s[f]=k,o[f]=E}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)l[d]=$d(r[d]);else{const k=$d(r);for(;++d<c;)l[d]=k}d=-1;const g=[],h=[];for(;++d<c;){const k=l[d];let E="",x="";k===99?(E=":",x=":"):k===108?E=":":k===114&&(x=":");let y=n.alignDelimiters===!1?1:Math.max(1,u[d]-E.length-x.length);const p=E+"-".repeat(y)+x;n.alignDelimiters!==!1&&(y=E.length+y+x.length,y>u[d]&&(u[d]=y),h[d]=y),g[d]=p}s.splice(1,0,g),o.splice(1,0,h),f=-1;const m=[];for(;++f<s.length;){const k=s[f],E=o[f];d=-1;const x=[];for(;++d<c;){const y=k[d]||"";let p="",S="";if(n.alignDelimiters!==!1){const w=u[d]-(E[d]||0),v=l[d];v===114?p=" ".repeat(w):v===99?w%2?(p=" ".repeat(w/2+.5),S=" ".repeat(w/2-.5)):(p=" ".repeat(w/2),S=p):S=" ".repeat(w)}n.delimiterStart!==!1&&!d&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||d)&&x.push(" "),n.alignDelimiters!==!1&&x.push(p),x.push(y),n.alignDelimiters!==!1&&x.push(S),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&x.push("|")}m.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return m.join(`
370
+ `)}function Pj(e){return e==null?"":String(e)}function $d(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 Tj(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const s=n.indentLines(n.containerFlow(e,l.current()),Ij);return i(),s}function Ij(e,t,n){return">"+(n?"":" ")+e}function Lj(e,t){return Bd(e,t.inConstruct,!0)&&!Bd(e,t.notInConstruct,!1)}function Bd(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 Ud(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
371
+ `&&Lj(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
372
+ `}function Mj(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>s&&(s=l):l=1,i=r+t.length,r=n.indexOf(t,i);return s}function Aj(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 Rj(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 _j(e,t,n,r){const i=Rj(n),l=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Aj(e,n)){const d=n.enter("codeIndented"),g=n.indentLines(l,Dj);return d(),g}const o=n.createTracker(r),u=i.repeat(Math.max(Mj(l,i)+1,3)),c=n.enter("codeFenced");let f=o.move(u);if(e.lang){const d=n.enter(`codeFencedLang${s}`);f+=o.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);f+=o.move(" "),f+=o.move(n.safe(e.meta,{before:f,after:`
373
+ `,encode:["`"],...o.current()})),d()}return f+=o.move(`
374
+ `),l&&(f+=o.move(l+`
375
+ `)),f+=o.move(u),c(),f}function Dj(e,t,n){return(n?"":" ")+e}function Eu(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 Fj(e,t,n,r){const i=Eu(n),l=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
376
+ `,...u.current()}))),o(),e.title&&(o=n.enter(`title${l}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),s(),c}function Oj(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 Si(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Wl(e,t,n){const r=Sr(e),i=Sr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}xm.peek=$j;function xm(e,t,n,r){const i=Oj(n),l=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const c=u.charCodeAt(0),f=Wl(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=Si(c)+u.slice(1));const d=u.charCodeAt(u.length-1),g=Wl(r.after.charCodeAt(0),d,i);g.inside&&(u=u.slice(0,-1)+Si(d));const h=s.move(i);return l(),n.attentionEncodeSurroundingInfo={after:g.outside,before:f.outside},o+u+h}function $j(e,t,n){return n.options.emphasis||"*"}function Bj(e,t){let n=!1;return Nu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,so}),!!((!e.depth||e.depth<3)&&xu(e)&&(t.options.setext||n))}function Uj(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(Bj(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),g=n.containerPhrasing(e,{...l.current(),before:`
377
+ `,after:`
378
+ `});return d(),f(),g+`
379
+ `+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
380
+ `))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");l.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
381
+ `,...l.current()});return/^[\t ]/.test(c)&&(c=Si(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),o(),c}vm.peek=Vj;function vm(e){return e.value||""}function Vj(){return"<"}km.peek=Hj;function km(e,t,n,r){const i=Eu(n),l=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${l}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),c+=u.move(")"),s(),c}function Hj(){return"!"}wm.peek=Wj;function wm(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const c=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=f,l(),i==="full"||!c||c!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function Wj(){return"!"}jm.peek=qj;function jm(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const s=n.unsafe[l],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function qj(){return"`"}function Sm(e,t){const n=xu(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))}Cm.peek=Qj;function Cm(e,t,n,r){const i=Eu(n),l=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(Sm(e,n)){const f=n.stack;n.stack=[],o=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),o(),n.stack=f,d}o=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${l}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),o(),c}function Qj(e,t,n){return Sm(e,n)?"<":"["}Nm.peek=Yj;function Nm(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=f,l(),i==="full"||!c||c!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function Yj(){return"["}function zu(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 Kj(e){const t=zu(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 Xj(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 bm(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 Gj(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let s=e.ordered?Xj(n):zu(n);const o=e.ordered?s==="."?")":".":Kj(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.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&&(u=!0),bm(n)===s&&f){let d=-1;for(;++d<e.children.length;){const g=e.children[d];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=l,i(),c}function Jj(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 Zj(e,t,n,r){const i=Jj(n);let l=n.bulletCurrent||zu(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let s=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(l+" ".repeat(s-l.length)),o.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),f);return u(),c;function f(d,g,h){return g?(h?"":" ".repeat(s))+d:(h?l:l+" ".repeat(s-l.length))+d}}function e2(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),s=n.containerPhrasing(e,r);return l(),i(),s}const t2=fs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function n2(e,t,n,r){return(e.children.some(function(s){return t2(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function r2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Em.peek=i2;function Em(e,t,n,r){const i=r2(n),l=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const c=u.charCodeAt(0),f=Wl(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=Si(c)+u.slice(1));const d=u.charCodeAt(u.length-1),g=Wl(r.after.charCodeAt(0),d,i);g.inside&&(u=u.slice(0,-1)+Si(d));const h=s.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:g.outside,before:f.outside},o+u+h}function i2(e,t,n){return n.options.strong||"*"}function l2(e,t,n,r){return n.safe(e.value,r)}function s2(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 a2(e,t,n){const r=(bm(n)+(n.options.ruleSpaces?" ":"")).repeat(s2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const zm={blockquote:Tj,break:Ud,code:_j,definition:Fj,emphasis:xm,hardBreak:Ud,heading:Uj,html:vm,image:km,imageReference:wm,inlineCode:jm,link:Cm,linkReference:Nm,list:Gj,listItem:Zj,paragraph:e2,root:n2,strong:Em,text:l2,thematicBreak:a2};function o2(){return{enter:{table:u2,tableData:Vd,tableHeader:Vd,tableRow:d2},exit:{codeText:f2,table:c2,tableData:na,tableHeader:na,tableRow:na}}}function u2(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 c2(e){this.exit(e),this.data.inTable=void 0}function d2(e){this.enter({type:"tableRow",children:[]},e)}function na(e){this.exit(e)}function Vd(e){this.enter({type:"tableCell",children:[]},e)}function f2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,h2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function h2(e,t){return t==="|"?t:e}function p2(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
382
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:s,tableCell:u,tableRow:o}};function s(h,m,k,E){return c(f(h,k,E),h.align)}function o(h,m,k,E){const x=d(h,k,E),y=c([x]);return y.slice(0,y.indexOf(`
383
+ `))}function u(h,m,k,E){const x=k.enter("tableCell"),y=k.enter("phrasing"),p=k.containerPhrasing(h,{...E,before:l,after:l});return y(),x(),p}function c(h,m){return zj(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(h,m,k){const E=h.children;let x=-1;const y=[],p=m.enter("table");for(;++x<E.length;)y[x]=d(E[x],m,k);return p(),y}function d(h,m,k){const E=h.children;let x=-1;const y=[],p=m.enter("tableRow");for(;++x<E.length;)y[x]=u(E[x],h,m,k);return p(),y}function g(h,m,k){let E=zm.inlineCode(h,m,k);return k.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function m2(){return{exit:{taskListCheckValueChecked:Hd,taskListCheckValueUnchecked:Hd,paragraph:y2}}}function g2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:x2}}}function Hd(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function y2(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 i=t.children;let l=-1,s;for(;++l<i.length;){const o=i[l];if(o.type==="paragraph"){s=o;break}}s===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 x2(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);l&&o.move(s);let u=zm.listItem(e,t,n,{...r,...o.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(f){return f+s}}function v2(){return[Gw(),xj(),jj(),o2(),m2()]}function k2(e){return{extensions:[Jw(),vj(e),Sj(),p2(e),g2()]}}const w2={tokenize:E2,partial:!0},Pm={tokenize:z2,partial:!0},Tm={tokenize:P2,partial:!0},Im={tokenize:T2,partial:!0},j2={tokenize:I2,partial:!0},Lm={name:"wwwAutolink",tokenize:N2,previous:Am},Mm={name:"protocolAutolink",tokenize:b2,previous:Rm},Gt={name:"emailAutolink",tokenize:C2,previous:_m},Ft={};function S2(){return{text:Ft}}let Nn=48;for(;Nn<123;)Ft[Nn]=Gt,Nn++,Nn===58?Nn=65:Nn===91&&(Nn=97);Ft[43]=Gt;Ft[45]=Gt;Ft[46]=Gt;Ft[95]=Gt;Ft[72]=[Gt,Mm];Ft[104]=[Gt,Mm];Ft[87]=[Gt,Lm];Ft[119]=[Gt,Lm];function C2(e,t,n){const r=this;let i,l;return s;function s(d){return!co(d)||!_m.call(r,r.previous)||Pu(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return co(d)?(e.consume(d),o):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(j2,f,c)(d):d===45||d===95||Oe(d)?(l=!0,e.consume(d),u):f(d)}function c(d){return e.consume(d),i=!0,u}function f(d){return l&&i&&Ve(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function N2(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Am.call(r,r.previous)||Pu(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(w2,e.attempt(Pm,e.attempt(Tm,l),n),n)(s))}function l(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function b2(e,t,n){const r=this;let i="",l=!1;return s;function s(d){return(d===72||d===104)&&Rm.call(r,r.previous)&&!Pu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(Ve(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),l?c:(l=!0,u)):n(d)}function c(d){return d===null||Ul(d)||pe(d)||$n(d)||us(d)?n(d):e.attempt(Pm,e.attempt(Tm,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function E2(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),l):n(s)}function l(s){return s===null?n(s):t(s)}}function z2(e,t,n){let r,i,l;return s;function s(c){return c===46||c===95?e.check(Im,u,o)(c):c===null||pe(c)||$n(c)||c!==45&&us(c)?u(c):(l=!0,e.consume(c),s)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!l?n(c):t(c)}}function P2(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?l(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Im,t,l)(s):s===null||pe(s)||$n(s)?t(s):(e.consume(s),i)}function l(s){return s===41&&r++,e.consume(s),i}}function T2(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),l):o===93?(e.consume(o),i):o===60||o===null||pe(o)||$n(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||pe(o)||$n(o)?t(o):r(o)}function l(o){return Ve(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Ve(o)?(e.consume(o),s):n(o)}}function I2(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Oe(l)?n(l):t(l)}}function Am(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pe(e)}function Rm(e){return!Ve(e)}function _m(e){return!(e===47||co(e))}function co(e){return e===43||e===45||e===46||e===95||Oe(e)}function Pu(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 L2={tokenize:$2,partial:!0};function M2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:D2,continuation:{tokenize:F2},exit:O2}},text:{91:{name:"gfmFootnoteCall",tokenize:_2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:A2,resolveTo:R2}}}}function A2(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const c=zt(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!l.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function R2(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)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",s,t],["exit",s,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function _2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,s;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(l>999||d===93&&!s||d===null||d===91||pe(d))return n(d);if(d===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes(zt(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return pe(d)||(s=!0),l++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),l++,c):c(d)}}function D2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,s=0,o;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(s>999||m===93&&!o||m===null||m===91||pe(m))return n(m);if(m===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=zt(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return pe(m)||(o=!0),s++,e.consume(m),m===92?d:f}function d(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}function g(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(l)||i.push(l),ie(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function F2(e,t,n){return e.check(Ii,t,e.attempt(L2,t,n))}function O2(e){e.exit("gfmFootnoteDefinition")}function $2(e,t,n){const r=this;return ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(l):n(l)}}function B2(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},g=[["enter",f,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",d,o]],h=o.parser.constructs.insideSpan.null;h&&at(g,g.length,0,cs(h,s.slice(c+1,u),o)),at(g,g.length,0,[["exit",d,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",f,o]]),at(s,c-1,u-c+3,g),u=c+g.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function l(s,o,u){const c=this.previous,f=this.events;let d=0;return g;function g(m){return c===126&&f[f.length-1][1].type!=="characterEscape"?u(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const k=Sr(c);if(m===126)return d>1?u(m):(s.consume(m),d++,h);if(d<2&&!n)return u(m);const E=s.exit("strikethroughSequenceTemporary"),x=Sr(m);return E._open=!x||x===2&&!!k,E._close=!k||k===2&&!!x,o(m)}}}class U2{constructor(){this.map=[]}add(t,n,r){V2(this,t,n,r)}consume(t){if(this.map.sort(function(l,s){return l[0]-s[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 i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function V2(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function H2(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function W2(){return{flow:{null:{name:"table",tokenize:q2,resolveAll:Q2}}}}function q2(e,t,n){const r=this;let i=0,l=0,s;return o;function o(N){let L=r.events.length-1;for(;L>-1;){const G=r.events[L][1].type;if(G==="lineEnding"||G==="linePrefix")L--;else break}const F=L>-1?r.events[L][1].type:null,Q=F==="tableHead"||F==="tableRow"?v:u;return Q===v&&r.parser.lazy[r.now().line]?n(N):Q(N)}function u(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(s=!0,l+=1),f(N)}function f(N){return N===null?n(N):W(N)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),h):n(N):Z(N)?ie(e,f,"whitespace")(N):(l+=1,s&&(s=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(N)))}function d(N){return N===null||N===124||pe(N)?(e.exit("data"),f(N)):(e.consume(N),N===92?g:d)}function g(N){return N===92||N===124?(e.consume(N),d):d(N)}function h(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),s=!1,Z(N)?ie(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):m(N))}function m(N){return N===45||N===58?E(N):N===124?(s=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),k):w(N)}function k(N){return Z(N)?ie(e,E,"whitespace")(N):E(N)}function E(N){return N===58?(l+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),x):N===45?(l+=1,x(N)):N===null||W(N)?S(N):w(N)}function x(N){return N===45?(e.enter("tableDelimiterFiller"),y(N)):w(N)}function y(N){return N===45?(e.consume(N),y):N===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),p):(e.exit("tableDelimiterFiller"),p(N))}function p(N){return Z(N)?ie(e,S,"whitespace")(N):S(N)}function S(N){return N===124?m(N):N===null||W(N)?!s||i!==l?w(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):w(N)}function w(N){return n(N)}function v(N){return e.enter("tableRow"),b(N)}function b(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),b):N===null||W(N)?(e.exit("tableRow"),t(N)):Z(N)?ie(e,b,"whitespace")(N):(e.enter("data"),P(N))}function P(N){return N===null||N===124||pe(N)?(e.exit("data"),b(N)):(e.consume(N),N===92?_:P)}function _(N){return N===92||N===124?(e.consume(N),P):P(N)}}function Q2(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,c,f,d;const g=new U2;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(o=!1,u!==0&&(Wd(g,t,u,c,f),f=void 0,u=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},g.add(n,0,[["enter",c,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,l=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},g.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(l[1]!==0&&(s[0]=s[1],d=Zi(g,t,l,i,void 0,d),l=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(s[0]=s[1],d=Zi(g,t,l,i,void 0,d)),l=s,s=[l[1],n,0,0])):m.type==="tableHead"?(o=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,l[1]!==0?(s[0]=s[1],d=Zi(g,t,l,i,n,d)):s[1]!==0&&(d=Zi(g,t,s,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Wd(g,t,u,c,f),g.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=H2(t.events,n))}return e}function Zi(e,t,n,r,i,l){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(l.end=Object.assign({},Kn(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const u=Kn(t.events,n[1]);if(l={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const c=Kn(t.events,n[2]),f=Kn(t.events,n[3]),d={type:o,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const g=t.events[n[2]],h=t.events[n[3]];if(g[1].end=Object.assign({},h[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,k=n[3]-n[2]-1;e.add(m,k,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(l.end=Object.assign({},Kn(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Wd(e,t,n,r,i){const l=[],s=Kn(t.events,n);i&&(i.end=Object.assign({},s),l.push(["exit",i,t])),r.end=Object.assign({},s),l.push(["exit",r,t]),e.add(n+1,0,l)}function Kn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Y2={name:"tasklistCheck",tokenize:X2};function K2(){return{text:{91:Y2}}}function X2(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),l)}function l(u){return pe(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return W(u)?t(u):Z(u)?e.check({tokenize:G2},t,n)(u):n(u)}}function G2(e,t,n){return ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function J2(e){return qp([S2(),M2(),B2(e),W2(),K2()])}const Z2={};function eS(e){const t=this,n=e||Z2,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(J2(n)),l.push(v2()),s.push(k2(n))}const tS=[{cmd:"/plan new <slug>",desc:"Create a new plan"},{cmd:"/plan list",desc:"List plans"},{cmd:"/plan open <slug>",desc:"Open a plan URL"},{cmd:"/plan status <slug> <status>",desc:"Set plan status"},{cmd:"/bizar",desc:"Show Bizar menu"},{cmd:"/audit",desc:"Run security audit"},{cmd:"/explain <q>",desc:"Read-only code Q&A"},{cmd:"/init",desc:"Initialize .bizar/ in this project"},{cmd:"/learn",desc:"Extract patterns from session"},{cmd:"/pr-review",desc:"PR review"},{cmd:"/help",desc:"Show all slash commands"}];function nS({snapshot:e,settings:t}){const n=dt();Vn();const[r,i]=z.useState([]),[l,s]=z.useState([]),[o,u]=z.useState(!0),[c,f]=z.useState(""),[d,g]=z.useState(""),[h,m]=z.useState(!1),[k,E]=z.useState(t.defaultAgent||"odin"),[x,y]=z.useState(t.defaultModel||""),[p,S]=z.useState([]),[w,v]=z.useState([]),[b,P]=z.useState(new Set),[_,N]=z.useState(!0),L=z.useRef(null),F=z.useRef(null),Q=z.useRef(null),G=[...tS,...(e.mods||[]).flatMap(I=>{var K;return(K=I.entry)!=null&&K.command?[{cmd:`/${I.id}`,desc:I.description||I.name,mod:I.id}]:[]})],q=async I=>{try{const K=I?`/chat?session=${encodeURIComponent(I)}`:"/chat?limit=200",J=await B.get(K);i(J.messages||[]),s(J.sessions||[])}catch(K){n.error(`Chat load failed: ${K.message}`)}finally{u(!1)}};z.useEffect(()=>{q()},[]),z.useEffect(()=>{L.current&&(L.current.scrollTop=L.current.scrollHeight)},[r]),z.useEffect(()=>{if(d.startsWith("/")&&!d.includes(" ")){const I=d.toLowerCase();v(G.filter(K=>K.cmd.toLowerCase().startsWith(I)).slice(0,6))}else v([])},[d,G.length]);const oe=async()=>{var J;const I=d.trim();if(!I||h)return;m(!0);const K={role:"user",content:I,agent:k,ts:new Date().toISOString()};i(ze=>[...ze,K]),g(""),v([]);try{await B.post("/chat",{message:I,agent:k,model:x,attachments:p}),n.success("Message accepted.")}catch(ze){i(Jt=>Jt.filter(ps=>ps!==K)),n.error(`Send failed: ${ze.message}`)}finally{m(!1),(J=F.current)==null||J.focus()}},H=async I=>{try{await B.post("/chat/regenerate",{sessionId:c,messageId:I}),n.success("Regenerating…",1500),await q(c||void 0)}catch(K){n.error(`Regenerate failed: ${K.message}`)}},R=I=>()=>H(I),$=I=>{if(I.key==="Enter"&&(I.metaKey||I.ctrlKey))I.preventDefault(),oe();else if(I.key==="Enter"&&!I.shiftKey)I.preventDefault(),oe();else if(I.key==="Tab"&&w.length){I.preventDefault();const J=w[0].cmd.split(" ")[0];g(`${J} `),v([])}},j=()=>{var I;return(I=Q.current)==null?void 0:I.click()},te=I=>{const K=I.target.files;if(!K)return;const J=[];for(let ze=0;ze<K.length;ze++)J.push(K[ze].name);S(ze=>[...ze,...J]),I.target.value=""},se=I=>{var J;const K=I.content||I.message||"";(J=navigator.clipboard)==null||J.writeText(K).then(()=>n.success("Copied.",1200),()=>n.error("Copy failed."))},C=I=>{confirm("Delete this message?")&&i(K=>K.filter((J,ze)=>ze!==I))},Se=I=>{P(K=>{const J=new Set(K);return J.has(I)?J.delete(I):J.add(I),J})},Qe=[...r].reverse(),de=[...Qe.filter((I,K)=>b.has(r.length-1-K)),...Qe.filter((I,K)=>!b.has(r.length-1-K))];return a.jsxs("div",{className:"view view-chat",children:[a.jsxs("header",{className:"view-header chat-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx(pr,{size:18})," Chat"]}),a.jsx("p",{className:"view-subtitle",children:e.activeProject?a.jsxs(a.Fragment,{children:["Active project: ",a.jsx("strong",{children:e.activeProject.name})]}):"No active project — pick one in Overview to scope chat sessions."})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>N(I=>!I),title:"Toggle session panel",children:["Sessions (",l.length,")"]}),a.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>q(c||void 0),children:[a.jsx(vt,{size:14})," Refresh"]})]})]}),a.jsxs("div",{className:"chat-layout",children:[_&&a.jsxs("aside",{className:"chat-sessions",children:[a.jsxs("div",{className:"chat-sessions-head",children:[a.jsx("span",{className:"muted",children:"Sessions"}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"New session",title:"New session",onClick:()=>{f(""),i([])},children:a.jsx(Bx,{size:12})})]}),a.jsxs("ul",{className:"chat-sessions-list",children:[l.length===0&&a.jsx("li",{className:"muted",children:"No sessions yet."}),l.map(I=>a.jsxs("li",{className:ae("chat-session-item",c===I.id&&"active"),onClick:()=>{f(I.id),q(I.id)},children:[a.jsx("span",{className:"chat-session-id",children:I.id}),a.jsx("span",{className:"chat-session-meta",children:new Date(I.mtime).toLocaleDateString()})]},I.id))]})]}),a.jsxs("div",{className:"chat-main",children:[a.jsx("div",{className:"chat-list",ref:L,children:o?a.jsx("div",{className:"view-loading",children:a.jsx(_t,{})}):r.length===0?a.jsx(xn,{icon:a.jsx(pr,{size:28}),title:"No messages yet",message:"Type something below to start. Press / for commands, Tab to autocomplete, ⌘/Ctrl+Enter to send."}):de.map((I,K)=>{const J=r.length-1-K;return a.jsx(rS,{message:I,pinned:b.has(J),onCopy:()=>se(I),onDelete:()=>C(J),onTogglePin:()=>Se(J),onRegenerate:R(String(I.ts)||String(J))},`${J}-${I.ts??""}`)})}),a.jsxs("div",{className:"chat-composer",children:[w.length>0&&a.jsx("div",{className:"chat-suggestions",children:w.map(I=>a.jsxs("button",{type:"button",className:"chat-suggestion",onClick:()=>{var J;const K=I.cmd.split(" ")[0];g(`${K} `),(J=F.current)==null||J.focus()},children:[a.jsx("span",{className:"mono",children:I.cmd}),a.jsx("span",{className:"chat-suggestion-desc",children:I.desc})]},I.cmd))}),p.length>0&&a.jsx("div",{className:"chat-attachments",children:p.map((I,K)=>a.jsxs("span",{className:"chat-attachment-tag",children:[a.jsx(Ga,{size:10})," ",I,a.jsx("button",{type:"button",className:"icon-btn",onClick:()=>S(J=>J.filter((ze,Jt)=>Jt!==K)),children:"×"})]},K))}),a.jsxs("div",{className:"chat-composer-row",children:[a.jsxs("select",{className:"select select-sm",value:k,onChange:I=>E(I.target.value),title:"Agent",children:[(e.agents||[]).map(I=>a.jsxs("option",{value:I.name,children:["@",I.name]},I.name)),a.jsx("option",{value:"",children:"(no agent)"})]}),a.jsx("input",{className:"input input-sm",type:"text",placeholder:"model (optional)",value:x,onChange:I=>y(I.target.value),style:{width:140}}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Attach files",title:"Attach",onClick:j,children:a.jsx(Ga,{size:14})}),a.jsx("input",{ref:Q,type:"file",multiple:!0,style:{display:"none"},onChange:te}),a.jsx("textarea",{ref:F,className:"chat-input",placeholder:"Send a message… (Enter to send, Shift+Enter for newline, / for commands)",rows:2,value:d,onChange:I=>g(I.target.value),onKeyDown:$,disabled:h}),a.jsxs(V,{variant:"primary",onClick:oe,disabled:h||!d.trim(),children:[h?a.jsx(_t,{size:"sm"}):a.jsx($x,{size:14}),a.jsx("span",{children:"Send"}),a.jsx(Ex,{size:12,className:"hint-key"})]})]})]})]}),a.jsxs("aside",{className:"chat-info",children:[a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(pr,{size:14})," Session"]}),a.jsx(Ce,{children:c?`id: ${c}`:"Live (unsaved)"}),a.jsxs("dl",{className:"env-table",children:[a.jsx("dt",{children:"Messages"}),a.jsx("dd",{className:"mono",children:r.length}),a.jsx("dt",{children:"Pinned"}),a.jsx("dd",{className:"mono",children:b.size}),a.jsx("dt",{children:"Agent"}),a.jsx("dd",{className:"mono",children:k||"—"}),a.jsx("dt",{children:"Model"}),a.jsx("dd",{className:"mono ellipsis",title:x,children:x||"—"})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx($l,{size:14})," Agents in this project"]}),a.jsxs(Ce,{children:[(e.agents||[]).length," configured"]}),a.jsx("ul",{className:"mod-mini-list",children:(e.agents||[]).slice(0,8).map(I=>a.jsxs("li",{className:"mod-mini",onClick:()=>E(I.name),children:[a.jsxs("span",{className:"mod-mini-name",children:["@",I.name]}),a.jsx("span",{className:"mod-mini-meta",children:I.model||I.mode||""})]},I.name))})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(cu,{size:14})," Active MCPs"]}),a.jsxs(Ce,{children:[(e.mcps||[]).length," configured"]}),a.jsxs("ul",{className:"mod-mini-list",children:[(e.mcps||[]).map(I=>a.jsxs("li",{className:"mod-mini",children:[a.jsx("span",{className:"mod-mini-name",children:I.id}),a.jsx("span",{className:"mod-mini-meta",children:I.command}),a.jsx("span",{className:`mod-mini-pill ${I.enabled?"mod-mini-pill-on":"mod-mini-pill-off"}`,children:I.enabled?"on":"off"})]},I.id)),(e.mcps||[]).length===0&&a.jsx("li",{className:"muted",children:"No MCPs configured."})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(Vx,{size:14})," Slash commands"]}),a.jsxs(Ce,{children:[G.length," available"]}),a.jsx("ul",{className:"slash-mini-list",children:G.slice(0,10).map(I=>a.jsxs("li",{children:[a.jsx("code",{children:I.cmd}),a.jsx("span",{className:"muted",children:I.desc})]},I.cmd))})]})]})]})]})}function rS({message:e,pinned:t,onCopy:n,onDelete:r,onTogglePin:i,onRegenerate:l}){const s=(e.role||"assistant").toLowerCase(),o=e.ts?Ep(e.ts):"",u=e.content||e.message||"";return a.jsxs("div",{className:ae("chat-msg",`chat-msg-${s}`,t&&"chat-msg-pinned"),children:[a.jsxs("div",{className:"chat-msg-meta",children:[a.jsx("span",{className:"chat-msg-role",children:s}),e.agent&&a.jsxs("span",{className:"chat-msg-agent",children:["@",e.agent]}),o&&a.jsx("span",{className:"chat-msg-ts tabular-nums",children:o}),t&&a.jsxs("span",{className:"chat-msg-pin",children:[a.jsx(Wc,{size:10})," pinned"]}),a.jsxs("div",{className:"chat-msg-actions",children:[a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Copy",title:"Copy",onClick:n,children:a.jsx(bx,{size:12})}),s!=="user"&&a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Regenerate",title:"Regenerate",onClick:l,children:a.jsx(vt,{size:12})}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Pin",title:"Pin",onClick:i,children:a.jsx(Wc,{size:12})}),a.jsx("button",{type:"button",className:"icon-btn icon-btn-danger","aria-label":"Delete",title:"Delete",onClick:r,children:a.jsx(jn,{size:12})})]})]}),a.jsx("div",{className:"chat-msg-body markdown-body",children:a.jsx(Bw,{remarkPlugins:[eS],children:u})})]})}function Tu({kind:e="neutral",children:t,className:n,dot:r=!1}){return a.jsxs("span",{className:ae("badge",`badge-${e}`,n),children:[r&&a.jsx("span",{className:"badge-dot"}),t]})}const qd=["bash","read","edit","write","webfetch","websearch","task","glob","grep"],Qd=["anthropic/claude-3-5-sonnet","anthropic/claude-3-5-haiku","openai/gpt-4o","openai/gpt-4o-mini","minimax/MiniMax-M3","minimax/MiniMax-M2.7"];function iS({snapshot:e,refreshSnapshot:t}){const n=dt(),r=Vn(),[i,l]=z.useState(e.agents||[]),[s,o]=z.useState(!e.agents);z.useEffect(()=>{var m;if((m=e.agents)!=null&&m.length||e.agents){l(e.agents||[]),o(!1);return}u()},[e.agents]);const u=async()=>{try{const m=await B.get("/agents");l(m.agents||[])}catch(m){n.error(`Agents load failed: ${m.message}`)}finally{o(!1)}},c=z.useMemo(()=>[...i].sort((m,k)=>m.name.localeCompare(k.name)),[i]),f=()=>{let m=null,k=null,E=null,x=null,y=null,p=null,S=null;r.open({title:"New agent",width:640,children:a.jsxs("div",{className:"agent-form",children:[a.jsx("label",{className:"field-label",children:"Name (a-z, 0-9, dashes)"}),a.jsx("input",{ref:w=>m=w,className:"input",type:"text",placeholder:"my-agent",autoFocus:!0}),a.jsx("label",{className:"field-label",children:"Description"}),a.jsx("input",{ref:w=>{k=w},className:"input",type:"text",placeholder:"What does this agent do?"}),a.jsxs("div",{className:"task-form-row",children:[a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Model"}),a.jsxs("select",{ref:w=>E=w,className:"select",defaultValue:"",children:[a.jsx("option",{value:"",children:"(provider default)"}),Qd.map(w=>a.jsx("option",{value:w,children:w},w))]})]}),a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Mode"}),a.jsxs("select",{ref:w=>x=w,className:"select",defaultValue:"subagent",children:[a.jsx("option",{value:"primary",children:"primary"}),a.jsx("option",{value:"subagent",children:"subagent"}),a.jsx("option",{value:"all",children:"all"})]})]}),a.jsxs("div",{className:"task-form-field",style:{flex:"0 0 80px"},children:[a.jsx("label",{className:"field-label",children:"Color"}),a.jsx("input",{ref:w=>y=w,className:"input",type:"color",defaultValue:"#8b5cf6"})]})]}),a.jsx("label",{className:"field-label",children:"Tools"}),a.jsx("div",{ref:w=>S=w,className:"agent-tools",children:qd.map(w=>a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",value:w}),a.jsx("span",{children:w})]},w))}),a.jsx("label",{className:"field-label",children:"System prompt"}),a.jsx("textarea",{ref:w=>p=w,className:"textarea",rows:6,placeholder:"You are a..."})]}),footer:a.jsxs("div",{className:"modal-footer-actions",children:[a.jsx(V,{variant:"ghost",onClick:()=>r.close(),children:"Cancel"}),a.jsxs(V,{variant:"primary",onClick:async()=>{const w=((m==null?void 0:m.value)||"").trim();if(!/^[a-z0-9][a-z0-9-]{0,63}$/i.test(w)){n.warning("Invalid name (a-z, 0-9, dashes).");return}const v=[];S&&S.querySelectorAll('input[type="checkbox"]:checked').forEach(b=>{v.push(b.value)});try{const b=await B.post("/agents",{name:w,description:((k==null?void 0:k.value)||"").trim(),model:(E==null?void 0:E.value)||"",mode:(x==null?void 0:x.value)||"subagent",color:(y==null?void 0:y.value)||"",tools:v,prompt:(p==null?void 0:p.value)||""});l(P=>[...P,b]),n.success("Agent created."),r.close(),await t()}catch(b){n.error(`Create failed: ${b.message}`)}},children:[a.jsx(Bl,{size:12})," Create"]})]})})},d=async m=>{let k=null,E=null,x=null,y=null,p=null,S=null;try{const w=await B.get(`/agents/${encodeURIComponent(m.name)}`);r.open({title:`Edit ${m.name}`,width:640,children:a.jsxs("div",{className:"agent-form",children:[a.jsxs("div",{className:"muted",children:["File: ",a.jsx("code",{children:w.path})]}),a.jsx("label",{className:"field-label",children:"Description"}),a.jsx("input",{ref:v=>{k=v},className:"input",type:"text",defaultValue:w.description}),a.jsxs("div",{className:"task-form-row",children:[a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Model"}),a.jsxs("select",{ref:v=>E=v,className:"select",defaultValue:w.model,children:[a.jsx("option",{value:"",children:"(provider default)"}),Qd.map(v=>a.jsx("option",{value:v,children:v},v))]})]}),a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Mode"}),a.jsxs("select",{ref:v=>x=v,className:"select",defaultValue:w.mode||"subagent",children:[a.jsx("option",{value:"primary",children:"primary"}),a.jsx("option",{value:"subagent",children:"subagent"}),a.jsx("option",{value:"all",children:"all"})]})]}),a.jsxs("div",{className:"task-form-field",style:{flex:"0 0 80px"},children:[a.jsx("label",{className:"field-label",children:"Color"}),a.jsx("input",{ref:v=>y=v,className:"input",type:"color",defaultValue:w.color||"#8b5cf6"})]})]}),a.jsx("label",{className:"field-label",children:"Tools"}),a.jsx("div",{ref:v=>S=v,className:"agent-tools",children:qd.map(v=>{var b;return a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",value:v,defaultChecked:(b=w.tools)==null?void 0:b.includes(v)}),a.jsx("span",{children:v})]},v)})}),a.jsx("label",{className:"field-label",children:"System prompt"}),a.jsx("textarea",{ref:v=>p=v,className:"textarea",rows:8,defaultValue:w.prompt||""})]}),footer:a.jsxs("div",{className:"modal-footer-actions",children:[a.jsx(V,{variant:"ghost",onClick:()=>r.close(),children:"Cancel"}),a.jsxs(V,{variant:"primary",onClick:async()=>{const v=[];S&&S.querySelectorAll('input[type="checkbox"]:checked').forEach(b=>{v.push(b.value)});try{const b=await B.put(`/agents/${encodeURIComponent(m.name)}`,{description:((k==null?void 0:k.value)||"").trim(),model:(E==null?void 0:E.value)||"",mode:(x==null?void 0:x.value)||"subagent",color:(y==null?void 0:y.value)||"",tools:v,prompt:(p==null?void 0:p.value)||""});l(P=>P.map(_=>_.name===m.name?b:_)),n.success("Agent saved."),r.close(),await t()}catch(b){n.error(`Save failed: ${b.message}`)}},children:[a.jsx(Bl,{size:12})," Save"]})]})})}catch(w){n.error(`Load failed: ${w.message}`)}},g=async m=>{if(confirm(`Delete agent "${m.name}"? This removes ${m.path}.`))try{await B.del(`/agents/${encodeURIComponent(m.name)}`),l(k=>k.filter(E=>E.name!==m.name)),n.success("Agent deleted.")}catch(k){n.error(`Delete failed: ${k.message}`)}},h=async m=>{let k=null;r.open({title:`Invoke ${m.name}`,children:a.jsxs("div",{className:"invoke-form",children:[a.jsxs("p",{className:"muted invoke-form-meta mono",children:[m.model||"—"," · ",m.path]}),a.jsx("p",{className:"invoke-form-desc",children:m.description}),a.jsx("label",{className:"field-label",htmlFor:"invoke-prompt",children:"Prompt"}),a.jsx("textarea",{ref:E=>k=E,id:"invoke-prompt",className:"textarea",rows:5,placeholder:"What should this agent do?",autoFocus:!0})]}),footer:a.jsxs("div",{className:"modal-footer-actions",children:[a.jsx(V,{variant:"ghost",onClick:()=>r.close(),children:"Cancel"}),a.jsxs(V,{variant:"primary",onClick:async()=>{const E=((k==null?void 0:k.value)||"").trim();if(!E){n.warning("Prompt is required.");return}try{await B.post(`/agents/${encodeURIComponent(m.name)}/invoke`,{prompt:E}),n.success(`Invoked ${m.name}.`),r.close()}catch(x){n.error(`Invoke failed: ${x.message}`)}},children:[a.jsx(qc,{size:14})," Invoke"]})]})})};return a.jsxs("div",{className:"view view-agents",children:[a.jsxs("header",{className:"view-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx($l,{size:18})," Agents (",c.length,")"]}),a.jsxs("p",{className:"view-subtitle",children:["The Norse pantheon — click ",a.jsx("kbd",{children:"Edit"})," to modify or ",a.jsx("kbd",{children:"Invoke"})," to dispatch."]})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs(V,{variant:"secondary",size:"sm",onClick:u,children:[a.jsx(vt,{size:14})," Refresh"]}),a.jsxs(V,{variant:"primary",size:"sm",onClick:f,children:[a.jsx(Dt,{size:14})," New agent"]})]})]}),s?a.jsx("div",{className:"view-loading",children:a.jsx(_t,{size:"lg"})}):c.length===0?a.jsx(xn,{icon:a.jsx($l,{size:32}),title:"No agents found",message:"Run bizar in the terminal to install Bizar."}):a.jsx("div",{className:"agent-grid",children:c.map(m=>a.jsxs(re,{variant:"elevated",interactive:!0,className:"agent-card",children:[a.jsxs("div",{className:"agent-card-head",children:[a.jsx("div",{className:"agent-card-name",children:m.name}),a.jsx(Tu,{kind:m.mode==="primary"?"accent":"neutral",children:m.mode||"agent"})]}),a.jsx("p",{className:"agent-card-desc",children:zp(m.description,200)}),a.jsxs("div",{className:"agent-card-meta",children:[a.jsx("span",{className:"mono",title:m.model||"",children:m.model||"—"}),a.jsx("span",{className:"tabular-nums muted",children:Et(m.mtime)})]}),a.jsxs("div",{className:"agent-card-actions",children:[a.jsxs(V,{variant:"primary",size:"sm",onClick:()=>h(m),children:[a.jsx(qc,{size:12})," Invoke"]}),a.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>d(m),children:[a.jsx(ou,{size:12})," Edit"]}),a.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>g(m),children:[a.jsx(jn,{size:12})," Delete"]})]})]},m.name))})]})}function lS(e){switch(e){case"approved":case"done":return"success";case"in-progress":case"doing":return"info";case"rejected":return"error";case"draft":case"queued":default:return"neutral"}}function sS({snapshot:e}){const t=dt(),[n,r]=z.useState(e.plans||[]),[i,l]=z.useState(!e.plans),[s,o]=z.useState(null),[u,c]=z.useState("");z.useEffect(()=>{var k;if((k=e.plans)!=null&&k.length){r(e.plans),l(!1);return}let m=!1;return B.get("/plans").then(E=>{m||(r(E.plans||[]),l(!1))}).catch(E=>{m||(l(!1),t.error(`Could not load plans: ${E.message}`))}),()=>{m=!0}},[e.plans,t]);const f=z.useMemo(()=>u?n.filter(m=>(m.status||"").toLowerCase().includes(u.toLowerCase())):n,[n,u]),d=async()=>{try{const m=await B.get("/plans");r(m.plans||[]),t.info("Plans refreshed.",1500)}catch(m){t.error(`Refresh failed: ${m.message}`)}},g=async(m,k)=>{try{await B.post("/plans",{slug:m,title:k}),t.success(`Plan "${m}" created.`),o(m),await d()}catch(E){t.error(`Create failed: ${E.message}`)}},h=z.useMemo(()=>Array.from(new Set(n.map(m=>m.status||"draft"))),[n]);return a.jsxs("div",{className:"view view-plans",children:[a.jsxs("header",{className:"view-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx(fl,{size:18})," Plans (",n.length,")"]}),a.jsx("p",{className:"view-subtitle",children:"Visual plans with elements, connections, and threaded comments."})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs("select",{className:"select select-sm",value:u,onChange:m=>c(m.target.value),children:[a.jsx("option",{value:"",children:"All statuses"}),h.map(m=>a.jsx("option",{value:m,children:m},m))]}),a.jsxs(V,{variant:"secondary",size:"sm",onClick:d,children:[a.jsx(vt,{size:14})," Refresh"]})]})]}),a.jsx(aS,{onCreate:g}),i?a.jsx("div",{className:"view-loading",children:a.jsx(_t,{size:"lg"})}):n.length===0?a.jsx(xn,{icon:a.jsx(fl,{size:32}),title:"No plans yet",message:"Create one above to get started."}):a.jsxs("div",{className:"plans-layout",children:[a.jsxs("div",{className:"plans-list-col",children:[f.map(m=>a.jsx(oS,{plan:m,selected:m.slug===s,onSelect:()=>o(m.slug)},m.slug)),f.length===0&&a.jsx("p",{className:"muted text-sm",children:"No plans match that filter."})]}),a.jsx("div",{className:"plans-canvas-col",children:s?a.jsx(uS,{slug:s}):a.jsx(xn,{icon:a.jsx(fl,{size:28}),title:"Select a plan",message:"Pick a plan on the left to view its canvas."})})]})]})}function aS({onCreate:e}){const[t,n]=z.useState(""),[r,i]=z.useState("");return a.jsxs(re,{className:"new-plan",children:[a.jsxs(ce,{children:[a.jsx(Dt,{size:14})," New plan"]}),a.jsx(Ce,{children:"Slug must be lowercase, may contain hyphens, 1–64 chars."}),a.jsxs("form",{className:"new-plan-form",onSubmit:l=>{l.preventDefault(),t.trim()&&(e(t.trim(),r.trim()||void 0),n(""),i(""))},children:[a.jsx("input",{className:"input",type:"text",placeholder:"slug (e.g. dashboard-v2.6)",pattern:"[a-z0-9][a-z0-9-]{0,63}",required:!0,value:t,onChange:l=>n(l.target.value)}),a.jsx("input",{className:"input",type:"text",placeholder:"Title (optional)",value:r,onChange:l=>i(l.target.value)}),a.jsx(V,{variant:"primary",type:"submit",children:"Create"})]})]})}function oS({plan:e,selected:t,onSelect:n}){const r=lS(e.status||"draft");return a.jsxs(re,{variant:t?"filled":"elevated",interactive:!0,className:ae("plan-card",t&&"plan-card-selected"),onClick:n,children:[a.jsxs("div",{className:"plan-card-head",children:[a.jsx("div",{className:"plan-card-title",children:e.title||e.slug}),a.jsx(Tu,{kind:r,children:e.status||"draft"})]}),a.jsxs("div",{className:"plan-card-slug mono",children:[e.slug," · ",e.source]}),a.jsxs("div",{className:"plan-card-meta",children:[e.elementCount!=null&&a.jsxs("span",{children:[e.elementCount," elements"]}),e.commentCount!=null&&a.jsxs("span",{children:[" · ",e.commentCount," comments"]}),a.jsxs("span",{children:[" · edited ",Et(e.mtime)]})]}),a.jsxs("div",{className:"plan-card-actions",children:[a.jsx(V,{variant:"ghost",size:"sm",onClick:i=>{i.stopPropagation(),n()},children:"View"}),a.jsxs(V,{variant:"ghost",size:"sm",onClick:i=>{i.stopPropagation(),alert(`Open this plan in the CLI:
384
+
385
+ bizar plan open ${e.slug}
386
+
387
+ The CLI launches the full visual editor with pan, zoom, and edit capabilities.`)},children:[a.jsx(gp,{size:12})," Open"]})]})]})}function uS({slug:e}){const[t,n]=z.useState(null),[r,i]=z.useState(!0),[l,s]=z.useState(null),o=async()=>{i(!0);try{const c=await B.get(`/plans/${encodeURIComponent(e)}/canvas`);n(c.canvas)}catch(c){console.warn("canvas load failed",c),n({title:e,elements:[],connections:[],comments:[],viewport:{x:0,y:0,zoom:1}})}finally{i(!1)}};if(z.useEffect(()=>{s(null),o()},[e]),r||!t)return a.jsxs("div",{className:"view-loading",children:[a.jsx(_t,{size:"lg"}),a.jsx("p",{children:"Loading canvas…"})]});const u=l?t.comments.filter(c=>c.elementId===l||c.id===l):t.comments;return a.jsxs("div",{className:"plan-canvas",children:[a.jsxs("header",{className:"plan-canvas-header",children:[a.jsxs("div",{children:[a.jsx("div",{className:"plan-canvas-title",children:t.title||e}),a.jsxs("div",{className:"plan-canvas-meta",children:[t.elements.length," element",t.elements.length!==1?"s":""," ·"," ",t.comments.length," comment",t.comments.length!==1?"s":""]})]}),a.jsxs("div",{className:"plan-canvas-actions",children:[a.jsx(V,{variant:"ghost",size:"sm",onClick:o,title:"Refresh canvas",children:a.jsx(vt,{size:14})}),a.jsx(V,{variant:"ghost",size:"sm",title:"Reset zoom",onClick:()=>{n({...t,viewport:{x:0,y:0,zoom:1}})},children:a.jsx(Mx,{size:14})})]})]}),a.jsx("div",{className:"plan-canvas-area",children:t.elements.length===0?a.jsxs("div",{className:"plan-canvas-empty",children:["No elements yet. Add one via the CLI: ",a.jsxs("code",{children:["/plan add ",e," <type>"]})]}):a.jsxs(cS,{canvas:t,children:[t.elements.map(c=>a.jsx(dS,{element:c,selected:l===c.id,onClick:()=>s(l===c.id?null:c.id)},c.id)),a.jsx(fS,{elements:t.elements,connections:t.connections})]})}),a.jsxs("footer",{className:"plan-canvas-comments",children:[a.jsxs("h4",{className:"plan-canvas-comments-title",children:[a.jsx(Ax,{size:14})," Comments (",u.length,l?" for selected":"",")"]}),u.length===0?a.jsx("p",{className:"muted text-sm",children:l?"No comments on this element yet.":"No comments yet."}):a.jsx("ul",{className:"comment-list",children:u.map(c=>a.jsx(hS,{comment:c},c.id))})]})]})}function cS({canvas:e,children:t}){const n=z.useRef(null),r=z.useRef(null),i=z.useRef({panning:!1,startX:0,startY:0,ox:e.viewport.x||0,oy:e.viewport.y||0,scale:e.viewport.zoom||1});return z.useEffect(()=>{const l=n.current,s=r.current;if(!l||!s)return;const o=()=>{const g=i.current;s.style.transform=`translate(${g.ox}px, ${g.oy}px) scale(${g.scale})`};o();const u=g=>{const h=g.target;h!==l&&!h.classList.contains("canvas-grid-bg")&&!h.classList.contains("canvas-inner")||(i.current.panning=!0,i.current.startX=g.clientX-i.current.ox,i.current.startY=g.clientY-i.current.oy,l.style.cursor="grabbing")},c=g=>{i.current.panning&&(i.current.ox=g.clientX-i.current.startX,i.current.oy=g.clientY-i.current.startY,o())},f=()=>{i.current.panning&&(i.current.panning=!1,l.style.cursor="")},d=g=>{g.preventDefault();const h=g.deltaY>0?.9:1.1,m=Math.min(Math.max(i.current.scale*h,.2),3);i.current.scale=m,o()};return l.addEventListener("mousedown",u),window.addEventListener("mousemove",c),window.addEventListener("mouseup",f),l.addEventListener("wheel",d,{passive:!1}),()=>{l.removeEventListener("mousedown",u),window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",f),l.removeEventListener("wheel",d)}},[e.elements.length,e.connections.length]),a.jsxs("div",{className:"canvas-root",ref:n,children:[a.jsx("div",{className:"canvas-grid-bg"}),a.jsx("div",{className:"canvas-inner",ref:r,children:t}),a.jsx("div",{className:"canvas-hint",children:"Pan: drag · Zoom: scroll"})]})}function dS({element:e,selected:t,onClick:n}){const r=e.x||0,i=e.y||0,l=e.width||240,s=e.height||160;return a.jsxs("div",{className:ae("canvas-element",t&&"canvas-element-selected"),style:{left:r,top:i,width:l,minHeight:s},onClick:o=>{o.stopPropagation(),n()},children:[a.jsx("div",{className:"canvas-element-type",children:e.type||"text"}),a.jsx("div",{className:"canvas-element-title",children:e.title||"Untitled"}),e.content&&a.jsx("div",{className:"canvas-element-content",children:zp(e.content,200)})]})}function fS({elements:e,connections:t}){if(!t.length)return null;const n=e.reduce((u,c)=>{const f=c.x||0,d=c.y||0,g=f+(c.width||240),h=d+(c.height||160);return{minX:Math.min(u.minX,f),minY:Math.min(u.minY,d),maxX:Math.max(u.maxX,g),maxY:Math.max(u.maxY,h)}},{minX:0,minY:0,maxX:0,maxY:0}),r=80,i=n.maxX-n.minX+r*2,l=n.maxY-n.minY+r*2,s=-n.minX+r,o=-n.minY+r;return a.jsxs("svg",{className:"canvas-connections",width:i,height:l,style:{left:n.minX-r,top:n.minY-r},children:[a.jsx("defs",{children:a.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:a.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:"var(--accent)"})})}),t.map(u=>{const c=e.find(k=>k.id===u.fromElementId||k.id===u.from),f=e.find(k=>k.id===u.toElementId||k.id===u.to);if(!c||!f)return null;const d=s+(c.x||0)+(c.width||240)/2,g=o+(c.y||0)+(c.height||160),h=s+(f.x||0)+(f.width||240)/2,m=o+(f.y||0);return a.jsx("line",{x1:d,y1:g,x2:h,y2:m,stroke:"var(--accent)",strokeWidth:1.5,markerEnd:"url(#arrow)"},u.id)})]})}function hS({comment:e}){return a.jsxs("li",{className:"comment-item",children:[a.jsxs("div",{className:"comment-head",children:[a.jsx("span",{className:"comment-author mono",children:e.author}),a.jsx("span",{className:"comment-time tabular-nums muted",children:Et(e.created)})]}),a.jsx("div",{className:"comment-text",children:e.text}),e.thread&&e.thread.length>0&&a.jsx("div",{className:"comment-thread",children:e.thread.map((t,n)=>a.jsxs("div",{className:"comment-reply",children:[a.jsx("span",{className:"comment-author mono",children:t.author}),a.jsx("span",{className:"comment-reply-text",children:t.text})]},n))})]})}function pS({children:e,className:t,onRemove:n}){return a.jsxs("span",{className:ae("tag",t),children:[e,n&&a.jsx("button",{type:"button",className:"tag-remove","aria-label":`Remove ${typeof e=="string"?e:"tag"}`,onClick:n,children:"×"})]})}const ii=[{id:"queued",label:"Queued",kind:"info"},{id:"doing",label:"Doing",kind:"accent"},{id:"done",label:"Done",kind:"success"}],mS=["low","normal","high"];function gS({snapshot:e,refreshSnapshot:t}){const n=dt(),r=Vn(),[i,l]=z.useState(e.tasks||[]),[s,o]=z.useState(!e.tasks),[u,c]=z.useState(""),[f,d]=z.useState(""),[g,h]=z.useState(null),m=async()=>{try{const S=await B.get("/tasks");l(Array.isArray(S)?S:[])}catch(S){n.error(`Tasks load failed: ${S.message}`)}finally{o(!1)}};z.useEffect(()=>{var S;if((S=e.tasks)!=null&&S.length||e.tasks){l(e.tasks||[]),o(!1);return}m()},[e.tasks]);const k=z.useMemo(()=>{let S=i;if(f&&(S=S.filter(w=>(w.assignee||"")===f)),u.trim()){const w=u.toLowerCase();S=S.filter(v=>{const b=(v.title||"").toLowerCase(),P=(v.description||"").toLowerCase(),_=(v.tags||[]).join(" ").toLowerCase();return b.includes(w)||P.includes(w)||_.includes(w)})}return S},[i,u,f]),E=async(S,w)=>{const v=i.find(P=>P.id===S);if(!v)return;const b=v.status;l(P=>P.map(_=>_.id===S?{..._,status:w}:_));try{await B.patch(`/tasks/${encodeURIComponent(S)}/status`,{status:w}),n.success(`Moved to ${w}.`,1500)}catch(P){l(_=>_.map(N=>N.id===S?{...N,status:b}:N)),n.error(`Move failed: ${P.message}`)}},x=async S=>{if(confirm("Delete this task?"))try{await B.del(`/tasks/${encodeURIComponent(S)}`),l(w=>w.filter(v=>v.id!==S)),n.success("Task deleted.",1500)}catch(w){n.error(`Delete failed: ${w.message}`)}},y=S=>vS(r,n,S,l,m,t),p=async S=>{try{const v=await B.put(`/tasks/${encodeURIComponent(S.id)}`,{assignee:"me"});l(b=>b.map(P=>P.id===S.id?v:P)),n.success("Assigned to me.",1200)}catch(w){n.error(`Assign failed: ${w.message}`)}};return a.jsxs("div",{className:"view view-tasks",children:[a.jsxs("header",{className:"view-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx(Np,{size:18})," Tasks (",i.length,")"]}),a.jsx("p",{className:"view-subtitle",children:"Personal kanban. Click a card for details (subtasks, deps, timer, comments, activity)."})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs("div",{className:"search-input",children:[a.jsx(uu,{size:14}),a.jsx("input",{className:"input",type:"text",placeholder:"Search…",value:u,onChange:S=>c(S.target.value)}),u&&a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Clear search",onClick:()=>c(""),children:a.jsx(Pi,{size:12})})]}),a.jsxs("select",{className:"select select-sm",value:f,onChange:S=>d(S.target.value),children:[a.jsx("option",{value:"",children:"All assignees"}),a.jsx("option",{value:"me",children:"Me"}),a.jsx("option",{value:"",children:"—"}),(e.agents||[]).map(S=>a.jsxs("option",{value:S.name,children:["@",S.name]},S.name))]}),a.jsxs(V,{variant:"primary",size:"sm",onClick:()=>ho(r,n,null,"queued",l,m,t),children:[a.jsx(Dt,{size:14})," Add task"]})]})]}),s?a.jsx("div",{className:"view-loading",children:a.jsx(_t,{size:"lg"})}):a.jsx("div",{className:"kanban",children:ii.map(S=>a.jsx(yS,{column:S,tasks:k.filter(w=>w.status===S.id),focusedId:g,onFocus:h,onMove:E,onDelete:x,onEdit:y,onAdd:()=>ho(r,n,null,S.id,l,m,t),onAssignMe:p},S.id))})]})}function yS({column:e,tasks:t,focusedId:n,onFocus:r,onMove:i,onDelete:l,onEdit:s,onAdd:o,onAssignMe:u}){const[c,f]=z.useState(!1);return a.jsxs("div",{className:ae("kanban-column",c&&"kanban-column-drop"),"data-column":e.id,onDragOver:d=>{d.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:d=>{d.preventDefault(),f(!1);const g=d.dataTransfer.getData("text/task-id");g&&i(g,e.id)},children:[a.jsxs("div",{className:"kanban-col-header",children:[a.jsx(ce,{children:a.jsx(Tu,{kind:e.kind,dot:!0,children:e.label})}),a.jsx("span",{className:"kanban-col-count tabular-nums",children:t.length})]}),a.jsx("div",{className:"kanban-col-body",children:t.length===0?a.jsx("div",{className:"kanban-empty",children:"No tasks"}):t.map(d=>a.jsx(xS,{task:d,focused:n===d.id,onFocus:()=>r(n===d.id?null:d.id),onMove:g=>{const m=ii.findIndex(k=>k.id===d.status)+g;m>=0&&m<ii.length&&i(d.id,ii[m].id)},onEdit:()=>s(d),onDelete:()=>l(d.id),onAssignMe:()=>u(d)},d.id))}),a.jsx("footer",{className:"kanban-col-footer",children:a.jsxs(V,{variant:"ghost",size:"sm",onClick:o,className:"w-full",children:[a.jsx(Dt,{size:12})," Add task"]})})]})}function xS({task:e,focused:t,onFocus:n,onMove:r,onEdit:i,onDelete:l,onAssignMe:s}){var u,c,f;const o=e._timerStart;return a.jsxs("div",{className:ae("task-card",`priority-${e.priority}`,t&&"task-card-focused",o?"task-card-timer":null),"data-task-id":e.id,draggable:!0,onDragStart:d=>{d.dataTransfer.setData("text/task-id",e.id),d.dataTransfer.effectAllowed="move"},onClick:n,children:[a.jsxs("div",{className:"task-card-head",children:[a.jsx("span",{className:"priority-dot",style:{background:Qx[e.priority]||"var(--info)"}}),a.jsx("div",{className:"task-card-title",children:e.title}),o&&a.jsxs("span",{className:"task-card-timer-pill",children:[a.jsx(jr,{size:10})," running"]})]}),e.description&&a.jsx("div",{className:"task-card-desc",children:e.description.slice(0,160)}),a.jsxs("div",{className:"task-card-badges",children:[e.assignee&&a.jsxs("span",{className:"task-card-badge",children:[a.jsx(Qc,{size:10})," @",e.assignee]}),e.timeSpent?a.jsxs("span",{className:"task-card-badge",children:[a.jsx(jr,{size:10})," ",fo(e.timeSpent)]}):null,(u=e.dependencies)!=null&&u.length?a.jsxs("span",{className:"task-card-badge",children:[a.jsx(kp,{size:10})," ",e.dependencies.length]}):null,e.recurring?a.jsxs("span",{className:"task-card-badge",children:[a.jsx(fp,{size:10})," ",e.recurring.cron||"recurring"]}):null,(c=e.comments)!=null&&c.length?a.jsxs("span",{className:"task-card-badge",children:[a.jsx(pr,{size:10})," ",e.comments.length]}):null,(f=e.attachments)!=null&&f.length?a.jsxs("span",{className:"task-card-badge",children:[a.jsx(Ga,{size:10})," ",e.attachments.length]}):null]}),e.tags&&e.tags.length>0&&a.jsx("div",{className:"task-card-tags",children:e.tags.map(d=>a.jsx(pS,{children:d},d))}),a.jsxs("div",{className:"task-card-footer",children:[a.jsx("span",{className:"task-card-time tabular-nums muted",children:Et(e.updatedAt||e.createdAt)}),a.jsxs("div",{className:"task-card-actions",onClick:d=>d.stopPropagation(),children:[a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Move left",title:"Move left",onClick:()=>r(-1),children:a.jsx(jx,{size:14})}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Edit",title:"Open detail",onClick:i,children:a.jsx(ou,{size:14})}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Assign me",title:"Assign to me",onClick:s,children:a.jsx(Qc,{size:14})}),a.jsx("button",{type:"button",className:"icon-btn icon-btn-danger","aria-label":"Delete",title:"Delete",onClick:l,children:a.jsx(jn,{size:14})}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Move right",title:"Move right",onClick:()=>r(1),children:a.jsx(pp,{size:14})})]})]})]})}function fo(e){if(!e)return"0m";const t=Math.floor(e/3600),n=Math.floor(e%3600/60);return t>0?`${t}h ${n}m`:`${n}m`}function ho(e,t,n,r,i,l,s){let o=null,u=null,c=null,f=null,d=null,g=null;const h=async()=>{var w;const m=(o==null?void 0:o.value.trim())||"";if(!m){t.warning("Title is required."),o==null||o.focus();return}const k=(u==null?void 0:u.value.trim())||"",E=((w=f==null?void 0:f.querySelector('input[name="task-priority"]:checked'))==null?void 0:w.value)||"normal",x=(c==null?void 0:c.value.trim())||"",y=x?x.split(",").map(v=>v.trim()).filter(Boolean):[],p=(d==null?void 0:d.value)||r,S=((g==null?void 0:g.value)||"").trim()||null;try{if(n){const v=await B.put(`/tasks/${encodeURIComponent(n.id)}`,{title:m,description:k,tags:y,priority:E,status:p,assignee:S});i(b=>b.map(P=>P.id===n.id?v:P)),t.success("Task updated.",1500)}else{const v=await B.post("/tasks",{title:m,description:k,status:p,tags:y,priority:E,assignee:S});i(b=>[v,...b]),t.success("Task created.",1500)}e.close(),await s()}catch(v){t.error(`Save failed: ${v.message}`)}};e.open({title:n?"Edit task":"New task",width:560,children:a.jsxs("div",{className:"task-form",children:[a.jsx("label",{className:"field-label",htmlFor:"task-title",children:"Title *"}),a.jsx("input",{ref:m=>{o=m},id:"task-title",className:"input",type:"text",maxLength:200,placeholder:"What needs to be done?",defaultValue:(n==null?void 0:n.title)||"",autoFocus:!0}),a.jsx("label",{className:"field-label",htmlFor:"task-desc",children:"Description"}),a.jsx("textarea",{ref:m=>{u=m},id:"task-desc",className:"textarea",rows:3,placeholder:"Markdown supported…",defaultValue:(n==null?void 0:n.description)||""}),a.jsxs("div",{className:"task-form-row",children:[a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",htmlFor:"task-status",children:"Status"}),a.jsx("select",{ref:m=>{d=m},id:"task-status",className:"select",defaultValue:(n==null?void 0:n.status)||r,children:ii.map(m=>a.jsx("option",{value:m.id,children:m.label},m.id))})]}),a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Priority"}),a.jsx("div",{className:"radio-row",ref:m=>{f=m},children:mS.map(m=>a.jsxs("label",{className:"radio-label",children:[a.jsx("input",{type:"radio",name:"task-priority",value:m,defaultChecked:((n==null?void 0:n.priority)||"normal")===m}),a.jsx("span",{className:"capitalize",children:m})]},m))})]})]}),a.jsx("label",{className:"field-label",htmlFor:"task-assignee",children:"Assignee (agent or user)"}),a.jsx("input",{ref:m=>{g=m},id:"task-assignee",className:"input",type:"text",placeholder:"odin, thor, me, …",defaultValue:(n==null?void 0:n.assignee)||""}),a.jsx("label",{className:"field-label",htmlFor:"task-tags",children:"Tags"}),a.jsx("input",{ref:m=>{c=m},id:"task-tags",className:"input",type:"text",placeholder:"comma-separated, e.g. bug, frontend",defaultValue:((n==null?void 0:n.tags)||[]).join(", ")})]}),footer:a.jsxs("div",{className:"modal-footer-actions",children:[a.jsx(V,{variant:"ghost",onClick:()=>e.close(),children:"Cancel"}),a.jsx(V,{variant:"primary",onClick:h,children:n?"Save":"Create"})]})})}function vS(e,t,n,r,i,l){var h;let s=null,o=null,u=null;const c=async()=>{const m=((s==null?void 0:s.value)||"").trim();if(m)try{const k=await B.post(`/tasks/${encodeURIComponent(n.id)}/comments`,{text:m});r(E=>E.map(x=>x.id===n.id?k:x)),s&&(s.value=""),t.success("Comment added.",1200)}catch(k){t.error(`Comment failed: ${k.message}`)}},f=async()=>{try{const m=await B.post(`/tasks/${encodeURIComponent(n.id)}/timer`);r(k=>k.map(E=>E.id===n.id?m:E)),t.success("Timer toggled.",1200)}catch(m){t.error(`Timer failed: ${m.message}`)}},d=async()=>{const m=((o==null?void 0:o.value)||"").trim();if(!m)return;const k=[...n.dependencies||[],m];try{const E=await B.put(`/tasks/${encodeURIComponent(n.id)}`,{dependencies:k});r(x=>x.map(y=>y.id===n.id?E:y)),o&&(o.value=""),t.success("Dependency added.",1200)}catch(E){t.error(`Failed: ${E.message}`)}},g=async()=>{const m=((u==null?void 0:u.value)||"").trim();try{const k=await B.put(`/tasks/${encodeURIComponent(n.id)}`,{recurring:m?{cron:m}:null});r(E=>E.map(x=>x.id===n.id?k:x)),t.success(m?"Recurring set.":"Recurring cleared.",1200)}catch(k){t.error(`Failed: ${k.message}`)}};e.open({title:`Task — ${n.title}`,width:640,children:a.jsxs("div",{className:"task-detail",children:[a.jsxs("div",{className:"task-detail-meta",children:[a.jsxs("span",{children:[a.jsx("strong",{children:"Status:"})," ",n.status]}),a.jsxs("span",{children:[a.jsx("strong",{children:"Priority:"})," ",n.priority]}),n.assignee&&a.jsxs("span",{children:[a.jsx("strong",{children:"Assignee:"})," @",n.assignee]}),n.timeSpent!=null&&a.jsxs("span",{children:[a.jsx("strong",{children:"Time:"})," ",fo(n.timeSpent)]})]}),n.description&&a.jsxs(re,{children:[a.jsx(ce,{children:"Description"}),a.jsx("div",{className:"task-detail-desc",children:n.description})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(jr,{size:14})," Time tracking"]}),a.jsxs("div",{className:"task-detail-row",children:[a.jsx(V,{variant:"secondary",size:"sm",onClick:f,children:n._timerStart?a.jsxs(a.Fragment,{children:[a.jsx(Nx,{size:12})," Stop"]}):a.jsxs(a.Fragment,{children:[a.jsx(mp,{size:12})," Start"]})}),a.jsx("span",{className:"muted",children:n.timeSpent?fo(n.timeSpent):"no time tracked"})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(kp,{size:14})," Dependencies"]}),a.jsxs("div",{className:"task-detail-row",children:[a.jsx("input",{ref:m=>{o=m},className:"input",type:"text",placeholder:"task id (e.g. tsk_abc12345)"}),a.jsx(V,{variant:"secondary",size:"sm",onClick:d,children:"Add"})]}),a.jsx("ul",{children:(n.dependencies||[]).map(m=>a.jsx("li",{children:a.jsx("code",{children:m})},m))})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(fp,{size:14})," Recurring"]}),a.jsxs("div",{className:"task-detail-row",children:[a.jsx("input",{ref:m=>{u=m},className:"input",type:"text",placeholder:"cron expression (e.g. 0 9 * * *)",defaultValue:((h=n.recurring)==null?void 0:h.cron)||""}),a.jsx(V,{variant:"secondary",size:"sm",onClick:g,children:"Save"})]}),n.recurring&&a.jsxs("div",{className:"muted",children:["Cron: ",a.jsx("code",{children:n.recurring.cron})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(pr,{size:14})," Comments"]}),a.jsx("textarea",{ref:m=>{s=m},className:"textarea",rows:3,placeholder:"Add a comment…"}),a.jsx(V,{variant:"primary",size:"sm",onClick:c,children:"Post"}),a.jsxs("ul",{className:"task-comments",children:[(n.comments||[]).map(m=>a.jsxs("li",{children:[a.jsx("div",{className:"muted tabular-nums",children:Et(m.createdAt)}),a.jsx("div",{children:m.text})]},m.id)),(n.comments||[]).length===0&&a.jsx("li",{className:"muted",children:"No comments."})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(dp,{size:14})," Activity"]}),a.jsxs("ul",{className:"task-activity",children:[(n.activity||[]).slice().reverse().slice(0,20).map(m=>a.jsxs("li",{children:[a.jsx("span",{className:"muted tabular-nums",children:Et(m.ts)})," ",a.jsx("span",{className:"tag",children:m.type}),m.data&&typeof m.data=="object"?a.jsxs("code",{className:"muted",children:[" ",JSON.stringify(m.data)]}):null]},m.id)),(n.activity||[]).length===0&&a.jsx("li",{className:"muted",children:"No activity yet."})]})]})]}),footer:a.jsxs("div",{className:"modal-footer-actions",children:[a.jsx(V,{variant:"ghost",onClick:()=>e.close(),children:"Close"}),a.jsxs(V,{variant:"primary",onClick:()=>{e.close(),ho(e,t,n,n.status,r,i,l)},children:[a.jsx(ou,{size:12})," Edit basics"]})]})})}function kS(e){const t=[],n=/("(?:\\.|[^"\\])*")(\s*:)?|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)|(\btrue\b|\bfalse\b)|(\bnull\b)|([{}\[\],])|(\s+)/g;let r;for(;(r=n.exec(e))!==null;)r[1]!==void 0?(t.push({kind:r[2]?"key":"string",value:r[1]}),r[2]&&t.push({kind:"punct",value:r[2]})):r[3]!==void 0?t.push({kind:"number",value:r[3]}):r[4]!==void 0?t.push({kind:"boolean",value:r[4]}):r[5]!==void 0?t.push({kind:"null",value:r[5]}):r[6]!==void 0?t.push({kind:"punct",value:r[6]}):r[7]!==void 0&&t.push({kind:"space",value:r[7]});return t}const wS={key:"var(--syntax-key)",string:"var(--syntax-string)",number:"var(--syntax-number)",boolean:"var(--syntax-boolean)",null:"var(--syntax-null)",punct:void 0,space:void 0};function jS({value:e}){const t=JSON.stringify(e,null,2);if(t===void 0)return null;const n=kS(t);return a.jsx(a.Fragment,{children:n.map((r,i)=>{const l=wS[r.kind];return l?a.jsx("span",{style:{color:l},children:r.value},i):a.jsx(z.Fragment,{children:r.value},i)})})}function SS({snapshot:e,refreshSnapshot:t}){const n=dt();Vn();const r=e.config,[i,l]=z.useState((r==null?void 0:r.raw)||(r!=null&&r.data?JSON.stringify(r.data,null,2):"")),[s,o]=z.useState({raw:(r==null?void 0:r.raw)||"",data:(r==null?void 0:r.data)??null,error:null}),[u,c]=z.useState(!1),[f,d]=z.useState(!1),[g,h]=z.useState((r==null?void 0:r.path)||""),[m,k]=z.useState(!1),[E,x]=z.useState(null),[y,p]=z.useState(e.providers||[]),[S,w]=z.useState(e.mcps||[]),[v,b]=z.useState("config"),P=z.useRef(null),_=z.useMemo(()=>Yc(i),[i]);z.useEffect(()=>{e.providers&&p(e.providers),e.mcps&&w(e.mcps)},[e.providers,e.mcps]);const N=async()=>{try{const H=await B.post("/config/reload"),R=H.raw||(H.data?JSON.stringify(H.data,null,2):"");l(R),o({raw:R,data:H.data??null,error:null}),c(!1),h(H.path||""),n.info("Config reloaded.",1500)}catch(H){n.error(`Reload failed: ${H.message}`)}},L=H=>{o(R=>{const $={raw:H,data:R.data,error:null};try{$.data=JSON.parse(H),$.error=null}catch(j){$.data=null,$.error=j.message}return $})},F=z.useMemo(()=>qx(H=>{c(Yc(H)!==_)},100),[_]),Q=H=>{const R=H.target.value;L(R),F(R)},G=async()=>{if(!(!s.data||s.error||f)){d(!0);try{const H=await B.put("/config",s.data),R=H.raw||JSON.stringify(H.data,null,2);l(R),o({raw:R,data:H.data??null,error:null}),c(!1),n.success("Config saved."),await t()}catch(H){n.error(`Save failed: ${H.message}`)}finally{d(!1)}}},q=async()=>{try{const H=await B.get("/diagnostics");x(H)}catch(H){n.error(`Diagnostics load failed: ${H.message}`)}};z.useEffect(()=>{m&&!E&&q()},[m]);const oe=async()=>{const H={generatedAt:new Date().toISOString(),diagnostics:E,config:s.data,opencodeJsonPath:g},R=new Blob([JSON.stringify(H,null,2)],{type:"application/json"}),$=URL.createObjectURL(R),j=document.createElement("a");j.href=$,j.download=`bizar-diagnostics-${new Date().toISOString().replace(/[:.]/g,"-")}.json`,j.click(),URL.revokeObjectURL($)};return a.jsxs("div",{className:"view view-config",children:[a.jsxs("header",{className:"view-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx(Sp,{size:18})," Config"]}),a.jsxs("p",{className:"view-subtitle",children:["Diagnostic snapshot below. The raw ",a.jsx("code",{children:"opencode.json"})," editor is in the Advanced section."]})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs(V,{variant:"secondary",size:"sm",onClick:q,children:[a.jsx(bp,{size:14})," Run diagnostics"]}),a.jsxs(V,{variant:"secondary",size:"sm",onClick:oe,children:[a.jsx(zx,{size:14})," Download bundle"]})]})]}),a.jsx(CS,{diagnostics:E,loading:!E,onReload:q}),a.jsxs(re,{className:"config-advanced",children:[a.jsxs("button",{type:"button",className:"config-advanced-head",onClick:()=>k(H=>!H),children:[m?a.jsx(hp,{size:14}):a.jsx(pp,{size:14}),a.jsx("strong",{children:"Advanced"}),a.jsx("span",{className:"muted",children:"— opencode.json editor · providers · MCPs · debug log"})]}),m&&a.jsxs("div",{className:"config-advanced-body",children:[a.jsxs("div",{className:"config-advanced-tabs",children:[a.jsxs("button",{type:"button",className:ae("tab",v==="config"&&"tab-active"),onClick:()=>b("config"),children:[a.jsx(Px,{size:12})," OpenCode config"]}),a.jsxs("button",{type:"button",className:ae("tab",v==="providers"&&"tab-active"),onClick:()=>b("providers"),children:[a.jsx(cu,{size:12})," Providers"]}),a.jsxs("button",{type:"button",className:ae("tab",v==="mcps"&&"tab-active"),onClick:()=>b("mcps"),children:[a.jsx(wp,{size:12})," MCPs"]}),a.jsxs("button",{type:"button",className:ae("tab",v==="log"&&"tab-active"),onClick:()=>b("log"),children:[a.jsx(dp,{size:12})," Debug log"]})]}),v==="config"&&a.jsxs("div",{children:[a.jsxs("div",{className:"view-actions",style:{marginBottom:12},children:[a.jsxs(V,{variant:"secondary",size:"sm",onClick:N,children:[a.jsx(vt,{size:14})," Reload from disk"]}),a.jsxs(V,{variant:"primary",size:"sm",disabled:!s.data||!!s.error||!u,onClick:G,children:[f?a.jsx("span",{className:"btn-spinner"}):a.jsx(Bl,{size:14}),"Save"]})]}),a.jsxs("div",{className:"config-grid",children:[a.jsxs(re,{children:[a.jsx(ce,{children:"JSON tree"}),a.jsx(Ce,{children:"Parsed from current editor"}),a.jsx("div",{className:"json-tree",children:s.data!=null?a.jsx(jS,{value:s.data}):a.jsx("span",{className:"muted",children:s.error?"Invalid JSON":"No data"})})]}),a.jsxs(re,{children:[a.jsx(ce,{children:"Raw JSON"}),a.jsx(Ce,{children:s.error?a.jsx("span",{className:"text-error",children:s.error}):a.jsx("span",{className:"muted",children:"Live validation as you type"})}),a.jsx("textarea",{ref:P,className:ae("textarea config-textarea",s.error&&"invalid"),spellCheck:!1,value:s.raw,onChange:Q})]})]})]}),v==="providers"&&a.jsx(NS,{providers:y,onChange:p}),v==="mcps"&&a.jsx(bS,{mcps:S,onChange:w}),v==="log"&&a.jsx(ES,{})]})]})]})}function CS({diagnostics:e,loading:t,onReload:n}){return a.jsxs(re,{className:"diagnostics-card",children:[a.jsxs(ce,{children:[a.jsx(bp,{size:14})," Diagnostics"]}),a.jsxs(Ce,{children:["System health, file counts, recent errors."," ",a.jsx("button",{type:"button",className:"link-btn",onClick:n,children:"Refresh"})]}),t&&a.jsx("p",{className:"muted",children:"Loading diagnostics…"}),e&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"diagnostics-grid",children:[a.jsxs("div",{className:"diagnostic-tile",children:[a.jsx("div",{className:"diagnostic-tile-label",children:"Version"}),a.jsx("div",{className:"diagnostic-tile-value mono",children:e.version})]}),a.jsxs("div",{className:"diagnostic-tile",children:[a.jsx("div",{className:"diagnostic-tile-label",children:"Uptime"}),a.jsxs("div",{className:"diagnostic-tile-value mono",children:[e.uptime,"s"]})]}),a.jsxs("div",{className:"diagnostic-tile",children:[a.jsx("div",{className:"diagnostic-tile-label",children:"Node"}),a.jsx("div",{className:"diagnostic-tile-value mono",children:e.nodeVersion})]}),a.jsxs("div",{className:"diagnostic-tile",children:[a.jsx("div",{className:"diagnostic-tile-label",children:"Platform"}),a.jsx("div",{className:"diagnostic-tile-value mono",children:e.platform})]}),a.jsxs("div",{className:"diagnostic-tile",children:[a.jsx("div",{className:"diagnostic-tile-label",children:"Memory (heap)"}),a.jsxs("div",{className:"diagnostic-tile-value mono",children:[Math.round(e.memory.heapUsed/1024/1024),"MB"]})]}),a.jsxs("div",{className:"diagnostic-tile",children:[a.jsx("div",{className:"diagnostic-tile-label",children:"Memory (RSS)"}),a.jsxs("div",{className:"diagnostic-tile-value mono",children:[Math.round(e.memory.rss/1024/1024),"MB"]})]}),a.jsxs("div",{className:"diagnostic-tile",children:[a.jsx("div",{className:"diagnostic-tile-label",children:"Service"}),a.jsx("div",{className:"diagnostic-tile-value",children:e.service.running?a.jsxs("span",{className:"tag tag-success",children:["running (pid ",e.service.pid,")"]}):a.jsx("span",{className:"tag tag-neutral",children:"stopped"})})]}),a.jsxs("div",{className:"diagnostic-tile",children:[a.jsx("div",{className:"diagnostic-tile-label",children:"Active project"}),a.jsx("div",{className:"diagnostic-tile-value mono",children:e.counts.activeProject||"—"})]})]}),a.jsxs("div",{className:"diagnostic-counts",children:[a.jsxs("span",{children:["agents: ",a.jsx("strong",{children:e.counts.agents})]}),a.jsxs("span",{children:["projects: ",a.jsx("strong",{children:e.counts.projects})]}),a.jsxs("span",{children:["mods: ",a.jsx("strong",{children:e.counts.mods})]}),a.jsxs("span",{children:["schedules: ",a.jsx("strong",{children:e.counts.schedules})]}),a.jsxs("span",{children:["tasks: ",a.jsx("strong",{children:e.counts.tasks})]}),a.jsxs("span",{children:["providers: ",a.jsx("strong",{children:e.counts.providers})]}),a.jsxs("span",{children:["mcps: ",a.jsx("strong",{children:e.counts.mcps})]})]}),a.jsxs("div",{className:"diagnostic-errors",children:[a.jsxs("div",{className:"muted",children:["Last ",e.errors.length," errors from service.log"]}),e.errors.length===0?a.jsx("p",{className:"muted",children:"No errors recorded."}):a.jsx("ul",{children:e.errors.map((r,i)=>a.jsxs("li",{className:"mono",children:[r.ts&&a.jsxs("span",{className:"muted",children:["[",r.ts,"] "]}),r.line]},i))})]})]})]})}function NS({providers:e,onChange:t}){const n=dt(),r=()=>{const l=(prompt("Provider id (a-z, 0-9, dashes):")||"").trim();if(!l)return;if(e.find(d=>d.id===l)){n.error(`Provider "${l}" exists.`);return}const s=prompt("Display name:",l)||l,o=prompt("Base URL:","")||"",u=prompt("API key:","")||"",f=(prompt("Models (comma-separated):","")||"").split(",").map(d=>d.trim()).filter(Boolean);B.post("/config/providers",{id:l,name:s,baseURL:o,apiKey:u,models:f,enabled:!0}).then(d=>{t([...e,d]),n.success("Provider added.")}).catch(d=>n.error(`Add failed: ${d.message}`))},i=async l=>{if(confirm(`Remove provider "${l}"?`))try{await B.del(`/config/providers/${encodeURIComponent(l)}`),t(e.filter(s=>s.id!==l)),n.success("Provider removed.")}catch(s){n.error(`Remove failed: ${s.message}`)}};return a.jsxs("div",{children:[a.jsx("div",{className:"view-actions",style:{marginBottom:12},children:a.jsxs(V,{variant:"primary",size:"sm",onClick:r,children:[a.jsx(Dt,{size:14})," Add provider"]})}),e.length===0?a.jsx("p",{className:"muted",children:"No providers configured. Add one to register an AI provider."}):a.jsx("div",{className:"provider-list",children:e.map(l=>a.jsxs(re,{className:"provider-row",children:[a.jsxs("div",{className:"provider-row-head",children:[a.jsxs("div",{children:[a.jsx("div",{className:"provider-name",children:l.name}),a.jsx("div",{className:"provider-id mono",children:l.id})]}),a.jsx("div",{className:"provider-actions",children:a.jsx("button",{type:"button",className:"icon-btn icon-btn-danger","aria-label":"Remove",title:"Remove",onClick:()=>i(l.id),children:a.jsx(jn,{size:12})})})]}),a.jsxs("div",{className:"provider-meta",children:[a.jsxs("div",{children:[a.jsx("span",{className:"muted",children:"Base URL:"})," ",a.jsx("code",{children:l.baseURL||"—"})]}),a.jsxs("div",{children:[a.jsx("span",{className:"muted",children:"API key:"})," ",a.jsx("code",{children:l.apiKey||"—"})]}),a.jsxs("div",{children:[a.jsx("span",{className:"muted",children:"Models:"})," ",(l.models||[]).join(", ")||"—"]})]})]},l.id))})]})}function bS({mcps:e,onChange:t}){const n=dt(),r=()=>{const l=(prompt("MCP id (a-z, 0-9, dashes):")||"").trim();if(!l)return;if(e.find(c=>c.id===l)){n.error(`MCP "${l}" exists.`);return}const s=prompt("Command (e.g. npx):","npx")||"",u=(prompt("Args (space-separated):","")||"").split(/\s+/).filter(Boolean);B.post("/config/mcps",{id:l,command:s,args:u,env:{},enabled:!0}).then(c=>{t([...e,c]),n.success("MCP added.")}).catch(c=>n.error(`Add failed: ${c.message}`))},i=async l=>{if(confirm(`Remove MCP "${l}"?`))try{await B.del(`/config/mcps/${encodeURIComponent(l)}`),t(e.filter(s=>s.id!==l)),n.success("MCP removed.")}catch(s){n.error(`Remove failed: ${s.message}`)}};return a.jsxs("div",{children:[a.jsx("div",{className:"view-actions",style:{marginBottom:12},children:a.jsxs(V,{variant:"primary",size:"sm",onClick:r,children:[a.jsx(Dt,{size:14})," Add MCP"]})}),e.length===0?a.jsx("p",{className:"muted",children:"No MCPs configured."}):a.jsx("div",{className:"mcp-list",children:e.map(l=>a.jsxs(re,{className:"mcp-row",children:[a.jsxs("div",{className:"mcp-row-head",children:[a.jsx("div",{className:"mcp-name",children:l.id}),a.jsx("button",{type:"button",className:"icon-btn icon-btn-danger","aria-label":"Remove",title:"Remove",onClick:()=>i(l.id),children:a.jsx(jn,{size:12})})]}),a.jsx("div",{className:"mcp-meta",children:a.jsxs("code",{children:[l.command," ",(l.args||[]).join(" ")]})})]},l.id))})]})}function ES(){const[e,t]=z.useState([]),[n,r]=z.useState(100),[i,l]=z.useState(!0),[s,o]=z.useState(!1),[u,c]=z.useState(null),[f,d]=z.useState([]),g=z.useRef(null),h=z.useRef(null),m=async y=>{try{const p=await B.get(`/diagnostics/logs?tail=${y}`);t(p.lines||[]),c(p.file),d(p.lines||[])}catch{t(["(failed to load logs)"]),d(["(failed to load logs)"])}},k=()=>{const y=window.location.protocol==="https:"?"wss:":"ws:",p=new WebSocket(`${y}//${window.location.host}/ws/logs`);h.current=p,p.onopen=()=>o(!0),p.onclose=()=>{o(!1),setTimeout(k,3e3)},p.onerror=()=>{o(!1)},p.onmessage=S=>{try{const w=JSON.parse(S.data);w.type==="log init"?(t(w.lines||[]),d(w.lines||[]),c(w.file)):w.type==="log line"&&(t(v=>[...v.slice(-(n*2)),w.line]),d(v=>[...v.slice(-(n*2)),w.line]))}catch{}}};z.useEffect(()=>(m(n),k(),()=>{var y;(y=h.current)==null||y.close()}),[]),z.useEffect(()=>{i&&g.current&&(g.current.scrollTop=g.current.scrollHeight)},[f,i]);const E=()=>{d([])},x=[50,100,500,1e3];return a.jsxs("div",{className:"debug-log-panel",children:[a.jsxs("div",{className:"debug-log-toolbar",children:[a.jsxs("span",{className:"muted",style:{fontSize:11},children:[s?a.jsx("span",{className:"tag tag-success",style:{fontSize:10},children:"live"}):a.jsx("span",{className:"tag tag-neutral",style:{fontSize:10},children:"disconnected"})," ","log: ",a.jsx("code",{children:u?u.split("/").pop():"none"})]}),a.jsxs("div",{className:"debug-log-controls",children:[a.jsx("span",{className:"muted",style:{fontSize:11},children:"Lines:"}),x.map(y=>a.jsx("button",{type:"button",className:ae("tag",n===y&&"tag-active"),onClick:()=>{r(y),m(y)},children:y},y)),a.jsx("button",{type:"button",className:ae("tag",i&&"tag-active"),onClick:()=>l(y=>!y),children:"Auto-scroll"}),a.jsx(V,{variant:"ghost",size:"sm",onClick:E,children:"Clear"}),a.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>m(n),children:[a.jsx(vt,{size:12})," Reload"]})]})]}),a.jsx("div",{className:"debug-log-list",ref:g,children:f.length===0?a.jsx("p",{className:"muted",style:{padding:12},children:u?"(log is empty)":"No log file found. The service log is at ~/.config/bizar/service.log"}):f.map((y,p)=>a.jsx("div",{className:"debug-log-line mono",children:y},p))})]})}const zS=[{id:"dark",label:"Dark",Icon:_x},{id:"light",label:"Light",Icon:Ux},{id:"system",label:"System",Icon:Rx}],PS=["Inter","system-ui","Segoe UI","Roboto","JetBrains Mono","SF Mono","Cascadia Code"],TS=[{id:"topnav",label:"Top nav"},{id:"sidebar",label:"Sidebar"},{id:"both",label:"Both"}];function IS({settings:e,refreshSnapshot:t}){const n=dt(),[r,i]=z.useState(e),[l,s]=z.useState(!1),[o,u]=z.useState(!1),[c,f]=z.useState(null);z.useEffect(()=>{i(e),s(!1),e.theme&&Yn(e.theme)},[e]),z.useEffect(()=>{B.get("/tailscale/status").then(f).catch(()=>{})},[]);const d=p=>{i(S=>{const w={...S,theme:{...S.theme,...p}};return Yn(w.theme),w}),s(!0)},g=p=>{i(S=>({...S,ui:{...S.ui,...p}})),s(!0)},h=(p,S)=>{i(w=>({...w,[p]:S})),s(!0)},m=async()=>{u(!0);try{const p=await B.put("/settings",r);i(p.data),s(!1),ei(p.data.theme),Yn(p.data.theme),n.success("Settings saved."),await t()}catch(p){n.error(`Save failed: ${p.message}`)}finally{u(!1)}},k=async()=>{try{const p=await B.get("/settings");i(p.data),s(!1),ei(p.data.theme),Yn(p.data.theme),n.info("Settings reloaded.",1500)}catch(p){n.error(`Reload failed: ${p.message}`)}},E=async()=>{if(confirm("Reset all settings to defaults?"))try{const p=await B.post("/settings/reset");i(p.data),s(!1),ei(p.data.theme),Yn(p.data.theme),n.success("Settings reset."),await t()}catch(p){n.error(`Reset failed: ${p.message}`)}},x=async()=>{try{c!=null&&c.settings.enabled?(await B.post("/tailscale/disable"),n.success("Tailscale serve disabled.")):(await B.post("/tailscale/enable",{port:(c==null?void 0:c.settings.port)||4321,https:(c==null?void 0:c.settings.https)!==!1,hostname:(c==null?void 0:c.settings.hostname)||""}),n.success("Tailscale serve enabled."));const p=await B.get("/tailscale/status");f(p)}catch(p){n.error(`Tailscale failed: ${p.message}`)}},y=r.about||{version:"3.0.0",homepage:"https://github.com/DrB0rk/BizarHarness",license:"MIT"};return a.jsxs("div",{className:"view view-settings",children:[a.jsxs("header",{className:"view-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx(Cp,{size:18})," Settings"]}),a.jsxs("p",{className:"view-subtitle",children:["Personal preferences. Changes are saved to"," ",a.jsx("code",{children:"~/.config/bizar/settings.json"}),"."]})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs(V,{variant:"ghost",size:"sm",onClick:E,children:[a.jsx(Ox,{size:14})," Reset"]}),a.jsxs(V,{variant:"secondary",size:"sm",onClick:k,children:[a.jsx(vt,{size:14})," Reload"]}),a.jsxs(V,{variant:"primary",size:"sm",disabled:!l||o,onClick:m,children:[o?a.jsx("span",{className:"btn-spinner"}):a.jsx(Bl,{size:14}),o?"Saving…":"Save"]})]})]}),a.jsxs("div",{className:"settings-grid",children:[a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(Dx,{size:14})," Theme"]}),a.jsx(Ce,{children:"Mode, accent, and colors. Live preview as you tweak."}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",children:"Mode"}),a.jsx("div",{className:"theme-row",children:zS.map(({id:p,label:S,Icon:w})=>{const v=r.theme.mode===p;return a.jsxs("button",{type:"button",className:ae("theme-card",v&&"theme-card-active"),onClick:()=>d({mode:p}),children:[a.jsx(w,{size:16}),a.jsx("span",{className:"theme-card-label",children:S}),a.jsx("span",{className:ae("theme-card-swatch",`theme-card-swatch-${p}`)})]},p)})})]}),a.jsxs("div",{className:"theme-colors",children:[a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",children:"Accent"}),a.jsxs("div",{className:"color-row",children:[a.jsx("input",{type:"color",className:"input color-input",value:r.theme.accent,onChange:p=>d({accent:p.target.value})}),a.jsx("input",{type:"text",className:"input",value:r.theme.accent,onChange:p=>d({accent:p.target.value})})]})]}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",children:"Success"}),a.jsxs("div",{className:"color-row",children:[a.jsx("input",{type:"color",className:"input color-input",value:r.theme.success,onChange:p=>d({success:p.target.value})}),a.jsx("input",{type:"text",className:"input",value:r.theme.success,onChange:p=>d({success:p.target.value})})]})]}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",children:"Warning"}),a.jsxs("div",{className:"color-row",children:[a.jsx("input",{type:"color",className:"input color-input",value:r.theme.warning,onChange:p=>d({warning:p.target.value})}),a.jsx("input",{type:"text",className:"input",value:r.theme.warning,onChange:p=>d({warning:p.target.value})})]})]}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",children:"Error"}),a.jsxs("div",{className:"color-row",children:[a.jsx("input",{type:"color",className:"input color-input",value:r.theme.error,onChange:p=>d({error:p.target.value})}),a.jsx("input",{type:"text",className:"input",value:r.theme.error,onChange:p=>d({error:p.target.value})})]})]}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",children:"Info"}),a.jsxs("div",{className:"color-row",children:[a.jsx("input",{type:"color",className:"input color-input",value:r.theme.info,onChange:p=>d({info:p.target.value})}),a.jsx("input",{type:"text",className:"input",value:r.theme.info,onChange:p=>d({info:p.target.value})})]})]})]}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",children:"Font family"}),a.jsx("select",{className:"select",value:r.theme.fontFamily,onChange:p=>d({fontFamily:p.target.value}),children:PS.map(p=>a.jsx("option",{value:p,children:p},p))})]}),a.jsxs("div",{className:"field",children:[a.jsxs("label",{className:"field-label",children:["Font size: ",r.theme.fontSize,"px"]}),a.jsx("input",{type:"range",min:12,max:20,value:r.theme.fontSize,onChange:p=>d({fontSize:Number(p.target.value)})})]}),a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:r.theme.compactMode,onChange:p=>d({compactMode:p.target.checked})}),a.jsx("span",{children:"Compact mode (denser UI)"})]}),a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:r.theme.animations,onChange:p=>d({animations:p.target.checked})}),a.jsx("span",{children:"Enable animations"})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(Fx,{size:14})," UI layout"]}),a.jsx(Ce,{children:"Choose how the dashboard's navigation is presented."}),a.jsx("div",{className:"layout-row",children:TS.map(p=>a.jsx("button",{type:"button",className:ae("layout-card",r.ui.layout===p.id&&"layout-card-active"),onClick:()=>g({layout:p.id}),children:a.jsx("span",{className:"layout-card-label",children:p.label})},p.id))}),a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:r.ui.showHeader,onChange:p=>g({showHeader:p.target.checked})}),a.jsx("span",{children:"Show header"})]}),a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:r.ui.showStatusBar,onChange:p=>g({showStatusBar:p.target.checked})}),a.jsx("span",{children:"Show status bar"})]}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",children:"Default tab"}),a.jsxs("select",{className:"select",value:r.ui.defaultTab,onChange:p=>g({defaultTab:p.target.value}),children:[a.jsx("option",{value:"overview",children:"Overview"}),a.jsx("option",{value:"chat",children:"Chat"}),a.jsx("option",{value:"agents",children:"Agents"}),a.jsx("option",{value:"plans",children:"Plans"}),a.jsx("option",{value:"projects",children:"Projects"}),a.jsx("option",{value:"tasks",children:"Tasks"}),a.jsx("option",{value:"config",children:"Config"}),a.jsx("option",{value:"settings",children:"Settings"}),a.jsx("option",{value:"mods",children:"Mods"}),a.jsx("option",{value:"schedules",children:"Schedules"})]})]})]}),a.jsxs(re,{children:[a.jsx(ce,{children:"General"}),a.jsx(Ce,{children:"Default agent + model override."}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",htmlFor:"set-default-agent",children:"Default agent"}),a.jsx("input",{id:"set-default-agent",className:"input",type:"text",placeholder:"e.g. odin",value:r.defaultAgent||"",onChange:p=>h("defaultAgent",p.target.value)})]}),a.jsxs("div",{className:"field",children:[a.jsx("label",{className:"field-label",htmlFor:"set-default-model",children:"Model override"}),a.jsx("input",{id:"set-default-model",className:"input",type:"text",placeholder:"(leave empty for provider default)",value:r.defaultModel||"",onChange:p=>h("defaultModel",p.target.value)})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(cu,{size:14})," Service"]}),a.jsx(Ce,{children:"Background daemon that runs schedules."}),c?a.jsxs("div",{className:"service-card",children:[a.jsxs("p",{children:["Status: ",a.jsx("strong",{children:c!=null&&c.settings.enabled?"enabled":"disabled"})," ","· Tailscale installed: ",a.jsx("strong",{children:c.installed?"yes":"no"})," ","· authenticated: ",a.jsx("strong",{children:c.authenticated?"yes":"no"})]}),a.jsxs("p",{className:"muted",children:["Use ",a.jsx("code",{children:"bizar service start"})," / ",a.jsx("code",{children:"bizar service stop"})," in your terminal to control the daemon."]})]}):a.jsx("p",{className:"muted",children:"Loading service status…"})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(wp,{size:14})," Tailscale serve"]}),a.jsx(Ce,{children:"Expose the dashboard over your Tailscale network."}),c?a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["Installed: ",a.jsx("strong",{children:c.installed?"yes":"no"})," ",c.version&&a.jsxs("span",{className:"muted",children:["(",c.version,")"]})]}),a.jsxs("p",{children:["Authenticated: ",a.jsx("strong",{children:c.authenticated?"yes":"no"})]}),a.jsxs("p",{children:["Serve enabled: ",a.jsx("strong",{children:c.settings.enabled?"yes":"no"})]}),a.jsxs("div",{className:"task-form-row",children:[a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Port"}),a.jsx("input",{type:"number",className:"input",defaultValue:c.settings.port,onChange:p=>{}})]}),a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Use HTTPS"}),a.jsx("input",{type:"checkbox",defaultChecked:c.settings.https===!0})]})]}),a.jsx(V,{variant:"primary",onClick:x,children:c.settings.enabled?"Disable serve":"Enable serve"})]}):a.jsx("p",{className:"muted",children:"Loading Tailscale status…"})]}),a.jsxs(re,{children:[a.jsx(ce,{children:"Notifications"}),a.jsx(Ce,{children:"Toast triggers inside the dashboard."}),a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:!!r.notifications.onAgentComplete,onChange:p=>i(S=>({...S,notifications:{...S.notifications,onAgentComplete:p.target.checked}}))}),a.jsx("span",{children:"Notify when an agent invocation completes"})]}),a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:!!r.notifications.onPlanApproval,onChange:p=>i(S=>({...S,notifications:{...S.notifications,onPlanApproval:p.target.checked}}))}),a.jsx("span",{children:"Notify when a plan needs approval"})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(Xa,{size:14})," Dashboard"]}),a.jsxs(Ce,{children:["Controls how ",a.jsx("code",{children:"bizar"})," starts up."]}),a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:r.dashboard.autoLaunchWeb!==!1,onChange:p=>i(S=>({...S,dashboard:{...S.dashboard,autoLaunchWeb:p.target.checked}}))}),a.jsx("span",{children:"Auto-launch web UI alongside TUI"})]})]})]}),a.jsxs(re,{children:[a.jsxs(ce,{children:[a.jsx(xp,{size:14})," About"]}),a.jsx(Ce,{children:"Build metadata."}),a.jsxs("dl",{className:"about-table",children:[a.jsx("dt",{children:"Version"}),a.jsx("dd",{className:"mono",children:y.version}),a.jsx("dt",{children:"Homepage"}),a.jsx("dd",{children:a.jsx("a",{href:y.homepage,target:"_blank",rel:"noopener noreferrer",children:y.homepage})}),a.jsx("dt",{children:"License"}),a.jsx("dd",{children:y.license})]})]})]})}function LS({snapshot:e,refreshSnapshot:t}){const n=dt(),r=Vn(),[i,l]=z.useState(e.mods||[]),[s,o]=z.useState(!e.mods),[u,c]=z.useState(null),[f,d]=z.useState([]),[g,h]=z.useState(null),m=async()=>{try{const p=await B.get("/mods");l(p.mods||[]);const S=await B.get("/mods/views");d(S.views||[])}catch(p){n.error(`Mods load failed: ${p.message}`)}finally{o(!1)}};z.useEffect(()=>{var p;if((p=e.mods)!=null&&p.length||e.mods){l(e.mods||[]),o(!1);return}m()},[e.mods]),z.useEffect(()=>{m()},[]);const k=()=>{let p=null;r.open({title:"Install mod",children:a.jsxs("div",{children:[a.jsxs("p",{className:"muted",children:["Provide the absolute path to a mod folder (one that contains a ",a.jsx("code",{children:"mod.json"}),"). The folder will be copied to"," ",a.jsx("code",{children:"~/.config/bizar/mods/<id>/"}),"."]}),a.jsx("label",{className:"field-label",children:"Path"}),a.jsx("input",{ref:S=>p=S,className:"input",type:"text",placeholder:"/path/to/my-mod",autoFocus:!0})]}),footer:a.jsxs("div",{className:"modal-footer-actions",children:[a.jsx(V,{variant:"ghost",onClick:()=>r.close(),children:"Cancel"}),a.jsx(V,{variant:"primary",onClick:async()=>{const S=((p==null?void 0:p.value)||"").trim();if(!S){n.warning("Path is required.");return}try{const w=await B.post("/mods",{path:S});l(v=>[...v,w]),n.success(`Mod "${w.id}" installed.`),r.close(),await t()}catch(w){n.error(`Install failed: ${w.message}`)}},children:"Install"})]})})},E=async p=>{if(confirm(`Uninstall mod "${p}"? This removes the folder from ~/.config/bizar/mods/.`))try{await B.del(`/mods/${encodeURIComponent(p)}`),l(S=>S.filter(w=>w.id!==p)),u===p&&c(null),n.success("Mod uninstalled.")}catch(S){n.error(`Uninstall failed: ${S.message}`)}},x=async p=>{try{const S=await B.put(`/mods/${encodeURIComponent(p.id)}`,{enabled:!p.enabled});l(w=>w.map(v=>v.id===p.id?S:v)),n.success(`Mod ${S.enabled?"enabled":"disabled"}.`)}catch(S){n.error(`Toggle failed: ${S.message}`)}},y=i.find(p=>p.id===u)||null;return s?a.jsx("div",{className:"view-loading",children:a.jsx(_t,{size:"lg"})}):a.jsxs("div",{className:"view view-mods",children:[a.jsxs("header",{className:"view-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx(Ja,{size:18})," Mods (",i.length,")"]}),a.jsxs("p",{className:"view-subtitle",children:["Extensions installed in ",a.jsx("code",{children:"~/.config/bizar/mods/"}),". Mods can add agents, commands, routes, and views."]})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs(V,{variant:"secondary",size:"sm",onClick:m,children:[a.jsx(vt,{size:14})," Refresh"]}),a.jsxs(V,{variant:"primary",size:"sm",onClick:k,children:[a.jsx(Dt,{size:14})," Install mod"]})]})]}),i.length===0?a.jsx(xn,{icon:a.jsx(Ja,{size:32}),title:"No mods installed",message:"Mods are folders with a mod.json. Install one to extend Bizar with custom agents, commands, and views."}):a.jsxs("div",{className:"mods-layout",children:[a.jsx("div",{className:"mods-list",children:i.map(p=>a.jsxs("div",{className:ae("mod-list-item",u===p.id&&"mod-list-item-active"),onClick:()=>c(p.id),children:[a.jsxs("div",{className:"mod-list-item-head",children:[a.jsxs("div",{children:[a.jsx("div",{className:"mod-list-item-name",children:p.name}),a.jsxs("div",{className:"mod-list-item-meta",children:["v",p.version," · ",p.type," · ",p.author]})]}),a.jsxs("div",{className:"mod-list-item-actions",onClick:S=>S.stopPropagation(),children:[a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Toggle enabled",title:p.enabled?"Disable":"Enable",onClick:()=>x(p),children:a.jsx(jp,{size:12})}),a.jsx("button",{type:"button",className:"icon-btn icon-btn-danger","aria-label":"Uninstall",title:"Uninstall",onClick:()=>E(p.id),children:a.jsx(jn,{size:12})})]})]}),a.jsx("div",{className:"mod-list-item-desc ellipsis-2",title:p.description,children:p.description}),a.jsx("div",{className:"mod-list-item-status",children:a.jsx("span",{className:`mod-mini-pill ${p.enabled?"mod-mini-pill-on":"mod-mini-pill-off"}`,children:p.enabled?"enabled":"disabled"})})]},p.id))}),y&&a.jsx(MS,{mod:y})]}),f.length>0&&a.jsxs("div",{className:"mods-views-section",children:[a.jsxs("h3",{className:"view-subtitle",children:[a.jsx(Xa,{size:14})," Mod views"]}),a.jsx("div",{className:"mods-views-grid",children:f.map(p=>a.jsx(re,{className:"mod-view-card",children:a.jsxs("div",{className:"mod-view-card-head",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"mod-view-label",children:[p.kind==="tab"?a.jsx(Lx,{size:12}):a.jsx(Xa,{size:12}),p.label]}),a.jsxs("div",{className:"mod-view-mod muted",children:["by ",p.modId]}),p.description&&a.jsx("div",{className:"mod-view-desc muted ellipsis-2",children:p.description})]}),a.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>{p.kind==="iframe"&&p.path?h(`/api/mods/${p.modId}/web/index.html`):n.info(`Tab view for "${p.label}" — full TSX loading lands in v3.1.`,2500)},children:[a.jsx(gp,{size:12})," Open"]})]})},p.id))})]}),g&&a.jsxs("div",{className:"mod-iframe-panel",children:[a.jsxs("div",{className:"mod-iframe-header",children:[a.jsxs("span",{children:["Mod view — ",a.jsx("a",{href:g,target:"_blank",rel:"noreferrer",children:g})]}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close iframe",onClick:()=>h(null),children:a.jsx(Pi,{size:14})})]}),a.jsx("iframe",{src:g,className:"mod-iframe",title:"Mod view",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups"})]})]})}function MS({mod:e}){return a.jsxs(re,{className:"mod-details",children:[a.jsxs(ce,{children:[a.jsx(yp,{size:14})," Mod details — ",e.name]}),a.jsx(Ce,{children:a.jsx("code",{children:e.path})}),a.jsxs("dl",{className:"env-table",children:[a.jsx("dt",{children:"ID"}),a.jsx("dd",{className:"mono",children:e.id}),a.jsx("dt",{children:"Version"}),a.jsx("dd",{className:"mono",children:e.version}),a.jsx("dt",{children:"Type"}),a.jsx("dd",{className:"mono",children:e.type}),a.jsx("dt",{children:"Author"}),a.jsx("dd",{className:"mono",children:e.author||"—"}),a.jsx("dt",{children:"Bizar"}),a.jsx("dd",{className:"mono",children:e.bizar||"*"}),a.jsx("dt",{children:"Enabled"}),a.jsx("dd",{children:e.enabled?"yes":"no"}),a.jsx("dt",{children:"Permissions"}),a.jsxs("dd",{children:[(e.permissions||[]).map(t=>a.jsx("span",{className:"tag",children:t},t)),(e.permissions||[]).length===0&&a.jsx("span",{className:"muted",children:"(none)"})]})]}),a.jsxs("div",{className:"mod-files",children:[a.jsx("div",{className:"muted",children:"Files"}),a.jsx("ul",{children:(e.files||[]).map(t=>a.jsxs("li",{children:[a.jsx("span",{className:"mod-file-cat",children:t.category}),a.jsx("span",{className:"mono",children:t.path})]},t.path))})]})]})}const AS=["interval","cron","once"],RS=["command","agent","webhook"];function _S({snapshot:e,refreshSnapshot:t}){var g;const n=dt(),r=Vn(),[i,l]=z.useState(e.schedules||[]),[s,o]=z.useState(!e.schedules),u=async()=>{try{const h=await B.get("/projects/active/schedules");l(h.schedules||[])}catch(h){n.error(`Schedules load failed: ${h.message}`)}finally{o(!1)}};z.useEffect(()=>{var h;if((h=e.schedules)!=null&&h.length||e.schedules){l(e.schedules||[]),o(!1);return}u()},[e.schedules]);const c=()=>{let h=null,m=null,k=null,E=null,x=null,y=null;r.open({title:"New schedule",children:a.jsxs("div",{className:"schedule-form",children:[a.jsx("label",{className:"field-label",children:"Name"}),a.jsx("input",{ref:p=>h=p,className:"input",type:"text",placeholder:"Daily backup",autoFocus:!0}),a.jsxs("div",{className:"task-form-row",children:[a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Type"}),a.jsx("select",{ref:p=>m=p,className:"select",defaultValue:"interval",children:AS.map(p=>a.jsx("option",{value:p,children:p},p))})]}),a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Schedule"}),a.jsx("input",{ref:p=>k=p,className:"input",type:"text",placeholder:"30m | 0 0 * * * | 2026-12-31T00:00:00Z"})]})]}),a.jsxs("div",{className:"task-form-row",children:[a.jsxs("div",{className:"task-form-field",children:[a.jsx("label",{className:"field-label",children:"Action"}),a.jsx("select",{ref:p=>E=p,className:"select",defaultValue:"command",children:RS.map(p=>a.jsx("option",{value:p,children:p},p))})]}),a.jsxs("div",{className:"task-form-field",style:{flex:2},children:[a.jsx("label",{className:"field-label",children:"Target"}),a.jsx("input",{ref:p=>x=p,className:"input",type:"text",placeholder:"echo hi | thor | https://..."})]})]}),a.jsxs("label",{className:"checkbox-row",children:[a.jsx("input",{ref:p=>y=p,type:"checkbox",defaultChecked:!0}),a.jsx("span",{children:"Enabled"})]})]}),footer:a.jsxs("div",{className:"modal-footer-actions",children:[a.jsx(V,{variant:"ghost",onClick:()=>r.close(),children:"Cancel"}),a.jsx(V,{variant:"primary",onClick:async()=>{const p=((h==null?void 0:h.value)||"").trim(),S=(m==null?void 0:m.value)||"interval",w=((k==null?void 0:k.value)||"").trim(),v=(E==null?void 0:E.value)||"command",b=((x==null?void 0:x.value)||"").trim();if(!p)return n.warning("Name is required.");if(!w)return n.warning("Schedule is required.");if(!b)return n.warning("Action target is required.");try{const P=await B.post("/schedules",{name:p,type:S,schedule:w,enabled:(y==null?void 0:y.checked)!==!1,action:{type:v,target:b}});l(_=>[..._,P]),n.success("Schedule created."),r.close(),await t()}catch(P){n.error(`Create failed: ${P.message}`)}},children:"Create"})]})})},f=async h=>{var m;try{const k=await B.post(`/schedules/${encodeURIComponent(h.id)}/run`);n.success(k.ok?"Schedule ran.":`Run failed: ${((m=k.runResult)==null?void 0:m.error)||"unknown"}`),await u()}catch(k){n.error(`Run failed: ${k.message}`)}},d=async h=>{if(confirm(`Delete schedule "${h.name}"?`))try{await B.del(`/schedules/${encodeURIComponent(h.id)}`),l(m=>m.filter(k=>k.id!==h.id)),n.success("Schedule deleted.")}catch(m){n.error(`Delete failed: ${m.message}`)}};return s?a.jsx("div",{className:"view-loading",children:a.jsx(_t,{size:"lg"})}):a.jsxs("div",{className:"view view-schedules",children:[a.jsxs("header",{className:"view-header",children:[a.jsxs("div",{className:"view-header-text",children:[a.jsxs("h2",{className:"view-title",children:[a.jsx(jr,{size:18})," Schedules (",i.length,")"]}),a.jsxs("p",{className:"view-subtitle",children:["Recurring tasks for the active project: ",a.jsx("strong",{children:((g=e.activeProject)==null?void 0:g.name)||"(none)"}),". Service daemon runs them at the right time."]})]}),a.jsxs("div",{className:"view-actions",children:[a.jsxs(V,{variant:"secondary",size:"sm",onClick:u,children:[a.jsx(vt,{size:14})," Refresh"]}),a.jsxs(V,{variant:"primary",size:"sm",onClick:c,children:[a.jsx(Dt,{size:14})," New schedule"]})]})]}),i.length===0?a.jsx(xn,{icon:a.jsx(jr,{size:32}),title:"No schedules",message:e.activeProject?"Add a schedule to run commands, webhooks, or agent tasks on a cron / interval / one-shot basis.":"Activate a project first to scope schedules."}):a.jsx("div",{className:"schedule-grid",children:i.map(h=>a.jsxs(re,{className:"schedule-card",children:[a.jsxs("div",{className:"schedule-card-head",children:[a.jsxs("div",{children:[a.jsx("div",{className:"schedule-card-name",children:h.name}),a.jsxs("div",{className:"schedule-card-meta",children:[a.jsx("code",{children:h.type})," · ",a.jsx("code",{children:h.schedule})," ·"," ",a.jsx("span",{className:h.enabled?"status-on":"status-neutral",children:h.enabled?"enabled":"disabled"})]})]}),a.jsxs("div",{className:"schedule-card-actions",children:[a.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>f(h),children:[a.jsx(mp,{size:12})," Run now"]}),a.jsx("button",{type:"button",className:"icon-btn icon-btn-danger","aria-label":"Delete",title:"Delete",onClick:()=>d(h),children:a.jsx(jn,{size:12})})]})]}),a.jsxs("div",{className:"schedule-card-action",children:[a.jsx("span",{className:"muted",children:"action:"})," ",a.jsxs("code",{children:[h.action.type," ",h.action.target]})]}),a.jsxs("div",{className:"schedule-card-times",children:[a.jsxs("div",{children:[a.jsx("span",{className:"muted",children:"last"})," ",h.lastRun?Et(h.lastRun):"—",h.lastResult&&a.jsx("span",{className:`tag ${h.lastResult==="success"?"tag-success":"tag-error"}`,children:h.lastResult})]}),a.jsxs("div",{children:[a.jsx("span",{className:"muted",children:"next"})," ",h.nextRun?Et(h.nextRun):"—"]})]}),h.history&&h.history.length>0&&a.jsxs("details",{className:"schedule-card-history",children:[a.jsxs("summary",{children:[a.jsx(Tx,{size:12})," ",h.history.length," run",h.history.length===1?"":"s"]}),a.jsx("ul",{children:h.history.slice(-10).reverse().map((m,k)=>a.jsxs("li",{children:[a.jsx("span",{className:"tabular-nums muted",children:Et(m.ts)})," ",a.jsx("span",{className:`tag ${m.result==="success"?"tag-success":"tag-error"}`,children:m.result}),m.error&&a.jsxs("span",{className:"muted",children:[" — ",m.error]})]},k))})]})]},h.id))})]})}const DS={overview:s1,chat:nS,agents:iS,plans:sS,tasks:gS,config:SS,settings:IS,mods:LS,schedules:_S},FS="v3.0.0";function OS(){return a.jsx(e1,{children:a.jsx(Gx,{children:a.jsx($S,{})})})}function $S(){var p,S;const e=dt(),[t,n]=z.useState("overview"),[r,i]=z.useState(null),[l,s]=z.useState(null),[o,u]=z.useState("connecting"),[c,f]=z.useState(null),[d,g]=z.useState(!1),h=z.useRef(null);z.useEffect(()=>{l!=null&&l.theme&&(ei(l.theme),Yn(l.theme))},[l==null?void 0:l.theme]),z.useEffect(()=>{var b;if(((b=l==null?void 0:l.theme)==null?void 0:b.mode)!=="system")return;const w=window.matchMedia("(prefers-color-scheme: light)"),v=()=>ei(l.theme.mode);return w.addEventListener("change",v),()=>w.removeEventListener("change",v)},[(p=l==null?void 0:l.theme)==null?void 0:p.mode]),z.useEffect(()=>{let w=!1;return Promise.all([B.get("/snapshot").catch(()=>null),B.get("/settings").catch(()=>null)]).then(([v,b])=>{var P,_;w||(v&&i(v),b!=null&&b.data&&s(b.data),!v&&!b&&f("Dashboard server unreachable."),(_=(P=b==null?void 0:b.data)==null?void 0:P.ui)!=null&&_.defaultTab&&n(b.data.ui.defaultTab))}).catch(v=>{if(w)return;const b=(v==null?void 0:v.message)??"unknown error";f(b),e.error(`Failed to load: ${b}`)}),()=>{w=!0}},[e]),z.useEffect(()=>{const w=new l1;h.current=w;const v=w.onStatus(P=>u(P)),b=w.on(P=>{var _;if(P.type==="snapshot"&&"data"in P&&P.data)i(N=>({...N??{},...P.data}));else if(P.type==="change"){const N=P,L=((_=N.path)==null?void 0:_.split("/").pop())||N.path||"";e.info(`File changed: ${L}`,2500),B.get("/snapshot").then(F=>i(Q=>({...Q??{},...F}))).catch(()=>{})}else if(P.type==="tasks:change"){const N=P;i(L=>{if(!L)return L;const F=(L.tasks||[]).map(G=>G.id===N.task.id?N.task:G),Q=F.some(G=>G.id===N.task.id);return{...L,tasks:Q?F:[N.task,...F]}})}else if(P.type==="tasks:delete"){const N=P;i(L=>L&&{...L,tasks:(L.tasks||[]).filter(F=>F.id!==N.id)})}else if(P.type==="settings:change"){const N=P;N.settings&&s(N.settings)}else P.type==="project:change"?B.get("/snapshot").then(N=>i(L=>({...L??{},...N}))).catch(()=>{}):(P.type==="agents:change"||P.type==="schedules:change")&&B.get("/snapshot").then(N=>i(L=>({...L??{},...N}))).catch(()=>{})});return()=>{v(),b(),w.close()}},[e]),z.useEffect(()=>{const w={};Pp.forEach((b,P)=>{w[String(P+1)]=b.id});const v=b=>{var N,L,F,Q,G,q;if((b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="k"){b.preventDefault(),g(!0);return}if(b.key==="/"&&!b.metaKey&&!b.ctrlKey){const oe=(L=(N=b.target)==null?void 0:N.tagName)==null?void 0:L.toLowerCase();if(oe!=="input"&&oe!=="textarea"&&!((F=b.target)!=null&&F.isContentEditable)){b.preventDefault(),g(!0);return}}const P=(G=(Q=b.target)==null?void 0:Q.tagName)==null?void 0:G.toLowerCase();if(P==="input"||P==="textarea"||(q=b.target)!=null&&q.isContentEditable||b.metaKey||b.ctrlKey||b.altKey)return;const _=w[b.key];_&&(b.preventDefault(),n(_))};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[]);const m=DS[t],k=z.useMemo(()=>async()=>{try{const w=await B.get("/snapshot");i(v=>({...v??{},...w}))}catch(w){e.error(`Refresh failed: ${w.message}`)}},[e]),E=async()=>{try{const w=await B.get("/projects");i(v=>{var b;return v&&{...v,projects:w.projects||[],activeProject:((b=w.projects)==null?void 0:b.find(P=>P.id===w.active))||null}})}catch(w){e.error(`Projects refresh failed: ${w.message}`)}},x=async w=>{try{await B.post(`/projects/${encodeURIComponent(w)}/activate`),i(v=>v&&{...v,activeProject:v.projects.find(b=>b.id===w)||null})}catch(v){e.error(`Activate failed: ${v.message}`)}},y=w=>{const v=w.type;if(v==="agent")n("agents");else if(v==="task")n("tasks");else if(v==="mod")n("mods");else if(v==="schedule")n("schedules");else if(v==="project"){const b=w.item.id;x(b)}else v==="command"&&e.info(`/${w.item.name} — run from the TUI`,2500)};return a.jsxs("div",{className:"app","data-layout":((S=l==null?void 0:l.ui)==null?void 0:S.layout)||"topnav",children:[a.jsx(Kx,{activeTab:t,onTabChange:n,wsStatus:o,version:FS,activeProject:(r==null?void 0:r.activeProject)||null,projects:(r==null?void 0:r.projects)||[],onProjectChange:x,onProjectsRefresh:E,onOpenSearch:()=>g(!0)}),a.jsxs("main",{className:"content",children:[c&&a.jsxs("div",{className:"boot-error",children:[a.jsx("h2",{children:"Dashboard unavailable"}),a.jsx("p",{children:c}),a.jsxs("p",{className:"boot-error-hint",children:["Make sure the Bizar dashboard server is running. Try"," ",a.jsx("code",{children:"bizar-dash start"})," in your terminal."]})]}),!c&&(!r||!l)&&a.jsxs("div",{className:"loading",children:[a.jsx(_t,{size:"lg"}),a.jsx("p",{children:"Loading Bizar…"})]}),r&&l&&m&&a.jsx(m,{snapshot:r,settings:l,activeTab:t,setActiveTab:n,refreshSnapshot:k})]}),a.jsx(r1,{open:d,onClose:()=>g(!1),onSelect:y})]})}const Dm=document.getElementById("root");if(!Dm)throw new Error("Root element #root not found");up(Dm).render(a.jsx(z.StrictMode,{children:a.jsx(OS,{})}));
388
+ //# sourceMappingURL=index-LqQuSp9d.js.map