botnote 0.1.8 → 0.1.11

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 (38) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +1 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/db/migrations/0002_tasks_due_at.sql +1 -1
  5. package/dist/db/migrations/0015_collapse_delayed_archived_statuses.sql +18 -0
  6. package/dist/db/migrations/0016_embedding_settings.sql +23 -0
  7. package/dist/db/schema.d.ts +161 -0
  8. package/dist/db/schema.js +11 -0
  9. package/dist/db/schema.js.map +1 -1
  10. package/dist/mcp/server.js +2 -4
  11. package/dist/mcp/server.js.map +1 -1
  12. package/dist/rest/routes.js +78 -2
  13. package/dist/rest/routes.js.map +1 -1
  14. package/dist/rest/server.js +2 -1
  15. package/dist/rest/server.js.map +1 -1
  16. package/dist/service/embedding.d.ts +21 -0
  17. package/dist/service/embedding.js +144 -16
  18. package/dist/service/embedding.js.map +1 -1
  19. package/dist/service/embedding_settings.d.ts +15 -0
  20. package/dist/service/embedding_settings.js +85 -0
  21. package/dist/service/embedding_settings.js.map +1 -0
  22. package/dist/service/entities.js +13 -5
  23. package/dist/service/entities.js.map +1 -1
  24. package/dist/service/index.d.ts +1 -0
  25. package/dist/service/index.js +1 -0
  26. package/dist/service/index.js.map +1 -1
  27. package/dist/service/tasks.d.ts +2 -2
  28. package/dist/service/tasks.js +25 -14
  29. package/dist/service/tasks.js.map +1 -1
  30. package/dist/service/types.d.ts +38 -7
  31. package/dist/service/types.js +14 -4
  32. package/dist/service/types.js.map +1 -1
  33. package/package.json +8 -2
  34. package/web/dist/assets/index-C9pVWWZo.css +1 -0
  35. package/web/dist/assets/index-OW9iHpVr.js +586 -0
  36. package/web/dist/index.html +2 -2
  37. package/web/dist/assets/index-CqneqtJo.js +0 -544
  38. package/web/dist/assets/index-Ii6S7FfS.css +0 -1
@@ -0,0 +1,586 @@
1
+ var Pv=n=>{throw TypeError(n)};var Km=(n,e,t)=>e.has(n)||Pv("Cannot "+t);var A=(n,e,t)=>(Km(n,e,"read from private field"),t?t.call(n):e.get(n)),Ce=(n,e,t)=>e.has(n)?Pv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),de=(n,e,t,r)=>(Km(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Ie=(n,e,t)=>(Km(n,e,"access private method"),t);var Uh=(n,e,t,r)=>({set _(i){de(n,e,i,t)},get _(){return A(n,e,r)}});function yA(n,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function Ld(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Jm={exports:{}},uu={},eg={exports:{}},Xe={};/**
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 Cv;function xA(){if(Cv)return Xe;Cv=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;function m(D){return D===null||typeof D!="object"?null:(D=p&&D[p]||D["@@iterator"],typeof D=="function"?D:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,b={};function w(D,G,E){this.props=D,this.context=G,this.refs=b,this.updater=E||O}w.prototype.isReactComponent={},w.prototype.setState=function(D,G){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,G,"setState")},w.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function S(){}S.prototype=w.prototype;function C(D,G,E){this.props=D,this.context=G,this.refs=b,this.updater=E||O}var Q=C.prototype=new S;Q.constructor=C,k(Q,w.prototype),Q.isPureReactComponent=!0;var R=Array.isArray,I=Object.prototype.hasOwnProperty,j={current:null},Z={key:!0,ref:!0,__self:!0,__source:!0};function q(D,G,E){var fe,$e={},Pe=null,ze=null;if(G!=null)for(fe in G.ref!==void 0&&(ze=G.ref),G.key!==void 0&&(Pe=""+G.key),G)I.call(G,fe)&&!Z.hasOwnProperty(fe)&&($e[fe]=G[fe]);var _e=arguments.length-2;if(_e===1)$e.children=E;else if(1<_e){for(var De=Array(_e),dt=0;dt<_e;dt++)De[dt]=arguments[dt+2];$e.children=De}if(D&&D.defaultProps)for(fe in _e=D.defaultProps,_e)$e[fe]===void 0&&($e[fe]=_e[fe]);return{$$typeof:n,type:D,key:Pe,ref:ze,props:$e,_owner:j.current}}function J(D,G){return{$$typeof:n,type:D.type,key:G,ref:D.ref,props:D.props,_owner:D._owner}}function _(D){return typeof D=="object"&&D!==null&&D.$$typeof===n}function V(D){var G={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(E){return G[E]})}var F=/\/+/g;function H(D,G){return typeof D=="object"&&D!==null&&D.key!=null?V(""+D.key):G.toString(36)}function ee(D,G,E,fe,$e){var Pe=typeof D;(Pe==="undefined"||Pe==="boolean")&&(D=null);var ze=!1;if(D===null)ze=!0;else switch(Pe){case"string":case"number":ze=!0;break;case"object":switch(D.$$typeof){case n:case e:ze=!0}}if(ze)return ze=D,$e=$e(ze),D=fe===""?"."+H(ze,0):fe,R($e)?(E="",D!=null&&(E=D.replace(F,"$&/")+"/"),ee($e,G,E,"",function(dt){return dt})):$e!=null&&(_($e)&&($e=J($e,E+(!$e.key||ze&&ze.key===$e.key?"":(""+$e.key).replace(F,"$&/")+"/")+D)),G.push($e)),1;if(ze=0,fe=fe===""?".":fe+":",R(D))for(var _e=0;_e<D.length;_e++){Pe=D[_e];var De=fe+H(Pe,_e);ze+=ee(Pe,G,E,De,$e)}else if(De=m(D),typeof De=="function")for(D=De.call(D),_e=0;!(Pe=D.next()).done;)Pe=Pe.value,De=fe+H(Pe,_e++),ze+=ee(Pe,G,E,De,$e);else if(Pe==="object")throw G=String(D),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return ze}function Y(D,G,E){if(D==null)return D;var fe=[],$e=0;return ee(D,fe,"","",function(Pe){return G.call(E,Pe,$e++)}),fe}function me(D){if(D._status===-1){var G=D._result;G=G(),G.then(function(E){(D._status===0||D._status===-1)&&(D._status=1,D._result=E)},function(E){(D._status===0||D._status===-1)&&(D._status=2,D._result=E)}),D._status===-1&&(D._status=0,D._result=G)}if(D._status===1)return D._result.default;throw D._result}var ye={current:null},te={transition:null},ae={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:te,ReactCurrentOwner:j};function $(){throw Error("act(...) is not supported in production builds of React.")}return Xe.Children={map:Y,forEach:function(D,G,E){Y(D,function(){G.apply(this,arguments)},E)},count:function(D){var G=0;return Y(D,function(){G++}),G},toArray:function(D){return Y(D,function(G){return G})||[]},only:function(D){if(!_(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Xe.Component=w,Xe.Fragment=t,Xe.Profiler=i,Xe.PureComponent=C,Xe.StrictMode=r,Xe.Suspense=u,Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,Xe.act=$,Xe.cloneElement=function(D,G,E){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var fe=k({},D.props),$e=D.key,Pe=D.ref,ze=D._owner;if(G!=null){if(G.ref!==void 0&&(Pe=G.ref,ze=j.current),G.key!==void 0&&($e=""+G.key),D.type&&D.type.defaultProps)var _e=D.type.defaultProps;for(De in G)I.call(G,De)&&!Z.hasOwnProperty(De)&&(fe[De]=G[De]===void 0&&_e!==void 0?_e[De]:G[De])}var De=arguments.length-2;if(De===1)fe.children=E;else if(1<De){_e=Array(De);for(var dt=0;dt<De;dt++)_e[dt]=arguments[dt+2];fe.children=_e}return{$$typeof:n,type:D.type,key:$e,ref:Pe,props:fe,_owner:ze}},Xe.createContext=function(D){return D={$$typeof:l,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:s,_context:D},D.Consumer=D},Xe.createElement=q,Xe.createFactory=function(D){var G=q.bind(null,D);return G.type=D,G},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(D){return{$$typeof:o,render:D}},Xe.isValidElement=_,Xe.lazy=function(D){return{$$typeof:f,_payload:{_status:-1,_result:D},_init:me}},Xe.memo=function(D,G){return{$$typeof:h,type:D,compare:G===void 0?null:G}},Xe.startTransition=function(D){var G=te.transition;te.transition={};try{D()}finally{te.transition=G}},Xe.unstable_act=$,Xe.useCallback=function(D,G){return ye.current.useCallback(D,G)},Xe.useContext=function(D){return ye.current.useContext(D)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(D){return ye.current.useDeferredValue(D)},Xe.useEffect=function(D,G){return ye.current.useEffect(D,G)},Xe.useId=function(){return ye.current.useId()},Xe.useImperativeHandle=function(D,G,E){return ye.current.useImperativeHandle(D,G,E)},Xe.useInsertionEffect=function(D,G){return ye.current.useInsertionEffect(D,G)},Xe.useLayoutEffect=function(D,G){return ye.current.useLayoutEffect(D,G)},Xe.useMemo=function(D,G){return ye.current.useMemo(D,G)},Xe.useReducer=function(D,G,E){return ye.current.useReducer(D,G,E)},Xe.useRef=function(D){return ye.current.useRef(D)},Xe.useState=function(D){return ye.current.useState(D)},Xe.useSyncExternalStore=function(D,G,E){return ye.current.useSyncExternalStore(D,G,E)},Xe.useTransition=function(){return ye.current.useTransition()},Xe.version="18.3.1",Xe}var Qv;function l0(){return Qv||(Qv=1,eg.exports=xA()),eg.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 $v;function kA(){if($v)return uu;$v=1;var n=l0(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(o,u,h){var f,p={},m=null,O=null;h!==void 0&&(m=""+h),u.key!==void 0&&(m=""+u.key),u.ref!==void 0&&(O=u.ref);for(f in u)r.call(u,f)&&!s.hasOwnProperty(f)&&(p[f]=u[f]);if(o&&o.defaultProps)for(f in u=o.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:e,type:o,key:m,ref:O,props:p,_owner:i.current}}return uu.Fragment=t,uu.jsx=l,uu.jsxs=l,uu}var Tv;function vA(){return Tv||(Tv=1,Jm.exports=kA()),Jm.exports}var y=vA(),ha=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},kl,ws,Lo,XP,bA=(XP=class extends ha{constructor(){super();Ce(this,kl);Ce(this,ws);Ce(this,Lo);de(this,Lo,e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){A(this,ws)||this.setEventListener(A(this,Lo))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,ws))==null||e.call(this),de(this,ws,void 0))}setEventListener(e){var t;de(this,Lo,e),(t=A(this,ws))==null||t.call(this),de(this,ws,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){A(this,kl)!==e&&(de(this,kl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof A(this,kl)=="boolean"?A(this,kl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},kl=new WeakMap,ws=new WeakMap,Lo=new WeakMap,XP),o0=new bA,wA={setTimeout:(n,e)=>setTimeout(n,e),clearTimeout:n=>clearTimeout(n),setInterval:(n,e)=>setInterval(n,e),clearInterval:n=>clearInterval(n)},Ss,s0,BP,SA=(BP=class{constructor(){Ce(this,Ss,wA);Ce(this,s0,!1)}setTimeoutProvider(n){de(this,Ss,n)}setTimeout(n,e){return A(this,Ss).setTimeout(n,e)}clearTimeout(n){A(this,Ss).clearTimeout(n)}setInterval(n,e){return A(this,Ss).setInterval(n,e)}clearInterval(n){A(this,Ss).clearInterval(n)}},Ss=new WeakMap,s0=new WeakMap,BP),ml=new SA;function PA(n){setTimeout(n,0)}var CA=typeof window>"u"||"Deno"in globalThis;function On(){}function QA(n,e){return typeof n=="function"?n(e):n}function xO(n){return typeof n=="number"&&n>=0&&n!==1/0}function JP(n,e){return Math.max(n+(e||0)-Date.now(),0)}function Rs(n,e){return typeof n=="function"?n(e):n}function Jn(n,e){return typeof n=="function"?n(e):n}function jv(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:l,stale:o}=n;if(l){if(r){if(e.queryHash!==a0(l,e.options))return!1}else if(!Xu(e.queryKey,l))return!1}if(t!=="all"){const u=e.isActive();if(t==="active"&&!u||t==="inactive"&&u)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||i&&i!==e.state.fetchStatus||s&&!s(e))}function Ev(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(Ml(e.options.mutationKey)!==Ml(s))return!1}else if(!Xu(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function a0(n,e){return((e==null?void 0:e.queryKeyHashFn)||Ml)(n)}function Ml(n){return JSON.stringify(n,(e,t)=>kO(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function Xu(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Xu(n[t],e[t])):!1}var $A=Object.prototype.hasOwnProperty;function e2(n,e,t=0){if(n===e)return n;if(t>500)return e;const r=Mv(n)&&Mv(e);if(!r&&!(kO(n)&&kO(e)))return e;const s=(r?n:Object.keys(n)).length,l=r?e:Object.keys(e),o=l.length,u=r?new Array(o):{};let h=0;for(let f=0;f<o;f++){const p=r?f:l[f],m=n[p],O=e[p];if(m===O){u[p]=m,(r?f<s:$A.call(n,p))&&h++;continue}if(m===null||O===null||typeof m!="object"||typeof O!="object"){u[p]=O;continue}const k=e2(m,O,t+1);u[p]=k,k===m&&h++}return s===o&&h===s?n:u}function qf(n,e){if(!e||Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}function Mv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function kO(n){if(!Av(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!Av(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Av(n){return Object.prototype.toString.call(n)==="[object Object]"}function TA(n){return new Promise(e=>{ml.setTimeout(e,n)})}function vO(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?e2(n,e):e}function jA(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function EA(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var u0=Symbol();function t2(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===u0?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function c0(n,e){return typeof n=="function"?n(...e):!!n}function MA(n,e,t){let r=!1,i;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?t():i.addEventListener("abort",t,{once:!0})),i)}),n}var Bu=(()=>{let n=()=>CA;return{isServer(){return n()},setIsServer(e){n=e}}})();function bO(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}var AA=PA;function RA(){let n=[],e=0,t=o=>{o()},r=o=>{o()},i=AA;const s=o=>{e?n.push(o):i(()=>{t(o)})},l=()=>{const o=n;n=[],o.length&&i(()=>{r(()=>{o.forEach(u=>{t(u)})})})};return{batch:o=>{let u;e++;try{u=o()}finally{e--,e||l()}return u},batchCalls:o=>(...u)=>{s(()=>{o(...u)})},schedule:s,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var Lt=RA(),_o,Ps,Do,WP,NA=(WP=class extends ha{constructor(){super();Ce(this,_o,!0);Ce(this,Ps);Ce(this,Do);de(this,Do,e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,Ps)||this.setEventListener(A(this,Do))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,Ps))==null||e.call(this),de(this,Ps,void 0))}setEventListener(e){var t;de(this,Do,e),(t=A(this,Ps))==null||t.call(this),de(this,Ps,e(this.setOnline.bind(this)))}setOnline(e){A(this,_o)!==e&&(de(this,_o,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return A(this,_o)}},_o=new WeakMap,Ps=new WeakMap,Do=new WeakMap,WP),Ff=new NA;function LA(n){return Math.min(1e3*2**n,3e4)}function n2(n){return(n??"online")==="online"?Ff.isOnline():!0}var wO=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function r2(n){let e=!1,t=0,r;const i=bO(),s=()=>i.status!=="pending",l=b=>{var w;if(!s()){const S=new wO(b);m(S),(w=n.onCancel)==null||w.call(n,S)}},o=()=>{e=!0},u=()=>{e=!1},h=()=>o0.isFocused()&&(n.networkMode==="always"||Ff.isOnline())&&n.canRun(),f=()=>n2(n.networkMode)&&n.canRun(),p=b=>{s()||(r==null||r(),i.resolve(b))},m=b=>{s()||(r==null||r(),i.reject(b))},O=()=>new Promise(b=>{var w;r=S=>{(s()||h())&&b(S)},(w=n.onPause)==null||w.call(n)}).then(()=>{var b;r=void 0,s()||(b=n.onContinue)==null||b.call(n)}),k=()=>{if(s())return;let b;const w=t===0?n.initialPromise:void 0;try{b=w??n.fn()}catch(S){b=Promise.reject(S)}Promise.resolve(b).then(p).catch(S=>{var j;if(s())return;const C=n.retry??(Bu.isServer()?0:3),Q=n.retryDelay??LA,R=typeof Q=="function"?Q(t,S):Q,I=C===!0||typeof C=="number"&&t<C||typeof C=="function"&&C(t,S);if(e||!I){m(S);return}t++,(j=n.onFail)==null||j.call(n,t,S),TA(R).then(()=>h()?void 0:O()).then(()=>{e?m(S):k()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:o,continueRetry:u,canStart:f,start:()=>(f()?k():O().then(k),i)}}var vl,VP,i2=(VP=class{constructor(){Ce(this,vl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xO(this.gcTime)&&de(this,vl,ml.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Bu.isServer()?1/0:300*1e3))}clearGcTimeout(){A(this,vl)!==void 0&&(ml.clearTimeout(A(this,vl)),de(this,vl,void 0))}},vl=new WeakMap,VP);function _A(n){return{onFetch:(e,t)=>{var f,p,m,O,k;const r=e.options,i=(m=(p=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,s=((O=e.state.data)==null?void 0:O.pages)||[],l=((k=e.state.data)==null?void 0:k.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const h=async()=>{let b=!1;const w=Q=>{MA(Q,()=>e.signal,()=>b=!0)},S=t2(e.options,e.fetchOptions),C=async(Q,R,I)=>{if(b)return Promise.reject(e.signal.reason);if(R==null&&Q.pages.length)return Promise.resolve(Q);const Z=(()=>{const V={client:e.client,queryKey:e.queryKey,pageParam:R,direction:I?"backward":"forward",meta:e.options.meta};return w(V),V})(),q=await S(Z),{maxPages:J}=e.options,_=I?EA:jA;return{pages:_(Q.pages,q,J),pageParams:_(Q.pageParams,R,J)}};if(i&&s.length){const Q=i==="backward",R=Q?DA:Rv,I={pages:s,pageParams:l},j=R(r,I);o=await C(I,j,Q)}else{const Q=n??s.length;do{const R=u===0?l[0]??r.initialPageParam:Rv(r,o);if(u>0&&R==null)break;o=await C(o,R),u++}while(u<Q)}return o};e.options.persister?e.fetchFn=()=>{var b,w;return(w=(b=e.options).persister)==null?void 0:w.call(b,h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=h}}}function Rv(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function DA(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var Io,bl,zo,pr,wl,Xt,kc,Sl,Kn,s2,$i,qP,IA=(qP=class extends i2{constructor(e){super();Ce(this,Kn);Ce(this,Io);Ce(this,bl);Ce(this,zo);Ce(this,pr);Ce(this,wl);Ce(this,Xt);Ce(this,kc);Ce(this,Sl);de(this,Sl,!1),de(this,kc,e.defaultOptions),this.setOptions(e.options),this.observers=[],de(this,wl,e.client),de(this,pr,A(this,wl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,de(this,bl,Lv(this.options)),this.state=e.state??A(this,bl),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return A(this,Io)}get promise(){var e;return(e=A(this,Xt))==null?void 0:e.promise}setOptions(e){if(this.options={...A(this,kc),...e},e!=null&&e._type&&de(this,Io,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Lv(this.options);t.data!==void 0&&(this.setState(Nv(t.data,t.dataUpdatedAt)),de(this,bl,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,pr).remove(this)}setData(e,t){const r=vO(this.state.data,e,this.options);return Ie(this,Kn,$i).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e){Ie(this,Kn,$i).call(this,{type:"setState",state:e})}cancel(e){var r,i;const t=(r=A(this,Xt))==null?void 0:r.promise;return(i=A(this,Xt))==null||i.cancel(e),t?t.then(On).catch(On):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return A(this,bl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Jn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===u0||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Rs(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!JP(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=A(this,Xt))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=A(this,Xt))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),A(this,pr).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(A(this,Xt)&&(A(this,Sl)||Ie(this,Kn,s2).call(this)?A(this,Xt).cancel({revert:!0}):A(this,Xt).cancelRetry()),this.scheduleGc()),A(this,pr).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ie(this,Kn,$i).call(this,{type:"invalidate"})}async fetch(e,t){var h,f,p,m,O,k,b,w,S,C,Q;if(this.state.fetchStatus!=="idle"&&((h=A(this,Xt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(A(this,Xt))return A(this,Xt).continueRetry(),A(this,Xt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const R=this.observers.find(I=>I.options.queryFn);R&&this.setOptions(R.options)}const r=new AbortController,i=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(de(this,Sl,!0),r.signal)})},s=()=>{const R=t2(this.options,t),j=(()=>{const Z={client:A(this,wl),queryKey:this.queryKey,meta:this.meta};return i(Z),Z})();return de(this,Sl,!1),this.options.persister?this.options.persister(R,j,this):R(j)},o=(()=>{const R={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:A(this,wl),state:this.state,fetchFn:s};return i(R),R})(),u=A(this,Io)==="infinite"?_A(this.options.pages):this.options.behavior;u==null||u.onFetch(o,this),de(this,zo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Ie(this,Kn,$i).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta}),de(this,Xt,r2({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:R=>{R instanceof wO&&R.revert&&this.setState({...A(this,zo),fetchStatus:"idle"}),r.abort()},onFail:(R,I)=>{Ie(this,Kn,$i).call(this,{type:"failed",failureCount:R,error:I})},onPause:()=>{Ie(this,Kn,$i).call(this,{type:"pause"})},onContinue:()=>{Ie(this,Kn,$i).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const R=await A(this,Xt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(O=(m=A(this,pr).config).onSuccess)==null||O.call(m,R,this),(b=(k=A(this,pr).config).onSettled)==null||b.call(k,R,this.state.error,this),R}catch(R){if(R instanceof wO){if(R.silent)return A(this,Xt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Ie(this,Kn,$i).call(this,{type:"error",error:R}),(S=(w=A(this,pr).config).onError)==null||S.call(w,R,this),(Q=(C=A(this,pr).config).onSettled)==null||Q.call(C,this.state.data,R,this),R}finally{this.scheduleGc()}}},Io=new WeakMap,bl=new WeakMap,zo=new WeakMap,pr=new WeakMap,wl=new WeakMap,Xt=new WeakMap,kc=new WeakMap,Sl=new WeakMap,Kn=new WeakSet,s2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},$i=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...l2(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...Nv(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return de(this,zo,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Lt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,pr).notify({query:this,type:"updated",action:e})})},qP);function l2(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:n2(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Nv(n,e){return{data:n,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Lv(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var jn,qe,vc,gn,Pl,Zo,ji,Cs,bc,Xo,Bo,Cl,Ql,Qs,Wo,tt,Pu,SO,PO,CO,QO,$O,TO,jO,o2,FP,zA=(FP=class extends ha{constructor(e,t){super();Ce(this,tt);Ce(this,jn);Ce(this,qe);Ce(this,vc);Ce(this,gn);Ce(this,Pl);Ce(this,Zo);Ce(this,ji);Ce(this,Cs);Ce(this,bc);Ce(this,Xo);Ce(this,Bo);Ce(this,Cl);Ce(this,Ql);Ce(this,Qs);Ce(this,Wo,new Set);this.options=t,de(this,jn,e),de(this,Cs,null),de(this,ji,bO()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(A(this,qe).addObserver(this),_v(A(this,qe),this.options)?Ie(this,tt,Pu).call(this):this.updateResult(),Ie(this,tt,QO).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return EO(A(this,qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return EO(A(this,qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ie(this,tt,$O).call(this),Ie(this,tt,TO).call(this),A(this,qe).removeObserver(this)}setOptions(e){const t=this.options,r=A(this,qe);if(this.options=A(this,jn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Jn(this.options.enabled,A(this,qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ie(this,tt,jO).call(this),A(this,qe).setOptions(this.options),t._defaulted&&!qf(this.options,t)&&A(this,jn).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,qe),observer:this});const i=this.hasListeners();i&&Dv(A(this,qe),r,this.options,t)&&Ie(this,tt,Pu).call(this),this.updateResult(),i&&(A(this,qe)!==r||Jn(this.options.enabled,A(this,qe))!==Jn(t.enabled,A(this,qe))||Rs(this.options.staleTime,A(this,qe))!==Rs(t.staleTime,A(this,qe)))&&Ie(this,tt,SO).call(this);const s=Ie(this,tt,PO).call(this);i&&(A(this,qe)!==r||Jn(this.options.enabled,A(this,qe))!==Jn(t.enabled,A(this,qe))||s!==A(this,Qs))&&Ie(this,tt,CO).call(this,s)}getOptimisticResult(e){const t=A(this,jn).getQueryCache().build(A(this,jn),e),r=this.createResult(t,e);return XA(this,r)&&(de(this,gn,r),de(this,Zo,this.options),de(this,Pl,A(this,qe).state)),r}getCurrentResult(){return A(this,gn)}trackResult(e,t){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),t==null||t(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&A(this,ji).status==="pending"&&A(this,ji).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(e){A(this,Wo).add(e)}getCurrentQuery(){return A(this,qe)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=A(this,jn).defaultQueryOptions(e),r=A(this,jn).getQueryCache().build(A(this,jn),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return Ie(this,tt,Pu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,gn)))}createResult(e,t){var J;const r=A(this,qe),i=this.options,s=A(this,gn),l=A(this,Pl),o=A(this,Zo),h=e!==r?e.state:A(this,vc),{state:f}=e;let p={...f},m=!1,O;if(t._optimisticResults){const _=this.hasListeners(),V=!_&&_v(e,t),F=_&&Dv(e,r,t,i);(V||F)&&(p={...p,...l2(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:k,errorUpdatedAt:b,status:w}=p;O=p.data;let S=!1;if(t.placeholderData!==void 0&&O===void 0&&w==="pending"){let _;s!=null&&s.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(_=s.data,S=!0):_=typeof t.placeholderData=="function"?t.placeholderData((J=A(this,Bo))==null?void 0:J.state.data,A(this,Bo)):t.placeholderData,_!==void 0&&(w="success",O=vO(s==null?void 0:s.data,_,t),m=!0)}if(t.select&&O!==void 0&&!S)if(s&&O===(l==null?void 0:l.data)&&t.select===A(this,bc))O=A(this,Xo);else try{de(this,bc,t.select),O=t.select(O),O=vO(s==null?void 0:s.data,O,t),de(this,Xo,O),de(this,Cs,null)}catch(_){de(this,Cs,_)}A(this,Cs)&&(k=A(this,Cs),O=A(this,Xo),b=Date.now(),w="error");const C=p.fetchStatus==="fetching",Q=w==="pending",R=w==="error",I=Q&&C,j=O!==void 0,q={status:w,fetchStatus:p.fetchStatus,isPending:Q,isSuccess:w==="success",isError:R,isInitialLoading:I,isLoading:I,data:O,dataUpdatedAt:p.dataUpdatedAt,error:k,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&!Q,isLoadingError:R&&!j,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:R&&j,isStale:h0(e,t),refetch:this.refetch,promise:A(this,ji),isEnabled:Jn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const _=q.data!==void 0,V=q.status==="error"&&!_,F=Y=>{V?Y.reject(q.error):_&&Y.resolve(q.data)},H=()=>{const Y=de(this,ji,q.promise=bO());F(Y)},ee=A(this,ji);switch(ee.status){case"pending":e.queryHash===r.queryHash&&F(ee);break;case"fulfilled":(V||q.data!==ee.value)&&H();break;case"rejected":(!V||q.error!==ee.reason)&&H();break}}return q}updateResult(){const e=A(this,gn),t=this.createResult(A(this,qe),this.options);if(de(this,Pl,A(this,qe).state),de(this,Zo,this.options),A(this,Pl).data!==void 0&&de(this,Bo,A(this,qe)),qf(t,e))return;de(this,gn,t);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!A(this,Wo).size)return!0;const l=new Set(s??A(this,Wo));return this.options.throwOnError&&l.add("error"),Object.keys(A(this,gn)).some(o=>{const u=o;return A(this,gn)[u]!==e[u]&&l.has(u)})};Ie(this,tt,o2).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ie(this,tt,QO).call(this)}},jn=new WeakMap,qe=new WeakMap,vc=new WeakMap,gn=new WeakMap,Pl=new WeakMap,Zo=new WeakMap,ji=new WeakMap,Cs=new WeakMap,bc=new WeakMap,Xo=new WeakMap,Bo=new WeakMap,Cl=new WeakMap,Ql=new WeakMap,Qs=new WeakMap,Wo=new WeakMap,tt=new WeakSet,Pu=function(e){Ie(this,tt,jO).call(this);let t=A(this,qe).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(On)),t},SO=function(){Ie(this,tt,$O).call(this);const e=Rs(this.options.staleTime,A(this,qe));if(Bu.isServer()||A(this,gn).isStale||!xO(e))return;const r=JP(A(this,gn).dataUpdatedAt,e)+1;de(this,Cl,ml.setTimeout(()=>{A(this,gn).isStale||this.updateResult()},r))},PO=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,qe)):this.options.refetchInterval)??!1},CO=function(e){Ie(this,tt,TO).call(this),de(this,Qs,e),!(Bu.isServer()||Jn(this.options.enabled,A(this,qe))===!1||!xO(A(this,Qs))||A(this,Qs)===0)&&de(this,Ql,ml.setInterval(()=>{(this.options.refetchIntervalInBackground||o0.isFocused())&&Ie(this,tt,Pu).call(this)},A(this,Qs)))},QO=function(){Ie(this,tt,SO).call(this),Ie(this,tt,CO).call(this,Ie(this,tt,PO).call(this))},$O=function(){A(this,Cl)!==void 0&&(ml.clearTimeout(A(this,Cl)),de(this,Cl,void 0))},TO=function(){A(this,Ql)!==void 0&&(ml.clearInterval(A(this,Ql)),de(this,Ql,void 0))},jO=function(){const e=A(this,jn).getQueryCache().build(A(this,jn),this.options);if(e===A(this,qe))return;const t=A(this,qe);de(this,qe,e),de(this,vc,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},o2=function(e){Lt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(A(this,gn))}),A(this,jn).getQueryCache().notify({query:A(this,qe),type:"observerResultsUpdated"})})},FP);function ZA(n,e){return Jn(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&Jn(e.retryOnMount,n)===!1)}function _v(n,e){return ZA(n,e)||n.state.data!==void 0&&EO(n,e,e.refetchOnMount)}function EO(n,e,t){if(Jn(e.enabled,n)!==!1&&Rs(e.staleTime,n)!=="static"){const r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&h0(n,e)}return!1}function Dv(n,e,t,r){return(n!==e||Jn(r.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&h0(n,t)}function h0(n,e){return Jn(e.enabled,n)!==!1&&n.isStaleByTime(Rs(e.staleTime,n))}function XA(n,e){return!qf(n.getCurrentResult(),e)}var wc,ei,ln,$l,ti,xs,YP,BA=(YP=class extends i2{constructor(e){super();Ce(this,ti);Ce(this,wc);Ce(this,ei);Ce(this,ln);Ce(this,$l);de(this,wc,e.client),this.mutationId=e.mutationId,de(this,ln,e.mutationCache),de(this,ei,[]),this.state=e.state||a2(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){A(this,ei).includes(e)||(A(this,ei).push(e),this.clearGcTimeout(),A(this,ln).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){de(this,ei,A(this,ei).filter(t=>t!==e)),this.scheduleGc(),A(this,ln).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){A(this,ei).length||(this.state.status==="pending"?this.scheduleGc():A(this,ln).remove(this))}continue(){var e;return((e=A(this,$l))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var l,o,u,h,f,p,m,O,k,b,w,S,C,Q,R,I,j,Z;const t=()=>{Ie(this,ti,xs).call(this,{type:"continue"})},r={client:A(this,wc),meta:this.options.meta,mutationKey:this.options.mutationKey};de(this,$l,r2({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(q,J)=>{Ie(this,ti,xs).call(this,{type:"failed",failureCount:q,error:J})},onPause:()=>{Ie(this,ti,xs).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,ln).canRun(this)}));const i=this.state.status==="pending",s=!A(this,$l).canStart();try{if(i)t();else{Ie(this,ti,xs).call(this,{type:"pending",variables:e,isPaused:s}),A(this,ln).config.onMutate&&await A(this,ln).config.onMutate(e,this,r);const J=await((o=(l=this.options).onMutate)==null?void 0:o.call(l,e,r));J!==this.state.context&&Ie(this,ti,xs).call(this,{type:"pending",context:J,variables:e,isPaused:s})}const q=await A(this,$l).start();return await((h=(u=A(this,ln).config).onSuccess)==null?void 0:h.call(u,q,e,this.state.context,this,r)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,q,e,this.state.context,r)),await((O=(m=A(this,ln).config).onSettled)==null?void 0:O.call(m,q,null,this.state.variables,this.state.context,this,r)),await((b=(k=this.options).onSettled)==null?void 0:b.call(k,q,null,e,this.state.context,r)),Ie(this,ti,xs).call(this,{type:"success",data:q}),q}catch(q){try{await((S=(w=A(this,ln).config).onError)==null?void 0:S.call(w,q,e,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((Q=(C=this.options).onError)==null?void 0:Q.call(C,q,e,this.state.context,r))}catch(J){Promise.reject(J)}try{await((I=(R=A(this,ln).config).onSettled)==null?void 0:I.call(R,void 0,q,this.state.variables,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((Z=(j=this.options).onSettled)==null?void 0:Z.call(j,void 0,q,e,this.state.context,r))}catch(J){Promise.reject(J)}throw Ie(this,ti,xs).call(this,{type:"error",error:q}),q}finally{A(this,ln).runNext(this)}}},wc=new WeakMap,ei=new WeakMap,ln=new WeakMap,$l=new WeakMap,ti=new WeakSet,xs=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Lt.batch(()=>{A(this,ei).forEach(r=>{r.onMutationUpdate(e)}),A(this,ln).notify({mutation:this,type:"updated",action:e})})},YP);function a2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ei,Ar,Sc,UP,WA=(UP=class extends ha{constructor(e={}){super();Ce(this,Ei);Ce(this,Ar);Ce(this,Sc);this.config=e,de(this,Ei,new Set),de(this,Ar,new Map),de(this,Sc,0)}build(e,t,r){const i=new BA({client:e,mutationCache:this,mutationId:++Uh(this,Sc)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){A(this,Ei).add(e);const t=Gh(e);if(typeof t=="string"){const r=A(this,Ar).get(t);r?r.push(e):A(this,Ar).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(A(this,Ei).delete(e)){const t=Gh(e);if(typeof t=="string"){const r=A(this,Ar).get(t);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&A(this,Ar).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Gh(e);if(typeof t=="string"){const r=A(this,Ar).get(t),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const t=Gh(e);if(typeof t=="string"){const i=(r=A(this,Ar).get(t))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Lt.batch(()=>{A(this,Ei).forEach(e=>{this.notify({type:"removed",mutation:e})}),A(this,Ei).clear(),A(this,Ar).clear()})}getAll(){return Array.from(A(this,Ei))}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Ev(t,r))}findAll(e={}){return this.getAll().filter(t=>Ev(e,t))}notify(e){Lt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Lt.batch(()=>Promise.all(e.map(t=>t.continue().catch(On))))}},Ei=new WeakMap,Ar=new WeakMap,Sc=new WeakMap,UP);function Gh(n){var e;return(e=n.options.scope)==null?void 0:e.id}var Mi,$s,En,Ai,_i,jf,MO,GP,VA=(GP=class extends ha{constructor(t,r){super();Ce(this,_i);Ce(this,Mi);Ce(this,$s);Ce(this,En);Ce(this,Ai);de(this,Mi,t),this.setOptions(r),this.bindMethods(),Ie(this,_i,jf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const r=this.options;this.options=A(this,Mi).defaultMutationOptions(t),qf(this.options,r)||A(this,Mi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:A(this,En),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ml(r.mutationKey)!==Ml(this.options.mutationKey)?this.reset():((i=A(this,En))==null?void 0:i.state.status)==="pending"&&A(this,En).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=A(this,En))==null||t.removeObserver(this)}onMutationUpdate(t){Ie(this,_i,jf).call(this),Ie(this,_i,MO).call(this,t)}getCurrentResult(){return A(this,$s)}reset(){var t;(t=A(this,En))==null||t.removeObserver(this),de(this,En,void 0),Ie(this,_i,jf).call(this),Ie(this,_i,MO).call(this)}mutate(t,r){var i;return de(this,Ai,r),(i=A(this,En))==null||i.removeObserver(this),de(this,En,A(this,Mi).getMutationCache().build(A(this,Mi),this.options)),A(this,En).addObserver(this),A(this,En).execute(t)}},Mi=new WeakMap,$s=new WeakMap,En=new WeakMap,Ai=new WeakMap,_i=new WeakSet,jf=function(){var r;const t=((r=A(this,En))==null?void 0:r.state)??a2();de(this,$s,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},MO=function(t){Lt.batch(()=>{var r,i,s,l,o,u,h,f;if(A(this,Ai)&&this.hasListeners()){const p=A(this,$s).variables,m=A(this,$s).context,O={client:A(this,Mi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(i=(r=A(this,Ai)).onSuccess)==null||i.call(r,t.data,p,m,O)}catch(k){Promise.reject(k)}try{(l=(s=A(this,Ai)).onSettled)==null||l.call(s,t.data,null,p,m,O)}catch(k){Promise.reject(k)}}else if((t==null?void 0:t.type)==="error"){try{(u=(o=A(this,Ai)).onError)==null||u.call(o,t.error,p,m,O)}catch(k){Promise.reject(k)}try{(f=(h=A(this,Ai)).onSettled)==null||f.call(h,void 0,t.error,p,m,O)}catch(k){Promise.reject(k)}}}this.listeners.forEach(p=>{p(A(this,$s))})})},GP),ni,HP,qA=(HP=class extends ha{constructor(e={}){super();Ce(this,ni);this.config=e,de(this,ni,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??a0(i,t);let l=this.get(s);return l||(l=new IA({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){A(this,ni).has(e.queryHash)||(A(this,ni).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=A(this,ni).get(e.queryHash);t&&(e.destroy(),t===e&&A(this,ni).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Lt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return A(this,ni).get(e)}getAll(){return[...A(this,ni).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>jv(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>jv(e,r)):t}notify(e){Lt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Lt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Lt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ni=new WeakMap,HP),wt,Ts,js,Vo,qo,Es,Fo,Yo,KP,FA=(KP=class{constructor(n={}){Ce(this,wt);Ce(this,Ts);Ce(this,js);Ce(this,Vo);Ce(this,qo);Ce(this,Es);Ce(this,Fo);Ce(this,Yo);de(this,wt,n.queryCache||new qA),de(this,Ts,n.mutationCache||new WA),de(this,js,n.defaultOptions||{}),de(this,Vo,new Map),de(this,qo,new Map),de(this,Es,0)}mount(){Uh(this,Es)._++,A(this,Es)===1&&(de(this,Fo,o0.subscribe(async n=>{n&&(await this.resumePausedMutations(),A(this,wt).onFocus())})),de(this,Yo,Ff.subscribe(async n=>{n&&(await this.resumePausedMutations(),A(this,wt).onOnline())})))}unmount(){var n,e;Uh(this,Es)._--,A(this,Es)===0&&((n=A(this,Fo))==null||n.call(this),de(this,Fo,void 0),(e=A(this,Yo))==null||e.call(this),de(this,Yo,void 0))}isFetching(n){return A(this,wt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return A(this,Ts).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=A(this,wt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=A(this,wt).build(this,e),r=t.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(Rs(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(n){return A(this,wt).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=A(this,wt).get(r.queryHash),s=i==null?void 0:i.state.data,l=QA(e,s);if(l!==void 0)return A(this,wt).build(this,r).setData(l,{...t,manual:!0})}setQueriesData(n,e,t){return Lt.batch(()=>A(this,wt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=A(this,wt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=A(this,wt);Lt.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=A(this,wt);return Lt.batch(()=>(t.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},r=Lt.batch(()=>A(this,wt).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(On).catch(On)}invalidateQueries(n,e={}){return Lt.batch(()=>(A(this,wt).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},r=Lt.batch(()=>A(this,wt).findAll(n).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(On)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(On)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=A(this,wt).build(this,e);return t.isStaleByTime(Rs(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(On).catch(On)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(On).catch(On)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Ff.isOnline()?A(this,Ts).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,wt)}getMutationCache(){return A(this,Ts)}getDefaultOptions(){return A(this,js)}setDefaultOptions(n){de(this,js,n)}setQueryDefaults(n,e){A(this,Vo).set(Ml(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...A(this,Vo).values()],t={};return e.forEach(r=>{Xu(n,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(n,e){A(this,qo).set(Ml(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...A(this,qo).values()],t={};return e.forEach(r=>{Xu(n,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...A(this,js).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=a0(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===u0&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...A(this,js).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){A(this,wt).clear(),A(this,Ts).clear()}},wt=new WeakMap,Ts=new WeakMap,js=new WeakMap,Vo=new WeakMap,qo=new WeakMap,Es=new WeakMap,Fo=new WeakMap,Yo=new WeakMap,KP),L=l0();const u2=Ld(L),YA=yA({__proto__:null,default:u2},[L]);var c2=L.createContext(void 0),vr=n=>{const e=L.useContext(c2);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},UA=({client:n,children:e})=>(L.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),y.jsx(c2.Provider,{value:n,children:e})),h2=L.createContext(!1),GA=()=>L.useContext(h2);h2.Provider;function HA(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var KA=L.createContext(HA()),JA=()=>L.useContext(KA),eR=(n,e,t)=>{const r=t!=null&&t.state.error&&typeof n.throwOnError=="function"?c0(n.throwOnError,[t.state.error,t]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(e.isReset()||(n.retryOnMount=!1))},tR=n=>{L.useEffect(()=>{n.clearReset()},[n])},nR=({result:n,errorResetBoundary:e,throwOnError:t,query:r,suspense:i})=>n.isError&&!e.isReset()&&!n.isFetching&&r&&(i&&n.data===void 0||c0(t,[n.error,r])),rR=n=>{if(n.suspense){const t=i=>i==="static"?i:Math.max(i??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...i)=>t(r(...i)):t(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},iR=(n,e)=>n.isLoading&&n.isFetching&&!e,sR=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,Iv=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function lR(n,e,t){var O,k,b,w;const r=GA(),i=JA(),s=vr(),l=s.defaultQueryOptions(n);(k=(O=s.getDefaultOptions().queries)==null?void 0:O._experimental_beforeQuery)==null||k.call(O,l);const o=s.getQueryCache().get(l.queryHash),u=n.subscribed!==!1;l._optimisticResults=r?"isRestoring":u?"optimistic":void 0,rR(l),eR(l,i,o),tR(i);const h=!s.getQueryCache().get(l.queryHash),[f]=L.useState(()=>new e(s,l)),p=f.getOptimisticResult(l),m=!r&&u;if(L.useSyncExternalStore(L.useCallback(S=>{const C=m?f.subscribe(Lt.batchCalls(S)):On;return f.updateResult(),C},[f,m]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),L.useEffect(()=>{f.setOptions(l)},[l,f]),sR(l,p))throw Iv(l,f,i);if(nR({result:p,errorResetBoundary:i,throwOnError:l.throwOnError,query:o,suspense:l.suspense}))throw p.error;if((w=(b=s.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||w.call(b,l,p),l.experimental_prefetchInRender&&!Bu.isServer()&&iR(p,r)){const S=h?Iv(l,f,i):o==null?void 0:o.promise;S==null||S.catch(On).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?p:f.trackResult(p)}function Ir(n,e){return lR(n,zA)}function di(n,e){const t=vr(),[r]=L.useState(()=>new VA(t,n));L.useEffect(()=>{r.setOptions(n)},[r,n]);const i=L.useSyncExternalStore(L.useCallback(l=>r.subscribe(Lt.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=L.useCallback((l,o)=>{r.mutate(l,o).catch(On)},[r]);if(i.error&&c0(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var Hh={},tg={exports:{}},Qn={},ng={exports:{}},rg={};/**
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
+ */var zv;function oR(){return zv||(zv=1,(function(n){function e(te,ae){var $=te.length;te.push(ae);e:for(;0<$;){var D=$-1>>>1,G=te[D];if(0<i(G,ae))te[D]=ae,te[$]=G,$=D;else break e}}function t(te){return te.length===0?null:te[0]}function r(te){if(te.length===0)return null;var ae=te[0],$=te.pop();if($!==ae){te[0]=$;e:for(var D=0,G=te.length,E=G>>>1;D<E;){var fe=2*(D+1)-1,$e=te[fe],Pe=fe+1,ze=te[Pe];if(0>i($e,$))Pe<G&&0>i(ze,$e)?(te[D]=ze,te[Pe]=$,D=Pe):(te[D]=$e,te[fe]=$,D=fe);else if(Pe<G&&0>i(ze,$))te[D]=ze,te[Pe]=$,D=Pe;else break e}}return ae}function i(te,ae){var $=te.sortIndex-ae.sortIndex;return $!==0?$:te.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var l=Date,o=l.now();n.unstable_now=function(){return l.now()-o}}var u=[],h=[],f=1,p=null,m=3,O=!1,k=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Q(te){for(var ae=t(h);ae!==null;){if(ae.callback===null)r(h);else if(ae.startTime<=te)r(h),ae.sortIndex=ae.expirationTime,e(u,ae);else break;ae=t(h)}}function R(te){if(b=!1,Q(te),!k)if(t(u)!==null)k=!0,me(I);else{var ae=t(h);ae!==null&&ye(R,ae.startTime-te)}}function I(te,ae){k=!1,b&&(b=!1,S(q),q=-1),O=!0;var $=m;try{for(Q(ae),p=t(u);p!==null&&(!(p.expirationTime>ae)||te&&!V());){var D=p.callback;if(typeof D=="function"){p.callback=null,m=p.priorityLevel;var G=D(p.expirationTime<=ae);ae=n.unstable_now(),typeof G=="function"?p.callback=G:p===t(u)&&r(u),Q(ae)}else r(u);p=t(u)}if(p!==null)var E=!0;else{var fe=t(h);fe!==null&&ye(R,fe.startTime-ae),E=!1}return E}finally{p=null,m=$,O=!1}}var j=!1,Z=null,q=-1,J=5,_=-1;function V(){return!(n.unstable_now()-_<J)}function F(){if(Z!==null){var te=n.unstable_now();_=te;var ae=!0;try{ae=Z(!0,te)}finally{ae?H():(j=!1,Z=null)}}else j=!1}var H;if(typeof C=="function")H=function(){C(F)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,Y=ee.port2;ee.port1.onmessage=F,H=function(){Y.postMessage(null)}}else H=function(){w(F,0)};function me(te){Z=te,j||(j=!0,H())}function ye(te,ae){q=w(function(){te(n.unstable_now())},ae)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(te){te.callback=null},n.unstable_continueExecution=function(){k||O||(k=!0,me(I))},n.unstable_forceFrameRate=function(te){0>te||125<te?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<te?Math.floor(1e3/te):5},n.unstable_getCurrentPriorityLevel=function(){return m},n.unstable_getFirstCallbackNode=function(){return t(u)},n.unstable_next=function(te){switch(m){case 1:case 2:case 3:var ae=3;break;default:ae=m}var $=m;m=ae;try{return te()}finally{m=$}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(te,ae){switch(te){case 1:case 2:case 3:case 4:case 5:break;default:te=3}var $=m;m=te;try{return ae()}finally{m=$}},n.unstable_scheduleCallback=function(te,ae,$){var D=n.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?D+$:D):$=D,te){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=$+G,te={id:f++,callback:ae,priorityLevel:te,startTime:$,expirationTime:G,sortIndex:-1},$>D?(te.sortIndex=$,e(h,te),t(u)===null&&te===t(h)&&(b?(S(q),q=-1):b=!0,ye(R,$-D))):(te.sortIndex=G,e(u,te),k||O||(k=!0,me(I))),te},n.unstable_shouldYield=V,n.unstable_wrapCallback=function(te){var ae=m;return function(){var $=m;m=ae;try{return te.apply(this,arguments)}finally{m=$}}}})(rg)),rg}var Zv;function aR(){return Zv||(Zv=1,ng.exports=oR()),ng.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 Xv;function uR(){if(Xv)return Qn;Xv=1;var n=l0(),e=aR();function t(a){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(a,c){l(a,c),l(a+"Capture",c)}function l(a,c){for(i[a]=c,a=0;a<c.length;a++)r.add(c[a])}var o=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,h=/^[: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]*$/,f={},p={};function m(a){return u.call(p,a)?!0:u.call(f,a)?!1:h.test(a)?p[a]=!0:(f[a]=!0,!1)}function O(a,c,d,g){if(d!==null&&d.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return g?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function k(a,c,d,g){if(c===null||typeof c>"u"||O(a,c,d,g))return!0;if(g)return!1;if(d!==null)switch(d.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function b(a,c,d,g,x,v,P){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=g,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=a,this.type=c,this.sanitizeURL=v,this.removeEmptyString=P}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){w[a]=new b(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var c=a[0];w[c]=new b(c,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){w[a]=new b(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){w[a]=new b(a,2,!1,a,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(a){w[a]=new b(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){w[a]=new b(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){w[a]=new b(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){w[a]=new b(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){w[a]=new b(a,5,!1,a.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function C(a){return a[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(a){var c=a.replace(S,C);w[c]=new b(c,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var c=a.replace(S,C);w[c]=new b(c,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var c=a.replace(S,C);w[c]=new b(c,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){w[a]=new b(a,1,!1,a.toLowerCase(),null,!1,!1)}),w.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){w[a]=new b(a,1,!1,a.toLowerCase(),null,!0,!0)});function Q(a,c,d,g){var x=w.hasOwnProperty(c)?w[c]:null;(x!==null?x.type!==0:g||!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(k(c,d,x,g)&&(d=null),g||x===null?m(c)&&(d===null?a.removeAttribute(c):a.setAttribute(c,""+d)):x.mustUseProperty?a[x.propertyName]=d===null?x.type===3?!1:"":d:(c=x.attributeName,g=x.attributeNamespace,d===null?a.removeAttribute(c):(x=x.type,d=x===3||x===4&&d===!0?"":""+d,g?a.setAttributeNS(g,c,d):a.setAttribute(c,d))))}var R=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),j=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),V=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),te=Symbol.iterator;function ae(a){return a===null||typeof a!="object"?null:(a=te&&a[te]||a["@@iterator"],typeof a=="function"?a:null)}var $=Object.assign,D;function G(a){if(D===void 0)try{throw Error()}catch(d){var c=d.stack.trim().match(/\n( *(at )?)/);D=c&&c[1]||""}return`
34
+ `+D+a}var E=!1;function fe(a,c){if(!a||E)return"";E=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(W){var g=W}Reflect.construct(a,[],c)}else{try{c.call()}catch(W){g=W}a.call(c.prototype)}else{try{throw Error()}catch(W){g=W}a()}}catch(W){if(W&&g&&typeof W.stack=="string"){for(var x=W.stack.split(`
35
+ `),v=g.stack.split(`
36
+ `),P=x.length-1,M=v.length-1;1<=P&&0<=M&&x[P]!==v[M];)M--;for(;1<=P&&0<=M;P--,M--)if(x[P]!==v[M]){if(P!==1||M!==1)do if(P--,M--,0>M||x[P]!==v[M]){var N=`
37
+ `+x[P].replace(" at new "," at ");return a.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",a.displayName)),N}while(1<=P&&0<=M);break}}}finally{E=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?G(a):""}function $e(a){switch(a.tag){case 5:return G(a.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return a=fe(a.type,!1),a;case 11:return a=fe(a.type.render,!1),a;case 1:return a=fe(a.type,!0),a;default:return""}}function Pe(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case Z:return"Fragment";case j:return"Portal";case J:return"Profiler";case q:return"StrictMode";case H:return"Suspense";case ee:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case V:return(a.displayName||"Context")+".Consumer";case _:return(a._context.displayName||"Context")+".Provider";case F:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case Y:return c=a.displayName||null,c!==null?c:Pe(a.type)||"Memo";case me:c=a._payload,a=a._init;try{return Pe(a(c))}catch{}}return null}function ze(a){var c=a.type;switch(a.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=c.render,a=a.displayName||a.name||"",c.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pe(c);case 8:return c===q?"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 c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function _e(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function De(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function dt(a){var c=De(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,c),g=""+a[c];if(!a.hasOwnProperty(c)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,v=d.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return x.call(this)},set:function(P){g=""+P,v.call(this,P)}}),Object.defineProperty(a,c,{enumerable:d.enumerable}),{getValue:function(){return g},setValue:function(P){g=""+P},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function Sr(a){a._valueTracker||(a._valueTracker=dt(a))}function Wl(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var d=c.getValue(),g="";return a&&(g=De(a)?a.checked?"true":"false":a.value),a=g,a!==d?(c.setValue(a),!0):!1}function qi(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Pr(a,c){var d=c.checked;return $({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function en(a,c){var d=c.defaultValue==null?"":c.defaultValue,g=c.checked!=null?c.checked:c.defaultChecked;d=_e(c.value!=null?c.value:d),a._wrapperState={initialChecked:g,initialValue:d,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function zn(a,c){c=c.checked,c!=null&&Q(a,"checked",c,!1)}function vn(a,c){zn(a,c);var d=_e(c.value),g=c.type;if(d!=null)g==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(g==="submit"||g==="reset"){a.removeAttribute("value");return}c.hasOwnProperty("value")?Vl(a,c.type,d):c.hasOwnProperty("defaultValue")&&Vl(a,c.type,_e(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(a.defaultChecked=!!c.defaultChecked)}function Fi(a,c,d){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var g=c.type;if(!(g!=="submit"&&g!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+a._wrapperState.initialValue,d||c===a.value||(a.value=c),a.defaultValue=c}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function Vl(a,c,d){(c!=="number"||qi(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Yi=Array.isArray;function Ui(a,c,d,g){if(a=a.options,c){c={};for(var x=0;x<d.length;x++)c["$"+d[x]]=!0;for(d=0;d<a.length;d++)x=c.hasOwnProperty("$"+a[d].value),a[d].selected!==x&&(a[d].selected=x),x&&g&&(a[d].defaultSelected=!0)}else{for(d=""+_e(d),c=null,x=0;x<a.length;x++){if(a[x].value===d){a[x].selected=!0,g&&(a[x].defaultSelected=!0);return}c!==null||a[x].disabled||(c=a[x])}c!==null&&(c.selected=!0)}}function Ca(a,c){if(c.dangerouslySetInnerHTML!=null)throw Error(t(91));return $({},c,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Ic(a,c){var d=c.value;if(d==null){if(d=c.children,c=c.defaultValue,d!=null){if(c!=null)throw Error(t(92));if(Yi(d)){if(1<d.length)throw Error(t(93));d=d[0]}c=d}c==null&&(c=""),d=c}a._wrapperState={initialValue:_e(d)}}function zc(a,c){var d=_e(c.value),g=_e(c.defaultValue);d!=null&&(d=""+d,d!==a.value&&(a.value=d),c.defaultValue==null&&a.defaultValue!==d&&(a.defaultValue=d)),g!=null&&(a.defaultValue=""+g)}function Zc(a){var c=a.textContent;c===a._wrapperState.initialValue&&c!==""&&c!==null&&(a.value=c)}function K(a){switch(a){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 ue(a,c){return a==null||a==="http://www.w3.org/1999/xhtml"?K(c):a==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var Me,Ze=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,d,g,x){MSApp.execUnsafeLocalFunction(function(){return a(c,d,g,x)})}:a})(function(a,c){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=c;else{for(Me=Me||document.createElement("div"),Me.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=Me.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}});function Ge(a,c){if(c){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=c;return}}a.textContent=c}var Vt={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},yi=["Webkit","ms","Moz","O"];Object.keys(Vt).forEach(function(a){yi.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1),Vt[c]=Vt[a]})});function lr(a,c,d){return c==null||typeof c=="boolean"||c===""?"":d||typeof c!="number"||c===0||Vt.hasOwnProperty(a)&&Vt[a]?(""+c).trim():c+"px"}function Gi(a,c){a=a.style;for(var d in c)if(c.hasOwnProperty(d)){var g=d.indexOf("--")===0,x=lr(d,c[d],g);d==="float"&&(d="cssFloat"),g?a.setProperty(d,x):a[d]=x}}var Ys=$({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 qt(a,c){if(c){if(Ys[a]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(t(137,a));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(t(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(t(61))}if(c.style!=null&&typeof c.style!="object")throw Error(t(62))}}function Br(a,c){if(a.indexOf("-")===-1)return typeof c.is=="string";switch(a){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 Zn=null;function dp(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var pp=null,ql=null,Fl=null;function Xx(a){if(a=Ya(a)){if(typeof pp!="function")throw Error(t(280));var c=a.stateNode;c&&(c=ch(c),pp(a.stateNode,a.type,c))}}function Bx(a){ql?Fl?Fl.push(a):Fl=[a]:ql=a}function Wx(){if(ql){var a=ql,c=Fl;if(Fl=ql=null,Xx(a),c)for(a=0;a<c.length;a++)Xx(c[a])}}function Vx(a,c){return a(c)}function qx(){}var mp=!1;function Fx(a,c,d){if(mp)return a(c,d);mp=!0;try{return Vx(a,c,d)}finally{mp=!1,(ql!==null||Fl!==null)&&(qx(),Wx())}}function Qa(a,c){var d=a.stateNode;if(d===null)return null;var g=ch(d);if(g===null)return null;d=g[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(a=a.type,g=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!g;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(t(231,c,typeof d));return d}var gp=!1;if(o)try{var $a={};Object.defineProperty($a,"passive",{get:function(){gp=!0}}),window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch{gp=!1}function SE(a,c,d,g,x,v,P,M,N){var W=Array.prototype.slice.call(arguments,3);try{c.apply(d,W)}catch(re){this.onError(re)}}var Ta=!1,Xc=null,Bc=!1,Op=null,PE={onError:function(a){Ta=!0,Xc=a}};function CE(a,c,d,g,x,v,P,M,N){Ta=!1,Xc=null,SE.apply(PE,arguments)}function QE(a,c,d,g,x,v,P,M,N){if(CE.apply(this,arguments),Ta){if(Ta){var W=Xc;Ta=!1,Xc=null}else throw Error(t(198));Bc||(Bc=!0,Op=W)}}function Us(a){var c=a,d=a;if(a.alternate)for(;c.return;)c=c.return;else{a=c;do c=a,(c.flags&4098)!==0&&(d=c.return),a=c.return;while(a)}return c.tag===3?d:null}function Yx(a){if(a.tag===13){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function Ux(a){if(Us(a)!==a)throw Error(t(188))}function $E(a){var c=a.alternate;if(!c){if(c=Us(a),c===null)throw Error(t(188));return c!==a?null:a}for(var d=a,g=c;;){var x=d.return;if(x===null)break;var v=x.alternate;if(v===null){if(g=x.return,g!==null){d=g;continue}break}if(x.child===v.child){for(v=x.child;v;){if(v===d)return Ux(x),a;if(v===g)return Ux(x),c;v=v.sibling}throw Error(t(188))}if(d.return!==g.return)d=x,g=v;else{for(var P=!1,M=x.child;M;){if(M===d){P=!0,d=x,g=v;break}if(M===g){P=!0,g=x,d=v;break}M=M.sibling}if(!P){for(M=v.child;M;){if(M===d){P=!0,d=v,g=x;break}if(M===g){P=!0,g=v,d=x;break}M=M.sibling}if(!P)throw Error(t(189))}}if(d.alternate!==g)throw Error(t(190))}if(d.tag!==3)throw Error(t(188));return d.stateNode.current===d?a:c}function Gx(a){return a=$E(a),a!==null?Hx(a):null}function Hx(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var c=Hx(a);if(c!==null)return c;a=a.sibling}return null}var Kx=e.unstable_scheduleCallback,Jx=e.unstable_cancelCallback,TE=e.unstable_shouldYield,jE=e.unstable_requestPaint,Qt=e.unstable_now,EE=e.unstable_getCurrentPriorityLevel,yp=e.unstable_ImmediatePriority,e1=e.unstable_UserBlockingPriority,Wc=e.unstable_NormalPriority,ME=e.unstable_LowPriority,t1=e.unstable_IdlePriority,Vc=null,Wr=null;function AE(a){if(Wr&&typeof Wr.onCommitFiberRoot=="function")try{Wr.onCommitFiberRoot(Vc,a,void 0,(a.current.flags&128)===128)}catch{}}var Cr=Math.clz32?Math.clz32:LE,RE=Math.log,NE=Math.LN2;function LE(a){return a>>>=0,a===0?32:31-(RE(a)/NE|0)|0}var qc=64,Fc=4194304;function ja(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Yc(a,c){var d=a.pendingLanes;if(d===0)return 0;var g=0,x=a.suspendedLanes,v=a.pingedLanes,P=d&268435455;if(P!==0){var M=P&~x;M!==0?g=ja(M):(v&=P,v!==0&&(g=ja(v)))}else P=d&~x,P!==0?g=ja(P):v!==0&&(g=ja(v));if(g===0)return 0;if(c!==0&&c!==g&&(c&x)===0&&(x=g&-g,v=c&-c,x>=v||x===16&&(v&4194240)!==0))return c;if((g&4)!==0&&(g|=d&16),c=a.entangledLanes,c!==0)for(a=a.entanglements,c&=g;0<c;)d=31-Cr(c),x=1<<d,g|=a[d],c&=~x;return g}function _E(a,c){switch(a){case 1:case 2:case 4:return c+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 c+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 DE(a,c){for(var d=a.suspendedLanes,g=a.pingedLanes,x=a.expirationTimes,v=a.pendingLanes;0<v;){var P=31-Cr(v),M=1<<P,N=x[P];N===-1?((M&d)===0||(M&g)!==0)&&(x[P]=_E(M,c)):N<=c&&(a.expiredLanes|=M),v&=~M}}function xp(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function n1(){var a=qc;return qc<<=1,(qc&4194240)===0&&(qc=64),a}function kp(a){for(var c=[],d=0;31>d;d++)c.push(a);return c}function Ea(a,c,d){a.pendingLanes|=c,c!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,c=31-Cr(c),a[c]=d}function IE(a,c){var d=a.pendingLanes&~c;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=c,a.mutableReadLanes&=c,a.entangledLanes&=c,c=a.entanglements;var g=a.eventTimes;for(a=a.expirationTimes;0<d;){var x=31-Cr(d),v=1<<x;c[x]=0,g[x]=-1,a[x]=-1,d&=~v}}function vp(a,c){var d=a.entangledLanes|=c;for(a=a.entanglements;d;){var g=31-Cr(d),x=1<<g;x&c|a[g]&c&&(a[g]|=c),d&=~x}}var nt=0;function r1(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var i1,bp,s1,l1,o1,wp=!1,Uc=[],Hi=null,Ki=null,Ji=null,Ma=new Map,Aa=new Map,es=[],zE="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 a1(a,c){switch(a){case"focusin":case"focusout":Hi=null;break;case"dragenter":case"dragleave":Ki=null;break;case"mouseover":case"mouseout":Ji=null;break;case"pointerover":case"pointerout":Ma.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Aa.delete(c.pointerId)}}function Ra(a,c,d,g,x,v){return a===null||a.nativeEvent!==v?(a={blockedOn:c,domEventName:d,eventSystemFlags:g,nativeEvent:v,targetContainers:[x]},c!==null&&(c=Ya(c),c!==null&&bp(c)),a):(a.eventSystemFlags|=g,c=a.targetContainers,x!==null&&c.indexOf(x)===-1&&c.push(x),a)}function ZE(a,c,d,g,x){switch(c){case"focusin":return Hi=Ra(Hi,a,c,d,g,x),!0;case"dragenter":return Ki=Ra(Ki,a,c,d,g,x),!0;case"mouseover":return Ji=Ra(Ji,a,c,d,g,x),!0;case"pointerover":var v=x.pointerId;return Ma.set(v,Ra(Ma.get(v)||null,a,c,d,g,x)),!0;case"gotpointercapture":return v=x.pointerId,Aa.set(v,Ra(Aa.get(v)||null,a,c,d,g,x)),!0}return!1}function u1(a){var c=Gs(a.target);if(c!==null){var d=Us(c);if(d!==null){if(c=d.tag,c===13){if(c=Yx(d),c!==null){a.blockedOn=c,o1(a.priority,function(){s1(d)});return}}else if(c===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Gc(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var d=Pp(a.domEventName,a.eventSystemFlags,c[0],a.nativeEvent);if(d===null){d=a.nativeEvent;var g=new d.constructor(d.type,d);Zn=g,d.target.dispatchEvent(g),Zn=null}else return c=Ya(d),c!==null&&bp(c),a.blockedOn=d,!1;c.shift()}return!0}function c1(a,c,d){Gc(a)&&d.delete(c)}function XE(){wp=!1,Hi!==null&&Gc(Hi)&&(Hi=null),Ki!==null&&Gc(Ki)&&(Ki=null),Ji!==null&&Gc(Ji)&&(Ji=null),Ma.forEach(c1),Aa.forEach(c1)}function Na(a,c){a.blockedOn===c&&(a.blockedOn=null,wp||(wp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,XE)))}function La(a){function c(x){return Na(x,a)}if(0<Uc.length){Na(Uc[0],a);for(var d=1;d<Uc.length;d++){var g=Uc[d];g.blockedOn===a&&(g.blockedOn=null)}}for(Hi!==null&&Na(Hi,a),Ki!==null&&Na(Ki,a),Ji!==null&&Na(Ji,a),Ma.forEach(c),Aa.forEach(c),d=0;d<es.length;d++)g=es[d],g.blockedOn===a&&(g.blockedOn=null);for(;0<es.length&&(d=es[0],d.blockedOn===null);)u1(d),d.blockedOn===null&&es.shift()}var Yl=R.ReactCurrentBatchConfig,Hc=!0;function BE(a,c,d,g){var x=nt,v=Yl.transition;Yl.transition=null;try{nt=1,Sp(a,c,d,g)}finally{nt=x,Yl.transition=v}}function WE(a,c,d,g){var x=nt,v=Yl.transition;Yl.transition=null;try{nt=4,Sp(a,c,d,g)}finally{nt=x,Yl.transition=v}}function Sp(a,c,d,g){if(Hc){var x=Pp(a,c,d,g);if(x===null)Xp(a,c,g,Kc,d),a1(a,g);else if(ZE(x,a,c,d,g))g.stopPropagation();else if(a1(a,g),c&4&&-1<zE.indexOf(a)){for(;x!==null;){var v=Ya(x);if(v!==null&&i1(v),v=Pp(a,c,d,g),v===null&&Xp(a,c,g,Kc,d),v===x)break;x=v}x!==null&&g.stopPropagation()}else Xp(a,c,g,null,d)}}var Kc=null;function Pp(a,c,d,g){if(Kc=null,a=dp(g),a=Gs(a),a!==null)if(c=Us(a),c===null)a=null;else if(d=c.tag,d===13){if(a=Yx(c),a!==null)return a;a=null}else if(d===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;a=null}else c!==a&&(a=null);return Kc=a,null}function h1(a){switch(a){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(EE()){case yp:return 1;case e1:return 4;case Wc:case ME:return 16;case t1:return 536870912;default:return 16}default:return 16}}var ts=null,Cp=null,Jc=null;function f1(){if(Jc)return Jc;var a,c=Cp,d=c.length,g,x="value"in ts?ts.value:ts.textContent,v=x.length;for(a=0;a<d&&c[a]===x[a];a++);var P=d-a;for(g=1;g<=P&&c[d-g]===x[v-g];g++);return Jc=x.slice(a,1<g?1-g:void 0)}function eh(a){var c=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&c===13&&(a=13)):a=c,a===10&&(a=13),32<=a||a===13?a:0}function th(){return!0}function d1(){return!1}function Xn(a){function c(d,g,x,v,P){this._reactName=d,this._targetInst=x,this.type=g,this.nativeEvent=v,this.target=P,this.currentTarget=null;for(var M in a)a.hasOwnProperty(M)&&(d=a[M],this[M]=d?d(v):v[M]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?th:d1,this.isPropagationStopped=d1,this}return $(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=th)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=th)},persist:function(){},isPersistent:th}),c}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qp=Xn(Ul),_a=$({},Ul,{view:0,detail:0}),VE=Xn(_a),$p,Tp,Da,nh=$({},_a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ep,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Da&&(Da&&a.type==="mousemove"?($p=a.screenX-Da.screenX,Tp=a.screenY-Da.screenY):Tp=$p=0,Da=a),$p)},movementY:function(a){return"movementY"in a?a.movementY:Tp}}),p1=Xn(nh),qE=$({},nh,{dataTransfer:0}),FE=Xn(qE),YE=$({},_a,{relatedTarget:0}),jp=Xn(YE),UE=$({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),GE=Xn(UE),HE=$({},Ul,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),KE=Xn(HE),JE=$({},Ul,{data:0}),m1=Xn(JE),eM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tM={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"},nM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rM(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=nM[a])?!!c[a]:!1}function Ep(){return rM}var iM=$({},_a,{key:function(a){if(a.key){var c=eM[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=eh(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?tM[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ep,charCode:function(a){return a.type==="keypress"?eh(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?eh(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),sM=Xn(iM),lM=$({},nh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),g1=Xn(lM),oM=$({},_a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ep}),aM=Xn(oM),uM=$({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),cM=Xn(uM),hM=$({},nh,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),fM=Xn(hM),dM=[9,13,27,32],Mp=o&&"CompositionEvent"in window,Ia=null;o&&"documentMode"in document&&(Ia=document.documentMode);var pM=o&&"TextEvent"in window&&!Ia,O1=o&&(!Mp||Ia&&8<Ia&&11>=Ia),y1=" ",x1=!1;function k1(a,c){switch(a){case"keyup":return dM.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v1(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Gl=!1;function mM(a,c){switch(a){case"compositionend":return v1(c);case"keypress":return c.which!==32?null:(x1=!0,y1);case"textInput":return a=c.data,a===y1&&x1?null:a;default:return null}}function gM(a,c){if(Gl)return a==="compositionend"||!Mp&&k1(a,c)?(a=f1(),Jc=Cp=ts=null,Gl=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return O1&&c.locale!=="ko"?null:c.data;default:return null}}var OM={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 b1(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!OM[a.type]:c==="textarea"}function w1(a,c,d,g){Bx(g),c=oh(c,"onChange"),0<c.length&&(d=new Qp("onChange","change",null,d,g),a.push({event:d,listeners:c}))}var za=null,Za=null;function yM(a){Z1(a,0)}function rh(a){var c=to(a);if(Wl(c))return a}function xM(a,c){if(a==="change")return c}var S1=!1;if(o){var Ap;if(o){var Rp="oninput"in document;if(!Rp){var P1=document.createElement("div");P1.setAttribute("oninput","return;"),Rp=typeof P1.oninput=="function"}Ap=Rp}else Ap=!1;S1=Ap&&(!document.documentMode||9<document.documentMode)}function C1(){za&&(za.detachEvent("onpropertychange",Q1),Za=za=null)}function Q1(a){if(a.propertyName==="value"&&rh(Za)){var c=[];w1(c,Za,a,dp(a)),Fx(yM,c)}}function kM(a,c,d){a==="focusin"?(C1(),za=c,Za=d,za.attachEvent("onpropertychange",Q1)):a==="focusout"&&C1()}function vM(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return rh(Za)}function bM(a,c){if(a==="click")return rh(c)}function wM(a,c){if(a==="input"||a==="change")return rh(c)}function SM(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var Qr=typeof Object.is=="function"?Object.is:SM;function Xa(a,c){if(Qr(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var d=Object.keys(a),g=Object.keys(c);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var x=d[g];if(!u.call(c,x)||!Qr(a[x],c[x]))return!1}return!0}function $1(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function T1(a,c){var d=$1(a);a=0;for(var g;d;){if(d.nodeType===3){if(g=a+d.textContent.length,a<=c&&g>=c)return{node:d,offset:c-a};a=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=$1(d)}}function j1(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?j1(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function E1(){for(var a=window,c=qi();c instanceof a.HTMLIFrameElement;){try{var d=typeof c.contentWindow.location.href=="string"}catch{d=!1}if(d)a=c.contentWindow;else break;c=qi(a.document)}return c}function Np(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c&&(c==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||c==="textarea"||a.contentEditable==="true")}function PM(a){var c=E1(),d=a.focusedElem,g=a.selectionRange;if(c!==d&&d&&d.ownerDocument&&j1(d.ownerDocument.documentElement,d)){if(g!==null&&Np(d)){if(c=g.start,a=g.end,a===void 0&&(a=c),"selectionStart"in d)d.selectionStart=c,d.selectionEnd=Math.min(a,d.value.length);else if(a=(c=d.ownerDocument||document)&&c.defaultView||window,a.getSelection){a=a.getSelection();var x=d.textContent.length,v=Math.min(g.start,x);g=g.end===void 0?v:Math.min(g.end,x),!a.extend&&v>g&&(x=g,g=v,v=x),x=T1(d,v);var P=T1(d,g);x&&P&&(a.rangeCount!==1||a.anchorNode!==x.node||a.anchorOffset!==x.offset||a.focusNode!==P.node||a.focusOffset!==P.offset)&&(c=c.createRange(),c.setStart(x.node,x.offset),a.removeAllRanges(),v>g?(a.addRange(c),a.extend(P.node,P.offset)):(c.setEnd(P.node,P.offset),a.addRange(c)))}}for(c=[],a=d;a=a.parentNode;)a.nodeType===1&&c.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<c.length;d++)a=c[d],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var CM=o&&"documentMode"in document&&11>=document.documentMode,Hl=null,Lp=null,Ba=null,_p=!1;function M1(a,c,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;_p||Hl==null||Hl!==qi(g)||(g=Hl,"selectionStart"in g&&Np(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Ba&&Xa(Ba,g)||(Ba=g,g=oh(Lp,"onSelect"),0<g.length&&(c=new Qp("onSelect","select",null,c,d),a.push({event:c,listeners:g}),c.target=Hl)))}function ih(a,c){var d={};return d[a.toLowerCase()]=c.toLowerCase(),d["Webkit"+a]="webkit"+c,d["Moz"+a]="moz"+c,d}var Kl={animationend:ih("Animation","AnimationEnd"),animationiteration:ih("Animation","AnimationIteration"),animationstart:ih("Animation","AnimationStart"),transitionend:ih("Transition","TransitionEnd")},Dp={},A1={};o&&(A1=document.createElement("div").style,"AnimationEvent"in window||(delete Kl.animationend.animation,delete Kl.animationiteration.animation,delete Kl.animationstart.animation),"TransitionEvent"in window||delete Kl.transitionend.transition);function sh(a){if(Dp[a])return Dp[a];if(!Kl[a])return a;var c=Kl[a],d;for(d in c)if(c.hasOwnProperty(d)&&d in A1)return Dp[a]=c[d];return a}var R1=sh("animationend"),N1=sh("animationiteration"),L1=sh("animationstart"),_1=sh("transitionend"),D1=new Map,I1="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 ns(a,c){D1.set(a,c),s(c,[a])}for(var Ip=0;Ip<I1.length;Ip++){var zp=I1[Ip],QM=zp.toLowerCase(),$M=zp[0].toUpperCase()+zp.slice(1);ns(QM,"on"+$M)}ns(R1,"onAnimationEnd"),ns(N1,"onAnimationIteration"),ns(L1,"onAnimationStart"),ns("dblclick","onDoubleClick"),ns("focusin","onFocus"),ns("focusout","onBlur"),ns(_1,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wa="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(" "),TM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wa));function z1(a,c,d){var g=a.type||"unknown-event";a.currentTarget=d,QE(g,c,void 0,a),a.currentTarget=null}function Z1(a,c){c=(c&4)!==0;for(var d=0;d<a.length;d++){var g=a[d],x=g.event;g=g.listeners;e:{var v=void 0;if(c)for(var P=g.length-1;0<=P;P--){var M=g[P],N=M.instance,W=M.currentTarget;if(M=M.listener,N!==v&&x.isPropagationStopped())break e;z1(x,M,W),v=N}else for(P=0;P<g.length;P++){if(M=g[P],N=M.instance,W=M.currentTarget,M=M.listener,N!==v&&x.isPropagationStopped())break e;z1(x,M,W),v=N}}}if(Bc)throw a=Op,Bc=!1,Op=null,a}function pt(a,c){var d=c[Yp];d===void 0&&(d=c[Yp]=new Set);var g=a+"__bubble";d.has(g)||(X1(c,a,2,!1),d.add(g))}function Zp(a,c,d){var g=0;c&&(g|=4),X1(d,a,g,c)}var lh="_reactListening"+Math.random().toString(36).slice(2);function Va(a){if(!a[lh]){a[lh]=!0,r.forEach(function(d){d!=="selectionchange"&&(TM.has(d)||Zp(d,!1,a),Zp(d,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[lh]||(c[lh]=!0,Zp("selectionchange",!1,c))}}function X1(a,c,d,g){switch(h1(c)){case 1:var x=BE;break;case 4:x=WE;break;default:x=Sp}d=x.bind(null,c,d,a),x=void 0,!gp||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(x=!0),g?x!==void 0?a.addEventListener(c,d,{capture:!0,passive:x}):a.addEventListener(c,d,!0):x!==void 0?a.addEventListener(c,d,{passive:x}):a.addEventListener(c,d,!1)}function Xp(a,c,d,g,x){var v=g;if((c&1)===0&&(c&2)===0&&g!==null)e:for(;;){if(g===null)return;var P=g.tag;if(P===3||P===4){var M=g.stateNode.containerInfo;if(M===x||M.nodeType===8&&M.parentNode===x)break;if(P===4)for(P=g.return;P!==null;){var N=P.tag;if((N===3||N===4)&&(N=P.stateNode.containerInfo,N===x||N.nodeType===8&&N.parentNode===x))return;P=P.return}for(;M!==null;){if(P=Gs(M),P===null)return;if(N=P.tag,N===5||N===6){g=v=P;continue e}M=M.parentNode}}g=g.return}Fx(function(){var W=v,re=dp(d),ie=[];e:{var ne=D1.get(a);if(ne!==void 0){var Oe=Qp,ke=a;switch(a){case"keypress":if(eh(d)===0)break e;case"keydown":case"keyup":Oe=sM;break;case"focusin":ke="focus",Oe=jp;break;case"focusout":ke="blur",Oe=jp;break;case"beforeblur":case"afterblur":Oe=jp;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Oe=p1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=FE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=aM;break;case R1:case N1:case L1:Oe=GE;break;case _1:Oe=cM;break;case"scroll":Oe=VE;break;case"wheel":Oe=fM;break;case"copy":case"cut":case"paste":Oe=KE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=g1}var be=(c&4)!==0,$t=!be&&a==="scroll",X=be?ne!==null?ne+"Capture":null:ne;be=[];for(var z=W,B;z!==null;){B=z;var le=B.stateNode;if(B.tag===5&&le!==null&&(B=le,X!==null&&(le=Qa(z,X),le!=null&&be.push(qa(z,le,B)))),$t)break;z=z.return}0<be.length&&(ne=new Oe(ne,ke,null,d,re),ie.push({event:ne,listeners:be}))}}if((c&7)===0){e:{if(ne=a==="mouseover"||a==="pointerover",Oe=a==="mouseout"||a==="pointerout",ne&&d!==Zn&&(ke=d.relatedTarget||d.fromElement)&&(Gs(ke)||ke[xi]))break e;if((Oe||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,Oe?(ke=d.relatedTarget||d.toElement,Oe=W,ke=ke?Gs(ke):null,ke!==null&&($t=Us(ke),ke!==$t||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(Oe=null,ke=W),Oe!==ke)){if(be=p1,le="onMouseLeave",X="onMouseEnter",z="mouse",(a==="pointerout"||a==="pointerover")&&(be=g1,le="onPointerLeave",X="onPointerEnter",z="pointer"),$t=Oe==null?ne:to(Oe),B=ke==null?ne:to(ke),ne=new be(le,z+"leave",Oe,d,re),ne.target=$t,ne.relatedTarget=B,le=null,Gs(re)===W&&(be=new be(X,z+"enter",ke,d,re),be.target=B,be.relatedTarget=$t,le=be),$t=le,Oe&&ke)t:{for(be=Oe,X=ke,z=0,B=be;B;B=Jl(B))z++;for(B=0,le=X;le;le=Jl(le))B++;for(;0<z-B;)be=Jl(be),z--;for(;0<B-z;)X=Jl(X),B--;for(;z--;){if(be===X||X!==null&&be===X.alternate)break t;be=Jl(be),X=Jl(X)}be=null}else be=null;Oe!==null&&B1(ie,ne,Oe,be,!1),ke!==null&&$t!==null&&B1(ie,$t,ke,be,!0)}}e:{if(ne=W?to(W):window,Oe=ne.nodeName&&ne.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&ne.type==="file")var we=xM;else if(b1(ne))if(S1)we=wM;else{we=vM;var Te=kM}else(Oe=ne.nodeName)&&Oe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(we=bM);if(we&&(we=we(a,W))){w1(ie,we,d,re);break e}Te&&Te(a,ne,W),a==="focusout"&&(Te=ne._wrapperState)&&Te.controlled&&ne.type==="number"&&Vl(ne,"number",ne.value)}switch(Te=W?to(W):window,a){case"focusin":(b1(Te)||Te.contentEditable==="true")&&(Hl=Te,Lp=W,Ba=null);break;case"focusout":Ba=Lp=Hl=null;break;case"mousedown":_p=!0;break;case"contextmenu":case"mouseup":case"dragend":_p=!1,M1(ie,d,re);break;case"selectionchange":if(CM)break;case"keydown":case"keyup":M1(ie,d,re)}var je;if(Mp)e:{switch(a){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else Gl?k1(a,d)&&(Ae="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(Ae="onCompositionStart");Ae&&(O1&&d.locale!=="ko"&&(Gl||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&Gl&&(je=f1()):(ts=re,Cp="value"in ts?ts.value:ts.textContent,Gl=!0)),Te=oh(W,Ae),0<Te.length&&(Ae=new m1(Ae,a,null,d,re),ie.push({event:Ae,listeners:Te}),je?Ae.data=je:(je=v1(d),je!==null&&(Ae.data=je)))),(je=pM?mM(a,d):gM(a,d))&&(W=oh(W,"onBeforeInput"),0<W.length&&(re=new m1("onBeforeInput","beforeinput",null,d,re),ie.push({event:re,listeners:W}),re.data=je))}Z1(ie,c)})}function qa(a,c,d){return{instance:a,listener:c,currentTarget:d}}function oh(a,c){for(var d=c+"Capture",g=[];a!==null;){var x=a,v=x.stateNode;x.tag===5&&v!==null&&(x=v,v=Qa(a,d),v!=null&&g.unshift(qa(a,v,x)),v=Qa(a,c),v!=null&&g.push(qa(a,v,x))),a=a.return}return g}function Jl(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function B1(a,c,d,g,x){for(var v=c._reactName,P=[];d!==null&&d!==g;){var M=d,N=M.alternate,W=M.stateNode;if(N!==null&&N===g)break;M.tag===5&&W!==null&&(M=W,x?(N=Qa(d,v),N!=null&&P.unshift(qa(d,N,M))):x||(N=Qa(d,v),N!=null&&P.push(qa(d,N,M)))),d=d.return}P.length!==0&&a.push({event:c,listeners:P})}var jM=/\r\n?/g,EM=/\u0000|\uFFFD/g;function W1(a){return(typeof a=="string"?a:""+a).replace(jM,`
38
+ `).replace(EM,"")}function ah(a,c,d){if(c=W1(c),W1(a)!==c&&d)throw Error(t(425))}function uh(){}var Bp=null,Wp=null;function Vp(a,c){return a==="textarea"||a==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var qp=typeof setTimeout=="function"?setTimeout:void 0,MM=typeof clearTimeout=="function"?clearTimeout:void 0,V1=typeof Promise=="function"?Promise:void 0,AM=typeof queueMicrotask=="function"?queueMicrotask:typeof V1<"u"?function(a){return V1.resolve(null).then(a).catch(RM)}:qp;function RM(a){setTimeout(function(){throw a})}function Fp(a,c){var d=c,g=0;do{var x=d.nextSibling;if(a.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"){if(g===0){a.removeChild(x),La(c);return}g--}else d!=="$"&&d!=="$?"&&d!=="$!"||g++;d=x}while(d);La(c)}function rs(a){for(;a!=null;a=a.nextSibling){var c=a.nodeType;if(c===1||c===3)break;if(c===8){if(c=a.data,c==="$"||c==="$!"||c==="$?")break;if(c==="/$")return null}}return a}function q1(a){a=a.previousSibling;for(var c=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"){if(c===0)return a;c--}else d==="/$"&&c++}a=a.previousSibling}return null}var eo=Math.random().toString(36).slice(2),Vr="__reactFiber$"+eo,Fa="__reactProps$"+eo,xi="__reactContainer$"+eo,Yp="__reactEvents$"+eo,NM="__reactListeners$"+eo,LM="__reactHandles$"+eo;function Gs(a){var c=a[Vr];if(c)return c;for(var d=a.parentNode;d;){if(c=d[xi]||d[Vr]){if(d=c.alternate,c.child!==null||d!==null&&d.child!==null)for(a=q1(a);a!==null;){if(d=a[Vr])return d;a=q1(a)}return c}a=d,d=a.parentNode}return null}function Ya(a){return a=a[Vr]||a[xi],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function to(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(t(33))}function ch(a){return a[Fa]||null}var Up=[],no=-1;function is(a){return{current:a}}function mt(a){0>no||(a.current=Up[no],Up[no]=null,no--)}function ht(a,c){no++,Up[no]=a.current,a.current=c}var ss={},tn=is(ss),bn=is(!1),Hs=ss;function ro(a,c){var d=a.type.contextTypes;if(!d)return ss;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===c)return g.__reactInternalMemoizedMaskedChildContext;var x={},v;for(v in d)x[v]=c[v];return g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=c,a.__reactInternalMemoizedMaskedChildContext=x),x}function wn(a){return a=a.childContextTypes,a!=null}function hh(){mt(bn),mt(tn)}function F1(a,c,d){if(tn.current!==ss)throw Error(t(168));ht(tn,c),ht(bn,d)}function Y1(a,c,d){var g=a.stateNode;if(c=c.childContextTypes,typeof g.getChildContext!="function")return d;g=g.getChildContext();for(var x in g)if(!(x in c))throw Error(t(108,ze(a)||"Unknown",x));return $({},d,g)}function fh(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||ss,Hs=tn.current,ht(tn,a),ht(bn,bn.current),!0}function U1(a,c,d){var g=a.stateNode;if(!g)throw Error(t(169));d?(a=Y1(a,c,Hs),g.__reactInternalMemoizedMergedChildContext=a,mt(bn),mt(tn),ht(tn,a)):mt(bn),ht(bn,d)}var ki=null,dh=!1,Gp=!1;function G1(a){ki===null?ki=[a]:ki.push(a)}function _M(a){dh=!0,G1(a)}function ls(){if(!Gp&&ki!==null){Gp=!0;var a=0,c=nt;try{var d=ki;for(nt=1;a<d.length;a++){var g=d[a];do g=g(!0);while(g!==null)}ki=null,dh=!1}catch(x){throw ki!==null&&(ki=ki.slice(a+1)),Kx(yp,ls),x}finally{nt=c,Gp=!1}}return null}var io=[],so=0,ph=null,mh=0,or=[],ar=0,Ks=null,vi=1,bi="";function Js(a,c){io[so++]=mh,io[so++]=ph,ph=a,mh=c}function H1(a,c,d){or[ar++]=vi,or[ar++]=bi,or[ar++]=Ks,Ks=a;var g=vi;a=bi;var x=32-Cr(g)-1;g&=~(1<<x),d+=1;var v=32-Cr(c)+x;if(30<v){var P=x-x%5;v=(g&(1<<P)-1).toString(32),g>>=P,x-=P,vi=1<<32-Cr(c)+x|d<<x|g,bi=v+a}else vi=1<<v|d<<x|g,bi=a}function Hp(a){a.return!==null&&(Js(a,1),H1(a,1,0))}function Kp(a){for(;a===ph;)ph=io[--so],io[so]=null,mh=io[--so],io[so]=null;for(;a===Ks;)Ks=or[--ar],or[ar]=null,bi=or[--ar],or[ar]=null,vi=or[--ar],or[ar]=null}var Bn=null,Wn=null,gt=!1,$r=null;function K1(a,c){var d=fr(5,null,null,0);d.elementType="DELETED",d.stateNode=c,d.return=a,c=a.deletions,c===null?(a.deletions=[d],a.flags|=16):c.push(d)}function J1(a,c){switch(a.tag){case 5:var d=a.type;return c=c.nodeType!==1||d.toLowerCase()!==c.nodeName.toLowerCase()?null:c,c!==null?(a.stateNode=c,Bn=a,Wn=rs(c.firstChild),!0):!1;case 6:return c=a.pendingProps===""||c.nodeType!==3?null:c,c!==null?(a.stateNode=c,Bn=a,Wn=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(d=Ks!==null?{id:vi,overflow:bi}:null,a.memoizedState={dehydrated:c,treeContext:d,retryLane:1073741824},d=fr(18,null,null,0),d.stateNode=c,d.return=a,a.child=d,Bn=a,Wn=null,!0):!1;default:return!1}}function Jp(a){return(a.mode&1)!==0&&(a.flags&128)===0}function em(a){if(gt){var c=Wn;if(c){var d=c;if(!J1(a,c)){if(Jp(a))throw Error(t(418));c=rs(d.nextSibling);var g=Bn;c&&J1(a,c)?K1(g,d):(a.flags=a.flags&-4097|2,gt=!1,Bn=a)}}else{if(Jp(a))throw Error(t(418));a.flags=a.flags&-4097|2,gt=!1,Bn=a}}}function ek(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Bn=a}function gh(a){if(a!==Bn)return!1;if(!gt)return ek(a),gt=!0,!1;var c;if((c=a.tag!==3)&&!(c=a.tag!==5)&&(c=a.type,c=c!=="head"&&c!=="body"&&!Vp(a.type,a.memoizedProps)),c&&(c=Wn)){if(Jp(a))throw tk(),Error(t(418));for(;c;)K1(a,c),c=rs(c.nextSibling)}if(ek(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(t(317));e:{for(a=a.nextSibling,c=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"){if(c===0){Wn=rs(a.nextSibling);break e}c--}else d!=="$"&&d!=="$!"&&d!=="$?"||c++}a=a.nextSibling}Wn=null}}else Wn=Bn?rs(a.stateNode.nextSibling):null;return!0}function tk(){for(var a=Wn;a;)a=rs(a.nextSibling)}function lo(){Wn=Bn=null,gt=!1}function tm(a){$r===null?$r=[a]:$r.push(a)}var DM=R.ReactCurrentBatchConfig;function Ua(a,c,d){if(a=d.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(t(309));var g=d.stateNode}if(!g)throw Error(t(147,a));var x=g,v=""+a;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===v?c.ref:(c=function(P){var M=x.refs;P===null?delete M[v]:M[v]=P},c._stringRef=v,c)}if(typeof a!="string")throw Error(t(284));if(!d._owner)throw Error(t(290,a))}return a}function Oh(a,c){throw a=Object.prototype.toString.call(c),Error(t(31,a==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":a))}function nk(a){var c=a._init;return c(a._payload)}function rk(a){function c(X,z){if(a){var B=X.deletions;B===null?(X.deletions=[z],X.flags|=16):B.push(z)}}function d(X,z){if(!a)return null;for(;z!==null;)c(X,z),z=z.sibling;return null}function g(X,z){for(X=new Map;z!==null;)z.key!==null?X.set(z.key,z):X.set(z.index,z),z=z.sibling;return X}function x(X,z){return X=ps(X,z),X.index=0,X.sibling=null,X}function v(X,z,B){return X.index=B,a?(B=X.alternate,B!==null?(B=B.index,B<z?(X.flags|=2,z):B):(X.flags|=2,z)):(X.flags|=1048576,z)}function P(X){return a&&X.alternate===null&&(X.flags|=2),X}function M(X,z,B,le){return z===null||z.tag!==6?(z=qm(B,X.mode,le),z.return=X,z):(z=x(z,B),z.return=X,z)}function N(X,z,B,le){var we=B.type;return we===Z?re(X,z,B.props.children,le,B.key):z!==null&&(z.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===me&&nk(we)===z.type)?(le=x(z,B.props),le.ref=Ua(X,z,B),le.return=X,le):(le=Zh(B.type,B.key,B.props,null,X.mode,le),le.ref=Ua(X,z,B),le.return=X,le)}function W(X,z,B,le){return z===null||z.tag!==4||z.stateNode.containerInfo!==B.containerInfo||z.stateNode.implementation!==B.implementation?(z=Fm(B,X.mode,le),z.return=X,z):(z=x(z,B.children||[]),z.return=X,z)}function re(X,z,B,le,we){return z===null||z.tag!==7?(z=ol(B,X.mode,le,we),z.return=X,z):(z=x(z,B),z.return=X,z)}function ie(X,z,B){if(typeof z=="string"&&z!==""||typeof z=="number")return z=qm(""+z,X.mode,B),z.return=X,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case I:return B=Zh(z.type,z.key,z.props,null,X.mode,B),B.ref=Ua(X,null,z),B.return=X,B;case j:return z=Fm(z,X.mode,B),z.return=X,z;case me:var le=z._init;return ie(X,le(z._payload),B)}if(Yi(z)||ae(z))return z=ol(z,X.mode,B,null),z.return=X,z;Oh(X,z)}return null}function ne(X,z,B,le){var we=z!==null?z.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return we!==null?null:M(X,z,""+B,le);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case I:return B.key===we?N(X,z,B,le):null;case j:return B.key===we?W(X,z,B,le):null;case me:return we=B._init,ne(X,z,we(B._payload),le)}if(Yi(B)||ae(B))return we!==null?null:re(X,z,B,le,null);Oh(X,B)}return null}function Oe(X,z,B,le,we){if(typeof le=="string"&&le!==""||typeof le=="number")return X=X.get(B)||null,M(z,X,""+le,we);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case I:return X=X.get(le.key===null?B:le.key)||null,N(z,X,le,we);case j:return X=X.get(le.key===null?B:le.key)||null,W(z,X,le,we);case me:var Te=le._init;return Oe(X,z,B,Te(le._payload),we)}if(Yi(le)||ae(le))return X=X.get(B)||null,re(z,X,le,we,null);Oh(z,le)}return null}function ke(X,z,B,le){for(var we=null,Te=null,je=z,Ae=z=0,Zt=null;je!==null&&Ae<B.length;Ae++){je.index>Ae?(Zt=je,je=null):Zt=je.sibling;var Ke=ne(X,je,B[Ae],le);if(Ke===null){je===null&&(je=Zt);break}a&&je&&Ke.alternate===null&&c(X,je),z=v(Ke,z,Ae),Te===null?we=Ke:Te.sibling=Ke,Te=Ke,je=Zt}if(Ae===B.length)return d(X,je),gt&&Js(X,Ae),we;if(je===null){for(;Ae<B.length;Ae++)je=ie(X,B[Ae],le),je!==null&&(z=v(je,z,Ae),Te===null?we=je:Te.sibling=je,Te=je);return gt&&Js(X,Ae),we}for(je=g(X,je);Ae<B.length;Ae++)Zt=Oe(je,X,Ae,B[Ae],le),Zt!==null&&(a&&Zt.alternate!==null&&je.delete(Zt.key===null?Ae:Zt.key),z=v(Zt,z,Ae),Te===null?we=Zt:Te.sibling=Zt,Te=Zt);return a&&je.forEach(function(ms){return c(X,ms)}),gt&&Js(X,Ae),we}function be(X,z,B,le){var we=ae(B);if(typeof we!="function")throw Error(t(150));if(B=we.call(B),B==null)throw Error(t(151));for(var Te=we=null,je=z,Ae=z=0,Zt=null,Ke=B.next();je!==null&&!Ke.done;Ae++,Ke=B.next()){je.index>Ae?(Zt=je,je=null):Zt=je.sibling;var ms=ne(X,je,Ke.value,le);if(ms===null){je===null&&(je=Zt);break}a&&je&&ms.alternate===null&&c(X,je),z=v(ms,z,Ae),Te===null?we=ms:Te.sibling=ms,Te=ms,je=Zt}if(Ke.done)return d(X,je),gt&&Js(X,Ae),we;if(je===null){for(;!Ke.done;Ae++,Ke=B.next())Ke=ie(X,Ke.value,le),Ke!==null&&(z=v(Ke,z,Ae),Te===null?we=Ke:Te.sibling=Ke,Te=Ke);return gt&&Js(X,Ae),we}for(je=g(X,je);!Ke.done;Ae++,Ke=B.next())Ke=Oe(je,X,Ae,Ke.value,le),Ke!==null&&(a&&Ke.alternate!==null&&je.delete(Ke.key===null?Ae:Ke.key),z=v(Ke,z,Ae),Te===null?we=Ke:Te.sibling=Ke,Te=Ke);return a&&je.forEach(function(OA){return c(X,OA)}),gt&&Js(X,Ae),we}function $t(X,z,B,le){if(typeof B=="object"&&B!==null&&B.type===Z&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case I:e:{for(var we=B.key,Te=z;Te!==null;){if(Te.key===we){if(we=B.type,we===Z){if(Te.tag===7){d(X,Te.sibling),z=x(Te,B.props.children),z.return=X,X=z;break e}}else if(Te.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===me&&nk(we)===Te.type){d(X,Te.sibling),z=x(Te,B.props),z.ref=Ua(X,Te,B),z.return=X,X=z;break e}d(X,Te);break}else c(X,Te);Te=Te.sibling}B.type===Z?(z=ol(B.props.children,X.mode,le,B.key),z.return=X,X=z):(le=Zh(B.type,B.key,B.props,null,X.mode,le),le.ref=Ua(X,z,B),le.return=X,X=le)}return P(X);case j:e:{for(Te=B.key;z!==null;){if(z.key===Te)if(z.tag===4&&z.stateNode.containerInfo===B.containerInfo&&z.stateNode.implementation===B.implementation){d(X,z.sibling),z=x(z,B.children||[]),z.return=X,X=z;break e}else{d(X,z);break}else c(X,z);z=z.sibling}z=Fm(B,X.mode,le),z.return=X,X=z}return P(X);case me:return Te=B._init,$t(X,z,Te(B._payload),le)}if(Yi(B))return ke(X,z,B,le);if(ae(B))return be(X,z,B,le);Oh(X,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,z!==null&&z.tag===6?(d(X,z.sibling),z=x(z,B),z.return=X,X=z):(d(X,z),z=qm(B,X.mode,le),z.return=X,X=z),P(X)):d(X,z)}return $t}var oo=rk(!0),ik=rk(!1),yh=is(null),xh=null,ao=null,nm=null;function rm(){nm=ao=xh=null}function im(a){var c=yh.current;mt(yh),a._currentValue=c}function sm(a,c,d){for(;a!==null;){var g=a.alternate;if((a.childLanes&c)!==c?(a.childLanes|=c,g!==null&&(g.childLanes|=c)):g!==null&&(g.childLanes&c)!==c&&(g.childLanes|=c),a===d)break;a=a.return}}function uo(a,c){xh=a,nm=ao=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&c)!==0&&(Sn=!0),a.firstContext=null)}function ur(a){var c=a._currentValue;if(nm!==a)if(a={context:a,memoizedValue:c,next:null},ao===null){if(xh===null)throw Error(t(308));ao=a,xh.dependencies={lanes:0,firstContext:a}}else ao=ao.next=a;return c}var el=null;function lm(a){el===null?el=[a]:el.push(a)}function sk(a,c,d,g){var x=c.interleaved;return x===null?(d.next=d,lm(c)):(d.next=x.next,x.next=d),c.interleaved=d,wi(a,g)}function wi(a,c){a.lanes|=c;var d=a.alternate;for(d!==null&&(d.lanes|=c),d=a,a=a.return;a!==null;)a.childLanes|=c,d=a.alternate,d!==null&&(d.childLanes|=c),d=a,a=a.return;return d.tag===3?d.stateNode:null}var os=!1;function om(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lk(a,c){a=a.updateQueue,c.updateQueue===a&&(c.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Si(a,c){return{eventTime:a,lane:c,tag:0,payload:null,callback:null,next:null}}function as(a,c,d){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(He&2)!==0){var x=g.pending;return x===null?c.next=c:(c.next=x.next,x.next=c),g.pending=c,wi(a,d)}return x=g.interleaved,x===null?(c.next=c,lm(g)):(c.next=x.next,x.next=c),g.interleaved=c,wi(a,d)}function kh(a,c,d){if(c=c.updateQueue,c!==null&&(c=c.shared,(d&4194240)!==0)){var g=c.lanes;g&=a.pendingLanes,d|=g,c.lanes=d,vp(a,d)}}function ok(a,c){var d=a.updateQueue,g=a.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var x=null,v=null;if(d=d.firstBaseUpdate,d!==null){do{var P={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};v===null?x=v=P:v=v.next=P,d=d.next}while(d!==null);v===null?x=v=c:v=v.next=c}else x=v=c;d={baseState:g.baseState,firstBaseUpdate:x,lastBaseUpdate:v,shared:g.shared,effects:g.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=c}function vh(a,c,d,g){var x=a.updateQueue;os=!1;var v=x.firstBaseUpdate,P=x.lastBaseUpdate,M=x.shared.pending;if(M!==null){x.shared.pending=null;var N=M,W=N.next;N.next=null,P===null?v=W:P.next=W,P=N;var re=a.alternate;re!==null&&(re=re.updateQueue,M=re.lastBaseUpdate,M!==P&&(M===null?re.firstBaseUpdate=W:M.next=W,re.lastBaseUpdate=N))}if(v!==null){var ie=x.baseState;P=0,re=W=N=null,M=v;do{var ne=M.lane,Oe=M.eventTime;if((g&ne)===ne){re!==null&&(re=re.next={eventTime:Oe,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var ke=a,be=M;switch(ne=c,Oe=d,be.tag){case 1:if(ke=be.payload,typeof ke=="function"){ie=ke.call(Oe,ie,ne);break e}ie=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=be.payload,ne=typeof ke=="function"?ke.call(Oe,ie,ne):ke,ne==null)break e;ie=$({},ie,ne);break e;case 2:os=!0}}M.callback!==null&&M.lane!==0&&(a.flags|=64,ne=x.effects,ne===null?x.effects=[M]:ne.push(M))}else Oe={eventTime:Oe,lane:ne,tag:M.tag,payload:M.payload,callback:M.callback,next:null},re===null?(W=re=Oe,N=ie):re=re.next=Oe,P|=ne;if(M=M.next,M===null){if(M=x.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,x.lastBaseUpdate=ne,x.shared.pending=null}}while(!0);if(re===null&&(N=ie),x.baseState=N,x.firstBaseUpdate=W,x.lastBaseUpdate=re,c=x.shared.interleaved,c!==null){x=c;do P|=x.lane,x=x.next;while(x!==c)}else v===null&&(x.shared.lanes=0);rl|=P,a.lanes=P,a.memoizedState=ie}}function ak(a,c,d){if(a=c.effects,c.effects=null,a!==null)for(c=0;c<a.length;c++){var g=a[c],x=g.callback;if(x!==null){if(g.callback=null,g=d,typeof x!="function")throw Error(t(191,x));x.call(g)}}}var Ga={},qr=is(Ga),Ha=is(Ga),Ka=is(Ga);function tl(a){if(a===Ga)throw Error(t(174));return a}function am(a,c){switch(ht(Ka,c),ht(Ha,a),ht(qr,Ga),a=c.nodeType,a){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:ue(null,"");break;default:a=a===8?c.parentNode:c,c=a.namespaceURI||null,a=a.tagName,c=ue(c,a)}mt(qr),ht(qr,c)}function co(){mt(qr),mt(Ha),mt(Ka)}function uk(a){tl(Ka.current);var c=tl(qr.current),d=ue(c,a.type);c!==d&&(ht(Ha,a),ht(qr,d))}function um(a){Ha.current===a&&(mt(qr),mt(Ha))}var xt=is(0);function bh(a){for(var c=a;c!==null;){if(c.tag===13){var d=c.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var cm=[];function hm(){for(var a=0;a<cm.length;a++)cm[a]._workInProgressVersionPrimary=null;cm.length=0}var wh=R.ReactCurrentDispatcher,fm=R.ReactCurrentBatchConfig,nl=0,kt=null,At=null,It=null,Sh=!1,Ja=!1,eu=0,IM=0;function nn(){throw Error(t(321))}function dm(a,c){if(c===null)return!1;for(var d=0;d<c.length&&d<a.length;d++)if(!Qr(a[d],c[d]))return!1;return!0}function pm(a,c,d,g,x,v){if(nl=v,kt=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,wh.current=a===null||a.memoizedState===null?BM:WM,a=d(g,x),Ja){v=0;do{if(Ja=!1,eu=0,25<=v)throw Error(t(301));v+=1,It=At=null,c.updateQueue=null,wh.current=VM,a=d(g,x)}while(Ja)}if(wh.current=Qh,c=At!==null&&At.next!==null,nl=0,It=At=kt=null,Sh=!1,c)throw Error(t(300));return a}function mm(){var a=eu!==0;return eu=0,a}function Fr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?kt.memoizedState=It=a:It=It.next=a,It}function cr(){if(At===null){var a=kt.alternate;a=a!==null?a.memoizedState:null}else a=At.next;var c=It===null?kt.memoizedState:It.next;if(c!==null)It=c,At=a;else{if(a===null)throw Error(t(310));At=a,a={memoizedState:At.memoizedState,baseState:At.baseState,baseQueue:At.baseQueue,queue:At.queue,next:null},It===null?kt.memoizedState=It=a:It=It.next=a}return It}function tu(a,c){return typeof c=="function"?c(a):c}function gm(a){var c=cr(),d=c.queue;if(d===null)throw Error(t(311));d.lastRenderedReducer=a;var g=At,x=g.baseQueue,v=d.pending;if(v!==null){if(x!==null){var P=x.next;x.next=v.next,v.next=P}g.baseQueue=x=v,d.pending=null}if(x!==null){v=x.next,g=g.baseState;var M=P=null,N=null,W=v;do{var re=W.lane;if((nl&re)===re)N!==null&&(N=N.next={lane:0,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),g=W.hasEagerState?W.eagerState:a(g,W.action);else{var ie={lane:re,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};N===null?(M=N=ie,P=g):N=N.next=ie,kt.lanes|=re,rl|=re}W=W.next}while(W!==null&&W!==v);N===null?P=g:N.next=M,Qr(g,c.memoizedState)||(Sn=!0),c.memoizedState=g,c.baseState=P,c.baseQueue=N,d.lastRenderedState=g}if(a=d.interleaved,a!==null){x=a;do v=x.lane,kt.lanes|=v,rl|=v,x=x.next;while(x!==a)}else x===null&&(d.lanes=0);return[c.memoizedState,d.dispatch]}function Om(a){var c=cr(),d=c.queue;if(d===null)throw Error(t(311));d.lastRenderedReducer=a;var g=d.dispatch,x=d.pending,v=c.memoizedState;if(x!==null){d.pending=null;var P=x=x.next;do v=a(v,P.action),P=P.next;while(P!==x);Qr(v,c.memoizedState)||(Sn=!0),c.memoizedState=v,c.baseQueue===null&&(c.baseState=v),d.lastRenderedState=v}return[v,g]}function ck(){}function hk(a,c){var d=kt,g=cr(),x=c(),v=!Qr(g.memoizedState,x);if(v&&(g.memoizedState=x,Sn=!0),g=g.queue,ym(pk.bind(null,d,g,a),[a]),g.getSnapshot!==c||v||It!==null&&It.memoizedState.tag&1){if(d.flags|=2048,nu(9,dk.bind(null,d,g,x,c),void 0,null),zt===null)throw Error(t(349));(nl&30)!==0||fk(d,c,x)}return x}function fk(a,c,d){a.flags|=16384,a={getSnapshot:c,value:d},c=kt.updateQueue,c===null?(c={lastEffect:null,stores:null},kt.updateQueue=c,c.stores=[a]):(d=c.stores,d===null?c.stores=[a]:d.push(a))}function dk(a,c,d,g){c.value=d,c.getSnapshot=g,mk(c)&&gk(a)}function pk(a,c,d){return d(function(){mk(c)&&gk(a)})}function mk(a){var c=a.getSnapshot;a=a.value;try{var d=c();return!Qr(a,d)}catch{return!0}}function gk(a){var c=wi(a,1);c!==null&&Mr(c,a,1,-1)}function Ok(a){var c=Fr();return typeof a=="function"&&(a=a()),c.memoizedState=c.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tu,lastRenderedState:a},c.queue=a,a=a.dispatch=XM.bind(null,kt,a),[c.memoizedState,a]}function nu(a,c,d,g){return a={tag:a,create:c,destroy:d,deps:g,next:null},c=kt.updateQueue,c===null?(c={lastEffect:null,stores:null},kt.updateQueue=c,c.lastEffect=a.next=a):(d=c.lastEffect,d===null?c.lastEffect=a.next=a:(g=d.next,d.next=a,a.next=g,c.lastEffect=a)),a}function yk(){return cr().memoizedState}function Ph(a,c,d,g){var x=Fr();kt.flags|=a,x.memoizedState=nu(1|c,d,void 0,g===void 0?null:g)}function Ch(a,c,d,g){var x=cr();g=g===void 0?null:g;var v=void 0;if(At!==null){var P=At.memoizedState;if(v=P.destroy,g!==null&&dm(g,P.deps)){x.memoizedState=nu(c,d,v,g);return}}kt.flags|=a,x.memoizedState=nu(1|c,d,v,g)}function xk(a,c){return Ph(8390656,8,a,c)}function ym(a,c){return Ch(2048,8,a,c)}function kk(a,c){return Ch(4,2,a,c)}function vk(a,c){return Ch(4,4,a,c)}function bk(a,c){if(typeof c=="function")return a=a(),c(a),function(){c(null)};if(c!=null)return a=a(),c.current=a,function(){c.current=null}}function wk(a,c,d){return d=d!=null?d.concat([a]):null,Ch(4,4,bk.bind(null,c,a),d)}function xm(){}function Sk(a,c){var d=cr();c=c===void 0?null:c;var g=d.memoizedState;return g!==null&&c!==null&&dm(c,g[1])?g[0]:(d.memoizedState=[a,c],a)}function Pk(a,c){var d=cr();c=c===void 0?null:c;var g=d.memoizedState;return g!==null&&c!==null&&dm(c,g[1])?g[0]:(a=a(),d.memoizedState=[a,c],a)}function Ck(a,c,d){return(nl&21)===0?(a.baseState&&(a.baseState=!1,Sn=!0),a.memoizedState=d):(Qr(d,c)||(d=n1(),kt.lanes|=d,rl|=d,a.baseState=!0),c)}function zM(a,c){var d=nt;nt=d!==0&&4>d?d:4,a(!0);var g=fm.transition;fm.transition={};try{a(!1),c()}finally{nt=d,fm.transition=g}}function Qk(){return cr().memoizedState}function ZM(a,c,d){var g=fs(a);if(d={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null},$k(a))Tk(c,d);else if(d=sk(a,c,d,g),d!==null){var x=mn();Mr(d,a,g,x),jk(d,c,g)}}function XM(a,c,d){var g=fs(a),x={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null};if($k(a))Tk(c,x);else{var v=a.alternate;if(a.lanes===0&&(v===null||v.lanes===0)&&(v=c.lastRenderedReducer,v!==null))try{var P=c.lastRenderedState,M=v(P,d);if(x.hasEagerState=!0,x.eagerState=M,Qr(M,P)){var N=c.interleaved;N===null?(x.next=x,lm(c)):(x.next=N.next,N.next=x),c.interleaved=x;return}}catch{}finally{}d=sk(a,c,x,g),d!==null&&(x=mn(),Mr(d,a,g,x),jk(d,c,g))}}function $k(a){var c=a.alternate;return a===kt||c!==null&&c===kt}function Tk(a,c){Ja=Sh=!0;var d=a.pending;d===null?c.next=c:(c.next=d.next,d.next=c),a.pending=c}function jk(a,c,d){if((d&4194240)!==0){var g=c.lanes;g&=a.pendingLanes,d|=g,c.lanes=d,vp(a,d)}}var Qh={readContext:ur,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useInsertionEffect:nn,useLayoutEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useMutableSource:nn,useSyncExternalStore:nn,useId:nn,unstable_isNewReconciler:!1},BM={readContext:ur,useCallback:function(a,c){return Fr().memoizedState=[a,c===void 0?null:c],a},useContext:ur,useEffect:xk,useImperativeHandle:function(a,c,d){return d=d!=null?d.concat([a]):null,Ph(4194308,4,bk.bind(null,c,a),d)},useLayoutEffect:function(a,c){return Ph(4194308,4,a,c)},useInsertionEffect:function(a,c){return Ph(4,2,a,c)},useMemo:function(a,c){var d=Fr();return c=c===void 0?null:c,a=a(),d.memoizedState=[a,c],a},useReducer:function(a,c,d){var g=Fr();return c=d!==void 0?d(c):c,g.memoizedState=g.baseState=c,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:c},g.queue=a,a=a.dispatch=ZM.bind(null,kt,a),[g.memoizedState,a]},useRef:function(a){var c=Fr();return a={current:a},c.memoizedState=a},useState:Ok,useDebugValue:xm,useDeferredValue:function(a){return Fr().memoizedState=a},useTransition:function(){var a=Ok(!1),c=a[0];return a=zM.bind(null,a[1]),Fr().memoizedState=a,[c,a]},useMutableSource:function(){},useSyncExternalStore:function(a,c,d){var g=kt,x=Fr();if(gt){if(d===void 0)throw Error(t(407));d=d()}else{if(d=c(),zt===null)throw Error(t(349));(nl&30)!==0||fk(g,c,d)}x.memoizedState=d;var v={value:d,getSnapshot:c};return x.queue=v,xk(pk.bind(null,g,v,a),[a]),g.flags|=2048,nu(9,dk.bind(null,g,v,d,c),void 0,null),d},useId:function(){var a=Fr(),c=zt.identifierPrefix;if(gt){var d=bi,g=vi;d=(g&~(1<<32-Cr(g)-1)).toString(32)+d,c=":"+c+"R"+d,d=eu++,0<d&&(c+="H"+d.toString(32)),c+=":"}else d=IM++,c=":"+c+"r"+d.toString(32)+":";return a.memoizedState=c},unstable_isNewReconciler:!1},WM={readContext:ur,useCallback:Sk,useContext:ur,useEffect:ym,useImperativeHandle:wk,useInsertionEffect:kk,useLayoutEffect:vk,useMemo:Pk,useReducer:gm,useRef:yk,useState:function(){return gm(tu)},useDebugValue:xm,useDeferredValue:function(a){var c=cr();return Ck(c,At.memoizedState,a)},useTransition:function(){var a=gm(tu)[0],c=cr().memoizedState;return[a,c]},useMutableSource:ck,useSyncExternalStore:hk,useId:Qk,unstable_isNewReconciler:!1},VM={readContext:ur,useCallback:Sk,useContext:ur,useEffect:ym,useImperativeHandle:wk,useInsertionEffect:kk,useLayoutEffect:vk,useMemo:Pk,useReducer:Om,useRef:yk,useState:function(){return Om(tu)},useDebugValue:xm,useDeferredValue:function(a){var c=cr();return At===null?c.memoizedState=a:Ck(c,At.memoizedState,a)},useTransition:function(){var a=Om(tu)[0],c=cr().memoizedState;return[a,c]},useMutableSource:ck,useSyncExternalStore:hk,useId:Qk,unstable_isNewReconciler:!1};function Tr(a,c){if(a&&a.defaultProps){c=$({},c),a=a.defaultProps;for(var d in a)c[d]===void 0&&(c[d]=a[d]);return c}return c}function km(a,c,d,g){c=a.memoizedState,d=d(g,c),d=d==null?c:$({},c,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var $h={isMounted:function(a){return(a=a._reactInternals)?Us(a)===a:!1},enqueueSetState:function(a,c,d){a=a._reactInternals;var g=mn(),x=fs(a),v=Si(g,x);v.payload=c,d!=null&&(v.callback=d),c=as(a,v,x),c!==null&&(Mr(c,a,x,g),kh(c,a,x))},enqueueReplaceState:function(a,c,d){a=a._reactInternals;var g=mn(),x=fs(a),v=Si(g,x);v.tag=1,v.payload=c,d!=null&&(v.callback=d),c=as(a,v,x),c!==null&&(Mr(c,a,x,g),kh(c,a,x))},enqueueForceUpdate:function(a,c){a=a._reactInternals;var d=mn(),g=fs(a),x=Si(d,g);x.tag=2,c!=null&&(x.callback=c),c=as(a,x,g),c!==null&&(Mr(c,a,g,d),kh(c,a,g))}};function Ek(a,c,d,g,x,v,P){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(g,v,P):c.prototype&&c.prototype.isPureReactComponent?!Xa(d,g)||!Xa(x,v):!0}function Mk(a,c,d){var g=!1,x=ss,v=c.contextType;return typeof v=="object"&&v!==null?v=ur(v):(x=wn(c)?Hs:tn.current,g=c.contextTypes,v=(g=g!=null)?ro(a,x):ss),c=new c(d,v),a.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=$h,a.stateNode=c,c._reactInternals=a,g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=x,a.__reactInternalMemoizedMaskedChildContext=v),c}function Ak(a,c,d,g){a=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(d,g),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(d,g),c.state!==a&&$h.enqueueReplaceState(c,c.state,null)}function vm(a,c,d,g){var x=a.stateNode;x.props=d,x.state=a.memoizedState,x.refs={},om(a);var v=c.contextType;typeof v=="object"&&v!==null?x.context=ur(v):(v=wn(c)?Hs:tn.current,x.context=ro(a,v)),x.state=a.memoizedState,v=c.getDerivedStateFromProps,typeof v=="function"&&(km(a,c,v,d),x.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(c=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),c!==x.state&&$h.enqueueReplaceState(x,x.state,null),vh(a,d,x,g),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308)}function ho(a,c){try{var d="",g=c;do d+=$e(g),g=g.return;while(g);var x=d}catch(v){x=`
39
+ Error generating stack: `+v.message+`
40
+ `+v.stack}return{value:a,source:c,stack:x,digest:null}}function bm(a,c,d){return{value:a,source:null,stack:d??null,digest:c??null}}function wm(a,c){try{console.error(c.value)}catch(d){setTimeout(function(){throw d})}}var qM=typeof WeakMap=="function"?WeakMap:Map;function Rk(a,c,d){d=Si(-1,d),d.tag=3,d.payload={element:null};var g=c.value;return d.callback=function(){Nh||(Nh=!0,Dm=g),wm(a,c)},d}function Nk(a,c,d){d=Si(-1,d),d.tag=3;var g=a.type.getDerivedStateFromError;if(typeof g=="function"){var x=c.value;d.payload=function(){return g(x)},d.callback=function(){wm(a,c)}}var v=a.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(d.callback=function(){wm(a,c),typeof g!="function"&&(cs===null?cs=new Set([this]):cs.add(this));var P=c.stack;this.componentDidCatch(c.value,{componentStack:P!==null?P:""})}),d}function Lk(a,c,d){var g=a.pingCache;if(g===null){g=a.pingCache=new qM;var x=new Set;g.set(c,x)}else x=g.get(c),x===void 0&&(x=new Set,g.set(c,x));x.has(d)||(x.add(d),a=lA.bind(null,a,c,d),c.then(a,a))}function _k(a){do{var c;if((c=a.tag===13)&&(c=a.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return a;a=a.return}while(a!==null);return null}function Dk(a,c,d,g,x){return(a.mode&1)===0?(a===c?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(c=Si(-1,1),c.tag=2,as(d,c,1))),d.lanes|=1),a):(a.flags|=65536,a.lanes=x,a)}var FM=R.ReactCurrentOwner,Sn=!1;function pn(a,c,d,g){c.child=a===null?ik(c,null,d,g):oo(c,a.child,d,g)}function Ik(a,c,d,g,x){d=d.render;var v=c.ref;return uo(c,x),g=pm(a,c,d,g,v,x),d=mm(),a!==null&&!Sn?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~x,Pi(a,c,x)):(gt&&d&&Hp(c),c.flags|=1,pn(a,c,g,x),c.child)}function zk(a,c,d,g,x){if(a===null){var v=d.type;return typeof v=="function"&&!Vm(v)&&v.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(c.tag=15,c.type=v,Zk(a,c,v,g,x)):(a=Zh(d.type,null,g,c,c.mode,x),a.ref=c.ref,a.return=c,c.child=a)}if(v=a.child,(a.lanes&x)===0){var P=v.memoizedProps;if(d=d.compare,d=d!==null?d:Xa,d(P,g)&&a.ref===c.ref)return Pi(a,c,x)}return c.flags|=1,a=ps(v,g),a.ref=c.ref,a.return=c,c.child=a}function Zk(a,c,d,g,x){if(a!==null){var v=a.memoizedProps;if(Xa(v,g)&&a.ref===c.ref)if(Sn=!1,c.pendingProps=g=v,(a.lanes&x)!==0)(a.flags&131072)!==0&&(Sn=!0);else return c.lanes=a.lanes,Pi(a,c,x)}return Sm(a,c,d,g,x)}function Xk(a,c,d){var g=c.pendingProps,x=g.children,v=a!==null?a.memoizedState:null;if(g.mode==="hidden")if((c.mode&1)===0)c.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(po,Vn),Vn|=d;else{if((d&1073741824)===0)return a=v!==null?v.baseLanes|d:d,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:a,cachePool:null,transitions:null},c.updateQueue=null,ht(po,Vn),Vn|=a,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=v!==null?v.baseLanes:d,ht(po,Vn),Vn|=g}else v!==null?(g=v.baseLanes|d,c.memoizedState=null):g=d,ht(po,Vn),Vn|=g;return pn(a,c,x,d),c.child}function Bk(a,c){var d=c.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(c.flags|=512,c.flags|=2097152)}function Sm(a,c,d,g,x){var v=wn(d)?Hs:tn.current;return v=ro(c,v),uo(c,x),d=pm(a,c,d,g,v,x),g=mm(),a!==null&&!Sn?(c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~x,Pi(a,c,x)):(gt&&g&&Hp(c),c.flags|=1,pn(a,c,d,x),c.child)}function Wk(a,c,d,g,x){if(wn(d)){var v=!0;fh(c)}else v=!1;if(uo(c,x),c.stateNode===null)jh(a,c),Mk(c,d,g),vm(c,d,g,x),g=!0;else if(a===null){var P=c.stateNode,M=c.memoizedProps;P.props=M;var N=P.context,W=d.contextType;typeof W=="object"&&W!==null?W=ur(W):(W=wn(d)?Hs:tn.current,W=ro(c,W));var re=d.getDerivedStateFromProps,ie=typeof re=="function"||typeof P.getSnapshotBeforeUpdate=="function";ie||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(M!==g||N!==W)&&Ak(c,P,g,W),os=!1;var ne=c.memoizedState;P.state=ne,vh(c,g,P,x),N=c.memoizedState,M!==g||ne!==N||bn.current||os?(typeof re=="function"&&(km(c,d,re,g),N=c.memoizedState),(M=os||Ek(c,d,M,g,ne,N,W))?(ie||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(c.flags|=4194308)):(typeof P.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=g,c.memoizedState=N),P.props=g,P.state=N,P.context=W,g=M):(typeof P.componentDidMount=="function"&&(c.flags|=4194308),g=!1)}else{P=c.stateNode,lk(a,c),M=c.memoizedProps,W=c.type===c.elementType?M:Tr(c.type,M),P.props=W,ie=c.pendingProps,ne=P.context,N=d.contextType,typeof N=="object"&&N!==null?N=ur(N):(N=wn(d)?Hs:tn.current,N=ro(c,N));var Oe=d.getDerivedStateFromProps;(re=typeof Oe=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(M!==ie||ne!==N)&&Ak(c,P,g,N),os=!1,ne=c.memoizedState,P.state=ne,vh(c,g,P,x);var ke=c.memoizedState;M!==ie||ne!==ke||bn.current||os?(typeof Oe=="function"&&(km(c,d,Oe,g),ke=c.memoizedState),(W=os||Ek(c,d,W,g,ne,ke,N)||!1)?(re||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(g,ke,N),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(g,ke,N)),typeof P.componentDidUpdate=="function"&&(c.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof P.componentDidUpdate!="function"||M===a.memoizedProps&&ne===a.memoizedState||(c.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||M===a.memoizedProps&&ne===a.memoizedState||(c.flags|=1024),c.memoizedProps=g,c.memoizedState=ke),P.props=g,P.state=ke,P.context=N,g=W):(typeof P.componentDidUpdate!="function"||M===a.memoizedProps&&ne===a.memoizedState||(c.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||M===a.memoizedProps&&ne===a.memoizedState||(c.flags|=1024),g=!1)}return Pm(a,c,d,g,v,x)}function Pm(a,c,d,g,x,v){Bk(a,c);var P=(c.flags&128)!==0;if(!g&&!P)return x&&U1(c,d,!1),Pi(a,c,v);g=c.stateNode,FM.current=c;var M=P&&typeof d.getDerivedStateFromError!="function"?null:g.render();return c.flags|=1,a!==null&&P?(c.child=oo(c,a.child,null,v),c.child=oo(c,null,M,v)):pn(a,c,M,v),c.memoizedState=g.state,x&&U1(c,d,!0),c.child}function Vk(a){var c=a.stateNode;c.pendingContext?F1(a,c.pendingContext,c.pendingContext!==c.context):c.context&&F1(a,c.context,!1),am(a,c.containerInfo)}function qk(a,c,d,g,x){return lo(),tm(x),c.flags|=256,pn(a,c,d,g),c.child}var Cm={dehydrated:null,treeContext:null,retryLane:0};function Qm(a){return{baseLanes:a,cachePool:null,transitions:null}}function Fk(a,c,d){var g=c.pendingProps,x=xt.current,v=!1,P=(c.flags&128)!==0,M;if((M=P)||(M=a!==null&&a.memoizedState===null?!1:(x&2)!==0),M?(v=!0,c.flags&=-129):(a===null||a.memoizedState!==null)&&(x|=1),ht(xt,x&1),a===null)return em(c),a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((c.mode&1)===0?c.lanes=1:a.data==="$!"?c.lanes=8:c.lanes=1073741824,null):(P=g.children,a=g.fallback,v?(g=c.mode,v=c.child,P={mode:"hidden",children:P},(g&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=P):v=Xh(P,g,0,null),a=ol(a,g,d,null),v.return=c,a.return=c,v.sibling=a,c.child=v,c.child.memoizedState=Qm(d),c.memoizedState=Cm,a):$m(c,P));if(x=a.memoizedState,x!==null&&(M=x.dehydrated,M!==null))return YM(a,c,P,g,M,x,d);if(v){v=g.fallback,P=c.mode,x=a.child,M=x.sibling;var N={mode:"hidden",children:g.children};return(P&1)===0&&c.child!==x?(g=c.child,g.childLanes=0,g.pendingProps=N,c.deletions=null):(g=ps(x,N),g.subtreeFlags=x.subtreeFlags&14680064),M!==null?v=ps(M,v):(v=ol(v,P,d,null),v.flags|=2),v.return=c,g.return=c,g.sibling=v,c.child=g,g=v,v=c.child,P=a.child.memoizedState,P=P===null?Qm(d):{baseLanes:P.baseLanes|d,cachePool:null,transitions:P.transitions},v.memoizedState=P,v.childLanes=a.childLanes&~d,c.memoizedState=Cm,g}return v=a.child,a=v.sibling,g=ps(v,{mode:"visible",children:g.children}),(c.mode&1)===0&&(g.lanes=d),g.return=c,g.sibling=null,a!==null&&(d=c.deletions,d===null?(c.deletions=[a],c.flags|=16):d.push(a)),c.child=g,c.memoizedState=null,g}function $m(a,c){return c=Xh({mode:"visible",children:c},a.mode,0,null),c.return=a,a.child=c}function Th(a,c,d,g){return g!==null&&tm(g),oo(c,a.child,null,d),a=$m(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function YM(a,c,d,g,x,v,P){if(d)return c.flags&256?(c.flags&=-257,g=bm(Error(t(422))),Th(a,c,P,g)):c.memoizedState!==null?(c.child=a.child,c.flags|=128,null):(v=g.fallback,x=c.mode,g=Xh({mode:"visible",children:g.children},x,0,null),v=ol(v,x,P,null),v.flags|=2,g.return=c,v.return=c,g.sibling=v,c.child=g,(c.mode&1)!==0&&oo(c,a.child,null,P),c.child.memoizedState=Qm(P),c.memoizedState=Cm,v);if((c.mode&1)===0)return Th(a,c,P,null);if(x.data==="$!"){if(g=x.nextSibling&&x.nextSibling.dataset,g)var M=g.dgst;return g=M,v=Error(t(419)),g=bm(v,g,void 0),Th(a,c,P,g)}if(M=(P&a.childLanes)!==0,Sn||M){if(g=zt,g!==null){switch(P&-P){case 4:x=2;break;case 16:x=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:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(g.suspendedLanes|P))!==0?0:x,x!==0&&x!==v.retryLane&&(v.retryLane=x,wi(a,x),Mr(g,a,x,-1))}return Wm(),g=bm(Error(t(421))),Th(a,c,P,g)}return x.data==="$?"?(c.flags|=128,c.child=a.child,c=oA.bind(null,a),x._reactRetry=c,null):(a=v.treeContext,Wn=rs(x.nextSibling),Bn=c,gt=!0,$r=null,a!==null&&(or[ar++]=vi,or[ar++]=bi,or[ar++]=Ks,vi=a.id,bi=a.overflow,Ks=c),c=$m(c,g.children),c.flags|=4096,c)}function Yk(a,c,d){a.lanes|=c;var g=a.alternate;g!==null&&(g.lanes|=c),sm(a.return,c,d)}function Tm(a,c,d,g,x){var v=a.memoizedState;v===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:x}:(v.isBackwards=c,v.rendering=null,v.renderingStartTime=0,v.last=g,v.tail=d,v.tailMode=x)}function Uk(a,c,d){var g=c.pendingProps,x=g.revealOrder,v=g.tail;if(pn(a,c,g.children,d),g=xt.current,(g&2)!==0)g=g&1|2,c.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=c.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Yk(a,d,c);else if(a.tag===19)Yk(a,d,c);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===c)break e;for(;a.sibling===null;){if(a.return===null||a.return===c)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}g&=1}if(ht(xt,g),(c.mode&1)===0)c.memoizedState=null;else switch(x){case"forwards":for(d=c.child,x=null;d!==null;)a=d.alternate,a!==null&&bh(a)===null&&(x=d),d=d.sibling;d=x,d===null?(x=c.child,c.child=null):(x=d.sibling,d.sibling=null),Tm(c,!1,x,d,v);break;case"backwards":for(d=null,x=c.child,c.child=null;x!==null;){if(a=x.alternate,a!==null&&bh(a)===null){c.child=x;break}a=x.sibling,x.sibling=d,d=x,x=a}Tm(c,!0,d,null,v);break;case"together":Tm(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function jh(a,c){(c.mode&1)===0&&a!==null&&(a.alternate=null,c.alternate=null,c.flags|=2)}function Pi(a,c,d){if(a!==null&&(c.dependencies=a.dependencies),rl|=c.lanes,(d&c.childLanes)===0)return null;if(a!==null&&c.child!==a.child)throw Error(t(153));if(c.child!==null){for(a=c.child,d=ps(a,a.pendingProps),c.child=d,d.return=c;a.sibling!==null;)a=a.sibling,d=d.sibling=ps(a,a.pendingProps),d.return=c;d.sibling=null}return c.child}function UM(a,c,d){switch(c.tag){case 3:Vk(c),lo();break;case 5:uk(c);break;case 1:wn(c.type)&&fh(c);break;case 4:am(c,c.stateNode.containerInfo);break;case 10:var g=c.type._context,x=c.memoizedProps.value;ht(yh,g._currentValue),g._currentValue=x;break;case 13:if(g=c.memoizedState,g!==null)return g.dehydrated!==null?(ht(xt,xt.current&1),c.flags|=128,null):(d&c.child.childLanes)!==0?Fk(a,c,d):(ht(xt,xt.current&1),a=Pi(a,c,d),a!==null?a.sibling:null);ht(xt,xt.current&1);break;case 19:if(g=(d&c.childLanes)!==0,(a.flags&128)!==0){if(g)return Uk(a,c,d);c.flags|=128}if(x=c.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),ht(xt,xt.current),g)break;return null;case 22:case 23:return c.lanes=0,Xk(a,c,d)}return Pi(a,c,d)}var Gk,jm,Hk,Kk;Gk=function(a,c){for(var d=c.child;d!==null;){if(d.tag===5||d.tag===6)a.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},jm=function(){},Hk=function(a,c,d,g){var x=a.memoizedProps;if(x!==g){a=c.stateNode,tl(qr.current);var v=null;switch(d){case"input":x=Pr(a,x),g=Pr(a,g),v=[];break;case"select":x=$({},x,{value:void 0}),g=$({},g,{value:void 0}),v=[];break;case"textarea":x=Ca(a,x),g=Ca(a,g),v=[];break;default:typeof x.onClick!="function"&&typeof g.onClick=="function"&&(a.onclick=uh)}qt(d,g);var P;d=null;for(W in x)if(!g.hasOwnProperty(W)&&x.hasOwnProperty(W)&&x[W]!=null)if(W==="style"){var M=x[W];for(P in M)M.hasOwnProperty(P)&&(d||(d={}),d[P]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(i.hasOwnProperty(W)?v||(v=[]):(v=v||[]).push(W,null));for(W in g){var N=g[W];if(M=x!=null?x[W]:void 0,g.hasOwnProperty(W)&&N!==M&&(N!=null||M!=null))if(W==="style")if(M){for(P in M)!M.hasOwnProperty(P)||N&&N.hasOwnProperty(P)||(d||(d={}),d[P]="");for(P in N)N.hasOwnProperty(P)&&M[P]!==N[P]&&(d||(d={}),d[P]=N[P])}else d||(v||(v=[]),v.push(W,d)),d=N;else W==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,M=M?M.__html:void 0,N!=null&&M!==N&&(v=v||[]).push(W,N)):W==="children"?typeof N!="string"&&typeof N!="number"||(v=v||[]).push(W,""+N):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(i.hasOwnProperty(W)?(N!=null&&W==="onScroll"&&pt("scroll",a),v||M===N||(v=[])):(v=v||[]).push(W,N))}d&&(v=v||[]).push("style",d);var W=v;(c.updateQueue=W)&&(c.flags|=4)}},Kk=function(a,c,d,g){d!==g&&(c.flags|=4)};function ru(a,c){if(!gt)switch(a.tailMode){case"hidden":c=a.tail;for(var d=null;c!==null;)c.alternate!==null&&(d=c),c=c.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?c||a.tail===null?a.tail=null:a.tail.sibling=null:g.sibling=null}}function rn(a){var c=a.alternate!==null&&a.alternate.child===a.child,d=0,g=0;if(c)for(var x=a.child;x!==null;)d|=x.lanes|x.childLanes,g|=x.subtreeFlags&14680064,g|=x.flags&14680064,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)d|=x.lanes|x.childLanes,g|=x.subtreeFlags,g|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=g,a.childLanes=d,c}function GM(a,c,d){var g=c.pendingProps;switch(Kp(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rn(c),null;case 1:return wn(c.type)&&hh(),rn(c),null;case 3:return g=c.stateNode,co(),mt(bn),mt(tn),hm(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(a===null||a.child===null)&&(gh(c)?c.flags|=4:a===null||a.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,$r!==null&&(Zm($r),$r=null))),jm(a,c),rn(c),null;case 5:um(c);var x=tl(Ka.current);if(d=c.type,a!==null&&c.stateNode!=null)Hk(a,c,d,g,x),a.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!g){if(c.stateNode===null)throw Error(t(166));return rn(c),null}if(a=tl(qr.current),gh(c)){g=c.stateNode,d=c.type;var v=c.memoizedProps;switch(g[Vr]=c,g[Fa]=v,a=(c.mode&1)!==0,d){case"dialog":pt("cancel",g),pt("close",g);break;case"iframe":case"object":case"embed":pt("load",g);break;case"video":case"audio":for(x=0;x<Wa.length;x++)pt(Wa[x],g);break;case"source":pt("error",g);break;case"img":case"image":case"link":pt("error",g),pt("load",g);break;case"details":pt("toggle",g);break;case"input":en(g,v),pt("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!v.multiple},pt("invalid",g);break;case"textarea":Ic(g,v),pt("invalid",g)}qt(d,v),x=null;for(var P in v)if(v.hasOwnProperty(P)){var M=v[P];P==="children"?typeof M=="string"?g.textContent!==M&&(v.suppressHydrationWarning!==!0&&ah(g.textContent,M,a),x=["children",M]):typeof M=="number"&&g.textContent!==""+M&&(v.suppressHydrationWarning!==!0&&ah(g.textContent,M,a),x=["children",""+M]):i.hasOwnProperty(P)&&M!=null&&P==="onScroll"&&pt("scroll",g)}switch(d){case"input":Sr(g),Fi(g,v,!0);break;case"textarea":Sr(g),Zc(g);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(g.onclick=uh)}g=x,c.updateQueue=g,g!==null&&(c.flags|=4)}else{P=x.nodeType===9?x:x.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=K(d)),a==="http://www.w3.org/1999/xhtml"?d==="script"?(a=P.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof g.is=="string"?a=P.createElement(d,{is:g.is}):(a=P.createElement(d),d==="select"&&(P=a,g.multiple?P.multiple=!0:g.size&&(P.size=g.size))):a=P.createElementNS(a,d),a[Vr]=c,a[Fa]=g,Gk(a,c,!1,!1),c.stateNode=a;e:{switch(P=Br(d,g),d){case"dialog":pt("cancel",a),pt("close",a),x=g;break;case"iframe":case"object":case"embed":pt("load",a),x=g;break;case"video":case"audio":for(x=0;x<Wa.length;x++)pt(Wa[x],a);x=g;break;case"source":pt("error",a),x=g;break;case"img":case"image":case"link":pt("error",a),pt("load",a),x=g;break;case"details":pt("toggle",a),x=g;break;case"input":en(a,g),x=Pr(a,g),pt("invalid",a);break;case"option":x=g;break;case"select":a._wrapperState={wasMultiple:!!g.multiple},x=$({},g,{value:void 0}),pt("invalid",a);break;case"textarea":Ic(a,g),x=Ca(a,g),pt("invalid",a);break;default:x=g}qt(d,x),M=x;for(v in M)if(M.hasOwnProperty(v)){var N=M[v];v==="style"?Gi(a,N):v==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,N!=null&&Ze(a,N)):v==="children"?typeof N=="string"?(d!=="textarea"||N!=="")&&Ge(a,N):typeof N=="number"&&Ge(a,""+N):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(i.hasOwnProperty(v)?N!=null&&v==="onScroll"&&pt("scroll",a):N!=null&&Q(a,v,N,P))}switch(d){case"input":Sr(a),Fi(a,g,!1);break;case"textarea":Sr(a),Zc(a);break;case"option":g.value!=null&&a.setAttribute("value",""+_e(g.value));break;case"select":a.multiple=!!g.multiple,v=g.value,v!=null?Ui(a,!!g.multiple,v,!1):g.defaultValue!=null&&Ui(a,!!g.multiple,g.defaultValue,!0);break;default:typeof x.onClick=="function"&&(a.onclick=uh)}switch(d){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return rn(c),null;case 6:if(a&&c.stateNode!=null)Kk(a,c,a.memoizedProps,g);else{if(typeof g!="string"&&c.stateNode===null)throw Error(t(166));if(d=tl(Ka.current),tl(qr.current),gh(c)){if(g=c.stateNode,d=c.memoizedProps,g[Vr]=c,(v=g.nodeValue!==d)&&(a=Bn,a!==null))switch(a.tag){case 3:ah(g.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&ah(g.nodeValue,d,(a.mode&1)!==0)}v&&(c.flags|=4)}else g=(d.nodeType===9?d:d.ownerDocument).createTextNode(g),g[Vr]=c,c.stateNode=g}return rn(c),null;case 13:if(mt(xt),g=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(gt&&Wn!==null&&(c.mode&1)!==0&&(c.flags&128)===0)tk(),lo(),c.flags|=98560,v=!1;else if(v=gh(c),g!==null&&g.dehydrated!==null){if(a===null){if(!v)throw Error(t(318));if(v=c.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(t(317));v[Vr]=c}else lo(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;rn(c),v=!1}else $r!==null&&(Zm($r),$r=null),v=!0;if(!v)return c.flags&65536?c:null}return(c.flags&128)!==0?(c.lanes=d,c):(g=g!==null,g!==(a!==null&&a.memoizedState!==null)&&g&&(c.child.flags|=8192,(c.mode&1)!==0&&(a===null||(xt.current&1)!==0?Rt===0&&(Rt=3):Wm())),c.updateQueue!==null&&(c.flags|=4),rn(c),null);case 4:return co(),jm(a,c),a===null&&Va(c.stateNode.containerInfo),rn(c),null;case 10:return im(c.type._context),rn(c),null;case 17:return wn(c.type)&&hh(),rn(c),null;case 19:if(mt(xt),v=c.memoizedState,v===null)return rn(c),null;if(g=(c.flags&128)!==0,P=v.rendering,P===null)if(g)ru(v,!1);else{if(Rt!==0||a!==null&&(a.flags&128)!==0)for(a=c.child;a!==null;){if(P=bh(a),P!==null){for(c.flags|=128,ru(v,!1),g=P.updateQueue,g!==null&&(c.updateQueue=g,c.flags|=4),c.subtreeFlags=0,g=d,d=c.child;d!==null;)v=d,a=g,v.flags&=14680066,P=v.alternate,P===null?(v.childLanes=0,v.lanes=a,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=P.childLanes,v.lanes=P.lanes,v.child=P.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=P.memoizedProps,v.memoizedState=P.memoizedState,v.updateQueue=P.updateQueue,v.type=P.type,a=P.dependencies,v.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return ht(xt,xt.current&1|2),c.child}a=a.sibling}v.tail!==null&&Qt()>mo&&(c.flags|=128,g=!0,ru(v,!1),c.lanes=4194304)}else{if(!g)if(a=bh(P),a!==null){if(c.flags|=128,g=!0,d=a.updateQueue,d!==null&&(c.updateQueue=d,c.flags|=4),ru(v,!0),v.tail===null&&v.tailMode==="hidden"&&!P.alternate&&!gt)return rn(c),null}else 2*Qt()-v.renderingStartTime>mo&&d!==1073741824&&(c.flags|=128,g=!0,ru(v,!1),c.lanes=4194304);v.isBackwards?(P.sibling=c.child,c.child=P):(d=v.last,d!==null?d.sibling=P:c.child=P,v.last=P)}return v.tail!==null?(c=v.tail,v.rendering=c,v.tail=c.sibling,v.renderingStartTime=Qt(),c.sibling=null,d=xt.current,ht(xt,g?d&1|2:d&1),c):(rn(c),null);case 22:case 23:return Bm(),g=c.memoizedState!==null,a!==null&&a.memoizedState!==null!==g&&(c.flags|=8192),g&&(c.mode&1)!==0?(Vn&1073741824)!==0&&(rn(c),c.subtreeFlags&6&&(c.flags|=8192)):rn(c),null;case 24:return null;case 25:return null}throw Error(t(156,c.tag))}function HM(a,c){switch(Kp(c),c.tag){case 1:return wn(c.type)&&hh(),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return co(),mt(bn),mt(tn),hm(),a=c.flags,(a&65536)!==0&&(a&128)===0?(c.flags=a&-65537|128,c):null;case 5:return um(c),null;case 13:if(mt(xt),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(t(340));lo()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return mt(xt),null;case 4:return co(),null;case 10:return im(c.type._context),null;case 22:case 23:return Bm(),null;case 24:return null;default:return null}}var Eh=!1,sn=!1,KM=typeof WeakSet=="function"?WeakSet:Set,xe=null;function fo(a,c){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(g){bt(a,c,g)}else d.current=null}function Em(a,c,d){try{d()}catch(g){bt(a,c,g)}}var Jk=!1;function JM(a,c){if(Bp=Hc,a=E1(),Np(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var x=g.anchorOffset,v=g.focusNode;g=g.focusOffset;try{d.nodeType,v.nodeType}catch{d=null;break e}var P=0,M=-1,N=-1,W=0,re=0,ie=a,ne=null;t:for(;;){for(var Oe;ie!==d||x!==0&&ie.nodeType!==3||(M=P+x),ie!==v||g!==0&&ie.nodeType!==3||(N=P+g),ie.nodeType===3&&(P+=ie.nodeValue.length),(Oe=ie.firstChild)!==null;)ne=ie,ie=Oe;for(;;){if(ie===a)break t;if(ne===d&&++W===x&&(M=P),ne===v&&++re===g&&(N=P),(Oe=ie.nextSibling)!==null)break;ie=ne,ne=ie.parentNode}ie=Oe}d=M===-1||N===-1?null:{start:M,end:N}}else d=null}d=d||{start:0,end:0}}else d=null;for(Wp={focusedElem:a,selectionRange:d},Hc=!1,xe=c;xe!==null;)if(c=xe,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,xe=a;else for(;xe!==null;){c=xe;try{var ke=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var be=ke.memoizedProps,$t=ke.memoizedState,X=c.stateNode,z=X.getSnapshotBeforeUpdate(c.elementType===c.type?be:Tr(c.type,be),$t);X.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var B=c.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(le){bt(c,c.return,le)}if(a=c.sibling,a!==null){a.return=c.return,xe=a;break}xe=c.return}return ke=Jk,Jk=!1,ke}function iu(a,c,d){var g=c.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var x=g=g.next;do{if((x.tag&a)===a){var v=x.destroy;x.destroy=void 0,v!==void 0&&Em(c,d,v)}x=x.next}while(x!==g)}}function Mh(a,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&a)===a){var g=d.create;d.destroy=g()}d=d.next}while(d!==c)}}function Mm(a){var c=a.ref;if(c!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof c=="function"?c(a):c.current=a}}function ev(a){var c=a.alternate;c!==null&&(a.alternate=null,ev(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&(delete c[Vr],delete c[Fa],delete c[Yp],delete c[NM],delete c[LM])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function tv(a){return a.tag===5||a.tag===3||a.tag===4}function nv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||tv(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Am(a,c,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,c?d.nodeType===8?d.parentNode.insertBefore(a,c):d.insertBefore(a,c):(d.nodeType===8?(c=d.parentNode,c.insertBefore(a,d)):(c=d,c.appendChild(a)),d=d._reactRootContainer,d!=null||c.onclick!==null||(c.onclick=uh));else if(g!==4&&(a=a.child,a!==null))for(Am(a,c,d),a=a.sibling;a!==null;)Am(a,c,d),a=a.sibling}function Rm(a,c,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,c?d.insertBefore(a,c):d.appendChild(a);else if(g!==4&&(a=a.child,a!==null))for(Rm(a,c,d),a=a.sibling;a!==null;)Rm(a,c,d),a=a.sibling}var Ft=null,jr=!1;function us(a,c,d){for(d=d.child;d!==null;)rv(a,c,d),d=d.sibling}function rv(a,c,d){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(Vc,d)}catch{}switch(d.tag){case 5:sn||fo(d,c);case 6:var g=Ft,x=jr;Ft=null,us(a,c,d),Ft=g,jr=x,Ft!==null&&(jr?(a=Ft,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Ft.removeChild(d.stateNode));break;case 18:Ft!==null&&(jr?(a=Ft,d=d.stateNode,a.nodeType===8?Fp(a.parentNode,d):a.nodeType===1&&Fp(a,d),La(a)):Fp(Ft,d.stateNode));break;case 4:g=Ft,x=jr,Ft=d.stateNode.containerInfo,jr=!0,us(a,c,d),Ft=g,jr=x;break;case 0:case 11:case 14:case 15:if(!sn&&(g=d.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){x=g=g.next;do{var v=x,P=v.destroy;v=v.tag,P!==void 0&&((v&2)!==0||(v&4)!==0)&&Em(d,c,P),x=x.next}while(x!==g)}us(a,c,d);break;case 1:if(!sn&&(fo(d,c),g=d.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=d.memoizedProps,g.state=d.memoizedState,g.componentWillUnmount()}catch(M){bt(d,c,M)}us(a,c,d);break;case 21:us(a,c,d);break;case 22:d.mode&1?(sn=(g=sn)||d.memoizedState!==null,us(a,c,d),sn=g):us(a,c,d);break;default:us(a,c,d)}}function iv(a){var c=a.updateQueue;if(c!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new KM),c.forEach(function(g){var x=aA.bind(null,a,g);d.has(g)||(d.add(g),g.then(x,x))})}}function Er(a,c){var d=c.deletions;if(d!==null)for(var g=0;g<d.length;g++){var x=d[g];try{var v=a,P=c,M=P;e:for(;M!==null;){switch(M.tag){case 5:Ft=M.stateNode,jr=!1;break e;case 3:Ft=M.stateNode.containerInfo,jr=!0;break e;case 4:Ft=M.stateNode.containerInfo,jr=!0;break e}M=M.return}if(Ft===null)throw Error(t(160));rv(v,P,x),Ft=null,jr=!1;var N=x.alternate;N!==null&&(N.return=null),x.return=null}catch(W){bt(x,c,W)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)sv(c,a),c=c.sibling}function sv(a,c){var d=a.alternate,g=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Er(c,a),Yr(a),g&4){try{iu(3,a,a.return),Mh(3,a)}catch(be){bt(a,a.return,be)}try{iu(5,a,a.return)}catch(be){bt(a,a.return,be)}}break;case 1:Er(c,a),Yr(a),g&512&&d!==null&&fo(d,d.return);break;case 5:if(Er(c,a),Yr(a),g&512&&d!==null&&fo(d,d.return),a.flags&32){var x=a.stateNode;try{Ge(x,"")}catch(be){bt(a,a.return,be)}}if(g&4&&(x=a.stateNode,x!=null)){var v=a.memoizedProps,P=d!==null?d.memoizedProps:v,M=a.type,N=a.updateQueue;if(a.updateQueue=null,N!==null)try{M==="input"&&v.type==="radio"&&v.name!=null&&zn(x,v),Br(M,P);var W=Br(M,v);for(P=0;P<N.length;P+=2){var re=N[P],ie=N[P+1];re==="style"?Gi(x,ie):re==="dangerouslySetInnerHTML"?Ze(x,ie):re==="children"?Ge(x,ie):Q(x,re,ie,W)}switch(M){case"input":vn(x,v);break;case"textarea":zc(x,v);break;case"select":var ne=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!v.multiple;var Oe=v.value;Oe!=null?Ui(x,!!v.multiple,Oe,!1):ne!==!!v.multiple&&(v.defaultValue!=null?Ui(x,!!v.multiple,v.defaultValue,!0):Ui(x,!!v.multiple,v.multiple?[]:"",!1))}x[Fa]=v}catch(be){bt(a,a.return,be)}}break;case 6:if(Er(c,a),Yr(a),g&4){if(a.stateNode===null)throw Error(t(162));x=a.stateNode,v=a.memoizedProps;try{x.nodeValue=v}catch(be){bt(a,a.return,be)}}break;case 3:if(Er(c,a),Yr(a),g&4&&d!==null&&d.memoizedState.isDehydrated)try{La(c.containerInfo)}catch(be){bt(a,a.return,be)}break;case 4:Er(c,a),Yr(a);break;case 13:Er(c,a),Yr(a),x=a.child,x.flags&8192&&(v=x.memoizedState!==null,x.stateNode.isHidden=v,!v||x.alternate!==null&&x.alternate.memoizedState!==null||(_m=Qt())),g&4&&iv(a);break;case 22:if(re=d!==null&&d.memoizedState!==null,a.mode&1?(sn=(W=sn)||re,Er(c,a),sn=W):Er(c,a),Yr(a),g&8192){if(W=a.memoizedState!==null,(a.stateNode.isHidden=W)&&!re&&(a.mode&1)!==0)for(xe=a,re=a.child;re!==null;){for(ie=xe=re;xe!==null;){switch(ne=xe,Oe=ne.child,ne.tag){case 0:case 11:case 14:case 15:iu(4,ne,ne.return);break;case 1:fo(ne,ne.return);var ke=ne.stateNode;if(typeof ke.componentWillUnmount=="function"){g=ne,d=ne.return;try{c=g,ke.props=c.memoizedProps,ke.state=c.memoizedState,ke.componentWillUnmount()}catch(be){bt(g,d,be)}}break;case 5:fo(ne,ne.return);break;case 22:if(ne.memoizedState!==null){av(ie);continue}}Oe!==null?(Oe.return=ne,xe=Oe):av(ie)}re=re.sibling}e:for(re=null,ie=a;;){if(ie.tag===5){if(re===null){re=ie;try{x=ie.stateNode,W?(v=x.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(M=ie.stateNode,N=ie.memoizedProps.style,P=N!=null&&N.hasOwnProperty("display")?N.display:null,M.style.display=lr("display",P))}catch(be){bt(a,a.return,be)}}}else if(ie.tag===6){if(re===null)try{ie.stateNode.nodeValue=W?"":ie.memoizedProps}catch(be){bt(a,a.return,be)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===a)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===a)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===a)break e;re===ie&&(re=null),ie=ie.return}re===ie&&(re=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:Er(c,a),Yr(a),g&4&&iv(a);break;case 21:break;default:Er(c,a),Yr(a)}}function Yr(a){var c=a.flags;if(c&2){try{e:{for(var d=a.return;d!==null;){if(tv(d)){var g=d;break e}d=d.return}throw Error(t(160))}switch(g.tag){case 5:var x=g.stateNode;g.flags&32&&(Ge(x,""),g.flags&=-33);var v=nv(a);Rm(a,v,x);break;case 3:case 4:var P=g.stateNode.containerInfo,M=nv(a);Am(a,M,P);break;default:throw Error(t(161))}}catch(N){bt(a,a.return,N)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function eA(a,c,d){xe=a,lv(a)}function lv(a,c,d){for(var g=(a.mode&1)!==0;xe!==null;){var x=xe,v=x.child;if(x.tag===22&&g){var P=x.memoizedState!==null||Eh;if(!P){var M=x.alternate,N=M!==null&&M.memoizedState!==null||sn;M=Eh;var W=sn;if(Eh=P,(sn=N)&&!W)for(xe=x;xe!==null;)P=xe,N=P.child,P.tag===22&&P.memoizedState!==null?uv(x):N!==null?(N.return=P,xe=N):uv(x);for(;v!==null;)xe=v,lv(v),v=v.sibling;xe=x,Eh=M,sn=W}ov(a)}else(x.subtreeFlags&8772)!==0&&v!==null?(v.return=x,xe=v):ov(a)}}function ov(a){for(;xe!==null;){var c=xe;if((c.flags&8772)!==0){var d=c.alternate;try{if((c.flags&8772)!==0)switch(c.tag){case 0:case 11:case 15:sn||Mh(5,c);break;case 1:var g=c.stateNode;if(c.flags&4&&!sn)if(d===null)g.componentDidMount();else{var x=c.elementType===c.type?d.memoizedProps:Tr(c.type,d.memoizedProps);g.componentDidUpdate(x,d.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var v=c.updateQueue;v!==null&&ak(c,v,g);break;case 3:var P=c.updateQueue;if(P!==null){if(d=null,c.child!==null)switch(c.child.tag){case 5:d=c.child.stateNode;break;case 1:d=c.child.stateNode}ak(c,P,d)}break;case 5:var M=c.stateNode;if(d===null&&c.flags&4){d=M;var N=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":N.autoFocus&&d.focus();break;case"img":N.src&&(d.src=N.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var W=c.alternate;if(W!==null){var re=W.memoizedState;if(re!==null){var ie=re.dehydrated;ie!==null&&La(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}sn||c.flags&512&&Mm(c)}catch(ne){bt(c,c.return,ne)}}if(c===a){xe=null;break}if(d=c.sibling,d!==null){d.return=c.return,xe=d;break}xe=c.return}}function av(a){for(;xe!==null;){var c=xe;if(c===a){xe=null;break}var d=c.sibling;if(d!==null){d.return=c.return,xe=d;break}xe=c.return}}function uv(a){for(;xe!==null;){var c=xe;try{switch(c.tag){case 0:case 11:case 15:var d=c.return;try{Mh(4,c)}catch(N){bt(c,d,N)}break;case 1:var g=c.stateNode;if(typeof g.componentDidMount=="function"){var x=c.return;try{g.componentDidMount()}catch(N){bt(c,x,N)}}var v=c.return;try{Mm(c)}catch(N){bt(c,v,N)}break;case 5:var P=c.return;try{Mm(c)}catch(N){bt(c,P,N)}}}catch(N){bt(c,c.return,N)}if(c===a){xe=null;break}var M=c.sibling;if(M!==null){M.return=c.return,xe=M;break}xe=c.return}}var tA=Math.ceil,Ah=R.ReactCurrentDispatcher,Nm=R.ReactCurrentOwner,hr=R.ReactCurrentBatchConfig,He=0,zt=null,jt=null,Yt=0,Vn=0,po=is(0),Rt=0,su=null,rl=0,Rh=0,Lm=0,lu=null,Pn=null,_m=0,mo=1/0,Ci=null,Nh=!1,Dm=null,cs=null,Lh=!1,hs=null,_h=0,ou=0,Im=null,Dh=-1,Ih=0;function mn(){return(He&6)!==0?Qt():Dh!==-1?Dh:Dh=Qt()}function fs(a){return(a.mode&1)===0?1:(He&2)!==0&&Yt!==0?Yt&-Yt:DM.transition!==null?(Ih===0&&(Ih=n1()),Ih):(a=nt,a!==0||(a=window.event,a=a===void 0?16:h1(a.type)),a)}function Mr(a,c,d,g){if(50<ou)throw ou=0,Im=null,Error(t(185));Ea(a,d,g),((He&2)===0||a!==zt)&&(a===zt&&((He&2)===0&&(Rh|=d),Rt===4&&ds(a,Yt)),Cn(a,g),d===1&&He===0&&(c.mode&1)===0&&(mo=Qt()+500,dh&&ls()))}function Cn(a,c){var d=a.callbackNode;DE(a,c);var g=Yc(a,a===zt?Yt:0);if(g===0)d!==null&&Jx(d),a.callbackNode=null,a.callbackPriority=0;else if(c=g&-g,a.callbackPriority!==c){if(d!=null&&Jx(d),c===1)a.tag===0?_M(hv.bind(null,a)):G1(hv.bind(null,a)),AM(function(){(He&6)===0&&ls()}),d=null;else{switch(r1(g)){case 1:d=yp;break;case 4:d=e1;break;case 16:d=Wc;break;case 536870912:d=t1;break;default:d=Wc}d=xv(d,cv.bind(null,a))}a.callbackPriority=c,a.callbackNode=d}}function cv(a,c){if(Dh=-1,Ih=0,(He&6)!==0)throw Error(t(327));var d=a.callbackNode;if(go()&&a.callbackNode!==d)return null;var g=Yc(a,a===zt?Yt:0);if(g===0)return null;if((g&30)!==0||(g&a.expiredLanes)!==0||c)c=zh(a,g);else{c=g;var x=He;He|=2;var v=dv();(zt!==a||Yt!==c)&&(Ci=null,mo=Qt()+500,sl(a,c));do try{iA();break}catch(M){fv(a,M)}while(!0);rm(),Ah.current=v,He=x,jt!==null?c=0:(zt=null,Yt=0,c=Rt)}if(c!==0){if(c===2&&(x=xp(a),x!==0&&(g=x,c=zm(a,x))),c===1)throw d=su,sl(a,0),ds(a,g),Cn(a,Qt()),d;if(c===6)ds(a,g);else{if(x=a.current.alternate,(g&30)===0&&!nA(x)&&(c=zh(a,g),c===2&&(v=xp(a),v!==0&&(g=v,c=zm(a,v))),c===1))throw d=su,sl(a,0),ds(a,g),Cn(a,Qt()),d;switch(a.finishedWork=x,a.finishedLanes=g,c){case 0:case 1:throw Error(t(345));case 2:ll(a,Pn,Ci);break;case 3:if(ds(a,g),(g&130023424)===g&&(c=_m+500-Qt(),10<c)){if(Yc(a,0)!==0)break;if(x=a.suspendedLanes,(x&g)!==g){mn(),a.pingedLanes|=a.suspendedLanes&x;break}a.timeoutHandle=qp(ll.bind(null,a,Pn,Ci),c);break}ll(a,Pn,Ci);break;case 4:if(ds(a,g),(g&4194240)===g)break;for(c=a.eventTimes,x=-1;0<g;){var P=31-Cr(g);v=1<<P,P=c[P],P>x&&(x=P),g&=~v}if(g=x,g=Qt()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*tA(g/1960))-g,10<g){a.timeoutHandle=qp(ll.bind(null,a,Pn,Ci),g);break}ll(a,Pn,Ci);break;case 5:ll(a,Pn,Ci);break;default:throw Error(t(329))}}}return Cn(a,Qt()),a.callbackNode===d?cv.bind(null,a):null}function zm(a,c){var d=lu;return a.current.memoizedState.isDehydrated&&(sl(a,c).flags|=256),a=zh(a,c),a!==2&&(c=Pn,Pn=d,c!==null&&Zm(c)),a}function Zm(a){Pn===null?Pn=a:Pn.push.apply(Pn,a)}function nA(a){for(var c=a;;){if(c.flags&16384){var d=c.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var g=0;g<d.length;g++){var x=d[g],v=x.getSnapshot;x=x.value;try{if(!Qr(v(),x))return!1}catch{return!1}}}if(d=c.child,c.subtreeFlags&16384&&d!==null)d.return=c,c=d;else{if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function ds(a,c){for(c&=~Lm,c&=~Rh,a.suspendedLanes|=c,a.pingedLanes&=~c,a=a.expirationTimes;0<c;){var d=31-Cr(c),g=1<<d;a[d]=-1,c&=~g}}function hv(a){if((He&6)!==0)throw Error(t(327));go();var c=Yc(a,0);if((c&1)===0)return Cn(a,Qt()),null;var d=zh(a,c);if(a.tag!==0&&d===2){var g=xp(a);g!==0&&(c=g,d=zm(a,g))}if(d===1)throw d=su,sl(a,0),ds(a,c),Cn(a,Qt()),d;if(d===6)throw Error(t(345));return a.finishedWork=a.current.alternate,a.finishedLanes=c,ll(a,Pn,Ci),Cn(a,Qt()),null}function Xm(a,c){var d=He;He|=1;try{return a(c)}finally{He=d,He===0&&(mo=Qt()+500,dh&&ls())}}function il(a){hs!==null&&hs.tag===0&&(He&6)===0&&go();var c=He;He|=1;var d=hr.transition,g=nt;try{if(hr.transition=null,nt=1,a)return a()}finally{nt=g,hr.transition=d,He=c,(He&6)===0&&ls()}}function Bm(){Vn=po.current,mt(po)}function sl(a,c){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==-1&&(a.timeoutHandle=-1,MM(d)),jt!==null)for(d=jt.return;d!==null;){var g=d;switch(Kp(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&hh();break;case 3:co(),mt(bn),mt(tn),hm();break;case 5:um(g);break;case 4:co();break;case 13:mt(xt);break;case 19:mt(xt);break;case 10:im(g.type._context);break;case 22:case 23:Bm()}d=d.return}if(zt=a,jt=a=ps(a.current,null),Yt=Vn=c,Rt=0,su=null,Lm=Rh=rl=0,Pn=lu=null,el!==null){for(c=0;c<el.length;c++)if(d=el[c],g=d.interleaved,g!==null){d.interleaved=null;var x=g.next,v=d.pending;if(v!==null){var P=v.next;v.next=x,g.next=P}d.pending=g}el=null}return a}function fv(a,c){do{var d=jt;try{if(rm(),wh.current=Qh,Sh){for(var g=kt.memoizedState;g!==null;){var x=g.queue;x!==null&&(x.pending=null),g=g.next}Sh=!1}if(nl=0,It=At=kt=null,Ja=!1,eu=0,Nm.current=null,d===null||d.return===null){Rt=1,su=c,jt=null;break}e:{var v=a,P=d.return,M=d,N=c;if(c=Yt,M.flags|=32768,N!==null&&typeof N=="object"&&typeof N.then=="function"){var W=N,re=M,ie=re.tag;if((re.mode&1)===0&&(ie===0||ie===11||ie===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var Oe=_k(P);if(Oe!==null){Oe.flags&=-257,Dk(Oe,P,M,v,c),Oe.mode&1&&Lk(v,W,c),c=Oe,N=W;var ke=c.updateQueue;if(ke===null){var be=new Set;be.add(N),c.updateQueue=be}else ke.add(N);break e}else{if((c&1)===0){Lk(v,W,c),Wm();break e}N=Error(t(426))}}else if(gt&&M.mode&1){var $t=_k(P);if($t!==null){($t.flags&65536)===0&&($t.flags|=256),Dk($t,P,M,v,c),tm(ho(N,M));break e}}v=N=ho(N,M),Rt!==4&&(Rt=2),lu===null?lu=[v]:lu.push(v),v=P;do{switch(v.tag){case 3:v.flags|=65536,c&=-c,v.lanes|=c;var X=Rk(v,N,c);ok(v,X);break e;case 1:M=N;var z=v.type,B=v.stateNode;if((v.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(cs===null||!cs.has(B)))){v.flags|=65536,c&=-c,v.lanes|=c;var le=Nk(v,M,c);ok(v,le);break e}}v=v.return}while(v!==null)}mv(d)}catch(we){c=we,jt===d&&d!==null&&(jt=d=d.return);continue}break}while(!0)}function dv(){var a=Ah.current;return Ah.current=Qh,a===null?Qh:a}function Wm(){(Rt===0||Rt===3||Rt===2)&&(Rt=4),zt===null||(rl&268435455)===0&&(Rh&268435455)===0||ds(zt,Yt)}function zh(a,c){var d=He;He|=2;var g=dv();(zt!==a||Yt!==c)&&(Ci=null,sl(a,c));do try{rA();break}catch(x){fv(a,x)}while(!0);if(rm(),He=d,Ah.current=g,jt!==null)throw Error(t(261));return zt=null,Yt=0,Rt}function rA(){for(;jt!==null;)pv(jt)}function iA(){for(;jt!==null&&!TE();)pv(jt)}function pv(a){var c=yv(a.alternate,a,Vn);a.memoizedProps=a.pendingProps,c===null?mv(a):jt=c,Nm.current=null}function mv(a){var c=a;do{var d=c.alternate;if(a=c.return,(c.flags&32768)===0){if(d=GM(d,c,Vn),d!==null){jt=d;return}}else{if(d=HM(d,c),d!==null){d.flags&=32767,jt=d;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Rt=6,jt=null;return}}if(c=c.sibling,c!==null){jt=c;return}jt=c=a}while(c!==null);Rt===0&&(Rt=5)}function ll(a,c,d){var g=nt,x=hr.transition;try{hr.transition=null,nt=1,sA(a,c,d,g)}finally{hr.transition=x,nt=g}return null}function sA(a,c,d,g){do go();while(hs!==null);if((He&6)!==0)throw Error(t(327));d=a.finishedWork;var x=a.finishedLanes;if(d===null)return null;if(a.finishedWork=null,a.finishedLanes=0,d===a.current)throw Error(t(177));a.callbackNode=null,a.callbackPriority=0;var v=d.lanes|d.childLanes;if(IE(a,v),a===zt&&(jt=zt=null,Yt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Lh||(Lh=!0,xv(Wc,function(){return go(),null})),v=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||v){v=hr.transition,hr.transition=null;var P=nt;nt=1;var M=He;He|=4,Nm.current=null,JM(a,d),sv(d,a),PM(Wp),Hc=!!Bp,Wp=Bp=null,a.current=d,eA(d),jE(),He=M,nt=P,hr.transition=v}else a.current=d;if(Lh&&(Lh=!1,hs=a,_h=x),v=a.pendingLanes,v===0&&(cs=null),AE(d.stateNode),Cn(a,Qt()),c!==null)for(g=a.onRecoverableError,d=0;d<c.length;d++)x=c[d],g(x.value,{componentStack:x.stack,digest:x.digest});if(Nh)throw Nh=!1,a=Dm,Dm=null,a;return(_h&1)!==0&&a.tag!==0&&go(),v=a.pendingLanes,(v&1)!==0?a===Im?ou++:(ou=0,Im=a):ou=0,ls(),null}function go(){if(hs!==null){var a=r1(_h),c=hr.transition,d=nt;try{if(hr.transition=null,nt=16>a?16:a,hs===null)var g=!1;else{if(a=hs,hs=null,_h=0,(He&6)!==0)throw Error(t(331));var x=He;for(He|=4,xe=a.current;xe!==null;){var v=xe,P=v.child;if((xe.flags&16)!==0){var M=v.deletions;if(M!==null){for(var N=0;N<M.length;N++){var W=M[N];for(xe=W;xe!==null;){var re=xe;switch(re.tag){case 0:case 11:case 15:iu(8,re,v)}var ie=re.child;if(ie!==null)ie.return=re,xe=ie;else for(;xe!==null;){re=xe;var ne=re.sibling,Oe=re.return;if(ev(re),re===W){xe=null;break}if(ne!==null){ne.return=Oe,xe=ne;break}xe=Oe}}}var ke=v.alternate;if(ke!==null){var be=ke.child;if(be!==null){ke.child=null;do{var $t=be.sibling;be.sibling=null,be=$t}while(be!==null)}}xe=v}}if((v.subtreeFlags&2064)!==0&&P!==null)P.return=v,xe=P;else e:for(;xe!==null;){if(v=xe,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:iu(9,v,v.return)}var X=v.sibling;if(X!==null){X.return=v.return,xe=X;break e}xe=v.return}}var z=a.current;for(xe=z;xe!==null;){P=xe;var B=P.child;if((P.subtreeFlags&2064)!==0&&B!==null)B.return=P,xe=B;else e:for(P=z;xe!==null;){if(M=xe,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:Mh(9,M)}}catch(we){bt(M,M.return,we)}if(M===P){xe=null;break e}var le=M.sibling;if(le!==null){le.return=M.return,xe=le;break e}xe=M.return}}if(He=x,ls(),Wr&&typeof Wr.onPostCommitFiberRoot=="function")try{Wr.onPostCommitFiberRoot(Vc,a)}catch{}g=!0}return g}finally{nt=d,hr.transition=c}}return!1}function gv(a,c,d){c=ho(d,c),c=Rk(a,c,1),a=as(a,c,1),c=mn(),a!==null&&(Ea(a,1,c),Cn(a,c))}function bt(a,c,d){if(a.tag===3)gv(a,a,d);else for(;c!==null;){if(c.tag===3){gv(c,a,d);break}else if(c.tag===1){var g=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(cs===null||!cs.has(g))){a=ho(d,a),a=Nk(c,a,1),c=as(c,a,1),a=mn(),c!==null&&(Ea(c,1,a),Cn(c,a));break}}c=c.return}}function lA(a,c,d){var g=a.pingCache;g!==null&&g.delete(c),c=mn(),a.pingedLanes|=a.suspendedLanes&d,zt===a&&(Yt&d)===d&&(Rt===4||Rt===3&&(Yt&130023424)===Yt&&500>Qt()-_m?sl(a,0):Lm|=d),Cn(a,c)}function Ov(a,c){c===0&&((a.mode&1)===0?c=1:(c=Fc,Fc<<=1,(Fc&130023424)===0&&(Fc=4194304)));var d=mn();a=wi(a,c),a!==null&&(Ea(a,c,d),Cn(a,d))}function oA(a){var c=a.memoizedState,d=0;c!==null&&(d=c.retryLane),Ov(a,d)}function aA(a,c){var d=0;switch(a.tag){case 13:var g=a.stateNode,x=a.memoizedState;x!==null&&(d=x.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(t(314))}g!==null&&g.delete(c),Ov(a,d)}var yv;yv=function(a,c,d){if(a!==null)if(a.memoizedProps!==c.pendingProps||bn.current)Sn=!0;else{if((a.lanes&d)===0&&(c.flags&128)===0)return Sn=!1,UM(a,c,d);Sn=(a.flags&131072)!==0}else Sn=!1,gt&&(c.flags&1048576)!==0&&H1(c,mh,c.index);switch(c.lanes=0,c.tag){case 2:var g=c.type;jh(a,c),a=c.pendingProps;var x=ro(c,tn.current);uo(c,d),x=pm(null,c,g,a,x,d);var v=mm();return c.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,wn(g)?(v=!0,fh(c)):v=!1,c.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,om(c),x.updater=$h,c.stateNode=x,x._reactInternals=c,vm(c,g,a,d),c=Pm(null,c,g,!0,v,d)):(c.tag=0,gt&&v&&Hp(c),pn(null,c,x,d),c=c.child),c;case 16:g=c.elementType;e:{switch(jh(a,c),a=c.pendingProps,x=g._init,g=x(g._payload),c.type=g,x=c.tag=cA(g),a=Tr(g,a),x){case 0:c=Sm(null,c,g,a,d);break e;case 1:c=Wk(null,c,g,a,d);break e;case 11:c=Ik(null,c,g,a,d);break e;case 14:c=zk(null,c,g,Tr(g.type,a),d);break e}throw Error(t(306,g,""))}return c;case 0:return g=c.type,x=c.pendingProps,x=c.elementType===g?x:Tr(g,x),Sm(a,c,g,x,d);case 1:return g=c.type,x=c.pendingProps,x=c.elementType===g?x:Tr(g,x),Wk(a,c,g,x,d);case 3:e:{if(Vk(c),a===null)throw Error(t(387));g=c.pendingProps,v=c.memoizedState,x=v.element,lk(a,c),vh(c,g,null,d);var P=c.memoizedState;if(g=P.element,v.isDehydrated)if(v={element:g,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},c.updateQueue.baseState=v,c.memoizedState=v,c.flags&256){x=ho(Error(t(423)),c),c=qk(a,c,g,d,x);break e}else if(g!==x){x=ho(Error(t(424)),c),c=qk(a,c,g,d,x);break e}else for(Wn=rs(c.stateNode.containerInfo.firstChild),Bn=c,gt=!0,$r=null,d=ik(c,null,g,d),c.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(lo(),g===x){c=Pi(a,c,d);break e}pn(a,c,g,d)}c=c.child}return c;case 5:return uk(c),a===null&&em(c),g=c.type,x=c.pendingProps,v=a!==null?a.memoizedProps:null,P=x.children,Vp(g,x)?P=null:v!==null&&Vp(g,v)&&(c.flags|=32),Bk(a,c),pn(a,c,P,d),c.child;case 6:return a===null&&em(c),null;case 13:return Fk(a,c,d);case 4:return am(c,c.stateNode.containerInfo),g=c.pendingProps,a===null?c.child=oo(c,null,g,d):pn(a,c,g,d),c.child;case 11:return g=c.type,x=c.pendingProps,x=c.elementType===g?x:Tr(g,x),Ik(a,c,g,x,d);case 7:return pn(a,c,c.pendingProps,d),c.child;case 8:return pn(a,c,c.pendingProps.children,d),c.child;case 12:return pn(a,c,c.pendingProps.children,d),c.child;case 10:e:{if(g=c.type._context,x=c.pendingProps,v=c.memoizedProps,P=x.value,ht(yh,g._currentValue),g._currentValue=P,v!==null)if(Qr(v.value,P)){if(v.children===x.children&&!bn.current){c=Pi(a,c,d);break e}}else for(v=c.child,v!==null&&(v.return=c);v!==null;){var M=v.dependencies;if(M!==null){P=v.child;for(var N=M.firstContext;N!==null;){if(N.context===g){if(v.tag===1){N=Si(-1,d&-d),N.tag=2;var W=v.updateQueue;if(W!==null){W=W.shared;var re=W.pending;re===null?N.next=N:(N.next=re.next,re.next=N),W.pending=N}}v.lanes|=d,N=v.alternate,N!==null&&(N.lanes|=d),sm(v.return,d,c),M.lanes|=d;break}N=N.next}}else if(v.tag===10)P=v.type===c.type?null:v.child;else if(v.tag===18){if(P=v.return,P===null)throw Error(t(341));P.lanes|=d,M=P.alternate,M!==null&&(M.lanes|=d),sm(P,d,c),P=v.sibling}else P=v.child;if(P!==null)P.return=v;else for(P=v;P!==null;){if(P===c){P=null;break}if(v=P.sibling,v!==null){v.return=P.return,P=v;break}P=P.return}v=P}pn(a,c,x.children,d),c=c.child}return c;case 9:return x=c.type,g=c.pendingProps.children,uo(c,d),x=ur(x),g=g(x),c.flags|=1,pn(a,c,g,d),c.child;case 14:return g=c.type,x=Tr(g,c.pendingProps),x=Tr(g.type,x),zk(a,c,g,x,d);case 15:return Zk(a,c,c.type,c.pendingProps,d);case 17:return g=c.type,x=c.pendingProps,x=c.elementType===g?x:Tr(g,x),jh(a,c),c.tag=1,wn(g)?(a=!0,fh(c)):a=!1,uo(c,d),Mk(c,g,x),vm(c,g,x,d),Pm(null,c,g,!0,a,d);case 19:return Uk(a,c,d);case 22:return Xk(a,c,d)}throw Error(t(156,c.tag))};function xv(a,c){return Kx(a,c)}function uA(a,c,d,g){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(a,c,d,g){return new uA(a,c,d,g)}function Vm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function cA(a){if(typeof a=="function")return Vm(a)?1:0;if(a!=null){if(a=a.$$typeof,a===F)return 11;if(a===Y)return 14}return 2}function ps(a,c){var d=a.alternate;return d===null?(d=fr(a.tag,c,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=c,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,c=a.dependencies,d.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function Zh(a,c,d,g,x,v){var P=2;if(g=a,typeof a=="function")Vm(a)&&(P=1);else if(typeof a=="string")P=5;else e:switch(a){case Z:return ol(d.children,x,v,c);case q:P=8,x|=8;break;case J:return a=fr(12,d,c,x|2),a.elementType=J,a.lanes=v,a;case H:return a=fr(13,d,c,x),a.elementType=H,a.lanes=v,a;case ee:return a=fr(19,d,c,x),a.elementType=ee,a.lanes=v,a;case ye:return Xh(d,x,v,c);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case _:P=10;break e;case V:P=9;break e;case F:P=11;break e;case Y:P=14;break e;case me:P=16,g=null;break e}throw Error(t(130,a==null?a:typeof a,""))}return c=fr(P,d,c,x),c.elementType=a,c.type=g,c.lanes=v,c}function ol(a,c,d,g){return a=fr(7,a,g,c),a.lanes=d,a}function Xh(a,c,d,g){return a=fr(22,a,g,c),a.elementType=ye,a.lanes=d,a.stateNode={isHidden:!1},a}function qm(a,c,d){return a=fr(6,a,null,c),a.lanes=d,a}function Fm(a,c,d){return c=fr(4,a.children!==null?a.children:[],a.key,c),c.lanes=d,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}function hA(a,c,d,g,x){this.tag=c,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kp(0),this.expirationTimes=kp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kp(0),this.identifierPrefix=g,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Ym(a,c,d,g,x,v,P,M,N){return a=new hA(a,c,d,M,N),c===1?(c=1,v===!0&&(c|=8)):c=0,v=fr(3,null,null,c),a.current=v,v.stateNode=a,v.memoizedState={element:g,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},om(v),a}function fA(a,c,d){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:g==null?null:""+g,children:a,containerInfo:c,implementation:d}}function kv(a){if(!a)return ss;a=a._reactInternals;e:{if(Us(a)!==a||a.tag!==1)throw Error(t(170));var c=a;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(wn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(t(171))}if(a.tag===1){var d=a.type;if(wn(d))return Y1(a,d,c)}return c}function vv(a,c,d,g,x,v,P,M,N){return a=Ym(d,g,!0,a,x,v,P,M,N),a.context=kv(null),d=a.current,g=mn(),x=fs(d),v=Si(g,x),v.callback=c??null,as(d,v,x),a.current.lanes=x,Ea(a,x,g),Cn(a,g),a}function Bh(a,c,d,g){var x=c.current,v=mn(),P=fs(x);return d=kv(d),c.context===null?c.context=d:c.pendingContext=d,c=Si(v,P),c.payload={element:a},g=g===void 0?null:g,g!==null&&(c.callback=g),a=as(x,c,P),a!==null&&(Mr(a,x,P,v),kh(a,x,P)),P}function Wh(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function bv(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<c?d:c}}function Um(a,c){bv(a,c),(a=a.alternate)&&bv(a,c)}function dA(){return null}var wv=typeof reportError=="function"?reportError:function(a){console.error(a)};function Gm(a){this._internalRoot=a}Vh.prototype.render=Gm.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(t(409));Bh(a,c,null,null)},Vh.prototype.unmount=Gm.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;il(function(){Bh(null,a,null,null)}),c[xi]=null}};function Vh(a){this._internalRoot=a}Vh.prototype.unstable_scheduleHydration=function(a){if(a){var c=l1();a={blockedOn:null,target:a,priority:c};for(var d=0;d<es.length&&c!==0&&c<es[d].priority;d++);es.splice(d,0,a),d===0&&u1(a)}};function Hm(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function qh(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function Sv(){}function pA(a,c,d,g,x){if(x){if(typeof g=="function"){var v=g;g=function(){var W=Wh(P);v.call(W)}}var P=vv(c,g,a,0,null,!1,!1,"",Sv);return a._reactRootContainer=P,a[xi]=P.current,Va(a.nodeType===8?a.parentNode:a),il(),P}for(;x=a.lastChild;)a.removeChild(x);if(typeof g=="function"){var M=g;g=function(){var W=Wh(N);M.call(W)}}var N=Ym(a,0,!1,null,null,!1,!1,"",Sv);return a._reactRootContainer=N,a[xi]=N.current,Va(a.nodeType===8?a.parentNode:a),il(function(){Bh(c,N,d,g)}),N}function Fh(a,c,d,g,x){var v=d._reactRootContainer;if(v){var P=v;if(typeof x=="function"){var M=x;x=function(){var N=Wh(P);M.call(N)}}Bh(c,P,a,x)}else P=pA(d,c,a,x,g);return Wh(P)}i1=function(a){switch(a.tag){case 3:var c=a.stateNode;if(c.current.memoizedState.isDehydrated){var d=ja(c.pendingLanes);d!==0&&(vp(c,d|1),Cn(c,Qt()),(He&6)===0&&(mo=Qt()+500,ls()))}break;case 13:il(function(){var g=wi(a,1);if(g!==null){var x=mn();Mr(g,a,1,x)}}),Um(a,1)}},bp=function(a){if(a.tag===13){var c=wi(a,134217728);if(c!==null){var d=mn();Mr(c,a,134217728,d)}Um(a,134217728)}},s1=function(a){if(a.tag===13){var c=fs(a),d=wi(a,c);if(d!==null){var g=mn();Mr(d,a,c,g)}Um(a,c)}},l1=function(){return nt},o1=function(a,c){var d=nt;try{return nt=a,c()}finally{nt=d}},pp=function(a,c,d){switch(c){case"input":if(vn(a,d),c=d.name,d.type==="radio"&&c!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<d.length;c++){var g=d[c];if(g!==a&&g.form===a.form){var x=ch(g);if(!x)throw Error(t(90));Wl(g),vn(g,x)}}}break;case"textarea":zc(a,d);break;case"select":c=d.value,c!=null&&Ui(a,!!d.multiple,c,!1)}},Vx=Xm,qx=il;var mA={usingClientEntryPoint:!1,Events:[Ya,to,ch,Bx,Wx,Xm]},au={findFiberByHostInstance:Gs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gA={bundleType:au.bundleType,version:au.version,rendererPackageName:au.rendererPackageName,rendererConfig:au.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=Gx(a),a===null?null:a.stateNode},findFiberByHostInstance:au.findFiberByHostInstance||dA,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 Yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yh.isDisabled&&Yh.supportsFiber)try{Vc=Yh.inject(gA),Wr=Yh}catch{}}return Qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mA,Qn.createPortal=function(a,c){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hm(c))throw Error(t(200));return fA(a,c,null,d)},Qn.createRoot=function(a,c){if(!Hm(a))throw Error(t(299));var d=!1,g="",x=wv;return c!=null&&(c.unstable_strictMode===!0&&(d=!0),c.identifierPrefix!==void 0&&(g=c.identifierPrefix),c.onRecoverableError!==void 0&&(x=c.onRecoverableError)),c=Ym(a,1,!1,null,null,d,!1,g,x),a[xi]=c.current,Va(a.nodeType===8?a.parentNode:a),new Gm(c)},Qn.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var c=a._reactInternals;if(c===void 0)throw typeof a.render=="function"?Error(t(188)):(a=Object.keys(a).join(","),Error(t(268,a)));return a=Gx(c),a=a===null?null:a.stateNode,a},Qn.flushSync=function(a){return il(a)},Qn.hydrate=function(a,c,d){if(!qh(c))throw Error(t(200));return Fh(null,a,c,!0,d)},Qn.hydrateRoot=function(a,c,d){if(!Hm(a))throw Error(t(405));var g=d!=null&&d.hydratedSources||null,x=!1,v="",P=wv;if(d!=null&&(d.unstable_strictMode===!0&&(x=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onRecoverableError!==void 0&&(P=d.onRecoverableError)),c=vv(c,null,a,1,d??null,x,!1,v,P),a[xi]=c.current,Va(a),g)for(a=0;a<g.length;a++)d=g[a],x=d._getVersion,x=x(d._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[d,x]:c.mutableSourceEagerHydrationData.push(d,x);return new Vh(c)},Qn.render=function(a,c,d){if(!qh(c))throw Error(t(200));return Fh(null,a,c,!1,d)},Qn.unmountComponentAtNode=function(a){if(!qh(a))throw Error(t(40));return a._reactRootContainer?(il(function(){Fh(null,null,a,!1,function(){a._reactRootContainer=null,a[xi]=null})}),!0):!1},Qn.unstable_batchedUpdates=Xm,Qn.unstable_renderSubtreeIntoContainer=function(a,c,d,g){if(!qh(d))throw Error(t(200));if(a==null||a._reactInternals===void 0)throw Error(t(38));return Fh(a,c,d,!1,g)},Qn.version="18.3.1-next-f1338f8080-20240426",Qn}var Bv;function f2(){if(Bv)return tg.exports;Bv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),tg.exports=uR(),tg.exports}var Wv;function cR(){if(Wv)return Hh;Wv=1;var n=f2();return Hh.createRoot=n.createRoot,Hh.hydrateRoot=n.hydrateRoot,Hh}var hR=cR();const fR=Ld(hR);f2();/**
41
+ * @remix-run/router v1.23.3
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */function Wu(){return Wu=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Wu.apply(null,arguments)}var Ms;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(Ms||(Ms={}));const Vv="popstate";function dR(n){n===void 0&&(n={});function e(r,i){let{pathname:s,search:l,hash:o}=r.location;return AO("",{pathname:s,search:l,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function t(r,i){return typeof i=="string"?i:Yf(i)}return mR(e,t,null,n)}function vt(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function f0(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function pR(){return Math.random().toString(36).substr(2,8)}function qv(n,e){return{usr:n.state,key:n.key,idx:e}}function AO(n,e,t,r){return t===void 0&&(t=null),Wu({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?fa(e):e,{state:t,key:e&&e.key||r||pR()})}function Yf(n){let{pathname:e="/",search:t="",hash:r=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function fa(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let r=n.indexOf("?");r>=0&&(e.search=n.substr(r),n=n.substr(0,r)),n&&(e.pathname=n)}return e}function mR(n,e,t,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,l=i.history,o=Ms.Pop,u=null,h=f();h==null&&(h=0,l.replaceState(Wu({},l.state,{idx:h}),""));function f(){return(l.state||{idx:null}).idx}function p(){o=Ms.Pop;let w=f(),S=w==null?null:w-h;h=w,u&&u({action:o,location:b.location,delta:S})}function m(w,S){o=Ms.Push;let C=AO(b.location,w,S);h=f()+1;let Q=qv(C,h),R=b.createHref(C);try{l.pushState(Q,"",R)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;i.location.assign(R)}s&&u&&u({action:o,location:b.location,delta:1})}function O(w,S){o=Ms.Replace;let C=AO(b.location,w,S);h=f();let Q=qv(C,h),R=b.createHref(C);l.replaceState(Q,"",R),s&&u&&u({action:o,location:b.location,delta:0})}function k(w){let S=i.location.origin!=="null"?i.location.origin:i.location.href,C=typeof w=="string"?w:Yf(w);return C=C.replace(/ $/,"%20"),vt(S,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,S)}let b={get action(){return o},get location(){return n(i,l)},listen(w){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(Vv,p),u=w,()=>{i.removeEventListener(Vv,p),u=null}},createHref(w){return e(i,w)},createURL:k,encodeLocation(w){let S=k(w);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:m,replace:O,go(w){return l.go(w)}};return b}var Fv;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Fv||(Fv={}));function gR(n,e,t){return t===void 0&&(t="/"),OR(n,e,t)}function OR(n,e,t,r){let i=typeof e=="string"?fa(e):e,s=Uo(i.pathname||"/",t);if(s==null)return null;let l=d2(n);yR(l);let o=null,u=TR(s);for(let h=0;o==null&&h<l.length;++h)o=QR(l[h],u);return o}function d2(n,e,t,r){e===void 0&&(e=[]),t===void 0&&(t=[]),r===void 0&&(r="");let i=(s,l,o)=>{let u={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};u.relativePath.startsWith("/")&&(vt(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let h=Ns([r,u.relativePath]),f=t.concat(u);s.children&&s.children.length>0&&(vt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),d2(s.children,e,f,h)),!(s.path==null&&!s.index)&&e.push({path:h,score:PR(h,s.index),routesMeta:f})};return n.forEach((s,l)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,l);else for(let u of p2(s.path))i(s,l,u)}),e}function p2(n){let e=n.split("/");if(e.length===0)return[];let[t,...r]=e,i=t.endsWith("?"),s=t.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let l=p2(r.join("/")),o=[];return o.push(...l.map(u=>u===""?s:[s,u].join("/"))),i&&o.push(...l),o.map(u=>n.startsWith("/")&&u===""?"/":u)}function yR(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:CR(e.routesMeta.map(r=>r.childrenIndex),t.routesMeta.map(r=>r.childrenIndex)))}const xR=/^:[\w-]+$/,kR=3,vR=2,bR=1,wR=10,SR=-2,Yv=n=>n==="*";function PR(n,e){let t=n.split("/"),r=t.length;return t.some(Yv)&&(r+=SR),e&&(r+=vR),t.filter(i=>!Yv(i)).reduce((i,s)=>i+(xR.test(s)?kR:s===""?bR:wR),r)}function CR(n,e){return n.length===e.length&&n.slice(0,-1).every((r,i)=>r===e[i])?n[n.length-1]-e[e.length-1]:0}function QR(n,e,t){let{routesMeta:r}=n,i={},s="/",l=[];for(let o=0;o<r.length;++o){let u=r[o],h=o===r.length-1,f=s==="/"?e:e.slice(s.length)||"/",p=RO({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},f),m=u.route;if(!p)return null;Object.assign(i,p.params),l.push({params:i,pathname:Ns([s,p.pathname]),pathnameBase:RR(Ns([s,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(s=Ns([s,p.pathnameBase]))}return l}function RO(n,e){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[t,r]=$R(n.path,n.caseSensitive,n.end),i=e.match(t);if(!i)return null;let s=i[0],l=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((h,f,p)=>{let{paramName:m,isOptional:O}=f;if(m==="*"){let b=o[p]||"";l=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const k=o[p];return O&&!k?h[m]=void 0:h[m]=(k||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:l,pattern:n}}function $R(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),f0(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let r=[],i="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),i+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?i+="\\/*$":n!==""&&n!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function TR(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return f0(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function Uo(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,r=n.charAt(t);return r&&r!=="/"?null:n.slice(t)||"/"}const jR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ER=n=>jR.test(n);function MR(n,e){e===void 0&&(e="/");let{pathname:t,search:r="",hash:i=""}=typeof n=="string"?fa(n):n,s;if(t)if(ER(t))s=t;else{if(t.includes("//")){let l=t;t=m2(t),f0(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+t))}t.startsWith("/")?s=Uv(t.substring(1),"/"):s=Uv(t,e)}else s=e;return{pathname:s,search:NR(r),hash:LR(i)}}function Uv(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(i=>{i===".."?t.length>1&&t.pop():i!=="."&&t.push(i)}),t.length>1?t.join("/"):"/"}function ig(n,e,t,r){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function AR(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function d0(n,e){let t=AR(n);return e?t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):t.map(r=>r.pathnameBase)}function p0(n,e,t,r){r===void 0&&(r=!1);let i;typeof n=="string"?i=fa(n):(i=Wu({},n),vt(!i.pathname||!i.pathname.includes("?"),ig("?","pathname","search",i)),vt(!i.pathname||!i.pathname.includes("#"),ig("#","pathname","hash",i)),vt(!i.search||!i.search.includes("#"),ig("#","search","hash",i)));let s=n===""||i.pathname==="",l=s?"/":i.pathname,o;if(l==null)o=t;else{let p=e.length-1;if(!r&&l.startsWith("..")){let m=l.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}o=p>=0?e[p]:"/"}let u=MR(i,o),h=l&&l!=="/"&&l.endsWith("/"),f=(s||l===".")&&t.endsWith("/");return!u.pathname.endsWith("/")&&(h||f)&&(u.pathname+="/"),u}const m2=n=>n.replace(/\/\/+/g,"/"),Ns=n=>m2(n.join("/")),RR=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),NR=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,LR=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function _R(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const g2=["post","put","patch","delete"];new Set(g2);const DR=["get",...g2];new Set(DR);/**
50
+ * React Router v6.30.4
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */function Vu(){return Vu=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Vu.apply(null,arguments)}const _d=L.createContext(null),O2=L.createContext(null),Xi=L.createContext(null),Dd=L.createContext(null),pi=L.createContext({outlet:null,matches:[],isDataRoute:!1}),y2=L.createContext(null);function IR(n,e){let{relative:t}=e===void 0?{}:e;da()||vt(!1);let{basename:r,navigator:i}=L.useContext(Xi),{hash:s,pathname:l,search:o}=zd(n,{relative:t}),u=l;return r!=="/"&&(u=l==="/"?r:Ns([r,l])),i.createHref({pathname:u,search:o,hash:s})}function da(){return L.useContext(Dd)!=null}function Il(){return da()||vt(!1),L.useContext(Dd).location}function x2(n){L.useContext(Xi).static||L.useLayoutEffect(n)}function Ws(){let{isDataRoute:n}=L.useContext(pi);return n?e5():zR()}function zR(){da()||vt(!1);let n=L.useContext(_d),{basename:e,future:t,navigator:r}=L.useContext(Xi),{matches:i}=L.useContext(pi),{pathname:s}=Il(),l=JSON.stringify(d0(i,t.v7_relativeSplatPath)),o=L.useRef(!1);return x2(()=>{o.current=!0}),L.useCallback(function(h,f){if(f===void 0&&(f={}),!o.current)return;if(typeof h=="number"){r.go(h);return}let p=p0(h,JSON.parse(l),s,f.relative==="path");n==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:Ns([e,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[e,r,l,s,n])}const ZR=L.createContext(null);function XR(n){let e=L.useContext(pi).outlet;return e&&L.createElement(ZR.Provider,{value:n},e)}function Id(){let{matches:n}=L.useContext(pi),e=n[n.length-1];return e?e.params:{}}function zd(n,e){let{relative:t}=e===void 0?{}:e,{future:r}=L.useContext(Xi),{matches:i}=L.useContext(pi),{pathname:s}=Il(),l=JSON.stringify(d0(i,r.v7_relativeSplatPath));return L.useMemo(()=>p0(n,JSON.parse(l),s,t==="path"),[n,l,s,t])}function BR(n,e){return WR(n,e)}function WR(n,e,t,r){da()||vt(!1);let{navigator:i}=L.useContext(Xi),{matches:s}=L.useContext(pi),l=s[s.length-1],o=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let h=Il(),f;if(e){var p;let w=typeof e=="string"?fa(e):e;u==="/"||(p=w.pathname)!=null&&p.startsWith(u)||vt(!1),f=w}else f=h;let m=f.pathname||"/",O=m;if(u!=="/"){let w=u.replace(/^\//,"").split("/");O="/"+m.replace(/^\//,"").split("/").slice(w.length).join("/")}let k=gR(n,{pathname:O}),b=UR(k&&k.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Ns([u,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:Ns([u,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,t,r);return e&&b?L.createElement(Dd.Provider,{value:{location:Vu({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Ms.Pop}},b):b}function VR(){let n=JR(),e=_R(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},e),t?L.createElement("pre",{style:i},t):null,null)}const qR=L.createElement(VR,null);class FR extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?L.createElement(pi.Provider,{value:this.props.routeContext},L.createElement(y2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function YR(n){let{routeContext:e,match:t,children:r}=n,i=L.useContext(_d);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(pi.Provider,{value:e},r)}function UR(n,e,t,r){var i;if(e===void 0&&(e=[]),t===void 0&&(t=null),r===void 0&&(r=null),n==null){var s;if(!t)return null;if(t.errors)n=t.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!t.initialized&&t.matches.length>0)n=t.matches;else return null}let l=n,o=(i=t)==null?void 0:i.errors;if(o!=null){let f=l.findIndex(p=>p.route.id&&(o==null?void 0:o[p.route.id])!==void 0);f>=0||vt(!1),l=l.slice(0,Math.min(l.length,f+1))}let u=!1,h=-1;if(t&&r&&r.v7_partialHydration)for(let f=0;f<l.length;f++){let p=l[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(h=f),p.route.id){let{loaderData:m,errors:O}=t,k=p.route.loader&&m[p.route.id]===void 0&&(!O||O[p.route.id]===void 0);if(p.route.lazy||k){u=!0,h>=0?l=l.slice(0,h+1):l=[l[0]];break}}}return l.reduceRight((f,p,m)=>{let O,k=!1,b=null,w=null;t&&(O=o&&p.route.id?o[p.route.id]:void 0,b=p.route.errorElement||qR,u&&(h<0&&m===0?(t5("route-fallback"),k=!0,w=null):h===m&&(k=!0,w=p.route.hydrateFallbackElement||null)));let S=e.concat(l.slice(0,m+1)),C=()=>{let Q;return O?Q=b:k?Q=w:p.route.Component?Q=L.createElement(p.route.Component,null):p.route.element?Q=p.route.element:Q=f,L.createElement(YR,{match:p,routeContext:{outlet:f,matches:S,isDataRoute:t!=null},children:Q})};return t&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?L.createElement(FR,{location:t.location,revalidation:t.revalidation,component:b,error:O,children:C(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):C()},null)}var k2=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(k2||{}),v2=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(v2||{});function GR(n){let e=L.useContext(_d);return e||vt(!1),e}function HR(n){let e=L.useContext(O2);return e||vt(!1),e}function KR(n){let e=L.useContext(pi);return e||vt(!1),e}function b2(n){let e=KR(),t=e.matches[e.matches.length-1];return t.route.id||vt(!1),t.route.id}function JR(){var n;let e=L.useContext(y2),t=HR(),r=b2();return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function e5(){let{router:n}=GR(k2.UseNavigateStable),e=b2(v2.UseNavigateStable),t=L.useRef(!1);return x2(()=>{t.current=!0}),L.useCallback(function(i,s){s===void 0&&(s={}),t.current&&(typeof i=="number"?n.navigate(i):n.navigate(i,Vu({fromRouteId:e},s)))},[n,e])}const Gv={};function t5(n,e,t){Gv[n]||(Gv[n]=!0)}function n5(n,e){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Hv(n){let{to:e,replace:t,state:r,relative:i}=n;da()||vt(!1);let{future:s,static:l}=L.useContext(Xi),{matches:o}=L.useContext(pi),{pathname:u}=Il(),h=Ws(),f=p0(e,d0(o,s.v7_relativeSplatPath),u,i==="path"),p=JSON.stringify(f);return L.useEffect(()=>h(JSON.parse(p),{replace:t,state:r,relative:i}),[h,p,i,t,r]),null}function r5(n){return XR(n.context)}function dr(n){vt(!1)}function i5(n){let{basename:e="/",children:t=null,location:r,navigationType:i=Ms.Pop,navigator:s,static:l=!1,future:o}=n;da()&&vt(!1);let u=e.replace(/^\/*/,"/"),h=L.useMemo(()=>({basename:u,navigator:s,static:l,future:Vu({v7_relativeSplatPath:!1},o)}),[u,o,s,l]);typeof r=="string"&&(r=fa(r));let{pathname:f="/",search:p="",hash:m="",state:O=null,key:k="default"}=r,b=L.useMemo(()=>{let w=Uo(f,u);return w==null?null:{location:{pathname:w,search:p,hash:m,state:O,key:k},navigationType:i}},[u,f,p,m,O,k,i]);return b==null?null:L.createElement(Xi.Provider,{value:h},L.createElement(Dd.Provider,{children:t,value:b}))}function s5(n){let{children:e,location:t}=n;return BR(NO(e),t)}new Promise(()=>{});function NO(n,e){e===void 0&&(e=[]);let t=[];return L.Children.forEach(n,(r,i)=>{if(!L.isValidElement(r))return;let s=[...e,i];if(r.type===L.Fragment){t.push.apply(t,NO(r.props.children,s));return}r.type!==dr&&vt(!1),!r.props.index||!r.props.children||vt(!1);let l={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=NO(r.props.children,s)),t.push(l)}),t}/**
59
+ * React Router DOM v6.30.4
60
+ *
61
+ * Copyright (c) Remix Software Inc.
62
+ *
63
+ * This source code is licensed under the MIT license found in the
64
+ * LICENSE.md file in the root directory of this source tree.
65
+ *
66
+ * @license MIT
67
+ */function Uf(){return Uf=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Uf.apply(null,arguments)}function w2(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function l5(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function o5(n,e){return n.button===0&&(!e||e==="_self")&&!l5(n)}function LO(n){return n===void 0&&(n=""),new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((e,t)=>{let r=n[t];return e.concat(Array.isArray(r)?r.map(i=>[t,i]):[[t,r]])},[]))}function a5(n,e){let t=LO(n);return e&&e.forEach((r,i)=>{t.has(i)||e.getAll(i).forEach(s=>{t.append(i,s)})}),t}const u5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],c5=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],h5="6";try{window.__reactRouterVersion=h5}catch{}const f5=L.createContext({isTransitioning:!1}),d5="startTransition",Kv=YA[d5];function p5(n){let{basename:e,children:t,future:r,window:i}=n,s=L.useRef();s.current==null&&(s.current=dR({window:i,v5Compat:!0}));let l=s.current,[o,u]=L.useState({action:l.action,location:l.location}),{v7_startTransition:h}=r||{},f=L.useCallback(p=>{h&&Kv?Kv(()=>u(p)):u(p)},[u,h]);return L.useLayoutEffect(()=>l.listen(f),[l,f]),L.useEffect(()=>n5(r),[r]),L.createElement(i5,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:l,future:r})}const m5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Al=L.forwardRef(function(e,t){let{onClick:r,relative:i,reloadDocument:s,replace:l,state:o,target:u,to:h,preventScrollReset:f,viewTransition:p}=e,m=w2(e,u5),{basename:O}=L.useContext(Xi),k,b=!1;if(typeof h=="string"&&g5.test(h)&&(k=h,m5))try{let Q=new URL(window.location.href),R=h.startsWith("//")?new URL(Q.protocol+h):new URL(h),I=Uo(R.pathname,O);R.origin===Q.origin&&I!=null?h=I+R.search+R.hash:b=!0}catch{}let w=IR(h,{relative:i}),S=y5(h,{replace:l,state:o,target:u,preventScrollReset:f,relative:i,viewTransition:p});function C(Q){r&&r(Q),Q.defaultPrevented||S(Q)}return L.createElement("a",Uf({},m,{href:k||w,onClick:b||s?r:C,ref:t,target:u}))}),S2=L.forwardRef(function(e,t){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:l=!1,style:o,to:u,viewTransition:h,children:f}=e,p=w2(e,c5),m=zd(u,{relative:p.relative}),O=Il(),k=L.useContext(O2),{navigator:b,basename:w}=L.useContext(Xi),S=k!=null&&x5(m)&&h===!0,C=b.encodeLocation?b.encodeLocation(m).pathname:m.pathname,Q=O.pathname,R=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;i||(Q=Q.toLowerCase(),R=R?R.toLowerCase():null,C=C.toLowerCase()),R&&w&&(R=Uo(R,w)||R);const I=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let j=Q===C||!l&&Q.startsWith(C)&&Q.charAt(I)==="/",Z=R!=null&&(R===C||!l&&R.startsWith(C)&&R.charAt(C.length)==="/"),q={isActive:j,isPending:Z,isTransitioning:S},J=j?r:void 0,_;typeof s=="function"?_=s(q):_=[s,j?"active":null,Z?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let V=typeof o=="function"?o(q):o;return L.createElement(Al,Uf({},p,{"aria-current":J,className:_,ref:t,style:V,to:u,viewTransition:h}),typeof f=="function"?f(q):f)});var _O;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(_O||(_O={}));var Jv;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(Jv||(Jv={}));function O5(n){let e=L.useContext(_d);return e||vt(!1),e}function y5(n,e){let{target:t,replace:r,state:i,preventScrollReset:s,relative:l,viewTransition:o}=e===void 0?{}:e,u=Ws(),h=Il(),f=zd(n,{relative:l});return L.useCallback(p=>{if(o5(p,t)){p.preventDefault();let m=r!==void 0?r:Yf(h)===Yf(f);u(n,{replace:m,state:i,preventScrollReset:s,relative:l,viewTransition:o})}},[h,u,f,r,i,t,n,s,l,o])}function Pc(n){let e=L.useRef(LO(n)),t=L.useRef(!1),r=Il(),i=L.useMemo(()=>a5(r.search,t.current?null:e.current),[r.search]),s=Ws(),l=L.useCallback((o,u)=>{const h=LO(typeof o=="function"?o(i):o);t.current=!0,s("?"+h,u)},[s,i]);return[i,l]}function x5(n,e){e===void 0&&(e={});let t=L.useContext(f5);t==null&&vt(!1);let{basename:r}=O5(_O.useViewTransitionState),i=zd(n,{relative:e.relative});if(!t.isTransitioning)return!1;let s=Uo(t.currentLocation.pathname,r)||t.currentLocation.pathname,l=Uo(t.nextLocation.pathname,r)||t.nextLocation.pathname;return RO(i.pathname,l)!=null||RO(i.pathname,s)!=null}const P2=L.createContext(null);function k5({children:n}){const[e,t]=L.useState(null),r=L.useCallback(l=>t(l),[]),i=L.useCallback(()=>t(null),[]),s=L.useMemo(()=>({active:e,open:r,close:i}),[e,r,i]);return y.jsx(P2.Provider,{value:s,children:n})}function Dt(){const n=L.useContext(P2);if(!n)throw new Error("useModals must be used inside ModalsProvider");return n}function v5(n){const e=n.target;if(!e)return!1;const t=e.tagName;return!!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable||e.closest(".cm-editor"))}function b5(){const{active:n,open:e,close:t}=Dt(),r=Ws();L.useEffect(()=>{const i=s=>{const l=s.metaKey||s.ctrlKey;if(l&&s.key.toLowerCase()==="k"){s.preventDefault(),e({kind:"search"});return}if(s.key==="Escape"){n&&(s.preventDefault(),t());return}if(!v5(s)&&!(s.altKey||l)){if(s.key==="c"){s.preventDefault(),e({kind:"quick-create"});return}if(s.key==="n"){s.preventDefault(),e({kind:"new-project"});return}if(s.key==="g"){const o=u=>{window.removeEventListener("keydown",o),u.key==="d"&&(u.preventDefault(),r("/"))};window.addEventListener("keydown",o,{once:!0});return}}};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[n,e,t,r])}let DO=[],C2=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?C2:DO).push(t=t+n[e])})();function w5(n){if(n<768)return!1;for(let e=0,t=DO.length;;){let r=e+t>>1;if(n<DO[r])t=r;else if(n>=C2[r])e=r+1;else return!0;if(e==t)return!1}}function eb(n){return n>=127462&&n<=127487}const tb=8205;function S5(n,e,t=!0,r=!0){return(t?Q2:P5)(n,e,r)}function Q2(n,e,t){if(e==n.length)return e;e&&$2(n.charCodeAt(e))&&T2(n.charCodeAt(e-1))&&e--;let r=sg(n,e);for(e+=nb(r);e<n.length;){let i=sg(n,e);if(r==tb||i==tb||t&&w5(i))e+=nb(i),r=i;else if(eb(i)){let s=0,l=e-2;for(;l>=0&&eb(sg(n,l));)s++,l-=2;if(s%2==0)break;e+=2}else break}return e}function P5(n,e,t){for(;e>0;){let r=Q2(n,e-2,t);if(r<e)return r;e--}return 0}function sg(n,e){let t=n.charCodeAt(e);if(!T2(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return $2(r)?(t-55296<<10)+(r-56320)+65536:t}function $2(n){return n>=56320&&n<57344}function T2(n){return n>=55296&&n<56320}function nb(n){return n<65536?1:2}class Ye{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Go(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),ri.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Go(this,e,t);let r=[];return this.decompose(e,t,r,0),ri.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new ju(this),s=new ju(e);for(let l=t,o=t;;){if(i.next(l),s.next(l),l=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(o+=i.value.length,i.done||o>=r)return!0}}iter(e=1){return new ju(this,e)}iterRange(e,t=this.length){return new j2(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new E2(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ye.empty:e.length<=32?new Tt(e):ri.from(Tt.split(e,[]))}}class Tt extends Ye{constructor(e,t=C5(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let s=0;;s++){let l=this.text[s],o=i+l.length;if((t?r:o)>=e)return new Q5(i,o,r,l);i=o+1,r++}}decompose(e,t,r,i){let s=e<=0&&t>=this.length?this:new Tt(rb(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let l=r.pop(),o=Ef(s.text,l.text.slice(),0,s.length);if(o.length<=32)r.push(new Tt(o,l.length+s.length));else{let u=o.length>>1;r.push(new Tt(o.slice(0,u)),new Tt(o.slice(u)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof Tt))return super.replace(e,t,r);[e,t]=Go(this,e,t);let i=Ef(this.text,Ef(r.text,rb(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new Tt(i,s):ri.from(Tt.split(i,[]),s)}sliceString(e,t=this.length,r=`
68
+ `){[e,t]=Go(this,e,t);let i="";for(let s=0,l=0;s<=t&&l<this.text.length;l++){let o=this.text[l],u=s+o.length;s>e&&l&&(i+=r),e<u&&t>s&&(i+=o.slice(Math.max(0,e-s),t-s)),s=u+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new Tt(r,i)),r=[],i=-1);return i>-1&&t.push(new Tt(r,i)),t}}class ri extends Ye{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let l=this.children[s],o=i+l.length,u=r+l.lines-1;if((t?u:o)>=e)return l.lineInner(e,t,r,i);i=o+1,r=u+1}}decompose(e,t,r,i){for(let s=0,l=0;l<=t&&s<this.children.length;s++){let o=this.children[s],u=l+o.length;if(e<=u&&t>=l){let h=i&((l<=e?1:0)|(u>=t?2:0));l>=e&&u<=t&&!h?r.push(o):o.decompose(e-l,t-l,r,h)}l=u+1}}replace(e,t,r){if([e,t]=Go(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let l=this.children[i],o=s+l.length;if(e>=s&&t<=o){let u=l.replace(e-s,t-s,r),h=this.lines-l.lines+u.lines;if(u.lines<h>>4&&u.lines>h>>6){let f=this.children.slice();return f[i]=u,new ri(f,this.length-(t-e)+r.length)}return super.replace(s,o,u)}s=o+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
69
+ `){[e,t]=Go(this,e,t);let i="";for(let s=0,l=0;s<this.children.length&&l<=t;s++){let o=this.children[s],u=l+o.length;l>e&&s&&(i+=r),e<u&&t>l&&(i+=o.sliceString(e-l,t-l,r)),l=u+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ri))return 0;let r=0,[i,s,l,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==l||s==o)return r;let u=this.children[i],h=e.children[s];if(u!=h)return r+u.scanIdentical(h,t);r+=u.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let O of e)r+=O.lines;if(r<32){let O=[];for(let k of e)k.flatten(O);return new Tt(O,t)}let i=Math.max(32,r>>5),s=i<<1,l=i>>1,o=[],u=0,h=-1,f=[];function p(O){let k;if(O.lines>s&&O instanceof ri)for(let b of O.children)p(b);else O.lines>l&&(u>l||!u)?(m(),o.push(O)):O instanceof Tt&&u&&(k=f[f.length-1])instanceof Tt&&O.lines+k.lines<=32?(u+=O.lines,h+=O.length+1,f[f.length-1]=new Tt(k.text.concat(O.text),k.length+1+O.length)):(u+O.lines>i&&m(),u+=O.lines,h+=O.length+1,f.push(O))}function m(){u!=0&&(o.push(f.length==1?f[0]:ri.from(f,h)),h=-1,u=f.length=0)}for(let O of e)p(O);return m(),o.length==1?o[0]:new ri(o,t)}}Ye.empty=new Tt([""],0);function C5(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Ef(n,e,t=0,r=1e9){for(let i=0,s=0,l=!0;s<n.length&&i<=r;s++){let o=n[s],u=i+o.length;u>=t&&(u>r&&(o=o.slice(0,r-i)),i<t&&(o=o.slice(t-i)),l?(e[e.length-1]+=o,l=!1):e.push(o)),i=u+1}return e}function rb(n,e,t){return Ef(n,[""],e,t)}class ju{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Tt?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],l=s>>1,o=i instanceof Tt?i.text.length:i.children.length;if(l==(t>0?o:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
70
+ `,this;e--}else if(i instanceof Tt){let u=i.text[l+(t<0?-1:0)];if(this.offsets[r]+=t,u.length>Math.max(0,e))return this.value=e==0?u:t>0?u.slice(e):u.slice(0,u.length-e),this;e-=u.length}else{let u=i.children[l+(t<0?-1:0)];e>u.length?(e-=u.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(u),this.offsets.push(t>0?1:(u instanceof Tt?u.text.length:u.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class j2{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new ju(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class E2{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ye.prototype[Symbol.iterator]=function(){return this.iter()},ju.prototype[Symbol.iterator]=j2.prototype[Symbol.iterator]=E2.prototype[Symbol.iterator]=function(){return this});let Q5=class{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}};function Go(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Wt(n,e,t=!0,r=!0){return S5(n,e,t,r)}function $5(n){return n>=56320&&n<57344}function T5(n){return n>=55296&&n<56320}function Mn(n,e){let t=n.charCodeAt(e);if(!T5(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return $5(r)?(t-55296<<10)+(r-56320)+65536:t}function m0(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ii(n){return n<65536?1:2}const IO=/\r\n?|\n/;var Ht=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(Ht||(Ht={}));class ci{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],l=this.sections[t++];l<0?(e(r,i,s),i+=s):i+=l,r+=s}}iterChangedRanges(e,t=!1){zO(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new ci(e)}composeDesc(e){return this.empty?e:e.empty?this:M2(this,e)}mapDesc(e,t=!1){return e.empty?this:ZO(this,e,t)}mapPos(e,t=-1,r=Ht.Simple){let i=0,s=0;for(let l=0;l<this.sections.length;){let o=this.sections[l++],u=this.sections[l++],h=i+o;if(u<0){if(h>e)return s+(e-i);s+=o}else{if(r!=Ht.Simple&&h>=e&&(r==Ht.TrackDel&&i<e&&h>e||r==Ht.TrackBefore&&i<e||r==Ht.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!o)return e==i||t<0?s:s+u;s+=u}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],l=this.sections[r++],o=i+s;if(l>=0&&i<=t&&o>=e)return i<e&&o>t?"cover":!0;i=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ci(e)}static create(e){return new ci(e)}}class Nt extends ci{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return zO(this,(t,r,i,s,l)=>e=e.replace(i,i+(r-t),l),!1),e}mapDesc(e,t=!1){return ZO(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let l=t[i],o=t[i+1];if(o>=0){t[i]=o,t[i+1]=l;let u=i>>1;for(;r.length<u;)r.push(Ye.empty);r.push(l?e.slice(s,s+l):Ye.empty)}s+=l}return new Nt(t,r)}compose(e){return this.empty?e:e.empty?this:M2(this,e,!0)}map(e,t=!1){return e.empty?this:ZO(this,e,t,!0)}iterChanges(e,t=!1){zO(this,e,t)}get desc(){return ci.create(this.sections)}filter(e){let t=[],r=[],i=[],s=new qu(this);e:for(let l=0,o=0;;){let u=l==e.length?1e9:e[l++];for(;o<u||o==u&&s.len==0;){if(s.done)break e;let f=Math.min(s.len,u-o);an(i,f,-1);let p=s.ins==-1?-1:s.off==0?s.ins:0;an(t,f,p),p>0&&As(r,t,s.text),s.forward(f),o+=f}let h=e[l++];for(;o<h;){if(s.done)break e;let f=Math.min(s.len,h-o);an(t,f,-1),an(i,f,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(f),o+=f}}return{changes:new Nt(t,r),filtered:ci.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],i=this.sections[t+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let i=[],s=[],l=0,o=null;function u(f=!1){if(!f&&!i.length)return;l<t&&an(i,t-l,-1);let p=new Nt(i,s);o=o?o.compose(p.map(o)):p,i=[],s=[],l=0}function h(f){if(Array.isArray(f))for(let p of f)h(p);else if(f instanceof Nt){if(f.length!=t)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${t})`);u(),o=o?o.compose(f.map(o)):f}else{let{from:p,to:m=p,insert:O}=f;if(p>m||p<0||m>t)throw new RangeError(`Invalid change range ${p} to ${m} (in doc of length ${t})`);let k=O?typeof O=="string"?Ye.of(O.split(r||IO)):O:Ye.empty,b=k.length;if(p==m&&b==0)return;p<l&&u(),p>l&&an(i,p-l,-1),an(i,m-p,b),As(s,i,k),l=m}}return h(e),u(!o),o}static empty(e){return new Nt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((l,o)=>o&&typeof l!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length<i;)r.push(Ye.empty);r[i]=Ye.of(s.slice(1)),t.push(s[0],r[i].length)}}}return new Nt(t,r)}static createSet(e,t){return new Nt(e,t)}}function an(n,e,t,r=!1){if(e==0&&t<=0)return;let i=n.length-2;i>=0&&t<=0&&t==n[i+1]?n[i]+=e:i>=0&&e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function As(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<r;)n.push(Ye.empty);n.push(t)}}function zO(n,e,t){let r=n.inserted;for(let i=0,s=0,l=0;l<n.sections.length;){let o=n.sections[l++],u=n.sections[l++];if(u<0)i+=o,s+=o;else{let h=i,f=s,p=Ye.empty;for(;h+=o,f+=u,u&&r&&(p=p.append(r[l-2>>1])),!(t||l==n.sections.length||n.sections[l+1]<0);)o=n.sections[l++],u=n.sections[l++];e(i,h,s,f,p),i=h,s=f}}}function ZO(n,e,t,r=!1){let i=[],s=r?[]:null,l=new qu(n),o=new qu(e);for(let u=-1;;){if(l.done&&o.len||o.done&&l.len)throw new Error("Mismatched change set lengths");if(l.ins==-1&&o.ins==-1){let h=Math.min(l.len,o.len);an(i,h,-1),l.forward(h),o.forward(h)}else if(o.ins>=0&&(l.ins<0||u==l.i||l.off==0&&(o.len<l.len||o.len==l.len&&!t))){let h=o.len;for(an(i,o.ins,-1);h;){let f=Math.min(l.len,h);l.ins>=0&&u<l.i&&l.len<=f&&(an(i,0,l.ins),s&&As(s,i,l.text),u=l.i),l.forward(f),h-=f}o.next()}else if(l.ins>=0){let h=0,f=l.len;for(;f;)if(o.ins==-1){let p=Math.min(f,o.len);h+=p,f-=p,o.forward(p)}else if(o.ins==0&&o.len<f)f-=o.len,o.next();else break;an(i,h,u<l.i?l.ins:0),s&&u<l.i&&As(s,i,l.text),u=l.i,l.forward(l.len-f)}else{if(l.done&&o.done)return s?Nt.createSet(i,s):ci.create(i);throw new Error("Mismatched change set lengths")}}}function M2(n,e,t=!1){let r=[],i=t?[]:null,s=new qu(n),l=new qu(e);for(let o=!1;;){if(s.done&&l.done)return i?Nt.createSet(r,i):ci.create(r);if(s.ins==0)an(r,s.len,0,o),s.next();else if(l.len==0&&!l.done)an(r,0,l.ins,o),i&&As(i,r,l.text),l.next();else{if(s.done||l.done)throw new Error("Mismatched change set lengths");{let u=Math.min(s.len2,l.len),h=r.length;if(s.ins==-1){let f=l.ins==-1?-1:l.off?0:l.ins;an(r,u,f,o),i&&f&&As(i,r,l.text)}else l.ins==-1?(an(r,s.off?0:s.len,u,o),i&&As(i,r,s.textBit(u))):(an(r,s.off?0:s.len,l.off?0:l.ins,o),i&&!l.off&&As(i,r,l.text));o=(s.ins>u||l.ins>=0&&l.len>u)&&(o||r.length>h),s.forward2(u),l.forward(u)}}}}class qu{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Ye.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Ye.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class gl{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new gl(r,i,this.flags)}extend(e,t=e,r=0){if(e<=this.anchor&&t>=this.anchor)return U.range(e,t,void 0,void 0,r);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return U.range(this.anchor,i,void 0,void 0,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return U.range(e.anchor,e.head)}static create(e,t,r){return new gl(e,t,r)}}class U{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:U.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new U([this.main],0)}addRange(e,t=!0){return U.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,U.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new U(e.ranges.map(t=>gl.fromJSON(t)),e.main)}static single(e,t=e){return new U([U.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return U.normalized(e.slice(),t);r=s.to}return new U(e,t)}static cursor(e,t=0,r,i){return gl.create(e,e,(t==0?0:t<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,t,r,i,s){let l=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!s&&e!=t&&(s=t<e?1:-1),t<e?gl.create(t,e,48|l):gl.create(e,t,(s?s<0?8:16:0)|l)}static normalized(e,t=0){let r=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],l=e[i-1];if(s.empty?s.from<=l.to:s.from<l.to){let o=l.from,u=Math.max(s.to,l.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?U.range(u,o):U.range(o,u))}}return new U(e,t)}}function A2(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let g0=0;class pe{constructor(e,t,r,i,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=g0++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new pe(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:O0),!!e.static,e.enables)}of(e){return new Mf([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Mf(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Mf(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function O0(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class Mf{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=g0++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,s=this.id,l=e[s]>>1,o=this.type==2,u=!1,h=!1,f=[];for(let p of this.dependencies)p=="doc"?u=!0:p=="selection"?h=!0:(((t=e[p.id])!==null&&t!==void 0?t:1)&1)==0&&f.push(e[p.id]);return{create(p){return p.values[l]=r(p),1},update(p,m){if(u&&m.docChanged||h&&(m.docChanged||m.selection)||XO(p,f)){let O=r(p);if(o?!ib(O,p.values[l],i):!i(O,p.values[l]))return p.values[l]=O,1}return 0},reconfigure:(p,m)=>{let O,k=m.config.address[s];if(k!=null){let b=Hf(m,k);if(this.dependencies.every(w=>w instanceof pe?m.facet(w)===p.facet(w):w instanceof Jt?m.field(w,!1)==p.field(w,!1):!0)||(o?ib(O=r(p),b,i):i(O=r(p),b)))return p.values[l]=b,0}else O=r(p);return p.values[l]=O,1}}}}function ib(n,e,t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}function XO(n,e){let t=!1;for(let r of e)Eu(n,r)&1&&(t=!0);return t}function j5(n,e,t){let r=t.map(u=>n[u.id]),i=t.map(u=>u.type),s=r.filter(u=>!(u&1)),l=n[e.id]>>1;function o(u){let h=[];for(let f=0;f<r.length;f++){let p=Hf(u,r[f]);if(i[f]==2)for(let m of p)h.push(m);else h.push(p)}return e.combine(h)}return{create(u){for(let h of r)Eu(u,h);return u.values[l]=o(u),1},update(u,h){if(!XO(u,s))return 0;let f=o(u);return e.compare(f,u.values[l])?0:(u.values[l]=f,1)},reconfigure(u,h){let f=XO(u,r),p=h.config.facets[e.id],m=h.facet(e);if(p&&!f&&O0(t,p))return u.values[l]=m,0;let O=o(u);return e.compare(O,m)?(u.values[l]=m,0):(u.values[l]=O,1)}}}const Kh=pe.define({static:!0});class Jt{constructor(e,t,r,i,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new Jt(g0++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Kh).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let s=r.values[t],l=this.updateF(s,i);return this.compareF(s,l)?0:(r.values[t]=l,1)},reconfigure:(r,i)=>{let s=r.facet(Kh),l=i.facet(Kh),o;return(o=s.find(u=>u.field==this))&&o!=l.find(u=>u.field==this)?(r.values[t]=o.create(r),1):i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}}init(e){return[this,Kh.of({field:this,create:e})]}get extension(){return this}}const fl={lowest:4,low:3,default:2,high:1,highest:0};function cu(n){return e=>new R2(e,n)}const Bi={highest:cu(fl.highest),high:cu(fl.high),default:cu(fl.default),low:cu(fl.low),lowest:cu(fl.lowest)};class R2{constructor(e,t){this.inner=e,this.prec=t}}class Zd{of(e){return new BO(this,e)}reconfigure(e){return Zd.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class BO{constructor(e,t){this.compartment=e,this.inner=t}}class Gf{constructor(e,t,r,i,s,l){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=l,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let i=[],s=Object.create(null),l=new Map;for(let m of E5(e,t,l))m instanceof Jt?i.push(m):(s[m.facet.id]||(s[m.facet.id]=[])).push(m);let o=Object.create(null),u=[],h=[];for(let m of i)o[m.id]=h.length<<1,h.push(O=>m.slot(O));let f=r==null?void 0:r.config.facets;for(let m in s){let O=s[m],k=O[0].facet,b=f&&f[m]||[];if(O.every(w=>w.type==0))if(o[k.id]=u.length<<1|1,O0(b,O))u.push(r.facet(k));else{let w=k.combine(O.map(S=>S.value));u.push(r&&k.compare(w,r.facet(k))?r.facet(k):w)}else{for(let w of O)w.type==0?(o[w.id]=u.length<<1|1,u.push(w.value)):(o[w.id]=h.length<<1,h.push(S=>w.dynamicSlot(S)));o[k.id]=h.length<<1,h.push(w=>j5(w,k,O))}}let p=h.map(m=>m(o));return new Gf(e,l,p,o,u,s)}}function E5(n,e,t){let r=[[],[],[],[],[]],i=new Map;function s(l,o){let u=i.get(l);if(u!=null){if(u<=o)return;let h=r[u].indexOf(l);h>-1&&r[u].splice(h,1),l instanceof BO&&t.delete(l.compartment)}if(i.set(l,o),Array.isArray(l))for(let h of l)s(h,o);else if(l instanceof BO){if(t.has(l.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(l.compartment)||l.inner;t.set(l.compartment,h),s(h,o)}else if(l instanceof R2)s(l.inner,l.prec);else if(l instanceof Jt)r[o].push(l),l.provides&&s(l.provides,o);else if(l instanceof Mf)r[o].push(l),l.facet.extensions&&s(l.facet.extensions,fl.default);else{let h=l.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${l}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,o)}}return s(n,fl.default),r.reduce((l,o)=>l.concat(o))}function Eu(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function Hf(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const N2=pe.define(),WO=pe.define({combine:n=>n.some(e=>e),static:!0}),L2=pe.define({combine:n=>n.length?n[0]:void 0,static:!0}),_2=pe.define(),D2=pe.define(),I2=pe.define(),z2=pe.define({combine:n=>n.length?n[0]:!1});class mi{constructor(e,t){this.type=e,this.value=t}static define(){return new M5}}class M5{of(e){return new mi(this,e)}}class A5{constructor(e){this.map=e}of(e){return new Re(this,e)}}class Re{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Re(this.type,t)}is(e){return this.type==e}static define(e={}){return new A5(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(t);s&&r.push(s)}return r}}Re.reconfigure=Re.define();Re.appendConfig=Re.define();class Mt{constructor(e,t,r,i,s,l){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=l,this._doc=null,this._state=null,r&&A2(r,t.newLength),s.some(o=>o.type==Mt.time)||(this.annotations=s.concat(Mt.time.of(Date.now())))}static create(e,t,r,i,s,l){return new Mt(e,t,r,i,s,l)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Mt.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Mt.time=mi.define();Mt.userEvent=mi.define();Mt.addToHistory=mi.define();Mt.remote=mi.define();function R5(n,e){let t=[];for(let r=0,i=0;;){let s,l;if(r<n.length&&(i==e.length||e[i]>=n[r]))s=n[r++],l=n[r++];else if(i<e.length)s=e[i++],l=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,l):t[t.length-1]<l&&(t[t.length-1]=l)}}function Z2(n,e,t){var r;let i,s,l;return t?(i=e.changes,s=Nt.empty(e.changes.length),l=n.changes.compose(e.changes)):(i=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),l=n.changes.compose(i)),{changes:l,selection:e.selection?e.selection.map(s):(r=n.selection)===null||r===void 0?void 0:r.map(i),effects:Re.mapEffects(n.effects,i).concat(Re.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function VO(n,e,t){let r=e.selection,i=$o(e.annotations);return e.userEvent&&(i=i.concat(Mt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Nt?e.changes:Nt.of(e.changes||[],t,n.facet(L2)),selection:r&&(r instanceof U?r:U.single(r.anchor,r.head)),effects:$o(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function X2(n,e,t){let r=VO(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let l=!!e[s].sequential;r=Z2(r,VO(n,e[s],l?r.changes.newLength:n.doc.length),l)}let i=Mt.create(n,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return L5(t?N5(i):i)}function N5(n){let e=n.startState,t=!0;for(let i of e.facet(_2)){let s=i(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:R5(t,s))}if(t!==!0){let i,s;if(t===!1)s=n.changes.invertedDesc,i=Nt.empty(e.doc.length);else{let l=n.changes.filter(t);i=l.changes,s=l.filtered.mapDesc(l.changes).invertedDesc}n=Mt.create(e,i,n.selection&&n.selection.map(s),Re.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let r=e.facet(D2);for(let i=r.length-1;i>=0;i--){let s=r[i](n);s instanceof Mt?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Mt?n=s[0]:n=X2(e,$o(s),!1)}return n}function L5(n){let e=n.startState,t=e.facet(I2),r=n;for(let i=t.length-1;i>=0;i--){let s=t[i](n);s&&Object.keys(s).length&&(r=Z2(r,VO(e,s,n.changes.newLength),!0))}return r==n?n:Mt.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const _5=[];function $o(n){return n==null?_5:Array.isArray(n)?n:[n]}var Ot=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(Ot||(Ot={}));const D5=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let qO;try{qO=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function I5(n){if(qO)return qO.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||D5.test(t)))return!0}return!1}function z5(n){return e=>{if(!/\S/.test(e))return Ot.Space;if(I5(e))return Ot.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return Ot.Word;return Ot.Other}}class Ve{constructor(e,t,r,i,s,l){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,l&&(l._state=this);for(let o=0;o<this.config.dynamicSlots.length;o++)Eu(this,o<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(r==null){if(t)throw new RangeError("Field is not present in this state");return}return Eu(this,r),Hf(this,r)}update(...e){return X2(this,e,!0)}applyTransaction(e){let t=this.config,{base:r,compartments:i}=t;for(let o of e.effects)o.is(Zd.reconfigure)?(t&&(i=new Map,t.compartments.forEach((u,h)=>i.set(h,u)),t=null),i.set(o.value.compartment,o.value.extension)):o.is(Re.reconfigure)?(t=null,r=o.value):o.is(Re.appendConfig)&&(t=null,r=$o(r).concat(o.value));let s;t?s=e.startState.values.slice():(t=Gf.resolve(r,i,this),s=new Ve(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(u,h)=>h.reconfigure(u,this),null).values);let l=e.startState.facet(WO)?e.newSelection:e.newSelection.asSingle();new Ve(t,e.newDoc,l,s,(o,u)=>u.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:U.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),s=[r.range],l=$o(r.effects);for(let o=1;o<t.ranges.length;o++){let u=e(t.ranges[o]),h=this.changes(u.changes),f=h.map(i);for(let m=0;m<o;m++)s[m]=s[m].map(f);let p=i.mapDesc(h,!0);s.push(u.range.map(p)),i=i.compose(f),l=Re.mapEffects(l,f).concat(Re.mapEffects($o(u.effects),p))}return{changes:i,selection:U.create(s,t.mainIndex),effects:l}}changes(e=[]){return e instanceof Nt?e:Nt.of(e,this.doc.length,this.facet(Ve.lineSeparator))}toText(e){return Ye.of(e.split(this.facet(Ve.lineSeparator)||IO))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Eu(this,t),Hf(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof Jt&&this.config.address[i.id]!=null&&(t[r]=i.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let l=r[s],o=e[s];i.push(l.init(u=>l.spec.fromJSON(o,u)))}}return Ve.create({doc:e.doc,selection:U.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=Gf.resolve(e.extensions||[],new Map),r=e.doc instanceof Ye?e.doc:Ye.of((e.doc||"").split(t.staticFacet(Ve.lineSeparator)||IO)),i=e.selection?e.selection instanceof U?e.selection:U.single(e.selection.anchor,e.selection.head):U.single(0);return A2(i,r.length),t.staticFacet(WO)||(i=i.asSingle()),new Ve(t,r,i,t.dynamicSlots.map(()=>null),(s,l)=>l.create(s),null)}get tabSize(){return this.facet(Ve.tabSize)}get lineBreak(){return this.facet(Ve.lineSeparator)||`
71
+ `}get readOnly(){return this.facet(z2)}phrase(e,...t){for(let r of this.facet(Ve.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(N2))for(let l of s(this,t,r))Object.prototype.hasOwnProperty.call(l,e)&&i.push(l[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return z5(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),l=e-r,o=e-r;for(;l>0;){let u=Wt(t,l,!1);if(s(t.slice(u,l))!=Ot.Word)break;l=u}for(;o<i;){let u=Wt(t,o);if(s(t.slice(o,u))!=Ot.Word)break;o=u}return l==o?null:U.range(l+r,o+r)}}Ve.allowMultipleSelections=WO;Ve.tabSize=pe.define({combine:n=>n.length?n[0]:4});Ve.lineSeparator=L2;Ve.readOnly=z2;Ve.phrases=pe.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Ve.languageData=N2;Ve.changeFilter=_2;Ve.transactionFilter=D2;Ve.transactionExtender=I2;Zd.reconfigure=Re.define();function gi(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let l=i[s],o=r[s];if(o===void 0)r[s]=l;else if(!(o===l||l===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](o,l);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class _s{eq(e){return this==e}range(e,t=e){return FO.create(e,t,this)}}_s.prototype.startSide=_s.prototype.endSide=0;_s.prototype.point=!1;_s.prototype.mapMode=Ht.TrackDel;function y0(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let FO=class B2{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new B2(e,t,r)}};function YO(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class x0{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let l=i,o=s.length;;){if(l==o)return l;let u=l+o>>1,h=s[u]-e||(r?this.value[u].endSide:this.value[u].startSide)-t;if(u==l)return h>=0?l:o;h>=0?o=u:l=u+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),l=this.findIndex(r,1e9,!1,s);s<l;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],l=-1,o=-1;for(let u=0;u<this.value.length;u++){let h=this.value[u],f=this.from[u]+e,p=this.to[u]+e,m,O;if(f==p){let k=t.mapPos(f,h.startSide,h.mapMode);if(k==null||(m=O=k,h.startSide!=h.endSide&&(O=t.mapPos(f,h.endSide),O<m)))continue}else if(m=t.mapPos(f,h.startSide),O=t.mapPos(p,h.endSide),m>O||m==O&&h.startSide>0&&h.endSide<=0)continue;(O-m||h.endSide-h.startSide)<0||(l<0&&(l=m),h.point&&(o=Math.max(o,O-m)),r.push(h),i.push(m-l),s.push(O-l))}return{mapped:r.length?new x0(i,s,r,o):null,pos:l}}}class Be{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new Be(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,l=e.filter;if(t.length==0&&!l)return this;if(r&&(t=t.slice().sort(YO)),this.isEmpty)return t.length?Be.of(t):this;let o=new W2(this,null,-1).goto(0),u=0,h=[],f=new Di;for(;o.value||u<t.length;)if(u<t.length&&(o.from-t[u].from||o.startSide-t[u].value.startSide)>=0){let p=t[u++];f.addInner(p.from,p.to,p.value)||h.push(p)}else o.rangeIndex==1&&o.chunkIndex<this.chunk.length&&(u==t.length||this.chunkEnd(o.chunkIndex)<t[u].from)&&(!l||i>this.chunkEnd(o.chunkIndex)||s<this.chunkPos[o.chunkIndex])&&f.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!l||i>o.to||s<o.from||l(o.from,o.to,o.value))&&(f.addInner(o.from,o.to,o.value)||h.push(FO.create(o.from,o.to,o.value))),o.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?Be.empty:this.nextLayer.update({add:h,filter:l,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let l=0;l<this.chunk.length;l++){let o=this.chunkPos[l],u=this.chunk[l],h=e.touchesRange(o,o+u.length);if(h===!1)i=Math.max(i,u.maxPoint),t.push(u),r.push(e.mapPos(o));else if(h===!0){let{mapped:f,pos:p}=u.map(o,e);f&&(i=Math.max(i,f.maxPoint),t.push(f),r.push(p))}}let s=this.nextLayer.map(e);return t.length==0?s:new Be(r,t,s||Be.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],l=this.chunk[i];if(t>=s&&e<=s+l.length&&l.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Fu.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Fu.from(e).goto(t)}static compare(e,t,r,i,s=-1){let l=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),o=t.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),u=sb(l,o,r),h=new hu(l,u,s),f=new hu(o,u,s);r.iterGaps((p,m,O)=>lb(h,p,f,m,O,i)),r.empty&&r.length==0&&lb(h,0,f,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=999999999);let s=e.filter(f=>!f.isEmpty&&t.indexOf(f)<0),l=t.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=l.length)return!1;if(!s.length)return!0;let o=sb(s,l),u=new hu(s,o,0).goto(r),h=new hu(l,o,0).goto(r);for(;;){if(u.to!=h.to||!UO(u.active,h.active)||u.point&&(!h.point||!y0(u.point,h.point)))return!1;if(u.to>i)return!0;u.next(),h.next()}}static spans(e,t,r,i,s=-1){let l=new hu(e,null,s).goto(t),o=t,u=l.openStart;for(;;){let h=Math.min(l.to,r);if(l.point){let f=l.activeForPoint(l.to),p=l.pointFrom<t?f.length+1:l.point.startSide<0?f.length:Math.min(f.length,u);i.point(o,h,l.point,f,p,l.pointRank),u=Math.min(l.openEnd(h),f.length)}else h>o&&(i.span(o,h,l.active,u),u=l.openEnd(h));if(l.to>r)return u+(l.point&&l.to>r?1:0);o=l.to,l.next()}}static of(e,t=!1){let r=new Di;for(let i of e instanceof FO?[e]:t?Z5(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Be.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Be.empty;i=i.nextLayer)t=new Be(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Be.empty=new Be([],[],null,-1);function Z5(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let r=n[t];if(YO(e,r)>0)return n.slice().sort(YO);e=r}return n}Be.empty.nextLayer=Be.empty;class Di{finishChunk(e){this.chunks.push(new x0(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Di)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(Be.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Be.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function sb(n,e,t){let r=new Map;for(let s of n)for(let l=0;l<s.chunk.length;l++)s.chunk[l].maxPoint<=0&&r.set(s.chunk[l],s.chunkPos[l]);let i=new Set;for(let s of e)for(let l=0;l<s.chunk.length;l++){let o=r.get(s.chunk[l]);o!=null&&(t?t.mapPos(o):o)==s.chunkPos[l]&&!(t!=null&&t.touchesRange(o,o+s.chunk[l].length))&&i.add(s.chunk[l])}return i}class W2{constructor(e,t,r,i=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Fu{constructor(e){this.heap=e}static from(e,t=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let l=e[s];!l.isEmpty;l=l.nextLayer)l.maxPoint>=r&&i.push(new W2(l,t,r,s));return i.length==1?i[0]:new Fu(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)lg(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)lg(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),lg(this.heap,0)}}}function lg(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1<n.length&&i.compare(n[r+1])>=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class hu{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Fu.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Jh(this.active,e),Jh(this.activeTo,e),Jh(this.activeRank,e),this.minActive=ob(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;ef(this.active,t,r),ef(this.activeTo,t,i),ef(this.activeRank,t,s),e&&ef(e,t,this.cursor.from),this.minActive=ob(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Jh(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function lb(n,e,t,r,i,s){n.goto(e),t.goto(r);let l=r+i,o=r,u=r-e,h=!!s.boundChange;for(let f=!1;;){let p=n.to+u-t.to,m=p||n.endSide-t.endSide,O=m<0?n.to+u:t.to,k=Math.min(O,l);if(n.point||t.point?(n.point&&t.point&&y0(n.point,t.point)&&UO(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(o,k,n.point,t.point),f=!1):(f&&s.boundChange(o),k>o&&!UO(n.active,t.active)&&s.compareRange(o,k,n.active,t.active),h&&k<l&&(p||n.openEnd(O)!=t.openEnd(O))&&(f=!0)),O>l)break;o=O,m<=0&&n.next(),m>=0&&t.next()}}function UO(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!y0(n[t],e[t]))return!1;return!0}function Jh(n,e){for(let t=e,r=n.length-1;t<r;t++)n[t]=n[t+1];n.pop()}function ef(n,e,t){for(let r=n.length-1;r>=e;r--)n[r+1]=n[r];n[e]=t}function ob(n,e){let t=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||n[i].endSide-n[t].endSide)<0&&(t=i,r=e[i]);return t}function _r(n,e,t=n.length){let r=0;for(let i=0;i<t&&i<n.length;)n.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Wt(n,i));return r}function GO(n,e,t,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==n.length)break;s+=n.charCodeAt(i)==9?t-s%t:1,i=Wt(n,i)}return r===!0?-1:n.length}const HO="ͼ",ab=typeof Symbol>"u"?"__"+HO:Symbol.for(HO),KO=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),ub=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ds{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(l){return/^@/.test(l)?[l]:l.split(/,\s*/)}function s(l,o,u,h){let f=[],p=/^@(\w+)\b/.exec(l[0]),m=p&&p[1]=="keyframes";if(p&&o==null)return u.push(l[0]+";");for(let O in o){let k=o[O];if(/&/.test(O))s(O.split(/,\s*/).map(b=>l.map(w=>b.replace(/&/,w))).reduce((b,w)=>b.concat(w)),k,u);else if(k&&typeof k=="object"){if(!p)throw new RangeError("The value of a property ("+O+") should be a primitive value.");s(i(O),k,f,m)}else k!=null&&f.push(O.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+k+";")}(f.length||m)&&u.push((r&&!p&&!h?l.map(r):l).join(", ")+" {"+f.join(" ")+"}")}for(let l in e)s(i(l),e[l],this.rules)}getRules(){return this.rules.join(`
72
+ `)}static newName(){let e=ub[ab]||1;return ub[ab]=e+1,HO+e.toString(36)}static mount(e,t,r){let i=e[KO],s=r&&r.nonce;i?s&&i.setNonce(s):i=new X5(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let cb=new Map;class X5{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=cb.get(r);if(s)return e[KO]=s;this.sheet=new i.CSSStyleSheet,cb.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[KO]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let l=0;l<e.length;l++){let o=e[l],u=this.modules.indexOf(o);if(u<s&&u>-1&&(this.modules.splice(u,1),s--,u=-1),u==-1){if(this.modules.splice(s++,0,o),r)for(let h=0;h<o.rules.length;h++)r.insertRule(o.rules[h],i++)}else{for(;s<u;)i+=this.modules[s++].rules.length;i+=o.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let l="";for(let u=0;u<this.modules.length;u++)l+=this.modules[u].getRules()+`
73
+ `;this.styleTag.textContent=l;let o=t.head||t;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Is={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Yu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},B5=typeof navigator<"u"&&/Mac/.test(navigator.platform),W5=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Gt=0;Gt<10;Gt++)Is[48+Gt]=Is[96+Gt]=String(Gt);for(var Gt=1;Gt<=24;Gt++)Is[Gt+111]="F"+Gt;for(var Gt=65;Gt<=90;Gt++)Is[Gt]=String.fromCharCode(Gt+32),Yu[Gt]=String.fromCharCode(Gt);for(var og in Is)Yu.hasOwnProperty(og)||(Yu[og]=Is[og]);function V5(n){var e=B5&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||W5&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Yu:Is)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function st(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;e<arguments.length;e++)V2(n,arguments[e]);return n}function V2(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)V2(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let yn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},JO=typeof document<"u"?document:{documentElement:{style:{}}};const ey=/Edge\/(\d+)/.exec(yn.userAgent),q2=/MSIE \d/.test(yn.userAgent),ty=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(yn.userAgent),Xd=!!(q2||ty||ey),hb=!Xd&&/gecko\/(\d+)/i.test(yn.userAgent),ag=!Xd&&/Chrome\/(\d+)/.exec(yn.userAgent),fb="webkitFontSmoothing"in JO.documentElement.style,ny=!Xd&&/Apple Computer/.test(yn.vendor),db=ny&&(/Mobile\/\w+/.test(yn.userAgent)||yn.maxTouchPoints>2);var ge={mac:db||/Mac/.test(yn.platform),windows:/Win/.test(yn.platform),linux:/Linux|X11/.test(yn.platform),ie:Xd,ie_version:q2?JO.documentMode||6:ty?+ty[1]:ey?+ey[1]:0,gecko:hb,gecko_version:hb?+(/Firefox\/(\d+)/.exec(yn.userAgent)||[0,0])[1]:0,chrome:!!ag,chrome_version:ag?+ag[1]:0,ios:db,android:/Android\b/.test(yn.userAgent),webkit:fb,webkit_version:fb?+(/\bAppleWebKit\/(\d+)/.exec(yn.userAgent)||[0,0])[1]:0,safari:ny,safari_version:ny?+(/\bVersion\/(\d+(\.\d+)?)/.exec(yn.userAgent)||[0,0])[1]:0,tabSize:JO.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function k0(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Kf=Object.create(null);function v0(n,e,t){if(n==e)return!0;n||(n=Kf),e||(e=Kf);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function q5(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function pb(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function F5(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class zr{eq(e){return!1}updateDOM(e,t,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Kt=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(Kt||(Kt={}));class Qe extends _s{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Cc(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Rl(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:l}=F2(e,t);r=(s?t?-3e8:-1:5e8)-1,i=(l?t?2e8:1:-6e8)+1}return new Rl(e,r,i,t,e.widget||null,!0)}static line(e){return new Qc(e)}static set(e,t=!1){return Be.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Qe.none=Be.empty;class Cc extends Qe{constructor(e){let{start:t,end:r}=F2(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?k0(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Kf}eq(e){return this==e||e instanceof Cc&&this.tagName==e.tagName&&v0(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Cc.prototype.point=!1;class Qc extends Qe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Qc&&this.spec.class==e.spec.class&&v0(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Qc.prototype.mapMode=Ht.TrackBefore;Qc.prototype.point=!0;class Rl extends Qe{constructor(e,t,r,i,s,l){super(t,r,s,e),this.block=i,this.isReplace=l,this.mapMode=i?t<=0?Ht.TrackBefore:Ht.TrackAfter:Ht.TrackDel}get type(){return this.startSide!=this.endSide?Kt.WidgetRange:this.startSide<=0?Kt.WidgetBefore:Kt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Rl&&Y5(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Rl.prototype.point=!0;function F2(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function Y5(n,e){return n==e||!!(n&&e&&n.compare(e))}function To(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Uu extends _s{constructor(e,t,r){super(),this.tagName=e,this.attributes=t,this.rank=r}eq(e){return e==this||e instanceof Uu&&this.tagName==e.tagName&&v0(this.attributes,e.attributes)}static create(e){return new Uu(e.tagName,e.attributes||Kf,e.rank==null?50:Math.max(0,Math.min(e.rank,100)))}static set(e,t=!1){return Be.of(e,t)}}Uu.prototype.startSide=Uu.prototype.endSide=-1;function Gu(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function ry(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Mu(n,e){if(!e.anchorNode)return!1;try{return ry(n,e.anchorNode)}catch{return!1}}function Au(n){return n.nodeType==3?Ku(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Ru(n,e,t,r){return t?mb(n,e,t,r,-1)||mb(n,e,t,r,1):!1}function zs(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Jf(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function mb(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Ii(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=zs(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?Ii(n):0}else return!1}}function Ii(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Hu(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function U5(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function Y2(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function G5(n,e,t,r,i,s,l,o){let u=n.ownerDocument,h=u.defaultView||window;for(let f=n,p=!1;f&&!p;)if(f.nodeType==1){let m,O=f==u.body,k=1,b=1;if(O)m=U5(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(p=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let C=f.getBoundingClientRect();({scaleX:k,scaleY:b}=Y2(f,C)),m={left:C.left,right:C.left+f.clientWidth*k,top:C.top,bottom:C.top+f.clientHeight*b}}let w=0,S=0;if(i=="nearest")e.top<m.top+l?(S=e.top-(m.top+l),t>0&&e.bottom>m.bottom+S&&(S=e.bottom-m.bottom+l)):e.bottom>m.bottom-l&&(S=e.bottom-m.bottom+l,t<0&&e.top-S<m.top&&(S=e.top-(m.top+l)));else{let C=e.bottom-e.top,Q=m.bottom-m.top;S=(i=="center"&&C<=Q?e.top+C/2-Q/2:i=="start"||i=="center"&&t<0?e.top-l:e.bottom-Q+l)-m.top}if(r=="nearest"?e.left<m.left+s?(w=e.left-(m.left+s),t>0&&e.right>m.right+w&&(w=e.right-m.right+s)):e.right>m.right-s&&(w=e.right-m.right+s,t<0&&e.left<m.left+w&&(w=e.left-(m.left+s))):w=(r=="center"?e.left+(e.right-e.left)/2-(m.right-m.left)/2:r=="start"==o?e.left-s:e.right-(m.right-m.left)+s)-m.left,w||S)if(O)h.scrollBy(w,S);else{let C=0,Q=0;if(S){let R=f.scrollTop;f.scrollTop+=S/b,Q=(f.scrollTop-R)*b}if(w){let R=f.scrollLeft;f.scrollLeft+=w/k,C=(f.scrollLeft-R)*k}e={left:e.left-C,top:e.top-Q,right:e.right-C,bottom:e.bottom-Q},C&&Math.abs(C-w)<1&&(r="nearest"),Q&&Math.abs(Q-S)<1&&(i="nearest")}if(O)break;(e.top<m.top||e.bottom>m.bottom||e.left<m.left||e.right>m.right)&&(e={left:Math.max(e.left,m.left),right:Math.min(e.right,m.right),top:Math.max(e.top,m.top),bottom:Math.min(e.bottom,m.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function U2(n,e=!0){let t=n.ownerDocument,r=null,i=null;for(let s=n.parentNode;s&&!(s==t.body||(!e||r)&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),e&&!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:r,y:i}}class H5{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?Ii(t):0),r,Math.min(e.focusOffset,r?Ii(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let cl=null;ge.safari&&ge.safari_version>=26&&(cl=!1);function G2(n){if(n.setActive)return n.setActive();if(cl)return n.focus(cl);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(cl==null?{get preventScroll(){return cl={preventScroll:!0},!0}}:void 0),!cl){cl=!1;for(let t=0;t<e.length;){let r=e[t++],i=e[t++],s=e[t++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let gb;function Ku(n,e,t=e){let r=gb||(gb=document.createRange());return r.setEnd(n,t),r.setStart(n,e),r}function jo(n,e,t,r){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,n.dispatchEvent(s);let l=new KeyboardEvent("keyup",i);return l.synthetic=!0,n.dispatchEvent(l),s.defaultPrevented||l.defaultPrevented}function K5(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function J5(n,e){let t=e.focusNode,r=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=r)return!1;for(r=Math.min(r,Ii(t));;)if(r){if(t.nodeType!=1)return!1;let i=t.childNodes[r-1];i.contentEditable=="false"?r--:(t=i,r=Ii(t))}else{if(t==n)return!0;r=zs(t),t=t.parentNode}}function H2(n){return n instanceof Window?n.pageYOffset>Math.max(0,n.document.documentElement.scrollHeight-n.innerHeight-4):n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function K2(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=Ii(t)}else if(t.parentNode&&!Jf(t))r=zs(t),t=t.parentNode;else return null}}function J2(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r<t.nodeValue.length)return{node:t,offset:r};if(t.nodeType==1&&r<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[r],r=0}else if(t.parentNode&&!Jf(t))r=zs(t)+1,t=t.parentNode;else return null}}class Nr{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new Nr(e.parentNode,zs(e),t)}static after(e,t){return new Nr(e.parentNode,zs(e)+1,t)}}var at=(function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n})(at||(at={}));const Nl=at.LTR,b0=at.RTL;function eC(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const eN=eC("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),tN=eC("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),iy=Object.create(null),Ur=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);iy[e]=t,iy[t]=-e}function tC(n){return n<=247?eN[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?tN[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const nN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class li{get dir(){return this.level%2?b0:Nl}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,i){let s=-1;for(let l=0;l<e.length;l++){let o=e[l];if(o.from<=t&&o.to>=t){if(o.level==r)return l;(s<0||(i!=0?i<0?o.from<t:o.to>t:e[s].level>o.level))&&(s=l)}}if(s<0)throw new RangeError("Index out of range");return s}}function nC(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t],i=e[t];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!nC(r.inner,i.inner))return!1}return!0}const ot=[];function rN(n,e,t,r,i){for(let s=0;s<=r.length;s++){let l=s?r[s-1].to:e,o=s<r.length?r[s].from:t,u=s?256:i;for(let h=l,f=u,p=u;h<o;h++){let m=tC(n.charCodeAt(h));m==512?m=f:m==8&&p==4&&(m=16),ot[h]=m==4?2:m,m&7&&(p=m),f=m}for(let h=l,f=u,p=u;h<o;h++){let m=ot[h];if(m==128)h<o-1&&f==ot[h+1]&&f&24?m=ot[h]=f:ot[h]=256;else if(m==64){let O=h+1;for(;O<o&&ot[O]==64;)O++;let k=h&&f==8||O<t&&ot[O]==8?p==1?1:8:256;for(let b=h;b<O;b++)ot[b]=k;h=O-1}else m==8&&p==1&&(ot[h]=1);f=m,m&7&&(p=m)}}}function iN(n,e,t,r,i){let s=i==1?2:1;for(let l=0,o=0,u=0;l<=r.length;l++){let h=l?r[l-1].to:e,f=l<r.length?r[l].from:t;for(let p=h,m,O,k;p<f;p++)if(O=iy[m=n.charCodeAt(p)])if(O<0){for(let b=o-3;b>=0;b-=3)if(Ur[b+1]==-O){let w=Ur[b+2],S=w&2?i:w&4?w&1?s:i:0;S&&(ot[p]=ot[Ur[b]]=S),o=b;break}}else{if(Ur.length==189)break;Ur[o++]=p,Ur[o++]=m,Ur[o++]=u}else if((k=ot[p])==2||k==1){let b=k==i;u=b?0:1;for(let w=o-3;w>=0;w-=3){let S=Ur[w+2];if(S&2)break;if(b)Ur[w+2]|=2;else{if(S&4)break;Ur[w+2]|=4}}}}}function sN(n,e,t,r){for(let i=0,s=r;i<=t.length;i++){let l=i?t[i-1].to:n,o=i<t.length?t[i].from:e;for(let u=l;u<o;){let h=ot[u];if(h==256){let f=u+1;for(;;)if(f==o){if(i==t.length)break;f=t[i++].to,o=i<t.length?t[i].from:e}else if(ot[f]==256)f++;else break;let p=s==1,m=(f<e?ot[f]:r)==1,O=p==m?p?1:2:r;for(let k=f,b=i,w=b?t[b-1].to:n;k>u;)k==w&&(k=t[--b].from,w=b?t[b-1].to:n),ot[--k]=O;u=f}else s=h,u++}}}function sy(n,e,t,r,i,s,l){let o=r%2?2:1;if(r%2==i%2)for(let u=e,h=0;u<t;){let f=!0,p=!1;if(h==s.length||u<s[h].from){let b=ot[u];b!=o&&(f=!1,p=b==16)}let m=!f&&o==1?[]:null,O=f?r:r+1,k=u;e:for(;;)if(h<s.length&&k==s[h].from){if(p)break e;let b=s[h];if(!f)for(let w=b.to,S=h+1;;){if(w==t)break e;if(S<s.length&&s[S].from==w)w=s[S++].to;else{if(ot[w]==o)break e;break}}if(h++,m)m.push(b);else{b.from>u&&l.push(new li(u,b.from,O));let w=b.direction==Nl!=!(O%2);ly(n,w?r+1:r,i,b.inner,b.from,b.to,l),u=b.to}k=b.to}else{if(k==t||(f?ot[k]!=o:ot[k]==o))break;k++}m?sy(n,u,k,r+1,i,m,l):u<k&&l.push(new li(u,k,O)),u=k}else for(let u=t,h=s.length;u>e;){let f=!0,p=!1;if(!h||u>s[h-1].to){let b=ot[u-1];b!=o&&(f=!1,p=b==16)}let m=!f&&o==1?[]:null,O=f?r:r+1,k=u;e:for(;;)if(h&&k==s[h-1].to){if(p)break e;let b=s[--h];if(!f)for(let w=b.from,S=h;;){if(w==e)break e;if(S&&s[S-1].to==w)w=s[--S].from;else{if(ot[w-1]==o)break e;break}}if(m)m.push(b);else{b.to<u&&l.push(new li(b.to,u,O));let w=b.direction==Nl!=!(O%2);ly(n,w?r+1:r,i,b.inner,b.from,b.to,l),u=b.from}k=b.from}else{if(k==e||(f?ot[k-1]!=o:ot[k-1]==o))break;k--}m?sy(n,k,u,r+1,i,m,l):k<u&&l.push(new li(k,u,O)),u=k}}function ly(n,e,t,r,i,s,l){let o=e%2?2:1;rN(n,i,s,r,o),iN(n,i,s,r,o),sN(i,s,r,o),sy(n,i,s,e,t,r,l)}function lN(n,e,t){if(!n)return[new li(0,0,e==b0?1:0)];if(e==Nl&&!t.length&&!nN.test(n))return rC(n.length);if(t.length)for(;n.length>ot.length;)ot[ot.length]=256;let r=[],i=e==Nl?0:1;return ly(n,i,i,t,0,n.length,r),r}function rC(n){return[new li(0,n,0)]}let iC="";function oN(n,e,t,r,i){var s;let l=r.head-n.from,o=li.find(e,l,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),u=e[o],h=u.side(i,t);if(l==h){let m=o+=i?1:-1;if(m<0||m>=e.length)return null;u=e[o=m],l=u.side(!i,t),h=u.side(i,t)}let f=Wt(n.text,l,u.forward(i,t));(f<u.from||f>u.to)&&(f=h),iC=n.text.slice(Math.min(l,f),Math.max(l,f));let p=o==(i?e.length-1:0)?null:e[o+(i?1:-1)];return p&&f==h&&p.level+(i?0:1)<u.level?U.cursor(p.side(!i,t)+n.from,p.forward(i,t)?1:-1,p.level):U.cursor(f+n.from,u.forward(i,t)?-1:1,u.level)}function aN(n,e,t){for(let r=e;r<t;r++){let i=tC(n.charCodeAt(r));if(i==1)return Nl;if(i==2||i==4)return b0}return Nl}const sC=pe.define(),lC=pe.define(),oC=pe.define(),aC=pe.define(),oy=pe.define(),uC=pe.define(),cC=pe.define(),w0=pe.define(),S0=pe.define(),hC=pe.define({combine:n=>n.some(e=>e)}),fC=pe.define({combine:n=>n.some(e=>e)}),dC=pe.define();class Eo{constructor(e,t,r,i,s,l=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=l}map(e){return e.empty?this:new Eo(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Eo(U.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const tf=Re.define({map:(n,e)=>n.map(e)}),pC=Re.define();function Nn(n,e,t){let r=n.facet(aC);r.length?r[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const Ri=pe.define({combine:n=>n.length?n[0]:!0});let uN=0;const Po=pe.define({combine(n){return n.filter((e,t)=>{for(let r=0;r<t;r++)if(n[r].plugin==e.plugin)return!1;return!0})}});class Pt{constructor(e,t,r,i,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Po.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Po.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:s,decorations:l}=t||{};return new Pt(uN++,e,r,i,o=>{let u=[];return l&&u.push(Bd.of(h=>{let f=h.plugin(o);return f?l(f):Qe.none})),s&&u.push(s(o)),u})}static fromClass(e,t){return Pt.define((r,i)=>new e(r,i),t)}}class ug{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Nn(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Nn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Nn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const mC=pe.define(),P0=pe.define(),Bd=pe.define(),gC=pe.define(),C0=pe.define(),$c=pe.define(),OC=pe.define();function Ob(n,e){let t=n.state.facet(OC);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(n):s),i=[];return Be.spans(r,e.from,e.to,{point(){},span(s,l,o,u){let h=s-e.from,f=l-e.from,p=i;for(let m=o.length-1;m>=0;m--,u--){let O=o[m].spec.bidiIsolate,k;if(O==null&&(O=aN(e.text,h,f)),u>0&&p.length&&(k=p[p.length-1]).to==h&&k.direction==O)k.to=f,p=k.inner;else{let b={from:h,to:f,direction:O,inner:[]};p.push(b),p=b.inner}}}}),i}const yC=pe.define();function Q0(n){let e=0,t=0,r=0,i=0;for(let s of n.state.facet(yC)){let l=s(n);l&&(l.left!=null&&(e=Math.max(e,l.left)),l.right!=null&&(t=Math.max(t,l.right)),l.top!=null&&(r=Math.max(r,l.top)),l.bottom!=null&&(i=Math.max(i,l.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Cu=pe.define();class gr{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new gr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(t.length==0)return e;let r=[];for(let i=0,s=0,l=0;;){let o=i<e.length?e[i].fromB:1e9,u=s<t.length?t[s]:1e9,h=Math.min(o,u);if(h==1e9)break;let f=h+l,p=h,m=f;for(;;)if(s<t.length&&t[s]<=p){let O=t[s+1];s+=2,p=Math.max(p,O);for(let k=i;k<e.length&&e[k].fromB<=p;k++)l=e[k].toA-e[k].toB;m=Math.max(m,O+l)}else if(i<e.length&&e[i].fromB<=p){let O=e[i++];p=Math.max(p,O.toB),m=Math.max(m,O.toA),l=O.toA-O.toB}else break;r.push(new gr(f,m,h,p))}return r}}class ed{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Nt.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,l,o,u)=>i.push(new gr(s,l,o,u))),this.changedRanges=i}static create(e,t,r){return new ed(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const cN=[];class St{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return cN}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&q5(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let r=t;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let r=zs(this.dom),i=this.length?e>0:t>0;return new Nr(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Vd)return e;return null}static get(e){return e.cmTile}}class Wd extends St{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,r=null,i,s=(e==null?void 0:e.node)==t?e:null,l=0;for(let o of this.children){if(o.sync(e),l+=o.length+o.breakAfter,i=r?r.nextSibling:t.firstChild,s&&i!=o.dom&&(s.written=!0),o.dom.parentNode==t)for(;i&&i!=o.dom;)i=yb(i);else t.insertBefore(o.dom,i);r=o.dom}for(i=r?r.nextSibling:t.firstChild,s&&i&&(s.written=!0);i;)i=yb(i);this.length=l}}function yb(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Vd extends Wd{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=St.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,i=t.pop()}else{let l=r.children[i++];if(l instanceof Ni)t.push(i),r=l,i=0;else{let o=s+l.length,u=e(l,s);if(u!==void 0)return u;s=o+l.breakAfter}}}resolveBlock(e,t){let r,i=-1,s,l=-1;if(this.blockTiles((o,u)=>{let h=u+o.length;if(e>=u&&e<=h){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(r=void 0)}(u<e||e==h&&(t<-1?o.length:o.covers(1)))&&(!r||!o.isWidget()&&r.isWidget())&&(r=o,i=e-u),(h>e||e==u&&(t>1?o.length:o.covers(-1)))&&(!s||!o.isWidget()&&s.isWidget())&&(s=o,l=e-u)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&t<0||!s?{tile:r,offset:i}:{tile:s,offset:l}}}class Ni extends Wd{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,t){let r=new Ni(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class Ho extends Wd{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let i=new Ho(t||document.createElement("div"),e);return(!t||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,r){let i=null,s=-1,l=null,o=-1;function u(f,p){for(let m=0,O=0;m<f.children.length&&O<=p;m++){let k=f.children[m],b=O+k.length;b>=p&&(k.isComposite()?u(k,p-O):(!l||l.isHidden&&(t>0||r&&fN(l,k)))&&(b>p||k.flags&32)?(l=k,o=p-O):(O<p||k.flags&16&&!k.isHidden)&&(i=k,s=p-O)),O=b}}u(this,e);let h=(t<0?i:l)||i||l;return h?{tile:h,offset:h==i?s:o}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):hN(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new Nr(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:t);let l=r.tile.parent,o=!1;for(let u of l.children){if(o)return new Nr(u.dom,0);u==r.tile&&(o=!0)}}return new Nr(this.dom,0)}}function hN(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=Au(e);return t[t.length-1]||null}function fN(n,e){let t=n.coordsIn(0,1),r=e.coordsIn(0,1);return t&&r&&r.top<t.bottom}class Rn extends Wd{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new Rn(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class Ol extends St{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,l=0;e==0&&t<0||e==r&&t>=0?ge.chrome||ge.gecko||(e?(i--,l=1):s<r&&(s++,l=-1)):t<0?i--:s<r&&s++;let o=Ku(this.dom,i,s).getClientRects();if(!o.length)return null;let u=o[(l?l<0:t>=0)?0:o.length-1];return ge.safari&&!l&&u.width==0&&(u=Array.prototype.find.call(o,h=>h.width)||u),l?Hu(u,l<0):u||null}static of(e,t){let r=new Ol(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class Ll extends St{constructor(e,t,r,i){super(e,t,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;if(r)return Hu(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),l=null;if(!s.length)return null;let o=this.flags&16?!0:this.flags&32?!1:e>0;for(let u=o?s.length-1:0;l=s[u],!(e>0?u==0:u==s.length-1||l.top<l.bottom);u+=o?-1:1);return Hu(l,!o)}}get overrideDOMText(){if(!this.length)return Ye.empty;let{root:e}=this;if(!e)return Ye.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,i,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new Ll(s,r,e,i)}}class td extends St{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Ye.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class dN{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:i,index:s,beforeBreak:l,parents:o}=this;for(;e||t>0;)if(i.isComposite())if(l){if(!e)break;r&&r.break(),e--,l=!1}else if(s==i.children.length){if(!e&&!o.length)break;r&&r.leave(i),l=!!i.breakAfter,{tile:i,index:s}=o.pop(),s++}else{let u=i.children[s],h=u.breakAfter;(t>0?u.length<=e:u.length<e)&&(!r||r.skip(u,0,u.length)!==!1||!u.isComposite)?(l=!!h,s++,e-=u.length):(o.push({tile:i,index:s}),i=u,s=0,r&&u.isComposite()&&r.enter(u))}else if(s==i.length)l=!!i.breakAfter,{tile:i,index:s}=o.pop(),s++;else if(e){let u=Math.min(e,i.length-s);r&&r.skip(i,s,s+u),e-=u,s+=u}else break;return this.tile=i,this.index=s,this.beforeBreak=l,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class pN{constructor(e,t,r,i){this.from=e,this.to=t,this.wrapper=r,this.rank=i}}class mN{constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,i){var s;this.flushBuffer();let l=this.ensureMarks(t,r),o=l.lastChild;if(o&&o.isText()&&!(o.flags&8)&&o.length+e.length<512){this.cache.reused.set(o,2);let u=l.children[l.children.length-1]=new Ol(o.dom,o.text+e);u.parent=l}else l.append(i||Ol.of(e,(s=this.cache.find(Ol))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?cg(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let i=r;for(let o=t.marks.length-1;o>=0;o--){let u=t.marks[o],h=i.lastChild;if(h instanceof Rn&&h.mark.eq(u.mark))h.dom!=u.dom&&h.setDOM(cg(u.dom)),i=h;else{if(this.cache.reused.get(u)){let p=St.get(u.dom);p&&p.setDOM(cg(u.dom))}let f=Rn.of(u.mark,u.dom);i.append(f),i=f}this.cache.reused.set(u,2)}let s=St.get(e.text);s&&this.cache.reused.set(s,2);let l=new Ol(e.text,e.text.nodeValue);l.flags|=8,this.pos=e.range.toB,i.append(l)}addInlineWidget(e,t,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(t,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=xC);let i=Ho.start(e,t||((r=this.cache.find(Ho))===null||r===void 0?void 0:r.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let l=e[s],o;if(t>0&&(o=i.lastChild)&&o instanceof Rn&&o.mark.eq(l))i=o,t--;else{let u=Rn.of(l,(r=this.cache.find(Rn,h=>h.mark.eq(l)))===null||r===void 0?void 0:r.dom);i.append(u),i=u,t=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!xb(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(ge.ios&&xb(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(hg,0,32)||new Ll(hg.toDOM(),0,hg,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,r=new pN(e.from,e.to,e.value,t),i=this.wrappers.length;for(;i>0&&(this.wrappers[i-1].rank-r.rank||this.wrappers[i-1].to-r.to)<0;)i--;this.wrappers.splice(i,0,r)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let i=t.lastChild;if(r.from<this.pos&&i instanceof Ni&&i.wrapper.eq(r.wrapper))t=i;else{let s=Ni.of(r.wrapper,(e=this.cache.find(Ni,l=>l.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find(td,void 0,1);return r&&(r.flags=t),r||new td(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class gN{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:l}=this.cursor.next(this.skipCount);if(this.skipCount=0,l)throw new Error("Ran out of text content when drawing inline views");this.text=i;let o=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,o)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const nd=[Ll,Ho,Ol,Rn,td,Ni,Vd];for(let n=0;n<nd.length;n++)nd[n].bucket=n;class ON{constructor(e){this.view=e,this.buckets=nd.map(()=>[]),this.index=nd.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let i=e.bucket,s=this.buckets[i],l=this.index[i];for(let o=s.length-1;o>=0;o--){let u=(o+l)%s.length,h=s[u];if((!t||t(h))&&!this.reused.has(h))return s.splice(u,1),u<l&&this.index[i]--,this.reused.set(h,r),h}return null}findWidget(e,t,r){let i=this.buckets[0];if(i.length)for(let s=0,l=0;;s++){if(s==i.length){if(l)return null;l=1,s=0}let o=i[s];if(!this.reused.has(o)&&(l==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==r?(this.reused.set(o,1),o):(this.reused.set(o,2),new Ll(o.dom,t,e,o.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class yN{constructor(e,t,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new ON(e),this.text=new gN(e.state.doc),this.builder=new mN(this.cache,new Vd(e,e.contentDOM),Be.iter(r)),this.cache.reused.set(t,2),this.old=new dN(t),this.reuseWalker={skip:(l,o,u)=>{if(this.cache.add(l),l.isComposite())return!1},enter:l=>this.cache.add(l),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let i=0,s=0,l=0;;){let o=l<e.length?e[l++]:null,u=o?o.fromA:this.old.root.length;if(u>i){let h=u-i;this.preserve(h,!l,!o),i=u,s+=h}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(s,o.toB)),s=o.toB,i=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let i=vN(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(l,o,u)=>{if(l.isWidget())if(this.openWidget)this.builder.continueWidget(u-o);else{let h=u>0||o<l.length?Ll.of(l.widget,this.view,u-o,l.flags&496,this.cache.maybeReuse(l)):this.cache.reuse(l);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,i,s),s=i.length)}else if(l.isText())this.builder.ensureLine(null),!o&&u==l.length&&!this.cache.reused.has(l)?this.builder.addText(l.text,i,s,this.cache.reuse(l)):(this.cache.add(l),this.builder.addText(l.text.slice(o,u),i,s)),s=i.length;else if(l.isLine())l.flags&=-2,this.cache.reused.set(l,1),this.builder.addLine(l);else if(l instanceof td)this.cache.add(l);else if(l instanceof Rn)this.builder.ensureLine(null),this.builder.addMark(l,i,s),this.cache.reused.set(l,1),s=i.length;else return!1;this.openWidget=!1},enter:l=>{l.isLine()?this.builder.addLineStart(l.attrs,this.cache.maybeReuse(l)):(this.cache.add(l),l instanceof Rn&&i.unshift(l.mark)),this.openWidget=!1},leave:l=>{l.isLine()?i.length&&(i.length=s=0):l instanceof Rn&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,i=this.builder,s=0,l=Be.spans(this.decorations,e,t,{point:(o,u,h,f,p,m)=>{if(h instanceof Rl){if(this.disallowBlockEffectsFor[m]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(u>this.view.state.doc.lineAt(o).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=f.length,p>f.length)i.continueWidget(u-o);else{let O=h.widget||(h.block?Ko.block:Ko.inline),k=xN(h),b=this.cache.findWidget(O,u-o,k)||Ll.of(O,this.view,u-o,k);h.block?(h.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(b)):(i.ensureLine(r),i.addInlineWidget(b,f,p))}r=null}else r=kN(r,h);u>o&&this.text.skip(u-o)},span:(o,u,h,f)=>{for(let p=o;p<u;){let m=this.text.next(Math.min(512,u-p));m==null?(i.addLineStartIfNotCovered(r),i.addBreak(),p++):(i.ensureLine(r),i.addText(m,h,p==o?f:h.length),p+=m.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=l>s,this.openMarks=l}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=St.get(i);if(i==this.view.contentDOM)break;s instanceof Rn?t.push(s):s!=null&&s.isLine()?r=s:s instanceof Ni||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Ho(i,xC):r||t.push(Rn.of(new Cc({tagName:i.nodeName.toLowerCase(),attributes:F5(i)}),i)))}return{line:r,marks:t}}}function xb(n,e){let t=r=>{for(let i of r.children)if((e?i.isText():i.length)||t(i))return!0;return!1};return t(n)}function xN(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const xC={class:"cm-line"};function kN(n,e){let t=e.spec.attributes,r=e.spec.class;return!t&&!r||(n||(n={class:"cm-line"}),t&&k0(t,n),r&&(n.class+=" "+r)),n}function vN(n){let e=[];for(let t=n.parents.length;t>1;t--){let r=t==n.parents.length?n.tile:n.parents[t].tile;r instanceof Rn&&e.push(r.mark)}return e}function cg(n){let e=St.get(n);return e&&e.setDOM(n.cloneNode()),n}class Ko extends zr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ko.inline=new Ko("span");Ko.block=new Ko("div");const hg=new class extends zr{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class kb{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Qe.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Vd(e,e.contentDOM),this.updateInner([new gr(0,0,0,e.state.doc.length)],null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:f,toA:p})=>p<this.minWidthFrom||f>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!jN(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?wN(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:f,to:p}=this.hasComposition;r=new gr(f,p,e.changes.mapPos(f,-1),e.changes.mapPos(p,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(ge.ie||ge.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let l=this.decorations,o=this.blockWrappers;this.updateDeco();let u=CN(l,this.decorations,e.changes);u.length&&(r=gr.extendWithRanges(r,u));let h=$N(o,this.blockWrappers,e.changes);return h.length&&(r=gr.extendWithRanges(r,h)),s&&!r.some(f=>f.fromA<=s.range.fromA&&f.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let l=this.tile,o=new yN(this.view,l,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&St.get(t.text)&&o.cache.reused.set(St.get(t.text),2),this.tile=o.run(e,t),ay(l,o.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=ge.chrome||ge.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof fg&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(pC)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,l=!s&&!(this.view.state.facet(Ri)||r.tabIndex>-1)&&Mu(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||l))return;let o=this.forceSelection;this.forceSelection=!1;let u=this.view.state.selection.main,h,f;if(u.empty?f=h=this.inlineDOMNearPos(u.anchor,u.assoc||1):(f=this.inlineDOMNearPos(u.head,u.head==u.from?1:-1),h=this.inlineDOMNearPos(u.anchor,u.anchor==u.from?1:-1)),ge.gecko&&u.empty&&!this.hasComposition&&bN(h)){let m=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(m,h.node.childNodes[h.offset]||null)),h=f=new Nr(m,0),o=!0}let p=this.view.observer.selectionRange;(o||!p.focusNode||(!Ru(h.node,h.offset,p.anchorNode,p.anchorOffset)||!Ru(f.node,f.offset,p.focusNode,p.focusOffset))&&!this.suppressWidgetCursorChange(p,u))&&(this.view.observer.ignore(()=>{ge.android&&ge.chrome&&r.contains(p.focusNode)&&TN(p.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let m=Gu(this.view.root);if(m)if(u.empty){if(ge.gecko){let O=SN(h.node,h.offset);if(O&&O!=3){let k=(O==1?K2:J2)(h.node,h.offset);k&&(h=new Nr(k.node,k.offset))}}m.collapse(h.node,h.offset),u.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=u.bidiLevel)}else if(m.extend){m.collapse(h.node,h.offset);try{m.extend(f.node,f.offset)}catch{}}else{let O=document.createRange();u.anchor>u.head&&([h,f]=[f,h]),O.setEnd(f.node,f.offset),O.setStart(h.node,h.offset),m.removeAllRanges(),m.addRange(O)}l&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(h,f)),this.impreciseAnchor=h.precise?null:new Nr(p.anchorNode,p.anchorOffset),this.impreciseHead=f.precise?null:new Nr(p.focusNode,p.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ru(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Gu(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let l=this.lineAt(t.head,t.assoc);if(!l)return;let o=l.posAtStart;if(t.head==o||t.head==o+l.length)return;let u=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!u||!h||u.bottom>h.top)return;let f=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(f.node,f.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=t.from&&r.collapse(i,s)}posFromDOM(e,t){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[t];else{let l=Ii(e)==0?0:t==0?-1:1;for(;;){let o=e.parentNode;if(o==r.dom)break;l==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?l=-1:l=1),e=o}l<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!St.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let l=0,o=i;;l++){let u=r.children[l];if(u.dom==s)return o;o+=u.length+u.breakAfter}}else return r.isText()?e==r.dom?i+t:i+(t?r.length:0):i}domAtPos(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(i,t)}inlineDOMNearPos(e,t){let r,i=-1,s=!1,l,o=-1,u=!1;return this.tile.blockTiles((h,f)=>{if(h.isWidget()){if(h.flags&32&&f>=e)return!0;h.flags&16&&(s=!0)}else{let p=f+h.length;if(f<=e&&(r=h,i=e-f,s=p<e),p>=e&&!l&&(l=h,o=e-f,u=f>e),f>e&&l)return!0}}),!r&&!l?this.domAtPos(e,t):(s&&l?r=null:u&&r&&(l=null),r&&t<0||!l?r.domIn(i,t):l.domIn(o,t))}coordsAt(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof fg?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function i(s,l){if(s.isComposite())for(let o of s.children){if(o.length>=l){let u=i(o,l);if(u)return u}if(l-=o.length,l<0)break}else if(s.isText()&&l<s.length){let o=Wt(s.text,l);if(o==l)return null;let u=Ku(s.dom,l,o).getClientRects();for(let h=0;h<u.length;h++){let f=u[h];if(h==u.length-1||f.top<f.bottom&&f.left<f.right)return f}}return null}return i(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,l=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,u=this.view.textDirection==at.LTR,h=0,f=(p,m,O)=>{for(let k=0;k<p.children.length&&!(m>i);k++){let b=p.children[k],w=m+b.length,S=b.dom.getBoundingClientRect(),{height:C}=S;if(O&&!k&&(h+=S.top-O.top),b instanceof Ni)w>r&&f(b,m,S);else if(m>=r&&(h>0&&t.push(-h),t.push(C+h),h=0,l)){let Q=b.dom.lastChild,R=Q?Au(Q):[];if(R.length){let I=R[R.length-1],j=u?I.right-S.left:S.right-I.left;j>o&&(o=j,this.minWidth=s,this.minWidthFrom=m,this.minWidthTo=w)}}O&&k==p.children.length-1&&(h+=O.bottom-S.bottom),m=w+b.breakAfter}};return f(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?at.RTL:at.LTR}measureTextSize(){let e=this.tile.blockTiles(l=>{if(l.isLine()&&l.children.length&&l.length<=20){let o=0,u;for(let h of l.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let f=Au(h.dom);if(f.length!=1)return;o+=f[0].width,u=f[0].height}if(o)return{lineHeight:l.dom.getBoundingClientRect().height,charWidth:o/l.length,textHeight:u}}});if(e)return e;let t=document.createElement("div"),r,i,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let l=Au(t.firstChild)[0];r=t.getBoundingClientRect().height,i=l&&l.width?l.width/27:7,s=l&&l.height?l.height:r,t.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],l=s?s.from-1:this.view.state.doc.length;if(l>r){let o=(t.lineBlockAt(l).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Qe.replace({widget:new fg(o),block:!0,inclusive:!0,isBlockGap:!0}).range(r,l))}if(!s)break;r=s.to+1}return Qe.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Bd).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(C0).map((s,l)=>{let o=typeof s=="function";return o&&(r=!0),o?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(Be.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(gC).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){var t;if(e.isSnapshot){let f=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=f.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let f of this.view.state.facet(dC))try{if(f(this.view,e.range,e))return!0}catch(p){Nn(this.view.state,p,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,(t=r.assoc)!==null&&t!==void 0?t:r.empty?0:r.head>r.anchor?-1:1),s;if(!i)return;!r.empty&&(s=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let l=Q0(this.view),o={left:i.left-l.left,top:i.top-l.top,right:i.right+l.right,bottom:i.bottom+l.bottom},{offsetWidth:u,offsetHeight:h}=this.view.scrollDOM;if(G5(this.view.scrollDOM,o,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,u),-u),Math.max(Math.min(e.yMargin,h),-h),this.view.textDirection==at.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let f=this.view.docView.lineAt(r.head,1);f&&f.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=r=>r.isWidget()||r.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){ay(this.tile)}}function ay(n,e){let t=e==null?void 0:e.get(n);if(t!=1){t==null&&n.destroy();for(let r of n.children)ay(r,e)}}function bN(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function kC(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let r=K2(t.focusNode,t.focusOffset),i=J2(t.focusNode,t.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let o=St.get(i.node);if(!o||o.isText()&&o.text!=i.node.nodeValue)s=i;else if(n.docView.lastCompositionAfterCursor){let u=St.get(r.node);!u||u.isText()&&u.text!=r.node.nodeValue||(s=i)}}if(n.docView.lastCompositionAfterCursor=s!=r,!s)return null;let l=e-s.offset;return{from:l,to:l+s.node.nodeValue.length,node:s.node}}function wN(n,e,t){let r=kC(n,t);if(!r)return null;let{node:i,from:s,to:l}=r,o=i.nodeValue;if(/[\n\r]/.test(o)||n.state.doc.sliceString(r.from,r.to)!=o)return null;let u=e.invertedDesc;return{range:new gr(u.mapPos(s),u.mapPos(l),s,l),text:i}}function SN(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let PN=class{constructor(){this.changes=[]}compareRange(e,t){To(e,t,this.changes)}comparePoint(e,t){To(e,t,this.changes)}boundChange(e){To(e,e,this.changes)}};function CN(n,e,t){let r=new PN;return Be.compare(n,e,t,r),r.changes}class QN{constructor(){this.changes=[]}compareRange(e,t){To(e,t,this.changes)}comparePoint(){}boundChange(e){To(e,e,this.changes)}}function $N(n,e,t){let r=new QN;return Be.compare(n,e,t,r),r.changes}function TN(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function jN(n,e){let t=!1;return e&&n.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(t=!0)}),t}class fg extends zr{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function EN(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),s=e-i.from;if(i.length==0)return U.cursor(e);s==0?t=1:s==i.length&&(t=-1);let l=s,o=s;t<0?l=Wt(i.text,s,!1):o=Wt(i.text,s);let u=r(i.text.slice(l,o));for(;l>0;){let h=Wt(i.text,l,!1);if(r(i.text.slice(h,l))!=u)break;l=h}for(;o<i.length;){let h=Wt(i.text,o);if(r(i.text.slice(o,h))!=u)break;o=h}return U.range(l+i.from,o+i.from)}function MN(n,e,t,r,i){let s=Math.round((r-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let o=n.viewState.heightOracle.textHeight,u=Math.floor((i-t.top-(n.defaultLineHeight-o)*.5)/o);s+=u*n.viewState.heightOracle.lineLength}let l=n.state.sliceDoc(t.from,t.to);return t.from+GO(l,s,n.state.tabSize)}function uy(n,e,t){let r=n.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Kt.Text&&(i.type!=s.type||(t<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function AN(n,e,t,r){let i=uy(n,e.head,e.assoc||-1),s=!r||i.type!=Kt.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let l=n.dom.getBoundingClientRect(),o=n.textDirectionAt(i.from),u=n.posAtCoords({x:t==(o==at.LTR)?l.right-1:l.left+1,y:(s.top+s.bottom)/2});if(u!=null)return U.cursor(u,t?-1:1)}return U.cursor(t?i.to:i.from,t?-1:1)}function vb(n,e,t,r){let i=n.state.doc.lineAt(e.head),s=n.bidiSpans(i),l=n.textDirectionAt(i.from);for(let o=e,u=null;;){let h=oN(i,s,l,o,t),f=iC;if(!h){if(i.number==(t?n.state.doc.lines:1))return o;f=`
74
+ `,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),h=n.visualLineSide(i,!t)}if(u){if(!u(f))return o}else{if(!r)return h;u=r(f)}o=h}}function RN(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let l=r(s);return i==Ot.Space&&(i=l),i==l}}function NN(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return U.cursor(i,e.assoc);let l=e.goalColumn,o,u=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(i,e.assoc||((e.empty?t:e.head==e.from)?1:-1)),f=n.documentTop;if(h)l==null&&(l=h.left-u.left),o=s<0?h.top:h.bottom;else{let k=n.viewState.lineBlockAt(i);l==null&&(l=Math.min(u.right-u.left,n.defaultCharacterWidth*(i-k.from))),o=(s<0?k.top:k.bottom)+f}let p=u.left+l,m=n.viewState.heightOracle.textHeight>>1,O=r??m;for(let k=0;;k+=m){let b=o+(O+k)*s,w=cy(n,{x:p,y:b},!1,s);if(t?b>u.bottom:b<u.top)return U.cursor(w.pos,w.assoc);let S=n.coordsAtPos(w.pos,w.assoc),C=S?(S.top+S.bottom)/2:0;if(!S||(t?C>o:C<o))return U.cursor(w.pos,w.assoc,void 0,l)}}function Nu(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,l,o)=>{if(e>s&&e<l){let u=r||t||(e-s<l-e?-1:1);e=u<0?s:l,r=u}});if(!r)return e}}function vC(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let l=Nu(n,i.from,0);l!=i.from&&(s=U.cursor(l,-1))}else{let l=Nu(n,i.from,-1),o=Nu(n,i.to,1);(l!=i.from||o!=i.to)&&(s=U.range(i.from==i.anchor?l:o,i.from==i.head?l:o))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?U.create(t,e.mainIndex):e}function dg(n,e,t){let r=Nu(n.state.facet($c).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:U.cursor(r,r<t.from?1:-1)}class si{constructor(e,t){this.pos=e,this.assoc=t}}function cy(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:l,y:o}=e,u=o-s,h;for(;;){if(u<0)return new si(0,1);if(u>n.viewState.docHeight)return new si(n.state.doc.length,-1);if(h=n.elementAtHeight(u),r==null)break;if(h.type==Kt.Text){if(r<0?h.to<n.viewport.from:h.from>n.viewport.to)break;let m=n.docView.coordsAt(r<0?h.from:h.to,r>0?-1:1);if(m&&(r<0?m.top<=u+s:m.bottom>=u+s))break}let p=n.viewState.heightOracle.textHeight/2;u=r>0?h.bottom+p:h.top-p}if(n.viewport.from>=h.to||n.viewport.to<=h.from){if(t)return null;if(h.type==Kt.Text){let p=MN(n,i,h,l,o);return new si(p,p==h.from?1:-1)}}if(h.type!=Kt.Text)return u<(h.top+h.bottom)/2?new si(h.from,1):new si(h.to,-1);let f=n.docView.lineAt(h.from,2);return(!f||f.length!=h.length)&&(f=n.docView.lineAt(h.from,-2)),new LN(n,l,o,n.textDirectionAt(h.from)).scanTile(f,h.from)}class LN{constructor(e,t,r,i){this.view=e,this.x=t,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[li.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[li.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t,r=!1){let i=0,s=e.length-1,l=new Set,o=this.bidiIn(e[0],e[s]),u,h,f=-1,p=1e9,m;e:for(;i<s;){let k=s-i,b=i+s>>1;t:if(l.has(b)){let S=i+Math.floor(Math.random()*k);for(let C=0;C<k;C++){if(!l.has(S)){b=S;break t}S++,S==s&&(S=i)}break e}l.add(b);let w=t(b);if(w)for(let S=0;S<w.length;S++){let C=w[S],Q=0;if(!(C.width==0&&w.length>1)){if(C.bottom<this.y)(!u||u.bottom<C.bottom)&&(u=C),Q=1;else if(C.top>this.y)(!h||h.top>C.top)&&(h=C),Q=-1;else{let R=C.left>this.x?this.x-C.left:C.right<this.x?this.x-C.right:0,I=Math.abs(R);I<p&&(f=b,p=I,m=C),R&&(Q=R<0==(this.baseDir==at.LTR)?-1:1)}Q==-1&&(!o||this.baseDirAt(e[b],1))?s=b:Q==1&&(!o||this.baseDirAt(e[b+1],-1))&&(i=b+1)}}}if(!m){let k=u&&(!h||this.y-u.bottom<h.top-this.y)?u:h;return this.y=(k.top+k.bottom)/2,this.scan(e,t,!0)}if(p&&!r){let{top:k,bottom:b}=m;if(u&&u.bottom>(k+k+b)/3)return this.y=u.bottom-1,this.scan(e,t,!0);if(h&&h.top<(k+b+b)/3)return this.y=h.top+1,this.scan(e,t,!0)}let O=(o?this.dirAt(e[f],1):this.baseDir)==at.LTR;return{i:f,after:this.x>(m.left+m.right)/2==O}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=Wt(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let l=r[s]-t,o=r[s+1]-t;return Ku(e.dom,l,o).getClientRects()});return i.after?new si(r[i.i+1],-1):new si(r[i.i],1)}scanTile(e,t){if(!e.length)return new si(t,1);if(e.children.length==1){let o=e.children[0];if(o.isText())return this.scanText(o,t);if(o.isComposite())return this.scanTile(o,t)}let r=[t];for(let o=0,u=t;o<e.children.length;o++)r.push(u+=e.children[o].length);let i=this.scan(r,o=>{let u=e.children[o];return u.flags&48?null:(u.dom.nodeType==1?u.dom:Ku(u.dom,0,u.length)).getClientRects()}),s=e.children[i.i],l=r[i.i];return s.isText()?this.scanText(s,l):s.isComposite()?this.scanTile(s,l):i.after?new si(r[i.i+1],-1):new si(l,1)}}const vo="￿";class _N{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Ve.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=vo}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let l=St.get(i),o=i.nextSibling;if(o==t){l!=null&&l.breakAfter&&!o&&r!=this.view.contentDOM&&this.lineBreak();break}let u=St.get(o);(l&&u?l.breakAfter:(l?l.breakAfter:Jf(i))||Jf(o)&&(i.nodeName!="BR"||l!=null&&l.isWidget())&&this.text.length>s)&&!IN(o,t)&&this.lineBreak(),i=o}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,l=1,o;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),l=this.lineSeparator.length):(o=i.exec(t))&&(s=o.index,l=o[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),l>1)for(let u of this.points)u.node==e&&u.pos>this.text.length&&(u.pos-=l-1);r=s+l}}readNode(e){let t=St.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(DN(e,r.node,r.offset)?t:0))}}function DN(n,e,t){for(;;){if(!e||t<Ii(e))return!1;if(e==n)return!0;t=zs(e)+1,e=e.parentNode}}function IN(n,e){let t;for(;!(n==e||!n);n=n.nextSibling){let r=St.get(n);if(!(r!=null&&r.isWidget()))return!1;r&&(t||(t=[])).push(r)}if(t)for(let r of t){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class bb{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class zN{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:l}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=bC(e.docView.tile,t,r,0))){let u=s||l?[]:XN(e),h=new _N(u,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=BN(u,this.bounds.from)}else{let u=e.observer.selectionRange,h=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!ry(e.contentDOM,u.focusNode)?o.main.head:e.docView.posFromDOM(u.focusNode,u.focusOffset),f=l&&l.node==u.anchorNode&&l.offset==u.anchorOffset||!ry(e.contentDOM,u.anchorNode)?o.main.anchor:e.docView.posFromDOM(u.anchorNode,u.anchorOffset),p=e.viewport;if((ge.ios||ge.chrome)&&o.main.empty&&h!=f&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(h,f),O=Math.max(h,f),k=p.from-m,b=p.to-O;(k==0||k==1||m==0)&&(b==0||b==-1||O==e.state.doc.length)&&(h=0,f=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(U.range(f,h));else if(e.lineWrapping&&f==h&&!(o.main.empty&&o.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(h,-1),O=0;m&&(O=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=U.create([U.cursor(h,O)])}else this.newSel=U.single(f,h)}}}function bC(n,e,t,r){if(n.isComposite()){let i=-1,s=-1,l=-1,o=-1;for(let u=0,h=r,f=r;u<n.children.length;u++){let p=n.children[u],m=h+p.length;if(h<e&&m>t)return bC(p,e,t,h);if(m>=e&&i==-1&&(i=u,s=h),h>t&&p.dom.parentNode==n.dom){l=u,o=f;break}f=m,h=m+p.breakAfter}return{from:s,to:o<0?r+n.length:o,startDOM:(i?n.children[i-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:l<n.children.length&&l>=0?n.children[l].dom:null}}else return n.isText()?{from:r,to:r+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function wC(n,e){let t,{newSel:r}=e,{state:i}=n,s=i.selection.main,l=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:u}=e.bounds,h=s.from,f=null;(l===8||ge.android&&e.text.length<u-o)&&(h=s.to,f="end");let p=i.doc.sliceString(o,u,vo),m,O;!s.empty&&s.from>=o&&s.to<=u&&(e.typeOver||p!=e.text)&&p.slice(0,s.from-o)==e.text.slice(0,s.from-o)&&p.slice(s.to-o)==e.text.slice(m=e.text.length-(p.length-(s.to-o)))?t={from:s.from,to:s.to,insert:Ye.of(e.text.slice(s.from-o,m).split(vo))}:(O=SC(p,e.text,h-o,f))&&(ge.chrome&&l==13&&O.toB==O.from+2&&e.text.slice(O.from,O.toB)==vo+vo&&O.toB--,t={from:o+O.from,to:o+O.toA,insert:Ye.of(e.text.slice(O.from,O.toB).split(vo))})}else r&&(!n.hasFocus&&i.facet(Ri)||rd(r,s))&&(r=null);if(!t&&!r)return!1;if((ge.mac||ge.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=U.single(r.main.anchor-1,r.main.head-1)),t={from:t.from,to:t.to,insert:Ye.of([t.insert.toString().replace("."," ")])}):i.doc.lineAt(s.from).to<s.to&&n.docView.lineHasWidget(s.to)&&n.inputState.insertingTextAt>Date.now()-50?t={from:s.from,to:s.to,insert:i.toText(n.inputState.insertingText)}:ge.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
75
+ `&&n.lineWrapping&&(r&&(r=U.single(r.main.anchor-1,r.main.head-1)),t={from:s.from,to:s.to,insert:Ye.of([" "])}),t)return $0(n,t,r,l);if(r&&!rd(r,s)){let o=!1,u="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),u=n.inputState.lastSelectionOrigin,u=="select.pointer"&&(r=vC(i.facet($c).map(h=>h(n)),r))),n.dispatch({selection:r,scrollIntoView:o,userEvent:u}),!0}else return!1}function $0(n,e,t,r=-1){if(ge.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(ge.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&jo(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&jo(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&jo(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let l,o=()=>l||(l=ZN(n,e,t));return n.state.facet(uC).some(u=>u(n,e.from,e.to,s,o))||n.dispatch(o()),!0}function ZN(n,e,t){let r,i=n.state,s=i.selection.main,l=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let u=e.from<s.from?-1:1,h=u<0?s.from:s.to,f=Nu(i.facet($c).map(p=>p(n)),h,u);e.from==f&&(l=f)}if(l>-1)r={changes:e,selection:U.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let u=s.from<e.from?i.sliceDoc(s.from,e.from):"",h=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(u+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let u=i.changes(e),h=t&&t.main.to<=u.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let f=n.state.sliceDoc(e.from,e.to),p,m=t&&kC(n,t.main.head);if(m){let k=e.insert.length-(e.to-e.from);p={from:m.from,to:m.to-k}}else p=n.state.doc.lineAt(s.head);let O=s.to-e.to;r=i.changeByRange(k=>{if(k.from==s.from&&k.to==s.to)return{changes:u,range:h||k.map(u)};let b=k.to-O,w=b-f.length;if(n.state.sliceDoc(w,b)!=f||b>=p.from&&w<=p.to)return{range:k};let S=i.changes({from:w,to:b,insert:e.insert}),C=k.to-s.to;return{changes:S,range:h?U.range(Math.max(0,h.anchor+C),Math.max(0,h.head+C)):k.map(S)}})}else r={changes:u,selection:h&&i.selection.replaceRange(h)}}let o="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,o+=".compose",n.inputState.compositionFirstChange&&(o+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:o,scrollIntoView:!0})}function SC(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let l=n.length,o=e.length;for(;l>0&&o>0&&n.charCodeAt(l-1)==e.charCodeAt(o-1);)l--,o--;if(r=="end"){let u=Math.max(0,s-Math.min(l,o));t-=l+u-s}if(l<s&&n.length<e.length){let u=t<=s&&t>=l?s-t:0;s-=u,o=s+(o-l),l=s}else if(o<s){let u=t<=s&&t>=o?s-t:0;s-=u,l=s+(l-o),o=s}return{from:s,toA:l,toB:o}}function XN(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new bb(t,r)),(i!=t||s!=r)&&e.push(new bb(i,s))),e}function BN(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?U.single(t+e,r+e):null}function rd(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class WN{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ge.safari&&e.contentDOM.addEventListener("input",()=>null),ge.gecko&&sL(e.contentDOM.ownerDocument)}handleEvent(e){!KN(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=VN(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let l=!t[s].handlers.length,o=r[s];o&&l!=!o.handlers.length&&(i.removeEventListener(s,this.handleEvent),o=null),o||i.addEventListener(s,this.handleEvent,{passive:l})}for(let s in r)s!="scroll"&&!t[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&CC.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ge.android&&ge.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return ge.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=PC.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||qN.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,jo(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:ge.safari&&!ge.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function wb(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Nn(t.state,i)}}}function VN(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec,s=i&&i.plugin.domEventHandlers,l=i&&i.plugin.domEventObservers;if(s)for(let o in s){let u=s[o];u&&t(o).handlers.push(wb(r.value,u))}if(l)for(let o in l){let u=l[o];u&&t(o).observers.push(wb(r.value,u))}}for(let r in Dr)t(r).handlers.push(Dr[r]);for(let r in Dn)t(r).observers.push(Dn[r]);return e}const PC=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],qN="dthko",CC=[16,17,18,20,91,92,224,225],nf=6;function rf(n){return Math.max(0,n)*.7+8}function FN(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class YN{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=U2(e.contentDOM),this.atoms=e.state.facet($c).map(l=>l(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Ve.allowMultipleSelections)&&UN(e,t),this.dragging=HN(e,t)&&TC(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&FN(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,s=0,l=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:l}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:o}=this.scrollParents.y.getBoundingClientRect());let u=Q0(this.view);e.clientX-u.left<=i+nf?t=-rf(i-e.clientX):e.clientX+u.right>=l-nf&&(t=rf(e.clientX-l)),e.clientY-u.top<=s+nf?r=-rf(s-e.clientY):e.clientY+u.bottom>=o-nf&&(r=rf(e.clientY-o)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=vC(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function UN(n,e){let t=n.state.facet(sC);return t.length?t[0](e):ge.mac?e.metaKey:e.ctrlKey}function GN(n,e){let t=n.state.facet(lC);return t.length?t[0](e):ge.mac?!e.altKey:!e.ctrlKey}function HN(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Gu(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let l=i[s];if(l.left<=e.clientX&&l.right>=e.clientX&&l.top<=e.clientY&&l.bottom>=e.clientY)return!0}return!1}function KN(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=St.get(t))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Dr=Object.create(null),Dn=Object.create(null),QC=ge.ie&&ge.ie_version<15||ge.ios&&ge.webkit_version<604;function JN(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),$C(n,t.value)},50)}function qd(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function $C(n,e){e=qd(n.state,w0,e);let{state:t}=n,r,i=1,s=t.toText(e),l=s.lines==t.selection.ranges.length;if(hy!=null&&t.selection.ranges.every(u=>u.empty)&&hy==s.toString()){let u=-1;r=t.changeByRange(h=>{let f=t.doc.lineAt(h.from);if(f.from==u)return{range:h};u=f.from;let p=t.toText((l?s.line(i++).text:e)+t.lineBreak);return{changes:{from:f.from,insert:p},range:U.cursor(h.from+p.length)}})}else l?r=t.changeByRange(u=>{let h=s.line(i++);return{changes:{from:u.from,to:u.to,insert:h.text},range:U.cursor(u.from+h.length)}}):r=t.replaceSelection(s);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Dn.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};Dn.wheel=Dn.mousewheel=n=>{n.inputState.lastWheelEvent=Date.now()};Dr.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);Dn.touchstart=(n,e)=>{let t=n.inputState,r=e.targetTouches[0];t.lastTouchTime=Date.now(),r&&(t.lastTouchX=r.clientX,t.lastTouchY=r.clientY),t.setSelectionOrigin("select.pointer")};Dn.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Dr.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(oC))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=tL(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new YN(n,e,t,r)),r&&n.observer.ignore(()=>{G2(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function Sb(n,e,t,r){if(r==1)return U.cursor(e,t);if(r==2)return EN(n.state,e,t);{let i=n.docView.lineAt(e,t),s=n.state.doc.lineAt(i?i.posAtEnd:e),l=i?i.posAtStart:s.from,o=i?i.posAtEnd:s.to;return o<n.state.doc.length&&o==s.to&&o++,U.range(l,o)}}const eL=ge.ie&&ge.ie_version<=11;let Pb=null,Cb=0,Qb=0;function TC(n){if(!eL)return n.detail;let e=Pb,t=Qb;return Pb=n,Qb=Date.now(),Cb=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Cb+1)%3:1}function tL(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=TC(e),i=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),i=i.map(s.changes))},get(s,l,o){let u=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,f=Sb(n,u.pos,u.assoc,r);if(t.pos!=u.pos&&!l){let p=Sb(n,t.pos,t.assoc,r),m=Math.min(p.from,f.from),O=Math.max(p.to,f.to);f=m<f.from?U.range(m,O,f.assoc):U.range(O,m,f.assoc)}return l?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):o&&r==1&&i.ranges.length>1&&(h=nL(i,u.pos))?h:o?i.addRange(f):U.create([f])}}}function nL(n,e){for(let t=0;t<n.ranges.length;t++){let{from:r,to:i}=n.ranges[t];if(r<=e&&i>=e)return U.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}Dr.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,l=s+i.length;(s>=t.to||l<=t.from)&&(t=U.range(s,l))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",qd(n.state,S0,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Dr.dragend=n=>(n.inputState.draggedContent=null,!1);function $b(n,e,t,r){if(t=qd(n.state,w0,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,l=r&&s&&GN(n,e)?{from:s.from,to:s.to}:null,o={from:i,insert:t},u=n.state.changes(l?[l,o]:o);n.focus(),n.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:l?"move.drop":"input.drop"}),n.inputState.draggedContent=null}Dr.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,s=()=>{++i==t.length&&$b(n,e,r.filter(l=>l!=null).join(n.state.lineBreak),!1)};for(let l=0;l<t.length;l++){let o=new FileReader;o.onerror=s,o.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(o.result)||(r[l]=o.result),s()},o.readAsText(t[l])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return $b(n,e,r,!0),!0}return!1};Dr.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=QC?null:e.clipboardData;return t?($C(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(JN(n),!1)};function rL(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function iL(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:s}of n.selection.ranges){let l=n.doc.lineAt(s);l.number>i&&(e.push(l.text),t.push({from:l.from,to:Math.min(n.doc.length,l.to+1)})),i=l.number}r=!0}return{text:qd(n,S0,e.join(n.lineBreak)),ranges:t,linewise:r}}let hy=null;Dr.copy=Dr.cut=(n,e)=>{if(!Mu(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:r,linewise:i}=iL(n.state);if(!t&&!i)return!1;hy=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=QC?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(rL(n,t),!1)};const jC=mi.define();function EC(n,e){let t=[];for(let r of n.facet(cC)){let i=r(n,e);i&&t.push(i)}return t.length?n.update({effects:t,annotations:jC.of(!0)}):null}function MC(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=EC(n.state,e);t?n.dispatch(t):n.update([])}},10)}Dn.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),MC(n)};Dn.blur=n=>{n.observer.clearSelectionRange(),MC(n)};Dn.compositionstart=Dn.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};Dn.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,ge.chrome&&ge.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};Dn.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};Dr.beforeinput=(n,e)=>{var t,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),l=e.getTargetRanges();if(s&&l.length){let o=l[0],u=n.posAtDOM(o.startContainer,o.startOffset),h=n.posAtDOM(o.endContainer,o.endOffset);return $0(n,{from:u,to:h,insert:n.state.toText(s)},null),!0}}let i;if(ge.chrome&&ge.android&&(i=PC.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var l;(((l=window.visualViewport)===null||l===void 0?void 0:l.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return ge.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),ge.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Dn.compositionend(n,e),20),!1};const Tb=new Set;function sL(n){Tb.has(n)||(Tb.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const jb=["pre-wrap","normal","pre-line","break-spaces"];let Jo=!1;function Eb(){Jo=!1}class lL{constructor(e){this.lineWrapping=e,this.doc=Ye.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return jb.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(t=!0,this.heightSamples[Math.floor(i*10)]=!0)}return t}refresh(e,t,r,i,s,l){let o=jb.indexOf(e)>-1,u=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=s,u){this.heightSamples={};for(let h=0;h<l.length;h++){let f=l[h];f<0?h++:this.heightSamples[Math.floor(f*10)]=!0}}return u}}class oL{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class Rr{constructor(e,t,r,i,s){this.from=e,this.length=t,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Kt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Rl?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Rr(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var ft=(function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n})(ft||(ft={}));const Af=.001;class kn{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Af&&(Jo=!0),this.height=e)}replace(e,t,r){return kn.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let s=this,l=r.doc;for(let o=i.length-1;o>=0;o--){let{fromA:u,toA:h,fromB:f,toB:p}=i[o],m=s.lineAt(u,ft.ByPosNoHeight,r.setDoc(t),0,0),O=m.to>=h?m:s.lineAt(h,ft.ByPosNoHeight,r,0,0);for(p+=O.to-h,h=O.to;o>0&&m.from<=i[o-1].toA;)u=i[o-1].fromA,f=i[o-1].fromB,o--,u<m.from&&(m=s.lineAt(u,ft.ByPosNoHeight,r,0,0));f+=m.from-u,u=m.from;let k=T0.build(r.setDoc(l),e,f,p);s=id(s,s.replace(u,h,k))}return s.updateHeight(r,0)}static empty(){return new Gn(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,r=e.length,i=0,s=0;for(;;)if(t==r)if(i>s*2){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),r+=1+o.break,i-=o.size}else if(s>i*2){let o=e[r];o.break?e.splice(r,1,o.left,null,o.right):e.splice(r,1,o.left,o.right),r+=2+o.break,s-=o.size}else break;else if(i<s){let o=e[t++];o&&(i+=o.size)}else{let o=e[--r];o&&(s+=o.size)}let l=0;return e[t-1]==null?(l=1,t--):e[t]==null&&(l=1,r++),new uL(kn.of(e.slice(0,t)),l,kn.of(e.slice(r)))}}function id(n,e){return n==e?n:(n.constructor!=e.constructor&&(Jo=!0),e)}kn.prototype.size=1;const aL=Qe.replace({});class AC extends kn{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new Rr(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new Rr(i,0,r,this.spaceAbove,aL):this.mainBlock(r,i)}lineAt(e,t,r,i,s){let l=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(l):l}forEachLine(e,t,r,i,s,l){e<=s+this.length&&t>=s&&l(this.lineAt(0,ft.ByPos,r,i,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Gn extends AC{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new Rr(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Gn||i instanceof Ut&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Ut?i=new Gn(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):kn.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ut extends kn{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,l,o=0;if(e.lineWrapping){let u=Math.min(this.height,e.lineHeight*s);l=u/s,this.length>s+1&&(o=(this.height-u)/(this.length-s-1))}else l=this.height/s;return{firstLine:r,lastLine:i,perLine:l,perChar:o}}blockAt(e,t,r,i){let{firstLine:s,lastLine:l,perLine:o,perChar:u}=this.heightMetrics(t,i);if(t.lineWrapping){let h=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),f=t.doc.lineAt(h),p=o+f.length*u,m=Math.max(r,e-p/2);return new Rr(f.from,f.length,m,p,0)}else{let h=Math.max(0,Math.min(l-s,Math.floor((e-r)/o))),{from:f,length:p}=t.doc.line(s+h);return new Rr(f,p,r+o*h,o,0)}}lineAt(e,t,r,i,s){if(t==ft.ByHeight)return this.blockAt(e,r,i,s);if(t==ft.ByPosNoHeight){let{from:O,to:k}=r.doc.lineAt(e);return new Rr(O,k-O,0,0,0)}let{firstLine:l,perLine:o,perChar:u}=this.heightMetrics(r,s),h=r.doc.lineAt(e),f=o+h.length*u,p=h.number-l,m=i+o*p+u*(h.from-s-p);return new Rr(h.from,h.length,Math.max(i,Math.min(m,i+this.height-f)),f,0)}forEachLine(e,t,r,i,s,l){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:o,perLine:u,perChar:h}=this.heightMetrics(r,s);for(let f=e,p=i;f<=t;){let m=r.doc.lineAt(f);if(f==e){let k=m.number-o;p+=u*k+h*(e-s-k)}let O=u+h*m.length;l(new Rr(m.from,m.length,p,O,0)),p+=O,f=m.to+1}}replace(e,t,r){let i=this.length-t;if(i>0){let s=r[r.length-1];s instanceof Ut?r[r.length-1]=new Ut(s.length+i):r.push(null,new Ut(i-1))}if(e>0){let s=r[0];s instanceof Ut?r[0]=new Ut(e+s.length):r.unshift(new Ut(e-1),null)}return kn.of(r)}decomposeLeft(e,t){t.push(new Ut(e-1),null)}decomposeRight(e,t){t.push(null,new Ut(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let l=[],o=Math.max(t,i.from),u=-1;for(i.from>t&&l.push(new Ut(i.from-t-1).updateHeight(e,t));o<=s&&i.more;){let f=e.doc.lineAt(o).length;l.length&&l.push(null);let p=i.heights[i.index++],m=0;p<0&&(m=-p,p=i.heights[i.index++]),u==-1?u=p:Math.abs(p-u)>=Af&&(u=-2);let O=new Gn(f,p,m);O.outdated=!1,l.push(O),o+=f+1}o<=s&&l.push(null,new Ut(s-o).updateHeight(e,o));let h=kn.of(l);return(u<0||Math.abs(h.height-this.height)>=Af||Math.abs(u-this.heightMetrics(e,t).perLine)>=Af)&&(Jo=!0),id(this,h)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class uL extends kn{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,r,i,s){let l=i+this.left.height,o=s+this.left.length+this.break,u=t==ft.ByHeight?e<l:e<o,h=u?this.left.lineAt(e,t,r,i,s):this.right.lineAt(e,t,r,l,o);if(this.break||(u?h.to<o:h.from>o))return h;let f=t==ft.ByPosNoHeight?ft.ByPosNoHeight:ft.ByPos;return u?h.join(this.right.lineAt(o,f,r,l,o)):this.left.lineAt(o,f,r,i,s).join(h)}forEachLine(e,t,r,i,s,l){let o=i+this.left.height,u=s+this.left.length+this.break;if(this.break)e<u&&this.left.forEachLine(e,t,r,i,s,l),t>=u&&this.right.forEachLine(e,t,r,o,u,l);else{let h=this.lineAt(u,ft.ByPos,r,i,s);e<h.from&&this.left.forEachLine(e,h.from-1,r,i,s,l),h.to>=e&&h.from<=t&&l(h),t>h.to&&this.right.forEachLine(h.to+1,t,r,o,u,l)}}replace(e,t,r){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let l=s.length;for(let o of r)s.push(o);if(e>0&&Mb(s,l-1),t<this.length){let o=s.length;this.decomposeRight(t,s),Mb(s,o)}return kn.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?kn.of(this.break?[e,null,t]:[e,t]):(this.left=id(this.left,e),this.right=id(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:s,right:l}=this,o=t+s.length+this.break,u=null;return i&&i.from<=t+s.length&&i.more?u=s=s.updateHeight(e,t,r,i):s.updateHeight(e,t,r),i&&i.from<=o+l.length&&i.more?u=l=l.updateHeight(e,o,r,i):l.updateHeight(e,o,r),u?this.balanced(s,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Mb(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof Ut&&(r=n[e+1])instanceof Ut&&n.splice(e-1,3,new Ut(t.length+1+r.length))}const cL=5;class T0{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Gn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Gn(r-this.pos,-1,0)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let l=t-e;r.block?this.addBlock(new AC(l,i,r)):(l||s||i>=cL)&&this.addLineDeco(i,s,l)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Gn(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new Ut(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Gn)return e;let t=new Gn(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Gn)&&!this.isCovered?this.nodes.push(new Gn(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Gn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,t,r,i){let s=new T0(r,e);return Be.spans(t,r,i,s,0),s.finish(r)}}function hL(n,e,t){let r=new fL;return Be.compare(n,e,t,r,0),r.changes}class fL{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,i){(e<t||r&&r.heightRelevant||i&&i.heightRelevant)&&To(e,t,this.changes,5)}}function dL(n,e){let t=n.getBoundingClientRect(),r=n.ownerDocument,i=r.defaultView||window,s=Math.max(0,t.left),l=Math.min(i.innerWidth,t.right),o=Math.max(0,t.top),u=Math.min(i.innerHeight,t.bottom);for(let h=n.parentNode;h&&h!=r.body;)if(h.nodeType==1){let f=h,p=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&p.overflow!="visible"){let m=f.getBoundingClientRect();s=Math.max(s,m.left),l=Math.min(l,m.right),o=Math.max(o,m.top),u=Math.min(h==n.parentNode?i.innerHeight:u,m.bottom)}h=p.position=="absolute"||p.position=="fixed"?f.offsetParent:f.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-t.left,right:Math.max(s,l)-t.left,top:o-(t.top+e),bottom:Math.max(o,u)-(t.top+e)}}function pL(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function mL(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class pg{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return Qe.replace({widget:new gL(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class gL extends zr{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Ab{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Rb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=at.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=t.facet(P0).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new lL(r),this.stateDeco=Nb(t),this.heightMap=kn.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle.setDoc(t.doc),[new gr(0,0,0,t.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Qe.set(this.lineGaps.map(i=>i.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:s,to:l})=>i>=s&&i<=l)){let{from:s,to:l}=this.lineBlockAt(i);e.push(new sf(s,l))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Rb:new j0(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Qu(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=Nb(this.state);let i=e.changedRanges,s=gr.extendWithRanges(i,hL(r,this.stateDeco,e?e.changes:Nt.empty(this.state.doc.length))),l=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Eb(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=l||Jo)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=l);let u=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<u.from||t.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,t));let h=u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(fC)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?at.RTL:at.LTR;let l=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",o=t.getBoundingClientRect(),u=l||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let h=0,f=0;if(o.width&&o.height){let{scaleX:I,scaleY:j}=Y2(t,o);(I>.005&&Math.abs(this.scaleX-I)>.005||j>.005&&Math.abs(this.scaleY-j)>.005)&&(this.scaleX=I,this.scaleY=j,h|=16,l=u=!0)}let p=(parseInt(r.paddingTop)||0)*this.scaleY,m=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=m)&&(this.paddingTop=p,this.paddingBottom=m,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(u=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let O=U2(this.view.contentDOM,!1).y;O!=this.scrollParent&&(this.scrollParent=O,this.scrollAnchorHeight=-1,this.scrollOffset=0);let k=this.getScrollOffset();this.scrollOffset!=k&&(this.scrollAnchorHeight=-1,this.scrollOffset=k),this.scrolledToBottom=H2(this.scrollParent||e.win);let b=(this.printing?mL:dL)(t,this.paddingTop),w=b.top-this.pixelViewport.top,S=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let C=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(C!=this.inView&&(this.inView=C,C&&(u=!0)),!this.inView&&!this.scrollTarget&&!pL(e.dom))return 0;let Q=o.width;if((this.contentDOMWidth!=Q||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),u){let I=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(I)&&(l=!0),l||i.lineWrapping&&Math.abs(Q-this.contentDOMWidth)>i.charWidth){let{lineHeight:j,charWidth:Z,textHeight:q}=e.docView.measureTextSize();l=j>0&&i.refresh(s,j,Z,q,Math.max(5,Q/Z),I),l&&(e.docView.minWidth=0,h|=16)}w>0&&S>0?f=Math.max(w,S):w<0&&S<0&&(f=Math.min(w,S)),Eb();for(let j of this.viewports){let Z=j.from==this.viewport.from?I:e.docView.measureVisibleLineHeights(j);this.heightMap=(l?kn.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle,[new gr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,l,new oL(j.from,Z))}Jo&&(h|=2)}let R=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return R&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||R)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:l,visibleBottom:o}=this,u=new sf(i.lineAt(l-r*1e3,ft.ByHeight,s,0,0).from,i.lineAt(o+(1-r)*1e3,ft.ByHeight,s,0,0).to);if(t){let{head:h}=t.range;if(h<u.from||h>u.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=i.lineAt(h,ft.ByPos,s,0,0),m;t.y=="center"?m=(p.top+p.bottom)/2-f/2:t.y=="start"||t.y=="nearest"&&h<u.from?m=p.top:m=p.bottom-f,u=new sf(i.lineAt(m-1e3/2,ft.ByHeight,s,0,0).from,i.lineAt(m+f+1e3/2,ft.ByHeight,s,0,0).to)}}return u}mapViewport(e,t){let r=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new sf(this.heightMap.lineAt(r,ft.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,ft.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,ft.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,ft.ByPos,this.heightOracle,0,0),{visibleTop:l,visibleBottom:o}=this;return(e==0||i<=l-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=o+Math.max(10,Math.min(r,250)))&&i>l-2*1e3&&s<o+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let i of e)t.touchesRange(i.from,i.to)||r.push(new pg(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,l=i<<1;if(this.defaultTextDirection!=at.LTR&&!r)return[];let o=[],u=(f,p,m,O)=>{if(p-f<s)return;let k=this.state.selection.main,b=[k.from];k.empty||b.push(k.to);for(let S of b)if(S>f&&S<p){u(f,S-10,m,O),u(S+10,p,m,O);return}let w=yL(e,S=>S.from>=m.from&&S.to<=m.to&&Math.abs(S.from-f)<s&&Math.abs(S.to-p)<s&&!b.some(C=>S.from<C&&S.to>C));if(!w){if(p<m.to&&t&&r&&t.visibleRanges.some(Q=>Q.from<=p&&Q.to>=p)){let Q=t.moveToLineBoundary(U.cursor(p),!1,!0).head;Q>f&&(p=Q)}let S=this.gapSize(m,f,p,O),C=r||S<2e6?S:2e6;w=new pg(f,p,S,C)}o.push(w)},h=f=>{if(f.length<l||f.type!=Kt.Text)return;let p=OL(f.from,f.to,this.stateDeco);if(p.total<l)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,O,k;if(r){let b=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,w,S;if(m!=null){let C=of(p,m),Q=((this.visibleBottom-this.visibleTop)/2+b)/f.height;w=C-Q,S=C+Q}else w=(this.visibleTop-f.top-b)/f.height,S=(this.visibleBottom-f.top+b)/f.height;O=lf(p,w),k=lf(p,S)}else{let b=p.total*this.heightOracle.charWidth,w=i*this.heightOracle.charWidth,S=0;if(b>2e6)for(let j of e)j.from>=f.from&&j.from<f.to&&j.size!=j.displaySize&&j.from*this.heightOracle.charWidth+S<this.pixelViewport.left&&(S=j.size-j.displaySize);let C=this.pixelViewport.left+S,Q=this.pixelViewport.right+S,R,I;if(m!=null){let j=of(p,m),Z=((Q-C)/2+w)/b;R=j-Z,I=j+Z}else R=(C-w)/b,I=(Q+w)/b;O=lf(p,R),k=lf(p,I)}O>f.from&&u(f.from,O,f,p),k<f.to&&u(k,f.to,f,p)};for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(h):h(f);return o}gapSize(e,t,r,i){let s=of(i,r)-of(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){pg.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Qe.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];Be.spans(t,this.viewport.from,this.viewport.to,{span(s,l){r.push({from:s,to:l})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let l=this.visibleRanges[s],o=r[s];(l.from!=o.from||l.to!=o.to)&&(i|=4,e&&e.mapPos(l.from,-1)==o.from&&e.mapPos(l.to,1)==o.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Qu(this.heightMap.lineAt(e,ft.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Qu(this.heightMap.lineAt(this.scaler.fromDOM(e),ft.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Qu(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class sf{constructor(e,t){this.from=e,this.to=t}}function OL(n,e,t){let r=[],i=n,s=0;return Be.spans(t,n,e,{span(){},point(l,o){l>i&&(r.push({from:i,to:l}),s+=l-i),i=o}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function lf({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:s,to:l}=e[i],o=l-s;if(r<=o)return s+r;r-=o}}function of(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function yL(n,e){for(let t of n)if(e(t))return t}const Rb={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function Nb(n){let e=n.facet(Bd).filter(r=>typeof r!="function"),t=n.facet(C0).filter(r=>typeof r!="function");return t.length&&e.push(Be.join(t)),e}class j0{constructor(e,t,r){let i=0,s=0,l=0;this.viewports=r.map(({from:o,to:u})=>{let h=t.lineAt(o,ft.ByPos,e,0,0).top,f=t.lineAt(u,ft.ByPos,e,0,0).bottom;return i+=f-h,{from:o,to:u,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let o of this.viewports)o.domTop=l+(o.top-s)*this.scale,l=o.domBottom=o.domTop+(o.bottom-o.top),s=o.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof j0?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function Qu(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Rr(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>Qu(i,e)):n._content)}const af=pe.define({combine:n=>n.join(" ")}),fy=pe.define({combine:n=>n.indexOf(!0)>-1}),dy=Ds.newName(),RC=Ds.newName(),NC=Ds.newName(),LC={"&light":"."+RC,"&dark":"."+NC};function py(n,e,t){return new Ds(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const xL=py("."+dy,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},LC),kL={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},mg=ge.ie&&ge.ie_version<=11;class vL{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new H5,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(ge.ie&&ge.ie_version<=11||ge.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&ge.android&&e.constructor.EDIT_CONTEXT!==!1&&!(ge.chrome&&ge.chrome_version<126)&&(this.editContext=new wL(e),e.state.facet(Ri)&&(e.contentDOM.editContext=this.editContext.editContext)),mg&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Ri)?r.root.activeElement!=this.dom:!Mu(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(ge.ie&&ge.ie_version<=11||ge.android&&ge.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Ru(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Gu(e.root);if(!t)return!1;let r=ge.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&bL(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Mu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&J5(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(r.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=t)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,kL),mg&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),mg&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&jo(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let s of e){let l=this.readMutation(s);l&&(l.typeOver&&(i=!0),t==-1?{from:t,to:r}=l:(t=Math.min(l.from,t),r=Math.max(l.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Mu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new zN(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=wC(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!rd(this.view.state.selection,t.newSel.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let r=Lb(t,e.previousSibling||e.target.previousSibling,-1),i=Lb(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ri)!=e.state.facet(Ri)&&(e.view.contentDOM.editContext=e.state.facet(Ri)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Lb(n,e,t){for(;e;){let r=St.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function _b(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,l=n.docView.domAtPos(n.state.selection.main.anchor,1);return Ru(l.node,l.offset,i,s)&&([t,r,i,s]=[i,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}}function bL(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return _b(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?_b(n,t):null}class wL{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:l}=i,o=this.toEditorPos(r.updateRangeStart),u=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:o,drifted:!1});let h=u-o>r.text.length;o==this.from&&s<this.from?o=s:u==this.to&&s>this.to&&(u=s);let f=SC(e.state.sliceDoc(o,u),r.text,(h?i.from:i.to)-o,h?"end":null);if(!f){let m=U.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));rd(m,i)||e.dispatch({selection:m,userEvent:"select"});return}let p={from:f.from+o,to:f.toA+o,insert:Ye.of(r.text.slice(f.from,f.toB).split(`
76
+ `))};if((ge.mac||ge.android)&&p.from==l-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(p={from:o,to:u,insert:Ye.of([r.text.replace("."," ")])}),this.pendingContextChange=p,!e.state.readOnly){let m=this.to-this.from+(p.to-p.from+p.insert.length);$0(e,p,U.single(this.toEditorPos(r.selectionStart,m),this.toEditorPos(r.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),p.from<p.to&&!p.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let l=this.toEditorPos(r.rangeStart),o=this.toEditorPos(r.rangeEnd);l<o;l++){let u=e.coordsForChar(l);s=u&&new DOMRect(u.left,u.top,u.right-u.left,u.bottom-u.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let l=s.underlineStyle,o=s.underlineThickness;if(!/none/i.test(l)&&!/none/i.test(o)){let u=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(u<h){let f=`text-decoration: underline ${/^[a-z]/.test(l)?l+" ":l=="Dashed"?"dashed ":l=="Squiggle"?"wavy ":""}${/thin/i.test(o)?1:2}px`;i.push(Qe.mark({attributes:{style:f}}).range(u,h))}}}e.dispatch({effects:pC.of(Qe.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Gu(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,l,o,u,h)=>{if(r)return;let f=h.length-(l-s);if(i&&l>=i.to)if(i.from==s&&i.to==l&&i.insert.eq(h)){i=this.pendingContextChange=null,t+=f,this.to+=f;return}else i=null,this.revertPending(e.state);if(s+=t,l+=t,l<=this.from)this.from+=f,this.to+=f;else if(s<this.to){if(s<this.from||l>this.to||this.to-this.from+h.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(l),h.toString()),this.to+=f}t+=f}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ce{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||K5(e.parent)||document,this.viewState=new Ab(this,e.state||Ve.create(e)),e.scrollTo&&e.scrollTo.is(tf)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Po).map(i=>new ug(i));for(let i of this.plugins)i.update(this);this.observer=new vL(this),this.inputState=new WN(this),this.inputState.ensureHandlers(this.plugins),this.docView=new kb(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Mt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,s=this.state;for(let m of e){if(m.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=m.state}if(this.destroyed){this.viewState.state=s;return}let l=this.hasFocus,o=0,u=null;e.some(m=>m.annotation(jC))?(this.inputState.notifiedFocused=l,o=1):l!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=l,u=EC(s,l),u||(o=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(f=null)):this.observer.clear(),s.facet(Ve.phrases)!=this.state.facet(Ve.phrases))return this.setState(s);i=ed.create(this,s,e),i.flags|=o;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let m of e){if(p&&(p=p.map(m.changes)),m.scrollIntoView){let{main:O}=m.state.selection,{x:k,y:b}=this.state.facet(ce.cursorScrollMargin);p=new Eo(O.empty?O:U.cursor(O.head,O.head>O.anchor?-1:1),"nearest","nearest",b,k)}for(let O of m.effects)O.is(tf)&&(p=O.value.clip(this.state))}this.viewState.update(i,p),this.bidiCache=sd.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Cu)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(m=>m.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(af)!=i.state.facet(af)&&(this.viewState.mustMeasureContent=!0),(t||r||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let m of this.state.facet(oy))try{m(i)}catch(O){Nn(this.state,O,"update listener")}(u||f)&&Promise.resolve().then(()=>{u&&this.state==u.startState&&this.dispatch(u),f&&!wC(this,f)&&h.force&&jo(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Ab(this,e),this.plugins=e.facet(Po).map(r=>new ug(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new kb(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Po),r=e.state.facet(Po);if(t!=r){let i=[];for(let s of r){let l=t.indexOf(s);if(l<0)i.push(new ug(s));else{let o=this.plugins[l];o.mustUpdate=e,i.push(o)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(r){Nn(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:l}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(l=-1),this.viewState.scrollAnchorHeight=-1;try{for(let o=0;;o++){if(l<0)if(H2(r||this.win))s=-1,l=this.viewState.heightMap.height;else{let O=this.viewState.scrollAnchorAt(i);s=O.from,l=O.top}this.updateState=1;let u=this.viewState.measure();if(!u&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(o>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];u&4||([this.measureRequests,h]=[h,this.measureRequests]);let f=h.map(O=>{try{return O.read(this)}catch(k){return Nn(this.state,k),Db}}),p=ed.create(this,this.state,[]),m=!1;p.flags|=u,t?t.flags|=u:t=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),m=this.docView.update(p),m&&this.docViewUpdate());for(let O=0;O<h.length;O++)if(f[O]!=Db)try{let k=h[O];k.write&&k.write(f[O],this)}catch(k){Nn(this.state,k)}if(m&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,l=-1;continue}else{let k=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-l)/this.scaleY;if((k>1||k<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+k,r?r.scrollTop+=k:this.win.scrollBy(0,k),l=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let o of this.state.facet(oy))o(t)}get themeClasses(){return dy+" "+(this.state.facet(fy)?NC:RC)+" "+this.state.facet(af)}updateAttrs(){let e=Ib(this,mC,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ri)?"true":"false",class:"cm-content",style:`${ge.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Ib(this,P0,t);let r=this.observer.ignore(()=>{let i=pb(this.contentDOM,this.contentAttrs,t),s=pb(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(ce.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Cu);let e=this.state.facet(ce.cspNonce);Ds.mount(this.root,this.styleModules.concat(xL).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(r=>r.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return dg(this,e,vb(this,e,t,r))}moveByGroup(e,t){return dg(this,e,vb(this,e,t,r=>RN(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return U.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return AN(this,e,t,r)}moveVertically(e,t,r){return dg(this,e,NN(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=cy(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),cy(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),l=s[li.find(s,e-i.from,-1,t)];return Hu(r,l.dir==at.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(hC)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>SL)return rC(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||nC(s.isolates,r=Ob(this,e))))return s.order;r||(r=Ob(this,e));let i=lN(e.text,t,r);return this.bidiCache.push(new sd(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ge.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{G2(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){var r,i,s,l;return tf.of(new Eo(typeof e=="number"?U.cursor(e):e,(r=t.y)!==null&&r!==void 0?r:"nearest",(i=t.x)!==null&&i!==void 0?i:"nearest",(s=t.yMargin)!==null&&s!==void 0?s:5,(l=t.xMargin)!==null&&l!==void 0?l:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return tf.of(new Eo(U.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Pt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Pt.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=Ds.newName(),i=[af.of(r),Cu.of(py(`.${r}`,e))];return t&&t.dark&&i.push(fy.of(!0)),i}static baseTheme(e){return Bi.lowest(Cu.of(py("."+dy,e,LC)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&St.get(r)||St.get(e);return((t=i==null?void 0:i.root)===null||t===void 0?void 0:t.view)||null}}ce.styleModule=Cu;ce.inputHandler=uC;ce.clipboardInputFilter=w0;ce.clipboardOutputFilter=S0;ce.scrollHandler=dC;ce.focusChangeEffect=cC;ce.perLineTextDirection=hC;ce.exceptionSink=aC;ce.updateListener=oy;ce.editable=Ri;ce.mouseSelectionStyle=oC;ce.dragMovesSelection=lC;ce.clickAddsSelectionRange=sC;ce.decorations=Bd;ce.blockWrappers=gC;ce.outerDecorations=C0;ce.atomicRanges=$c;ce.bidiIsolatedRanges=OC;ce.cursorScrollMargin=pe.define({combine:n=>{let e=5,t=5;for(let r of n)typeof r=="number"?e=t=r:{x:e,y:t}=r;return{x:e,y:t}}});ce.scrollMargins=yC;ce.darkTheme=fy;ce.cspNonce=pe.define({combine:n=>n.length?n[0]:""});ce.contentAttributes=P0;ce.editorAttributes=mC;ce.lineWrapping=ce.contentAttributes.of({class:"cm-lineWrapping"});ce.announce=Re.define();const SL=4096,Db={};class sd{constructor(e,t,r,i,s,l){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=s,this.order=l}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:at.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let l=e[s];l.dir==i&&!t.touchesRange(l.from,l.to)&&r.push(new sd(t.mapPos(l.from,1),t.mapPos(l.to,-1),l.dir,l.isolates,!1,l.order))}return r}}function Ib(n,e,t){for(let r=n.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],l=typeof s=="function"?s(n):s;l&&k0(l,t)}return t}const PL=ge.mac?"mac":ge.windows?"win":ge.linux?"linux":"key";function CL(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,s,l,o;for(let u=0;u<t.length-1;++u){const h=t[u];if(/^(cmd|meta|m)$/i.test(h))o=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))l=!0;else if(/^mod$/i.test(h))e=="mac"?o=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),o&&(r="Meta-"+r),l&&(r="Shift-"+r),r}function uf(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const QL=Bi.default(ce.domEventHandlers({keydown(n,e){return DC(_C(e.state),n,e,"editor")}})),pa=pe.define({enables:QL}),zb=new WeakMap;function _C(n){let e=n.facet(pa),t=zb.get(e);return t||zb.set(e,t=jL(e.reduce((r,i)=>r.concat(i),[]))),t}function $L(n,e,t){return DC(_C(n.state),e,n,t)}let bs=null;const TL=4e3;function jL(n,e=PL){let t=Object.create(null),r=Object.create(null),i=(l,o)=>{let u=r[l];if(u==null)r[l]=o;else if(u!=o)throw new Error("Key binding "+l+" is used both as a regular binding and as a multi-stroke prefix")},s=(l,o,u,h,f)=>{var p,m;let O=t[l]||(t[l]=Object.create(null)),k=o.split(/ (?!$)/).map(S=>CL(S,e));for(let S=1;S<k.length;S++){let C=k.slice(0,S).join(" ");i(C,!0),O[C]||(O[C]={preventDefault:!0,stopPropagation:!1,run:[Q=>{let R=bs={view:Q,prefix:C,scope:l};return setTimeout(()=>{bs==R&&(bs=null)},TL),!0}]})}let b=k.join(" ");i(b,!1);let w=O[b]||(O[b]={preventDefault:!1,stopPropagation:!1,run:((m=(p=O._any)===null||p===void 0?void 0:p.run)===null||m===void 0?void 0:m.slice())||[]});u&&w.run.push(u),h&&(w.preventDefault=!0),f&&(w.stopPropagation=!0)};for(let l of n){let o=l.scope?l.scope.split(" "):["editor"];if(l.any)for(let h of o){let f=t[h]||(t[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=l;for(let m in f)f[m].run.push(O=>p(O,my))}let u=l[e]||l.key;if(u)for(let h of o)s(h,u,l.run,l.preventDefault,l.stopPropagation),l.shift&&s(h,"Shift-"+u,l.shift,l.preventDefault,l.stopPropagation)}return t}let my=null;function DC(n,e,t,r){my=e;let i=V5(e),s=Mn(i,0),l=ii(s)==i.length&&i!=" ",o="",u=!1,h=!1,f=!1;bs&&bs.view==t&&bs.scope==r&&(o=bs.prefix+" ",CC.indexOf(e.keyCode)<0&&(h=!0,bs=null));let p=new Set,m=w=>{if(w){for(let S of w.run)if(!p.has(S)&&(p.add(S),S(t)))return w.stopPropagation&&(f=!0),!0;w.preventDefault&&(w.stopPropagation&&(f=!0),h=!0)}return!1},O=n[r],k,b;return O&&(m(O[o+uf(i,e,!l)])?u=!0:l&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ge.windows&&e.ctrlKey&&e.altKey)&&!(ge.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(k=Is[e.keyCode])&&k!=i?(m(O[o+uf(k,e,!0)])||e.shiftKey&&(b=Yu[e.keyCode])!=i&&b!=k&&m(O[o+uf(b,e,!1)]))&&(u=!0):l&&e.shiftKey&&m(O[o+uf(i,e,!0)])&&(u=!0),!u&&m(O._any)&&(u=!0)),h&&(u=!0),u&&f&&e.stopPropagation(),my=null,u}class Tl{constructor(e,t,r,i,s){this.className=e,this.left=t,this.top=r,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=IC(e);return[new Tl(t,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return EL(e,t,r)}}function IC(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==at.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function Zb(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let s=n.dom.getBoundingClientRect(),l=(i.top+i.bottom)/2,o=n.posAtCoords({x:s.left+1,y:l}),u=n.posAtCoords({x:s.right-1,y:l});return o==null||u==null?r:{from:Math.max(r.from,Math.min(o,u)),to:Math.min(r.to,Math.max(o,u))}}function EL(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),s=n.textDirection==at.LTR,l=n.contentDOM,o=l.getBoundingClientRect(),u=IC(n),h=l.querySelector(".cm-line"),f=h&&window.getComputedStyle(h),p=o.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),m=o.right-(f?parseInt(f.paddingRight):0),O=uy(n,r,1),k=uy(n,i,-1),b=O.type==Kt.Text?O:null,w=k.type==Kt.Text?k:null;if(b&&(n.lineWrapping||O.widgetLineBreaks)&&(b=Zb(n,r,1,b)),w&&(n.lineWrapping||k.widgetLineBreaks)&&(w=Zb(n,i,-1,w)),b&&w&&b.from==w.from&&b.to==w.to)return C(Q(t.from,t.to,b));{let I=b?Q(t.from,null,b):R(O,!1),j=w?Q(null,t.to,w):R(k,!0),Z=[];return(b||O).to<(w||k).from-(b&&w?1:0)||O.widgetLineBreaks>1&&I.bottom+n.defaultLineHeight/2<j.top?Z.push(S(p,I.bottom,m,j.top)):I.bottom<j.top&&n.elementAtHeight((I.bottom+j.top)/2).type==Kt.Text&&(I.bottom=j.top=(I.bottom+j.top)/2),C(I).concat(Z).concat(C(j))}function S(I,j,Z,q){return new Tl(e,I-u.left,j-u.top,Math.max(0,Z-I),q-j)}function C({top:I,bottom:j,horizontal:Z}){let q=[];for(let J=0;J<Z.length;J+=2)q.push(S(Z[J],I,Z[J+1],j));return q}function Q(I,j,Z){let q=1e9,J=-1e9,_=[];function V(ee,Y,me,ye,te){let ae=n.coordsAtPos(ee,ee==Z.to?-2:2),$=n.coordsAtPos(me,me==Z.from?2:-2);!ae||!$||(q=Math.min(ae.top,$.top,q),J=Math.max(ae.bottom,$.bottom,J),te==at.LTR?_.push(s&&Y?p:ae.left,s&&ye?m:$.right):_.push(!s&&ye?p:$.left,!s&&Y?m:ae.right))}let F=I??Z.from,H=j??Z.to;for(let ee of n.visibleRanges)if(ee.to>F&&ee.from<H)for(let Y=Math.max(ee.from,F),me=Math.min(ee.to,H);;){let ye=n.state.doc.lineAt(Y);for(let te of n.bidiSpans(ye)){let ae=te.from+ye.from,$=te.to+ye.from;if(ae>=me)break;$>Y&&V(Math.max(ae,Y),I==null&&ae<=F,Math.min($,me),j==null&&$>=H,te.dir)}if(Y=ye.to+1,Y>=me)break}return _.length==0&&V(F,I==null,H,j==null,n.textDirection),{top:q,bottom:J,horizontal:_}}function R(I,j){let Z=o.top+(j?I.top:I.bottom);return{top:Z,bottom:Z,horizontal:[]}}}function ML(n,e){return n.constructor==e.constructor&&n.eq(e)}class AL{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Rf)!=e.state.facet(Rf)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Rf);for(;t<r.length&&r[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,r)=>!ML(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e,ge.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Rf=pe.define();function zC(n){return[Pt.define(e=>new AL(e,n)),Rf.of(n)]}const ea=pe.define({combine(n){return gi(n,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function RL(n={}){return[ea.of(n),NL,LL,_L,fC.of(!0)]}function ZC(n){return n.startState.facet(ea)!=n.state.facet(ea)}const NL=zC({above:!0,markers(n){let{state:e}=n,t=e.facet(ea),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty||t.drawRangeCursor&&!(s&&ge.ios&&t.iosSelectionHandles)){let l=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=i.empty?i:U.cursor(i.head,i.assoc);for(let u of Tl.forRange(n,l,o))r.push(u)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=ZC(n);return t&&Xb(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){Xb(e.state,n)},class:"cm-cursorLayer"});function Xb(n,e){e.style.animationDuration=n.facet(ea).cursorBlinkRate+"ms"}const LL=zC({above:!1,markers(n){let e=[],{main:t,ranges:r}=n.state.selection;for(let i of r)if(!i.empty)for(let s of Tl.forRange(n,"cm-selectionBackground",i))e.push(s);if(ge.ios&&!t.empty&&n.state.facet(ea).iosSelectionHandles){for(let i of Tl.forRange(n,"cm-selectionHandle cm-selectionHandle-start",U.cursor(t.from,1)))e.push(i);for(let i of Tl.forRange(n,"cm-selectionHandle cm-selectionHandle-end",U.cursor(t.to,1)))e.push(i)}return e},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||ZC(n)},class:"cm-selectionLayer"}),_L=Bi.highest(ce.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),XC=Re.define({map(n,e){return n==null?null:e.mapPos(n)}}),$u=Jt.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(XC)?r.value:t,n)}}),DL=Pt.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field($u);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field($u)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field($u),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field($u)!=n&&this.view.dispatch({effects:XC.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function IL(){return[$u,DL]}function Bb(n,e,t,r,i){e.lastIndex=0;for(let s=n.iterRange(t,r),l=t,o;!s.next().done;l+=s.value.length)if(!s.lineBreak)for(;o=e.exec(s.value);)i(l+o.index,o)}function zL(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:s}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),s=Math.min(n.state.doc.lineAt(s).to,s+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}class ZL{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:s,maxLength:l=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(o,u,h,f)=>i(f,h,h+o[0].length,o,u);else if(typeof r=="function")this.addMatch=(o,u,h,f)=>{let p=r(o,u,h);p&&f(h,h+o[0].length,p)};else if(r)this.addMatch=(o,u,h,f)=>f(h,h+o[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=l}createDeco(e){let t=new Di,r=t.add.bind(t);for(let{from:i,to:s}of zL(e,this.maxLength))Bb(e.state.doc,this.regexp,i,s,(l,o)=>this.addMatch(o,e,l,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,l,o,u)=>{u>=e.view.viewport.from&&o<=e.view.viewport.to&&(r=Math.min(o,r),i=Math.max(u,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let s of e.visibleRanges){let l=Math.max(s.from,r),o=Math.min(s.to,i);if(o>=l){let u=e.state.doc.lineAt(l),h=u.to<o?e.state.doc.lineAt(o):u,f=Math.max(s.from,u.from),p=Math.min(s.to,h.to);if(this.boundary){for(;l>u.from;l--)if(this.boundary.test(u.text[l-1-u.from])){f=l;break}for(;o<h.to;o++)if(this.boundary.test(h.text[o-h.from])){p=o;break}}let m=[],O,k=(b,w,S)=>m.push(S.range(b,w));if(u==h)for(this.regexp.lastIndex=f-u.from;(O=this.regexp.exec(u.text))&&O.index<p-u.from;)this.addMatch(O,e,O.index+u.from,k);else Bb(e.state.doc,this.regexp,f,p,(b,w)=>this.addMatch(w,e,b,k));t=t.update({filterFrom:f,filterTo:p,filter:(b,w)=>b<f||w>p,add:m})}}return t}}const gy=/x/.unicode!=null?"gu":"g",XL=new RegExp(`[\0-\b
77
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,gy),BL={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let gg=null;function WL(){var n;if(gg==null&&typeof document<"u"&&document.body){let e=document.body.style;gg=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return gg||!1}const Nf=pe.define({combine(n){let e=gi(n,{render:null,specialChars:XL,addSpecialChars:null});return(e.replaceTabs=!WL())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,gy)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,gy)),e}});function VL(n={}){return[Nf.of(n),qL()]}let Wb=null;function qL(){return Wb||(Wb=Pt.fromClass(class{constructor(n){this.view=n,this.decorations=Qe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Nf)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new ZL({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,s=Mn(e[0],0);if(s==9){let l=i.lineAt(r),o=t.state.tabSize,u=_r(l.text,o,r-l.from);return Qe.replace({widget:new GL((o-u%o)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Qe.replace({widget:new UL(n,s)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Nf);n.startState.facet(Nf)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const FL="•";function YL(n){return n>=32?FL:n==10?"␤":String.fromCharCode(9216+n)}class UL extends zr{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=YL(this.code),r=e.state.phrase("Control character")+" "+(BL[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let s=document.createElement("span");return s.textContent=t,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class GL extends zr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function HL(){return JL}const KL=Qe.line({class:"cm-activeLine"}),JL=Pt.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(KL.range(i.from)),e=i.from)}return Qe.set(t)}},{decorations:n=>n.decorations});class e_ extends zr{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Au(e.firstChild):[];if(!t.length)return null;let r=window.getComputedStyle(e.parentNode),i=Hu(t[0],r.direction!="rtl"),s=parseInt(r.lineHeight);return i.bottom-i.top>s*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+s}:i}ignoreEvent(){return!1}}function t_(n){let e=Pt.fromClass(class{constructor(t){this.view=t,this.placeholder=n?Qe.set([Qe.widget({widget:new e_(n),side:1}).range(0)]):Qe.none}get decorations(){return this.view.state.doc.length?Qe.none:this.placeholder}},{decorations:t=>t.decorations});return typeof n=="string"?[e,ce.contentAttributes.of({"aria-placeholder":n})]:e}const Oy=2e3;function n_(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),s=[];if(e.off>Oy||t.off>Oy||e.col<0||t.col<0){let l=Math.min(e.off,t.off),o=Math.max(e.off,t.off);for(let u=r;u<=i;u++){let h=n.doc.line(u);h.length<=o&&s.push(U.range(h.from+l,h.to+o))}}else{let l=Math.min(e.col,t.col),o=Math.max(e.col,t.col);for(let u=r;u<=i;u++){let h=n.doc.line(u),f=GO(h.text,l,n.tabSize,!0);if(f<0)s.push(U.cursor(h.to));else{let p=GO(h.text,o,n.tabSize);s.push(U.range(h.from+f,h.from+p))}}}return s}function r_(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function Vb(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,s=i>Oy?-1:i==r.length?r_(n,e.clientX):_r(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:s,off:i}}function i_(n,e){let t=Vb(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(t.line).from),l=i.state.doc.lineAt(s);t={line:l.number,col:t.col,off:Math.min(t.off,l.length)},r=r.map(i.changes)}},get(i,s,l){let o=Vb(n,i);if(!o)return r;let u=n_(n.state,t,o);return u.length?l?U.create(u.concat(r.ranges)):U.create(u):r}}:null}function s_(n){let e=(t=>t.altKey&&t.button==0);return ce.mouseSelectionStyle.of((t,r)=>e(r)?i_(t,r):null)}const l_={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},o_={style:"cursor: crosshair"};function a_(n={}){let[e,t]=l_[n.key||"Alt"],r=Pt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,ce.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?o_:null})]}const cf="-10000px";class BC{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(l=>l);let s=null;this.tooltipViews=this.tooltips.map(l=>s=r(l,s))}update(e,t){var r;let i=e.state.facet(this.facet),s=i.filter(u=>u);if(i===this.input){for(let u of this.tooltipViews)u.update&&u.update(e);return!1}let l=[],o=t?[]:null;for(let u=0;u<s.length;u++){let h=s[u],f=-1;if(h){for(let p=0;p<this.tooltips.length;p++){let m=this.tooltips[p];m&&m.create==h.create&&(f=p)}if(f<0)l[u]=this.createTooltipView(h,u?l[u-1]:null),o&&(o[u]=!!h.above);else{let p=l[u]=this.tooltipViews[f];o&&(o[u]=t[f]),p.update&&p.update(e)}}}for(let u of this.tooltipViews)l.indexOf(u)<0&&(this.removeTooltipView(u),(r=u.destroy)===null||r===void 0||r.call(u));return t&&(o.forEach((u,h)=>t[h]=u),t.length=o.length),this.input=i,this.tooltips=s,this.tooltipViews=l,!0}}function u_(n){let e=n.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Og=pe.define({combine:n=>{var e,t,r;return{position:ge.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||u_}}}),qb=new WeakMap,E0=Pt.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Og);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new BC(n,M0,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Og);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=cf,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(ge.safari){let l=s.getBoundingClientRect();t=Math.abs(l.top+1e4)>1||Math.abs(l.left)>1}else t=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(t||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(n=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:n,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=Q0(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,l)=>{let o=this.manager.tooltipViews[l];return o.getCoords?o.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(Og).tooltipSpace(this.view),scaleX:n,scaleY:e,makeAbsolute:t}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let o of this.manager.tooltipViews)o.dom.style.position="absolute"}let{visible:t,space:r,scaleX:i,scaleY:s}=n,l=[];for(let o=0;o<this.manager.tooltips.length;o++){let u=this.manager.tooltips[o],h=this.manager.tooltipViews[o],{dom:f}=h,p=n.pos[o],m=n.size[o];if(!p||u.clip!==!1&&(p.bottom<=Math.max(t.top,r.top)||p.top>=Math.min(t.bottom,r.bottom)||p.right<Math.max(t.left,r.left)-.1||p.left>Math.min(t.right,r.right)+.1)){f.style.top=cf;continue}let O=u.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,k=O?7:0,b=m.right-m.left,w=(e=qb.get(h))!==null&&e!==void 0?e:m.bottom-m.top,S=h.offset||h_,C=this.view.textDirection==at.LTR,Q=m.width>r.right-r.left?C?r.left:r.right-m.width:C?Math.max(r.left,Math.min(p.left-(O?14:0)+S.x,r.right-b)):Math.min(Math.max(r.left,p.left-b+(O?14:0)-S.x),r.right-b),R=this.above[o];!u.strictSide&&(R?p.top-w-k-S.y<r.top:p.bottom+w+k+S.y>r.bottom)&&R==r.bottom-p.bottom>p.top-r.top&&(R=this.above[o]=!R);let I=(R?p.top-r.top:r.bottom-p.bottom)-k;if(I<w&&h.resize!==!1){if(I<this.view.defaultLineHeight){f.style.top=cf;continue}qb.set(h,w),f.style.height=(w=I)/s+"px"}else f.style.height&&(f.style.height="");let j=R?p.top-w-k-S.y:p.bottom+k+S.y,Z=Q+b;if(h.overlap!==!0)for(let q of l)q.left<Z&&q.right>Q&&q.top<j+w&&q.bottom>j&&(j=R?q.top-w-2-k:q.bottom+k+2);if(this.position=="absolute"?(f.style.top=(j-n.parent.top)/s+"px",Fb(f,(Q-n.parent.left)/i)):(f.style.top=j/s+"px",Fb(f,Q/i)),O){let q=p.left+(C?S.x:-S.x)-(Q+14-7);O.style.left=q/i+"px"}h.overlap!==!0&&l.push({left:Q,top:j,right:Z,bottom:j+w}),f.classList.toggle("cm-tooltip-above",R),f.classList.toggle("cm-tooltip-below",!R),h.positioned&&h.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=cf}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Fb(n,e){let t=parseInt(n.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(n.style.left=e+"px")}const c_=ce.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),h_={x:0,y:0},M0=pe.define({enables:[E0,c_]}),ld=pe.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Fd{static create(e){return new Fd(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new BC(e,ld,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const f_=M0.compute([ld],n=>{let e=n.facet(ld);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Fd.create,above:e[0].above,arrow:e.some(t=>t.arrow)}}),WC=pe.define();class d_{constructor(e,t,r,i,s,l){this.view=e,this.source=t,this.field=r,this.locked=i,this.setHover=s,this.hoverTime=l,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(e){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,r=e.docView.tile.nearest(t.target);if(!r)return;let i,s=1;if(r.isWidget())i=r.posAtStart;else{if(i=e.posAtCoords(t),i==null)return;let l=e.coordsAtPos(i);if(!l||t.y<l.top||t.y>l.bottom||t.x<l.left-e.defaultCharacterWidth||t.x>l.right+e.defaultCharacterWidth)return;let o=e.bidiSpans(e.state.doc.lineAt(i)).find(h=>h.from<=i&&h.to>=i),u=o&&o.dir==at.RTL?-1:1;s=t.x<l.left?-u:u}this.activateHover(e,i,s)}activateHover(e,t,r,i){let s=this.source(e,t,r),l=o=>{if(o&&!(Array.isArray(o)&&!o.length)){let u=Array.isArray(o)?o:[o];i&&this.locked.set(u,i),e.dispatch({effects:this.setHover.of(u)})}};if(s&&"then"in s){let o=this.pending={pos:t};s.then(u=>{this.pending==o&&(this.pending=null,l(u))},u=>Nn(e.state,u,"hover tooltip"))}else l(s)}get tooltip(){let e=this.view.plugin(E0),t=e?e.manager.tooltips.findIndex(r=>r.create==Fd.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:s}=this;if(i.length&&!this.locked.has(i)&&s&&!p_(s.dom,e)||this.pending){let{pos:l}=i[0]||this.pending,o=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:l;(l==o?this.view.posAtCoords(this.lastMove)!=l:!m_(this.view,l,o,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length&&!this.locked.has(t)){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t);let{active:i}=this;i.length&&!this.locked.has(i)&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const hf=4;function p_(n,e){let{left:t,right:r,top:i,bottom:s}=n.getBoundingClientRect(),l;if(l=n.querySelector(".cm-tooltip-arrow")){let o=l.getBoundingClientRect();i=Math.min(o.top,i),s=Math.max(o.bottom,s)}return e.clientX>=t-hf&&e.clientX<=r+hf&&e.clientY>=i-hf&&e.clientY<=s+hf}function m_(n,e,t,r,i,s){let l=n.scrollDOM.getBoundingClientRect(),o=n.documentTop+n.documentPadding.top+n.contentHeight;if(l.left>r||l.right<r||l.top>i||Math.min(l.bottom,o)<i)return!1;let u=n.posAtCoords({x:r,y:i},!1);return u>=e&&u<=t}function g_(n,e={}){let t=Re.define(),r=new WeakMap,i=Jt.define({create(){return[]},update(l,o){let u=r.get(l);if(l.length&&(e.hideOnChange&&(o.docChanged||o.selection)?l=[]:u&&u(o)?l=[]:e.hideOn&&(l=l.filter(h=>!e.hideOn(o,h)))),o.docChanged&&l.length){let h=[];for(let f of l){let p=o.changes.mapPos(f.pos,-1,Ht.TrackDel);if(p!=null){let m=Object.assign(Object.create(null),f);m.pos=p,m.end!=null&&(m.end=o.changes.mapPos(m.end)),h.push(m)}}l=h}for(let h of o.effects)h.is(t)&&(l=h.value,u=void 0),(h.is(y_)&&!h.value||h.value==i)&&(l=[]);return l.length&&u&&r.set(l,u),l},provide:l=>ld.from(l)});const s=Pt.define(l=>new d_(l,n,i,r,t,e.hoverTime||300));return{active:i,extension:[i,s,WC.of(s),f_]}}function O_(n,e,t,r={}){var i;let s=n.state.facet(WC).map(l=>n.plugin(l)).filter(l=>!!l);if(r.tooltip&&r.tooltip.active){let l=s.find(o=>o.field==r.tooltip.active);l&&(s=[l])}for(let l of s)l.activateHover(n,e,t,(i=r.until)!==null&&i!==void 0?i:(()=>!1))}function VC(n,e){let t=n.plugin(E0);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const y_=Re.define(),Yb=pe.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function A0(n,e){let t=n.plugin(qC),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const qC=Pt.fromClass(class{constructor(n){this.input=n.state.facet(Ju),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(Yb);this.top=new ff(n,!0,e.topContainer),this.bottom=new ff(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(Yb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ff(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ff(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Ju);if(t!=this.input){let r=t.filter(u=>u),i=[],s=[],l=[],o=[];for(let u of r){let h=this.specs.indexOf(u),f;h<0?(f=u(n.view),o.push(f)):(f=this.panels[h],f.update&&f.update(n)),i.push(f),(f.top?s:l).push(f)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(l);for(let u of o)u.dom.classList.add("cm-panel"),u.mount&&u.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>ce.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class ff{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Ub(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Ub(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Ub(n){let e=n.nextSibling;return n.remove(),e}const Ju=pe.define({enables:qC});function x_(n,e){let t,r=new Promise(l=>t=l),i=l=>k_(l,e,t);n.state.field(yg,!1)?n.dispatch({effects:FC.of(i)}):n.dispatch({effects:Re.appendConfig.of(yg.init(()=>[i]))});let s=YC.of(i);return{close:s,result:r.then(l=>((n.win.queueMicrotask||(u=>n.win.setTimeout(u,10)))(()=>{n.state.field(yg).indexOf(i)>-1&&n.dispatch({effects:s})}),l))}}const yg=Jt.define({create(){return[]},update(n,e){for(let t of e.effects)t.is(FC)?n=[t.value].concat(n):t.is(YC)&&(n=n.filter(r=>r!=t.value));return n},provide:n=>Ju.computeN([n],e=>e.field(n))}),FC=Re.define(),YC=Re.define();function k_(n,e,t){let r=e.content?e.content(n,()=>l(null)):null;if(!r){if(r=st("form"),e.input){let o=st("input",e.input);/^(text|password|number|email|tel|url)$/.test(o.type)&&o.classList.add("cm-textfield"),o.name||(o.name="input"),r.appendChild(st("label",(e.label||"")+": ",o))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(st("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let o=0;o<i.length;o++){let u=i[o];u.addEventListener("keydown",h=>{h.keyCode==27?(h.preventDefault(),l(null)):h.keyCode==13&&(h.preventDefault(),l(u))}),u.addEventListener("submit",h=>{h.preventDefault(),l(u)})}let s=st("div",r,st("button",{onclick:()=>l(null),"aria-label":n.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function l(o){s.contains(s.ownerDocument.activeElement)&&n.focus(),t(o)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let o;typeof e.focus=="string"?o=r.querySelector(e.focus):o=r.querySelector("input")||r.querySelector("button"),o&&"select"in o?o.select():o&&"focus"in o&&o.focus()}}}}class zi extends _s{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}zi.prototype.elementClass="";zi.prototype.toDOM=void 0;zi.prototype.mapMode=Ht.TrackBefore;zi.prototype.startSide=zi.prototype.endSide=-1;zi.prototype.point=!0;const Lf=pe.define(),v_=pe.define(),b_={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Be.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Lu=pe.define();function w_(n){return[UC(),Lu.of({...b_,...n})]}const Gb=pe.define({combine:n=>n.some(e=>e)});function UC(n){return[S_]}const S_=Pt.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Lu).map(e=>new Kb(n,e)),this.fixed=!n.state.facet(Gb);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}if(n.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Gb)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Be.iter(this.view.state.facet(Lf),this.view.viewport.from),r=[],i=this.gutters.map(s=>new P_(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let l=!0;for(let o of s.type)if(o.type==Kt.Text&&l){yy(t,r,o.from);for(let u of i)u.line(this.view,o,r);l=!1}else if(o.widget)for(let u of i)u.widget(this.view,o)}else if(s.type==Kt.Text){yy(t,r,s.from);for(let l of i)l.line(this.view,s,r)}else if(s.widget)for(let l of i)l.widget(this.view,s);for(let s of i)s.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(Lu),t=n.state.facet(Lu),r=n.docChanged||n.heightChanged||n.viewportChanged||!Be.eq(n.startState.facet(Lf),n.state.facet(Lf),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let s of t){let l=e.indexOf(s);l<0?i.push(new Kb(this.view,s)):(this.gutters[l].update(n),i.push(this.gutters[l]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>ce.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let r=t.dom.offsetWidth*e.scaleX,i=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==at.LTR?{left:r,right:i}:{right:r,left:i}})});function Hb(n){return Array.isArray(n)?n:[n]}function yy(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class P_{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Be.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,l=t.height/e.scaleY;if(this.i==i.elements.length){let o=new GC(e,l,s,r);i.elements.push(o),i.dom.appendChild(o.dom)}else i.elements[this.i].update(e,l,s,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];yy(this.cursor,i,t.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let l=this.gutter;i.length==0&&!l.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let s of e.state.facet(v_)){let l=s(e,t.widget,t);l&&(i||(i=[])).push(l)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Kb{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,l;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let u=s.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=i.clientY;let o=e.lineBlockAtHeight(l-e.documentTop);t.domEventHandlers[r](e,o,i)&&i.preventDefault()});this.markers=Hb(t.markers(e)),t.initialSpacer&&(this.spacer=new GC(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Hb(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Be.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class GC{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),C_(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,l=0;;){let o=l,u=s<t.length?t[s++]:null,h=!1;if(u){let f=u.elementClass;f&&(r+=" "+f);for(let p=l;p<this.markers.length;p++)if(this.markers[p].compare(u)){o=p,h=!0;break}}else o=this.markers.length;for(;l<o;){let f=this.markers[l++];if(f.toDOM){f.destroy(i);let p=i.nextSibling;i.remove(),i=p}}if(!u)break;u.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(u.toDOM(e),i)),h&&l++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}function C_(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const Q_=pe.define(),$_=pe.define(),Co=pe.define({combine(n){return gi(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let i in t){let s=r[i],l=t[i];r[i]=s?(o,u,h)=>s(o,u,h)||l(o,u,h):l}return r}})}});class xg extends zi{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function kg(n,e){return n.state.facet(Co).formatNumber(e,n.state)}const T_=Lu.compute([Co],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Q_)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new xg(kg(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet($_)){let s=i(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Co)!=e.state.facet(Co),initialSpacer(e){return new xg(kg(e,Jb(e.state.doc.lines)))},updateSpacer(e,t){let r=kg(t.view,Jb(t.view.state.doc.lines));return r==e.number?e:new xg(r)},domEventHandlers:n.facet(Co).domEventHandlers,side:"before"}));function j_(n={}){return[Co.of(n),UC(),T_]}function Jb(n){let e=9;for(;e<n;)e=e*10+9;return e}const E_=new class extends zi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},M_=Lf.compute(["selection"],n=>{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(E_.range(i)))}return Be.of(e)});function A_(){return M_}const HC=1024;let R_=0;class Or{constructor(e,t){this.from=e,this.to=t}}class Ne{constructor(e={}){this.id=R_++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=_t.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}Ne.closedBy=new Ne({deserialize:n=>n.split(" ")});Ne.openedBy=new Ne({deserialize:n=>n.split(" ")});Ne.group=new Ne({deserialize:n=>n.split(" ")});Ne.isolate=new Ne({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});Ne.contextHash=new Ne({perNode:!0});Ne.lookAhead=new Ne({perNode:!0});Ne.mounted=new Ne({perNode:!0});class Mo{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[Ne.mounted.id]}}const N_=Object.create(null);class _t{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):N_,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new _t(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(Ne.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(Ne.group),s=-1;s<(i?i.length:0);s++){let l=t[s<0?r.name:i[s]];if(l)return l}}}}_t.none=new _t("",Object.create(null),0,8);class Tc{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let s of e){let l=s(r);if(l){i||(i=Object.assign({},r.props));let o=l[1],u=l[0];u.combine&&u.id in i&&(o=u.combine(i[u.id],o)),i[u.id]=o}}t.push(i?new _t(r.name,i,r.id,r.flags):r)}return new Tc(t)}}const df=new WeakMap,ew=new WeakMap;var et;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays",n[n.EnterBracketed=16]="EnterBracketed"})(et||(et={}));class Je{constructor(e,t,r,i,s){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[l,o]of s)this.props[typeof l=="number"?l:l.id]=o}}toString(){let e=Mo.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new od(this.topNode,e)}cursorAt(e,t=0,r=0){let i=df.get(this)||this.topNode,s=new od(i);return s.moveTo(e,t),df.set(this,s._tree),s}get topNode(){return new hn(this,0,0,null)}resolve(e,t=0){let r=ec(df.get(this)||this.topNode,e,t,!1);return df.set(this,r),r}resolveInner(e,t=0){let r=ec(ew.get(this)||this.topNode,e,t,!0);return ew.set(this,r),r}resolveStack(e,t=0){return D_(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:s=this.length}=e,l=e.mode||0,o=(l&et.IncludeAnonymous)>0;for(let u=this.cursor(l|et.IncludeAnonymous);;){let h=!1;if(u.from<=s&&u.to>=i&&(!o&&u.type.isAnonymous||t(u)!==!1)){if(u.firstChild())continue;h=!0}for(;h&&r&&(o||!u.type.isAnonymous)&&r(u),!u.nextSibling();){if(!u.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:L0(_t.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Je(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Je(_t.none,t,r,i)))}static build(e){return I_(e)}}Je.empty=new Je(_t.none,[],[],0);class R0{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new R0(this.buffer,this.index)}}class Zs{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return _t.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let l=[];for(;e<r;)l.push(this.childString(e)),e=this.buffer[e+3];return s+"("+l.join(",")+")"}findChild(e,t,r,i,s){let{buffer:l}=this,o=-1;for(let u=e;u!=t&&!(KC(s,i,l[u+1],l[u+2])&&(o=u,r>0));u=l[u+3]);return o}slice(e,t,r){let i=this.buffer,s=new Uint16Array(t-e),l=0;for(let o=e,u=0;o<t;){s[u++]=i[o++],s[u++]=i[o++]-r;let h=s[u++]=i[o++]-r;s[u++]=i[o++]-e,l=Math.max(l,h)}return new Zs(s,l,this.set)}}function KC(n,e,t,r){switch(n){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function ec(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let l=!r&&n instanceof hn&&n.index<0?null:n.parent;if(!l)return n;n=l}let s=r?0:et.IgnoreOverlays;if(r)for(let l=n,o=l.parent;o;l=o,o=l.parent)l instanceof hn&&l.index<0&&((i=o.enter(e,t,s))===null||i===void 0?void 0:i.from)!=l.from&&(n=o);for(;;){let l=n.enter(e,t,s);if(!l)return n;n=l}}class JC{cursor(e=0){return new od(this,e)}getChild(e,t=null,r=null){let i=tw(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return tw(this,e,t,r)}resolve(e,t=0){return ec(this,e,t,!1)}resolveInner(e,t=0){return ec(this,e,t,!0)}matchContext(e){return xy(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}class hn extends JC{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,s=0){for(let l=this;;){for(let{children:o,positions:u}=l._tree,h=t>0?o.length:-1;e!=h;e+=t){let f=o[e],p=u[e]+l.from,m;if(!(!(s&et.EnterBracketed&&f instanceof Je&&(m=Mo.get(f))&&!m.overlay&&m.bracketed&&r>=p&&r<=p+f.length)&&!KC(i,r,p,p+f.length))){if(f instanceof Zs){if(s&et.ExcludeBuffers)continue;let O=f.findChild(0,f.buffer.length,t,r-p,i);if(O>-1)return new oi(new L_(l,f,e,p),null,O)}else if(s&et.IncludeAnonymous||!f.type.isAnonymous||N0(f)){let O;if(!(s&et.IgnoreMounts)&&(O=Mo.get(f))&&!O.overlay)return new hn(O.tree,p,e,l);let k=new hn(f,p,e,l);return s&et.IncludeAnonymous||!k.type.isAnonymous?k:k.nextChild(t<0?f.children.length-1:0,t,r,i,s)}}}if(s&et.IncludeAnonymous||!l.type.isAnonymous||(l.index>=0?e=l.index+t:e=t<0?-1:l._parent._tree.children.length,l=l._parent,!l))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&et.IgnoreOverlays)&&(i=Mo.get(this._tree))&&i.overlay){let s=e-this.from,l=r&et.EnterBracketed&&i.bracketed;for(let{from:o,to:u}of i.overlay)if((t>0||l?o<=s:o<s)&&(t<0||l?u>=s:u>s))return new hn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function tw(n,e,t,r){let i=n.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let l=!1;!l;)if(l=i.type.is(t),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function xy(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class L_{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class oi extends JC{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new oi(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&et.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new oi(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new oi(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new oi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let l=r.buffer[this.index+1];e.push(r.slice(i,s,l)),t.push(0)}return new Je(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function eQ(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let l=n[s];(l.from>t.from||l.to<t.to)&&(t=l,e=s)}let r=t instanceof hn&&t.index<0?null:t.parent,i=n.slice();return r?i[e]=r:i.splice(e,1),new __(i,t)}class __{constructor(e,t){this.heads=e,this.node=t}get next(){return eQ(this.heads)}}function D_(n,e,t){let r=n.resolveInner(e,t),i=null;for(let s=r instanceof hn?r:r.context.parent;s;s=s.parent)if(s.index<0){let l=s.parent;(i||(i=[r])).push(l.resolve(e,t)),s=l}else{let l=Mo.get(s.tree);if(l&&l.overlay&&l.overlay[0].from<=e&&l.overlay[l.overlay.length-1].to>=e){let o=new hn(l.tree,l.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(ec(o,e,t,!1))}}return i?eQ(i):r}class od{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~et.EnterBracketed,e instanceof hn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof hn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&et.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&et.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&et.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let s=t+e,l=e<0?-1:r._tree.children.length;s!=l;s+=e){let o=r._tree.children[s];if(this.mode&et.IncludeAnonymous||o instanceof Zs||!o.type.isAnonymous||N0(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let l=e;l;l=l._parent)if(l.index==i){if(i==this.index)return l;t=l,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)t=new oi(this.buffer,t,this.stack[i]);return this.bufferNode=new oi(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return xy(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return xy(this._tree,e,i);let l=r[t.buffer[this.stack[s]]];if(!l.isAnonymous){if(e[i]&&e[i]!=l.name)return!1;i--}}return!0}}function N0(n){return n.children.some(e=>e instanceof Zs||!e.type.isAnonymous||N0(e))}function I_(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=HC,reused:s=[],minRepeatType:l=r.types.length}=n,o=Array.isArray(t)?new R0(t,t.length):t,u=r.types,h=0,f=0;function p(I,j,Z,q,J,_){let{id:V,start:F,end:H,size:ee}=o,Y=f,me=h;if(ee<0)if(o.next(),ee==-1){let D=s[V];Z.push(D),q.push(F-I);return}else if(ee==-3){h=V;return}else if(ee==-4){f=V;return}else throw new RangeError(`Unrecognized record size: ${ee}`);let ye=u[V],te,ae,$=F-I;if(H-F<=i&&(ae=w(o.pos-j,J))){let D=new Uint16Array(ae.size-ae.skip),G=o.pos-ae.size,E=D.length;for(;o.pos>G;)E=S(ae.start,D,E);te=new Zs(D,H-ae.start,r),$=ae.start-I}else{let D=o.pos-ee;o.next();let G=[],E=[],fe=V>=l?V:-1,$e=0,Pe=H;for(;o.pos>D;)fe>=0&&o.id==fe&&o.size>=0?(o.end<=Pe-i&&(k(G,E,F,$e,o.end,Pe,fe,Y,me),$e=G.length,Pe=o.end),o.next()):_>2500?m(F,D,G,E):p(F,D,G,E,fe,_+1);if(fe>=0&&$e>0&&$e<G.length&&k(G,E,F,$e,F,Pe,fe,Y,me),G.reverse(),E.reverse(),fe>-1&&$e>0){let ze=O(ye,me);te=L0(ye,G,E,0,G.length,0,H-F,ze,ze)}else te=b(ye,G,E,H-F,Y-H,me)}Z.push(te),q.push($)}function m(I,j,Z,q){let J=[],_=0,V=-1;for(;o.pos>j;){let{id:F,start:H,end:ee,size:Y}=o;if(Y>4)o.next();else{if(V>-1&&H<V)break;V<0&&(V=ee-i),J.push(F,H,ee),_++,o.next()}}if(_){let F=new Uint16Array(_*4),H=J[J.length-2];for(let ee=J.length-3,Y=0;ee>=0;ee-=3)F[Y++]=J[ee],F[Y++]=J[ee+1]-H,F[Y++]=J[ee+2]-H,F[Y++]=Y;Z.push(new Zs(F,J[2]-H,r)),q.push(H-I)}}function O(I,j){return(Z,q,J)=>{let _=0,V=Z.length-1,F,H;if(V>=0&&(F=Z[V])instanceof Je){if(!V&&F.type==I&&F.length==J)return F;(H=F.prop(Ne.lookAhead))&&(_=q[V]+F.length+H)}return b(I,Z,q,J,_,j)}}function k(I,j,Z,q,J,_,V,F,H){let ee=[],Y=[];for(;I.length>q;)ee.push(I.pop()),Y.push(j.pop()+Z-J);I.push(b(r.types[V],ee,Y,_-J,F-_,H)),j.push(J-Z)}function b(I,j,Z,q,J,_,V){if(_){let F=[Ne.contextHash,_];V=V?[F].concat(V):[F]}if(J>25){let F=[Ne.lookAhead,J];V=V?[F].concat(V):[F]}return new Je(I,j,Z,q,V)}function w(I,j){let Z=o.fork(),q=0,J=0,_=0,V=Z.end-i,F={size:0,start:0,skip:0};e:for(let H=Z.pos-I;Z.pos>H;){let ee=Z.size;if(Z.id==j&&ee>=0){F.size=q,F.start=J,F.skip=_,_+=4,q+=4,Z.next();continue}let Y=Z.pos-ee;if(ee<0||Y<H||Z.start<V)break;let me=Z.id>=l?4:0,ye=Z.start;for(Z.next();Z.pos>Y;){if(Z.size<0)if(Z.size==-3||Z.size==-4)me+=4;else break e;else Z.id>=l&&(me+=4);Z.next()}J=ye,q+=ee,_+=me}return(j<0||q==I)&&(F.size=q,F.start=J,F.skip=_),F.size>4?F:void 0}function S(I,j,Z){let{id:q,start:J,end:_,size:V}=o;if(o.next(),V>=0&&q<l){let F=Z;if(V>4){let H=o.pos-(V-4);for(;o.pos>H;)Z=S(I,j,Z)}j[--Z]=F,j[--Z]=_-I,j[--Z]=J-I,j[--Z]=q}else V==-3?h=q:V==-4&&(f=q);return Z}let C=[],Q=[];for(;o.pos>0;)p(n.start||0,n.bufferStart||0,C,Q,-1,0);let R=(e=n.length)!==null&&e!==void 0?e:C.length?Q[0]+C[0].length:0;return new Je(u[n.topID],C.reverse(),Q.reverse(),R)}const nw=new WeakMap;function _f(n,e){if(!n.isAnonymous||e instanceof Zs||e.type!=n)return 1;let t=nw.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Je)){t=1;break}t+=_f(n,r)}nw.set(e,t)}return t}function L0(n,e,t,r,i,s,l,o,u){let h=0;for(let k=r;k<i;k++)h+=_f(n,e[k]);let f=Math.ceil(h*1.5/8),p=[],m=[];function O(k,b,w,S,C){for(let Q=w;Q<S;){let R=Q,I=b[Q],j=_f(n,k[Q]);for(Q++;Q<S;Q++){let Z=_f(n,k[Q]);if(j+Z>=f)break;j+=Z}if(Q==R+1){if(j>f){let Z=k[R];O(Z.children,Z.positions,0,Z.children.length,b[R]+C);continue}p.push(k[R])}else{let Z=b[Q-1]+k[Q-1].length-I;p.push(L0(n,k,b,R,Q,I,Z,null,u))}m.push(I+C-s)}}return O(e,t,r,i,0),(o||u)(p,m,l)}class tQ{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof oi?this.setBuffer(e.context.buffer,e.index,t):e instanceof hn&&this.map.set(e.tree,t)}get(e){return e instanceof oi?this.getBuffer(e.context.buffer,e.index):e instanceof hn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Li{constructor(e,t,r,i,s=!1,l=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(s?1:0)|(l?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new Li(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],s=1,l=e.length?e[0]:null;for(let o=0,u=0,h=0;;o++){let f=o<t.length?t[o]:null,p=f?f.fromA:1e9;if(p-u>=r)for(;l&&l.from<p;){let m=l;if(u>=m.from||p<=m.to||h){let O=Math.max(m.from,u)-h,k=Math.min(m.to,p)-h;m=O>=k?null:new Li(O,k,m.tree,m.offset+h,o>0,!!f)}if(m&&i.push(m),l.to>p)break;l=s<e.length?e[s++]:null}if(!f)break;u=f.toA,h=f.toA-f.toB}return i}}class _0{startParse(e,t,r){return typeof e=="string"&&(e=new z_(e)),r=r?r.length?r.map(i=>new Or(i.from,i.to)):[new Or(0,0)]:[new Or(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let s=i.advance();if(s)return s}}}class z_{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function nQ(n){return(e,t,r,i)=>new X_(e,n,t,r,i)}class rw{constructor(e,t,r,i,s,l){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=s,this.from=l}}function iw(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class Z_{constructor(e,t,r,i,s,l,o,u){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=s,this.bracketed=l,this.target=o,this.prev=u,this.depth=0,this.ranges=[]}}const ky=new Ne({perNode:!0});class X_{constructor(e,t,r,i,s){this.nest=t,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Je(r.type,r.children,r.positions,r.length,r.propValues.concat([[ky,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Ne.mounted.id]=new Mo(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new V_(this.fragments),t=null,r=null,i=new od(new hn(this.baseTree,this.ranges[0].from,0,null),et.IncludeAnonymous|et.IgnoreMounts);e:for(let s,l;;){let o=!0,u;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)o=!1;else if(e.hasNode(i)){if(t){let h=t.mounts.find(f=>f.frag.from<=i.from&&f.frag.to>=i.to&&f.mount.overlay);if(h)for(let f of h.mount.overlay){let p=f.from+h.pos,m=f.to+h.pos;p>=i.from&&m<=i.to&&!t.ranges.some(O=>O.from<m&&O.to>p)&&t.ranges.push({from:p,to:m})}}o=!1}else if(r&&(l=B_(r.ranges,i.from,i.to)))o=l!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(W_(i),t&&t.depth++,r&&r.depth++);let h=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new Z_(s.parser,s.overlay,h,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let f=ow(this.ranges,s.overlay||(i.from<i.to?[new Or(i.from,i.to)]:[]));f.length&&iw(f),(f.length||!s.overlay)&&this.inner.push(new rw(s.parser,f.length?s.parser.startParse(this.input,aw(h,f),f):s.parser.startParse(""),s.overlay?s.overlay.map(p=>new Or(p.from-i.from,p.to-i.from)):null,!!s.bracketed,i.tree,f.length?f[0].from:i.from)),s.overlay?f.length&&(r={ranges:f,depth:0,prev:r}):o=!1}}else if(t&&(u=t.predicate(i))&&(u===!0&&(u=new Or(i.from,i.to)),u.from<u.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==u.from?t.ranges[h]={from:t.ranges[h].from,to:u.to}:t.ranges.push(u)}if(o&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let h=ow(this.ranges,t.ranges);h.length&&(iw(h),this.inner.splice(t.index,0,new rw(t.parser,t.parser.startParse(this.input,aw(t.mounts,h),h),t.ranges.map(f=>new Or(f.from-t.start,f.to-t.start)),t.bracketed,t.target,h[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function B_(n,e,t){for(let r of n){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function sw(n,e,t,r,i,s){if(e<t){let l=n.buffer[e+1];r.push(n.slice(e,t,l)),i.push(l-s)}}function W_(n){let{node:e}=n,t=[],r=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let i=n.tree,s=i.children.indexOf(r),l=i.children[s],o=l.buffer,u=[s];function h(f,p,m,O,k,b){let w=t[b],S=[],C=[];sw(l,f,w,S,C,O);let Q=o[w+1],R=o[w+2];u.push(S.length);let I=b?h(w+4,o[w+3],l.set.types[o[w]],Q,R-Q,b-1):e.toTree();return S.push(I),C.push(Q-O),sw(l,o[w+3],p,S,C,O),new Je(m,S,C,k)}i.children[s]=h(0,o.length,_t.none,0,l.length,t.length-1);for(let f of u){let p=n.tree.children[f],m=n.tree.positions[f];n.yield(new hn(p,m+n.from,f,n._tree))}}class lw{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(et.IncludeAnonymous|et.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)if(!(t.to>=e&&t.enter(r,1,et.IgnoreOverlays|et.ExcludeBuffers)))if(t.to<=e)t.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Je)t=t.children[0];else break}return!1}}let V_=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(ky))!==null&&t!==void 0?t:r.to,this.inner=new lw(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(ky))!==null&&e!==void 0?e:t.to,this.inner=new lw(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let l=(r=s.tree)===null||r===void 0?void 0:r.prop(Ne.mounted);if(l&&l.parser==t)for(let o=this.fragI;o<this.fragments.length;o++){let u=this.fragments[o];if(u.from>=s.to)break;u.tree==this.curFrag.tree&&i.push({frag:u,pos:s.from-u.offset,mount:l})}}}return i}};function ow(n,e){let t=null,r=e;for(let i=1,s=0;i<n.length;i++){let l=n[i-1].to,o=n[i].from;for(;s<r.length;s++){let u=r[s];if(u.from>=o)break;u.to<=l||(t||(r=t=e.slice()),u.from<l?(t[s]=new Or(u.from,l),u.to>o&&t.splice(s+1,0,new Or(o,u.to))):u.to>o?t[s--]=new Or(o,u.to):t.splice(s--,1))}}return r}function q_(n,e,t,r){let i=0,s=0,l=!1,o=!1,u=-1e9,h=[];for(;;){let f=i==n.length?1e9:l?n[i].to:n[i].from,p=s==e.length?1e9:o?e[s].to:e[s].from;if(l!=o){let m=Math.max(u,t),O=Math.min(f,p,r);m<O&&h.push(new Or(m,O))}if(u=Math.min(f,p),u==1e9)break;f==u&&(l?(l=!1,i++):l=!0),p==u&&(o?(o=!1,s++):o=!0)}return h}function aw(n,e){let t=[];for(let{pos:r,mount:i,frag:s}of n){let l=r+(i.overlay?i.overlay[0].from:0),o=l+i.tree.length,u=Math.max(s.from,l),h=Math.min(s.to,o);if(i.overlay){let f=i.overlay.map(m=>new Or(m.from+r,m.to+r)),p=q_(e,f,u,h);for(let m=0,O=u;;m++){let k=m==p.length,b=k?h:p[m].from;if(b>O&&t.push(new Li(O,b,i.tree,-l,s.from>=O||s.openStart,s.to<=b||s.openEnd)),k)break;O=p[m].to}}else t.push(new Li(u,h,i.tree,-l,s.from>=l||s.openStart,s.to<=o||s.openEnd))}return t}let F_=0;class er{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=F_++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof er&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new er(r,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new ad(e);return r=>r.modified.indexOf(t)>-1?r:ad.get(r.base||r,r.modified.concat(t).sort((i,s)=>i.id-s.id))}}let Y_=0;class ad{constructor(e){this.name=e,this.instances=[],this.id=Y_++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(o=>o.base==e&&U_(t,o.modified));if(r)return r;let i=[],s=new er(e.name,i,e,t);for(let o of t)o.instances.push(s);let l=G_(t);for(let o of e.set)if(!o.modified.length)for(let u of l)i.push(ad.get(o,u));return s}}function U_(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function G_(n){let e=[[]];for(let t=0;t<n.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(n[t]));return e.sort((t,r)=>r.length-t.length)}function ma(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let s=[],l=2,o=i;for(let p=0;;){if(o=="..."&&p>0&&p+3==i.length){l=1;break}let m=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!m)throw new RangeError("Invalid path: "+i);if(s.push(m[0]=="*"?"":m[0][0]=='"'?JSON.parse(m[0]):m[0]),p+=m[0].length,p==i.length)break;let O=i[p++];if(p==i.length&&O=="!"){l=0;break}if(O!="/")throw new RangeError("Invalid path: "+i);o=i.slice(p)}let u=s.length-1,h=s[u];if(!h)throw new RangeError("Invalid path: "+i);let f=new tc(r,l,u>0?s.slice(0,u):null);e[h]=f.sort(e[h])}}return rQ.add(e)}const rQ=new Ne({combine(n,e){let t,r,i;for(;n||e;){if(!n||e&&n.depth>=e.depth?(i=e,e=e.next):(i=n,n=n.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new tc(i.tags,i.mode,i.context);t?t.next=s:r=s,t=s}return r}});class tc{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}tc.empty=new tc([],2,null);function iQ(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let l of s.tag)t[l.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let l=i;for(let o of s)for(let u of o.set){let h=t[u.id];if(h){l=l?l+" "+h:h;break}}return l},scope:r}}function H_(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function K_(n,e,t,r=0,i=n.length){let s=new J_(r,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),r,i,"",s.highlighters),s.flush(i)}class J_{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,s){let{type:l,from:o,to:u}=e;if(o>=r||u<=t)return;l.isTop&&(s=this.highlighters.filter(O=>!O.scope||O.scope(l)));let h=i,f=e4(e)||tc.empty,p=H_(s,f.tags);if(p&&(h&&(h+=" "),h+=p,f.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(t,o),h),f.opaque)return;let m=e.tree&&e.tree.prop(Ne.mounted);if(m&&m.overlay){let O=e.node.enter(m.overlay[0].from+o,1),k=this.highlighters.filter(w=>!w.scope||w.scope(m.tree.type)),b=e.firstChild();for(let w=0,S=o;;w++){let C=w<m.overlay.length?m.overlay[w]:null,Q=C?C.from+o:u,R=Math.max(t,S),I=Math.min(r,Q);if(R<I&&b)for(;e.from<I&&(this.highlightRange(e,R,I,i,s),this.startSpan(Math.min(I,e.to),h),!(e.to>=Q||!e.nextSibling())););if(!C||Q>r)break;S=C.to+o,S>t&&(this.highlightRange(O.cursor(),Math.max(t,C.from+o),Math.min(r,S),"",k),this.startSpan(Math.min(r,S),h))}b&&e.parent()}else if(e.firstChild()){m&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,s),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function e4(n){let e=n.type.prop(rQ);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const he=er.define,pf=he(),ks=he(),uw=he(ks),cw=he(ks),vs=he(),mf=he(vs),vg=he(vs),Kr=he(),al=he(Kr),Gr=he(),Hr=he(),vy=he(),fu=he(vy),gf=he(),T={comment:pf,lineComment:he(pf),blockComment:he(pf),docComment:he(pf),name:ks,variableName:he(ks),typeName:uw,tagName:he(uw),propertyName:cw,attributeName:he(cw),className:he(ks),labelName:he(ks),namespace:he(ks),macroName:he(ks),literal:vs,string:mf,docString:he(mf),character:he(mf),attributeValue:he(mf),number:vg,integer:he(vg),float:he(vg),bool:he(vs),regexp:he(vs),escape:he(vs),color:he(vs),url:he(vs),keyword:Gr,self:he(Gr),null:he(Gr),atom:he(Gr),unit:he(Gr),modifier:he(Gr),operatorKeyword:he(Gr),controlKeyword:he(Gr),definitionKeyword:he(Gr),moduleKeyword:he(Gr),operator:Hr,derefOperator:he(Hr),arithmeticOperator:he(Hr),logicOperator:he(Hr),bitwiseOperator:he(Hr),compareOperator:he(Hr),updateOperator:he(Hr),definitionOperator:he(Hr),typeOperator:he(Hr),controlOperator:he(Hr),punctuation:vy,separator:he(vy),bracket:fu,angleBracket:he(fu),squareBracket:he(fu),paren:he(fu),brace:he(fu),content:Kr,heading:al,heading1:he(al),heading2:he(al),heading3:he(al),heading4:he(al),heading5:he(al),heading6:he(al),contentSeparator:he(Kr),list:he(Kr),quote:he(Kr),emphasis:he(Kr),strong:he(Kr),link:he(Kr),monospace:he(Kr),strikethrough:he(Kr),inserted:he(),deleted:he(),changed:he(),invalid:he(),meta:gf,documentMeta:he(gf),annotation:he(gf),processingInstruction:he(gf),definition:er.defineModifier("definition"),constant:er.defineModifier("constant"),function:er.defineModifier("function"),standard:er.defineModifier("standard"),local:er.defineModifier("local"),special:er.defineModifier("special")};for(let n in T){let e=T[n];e instanceof er&&(e.name=n)}iQ([{tag:T.link,class:"tok-link"},{tag:T.heading,class:"tok-heading"},{tag:T.emphasis,class:"tok-emphasis"},{tag:T.strong,class:"tok-strong"},{tag:T.keyword,class:"tok-keyword"},{tag:T.atom,class:"tok-atom"},{tag:T.bool,class:"tok-bool"},{tag:T.url,class:"tok-url"},{tag:T.labelName,class:"tok-labelName"},{tag:T.inserted,class:"tok-inserted"},{tag:T.deleted,class:"tok-deleted"},{tag:T.literal,class:"tok-literal"},{tag:T.string,class:"tok-string"},{tag:T.number,class:"tok-number"},{tag:[T.regexp,T.escape,T.special(T.string)],class:"tok-string2"},{tag:T.variableName,class:"tok-variableName"},{tag:T.local(T.variableName),class:"tok-variableName tok-local"},{tag:T.definition(T.variableName),class:"tok-variableName tok-definition"},{tag:T.special(T.variableName),class:"tok-variableName2"},{tag:T.definition(T.propertyName),class:"tok-propertyName tok-definition"},{tag:T.typeName,class:"tok-typeName"},{tag:T.namespace,class:"tok-namespace"},{tag:T.className,class:"tok-className"},{tag:T.macroName,class:"tok-macroName"},{tag:T.propertyName,class:"tok-propertyName"},{tag:T.operator,class:"tok-operator"},{tag:T.comment,class:"tok-comment"},{tag:T.meta,class:"tok-meta"},{tag:T.invalid,class:"tok-invalid"},{tag:T.punctuation,class:"tok-punctuation"}]);var bg;const yl=new Ne;function D0(n){return pe.define({combine:n?e=>e.concat(n):void 0})}const I0=new Ne;class yr{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Ve.prototype.hasOwnProperty("tree")||Object.defineProperty(Ve.prototype,"tree",{get(){return ct(this)}}),this.parser=t,this.extension=[Xs.of(this),Ve.languageData.of((s,l,o)=>{let u=hw(s,l,o),h=u.type.prop(yl);if(!h)return[];let f=s.facet(h),p=u.type.prop(I0);if(p){let m=u.resolve(l-u.from,o);for(let O of p)if(O.test(m,s)){let k=s.facet(O.facet);return O.type=="replace"?k:k.concat(f)}}return f})].concat(r)}isActiveAt(e,t,r=-1){return hw(e,t,r).type.prop(yl)==this.data}findRegions(e){let t=e.facet(Xs);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(s,l)=>{if(s.prop(yl)==this.data){r.push({from:l,to:l+s.length});return}let o=s.prop(Ne.mounted);if(o){if(o.tree.prop(yl)==this.data){if(o.overlay)for(let u of o.overlay)r.push({from:u.from+l,to:u.to+l});else r.push({from:l,to:l+s.length});return}else if(o.overlay){let u=r.length;if(i(o.tree,o.overlay[0].from+l),r.length>u)return}}for(let u=0;u<s.children.length;u++){let h=s.children[u];h instanceof Je&&i(h,s.positions[u]+l)}};return i(ct(e),0),r}get allowsNesting(){return!0}}yr.setState=Re.define();function hw(n,e,t){let r=n.facet(Xs),i=ct(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,t,et.ExcludeBuffers|et.EnterBracketed))s.type.isTop&&(i=s);return i}class ta extends yr{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=D0(e.languageData);return new ta(t,e.parser.configure({props:[yl.add(r=>r.isTop?t:void 0)]}),e.name)}configure(e,t){return new ta(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ct(n){let e=n.field(yr.state,!1);return e?e.tree:Je.empty}class t4{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let du=null;class nc{constructor(e,t,r=[],i,s,l,o,u){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=l,this.skipped=o,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new nc(e,t,[],Je.empty,0,r,[],null)}startParse(){return this.parser.startParse(new t4(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Je.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Li.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Li.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=du;du=this;try{return e()}finally{du=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=fw(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:s,viewport:l,skipped:o}=this;if(this.takeTree(),!e.empty){let u=[];if(e.iterChangedRanges((h,f,p,m)=>u.push({fromA:h,toA:f,fromB:p,toB:m})),r=Li.applyChanges(r,u),i=Je.empty,s=0,l={from:e.mapPos(l.from,-1),to:e.mapPos(l.to,1)},this.skipped.length){o=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),p=e.mapPos(h.to,-1);f<p&&o.push({from:f,to:p})}}}return new nc(this.parser,t,r,i,s,l,o,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=fw(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends _0{createParse(t,r,i){let s=i[0].from,l=i[i.length-1].to;return{parsedPos:s,advance(){let u=du;if(u){for(let h of i)u.tempSkipped.push(h);e&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,e]):e)}return this.parsedPos=l,new Je(_t.none,[],[],l-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return du}}function fw(n,e,t){return Li.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class na{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new na(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=nc.create(e.facet(Xs).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new na(r)}}yr.state=Jt.define({create:na.init,update(n,e){for(let t of e.effects)if(t.is(yr.setState))return t.value;return e.startState.facet(Xs)!=e.state.facet(Xs)?na.init(e.state):n.apply(e)}});let sQ=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(sQ=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const wg=typeof navigator<"u"&&(!((bg=navigator.scheduling)===null||bg===void 0)&&bg.isInputPending)?()=>navigator.scheduling.isInputPending():null,n4=Pt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(yr.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(yr.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=sQ(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(yr.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let l=Date.now()+Math.min(this.chunkBudget,100,e&&!wg?Math.max(25,e.timeRemaining()-5):1e9),o=s.context.treeLen<i&&r.doc.length>i+1e3,u=s.context.work(()=>wg&&wg()||Date.now()>l,i+(o?0:1e5));this.chunkBudget-=Date.now()-t,(u||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:yr.setState.of(new na(s.context))})),this.chunkBudget>0&&!(u&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Nn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Xs=pe.define({combine(n){return n.length?n[0]:null},enables:n=>[yr.state,n4,ce.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class rc{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class ud{constructor(e,t,r,i,s,l=void 0){this.name=e,this.alias=t,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=l,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:r}=e;if(!t){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(r)}return new ud(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,t,r)}static matchFilename(e,t){for(let i of e)if(i.filename&&i.filename.test(t))return i;let r=/\.([^.]+)$/.exec(t);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,t,r=!0){t=t.toLowerCase();for(let i of e)if(i.alias.some(s=>s==t))return i;if(r)for(let i of e)for(let s of i.alias){let l=t.indexOf(s);if(l>-1&&(s.length>2||!/\w/.test(t[l-1])&&!/\w/.test(t[l+s.length])))return i}return null}}const r4=pe.define(),ga=pe.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function cd(n){let e=n.facet(ga);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function ic(n,e){let t="",r=n.tabSize,i=n.facet(ga)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let s=0;s<e;s++)t+=i;return t}function z0(n,e){n instanceof Ve&&(n=new Yd(n));for(let r of n.state.facet(r4)){let i=r(n,e);if(i!==void 0)return i}let t=ct(n.state);return t.length>=e?i4(n,t,e):null}class Yd{constructor(e,t={}){this.state=e,this.options=t,this.unit=cd(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,t);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.countColumn(r,e-i),l=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return l>-1&&(s+=l-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return _r(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let l=s(i);if(l>-1)return l}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const jc=new Ne;function i4(n,e,t){let r=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=r.node){let s=[];for(let l=i;l&&!(l.from<r.node.from||l.to>r.node.to||l.from==r.node.from&&l.type==r.node.type);l=l.parent)s.push(l);for(let l=s.length-1;l>=0;l--)r={node:s[l],next:r}}return lQ(r,n,t)}function lQ(n,e,t){for(let r=n;r;r=r.next){let i=l4(r.node);if(i)return i(Z0.create(e,t,r))}return 0}function s4(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function l4(n){let e=n.type.prop(jc);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(Ne.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return l=>oQ(l,!0,1,void 0,s&&!s4(l)?i.from:void 0)}return n.parent==null?o4:null}function o4(){return 0}class Z0 extends Yd{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new Z0(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(a4(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return lQ(this.context.next,this.base,this.pos)}}function a4(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function u4(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),l=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let o=t.to;;){let u=e.childAfter(o);if(!u||u==r)return null;if(!u.type.isSkipped){if(u.from>=l)return null;let h=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+h}}o=u.to}}function c4({closing:n,align:e=!0,units:t=1}){return r=>oQ(r,e,t,n)}function oQ(n,e,t,r,i){let s=n.textAfter,l=s.match(/^\s*/)[0].length,o=r&&s.slice(l,l+r.length)==r||i==n.pos+l,u=e?u4(n):null;return u?o?n.column(u.from):n.column(u.to):n.baseIndent+(o?0:n.unit*t)}const h4=n=>n.baseIndent;function Df({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const f4=200;function d4(){return Ve.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+f4)return n;let s=t.sliceString(i.from,r);if(!e.some(h=>h.test(s)))return n;let{state:l}=n,o=-1,u=[];for(let{head:h}of l.selection.ranges){let f=l.doc.lineAt(h);if(f.from==o)continue;o=f.from;let p=z0(l,f.from);if(p==null)continue;let m=/^\s*/.exec(f.text)[0],O=ic(l,p);m!=O&&u.push({from:f.from,to:f.from+m.length,insert:O})}return u.length?[n,{changes:u,sequential:!0}]:n})}const aQ=pe.define(),Oa=new Ne;function uQ(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}function p4(n,e,t){let r=ct(n);if(r.length<t)return null;let i=r.resolveStack(t,1),s=null;for(let l=i;l;l=l.next){let o=l.node;if(o.to<=t||o.from>t)continue;if(s&&o.from<e)break;let u=o.type.prop(Oa);if(u&&(o.to<r.length-50||r.length==n.doc.length||!m4(o))){let h=u(o,n);h&&h.from<=t&&h.from>=e&&h.to>t&&(s=h)}}return s}function m4(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function hd(n,e,t){for(let r of n.facet(aQ)){let i=r(n,e,t);if(i)return i}return p4(n,e,t)}function cQ(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const Ud=Re.define({map:cQ}),Ec=Re.define({map:cQ});function hQ(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const _l=Jt.define({create(){return Qe.none},update(n,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,r)=>n=dw(n,t,r)),n=n.map(e.changes);for(let t of e.effects)if(t.is(Ud)&&!g4(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(pQ),i=r?Qe.replace({widget:new w4(r(e.state,t.value))}):pw;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(Ec)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(n=dw(n,e.selection.main.head)),n},provide:n=>ce.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let r=n[t++],i=n[t++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(pw.range(r,i))}return Qe.set(e,!0)}});function dw(n,e,t=e){let r=!1;return n.between(e,t,(i,s)=>{i<t&&s>e&&(r=!0)}),r?n.update({filterFrom:e,filterTo:t,filter:(i,s)=>i>=t||s<=e}):n}function fd(n,e,t){var r;let i=null;return(r=n.field(_l,!1))===null||r===void 0||r.between(e,t,(s,l)=>{(!i||i.from>s)&&(i={from:s,to:l})}),i}function g4(n,e,t){let r=!1;return n.between(e,e,(i,s)=>{i==e&&s==t&&(r=!0)}),r}function fQ(n,e){return n.field(_l,!1)?e:e.concat(Re.appendConfig.of(mQ()))}const O4=n=>{for(let e of hQ(n)){let t=hd(n.state,e.from,e.to);if(t)return n.dispatch({effects:fQ(n.state,[Ud.of(t),dQ(n,t)])}),!0}return!1},y4=n=>{if(!n.state.field(_l,!1))return!1;let e=[];for(let t of hQ(n)){let r=fd(n.state,t.from,t.to);r&&e.push(Ec.of(r),dQ(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function dQ(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return ce.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const x4=n=>{let{state:e}=n,t=[];for(let r=0;r<e.doc.length;){let i=n.lineBlockAt(r),s=hd(e,i.from,i.to);s&&t.push(Ud.of(s)),r=(s?n.lineBlockAt(s.to):i).to+1}return t.length&&n.dispatch({effects:fQ(n.state,t)}),!!t.length},k4=n=>{let e=n.state.field(_l,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(Ec.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},v4=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:O4},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:y4},{key:"Ctrl-Alt-[",run:x4},{key:"Ctrl-Alt-]",run:k4}],b4={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},pQ=pe.define({combine(n){return gi(n,b4)}});function mQ(n){return[_l,C4]}function gQ(n,e){let{state:t}=n,r=t.facet(pQ),i=l=>{let o=n.lineBlockAt(n.posAtDOM(l.target)),u=fd(n.state,o.from,o.to);u&&n.dispatch({effects:Ec.of(u)}),l.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const pw=Qe.replace({widget:new class extends zr{toDOM(n){return gQ(n,null)}}});class w4 extends zr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return gQ(e,this.value)}}const S4={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Sg extends zi{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function P4(n={}){let e={...S4,...n},t=new Sg(e,!0),r=new Sg(e,!1),i=Pt.fromClass(class{constructor(l){this.from=l.viewport.from,this.markers=this.buildMarkers(l)}update(l){(l.docChanged||l.viewportChanged||l.startState.facet(Xs)!=l.state.facet(Xs)||l.startState.field(_l,!1)!=l.state.field(_l,!1)||ct(l.startState)!=ct(l.state)||e.foldingChanged(l))&&(this.markers=this.buildMarkers(l.view))}buildMarkers(l){let o=new Di;for(let u of l.viewportLineBlocks){let h=fd(l.state,u.from,u.to)?r:hd(l.state,u.from,u.to)?t:null;h&&o.add(u.from,u.from,h)}return o.finish()}}),{domEventHandlers:s}=e;return[i,w_({class:"cm-foldGutter",markers(l){var o;return((o=l.plugin(i))===null||o===void 0?void 0:o.markers)||Be.empty},initialSpacer(){return new Sg(e,!1)},domEventHandlers:{...s,click:(l,o,u)=>{if(s.click&&s.click(l,o,u))return!0;let h=fd(l.state,o.from,o.to);if(h)return l.dispatch({effects:Ec.of(h)}),!0;let f=hd(l.state,o.from,o.to);return f?(l.dispatch({effects:Ud.of(f)}),!0):!1}}}),mQ()]}const C4=ce.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Mc{constructor(e,t){this.specs=e;let r;function i(o){let u=Ds.newName();return(r||(r=Object.create(null)))["."+u]=o,u}const s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,l=t.scope;this.scope=l instanceof yr?o=>o.prop(yl)==l.data:l?o=>o==l:void 0,this.style=iQ(e.map(o=>({tag:o.tag,class:o.class||i(Object.assign({},o,{tag:null}))})),{all:s}).style,this.module=r?new Ds(r):null,this.themeType=t.themeType}static define(e,t){return new Mc(e,t||{})}}const by=pe.define(),OQ=pe.define({combine(n){return n.length?[n[0]]:null}});function Pg(n){let e=n.facet(by);return e.length?e:n.facet(OQ)}function yQ(n,e){let t=[$4],r;return n instanceof Mc&&(n.module&&t.push(ce.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push(OQ.of(n)):r?t.push(by.computeN([ce.darkTheme],i=>i.facet(ce.darkTheme)==(r=="dark")?[n]:[])):t.push(by.of(n)),t}class Q4{constructor(e){this.markCache=Object.create(null),this.tree=ct(e.state),this.decorations=this.buildDeco(e,Pg(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=ct(e.state),r=Pg(e.state),i=r!=Pg(e.startState),{viewport:s}=e.view,l=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&l>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=l):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Qe.none;let r=new Di;for(let{from:i,to:s}of e.visibleRanges)K_(this.tree,t,(l,o,u)=>{r.add(l,o,this.markCache[u]||(this.markCache[u]=Qe.mark({class:u})))},i,s);return r.finish()}}const $4=Bi.high(Pt.fromClass(Q4,{decorations:n=>n.decorations})),T4=Mc.define([{tag:T.meta,color:"#404740"},{tag:T.link,textDecoration:"underline"},{tag:T.heading,textDecoration:"underline",fontWeight:"bold"},{tag:T.emphasis,fontStyle:"italic"},{tag:T.strong,fontWeight:"bold"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.keyword,color:"#708"},{tag:[T.atom,T.bool,T.url,T.contentSeparator,T.labelName],color:"#219"},{tag:[T.literal,T.inserted],color:"#164"},{tag:[T.string,T.deleted],color:"#a11"},{tag:[T.regexp,T.escape,T.special(T.string)],color:"#e40"},{tag:T.definition(T.variableName),color:"#00f"},{tag:T.local(T.variableName),color:"#30a"},{tag:[T.typeName,T.namespace],color:"#085"},{tag:T.className,color:"#167"},{tag:[T.special(T.variableName),T.macroName],color:"#256"},{tag:T.definition(T.propertyName),color:"#00c"},{tag:T.comment,color:"#940"},{tag:T.invalid,color:"#f00"}]),j4=ce.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),xQ=1e4,kQ="()[]{}",vQ=pe.define({combine(n){return gi(n,{afterCursor:!0,brackets:kQ,maxScanDistance:xQ,renderMatch:A4})}}),E4=Qe.mark({class:"cm-matchingBracket"}),M4=Qe.mark({class:"cm-nonmatchingBracket"});function A4(n){let e=[],t=n.matched?E4:M4;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}function mw(n){let e=[],t=n.facet(vQ);for(let r of n.selection.ranges){if(!r.empty)continue;let i=ai(n,r.head,-1,t)||r.head>0&&ai(n,r.head-1,1,t)||t.afterCursor&&(ai(n,r.head,1,t)||r.head<n.doc.length&&ai(n,r.head+1,-1,t));i&&(e=e.concat(t.renderMatch(i,n)))}return Qe.set(e,!0)}const R4=Pt.fromClass(class{constructor(n){this.paused=!1,this.decorations=mw(n.state)}update(n){(n.docChanged||n.selectionSet||this.paused)&&(n.view.composing?(this.decorations=this.decorations.map(n.changes),this.paused=!0):(this.decorations=mw(n.state),this.paused=!1))}},{decorations:n=>n.decorations}),N4=[R4,j4];function L4(n={}){return[vQ.of(n),N4]}const bQ=new Ne;function wy(n,e,t){let r=n.prop(e<0?Ne.openedBy:Ne.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function Sy(n){let e=n.type.prop(bQ);return e?e(n.node):n}function ai(n,e,t,r={}){let i=r.maxScanDistance||xQ,s=r.brackets||kQ,l=ct(n),o=l.resolveInner(e,t);for(let u=o;u;u=u.parent){let h=wy(u.type,t,s);if(h&&u.from<u.to){let f=Sy(u);if(f&&(t>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return _4(n,e,t,u,f,h,s)}}return D4(n,e,t,l,o.type,i,s)}function _4(n,e,t,r,i,s,l){let o=r.parent,u={from:i.from,to:i.to},h=0,f=o==null?void 0:o.cursor();if(f&&(t<0?f.childBefore(r.from):f.childAfter(r.to)))do if(t<0?f.to<=r.from:f.from>=r.to){if(h==0&&s.indexOf(f.type.name)>-1&&f.from<f.to){let p=Sy(f);return{start:u,end:p?{from:p.from,to:p.to}:void 0,matched:!0}}else if(wy(f.type,t,l))h++;else if(wy(f.type,-t,l)){if(h==0){let p=Sy(f);return{start:u,end:p&&p.from<p.to?{from:p.from,to:p.to}:void 0,matched:!1}}h--}}while(t<0?f.prevSibling():f.nextSibling());return{start:u,matched:!1}}function D4(n,e,t,r,i,s,l){if(t<0?!e:e==n.doc.length)return null;let o=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),u=l.indexOf(o);if(u<0||u%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},f=n.doc.iterRange(e,t>0?n.doc.length:0),p=0;for(let m=0;!f.next().done&&m<=s;){let O=f.value;t<0&&(m+=O.length);let k=e+m*t;for(let b=t>0?0:O.length-1,w=t>0?O.length:-1;b!=w;b+=t){let S=l.indexOf(O[b]);if(!(S<0||r.resolveInner(k+b,1).type!=i))if(S%2==0==t>0)p++;else{if(p==1)return{start:h,end:{from:k+b,to:k+b+1},matched:S>>1==u>>1};p--}}t>0&&(m+=O.length)}return f.done?{start:h,matched:!1}:null}const I4=Object.create(null),gw=[_t.none],Ow=[],yw=Object.create(null),z4=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])z4[n]=Z4(I4,e);function Cg(n,e){Ow.indexOf(n)>-1||(Ow.push(n),console.warn(e))}function Z4(n,e){let t=[];for(let o of e.split(" ")){let u=[];for(let h of o.split(".")){let f=n[h]||T[h];f?typeof f=="function"?u.length?u=u.map(f):Cg(h,`Modifier ${h} used at start of tag`):u.length?Cg(h,`Tag ${h} used as modifier`):u=Array.isArray(f)?f:[f]:Cg(h,`Unknown highlighting tag ${h}`)}for(let h of u)t.push(h)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(o=>o.id),s=yw[i];if(s)return s.id;let l=yw[i]=_t.define({id:gw.length,name:r,props:[ma({[r]:t})]});return gw.push(l),l.id}at.RTL,at.LTR;class X0{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ct(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),s=i.search(SQ(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function xw(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function X4(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=xw(e)+xw(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function wQ(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:X4(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function B4(n,e){return t=>{for(let r=ct(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class kw{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function jl(n){return n.selection.main.from}function SQ(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?n:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const B0=mi.define();function W4(n,e,t,r){let{main:i}=n.selection,s=t-i.from,l=r-i.from;return{...n.changeByRange(o=>{if(o!=i&&t!=r&&n.sliceDoc(o.from+s,o.from+l)!=n.sliceDoc(t,r))return{range:o};let u=n.toText(e);return{changes:{from:o.from+s,to:r==i.from?o.to:o.from+l,insert:u},range:U.cursor(o.from+s+u.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const vw=new WeakMap;function V4(n){if(!Array.isArray(n))return n;let e=vw.get(n);return e||vw.set(n,e=wQ(n)),e}const dd=Re.define(),sc=Re.define();class q4{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=Mn(e,t),i=ii(r);this.chars.push(r);let s=e.slice(t,t+i),l=s.toUpperCase();this.folded.push(Mn(l==s?s.toLowerCase():l,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:r,any:i,precise:s,byWord:l}=this;if(t.length==1){let C=Mn(e,0),Q=ii(C),R=Q==e.length?0:-100;if(C!=t[0])if(C==r[0])R+=-200;else return null;return this.ret(R,[0,Q])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let u=t.length,h=0;if(o<0){for(let C=0,Q=Math.min(e.length,200);C<Q&&h<u;){let R=Mn(e,C);(R==t[h]||R==r[h])&&(i[h++]=C),C+=ii(R)}if(h<u)return null}let f=0,p=0,m=!1,O=0,k=-1,b=-1,w=/[a-z]/.test(e),S=!0;for(let C=0,Q=Math.min(e.length,200),R=0;C<Q&&p<u;){let I=Mn(e,C);o<0&&(f<u&&I==t[f]&&(s[f++]=C),O<u&&(I==t[O]||I==r[O]?(O==0&&(k=C),b=C+1,O++):O=0));let j,Z=I<255?I>=48&&I<=57||I>=97&&I<=122?2:I>=65&&I<=90?1:0:(j=m0(I))!=j.toLowerCase()?1:j!=j.toUpperCase()?2:0;(!C||Z==1&&w||R==0&&Z!=0)&&(t[p]==I||r[p]==I&&(m=!0)?l[p++]=C:l.length&&(S=!1)),R=Z,C+=ii(I)}return p==u&&l[0]==0&&S?this.result(-100+(m?-200:0),l,e):O==u&&k==0?this.ret(-200-e.length+(b==e.length?0:-100),[0,b]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):O==u?this.ret(-900-e.length,[k,b]):p==u?this.result(-100+(m?-200:0)+-700+(S?0:-1100),l,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],s=0;for(let l of t){let o=l+(this.astral?ii(Mn(r,l)):1);s&&i[s-1]==l?i[s-1]=o:(i[s++]=l,i[s++]=o)}return this.ret(e-r.length,i)}}class F4{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),r=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,t.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Bt=pe.define({combine(n){return gi(n,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Y4,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>bw(e(r),t(r)),optionClass:(e,t)=>r=>bw(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function bw(n,e){return n?e?n+" "+e:n:e}function Y4(n,e,t,r,i,s){let l=n.textDirection==at.RTL,o=l,u=!1,h="top",f,p,m=e.left-i.left,O=i.right-e.right,k=r.right-r.left,b=r.bottom-r.top;if(o&&m<Math.min(k,O)?o=!1:!o&&O<Math.min(k,m)&&(o=!0),k<=(o?m:O))f=Math.max(i.top,Math.min(t.top,i.bottom-b))-e.top,p=Math.min(400,o?m:O);else{u=!0,p=Math.min(400,(l?e.right:i.right-e.left)-30);let C=i.bottom-e.bottom;C>=b||C>e.top?f=t.bottom-e.top:(h="bottom",f=e.bottom-t.top)}let w=(e.bottom-e.top)/s.offsetHeight,S=(e.right-e.left)/s.offsetWidth;return{style:`${h}: ${f/w}px; max-width: ${p/S}px`,class:"cm-completionInfo-"+(u?l?"left-narrow":"right-narrow":o?"left":"right")}}const W0=Re.define();function U4(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,s){let l=document.createElement("span");l.className="cm-completionLabel";let o=t.displayLabel||t.label,u=0;for(let h=0;h<s.length;){let f=s[h++],p=s[h++];f>u&&l.appendChild(document.createTextNode(o.slice(u,f)));let m=l.appendChild(document.createElement("span"));m.appendChild(document.createTextNode(o.slice(f,p))),m.className="cm-completionMatchedText",u=p}return u<o.length&&l.appendChild(document.createTextNode(o.slice(u))),l},position:50},{render(t){if(!t.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=t.detail,r},position:80}),e.sort((t,r)=>t.position-r.position).map(t=>t.render)}function Qg(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.ceil((n-e)/t);return{from:n-r*t,to:n-(r-1)*t}}class G4{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:u=>this.placeInfo(u),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:l}=i.open,o=e.state.facet(Bt);this.optionContent=U4(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Qg(s.length,l,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",u=>{let{options:h}=e.state.field(t).open;for(let f=u.target,p;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(p=/-(\d+)$/.exec(f.id))&&+p[1]<h.length){this.applyCompletion(e,h[+p[1]]),u.preventDefault();return}if(u.target==this.list){let f=this.list.classList.contains("cm-completionListIncompleteTop")&&u.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&u.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;f!=null&&(e.dispatch({effects:W0.of(f)}),u.preventDefault())}}),this.dom.addEventListener("focusout",u=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(Bt).closeOnBlur&&u.relatedTarget!=e.contentDOM&&e.dispatch({effects:sc.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:l,disabled:o}=r.open;(!i.open||i.open.options!=s)&&(this.range=Qg(s.length,l,e.state.facet(Bt).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),o!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Qg(t.options.length,t.selected,this.view.state.facet(Bt).maxRenderedOptions),this.showOptions(t.options,e.id));let r=this.updateSelectedOption(t.selected);if(r){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let l=typeof s=="string"?document.createTextNode(s):s(i);if(!l)return;"then"in l?l.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Nn(this.view.state,o,"completion info")):(this.addInfoPane(l,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return t&&K4(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let l=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:l.clientWidth,bottom:l.clientHeight}}return i.top>Math.min(s.bottom,t.bottom)-10||i.bottom<Math.max(s.top,t.top)+10?null:this.view.state.facet(Bt).positionInfo(this.view,t,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,r){const i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",l=>{l.target==i&&l.preventDefault()});let s=null;for(let l=r.from;l<r.to;l++){let{completion:o,match:u}=e[l],{section:h}=o;if(h){let m=typeof h=="string"?h:h.name;if(m!=s&&(l>r.from||r.from==0))if(s=m,typeof h!="string"&&h.header)i.appendChild(h.header(h));else{let O=i.appendChild(document.createElement("completion-section"));O.textContent=m}}const f=i.appendChild(document.createElement("li"));f.id=t+"-"+l,f.setAttribute("role","option");let p=this.optionClass(o);p&&(f.className=p);for(let m of this.optionContent){let O=m(o,this.view.state,this.view,u);O&&f.appendChild(O)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function H4(n,e){return t=>new G4(t,n,e)}function K4(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.top<t.top?n.scrollTop-=(t.top-r.top)/i:r.bottom>t.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function ww(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function J4(n,e){let t=[],r=null,i=null,s=f=>{t.push(f);let{section:p}=f.completion;if(p){r||(r=[]);let m=typeof p=="string"?p:p.name;r.some(O=>O.name==m)||r.push(typeof p=="string"?{name:m}:p)}},l=e.facet(Bt);for(let f of n)if(f.hasResult()){let p=f.result.getMatch;if(f.result.filter===!1)for(let m of f.result.options)s(new kw(m,f.source,p?p(m):[],1e9-t.length));else{let m=e.sliceDoc(f.from,f.to),O,k=l.filterStrict?new F4(m):new q4(m);for(let b of f.result.options)if(O=k.match(b.label)){let w=b.displayLabel?p?p(b,O.matched):[]:O.matched,S=O.score+(b.boost||0);if(s(new kw(b,f.source,w,S)),typeof b.section=="object"&&b.section.rank==="dynamic"){let{name:C}=b.section;i||(i=Object.create(null)),i[C]=Math.max(S,i[C]||-1e9)}}}}if(r){let f=Object.create(null),p=0,m=(O,k)=>(O.rank==="dynamic"&&k.rank==="dynamic"?i[k.name]-i[O.name]:0)||(typeof O.rank=="number"?O.rank:1e9)-(typeof k.rank=="number"?k.rank:1e9)||(O.name<k.name?-1:1);for(let O of r.sort(m))p-=1e5,f[O.name]=p;for(let O of t){let{section:k}=O.completion;k&&(O.score+=f[typeof k=="string"?k:k.name])}}let o=[],u=null,h=l.compareCompletions;for(let f of t.sort((p,m)=>m.score-p.score||h(p.completion,m.completion))){let p=f.completion;!u||u.label!=p.label||u.detail!=p.detail||u.type!=null&&p.type!=null&&u.type!=p.type||u.apply!=p.apply||u.boost!=p.boost?o.push(f):ww(f.completion)>ww(u)&&(o[o.length-1]=f),u=f.completion}return o}class Qo{constructor(e,t,r,i,s,l){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=l}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Qo(this.options,Sw(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,s,l){if(i&&!l&&e.some(h=>h.isPending))return i.setDisabled();let o=J4(e,t);if(!o.length)return i&&e.some(h=>h.isPending)?i.setDisabled():null;let u=t.facet(Bt).selectOnOpen?0:-1;if(i&&i.selected!=u&&i.selected!=-1){let h=i.options[i.selected].completion;for(let f=0;f<o.length;f++)if(o[f].completion==h){u=f;break}}return new Qo(o,Sw(r,u),{pos:e.reduce((h,f)=>f.hasResult()?Math.min(h,f.from):h,1e8),create:s3,above:s.aboveCursor},i?i.timestamp:Date.now(),u,!1)}map(e){return new Qo(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Qo(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class pd{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new pd(r3,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(Bt),s=(r.override||t.languageDataAt("autocomplete",jl(t)).map(V4)).map(u=>(this.active.find(f=>f.source==u)||new xr(u,this.active.some(f=>f.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((u,h)=>u==this.active[h])&&(s=this.active);let l=this.open,o=e.effects.some(u=>u.is(V0));l&&e.docChanged&&(l=l.map(e.changes)),e.selection||s.some(u=>u.hasResult()&&e.changes.touchesRange(u.from,u.to))||!e3(s,this.active)||o?l=Qo.build(s,t,this.id,l,r,o):l&&l.disabled&&!s.some(u=>u.isPending)&&(l=null),!l&&s.every(u=>!u.isPending)&&s.some(u=>u.hasResult())&&(s=s.map(u=>u.hasResult()?new xr(u.source,0):u));for(let u of e.effects)u.is(W0)&&(l=l&&l.setSelected(u.value,this.id));return s==this.active&&l==this.open?this:new pd(s,this.id,l)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?t3:n3}}function e3(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t<n.length&&!n[t].hasResult();)t++;for(;r<e.length&&!e[r].hasResult();)r++;let i=t==n.length,s=r==e.length;if(i||s)return i==s;if(n[t++].result!=e[r++].result)return!1}}const t3={"aria-autocomplete":"list"},n3={};function Sw(n,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":n};return e>-1&&(t["aria-activedescendant"]=n+"-"+e),t}const r3=[];function PQ(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(B0);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class xr{constructor(e,t,r=!1){this.source=e,this.state=t,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let r=PQ(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new xr(i.source,0)),r&4&&i.state==0&&(i=new xr(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(dd))i=new xr(i.source,1,s.value);else if(s.is(sc))i=new xr(i.source,0);else if(s.is(V0))for(let l of s.value)l.source==i.source&&(i=l);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(jl(e.state))}}class Ao extends xr{constructor(e,t,r,i,s,l){super(e,3,t),this.limit=r,this.result=i,this.from=s,this.to=l}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),l=e.changes.mapPos(this.to,1),o=jl(e.state);if(o>l||!i||t&2&&(jl(e.startState)==this.from||o<this.limit))return new xr(this.source,t&4?1:0);let u=e.changes.mapPos(this.limit);return i3(i.validFor,e.state,s,l)?new Ao(this.source,this.explicit,u,i,s,l):i.update&&(i=i.update(i,s,l,new X0(e.state,o,!1)))?new Ao(this.source,this.explicit,u,i,i.from,(r=i.to)!==null&&r!==void 0?r:jl(e.state)):new xr(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ao(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new xr(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function i3(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):SQ(n,!0).test(i)}const V0=Re.define({map(n,e){return n.map(t=>t.map(e))}}),An=Jt.define({create(){return pd.start()},update(n,e){return n.update(e)},provide:n=>[M0.from(n,e=>e.tooltip),ce.contentAttributes.from(n,e=>e.attrs)]});function q0(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(An).active.find(i=>i.source==e.source);return r instanceof Ao?(typeof t=="string"?n.dispatch({...W4(n.state,t,r.from,r.to),annotations:B0.of(e.completion)}):t(n,e.completion,r.from,r.to),!0):!1}const s3=H4(An,q0);function Of(n,e="option"){return t=>{let r=t.state.field(An,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<t.state.facet(Bt).interactionDelay)return!1;let i=1,s;e=="page"&&(s=VC(t,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:l}=r.open.options,o=r.open.selected>-1?r.open.selected+i*(n?1:-1):n?0:l-1;return o<0?o=e=="page"?0:l-1:o>=l&&(o=e=="page"?l-1:0),t.dispatch({effects:W0.of(o)}),!0}}const l3=n=>{let e=n.state.field(An,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<n.state.facet(Bt).interactionDelay?!1:q0(n,e.open.options[e.open.selected])},$g=n=>n.state.field(An,!1)?(n.dispatch({effects:dd.of(!0)}),!0):!1,o3=n=>{let e=n.state.field(An,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:sc.of(null)}),!0)};class a3{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const u3=50,c3=1e3,h3=Pt.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(An).active)e.isPending&&this.startQuery(e)}update(n){let e=n.state.field(An),t=n.state.facet(Bt);if(!n.selectionSet&&!n.docChanged&&n.startState.field(An)==e)return;let r=n.transactions.some(s=>{let l=PQ(s,t);return l&8||(s.selection||s.docChanged)&&!(l&3)});for(let s=0;s<this.running.length;s++){let l=this.running[s];if(r||l.context.abortOnDocChange&&n.docChanged||l.updates.length+n.transactions.length>u3&&Date.now()-l.time>c3){for(let o of l.context.abortListeners)try{o()}catch(u){Nn(this.view.state,u)}l.context.abortListeners=null,this.running.splice(s--,1)}else l.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(s=>s.effects.some(l=>l.is(dd)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(l=>l.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of n.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(An);for(let t of e.active)t.isPending&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Bt).updateSyncTime))}startQuery(n){let{state:e}=this.view,t=jl(e),r=new X0(e,t,n.explicit,this.view),i=new a3(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:sc.of(null)}),Nn(this.view.state,s)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Bt).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Bt),r=this.view.state.field(An);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let o=jl(s.updates.length?s.updates[0].startState:this.view.state),u=Math.min(o,s.done.from+(s.active.explicit?0:1)),h=new Ao(s.active.source,s.active.explicit,u,s.done,s.done.from,(n=s.done.to)!==null&&n!==void 0?n:o);for(let f of s.updates)h=h.update(f,t);if(h.hasResult()){e.push(h);continue}}let l=r.active.find(o=>o.source==s.active.source);if(l&&l.isPending)if(s.done==null){let o=new xr(s.active.source,0);for(let u of s.updates)o=o.update(u,t);o.isPending||e.push(o)}else this.startQuery(l)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:V0.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(An,!1);if(e&&e.tooltip&&this.view.state.facet(Bt).closeOnBlur){let t=e.open&&VC(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:sc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:dd.of(!1)}),20),this.composing=0}}}),f3=typeof navigator=="object"&&/Win/.test(navigator.platform),d3=Bi.highest(ce.domEventHandlers({keydown(n,e){let t=e.state.field(An,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(f3&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(l=>l.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(n.key)>-1&&q0(e,r),!1}})),CQ=ce.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class p3{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class F0{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,Ht.TrackDel),r=e.mapPos(this.to,1,Ht.TrackDel);return t==null||r==null?null:new F0(this.field,t,r)}}class Y0{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],s=e.doc.lineAt(t),l=/^\s*/.exec(s.text)[0];for(let u of this.lines){if(r.length){let h=l,f=/^\t*/.exec(u)[0].length;for(let p=0;p<f;p++)h+=e.facet(ga);i.push(t+h.length-f),u=h+u.slice(f)}r.push(u),t+=u.length+1}let o=this.fieldPositions.map(u=>new F0(u.field,i[u.line]+u.from,i[u.line]+u.to));return{text:r,ranges:o}}static parse(e){let t=[],r=[],i=[],s;for(let l of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(l);){let o=s[1]?+s[1]:null,u=s[2]||s[3]||"",h=-1,f=u.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p<t.length;p++)(o!=null?t[p].seq==o:f&&t[p].name==f)&&(h=p);if(h<0){let p=0;for(;p<t.length&&(o==null||t[p].seq!=null&&t[p].seq<o);)p++;t.splice(p,0,{seq:o,name:f}),h=p;for(let m of i)m.field>=h&&m.field++}for(let p of i)if(p.line==r.length&&p.from>s.index){let m=s[2]?3+(s[1]||"").length:2;p.from-=m,p.to-=m}i.push(new p3(h,r.length,s.index,s.index+f.length)),l=l.slice(0,s.index)+u+l.slice(s.index+s[0].length)}l=l.replace(/\\([{}])/g,(o,u,h)=>{for(let f of i)f.line==r.length&&f.from>h&&(f.from--,f.to--);return u}),r.push(l)}return new Y0(r,i)}}let m3=Qe.widget({widget:new class extends zr{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),g3=Qe.mark({class:"cm-snippetField"});class ya{constructor(e,t){this.ranges=e,this.active=t,this.deco=Qe.set(e.map(r=>(r.from==r.to?m3:g3).range(r.from,r.to)),!0)}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new ya(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Ac=Re.define({map(n,e){return n&&n.map(e)}}),O3=Re.define(),lc=Jt.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Ac))return t.value;if(t.is(O3)&&n)return new ya(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>ce.decorations.from(n,e=>e?e.deco:Qe.none)});function U0(n,e){return U.create(n.filter(t=>t.field==e).map(t=>U.range(t.from,t.to)))}function y3(n){let e=Y0.parse(n);return(t,r,i,s)=>{let{text:l,ranges:o}=e.instantiate(t.state,i),{main:u}=t.state.selection,h={changes:{from:i,to:s==u.from?u.to:s,insert:Ye.of(l)},scrollIntoView:!0,annotations:r?[B0.of(r),Mt.userEvent.of("input.complete")]:void 0};if(o.length&&(h.selection=U0(o,0)),o.some(f=>f.field>0)){let f=new ya(o,0),p=h.effects=[Ac.of(f)];t.state.field(lc,!1)===void 0&&p.push(Re.appendConfig.of([lc,w3,S3,CQ]))}t.dispatch(t.state.update(h))}}function QQ(n){return({state:e,dispatch:t})=>{let r=e.field(lc,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,s=n>0&&!r.ranges.some(l=>l.field==i+n);return t(e.update({selection:U0(r.ranges,i),effects:Ac.of(s?null:new ya(r.ranges,i)),scrollIntoView:!0})),!0}}const x3=({state:n,dispatch:e})=>n.field(lc,!1)?(e(n.update({effects:Ac.of(null)})),!0):!1,k3=QQ(1),v3=QQ(-1),b3=[{key:"Tab",run:k3,shift:v3},{key:"Escape",run:x3}],Pw=pe.define({combine(n){return n.length?n[0]:b3}}),w3=Bi.highest(pa.compute([Pw],n=>n.facet(Pw)));function Tn(n,e){return{...e,apply:y3(n)}}const S3=ce.domEventHandlers({mousedown(n,e){let t=e.state.field(lc,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:U0(t.ranges,i.field),effects:Ac.of(t.ranges.some(s=>s.field>i.field)?new ya(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),oc={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},xl=Re.define({map(n,e){let t=e.mapPos(n,-1,Ht.TrackAfter);return t??void 0}}),G0=new class extends _s{};G0.startSide=1;G0.endSide=-1;const $Q=Jt.define({create(){return Be.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(xl)&&(n=n.update({add:[G0.range(t.value,t.value+1)]}));return n}});function P3(){return[Q3,$Q]}const Tg="()[]{}<>«»»«[]{}";function TQ(n){for(let e=0;e<Tg.length;e+=2)if(Tg.charCodeAt(e)==n)return Tg.charAt(e+1);return m0(n<128?n:n+1)}function jQ(n,e){return n.languageDataAt("closeBrackets",e)[0]||oc}const C3=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Q3=ce.inputHandler.of((n,e,t,r)=>{if((C3?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&ii(Mn(r,0))==1||e!=i.from||t!=i.to)return!1;let s=j3(n.state,r);return s?(n.dispatch(s),!0):!1}),$3=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=jQ(n,n.selection.main.head).brackets||oc.brackets,i=null,s=n.changeByRange(l=>{if(l.empty){let o=E3(n.doc,l.head);for(let u of r)if(u==o&&Gd(n.doc,l.head)==TQ(Mn(u,0)))return{changes:{from:l.head-u.length,to:l.head+u.length},range:U.cursor(l.head-u.length)}}return{range:i=l}});return i||e(n.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},T3=[{key:"Backspace",run:$3}];function j3(n,e){let t=jQ(n,n.selection.main.head),r=t.brackets||oc.brackets;for(let i of r){let s=TQ(Mn(i,0));if(e==i)return s==i?R3(n,i,r.indexOf(i+i+i)>-1,t):M3(n,i,s,t.before||oc.before);if(e==s&&EQ(n,n.selection.main.from))return A3(n,i,s)}return null}function EQ(n,e){let t=!1;return n.field($Q).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Gd(n,e){let t=n.sliceString(e,e+2);return t.slice(0,ii(Mn(t,0)))}function E3(n,e){let t=n.sliceString(e-2,e);return ii(Mn(t,0))==t.length?t:t.slice(1)}function M3(n,e,t,r){let i=null,s=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:t,from:l.to}],effects:xl.of(l.to+e.length),range:U.range(l.anchor+e.length,l.head+e.length)};let o=Gd(n.doc,l.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:e+t,from:l.head},effects:xl.of(l.head+e.length),range:U.cursor(l.head+e.length)}:{range:i=l}});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function A3(n,e,t){let r=null,i=n.changeByRange(s=>s.empty&&Gd(n.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:U.cursor(s.head+t.length)}:r={range:s});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function R3(n,e,t,r){let i=r.stringPrefixes||oc.stringPrefixes,s=null,l=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:e,from:o.to}],effects:xl.of(o.to+e.length),range:U.range(o.anchor+e.length,o.head+e.length)};let u=o.head,h=Gd(n.doc,u),f;if(h==e){if(Cw(n,u))return{changes:{insert:e+e,from:u},effects:xl.of(u+e.length),range:U.cursor(u+e.length)};if(EQ(n,u)){let m=t&&n.sliceDoc(u,u+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:u,to:u+m.length,insert:m},range:U.cursor(u+m.length)}}}else{if(t&&n.sliceDoc(u-2*e.length,u)==e+e&&(f=Qw(n,u-2*e.length,i))>-1&&Cw(n,f))return{changes:{insert:e+e+e+e,from:u},effects:xl.of(u+e.length),range:U.cursor(u+e.length)};if(n.charCategorizer(u)(h)!=Ot.Word&&Qw(n,u,i)>-1&&!N3(n,u,e,i))return{changes:{insert:e+e,from:u},effects:xl.of(u+e.length),range:U.cursor(u+e.length)}}return{range:s=o}});return s?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function Cw(n,e){let t=ct(n).resolveInner(e+1);return t.parent&&t.from==e}function N3(n,e,t,r){let i=ct(n).resolveInner(e,-1),s=r.reduce((l,o)=>Math.max(l,o.length),0);for(let l=0;l<5;l++){let o=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+s)),u=o.indexOf(t);if(!u||u>-1&&r.indexOf(o.slice(0,u))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>t.length+u;){if(n.sliceDoc(f.to-t.length,f.to)==t)return!1;f=f.firstChild}return!0}let h=i.to==e&&i.parent;if(!h)break;i=h}return!1}function Qw(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Ot.Word)return e;for(let i of t){let s=e-i.length;if(n.sliceDoc(s,e)==i&&r(n.sliceDoc(s-1,s))!=Ot.Word)return s}return-1}function L3(n={}){return[d3,An,Bt.of(n),h3,_3,CQ]}const MQ=[{key:"Ctrl-Space",run:$g},{mac:"Alt-`",run:$g},{mac:"Alt-i",run:$g},{key:"Escape",run:o3},{key:"ArrowDown",run:Of(!0)},{key:"ArrowUp",run:Of(!1)},{key:"PageDown",run:Of(!0,"page")},{key:"PageUp",run:Of(!1,"page")},{key:"Enter",run:l3}],_3=Bi.highest(pa.computeN([Bt],n=>n.facet(Bt).defaultKeymap?[MQ]:[]));class md{static create(e,t,r,i,s){let l=i+(i<<8)+e+(t<<4)|0;return new md(e,t,r,l,s,[],[])}constructor(e,t,r,i,s,l,o){this.type=e,this.value=t,this.from=r,this.hash=i,this.end=s,this.children=l,this.positions=o,this.hashProp=[[Ne.contextHash,i]]}addChild(e,t){e.prop(Ne.contextHash)!=this.hash&&(e=new Je(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;return r>=0&&(t=Math.max(t,this.positions[r]+this.children[r].length+this.from)),new Je(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,s,l)=>new Je(_t.none,i,s,l,this.hashProp)})}}var oe;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(oe||(oe={}));class D3{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class I3{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return _u(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let i=t;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=this.text.charCodeAt(t)==9?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function $w(n,e,t){if(t.pos==t.text.length||n!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let r=(n.type==oe.OrderedList?J0:K0)(t,e,!1);return r>0&&(n.type!=oe.BulletList||H0(t,e,!1)<0)&&t.text.charCodeAt(t.pos+r-1)==n.value}const AQ={[oe.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push(Fe(oe.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(br(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[oe.ListItem](n,e,t){return t.indent<t.baseIndent+n.value&&t.next>-1?!1:(t.moveBaseColumn(t.baseIndent+n.value),!0)},[oe.OrderedList]:$w,[oe.BulletList]:$w,[oe.Document](){return!0}};function br(n){return n==32||n==9||n==10||n==13}function _u(n,e=0){for(;e<n.length&&br(n.charCodeAt(e));)e++;return e}function Tw(n,e,t){for(;e>t&&br(n.charCodeAt(e-1));)e--;return e}function RQ(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;if(e<n.pos+3)return-1;if(n.next==96){for(let t=e;t<n.text.length;t++)if(n.text.charCodeAt(t)==96)return-1}return e}function NQ(n){return n.next!=62?-1:n.text.charCodeAt(n.pos+1)==32?2:1}function H0(n,e,t){if(n.next!=42&&n.next!=45&&n.next!=95)return-1;let r=1;for(let i=n.pos+1;i<n.text.length;i++){let s=n.text.charCodeAt(i);if(s==n.next)r++;else if(!br(s))return-1}return t&&n.next==45&&DQ(n)>-1&&n.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(XQ.SetextHeading)>-1||r<3?-1:1}function LQ(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function K0(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||br(n.text.charCodeAt(n.pos+1)))&&(!t||LQ(e,oe.BulletList)||n.skipSpace(n.pos+2)<n.text.length)?1:-1}function J0(n,e,t){let r=n.pos,i=n.next;for(;i>=48&&i<=57;){r++;if(r==n.text.length)return-1;i=n.text.charCodeAt(r)}return r==n.pos||r>n.pos+9||i!=46&&i!=41||r<n.text.length-1&&!br(n.text.charCodeAt(r+1))||t&&!LQ(e,oe.OrderedList)&&(n.skipSpace(r+1)==n.text.length||r>n.pos+1||n.next!=49)?-1:r+1-n.pos}function _Q(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==35;)e++;if(e<n.text.length&&n.text.charCodeAt(e)!=32)return-1;let t=e-n.pos;return t>6?-1:t}function DQ(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;let t=e;for(;e<n.text.length&&br(n.text.charCodeAt(e));)e++;return e==n.text.length?t:-1}const Py=/^[ \t]*$/,IQ=/-->/,zQ=/\?>/,Cy=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,IQ],[/^\s*<\?/,zQ],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Py],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Py]];function ZQ(n,e,t){if(n.next!=60)return-1;let r=n.text.slice(n.pos);for(let i=0,s=Cy.length-(t?1:0);i<s;i++)if(Cy[i][0].test(r))return i;return-1}function jw(n,e){let t=n.countIndent(e,n.pos,n.indent),r=n.countIndent(n.skipSpace(e),e,t);return r>=t+5?t+1:r}function gs(n,e,t){let r=n.length-1;r>=0&&n[r].to==e&&n[r].type==oe.CodeText?n[r].to=t:n.push(Fe(oe.CodeText,e,t))}const yf={LinkReference:void 0,IndentedCode(n,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let r=e.findColumn(t),i=n.lineStart+r,s=n.lineStart+e.text.length,l=[],o=[];for(gs(l,i,s);n.nextLine()&&e.depth>=n.stack.length;)if(e.pos==e.text.length){gs(o,n.lineStart-1,n.lineStart);for(let u of e.markers)o.push(u)}else{if(e.indent<t)break;{if(o.length){for(let h of o)h.type==oe.CodeText?gs(l,h.from,h.to):l.push(h);o=[]}gs(l,n.lineStart-1,n.lineStart);for(let h of e.markers)l.push(h);s=n.lineStart+e.text.length;let u=n.lineStart+e.findColumn(e.baseIndent+4);u<s&&gs(l,u,s)}}return o.length&&(o=o.filter(u=>u.type!=oe.CodeText),o.length&&(e.markers=o.concat(e.markers))),n.addNode(n.buffer.writeElements(l,-i).finish(oe.CodeBlock,s-i),i),!0},FencedCode(n,e){let t=RQ(e);if(t<0)return!1;let r=n.lineStart+e.pos,i=e.next,s=t-e.pos,l=e.skipSpace(t),o=Tw(e.text,e.text.length,l),u=[Fe(oe.CodeMark,r,r+s)];l<o&&u.push(Fe(oe.CodeInfo,n.lineStart+l,n.lineStart+o));for(let h=!0,f=!0,p=!1;n.nextLine()&&e.depth>=n.stack.length;h=!1){let m=e.pos;if(e.indent-e.baseIndent<4)for(;m<e.text.length&&e.text.charCodeAt(m)==i;)m++;if(m-e.pos>=s&&e.skipSpace(m)==e.text.length){for(let O of e.markers)u.push(O);f&&p&&gs(u,n.lineStart-1,n.lineStart),u.push(Fe(oe.CodeMark,n.lineStart+e.pos,n.lineStart+m)),n.nextLine();break}else{p=!0,h||(gs(u,n.lineStart-1,n.lineStart),f=!1);for(let b of e.markers)u.push(b);let O=n.lineStart+e.basePos,k=n.lineStart+e.text.length;O<k&&(gs(u,O,k),f=!1)}}return n.addNode(n.buffer.writeElements(u,-r).finish(oe.FencedCode,n.prevLineEnd()-r),r),!0},Blockquote(n,e){let t=NQ(e);return t<0?!1:(n.startContext(oe.Blockquote,e.pos),n.addNode(oe.QuoteMark,n.lineStart+e.pos,n.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(n,e){if(H0(e,n,!1)<0)return!1;let t=n.lineStart+e.pos;return n.nextLine(),n.addNode(oe.HorizontalRule,t),!0},BulletList(n,e){let t=K0(e,n,!1);if(t<0)return!1;n.block.type!=oe.BulletList&&n.startContext(oe.BulletList,e.basePos,e.next);let r=jw(e,e.pos+1);return n.startContext(oe.ListItem,e.basePos,r-e.baseIndent),n.addNode(oe.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},OrderedList(n,e){let t=J0(e,n,!1);if(t<0)return!1;n.block.type!=oe.OrderedList&&n.startContext(oe.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let r=jw(e,e.pos+t);return n.startContext(oe.ListItem,e.basePos,r-e.baseIndent),n.addNode(oe.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},ATXHeading(n,e){let t=_Q(e);if(t<0)return!1;let r=e.pos,i=n.lineStart+r,s=Tw(e.text,e.text.length,r),l=s;for(;l>r&&e.text.charCodeAt(l-1)==e.next;)l--;(l==s||l==r||!br(e.text.charCodeAt(l-1)))&&(l=e.text.length);let o=n.buffer.write(oe.HeaderMark,0,t).writeElements(n.parser.parseInline(e.text.slice(r+t+1,l),i+t+1),-i);l<e.text.length&&o.write(oe.HeaderMark,l-r,s-r);let u=o.finish(oe.ATXHeading1-1+t,e.text.length-r);return n.nextLine(),n.addNode(u,i),!0},HTMLBlock(n,e){let t=ZQ(e,n,!1);if(t<0)return!1;let r=n.lineStart+e.pos,i=Cy[t][1],s=[],l=i!=Py;for(;!i.test(e.text)&&n.nextLine();){if(e.depth<n.stack.length){l=!1;break}for(let h of e.markers)s.push(h)}l&&n.nextLine();let o=i==IQ?oe.CommentBlock:i==zQ?oe.ProcessingInstructionBlock:oe.HTMLBlock,u=n.prevLineEnd();return n.addNode(n.buffer.writeElements(s,-r).finish(o,u-r),r),!0},SetextHeading:void 0};class z3{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(this.stage==-1)return!1;let i=r.content+`
78
+ `+t.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,t){return(this.stage==2||this.stage==3)&&_u(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,r){return e.addLeafElement(t,Fe(oe.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(HQ(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Fe(oe.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(UQ(e,_u(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=_u(e,this.pos),r=0;if(t>this.pos){let i=GQ(e,t,this.start);if(i){let s=jg(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=jg(e,this.pos)),r>0&&r<e.length?r:-1}else return jg(e,this.pos)}}}function jg(n,e){for(;e<n.length;e++){let t=n.charCodeAt(e);if(t==10)break;if(!br(t))return-1}return e}class Z3{nextLine(e,t,r){let i=t.depth<e.stack.length?-1:DQ(t),s=t.next;if(i<0)return!1;let l=Fe(oe.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,Fe(s==61?oe.SetextHeading1:oe.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),l])),!0}finish(){return!1}}const XQ={LinkReference(n,e){return e.content.charCodeAt(0)==91?new z3(e):null},SetextHeading(){return new Z3}},X3=[(n,e)=>_Q(e)>=0,(n,e)=>RQ(e)>=0,(n,e)=>NQ(e)>=0,(n,e)=>K0(e,n,!0)>=0,(n,e)=>J0(e,n,!0)>=0,(n,e)=>H0(e,n,!0)>=0,(n,e)=>ZQ(e,n,!0)>=0],B3={text:"",end:0};class W3{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.line=new I3,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=md.create(oe.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new F3(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let t=new D3(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,t);i&&t.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e}for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+=`
79
+ `+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=KQ(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=B3;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<t.end;){i++;let s=this.ranges[i].from,l=this.lineChunkAt(s);t.end=s+l.length,t.text=t.text.slice(0,this.ranges[i-1].to-r)+l,r=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(t);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+oe[i.type]);let l=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>l&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),r;if(this.input.lineChunks)r=t==`
80
+ `?"":t;else{let i=t.indexOf(`
81
+ `);r=i<0?t:t.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=md.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){typeof e=="number"&&(e=new Je(this.parser.nodeSet.types[e],ra,ra,(r??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements($y(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?BQ(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let t=$y(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(oe.Paragraph,e.content.length),e.start)}elt(e,t,r,i){return typeof e=="string"?Fe(this.parser.getNodeType(e),t,r,i):new qQ(e,t)}get buffer(){return new VQ(this.parser.nodeSet)}}function BQ(n,e,t,r,i){let s=n[e].to,l=[],o=[],u=t.from+r;function h(f,p){for(;p?f>=s:f>s;){let m=n[e+1].from-s;r+=m,f+=m,e++,s=n[e].to}}for(let f=t.firstChild;f;f=f.nextSibling){h(f.from+r,!0);let p=f.from+r,m,O=i.get(f.tree);O?m=O:f.to+r>s?(m=BQ(n,e,f,r,i),h(f.to+r,!1)):m=f.toTree(),l.push(m),o.push(p-u)}return h(t.to+r,!1),new Je(t.type,l,o,t.to+r-u,t.tree?t.tree.propValues:void 0)}class Hd extends _0{constructor(e,t,r,i,s,l,o,u,h){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=l,this.inlineParsers=o,this.inlineNames=u,this.wrappers=h,this.nodeTypes=Object.create(null);for(let f of e.types)this.nodeTypes[f.name]=f.id}createParse(e,t,r){let i=new W3(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}configure(e){let t=Qy(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),l=this.leafBlockParsers.slice(),o=this.blockNames.slice(),u=this.inlineParsers.slice(),h=this.inlineNames.slice(),f=this.endLeafBlock.slice(),p=this.wrappers;if(pu(t.defineNodes)){i=Object.assign({},i);let m=r.types.slice(),O;for(let k of t.defineNodes){let{name:b,block:w,composite:S,style:C}=typeof k=="string"?{name:k}:k;if(m.some(I=>I.name==b))continue;S&&(i[m.length]=(I,j,Z)=>S(j,Z,I.value));let Q=m.length,R=S?["Block","BlockContext"]:w?Q>=oe.ATXHeading1&&Q<=oe.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;m.push(_t.define({id:Q,name:b,props:R&&[[Ne.group,R]]})),C&&(O||(O={}),Array.isArray(C)||C instanceof er?O[b]=C:Object.assign(O,C))}r=new Tc(m),O&&(r=r.extend(ma(O)))}if(pu(t.props)&&(r=r.extend(...t.props)),pu(t.remove))for(let m of t.remove){let O=this.blockNames.indexOf(m),k=this.inlineNames.indexOf(m);O>-1&&(s[O]=l[O]=void 0),k>-1&&(u[k]=void 0)}if(pu(t.parseBlock))for(let m of t.parseBlock){let O=o.indexOf(m.name);if(O>-1)s[O]=m.parse,l[O]=m.leaf;else{let k=m.before?xf(o,m.before):m.after?xf(o,m.after)+1:o.length-1;s.splice(k,0,m.parse),l.splice(k,0,m.leaf),o.splice(k,0,m.name)}m.endLeaf&&f.push(m.endLeaf)}if(pu(t.parseInline))for(let m of t.parseInline){let O=h.indexOf(m.name);if(O>-1)u[O]=m.parse;else{let k=m.before?xf(h,m.before):m.after?xf(h,m.after)+1:h.length-1;u.splice(k,0,m.parse),h.splice(k,0,m.name)}}return t.wrap&&(p=p.concat(t.wrap)),new Hd(r,s,l,o,f,i,u,h,p)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new ex(this,e,t);e:for(let i=t;i<r.end;){let s=r.char(i);for(let l of this.inlineParsers)if(l){let o=l(r,s,i);if(o>=0){i=o;continue e}}i++}return r.resolveMarkers(0)}}function pu(n){return n!=null&&n.length>0}function Qy(n){if(!Array.isArray(n))return n;if(n.length==0)return null;let e=Qy(n[0]);if(n.length==1)return e;let t=Qy(n.slice(1));if(!t||!e)return e||t;let r=(l,o)=>(l||ra).concat(o||ra),i=e.wrap,s=t.wrap;return{props:r(e.props,t.props),defineNodes:r(e.defineNodes,t.defineNodes),parseBlock:r(e.parseBlock,t.parseBlock),parseInline:r(e.parseInline,t.parseInline),remove:r(e.remove,t.remove),wrap:i?s?(l,o,u,h)=>i(s(l,o,u,h),o,u,h):i:s}}function xf(n,e){let t=n.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let WQ=[_t.none];for(let n=1,e;e=oe[n];n++)WQ[n]=_t.define({id:n,name:e,props:n>=oe.Escape?[]:[[Ne.group,n in AQ?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const ra=[];class VQ{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,i=0){return this.content.push(e,t,r,4+i*4),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return Je.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let ac=class{constructor(e,t,r,i=ra){this.type=e,this.from=t,this.to=r,this.children=i}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new VQ(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class qQ{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return ra}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function Fe(n,e,t,r){return new ac(n,e,t,r)}const FQ={resolve:"Emphasis",mark:"EmphasisMark"},YQ={resolve:"Emphasis",mark:"EmphasisMark"},dl={},gd={};class Hn{constructor(e,t,r,i){this.type=e,this.from=t,this.to=r,this.side=i}}const Ew="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let uc=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{uc=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const Eg={Escape(n,e,t){if(e!=92||t==n.end-1)return-1;let r=n.char(t+1);for(let i=0;i<Ew.length;i++)if(Ew.charCodeAt(i)==r)return n.append(Fe(oe.Escape,t,t+2));return-1},Entity(n,e,t){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(n.slice(t+1,t+31));return r?n.append(Fe(oe.Entity,t,t+1+r[0].length)):-1},InlineCode(n,e,t){if(e!=96||t&&n.char(t-1)==96)return-1;let r=t+1;for(;r<n.end&&n.char(r)==96;)r++;let i=r-t,s=0;for(;r<n.end;r++)if(n.char(r)==96){if(s++,s==i&&n.char(r+1)!=96)return n.append(Fe(oe.InlineCode,t,r+1,[Fe(oe.CodeMark,t,t+i),Fe(oe.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(n,e,t){if(e!=60||t==n.end-1)return-1;let r=n.slice(t+1,n.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return n.append(Fe(oe.Autolink,t,t+1+i[0].length,[Fe(oe.LinkMark,t,t+1),Fe(oe.URL,t+1,t+i[0].length),Fe(oe.LinkMark,t+i[0].length,t+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return n.append(Fe(oe.Comment,t,t+1+s[0].length));let l=/^\?[^]*?\?>/.exec(r);if(l)return n.append(Fe(oe.ProcessingInstruction,t,t+1+l[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return o?n.append(Fe(oe.HTMLTag,t,t+1+o[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let r=t+1;for(;n.char(r)==e;)r++;let i=n.slice(t-1,t),s=n.slice(r,r+1),l=uc.test(i),o=uc.test(s),u=/\s|^$/.test(i),h=/\s|^$/.test(s),f=!h&&(!o||u||l),p=!u&&(!l||h||o),m=f&&(e==42||!p||l),O=p&&(e==42||!f||o);return n.append(new Hn(e==95?FQ:YQ,t,r,(m?1:0)|(O?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append(Fe(oe.HardBreak,t,t+2));if(e==32){let r=t+1;for(;n.char(r)==32;)r++;if(n.char(r)==10&&r>=t+2)return n.append(Fe(oe.HardBreak,t,r+1))}return-1},Link(n,e,t){return e==91?n.append(new Hn(dl,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new Hn(gd,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let r=n.parts.length-1;r>=0;r--){let i=n.parts[r];if(i instanceof Hn&&(i.type==dl||i.type==gd)){if(!i.side||n.skipSpace(i.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[r]=null,-1;let s=n.takeContent(r),l=n.parts[r]=V3(n,s,i.type==dl?oe.Link:oe.Image,i.from,t+1);if(i.type==dl)for(let o=0;o<r;o++){let u=n.parts[o];u instanceof Hn&&u.type==dl&&(u.side=0)}return l.to}}return-1}};function V3(n,e,t,r,i){let{text:s}=n,l=n.char(i),o=i;if(e.unshift(Fe(oe.LinkMark,r,r+(t==oe.Image?2:1))),e.push(Fe(oe.LinkMark,i-1,i)),l==40){let u=n.skipSpace(i+1),h=UQ(s,u-n.offset,n.offset),f;h&&(u=n.skipSpace(h.to),u!=h.to&&(f=GQ(s,u-n.offset,n.offset),f&&(u=n.skipSpace(f.to)))),n.char(u)==41&&(e.push(Fe(oe.LinkMark,i,i+1)),o=u+1,h&&e.push(h),f&&e.push(f),e.push(Fe(oe.LinkMark,u,o)))}else if(l==91){let u=HQ(s,i-n.offset,n.offset,!1);u&&(e.push(u),o=u.to)}return Fe(t,r,o,e)}function UQ(n,e,t){if(n.charCodeAt(e)==60){for(let i=e+1;i<n.length;i++){let s=n.charCodeAt(i);if(s==62)return Fe(oe.URL,e+t,i+1+t);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let l=!1;s<n.length;s++){let o=n.charCodeAt(s);if(br(o))break;if(l)l=!1;else if(o==40)i++;else if(o==41){if(!i)break;i--}else o==92&&(l=!0)}return s>e?Fe(oe.URL,e+t,s+t):s==n.length?null:!1}}function GQ(n,e,t){let r=n.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,l=!1;s<n.length;s++){let o=n.charCodeAt(s);if(l)l=!1;else{if(o==i)return Fe(oe.LinkTitle,e+t,s+1+t);o==92&&(l=!0)}}return null}function HQ(n,e,t,r){for(let i=!1,s=e+1,l=Math.min(n.length,s+999);s<l;s++){let o=n.charCodeAt(s);if(i)i=!1;else{if(o==93)return r?!1:Fe(oe.LinkLabel,e+t,s+1+t);if(r&&!br(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}class ex{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,i,s){return this.append(new Hn(e,t,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Hn&&(t.type==dl||t.type==gd))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Hn&&i.type.resolve&&i.side&2))continue;let s=i.type==FQ||i.type==YQ,l=i.to-i.from,o,u=r-1;for(;u>=e;u--){let b=this.parts[u];if(b instanceof Hn&&b.side&1&&b.type==i.type&&!(s&&(i.side&1||b.side&2)&&(b.to-b.from+l)%3==0&&((b.to-b.from)%3||l%3))){o=b;break}}if(!o)continue;let h=i.type.resolve,f=[],p=o.from,m=i.to;if(s){let b=Math.min(2,o.to-o.from,l);p=o.to-b,m=i.from+b,h=b==1?"Emphasis":"StrongEmphasis"}o.type.mark&&f.push(this.elt(o.type.mark,p,o.to));for(let b=u+1;b<r;b++)this.parts[b]instanceof ac&&f.push(this.parts[b]),this.parts[b]=null;i.type.mark&&f.push(this.elt(i.type.mark,i.from,m));let O=this.elt(h,p,m,f);this.parts[u]=s&&o.from!=p?new Hn(o.type,o.from,p,o.side):null,(this.parts[r]=s&&i.to!=m?new Hn(i.type,m,i.to,i.side):null)?this.parts.splice(r,0,O):this.parts[r]=O}let t=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof ac&&t.push(i)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof Hn&&r.type==e&&r.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Hn?t:null}skipSpace(e){return _u(this.text,e-this.offset)+this.offset}elt(e,t,r,i){return typeof e=="string"?Fe(this.parser.getNodeType(e),t,r,i):new qQ(e,t)}}ex.linkStart=dl;ex.imageStart=gd;function $y(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),r=0;for(let i of e){for(;r<t.length&&t[r].to<i.to;)r++;if(r<t.length&&t[r].from<i.from){let s=t[r];s instanceof ac&&(t[r]=new ac(s.type,s.from,s.to,$y(s.children,[i])))}else t.splice(r++,0,i)}return t}const q3=[oe.CodeBlock,oe.ListItem,oe.OrderedList,oe.BulletList];let F3=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
82
+ `;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=t;if(!r.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(Ne.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,l=s,o=e.block.children.length,u=l,h=o;for(;;){if(t.to-r>i){if(t.type.isAnonymous&&t.firstChild())continue;break}let f=KQ(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,f);else{let p=new Je(e.parser.nodeSet.types[oe.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,t.tree),e.addNode(p,f)}if(t.type.is("Block")&&(q3.indexOf(t.type.id)<0?(l=t.to-r,o=e.block.children.length):(l=u,o=h),u=t.to-r,h=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return l-s}};function KQ(n,e){let t=n;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<n&&(t-=s-i)}return t}const Y3=ma({"Blockquote/...":T.quote,HorizontalRule:T.contentSeparator,"ATXHeading1/... SetextHeading1/...":T.heading1,"ATXHeading2/... SetextHeading2/...":T.heading2,"ATXHeading3/...":T.heading3,"ATXHeading4/...":T.heading4,"ATXHeading5/...":T.heading5,"ATXHeading6/...":T.heading6,"Comment CommentBlock":T.comment,Escape:T.escape,Entity:T.character,"Emphasis/...":T.emphasis,"StrongEmphasis/...":T.strong,"Link/... Image/...":T.link,"OrderedList/... BulletList/...":T.list,"BlockQuote/...":T.quote,"InlineCode CodeText":T.monospace,"URL Autolink":T.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":T.processingInstruction,"CodeInfo LinkLabel":T.labelName,LinkTitle:T.string,Paragraph:T.content}),U3=new Hd(new Tc(WQ).extend(Y3),Object.keys(yf).map(n=>yf[n]),Object.keys(yf).map(n=>XQ[n]),Object.keys(yf),X3,AQ,Object.keys(Eg).map(n=>Eg[n]),Object.keys(Eg),[]);function G3(n,e,t){let r=[];for(let i=n.firstChild,s=e;;i=i.nextSibling){let l=i?i.from:t;if(l>s&&r.push({from:s,to:l}),!i)break;s=i.to}return r}function H3(n){let{codeParser:e,htmlParser:t}=n;return{wrap:nQ((i,s)=>{let l=i.type.id;if(e&&(l==oe.CodeBlock||l==oe.FencedCode)){let o="";if(l==oe.FencedCode){let h=i.node.getChild(oe.CodeInfo);h&&(o=s.read(h.from,h.to))}let u=e(o);if(u)return{parser:u,overlay:h=>h.type.id==oe.CodeText,bracketed:l==oe.FencedCode}}else if(t&&(l==oe.HTMLBlock||l==oe.HTMLTag||l==oe.CommentBlock))return{parser:t,overlay:G3(i.node,i.from,i.to)};return null})}}const K3={resolve:"Strikethrough",mark:"StrikethroughMark"},J3={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":T.strikethrough}},{name:"StrikethroughMark",style:T.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let r=n.slice(t-1,t),i=n.slice(t+2,t+3),s=/\s|^$/.test(r),l=/\s|^$/.test(i),o=uc.test(r),u=uc.test(i);return n.addDelimiter(K3,t,t+2,!l&&(!u||s||o),!s&&(!o||l||u))},after:"Emphasis"}]};function Du(n,e,t=0,r,i=0){let s=0,l=!0,o=-1,u=-1,h=!1,f=()=>{r.push(n.elt("TableCell",i+o,i+u,n.parser.parseInline(e.slice(o,u),i+o)))};for(let p=t;p<e.length;p++){let m=e.charCodeAt(p);m==124&&!h?((!l||o>-1)&&s++,l=!1,r&&(o>-1&&f(),r.push(n.elt("TableDelimiter",p+i,p+i+1))),o=u=-1):(h||m!=32&&m!=9)&&(o<0&&(o=p),u=p+1),h=!h&&m==92}return o>-1&&(s++,r&&f()),s}function Mw(n,e){for(let t=e;t<n.length;t++){let r=n.charCodeAt(t);if(r==124)return!0;r==92&&t++}return!1}const JQ=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Aw{constructor(){this.rows=null}nextLine(e,t,r){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&JQ.test(i=t.text.slice(t.pos))){let s=[];Du(e,r.content,0,s,r.start)==Du(e,i,0)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];Du(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}}const eD={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":T.heading}},"TableRow",{name:"TableCell",style:T.content},{name:"TableDelimiter",style:T.processingInstruction}],parseBlock:[{name:"Table",leaf(n,e){return Mw(e.content,0)?new Aw:null},endLeaf(n,e,t){if(t.parsers.some(i=>i instanceof Aw)||!Mw(e.text,e.basePos))return!1;let r=n.peekLine();return JQ.test(r)&&Du(n,e.text,e.basePos)==Du(n,r,e.basePos)},before:"SetextHeading"}]};class tD{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const nD={defineNodes:[{name:"Task",block:!0,style:T.list},{name:"TaskMarker",style:T.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new tD:null},after:"SetextHeading"}]},Rw=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Nw=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,rD=/[\w-]+\.[\w-]+($|[/:])/,Lw=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,_w=/\/[a-zA-Z\d@.]+/gy;function Dw(n,e,t,r){let i=0;for(let s=e;s<t;s++)n[s]==r&&i++;return i}function iD(n,e){Nw.lastIndex=e;let t=Nw.exec(n);if(!t||rD.exec(t[0])[0].indexOf("_")>-1)return-1;let r=e+t[0].length;for(;;){let i=n[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&Dw(n,e,r,")")>Dw(n,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,r))))r=e+s.index;else break}return r}function Iw(n,e){Lw.lastIndex=e;let t=Lw.exec(n);if(!t)return-1;let r=t[0][t[0].length-1];return r=="_"||r=="-"?-1:e+t[0].length-(r=="."?1:0)}const sD={parseInline:[{name:"Autolink",parse(n,e,t){let r=t-n.offset;if(r&&/\w/.test(n.text[r-1]))return-1;Rw.lastIndex=r;let i=Rw.exec(n.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=iD(n.text,r+i[0].length),s>-1&&n.hasOpenLink){let l=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(r,s));s=r+l[0].length}}else i[3]?s=Iw(n.text,r):(s=Iw(n.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(_w.lastIndex=s,i=_w.exec(n.text),i&&(s=i.index+i[0].length)));return s<0?-1:(n.addElement(n.elt("URL",t,s+n.offset)),s+n.offset)}}]},lD=[eD,nD,J3,sD];function e$(n,e,t){return(r,i,s)=>{if(i!=n||r.char(s+1)==n)return-1;let l=[r.elt(t,s,s+1)];for(let o=s+1;o<r.end;o++){let u=r.char(o);if(u==n)return r.addElement(r.elt(e,s,o+1,l.concat(r.elt(t,o,o+1))));if(u==92&&l.push(r.elt("Escape",o,o+++2)),br(u))break}return-1}}const oD={defineNodes:[{name:"Superscript",style:T.special(T.content)},{name:"SuperscriptMark",style:T.processingInstruction}],parseInline:[{name:"Superscript",parse:e$(94,"Superscript","SuperscriptMark")}]},aD={defineNodes:[{name:"Subscript",style:T.special(T.content)},{name:"SubscriptMark",style:T.processingInstruction}],parseInline:[{name:"Subscript",parse:e$(126,"Subscript","SubscriptMark")}]},uD={defineNodes:[{name:"Emoji",style:T.character}],parseInline:[{name:"Emoji",parse(n,e,t){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(n.slice(t+1,n.end)))?-1:n.addElement(n.elt("Emoji",t,t+1+r[0].length))}}]};var zw={};class Od{constructor(e,t,r,i,s,l,o,u,h,f=0,p){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=s,this.score=l,this.buffer=o,this.bufferBase=u,this.curContext=h,this.lookAhead=f,this.parent=p}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new Od(e,[],t,r,r,0,[],0,i?new Zw(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:s}=this.p,l=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=s.dynamicPrecedence(i);if(o&&(this.score+=o),r==0){i<s.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,l?8:4,!0),this.reduceContext(i,this.reducePos);return}let u=this.stack.length-(r-1)*3-(e&262144?6:0),h=u?this.stack[u-2]:this.p.ranges[0].from;i<s.minRepeatTerm&&h==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let f=this.reducePos-h;f>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=f));let p=u?this.stack[u-1]:0,m=this.bufferBase+this.buffer.length-p;if(i<s.minRepeatTerm||e&131072){let O=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,O,m+4,!0)}if(e&262144)this.state=this.stack[u];else{let O=this.stack[u-3];this.state=s.getGoto(O,i,!0)}for(;this.stack.length>u;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,t,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let l=this.buffer.length;if(l>0&&this.buffer[l-4]==0&&this.buffer[l-1]>-1){if(t==r)return;if(this.buffer[l-2]>=t){this.buffer[l-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,t,r,i);else{let l=this.buffer.length;if(l>0&&(this.buffer[l-4]!=0||this.buffer[l-1]<0)){let o=!1;for(let u=l;u>0&&this.buffer[u-2]>r;u-=4)if(this.buffer[u-1]>=0){o=!0;break}if(o)for(;l>0&&this.buffer[l-2]>r;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,i>4&&(i-=4)}this.buffer[l]=e,this.buffer[l+1]=t,this.buffer[l+2]=r,this.buffer[l+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:l}=this.p;this.pos=i;let o=l.stateFlag(s,1);!o&&(i>r||t<=l.maxNode)&&(this.reducePos=i),this.pushState(s,o?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=l.maxNode&&this.buffer.push(t,r,i,4)}else this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4)}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&e.buffer[t-4]==0&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new Od(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new cD(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if((r&65536)==0)return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,l;s<t.length;s+=2)(l=t[s+1])!=this.state&&this.p.parser.hasAction(l,e)&&i.push(t[s],l);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let l=t[s+1];i.some((o,u)=>u&1&&o==l)||i.push(t[s],l)}t=i}let r=[];for(let i=0;i<t.length&&r.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let l=this.split();l.pushState(s,this.pos),l.storeNode(0,l.pos,l.pos,4,!0),l.shiftContext(t[i],this.pos),l.reducePos=this.pos,l.score-=200,r.push(l)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let r=t>>19,i=t&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let l=this.findForcedReduction();if(l==null)return!1;t=l}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,l=>{if(!(l&393216))if(l&65536){let o=(l>>19)-s;if(o>1){let u=l&65535,h=this.stack.length-o*3;if(h>=0&&e.getGoto(this.stack[h],u,!1)>=0)return o<<19|65536|u}}else{let o=r(l,s+1);if(o!=null)return o}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new Zw(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Zw{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class cD{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class yd{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new yd(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new yd(this.stack,this.pos,this.index)}}function Tu(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r<n.length;){let s=0;for(;;){let l=n.charCodeAt(r++),o=!1;if(l==126){s=65535;break}l>=92&&l--,l>=34&&l--;let u=l-32;if(u>=46&&(u-=46,o=!0),s+=u,o)break;s*=46}t?t[i++]=s:t=new e(s)}return t}class If{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Xw=new If;class hD{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Xw,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let l=this.ranges[--i];s-=r.from-l.to,r=l}for(;t<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let l=this.ranges[++i];s+=l.from-r.to,r=l}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let l=this.rangeIndex,o=this.range;for(;o.to<=r;)o=this.ranges[++l];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>o.to&&(this.chunk2=this.chunk2.slice(0,o.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Xw,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class Ro{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;t$(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}Ro.prototype.contextual=Ro.prototype.fallback=Ro.prototype.extend=!1;class xd{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Tu(e):e}token(e,t){let r=e.pos,i=0;for(;;){let s=e.next<0,l=e.resolveOffset(1,1);if(t$(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,l==null)break;e.reset(l,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}xd.prototype.contextual=Ro.prototype.fallback=Ro.prototype.extend=!1;class ir{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function t$(n,e,t,r,i,s){let l=0,o=1<<r,{dialect:u}=t.p.parser;e:for(;(o&n[l])!=0;){let h=n[l+1];for(let O=l+3;O<h;O+=2)if((n[O+1]&o)>0){let k=n[O];if(u.allows(k)&&(e.token.value==-1||e.token.value==k||fD(k,e.token.value,i,s))){e.acceptToken(k);break}}let f=e.next,p=0,m=n[l+2];if(e.next<0&&m>p&&n[h+m*3-3]==65535){l=n[h+m*3-1];continue e}for(;p<m;){let O=p+m>>1,k=h+O+(O<<1),b=n[k],w=n[k+1]||65536;if(f<b)m=O;else if(f>=w)p=O+1;else{l=n[k+2],e.advance();continue e}}break}}function Bw(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function fD(n,e,t,r){let i=Bw(t,r,e);return i<0||Bw(t,r,n)<i}const qn=typeof process<"u"&&zw&&/\bparse\b/.test(zw.LOG);let Mg=null;function Ww(n,e,t){let r=n.cursor(et.IncludeAnonymous);for(r.moveTo(e);;)if(!(t<0?r.childBefore(e):r.childAfter(e)))for(;;){if((t<0?r.to<e:r.from>e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class dD{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ww(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ww(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],i=this.index[t];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],l=this.start[t]+r.positions[i];if(l>e)return this.nextStart=l,null;if(s instanceof Je){if(l==e){if(l<this.safeFrom)return null;let o=l+s.length;if(o<=this.safeTo){let u=s.prop(Ne.lookAhead);if(!u||o+u<this.fragment.to)return s}}this.index[t]++,l+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(l),this.index.push(0))}else this.index[t]++,this.nextStart=l+s.length}}}class pD{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new If)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,l=i.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,u=0;for(let h=0;h<s.length;h++){if((1<<h&l)==0)continue;let f=s[h],p=this.tokens[h];if(!(r&&!f.fallback)&&((f.contextual||p.start!=e.pos||p.mask!=l||p.context!=o)&&(this.updateCachedToken(p,f,e),p.mask=l,p.context=o),p.lookAhead>p.end+25&&(u=Math.max(p.lookAhead,u)),p.value!=0)){let m=t;if(p.extended>-1&&(t=this.addActions(e,p.extended,p.end,t)),t=this.addActions(e,p.value,p.end,t),!f.extend&&(r=p,t>m))break}}for(;this.actions.length>t;)this.actions.pop();return u&&e.setLookAhead(u),!r&&e.pos==this.stream.end&&(r=new If,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new If,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let l=0;l<s.specialized.length;l++)if(s.specialized[l]==e.value){let o=s.specializers[l](this.stream.read(e.start,e.end),r);if(o>=0&&r.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=r,i}addActions(e,t,r,i){let{state:s}=e,{parser:l}=e.p,{data:o}=l;for(let u=0;u<2;u++)for(let h=l.stateSlot(s,u?2:1);;h+=3){if(o[h]==65535)if(o[h+1]==1)h=Ti(o,h+2);else{i==0&&o[h+1]==2&&(i=this.putAction(Ti(o,h+2),t,r,i));break}o[h]==t&&(i=this.putAction(Ti(o,h+1),t,r,i))}return i}}class mD{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new hD(t,i),this.tokens=new pD(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Od.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new dD(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[l]=e;for(;l.forceReduce()&&l.stack.length&&l.stack[l.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let l=0;l<e.length;l++){let o=e[l];for(;;){if(this.tokens.mainToken=null,o.pos>t)r.push(o);else{if(this.advanceStack(o,r,e))continue;{i||(i=[],s=[]),i.push(o);let u=this.tokens.getMainToken(o);s.push(u.value,u.end)}}break}}if(!r.length){let l=i&&OD(i);if(l)return qn&&console.log("Finish with "+this.stackID(l)),this.stackToTree(l);if(this.parser.strict)throw qn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let l=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(l)return qn&&console.log("Force-finish "+this.stackID(l)),this.stackToTree(l.forceAll())}if(this.recovering){let l=this.recovering==1?1:this.recovering*3;if(r.length>l)for(r.sort((o,u)=>u.score-o.score);r.length>l;)r.pop();r.some(o=>o.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let l=0;l<r.length-1;l++){let o=r[l];for(let u=l+1;u<r.length;u++){let h=r[u];if(o.sameState(h)||o.buffer.length>500&&h.buffer.length>500)if((o.score-h.score||o.buffer.length-h.buffer.length)>0)r.splice(u--,1);else{r.splice(l--,1);continue e}}}r.length>12&&(r.sort((l,o)=>o.score-l.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let l=1;l<r.length;l++)r[l].pos<this.minStackPos&&(this.minStackPos=r[l].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let i=e.pos,{parser:s}=this,l=qn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,f=h?e.curContext.hash:0;for(let p=this.fragments.nodeAt(i);p;){let m=this.parser.nodeSet.types[p.type.id]==p.type?s.getGoto(e.state,p.type.id):-1;if(m>-1&&p.length&&(!h||(p.prop(Ne.contextHash)||0)==f))return e.useNode(p,m),qn&&console.log(l+this.stackID(e)+` (via reuse of ${s.getName(p.type.id)})`),!0;if(!(p instanceof Je)||p.children.length==0||p.positions[0]>0)break;let O=p.children[0];if(O instanceof Je&&p.positions[0]==0)p=O;else break}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),qn&&console.log(l+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let u=this.tokens.getActions(e);for(let h=0;h<u.length;){let f=u[h++],p=u[h++],m=u[h++],O=h==u.length||!r,k=O?e:e.split(),b=this.tokens.mainToken;if(k.apply(f,p,b?b.start:k.pos,m),qn&&console.log(l+this.stackID(k)+` (via ${(f&65536)==0?"shift":`reduce of ${s.getName(f&65535)}`} for ${s.getName(p)} @ ${i}${k==e?"":", split"})`),O)return!0;k.pos>i?t.push(k):r.push(k)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Vw(e,t),!0}}runRecovery(e,t,r){let i=null,s=!1;for(let l=0;l<e.length;l++){let o=e[l],u=t[l<<1],h=t[(l<<1)+1],f=qn?this.stackID(o)+" -> ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),qn&&console.log(f+this.stackID(o)+" (restarted)"),this.advanceFully(o,r))))continue;let p=o.split(),m=f;for(let O=0;O<10&&p.forceReduce()&&(qn&&console.log(m+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,r));O++)qn&&(m=this.stackID(p)+" -> ");for(let O of o.recoverByInsert(u))qn&&console.log(f+this.stackID(O)+" (via recover-insert)"),this.advanceFully(O,r);this.stream.end>o.pos?(h==o.pos&&(h++,u=0),o.recoverByDelete(u,h),qn&&console.log(f+this.stackID(o)+` (via recover-delete ${this.parser.getName(u)})`),Vw(o,r)):(!i||i.score<p.score)&&(i=p)}return i}stackToTree(e){return e.close(),Je.build({buffer:yd.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Mg||(Mg=new WeakMap)).get(e);return t||Mg.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Vw(n,e){for(let t=0;t<e.length;t++){let r=e[t];if(r.pos==n.pos&&r.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class gD{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const Ag=n=>n;class n${constructor(e){this.start=e.start,this.shift=e.shift||Ag,this.reduce=e.reduce||Ag,this.reuse=e.reuse||Ag,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ia extends _0{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let o=0;o<e.repeatNodeCount;o++)t.push("");let r=Object.keys(e.topRules).map(o=>e.topRules[o][1]),i=[];for(let o=0;o<t.length;o++)i.push([]);function s(o,u,h){i[o].push([u,u.deserialize(String(h))])}if(e.nodeProps)for(let o of e.nodeProps){let u=o[0];typeof u=="string"&&(u=Ne[u]);for(let h=1;h<o.length;){let f=o[h++];if(f>=0)s(f,u,o[h++]);else{let p=o[h+-f];for(let m=-f;m>0;m--)s(o[h++],u,p);h++}}}this.nodeSet=new Tc(t.map((o,u)=>_t.define({name:u>=this.minRepeatTerm?void 0:o,id:u,props:i[u],top:r.indexOf(u)>-1,error:u==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(u)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=HC;let l=Tu(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o<this.specializerSpecs.length;o++)this.specialized[o]=this.specializerSpecs[o].term;this.specializers=this.specializerSpecs.map(qw),this.states=Tu(e.states,Uint32Array),this.data=Tu(e.stateData),this.goto=Tu(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(o=>typeof o=="number"?new Ro(l,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new mD(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let l=i[s++],o=l&1,u=i[s++];if(o&&r)return u;for(let h=s+(l>>1);s<h;s++)if(i[s]==e)return u;if(o)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),l;;s+=3){if((l=r[s])==65535)if(r[s+1]==1)l=r[s=Ti(r,s+2)];else{if(r[s+1]==2)return Ti(r,s+2);break}if(l==t||l==0)return Ti(r,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Ti(this.data,s+2);else break;i=t(Ti(this.data,s+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ti(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];t.some((s,l)=>l&1&&s==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(ia.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(o=>o.from==r.external);if(!s)return r;let l=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[i]=qw(l),l})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let l=t.indexOf(s);l>=0&&(r[l]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!r[s])for(let l=this.dialects[t[s]],o;(o=this.data[l++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[o]=1;return new gD(e,r,i)}static deserialize(e){return new ia(e)}}function Ti(n,e){return n[e]|n[e+1]<<16}function OD(n){let e=null;for(let t of n){let r=t.p.stoppedAt;(t.pos==t.p.stream.end||r!=null&&t.pos>r)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function qw(n){if(n.external){let e=n.extend?1:0;return(t,r)=>n.external(t,r)<<1|e}return n.get}const yD=55,xD=1,kD=56,vD=2,bD=57,wD=3,Fw=4,SD=5,tx=6,r$=7,i$=8,s$=9,l$=10,PD=11,CD=12,QD=13,Rg=58,$D=14,TD=15,Yw=59,o$=21,jD=23,a$=24,ED=25,Ty=27,u$=28,MD=29,AD=32,RD=35,ND=37,LD=38,_D=0,DD=1,ID={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},zD={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Uw={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function ZD(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let Gw=null,Hw=null,Kw=0;function jy(n,e){let t=n.pos+e;if(Kw==t&&Hw==n)return Gw;let r=n.peek(e),i="";for(;ZD(r);)i+=String.fromCharCode(r),r=n.peek(++e);return Hw=n,Kw=t,Gw=i?i.toLowerCase():r==XD||r==BD?void 0:null}const c$=60,kd=62,nx=47,XD=63,BD=33,WD=45;function Jw(n,e){this.name=n,this.parent=e}const VD=[tx,l$,r$,i$,s$],qD=new n$({start:null,shift(n,e,t,r){return VD.indexOf(e)>-1?new Jw(jy(r,1)||"",n):n},reduce(n,e){return e==o$&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==tx||i==ND?new Jw(jy(r,1)||"",n):n},strict:!1}),FD=new ir((n,e)=>{if(n.next!=c$){n.next<0&&e.context&&n.acceptToken(Rg);return}n.advance();let t=n.next==nx;t&&n.advance();let r=jy(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?TD:$D);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(PD);if(i&&zD[i])return n.acceptToken(Rg,-2);if(e.dialectEnabled(_D))return n.acceptToken(CD);for(let s=e.context;s;s=s.parent)if(s.name==r)return;n.acceptToken(QD)}else{if(r=="script")return n.acceptToken(r$);if(r=="style")return n.acceptToken(i$);if(r=="textarea")return n.acceptToken(s$);if(ID.hasOwnProperty(r))return n.acceptToken(l$);i&&Uw[i]&&Uw[i][r]?n.acceptToken(Rg,-1):n.acceptToken(tx)}},{contextual:!0}),YD=new ir(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(Yw);break}if(n.next==WD)e++;else if(n.next==kd&&e>=2){t>=3&&n.acceptToken(Yw,-2);break}else e=0;n.advance()}});function UD(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const GD=new ir((n,e)=>{if(n.next==nx&&n.peek(1)==kd){let t=e.dialectEnabled(DD)||UD(e.context);n.acceptToken(t?SD:Fw,2)}else n.next==kd&&n.acceptToken(Fw,1)});function rx(n,e,t){let r=2+n.length;return new ir(i=>{for(let s=0,l=0,o=0;;o++){if(i.next<0){o&&i.acceptToken(e);break}if(s==0&&i.next==c$||s==1&&i.next==nx||s>=2&&s<r&&i.next==n.charCodeAt(s-2))s++,l++;else if(s==r&&i.next==kd){o>l?i.acceptToken(e,-l):i.acceptToken(t,-(l-2));break}else if((i.next==10||i.next==13)&&o){i.acceptToken(e,1);break}else s=l=0;i.advance()}})}const HD=rx("script",yD,xD),KD=rx("style",kD,vD),JD=rx("textarea",bD,wD),eI=ma({"Text RawText IncompleteTag IncompleteCloseTag":T.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":T.angleBracket,TagName:T.tagName,"MismatchedCloseTag/TagName":[T.tagName,T.invalid],AttributeName:T.attributeName,"AttributeValue UnquotedAttributeValue":T.attributeValue,Is:T.definitionOperator,"EntityReference CharacterReference":T.character,Comment:T.blockComment,ProcessingInst:T.processingInstruction,DoctypeDecl:T.documentMeta}),tI=ia.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!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^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:qD,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[eI],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!d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Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[HD,KD,JD,GD,FD,YD,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function h$(n,e){let t=Object.create(null);for(let r of n.getChildren(a$)){let i=r.getChild(ED),s=r.getChild(Ty)||r.getChild(u$);i&&(t[e.read(i.from,i.to)]=s?s.type.id==Ty?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function eS(n,e){let t=n.getChild(jD);return t?e.read(t.from,t.to):" "}function Ng(n,e,t){let r;for(let i of t)if(!i.attrs||i.attrs(r||(r=h$(n.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function f$(n=[],e=[]){let t=[],r=[],i=[],s=[];for(let o of n)(o.tag=="script"?t:o.tag=="style"?r:o.tag=="textarea"?i:s).push(o);let l=e.length?Object.create(null):null;for(let o of e)(l[o.name]||(l[o.name]=[])).push(o);return nQ((o,u)=>{let h=o.type.id;if(h==MD)return Ng(o,u,t);if(h==AD)return Ng(o,u,r);if(h==RD)return Ng(o,u,i);if(h==o$&&s.length){let f=o.node,p=f.firstChild,m=p&&eS(p,u),O;if(m){for(let k of s)if(k.tag==m&&(!k.attrs||k.attrs(O||(O=h$(p,u))))){let b=f.lastChild,w=b.type.id==LD?b.from:f.to;if(w>p.to)return{parser:k.parser,overlay:[{from:p.to,to:w}]}}}}if(l&&h==a$){let f=o.node,p;if(p=f.firstChild){let m=l[u.read(p.from,p.to)];if(m)for(let O of m){if(O.tagName&&O.tagName!=eS(f.parent,u))continue;let k=f.lastChild;if(k.type.id==Ty){let b=k.from+1,w=k.lastChild,S=k.to-(w&&w.isError?0:1);if(S>b)return{parser:O.parser,overlay:[{from:b,to:S}],bracketed:!0}}else if(k.type.id==u$)return{parser:O.parser,overlay:[{from:k.from,to:k.to}]}}}}return null})}const nI=135,tS=1,rI=136,iI=137,d$=2,sI=138,lI=3,oI=4,p$=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],aI=58,uI=40,m$=95,cI=91,zf=45,hI=46,fI=35,dI=37,pI=38,mI=92,gI=10,OI=42;function cc(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function ix(n){return n>=48&&n<=57}function nS(n){return ix(n)||n>=97&&n<=102||n>=65&&n<=70}const g$=(n,e,t)=>(r,i)=>{for(let s=!1,l=0,o=0;;o++){let{next:u}=r;if(cc(u)||u==zf||u==m$||s&&ix(u))!s&&(u!=zf||o>0)&&(s=!0),l===o&&u==zf&&l++,r.advance();else if(u==mI&&r.peek(1)!=gI){if(r.advance(),nS(r.next)){do r.advance();while(nS(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(l==2&&i.canShift(d$)?e:u==uI?t:n);break}}},yI=new ir(g$(rI,d$,iI),{contextual:!0}),xI=new ir(g$(sI,lI,oI),{contextual:!0}),kI=new ir(n=>{if(p$.includes(n.peek(-1))){let{next:e}=n;(cc(e)||e==m$||e==fI||e==hI||e==OI||e==cI||e==aI&&cc(n.peek(1))||e==zf||e==pI)&&n.acceptToken(nI)}}),vI=new ir(n=>{if(!p$.includes(n.peek(-1))){let{next:e}=n;if(e==dI&&(n.advance(),n.acceptToken(tS)),cc(e)){do n.advance();while(cc(n.next)||ix(n.next));n.acceptToken(tS)}}}),bI=ma({"AtKeyword import charset namespace keyframes media supports font-feature-values":T.definitionKeyword,"from to selector scope MatchFlag":T.keyword,NamespaceName:T.namespace,KeyframeName:T.labelName,KeyframeRangeName:T.operatorKeyword,TagName:T.tagName,ClassName:T.className,PseudoClassName:T.constant(T.className),IdName:T.labelName,"FeatureName PropertyName":T.propertyName,AttributeName:T.attributeName,NumberLiteral:T.number,KeywordQuery:T.keyword,UnaryQueryOp:T.operatorKeyword,"CallTag ValueName FontName":T.atom,VariableName:T.variableName,Callee:T.operatorKeyword,Unit:T.unit,"UniversalSelector NestingSelector":T.definitionOperator,"MatchOp CompareOp":T.compareOperator,"ChildOp SiblingOp, LogicOp":T.logicOperator,BinOp:T.arithmeticOperator,Important:T.modifier,Comment:T.blockComment,ColorLiteral:T.color,"ParenthesizedContent StringLiteral":T.string,":":T.punctuation,"PseudoOp #":T.derefOperator,"; , |":T.separator,"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace}),wI={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:132,"url-prefix":132,domain:132,regexp:132},SI={__proto__:null,or:104,and:104,not:112,only:112,layer:186},PI={__proto__:null,selector:118,layer:182},CI={__proto__:null,"@import":178,"@media":190,"@charset":194,"@namespace":198,"@keyframes":204,"@supports":216,"@scope":220,"@font-feature-values":226},QI={__proto__:null,to:223},$I=ia.deserialize({version:14,states:"IpQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FdO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#DtO'dQdO'#DvO'oQdO'#D}O'oQdO'#EQOOQP'#Fd'#FdO)OQhO'#EsOOQS'#Fc'#FcOOQS'#Ev'#EvQYQdOOO)VQdO'#EWO*cQhO'#E^O)VQdO'#E`O*jQdO'#EbO*uQdO'#EeO)zQhO'#EkO*}QdO'#EmO+YQdO'#EpO+_QaO'#CfO+fQ`O'#ETO+kQ`O'#FnO+vQdO'#FnQOQ`OOP,QO&jO'#CaPOOO)CAR)CAROOQP'#Ci'#CiOOQP,59R,59RO%VQdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&XQdO,59VO,]QdO,59YO'_QdO,5:`O'dQdO,5:bO'oQdO,5:iO'oQdO,5:kO'oQdO,5:lO'oQdO'#E}O,hQ`O,58}O,pQdO'#ESOOQS,58},58}OOQP'#Cq'#CqOOQO'#Dr'#DrOOQP,59Y,59YO,wQ`O,59YO,|Q`O,59YOOQP'#Du'#DuOOQP,5:`,5:`O-RQpO'#DwO-^QdO'#DxO-cQ`O'#DxO-hQpO,5:bO.RQaO,5:iO.iQaO,5:lOOQW'#D^'#D^O/eQhO'#DgO/xQhO,5;_O)zQhO'#DeO0VQ`O'#DkO0[QhO'#DnOOQW'#Fj'#FjOOQS,5;_,5;_O0aQ`O'#DhOOQS-E8t-E8tOOQ['#Cv'#CvO0fQdO'#CwO0|QdO'#C}O1dQdO'#DQO1zQ!pO'#DSO4TQ!jO,5:rOOQO'#DX'#DXO,|Q`O'#DWO4eQ!nO'#FgO6hQ`O'#DYO6mQ`O'#DoOOQ['#Fg'#FgO6rQhO'#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Q%c#}Q%g$RS%r$g%tQ%w$jR'Z&iQ#z!cQ&h%`R'j'YR%i$RR%X#oQpPR#n!RQ!yeQ$d!qR%q$e",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:159,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[bI],skippedNodes:[0,5,117],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf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j#c#dFj#d;'S%j;'S;=`%{<%lO%jbFoU!e`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!e`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!e`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!e`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!e`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$cQ!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[kI,vI,yI,xI,1,2,3,4,new xd("m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~",28,142)],topRules:{StyleSheet:[0,6],Styles:[1,116]},dynamicPrecedences:{84:1},specialized:[{term:137,get:n=>wI[n]||-1},{term:138,get:n=>SI[n]||-1},{term:4,get:n=>PI[n]||-1},{term:28,get:n=>CI[n]||-1},{term:136,get:n=>QI[n]||-1}],tokenPrec:2256});let Lg=null;function _g(){if(!Lg&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));Lg=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return Lg||[]}const rS=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),iS=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),TI=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),jI=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),Qi=/^(\w[\w-]*|-\w[\w-]*|)$/,EI=/^-(-[\w-]*)?$/;function MI(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const sS=new tQ,AI=["Declaration"];function RI(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function O$(n,e,t){if(e.to-e.from>4096){let r=sS.get(e);if(r)return r;let i=[],s=new Set,l=e.cursor(et.IncludeAnonymous);if(l.firstChild())do for(let o of O$(n,l.node,t))s.has(o.label)||(s.add(o.label),i.push(o));while(l.nextSibling());return sS.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var l;if(t(s)&&s.matchContext(AI)&&((l=s.node.nextSibling)===null||l===void 0?void 0:l.name)==":"){let o=n.sliceString(s.from,s.to);i.has(o)||(i.add(o),r.push({label:o,type:"variable"}))}}),r}}const NI=n=>e=>{let{state:t,pos:r}=e,i=ct(t).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:_g(),validFor:Qi};if(i.name=="ValueName")return{from:i.from,options:iS,validFor:Qi};if(i.name=="PseudoClassName")return{from:i.from,options:rS,validFor:Qi};if(n(i)||(e.explicit||s)&&MI(i,t.doc))return{from:n(i)||s?i.from:r,options:O$(t.doc,RI(i),n),validFor:EI};if(i.name=="TagName"){for(let{parent:u}=i;u;u=u.parent)if(u.name=="Block")return{from:i.from,options:_g(),validFor:Qi};return{from:i.from,options:TI,validFor:Qi}}if(i.name=="AtKeyword")return{from:i.from,options:jI,validFor:Qi};if(!e.explicit)return null;let l=i.resolve(r),o=l.childBefore(r);return o&&o.name==":"&&l.name=="PseudoClassSelector"?{from:r,options:rS,validFor:Qi}:o&&o.name==":"&&l.name=="Declaration"||l.name=="ArgList"?{from:r,options:iS,validFor:Qi}:l.name=="Block"||l.name=="Styles"?{from:r,options:_g(),validFor:Qi}:null},LI=NI(n=>n.name=="VariableName"),vd=ta.define({name:"css",parser:$I.configure({props:[jc.add({Declaration:Df()}),Oa.add({"Block KeyframeList":uQ})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function _I(){return new rc(vd,vd.data.of({autocomplete:LI}))}const DI=316,II=317,lS=1,zI=2,ZI=3,XI=4,BI=318,WI=320,VI=321,qI=5,FI=6,YI=0,Ey=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],y$=125,UI=59,My=47,GI=42,HI=43,KI=45,JI=60,ez=44,tz=63,nz=46,rz=91,iz=new n$({start:!1,shift(n,e){return e==qI||e==FI||e==WI?n:e==VI},strict:!1}),sz=new ir((n,e)=>{let{next:t}=n;(t==y$||t==-1||e.context)&&n.acceptToken(BI)},{contextual:!0,fallback:!0}),lz=new ir((n,e)=>{let{next:t}=n,r;Ey.indexOf(t)>-1||t==My&&((r=n.peek(1))==My||r==GI)||t!=y$&&t!=UI&&t!=-1&&!e.context&&n.acceptToken(DI)},{contextual:!0}),oz=new ir((n,e)=>{n.next==rz&&!e.context&&n.acceptToken(II)},{contextual:!0}),az=new ir((n,e)=>{let{next:t}=n;if(t==HI||t==KI){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(lS);n.acceptToken(r?lS:zI)}}else t==tz&&n.peek(1)==nz&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(ZI))},{contextual:!0});function Dg(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const uz=new ir((n,e)=>{if(n.next!=JI||!e.dialectEnabled(YI)||(n.advance(),n.next==My))return;let t=0;for(;Ey.indexOf(n.next)>-1;)n.advance(),t++;if(Dg(n.next,!0)){for(n.advance(),t++;Dg(n.next,!1);)n.advance(),t++;for(;Ey.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==ez)return;for(let r=0;;r++){if(r==7){if(!Dg(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(XI,-t)}),cz=ma({"get set async static":T.modifier,"for while do if else switch try catch finally return throw break continue default case defer":T.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":T.operatorKeyword,"let var const using function class extends":T.definitionKeyword,"import export from":T.moduleKeyword,"with debugger new":T.keyword,TemplateString:T.special(T.string),super:T.atom,BooleanLiteral:T.bool,this:T.self,null:T.null,Star:T.modifier,VariableName:T.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":T.function(T.variableName),VariableDefinition:T.definition(T.variableName),Label:T.labelName,PropertyName:T.propertyName,PrivatePropertyName:T.special(T.propertyName),"CallExpression/MemberExpression/PropertyName":T.function(T.propertyName),"FunctionDeclaration/VariableDefinition":T.function(T.definition(T.variableName)),"ClassDeclaration/VariableDefinition":T.definition(T.className),"NewExpression/VariableName":T.className,PropertyDefinition:T.definition(T.propertyName),PrivatePropertyDefinition:T.definition(T.special(T.propertyName)),UpdateOp:T.updateOperator,"LineComment Hashbang":T.lineComment,BlockComment:T.blockComment,Number:T.number,String:T.string,Escape:T.escape,ArithOp:T.arithmeticOperator,LogicOp:T.logicOperator,BitOp:T.bitwiseOperator,CompareOp:T.compareOperator,RegExp:T.regexp,Equals:T.definitionOperator,Arrow:T.function(T.punctuation),": Spread":T.punctuation,"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace,"InterpolationStart InterpolationEnd":T.special(T.brace),".":T.derefOperator,", ;":T.separator,"@":T.meta,TypeName:T.typeName,TypeDefinition:T.definition(T.typeName),"type enum interface implements namespace module declare":T.definitionKeyword,"abstract global Privacy readonly override":T.modifier,"is keyof unique infer asserts":T.operatorKeyword,JSXAttributeValue:T.attributeValue,JSXText:T.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":T.angleBracket,"JSXIdentifier JSXNameSpacedName":T.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":T.attributeName,"JSXBuiltin/JSXIdentifier":T.standard(T.tagName)}),hz={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},fz={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},dz={__proto__:null,"<":193},pz=ia.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K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&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:iz,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[cz],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|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#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[lz,oz,az,uz,2,3,4,5,6,7,8,9,10,11,12,13,14,sz,new xd("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new xd("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:n=>hz[n]||-1},{term:343,get:n=>fz[n]||-1},{term:95,get:n=>dz[n]||-1}],tokenPrec:15201}),x$=[Tn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Tn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Tn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Tn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Tn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Tn(`try {
83
+ \${}
84
+ } catch (\${error}) {
85
+ \${}
86
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),Tn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Tn(`if (\${}) {
87
+ \${}
88
+ } else {
89
+ \${}
90
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),Tn(`class \${name} {
91
+ constructor(\${params}) {
92
+ \${}
93
+ }
94
+ }`,{label:"class",detail:"definition",type:"keyword"}),Tn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Tn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],mz=x$.concat([Tn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Tn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Tn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),oS=new tQ,k$=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function mu(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const gz=["FunctionDeclaration"],Oz={FunctionDeclaration:mu("function"),ClassDeclaration:mu("class"),ClassExpression:()=>!0,EnumDeclaration:mu("constant"),TypeAliasDeclaration:mu("type"),NamespaceDeclaration:mu("namespace"),VariableDefinition(n,e){n.matchContext(gz)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function v$(n,e){let t=oS.get(e);if(t)return t;let r=[],i=!0;function s(l,o){let u=n.sliceString(l.from,l.to);r.push({label:u,type:o})}return e.cursor(et.IncludeAnonymous).iterate(l=>{if(i)i=!1;else if(l.name){let o=Oz[l.name];if(o&&o(l,s)||k$.has(l.name))return!1}else if(l.to-l.from>8192){for(let o of v$(n,l.node))r.push(o);return!1}}),oS.set(e,r),r}const aS=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,b$=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function yz(n){let e=ct(n.state).resolveInner(n.pos,-1);if(b$.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&aS.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)k$.has(i.name)&&(r=r.concat(v$(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:aS}}const hi=ta.define({name:"javascript",parser:pz.configure({props:[jc.add({IfStatement:Df({except:/^\s*({|else\b)/}),TryStatement:Df({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:h4,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:c4({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":Df({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Oa.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":uQ,BlockComment(n){return{from:n.from+2,to:n.to-2}},JSXElement(n){let e=n.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=n.lastChild;return{from:e.to,to:t.type.isError?n.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(n){var e;let t=(e=n.firstChild)===null||e===void 0?void 0:e.nextSibling,r=n.lastChild;return!t||t.type.isError?null:{from:t.to,to:r.type.isError?n.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),w$={test:n=>/^JSX/.test(n.name),facet:D0({commentTokens:{block:{open:"{/*",close:"*/}"}}})},S$=hi.configure({dialect:"ts"},"typescript"),P$=hi.configure({dialect:"jsx",props:[I0.add(n=>n.isTop?[w$]:void 0)]}),C$=hi.configure({dialect:"jsx ts",props:[I0.add(n=>n.isTop?[w$]:void 0)]},"typescript");let Q$=n=>({label:n,type:"keyword"});const $$="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Q$),xz=$$.concat(["declare","implements","private","protected","public"].map(Q$));function kz(n={}){let e=n.jsx?n.typescript?C$:P$:n.typescript?S$:hi,t=n.typescript?mz.concat(xz):x$.concat($$);return new rc(e,[hi.data.of({autocomplete:B4(b$,wQ(t))}),hi.data.of({autocomplete:yz}),n.jsx?wz:[]])}function vz(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function uS(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const bz=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),wz=ce.inputHandler.of((n,e,t,r,i)=>{if((bz?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!hi.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:l}=s,o=l.changeByRange(u=>{var h;let{head:f}=u,p=ct(l).resolveInner(f-1,-1),m;if(p.name=="JSXStartTag"&&(p=p.parent),!(l.doc.sliceString(f-1,f)!=r||p.name=="JSXAttributeValue"&&p.to>f)){if(r==">"&&p.name=="JSXFragmentTag")return{range:u,changes:{from:f,insert:"</>"}};if(r=="/"&&p.name=="JSXStartCloseTag"){let O=p.parent,k=O.parent;if(k&&O.from==f-2&&((m=uS(l.doc,k.firstChild,f))||((h=k.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let b=`${m}>`;return{range:U.cursor(f+b.length,-1),changes:{from:f,insert:b}}}}else if(r==">"){let O=vz(p);if(O&&O.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(l.doc.sliceString(f,f+2))&&(m=uS(l.doc,O,f)))return{range:u,changes:{from:f,insert:`</${m}>`}}}}return{range:u}});return o.changes.empty?!1:(n.dispatch([s,l.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),gu=["_blank","_self","_top","_parent"],Ig=["ascii","utf-8","utf-16","latin1","latin1"],zg=["get","post","put","delete"],Zg=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Fn=["true","false"],Se={},Sz={a:{attrs:{href:null,ping:null,type:null,media:null,target:gu,hreflang:null}},abbr:Se,address:Se,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Se,aside:Se,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Se,base:{attrs:{href:null,target:gu}},bdi:Se,bdo:Se,blockquote:{attrs:{cite:null}},body:Se,br:Se,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Zg,formmethod:zg,formnovalidate:["novalidate"],formtarget:gu,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Se,center:Se,cite:Se,code:Se,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Se,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Se,div:Se,dl:Se,dt:Se,em:Se,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Se,figure:Se,footer:Se,form:{attrs:{action:null,name:null,"accept-charset":Ig,autocomplete:["on","off"],enctype:Zg,method:zg,novalidate:["novalidate"],target:gu}},h1:Se,h2:Se,h3:Se,h4:Se,h5:Se,h6:Se,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Se,hgroup:Se,hr:Se,html:{attrs:{manifest:null}},i:Se,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Zg,formmethod:zg,formnovalidate:["novalidate"],formtarget:gu,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Se,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Se,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Se,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Ig,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Se,noscript:Se,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Se,param:{attrs:{name:null,value:null}},pre:Se,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Se,rt:Se,ruby:Se,samp:Se,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Ig}},section:Se,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Se,source:{attrs:{src:null,type:null,media:null}},span:Se,strong:Se,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Se,summary:Se,sup:Se,table:Se,tbody:Se,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Se,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Se,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Se,time:{attrs:{datetime:null}},title:Se,tr:Se,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Se,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Se},T$={accesskey:null,class:null,contenteditable:Fn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Fn,autocorrect:Fn,autocapitalize:Fn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Fn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Fn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Fn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Fn,"aria-hidden":Fn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Fn,"aria-multiselectable":Fn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Fn,"aria-relevant":null,"aria-required":Fn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},j$="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of j$)T$[n]=null;let hc=class{constructor(e,t){this.tags={...Sz,...e},this.globalAttrs={...T$,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};hc.default=new hc;function sa(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function la(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function E$(n,e,t){let r=t.tags[sa(n,la(e))];return(r==null?void 0:r.children)||t.allTags}function sx(n,e){let t=[];for(let r=la(e);r&&!r.type.isTop;r=la(r.parent)){let i=sa(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const M$=/^[:\-\.\w\u00b7-\uffff]*$/;function cS(n,e,t,r,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",l=la(t,t.name=="StartTag"||t.name=="TagName");return{from:r,to:i,options:E$(n.doc,l,e).map(o=>({label:o,type:"type"})).concat(sx(n.doc,t).map((o,u)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-u}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function hS(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:sx(n.doc,e).map((s,l)=>({label:s,apply:s+i,type:"type",boost:99-l})),validFor:M$}}function Pz(n,e,t,r){let i=[],s=0;for(let l of E$(n.doc,t,e))i.push({label:"<"+l,type:"type"});for(let l of sx(n.doc,t))i.push({label:"</"+l+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Cz(n,e,t,r,i){let s=la(t),l=s?e.tags[sa(n.doc,s)]:null,o=l&&l.attrs?Object.keys(l.attrs):[],u=l&&l.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:u.map(h=>({label:h,type:"property"})),validFor:M$}}function Qz(n,e,t,r,i){var s;let l=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],u;if(l){let h=n.sliceDoc(l.from,l.to),f=e.globalAttrs[h];if(!f){let p=la(t),m=p?e.tags[sa(n.doc,p)]:null;f=(m==null?void 0:m.attrs)&&m.attrs[h]}if(f){let p=n.sliceDoc(r,i).toLowerCase(),m='"',O='"';/^['"]/.test(p)?(u=p[0]=='"'?/^[^"]*$/:/^[^']*$/,m="",O=n.sliceDoc(i,i+1)==p[0]?"":p[0],p=p.slice(1),r++):u=/^[^\s<>='"]*$/;for(let k of f)o.push({label:k,apply:m+k+O,type:"constant"})}}return{from:r,to:i,options:o,validFor:u}}function A$(n,e){let{state:t,pos:r}=e,i=ct(t).resolveInner(r,-1),s=i.resolve(r);for(let l=r,o;s==i&&(o=i.childBefore(l));){let u=o.lastChild;if(!u||!u.type.isError||u.from<u.to)break;s=i=o,l=u.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?hS(t,i,i.from,r):cS(t,n,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?cS(t,n,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?hS(t,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?Cz(t,n,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?Qz(t,n,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Pz(t,n,i,r):null}function $z(n){return A$(hc.default,n)}function Tz(n){let{extraTags:e,extraGlobalAttributes:t}=n,r=t||e?new hc(e,t):hc.default;return i=>A$(r,i)}const jz=hi.parser.configure({top:"SingleExpression"}),R$=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:S$.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:P$.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:C$.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:jz},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:hi.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:vd.parser}],N$=[{name:"style",parser:vd.parser.configure({top:"Styles"})}].concat(j$.map(n=>({name:n,parser:hi.parser}))),L$=ta.define({name:"html",parser:tI.configure({props:[jc.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let r=n.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),Oa.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),bQ.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Zf=L$.configure({wrap:f$(R$,N$)});function Ez(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=f$((n.nestedLanguages||[]).concat(R$),(n.nestedAttributes||[]).concat(N$)));let r=t?L$.configure({wrap:t,dialect:e}):e?Zf.configure({dialect:e}):Zf;return new rc(r,[Zf.data.of({autocomplete:Tz(n)}),n.autoCloseTags!==!1?Mz:[],kz().support,_I().support])}const fS=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Mz=ce.inputHandler.of((n,e,t,r,i)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Zf.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:l}=s,o=l.changeByRange(u=>{var h,f,p;let m=l.doc.sliceString(u.from-1,u.to)==r,{head:O}=u,k=ct(l).resolveInner(O,-1),b;if(m&&r==">"&&k.name=="EndTag"){let w=k.parent;if(((f=(h=w.parent)===null||h===void 0?void 0:h.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(b=sa(l.doc,w.parent,O))&&!fS.has(b)){let S=O+(l.doc.sliceString(O,O+1)===">"?1:0),C=`</${b}>`;return{range:u,changes:{from:O,to:S,insert:C}}}}else if(m&&r=="/"&&k.name=="IncompleteCloseTag"){let w=k.parent;if(k.from==O-2&&((p=w.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(b=sa(l.doc,w,O))&&!fS.has(b)){let S=O+(l.doc.sliceString(O,O+1)===">"?1:0),C=`${b}>`;return{range:U.cursor(O+C.length,-1),changes:{from:O,to:S,insert:C}}}}return{range:u}});return o.changes.empty?!1:(n.dispatch([s,l.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),_$=D0({commentTokens:{block:{open:"<!--",close:"-->"}}}),D$=new Ne,I$=U3.configure({props:[Oa.add(n=>!n.is("Block")||n.is("Document")||Ay(n)!=null||Az(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),D$.add(Ay),jc.add({Document:()=>null}),yl.add({Document:_$})]});function Ay(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function Az(n){return n.name=="OrderedList"||n.name=="BulletList"}function Rz(n,e){let t=n;for(;;){let r=t.nextSibling,i;if(!r||(i=Ay(r.type))!=null&&i<=e)break;t=r}return t.to}const Nz=aQ.of((n,e,t)=>{for(let r=ct(n).resolveInner(t,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(D$);if(i==null)continue;let s=Rz(r,i);if(s>t)return{from:t,to:s}}return null});function lx(n){return new yr(_$,n,[],"markdown")}const Lz=lx(I$),_z=I$.configure([lD,aD,oD,uD,{props:[Oa.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),bd=lx(_z);function Dz(n,e){return t=>{if(t&&n){let r=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?r=n(t):r=ud.matchLanguageName(n,t,!0),r instanceof ud)return r.support?r.support.language.parser:nc.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class Xg{constructor(e,t,r,i,s,l,o){this.node=e,this.from=t,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=l,this.item=o}blank(e,t=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(t?this.spaceAfter:"")}}marker(e,t){let r=this.node.name=="OrderedList"?String(+Z$(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function z$(n,e){let t=[],r=[];for(let i=n;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],l,o=e.lineAt(s.from),u=s.from-o.from;if(s.name=="Blockquote"&&(l=/^ *>( ?)/.exec(o.text.slice(u))))r.push(new Xg(s,u,u+l[0].length,"",l[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(l=/^( *)\d+([.)])( *)/.exec(o.text.slice(u)))){let h=l[3],f=l[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),r.push(new Xg(s.parent,u,u+f,l[1],h,l[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(l=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(u)))){let h=l[4],f=l[0].length;h.length>4&&(h=h.slice(0,h.length-4),f-=4);let p=l[2];l[3]&&(p+=l[3].replace(/[xX]/," ")),r.push(new Xg(s.parent,u,u+f,l[1],h,p,s))}}return r}function Z$(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function Bg(n,e,t,r=0){for(let i=-1,s=n;;){if(s.name=="ListItem"){let o=Z$(s,e),u=+o[2];if(i>=0){if(u!=i+1)return;t.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(i+2+r)})}i=u}let l=s.nextSibling;if(!l)break;s=l}}function ox(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(ga)!=" ")return n;let r=_r(n,4,t),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+n.slice(t)}const Iz=(n={})=>({state:e,dispatch:t})=>{let r=ct(e),{doc:i}=e,s=null,l=e.changeByRange(o=>{if(!o.empty||!bd.isActiveAt(e,o.from,-1)&&!bd.isActiveAt(e,o.from,1))return s={range:o};let u=o.from,h=i.lineAt(u),f=z$(r.resolveInner(u,-1),i);for(;f.length&&f[f.length-1].from>u-h.from;)f.pop();if(!f.length)return s={range:o};let p=f[f.length-1];if(p.to-p.spaceAfter.length>u-h.from)return s={range:o};let m=u>=p.to-p.spaceAfter.length&&!/\S/.test(h.text.slice(p.to));if(p.item&&m){let S=p.node.firstChild,C=p.node.getChild("ListItem","ListItem");if(S.to>=u||C&&C.to<u||h.from>0&&!/[^\s>]/.test(i.lineAt(h.from-1).text)||n.nonTightLists===!1){let Q=f.length>1?f[f.length-2]:null,R,I="";Q&&Q.item?(R=h.from+Q.from,I=Q.marker(i,1)):R=h.from+(Q?Q.to:0);let j=[{from:R,to:u,insert:I}];return p.node.name=="OrderedList"&&Bg(p.item,i,j,-2),Q&&Q.node.name=="OrderedList"&&Bg(Q.item,i,j),{range:U.cursor(R+I.length),changes:j}}else{let Q=pS(f,e,h);return{range:U.cursor(u+Q.length+1),changes:{from:h.from,insert:Q+e.lineBreak}}}}if(p.node.name=="Blockquote"&&m&&h.from){let S=i.lineAt(h.from-1),C=/>\s*$/.exec(S.text);if(C&&C.index==p.from){let Q=e.changes([{from:S.from+C.index,to:S.to},{from:h.from+p.from,to:h.to}]);return{range:o.map(Q),changes:Q}}}let O=[];p.node.name=="OrderedList"&&Bg(p.item,i,O);let k=p.item&&p.item.from<h.from,b="";if(!k||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=p.to)for(let S=0,C=f.length-1;S<=C;S++)b+=S==C&&!k?f[S].marker(i,1):f[S].blank(S<C?_r(h.text,4,f[S+1].from)-b.length:null);let w=u;for(;w>h.from&&/\s/.test(h.text.charAt(w-h.from-1));)w--;return b=ox(b,e),Zz(p.node,e.doc)&&(b=pS(f,e,h)+e.lineBreak+b),O.push({from:w,to:u,insert:e.lineBreak+b}),{range:U.cursor(w+b.length+1),changes:O}});return s?!1:(t(e.update(l,{scrollIntoView:!0,userEvent:"input"})),!0)},zz=Iz();function dS(n){return n.name=="QuoteMark"||n.name=="ListMark"}function Zz(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,r=n.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(t.to),s=e.lineAt(r.from),l=/^[\s>]*$/.test(i.text);return i.number+(l?0:1)<s.number}function pS(n,e,t){let r="";for(let i=0,s=n.length-2;i<=s;i++)r+=n[i].blank(i<s?_r(t.text,4,n[i+1].from)-r.length:null,i<s);return ox(r,e)}function Xz(n,e){let t=n.resolveInner(e,-1),r=e;dS(t)&&(r=t.from,t=t.parent);for(let i;i=t.childBefore(r);)if(dS(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")t=i.lastChild,r=t.to;else break;return t}const Bz=({state:n,dispatch:e})=>{let t=ct(n),r=null,i=n.changeByRange(s=>{let l=s.from,{doc:o}=n;if(s.empty&&bd.isActiveAt(n,s.from)){let u=o.lineAt(l),h=z$(Xz(t,l),o);if(h.length){let f=h[h.length-1],p=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(l-u.from>p&&!/\S/.test(u.text.slice(p,l-u.from)))return{range:U.cursor(u.from+p),changes:{from:u.from+p,to:l}};if(l-u.from==p&&(!f.item||u.from<=f.item.from||!/\S/.test(u.text.slice(0,f.to)))){let m=u.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(u.text.slice(f.from,f.to))){let O=f.blank(_r(u.text,4,f.to)-_r(u.text,4,f.from));return m==u.from&&(O=ox(O,n)),{range:U.cursor(m+O.length),changes:{from:m,to:u.from+f.to,insert:O}}}if(m<l)return{range:U.cursor(m),changes:{from:m,to:l}}}}}return r={range:s}});return r?!1:(e(n.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},Wz=[{key:"Enter",run:zz},{key:"Backspace",run:Bz}],X$=Ez({matchClosingTags:!1});function B$(n={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:r=!0,base:{parser:i}=Lz,completeHTMLTags:s=!0,pasteURLAsLink:l=!0,htmlTagLanguage:o=X$}=n;if(!(i instanceof Hd))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let u=n.extensions?[n.extensions]:[],h=[o.support,Nz],f;l&&h.push(Yz),t instanceof rc?(h.push(t.support),f=t.language):t&&(f=t);let p=e||f?Dz(e,f):void 0;u.push(H3({codeParser:p,htmlParser:o.language.parser})),r&&h.push(Bi.high(pa.of(Wz)));let m=lx(i.configure(u));return s&&h.push(m.data.of({autocomplete:Vz})),new rc(m,h)}function Vz(n){let{state:e,pos:t}=n,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!r)return null;let i=ct(e).resolveInner(t,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:t-r[0].length,to:t,options:qz(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Wg=null;function qz(){if(Wg)return Wg;let n=$z(new X0(Ve.create({extensions:X$}),0,!0));return Wg=n?n.options:[]}const Fz=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Yz=ce.domEventHandlers({paste:(n,e)=>{var t;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(t=n.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!bd.isActiveAt(e.state,r.from,1)))return!1;let s=ct(e.state),l=!1;return s.iterate({from:r.from,to:r.to,enter:o=>{(o.from>r.from||Fz.test(o.name))&&(l=!0)},leave:o=>{o.to<r.to&&(l=!0)}}),l?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});function Ry(){return Ry=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Ry.apply(null,arguments)}function Uz(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}const Gz=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=ux(n.state,t.from);return r.line?Hz(n):r.block?Jz(n):!1};function ax(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const Hz=ax(nZ,0),Kz=ax(W$,0),Jz=ax((n,e)=>W$(n,e,tZ(e)),0);function ux(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const Ou=50;function eZ(n,{open:e,close:t},r,i){let s=n.sliceDoc(r-Ou,r),l=n.sliceDoc(i,i+Ou),o=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(l)[0].length,h=s.length-o;if(s.slice(h-e.length,h)==e&&l.slice(u,u+t.length)==t)return{open:{pos:r-o,margin:o&&1},close:{pos:i+u,margin:u&&1}};let f,p;i-r<=2*Ou?f=p=n.sliceDoc(r,i):(f=n.sliceDoc(r,r+Ou),p=n.sliceDoc(i-Ou,i));let m=/^\s*/.exec(f)[0].length,O=/\s*$/.exec(p)[0].length,k=p.length-O-t.length;return f.slice(m,m+e.length)==e&&p.slice(k,k+t.length)==t?{open:{pos:r+m+e.length,margin:/\s/.test(f.charAt(m+e.length))?1:0},close:{pos:i-O-t.length,margin:/\s/.test(p.charAt(k-1))?1:0}}:null}function tZ(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to);i.from>r.from&&i.from==t.to&&(i=t.to==r.to+1?r:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function W$(n,e,t=e.selection.ranges){let r=t.map(s=>ux(e,s.from).block);if(!r.every(s=>s))return null;let i=t.map((s,l)=>eZ(e,r[l],s.from,s.to));if(n!=2&&!i.every(s=>s))return{changes:e.changes(t.map((s,l)=>i[l]?[]:[{from:s.from,insert:r[l].open+" "},{from:s.to,insert:" "+r[l].close}]))};if(n!=1&&i.some(s=>s)){let s=[];for(let l=0,o;l<i.length;l++)if(o=i[l]){let u=r[l],{open:h,close:f}=o;s.push({from:h.pos-u.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+u.close.length})}return{changes:s}}return null}function nZ(n,e,t=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:l}of t){let o=r.length,u=1e9,h;for(let f=s;f<=l;){let p=e.doc.lineAt(f);if(h==null&&(h=ux(e,p.from).line,!h))continue e;if(p.from>i&&(s==l||l>p.from)){i=p.from;let m=/^\s*/.exec(p.text)[0].length,O=m==p.length,k=p.text.slice(m,m+h.length)==h?m:-1;m<p.text.length&&m<u&&(u=m),r.push({line:p,comment:k,token:h,indent:m,empty:O,single:!1})}f=p.to+1}if(u<1e9)for(let f=o;f<r.length;f++)r[f].indent<r[f].line.text.length&&(r[f].indent=u);r.length==o+1&&(r[o].single=!0)}if(n!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:o,token:u,indent:h,empty:f,single:p}of r)(p||!f)&&s.push({from:o.from+h,insert:u+" "});let l=e.changes(s);return{changes:l,selection:e.selection.map(l,1)}}else if(n!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:l,comment:o,token:u}of r)if(o>=0){let h=l.from+o,f=h+u.length;l.text[f-l.from]==" "&&f++,s.push({from:h,to:f})}return{changes:s}}return null}const Ny=mi.define(),rZ=mi.define(),iZ=pe.define(),V$=pe.define({combine(n){return gi(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),q$=Jt.define({create(){return ui.empty},update(n,e){let t=e.state.facet(V$),r=e.annotation(Ny);if(r){let u=Ln.fromTransaction(e,r.selection),h=r.side,f=h==0?n.undone:n.done;return u?f=wd(f,f.length,t.minDepth,u):f=U$(f,e.startState.selection),new ui(h==0?r.rest:f,h==0?f:r.rest)}let i=e.annotation(rZ);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Mt.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=Ln.fromTransaction(e),l=e.annotation(Mt.time),o=e.annotation(Mt.userEvent);return s?n=n.addChanges(s,l,o,t,e):e.selection&&(n=n.addSelection(e.startState.selection,l,o,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new ui(n.done.map(Ln.fromJSON),n.undone.map(Ln.fromJSON))}});function sZ(n={}){return[q$,V$.of(n),ce.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?F$:e.inputType=="historyRedo"?Ly:null;return r?(e.preventDefault(),r(t)):!1}})]}function Kd(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(q$,!1);if(!i)return!1;let s=i.pop(n,t,e);return s?(r(s),!0):!1}}const F$=Kd(0,!1),Ly=Kd(1,!1),lZ=Kd(0,!0),oZ=Kd(1,!0);class Ln{constructor(e,t,r,i,s){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new Ln(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ln(e.changes&&Nt.fromJSON(e.changes),[],e.mapped&&ci.fromJSON(e.mapped),e.startSelection&&U.fromJSON(e.startSelection),e.selectionsAfter.map(U.fromJSON))}static fromTransaction(e,t){let r=kr;for(let i of e.startState.facet(iZ)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new Ln(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,kr)}static selection(e){return new Ln(void 0,kr,void 0,void 0,e)}}function wd(n,e,t,r){let i=e+1>t+20?e-t-1:0,s=n.slice(i,e);return s.push(r),s}function aZ(n,e){let t=[],r=!1;return n.iterChangedRanges((i,s)=>t.push(i,s)),e.iterChangedRanges((i,s,l,o)=>{for(let u=0;u<t.length;){let h=t[u++],f=t[u++];o>=h&&l<=f&&(r=!0)}}),r}function uZ(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function Y$(n,e){return n.length?e.length?n.concat(e):n:e}const kr=[],cZ=200;function U$(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-cZ));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),wd(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Ln.selection([e])]}function hZ(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Vg(n,e){if(!n.length)return n;let t=n.length,r=kr;for(;t;){let i=fZ(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=n.slice(0,t);return s[t-1]=i,s}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Ln.selection(r)]:kr}function fZ(n,e,t){let r=Y$(n.selectionsAfter.length?n.selectionsAfter.map(o=>o.map(e)):kr,t);if(!n.changes)return Ln.selection(r);let i=n.changes.map(e),s=e.mapDesc(n.changes,!0),l=n.mapped?n.mapped.composeDesc(s):s;return new Ln(i,Re.mapEffects(n.effects,e),l,n.startSelection.map(s),r)}const dZ=/^(input\.type|delete)($|\.)/;class ui{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new ui(this.done,this.undone):this}addChanges(e,t,r,i,s){let l=this.done,o=l[l.length-1];return o&&o.changes&&!o.changes.empty&&e.changes&&(!r||dZ.test(r))&&(!o.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,aZ(o.changes,e.changes))||r=="input.type.compose")?l=wd(l,l.length-1,i.minDepth,new Ln(e.changes.compose(o.changes),Y$(Re.mapEffects(e.effects,o.changes),o.effects),o.mapped,o.startSelection,kr)):l=wd(l,l.length,i.minDepth,e),new ui(l,kr,t,r)}addSelection(e,t,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:kr;return s.length>0&&t-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&uZ(s[s.length-1],e)?this:new ui(U$(this.done,e),this.undone,t,r)}addMapping(e){return new ui(Vg(this.done,e),Vg(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],l=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):t.selection);if(r&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Ny.of({side:e,rest:hZ(i),selection:l}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let o=i.length==1?kr:i.slice(0,i.length-1);return s.mapped&&(o=Vg(o,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Ny.of({side:e,rest:o,selection:l}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}ui.empty=new ui(kr,kr);const pZ=[{key:"Mod-z",run:F$,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Ly,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Ly,preventDefault:!0},{key:"Mod-u",run:lZ,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:oZ,preventDefault:!0}];function xa(n,e){return U.create(n.ranges.map(e),n.mainIndex)}function Zr(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Xr({state:n,dispatch:e},t){let r=xa(n.selection,t);return r.eq(n.selection,!0)?!1:(e(Zr(n,r)),!0)}function Jd(n,e){return U.cursor(e?n.to:n.from)}function G$(n,e){return Xr(n,t=>t.empty?n.moveByChar(t,e):Jd(t,e))}function fn(n){return n.textDirectionAt(n.state.selection.main.head)==at.LTR}const H$=n=>G$(n,!fn(n)),K$=n=>G$(n,fn(n));function J$(n,e){return Xr(n,t=>t.empty?n.moveByGroup(t,e):Jd(t,e))}const mZ=n=>J$(n,!fn(n)),gZ=n=>J$(n,fn(n));function OZ(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function ep(n,e,t){let r=ct(n).resolveInner(e.head),i=t?Ne.closedBy:Ne.openedBy;for(let u=e.head;;){let h=t?r.childAfter(u):r.childBefore(u);if(!h)break;OZ(n,h,i)?r=h:u=t?h.to:h.from}let s=r.type.prop(i),l,o;return s&&(l=t?ai(n,r.from,1):ai(n,r.to,-1))&&l.matched?o=t?l.end.to:l.end.from:o=t?r.to:r.from,U.cursor(o,t?-1:1)}const yZ=n=>Xr(n,e=>ep(n.state,e,!fn(n))),xZ=n=>Xr(n,e=>ep(n.state,e,fn(n)));function eT(n,e){return Xr(n,t=>{if(!t.empty)return Jd(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const tT=n=>eT(n,!1),nT=n=>eT(n,!0);function rT(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,r=0,i;if(e){for(let s of n.state.facet(ce.scrollMargins)){let l=s(n);l!=null&&l.top&&(t=Math.max(l==null?void 0:l.top,t)),l!=null&&l.bottom&&(r=Math.max(l==null?void 0:l.bottom,r))}i=n.scrollDOM.clientHeight-t-r}else i=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:r,selfScroll:e,height:Math.max(n.defaultLineHeight,i-5)}}function iT(n,e){let t=rT(n),{state:r}=n,i=xa(r.selection,l=>l.empty?n.moveVertically(l,e,t.height):Jd(l,e));if(i.eq(r.selection))return!1;let s;if(t.selfScroll){let l=n.coordsAtPos(r.selection.main.head),o=n.scrollDOM.getBoundingClientRect(),u=o.top+t.marginTop,h=o.bottom-t.marginBottom;l&&l.top>u&&l.bottom<h&&(s=ce.scrollIntoView(i.main.head,{y:"start",yMargin:l.top-u}))}return n.dispatch(Zr(r,i),{effects:s}),!0}const mS=n=>iT(n,!1),_y=n=>iT(n,!0);function Vs(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let s=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=U.cursor(r.from+s))}return i}const kZ=n=>Xr(n,e=>Vs(n,e,!0)),vZ=n=>Xr(n,e=>Vs(n,e,!1)),bZ=n=>Xr(n,e=>Vs(n,e,!fn(n))),wZ=n=>Xr(n,e=>Vs(n,e,fn(n))),SZ=n=>Xr(n,e=>U.cursor(n.lineBlockAt(e.head).from,1)),PZ=n=>Xr(n,e=>U.cursor(n.lineBlockAt(e.head).to,-1));function CZ(n,e,t){let r=!1,i=xa(n.selection,s=>{let l=ai(n,s.head,-1)||ai(n,s.head,1)||s.head>0&&ai(n,s.head-1,1)||s.head<n.doc.length&&ai(n,s.head+1,-1);if(!l||!l.end)return s;r=!0;let o=l.start.from==s.head?l.end.to:l.end.from;return U.cursor(o)});return r?(e(Zr(n,i)),!0):!1}const QZ=({state:n,dispatch:e})=>CZ(n,e);function wr(n,e){let t=xa(n.state.selection,r=>{let i=e(r);return U.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0,i.assoc)});return t.eq(n.state.selection)?!1:(n.dispatch(Zr(n.state,t)),!0)}function sT(n,e){return wr(n,t=>n.moveByChar(t,e))}const lT=n=>sT(n,!fn(n)),oT=n=>sT(n,fn(n));function aT(n,e){return wr(n,t=>n.moveByGroup(t,e))}const $Z=n=>aT(n,!fn(n)),TZ=n=>aT(n,fn(n)),jZ=n=>wr(n,e=>ep(n.state,e,!fn(n))),EZ=n=>wr(n,e=>ep(n.state,e,fn(n)));function uT(n,e){return wr(n,t=>n.moveVertically(t,e))}const cT=n=>uT(n,!1),hT=n=>uT(n,!0);function fT(n,e){return wr(n,t=>n.moveVertically(t,e,rT(n).height))}const gS=n=>fT(n,!1),OS=n=>fT(n,!0),MZ=n=>wr(n,e=>Vs(n,e,!0)),AZ=n=>wr(n,e=>Vs(n,e,!1)),RZ=n=>wr(n,e=>Vs(n,e,!fn(n))),NZ=n=>wr(n,e=>Vs(n,e,fn(n))),LZ=n=>wr(n,e=>U.cursor(n.lineBlockAt(e.head).from)),_Z=n=>wr(n,e=>U.cursor(n.lineBlockAt(e.head).to)),yS=({state:n,dispatch:e})=>(e(Zr(n,{anchor:0})),!0),xS=({state:n,dispatch:e})=>(e(Zr(n,{anchor:n.doc.length})),!0),kS=({state:n,dispatch:e})=>(e(Zr(n,{anchor:n.selection.main.anchor,head:0})),!0),vS=({state:n,dispatch:e})=>(e(Zr(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),DZ=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),IZ=({state:n,dispatch:e})=>{let t=tp(n).map(({from:r,to:i})=>U.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:U.create(t),userEvent:"select"})),!0},zZ=({state:n,dispatch:e})=>{let t=xa(n.selection,r=>{let i=ct(n),s=i.resolveStack(r.from,1);if(r.empty){let l=i.resolveStack(r.from,-1);l.node.from>=s.node.from&&l.node.to<=s.node.to&&(s=l)}for(let l=s;l;l=l.next){let{node:o}=l;if((o.from<r.from&&o.to>=r.to||o.to>r.to&&o.from<=r.from)&&l.next)return U.range(o.to,o.from)}return r});return t.eq(n.selection)?!1:(e(Zr(n,t)),!0)};function dT(n,e){let{state:t}=n,r=t.selection,i=t.selection.ranges.slice();for(let s of t.selection.ranges){let l=t.doc.lineAt(s.head);if(e?l.to<n.state.doc.length:l.from>0)for(let o=s;;){let u=n.moveVertically(o,e);if(u.head<l.from||u.head>l.to){i.some(h=>h.head==u.head)||i.push(u);break}else{if(u.head==o.head)break;o=u}}}return i.length==r.ranges.length?!1:(n.dispatch(Zr(t,U.create(i,i.length-1))),!0)}const ZZ=n=>dT(n,!1),XZ=n=>dT(n,!0),BZ=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=U.create([t.main]):t.main.empty||(r=U.create([U.cursor(t.main.head)])),r?(e(Zr(n,r)),!0):!1};function Rc(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(s=>{let{from:l,to:o}=s;if(l==o){let u=e(s);u<l?(t="delete.backward",u=kf(n,u,!1)):u>l&&(t="delete.forward",u=kf(n,u,!0)),l=Math.min(l,u),o=Math.max(o,u)}else l=kf(n,l,!1),o=kf(n,o,!0);return l==o?{range:s}:{changes:{from:l,to:o},range:U.cursor(l,l<s.head?-1:1)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?ce.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function kf(n,e,t){if(n instanceof ce)for(let r of n.state.facet(ce.atomicRanges).map(i=>i(n)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}const pT=(n,e,t)=>Rc(n,r=>{let i=r.from,{state:s}=n,l=s.doc.lineAt(i),o,u;if(t&&!e&&i>l.from&&i<l.from+200&&!/[^ \t]/.test(o=l.text.slice(0,i-l.from))){if(o[o.length-1]==" ")return i-1;let h=_r(o,s.tabSize),f=h%cd(s)||cd(s);for(let p=0;p<f&&o[o.length-1-p]==" ";p++)i--;u=i}else u=Wt(l.text,i-l.from,e,e)+l.from,u==i&&l.number!=(e?s.doc.lines:1)?u+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(u-l.from,i-l.from))&&(u=Wt(l.text,u-l.from,!1,!1)+l.from);return u}),Dy=n=>pT(n,!1,!0),mT=n=>pT(n,!0,!1),gT=(n,e)=>Rc(n,t=>{let r=t.head,{state:i}=n,s=i.doc.lineAt(r),l=i.charCategorizer(r);for(let o=null;;){if(r==(e?s.to:s.from)){r==t.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let u=Wt(s.text,r-s.from,e)+s.from,h=s.text.slice(Math.min(r,u)-s.from,Math.max(r,u)-s.from),f=l(h);if(o!=null&&f!=o)break;(h!=" "||r!=t.head)&&(o=f),r=u}return r}),OT=n=>gT(n,!1),WZ=n=>gT(n,!0),VZ=n=>Rc(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),qZ=n=>Rc(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),FZ=n=>Rc(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),YZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ye.of(["",""])},range:U.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},UZ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,s=n.doc.lineAt(i),l=i==s.from?i-1:Wt(s.text,i-s.from,!1)+s.from,o=i==s.to?i+1:Wt(s.text,i-s.from,!0)+s.from;return{changes:{from:l,to:o,insert:n.doc.slice(i,o).append(n.doc.slice(l,i))},range:U.cursor(o)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function tp(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),s=n.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=n.doc.lineAt(r.to-1)),t>=i.number){let l=e[e.length-1];l.to=s.to,l.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});t=s.number+1}return e}function yT(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let s of tp(n)){if(t?s.to==n.doc.length:s.from==0)continue;let l=n.doc.lineAt(t?s.to+1:s.from-1),o=l.length+1;if(t){r.push({from:s.to,to:l.to},{from:s.from,insert:l.text+n.lineBreak});for(let u of s.ranges)i.push(U.range(Math.min(n.doc.length,u.anchor+o),Math.min(n.doc.length,u.head+o)))}else{r.push({from:l.from,to:s.from},{from:s.to,insert:n.lineBreak+l.text});for(let u of s.ranges)i.push(U.range(u.anchor-o,u.head-o))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:U.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const GZ=({state:n,dispatch:e})=>yT(n,e,!1),HZ=({state:n,dispatch:e})=>yT(n,e,!0);function xT(n,e,t){if(n.readOnly)return!1;let r=[];for(let s of tp(n))t?r.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):r.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let i=n.changes(r);return e(n.update({changes:i,selection:n.selection.map(i,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const KZ=({state:n,dispatch:e})=>xT(n,e,!1),JZ=({state:n,dispatch:e})=>xT(n,e,!0),eX=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(tp(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=xa(e.selection,i=>{let s;if(n.lineWrapping){let l=n.lineBlockAt(i.head),o=n.coordsAtPos(i.head,i.assoc||1);o&&(s=l.bottom+n.documentTop-o.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,s)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function tX(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ct(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(Ne.closedBy))&&s.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const bS=kT(!1),nX=kT(!0);function kT(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:l}=i,o=e.doc.lineAt(s),u=!n&&s==l&&tX(e,s);n&&(s=l=(l<=o.to?o:e.doc.lineAt(l)).to);let h=new Yd(e,{simulateBreak:s,simulateDoubleBreak:!!u}),f=z0(h,s);for(f==null&&(f=_r(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));l<o.to&&/\s/.test(o.text[l-o.from]);)l++;u?{from:s,to:l}=u:s>o.from&&s<o.from+100&&!/\S/.test(o.text.slice(0,s))&&(s=o.from);let p=["",ic(e,f)];return u&&p.push(ic(e,h.lineIndent(o.from,-1))),{changes:{from:s,to:l,insert:Ye.of(p)},range:U.cursor(s+1+p[1].length)}});return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function cx(n,e){let t=-1;return n.changeByRange(r=>{let i=[];for(let l=r.from;l<=r.to;){let o=n.doc.lineAt(l);o.number>t&&(r.empty||r.to>o.from)&&(e(o,i,r),t=o.number),l=o.to+1}let s=n.changes(i);return{changes:i,range:U.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const rX=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new Yd(n,{overrideIndentation:s=>{let l=t[s];return l??-1}}),i=cx(n,(s,l,o)=>{let u=z0(r,s.from);if(u==null)return;/\S/.test(s.text)||(u=0);let h=/^\s*/.exec(s.text)[0],f=ic(n,u);(h!=f||o.from<s.from+h.length)&&(t[s.from]=u,l.push({from:s.from,to:s.from+h.length,insert:f}))});return i.changes.empty||e(n.update(i,{userEvent:"indent"})),!0},vT=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(cx(n,(t,r)=>{r.push({from:t.from,insert:n.facet(ga)})}),{userEvent:"input.indent"})),!0),bT=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(cx(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let s=_r(i,n.tabSize),l=0,o=ic(n,Math.max(0,s-cd(n)));for(;l<i.length&&l<o.length&&i.charCodeAt(l)==o.charCodeAt(l);)l++;r.push({from:t.from+l,to:t.from+i.length,insert:o.slice(l)})}),{userEvent:"delete.dedent"})),!0),iX=n=>(n.setTabFocusMode(),!0),sX=[{key:"Ctrl-b",run:H$,shift:lT,preventDefault:!0},{key:"Ctrl-f",run:K$,shift:oT},{key:"Ctrl-p",run:tT,shift:cT},{key:"Ctrl-n",run:nT,shift:hT},{key:"Ctrl-a",run:SZ,shift:LZ},{key:"Ctrl-e",run:PZ,shift:_Z},{key:"Ctrl-d",run:mT},{key:"Ctrl-h",run:Dy},{key:"Ctrl-k",run:VZ},{key:"Ctrl-Alt-h",run:OT},{key:"Ctrl-o",run:YZ},{key:"Ctrl-t",run:UZ},{key:"Ctrl-v",run:_y}],lX=[{key:"ArrowLeft",run:H$,shift:lT,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:mZ,shift:$Z,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:bZ,shift:RZ,preventDefault:!0},{key:"ArrowRight",run:K$,shift:oT,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:gZ,shift:TZ,preventDefault:!0},{mac:"Cmd-ArrowRight",run:wZ,shift:NZ,preventDefault:!0},{key:"ArrowUp",run:tT,shift:cT,preventDefault:!0},{mac:"Cmd-ArrowUp",run:yS,shift:kS},{mac:"Ctrl-ArrowUp",run:mS,shift:gS},{key:"ArrowDown",run:nT,shift:hT,preventDefault:!0},{mac:"Cmd-ArrowDown",run:xS,shift:vS},{mac:"Ctrl-ArrowDown",run:_y,shift:OS},{key:"PageUp",run:mS,shift:gS},{key:"PageDown",run:_y,shift:OS},{key:"Home",run:vZ,shift:AZ,preventDefault:!0},{key:"Mod-Home",run:yS,shift:kS},{key:"End",run:kZ,shift:MZ,preventDefault:!0},{key:"Mod-End",run:xS,shift:vS},{key:"Enter",run:bS,shift:bS},{key:"Mod-a",run:DZ},{key:"Backspace",run:Dy,shift:Dy,preventDefault:!0},{key:"Delete",run:mT,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:OT,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:WZ,preventDefault:!0},{mac:"Mod-Backspace",run:qZ,preventDefault:!0},{mac:"Mod-Delete",run:FZ,preventDefault:!0}].concat(sX.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),oX=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:yZ,shift:jZ},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:xZ,shift:EZ},{key:"Alt-ArrowUp",run:GZ},{key:"Shift-Alt-ArrowUp",run:KZ},{key:"Alt-ArrowDown",run:HZ},{key:"Shift-Alt-ArrowDown",run:JZ},{key:"Mod-Alt-ArrowUp",run:ZZ},{key:"Mod-Alt-ArrowDown",run:XZ},{key:"Escape",run:BZ},{key:"Mod-Enter",run:nX},{key:"Alt-l",mac:"Ctrl-l",run:IZ},{key:"Mod-i",run:zZ,preventDefault:!0},{key:"Mod-[",run:bT},{key:"Mod-]",run:vT},{key:"Mod-Alt-\\",run:rX},{key:"Shift-Mod-k",run:eX},{key:"Shift-Mod-\\",run:QZ},{key:"Mod-/",run:Gz},{key:"Alt-A",run:Kz},{key:"Ctrl-m",mac:"Shift-Alt-m",run:iX}].concat(lX),aX={key:"Tab",run:vT,shift:bT},wS=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class oa{constructor(e,t,r=0,i=e.length,s,l){this.test=l,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?o=>s(wS(o)):wS,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Mn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=m0(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=ii(e);let i=this.normalize(t);if(i.length)for(let s=0,l=r,o=!0;;s++){let u=i.charCodeAt(s),h=this.match(u,l,o,this.bufferPos+this.bufferStart,s==i.length-1);if(h)return this.value=h,this;if(s==i.length-1)break;o&&s<t.length&&t.charCodeAt(s)==u?l++:o=!1}}}match(e,t,r,i,s){let l=null;for(let o=0;o<this.matches.length;){let u=this.matches[o],h=!1;this.query.charCodeAt(u.index)==e&&(u.index==this.query.length-1?l={from:u.from,to:i,precise:s&&u.precise}:(u.index++,h=!0)),h?o++:this.matches.splice(o,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?l={from:t,to:i,precise:r&&s}:this.matches.push({from:t,index:1,precise:r})),l&&this.test&&!this.test(l.from,l.to,this.buffer,this.bufferStart)&&(l=null),l}}typeof Symbol<"u"&&(oa.prototype[Symbol.iterator]=function(){return this});const wT={from:-1,to:-1,match:/.*/.exec(""),precise:!0},hx="gm"+(/x/.unicode==null?"":"u");class ST{constructor(e,t,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=wT,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new PT(e,t,r,i,s);this.re=new RegExp(t,hx+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let l=e.lineAt(i);this.curLineStart=l.from,this.matchPos=Sd(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=Sd(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const qg=new WeakMap;class No{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let i=qg.get(e);if(!i||i.from>=r||i.to<=t){let o=new No(t,e.sliceString(t,r));return qg.set(e,o),o}if(i.from==t&&i.to==r)return i;let{text:s,from:l}=i;return l>t&&(s=e.sliceString(t,l)+s,l=t),i.to<r&&(s+=e.sliceString(i.to,r)),qg.set(e,new No(l,s)),new No(t,s.slice(t-l,r-l))}}class PT{constructor(e,t,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=wT,this.matchPos=Sd(e,i),this.re=new RegExp(t,hx+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=No.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,precise:!0,match:t},this.matchPos=Sd(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=No.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(ST.prototype[Symbol.iterator]=PT.prototype[Symbol.iterator]=function(){return this});function uX(n){try{return new RegExp(n,hx),!0}catch{return!1}}function Sd(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e<t.to&&(r=t.text.charCodeAt(e-t.from))>=56320&&r<57344;)e++;return e}const cX=n=>{let{state:e}=n,t=String(e.doc.lineAt(n.state.selection.main.head).number),{close:r,result:i}=x_(n,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:t},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let l=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!l){n.dispatch({effects:r});return}let o=e.doc.lineAt(e.selection.main.head),[,u,h,f,p]=l,m=f?+f.slice(1):0,O=h?+h:o.number;if(h&&p){let w=O/100;u&&(w=w*(u=="-"?-1:1)+o.number/e.doc.lines),O=Math.round(e.doc.lines*w)}else h&&u&&(O=O*(u=="-"?-1:1)+o.number);let k=e.doc.line(Math.max(1,Math.min(e.doc.lines,O))),b=U.cursor(k.from+Math.max(0,Math.min(m,k.length)));n.dispatch({effects:[r,ce.scrollIntoView(b.from,{y:"center"})],selection:b})}),!0},hX={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},fX=pe.define({combine(n){return gi(n,hX,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function dX(n){return[yX,OX]}const pX=Qe.mark({class:"cm-selectionMatch"}),mX=Qe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function SS(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Ot.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Ot.Word)}function gX(n,e,t,r){return n(e.sliceDoc(t,t+1))==Ot.Word&&n(e.sliceDoc(r-1,r))==Ot.Word}const OX=Pt.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(fX),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Qe.none;let i=r.main,s,l=null;if(i.empty){if(!e.highlightWordAroundCursor)return Qe.none;let u=t.wordAt(i.head);if(!u)return Qe.none;l=t.charCategorizer(i.head),s=t.sliceDoc(u.from,u.to)}else{let u=i.to-i.from;if(u<e.minSelectionLength||u>200)return Qe.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),l=t.charCategorizer(i.head),!(SS(l,t,i.from,i.to)&&gX(l,t,i.from,i.to)))return Qe.none}else if(s=t.sliceDoc(i.from,i.to),!s)return Qe.none}let o=[];for(let u of n.visibleRanges){let h=new oa(t.doc,s,u.from,u.to);for(;!h.next().done;){let{from:f,to:p}=h.value;if((!l||SS(l,t,f,p))&&(i.empty&&f<=i.from&&p>=i.to?o.push(mX.range(f,p)):(f>=i.to||p<=i.from)&&o.push(pX.range(f,p)),o.length>e.maxMatches))return Qe.none}}return Qe.set(o)}},{decorations:n=>n.decorations}),yX=ce.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),xX=({state:n,dispatch:e})=>{let{selection:t}=n,r=U.create(t.ranges.map(i=>n.wordAt(i.head)||U.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function kX(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let l=!1,o=new oa(n.doc,e,r[r.length-1].to);;)if(o.next(),o.done){if(l)return null;o=new oa(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),l=!0}else{if(l&&r.some(u=>u.from==o.value.from))continue;if(s){let u=n.wordAt(o.value.from);if(!u||u.from!=o.value.from||u.to!=o.value.to)continue}return o.value}}const vX=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return xX({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=r))return!1;let i=kX(n,r);return i?(e(n.update({selection:n.selection.addRange(U.range(i.from,i.to),!1),effects:ce.scrollIntoView(i.to)})),!0):!1},ka=pe.define({combine(n){return gi(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new NX(e),scrollToMatch:e=>ce.scrollIntoView(e)})}});class CT{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||uX(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?`
95
+ `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new QX(this):new SX(this)}getCursor(e,t=0,r){let i=e.doc?e:Ve.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?wo(this,i,t,r):bo(this,i,t,r)}}class QT{constructor(e){this.spec=e}}function bX(n,e,t){return(r,i,s,l)=>{if(t&&!t(r,i,s,l))return!1;let o=r>=l&&i<=l+s.length?s.slice(r-l,i-l):e.doc.sliceString(r,i);return n(o,e,r,i)}}function bo(n,e,t,r){let i;return n.wholeWord&&(i=wX(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(i=bX(n.test,e,i)),new oa(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:s=>s.toLowerCase(),i)}function wX(n,e){return(t,r,i,s)=>((s>t||s+i.length<r)&&(s=Math.max(0,t-2),i=n.sliceString(s,Math.min(n.length,r+2))),(e(Pd(i,t-s))!=Ot.Word||e(Cd(i,t-s))!=Ot.Word)&&(e(Cd(i,r-s))!=Ot.Word||e(Pd(i,r-s))!=Ot.Word))}class SX extends QT{constructor(e){super(e)}nextMatch(e,t,r){let i=bo(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,t+this.spec.unquoted.length);i=bo(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==r?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let s=Math.max(t,i-1e4-this.spec.unquoted.length),l=bo(this.spec,e,s,i),o=null;for(;!l.nextOverlapping().done;)o=l.value;if(o)return o;if(s==t)return null;i-=1e4}}prevMatch(e,t,r){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=bo(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=bo(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function PX(n,e,t){return(r,i,s)=>(!t||t(r,i,s))&&n(s[0],e,r,i)}function wo(n,e,t,r){let i;return n.wholeWord&&(i=CX(e.charCategorizer(e.selection.main.head))),n.test&&(i=PX(n.test,e,i)),new ST(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:i},t,r)}function Pd(n,e){return n.slice(Wt(n,e,!1),e)}function Cd(n,e){return n.slice(e,Wt(n,e))}function CX(n){return(e,t,r)=>!r[0].length||(n(Pd(r.input,r.index))!=Ot.Word||n(Cd(r.input,r.index))!=Ot.Word)&&(n(Cd(r.input,r.index+r[0].length))!=Ot.Word||n(Pd(r.input,r.index+r[0].length))!=Ot.Word)}class QX extends QT{nextMatch(e,t,r){let i=wo(this.spec,e,r,e.doc.length).next();return i.done&&(i=wo(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let s=Math.max(t,r-i*1e4),l=wo(this.spec,e,s,r),o=null;for(;!l.next().done;)o=l.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return t})}matchAll(e,t){let r=wo(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=wo(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const fc=Re.define(),fx=Re.define(),Ls=Jt.define({create(n){return new Fg(Iy(n).create(),null)},update(n,e){for(let t of e.effects)t.is(fc)?n=new Fg(t.value.create(),n.panel):t.is(fx)&&(n=new Fg(n.query,t.value?dx:null));return n},provide:n=>Ju.from(n,e=>e.panel)});class Fg{constructor(e,t){this.query=e,this.panel=t}}const $X=Qe.mark({class:"cm-searchMatch"}),TX=Qe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),jX=Pt.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Ls))}update(n){let e=n.state.field(Ls);(e!=n.startState.field(Ls)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Qe.none;let{view:t}=this,r=new Di;for(let i=0,s=t.visibleRanges,l=s.length;i<l;i++){let{from:o,to:u}=s[i];for(;i<l-1&&u>s[i+1].from-500;)u=s[++i].to;n.highlight(t.state,o,u,(h,f)=>{let p=t.state.selection.ranges.some(m=>m.from==h&&m.to==f);r.add(h,f,p?TX:$X)})}return r.finish()}},{decorations:n=>n.decorations});function Nc(n){return e=>{let t=e.state.field(Ls,!1);return t&&t.query.spec.valid?n(e,t):jT(e)}}const Qd=Nc((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=U.single(r.from,r.to),s=n.state.facet(ka);return n.dispatch({selection:i,effects:[px(n,r),s.scrollToMatch(i.main,n)],userEvent:"select.search"}),TT(n),!0}),$d=Nc((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let s=U.single(i.from,i.to),l=n.state.facet(ka);return n.dispatch({selection:s,effects:[px(n,i),l.scrollToMatch(s.main,n)],userEvent:"select.search"}),TT(n),!0}),EX=Nc((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:U.create(t.map(r=>U.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),MX=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,s=[],l=0;for(let o=new oa(n.doc,n.sliceDoc(r,i));!o.next().done;){if(s.length>1e3)return!1;o.value.from==r&&(l=s.length),s.push(U.range(o.value.from,o.value.to))}return e(n.update({selection:U.create(s,l),userEvent:"select.search.matches"})),!0},PS=Nc((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,r,r);if(!s)return!1;let l=s,o=[],u,h,f=[];l.precise?l.from==r&&l.to==i&&(h=t.toText(e.getReplacement(l)),o.push({from:l.from,to:l.to,insert:h}),f.push(ce.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+"."))):l=e.nextMatch(t,l.from,l.to);let p=n.state.changes(o);return l&&(u=U.single(l.from,l.to).map(p),f.push(px(n,l)),f.push(t.facet(ka).scrollToMatch(u.main,n))),n.dispatch({changes:p,selection:u,effects:f,userEvent:"input.replace"}),!0}),AX=Nc((n,{query:e})=>{if(n.state.readOnly)return!1;let t=[];for(let i of e.matchAll(n.state,1e9)){let{from:s,to:l,precise:o}=i;o&&t.push({from:s,to:l,insert:e.getReplacement(i)})}if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:ce.announce.of(r),userEvent:"input.replace.all"}),!0});function dx(n){return n.state.facet(ka).createPanel(n)}function Iy(n,e){var t,r,i,s,l;let o=n.selection.main,u=o.empty||o.to>o.from+100?"":n.sliceDoc(o.from,o.to);if(e&&!u)return e;let h=n.facet(ka);return new CT({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?u:u.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:h.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:h.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:h.regexp,wholeWord:(l=e==null?void 0:e.wholeWord)!==null&&l!==void 0?l:h.wholeWord})}function $T(n){let e=A0(n,dx);return e&&e.dom.querySelector("[main-field]")}function TT(n){let e=$T(n);e&&e==n.root.activeElement&&e.select()}const jT=n=>{let e=n.state.field(Ls,!1);if(e&&e.panel){let t=$T(n);if(t&&t!=n.root.activeElement){let r=Iy(n.state,e.query.spec);r.valid&&n.dispatch({effects:fc.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[fx.of(!0),e?fc.of(Iy(n.state,e.query.spec)):Re.appendConfig.of(_X)]});return!0},ET=n=>{let e=n.state.field(Ls,!1);if(!e||!e.panel)return!1;let t=A0(n,dx);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:fx.of(!1)}),!0},RX=[{key:"Mod-f",run:jT,scope:"editor search-panel"},{key:"F3",run:Qd,shift:$d,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Qd,shift:$d,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:ET,scope:"editor search-panel"},{key:"Mod-Shift-l",run:MX},{key:"Mod-Alt-g",run:cX},{key:"Mod-d",run:vX,preventDefault:!0}];class NX{constructor(e){this.view=e;let t=this.query=e.state.field(Ls).query.spec;this.commit=this.commit.bind(this),this.searchField=st("input",{value:t.search,placeholder:Yn(e,"Find"),"aria-label":Yn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=st("input",{value:t.replace,placeholder:Yn(e,"Replace"),"aria-label":Yn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=st("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=st("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=st("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,s,l){return st("button",{class:"cm-button",name:i,onclick:s,type:"button"},l)}this.dom=st("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Qd(e),[Yn(e,"next")]),r("prev",()=>$d(e),[Yn(e,"previous")]),r("select",()=>EX(e),[Yn(e,"all")]),st("label",null,[this.caseField,Yn(e,"match case")]),st("label",null,[this.reField,Yn(e,"regexp")]),st("label",null,[this.wordField,Yn(e,"by word")]),...e.state.readOnly?[]:[st("br"),this.replaceField,r("replace",()=>PS(e),[Yn(e,"replace")]),r("replaceAll",()=>AX(e),[Yn(e,"replace all")])],st("button",{name:"close",onclick:()=>ET(e),"aria-label":Yn(e,"close"),type:"button"},["×"])])}commit(){let e=new CT({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:fc.of(e)}))}keydown(e){$L(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?$d:Qd)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),PS(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(fc)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ka).top}}function Yn(n,e){return n.state.phrase(e)}const vf=30,bf=/[\s\.,:;?!]/;function px(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,s=Math.max(r.from,e-vf),l=Math.min(i,t+vf),o=n.state.sliceDoc(s,l);if(s!=r.from){for(let u=0;u<vf;u++)if(!bf.test(o[u+1])&&bf.test(o[u])){o=o.slice(u);break}}if(l!=i){for(let u=o.length-1;u>o.length-vf;u--)if(!bf.test(o[u-1])&&bf.test(o[u])){o=o.slice(0,u);break}}return ce.announce.of(`${n.state.phrase("current match")}. ${o} ${n.state.phrase("on line")} ${r.number}.`)}const LX=ce.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),_X=[Ls,Bi.low(jX),LX];class CS{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class pl{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=r.facet(dc).markerFilter;i&&(e=i(e,r));let s=e.slice().sort((O,k)=>O.from-k.from||O.to-k.to),l=new Di,o=[],u=0,h=r.doc.iter(),f=0,p=r.doc.length;for(let O=0;;){let k=O==s.length?null:s[O];if(!k&&!o.length)break;let b,w;if(o.length)b=u,w=o.reduce((Q,R)=>Math.min(Q,R.to),k&&k.from>b?k.from:1e8);else{if(b=k.from,b>p)break;w=k.to,o.push(k),O++}for(;O<s.length;){let Q=s[O];if(Q.from==b&&(Q.to>Q.from||Q.to==b))o.push(Q),O++,w=Math.min(Q.to,w);else{w=Math.min(Q.from,w);break}}w=Math.min(w,p);let S=!1;if(o.some(Q=>Q.from==b&&(Q.to==w||w==p))&&(S=b==w,!S&&w-b<10)){let Q=b-(f+h.value.length);Q>0&&(h.next(Q),f=b);for(let R=b;;){if(R>=w){S=!0;break}if(!h.lineBreak&&f+h.value.length>R)break;R=f+h.value.length,f+=h.value.length,h.next()}}let C=GX(o);if(S)l.add(b,b,Qe.widget({widget:new qX(C),diagnostics:o.slice()}));else{let Q=o.reduce((R,I)=>I.markClass?R+" "+I.markClass:R,"");l.add(b,w,Qe.mark({class:"cm-lintRange cm-lintRange-"+C+Q,diagnostics:o.slice(),inclusiveEnd:o.some(R=>R.to>w)}))}if(u=w,u==p)break;for(let Q=0;Q<o.length;Q++)o[Q].to<=u&&o.splice(Q--,1)}let m=l.finish();return new pl(m,t,Bs(m))}}function Bs(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,s,{spec:l})=>{if(!(e&&l.diagnostics.indexOf(e)<0))if(!r)r=new CS(i,s,e||l.diagnostics[0]);else{if(l.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new CS(r.from,s,r.diagnostic)}}),r}function DX(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(dc).hideOn(n,t,r);if(i!=null)return i;let s=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(l=>l.is(MT))||n.changes.touchesRange(s.from,Math.max(s.to,r)))}function IX(n,e){return n.field(tr,!1)?e:e.concat(Re.appendConfig.of(HX))}const MT=Re.define(),mx=Re.define(),AT=Re.define(),tr=Jt.define({create(){return new pl(Qe.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let s=e.changes.mapPos(n.selected.from,1);r=Bs(t,n.selected.diagnostic,s)||Bs(t,null,s)}!t.size&&i&&e.state.facet(dc).autoPanel&&(i=null),n=new pl(t,i,r)}for(let t of e.effects)if(t.is(MT)){let r=e.state.facet(dc).autoPanel?t.value.length?pc.open:null:n.panel;n=pl.init(t.value,r,e.state)}else t.is(mx)?n=new pl(n.diagnostics,t.value?pc.open:null,n.selected):t.is(AT)&&(n=new pl(n.diagnostics,n.panel,t.value));return n},provide:n=>[Ju.from(n,e=>e.panel),ce.decorations.from(n,e=>e.diagnostics)]}),zX=Qe.mark({class:"cm-lintRange cm-lintRange-active"});function ZX(n,e,t){let{diagnostics:r}=n.state.field(tr),i,s=-1,l=-1;r.between(e-(t<0?1:0),e+(t>0?1:0),(u,h,{spec:f})=>{if(e>=u&&e<=h&&(u==h||(e>u||t>0)&&(e<h||t<0)))return i=f.diagnostics,s=u,l=h,!1});let o=n.state.facet(dc).tooltipFilter;return i&&o&&(i=o(i,n.state)),i?{pos:s,end:l,above:n.state.doc.lineAt(s).to<l,create(){return{dom:XX(n,i)}}}:null}function XX(n,e){return st("ul",{class:"cm-tooltip-lint"},e.map(t=>NT(n,t,!1)))}const BX=n=>{let e=n.state.field(tr,!1);(!e||!e.panel)&&n.dispatch({effects:IX(n.state,[mx.of(!0)])});let t=A0(n,pc.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},QS=n=>{let e=n.state.field(tr,!1);return!e||!e.panel?!1:(n.dispatch({effects:mx.of(!1)}),!0)},WX=n=>{let e=n.state.field(tr,!1);if(!e)return!1;let t=n.state.selection.main,r=Bs(e.diagnostics,null,t.to+1);return!r&&(r=Bs(e.diagnostics,null,0),!r||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),O_(n,r.from,1,{tooltip:LT,until:i=>i.docChanged||i.newSelection.main.head<r.from||i.newSelection.main.head>r.to}),!0)},VX=[{key:"Mod-Shift-m",run:BX,preventDefault:!0},{key:"F8",run:WX}],dc=pe.define({combine(n){return{sources:n.map(e=>e.source).filter(e=>e!=null),...gi(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:$S,tooltipFilter:$S,needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t,hideOn:(e,t)=>e?t?(r,i,s)=>e(r,i,s)||t(r,i,s):e:t,autoPanel:(e,t)=>e||t})}}});function $S(n,e){return n?e?(t,r)=>e(n(t,r),r):n:e}function RT(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;r<t.length;r++){let i=t[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function NT(n,e,t){var r;let i=t?RT(e.actions):[];return st("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},st("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,l)=>{let o=!1,u=O=>{if(O.preventDefault(),o)return;o=!0;let k=Bs(n.state.field(tr).diagnostics,e);k&&s.apply(n,k.from,k.to)},{name:h}=s,f=i[l]?h.indexOf(i[l]):-1,p=f<0?h:[h.slice(0,f),st("u",h.slice(f,f+1)),h.slice(f+1)],m=s.markClass?" "+s.markClass:"";return st("button",{type:"button",class:"cm-diagnosticAction"+m,onclick:u,onmousedown:u,"aria-label":` Action: ${h}${f<0?"":` (access key "${i[l]})"`}.`},p)}),e.source&&st("div",{class:"cm-diagnosticSource"},e.source))}class qX extends zr{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return st("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class TS{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=NT(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class pc{constructor(e){this.view=e,this.items=[];let t=i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)QS(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],l=RT(s.actions);for(let o=0;o<l.length;o++)if(l[o].toUpperCase().charCodeAt(0)==i.keyCode){let u=Bs(this.view.state.field(tr).diagnostics,s);u&&s.actions[o].apply(e,u.from,u.to)}}else return;i.preventDefault()}},r=i=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(i.target)&&this.moveSelection(s)};this.list=st("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:r}),this.dom=st("div",{class:"cm-panel-lint"},this.list,st("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>QS(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(tr).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(tr),r=0,i=!1,s=null,l=new Set;for(e.between(0,this.view.state.doc.length,(o,u,{spec:h})=>{for(let f of h.diagnostics){if(l.has(f))continue;l.add(f);let p=-1,m;for(let O=r;O<this.items.length;O++)if(this.items[O].diagnostic==f){p=O;break}p<0?(m=new TS(this.view,f),this.items.splice(r,0,m),i=!0):(m=this.items[p],p>r&&(this.items.splice(r,p-r),i=!0)),t&&m.diagnostic==t.diagnostic?m.dom.hasAttribute("aria-selected")||(m.dom.setAttribute("aria-selected","true"),s=m):m.dom.hasAttribute("aria-selected")&&m.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new TS(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:u})=>{let h=u.height/this.list.offsetHeight;o.top<u.top?this.list.scrollTop-=(u.top-o.top)/h:o.bottom>u.bottom&&(this.list.scrollTop+=(o.bottom-u.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(tr),r=Bs(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:AT.of(r)})}static open(e){return new pc(e)}}function FX(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(n)}</svg>')`}function wf(n){return FX(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${n}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const YX=ce.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:wf("#f11")},".cm-lintRange-warning":{backgroundImage:wf("orange")},".cm-lintRange-info":{backgroundImage:wf("#999")},".cm-lintRange-hint":{backgroundImage:wf("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function UX(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}function GX(n){let e="hint",t=1;for(let r of n){let i=UX(r.severity);i>t&&(t=i,e=r.severity)}return e}const LT=g_(ZX,{hideOn:DX}),HX=[tr,ce.decorations.compute([tr],n=>{let{selected:e,panel:t}=n.field(tr);return!e||!t||e.from==e.to?Qe.none:Qe.set([zX.range(e.from,e.to)])}),LT,YX];var jS=function(e){e===void 0&&(e={});var t=e,r=t.crosshairCursor,i=r===void 0?!1:r,s=[];e.closeBracketsKeymap!==!1&&(s=s.concat(T3)),e.defaultKeymap!==!1&&(s=s.concat(oX)),e.searchKeymap!==!1&&(s=s.concat(RX)),e.historyKeymap!==!1&&(s=s.concat(pZ)),e.foldKeymap!==!1&&(s=s.concat(v4)),e.completionKeymap!==!1&&(s=s.concat(MQ)),e.lintKeymap!==!1&&(s=s.concat(VX));var l=[];return e.lineNumbers!==!1&&l.push(j_()),e.highlightActiveLineGutter!==!1&&l.push(A_()),e.highlightSpecialChars!==!1&&l.push(VL()),e.history!==!1&&l.push(sZ()),e.foldGutter!==!1&&l.push(P4()),e.drawSelection!==!1&&l.push(RL()),e.dropCursor!==!1&&l.push(IL()),e.allowMultipleSelections!==!1&&l.push(Ve.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&l.push(d4()),e.syntaxHighlighting!==!1&&l.push(yQ(T4,{fallback:!0})),e.bracketMatching!==!1&&l.push(L4()),e.closeBrackets!==!1&&l.push(P3()),e.autocompletion!==!1&&l.push(L3()),e.rectangularSelection!==!1&&l.push(s_()),i!==!1&&l.push(a_()),e.highlightActiveLine!==!1&&l.push(HL()),e.highlightSelectionMatches!==!1&&l.push(dX()),e.tabSize&&typeof e.tabSize=="number"&&l.push(ga.of(" ".repeat(e.tabSize))),l.concat([pa.of(s.flat())]).filter(Boolean)};const KX="#e5c07b",ES="#e06c75",JX="#56b6c2",eB="#ffffff",Xf="#abb2bf",zy="#7d8799",tB="#61afef",nB="#98c379",MS="#d19a66",rB="#c678dd",iB="#21252b",AS="#2c313a",RS="#282c34",Yg="#353a42",sB="#3E4451",NS="#528bff",lB=ce.theme({"&":{color:Xf,backgroundColor:RS},".cm-content":{caretColor:NS},".cm-cursor, .cm-dropCursor":{borderLeftColor:NS},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:sB},".cm-panels":{backgroundColor:iB,color:Xf},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:RS,color:zy,border:"none"},".cm-activeLineGutter":{backgroundColor:AS},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Yg},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Yg,borderBottomColor:Yg},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:AS,color:Xf}}},{dark:!0}),oB=Mc.define([{tag:T.keyword,color:rB},{tag:[T.name,T.deleted,T.character,T.propertyName,T.macroName],color:ES},{tag:[T.function(T.variableName),T.labelName],color:tB},{tag:[T.color,T.constant(T.name),T.standard(T.name)],color:MS},{tag:[T.definition(T.name),T.separator],color:Xf},{tag:[T.typeName,T.className,T.number,T.changed,T.annotation,T.modifier,T.self,T.namespace],color:KX},{tag:[T.operator,T.operatorKeyword,T.url,T.escape,T.regexp,T.link,T.special(T.string)],color:JX},{tag:[T.meta,T.comment],color:zy},{tag:T.strong,fontWeight:"bold"},{tag:T.emphasis,fontStyle:"italic"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.link,color:zy,textDecoration:"underline"},{tag:T.heading,fontWeight:"bold",color:ES},{tag:[T.atom,T.bool,T.special(T.variableName)],color:MS},{tag:[T.processingInstruction,T.string,T.inserted],color:nB},{tag:T.invalid,color:eB}]),aB=[lB,yQ(oB)];var uB=ce.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),cB=function(e){e===void 0&&(e={});var t=e,r=t.indentWithTab,i=r===void 0?!0:r,s=t.editable,l=s===void 0?!0:s,o=t.readOnly,u=o===void 0?!1:o,h=t.theme,f=h===void 0?"light":h,p=t.placeholder,m=p===void 0?"":p,O=t.basicSetup,k=O===void 0?!0:O,b=[];switch(i&&b.unshift(pa.of([aX])),k&&(typeof k=="boolean"?b.unshift(jS()):b.unshift(jS(k))),m&&b.unshift(t_(m)),f){case"light":b.push(uB);break;case"dark":b.push(aB);break;case"none":break;default:b.push(f);break}return l===!1&&b.push(ce.editable.of(!1)),u&&b.push(Ve.readOnly.of(!0)),[...b]},hB=n=>({line:n.state.doc.lineAt(n.state.selection.main.from),lineCount:n.state.doc.lines,lineBreak:n.state.lineBreak,length:n.state.doc.length,readOnly:n.state.readOnly,tabSize:n.state.tabSize,selection:n.state.selection,selectionAsSingle:n.state.selection.asSingle().main,ranges:n.state.selection.ranges,selectionCode:n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to),selections:n.state.selection.ranges.map(e=>n.state.sliceDoc(e.from,e.to)),selectedText:n.state.selection.ranges.some(e=>!e.empty)});class fB{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(t=>{try{t()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class LS{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Ug=null,dB=()=>typeof window>"u"?new LS:(Ug||(Ug=new LS),Ug),_S=mi.define(),pB=200,mB=[];function gB(n){var e=n.value,t=n.selection,r=n.onChange,i=n.onStatistics,s=n.onCreateEditor,l=n.onUpdate,o=n.extensions,u=o===void 0?mB:o,h=n.autoFocus,f=n.theme,p=f===void 0?"light":f,m=n.height,O=m===void 0?null:m,k=n.minHeight,b=k===void 0?null:k,w=n.maxHeight,S=w===void 0?null:w,C=n.width,Q=C===void 0?null:C,R=n.minWidth,I=R===void 0?null:R,j=n.maxWidth,Z=j===void 0?null:j,q=n.placeholder,J=q===void 0?"":q,_=n.editable,V=_===void 0?!0:_,F=n.readOnly,H=F===void 0?!1:F,ee=n.indentWithTab,Y=ee===void 0?!0:ee,me=n.basicSetup,ye=me===void 0?!0:me,te=n.root,ae=n.initialState,$=L.useState(),D=$[0],G=$[1],E=L.useState(),fe=E[0],$e=E[1],Pe=L.useState(),ze=Pe[0],_e=Pe[1],De=L.useState(()=>({current:null}))[0],dt=L.useState(()=>({current:null}))[0],Sr=ce.theme({"&":{height:O,minHeight:b,maxHeight:S,width:Q,minWidth:I,maxWidth:Z},"& .cm-scroller":{height:"100% !important"}}),Wl=ce.updateListener.of(en=>{if(en.docChanged&&typeof r=="function"&&!en.transactions.some(Fi=>Fi.annotation(_S))){De.current?De.current.reset():(De.current=new fB(()=>{if(dt.current){var Fi=dt.current;dt.current=null,Fi()}De.current=null},pB),dB().add(De.current));var zn=en.state.doc,vn=zn.toString();r(vn,en)}i&&i(hB(en))}),qi=cB({theme:p,editable:V,readOnly:H,placeholder:J,indentWithTab:Y,basicSetup:ye}),Pr=[Wl,Sr,...qi];return l&&typeof l=="function"&&Pr.push(ce.updateListener.of(l)),Pr=Pr.concat(u),L.useLayoutEffect(()=>{if(D&&!ze){var en={doc:e,selection:t,extensions:Pr},zn=ae?Ve.fromJSON(ae.json,en,ae.fields):Ve.create(en);if(_e(zn),!fe){var vn=new ce({state:zn,parent:D,root:te});$e(vn),s&&s(vn,zn)}}return()=>{fe&&(_e(void 0),$e(void 0))}},[D,ze]),L.useEffect(()=>{n.container&&G(n.container)},[n.container]),L.useEffect(()=>()=>{fe&&(fe.destroy(),$e(void 0)),De.current&&(De.current.cancel(),De.current=null)},[fe]),L.useEffect(()=>{h&&fe&&fe.focus()},[h,fe]),L.useEffect(()=>{fe&&fe.dispatch({effects:Re.reconfigure.of(Pr)})},[p,u,O,b,S,Q,I,Z,J,V,H,Y,ye,r,l]),L.useEffect(()=>{if(e!==void 0){var en=fe?fe.state.doc.toString():"";if(fe&&e!==en){var zn=De.current&&!De.current.isDone,vn=()=>{fe&&e!==fe.state.doc.toString()&&fe.dispatch({changes:{from:0,to:fe.state.doc.toString().length,insert:e||""},annotations:[_S.of(!0)]})};zn?dt.current=vn:vn()}}},[e,fe]),{state:ze,setState:_e,view:fe,setView:$e,container:D,setContainer:G}}var OB=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],gx=L.forwardRef((n,e)=>{var t=n.className,r=n.value,i=r===void 0?"":r,s=n.selection,l=n.extensions,o=l===void 0?[]:l,u=n.onChange,h=n.onStatistics,f=n.onCreateEditor,p=n.onUpdate,m=n.autoFocus,O=n.theme,k=O===void 0?"light":O,b=n.height,w=n.minHeight,S=n.maxHeight,C=n.width,Q=n.minWidth,R=n.maxWidth,I=n.basicSetup,j=n.placeholder,Z=n.indentWithTab,q=n.editable,J=n.readOnly,_=n.root,V=n.initialState,F=Uz(n,OB),H=L.useRef(null),ee=gB({root:_,value:i,autoFocus:m,theme:k,height:b,minHeight:w,maxHeight:S,width:C,minWidth:Q,maxWidth:R,basicSetup:I,placeholder:j,indentWithTab:Z,editable:q,readOnly:J,selection:s,onChange:u,onStatistics:h,onCreateEditor:f,onUpdate:p,extensions:o,initialState:V}),Y=ee.state,me=ee.view,ye=ee.container,te=ee.setContainer;L.useImperativeHandle(e,()=>({editor:H.current,state:Y,view:me}),[H,ye,Y,me]);var ae=L.useCallback(D=>{H.current=D,te(D)},[te]);if(typeof i!="string")throw new Error("value must be typeof string but got "+typeof i);var $=typeof k=="string"?"cm-theme-"+k:"cm-theme";return y.jsx("div",Ry({ref:ae,className:""+$+(t?" "+t:"")},F))});gx.displayName="CodeMirror";/**
96
+ * @license lucide-react v0.469.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 yB=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_T=(...n)=>n.filter((e,t,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===t).join(" ").trim();/**
101
+ * @license lucide-react v0.469.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
+ */var xB={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"};/**
106
+ * @license lucide-react v0.469.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 kB=L.forwardRef(({color:n="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:l,...o},u)=>L.createElement("svg",{ref:u,...xB,width:e,height:e,stroke:n,strokeWidth:r?Number(t)*24/Number(e):t,className:_T("lucide",i),...o},[...l.map(([h,f])=>L.createElement(h,f)),...Array.isArray(s)?s:[s]]));/**
111
+ * @license lucide-react v0.469.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 ve=(n,e)=>{const t=L.forwardRef(({className:r,...i},s)=>L.createElement(kB,{ref:s,iconNode:e,className:_T(`lucide-${yB(n)}`,r),...i}));return t.displayName=`${n}`,t};/**
116
+ * @license lucide-react v0.469.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 vB=ve("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"}]]);/**
121
+ * @license lucide-react v0.469.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 bB=ve("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
126
+ * @license lucide-react v0.469.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 wB=ve("Book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
131
+ * @license lucide-react v0.469.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 SB=ve("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
136
+ * @license lucide-react v0.469.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 PB=ve("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/**
141
+ * @license lucide-react v0.469.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 CB=ve("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
146
+ * @license lucide-react v0.469.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 QB=ve("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"}]]);/**
151
+ * @license lucide-react v0.469.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 np=ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
156
+ * @license lucide-react v0.469.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 $B=ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
161
+ * @license lucide-react v0.469.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 DT=ve("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
166
+ * @license lucide-react v0.469.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 IT=ve("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
171
+ * @license lucide-react v0.469.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 Zy=ve("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
176
+ * @license lucide-react v0.469.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 TB=ve("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
181
+ * @license lucide-react v0.469.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 jB=ve("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
186
+ * @license lucide-react v0.469.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 EB=ve("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
191
+ * @license lucide-react v0.469.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 Ox=ve("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
196
+ * @license lucide-react v0.469.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 MB=ve("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
201
+ * @license lucide-react v0.469.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 Xy=ve("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"}]]);/**
206
+ * @license lucide-react v0.469.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 AB=ve("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"}]]);/**
211
+ * @license lucide-react v0.469.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 zT=ve("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"}]]);/**
216
+ * @license lucide-react v0.469.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 RB=ve("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
221
+ * @license lucide-react v0.469.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 NB=ve("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"}]]);/**
226
+ * @license lucide-react v0.469.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 LB=ve("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
231
+ * @license lucide-react v0.469.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 _B=ve("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
236
+ * @license lucide-react v0.469.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 DB=ve("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
241
+ * @license lucide-react v0.469.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 IB=ve("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"}]]);/**
246
+ * @license lucide-react v0.469.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 zB=ve("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
251
+ * @license lucide-react v0.469.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 ZB=ve("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
256
+ * @license lucide-react v0.469.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 XB=ve("Hexagon",[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]]);/**
261
+ * @license lucide-react v0.469.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 Td=ve("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"}]]);/**
266
+ * @license lucide-react v0.469.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 BB=ve("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
271
+ * @license lucide-react v0.469.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 DS=ve("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
276
+ * @license lucide-react v0.469.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 WB=ve("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
281
+ * @license lucide-react v0.469.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 VB=ve("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
286
+ * @license lucide-react v0.469.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 qB=ve("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"}]]);/**
291
+ * @license lucide-react v0.469.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 ZT=ve("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
296
+ * @license lucide-react v0.469.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 FB=ve("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
301
+ * @license lucide-react v0.469.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 XT=ve("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
306
+ * @license lucide-react v0.469.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 IS=ve("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
311
+ * @license lucide-react v0.469.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 YB=ve("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"}]]);/**
316
+ * @license lucide-react v0.469.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 UB=ve("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
321
+ * @license lucide-react v0.469.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 yx=ve("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"}]]);/**
326
+ * @license lucide-react v0.469.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 BT=ve("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"}]]);/**
331
+ * @license lucide-react v0.469.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 rp=ve("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
336
+ * @license lucide-react v0.469.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 WT=ve("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"}]]);/**
341
+ * @license lucide-react v0.469.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 VT=ve("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"}]]);/**
346
+ * @license lucide-react v0.469.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 GB=ve("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
351
+ * @license lucide-react v0.469.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 HB=ve("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"}]]);/**
356
+ * @license lucide-react v0.469.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const qT=ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
361
+ * @license lucide-react v0.469.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const FT=ve("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"}]]);/**
366
+ * @license lucide-react v0.469.0 - ISC
367
+ *
368
+ * This source code is licensed under the ISC license.
369
+ * See the LICENSE file in the root directory of this source tree.
370
+ */const KB=ve("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
371
+ * @license lucide-react v0.469.0 - ISC
372
+ *
373
+ * This source code is licensed under the ISC license.
374
+ * See the LICENSE file in the root directory of this source tree.
375
+ */const JB=ve("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"}]]);/**
376
+ * @license lucide-react v0.469.0 - ISC
377
+ *
378
+ * This source code is licensed under the ISC license.
379
+ * See the LICENSE file in the root directory of this source tree.
380
+ */const e6=ve("SquareKanban",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 7v7",key:"1x2jlm"}],["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M16 7v9",key:"1hp2iy"}]]);/**
381
+ * @license lucide-react v0.469.0 - ISC
382
+ *
383
+ * This source code is licensed under the ISC license.
384
+ * See the LICENSE file in the root directory of this source tree.
385
+ */const t6=ve("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
386
+ * @license lucide-react v0.469.0 - ISC
387
+ *
388
+ * This source code is licensed under the ISC license.
389
+ * See the LICENSE file in the root directory of this source tree.
390
+ */const n6=ve("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
391
+ * @license lucide-react v0.469.0 - ISC
392
+ *
393
+ * This source code is licensed under the ISC license.
394
+ * See the LICENSE file in the root directory of this source tree.
395
+ */const YT=ve("Sunrise",[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]]);/**
396
+ * @license lucide-react v0.469.0 - ISC
397
+ *
398
+ * This source code is licensed under the ISC license.
399
+ * See the LICENSE file in the root directory of this source tree.
400
+ */const r6=ve("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
401
+ * @license lucide-react v0.469.0 - ISC
402
+ *
403
+ * This source code is licensed under the ISC license.
404
+ * See the LICENSE file in the root directory of this source tree.
405
+ */const UT=ve("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
406
+ * @license lucide-react v0.469.0 - ISC
407
+ *
408
+ * This source code is licensed under the ISC license.
409
+ * See the LICENSE file in the root directory of this source tree.
410
+ */const GT=ve("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"}]]);/**
411
+ * @license lucide-react v0.469.0 - ISC
412
+ *
413
+ * This source code is licensed under the ISC license.
414
+ * See the LICENSE file in the root directory of this source tree.
415
+ */const i6=ve("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"}]]);/**
416
+ * @license lucide-react v0.469.0 - ISC
417
+ *
418
+ * This source code is licensed under the ISC license.
419
+ * See the LICENSE file in the root directory of this source tree.
420
+ */const s6=ve("Triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]);/**
421
+ * @license lucide-react v0.469.0 - ISC
422
+ *
423
+ * This source code is licensed under the ISC license.
424
+ * See the LICENSE file in the root directory of this source tree.
425
+ */const By=ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
426
+ * @license lucide-react v0.469.0 - ISC
427
+ *
428
+ * This source code is licensed under the ISC license.
429
+ * See the LICENSE file in the root directory of this source tree.
430
+ */const l6=ve("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 o6(n,e){const t={};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const a6=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u6=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c6={};function zS(n,e){return(c6.jsx?u6:a6).test(n)}const h6=/[ \t\n\f\r]/g;function f6(n){return typeof n=="object"?n.type==="text"?ZS(n.value):!1:ZS(n)}function ZS(n){return n.replace(h6,"")===""}class Lc{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}}Lc.prototype.normal={};Lc.prototype.property={};Lc.prototype.space=void 0;function HT(n,e){const t={},r={};for(const i of n)Object.assign(t,i.property),Object.assign(r,i.normal);return new Lc(t,r,e)}function Wy(n){return n.toLowerCase()}class In{constructor(e,t){this.attribute=t,this.property=e}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let d6=0;const Le=zl(),Et=zl(),Vy=zl(),se=zl(),lt=zl(),El=zl(),Un=zl();function zl(){return 2**++d6}const qy=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:Et,commaOrSpaceSeparated:Un,commaSeparated:El,number:se,overloadedBoolean:Vy,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Gg=Object.keys(qy);class xx extends In{constructor(e,t,r,i){let s=-1;if(super(e,t),XS(this,"space",i),typeof r=="number")for(;++s<Gg.length;){const l=Gg[s];XS(this,Gg[s],(r&qy[l])===qy[l])}}}xx.prototype.defined=!0;function XS(n,e,t){t&&(n[e]=t)}function va(n){const e={},t={};for(const[r,i]of Object.entries(n.properties)){const s=new xx(r,n.transform(n.attributes||{},r),i,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,t[Wy(r)]=r,t[Wy(s.attribute)]=r}return new Lc(e,t,n.space)}const KT=va({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:lt,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:se,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:lt,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:Et,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function JT(n,e){return e in n?n[e]:e}function ej(n,e){return JT(n,e.toLowerCase())}const p6=va({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:El,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alpha:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:lt,autoFocus:Le,autoPlay:Le,blocking:lt,capture:null,charSet:null,checked:Le,cite:null,className:lt,closedBy:null,colorSpace:null,cols:se,colSpan:se,command:null,commandFor:null,content:null,contentEditable:Et,controls:Le,controlsList:lt,coords:se|El,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:Vy,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:lt,height:se,hidden:Vy,high:se,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:lt,itemRef:lt,itemScope:Le,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:se,pattern:null,ping:lt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:lt,required:Le,reversed:Le,rows:se,rowSpan:se,sandbox:lt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootCustomElementRegistry:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shadowRootSerializable:Le,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:Et,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Le,disablePictureInPicture:Le,disableRemotePlayback:Le,exportParts:El,part:lt,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:ej}),m6=va({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:Un,accentHeight:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className:lt,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:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,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:El,g2:El,glyphName:El,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,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:se,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:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,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:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:JT}),tj=va({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,e){return"xlink:"+e.slice(5).toLowerCase()}}),nj=va({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ej}),rj=va({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),g6={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"},O6=/[A-Z]/g,BS=/-[a-z]/g,y6=/^data[-\w.:]+$/i;function x6(n,e){const t=Wy(e);let r=e,i=In;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&y6.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(BS,v6);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!BS.test(s)){let l=s.replace(O6,k6);l.charAt(0)!=="-"&&(l="-"+l),e="data"+l}}i=xx}return new i(r,e)}function k6(n){return"-"+n.toLowerCase()}function v6(n){return n.charAt(1).toUpperCase()}const b6=HT([KT,p6,tj,nj,rj],"html"),kx=HT([KT,m6,tj,nj,rj],"svg");function w6(n){return n.join(" ").trim()}var Oo={},Hg,WS;function S6(){if(WS)return Hg;WS=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
431
+ `,h="/",f="*",p="",m="comment",O="declaration";function k(w,S){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];S=S||{};var C=1,Q=1;function R(ee){var Y=ee.match(e);Y&&(C+=Y.length);var me=ee.lastIndexOf(u);Q=~me?ee.length-me:Q+ee.length}function I(){var ee={line:C,column:Q};return function(Y){return Y.position=new j(ee),J(),Y}}function j(ee){this.start=ee,this.end={line:C,column:Q},this.source=S.source}j.prototype.content=w;function Z(ee){var Y=new Error(S.source+":"+C+":"+Q+": "+ee);if(Y.reason=ee,Y.filename=S.source,Y.line=C,Y.column=Q,Y.source=w,!S.silent)throw Y}function q(ee){var Y=ee.exec(w);if(Y){var me=Y[0];return R(me),w=w.slice(me.length),Y}}function J(){q(t)}function _(ee){var Y;for(ee=ee||[];Y=V();)Y!==!1&&ee.push(Y);return ee}function V(){var ee=I();if(!(h!=w.charAt(0)||f!=w.charAt(1))){for(var Y=2;p!=w.charAt(Y)&&(f!=w.charAt(Y)||h!=w.charAt(Y+1));)++Y;if(Y+=2,p===w.charAt(Y-1))return Z("End of comment missing");var me=w.slice(2,Y-2);return Q+=2,R(me),w=w.slice(Y),Q+=2,ee({type:m,comment:me})}}function F(){var ee=I(),Y=q(r);if(Y){if(V(),!q(i))return Z("property missing ':'");var me=q(s),ye=ee({type:O,property:b(Y[0].replace(n,p)),value:me?b(me[0].replace(n,p)):p});return q(l),ye}}function H(){var ee=[];_(ee);for(var Y;Y=F();)Y!==!1&&(ee.push(Y),_(ee));return ee}return J(),H()}function b(w){return w?w.replace(o,p):p}return Hg=k,Hg}var VS;function P6(){if(VS)return Oo;VS=1;var n=Oo&&Oo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=t;const e=n(S6());function t(r,i){let s=null;if(!r||typeof r!="string")return s;const l=(0,e.default)(r),o=typeof i=="function";return l.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:f}=u;o?i(h,f,u):f&&(s=s||{},s[h]=f)}),s}return Oo}var yu={},qS;function C6(){if(qS)return yu;qS=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(h){return!h||t.test(h)||n.test(h)},l=function(h,f){return f.toUpperCase()},o=function(h,f){return"".concat(f,"-")},u=function(h,f){return f===void 0&&(f={}),s(h)?h:(h=h.toLowerCase(),f.reactCompat?h=h.replace(i,o):h=h.replace(r,o),h.replace(e,l))};return yu.camelCase=u,yu}var xu,FS;function Q6(){if(FS)return xu;FS=1;var n=xu&&xu.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=n(P6()),t=C6();function r(i,s){var l={};return!i||typeof i!="string"||(0,e.default)(i,function(o,u){o&&u&&(l[(0,t.camelCase)(o,s)]=u)}),l}return r.default=r,xu=r,xu}var $6=Q6();const T6=Ld($6),ij=sj("end"),vx=sj("start");function sj(n){return e;function e(t){const r=t&&t.position&&t.position[n]||{};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 j6(n){const e=vx(n),t=ij(n);if(e&&t)return{start:e,end:t}}function Iu(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?YS(n.position):"start"in n||"end"in n?YS(n):"line"in n||"column"in n?Fy(n):""}function Fy(n){return US(n&&n.line)+":"+US(n&&n.column)}function YS(n){return Fy(n&&n.start)+"-"+Fy(n&&n.end)}function US(n){return n&&typeof n=="number"?n:1}class dn extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",s={},l=!1;if(t&&("line"in t&&"column"in t?s={place:t}:"start"in t&&"end"in t?s={place:t}:"type"in t?s={ancestors:[t],place:t.position}:s={...t}),typeof e=="string"?i=e:!s.cause&&e&&(l=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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=Iu(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}dn.prototype.file="";dn.prototype.name="";dn.prototype.reason="";dn.prototype.message="";dn.prototype.stack="";dn.prototype.column=void 0;dn.prototype.line=void 0;dn.prototype.ancestors=void 0;dn.prototype.cause=void 0;dn.prototype.fatal=void 0;dn.prototype.place=void 0;dn.prototype.ruleId=void 0;dn.prototype.source=void 0;const bx={}.hasOwnProperty,E6=new Map,M6=/[A-Z]/g,A6=new Set(["table","tbody","thead","tfoot","tr"]),R6=new Set(["td","th"]),lj="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function N6(n,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=B6(t,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=X6(t,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?kx:b6,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=oj(i,n,void 0);return s&&typeof s!="string"?s:i.create(n,i.Fragment,{children:s||void 0},void 0)}function oj(n,e,t){if(e.type==="element")return L6(n,e,t);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return _6(n,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return I6(n,e,t);if(e.type==="mdxjsEsm")return D6(n,e);if(e.type==="root")return z6(n,e,t);if(e.type==="text")return Z6(n,e)}function L6(n,e,t){const r=n.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=kx,n.schema=i),n.ancestors.push(e);const s=uj(n,e.tagName,!1),l=W6(n,e);let o=Sx(n,e);return A6.has(e.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!f6(u):!0})),aj(n,l,s,e),wx(l,o),n.ancestors.pop(),n.schema=r,n.create(e,s,l,t)}function _6(n,e){if(e.data&&e.data.estree&&n.evaluater){const r=e.data.estree.body[0];return r.type,n.evaluater.evaluateExpression(r.expression)}mc(n,e.position)}function D6(n,e){if(e.data&&e.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(e.data.estree);mc(n,e.position)}function I6(n,e,t){const r=n.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=kx,n.schema=i),n.ancestors.push(e);const s=e.name===null?n.Fragment:uj(n,e.name,!0),l=V6(n,e),o=Sx(n,e);return aj(n,l,s,e),wx(l,o),n.ancestors.pop(),n.schema=r,n.create(e,s,l,t)}function z6(n,e,t){const r={};return wx(r,Sx(n,e)),n.create(e,n.Fragment,r,t)}function Z6(n,e){return e.value}function aj(n,e,t,r){typeof t!="string"&&t!==n.Fragment&&n.passNode&&(e.node=r)}function wx(n,e){if(e.length>0){const t=e.length>1?e:e[0];t&&(n.children=t)}}function X6(n,e,t){return r;function r(i,s,l,o){const h=Array.isArray(l.children)?t:e;return o?h(s,l,o):h(s,l)}}function B6(n,e){return t;function t(r,i,s,l){const o=Array.isArray(s.children),u=vx(r);return e(i,s,l,o,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function W6(n,e){const t={};let r,i;for(i in e.properties)if(i!=="children"&&bx.call(e.properties,i)){const s=q6(n,i,e.properties[i]);if(s){const[l,o]=s;n.tableCellAlignToStyle&&l==="align"&&typeof o=="string"&&R6.has(e.tagName)?r=o:t[l]=o}}if(r){const s=t.style||(t.style={});s[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function V6(n,e){const t={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&n.evaluater){const s=r.data.estree.body[0];s.type;const l=s.expression;l.type;const o=l.properties[0];o.type,Object.assign(t,n.evaluater.evaluateExpression(o.argument))}else mc(n,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&n.evaluater){const o=r.value.data.estree.body[0];o.type,s=n.evaluater.evaluateExpression(o.expression)}else mc(n,e.position);else s=r.value===null?!0:r.value;t[i]=s}return t}function Sx(n,e){const t=[];let r=-1;const i=n.passKeys?new Map:E6;for(;++r<e.children.length;){const s=e.children[r];let l;if(n.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const h=i.get(u)||0;l=u+"-"+h,i.set(u,h+1)}}const o=oj(n,s,l);o!==void 0&&t.push(o)}return t}function q6(n,e,t){const r=x6(n.schema,e);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?o6(t):w6(t)),r.property==="style"){let i=typeof t=="object"?t:F6(n,String(t));return n.stylePropertyNameCase==="css"&&(i=Y6(i)),["style",i]}return[n.elementAttributeNameCase==="react"&&r.space?g6[r.property]||r.property:r.attribute,t]}}function F6(n,e){try{return T6(e,{reactCompat:!0})}catch(t){if(n.ignoreInvalidStyle)return{};const r=t,i=new dn("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=n.filePath||void 0,i.url=lj+"#cannot-parse-style-attribute",i}}function uj(n,e,t){let r;if(!t)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,l;for(;++s<i.length;){const o=zS(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};l=l?{type:"MemberExpression",object:l,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=l}else r=zS(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return bx.call(n.components,i)?n.components[i]:i}if(n.evaluater)return n.evaluater.evaluateExpression(r);mc(n)}function mc(n,e){const t=new dn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=n.filePath||void 0,t.url=lj+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Y6(n){const e={};let t;for(t in n)bx.call(n,t)&&(e[U6(t)]=n[t]);return e}function U6(n){let e=n.replace(M6,G6);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function G6(n){return"-"+n.toLowerCase()}const Kg={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"]},H6={};function Px(n,e){const t=H6,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return cj(n,r,i)}function cj(n,e,t){if(K6(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(e&&"alt"in n&&n.alt)return n.alt;if("children"in n)return GS(n.children,e,t)}return Array.isArray(n)?GS(n,e,t):""}function GS(n,e,t){const r=[];let i=-1;for(;++i<n.length;)r[i]=cj(n[i],e,t);return r.join("")}function K6(n){return!!(n&&typeof n=="object")}const HS=document.createElement("i");function Cx(n){const e="&"+n+";";HS.innerHTML=e;const t=HS.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===e?!1:t}function nr(n,e,t,r){const i=n.length;let s=0,l;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(e,t),n.splice(...l);else for(t&&n.splice(e,t);s<r.length;)l=r.slice(s,s+1e4),l.unshift(e,0),n.splice(...l),s+=1e4,e+=1e4}function mr(n,e){return n.length>0?(nr(n,n.length,0,e),n):e}const KS={}.hasOwnProperty;function hj(n){const e={};let t=-1;for(;++t<n.length;)J6(e,n[t]);return e}function J6(n,e){let t;for(t in e){const i=(KS.call(n,t)?n[t]:void 0)||(n[t]={}),s=e[t];let l;if(s)for(l in s){KS.call(i,l)||(i[l]=[]);const o=s[l];e7(i[l],Array.isArray(o)?o:o?[o]:[])}}}function e7(n,e){let t=-1;const r=[];for(;++t<e.length;)(e[t].add==="after"?n:r).push(e[t]);nr(n,0,0,r)}function fj(n,e){const t=Number.parseInt(n,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Lr(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xn=qs(/[A-Za-z]/),cn=qs(/[\dA-Za-z]/),t7=qs(/[#-'*+\--9=?A-Z^-~]/);function jd(n){return n!==null&&(n<32||n===127)}const Yy=qs(/\d/),n7=qs(/[\dA-Fa-f]/),r7=qs(/[!-/:-@[-`{-~]/);function Ee(n){return n!==null&&n<-2}function ut(n){return n!==null&&(n<0||n===32)}function We(n){return n===-2||n===-1||n===32}const ip=qs(new RegExp("\\p{P}|\\p{S}","u")),Dl=qs(/\s/);function qs(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function ba(n){const e=[];let t=-1,r=0,i=0;for(;++t<n.length;){const s=n.charCodeAt(t);let l="";if(s===37&&cn(n.charCodeAt(t+1))&&cn(n.charCodeAt(t+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const o=n.charCodeAt(t+1);s<56320&&o>56319&&o<57344?(l=String.fromCharCode(s,o),i=1):l="�"}else l=String.fromCharCode(s);l&&(e.push(n.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return e.join("")+n.slice(r)}function Ue(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(u){return We(u)?(n.enter(t),o(u)):e(u)}function o(u){return We(u)&&s++<i?(n.consume(u),o):(n.exit(t),e(u))}}const i7={tokenize:s7};function s7(n){const e=n.attempt(this.parser.constructs.contentInitial,r,i);let t;return e;function r(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ue(n,e,"linePrefix")}function i(o){return n.enter("paragraph"),s(o)}function s(o){const u=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,l(o)}function l(o){if(o===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(o);return}return Ee(o)?(n.consume(o),n.exit("chunkText"),s):(n.consume(o),l)}}const l7={tokenize:o7},JS={tokenize:a7};function o7(n){const e=this,t=[];let r=0,i,s,l;return o;function o(Q){if(r<t.length){const R=t[r];return e.containerState=R[1],n.attempt(R[0].continuation,u,h)(Q)}return h(Q)}function u(Q){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&C();const R=e.events.length;let I=R,j;for(;I--;)if(e.events[I][0]==="exit"&&e.events[I][1].type==="chunkFlow"){j=e.events[I][1].end;break}S(r);let Z=R;for(;Z<e.events.length;)e.events[Z][1].end={...j},Z++;return nr(e.events,I+1,0,e.events.slice(R)),e.events.length=Z,h(Q)}return o(Q)}function h(Q){if(r===t.length){if(!i)return m(Q);if(i.currentConstruct&&i.currentConstruct.concrete)return k(Q);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},n.check(JS,f,p)(Q)}function f(Q){return i&&C(),S(r),m(Q)}function p(Q){return e.parser.lazy[e.now().line]=r!==t.length,l=e.now().offset,k(Q)}function m(Q){return e.containerState={},n.attempt(JS,O,k)(Q)}function O(Q){return r++,t.push([e.currentConstruct,e.containerState]),m(Q)}function k(Q){if(Q===null){i&&C(),S(0),n.consume(Q);return}return i=i||e.parser.flow(e.now()),n.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(Q)}function b(Q){if(Q===null){w(n.exit("chunkFlow"),!0),S(0),n.consume(Q);return}return Ee(Q)?(n.consume(Q),w(n.exit("chunkFlow")),r=0,e.interrupt=void 0,o):(n.consume(Q),b)}function w(Q,R){const I=e.sliceStream(Q);if(R&&I.push(null),Q.previous=s,s&&(s.next=Q),s=Q,i.defineSkip(Q.start),i.write(I),e.parser.lazy[Q.start.line]){let j=i.events.length;for(;j--;)if(i.events[j][1].start.offset<l&&(!i.events[j][1].end||i.events[j][1].end.offset>l))return;const Z=e.events.length;let q=Z,J,_;for(;q--;)if(e.events[q][0]==="exit"&&e.events[q][1].type==="chunkFlow"){if(J){_=e.events[q][1].end;break}J=!0}for(S(r),j=Z;j<e.events.length;)e.events[j][1].end={..._},j++;nr(e.events,q+1,0,e.events.slice(Z)),e.events.length=j}}function S(Q){let R=t.length;for(;R-- >Q;){const I=t[R];e.containerState=I[1],I[0].exit.call(e,n)}t.length=Q}function C(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function a7(n,e,t){return Ue(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function aa(n){if(n===null||ut(n)||Dl(n))return 1;if(ip(n))return 2}function sp(n,e,t){const r=[];let i=-1;for(;++i<n.length;){const s=n[i].resolveAll;s&&!r.includes(s)&&(e=s(e,t),r.push(s))}return e}const Uy={name:"attention",resolveAll:u7,tokenize:c7};function u7(n,e){let t=-1,r,i,s,l,o,u,h,f;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(r=t;r--;)if(n[r][0]==="exit"&&n[r][1].type==="attentionSequence"&&n[r][1]._open&&e.sliceSerialize(n[r][1]).charCodeAt(0)===e.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[r][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[r][1].end.offset-n[r][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;u=n[r][1].end.offset-n[r][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const p={...n[r][1].end},m={...n[t][1].start};eP(p,-u),eP(m,u),l={type:u>1?"strongSequence":"emphasisSequence",start:p,end:{...n[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:m},s={type:u>1?"strongText":"emphasisText",start:{...n[r][1].end},end:{...n[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...o.end}},n[r][1].end={...l.start},n[t][1].start={...o.end},h=[],n[r][1].end.offset-n[r][1].start.offset&&(h=mr(h,[["enter",n[r][1],e],["exit",n[r][1],e]])),h=mr(h,[["enter",i,e],["enter",l,e],["exit",l,e],["enter",s,e]]),h=mr(h,sp(e.parser.constructs.insideSpan.null,n.slice(r+1,t),e)),h=mr(h,[["exit",s,e],["enter",o,e],["exit",o,e],["exit",i,e]]),n[t][1].end.offset-n[t][1].start.offset?(f=2,h=mr(h,[["enter",n[t][1],e],["exit",n[t][1],e]])):f=0,nr(n,r-1,t-r+3,h),t=r+h.length-f-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function c7(n,e){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=aa(r);let s;return l;function l(u){return s=u,n.enter("attentionSequence"),o(u)}function o(u){if(u===s)return n.consume(u),o;const h=n.exit("attentionSequence"),f=aa(u),p=!f||f===2&&i||t.includes(u),m=!i||i===2&&f||t.includes(r);return h._open=!!(s===42?p:p&&(i||!m)),h._close=!!(s===42?m:m&&(f||!p)),e(u)}}function eP(n,e){n.column+=e,n.offset+=e,n._bufferIndex+=e}const h7={name:"autolink",tokenize:f7};function f7(n,e,t){let r=0;return i;function i(O){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(O),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),s}function s(O){return xn(O)?(n.consume(O),l):O===64?t(O):h(O)}function l(O){return O===43||O===45||O===46||cn(O)?(r=1,o(O)):h(O)}function o(O){return O===58?(n.consume(O),r=0,u):(O===43||O===45||O===46||cn(O))&&r++<32?(n.consume(O),o):(r=0,h(O))}function u(O){return O===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(O),n.exit("autolinkMarker"),n.exit("autolink"),e):O===null||O===32||O===60||jd(O)?t(O):(n.consume(O),u)}function h(O){return O===64?(n.consume(O),f):t7(O)?(n.consume(O),h):t(O)}function f(O){return cn(O)?p(O):t(O)}function p(O){return O===46?(n.consume(O),r=0,f):O===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(O),n.exit("autolinkMarker"),n.exit("autolink"),e):m(O)}function m(O){if((O===45||cn(O))&&r++<63){const k=O===45?m:p;return n.consume(O),k}return t(O)}}const _c={partial:!0,tokenize:d7};function d7(n,e,t){return r;function r(s){return We(s)?Ue(n,i,"linePrefix")(s):i(s)}function i(s){return s===null||Ee(s)?e(s):t(s)}}const dj={continuation:{tokenize:m7},exit:g7,name:"blockQuote",tokenize:p7};function p7(n,e,t){const r=this;return i;function i(l){if(l===62){const o=r.containerState;return o.open||(n.enter("blockQuote",{_container:!0}),o.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(l),n.exit("blockQuoteMarker"),s}return t(l)}function s(l){return We(l)?(n.enter("blockQuotePrefixWhitespace"),n.consume(l),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),e):(n.exit("blockQuotePrefix"),e(l))}}function m7(n,e,t){const r=this;return i;function i(l){return We(l)?Ue(n,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return n.attempt(dj,e,t)(l)}}function g7(n){n.exit("blockQuote")}const pj={name:"characterEscape",tokenize:O7};function O7(n,e,t){return r;function r(s){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(s),n.exit("escapeMarker"),i}function i(s){return r7(s)?(n.enter("characterEscapeValue"),n.consume(s),n.exit("characterEscapeValue"),n.exit("characterEscape"),e):t(s)}}const mj={name:"characterReference",tokenize:y7};function y7(n,e,t){const r=this;let i=0,s,l;return o;function o(p){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(p),n.exit("characterReferenceMarker"),u}function u(p){return p===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(p),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),s=31,l=cn,f(p))}function h(p){return p===88||p===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(p),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,l=n7,f):(n.enter("characterReferenceValue"),s=7,l=Yy,f(p))}function f(p){if(p===59&&i){const m=n.exit("characterReferenceValue");return l===cn&&!Cx(r.sliceSerialize(m))?t(p):(n.enter("characterReferenceMarker"),n.consume(p),n.exit("characterReferenceMarker"),n.exit("characterReference"),e)}return l(p)&&i++<s?(n.consume(p),f):t(p)}}const tP={partial:!0,tokenize:k7},nP={concrete:!0,name:"codeFenced",tokenize:x7};function x7(n,e,t){const r=this,i={partial:!0,tokenize:I};let s=0,l=0,o;return u;function u(j){return h(j)}function h(j){const Z=r.events[r.events.length-1];return s=Z&&Z[1].type==="linePrefix"?Z[2].sliceSerialize(Z[1],!0).length:0,o=j,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),f(j)}function f(j){return j===o?(l++,n.consume(j),f):l<3?t(j):(n.exit("codeFencedFenceSequence"),We(j)?Ue(n,p,"whitespace")(j):p(j))}function p(j){return j===null||Ee(j)?(n.exit("codeFencedFence"),r.interrupt?e(j):n.check(tP,b,R)(j)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),m(j))}function m(j){return j===null||Ee(j)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),p(j)):We(j)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ue(n,O,"whitespace")(j)):j===96&&j===o?t(j):(n.consume(j),m)}function O(j){return j===null||Ee(j)?p(j):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(j))}function k(j){return j===null||Ee(j)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),p(j)):j===96&&j===o?t(j):(n.consume(j),k)}function b(j){return n.attempt(i,R,w)(j)}function w(j){return n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),S}function S(j){return s>0&&We(j)?Ue(n,C,"linePrefix",s+1)(j):C(j)}function C(j){return j===null||Ee(j)?n.check(tP,b,R)(j):(n.enter("codeFlowValue"),Q(j))}function Q(j){return j===null||Ee(j)?(n.exit("codeFlowValue"),C(j)):(n.consume(j),Q)}function R(j){return n.exit("codeFenced"),e(j)}function I(j,Z,q){let J=0;return _;function _(Y){return j.enter("lineEnding"),j.consume(Y),j.exit("lineEnding"),V}function V(Y){return j.enter("codeFencedFence"),We(Y)?Ue(j,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):F(Y)}function F(Y){return Y===o?(j.enter("codeFencedFenceSequence"),H(Y)):q(Y)}function H(Y){return Y===o?(J++,j.consume(Y),H):J>=l?(j.exit("codeFencedFenceSequence"),We(Y)?Ue(j,ee,"whitespace")(Y):ee(Y)):q(Y)}function ee(Y){return Y===null||Ee(Y)?(j.exit("codeFencedFence"),Z(Y)):q(Y)}}}function k7(n,e,t){const r=this;return i;function i(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),s)}function s(l){return r.parser.lazy[r.now().line]?t(l):e(l)}}const Jg={name:"codeIndented",tokenize:b7},v7={partial:!0,tokenize:w7};function b7(n,e,t){const r=this;return i;function i(h){return n.enter("codeIndented"),Ue(n,s,"linePrefix",5)(h)}function s(h){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(h):t(h)}function l(h){return h===null?u(h):Ee(h)?n.attempt(v7,l,u)(h):(n.enter("codeFlowValue"),o(h))}function o(h){return h===null||Ee(h)?(n.exit("codeFlowValue"),l(h)):(n.consume(h),o)}function u(h){return n.exit("codeIndented"),e(h)}}function w7(n,e,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):Ee(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):Ue(n,s,"linePrefix",5)(l)}function s(l){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(l):Ee(l)?i(l):t(l)}}const S7={name:"codeText",previous:C7,resolve:P7,tokenize:Q7};function P7(n){let e=n.length-4,t=3,r,i;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(r=t;++r<e;)if(n[r][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)i===void 0?r!==e&&n[r][1].type!=="lineEnding"&&(i=r):(r===e||n[r][1].type==="lineEnding")&&(n[i][1].type="codeTextData",r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return n}function C7(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Q7(n,e,t){let r=0,i,s;return l;function l(p){return n.enter("codeText"),n.enter("codeTextSequence"),o(p)}function o(p){return p===96?(n.consume(p),r++,o):(n.exit("codeTextSequence"),u(p))}function u(p){return p===null?t(p):p===32?(n.enter("space"),n.consume(p),n.exit("space"),u):p===96?(s=n.enter("codeTextSequence"),i=0,f(p)):Ee(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),u):(n.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Ee(p)?(n.exit("codeTextData"),u(p)):(n.consume(p),h)}function f(p){return p===96?(n.consume(p),i++,f):i===r?(n.exit("codeTextSequence"),n.exit("codeText"),e(p)):(s.type="codeTextData",h(p))}}class $7{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){const i=t||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ku(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ku(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ku(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);ku(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ku(this.left,t.reverse())}}}function ku(n,e){let t=0;if(e.length<1e4)n.push(...e);else for(;t<e.length;)n.push(...e.slice(t,t+1e4)),t+=1e4}function gj(n){const e={};let t=-1,r,i,s,l,o,u,h;const f=new $7(n);for(;++t<f.length;){for(;t in e;)t=e[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,T7(f,t)),t=e[t],h=!0);else if(r[1]._container){for(s=t,i=void 0;s--;)if(l=f.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},o=f.slice(i,t),o.unshift(r),f.splice(i,t-i+1,o))}}return nr(n,0,Number.POSITIVE_INFINITY,f.slice(0)),!h}function T7(n,e){const t=n.get(e)[1],r=n.get(e)[2];let i=e-1;const s=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const o=l.events,u=[],h={};let f,p,m=-1,O=t,k=0,b=0;const w=[b];for(;O;){for(;n.get(++i)[1]!==O;);s.push(i),O._tokenizer||(f=r.sliceStream(O),O.next||f.push(null),p&&l.defineSkip(O.start),O._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),O._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=O,O=O.next}for(O=t;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(b=m+1,w.push(b),O._tokenizer=void 0,O.previous=void 0,O=O.next);for(l.events=[],O?(O._tokenizer=void 0,O.previous=void 0):w.pop(),m=w.length;m--;){const S=o.slice(w[m],w[m+1]),C=s.pop();u.push([C,C+S.length-1]),n.splice(C,2,S)}for(u.reverse(),m=-1;++m<u.length;)h[k+u[m][0]]=k+u[m][1],k+=u[m][1]-u[m][0]-1;return h}const j7={resolve:M7,tokenize:A7},E7={partial:!0,tokenize:R7};function M7(n){return gj(n),n}function A7(n,e){let t;return r;function r(o){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):Ee(o)?n.check(E7,l,s)(o):(n.consume(o),i)}function s(o){return n.exit("chunkContent"),n.exit("content"),e(o)}function l(o){return n.consume(o),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function R7(n,e,t){const r=this;return i;function i(l){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),Ue(n,s,"linePrefix")}function s(l){if(l===null||Ee(l))return t(l);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?e(l):n.interrupt(r.parser.constructs.flow,t,e)(l)}}function Oj(n,e,t,r,i,s,l,o,u){const h=u||Number.POSITIVE_INFINITY;let f=0;return p;function p(S){return S===60?(n.enter(r),n.enter(i),n.enter(s),n.consume(S),n.exit(s),m):S===null||S===32||S===41||jd(S)?t(S):(n.enter(r),n.enter(l),n.enter(o),n.enter("chunkString",{contentType:"string"}),b(S))}function m(S){return S===62?(n.enter(s),n.consume(S),n.exit(s),n.exit(i),n.exit(r),e):(n.enter(o),n.enter("chunkString",{contentType:"string"}),O(S))}function O(S){return S===62?(n.exit("chunkString"),n.exit(o),m(S)):S===null||S===60||Ee(S)?t(S):(n.consume(S),S===92?k:O)}function k(S){return S===60||S===62||S===92?(n.consume(S),O):O(S)}function b(S){return!f&&(S===null||S===41||ut(S))?(n.exit("chunkString"),n.exit(o),n.exit(l),n.exit(r),e(S)):f<h&&S===40?(n.consume(S),f++,b):S===41?(n.consume(S),f--,b):S===null||S===32||S===40||jd(S)?t(S):(n.consume(S),S===92?w:b)}function w(S){return S===40||S===41||S===92?(n.consume(S),b):b(S)}}function yj(n,e,t,r,i,s){const l=this;let o=0,u;return h;function h(O){return n.enter(r),n.enter(i),n.consume(O),n.exit(i),n.enter(s),f}function f(O){return o>999||O===null||O===91||O===93&&!u||O===94&&!o&&"_hiddenFootnoteSupport"in l.parser.constructs?t(O):O===93?(n.exit(s),n.enter(i),n.consume(O),n.exit(i),n.exit(r),e):Ee(O)?(n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),f):(n.enter("chunkString",{contentType:"string"}),p(O))}function p(O){return O===null||O===91||O===93||Ee(O)||o++>999?(n.exit("chunkString"),f(O)):(n.consume(O),u||(u=!We(O)),O===92?m:p)}function m(O){return O===91||O===92||O===93?(n.consume(O),o++,p):p(O)}}function xj(n,e,t,r,i,s){let l;return o;function o(m){return m===34||m===39||m===40?(n.enter(r),n.enter(i),n.consume(m),n.exit(i),l=m===40?41:m,u):t(m)}function u(m){return m===l?(n.enter(i),n.consume(m),n.exit(i),n.exit(r),e):(n.enter(s),h(m))}function h(m){return m===l?(n.exit(s),u(l)):m===null?t(m):Ee(m)?(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),Ue(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===l||m===null||Ee(m)?(n.exit("chunkString"),h(m)):(n.consume(m),m===92?p:f)}function p(m){return m===l||m===92?(n.consume(m),f):f(m)}}function zu(n,e){let t;return r;function r(i){return Ee(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t=!0,r):We(i)?Ue(n,r,t?"linePrefix":"lineSuffix")(i):e(i)}}const N7={name:"definition",tokenize:_7},L7={partial:!0,tokenize:D7};function _7(n,e,t){const r=this;let i;return s;function s(O){return n.enter("definition"),l(O)}function l(O){return yj.call(r,n,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(O)}function o(O){return i=Lr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),O===58?(n.enter("definitionMarker"),n.consume(O),n.exit("definitionMarker"),u):t(O)}function u(O){return ut(O)?zu(n,h)(O):h(O)}function h(O){return Oj(n,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(O)}function f(O){return n.attempt(L7,p,p)(O)}function p(O){return We(O)?Ue(n,m,"whitespace")(O):m(O)}function m(O){return O===null||Ee(O)?(n.exit("definition"),r.parser.defined.push(i),e(O)):t(O)}}function D7(n,e,t){return r;function r(o){return ut(o)?zu(n,i)(o):t(o)}function i(o){return xj(n,s,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return We(o)?Ue(n,l,"whitespace")(o):l(o)}function l(o){return o===null||Ee(o)?e(o):t(o)}}const I7={name:"hardBreakEscape",tokenize:z7};function z7(n,e,t){return r;function r(s){return n.enter("hardBreakEscape"),n.consume(s),i}function i(s){return Ee(s)?(n.exit("hardBreakEscape"),e(s)):t(s)}}const Z7={name:"headingAtx",resolve:X7,tokenize:B7};function X7(n,e){let t=n.length-2,r=3,i,s;return n[r][1].type==="whitespace"&&(r+=2),t-2>r&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&n[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:n[r][1].start,end:n[t][1].end},s={type:"chunkText",start:n[r][1].start,end:n[t][1].end,contentType:"text"},nr(n,r,t-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),n}function B7(n,e,t){let r=0;return i;function i(f){return n.enter("atxHeading"),s(f)}function s(f){return n.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(n.consume(f),l):f===null||ut(f)?(n.exit("atxHeadingSequence"),o(f)):t(f)}function o(f){return f===35?(n.enter("atxHeadingSequence"),u(f)):f===null||Ee(f)?(n.exit("atxHeading"),e(f)):We(f)?Ue(n,o,"whitespace")(f):(n.enter("atxHeadingText"),h(f))}function u(f){return f===35?(n.consume(f),u):(n.exit("atxHeadingSequence"),o(f))}function h(f){return f===null||f===35||ut(f)?(n.exit("atxHeadingText"),o(f)):(n.consume(f),h)}}const W7=["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"],rP=["pre","script","style","textarea"],V7={concrete:!0,name:"htmlFlow",resolveTo:Y7,tokenize:U7},q7={partial:!0,tokenize:H7},F7={partial:!0,tokenize:G7};function Y7(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function U7(n,e,t){const r=this;let i,s,l,o,u;return h;function h(E){return f(E)}function f(E){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(E),p}function p(E){return E===33?(n.consume(E),m):E===47?(n.consume(E),s=!0,b):E===63?(n.consume(E),i=3,r.interrupt?e:$):xn(E)?(n.consume(E),l=String.fromCharCode(E),w):t(E)}function m(E){return E===45?(n.consume(E),i=2,O):E===91?(n.consume(E),i=5,o=0,k):xn(E)?(n.consume(E),i=4,r.interrupt?e:$):t(E)}function O(E){return E===45?(n.consume(E),r.interrupt?e:$):t(E)}function k(E){const fe="CDATA[";return E===fe.charCodeAt(o++)?(n.consume(E),o===fe.length?r.interrupt?e:F:k):t(E)}function b(E){return xn(E)?(n.consume(E),l=String.fromCharCode(E),w):t(E)}function w(E){if(E===null||E===47||E===62||ut(E)){const fe=E===47,$e=l.toLowerCase();return!fe&&!s&&rP.includes($e)?(i=1,r.interrupt?e(E):F(E)):W7.includes(l.toLowerCase())?(i=6,fe?(n.consume(E),S):r.interrupt?e(E):F(E)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(E):s?C(E):Q(E))}return E===45||cn(E)?(n.consume(E),l+=String.fromCharCode(E),w):t(E)}function S(E){return E===62?(n.consume(E),r.interrupt?e:F):t(E)}function C(E){return We(E)?(n.consume(E),C):_(E)}function Q(E){return E===47?(n.consume(E),_):E===58||E===95||xn(E)?(n.consume(E),R):We(E)?(n.consume(E),Q):_(E)}function R(E){return E===45||E===46||E===58||E===95||cn(E)?(n.consume(E),R):I(E)}function I(E){return E===61?(n.consume(E),j):We(E)?(n.consume(E),I):Q(E)}function j(E){return E===null||E===60||E===61||E===62||E===96?t(E):E===34||E===39?(n.consume(E),u=E,Z):We(E)?(n.consume(E),j):q(E)}function Z(E){return E===u?(n.consume(E),u=null,J):E===null||Ee(E)?t(E):(n.consume(E),Z)}function q(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||ut(E)?I(E):(n.consume(E),q)}function J(E){return E===47||E===62||We(E)?Q(E):t(E)}function _(E){return E===62?(n.consume(E),V):t(E)}function V(E){return E===null||Ee(E)?F(E):We(E)?(n.consume(E),V):t(E)}function F(E){return E===45&&i===2?(n.consume(E),me):E===60&&i===1?(n.consume(E),ye):E===62&&i===4?(n.consume(E),D):E===63&&i===3?(n.consume(E),$):E===93&&i===5?(n.consume(E),ae):Ee(E)&&(i===6||i===7)?(n.exit("htmlFlowData"),n.check(q7,G,H)(E)):E===null||Ee(E)?(n.exit("htmlFlowData"),H(E)):(n.consume(E),F)}function H(E){return n.check(F7,ee,G)(E)}function ee(E){return n.enter("lineEnding"),n.consume(E),n.exit("lineEnding"),Y}function Y(E){return E===null||Ee(E)?H(E):(n.enter("htmlFlowData"),F(E))}function me(E){return E===45?(n.consume(E),$):F(E)}function ye(E){return E===47?(n.consume(E),l="",te):F(E)}function te(E){if(E===62){const fe=l.toLowerCase();return rP.includes(fe)?(n.consume(E),D):F(E)}return xn(E)&&l.length<8?(n.consume(E),l+=String.fromCharCode(E),te):F(E)}function ae(E){return E===93?(n.consume(E),$):F(E)}function $(E){return E===62?(n.consume(E),D):E===45&&i===2?(n.consume(E),$):F(E)}function D(E){return E===null||Ee(E)?(n.exit("htmlFlowData"),G(E)):(n.consume(E),D)}function G(E){return n.exit("htmlFlow"),e(E)}}function G7(n,e,t){const r=this;return i;function i(l){return Ee(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),s):t(l)}function s(l){return r.parser.lazy[r.now().line]?t(l):e(l)}}function H7(n,e,t){return r;function r(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),n.attempt(_c,e,t)}}const K7={name:"htmlText",tokenize:J7};function J7(n,e,t){const r=this;let i,s,l;return o;function o($){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume($),u}function u($){return $===33?(n.consume($),h):$===47?(n.consume($),I):$===63?(n.consume($),Q):xn($)?(n.consume($),q):t($)}function h($){return $===45?(n.consume($),f):$===91?(n.consume($),s=0,k):xn($)?(n.consume($),C):t($)}function f($){return $===45?(n.consume($),O):t($)}function p($){return $===null?t($):$===45?(n.consume($),m):Ee($)?(l=p,ye($)):(n.consume($),p)}function m($){return $===45?(n.consume($),O):p($)}function O($){return $===62?me($):$===45?m($):p($)}function k($){const D="CDATA[";return $===D.charCodeAt(s++)?(n.consume($),s===D.length?b:k):t($)}function b($){return $===null?t($):$===93?(n.consume($),w):Ee($)?(l=b,ye($)):(n.consume($),b)}function w($){return $===93?(n.consume($),S):b($)}function S($){return $===62?me($):$===93?(n.consume($),S):b($)}function C($){return $===null||$===62?me($):Ee($)?(l=C,ye($)):(n.consume($),C)}function Q($){return $===null?t($):$===63?(n.consume($),R):Ee($)?(l=Q,ye($)):(n.consume($),Q)}function R($){return $===62?me($):Q($)}function I($){return xn($)?(n.consume($),j):t($)}function j($){return $===45||cn($)?(n.consume($),j):Z($)}function Z($){return Ee($)?(l=Z,ye($)):We($)?(n.consume($),Z):me($)}function q($){return $===45||cn($)?(n.consume($),q):$===47||$===62||ut($)?J($):t($)}function J($){return $===47?(n.consume($),me):$===58||$===95||xn($)?(n.consume($),_):Ee($)?(l=J,ye($)):We($)?(n.consume($),J):me($)}function _($){return $===45||$===46||$===58||$===95||cn($)?(n.consume($),_):V($)}function V($){return $===61?(n.consume($),F):Ee($)?(l=V,ye($)):We($)?(n.consume($),V):J($)}function F($){return $===null||$===60||$===61||$===62||$===96?t($):$===34||$===39?(n.consume($),i=$,H):Ee($)?(l=F,ye($)):We($)?(n.consume($),F):(n.consume($),ee)}function H($){return $===i?(n.consume($),i=void 0,Y):$===null?t($):Ee($)?(l=H,ye($)):(n.consume($),H)}function ee($){return $===null||$===34||$===39||$===60||$===61||$===96?t($):$===47||$===62||ut($)?J($):(n.consume($),ee)}function Y($){return $===47||$===62||ut($)?J($):t($)}function me($){return $===62?(n.consume($),n.exit("htmlTextData"),n.exit("htmlText"),e):t($)}function ye($){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume($),n.exit("lineEnding"),te}function te($){return We($)?Ue(n,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):ae($)}function ae($){return n.enter("htmlTextData"),l($)}}const Qx={name:"labelEnd",resolveAll:rW,resolveTo:iW,tokenize:sW},eW={tokenize:lW},tW={tokenize:oW},nW={tokenize:aW};function rW(n){let e=-1;const t=[];for(;++e<n.length;){const r=n[e][1];if(t.push(n[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return n.length!==t.length&&nr(n,0,n.length,t),n}function iW(n,e){let t=n.length,r=0,i,s,l,o;for(;t--;)if(i=n[t][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;n[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(n[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const u={type:n[s][1].type==="labelLink"?"link":"image",start:{...n[s][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[s][1].start},end:{...n[l][1].end}},f={type:"labelText",start:{...n[s+r+2][1].end},end:{...n[l-2][1].start}};return o=[["enter",u,e],["enter",h,e]],o=mr(o,n.slice(s+1,s+r+3)),o=mr(o,[["enter",f,e]]),o=mr(o,sp(e.parser.constructs.insideSpan.null,n.slice(s+r+4,l-3),e)),o=mr(o,[["exit",f,e],n[l-2],n[l-1],["exit",h,e]]),o=mr(o,n.slice(l+1)),o=mr(o,[["exit",u,e]]),nr(n,s,n.length,o),n}function sW(n,e,t){const r=this;let i=r.events.length,s,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(m){return s?s._inactive?p(m):(l=r.parser.defined.includes(Lr(r.sliceSerialize({start:s.end,end:r.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(m),n.exit("labelMarker"),n.exit("labelEnd"),u):t(m)}function u(m){return m===40?n.attempt(eW,f,l?f:p)(m):m===91?n.attempt(tW,f,l?h:p)(m):l?f(m):p(m)}function h(m){return n.attempt(nW,f,p)(m)}function f(m){return e(m)}function p(m){return s._balanced=!0,t(m)}}function lW(n,e,t){return r;function r(p){return n.enter("resource"),n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),i}function i(p){return ut(p)?zu(n,s)(p):s(p)}function s(p){return p===41?f(p):Oj(n,l,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return ut(p)?zu(n,u)(p):f(p)}function o(p){return t(p)}function u(p){return p===34||p===39||p===40?xj(n,h,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):f(p)}function h(p){return ut(p)?zu(n,f)(p):f(p)}function f(p){return p===41?(n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),n.exit("resource"),e):t(p)}}function oW(n,e,t){const r=this;return i;function i(o){return yj.call(r,n,s,l,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Lr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(o):t(o)}function l(o){return t(o)}}function aW(n,e,t){return r;function r(s){return n.enter("reference"),n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),i}function i(s){return s===93?(n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),n.exit("reference"),e):t(s)}}const uW={name:"labelStartImage",resolveAll:Qx.resolveAll,tokenize:cW};function cW(n,e,t){const r=this;return i;function i(o){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(o),n.exit("labelImageMarker"),s}function s(o){return o===91?(n.enter("labelMarker"),n.consume(o),n.exit("labelMarker"),n.exit("labelImage"),l):t(o)}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):e(o)}}const hW={name:"labelStartLink",resolveAll:Qx.resolveAll,tokenize:fW};function fW(n,e,t){const r=this;return i;function i(l){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):e(l)}}const eO={name:"lineEnding",tokenize:dW};function dW(n,e){return t;function t(r){return n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),Ue(n,e,"linePrefix")}}const Bf={name:"thematicBreak",tokenize:pW};function pW(n,e,t){let r=0,i;return s;function s(h){return n.enter("thematicBreak"),l(h)}function l(h){return i=h,o(h)}function o(h){return h===i?(n.enter("thematicBreakSequence"),u(h)):r>=3&&(h===null||Ee(h))?(n.exit("thematicBreak"),e(h)):t(h)}function u(h){return h===i?(n.consume(h),r++,u):(n.exit("thematicBreakSequence"),We(h)?Ue(n,o,"whitespace")(h):o(h))}}const $n={continuation:{tokenize:yW},exit:kW,name:"list",tokenize:OW},mW={partial:!0,tokenize:vW},gW={partial:!0,tokenize:xW};function OW(n,e,t){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return o;function o(O){const k=r.containerState.type||(O===42||O===43||O===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||O===r.containerState.marker:Yy(O)){if(r.containerState.type||(r.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),O===42||O===45?n.check(Bf,t,h)(O):h(O);if(!r.interrupt||O===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),u(O)}return t(O)}function u(O){return Yy(O)&&++l<10?(n.consume(O),u):(!r.interrupt||l<2)&&(r.containerState.marker?O===r.containerState.marker:O===41||O===46)?(n.exit("listItemValue"),h(O)):t(O)}function h(O){return n.enter("listItemMarker"),n.consume(O),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||O,n.check(_c,r.interrupt?t:f,n.attempt(mW,m,p))}function f(O){return r.containerState.initialBlankLine=!0,s++,m(O)}function p(O){return We(O)?(n.enter("listItemPrefixWhitespace"),n.consume(O),n.exit("listItemPrefixWhitespace"),m):t(O)}function m(O){return r.containerState.size=s+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(O)}}function yW(n,e,t){const r=this;return r.containerState._closeFlow=void 0,n.check(_c,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ue(n,e,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!We(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(gW,e,l)(o))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ue(n,n.attempt($n,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function xW(n,e,t){const r=this;return Ue(n,i,"listItemIndent",r.containerState.size+1);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?e(s):t(s)}}function kW(n){n.exit(this.containerState.type)}function vW(n,e,t){const r=this;return Ue(n,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const l=r.events[r.events.length-1];return!We(s)&&l&&l[1].type==="listItemPrefixWhitespace"?e(s):t(s)}}const iP={name:"setextUnderline",resolveTo:bW,tokenize:wW};function bW(n,e){let t=n.length,r,i,s;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){r=t;break}n[t][1].type==="paragraph"&&(i=t)}else n[t][1].type==="content"&&n.splice(t,1),!s&&n[t][1].type==="definition"&&(s=t);const l={type:"setextHeading",start:{...n[r][1].start},end:{...n[n.length-1][1].end}};return n[i][1].type="setextHeadingText",s?(n.splice(i,0,["enter",l,e]),n.splice(s+1,0,["exit",n[r][1],e]),n[r][1].end={...n[s][1].end}):n[r][1]=l,n.push(["exit",l,e]),n}function wW(n,e,t){const r=this;let i;return s;function s(h){let f=r.events.length,p;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){p=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(n.enter("setextHeadingLine"),i=h,l(h)):t(h)}function l(h){return n.enter("setextHeadingLineSequence"),o(h)}function o(h){return h===i?(n.consume(h),o):(n.exit("setextHeadingLineSequence"),We(h)?Ue(n,u,"lineSuffix")(h):u(h))}function u(h){return h===null||Ee(h)?(n.exit("setextHeadingLine"),e(h)):t(h)}}const SW={tokenize:PW};function PW(n){const e=this,t=n.attempt(_c,r,n.attempt(this.parser.constructs.flowInitial,i,Ue(n,n.attempt(this.parser.constructs.flow,i,n.attempt(j7,i)),"linePrefix")));return t;function r(s){if(s===null){n.consume(s);return}return n.enter("lineEndingBlank"),n.consume(s),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function i(s){if(s===null){n.consume(s);return}return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const CW={resolveAll:vj()},QW=kj("string"),$W=kj("text");function kj(n){return{resolveAll:vj(n==="text"?TW:void 0),tokenize:e};function e(t){const r=this,i=this.parser.constructs[n],s=t.attempt(i,l,o);return l;function l(f){return h(f)?s(f):o(f)}function o(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),u}function u(f){return h(f)?(t.exit("data"),s(f)):(t.consume(f),u)}function h(f){if(f===null)return!0;const p=i[f];let m=-1;if(p)for(;++m<p.length;){const O=p[m];if(!O.previous||O.previous.call(r,r.previous))return!0}return!1}}}function vj(n){return e;function e(t,r){let i=-1,s;for(;++i<=t.length;)s===void 0?t[i]&&t[i][1].type==="data"&&(s=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),i=s+2),s=void 0);return n?n(t,r):t}}function TW(n,e){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const r=n[t-1][1],i=e.sliceStream(r);let s=i.length,l=-1,o=0,u;for(;s--;){const h=i[s];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)o++,l--;if(l)break;l=-1}else if(h===-2)u=!0,o++;else if(h!==-1){s++;break}}if(e._contentTypeTextTrailing&&t===n.length&&(o=0),o){const h={type:t===n.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:r.start._bufferIndex+l,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(n.splice(t,0,["enter",h,e],["exit",h,e]),t+=2)}t++}return n}const jW={42:$n,43:$n,45:$n,48:$n,49:$n,50:$n,51:$n,52:$n,53:$n,54:$n,55:$n,56:$n,57:$n,62:dj},EW={91:N7},MW={[-2]:Jg,[-1]:Jg,32:Jg},AW={35:Z7,42:Bf,45:[iP,Bf],60:V7,61:iP,95:Bf,96:nP,126:nP},RW={38:mj,92:pj},NW={[-5]:eO,[-4]:eO,[-3]:eO,33:uW,38:mj,42:Uy,60:[h7,K7],91:hW,92:[I7,pj],93:Qx,95:Uy,96:S7},LW={null:[Uy,CW]},_W={null:[42,95]},DW={null:[]},IW=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_W,contentInitial:EW,disable:DW,document:jW,flow:AW,flowInitial:MW,insideSpan:LW,string:RW,text:NW},Symbol.toStringTag,{value:"Module"}));function zW(n,e,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},s=[];let l=[],o=[];const u={attempt:Z(I),check:Z(j),consume:C,enter:Q,exit:R,interrupt:Z(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:b,events:[],now:k,parser:n,previous:null,sliceSerialize:m,sliceStream:O,write:p};let f=e.tokenize.call(h,u);return e.resolveAll&&s.push(e),h;function p(V){return l=mr(l,V),w(),l[l.length-1]!==null?[]:(q(e,0),h.events=sp(s,h.events,h),h.events)}function m(V,F){return XW(O(V),F)}function O(V){return ZW(l,V)}function k(){const{_bufferIndex:V,_index:F,line:H,column:ee,offset:Y}=r;return{_bufferIndex:V,_index:F,line:H,column:ee,offset:Y}}function b(V){i[V.line]=V.column,_()}function w(){let V;for(;r._index<l.length;){const F=l[r._index];if(typeof F=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<F.length;)S(F.charCodeAt(r._bufferIndex));else S(F)}}function S(V){f=f(V)}function C(V){Ee(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,_()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=V}function Q(V,F){const H=F||{};return H.type=V,H.start=k(),h.events.push(["enter",H,h]),o.push(H),H}function R(V){const F=o.pop();return F.end=k(),h.events.push(["exit",F,h]),F}function I(V,F){q(V,F.from)}function j(V,F){F.restore()}function Z(V,F){return H;function H(ee,Y,me){let ye,te,ae,$;return Array.isArray(ee)?G(ee):"tokenize"in ee?G([ee]):D(ee);function D(Pe){return ze;function ze(_e){const De=_e!==null&&Pe[_e],dt=_e!==null&&Pe.null,Sr=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(dt)?dt:dt?[dt]:[]];return G(Sr)(_e)}}function G(Pe){return ye=Pe,te=0,Pe.length===0?me:E(Pe[te])}function E(Pe){return ze;function ze(_e){return $=J(),ae=Pe,Pe.partial||(h.currentConstruct=Pe),Pe.name&&h.parser.constructs.disable.null.includes(Pe.name)?$e():Pe.tokenize.call(F?Object.assign(Object.create(h),F):h,u,fe,$e)(_e)}}function fe(Pe){return V(ae,$),Y}function $e(Pe){return $.restore(),++te<ye.length?E(ye[te]):me}}}function q(V,F){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&nr(h.events,F,h.events.length-F,V.resolve(h.events.slice(F),h)),V.resolveTo&&(h.events=V.resolveTo(h.events,h))}function J(){const V=k(),F=h.previous,H=h.currentConstruct,ee=h.events.length,Y=Array.from(o);return{from:ee,restore:me};function me(){r=V,h.previous=F,h.currentConstruct=H,h.events.length=ee,o=Y,_()}}function _(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ZW(n,e){const t=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let l;if(t===i)l=[n[t].slice(r,s)];else{if(l=n.slice(t,i),r>-1){const o=l[0];typeof o=="string"?l[0]=o.slice(r):l.shift()}s>0&&l.push(n[i].slice(0,s))}return l}function XW(n,e){let t=-1;const r=[];let i;for(;++t<n.length;){const s=n[t];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
432
+ `;break}case-3:{l=`\r
433
+ `;break}case-2:{l=e?" ":" ";break}case-1:{if(!e&&i)continue;l=" ";break}default:l=String.fromCharCode(s)}i=s===-2,r.push(l)}return r.join("")}function BW(n){const r={constructs:hj([IW,...(n||{}).extensions||[]]),content:i(i7),defined:[],document:i(l7),flow:i(SW),lazy:{},string:i(QW),text:i($W)};return r;function i(s){return l;function l(o){return zW(r,s,o)}}}function WW(n){for(;!gj(n););return n}const sP=/[\0\t\n\r]/g;function VW(){let n=1,e="",t=!0,r;return i;function i(s,l,o){const u=[];let h,f,p,m,O;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),p=0,e="",t&&(s.charCodeAt(0)===65279&&p++,t=void 0);p<s.length;){if(sP.lastIndex=p,h=sP.exec(s),m=h&&h.index!==void 0?h.index:s.length,O=s.charCodeAt(m),!h){e=s.slice(p);break}if(O===10&&p===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),p<m&&(u.push(s.slice(p,m)),n+=m-p),O){case 0:{u.push(65533),n++;break}case 9:{for(f=Math.ceil(n/4)*4,u.push(-2);n++<f;)u.push(-1);break}case 10:{u.push(-4),n=1;break}default:r=!0,n=1}p=m+1}return o&&(r&&u.push(-5),e&&u.push(e),u.push(null)),u}}const qW=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function FW(n){return n.replace(qW,YW)}function YW(n,e,t){if(e)return e;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),s=i===120||i===88;return fj(t.slice(s?2:1),s?16:10)}return Cx(t)||n}const bj={}.hasOwnProperty;function UW(n,e,t){return e&&typeof e=="object"&&(t=e,e=void 0),GW(t)(WW(BW(t).document().write(VW()(n,e,!0))))}function GW(n){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Vl),autolinkProtocol:J,autolinkEmail:J,atxHeading:s(en),blockQuote:s(dt),characterEscape:J,characterReference:J,codeFenced:s(Sr),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(Sr,l),codeText:s(Wl,l),codeTextData:J,data:J,codeFlowValue:J,definition:s(qi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Pr),hardBreakEscape:s(zn),hardBreakTrailing:s(zn),htmlFlow:s(vn,l),htmlFlowData:J,htmlText:s(vn,l),htmlTextData:J,image:s(Fi),label:l,link:s(Vl),listItem:s(Ui),listItemValue:m,listOrdered:s(Yi,p),listUnordered:s(Yi),paragraph:s(Ca),reference:E,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(en),strong:s(Ic),thematicBreak:s(Zc)},exit:{atxHeading:u(),atxHeadingSequence:I,autolink:u(),autolinkEmail:De,autolinkProtocol:_e,blockQuote:u(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:$e,characterReferenceMarkerNumeric:$e,characterReferenceValue:Pe,characterReference:ze,codeFenced:u(w),codeFencedFence:b,codeFencedFenceInfo:O,codeFencedFenceMeta:k,codeFlowValue:_,codeIndented:u(S),codeText:u(Y),codeTextData:_,data:_,definition:u(),definitionDestinationString:R,definitionLabelString:C,definitionTitleString:Q,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(H),htmlFlowData:_,htmlText:u(ee),htmlTextData:_,image:u(ye),label:ae,labelText:te,lineEnding:V,link:u(me),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:fe,resourceDestinationString:$,resourceTitleString:D,resource:G,setextHeading:u(q),setextHeadingLineSequence:Z,setextHeadingText:j,strong:u(),thematicBreak:u()}};wj(e,(n||{}).mdastExtensions||[]);const t={};return r;function r(K){let ue={type:"root",children:[]};const Me={stack:[ue],tokenStack:[],config:e,enter:o,exit:h,buffer:l,resume:f,data:t},Ze=[];let Ge=-1;for(;++Ge<K.length;)if(K[Ge][1].type==="listOrdered"||K[Ge][1].type==="listUnordered")if(K[Ge][0]==="enter")Ze.push(Ge);else{const Vt=Ze.pop();Ge=i(K,Vt,Ge)}for(Ge=-1;++Ge<K.length;){const Vt=e[K[Ge][0]];bj.call(Vt,K[Ge][1].type)&&Vt[K[Ge][1].type].call(Object.assign({sliceSerialize:K[Ge][2].sliceSerialize},Me),K[Ge][1])}if(Me.tokenStack.length>0){const Vt=Me.tokenStack[Me.tokenStack.length-1];(Vt[1]||lP).call(Me,void 0,Vt[0])}for(ue.position={start:Os(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:Os(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<e.transforms.length;)ue=e.transforms[Ge](ue)||ue;return ue}function i(K,ue,Me){let Ze=ue-1,Ge=-1,Vt=!1,yi,lr,Gi,Ys;for(;++Ze<=Me;){const qt=K[Ze];switch(qt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qt[0]==="enter"?Ge++:Ge--,Ys=void 0;break}case"lineEndingBlank":{qt[0]==="enter"&&(yi&&!Ys&&!Ge&&!Gi&&(Gi=Ze),Ys=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ys=void 0}if(!Ge&&qt[0]==="enter"&&qt[1].type==="listItemPrefix"||Ge===-1&&qt[0]==="exit"&&(qt[1].type==="listUnordered"||qt[1].type==="listOrdered")){if(yi){let Br=Ze;for(lr=void 0;Br--;){const Zn=K[Br];if(Zn[1].type==="lineEnding"||Zn[1].type==="lineEndingBlank"){if(Zn[0]==="exit")continue;lr&&(K[lr][1].type="lineEndingBlank",Vt=!0),Zn[1].type="lineEnding",lr=Br}else if(!(Zn[1].type==="linePrefix"||Zn[1].type==="blockQuotePrefix"||Zn[1].type==="blockQuotePrefixWhitespace"||Zn[1].type==="blockQuoteMarker"||Zn[1].type==="listItemIndent"))break}Gi&&(!lr||Gi<lr)&&(yi._spread=!0),yi.end=Object.assign({},lr?K[lr][1].start:qt[1].end),K.splice(lr||Ze,0,["exit",yi,qt[2]]),Ze++,Me++}if(qt[1].type==="listItemPrefix"){const Br={type:"listItem",_spread:!1,start:Object.assign({},qt[1].start),end:void 0};yi=Br,K.splice(Ze,0,["enter",Br,qt[2]]),Ze++,Me++,Gi=void 0,Ys=!0}}}return K[ue][1]._spread=Vt,Me}function s(K,ue){return Me;function Me(Ze){o.call(this,K(Ze),Ze),ue&&ue.call(this,Ze)}}function l(){this.stack.push({type:"fragment",children:[]})}function o(K,ue,Me){this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([ue,Me||void 0]),K.position={start:Os(ue.start),end:void 0}}function u(K){return ue;function ue(Me){K&&K.call(this,Me),h.call(this,Me)}}function h(K,ue){const Me=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==K.type&&(ue?ue.call(this,K,Ze[0]):(Ze[1]||lP).call(this,K,Ze[0]));else throw new Error("Cannot close `"+K.type+"` ("+Iu({start:K.start,end:K.end})+"): it’s not open");Me.position.end=Os(K.end)}function f(){return Px(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(K){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(K),10),this.data.expectingFirstListItemValue=void 0}}function O(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=K}function k(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=K}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K.replace(/(\r?\n|\r)$/g,"")}function C(K){const ue=this.resume(),Me=this.stack[this.stack.length-1];Me.label=ue,Me.identifier=Lr(this.sliceSerialize(K)).toLowerCase()}function Q(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.title=K}function R(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.url=K}function I(K){const ue=this.stack[this.stack.length-1];if(!ue.depth){const Me=this.sliceSerialize(K).length;ue.depth=Me}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function Z(K){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(K).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function J(K){const Me=this.stack[this.stack.length-1].children;let Ze=Me[Me.length-1];(!Ze||Ze.type!=="text")&&(Ze=zc(),Ze.position={start:Os(K.start),end:void 0},Me.push(Ze)),this.stack.push(Ze)}function _(K){const ue=this.stack.pop();ue.value+=this.sliceSerialize(K),ue.position.end=Os(K.end)}function V(K){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=ue.children[ue.children.length-1];Me.position.end=Os(K.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(ue.type)&&(J.call(this,K),_.call(this,K))}function F(){this.data.atHardBreak=!0}function H(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function ee(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function Y(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function me(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ue,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function ye(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ue,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function te(K){const ue=this.sliceSerialize(K),Me=this.stack[this.stack.length-2];Me.label=FW(ue),Me.identifier=Lr(ue).toLowerCase()}function ae(){const K=this.stack[this.stack.length-1],ue=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const Ze=K.children;Me.children=Ze}else Me.alt=ue}function $(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.url=K}function D(){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.title=K}function G(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function fe(K){const ue=this.resume(),Me=this.stack[this.stack.length-1];Me.label=ue,Me.identifier=Lr(this.sliceSerialize(K)).toLowerCase(),this.data.referenceType="full"}function $e(K){this.data.characterReferenceType=K.type}function Pe(K){const ue=this.sliceSerialize(K),Me=this.data.characterReferenceType;let Ze;Me?(Ze=fj(ue,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=Cx(ue);const Ge=this.stack[this.stack.length-1];Ge.value+=Ze}function ze(K){const ue=this.stack.pop();ue.position.end=Os(K.end)}function _e(K){_.call(this,K);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(K)}function De(K){_.call(this,K);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(K)}function dt(){return{type:"blockquote",children:[]}}function Sr(){return{type:"code",lang:null,meta:null,value:""}}function Wl(){return{type:"inlineCode",value:""}}function qi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pr(){return{type:"emphasis",children:[]}}function en(){return{type:"heading",depth:0,children:[]}}function zn(){return{type:"break"}}function vn(){return{type:"html",value:""}}function Fi(){return{type:"image",title:null,url:"",alt:null}}function Vl(){return{type:"link",title:null,url:"",children:[]}}function Yi(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function Ui(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function Ca(){return{type:"paragraph",children:[]}}function Ic(){return{type:"strong",children:[]}}function zc(){return{type:"text",value:""}}function Zc(){return{type:"thematicBreak"}}}function Os(n){return{line:n.line,column:n.column,offset:n.offset}}function wj(n,e){let t=-1;for(;++t<e.length;){const r=e[t];Array.isArray(r)?wj(n,r):HW(n,r)}}function HW(n,e){let t;for(t in e)if(bj.call(e,t))switch(t){case"canContainEols":{const r=e[t];r&&n[t].push(...r);break}case"transforms":{const r=e[t];r&&n[t].push(...r);break}case"enter":case"exit":{const r=e[t];r&&Object.assign(n[t],r);break}}}function lP(n,e){throw n?new Error("Cannot close `"+n.type+"` ("+Iu({start:n.start,end:n.end})+"): a different token (`"+e.type+"`, "+Iu({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Iu({start:e.start,end:e.end})+") is still open")}function KW(n){const e=this;e.parser=t;function t(r){return UW(r,{...e.data("settings"),...n,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function JW(n,e){const t={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(e),!0)};return n.patch(e,t),n.applyData(e,t)}function e9(n,e){const t={type:"element",tagName:"br",properties:{},children:[]};return n.patch(e,t),[n.applyData(e,t),{type:"text",value:`
434
+ `}]}function t9(n,e){const t=e.value?e.value+`
435
+ `:"",r={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return e.meta&&(s.data={meta:e.meta}),n.patch(e,s),s=n.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},n.patch(e,s),s}function n9(n,e){const t={type:"element",tagName:"del",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function r9(n,e){const t={type:"element",tagName:"em",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function i9(n,e){const t=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),i=ba(r.toLowerCase()),s=n.footnoteOrder.indexOf(r);let l,o=n.footnoteCounts.get(r);o===void 0?(o=0,n.footnoteOrder.push(r),l=n.footnoteOrder.length):l=s+1,o+=1,n.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};n.patch(e,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return n.patch(e,h),n.applyData(e,h)}function s9(n,e){const t={type:"element",tagName:"h"+e.depth,properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function l9(n,e){if(n.options.allowDangerousHtml){const t={type:"raw",value:e.value};return n.patch(e,t),n.applyData(e,t)}}function Sj(n,e){const t=e.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=n.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function o9(n,e){const t=String(e.identifier).toUpperCase(),r=n.definitionById.get(t);if(!r)return Sj(n,e);const i={src:ba(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return n.patch(e,s),n.applyData(e,s)}function a9(n,e){const t={src:ba(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);const r={type:"element",tagName:"img",properties:t,children:[]};return n.patch(e,r),n.applyData(e,r)}function u9(n,e){const t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};n.patch(e,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return n.patch(e,r),n.applyData(e,r)}function c9(n,e){const t=String(e.identifier).toUpperCase(),r=n.definitionById.get(t);if(!r)return Sj(n,e);const i={href:ba(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:n.all(e)};return n.patch(e,s),n.applyData(e,s)}function h9(n,e){const t={href:ba(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);const r={type:"element",tagName:"a",properties:t,children:n.all(e)};return n.patch(e,r),n.applyData(e,r)}function f9(n,e,t){const r=n.all(e),i=t?d9(t):Pj(e),s={},l=[];if(typeof e.checked=="boolean"){const f=r[0];let p;f&&f.type==="element"&&f.tagName==="p"?p=f:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const f=r[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
436
+ `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
437
+ `});const h={type:"element",tagName:"li",properties:s,children:l};return n.patch(e,h),n.applyData(e,h)}function d9(n){let e=!1;if(n.type==="list"){e=n.spread||!1;const t=n.children;let r=-1;for(;!e&&++r<t.length;)e=Pj(t[r])}return e}function Pj(n){const e=n.spread;return e??n.children.length>1}function p9(n,e){const t={},r=n.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:t,children:n.wrap(r,!0)};return n.patch(e,s),n.applyData(e,s)}function m9(n,e){const t={type:"element",tagName:"p",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function g9(n,e){const t={type:"root",children:n.wrap(n.all(e))};return n.patch(e,t),n.applyData(e,t)}function O9(n,e){const t={type:"element",tagName:"strong",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function y9(n,e){const t=n.all(e),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:n.wrap([r],!0)};n.patch(e.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:n.wrap(t,!0)},o=vx(e.children[1]),u=ij(e.children[e.children.length-1]);o&&u&&(l.position={start:o,end:u}),i.push(l)}const s={type:"element",tagName:"table",properties:{},children:n.wrap(i,!0)};return n.patch(e,s),n.applyData(e,s)}function x9(n,e,t){const r=t?t.children:void 0,s=(r?r.indexOf(e):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,o=l?l.length:e.children.length;let u=-1;const h=[];for(;++u<o;){const p=e.children[u],m={},O=l?l[u]:void 0;O&&(m.align=O);let k={type:"element",tagName:s,properties:m,children:[]};p&&(k.children=n.all(p),n.patch(p,k),k=n.applyData(p,k)),h.push(k)}const f={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(e,f),n.applyData(e,f)}function k9(n,e){const t={type:"element",tagName:"td",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}const oP=9,aP=32;function v9(n){const e=String(n),t=/\r?\n|\r/g;let r=t.exec(e),i=0;const s=[];for(;r;)s.push(uP(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(e);return s.push(uP(e.slice(i),i>0,!1)),s.join("")}function uP(n,e,t){let r=0,i=n.length;if(e){let s=n.codePointAt(r);for(;s===oP||s===aP;)r++,s=n.codePointAt(r)}if(t){let s=n.codePointAt(i-1);for(;s===oP||s===aP;)i--,s=n.codePointAt(i-1)}return i>r?n.slice(r,i):""}function b9(n,e){const t={type:"text",value:v9(String(e.value))};return n.patch(e,t),n.applyData(e,t)}function w9(n,e){const t={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(e,t),n.applyData(e,t)}const S9={blockquote:JW,break:e9,code:t9,delete:n9,emphasis:r9,footnoteReference:i9,heading:s9,html:l9,imageReference:o9,image:a9,inlineCode:u9,linkReference:c9,link:h9,listItem:f9,list:p9,paragraph:m9,root:g9,strong:O9,table:y9,tableCell:k9,tableRow:x9,text:b9,thematicBreak:w9,toml:Sf,yaml:Sf,definition:Sf,footnoteDefinition:Sf};function Sf(){}const Cj=-1,lp=0,Zu=1,Ed=2,$x=3,Tx=4,jx=5,Ex=6,Qj=7,$j=8,P9=typeof self=="object"?self:globalThis,cP=(n,e)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new P9[n](e)},C9=(n,e)=>{const t=(i,s)=>(n.set(s,i),i),r=i=>{if(n.has(i))return n.get(i);const[s,l]=e[i];switch(s){case lp:case Cj:return t(l,i);case Zu:{const o=t([],i);for(const u of l)o.push(r(u));return o}case Ed:{const o=t({},i);for(const[u,h]of l)o[r(u)]=r(h);return o}case $x:return t(new Date(l),i);case Tx:{const{source:o,flags:u}=l;return t(new RegExp(o,u),i)}case jx:{const o=t(new Map,i);for(const[u,h]of l)o.set(r(u),r(h));return o}case Ex:{const o=t(new Set,i);for(const u of l)o.add(r(u));return o}case Qj:{const{name:o,message:u}=l;return t(cP(o,u),i)}case $j:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:o}=new Uint8Array(l);return t(new DataView(o),l)}}return t(cP(s,l),i)};return r},hP=n=>C9(new Map,n)(0),yo="",{toString:Q9}={},{keys:$9}=Object,vu=n=>{const e=typeof n;if(e!=="object"||!n)return[lp,e];const t=Q9.call(n).slice(8,-1);switch(t){case"Array":return[Zu,yo];case"Object":return[Ed,yo];case"Date":return[$x,yo];case"RegExp":return[Tx,yo];case"Map":return[jx,yo];case"Set":return[Ex,yo];case"DataView":return[Zu,t]}return t.includes("Array")?[Zu,t]:t.includes("Error")?[Qj,t]:[Ed,t]},Pf=([n,e])=>n===lp&&(e==="function"||e==="symbol"),T9=(n,e,t,r)=>{const i=(l,o)=>{const u=r.push(l)-1;return t.set(o,u),u},s=l=>{if(t.has(l))return t.get(l);let[o,u]=vu(l);switch(o){case lp:{let f=l;switch(u){case"bigint":o=$j,f=l.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Cj],l)}return i([o,f],l)}case Zu:{if(u){let m=l;return u==="DataView"?m=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(l)),i([u,[...m]],l)}const f=[],p=i([o,f],l);for(const m of l)f.push(s(m));return p}case Ed:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(e&&"toJSON"in l)return s(l.toJSON());const f=[],p=i([o,f],l);for(const m of $9(l))(n||!Pf(vu(l[m])))&&f.push([s(m),s(l[m])]);return p}case $x:return i([o,l.toISOString()],l);case Tx:{const{source:f,flags:p}=l;return i([o,{source:f,flags:p}],l)}case jx:{const f=[],p=i([o,f],l);for(const[m,O]of l)(n||!(Pf(vu(m))||Pf(vu(O))))&&f.push([s(m),s(O)]);return p}case Ex:{const f=[],p=i([o,f],l);for(const m of l)(n||!Pf(vu(m)))&&f.push(s(m));return p}}const{message:h}=l;return i([o,{name:u,message:h}],l)};return s},fP=(n,{json:e,lossy:t}={})=>{const r=[];return T9(!(e||t),!!e,new Map,r)(n),r},Md=typeof structuredClone=="function"?(n,e)=>e&&("json"in e||"lossy"in e)?hP(fP(n,e)):structuredClone(n):(n,e)=>hP(fP(n,e));function j9(n,e){const t=[{type:"text",value:"↩"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function E9(n,e){return"Back to reference "+(n+1)+(e>1?"-"+e:"")}function M9(n){const e=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",t=n.options.footnoteBackContent||j9,r=n.options.footnoteBackLabel||E9,i=n.options.footnoteLabel||"Footnotes",s=n.options.footnoteLabelTagName||"h2",l=n.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[u]);if(!h)continue;const f=n.all(h),p=String(h.identifier).toUpperCase(),m=ba(p.toLowerCase());let O=0;const k=[],b=n.footnoteCounts.get(p);for(;b!==void 0&&++O<=b;){k.length>0&&k.push({type:"text",value:" "});let C=typeof t=="string"?t:t(u,O);typeof C=="string"&&(C={type:"text",value:C}),k.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+m+(O>1?"-"+O:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,O),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const C=w.children[w.children.length-1];C&&C.type==="text"?C.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...k)}else f.push(...k);const S={type:"element",tagName:"li",properties:{id:e+"fn-"+m},children:n.wrap(f,!0)};n.patch(h,S),o.push(S)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Md(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
438
+ `},{type:"element",tagName:"ol",properties:{},children:n.wrap(o,!0)},{type:"text",value:`
439
+ `}]}}const op=(function(n){if(n==null)return L9;if(typeof n=="function")return ap(n);if(typeof n=="object")return Array.isArray(n)?A9(n):R9(n);if(typeof n=="string")return N9(n);throw new Error("Expected function, string, or object as test")});function A9(n){const e=[];let t=-1;for(;++t<n.length;)e[t]=op(n[t]);return ap(r);function r(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}function R9(n){const e=n;return ap(t);function t(r){const i=r;let s;for(s in n)if(i[s]!==e[s])return!1;return!0}}function N9(n){return ap(e);function e(t){return t&&t.type===n}}function ap(n){return e;function e(t,r,i){return!!(_9(t)&&n.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function L9(){return!0}function _9(n){return n!==null&&typeof n=="object"&&"type"in n}const Tj=[],D9=!0,Gy=!1,I9="skip";function jj(n,e,t,r){let i;typeof e=="function"&&typeof t!="function"?(r=t,t=e):i=e;const s=op(i),l=r?-1:1;o(n,void 0,[])();function o(u,h,f){const p=u&&typeof u=="object"?u:{};if(typeof p.type=="string"){const O=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(O?"<"+O+">":""))+")"})}return m;function m(){let O=Tj,k,b,w;if((!e||s(u,h,f[f.length-1]||void 0))&&(O=z9(t(u,f)),O[0]===Gy))return O;if("children"in u&&u.children){const S=u;if(S.children&&O[0]!==I9)for(b=(r?S.children.length:-1)+l,w=f.concat(S);b>-1&&b<S.children.length;){const C=S.children[b];if(k=o(C,b,w)(),k[0]===Gy)return k;b=typeof k[1]=="number"?k[1]:b+l}}return O}}}function z9(n){return Array.isArray(n)?n:typeof n=="number"?[D9,n]:n==null?Tj:[n]}function Mx(n,e,t,r){let i,s,l;typeof e=="function"&&typeof t!="function"?(s=void 0,l=e,i=t):(s=e,l=t,i=r),jj(n,s,o,i);function o(u,h){const f=h[h.length-1],p=f?f.children.indexOf(u):void 0;return l(u,p,f)}}const Hy={}.hasOwnProperty,Z9={};function X9(n,e){const t=e||Z9,r=new Map,i=new Map,s=new Map,l={...S9,...t.handlers},o={all:h,applyData:W9,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:l,one:u,options:t,patch:B9,wrap:q9};return Mx(n,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const p=f.type==="definition"?r:i,m=String(f.identifier).toUpperCase();p.has(m)||p.set(m,f)}}),o;function u(f,p){const m=f.type,O=o.handlers[m];if(Hy.call(o.handlers,m)&&O)return O(o,f,p);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in f){const{children:b,...w}=f,S=Md(w);return S.children=o.all(f),S}return Md(f)}return(o.options.unknownHandler||V9)(o,f,p)}function h(f){const p=[];if("children"in f){const m=f.children;let O=-1;for(;++O<m.length;){const k=o.one(m[O],f);if(k){if(O&&m[O-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=dP(k.value)),!Array.isArray(k)&&k.type==="element")){const b=k.children[0];b&&b.type==="text"&&(b.value=dP(b.value))}Array.isArray(k)?p.push(...k):p.push(k)}}}return p}}function B9(n,e){n.position&&(e.position=j6(n))}function W9(n,e){let t=e;if(n&&n.data){const r=n.data.hName,i=n.data.hChildren,s=n.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&s&&Object.assign(t.properties,Md(s)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function V9(n,e){const t=e.data||{},r="value"in e&&!(Hy.call(t,"hProperties")||Hy.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:n.all(e)};return n.patch(e,r),n.applyData(e,r)}function q9(n,e){const t=[];let r=-1;for(e&&t.push({type:"text",value:`
440
+ `});++r<n.length;)r&&t.push({type:"text",value:`
441
+ `}),t.push(n[r]);return e&&n.length>0&&t.push({type:"text",value:`
442
+ `}),t}function dP(n){let e=0,t=n.charCodeAt(e);for(;t===9||t===32;)e++,t=n.charCodeAt(e);return n.slice(e)}function pP(n,e){const t=X9(n,e),r=t.one(n,void 0),i=M9(t),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
443
+ `},i),s}function F9(n,e){return n&&"run"in n?async function(t,r){const i=pP(t,{file:r,...e});await n.run(i,r)}:function(t,r){return pP(t,{file:r,...n||e})}}function mP(n){if(n)throw n}var tO,gP;function Y9(){if(gP)return tO;gP=1;var n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):e.call(h)==="[object Array]"},s=function(h){if(!h||e.call(h)!=="[object Object]")return!1;var f=n.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!f&&!p)return!1;var m;for(m in h);return typeof m>"u"||n.call(h,m)},l=function(h,f){t&&f.name==="__proto__"?t(h,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):h[f.name]=f.newValue},o=function(h,f){if(f==="__proto__")if(n.call(h,f)){if(r)return r(h,f).value}else return;return h[f]};return tO=function u(){var h,f,p,m,O,k,b=arguments[0],w=1,S=arguments.length,C=!1;for(typeof b=="boolean"&&(C=b,b=arguments[1]||{},w=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});w<S;++w)if(h=arguments[w],h!=null)for(f in h)p=o(b,f),m=o(h,f),b!==m&&(C&&m&&(s(m)||(O=i(m)))?(O?(O=!1,k=p&&i(p)?p:[]):k=p&&s(p)?p:{},l(b,{name:f,newValue:u(C,k,m)})):typeof m<"u"&&l(b,{name:f,newValue:m}));return b},tO}var U9=Y9();const nO=Ld(U9);function Ky(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function G9(){const n=[],e={run:t,use:r};return e;function t(...i){let s=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);o(null,...i);function o(u,...h){const f=n[++s];let p=-1;if(u){l(u);return}for(;++p<i.length;)(h[p]===null||h[p]===void 0)&&(h[p]=i[p]);i=h,f?H9(f,o)(...h):l(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return n.push(i),e}}function H9(n,e){let t;return r;function r(...l){const o=n.length>l.length;let u;o&&l.push(i);try{u=n.apply(this,l)}catch(h){const f=h;if(o&&t)throw f;return i(f)}o||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(l,...o){t||(t=!0,e(l,...o))}function s(l){i(null,l)}}const Jr={basename:K9,dirname:J9,extname:eV,join:tV,sep:"/"};function K9(n,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Dc(n);let t=0,r=-1,i=n.length,s;if(e===void 0||e.length===0||e.length>n.length){for(;i--;)if(n.codePointAt(i)===47){if(s){t=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":n.slice(t,r)}if(e===n)return"";let l=-1,o=e.length-1;for(;i--;)if(n.codePointAt(i)===47){if(s){t=i+1;break}}else l<0&&(s=!0,l=i+1),o>-1&&(n.codePointAt(i)===e.codePointAt(o--)?o<0&&(r=i):(o=-1,r=l));return t===r?r=l:r<0&&(r=n.length),n.slice(t,r)}function J9(n){if(Dc(n),n.length===0)return".";let e=-1,t=n.length,r;for(;--t;)if(n.codePointAt(t)===47){if(r){e=t;break}}else r||(r=!0);return e<0?n.codePointAt(0)===47?"/":".":e===1&&n.codePointAt(0)===47?"//":n.slice(0,e)}function eV(n){Dc(n);let e=n.length,t=-1,r=0,i=-1,s=0,l;for(;e--;){const o=n.codePointAt(e);if(o===47){if(l){r=e+1;break}continue}t<0&&(l=!0,t=e+1),o===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||t<0||s===0||s===1&&i===t-1&&i===r+1?"":n.slice(i,t)}function tV(...n){let e=-1,t;for(;++e<n.length;)Dc(n[e]),n[e]&&(t=t===void 0?n[e]:t+"/"+n[e]);return t===void 0?".":nV(t)}function nV(n){Dc(n);const e=n.codePointAt(0)===47;let t=rV(n,!e);return t.length===0&&!e&&(t="."),t.length>0&&n.codePointAt(n.length-1)===47&&(t+="/"),e?"/"+t:t}function rV(n,e){let t="",r=0,i=-1,s=0,l=-1,o,u;for(;++l<=n.length;){if(l<n.length)o=n.codePointAt(l);else{if(o===47)break;o=47}if(o===47){if(!(i===l-1||s===1))if(i!==l-1&&s===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=l,s=0;continue}}else if(t.length>0){t="",r=0,i=l,s=0;continue}}e&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+n.slice(i+1,l):t=n.slice(i+1,l),r=l-i-1;i=l,s=0}else o===46&&s>-1?s++:s=-1}return t}function Dc(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const iV={cwd:sV};function sV(){return"/"}function Jy(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function lV(n){if(typeof n=="string")n=new URL(n);else if(!Jy(n)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(n.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return oV(n)}function oV(n){if(n.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 e=n.pathname;let t=-1;for(;++t<e.length;)if(e.codePointAt(t)===37&&e.codePointAt(t+1)===50){const r=e.codePointAt(t+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(e)}const rO=["history","path","basename","stem","extname","dirname"];class Ej{constructor(e){let t;e?Jy(e)?t={path:e}:typeof e=="string"||aV(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":iV.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<rO.length;){const s=rO[r];s in t&&t[s]!==void 0&&t[s]!==null&&(this[s]=s==="history"?[...t[s]]:t[s])}let i;for(i in t)rO.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?Jr.basename(this.path):void 0}set basename(e){sO(e,"basename"),iO(e,"basename"),this.path=Jr.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Jr.dirname(this.path):void 0}set dirname(e){OP(this.basename,"dirname"),this.path=Jr.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Jr.extname(this.path):void 0}set extname(e){if(iO(e,"extname"),OP(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Jr.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Jy(e)&&(e=lV(e)),sO(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Jr.basename(this.path,this.extname):void 0}set stem(e){sO(e,"stem"),iO(e,"stem"),this.path=Jr.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const i=this.message(e,t,r);throw i.fatal=!0,i}info(e,t,r){const i=this.message(e,t,r);return i.fatal=void 0,i}message(e,t,r){const i=new dn(e,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function iO(n,e){if(n&&n.includes(Jr.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Jr.sep+"`")}function sO(n,e){if(!n)throw new Error("`"+e+"` cannot be empty")}function OP(n,e){if(!n)throw new Error("Setting `"+e+"` requires `path` to be set too")}function aV(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const uV=(function(n){const r=this.constructor.prototype,i=r[n],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),cV={}.hasOwnProperty;class Ax extends uV{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=G9()}copy(){const e=new Ax;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];e.use(...r)}return e.data(nO(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(aO("data",this.frozen),this.namespace[e]=t,this):cV.call(this.namespace,e)&&this.namespace[e]||void 0:e?(aO("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Cf(e),r=this.parser||this.Parser;return lO("parse",r),r(String(t),t)}process(e,t){const r=this;return this.freeze(),lO("process",this.parser||this.Parser),oO("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(s,l){const o=Cf(e),u=r.parse(o);r.run(u,o,function(f,p,m){if(f||!p||!m)return h(f);const O=p,k=r.stringify(O,m);dV(k)?m.value=k:m.result=k,h(f,m)});function h(f,p){f||!p?l(f):s?s(p):t(void 0,p)}}}processSync(e){let t=!1,r;return this.freeze(),lO("processSync",this.parser||this.Parser),oO("processSync",this.compiler||this.Compiler),this.process(e,i),xP("processSync","process",t),r;function i(s,l){t=!0,mP(s),r=l}}run(e,t,r){yP(e),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?s(void 0,r):new Promise(s);function s(l,o){const u=Cf(t);i.run(e,u,h);function h(f,p,m){const O=p||e;f?o(f):l?l(O):r(void 0,O,m)}}}runSync(e,t){let r=!1,i;return this.run(e,t,s),xP("runSync","run",r),i;function s(l,o){mP(l),i=o,r=!0}}stringify(e,t){this.freeze();const r=Cf(t),i=this.compiler||this.Compiler;return oO("stringify",i),yP(e),i(e,r)}use(e,...t){const r=this.attachers,i=this.namespace;if(aO("use",this.frozen),e!=null)if(typeof e=="function")u(e,t);else if(typeof e=="object")Array.isArray(e)?o(e):l(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[f,...p]=h;u(f,p)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(i.settings=nO(!0,i.settings,h.settings))}function o(h){let f=-1;if(h!=null)if(Array.isArray(h))for(;++f<h.length;){const p=h[f];s(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,f){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===h){m=p;break}if(m===-1)r.push([h,...f]);else if(f.length>0){let[O,...k]=f;const b=r[m][1];Ky(b)&&Ky(O)&&(O=nO(!0,b,O)),r[m]=[h,O,...k]}}}}const hV=new Ax().freeze();function lO(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function oO(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function aO(n,e){if(e)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yP(n){if(!Ky(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function xP(n,e,t){if(!t)throw new Error("`"+n+"` finished async. Use `"+e+"` instead")}function Cf(n){return fV(n)?n:new Ej(n)}function fV(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function dV(n){return typeof n=="string"||pV(n)}function pV(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const mV="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",kP=[],vP={allowDangerousHtml:!0},gV=/^(https?|ircs?|mailto|xmpp)$/i,OV=[{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 Mj(n){const e=yV(n),t=xV(n);return kV(e.runSync(e.parse(t),t),n)}function yV(n){const e=n.rehypePlugins||kP,t=n.remarkPlugins||kP,r=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...vP}:vP;return hV().use(KW).use(t).use(F9,r).use(e)}function xV(n){const e=n.children||"",t=new Ej;return typeof e=="string"&&(t.value=e),t}function kV(n,e){const t=e.allowedElements,r=e.allowElement,i=e.components,s=e.disallowedElements,l=e.skipHtml,o=e.unwrapDisallowed,u=e.urlTransform||vV;for(const f of OV)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+mV+f.id,void 0);return e.className&&(n={type:"element",tagName:"div",properties:{className:e.className},children:n.type==="root"?n.children:[n]}),Mx(n,h),N6(n,{Fragment:y.Fragment,components:i,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function h(f,p,m){if(f.type==="raw"&&m&&typeof p=="number")return l?m.children.splice(p,1):m.children[p]={type:"text",value:f.value},p;if(f.type==="element"){let O;for(O in Kg)if(Object.hasOwn(Kg,O)&&Object.hasOwn(f.properties,O)){const k=f.properties[O],b=Kg[O];(b===null||b.includes(f.tagName))&&(f.properties[O]=u(String(k||""),O,f))}}if(f.type==="element"){let O=t?!t.includes(f.tagName):s?s.includes(f.tagName):!1;if(!O&&r&&typeof p=="number"&&(O=!r(f,p,m)),O&&m&&typeof p=="number")return o&&f.children?m.children.splice(p,1,...f.children):m.children.splice(p,1),p}}}function vV(n){const e=n.indexOf(":"),t=n.indexOf("?"),r=n.indexOf("#"),i=n.indexOf("/");return e===-1||i!==-1&&e>i||t!==-1&&e>t||r!==-1&&e>r||gV.test(n.slice(0,e))?n:""}function bP(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(e);for(;i!==-1;)r++,i=t.indexOf(e,i+e.length);return r}function bV(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wV(n,e,t){const i=op((t||{}).ignore||[]),s=SV(e);let l=-1;for(;++l<s.length;)jj(n,"text",o);function o(h,f){let p=-1,m;for(;++p<f.length;){const O=f[p],k=m?m.children:void 0;if(i(O,k?k.indexOf(O):void 0,m))return;m=O}if(m)return u(h,f)}function u(h,f){const p=f[f.length-1],m=s[l][0],O=s[l][1];let k=0;const w=p.children.indexOf(h);let S=!1,C=[];m.lastIndex=0;let Q=m.exec(h.value);for(;Q;){const R=Q.index,I={index:Q.index,input:Q.input,stack:[...f,h]};let j=O(...Q,I);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?m.lastIndex=R+1:(k!==R&&C.push({type:"text",value:h.value.slice(k,R)}),Array.isArray(j)?C.push(...j):j&&C.push(j),k=R+Q[0].length,S=!0),!m.global)break;Q=m.exec(h.value)}return S?(k<h.value.length&&C.push({type:"text",value:h.value.slice(k)}),p.children.splice(w,1,...C)):C=[h],w+C.length}}function SV(n){const e=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!n[0]||Array.isArray(n[0])?n:[n];let r=-1;for(;++r<t.length;){const i=t[r];e.push([PV(i[0]),CV(i[1])])}return e}function PV(n){return typeof n=="string"?new RegExp(bV(n),"g"):n}function CV(n){return typeof n=="function"?n:function(){return n}}const uO="phrasing",cO=["autolink","link","image","label"];function QV(){return{transforms:[RV],enter:{literalAutolink:TV,literalAutolinkEmail:hO,literalAutolinkHttp:hO,literalAutolinkWww:hO},exit:{literalAutolink:AV,literalAutolinkEmail:MV,literalAutolinkHttp:jV,literalAutolinkWww:EV}}}function $V(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uO,notInConstruct:cO},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uO,notInConstruct:cO},{character:":",before:"[ps]",after:"\\/",inConstruct:uO,notInConstruct:cO}]}}function TV(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function hO(n){this.config.enter.autolinkProtocol.call(this,n)}function jV(n){this.config.exit.autolinkProtocol.call(this,n)}function EV(n){this.config.exit.data.call(this,n);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(n)}function MV(n){this.config.exit.autolinkEmail.call(this,n)}function AV(n){this.exit(n)}function RV(n){wV(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,NV],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),LV]],{ignore:["link","linkReference"]})}function NV(n,e,t,r,i){let s="";if(!Aj(i)||(/^w/i.test(e)&&(t=e+t,e="",s="http://"),!_V(t)))return!1;const l=DV(t+r);if(!l[0])return!1;const o={type:"link",title:null,url:s+e+l[0],children:[{type:"text",value:e+l[0]}]};return l[1]?[o,{type:"text",value:l[1]}]:o}function LV(n,e,t,r){return!Aj(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function _V(n){const e=n.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function DV(n){const e=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!e)return[n,void 0];n=n.slice(0,e.index);let t=e[0],r=t.indexOf(")");const i=bP(n,"(");let s=bP(n,")");for(;r!==-1&&i>s;)n+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),s++;return[n,t]}function Aj(n,e){const t=n.input.charCodeAt(n.index-1);return(n.index===0||Dl(t)||ip(t))&&(!e||t!==47)}Rj.peek=FV;function IV(){this.buffer()}function zV(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function ZV(){this.buffer()}function XV(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function BV(n){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Lr(this.sliceSerialize(n)).toLowerCase(),t.label=e}function WV(n){this.exit(n)}function VV(n){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Lr(this.sliceSerialize(n)).toLowerCase(),t.label=e}function qV(n){this.exit(n)}function FV(){return"["}function Rj(n,e,t,r){const i=t.createTracker(r);let s=i.move("[^");const l=t.enter("footnoteReference"),o=t.enter("reference");return s+=i.move(t.safe(t.associationId(n),{after:"]",before:s})),o(),l(),s+=i.move("]"),s}function YV(){return{enter:{gfmFootnoteCallString:IV,gfmFootnoteCall:zV,gfmFootnoteDefinitionLabelString:ZV,gfmFootnoteDefinition:XV},exit:{gfmFootnoteCallString:BV,gfmFootnoteCall:WV,gfmFootnoteDefinitionLabelString:VV,gfmFootnoteDefinition:qV}}}function UV(n){let e=!1;return n&&n.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:t,footnoteReference:Rj},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,s,l){const o=s.createTracker(l);let u=o.move("[^");const h=s.enter("footnoteDefinition"),f=s.enter("label");return u+=o.move(s.safe(s.associationId(r),{before:u,after:"]"})),f(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((e?`
444
+ `:" ")+s.indentLines(s.containerFlow(r,o.current()),e?Nj:GV))),h(),u}}function GV(n,e,t){return e===0?n:Nj(n,e,t)}function Nj(n,e,t){return(t?"":" ")+n}const HV=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Lj.peek=n8;function KV(){return{canContainEols:["delete"],enter:{strikethrough:e8},exit:{strikethrough:t8}}}function JV(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HV}],handlers:{delete:Lj}}}function e8(n){this.enter({type:"delete",children:[]},n)}function t8(n){this.exit(n)}function Lj(n,e,t,r){const i=t.createTracker(r),s=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(n,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),s(),l}function n8(){return"~"}function r8(n){return n.length}function i8(n,e){const t=e||{},r=(t.align||[]).concat(),i=t.stringLength||r8,s=[],l=[],o=[],u=[];let h=0,f=-1;for(;++f<n.length;){const b=[],w=[];let S=-1;for(n[f].length>h&&(h=n[f].length);++S<n[f].length;){const C=s8(n[f][S]);if(t.alignDelimiters!==!1){const Q=i(C);w[S]=Q,(u[S]===void 0||Q>u[S])&&(u[S]=Q)}b.push(C)}l[f]=b,o[f]=w}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<h;)s[p]=wP(r[p]);else{const b=wP(r);for(;++p<h;)s[p]=b}p=-1;const m=[],O=[];for(;++p<h;){const b=s[p];let w="",S="";b===99?(w=":",S=":"):b===108?w=":":b===114&&(S=":");let C=t.alignDelimiters===!1?1:Math.max(1,u[p]-w.length-S.length);const Q=w+"-".repeat(C)+S;t.alignDelimiters!==!1&&(C=w.length+C+S.length,C>u[p]&&(u[p]=C),O[p]=C),m[p]=Q}l.splice(1,0,m),o.splice(1,0,O),f=-1;const k=[];for(;++f<l.length;){const b=l[f],w=o[f];p=-1;const S=[];for(;++p<h;){const C=b[p]||"";let Q="",R="";if(t.alignDelimiters!==!1){const I=u[p]-(w[p]||0),j=s[p];j===114?Q=" ".repeat(I):j===99?I%2?(Q=" ".repeat(I/2+.5),R=" ".repeat(I/2-.5)):(Q=" ".repeat(I/2),R=Q):R=" ".repeat(I)}t.delimiterStart!==!1&&!p&&S.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&C==="")&&(t.delimiterStart!==!1||p)&&S.push(" "),t.alignDelimiters!==!1&&S.push(Q),S.push(C),t.alignDelimiters!==!1&&S.push(R),t.padding!==!1&&S.push(" "),(t.delimiterEnd!==!1||p!==h-1)&&S.push("|")}k.push(t.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return k.join(`
445
+ `)}function s8(n){return n==null?"":String(n)}function wP(n){const e=typeof n=="string"?n.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function l8(n,e,t,r){const i=t.enter("blockquote"),s=t.createTracker(r);s.move("> "),s.shift(2);const l=t.indentLines(t.containerFlow(n,s.current()),o8);return i(),l}function o8(n,e,t){return">"+(t?"":" ")+n}function a8(n,e){return SP(n,e.inConstruct,!0)&&!SP(n,e.notInConstruct,!1)}function SP(n,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let r=-1;for(;++r<e.length;)if(n.includes(e[r]))return!0;return!1}function PP(n,e,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
446
+ `&&a8(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
447
+ `}function u8(n,e){const t=String(n);let r=t.indexOf(e),i=r,s=0,l=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>l&&(l=s):s=1,i=r+e.length,r=t.indexOf(e,i);return l}function c8(n,e){return!!(e.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function h8(n){const e=n.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function f8(n,e,t,r){const i=h8(t),s=n.value||"",l=i==="`"?"GraveAccent":"Tilde";if(c8(n,t)){const p=t.enter("codeIndented"),m=t.indentLines(s,d8);return p(),m}const o=t.createTracker(r),u=i.repeat(Math.max(u8(s,i)+1,3)),h=t.enter("codeFenced");let f=o.move(u);if(n.lang){const p=t.enter(`codeFencedLang${l}`);f+=o.move(t.safe(n.lang,{before:f,after:" ",encode:["`"],...o.current()})),p()}if(n.lang&&n.meta){const p=t.enter(`codeFencedMeta${l}`);f+=o.move(" "),f+=o.move(t.safe(n.meta,{before:f,after:`
448
+ `,encode:["`"],...o.current()})),p()}return f+=o.move(`
449
+ `),s&&(f+=o.move(s+`
450
+ `)),f+=o.move(u),h(),f}function d8(n,e,t){return(t?"":" ")+n}function Rx(n){const e=n.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function p8(n,e,t,r){const i=Rx(t),s=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let o=t.enter("label");const u=t.createTracker(r);let h=u.move("[");return h+=u.move(t.safe(t.associationId(n),{before:h,after:"]",...u.current()})),h+=u.move("]: "),o(),!n.url||/[\0- \u007F]/.test(n.url)?(o=t.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(t.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(o=t.enter("destinationRaw"),h+=u.move(t.safe(n.url,{before:h,after:n.title?" ":`
451
+ `,...u.current()}))),o(),n.title&&(o=t.enter(`title${s}`),h+=u.move(" "+i),h+=u.move(t.safe(n.title,{before:h,after:i,...u.current()})),h+=u.move(i),o()),l(),h}function m8(n){const e=n.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function gc(n){return"&#x"+n.toString(16).toUpperCase()+";"}function Ad(n,e,t){const r=aa(n),i=aa(e);return r===void 0?i===void 0?t==="_"?{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}}_j.peek=g8;function _j(n,e,t,r){const i=m8(t),s=t.enter("emphasis"),l=t.createTracker(r),o=l.move(i);let u=l.move(t.containerPhrasing(n,{after:i,before:o,...l.current()}));const h=u.charCodeAt(0),f=Ad(r.before.charCodeAt(r.before.length-1),h,i);f.inside&&(u=gc(h)+u.slice(1));const p=u.charCodeAt(u.length-1),m=Ad(r.after.charCodeAt(0),p,i);m.inside&&(u=u.slice(0,-1)+gc(p));const O=l.move(i);return s(),t.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},o+u+O}function g8(n,e,t){return t.options.emphasis||"*"}function O8(n,e){let t=!1;return Mx(n,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Gy}),!!((!n.depth||n.depth<3)&&Px(n)&&(e.options.setext||t))}function y8(n,e,t,r){const i=Math.max(Math.min(6,n.depth||1),1),s=t.createTracker(r);if(O8(n,t)){const f=t.enter("headingSetext"),p=t.enter("phrasing"),m=t.containerPhrasing(n,{...s.current(),before:`
452
+ `,after:`
453
+ `});return p(),f(),m+`
454
+ `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
455
+ `))+1))}const l="#".repeat(i),o=t.enter("headingAtx"),u=t.enter("phrasing");s.move(l+" ");let h=t.containerPhrasing(n,{before:"# ",after:`
456
+ `,...s.current()});return/^[\t ]/.test(h)&&(h=gc(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,t.options.closeAtx&&(h+=" "+l),u(),o(),h}Dj.peek=x8;function Dj(n){return n.value||""}function x8(){return"<"}Ij.peek=k8;function Ij(n,e,t,r){const i=Rx(t),s=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let o=t.enter("label");const u=t.createTracker(r);let h=u.move("![");return h+=u.move(t.safe(n.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),o(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(o=t.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(t.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(o=t.enter("destinationRaw"),h+=u.move(t.safe(n.url,{before:h,after:n.title?" ":")",...u.current()}))),o(),n.title&&(o=t.enter(`title${s}`),h+=u.move(" "+i),h+=u.move(t.safe(n.title,{before:h,after:i,...u.current()})),h+=u.move(i),o()),h+=u.move(")"),l(),h}function k8(){return"!"}zj.peek=v8;function zj(n,e,t,r){const i=n.referenceType,s=t.enter("imageReference");let l=t.enter("label");const o=t.createTracker(r);let u=o.move("![");const h=t.safe(n.alt,{before:u,after:"]",...o.current()});u+=o.move(h+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const p=t.safe(t.associationId(n),{before:u,after:"]",...o.current()});return l(),t.stack=f,s(),i==="full"||!h||h!==p?u+=o.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function v8(){return"!"}Zj.peek=b8;function Zj(n,e,t){let r=n.value||"",i="`",s=-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+" ");++s<t.unsafe.length;){const l=t.unsafe[s],o=t.compilePattern(l);let u;if(l.atBreak)for(;u=o.exec(r);){let h=u.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(u.index+1)}}return i+r+i}function b8(){return"`"}function Xj(n,e){const t=Px(n);return!!(!e.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(t===n.url||"mailto:"+t===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}Bj.peek=w8;function Bj(n,e,t,r){const i=Rx(t),s=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let o,u;if(Xj(n,t)){const f=t.stack;t.stack=[],o=t.enter("autolink");let p=l.move("<");return p+=l.move(t.containerPhrasing(n,{before:p,after:">",...l.current()})),p+=l.move(">"),o(),t.stack=f,p}o=t.enter("link"),u=t.enter("label");let h=l.move("[");return h+=l.move(t.containerPhrasing(n,{before:h,after:"](",...l.current()})),h+=l.move("]("),u(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(u=t.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(t.safe(n.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(u=t.enter("destinationRaw"),h+=l.move(t.safe(n.url,{before:h,after:n.title?" ":")",...l.current()}))),u(),n.title&&(u=t.enter(`title${s}`),h+=l.move(" "+i),h+=l.move(t.safe(n.title,{before:h,after:i,...l.current()})),h+=l.move(i),u()),h+=l.move(")"),o(),h}function w8(n,e,t){return Xj(n,t)?"<":"["}Wj.peek=S8;function Wj(n,e,t,r){const i=n.referenceType,s=t.enter("linkReference");let l=t.enter("label");const o=t.createTracker(r);let u=o.move("[");const h=t.containerPhrasing(n,{before:u,after:"]",...o.current()});u+=o.move(h+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const p=t.safe(t.associationId(n),{before:u,after:"]",...o.current()});return l(),t.stack=f,s(),i==="full"||!h||h!==p?u+=o.move(p+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function S8(){return"["}function Nx(n){const e=n.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function P8(n){const e=Nx(n),t=n.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function C8(n){const e=n.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function Vj(n){const e=n.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function Q8(n,e,t,r){const i=t.enter("list"),s=t.bulletCurrent;let l=n.ordered?C8(t):Nx(t);const o=n.ordered?l==="."?")":".":P8(t);let u=e&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!n.ordered){const f=n.children?n.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),Vj(t)===l&&f){let p=-1;for(;++p<n.children.length;){const m=n.children[p];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(l=o),t.bulletCurrent=l;const h=t.containerFlow(n,r);return t.bulletLastUsed=l,t.bulletCurrent=s,i(),h}function $8(n){const e=n.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function T8(n,e,t,r){const i=$8(t);let s=t.bulletCurrent||Nx(t);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(n))+s);let l=s.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||n.spread))&&(l=Math.ceil(l/4)*4);const o=t.createTracker(r);o.move(s+" ".repeat(l-s.length)),o.shift(l);const u=t.enter("listItem"),h=t.indentLines(t.containerFlow(n,o.current()),f);return u(),h;function f(p,m,O){return m?(O?"":" ".repeat(l))+p:(O?s:s+" ".repeat(l-s.length))+p}}function j8(n,e,t,r){const i=t.enter("paragraph"),s=t.enter("phrasing"),l=t.containerPhrasing(n,r);return s(),i(),l}const E8=op(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function M8(n,e,t,r){return(n.children.some(function(l){return E8(l)})?t.containerPhrasing:t.containerFlow).call(t,n,r)}function A8(n){const e=n.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}qj.peek=R8;function qj(n,e,t,r){const i=A8(t),s=t.enter("strong"),l=t.createTracker(r),o=l.move(i+i);let u=l.move(t.containerPhrasing(n,{after:i,before:o,...l.current()}));const h=u.charCodeAt(0),f=Ad(r.before.charCodeAt(r.before.length-1),h,i);f.inside&&(u=gc(h)+u.slice(1));const p=u.charCodeAt(u.length-1),m=Ad(r.after.charCodeAt(0),p,i);m.inside&&(u=u.slice(0,-1)+gc(p));const O=l.move(i+i);return s(),t.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},o+u+O}function R8(n,e,t){return t.options.strong||"*"}function N8(n,e,t,r){return t.safe(n.value,r)}function L8(n){const e=n.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function _8(n,e,t){const r=(Vj(t)+(t.options.ruleSpaces?" ":"")).repeat(L8(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Fj={blockquote:l8,break:PP,code:f8,definition:p8,emphasis:_j,hardBreak:PP,heading:y8,html:Dj,image:Ij,imageReference:zj,inlineCode:Zj,link:Bj,linkReference:Wj,list:Q8,listItem:T8,paragraph:j8,root:M8,strong:qj,text:N8,thematicBreak:_8};function D8(){return{enter:{table:I8,tableData:CP,tableHeader:CP,tableRow:Z8},exit:{codeText:X8,table:z8,tableData:fO,tableHeader:fO,tableRow:fO}}}function I8(n){const e=n._align;this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},n),this.data.inTable=!0}function z8(n){this.exit(n),this.data.inTable=void 0}function Z8(n){this.enter({type:"tableRow",children:[]},n)}function fO(n){this.exit(n)}function CP(n){this.enter({type:"tableCell",children:[]},n)}function X8(n){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,B8));const t=this.stack[this.stack.length-1];t.type,t.value=e,this.exit(n)}function B8(n,e){return e==="|"?e:n}function W8(n){const e=n||{},t=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,s=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
457
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:l,tableCell:u,tableRow:o}};function l(O,k,b,w){return h(f(O,b,w),O.align)}function o(O,k,b,w){const S=p(O,b,w),C=h([S]);return C.slice(0,C.indexOf(`
458
+ `))}function u(O,k,b,w){const S=b.enter("tableCell"),C=b.enter("phrasing"),Q=b.containerPhrasing(O,{...w,before:s,after:s});return C(),S(),Q}function h(O,k){return i8(O,{align:k,alignDelimiters:r,padding:t,stringLength:i})}function f(O,k,b){const w=O.children;let S=-1;const C=[],Q=k.enter("table");for(;++S<w.length;)C[S]=p(w[S],k,b);return Q(),C}function p(O,k,b){const w=O.children;let S=-1;const C=[],Q=k.enter("tableRow");for(;++S<w.length;)C[S]=u(w[S],O,k,b);return Q(),C}function m(O,k,b){let w=Fj.inlineCode(O,k,b);return b.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function V8(){return{exit:{taskListCheckValueChecked:QP,taskListCheckValueUnchecked:QP,paragraph:F8}}}function q8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Y8}}}function QP(n){const e=this.stack[this.stack.length-2];e.type,e.checked=n.type==="taskListCheckValueChecked"}function F8(n){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,l;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){l=o;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(n)}function Y8(n,e,t,r){const i=n.children[0],s=typeof n.checked=="boolean"&&i&&i.type==="paragraph",l="["+(n.checked?"x":" ")+"] ",o=t.createTracker(r);s&&o.move(l);let u=Fj.listItem(n,e,t,{...r,...o.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(f){return f+l}}function U8(){return[QV(),YV(),KV(),D8(),V8()]}function G8(n){return{extensions:[$V(),UV(n),JV(),W8(n),q8()]}}const H8={tokenize:rq,partial:!0},Yj={tokenize:iq,partial:!0},Uj={tokenize:sq,partial:!0},Gj={tokenize:lq,partial:!0},K8={tokenize:oq,partial:!0},Hj={name:"wwwAutolink",tokenize:tq,previous:Jj},Kj={name:"protocolAutolink",tokenize:nq,previous:eE},Wi={name:"emailAutolink",tokenize:eq,previous:tE},Oi={};function J8(){return{text:Oi}}let ul=48;for(;ul<123;)Oi[ul]=Wi,ul++,ul===58?ul=65:ul===91&&(ul=97);Oi[43]=Wi;Oi[45]=Wi;Oi[46]=Wi;Oi[95]=Wi;Oi[72]=[Wi,Kj];Oi[104]=[Wi,Kj];Oi[87]=[Wi,Hj];Oi[119]=[Wi,Hj];function eq(n,e,t){const r=this;let i,s;return l;function l(p){return!e0(p)||!tE.call(r,r.previous)||Lx(r.events)?t(p):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),o(p))}function o(p){return e0(p)?(n.consume(p),o):p===64?(n.consume(p),u):t(p)}function u(p){return p===46?n.check(K8,f,h)(p):p===45||p===95||cn(p)?(s=!0,n.consume(p),u):f(p)}function h(p){return n.consume(p),i=!0,u}function f(p){return s&&i&&xn(r.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),e(p)):t(p)}}function tq(n,e,t){const r=this;return i;function i(l){return l!==87&&l!==119||!Jj.call(r,r.previous)||Lx(r.events)?t(l):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(H8,n.attempt(Yj,n.attempt(Uj,s),t),t)(l))}function s(l){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),e(l)}}function nq(n,e,t){const r=this;let i="",s=!1;return l;function l(p){return(p===72||p===104)&&eE.call(r,r.previous)&&!Lx(r.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),n.consume(p),o):t(p)}function o(p){if(xn(p)&&i.length<5)return i+=String.fromCodePoint(p),n.consume(p),o;if(p===58){const m=i.toLowerCase();if(m==="http"||m==="https")return n.consume(p),u}return t(p)}function u(p){return p===47?(n.consume(p),s?h:(s=!0,u)):t(p)}function h(p){return p===null||jd(p)||ut(p)||Dl(p)||ip(p)?t(p):n.attempt(Yj,n.attempt(Uj,f),t)(p)}function f(p){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),e(p)}}function rq(n,e,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,n.consume(l),i):l===46&&r===3?(n.consume(l),s):t(l)}function s(l){return l===null?t(l):e(l)}}function iq(n,e,t){let r,i,s;return l;function l(h){return h===46||h===95?n.check(Gj,u,o)(h):h===null||ut(h)||Dl(h)||h!==45&&ip(h)?u(h):(s=!0,n.consume(h),l)}function o(h){return h===95?r=!0:(i=r,r=void 0),n.consume(h),l}function u(h){return i||r||!s?t(h):e(h)}}function sq(n,e){let t=0,r=0;return i;function i(l){return l===40?(t++,n.consume(l),i):l===41&&r<t?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?n.check(Gj,e,s)(l):l===null||ut(l)||Dl(l)?e(l):(n.consume(l),i)}function s(l){return l===41&&r++,n.consume(l),i}}function lq(n,e,t){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?(n.consume(o),r):o===38?(n.consume(o),s):o===93?(n.consume(o),i):o===60||o===null||ut(o)||Dl(o)?e(o):t(o)}function i(o){return o===null||o===40||o===91||ut(o)||Dl(o)?e(o):r(o)}function s(o){return xn(o)?l(o):t(o)}function l(o){return o===59?(n.consume(o),r):xn(o)?(n.consume(o),l):t(o)}}function oq(n,e,t){return r;function r(s){return n.consume(s),i}function i(s){return cn(s)?t(s):e(s)}}function Jj(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||ut(n)}function eE(n){return!xn(n)}function tE(n){return!(n===47||e0(n))}function e0(n){return n===43||n===45||n===46||n===95||cn(n)}function Lx(n){let e=n.length,t=!1;for(;e--;){const r=n[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return n.length>0&&!t&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const aq={tokenize:gq,partial:!0};function uq(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dq,continuation:{tokenize:pq},exit:mq}},text:{91:{name:"gfmFootnoteCall",tokenize:fq},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cq,resolveTo:hq}}}}function cq(n,e,t){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=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(!l||!l._balanced)return t(u);const h=Lr(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?t(u):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),e(u))}}function hq(n,e){let t=n.length;for(;t--;)if(n[t][1].type==="labelImage"&&n[t][0]==="enter"){n[t][1];break}n[t+1][1].type="data",n[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},n[t+3][1].start),end:Object.assign({},n[n.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},n[t+3][1].end),end:Object.assign({},n[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},n[n.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[n[t+1],n[t+2],["enter",r,e],n[t+3],n[t+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",l,e],["exit",l,e],["exit",s,e],n[n.length-2],n[n.length-1],["exit",r,e]];return n.splice(t,n.length-t+1,...o),n}function fq(n,e,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return o;function o(p){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(p),n.exit("gfmFootnoteCallLabelMarker"),u}function u(p){return p!==94?t(p):(n.enter("gfmFootnoteCallMarker"),n.consume(p),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(p){if(s>999||p===93&&!l||p===null||p===91||ut(p))return t(p);if(p===93){n.exit("chunkString");const m=n.exit("gfmFootnoteCallString");return i.includes(Lr(r.sliceSerialize(m)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(p),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),e):t(p)}return ut(p)||(l=!0),s++,n.consume(p),p===92?f:h}function f(p){return p===91||p===92||p===93?(n.consume(p),s++,h):h(p)}}function dq(n,e,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,o;return u;function u(k){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",f):t(k)}function f(k){if(l>999||k===93&&!o||k===null||k===91||ut(k))return t(k);if(k===93){n.exit("chunkString");const b=n.exit("gfmFootnoteDefinitionLabelString");return s=Lr(r.sliceSerialize(b)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),m}return ut(k)||(o=!0),l++,n.consume(k),k===92?p:f}function p(k){return k===91||k===92||k===93?(n.consume(k),l++,f):f(k)}function m(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),i.includes(s)||i.push(s),Ue(n,O,"gfmFootnoteDefinitionWhitespace")):t(k)}function O(k){return e(k)}}function pq(n,e,t){return n.check(_c,e,n.attempt(aq,e,t))}function mq(n){n.exit("gfmFootnoteDefinition")}function gq(n,e,t){const r=this;return Ue(n,i,"gfmFootnoteDefinitionIndent",5);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?e(s):t(s)}}function Oq(n){let t=(n||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,o){let u=-1;for(;++u<l.length;)if(l[u][0]==="enter"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._close){let h=u;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[u][1].end.offset-l[u][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[u][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[u][1].end)},p={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[u][1].start)},m=[["enter",f,o],["enter",l[h][1],o],["exit",l[h][1],o],["enter",p,o]],O=o.parser.constructs.insideSpan.null;O&&nr(m,m.length,0,sp(O,l.slice(h+1,u),o)),nr(m,m.length,0,[["exit",p,o],["enter",l[u][1],o],["exit",l[u][1],o],["exit",f,o]]),nr(l,h-1,u-h+3,m),u=h+m.length-2;break}}for(u=-1;++u<l.length;)l[u][1].type==="strikethroughSequenceTemporary"&&(l[u][1].type="data");return l}function s(l,o,u){const h=this.previous,f=this.events;let p=0;return m;function m(k){return h===126&&f[f.length-1][1].type!=="characterEscape"?u(k):(l.enter("strikethroughSequenceTemporary"),O(k))}function O(k){const b=aa(h);if(k===126)return p>1?u(k):(l.consume(k),p++,O);if(p<2&&!t)return u(k);const w=l.exit("strikethroughSequenceTemporary"),S=aa(k);return w._open=!S||S===2&&!!b,w._close=!b||b===2&&!!S,o(k)}}}class yq{constructor(){this.map=[]}add(e,t,r){xq(this,e,t,r)}consume(e){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function xq(n,e,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<n.map.length;){if(n.map[i][0]===e){n.map[i][1]+=t,n.map[i][2].push(...r);return}i+=1}n.map.push([e,t,r])}}function kq(n,e){let t=!1;const r=[];for(;e<n.length;){const i=n[e];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(n[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(n[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);e+=1}return r}function vq(){return{flow:{null:{name:"table",tokenize:bq,resolveAll:wq}}}}function bq(n,e,t){const r=this;let i=0,s=0,l;return o;function o(_){let V=r.events.length-1;for(;V>-1;){const ee=r.events[V][1].type;if(ee==="lineEnding"||ee==="linePrefix")V--;else break}const F=V>-1?r.events[V][1].type:null,H=F==="tableHead"||F==="tableRow"?j:u;return H===j&&r.parser.lazy[r.now().line]?t(_):H(_)}function u(_){return n.enter("tableHead"),n.enter("tableRow"),h(_)}function h(_){return _===124||(l=!0,s+=1),f(_)}function f(_){return _===null?t(_):Ee(_)?s>1?(s=0,r.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),O):t(_):We(_)?Ue(n,f,"whitespace")(_):(s+=1,l&&(l=!1,i+=1),_===124?(n.enter("tableCellDivider"),n.consume(_),n.exit("tableCellDivider"),l=!0,f):(n.enter("data"),p(_)))}function p(_){return _===null||_===124||ut(_)?(n.exit("data"),f(_)):(n.consume(_),_===92?m:p)}function m(_){return _===92||_===124?(n.consume(_),p):p(_)}function O(_){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(_):(n.enter("tableDelimiterRow"),l=!1,We(_)?Ue(n,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):k(_))}function k(_){return _===45||_===58?w(_):_===124?(l=!0,n.enter("tableCellDivider"),n.consume(_),n.exit("tableCellDivider"),b):I(_)}function b(_){return We(_)?Ue(n,w,"whitespace")(_):w(_)}function w(_){return _===58?(s+=1,l=!0,n.enter("tableDelimiterMarker"),n.consume(_),n.exit("tableDelimiterMarker"),S):_===45?(s+=1,S(_)):_===null||Ee(_)?R(_):I(_)}function S(_){return _===45?(n.enter("tableDelimiterFiller"),C(_)):I(_)}function C(_){return _===45?(n.consume(_),C):_===58?(l=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(_),n.exit("tableDelimiterMarker"),Q):(n.exit("tableDelimiterFiller"),Q(_))}function Q(_){return We(_)?Ue(n,R,"whitespace")(_):R(_)}function R(_){return _===124?k(_):_===null||Ee(_)?!l||i!==s?I(_):(n.exit("tableDelimiterRow"),n.exit("tableHead"),e(_)):I(_)}function I(_){return t(_)}function j(_){return n.enter("tableRow"),Z(_)}function Z(_){return _===124?(n.enter("tableCellDivider"),n.consume(_),n.exit("tableCellDivider"),Z):_===null||Ee(_)?(n.exit("tableRow"),e(_)):We(_)?Ue(n,Z,"whitespace")(_):(n.enter("data"),q(_))}function q(_){return _===null||_===124||ut(_)?(n.exit("data"),Z(_)):(n.consume(_),_===92?J:q)}function J(_){return _===92||_===124?(n.consume(_),q):q(_)}}function wq(n,e){let t=-1,r=!0,i=0,s=[0,0,0,0],l=[0,0,0,0],o=!1,u=0,h,f,p;const m=new yq;for(;++t<n.length;){const O=n[t],k=O[1];O[0]==="enter"?k.type==="tableHead"?(o=!1,u!==0&&($P(m,e,u,h,f),f=void 0,u=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},m.add(t,0,[["enter",h,e]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,p=void 0,s=[0,0,0,0],l=[0,t+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},m.add(t,0,[["enter",f,e]])),i=k.type==="tableDelimiterRow"?2:f?3:1):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],p=Qf(m,e,s,i,void 0,p),s=[0,0,0,0]),l[2]=t)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(l[0]=l[1],p=Qf(m,e,s,i,void 0,p)),s=l,l=[s[1],t,0,0])):k.type==="tableHead"?(o=!0,u=t):k.type==="tableRow"||k.type==="tableDelimiterRow"?(u=t,s[1]!==0?(l[0]=l[1],p=Qf(m,e,s,i,t,p)):l[1]!==0&&(p=Qf(m,e,l,i,t,p)),i=0):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=t)}for(u!==0&&$P(m,e,u,h,f),m.consume(e.events),t=-1;++t<e.events.length;){const O=e.events[t];O[0]==="enter"&&O[1].type==="table"&&(O[1]._align=kq(e.events,t))}return n}function Qf(n,e,t,r,i,s){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";t[0]!==0&&(s.end=Object.assign({},So(e.events,t[0])),n.add(t[0],0,[["exit",s,e]]));const u=So(e.events,t[1]);if(s={type:l,start:Object.assign({},u),end:Object.assign({},u)},n.add(t[1],0,[["enter",s,e]]),t[2]!==0){const h=So(e.events,t[2]),f=So(e.events,t[3]),p={type:o,start:Object.assign({},h),end:Object.assign({},f)};if(n.add(t[2],0,[["enter",p,e]]),r!==2){const m=e.events[t[2]],O=e.events[t[3]];if(m[1].end=Object.assign({},O[1].end),m[1].type="chunkText",m[1].contentType="text",t[3]>t[2]+1){const k=t[2]+1,b=t[3]-t[2]-1;n.add(k,b,[])}}n.add(t[3]+1,0,[["exit",p,e]])}return i!==void 0&&(s.end=Object.assign({},So(e.events,i)),n.add(i,0,[["exit",s,e]]),s=void 0),s}function $P(n,e,t,r,i){const s=[],l=So(e.events,t);i&&(i.end=Object.assign({},l),s.push(["exit",i,e])),r.end=Object.assign({},l),s.push(["exit",r,e]),n.add(t+1,0,s)}function So(n,e){const t=n[e],r=t[0]==="enter"?"start":"end";return t[1][r]}const Sq={name:"tasklistCheck",tokenize:Cq};function Pq(){return{text:{91:Sq}}}function Cq(n,e,t){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),s)}function s(u){return ut(u)?(n.enter("taskListCheckValueUnchecked"),n.consume(u),n.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(n.enter("taskListCheckValueChecked"),n.consume(u),n.exit("taskListCheckValueChecked"),l):t(u)}function l(u){return u===93?(n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),o):t(u)}function o(u){return Ee(u)?e(u):We(u)?n.check({tokenize:Qq},e,t)(u):t(u)}}function Qq(n,e,t){return Ue(n,r,"whitespace");function r(i){return i===null?t(i):e(i)}}function $q(n){return hj([J8(),uq(),Oq(n),vq(),Pq()])}const Tq={};function nE(n){const e=this,t=n||Tq,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push($q(t)),s.push(U8()),l.push(G8(t))}const jq="",rE="/login",Eq=new Set(["/v1/auth/login","/v1/auth/logout","/v1/auth/whoami","/health"]);function Mq(n){if(typeof window>"u"||window.location.pathname===rE)return!1;for(const e of Eq)if(n.startsWith(e))return!1;return!0}async function it(n,e){const t=new Headers(e==null?void 0:e.headers);(e==null?void 0:e.body)!==void 0&&(e==null?void 0:e.body)!==null&&!t.has("content-type")&&t.set("content-type","application/json");const r=await fetch(`${jq}${n}`,{...e,credentials:"include",headers:t});if(r.status===401&&Mq(n)){const i=window.location.pathname+window.location.search;throw window.location.href=`${rE}?next=${encodeURIComponent(i)}`,new Error("unauthenticated")}if(!r.ok){let i="";try{i=await r.text()}catch{}throw new Error(`${(e==null?void 0:e.method)??"GET"} ${n} -> ${r.status} ${i}`)}if(r.status!==204)return await r.json()}const yt={health:()=>it("/health"),listProjects:()=>it("/v1/projects"),getProject:n=>it(`/v1/projects/${n}`),getProjectByKey:n=>it(`/v1/projects/by-key/${encodeURIComponent(n)}`),createProject:n=>it("/v1/projects",{method:"POST",body:JSON.stringify(n)}),updateProject:(n,e)=>it(`/v1/projects/${n}`,{method:"PATCH",body:JSON.stringify(e)}),openingBrief:(n,e=10)=>it(`/v1/projects/${n}/opening-brief`,{method:"POST",body:JSON.stringify({recentLimit:e})}),getEntity:n=>it(`/v1/entities/${n}`),getEntityByKey:(n,e)=>it(`/v1/projects/by-key/${encodeURIComponent(n)}/entities/by-seq/${e}`),createTask:n=>it("/v1/tasks",{method:"POST",body:JSON.stringify(n)}),createNote:n=>it("/v1/notes",{method:"POST",body:JSON.stringify(n)}),writeEntity:n=>{if(n.kind==="task"){const{kind:r,...i}=n;return it("/v1/tasks",{method:"POST",body:JSON.stringify(i)})}const{kind:e,...t}=n;return it("/v1/notes",{method:"POST",body:JSON.stringify(t)})},updateEntity:(n,e)=>it(`/v1/entities/${n}`,{method:"PATCH",body:JSON.stringify(e)}),deleteEntity:n=>it(`/v1/entities/${n}`,{method:"DELETE"}),relatedEntities:n=>it(`/v1/entities/${n}/related`),recent:(n={})=>it("/v1/recent",{method:"POST",body:JSON.stringify(n)}),search:n=>it("/v1/search",{method:"POST",body:JSON.stringify(n)}),getEmbeddingSettings:()=>it("/v1/settings/embedding"),updateEmbeddingSettings:n=>it("/v1/settings/embedding",{method:"PATCH",body:JSON.stringify(n)}),backfillEmbeddings:n=>it("/v1/settings/embedding/backfill",{method:"POST",body:JSON.stringify(n==null?{}:{limit:n})}),tasksRange:n=>it("/v1/tasks/range",{method:"POST",body:JSON.stringify(n)}),listTokens:()=>it("/v1/tokens"),createToken:n=>it("/v1/tokens",{method:"POST",body:JSON.stringify({name:n})}),revokeToken:n=>it(`/v1/tokens/${n}`,{method:"DELETE"}),login:n=>it("/v1/auth/login",{method:"POST",body:JSON.stringify({password:n})}),logout:()=>it("/v1/auth/logout",{method:"POST"}),whoami:()=>it("/v1/auth/whoami")},up=3e4;function Aq(){return Ir({queryKey:["health"],queryFn:yt.health,staleTime:5*6e4})}function sr(){return Ir({queryKey:["projects"],queryFn:yt.listProjects})}function iE(n){return Ir({queryKey:["project","by-key",n],queryFn:()=>yt.getProjectByKey(n),enabled:!!n})}function TP(n){return Ir({queryKey:["entity",n],queryFn:()=>yt.getEntity(n),enabled:!!n})}function Rq(n){return Ir({queryKey:["related",n],queryFn:()=>yt.relatedEntities(n),enabled:!!n})}function Nq(n,e={}){return Ir({queryKey:["recent",n],queryFn:()=>yt.recent(n),refetchInterval:e.poll===!1?!1:up})}function _x(n,e,t={}){return Ir({queryKey:["entity-list",n,e],queryFn:()=>yt.recent({projectId:n??null,kinds:e??null,limit:100}),enabled:!!n,refetchInterval:t.poll===!1?!1:up})}function sE(n){return Ir({queryKey:["search",n],queryFn:()=>yt.search(n),enabled:!!(n&&n.query.length>0)})}function Lq(){return Ir({queryKey:["settings","embedding"],queryFn:yt.getEmbeddingSettings,refetchInterval:up})}function _q(){const n=vr();return di({mutationFn:e=>yt.updateEmbeddingSettings(e),onSuccess:e=>{n.setQueryData(["settings","embedding"],e),n.invalidateQueries({queryKey:["health"]})}})}function Dq(){const n=vr();return di({mutationFn:e=>yt.backfillEmbeddings(e),onSuccess:e=>{n.setQueryData(["settings","embedding"],e.settings)}})}function wa(n,e={}){return Ir({queryKey:["tasks-range",n],queryFn:()=>yt.tasksRange(n),refetchInterval:e.poll===!1?!1:up})}function Iq(){const n=vr();return di({mutationFn:e=>yt.createProject(e),onSuccess:()=>{n.invalidateQueries({queryKey:["projects"]})}})}function zq(){const n=vr();return di({mutationFn:({id:e,fields:t})=>yt.updateProject(e,t),onSuccess:e=>{n.invalidateQueries({queryKey:["projects"]}),n.invalidateQueries({queryKey:["project","by-key",e.key]}),n.invalidateQueries({queryKey:["opening-brief",e.id]})}})}function Zq(){const n=vr();return di({mutationFn:e=>yt.writeEntity(e),onSuccess:e=>{n.invalidateQueries({queryKey:["entity-list",e.projectId??void 0]}),n.invalidateQueries({queryKey:["opening-brief",e.projectId??void 0]}),n.invalidateQueries({queryKey:["recent"]}),n.invalidateQueries({queryKey:["tasks-range"]}),e.parentId&&n.invalidateQueries({queryKey:["related",e.parentId]})}})}function Zl(){const n=vr();return di({mutationFn:({id:e,fields:t})=>yt.updateEntity(e,t),onSuccess:e=>{n.invalidateQueries({queryKey:["entity",e.id]}),n.invalidateQueries({queryKey:["entity-list",e.projectId??void 0]}),n.invalidateQueries({queryKey:["opening-brief",e.projectId??void 0]}),n.invalidateQueries({queryKey:["tasks-range"]}),n.invalidateQueries({queryKey:["related"]})}})}function lE(){const n=vr();return di({mutationFn:e=>yt.deleteEntity(e),onSuccess:()=>{n.invalidateQueries({queryKey:["tasks-range"]}),n.invalidateQueries({queryKey:["recent"]}),n.invalidateQueries({queryKey:["entity-list"]}),n.invalidateQueries({queryKey:["opening-brief"]}),n.invalidateQueries({queryKey:["related"]})}})}function Xq(){const n=vr();return di({mutationFn:({id:e,agentsMd:t})=>yt.updateProject(e,{agentsMd:t}),onSuccess:e=>{n.invalidateQueries({queryKey:["project","by-key",e.key]}),n.invalidateQueries({queryKey:["opening-brief",e.id]}),n.invalidateQueries({queryKey:["projects"]})}})}function Bq(){return Ir({queryKey:["tokens"],queryFn:yt.listTokens})}function Wq(){const n=vr();return di({mutationFn:e=>yt.createToken(e),onSuccess:()=>{n.invalidateQueries({queryKey:["tokens"]})}})}function Vq(){const n=vr();return di({mutationFn:e=>yt.revokeToken(e),onSuccess:(e,t)=>{n.setQueryData(["tokens"],r=>(r==null?void 0:r.filter(i=>i.id!==t))??r),n.invalidateQueries({queryKey:["tokens"],refetchType:"active"})}})}const qq=["task","note"],oE=["urgent","high","medium","low","none"];function Vi(){const[n,e]=Pc(),t=n.get("d"),r=L.useCallback(s=>{e(l=>{const o=new URLSearchParams(l);return o.set("d",s),o})},[e]),i=L.useCallback(()=>{e(s=>{const l=new URLSearchParams(s);return l.delete("d"),l})},[e]);return{openId:t,open:r,close:i}}function _n(n){var t;if(n.title&&n.title.trim())return n.title;const e=((t=n.body.split(`
459
+ `).find(r=>r.trim()))==null?void 0:t.trim())??"";return e?e.length>60?`${e.slice(0,60)}…`:e:"Untitled"}function Zi(n){return!n.title||!n.title.trim()}const Fq={task:{glyph:"☑",color:"text-blue-600 bg-blue-50 border-blue-100"},note:{glyph:"✎",color:"text-slate-700 bg-slate-50 border-slate-200"}};function Dx({kind:n,compact:e=!1}){const t=Fq[n];return y.jsxs("span",{className:`inline-flex items-center gap-1 px-1.5 h-5 text-xxs rounded border ${t.color}`,title:n,children:[y.jsx("span",{children:t.glyph}),!e&&y.jsx("span",{className:"uppercase tracking-wider",children:n})]})}const aE=[{name:"circle",Icon:Zy},{name:"square",Icon:t6},{name:"triangle",Icon:s6},{name:"hexagon",Icon:XB},{name:"folder",Icon:IB},{name:"briefcase",Icon:CB},{name:"rocket",Icon:GB},{name:"sparkles",Icon:JB},{name:"target",Icon:r6},{name:"layers",Icon:WB},{name:"code",Icon:EB},{name:"book",Icon:wB},{name:"flame",Icon:_B},{name:"zap",Icon:l6},{name:"star",Icon:n6},{name:"heart",Icon:ZB},{name:"box",Icon:SB},{name:"lightbulb",Icon:VB},{name:"pencil",Icon:YB},{name:"hash",Icon:zB}],Yq=new Map(aE.map(n=>[n.name,n.Icon]));function Uq(n){return n?Yq.get(n)??Zy:Zy}const Gq=[{name:"gray",value:"#6f6f76"},{name:"red",value:"#ef4444"},{name:"orange",value:"#f59e0b"},{name:"yellow",value:"#eab308"},{name:"green",value:"#10b981"},{name:"teal",value:"#14b8a6"},{name:"cyan",value:"#06b6d4"},{name:"blue",value:"#3b82f6"},{name:"indigo",value:"#5e6ad2"},{name:"purple",value:"#8b5cf6"},{name:"pink",value:"#ec4899"}],uE="#5e6ad2",cE="circle";function Hq(n){return n==="circle"||n==="square"||n==="triangle"}function Fs({color:n,icon:e,size:t=12,className:r=""}){const i=Uq(e),s=Hq(e);return y.jsx(i,{size:t,className:`shrink-0 ${r}`,color:n,fill:s?n:"none",strokeWidth:s?1.2:1.8})}function Oc({status:n,size:e=14}){const t="currentColor";return n==="done"?y.jsxs("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-statusDone shrink-0",children:[y.jsx("circle",{cx:"7",cy:"7",r:"6",fill:"currentColor"}),y.jsx("path",{d:"M4 7.4L6.2 9.5L10 5.5",stroke:"white",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}):n==="in_progress"?y.jsxs("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-statusInProgress shrink-0",children:[y.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:t,strokeWidth:"1.4",fill:"none"}),y.jsx("path",{d:"M7 1 a6 6 0 0 1 0 12 z",fill:"currentColor"})]}):n==="rejected"?y.jsxs("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-statusRejected shrink-0",children:[y.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:t,strokeWidth:"1.4",fill:"none"}),y.jsx("path",{d:"M4 4l6 6M10 4l-6 6",stroke:t,strokeWidth:"1.4",strokeLinecap:"round"})]}):y.jsx("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-statusOpen shrink-0",children:y.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:t,strokeWidth:"1.4",fill:"none"})})}function ua({priority:n,size:e=14}){return n==="urgent"?y.jsxs("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-prioUrgent shrink-0",children:[y.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"2",fill:"currentColor"}),y.jsx("path",{d:"M7 4v3.5M7 9.5h.01",stroke:"white",strokeWidth:"1.6",strokeLinecap:"round"})]}):n==="high"?y.jsxs("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-prioHigh shrink-0",children:[y.jsx("rect",{x:"2",y:"8",width:"2.5",height:"4",rx:"0.5",fill:"currentColor"}),y.jsx("rect",{x:"5.75",y:"5",width:"2.5",height:"7",rx:"0.5",fill:"currentColor"}),y.jsx("rect",{x:"9.5",y:"2",width:"2.5",height:"10",rx:"0.5",fill:"currentColor"})]}):n==="medium"?y.jsxs("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-prioMedium shrink-0",children:[y.jsx("rect",{x:"2",y:"8",width:"2.5",height:"4",rx:"0.5",fill:"currentColor"}),y.jsx("rect",{x:"5.75",y:"5",width:"2.5",height:"7",rx:"0.5",fill:"currentColor"}),y.jsx("rect",{x:"9.5",y:"2",width:"2.5",height:"10",rx:"0.5",opacity:"0.3",fill:"currentColor"})]}):n==="low"?y.jsxs("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-prioLow shrink-0",children:[y.jsx("rect",{x:"2",y:"8",width:"2.5",height:"4",rx:"0.5",fill:"currentColor"}),y.jsx("rect",{x:"5.75",y:"5",width:"2.5",height:"7",rx:"0.5",opacity:"0.3",fill:"currentColor"}),y.jsx("rect",{x:"9.5",y:"2",width:"2.5",height:"10",rx:"0.5",opacity:"0.3",fill:"currentColor"})]}):y.jsx("svg",{width:e,height:e,viewBox:"0 0 14 14",className:"text-faint shrink-0",children:y.jsx("line",{x1:"3",y1:"7",x2:"11",y2:"7",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeDasharray:"1.5 1.5"})})}const yc={urgent:"Urgent",high:"High",medium:"Medium",low:"Low",none:"No priority"},t0={open:"Todo",in_progress:"In progress",done:"Done",rejected:"Cancelled"},hE=["open","in_progress","done","rejected"],Kq=600;function Jq(){const{openId:n,close:e}=Vi();return L.useEffect(()=>{if(!n)return;const t=r=>{if(r.key!=="Escape")return;const i=r.target;if(i&&(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.closest(".cm-editor"))){i.blur();return}e()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[n,e]),n?y.jsxs("div",{className:"fixed inset-0 z-30 flex",children:[y.jsx("div",{className:"flex-1 bg-ink/10 backdrop-blur-[1px] cursor-pointer",onClick:e}),y.jsx("aside",{className:"w-[min(680px,92vw)] bg-surface border-l border-line shadow-modal flex flex-col",children:y.jsx(eF,{id:n,onClose:e})})]}):null}function eF({id:n,onClose:e}){const{data:t,isLoading:r}=TP(n),{data:i}=sr(),{data:s}=Rq(n),{data:l}=TP((t==null?void 0:t.parentId)??void 0),o=Zl(),u=lE(),{open:h}=Dt(),{open:f}=Vi(),[p,m]=L.useState(""),[O,k]=L.useState(""),[b,w]=L.useState(""),[S,C]=L.useState("open"),[Q,R]=L.useState(""),[I,j]=L.useState("none"),[Z,q]=L.useState("idle"),J=L.useRef(null);L.useEffect(()=>{t&&J.current!==t.id&&(m(t.title??""),k(t.body),w(t.tags.join(", ")),C(t.status),R(t.dueAt?t.dueAt.slice(0,10):""),j(t.priority),q("idle"),J.current=t.id)},[t==null?void 0:t.id,t]);const _=L.useMemo(()=>{if(!t||J.current!==t.id)return null;const Y=t.kind==="note",me=p.trim(),ye=me||(Y?null:me),te=b.split(",").map(G=>G.trim()).filter(Boolean),ae=Q?new Date(Q).toISOString():null,$={};ye!==(t.title??"")&&!(ye===null&&t.title===null)&&ye!==t.title&&($.title=ye===""?null:ye),O!==t.body&&($.body=O),JSON.stringify(te)!==JSON.stringify(t.tags)&&($.tags=te),S!==t.status&&($.status=S),I!==t.priority&&($.priority=I);const D=t.dueAt??null;return ae!==D&&($.dueAt=ae),$},[t,p,O,b,S,I,Q]);if(L.useEffect(()=>{if(!t||!_||Object.keys(_).length===0)return;q("idle");const Y=setTimeout(async()=>{q("saving");try{await o.mutateAsync({id:t.id,fields:_}),q("saved")}catch{q("error")}},Kq);return()=>clearTimeout(Y)},[_]),r||!t)return y.jsxs("div",{className:"p-6 text-sm text-muted flex items-center justify-between",children:[y.jsx("span",{children:"Loading…"}),y.jsx("button",{onClick:e,className:"text-faint hover:text-ink",children:y.jsx(By,{size:14})})]});const V=i==null?void 0:i.find(Y=>Y.id===t.projectId),F=V?`/p/${V.key}`:"",H=t.kind==="note";async function ee(){confirm(`Delete "${_n(t)}"? This cannot be undone.`)&&(await u.mutateAsync(t.id),e())}return y.jsxs(y.Fragment,{children:[y.jsxs("header",{className:"h-12 px-3 border-b border-line flex items-center gap-2 shrink-0",children:[y.jsx("button",{onClick:e,className:"p-1 -m-1 text-faint hover:text-ink rounded hover:bg-sidebar",title:"Close (Esc)",children:y.jsx(By,{size:16})}),y.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted min-w-0",children:[V&&y.jsxs(y.Fragment,{children:[y.jsxs(Al,{to:F,className:"flex items-center gap-1 hover:opacity-80",children:[y.jsx(Fs,{color:V.color,icon:V.icon,size:12}),y.jsx("span",{className:"font-mono tabular-nums",style:{color:V.color},children:V.key})]}),y.jsx(IT,{size:11,className:"text-faint shrink-0"})]}),y.jsx(Dx,{kind:t.kind,compact:!0}),t.sequenceId&&V&&y.jsxs("span",{className:"font-mono text-faint tabular-nums",children:[V.key,"-",t.sequenceId]})]}),y.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[y.jsx(nF,{state:Z,dirty:_?Object.keys(_).length>0:!1}),H&&y.jsx("button",{className:`p-1 -m-1 rounded hover:bg-sidebar ${t.pinned?"text-accent":"text-faint hover:text-ink"}`,onClick:()=>o.mutate({id:t.id,fields:{pinned:!t.pinned}}),title:t.pinned?"Unpin from opening brief":"Pin to opening brief",children:y.jsx(yx,{size:13,fill:t.pinned?"currentColor":"none"})}),V&&y.jsx(Al,{to:`/p/${V.key}/e/${t.id}`,className:"p-1 -m-1 text-faint hover:text-ink rounded hover:bg-sidebar",title:"Open as full page",children:y.jsx(zT,{size:13})}),y.jsx("button",{className:"p-1 -m-1 text-faint hover:text-danger rounded hover:bg-danger/10",onClick:ee,title:"Delete",children:y.jsx(GT,{size:13})})]})]}),y.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:y.jsxs("div",{className:"px-6 py-5 space-y-4",children:[y.jsx("input",{className:`w-full text-lg font-semibold bg-transparent border-none outline-none focus:outline-none px-0 py-1 ${p?"":"placeholder:text-muted/60 placeholder:italic"}`,value:p,placeholder:H?"Untitled":"Title",onChange:Y=>m(Y.target.value),autoFocus:!0}),y.jsx(tF,{isTask:t.kind==="task",status:S,setStatus:C,dueDate:Q,setDueDate:R,priority:I,setPriority:j,tagsStr:b,setTagsStr:w,completedAt:t.completedAt,createdAt:t.createdAt,actorKind:t.actorKind}),H&&l&&y.jsxs("button",{className:"w-full text-left flex items-center gap-2 text-xs px-3 py-2 rounded border border-line bg-sidebar/50 hover:border-accent hover:bg-accentSoft/40 transition-colors",onClick:()=>f(l.id),title:"Open linked task",children:[y.jsx(qB,{size:12,className:"text-faint"}),y.jsx("span",{className:"text-faint",children:"Linked to task:"}),l.sequenceId&&V&&y.jsxs("span",{className:"font-mono text-faint tabular-nums",children:[V.key,"-",l.sequenceId]}),y.jsx("span",{className:"text-ink truncate",children:_n(l)})]}),y.jsx("div",{className:"border border-line rounded-md overflow-hidden bg-surface",children:y.jsx(gx,{value:O,onChange:Y=>k(Y),extensions:[B$()],basicSetup:{lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1},theme:"light",minHeight:"220px",placeholder:"Write in Markdown…"})}),O&&y.jsxs("details",{className:"text-xxs text-muted",children:[y.jsx("summary",{className:"cursor-pointer hover:text-ink",children:"Preview rendered Markdown"}),y.jsx("div",{className:"mt-2 p-3 border border-line rounded bg-sidebar/30",children:y.jsx(iF,{body:O})})]}),t.kind==="task"&&y.jsx(rF,{related:s??[],onOpen:f,onAdd:()=>{V&&h({kind:"quick-create",projectId:V.id,initialKind:"note",parentId:t.id})},project:V})]})})]})}function tF({isTask:n,status:e,setStatus:t,dueDate:r,setDueDate:i,priority:s,setPriority:l,tagsStr:o,setTagsStr:u,completedAt:h,createdAt:f,actorKind:p}){return y.jsxs("div",{className:"grid grid-cols-[80px_1fr] gap-x-3 gap-y-1.5 items-center text-xs",children:[n&&y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-faint",children:"Status"}),y.jsxs("span",{className:"flex items-center gap-1.5",children:[y.jsx(Oc,{status:e,size:12}),y.jsx("select",{className:"bg-transparent border-none text-xs text-ink hover:bg-sidebar rounded px-1 -mx-1 focus:outline-none focus:ring-1 focus:ring-accent",value:e,onChange:m=>t(m.target.value),children:hE.map(m=>y.jsx("option",{value:m,children:t0[m]??m},m))})]}),y.jsx("span",{className:"text-faint",children:"Due"}),y.jsxs("span",{className:"flex items-center gap-1.5",children:[y.jsx("input",{type:"date",className:"bg-transparent border-none text-xs text-ink hover:bg-sidebar rounded px-1 -mx-1 focus:outline-none focus:ring-1 focus:ring-accent",value:r,onChange:m=>i(m.target.value)}),!r&&y.jsx("span",{className:"text-faint text-xxs",children:"inbox"}),r&&y.jsx("button",{className:"text-faint hover:text-danger text-xxs",onClick:()=>i(""),title:"Clear",children:"✕"})]}),y.jsx("span",{className:"text-faint",children:"Priority"}),y.jsxs("span",{className:"flex items-center gap-1.5",children:[y.jsx(ua,{priority:s,size:12}),y.jsx("select",{className:"bg-transparent border-none text-xs text-ink hover:bg-sidebar rounded px-1 -mx-1 focus:outline-none focus:ring-1 focus:ring-accent",value:s,onChange:m=>l(m.target.value),children:oE.map(m=>y.jsx("option",{value:m,children:yc[m]},m))})]}),e==="done"&&y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-faint",children:"Completed"}),y.jsx("span",{className:"text-muted",children:h?new Date(h).toLocaleString():"Not recorded"})]})]}),y.jsx("span",{className:"text-faint",children:"Tags"}),y.jsx("input",{className:"bg-transparent border-none text-xs text-ink hover:bg-sidebar rounded px-1 -mx-1 focus:outline-none focus:ring-1 focus:ring-accent",value:o,onChange:m=>u(m.target.value),placeholder:"comma, separated"}),y.jsx("span",{className:"text-faint",children:"Created"}),y.jsxs("span",{className:"text-muted",children:[new Date(f).toLocaleString()," · ",y.jsx("span",{className:"text-ink",children:p})]})]})}function nF({state:n,dirty:e}){return n==="saving"?y.jsxs("span",{className:"flex items-center gap-1 text-xxs text-muted",children:[y.jsx(ZT,{size:11,className:"animate-spin"}),"Saving…"]}):n==="saved"&&!e?y.jsxs("span",{className:"flex items-center gap-1 text-xxs text-faint",children:[y.jsx(jB,{size:11}),"Saved"]}):n==="error"?y.jsx("span",{className:"text-xxs text-danger",children:"Save failed"}):e?y.jsxs("span",{className:"flex items-center gap-1 text-xxs text-faint",children:[y.jsx(TB,{size:11}),"Unsaved"]}):null}function rF({related:n,onOpen:e,onAdd:t,project:r}){const i=n.filter(s=>s.kind==="note");return y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-baseline justify-between mb-1.5",children:[y.jsxs("h3",{className:"text-xxs uppercase tracking-wider text-muted font-semibold",children:["Related notes ",y.jsx("span",{className:"text-faint",children:i.length})]}),y.jsx("button",{onClick:t,className:"text-xs text-accent hover:underline",children:"+ Add note"})]}),i.length===0?y.jsx("div",{className:"text-xs text-faint border border-dashed border-line rounded p-3 text-center",children:"No linked notes yet."}):y.jsx("div",{className:"border border-line rounded-md divide-y divide-lineSoft overflow-hidden",children:i.map(s=>y.jsxs("button",{className:"w-full text-left px-3 py-2 hover:bg-sidebar flex items-start gap-2",onClick:()=>e(s.id),children:[y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:`text-sm truncate ${Zi(s)?"italic text-muted":"text-ink"}`,children:_n(s)}),!Zi(s)&&s.body&&y.jsx("div",{className:"text-xxs text-muted truncate mt-0.5",children:s.body.replace(/\n/g," ").slice(0,140)})]}),s.pinned&&y.jsx(yx,{size:11,className:"text-accent shrink-0 mt-1",fill:"currentColor"})]},s.id))}),!r&&y.jsx("div",{className:"text-xxs text-faint mt-1",children:"No project context — link picker unavailable."})]})}function iF({body:n}){return y.jsx("div",{className:"text-sm leading-relaxed text-ink space-y-2 [&_h1]:text-lg [&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mb-1.5 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mb-1 [&_h3]:font-semibold [&_h3]:mt-2 [&_p]:my-1 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5 [&_li]:my-0.5 [&_code]:bg-sidebar [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-xs [&_pre]:bg-sidebar [&_pre]:p-2 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_a]:text-accent [&_a]:underline [&_blockquote]:border-l-2 [&_blockquote]:border-line [&_blockquote]:pl-3 [&_blockquote]:text-muted [&_table]:border-collapse [&_th]:border [&_th]:border-line [&_th]:px-2 [&_th]:py-1 [&_td]:border [&_td]:border-line [&_td]:px-2 [&_td]:py-1",children:y.jsx(Mj,{remarkPlugins:[nE],children:n})})}function sF(n,e){const[t,r]=L.useState(()=>{if(typeof window>"u")return e;try{const s=window.localStorage.getItem(n);return s===null?e:JSON.parse(s)}catch{return e}});L.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(n,JSON.stringify(t))}catch{}},[n,t]);const i=L.useCallback(s=>r(s),[]);return[t,i]}function n0({trigger:n,children:e,align:t="start"}){const[r,i]=L.useState(!1),s=L.useRef(null);return L.useEffect(()=>{if(!r)return;const l=u=>{s.current&&!s.current.contains(u.target)&&i(!1)},o=u=>{u.key==="Escape"&&i(!1)};return window.addEventListener("mousedown",l),window.addEventListener("keydown",o),()=>{window.removeEventListener("mousedown",l),window.removeEventListener("keydown",o)}},[r]),y.jsxs("div",{className:"relative",ref:s,children:[y.jsx("span",{onClick:l=>{l.stopPropagation(),i(o=>!o)},children:n}),r&&y.jsx("div",{className:`popover top-full mt-1 ${t==="end"?"right-0":"left-0"}`,onClick:l=>l.stopPropagation(),children:e(()=>i(!1))})]})}const dO={key:"Key (A→Z)",name:"Name (A→Z)",recent:"Recently active"};function lF(n,e){const t=[...n];return e==="key"?t.sort((r,i)=>r.key.localeCompare(i.key)):e==="name"?t.sort((r,i)=>r.name.localeCompare(i.name)):t.sort((r,i)=>+new Date(i.updatedAt)-+new Date(r.updatedAt))}function oF(){const{data:n,isLoading:e}=sr(),{open:t}=Dt(),{key:r}=Id(),[i,s]=sF("botnote.projectSort","key"),l=L.useMemo(()=>lF(n??[],i),[n,i]);return y.jsxs("aside",{className:"w-52 shrink-0 border-r border-line bg-sidebar flex flex-col scrollbar-thin overflow-y-auto text-sm",children:[y.jsxs("nav",{className:"px-1.5 pt-2 space-y-px",children:[y.jsx(bu,{to:"/",end:!0,icon:y.jsx(QB,{size:12,className:"opacity-70"}),label:"Tasks"}),y.jsx(bu,{to:"/today",icon:y.jsx(YT,{size:12,className:"opacity-70"}),label:"Today"}),y.jsx(bu,{to:"/inbox",icon:y.jsx(Td,{size:12,className:"opacity-70"}),label:"Inbox"}),y.jsx(bu,{to:"/dashboard",icon:y.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 14 14",className:"opacity-70",children:[y.jsx("rect",{x:"2",y:"2",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),y.jsx("rect",{x:"8",y:"2",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),y.jsx("rect",{x:"2",y:"8",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),y.jsx("rect",{x:"8",y:"8",width:"4",height:"4",rx:"0.5",fill:"currentColor"})]}),label:"Workspace"})]}),y.jsxs("div",{className:"mt-3 px-3 py-1.5 flex items-center justify-between",children:[y.jsx("div",{className:"text-xxs uppercase tracking-wider text-muted font-medium",children:"Projects"}),y.jsxs("div",{className:"flex items-center gap-0.5",children:[y.jsx(n0,{trigger:y.jsx("button",{className:"text-muted hover:text-ink p-0.5 rounded hover:bg-sidebarHover flex items-center gap-0.5",title:`Sort: ${dO[i]}`,children:y.jsx($B,{size:11})}),align:"end",children:o=>y.jsx(y.Fragment,{children:Object.keys(dO).map(u=>y.jsxs("button",{className:"popover-item",onClick:()=>{s(u),o()},children:[y.jsx("span",{children:dO[u]}),i===u&&y.jsx("span",{className:"ml-auto text-faint",children:"✓"})]},u))})}),y.jsx("button",{className:"text-muted hover:text-ink p-0.5 rounded hover:bg-sidebarHover",title:"New project (n)",onClick:()=>t({kind:"new-project"}),children:y.jsx(rp,{size:11})})]})]}),y.jsxs("nav",{className:"px-1.5 space-y-px flex-1",children:[e&&y.jsx("div",{className:"px-2 py-1 text-xs text-faint",children:"Loading…"}),!e&&l.length===0&&y.jsxs("button",{className:"w-full text-left px-2 py-1 text-xs text-muted hover:bg-sidebarHover rounded",onClick:()=>t({kind:"new-project"}),children:["No projects yet. ",y.jsx("span",{className:"text-accent",children:"Create →"})]}),l.map(o=>y.jsxs(S2,{to:`/p/${o.key}`,className:({isActive:u})=>`flex items-center gap-2 px-2 py-1 text-xs rounded ${u||r===o.key?"bg-accentSoft text-accentText":"text-ink2 hover:bg-sidebarHover"}`,children:[y.jsx(Fs,{color:o.color,icon:o.icon,size:11}),y.jsx("span",{className:"font-mono text-xxs tabular-nums opacity-90 shrink-0",style:{color:o.color},children:o.key}),y.jsx("span",{className:"truncate text-muted",children:o.name})]},o.id))]}),y.jsx("div",{className:"border-t border-line/60 px-1.5 py-1.5",children:y.jsx(bu,{to:"/settings",icon:y.jsx(Ox,{size:12,className:"opacity-70"}),label:"Settings"})})]})}function bu({to:n,end:e,icon:t,label:r}){return y.jsxs(S2,{to:n,end:e,className:({isActive:i})=>`flex items-center gap-2 px-2 py-1 rounded text-xs ${i?"bg-accentSoft text-accentText":"text-ink2 hover:bg-sidebarHover"}`,children:[t,y.jsx("span",{children:r})]})}function aF(){const{open:n}=Dt(),e=Ws(),t=typeof navigator<"u"&&navigator.platform.includes("Mac")?"⌘":"Ctrl";async function r(){try{await yt.logout()}catch{}e("/login",{replace:!0})}return y.jsxs("header",{className:"h-11 flex items-center justify-between px-3 border-b border-line bg-surface",children:[y.jsxs(Al,{to:"/",className:"flex items-center gap-1.5 text-ink hover:opacity-90",children:[y.jsx("img",{src:"/favicon.svg",alt:"","aria-hidden":"true",className:"w-[18px] h-[18px]"}),y.jsx("span",{className:"text-xs font-semibold tracking-tight",children:"botnote"})]}),y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{className:"btn !pl-2 !pr-1.5 gap-2 min-w-[220px] !justify-between text-muted",onClick:()=>n({kind:"search"}),title:"Search (⌘K)",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(qT,{size:12}),y.jsx("span",{className:"text-xs",children:"Search…"})]}),y.jsxs("kbd",{children:[t,"K"]})]}),y.jsxs("button",{className:"btn btn-primary",onClick:()=>n({kind:"quick-create"}),title:"Quick create (c)",children:[y.jsx(rp,{size:12}),y.jsx("span",{className:"text-xs",children:"New"}),y.jsx("kbd",{className:"!bg-white/15 !border-white/25 !text-white",children:"c"})]}),y.jsx("button",{className:"btn !px-1.5 !py-1 text-muted hover:!text-red-500",onClick:r,title:"Log out","aria-label":"Log out",children:y.jsx(XT,{size:12})})]})]})}function uF(){return b5(),y.jsxs("div",{className:"h-full w-full flex flex-col",children:[y.jsx(aF,{}),y.jsxs("div",{className:"flex-1 min-h-0 flex",children:[y.jsx(oF,{}),y.jsx("main",{className:"flex-1 min-w-0 min-h-0 overflow-hidden bg-bg",children:y.jsx(r5,{})})]}),y.jsx(Jq,{})]})}function fE({icon:n,color:e,onIconChange:t,onColorChange:r}){return y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-xxs text-muted uppercase tracking-wider mb-1",children:"Color"}),y.jsx("div",{className:"flex flex-wrap gap-1.5",children:Gq.map(i=>y.jsx("button",{type:"button",onClick:()=>r(i.value),className:"relative w-6 h-6 rounded-full border border-line/80 hover:scale-110 transition-transform",style:{backgroundColor:i.value},title:i.name,children:e===i.value&&y.jsx(np,{size:12,className:"absolute inset-0 m-auto text-white",strokeWidth:3})},i.value))})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-xxs text-muted uppercase tracking-wider mb-1",children:"Icon"}),y.jsx("div",{className:"flex flex-wrap gap-1",children:aE.map(i=>y.jsx("button",{type:"button",onClick:()=>t(i.name),className:`w-7 h-7 rounded flex items-center justify-center border transition-colors ${n===i.name?"border-accent bg-accentSoft":"border-line bg-surface hover:bg-sidebar"}`,title:i.name,children:y.jsx(Fs,{color:e,icon:i.name,size:14})},i.name))})]})]})}function xc({title:n,children:e,width:t="max-w-2xl"}){const{close:r}=Dt();return L.useEffect(()=>{const i=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=i}},[]),y.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-20 px-4 bg-ink/20",onClick:r,children:y.jsxs("div",{className:`w-full ${t} bg-surface border border-line rounded-lg shadow-2xl overflow-hidden`,onClick:i=>i.stopPropagation(),children:[y.jsxs("div",{className:"h-9 px-3 flex items-center justify-between border-b border-line",children:[y.jsx("div",{className:"text-xs font-semibold text-ink",children:n}),y.jsx("button",{onClick:r,className:"text-muted hover:text-ink p-0.5 rounded hover:bg-line/60",title:"Close (Esc)",children:y.jsx(By,{size:14})})]}),e]})})}function cF({projectId:n}){const{data:e}=sr(),t=e==null?void 0:e.find(m=>m.id===n),r=zq(),{close:i}=Dt(),[s,l]=L.useState(""),[o,u]=L.useState(uE),[h,f]=L.useState(cE);if(L.useEffect(()=>{t&&(l(t.name),u(t.color),f(t.icon))},[t==null?void 0:t.id]),!t)return y.jsx(xc,{title:"Project settings",width:"max-w-md",children:y.jsx("div",{className:"p-4 text-sm text-muted",children:"Loading…"})});const p=s!==t.name||o!==t.color||h!==t.icon;return y.jsx(xc,{title:`Settings · ${t.key}`,width:"max-w-md",children:y.jsxs("form",{onSubmit:async m=>{m.preventDefault(),p&&(await r.mutateAsync({id:t.id,fields:{name:s.trim(),color:o,icon:h}}),i())},className:"p-3 space-y-3",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-xxs text-muted uppercase tracking-wider mb-1",children:"Name"}),y.jsx("input",{autoFocus:!0,className:"input",value:s,onChange:m=>l(m.target.value)})]}),y.jsx(fE,{icon:h,color:o,onIconChange:f,onColorChange:u}),y.jsxs("div",{className:"flex justify-between items-center pt-1",children:[y.jsx("div",{className:"text-xxs text-faint",children:"Edit AGENTS.md from project header → AGENTS.md tab."}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx("button",{type:"button",className:"btn",onClick:i,children:"Cancel"}),y.jsx("button",{type:"submit",className:"btn btn-primary",disabled:!p||r.isPending,children:r.isPending?"Saving…":"Save"})]})]}),r.error&&y.jsx("div",{className:"text-xs text-danger",children:r.error.message})]})})}function hF(){const[n,e]=L.useState(""),[t,r]=L.useState(""),[i,s]=L.useState(""),[l,o]=L.useState(uE),[u,h]=L.useState(cE),f=Iq(),{close:p}=Dt(),m=Ws(),O=/^[A-Z][A-Z0-9_]{0,19}$/.test(n)&&t.trim().length>0;return y.jsx(xc,{title:"New project",width:"max-w-md",children:y.jsxs("form",{onSubmit:async k=>{if(k.preventDefault(),!O)return;const b=await f.mutateAsync({key:n.trim(),name:t.trim(),color:l,icon:u,agentsMd:i.trim()});p(),m(`/p/${b.key}`)},className:"p-3 space-y-3",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-xxs text-muted uppercase tracking-wider mb-1",children:"Key (uppercase, e.g. BOT)"}),y.jsx("input",{autoFocus:!0,className:"input font-mono uppercase",value:n,onChange:k=>e(k.target.value.toUpperCase()),placeholder:"BOT",maxLength:20})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-xxs text-muted uppercase tracking-wider mb-1",children:"Name"}),y.jsx("input",{className:"input",value:t,onChange:k=>r(k.target.value),placeholder:"botnote"})]}),y.jsx(fE,{icon:u,color:l,onIconChange:h,onColorChange:o}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-xxs text-muted uppercase tracking-wider mb-1",children:"AGENTS.md (optional)"}),y.jsx("textarea",{className:"input !h-24 py-1.5 font-mono text-xs leading-snug resize-y",value:i,onChange:k=>s(k.target.value),placeholder:`## Critical
460
+ - ALWAYS run pnpm typecheck before commit.`})]}),y.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[y.jsx("button",{type:"button",className:"btn",onClick:p,children:"Cancel"}),y.jsx("button",{type:"submit",className:"btn btn-primary",disabled:!O||f.isPending,children:f.isPending?"Creating…":"Create project"})]}),f.error&&y.jsx("div",{className:"text-xs text-danger",children:f.error.message})]})})}function fF({initialProjectId:n,initialKind:e,initialParentId:t}){const{data:r}=sr(),[i,s]=L.useState(e??"task"),[l,o]=L.useState(n??""),[u,h]=L.useState(""),[f,p]=L.useState(""),[m,O]=L.useState(""),[k,b]=L.useState(""),[w,S]=L.useState("none"),[C,Q]=L.useState(!1),[R,I]=L.useState(t??""),j=Zq(),{close:Z}=Dt(),{open:q}=Vi(),J=r==null?void 0:r.find(H=>H.id===l),_=i==="note",{data:V}=_x(_&&l?l:void 0,["task"]),F=l.length>0&&(_?u.trim().length>0||f.trim().length>0:u.trim().length>0);return y.jsx(xc,{title:"Quick create",width:"max-w-xl",children:y.jsxs("form",{onSubmit:async H=>{if(H.preventDefault(),!F)return;const ee=u.trim(),Y=m.split(",").map(ye=>ye.trim()).filter(Boolean),me=i==="task"?await j.mutateAsync({kind:"task",projectId:l,title:ee,body:f.trim(),tags:Y,actorKind:"human",dueAt:k?new Date(k).toISOString():null,priority:w}):await j.mutateAsync({kind:"note",projectId:l,title:ee||null,body:f.trim(),tags:Y,actorKind:"human",pinned:C,parentId:R||null});Z(),q(me.id)},className:"p-3 space-y-3",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("div",{className:"seg w-32",children:qq.map(H=>y.jsx("button",{type:"button","data-active":i===H,onClick:()=>s(H),className:"flex-1 justify-center capitalize",children:H},H))}),y.jsxs("select",{className:"input flex-1",value:l,onChange:H=>o(H.target.value),children:[y.jsx("option",{value:"",children:"— pick a project —"}),r==null?void 0:r.map(H=>y.jsxs("option",{value:H.id,children:[H.key," · ",H.name]},H.id))]})]}),y.jsx("input",{autoFocus:!0,className:"input",placeholder:_?"Title (optional)":"Title",value:u,onChange:H=>h(H.target.value)}),y.jsx("textarea",{className:"input !h-32 py-1.5 font-mono text-xs leading-snug resize-y",placeholder:"Body (Markdown, optional)",value:f,onChange:H=>p(H.target.value)}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx("input",{className:"input flex-1",placeholder:"Tags (comma-separated, optional)",value:m,onChange:H=>O(H.target.value)}),i==="task"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"date",className:"input w-36",value:k,onChange:H=>b(H.target.value),title:"Due date"}),y.jsx("select",{className:"input w-36",value:w,onChange:H=>S(H.target.value),title:"Priority",children:oE.map(H=>y.jsx("option",{value:H,children:yc[H]},H))})]})]}),i==="task"&&w!=="none"&&y.jsxs("div",{className:"flex items-center gap-1.5 text-xxs text-muted",children:[y.jsx(ua,{priority:w,size:11}),y.jsxs("span",{children:[yc[w]," priority"]})]}),_&&y.jsxs(y.Fragment,{children:[y.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted cursor-pointer",children:[y.jsx("input",{type:"checkbox",checked:C,onChange:H=>Q(H.target.checked)}),y.jsx("span",{children:"📌 Pin to project — auto-include in agent opening brief"})]}),V&&V.length>0&&y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted",children:[y.jsx("span",{className:"shrink-0",children:"Link to task:"}),y.jsxs("select",{className:"input flex-1 !h-7 text-xs",value:R,onChange:H=>I(H.target.value),children:[y.jsx("option",{value:"",children:"— none —"}),V.map(H=>y.jsxs("option",{value:H.id,children:[J!=null&&J.key&&H.sequenceId?`${J.key}-${H.sequenceId} · `:"",_n(H)]},H.id))]})]})]}),y.jsxs("div",{className:"flex justify-between items-center pt-1",children:[y.jsxs("div",{className:"text-xxs text-muted",children:[y.jsx("kbd",{children:"⌘"}),"+",y.jsx("kbd",{children:"Enter"})," to submit · ",y.jsx("kbd",{children:"Esc"})," to close"]}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx("button",{type:"button",className:"btn",onClick:Z,children:"Cancel"}),y.jsx("button",{type:"submit",className:"btn btn-primary",disabled:!F||j.isPending,children:j.isPending?"Creating…":`Create ${i}`})]})]}),j.error&&y.jsx("div",{className:"text-xs text-danger",children:j.error.message})]})})}const dF={task:"task",note:"note"};function pF(){const[n,e]=L.useState(""),[t,r]=L.useState(""),{close:i}=Dt(),{open:s}=Vi(),{data:l}=sr();L.useEffect(()=>{const f=setTimeout(()=>r(n.trim()),200);return()=>clearTimeout(f)},[n]);const{data:o,isFetching:u}=sE(t?{query:t,limit:20}:null),h=L.useMemo(()=>{const f=new Map;return l==null||l.forEach(p=>f.set(p.id,p.key)),f},[l]);return y.jsxs(xc,{title:"Search",children:[y.jsx("div",{className:"p-3 pb-1",children:y.jsxs("div",{className:"flex items-center gap-2 px-2 h-9 border border-line rounded bg-surface focus-within:border-accent focus-within:ring-1 focus-within:ring-accentSoft",children:[y.jsx(qT,{size:14,className:"text-muted"}),y.jsx("input",{autoFocus:!0,placeholder:"Hybrid search (BM25 + vector + time decay)",className:"flex-1 bg-transparent border-none outline-none text-sm",value:n,onChange:f=>e(f.target.value)}),u&&y.jsx("span",{className:"text-xxs text-muted",children:"searching…"})]})}),y.jsxs("div",{className:"max-h-[60vh] overflow-y-auto scrollbar-thin",children:[t&&!u&&(!o||o.hits.length===0)&&y.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted",children:"No matches."}),o==null?void 0:o.hits.map(f=>{const p=f.entity.projectId?h.get(f.entity.projectId):null;return y.jsxs("button",{onClick:()=>{i(),s(f.entity.id)},className:"w-full px-3 py-2 row-hover text-left flex items-start gap-3 border-t border-line/60",children:[y.jsx("span",{className:"chip mt-0.5",children:dF[f.entity.kind]}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-sm text-ink truncate",children:_n(f.entity)}),y.jsx("div",{className:"text-xs text-muted truncate mt-0.5",children:f.entity.body.replace(/\n/g," ").slice(0,140)||"—"}),y.jsxs("div",{className:"text-xxs text-faint mt-0.5 flex gap-2",children:[p&&y.jsxs("span",{children:["· ",p]}),y.jsxs("span",{children:["· score ",f.score.toFixed(3)]}),f.components.bm25&&y.jsx("span",{children:"· bm25"}),f.components.cosine&&y.jsx("span",{children:"· vec"})]})]}),y.jsx(bB,{size:13,className:"text-faint mt-1"})]},f.entity.id)}),o&&y.jsxs("div",{className:"px-3 py-2 text-xxs text-muted border-t border-line/60",children:[o.hits.length," result(s) · embedding ",o.embeddingUsed?"ON":"OFF (BM25-only)"]})]})]})}function mF(){const{active:n}=Dt();if(!n)return null;switch(n.kind){case"search":return y.jsx(pF,{});case"quick-create":return y.jsx(fF,{initialProjectId:n.projectId,initialKind:n.initialKind,initialParentId:n.parentId});case"new-project":return y.jsx(hF,{});case"edit-project":return y.jsx(cF,{projectId:n.projectId})}}const gF=`## Critical
461
+ - NEVER commit credentials.
462
+ - ALWAYS run tests before commit.
463
+
464
+ ## Stack
465
+ - (describe your stack here)
466
+
467
+ ## Conventions
468
+ - (idempotent writes, naming, etc.)
469
+ `;function OF(){const{key:n}=Id(),{data:e}=iE(n),t=Xq(),[r,i]=L.useState(""),[s,l]=L.useState("edit");if(L.useEffect(()=>{e&&i(e.agentsMd)},[e==null?void 0:e.id]),!e)return y.jsx("div",{className:"p-6 text-sm text-muted",children:"Loading…"});const o=r!==e.agentsMd;return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"px-6 pt-4 pb-2 flex items-center justify-between border-b border-line bg-surface",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[y.jsxs(Al,{to:`/p/${e.key}`,className:"text-muted hover:text-ink flex items-center gap-1.5",children:[y.jsx(DT,{size:14}),y.jsx(Fs,{color:e.color,icon:e.icon,size:12}),y.jsx("span",{className:"font-mono text-xs",style:{color:e.color},children:e.key})]}),y.jsx("span",{className:"text-muted",children:"/"}),y.jsxs("div",{className:"flex items-center gap-1.5 text-ink",children:[y.jsx(FT,{size:14}),y.jsx("span",{className:"font-semibold",children:"AGENTS.md"})]})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs("div",{className:"flex border border-line rounded overflow-hidden",children:[y.jsx("button",{className:`px-2 py-1 text-xs flex items-center gap-1 ${s==="edit"?"bg-accent text-white":"bg-surface text-muted hover:bg-sidebar"}`,onClick:()=>l("edit"),children:"Edit"}),y.jsxs("button",{className:`px-2 py-1 text-xs flex items-center gap-1 border-l border-line ${s==="preview"?"bg-accent text-white":"bg-surface text-muted hover:bg-sidebar"}`,onClick:()=>l("preview"),children:[y.jsx(RB,{size:11})," Preview"]})]}),y.jsxs("button",{className:"btn btn-primary",disabled:!o||t.isPending,onClick:async()=>{await t.mutateAsync({id:e.id,agentsMd:r})},children:[y.jsx(HB,{size:12})," ",t.isPending?"Saving…":o?"Save":"Saved"]})]})]}),y.jsx("div",{className:"px-6 pt-2 text-xxs text-muted",children:"This text is auto-injected into every agent's opening brief for this project. Keep it short (< 200 lines) and imperative."}),y.jsx("div",{className:"flex-1 min-h-0 px-6 pb-6 pt-3",children:s==="edit"?y.jsx("div",{className:"h-full border border-line rounded bg-surface overflow-hidden",children:y.jsx(gx,{value:r,onChange:u=>i(u),extensions:[B$()],placeholder:gF,height:"100%",minHeight:"100%",theme:"light",basicSetup:{lineNumbers:!0,foldGutter:!1,highlightActiveLine:!0}})}):y.jsx("div",{className:"h-full overflow-y-auto scrollbar-thin border border-line rounded bg-surface p-6",children:y.jsx("div",{className:"prose-sm max-w-2xl text-sm leading-relaxed text-ink space-y-2 [&_h1]:text-lg [&_h1]:font-semibold [&_h2]:text-base [&_h2]:font-semibold [&_ul]:list-disc [&_ul]:pl-5 [&_code]:bg-sidebar [&_code]:px-1 [&_code]:rounded",children:r?y.jsx(Mj,{remarkPlugins:[nE],children:r}):y.jsx("div",{className:"text-sm text-faint italic",children:"(empty)"})})})})]})}function yF(){const{data:n}=sr(),{data:e}=Nq({limit:20}),t=Vi();return y.jsx("div",{className:"h-full overflow-y-auto scrollbar-thin",children:y.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-8 space-y-8",children:[y.jsxs("header",{children:[y.jsx("h1",{className:"text-xl font-semibold text-ink",children:"Workspace"}),y.jsx("p",{className:"text-sm text-muted mt-1",children:"Projects, tasks, notes, and memory — written by you or by your agents."})]}),y.jsxs("section",{children:[y.jsxs("div",{className:"flex items-center gap-2 mb-3 text-muted",children:[y.jsx(DB,{size:14}),y.jsxs("h2",{className:"text-xs uppercase tracking-wider font-medium",children:["Projects (",(n==null?void 0:n.length)??0,")"]})]}),n&&n.length===0?y.jsxs("div",{className:"border border-dashed border-line rounded-lg p-6 text-center text-sm text-muted",children:["No projects yet. Press ",y.jsx("kbd",{children:"n"})," to create one."]}):y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2",children:n==null?void 0:n.map(r=>y.jsxs(Al,{to:`/p/${r.key}`,className:"border border-line rounded-md p-3 bg-surface hover:border-accent/50 transition-colors block",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(Fs,{color:r.color,icon:r.icon,size:12}),y.jsx("span",{className:"font-mono text-xs",style:{color:r.color},children:r.key})]}),y.jsx("span",{className:"text-xxs text-faint",children:new Date(r.updatedAt).toLocaleDateString()})]}),y.jsx("div",{className:"text-sm font-medium text-ink mt-1 truncate",children:r.name}),r.agentsMd&&y.jsxs("div",{className:"text-xxs text-muted mt-1 truncate",children:["AGENTS.md · ",r.agentsMd.length," chars"]})]},r.id))})]}),y.jsxs("section",{children:[y.jsxs("div",{className:"flex items-center gap-2 mb-3 text-muted",children:[y.jsx(vB,{size:14}),y.jsx("h2",{className:"text-xs uppercase tracking-wider font-medium",children:"Recent activity"})]}),e&&e.length===0?y.jsx("div",{className:"text-sm text-muted",children:"Nothing yet."}):y.jsx("div",{className:"bg-surface border border-line rounded-md divide-y divide-line/60",children:e==null?void 0:e.map(r=>{const i=n==null?void 0:n.find(s=>s.id===r.projectId);return y.jsxs("button",{type:"button",onClick:()=>t.open(r.id),className:"w-full text-left flex items-center gap-3 px-3 py-2 row-hover",children:[y.jsx(Dx,{kind:r.kind}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:`text-sm truncate ${Zi(r)?"text-muted italic":"text-ink"}`,children:_n(r)}),y.jsxs("div",{className:"text-xxs text-muted mt-0.5",children:[i?i.key:"—"," · ",xF(r.createdAt)," ·"," ",y.jsx("span",{className:"opacity-70",children:r.actorKind})]})]})]},r.id)})})]})]})})}function xF(n){const e=Date.now()-new Date(n).getTime();return e<6e4?"just now":e<36e5?`${Math.floor(e/6e4)}m ago`:e<864e5?`${Math.floor(e/36e5)}h ago`:e<7*864e5?`${Math.floor(e/864e5)}d ago`:new Date(n).toLocaleDateString()}function kF(){const{key:n,id:e}=Id();return!n||!e?y.jsx(Hv,{to:"/",replace:!0}):y.jsx(Hv,{to:`/p/${n}?d=${e}`,replace:!0})}const dE=6048e5,vF=864e5,$f=43200,jP=1440,EP=Symbol.for("constructDateFrom");function rr(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&EP in n?n[EP](e):n instanceof Date?new n.constructor(e):new Date(e)}function Ct(n,e){return rr(e||n,n)}function cp(n,e,t){const r=Ct(n,t==null?void 0:t.in);return isNaN(e)?rr(n,NaN):(e&&r.setDate(r.getDate()+e),r)}function bF(n,e,t){const r=Ct(n,t==null?void 0:t.in);if(isNaN(e))return rr(n,NaN);if(!e)return r;const i=r.getDate(),s=rr(n,r.getTime());s.setMonth(r.getMonth()+e+1,0);const l=s.getDate();return i>=l?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}let wF={};function Sa(){return wF}function fi(n,e){var o,u,h,f;const t=Sa(),r=(e==null?void 0:e.weekStartsOn)??((u=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:u.weekStartsOn)??t.weekStartsOn??((f=(h=t.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,i=Ct(n,e==null?void 0:e.in),s=i.getDay(),l=(s<r?7:0)+s-r;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function Rd(n,e){return fi(n,{...e,weekStartsOn:1})}function pE(n,e){const t=Ct(n,e==null?void 0:e.in),r=t.getFullYear(),i=rr(t,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=Rd(i),l=rr(t,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const o=Rd(l);return t.getTime()>=s.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function Nd(n){const e=Ct(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function Xl(n,...e){const t=rr.bind(null,n||e.find(r=>typeof r=="object"));return e.map(t)}function ca(n,e){const t=Ct(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function SF(n,e,t){const[r,i]=Xl(t==null?void 0:t.in,n,e),s=ca(r),l=ca(i),o=+s-Nd(s),u=+l-Nd(l);return Math.round((o-u)/vF)}function PF(n,e){const t=pE(n,e),r=rr(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Rd(r)}function CF(n,e,t){return cp(n,e*7,t)}function Wf(n,e){const t=+Ct(n)-+Ct(e);return t<0?-1:t>0?1:t}function mE(n){return rr(n,Date.now())}function QF(n,e,t){const[r,i]=Xl(t==null?void 0:t.in,n,e);return+ca(r)==+ca(i)}function $F(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function TF(n){return!(!$F(n)&&typeof n!="number"||isNaN(+Ct(n)))}function jF(n,e,t){const[r,i]=Xl(t==null?void 0:t.in,n,e),s=r.getFullYear()-i.getFullYear(),l=r.getMonth()-i.getMonth();return s*12+l}function EF(n){return e=>{const r=(n?Math[n]:Math.trunc)(e);return r===0?0:r}}function MF(n,e){return+Ct(n)-+Ct(e)}function Ix(n,e){const t=Ct(n,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}function gE(n,e){const t=Ct(n,e==null?void 0:e.in),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function AF(n,e){const t=Ct(n,e==null?void 0:e.in);return+Ix(t,e)==+gE(t,e)}function RF(n,e,t){const[r,i,s]=Xl(t==null?void 0:t.in,n,n,e),l=Wf(i,s),o=Math.abs(jF(i,s));if(o<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-l*o);let u=Wf(i,s)===-l;AF(r)&&o===1&&Wf(r,s)===1&&(u=!1);const h=l*(o-+u);return h===0?0:h}function NF(n,e,t){const r=MF(n,e)/1e3;return EF(t==null?void 0:t.roundingMethod)(r)}function LF(n,e){const t=Ct(n,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}function _F(n,e){const t=Ct(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function r0(n,e){var o,u,h,f;const t=Sa(),r=(e==null?void 0:e.weekStartsOn)??((u=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:u.weekStartsOn)??t.weekStartsOn??((f=(h=t.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,i=Ct(n,e==null?void 0:e.in),s=i.getDay(),l=(s<r?-7:0)+6-(s-r);return i.setDate(i.getDate()+l),i.setHours(23,59,59,999),i}const DF={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},IF=(n,e,t)=>{let r;const i=DF[n];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function pO(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const zF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ZF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},XF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},BF={date:pO({formats:zF,defaultWidth:"full"}),time:pO({formats:ZF,defaultWidth:"full"}),dateTime:pO({formats:XF,defaultWidth:"full"})},WF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},VF=(n,e,t,r)=>WF[n];function wu(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let i;if(r==="formatting"&&n.formattingValues){const l=n.defaultFormattingWidth||n.defaultWidth,o=t!=null&&t.width?String(t.width):l;i=n.formattingValues[o]||n.formattingValues[l]}else{const l=n.defaultWidth,o=t!=null&&t.width?String(t.width):n.defaultWidth;i=n.values[o]||n.values[l]}const s=n.argumentCallback?n.argumentCallback(e):e;return i[s]}}const qF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},FF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},YF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},UF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},GF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},HF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KF=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},JF={ordinalNumber:KF,era:wu({values:qF,defaultWidth:"wide"}),quarter:wu({values:FF,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wu({values:YF,defaultWidth:"wide"}),day:wu({values:UF,defaultWidth:"wide"}),dayPeriod:wu({values:GF,defaultWidth:"wide",formattingValues:HF,defaultFormattingWidth:"wide"})};function Su(n){return(e,t={})=>{const r=t.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=e.match(i);if(!s)return null;const l=s[0],o=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],u=Array.isArray(o)?tY(o,p=>p.test(l)):eY(o,p=>p.test(l));let h;h=n.valueCallback?n.valueCallback(u):u,h=t.valueCallback?t.valueCallback(h):h;const f=e.slice(l.length);return{value:h,rest:f}}}function eY(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function tY(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function nY(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const i=r[0],s=e.match(n.parsePattern);if(!s)return null;let l=n.valueCallback?n.valueCallback(s[0]):s[0];l=t.valueCallback?t.valueCallback(l):l;const o=e.slice(i.length);return{value:l,rest:o}}}const rY=/^(\d+)(th|st|nd|rd)?/i,iY=/\d+/i,sY={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},lY={any:[/^b/i,/^(a|c)/i]},oY={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},aY={any:[/1/i,/2/i,/3/i,/4/i]},uY={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},cY={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},hY={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fY={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dY={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},pY={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mY={ordinalNumber:nY({matchPattern:rY,parsePattern:iY,valueCallback:n=>parseInt(n,10)}),era:Su({matchPatterns:sY,defaultMatchWidth:"wide",parsePatterns:lY,defaultParseWidth:"any"}),quarter:Su({matchPatterns:oY,defaultMatchWidth:"wide",parsePatterns:aY,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Su({matchPatterns:uY,defaultMatchWidth:"wide",parsePatterns:cY,defaultParseWidth:"any"}),day:Su({matchPatterns:hY,defaultMatchWidth:"wide",parsePatterns:fY,defaultParseWidth:"any"}),dayPeriod:Su({matchPatterns:dY,defaultMatchWidth:"any",parsePatterns:pY,defaultParseWidth:"any"})},OE={code:"en-US",formatDistance:IF,formatLong:BF,formatRelative:VF,localize:JF,match:mY,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gY(n,e){const t=Ct(n,e==null?void 0:e.in);return SF(t,_F(t))+1}function OY(n,e){const t=Ct(n,e==null?void 0:e.in),r=+Rd(t)-+PF(t);return Math.round(r/dE)+1}function yE(n,e){var f,p,m,O;const t=Ct(n,e==null?void 0:e.in),r=t.getFullYear(),i=Sa(),s=(e==null?void 0:e.firstWeekContainsDate)??((p=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??i.firstWeekContainsDate??((O=(m=i.locale)==null?void 0:m.options)==null?void 0:O.firstWeekContainsDate)??1,l=rr((e==null?void 0:e.in)||n,0);l.setFullYear(r+1,0,s),l.setHours(0,0,0,0);const o=fi(l,e),u=rr((e==null?void 0:e.in)||n,0);u.setFullYear(r,0,s),u.setHours(0,0,0,0);const h=fi(u,e);return+t>=+o?r+1:+t>=+h?r:r-1}function yY(n,e){var o,u,h,f;const t=Sa(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:u.firstWeekContainsDate)??t.firstWeekContainsDate??((f=(h=t.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,i=yE(n,e),s=rr((e==null?void 0:e.in)||n,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),fi(s,e)}function xY(n,e){const t=Ct(n,e==null?void 0:e.in),r=+fi(t,e)-+yY(t,e);return Math.round(r/dE)+1}function rt(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const ys={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return rt(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):rt(t+1,2)},d(n,e){return rt(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return rt(n.getHours()%12||12,e.length)},H(n,e){return rt(n.getHours(),e.length)},m(n,e){return rt(n.getMinutes(),e.length)},s(n,e){return rt(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),i=Math.trunc(r*Math.pow(10,t-3));return rt(i,e.length)}},xo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},MP={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),i=r>0?r:1-r;return t.ordinalNumber(i,{unit:"year"})}return ys.y(n,e)},Y:function(n,e,t,r){const i=yE(n,r),s=i>0?i:1-i;if(e==="YY"){const l=s%100;return rt(l,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):rt(s,e.length)},R:function(n,e){const t=pE(n);return rt(t,e.length)},u:function(n,e){const t=n.getFullYear();return rt(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return rt(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return rt(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return ys.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return rt(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const i=xY(n,r);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):rt(i,e.length)},I:function(n,e,t){const r=OY(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):rt(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):ys.d(n,e)},D:function(n,e,t){const r=gY(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):rt(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const i=n.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return rt(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const i=n.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return rt(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return rt(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const i=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let i;switch(r===12?i=xo.noon:r===0?i=xo.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let i;switch(r>=17?i=xo.evening:r>=12?i=xo.afternoon:r>=4?i=xo.morning:i=xo.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return ys.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):ys.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):rt(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):rt(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):ys.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):ys.s(n,e)},S:function(n,e){return ys.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return RP(r);case"XXXX":case"XX":return hl(r);case"XXXXX":case"XXX":default:return hl(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return RP(r);case"xxxx":case"xx":return hl(r);case"xxxxx":case"xxx":default:return hl(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+AP(r,":");case"OOOO":default:return"GMT"+hl(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+AP(r,":");case"zzzz":default:return"GMT"+hl(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return rt(r,e.length)},T:function(n,e,t){return rt(+n,e.length)}};function AP(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=Math.trunc(r/60),s=r%60;return s===0?t+String(i):t+String(i)+e+rt(s,2)}function RP(n,e){return n%60===0?(n>0?"-":"+")+rt(Math.abs(n)/60,2):hl(n,e)}function hl(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=rt(Math.trunc(r/60),2),s=rt(r%60,2);return t+i+e+s}const NP=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},xE=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},kY=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],i=t[2];if(!i)return NP(n,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",NP(r,e)).replace("{{time}}",xE(i,e))},vY={p:xE,P:kY},bY=/^D+$/,wY=/^Y+$/,SY=["D","DD","YY","YYYY"];function PY(n){return bY.test(n)}function CY(n){return wY.test(n)}function QY(n,e,t){const r=$Y(n,e,t);if(console.warn(r),SY.includes(n))throw new RangeError(r)}function $Y(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const TY=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EY=/^'([^]*?)'?$/,MY=/''/g,AY=/[a-zA-Z]/;function un(n,e,t){var f,p,m,O;const r=Sa(),i=r.locale??OE,s=r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,l=r.weekStartsOn??((O=(m=r.locale)==null?void 0:m.options)==null?void 0:O.weekStartsOn)??0,o=Ct(n,t==null?void 0:t.in);if(!TF(o))throw new RangeError("Invalid time value");let u=e.match(jY).map(k=>{const b=k[0];if(b==="p"||b==="P"){const w=vY[b];return w(k,i.formatLong)}return k}).join("").match(TY).map(k=>{if(k==="''")return{isToken:!1,value:"'"};const b=k[0];if(b==="'")return{isToken:!1,value:RY(k)};if(MP[b])return{isToken:!0,value:k};if(b.match(AY))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:k}});i.localize.preprocessor&&(u=i.localize.preprocessor(o,u));const h={firstWeekContainsDate:s,weekStartsOn:l,locale:i};return u.map(k=>{if(!k.isToken)return k.value;const b=k.value;(CY(b)||PY(b))&&QY(b,e,String(n));const w=MP[b[0]];return w(o,b,i.localize,h)}).join("")}function RY(n){const e=n.match(EY);return e?e[1].replace(MY,"'"):n}function NY(n,e,t){const r=Sa(),i=(t==null?void 0:t.locale)??r.locale??OE,s=2520,l=Wf(n,e);if(isNaN(l))throw new RangeError("Invalid time value");const o=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:l}),[u,h]=Xl(t==null?void 0:t.in,...l>0?[e,n]:[n,e]),f=NF(h,u),p=(Nd(h)-Nd(u))/1e3,m=Math.round((f-p)/60);let O;if(m<2)return t!=null&&t.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,o):f<10?i.formatDistance("lessThanXSeconds",10,o):f<20?i.formatDistance("lessThanXSeconds",20,o):f<40?i.formatDistance("halfAMinute",0,o):f<60?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",1,o):m===0?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",m,o);if(m<45)return i.formatDistance("xMinutes",m,o);if(m<90)return i.formatDistance("aboutXHours",1,o);if(m<jP){const k=Math.round(m/60);return i.formatDistance("aboutXHours",k,o)}else{if(m<s)return i.formatDistance("xDays",1,o);if(m<$f){const k=Math.round(m/jP);return i.formatDistance("xDays",k,o)}else if(m<$f*2)return O=Math.round(m/$f),i.formatDistance("aboutXMonths",O,o)}if(O=RF(h,u),O<12){const k=Math.round(m/$f);return i.formatDistance("xMonths",k,o)}else{const k=O%12,b=Math.trunc(O/12);return k<3?i.formatDistance("aboutXYears",b,o):k<9?i.formatDistance("overXYears",b,o):i.formatDistance("almostXYears",b+1,o)}}function i0(n,e){return NY(n,mE(n),e)}function LY(n,e,t){const[r,i]=Xl(t==null?void 0:t.in,n,e);return+fi(r,t)==+fi(i,t)}function _Y(n,e,t){const[r,i]=Xl(t==null?void 0:t.in,n,e);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function hp(n,e){return QF(rr(n,n),mE(n))}const DY=hE,IY=["urgent","high","medium","low","none"];function fp({task:n,project:e,showProject:t=!0,compact:r=!1}){const i=Vi(),s=Zl(),l=lE(),o=e&&n.sequenceId?`${e.key}-${n.sequenceId}`:null,u=n.dueAt&&new Date(n.dueAt).getTime()<Date.now()&&n.status!=="done"&&n.status!=="in_progress",h=n.status==="done"?n.completedAt??n.updatedAt:n.dueAt,f=n.status==="done"?"Completed":"Due";return y.jsxs("div",{className:`task-row group ${r?"!h-7 text-xs":""}`,onClick:()=>i.open(n.id),children:[y.jsx(n0,{trigger:y.jsx("button",{className:"shrink-0 p-0.5 -m-0.5 rounded hover:bg-line/40",onClick:p=>p.stopPropagation(),title:t0[n.status]??n.status,children:y.jsx(Oc,{status:n.status})}),align:"start",children:p=>y.jsx(y.Fragment,{children:DY.map(m=>y.jsxs("button",{className:"popover-item",onClick:O=>{O.stopPropagation(),s.mutate({id:n.id,fields:{status:m}}),p()},children:[y.jsx(Oc,{status:m,size:12}),y.jsx("span",{children:t0[m]??m}),n.status===m&&y.jsx("span",{className:"ml-auto text-faint",children:"✓"})]},m))})}),o&&!r&&y.jsx("span",{className:"font-mono text-xxs text-faint tabular-nums shrink-0",children:o}),y.jsx("span",{className:`flex-1 min-w-0 truncate ${n.status==="done"?"text-muted line-through":n.status==="rejected"?"text-muted":Zi(n)?"text-muted italic":"text-ink"}`,children:_n(n)}),n.tags.slice(0,2).map(p=>y.jsx("span",{className:"chip shrink-0 hidden md:inline-flex",children:p},p)),t&&e&&r&&y.jsx("span",{className:"font-mono text-xxs text-faint shrink-0",children:e.key}),h&&y.jsx("span",{className:`text-xxs tabular-nums shrink-0 ${u?"text-danger font-medium":"text-muted"}`,title:`${f} ${new Date(h).toLocaleString()}`,children:un(new Date(h),"MMM d")}),y.jsx(n0,{trigger:y.jsx("button",{className:"shrink-0 p-0.5 -m-0.5 rounded hover:bg-line/40",onClick:p=>p.stopPropagation(),title:yc[n.priority],children:y.jsx(ua,{priority:n.priority})}),align:"end",children:p=>y.jsx(y.Fragment,{children:IY.map(m=>y.jsxs("button",{className:"popover-item",onClick:O=>{O.stopPropagation(),s.mutate({id:n.id,fields:{priority:m}}),p()},children:[y.jsx(ua,{priority:m,size:12}),y.jsx("span",{children:yc[m]}),n.priority===m&&y.jsx("span",{className:"ml-auto text-faint",children:"✓"})]},m))})}),y.jsx("button",{className:"shrink-0 p-1 -m-1 rounded text-faint opacity-0 group-hover:opacity-100 hover:bg-danger/10 hover:text-danger transition-opacity",onClick:p=>{p.stopPropagation(),confirm(`Delete task "${_n(n)}"?`)&&l.mutate(n.id)},title:"Delete",children:y.jsx("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",children:y.jsx("path",{d:"M3 4h8M5.5 4V2.5h3V4M4.5 4l.5 8h4l.5-8M6 6.5v3.5M8 6.5v3.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})})})]})}function zx(n,e){if(n==="day")return{from:ca(e),to:Ix(e)};if(n==="week")return{from:fi(e,{weekStartsOn:1}),to:r0(e,{weekStartsOn:1})};const t=LF(e),r=gE(e);return{from:fi(t,{weekStartsOn:1}),to:r0(r,{weekStartsOn:1})}}function mO(n,e,t){return t===0?new Date:n==="day"?cp(e,t):n==="week"?CF(e,t):bF(e,t)}function zY(n,e){if(n==="day")return un(e,"EEEE · MMMM d, yyyy");if(n==="week"){const t=fi(e,{weekStartsOn:1}),r=r0(e,{weekStartsOn:1});return t.getMonth()===r.getMonth()?`${un(t,"MMMM d")} – ${un(r,"d, yyyy")}`:`${un(t,"MMM d")} – ${un(r,"MMM d, yyyy")}`}return un(e,"MMMM yyyy")}function ZY(n){if(n.status==="in_progress")return new Date;if(n.status==="done"){if(n.completedAt)return new Date(n.completedAt);if(n.updatedAt)return new Date(n.updatedAt)}return n.dueAt?new Date(n.dueAt):null}function kE(n){const e=new Map;for(const t of n){const r=ZY(t);if(!r)continue;const i=un(r,"yyyy-MM-dd");e.has(i)||e.set(i,[]),e.get(i).push(t)}return e}function vE(n){return un(n,"yyyy-MM-dd")}function bE(n,e){const t=[];let r=ca(n);const i=Ix(e);for(;r<=i;)t.push(r),r=cp(r,1);return t}function Pa(n){const e=new Map;return n==null||n.forEach(t=>e.set(t.id,t)),e}const LP={in_progress:0,open:1,done:2};function Zx(n,e){const t=LP[n.status]??3,r=LP[e.status]??3;return t-r}const _P={urgent:0,high:1,medium:2,low:3,none:4};function XY(){const{data:n,isLoading:e}=wa({includeBacklog:!0,includeDone:!1}),{data:t}=sr(),r=L.useMemo(()=>Pa(t),[t]),{open:i}=Dt(),s=L.useMemo(()=>BY((n==null?void 0:n.backlog)??[],r),[n,r]),l=s.reduce((o,u)=>o+u.tasks.length,0);return y.jsx("div",{className:"h-full overflow-y-auto scrollbar-thin",children:y.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6 space-y-4",children:[y.jsxs("header",{className:"flex items-baseline gap-3",children:[y.jsx(Td,{size:18,className:"text-accent"}),y.jsx("h1",{className:"text-lg font-semibold",children:"Inbox"}),y.jsx("span",{className:"text-xs text-muted",children:"Tasks without due date"})]}),y.jsx("p",{className:"text-xs text-muted",children:"Tasks land here until they get a due date."}),e?y.jsx("div",{className:"text-sm text-muted",children:"Loading…"}):l===0?y.jsxs("div",{className:"border border-dashed border-line rounded-md p-8 text-center",children:[y.jsx("div",{className:"text-sm text-muted",children:"Inbox empty."}),t&&t.length>0&&y.jsx("button",{className:"mt-2 text-xs text-accent hover:underline",onClick:()=>i({kind:"quick-create"}),children:"+ capture something"})]}):y.jsx("div",{className:"space-y-3",children:s.map(({projectId:o,project:u,tasks:h})=>y.jsxs("section",{className:"border border-line rounded-md bg-surface overflow-hidden",children:[y.jsxs("div",{className:"px-3 py-1.5 border-b border-lineSoft bg-sidebar/40 flex items-center gap-1.5 text-xxs",children:[u?y.jsxs(y.Fragment,{children:[y.jsx(Fs,{color:u.color,icon:u.icon,size:10}),y.jsx("span",{className:"font-mono tabular-nums",style:{color:u.color},children:u.key}),y.jsx("span",{className:"text-muted truncate",children:u.name})]}):y.jsx("span",{className:"text-faint",children:"no project"}),y.jsx("span",{className:"text-faint ml-auto tabular-nums",children:h.length})]}),h.map(f=>y.jsx(fp,{task:f,project:f.projectId?r.get(f.projectId):void 0},f.id))]},o??"_none"))})]})})}function BY(n,e){const t=new Map;for(const r of n){const i=r.projectId??null;t.has(i)||t.set(i,[]),t.get(i).push(r)}return Array.from(t.entries()).map(([r,i])=>({projectId:r,project:r?e.get(r):void 0,tasks:i.slice().sort(WY)})).sort((r,i)=>!r.project&&!i.project?0:r.project?i.project?r.project.key.localeCompare(i.project.key):-1:1)}function WY(n,e){const t=(_P[n.priority]??5)-(_P[e.priority]??5);return t!==0?t:new Date(e.createdAt).getTime()-new Date(n.createdAt).getTime()}function VY(){const[n,e]=L.useState(""),[t,r]=L.useState(null),[i,s]=L.useState(!1),l=Ws(),[o]=Pc(),u=o.get("next")||"/";async function h(f){if(f.preventDefault(),!(!n||i)){s(!0),r(null);try{await yt.login(n),l(u,{replace:!0})}catch(p){const m=p instanceof Error?p.message:String(p);m.includes("401")||m.includes("invalid_password")?r("密码不对"):m.includes("rate_limited")||m.includes("429")?r("登录尝试过频,稍候再试"):r("登录失败 — 服务可能离线"),s(!1)}}}return y.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-bg px-4",children:y.jsxs("form",{onSubmit:h,className:"w-full max-w-sm bg-surface border border-line rounded-lg shadow-sm p-6 space-y-5",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-8 h-8 rounded-md bg-accent flex items-center justify-center text-white text-sm font-bold",children:"b"}),y.jsxs("div",{children:[y.jsx("div",{className:"text-sm font-semibold text-ink leading-tight",children:"botnote"}),y.jsx("div",{className:"text-xxs text-muted",children:"Sign in to continue"})]})]}),y.jsxs("label",{className:"block space-y-1.5",children:[y.jsx("span",{className:"text-xs font-medium text-ink2",children:"Password"}),y.jsx("input",{type:"password",autoFocus:!0,autoComplete:"current-password",value:n,onChange:f=>e(f.target.value),className:"w-full px-3 py-2 text-sm rounded-md border border-line bg-bg focus:outline-none focus:ring-2 focus:ring-accent/40 focus:border-accent",disabled:i})]}),t&&y.jsx("div",{className:"text-xs text-red-500 bg-red-500/10 border border-red-500/30 rounded px-2.5 py-1.5",children:t}),y.jsxs("button",{type:"submit",disabled:!n||i,className:"w-full btn btn-primary justify-center gap-2 py-2",children:[i?y.jsx(ZT,{size:14,className:"animate-spin"}):y.jsx(FB,{size:14}),y.jsx("span",{children:i?"Signing in…":"Sign in"})]}),y.jsx("p",{className:"text-xxs text-muted text-center pt-1",children:"Session cookie expires in 30 days. CLI / MCP unaffected."})]})})}const gO=[{status:"open",label:"Todo",intent:"text-statusOpen"},{status:"in_progress",label:"In Progress",intent:"text-statusInProgress"},{status:"done",label:"Done",intent:"text-statusDone"},{status:"rejected",label:"Cancelled",intent:"text-statusRejected"}];function qY({tasks:n,project:e}){var l;const t=Zl(),{open:r}=Dt(),i={};for(const o of gO)i[o.status]=[];for(const o of n){const u=((l=gO.find(h=>h.status===o.status))==null?void 0:l.status)??"open";i[u].push(o)}function s(o,u){t.mutate({id:u,fields:{status:o}})}return y.jsx("div",{className:"h-full overflow-x-auto overflow-y-hidden",children:y.jsx("div",{className:"h-full flex gap-3 p-3 min-w-max",children:gO.map(o=>y.jsx(FY,{label:o.label,intent:o.intent,tasks:i[o.status]??[],project:e,onDropTask:u=>s(o.status,u),onAdd:()=>r({kind:"quick-create",projectId:e.id})},o.status))})})}function FY({label:n,intent:e,tasks:t,project:r,onDropTask:i,onAdd:s}){const[l,o]=L.useState(!1);return y.jsxs("div",{className:`w-72 shrink-0 flex flex-col rounded-md border ${l?"border-accent bg-accentSoft/30":"border-line bg-sidebar/40"} transition-colors`,onDragOver:u=>{u.preventDefault(),l||o(!0)},onDragLeave:()=>o(!1),onDrop:u=>{u.preventDefault(),o(!1);const h=u.dataTransfer.getData("text/task-id");h&&i(h)},children:[y.jsxs("div",{className:"px-3 h-9 flex items-center justify-between border-b border-line",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:`text-xs font-semibold ${e}`,children:n}),y.jsx("span",{className:"text-xxs text-faint tabular-nums",children:t.length})]}),y.jsx("button",{className:"text-faint hover:text-accent text-xs",onClick:s,title:"Add task",children:"+"})]}),y.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin p-2 space-y-1.5",children:t.length===0?y.jsx("div",{className:"text-xxs text-faint text-center py-4",children:"No tasks"}):t.map(u=>y.jsx(YY,{task:u,project:r},u.id))})]})}function YY({task:n,project:e}){const t=Vi(),r=Zl(),i=n.dueAt&&new Date(n.dueAt).getTime()<Date.now()&&n.status!=="done"&&n.status!=="in_progress",s=n.sequenceId?`${e.key}-${n.sequenceId}`:null,l=n.status==="done"?n.completedAt??n.updatedAt:n.dueAt,o=n.status==="done"?"Completed":"Due";return y.jsxs("div",{draggable:!0,onDragStart:u=>{u.dataTransfer.setData("text/task-id",n.id),u.dataTransfer.effectAllowed="move"},onClick:()=>t.open(n.id),className:"group bg-surface border border-line rounded p-2 cursor-grab active:cursor-grabbing hover:border-accent transition-colors",children:[y.jsxs("div",{className:"flex items-start gap-1.5",children:[y.jsx("button",{className:"shrink-0 mt-0.5",onClick:u=>{u.stopPropagation(),r.mutate({id:n.id,fields:{status:n.status==="done"?"open":"done"}})},title:n.status==="done"?"Reopen":"Mark done",children:y.jsx(Oc,{status:n.status,size:13})}),y.jsx("span",{className:`flex-1 min-w-0 text-sm leading-snug ${n.status==="done"?"text-muted line-through":n.status==="rejected"?"text-muted":Zi(n)?"italic text-muted":"text-ink"}`,children:_n(n)}),y.jsx(ua,{priority:n.priority,size:11})]}),y.jsxs("div",{className:"mt-1.5 flex items-center gap-2 text-xxs text-muted",children:[s&&y.jsx("span",{className:"font-mono tabular-nums",children:s}),l&&y.jsx("span",{className:`tabular-nums ${i?"text-danger font-medium":""}`,title:`${o} ${new Date(l).toLocaleString()}`,children:un(new Date(l),"MMM d")}),n.tags.slice(0,2).map(u=>y.jsx("span",{className:"chip !h-4 !text-[10px]",children:u},u))]})]})}function UY({project:n}){const[e,t]=Pc(),r=Zl(),{open:i}=Dt(),{data:s}=_x(n.id,["note"]),[l,o]=L.useState("all");function u(f){e.set("d",f),t(e,{replace:!0})}const h=(s??[]).filter(f=>l==="pinned"?f.pinned:!0);return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"px-3 h-9 flex items-center justify-between border-b border-line bg-surface",children:[y.jsx("div",{className:"flex items-center gap-2",children:y.jsxs("div",{className:"seg",children:[y.jsxs("button",{"data-active":l==="all",onClick:()=>o("all"),children:["All ",y.jsx("span",{className:"text-faint ml-1",children:(s==null?void 0:s.length)??0})]}),y.jsxs("button",{"data-active":l==="pinned",onClick:()=>o("pinned"),children:["Pinned ",y.jsx("span",{className:"text-faint ml-1",children:(s==null?void 0:s.filter(f=>f.pinned).length)??0})]})]})}),y.jsx("button",{className:"btn btn-primary",onClick:()=>i({kind:"quick-create",projectId:n.id}),children:"+ Note"})]}),y.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin bg-surface",children:h.length===0?y.jsxs("div",{className:"p-8 text-center text-xs text-muted",children:[l==="pinned"?"No pinned notes yet.":"No notes yet.",y.jsx("div",{className:"text-faint mt-1",children:l==="pinned"?"Pin notes to surface them in opening brief for agents.":"Press c to create one."})]}):h.map(f=>y.jsx("div",{className:"px-4 py-2.5 border-b border-lineSoft row-hover cursor-pointer group",onClick:()=>u(f.id),children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("button",{className:`shrink-0 mt-0.5 p-0.5 -m-0.5 rounded hover:bg-line/40 ${f.pinned?"text-accent":"text-faint hover:text-ink"}`,onClick:p=>{p.stopPropagation(),r.mutate({id:f.id,fields:{pinned:!f.pinned}})},title:f.pinned?"Unpin":"Pin to opening brief",children:f.pinned?y.jsx(yx,{size:12,fill:"currentColor"}):y.jsx(UB,{size:12,className:"opacity-0 group-hover:opacity-100 transition-opacity"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:`text-sm truncate ${Zi(f)?"text-muted italic":"text-ink"}`,children:_n(f)}),!Zi(f)&&f.body&&y.jsx("div",{className:"text-xs text-muted truncate mt-0.5",children:f.body.replace(/\n/g," ").slice(0,200)}),y.jsxs("div",{className:"text-xxs text-faint mt-1 flex items-center gap-2",children:[y.jsx("span",{children:i0(new Date(f.updatedAt),{addSuffix:!0})}),y.jsx("span",{children:"·"}),y.jsx("span",{children:f.actorKind}),f.tags.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("span",{children:"·"}),f.tags.slice(0,3).map(p=>y.jsx("span",{className:"chip !h-4 !text-[10px]",children:p},p))]})]})]})]})},f.id))})]})}function GY(){const{key:n}=Id(),[e,t]=Pc(),r=e.get("tab")||"tasks",{data:i}=iE(n),{data:s}=_x(i==null?void 0:i.id,["task"],{poll:!0}),{open:l}=Dt(),o=L.useMemo(()=>{const h=s??[];return{todo:h.filter(f=>f.status==="open").length,in_progress:h.filter(f=>f.status==="in_progress").length,done:h.filter(f=>f.status==="done").length,tasks:h.length}},[s]);if(!i)return y.jsx("div",{className:"p-6 text-sm text-muted",children:"Loading project…"});const u=h=>{h==="tasks"?e.delete("tab"):e.set("tab",h),t(e,{replace:!0})};return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"h-11 px-4 border-b border-line bg-surface flex items-center justify-between shrink-0",children:[y.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y.jsx(Fs,{color:i.color,icon:i.icon,size:14}),y.jsx("span",{className:"font-mono text-xs tabular-nums",style:{color:i.color},children:i.key}),y.jsx("span",{className:"text-sm font-semibold text-ink truncate",children:i.name}),y.jsx("button",{className:"ml-1 p-1 -m-1 text-faint hover:text-ink rounded hover:bg-sidebar",onClick:()=>l({kind:"edit-project",projectId:i.id}),title:"Project settings",children:y.jsx(KB,{size:11})})]}),y.jsx("div",{className:"flex items-center gap-1",children:y.jsxs("div",{className:"seg",children:[y.jsxs("button",{"data-active":r==="tasks",onClick:()=>u("tasks"),children:[y.jsx(e6,{size:11,className:"inline mr-1"}),"Tasks ",y.jsx("span",{className:"text-faint ml-1",children:o.tasks})]}),y.jsxs("button",{"data-active":r==="notes",onClick:()=>u("notes"),children:[y.jsx(NB,{size:11,className:"inline mr-1"}),"Notes"]}),y.jsxs(Al,{to:`/p/${i.key}/agents-md`,className:"px-2 h-7 text-xs hover:text-ink hover:bg-sidebar transition-colors text-muted flex items-center",children:[y.jsx(FT,{size:11,className:"inline mr-1"}),"AGENTS.md"]})]})})]}),y.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden",children:[r==="tasks"&&y.jsx(qY,{tasks:s??[],project:i}),r==="notes"&&y.jsx(UY,{project:i})]})]})}function HY(){const[n]=Pc(),e=n.get("q")??"",{data:t}=sE(e?{query:e,limit:50}:null),r=Vi();return y.jsx("div",{className:"h-full overflow-y-auto scrollbar-thin",children:y.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-6",children:[y.jsxs("h1",{className:"text-base font-semibold",children:['Search: "',e,'"']}),y.jsxs("div",{className:"mt-1 text-xxs text-muted",children:[(t==null?void 0:t.hits.length)??0," results · embedding ",t!=null&&t.embeddingUsed?"ON":"OFF"]}),y.jsx("div",{className:"mt-4 bg-surface border border-line rounded divide-y divide-line/60",children:t==null?void 0:t.hits.map(i=>y.jsxs("button",{type:"button",onClick:()=>r.open(i.entity.id),className:"w-full text-left p-3 flex items-start gap-3 row-hover",children:[y.jsx(Dx,{kind:i.entity.kind}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:`text-sm ${Zi(i.entity)?"italic text-muted":""}`,children:_n(i.entity)}),y.jsx("div",{className:"text-xs text-muted mt-1",children:i.entity.body.slice(0,200).replace(/\n/g," ")}),y.jsxs("div",{className:"text-xxs text-faint mt-1",children:["score ",i.score.toFixed(3)]})]})]},i.entity.id))})]})})}const Vf=typeof window<"u"?window.location.origin:"http://127.0.0.1:4280",OO=1e5,KY=[{id:"account",label:"Account",icon:DS},{id:"tokens",label:"API tokens",icon:DS},{id:"cli",label:"CLI",icon:UT},{id:"plugin",label:"Plugin",icon:WT},{id:"embedding",label:"Embeddings",icon:PB},{id:"mcp",label:"MCP",icon:BT},{id:"about",label:"About",icon:BB}];function JY(){const[n,e]=L.useState("account");return y.jsxs("div",{className:"h-full flex bg-bg overflow-hidden",children:[y.jsxs("nav",{className:"w-52 shrink-0 border-r border-line bg-sidebar/60 overflow-y-auto scrollbar-thin",children:[y.jsxs("div",{className:"px-4 py-4 flex items-center gap-2 border-b border-lineSoft",children:[y.jsx(Ox,{size:14,className:"text-accent"}),y.jsx("span",{className:"text-sm font-semibold",children:"Settings"})]}),y.jsx("ul",{className:"py-2",children:KY.map(t=>y.jsx("li",{children:y.jsxs("button",{onClick:()=>e(t.id),className:`w-full text-left px-4 py-1.5 text-sm flex items-center gap-2 transition-colors ${n===t.id?"bg-accentSoft/60 text-accent font-medium":"text-muted hover:bg-sidebar hover:text-ink"}`,children:[y.jsx(t.icon,{size:12}),t.label]})},t.id))})]}),y.jsx("main",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-thin",children:y.jsxs("div",{className:`mx-auto px-6 py-6 space-y-6 ${n==="plugin"?"max-w-5xl":"max-w-3xl"}`,children:[n==="account"&&y.jsx(eU,{}),n==="tokens"&&y.jsx(oU,{}),n==="cli"&&y.jsx(tU,{}),n==="plugin"&&y.jsx(nU,{}),n==="embedding"&&y.jsx(rU,{}),n==="mcp"&&y.jsx(sU,{}),n==="about"&&y.jsx(lU,{})]})})]})}function Bl({title:n,blurb:e}){return y.jsxs("header",{className:"space-y-1.5",children:[y.jsx("h1",{className:"text-lg font-semibold text-ink",children:n}),e&&y.jsx("p",{className:"text-xs text-muted leading-relaxed",children:e})]})}function eU(){const n=Ws(),[e,t]=L.useState(!1);async function r(){if(!e){t(!0);try{await yt.logout()}catch{}n("/login",{replace:!0})}}return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{title:"Account",blurb:"Browser session uses a master-password login. Agents (CLI / MCP) authenticate with bearer tokens, generated under API tokens."}),y.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 flex items-center justify-between",children:[y.jsx("div",{className:"text-xs text-muted",children:"Sign out of this browser. Other devices and any active bearer tokens are unaffected."}),y.jsxs("button",{onClick:r,disabled:e,className:"btn !text-red-500 !border-red-500/30 hover:!bg-red-500/10 gap-1.5",children:[y.jsx(XT,{size:12})," Log out"]})]})]})}function tU(){return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{title:"CLI",blurb:"The botnote npm package ships a binary that talks to this daemon over HTTP. Same tool for quick capture, today review, and ad-hoc search from any terminal."}),y.jsx(on,{title:"Install + login",code:`# Global install (any machine with node + npm).
470
+ npm i -g botnote
471
+
472
+ # One-time login. Default URL is https://botnote.net — paste a bearer token
473
+ # from Settings → API tokens. On the daemon host itself, override the URL
474
+ # to http://127.0.0.1:4280 (no token needed, loopback is trusted).
475
+ botnote login`}),y.jsx(on,{title:"Daily commands",code:`botnote today # today + overdue
476
+ botnote tasks --status open # list open tasks
477
+ botnote task "Ship the CLI" --project BOT --priority high --due 2026-06-10
478
+ botnote note "Random capture" --project BOT --pin
479
+ botnote search "deployment"
480
+ botnote projects # list project keys`}),y.jsx(on,{title:"Override the URL",code:`# Per-shell override (skips ~/.config/botnote/config.json)
481
+ BOTNOTE_URL=http://127.0.0.1:4280 botnote today
482
+
483
+ # Config file (preferred for the daemon host):
484
+ # ~/.config/botnote/config.json
485
+ # { "baseUrl": "http://127.0.0.1:4280" }`})]})}function nU(){return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{title:"Plugin",blurb:"Install the botnote runtime once, then add the plugin for each agent client. The plugin bundles MCP, slash commands, and workflow skills, so Letheia / Plane MCP setup should stay retired."}),y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[y.jsx(yO,{icon:IS,title:"1. Runtime",body:"Install or update the npm binary on every device. Plugins call this binary for MCP."}),y.jsx(yO,{icon:AB,title:"2. Client plugin",body:"Install the marketplace plugin in Claude Code, Codex, Cursor, or another agent client."}),y.jsx(yO,{icon:VT,title:"3. Update both",body:"Runtime and plugin cache update separately. Refresh the client after updating."})]}),y.jsxs("div",{className:"border border-accent/20 bg-accentSoft/50 rounded-md px-4 py-3 text-xs text-accentText leading-relaxed",children:["Use ",y.jsx("code",{className:"text-ink",children:"https://botnote.net"})," with an API token from this settings page on remote devices. On the daemon host, use"," ",y.jsx("code",{className:"text-ink",children:"http://127.0.0.1:4280"})," and skip the token."]}),y.jsx(ko,{icon:IS,title:"Runtime",subtitle:"Required first. Claude Code, Codex, and Cursor all launch this binary for MCP."}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[y.jsx(on,{title:"Install runtime",code:`# Runtime used by Claude Code, Codex, and Cursor plugins.
486
+ npm i -g botnote@latest
487
+
488
+ # Remote clients: save https://botnote.net + a bearer token.
489
+ # Daemon host: use http://127.0.0.1:4280 and skip the token.
490
+ botnote login`}),y.jsx(on,{title:"Update runtime",code:`# Keep the runtime current on every device.
491
+ npm i -g botnote@latest
492
+ botnote --version`})]}),y.jsx(ko,{icon:MB,title:"Claude Code",subtitle:"Recommended for day-to-day work. Enable marketplace auto-update after installation."}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[y.jsx(on,{title:"Install",code:`# In Claude Code
493
+ /plugin marketplace add jianhua-wang/botnote
494
+ /plugin install botnote@botnote
495
+
496
+ # Claude Code will prompt for:
497
+ # botnote_url -> default https://botnote.net (use http://127.0.0.1:4280 on daemon host)
498
+ # botnote_token -> bearer from Settings → API tokens (skip on loopback)`}),y.jsx(on,{title:"Update",code:`# Preferred: enable marketplace auto-update in Claude Code.
499
+ /plugin
500
+ # Marketplaces → botnote → Enable auto-update
501
+
502
+ # After Claude reports an updated plugin:
503
+ /reload-plugins
504
+
505
+ # Manual update, if available in your Claude Code build:
506
+ claude plugin update botnote@botnote`})]}),y.jsx(ko,{icon:UT,title:"Codex",subtitle:"Use the Git marketplace flow; sparse checkout means no full botnote source checkout."}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[y.jsx(on,{title:"Install",code:`# No full source checkout required.
507
+ codex plugin marketplace add https://github.com/jianhua-wang/botnote.git \\
508
+ --sparse .codex-plugin \\
509
+ --sparse plugins/botnote
510
+
511
+ codex plugin add botnote@botnote-plugins`}),y.jsx(on,{title:"Update",code:`# Codex refreshes Git marketplaces, then installs from the fresh snapshot.
512
+ codex plugin marketplace upgrade botnote-plugins
513
+ codex plugin remove botnote@botnote-plugins
514
+ codex plugin add botnote@botnote-plugins
515
+
516
+ # Open a new Codex session after updating.`})]}),y.jsx(ko,{icon:WT,title:"Cursor",subtitle:"Uses the same plugin bundle and the same npm runtime."}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[y.jsx(on,{title:"Install",code:`# Cursor plugin clients can use the repository marketplace.
517
+ # Marketplace metadata lives at .cursor-plugin/marketplace.json.
518
+ https://github.com/jianhua-wang/botnote
519
+
520
+ # Then install:
521
+ botnote@botnote-plugins`}),y.jsx(on,{title:"Update",code:`# Refresh the marketplace in Cursor's plugin UI.
522
+ # If an explicit update action is unavailable, remove and install again
523
+ # from the same repository marketplace.
524
+
525
+ # Keep the shared runtime current too:
526
+ npm i -g botnote@latest`})]}),y.jsx(ko,{icon:Ox,title:"Advanced",subtitle:"Only needed when a repo vendors the plugin files locally."}),y.jsx(on,{title:"Repo-local marketplace entry",code:`// Advanced: repo-local marketplace entry for .agents/plugins/marketplace.json.
527
+ // Use this only when the repo already vendors ./plugins/botnote.
528
+ {
529
+ "name": "botnote-plugins",
530
+ "interface": { "displayName": "botnote Plugins" },
531
+ "plugins": [
532
+ {
533
+ "name": "botnote",
534
+ "source": { "source": "local", "path": "./plugins/botnote" },
535
+ "policy": { "installation": "AVAILABLE", "authentication": "ON_INSTALL" },
536
+ "category": "Productivity"
537
+ }
538
+ ]
539
+ }`}),y.jsx(ko,{icon:BT,title:"Slash commands",subtitle:"Available after the plugin is installed and the client reloads plugins."}),y.jsx(on,{title:"Commands",code:`/botnote:today # today + overdue
540
+ /botnote:show-todo # open work across projects
541
+ /botnote:add-task "..." # create a task
542
+ /botnote:start-work DEMO-12 # pick up a task with project context
543
+ /botnote:remember "..." # capture a note
544
+ /botnote:recall "..." # hybrid search
545
+ /botnote:done # mark current focus done`}),y.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 text-xs text-muted leading-relaxed flex items-start gap-3",children:[y.jsx(zT,{size:13,className:"mt-0.5 shrink-0 text-accent"}),y.jsxs("div",{children:["Plugin distribution lives at"," ",y.jsx("a",{href:"https://github.com/jianhua-wang/botnote",target:"_blank",className:"text-accent hover:underline",rel:"noreferrer",children:"jianhua-wang/botnote"}),". ","Claude Code can auto-update third-party marketplaces when enabled; after an update, run"," ",y.jsx("code",{className:"text-ink",children:"/reload-plugins"}),". Codex currently refreshes Git marketplace snapshots with"," ",y.jsx("code",{className:"text-ink",children:"codex plugin marketplace upgrade"}),"."]})]})]})}function yO({icon:n,title:e,body:t}){return y.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 min-h-[104px]",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-ink",children:[y.jsx("span",{className:"w-6 h-6 rounded-md bg-accentSoft text-accent flex items-center justify-center shrink-0",children:y.jsx(n,{size:13})}),e]}),y.jsx("p",{className:"mt-2 text-xs text-muted leading-relaxed",children:t})]})}function ko({icon:n,title:e,subtitle:t}){return y.jsxs("div",{className:"pt-2 border-t border-lineSoft flex items-start gap-2",children:[y.jsx("span",{className:"mt-0.5 w-6 h-6 rounded-md bg-sidebar text-muted border border-line flex items-center justify-center shrink-0",children:y.jsx(n,{size:13})}),y.jsxs("div",{children:[y.jsx("h2",{className:"text-sm font-semibold text-ink",children:e}),y.jsx("p",{className:"text-xs text-muted leading-relaxed mt-0.5",children:t})]})]})}function rU(){const{data:n,isLoading:e}=Lq(),t=_q(),r=Dq(),[i,s]=L.useState(!0),[l,o]=L.useState("openai"),[u,h]=L.useState("text-embedding-3-small"),[f,p]=L.useState(""),[m,O]=L.useState(""),[k,b]=L.useState(!1),[w,S]=L.useState(null);L.useEffect(()=>{n&&(s(n.enabled),o(n.provider),h(n.model),p(n.baseUrl??""),O(""),b(!1))},[n]);async function C(j){j.preventDefault(),S(null);const Z=m.trim(),q={enabled:i,provider:l,model:u.trim(),baseUrl:l==="openai_compatible"&&f.trim()||null,...Z?{apiKey:Z}:k?{apiKey:null}:{}},J=await t.mutateAsync(q);O(""),b(!1),S(J.effectiveEnabled?"Embedding search is ready.":DP(J.statusReason))}async function Q(){S(null);const j=Math.min((n==null?void 0:n.missingCount)??OO,OO),Z=await r.mutateAsync(j),q=n&&n.missingCount>OO;S(q?`Queued ${Z.enqueued} item(s), the maximum per request. Pending queue: ${Z.pendingCount}.`:`Queued all ${Z.enqueued} missing item(s). Pending queue: ${Z.pendingCount}.`)}const R=n&&n.totalCount>0?Math.round(n.embeddedCount/n.totalCount*100):0,I=!!(n!=null&&n.effectiveEnabled&&n.missingCount>0);return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{title:"Embeddings",blurb:"Configure semantic search for botnote. The database vector column is fixed at 384 dimensions, so provider models must return 384-dimensional embeddings."}),y.jsx("div",{className:`border rounded-md px-4 py-3 text-xs leading-relaxed ${n!=null&&n.effectiveEnabled?"border-success/30 bg-success/10 text-ink":"border-warn/30 bg-warn/10 text-ink"}`,children:e?"Loading embedding settings...":n!=null&&n.effectiveEnabled?y.jsxs(y.Fragment,{children:["Semantic search is enabled via ",y.jsx("strong",{children:iU(n.provider)})," using"," ",y.jsx("code",{children:n.model}),". Search merges BM25 + cosine + time decay."]}):y.jsxs(y.Fragment,{children:["Semantic search is not active: ",DP((n==null?void 0:n.statusReason)??"not_loaded"),". Text search still works through BM25."]})}),y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-2",children:[y.jsx(Tf,{label:"Status",value:n!=null&&n.effectiveEnabled?"On":"Off"}),y.jsx(Tf,{label:"Embedded",value:`${(n==null?void 0:n.embeddedCount)??0}/${(n==null?void 0:n.totalCount)??0}`}),y.jsx(Tf,{label:"Missing",value:`${(n==null?void 0:n.missingCount)??0}`}),y.jsx(Tf,{label:"Queue",value:`${(n==null?void 0:n.pendingCount)??0}`})]}),y.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-xs font-semibold text-ink",children:"Vector coverage"}),y.jsxs("div",{className:"text-xxs text-muted",children:[R,"% of task/note records have embeddings."]})]}),y.jsxs("button",{type:"button",className:"btn",disabled:!I||r.isPending,onClick:Q,title:n!=null&&n.effectiveEnabled?"Queue embeddings for all existing records without body_vec":"Enable embeddings before backfilling",children:[y.jsx(VT,{size:11})," ",r.isPending?"Queueing...":"Backfill all missing"]})]}),y.jsx("div",{className:"h-2 rounded bg-sidebar overflow-hidden border border-lineSoft",children:y.jsx("div",{className:"h-full bg-accent",style:{width:`${R}%`}})})]}),y.jsxs("form",{onSubmit:C,className:"border border-line rounded-md bg-surface px-4 py-4 space-y-4",children:[y.jsxs("label",{className:"flex items-center gap-2 text-sm text-ink",children:[y.jsx("input",{type:"checkbox",checked:i,onChange:j=>s(j.target.checked)}),"Enable semantic search"]}),y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[y.jsxs("label",{className:"space-y-1",children:[y.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Provider"}),y.jsxs("select",{className:"input",value:l,onChange:j=>o(j.target.value),children:[y.jsx("option",{value:"openai",children:"OpenAI"}),y.jsx("option",{value:"openai_compatible",children:"OpenAI-compatible"})]})]}),y.jsxs("label",{className:"space-y-1",children:[y.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Model"}),y.jsx("input",{className:"input font-mono",list:"embedding-models",value:u,onChange:j=>h(j.target.value),placeholder:"text-embedding-3-small"}),y.jsxs("datalist",{id:"embedding-models",children:[y.jsx("option",{value:"text-embedding-3-small"}),y.jsx("option",{value:"text-embedding-3-large"})]})]})]}),l==="openai_compatible"&&y.jsxs("label",{className:"space-y-1 block",children:[y.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Base URL"}),y.jsx("input",{className:"input font-mono",value:f,onChange:j=>p(j.target.value),placeholder:"https://api.example.com/v1"})]}),y.jsxs("label",{className:"space-y-1 block",children:[y.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"API key"}),y.jsx("input",{className:"input font-mono",type:"password",value:m,onChange:j=>{O(j.target.value),j.target.value&&b(!1)},placeholder:n!=null&&n.apiKeyConfigured?`Configured (${n.apiKeySource??"unknown"}${n.apiKeyPreview?` · ${n.apiKeyPreview}`:""})`:"sk-..."}),y.jsxs("div",{className:"flex items-center justify-between gap-3 text-xxs text-muted",children:[y.jsx("span",{children:"Full keys are stored server-side and are not returned to the browser after save."}),(n==null?void 0:n.settingsApiKeyConfigured)&&y.jsxs("label",{className:"inline-flex items-center gap-1.5",children:[y.jsx("input",{type:"checkbox",checked:k,onChange:j=>{b(j.target.checked),j.target.checked&&O("")}}),"Clear stored key"]})]})]}),y.jsxs("div",{className:"border border-lineSoft rounded-md bg-sidebar/30 px-3 py-2 text-xs text-muted leading-relaxed",children:["OpenAI-compatible providers must accept the OpenAI embeddings API and return"," ",y.jsx("code",{className:"text-ink",children:"384"})," dimensions for the selected model. Existing vectors are not automatically regenerated when provider or model changes; use Backfill all missing to queue every record that does not have a vector yet."]}),w&&y.jsx("div",{className:"text-xs text-accentText bg-accentSoft/50 border border-accent/20 rounded-md px-3 py-2",children:w}),t.error&&y.jsx("div",{className:"text-xs text-danger",children:t.error instanceof Error?t.error.message:String(t.error)}),r.error&&y.jsx("div",{className:"text-xs text-danger",children:r.error instanceof Error?r.error.message:String(r.error)}),y.jsx("div",{className:"flex justify-end",children:y.jsxs("button",{type:"submit",className:"btn btn-primary",disabled:t.isPending||u.trim().length===0,children:[y.jsx(np,{size:11})," ",t.isPending?"Saving...":"Save embedding settings"]})})]})]})}function Tf({label:n,value:e}){return y.jsxs("div",{className:"border border-line rounded-md bg-surface px-3 py-2",children:[y.jsx("div",{className:"text-xxs uppercase tracking-wider text-muted",children:n}),y.jsx("div",{className:"text-lg font-semibold text-ink mt-0.5",children:e})]})}function iU(n){return n==="openai_compatible"?"OpenAI-compatible":"OpenAI"}function DP(n){switch(n){case"ready":return"ready";case"disabled":return"disabled";case"missing_api_key":return"missing API key";case"missing_base_url":return"missing base URL";case"injected":return"using injected test embedder";case"not_loaded":return"configuration not loaded yet"}}function sU(){const n=`{
546
+ "mcpServers": {
547
+ "botnote": {
548
+ "command": "botnote",
549
+ "args": ["mcp"],
550
+ "env": {
551
+ "BOTNOTE_URL": "https://botnote.net",
552
+ "BOTNOTE_TOKEN": "bn_..."
553
+ }
554
+ }
555
+ }
556
+ }`,e=`# ~/.codex/config.toml
557
+ [mcp_servers.botnote]
558
+ command = "botnote"
559
+ args = ["mcp"]
560
+
561
+ [mcp_servers.botnote.env]
562
+ BOTNOTE_URL = "https://botnote.net"
563
+ BOTNOTE_TOKEN = "bn_..."
564
+
565
+ # On the daemon host, drop BOTNOTE_TOKEN and set
566
+ # BOTNOTE_URL = "http://127.0.0.1:4280" (loopback is trusted).`,t=`# Create a task via REST
567
+ curl -X POST '${Vf}/v1/tasks' \\
568
+ -H 'authorization: Bearer bn_...' \\
569
+ -H 'content-type: application/json' \\
570
+ -d '{
571
+ "title": "Finish migration",
572
+ "projectId": "<uuid>",
573
+ "priority": "high"
574
+ }'
575
+
576
+ # Create a note
577
+ curl -X POST '${Vf}/v1/notes' \\
578
+ -H 'authorization: Bearer bn_...' \\
579
+ -H 'content-type: application/json' \\
580
+ -d '{ "body": "Quick capture", "pinned": false }'
581
+
582
+ # Hybrid search
583
+ curl -X POST '${Vf}/v1/search' \\
584
+ -H 'authorization: Bearer bn_...' \\
585
+ -H 'content-type: application/json' \\
586
+ -d '{ "query": "deployment", "limit": 10 }'`;return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{title:"MCP (raw integration)",blurb:"Skip the Claude Code plugin and wire the MCP server in by hand — for Codex, custom agents, or any MCP-aware client. The botnote binary doubles as the MCP stdio server."}),y.jsx(on,{title:"Claude Code (~/.claude.json or project-local .mcp.json)",code:n}),y.jsx(on,{title:"Codex (~/.codex/config.toml)",code:e}),y.jsx(on,{title:"REST · curl",code:t}),y.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 text-xs text-muted leading-relaxed",children:["Requires the ",y.jsx("code",{className:"text-ink",children:"botnote"})," binary in",y.jsx("code",{className:"text-ink",children:" PATH"})," ","(",y.jsx("code",{className:"text-ink",children:"npm i -g botnote"}),"). The MCP server has no DB connection of its own; it speaks HTTP to whichever ",y.jsx("code",{className:"text-ink",children:"BOTNOTE_URL"})," you set."]})]})}function lU(){const{data:n,isLoading:e}=Aq(),t=n!=null&&n.version?`v${n.version}`:e?"loading...":"unknown";return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{title:"About",blurb:"Build + runtime info for this daemon."}),y.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 text-xs text-muted space-y-2",children:[y.jsxs("div",{children:[y.jsxs("span",{className:"text-ink",children:["botnote ",t]})," — Postgres 16 + pgvector + Fastify 5 + MCP SDK"]}),y.jsxs("div",{children:["REST: ",y.jsx("code",{className:"text-ink",children:Vf})," · docs:"," ",y.jsx("a",{className:"text-accent hover:underline",href:"/docs",target:"_blank",rel:"noreferrer",children:"/docs"})]}),y.jsxs("div",{className:"pt-1 border-t border-lineSoft",children:["Auth is enforced when ",y.jsx("code",{className:"text-ink",children:"BOTNOTE_REQUIRE_AUTH=1"})," on the daemon. Direct connections from loopback or private networks are trusted; requests via Cloudflare Tunnel (or any proxy that sets ",y.jsx("code",{children:"cf-connecting-ip"})," /"," ",y.jsx("code",{children:"x-forwarded-for"}),") require a bearer token or a browser session cookie."]})]})]})}function on({title:n,code:e}){const[t,r]=L.useState(!1);function i(){navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1400)})}return y.jsxs("div",{className:"border border-line rounded-md bg-surface overflow-hidden",children:[y.jsxs("div",{className:"px-3 py-1.5 border-b border-lineSoft flex items-center justify-between bg-sidebar/40",children:[y.jsx("span",{className:"text-xxs uppercase tracking-wider text-muted font-medium",children:n}),y.jsxs("button",{onClick:i,className:"text-xxs text-muted hover:text-ink flex items-center gap-1",children:[t?y.jsx(np,{size:11}):y.jsx(Xy,{size:11}),t?"Copied":"Copy"]})]}),y.jsx("pre",{className:"px-3 py-2 text-xs font-mono leading-relaxed overflow-x-auto whitespace-pre bg-sidebar/20 text-ink2",children:e})]})}function oU(){const{data:n,isLoading:e}=Bq(),t=Wq(),r=Vq(),[i,s]=L.useState(""),[l,o]=L.useState(null),[u,h]=L.useState(null),[f,p]=L.useState(null),[m,O]=L.useState(null);function k(S){navigator.clipboard.writeText(S.plaintext).then(()=>{O(S.id),setTimeout(()=>O(C=>C===S.id?null:C),1400)})}async function b(S){if(S.preventDefault(),!i.trim())return;const C=await t.mutateAsync(i.trim());o(C),s("")}async function w(S,C){if(!u&&confirm(`Revoke token "${C}"? Any client using it stops working.`)){h(S),p(null);try{await r.mutateAsync(S),(l==null?void 0:l.id)===S&&o(null)}catch(Q){const R=Q instanceof Error?Q.message:String(Q);p(`Could not revoke "${C}": ${R}`)}finally{h(Q=>Q===S?null:Q)}}}return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{title:"API tokens",blurb:"Bearer tokens for the CLI, MCP server, and direct REST calls. New tokens keep their full value available for copying here; older tokens created before this change only have a prefix and must be regenerated if the full value was lost."}),l&&y.jsxs("div",{className:"border border-warn rounded-md bg-warn/10 p-3 space-y-2",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-warn",children:[y.jsx(i6,{size:13}),"Copy this token now, or later from the token list."]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("code",{className:"flex-1 text-xs font-mono bg-surface border border-line rounded px-2 py-1 overflow-x-auto whitespace-nowrap",children:l.plaintext}),y.jsxs("button",{className:"btn",onClick:()=>navigator.clipboard.writeText(l.plaintext),children:[y.jsx(Xy,{size:11})," Copy"]}),y.jsx("button",{className:"btn",onClick:()=>o(null),children:"Done"})]})]}),f&&y.jsx("div",{className:"border border-danger/30 rounded-md bg-danger/10 px-3 py-2 text-xs text-danger",children:f}),y.jsxs("form",{onSubmit:b,className:"flex gap-2",children:[y.jsx("input",{className:"input flex-1",placeholder:"Token name (e.g. claude-code-laptop)",value:i,onChange:S=>s(S.target.value)}),y.jsxs("button",{type:"submit",className:"btn btn-primary",disabled:!i.trim()||t.isPending,children:[y.jsx(rp,{size:11})," ",t.isPending?"Generating…":"Generate"]})]}),y.jsxs("div",{className:"border border-line rounded-md bg-surface divide-y divide-lineSoft overflow-hidden",children:[e&&y.jsx("div",{className:"p-3 text-xs text-muted",children:"Loading…"}),!e&&(!n||n.length===0)&&y.jsx("div",{className:"p-4 text-xs text-faint text-center",children:"No tokens yet."}),n==null?void 0:n.map(S=>{const C=m===S.id;return y.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-sm text-ink truncate",children:S.name}),y.jsxs("div",{className:"text-xxs text-muted flex items-center gap-3 mt-0.5",children:[y.jsxs("code",{className:"font-mono text-faint",children:[S.prefix,"…"]}),y.jsxs("span",{children:["created ",i0(new Date(S.createdAt),{addSuffix:!0})]}),y.jsx("span",{children:S.lastUsedAt?`used ${i0(new Date(S.lastUsedAt),{addSuffix:!0})}`:"never used"})]})]}),S.plaintext?y.jsxs("button",{type:"button",onClick:()=>k({id:S.id,plaintext:S.plaintext}),className:`btn gap-1.5 ${C?"!border-emerald-500/30 !text-emerald-600":""}`,title:"Copy full token",children:[C?y.jsx(np,{size:11}):y.jsx(Xy,{size:11}),C?"Copied":"Copy token"]}):y.jsx("span",{className:"text-xxs text-faint border border-line rounded px-2 py-1",title:"Full token is unavailable for tokens created before recoverable storage was enabled.",children:"Unavailable"}),y.jsx("button",{type:"button",className:"text-faint hover:text-danger p-1 -m-1",disabled:u!==null,onClick:()=>w(S.id,S.name),title:u===S.id?"Revoking":"Revoke",children:u===S.id?y.jsx("span",{className:"text-xxs text-muted",children:"Revoking…"}):y.jsx(GT,{size:12})})]},S.id)})]})]})}function aU({anchor:n,projectIds:e}){const t=zx("day",n),{data:r}=wa({from:t.from.toISOString(),to:t.to.toISOString(),projectIds:e??null,includeBacklog:!1,includeDone:!0}),{data:i}=sr(),s=L.useMemo(()=>Pa(i),[i]),{open:l}=Dt(),o=(r==null?void 0:r.overdue)??[],u=((r==null?void 0:r.scheduled)??[]).slice().sort(Zx),h=hp(n);return y.jsx("div",{className:"h-full overflow-y-auto scrollbar-thin",children:y.jsxs("div",{className:"max-w-4xl mx-auto py-4",children:[h&&o.length>0&&y.jsx(IP,{title:"Overdue",count:o.length,accent:"text-danger",tasks:o,projectMap:s}),y.jsx(IP,{title:h?"Today":un(n,"EEEE"),count:u.length,accent:"text-ink",tasks:u,projectMap:s,emptyAction:y.jsx("button",{className:"text-accent text-xs hover:underline",onClick:()=>l({kind:"quick-create"}),children:"+ add a task for this day"})})]})})}function IP({title:n,count:e,accent:t,tasks:r,projectMap:i,emptyAction:s}){return y.jsxs("section",{className:"mb-6",children:[y.jsxs("div",{className:"px-4 py-1.5 flex items-baseline gap-2 sticky top-0 bg-bg z-10",children:[y.jsx("h2",{className:`text-xs font-semibold ${t}`,children:n}),y.jsx("span",{className:"text-xxs text-faint tabular-nums",children:e})]}),r.length===0?y.jsx("div",{className:"px-4 py-2 text-xs text-muted",children:s??"Nothing here."}):y.jsx("div",{className:"bg-surface border-y border-lineSoft",children:r.map(l=>y.jsx(fp,{task:l,project:l.projectId?i.get(l.projectId):void 0},l.id))})]})}function uU({projectIds:n,collapsed:e,onToggle:t}){const{data:r}=wa({projectIds:n??null,includeBacklog:!0,includeDone:!1}),{data:i}=sr(),s=L.useMemo(()=>Pa(i),[i]),l=((r==null?void 0:r.backlog)??[]).filter(o=>o.status!=="rejected");return e?y.jsxs("button",{className:"shrink-0 w-8 border-l border-line bg-sidebar/50 hover:bg-sidebar flex flex-col items-center pt-2 gap-2 group",onClick:t,title:"Expand Inbox",children:[y.jsx(Td,{size:14,className:"text-muted group-hover:text-ink"}),l.length>0&&y.jsx("div",{className:"text-xxs text-muted bg-surface border border-line rounded-full w-5 h-5 flex items-center justify-center",children:l.length})]}):y.jsxs("aside",{className:"shrink-0 w-72 border-l border-line bg-surface flex flex-col",children:[y.jsxs("div",{className:"px-3 h-9 flex items-center justify-between border-b border-lineSoft",children:[y.jsxs("div",{className:"flex items-center gap-2 text-muted",children:[y.jsx(Td,{size:12}),y.jsx("h2",{className:"text-xs font-medium text-ink2",children:"Inbox"}),y.jsx("span",{className:"text-xxs text-faint tabular-nums",children:l.length})]}),y.jsx("button",{onClick:t,className:"btn-ghost btn !h-6 !w-6 !p-0",title:"Collapse",children:"→"})]}),y.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:l.length===0?y.jsxs("div",{className:"text-xs text-muted text-center py-8 px-4",children:["No tasks without due date.",y.jsx("div",{className:"text-faint mt-1",children:"Tasks without due date appear here."})]}):l.map(o=>y.jsx(fp,{task:o,project:o.projectId?s.get(o.projectId):void 0,compact:!0},o.id))})]})}function wE({task:n,project:e}){const t=Vi(),r=n.dueAt&&new Date(n.dueAt).getTime()<Date.now()&&n.status!=="done"&&n.status!=="in_progress";return y.jsxs("button",{type:"button",draggable:!0,onDragStart:i=>{i.dataTransfer.setData("text/task-id",n.id),i.dataTransfer.effectAllowed="move",i.stopPropagation()},onClick:()=>t.open(n.id),className:`group w-full text-left flex items-center gap-1.5 pl-1 pr-1.5 py-1 rounded text-xs hover:bg-sidebarHover transition-colors cursor-grab active:cursor-grabbing ${r?"bg-danger/5":""}`,title:e?`${e.key} · ${_n(n)}`:_n(n),children:[y.jsx("span",{className:"w-[2px] self-stretch rounded-sm shrink-0",style:{backgroundColor:(e==null?void 0:e.color)??"#a8a8af"}}),y.jsx(Oc,{status:n.status,size:11}),y.jsx("span",{className:`truncate flex-1 min-w-0 ${n.status==="done"?"line-through text-muted":n.status==="rejected"?"text-muted":Zi(n)?"italic text-muted":"text-ink2"}`,children:_n(n)}),n.priority!=="none"&&y.jsx(ua,{priority:n.priority,size:11})]})}const cU=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function hU({anchor:n,projectIds:e}){const t=zx("month",n),r=bE(t.from,t.to),{data:i}=wa({from:t.from.toISOString(),to:t.to.toISOString(),projectIds:e??null,includeBacklog:!1,includeDone:!0}),{data:s}=sr(),l=L.useMemo(()=>Pa(s),[s]),o=L.useMemo(()=>kE((i==null?void 0:i.scheduled)??[]),[i]);return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsx("div",{className:"grid grid-cols-7 border-b border-lineSoft bg-sidebar/50",children:cU.map(u=>y.jsx("div",{className:"px-2 py-1 text-xxs uppercase tracking-wider text-muted text-center",children:u},u))}),y.jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6 bg-line/30 gap-px overflow-y-auto scrollbar-thin",children:r.map(u=>{const h=o.get(vE(u))??[],f=!_Y(u,n),p=hp(u);return y.jsx(fU,{day:u,tasks:h,projectMap:l,outOfMonth:f,today:p},u.toISOString())})})]})}function fU({day:n,tasks:e,projectMap:t,outOfMonth:r,today:i}){const{open:s}=Dt(),l=Zl(),[o,u]=L.useState(!1),h=e.slice().sort(Zx),f=h.filter(k=>k.status==="done").length,p=h.length,m=p>0&&f===p;function O(k){k.preventDefault(),u(!1);const b=k.dataTransfer.getData("text/task-id");if(!b)return;const w=new Date(n);w.setHours(12,0,0,0),l.mutate({id:b,fields:{dueAt:w.toISOString()}})}return y.jsxs("div",{className:`group bg-surface p-1 min-h-[112px] flex flex-col transition-colors ${r?"opacity-50":""} ${o?"ring-2 ring-accent ring-inset bg-accentSoft/40":i?"ring-1 ring-accent ring-inset bg-accentSoft/30":""}`,onDragOver:k=>{k.preventDefault(),o||u(!0)},onDragLeave:()=>u(!1),onDrop:O,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1 px-1",children:[y.jsxs("div",{className:"flex items-baseline gap-1.5 min-w-0",children:[y.jsx("span",{className:`text-xs tabular-nums ${i?"font-semibold text-accent":"text-muted"}`,children:un(n,"d")}),p>0&&y.jsxs("span",{className:`text-xxs tabular-nums ${m?"text-statusDone font-medium":"text-faint"}`,title:`${f} done · ${p} total`,children:[f,"/",p]})]}),y.jsx("button",{className:"text-xs text-faint hover:text-accent opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>s({kind:"quick-create"}),title:"Add task",children:"+"})]}),y.jsxs("div",{className:"flex-1 space-y-0.5 min-h-0 overflow-hidden",children:[h.slice(0,4).map(k=>y.jsx(wE,{task:k,project:k.projectId?t.get(k.projectId):void 0},k.id)),h.length>4&&y.jsxs("div",{className:"text-xxs text-muted pl-1",children:["+",h.length-4]})]})]})}function dU({view:n,setView:e,anchor:t,setAnchor:r,projectIds:i,setProjectIds:s}){var h;const{data:l}=sr(),{open:o}=Dt(),u=i?i.length===1?((h=l==null?void 0:l.find(f=>f.id===i[0]))==null?void 0:h.key)??"1 project":`${i.length} projects`:"All projects";return y.jsx("div",{className:"border-b border-line bg-surface",children:y.jsxs("div",{className:"flex items-center justify-between h-11 px-3",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("h1",{className:"text-xs font-semibold text-ink",children:"Tasks"}),y.jsx("div",{className:"seg",children:["day","week","month"].map(f=>y.jsx("button",{onClick:()=>e(f),"data-active":n===f,className:"capitalize",children:f},f))}),y.jsxs("div",{className:"flex items-center gap-1 ml-1",children:[y.jsx("button",{onClick:()=>r(mO(n,t,-1)),className:"btn btn-ghost !h-6 !w-6 !p-0",title:"Previous",children:y.jsx(DT,{size:12})}),y.jsx("button",{onClick:()=>r(mO(n,t,0)),className:"btn !h-6 px-2 text-xxs",title:"Today",children:"Today"}),y.jsx("button",{onClick:()=>r(mO(n,t,1)),className:"btn btn-ghost !h-6 !w-6 !p-0",title:"Next",children:y.jsx(IT,{size:12})}),y.jsx("div",{className:"ml-2 text-xs font-medium text-ink2 tabular-nums",children:zY(n,t)})]})]}),y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx(pU,{projects:l??[],projectIds:i,setProjectIds:s,label:u}),y.jsxs("button",{className:"btn btn-primary",onClick:()=>o({kind:"quick-create"}),title:"New task (c)",children:[y.jsx(rp,{size:11}),y.jsx("span",{className:"text-xs",children:"Task"}),y.jsx("kbd",{className:"!bg-white/15 !border-white/25 !text-white",children:"c"})]})]})]})})}function pU({projects:n,projectIds:e,setProjectIds:t,label:r}){return y.jsxs("details",{className:"relative",children:[y.jsxs("summary",{className:"btn list-none cursor-pointer",children:[y.jsx(LB,{size:11}),y.jsx("span",{className:"text-xs",children:r})]}),y.jsxs("div",{className:"popover top-9 right-0 w-56 px-1 py-1.5",children:[y.jsxs("button",{className:`popover-item ${e?"":"bg-accentSoft text-accentText"}`,onClick:()=>t(null),children:[y.jsx("span",{children:"All projects"}),!e&&y.jsx("span",{className:"ml-auto text-faint",children:"✓"})]}),y.jsx("div",{className:"divider my-1"}),n.map(i=>{const s=(e==null?void 0:e.includes(i.id))??!1;return y.jsxs("label",{className:"popover-item gap-2 cursor-pointer",children:[y.jsx("input",{type:"checkbox",className:"cursor-pointer",checked:s,onChange:()=>{if(!e)t([i.id]);else if(s){const l=e.filter(o=>o!==i.id);t(l.length?l:null)}else t([...e,i.id])}}),y.jsx("span",{className:"font-mono text-xxs text-faint tabular-nums",children:i.key}),y.jsx("span",{className:"text-ink2 truncate",children:i.name})]},i.id)})]})]})}function mU({anchor:n,projectIds:e}){const t=zx("week",n),r=bE(t.from,t.to),i=cp(r[r.length-1],1),s=[...r,i],l=new Date(i);l.setHours(23,59,59,999);const{data:o}=wa({from:t.from.toISOString(),to:l.toISOString(),projectIds:e??null,includeBacklog:!1,includeDone:!0}),{data:u}=sr(),h=L.useMemo(()=>Pa(u),[u]),f=L.useMemo(()=>kE((o==null?void 0:o.scheduled)??[]),[o]),p=s.slice(0,4),m=s.slice(4);return y.jsxs("div",{className:"h-full flex flex-col bg-bg",children:[y.jsx(zP,{days:p,byDay:f,projectMap:h,anchor:n}),y.jsx(zP,{days:m,byDay:f,projectMap:h,anchor:n})]})}function zP({days:n,byDay:e,projectMap:t,anchor:r}){return y.jsx("div",{className:"flex-1 min-h-0 flex border-b border-line last:border-b-0",children:n.map(i=>{const s=e.get(vE(i))??[],l=!LY(i,r,{weekStartsOn:1});return y.jsx(gU,{day:i,tasks:s,projectMap:t,outOfWeek:l},i.toISOString())})})}function gU({day:n,tasks:e,projectMap:t,outOfWeek:r}){const i=hp(n),{open:s}=Dt(),l=Zl(),o=e.slice().sort(Zx),u=o.filter(m=>m.status==="done").length,h=o.length,f=h>0&&u===h;function p(m){m.preventDefault();const O=m.dataTransfer.getData("text/task-id");if(!O)return;const k=new Date(n);k.setHours(12,0,0,0),l.mutate({id:O,fields:{dueAt:k.toISOString()}})}return y.jsxs("div",{className:`flex-1 min-w-0 border-r border-lineSoft last:border-r-0 flex flex-col group/col ${i?"bg-accentSoft/30":r?"bg-sidebar/40":"bg-surface"}`,onDragOver:m=>m.preventDefault(),onDrop:p,children:[y.jsxs("div",{className:"px-3 py-1.5 flex items-baseline justify-between border-b border-lineSoft",children:[y.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[y.jsx("span",{className:"text-xxs uppercase tracking-wider text-muted",children:un(n,"EEE")}),y.jsx("span",{className:`text-sm tabular-nums font-semibold ${i?"text-accent":r?"text-muted":"text-ink2"}`,children:un(n,"d")}),h>0&&y.jsxs("span",{className:`text-xxs tabular-nums ${f?"text-statusDone font-medium":"text-faint"}`,title:`${u} done · ${h} total`,children:[u,"/",h]}),r&&y.jsx("span",{className:"text-xxs text-faint italic",children:"next"})]}),y.jsx("button",{className:"text-faint hover:text-accent text-xs opacity-0 group-hover/col:opacity-100",title:"Add task",onClick:()=>s({kind:"quick-create"}),children:"+"})]}),y.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin p-1.5 space-y-1",children:o.length===0?y.jsx("div",{className:"text-xxs text-faint px-1 py-0.5",children:"—"}):o.map(m=>y.jsx(wE,{task:m,project:m.projectId?t.get(m.projectId):void 0},m.id))})]})}function OU(){const[n,e]=L.useState("week"),[t,r]=L.useState(()=>new Date),[i,s]=L.useState(null),[l,o]=L.useState(!1);return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsx(dU,{view:n,setView:e,anchor:t,setAnchor:r,projectIds:i,setProjectIds:s}),y.jsxs("div",{className:"flex-1 min-h-0 flex",children:[y.jsxs("div",{className:"flex-1 min-w-0 overflow-hidden bg-bg",children:[n==="day"&&y.jsx(aU,{anchor:t,projectIds:i}),n==="week"&&y.jsx(mU,{anchor:t,projectIds:i}),n==="month"&&y.jsx(hU,{anchor:t,projectIds:i})]}),y.jsx(uU,{projectIds:i,collapsed:l,onToggle:()=>o(u=>!u)})]})]})}function yU(){const n=new Date,{data:e}=sr(),t=L.useMemo(()=>Pa(e),[e]),r=L.useMemo(()=>{const h=new Date(n);h.setHours(0,0,0,0);const f=new Date(n);return f.setHours(23,59,59,999),{from:h.toISOString(),to:f.toISOString()}},[]),{data:i,isLoading:s}=wa({from:r.from,to:r.to,includeBacklog:!1,includeDone:!1}),{open:l}=Dt(),o=((i==null?void 0:i.overdue)??[]).filter(h=>h.status!=="rejected"),u=(i==null?void 0:i.scheduled)??[];return y.jsx("div",{className:"h-full overflow-y-auto scrollbar-thin",children:y.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6 space-y-6",children:[y.jsxs("header",{className:"flex items-baseline gap-3",children:[y.jsx(YT,{size:18,className:"text-accent"}),y.jsx("h1",{className:"text-lg font-semibold",children:"Today"}),y.jsx("span",{className:"text-xs text-muted",children:un(n,"EEEE, MMM d")})]}),s&&y.jsx("div",{className:"text-sm text-muted",children:"Loading…"}),!s&&y.jsxs(y.Fragment,{children:[y.jsx(ZP,{title:"Overdue",count:o.length,accent:"text-danger",tasks:o,projectMap:t}),y.jsx(ZP,{title:hp(n)?"Today":un(n,"EEEE"),count:u.length,accent:"text-ink",tasks:u,projectMap:t,emptyAction:y.jsx("button",{className:"text-accent text-xs hover:underline",onClick:()=>l({kind:"quick-create"}),children:"+ add a task"})})]})]})})}function ZP({title:n,count:e,accent:t,tasks:r,projectMap:i,emptyAction:s}){if(r.length===0&&!s)return null;const l=new Map;for(const o of r){const u=o.projectId??null;l.has(u)||l.set(u,[]),l.get(u).push(o)}return y.jsxs("section",{className:"space-y-1.5",children:[y.jsxs("div",{className:"flex items-baseline gap-2",children:[y.jsx("h2",{className:`text-xs font-semibold ${t}`,children:n}),y.jsx("span",{className:"text-xxs text-faint tabular-nums",children:e})]}),r.length===0?y.jsx("div",{className:"text-xs text-muted py-1",children:s??"Nothing here."}):y.jsx("div",{className:"border border-line rounded-md overflow-hidden bg-surface",children:Array.from(l.entries()).map(([o,u])=>{const h=o?i.get(o):void 0;return y.jsxs("div",{children:[y.jsxs("div",{className:"px-3 py-1 border-b border-lineSoft bg-sidebar/40 flex items-center gap-1.5 text-xxs",children:[h?y.jsxs(y.Fragment,{children:[y.jsx(Fs,{color:h.color,icon:h.icon,size:10}),y.jsx("span",{className:"font-mono tabular-nums",style:{color:h.color},children:h.key}),y.jsx("span",{className:"text-muted truncate",children:h.name})]}):y.jsx("span",{className:"text-faint",children:"no project"}),y.jsx("span",{className:"text-faint ml-auto tabular-nums",children:u.length})]}),u.map(f=>y.jsx(fp,{task:f,project:h},f.id))]},o??"_none")})})]})}function xU(){return y.jsxs(k5,{children:[y.jsxs(s5,{children:[y.jsx(dr,{path:"/login",element:y.jsx(VY,{})}),y.jsxs(dr,{element:y.jsx(uF,{}),children:[y.jsx(dr,{path:"/",element:y.jsx(OU,{})}),y.jsx(dr,{path:"/today",element:y.jsx(yU,{})}),y.jsx(dr,{path:"/inbox",element:y.jsx(XY,{})}),y.jsx(dr,{path:"/dashboard",element:y.jsx(yF,{})}),y.jsx(dr,{path:"/settings",element:y.jsx(JY,{})}),y.jsx(dr,{path:"/p/:key",element:y.jsx(GY,{})}),y.jsx(dr,{path:"/p/:key/e/:id",element:y.jsx(kF,{})}),y.jsx(dr,{path:"/p/:key/agents-md",element:y.jsx(OF,{})}),y.jsx(dr,{path:"/search",element:y.jsx(HY,{})})]})]}),y.jsx(mF,{})]})}const kU=new FA({defaultOptions:{queries:{staleTime:1e4,gcTime:5*6e4,retry:1,refetchOnWindowFocus:!0}}});fR.createRoot(document.getElementById("root")).render(y.jsx(u2.StrictMode,{children:y.jsx(UA,{client:kU,children:y.jsx(p5,{children:y.jsx(xU,{})})})}));