vzcode 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,89 +0,0 @@
1
- function WR(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,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 o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(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=n(i);fetch(i.href,s)}})();var h1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ds(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lx={exports:{}},ad={},ax={exports:{}},We={};/**
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 Iu=Symbol.for("react.element"),zR=Symbol.for("react.portal"),YR=Symbol.for("react.fragment"),qR=Symbol.for("react.strict_mode"),GR=Symbol.for("react.profiler"),HR=Symbol.for("react.provider"),KR=Symbol.for("react.context"),JR=Symbol.for("react.forward_ref"),eA=Symbol.for("react.suspense"),tA=Symbol.for("react.memo"),nA=Symbol.for("react.lazy"),d1=Symbol.iterator;function rA(t){return t===null||typeof t!="object"?null:(t=d1&&t[d1]||t["@@iterator"],typeof t=="function"?t:null)}var ux={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cx=Object.assign,fx={};function Nl(t,e,n){this.props=t,this.context=e,this.refs=fx,this.updater=n||ux}Nl.prototype.isReactComponent={};Nl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Nl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function hx(){}hx.prototype=Nl.prototype;function s0(t,e,n){this.props=t,this.context=e,this.refs=fx,this.updater=n||ux}var o0=s0.prototype=new hx;o0.constructor=s0;cx(o0,Nl.prototype);o0.isPureReactComponent=!0;var p1=Array.isArray,dx=Object.prototype.hasOwnProperty,l0={current:null},px={key:!0,ref:!0,__self:!0,__source:!0};function gx(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)dx.call(e,r)&&!px.hasOwnProperty(r)&&(i[r]=e[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(t&&t.defaultProps)for(r in l=t.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Iu,type:t,key:s,ref:o,props:i,_owner:l0.current}}function iA(t,e){return{$$typeof:Iu,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function a0(t){return typeof t=="object"&&t!==null&&t.$$typeof===Iu}function sA(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var g1=/\/+/g;function yp(t,e){return typeof t=="object"&&t!==null&&t.key!=null?sA(""+t.key):e.toString(36)}function vf(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Iu:case zR:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+yp(o,0):r,p1(i)?(n="",t!=null&&(n=t.replace(g1,"$&/")+"/"),vf(i,e,n,"",function(u){return u})):i!=null&&(a0(i)&&(i=iA(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(g1,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",p1(t))for(var l=0;l<t.length;l++){s=t[l];var a=r+yp(s,l);o+=vf(s,e,n,a,i)}else if(a=rA(t),typeof a=="function")for(t=a.call(t),l=0;!(s=t.next()).done;)s=s.value,a=r+yp(s,l++),o+=vf(s,e,n,a,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function xc(t,e,n){if(t==null)return t;var r=[],i=0;return vf(t,r,"","",function(s){return e.call(n,s,i++)}),r}function oA(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var In={current:null},yf={transition:null},lA={ReactCurrentDispatcher:In,ReactCurrentBatchConfig:yf,ReactCurrentOwner:l0};We.Children={map:xc,forEach:function(t,e,n){xc(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return xc(t,function(){e++}),e},toArray:function(t){return xc(t,function(e){return e})||[]},only:function(t){if(!a0(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};We.Component=Nl;We.Fragment=YR;We.Profiler=GR;We.PureComponent=s0;We.StrictMode=qR;We.Suspense=eA;We.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lA;We.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=cx({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=l0.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(a in e)dx.call(e,a)&&!px.hasOwnProperty(a)&&(r[a]=e[a]===void 0&&l!==void 0?l[a]:e[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Iu,type:t.type,key:i,ref:s,props:r,_owner:o}};We.createContext=function(t){return t={$$typeof:KR,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:HR,_context:t},t.Consumer=t};We.createElement=gx;We.createFactory=function(t){var e=gx.bind(null,t);return e.type=t,e};We.createRef=function(){return{current:null}};We.forwardRef=function(t){return{$$typeof:JR,render:t}};We.isValidElement=a0;We.lazy=function(t){return{$$typeof:nA,_payload:{_status:-1,_result:t},_init:oA}};We.memo=function(t,e){return{$$typeof:tA,type:t,compare:e===void 0?null:e}};We.startTransition=function(t){var e=yf.transition;yf.transition={};try{t()}finally{yf.transition=e}};We.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};We.useCallback=function(t,e){return In.current.useCallback(t,e)};We.useContext=function(t){return In.current.useContext(t)};We.useDebugValue=function(){};We.useDeferredValue=function(t){return In.current.useDeferredValue(t)};We.useEffect=function(t,e){return In.current.useEffect(t,e)};We.useId=function(){return In.current.useId()};We.useImperativeHandle=function(t,e,n){return In.current.useImperativeHandle(t,e,n)};We.useInsertionEffect=function(t,e){return In.current.useInsertionEffect(t,e)};We.useLayoutEffect=function(t,e){return In.current.useLayoutEffect(t,e)};We.useMemo=function(t,e){return In.current.useMemo(t,e)};We.useReducer=function(t,e,n){return In.current.useReducer(t,e,n)};We.useRef=function(t){return In.current.useRef(t)};We.useState=function(t){return In.current.useState(t)};We.useSyncExternalStore=function(t,e,n){return In.current.useSyncExternalStore(t,e,n)};We.useTransition=function(){return In.current.useTransition()};We.version="18.2.0";ax.exports=We;var R=ax.exports;const cs=Ds(R),m1=WR({__proto__:null,default:cs},[R]);/**
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 aA=R,uA=Symbol.for("react.element"),cA=Symbol.for("react.fragment"),fA=Object.prototype.hasOwnProperty,hA=aA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dA={key:!0,ref:!0,__self:!0,__source:!0};function mx(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)fA.call(e,r)&&!dA.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:uA,type:t,key:s,ref:o,props:i,_owner:hA.current}}ad.Fragment=cA;ad.jsx=mx;ad.jsxs=mx;lx.exports=ad;var U=lx.exports,Ox={exports:{}},fr={},vx={exports:{}},yx={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(t){function e(V,G){var te=V.length;V.push(G);e:for(;0<te;){var Ae=te-1>>>1,xe=V[Ae];if(0<i(xe,G))V[Ae]=G,V[te]=xe,te=Ae;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var G=V[0],te=V.pop();if(te!==G){V[0]=te;e:for(var Ae=0,xe=V.length,je=xe>>>1;Ae<je;){var Ke=2*(Ae+1)-1,Pt=V[Ke],ct=Ke+1,ut=V[ct];if(0>i(Pt,te))ct<xe&&0>i(ut,Pt)?(V[Ae]=ut,V[ct]=te,Ae=ct):(V[Ae]=Pt,V[Ke]=te,Ae=Ke);else if(ct<xe&&0>i(ut,te))V[Ae]=ut,V[ct]=te,Ae=ct;else break e}}return G}function i(V,G){var te=V.sortIndex-G.sortIndex;return te!==0?te:V.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,f=null,h=3,p=!1,d=!1,g=!1,O=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(V){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=V)r(u),G.sortIndex=G.expirationTime,e(a,G);else break;G=n(u)}}function b(V){if(g=!1,y(V),!d)if(n(a)!==null)d=!0,re(C);else{var G=n(u);G!==null&&se(b,G.startTime-V)}}function C(V,G){d=!1,g&&(g=!1,m(k),k=-1),p=!0;var te=h;try{for(y(G),f=n(a);f!==null&&(!(f.expirationTime>G)||V&&!E());){var Ae=f.callback;if(typeof Ae=="function"){f.callback=null,h=f.priorityLevel;var xe=Ae(f.expirationTime<=G);G=t.unstable_now(),typeof xe=="function"?f.callback=xe:f===n(a)&&r(a),y(G)}else r(a);f=n(a)}if(f!==null)var je=!0;else{var Ke=n(u);Ke!==null&&se(b,Ke.startTime-G),je=!1}return je}finally{f=null,h=te,p=!1}}var Q=!1,_=null,k=-1,w=5,P=-1;function E(){return!(t.unstable_now()-P<w)}function A(){if(_!==null){var V=t.unstable_now();P=V;var G=!0;try{G=_(!0,V)}finally{G?M():(Q=!1,_=null)}}else Q=!1}var M;if(typeof S=="function")M=function(){S(A)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,z=N.port2;N.port1.onmessage=A,M=function(){z.postMessage(null)}}else M=function(){O(A,0)};function re(V){_=V,Q||(Q=!0,M())}function se(V,G){k=O(function(){V(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_continueExecution=function(){d||p||(d=!0,re(C))},t.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<V?Math.floor(1e3/V):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(a)},t.unstable_next=function(V){switch(h){case 1:case 2:case 3:var G=3;break;default:G=h}var te=h;h=G;try{return V()}finally{h=te}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(V,G){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var te=h;h=V;try{return G()}finally{h=te}},t.unstable_scheduleCallback=function(V,G,te){var Ae=t.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?Ae+te:Ae):te=Ae,V){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=te+xe,V={id:c++,callback:G,priorityLevel:V,startTime:te,expirationTime:xe,sortIndex:-1},te>Ae?(V.sortIndex=te,e(u,V),n(a)===null&&V===n(u)&&(g?(m(k),k=-1):g=!0,se(b,te-Ae))):(V.sortIndex=xe,e(a,V),d||p||(d=!0,re(C))),V},t.unstable_shouldYield=E,t.unstable_wrapCallback=function(V){var G=h;return function(){var te=h;h=G;try{return V.apply(this,arguments)}finally{h=te}}}})(yx);vx.exports=yx;var pA=vx.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 Sx=R,cr=pA;function J(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var bx=new Set,qa={};function vo(t,e){ml(t,e),ml(t+"Capture",e)}function ml(t,e){for(qa[t]=e,t=0;t<e.length;t++)bx.add(e[t])}var ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wg=Object.prototype.hasOwnProperty,gA=/^[: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]*$/,O1={},v1={};function mA(t){return Wg.call(v1,t)?!0:Wg.call(O1,t)?!1:gA.test(t)?v1[t]=!0:(O1[t]=!0,!1)}function OA(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function vA(t,e,n,r){if(e===null||typeof e>"u"||OA(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Nn(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var vn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){vn[t]=new Nn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];vn[e]=new Nn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){vn[t]=new Nn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){vn[t]=new Nn(t,2,!1,t,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(t){vn[t]=new Nn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){vn[t]=new Nn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){vn[t]=new Nn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){vn[t]=new Nn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){vn[t]=new Nn(t,5,!1,t.toLowerCase(),null,!1,!1)});var u0=/[\-:]([a-z])/g;function c0(t){return t[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(t){var e=t.replace(u0,c0);vn[e]=new Nn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(u0,c0);vn[e]=new Nn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(u0,c0);vn[e]=new Nn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){vn[t]=new Nn(t,1,!1,t.toLowerCase(),null,!1,!1)});vn.xlinkHref=new Nn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){vn[t]=new Nn(t,1,!1,t.toLowerCase(),null,!0,!0)});function f0(t,e,n,r){var i=vn.hasOwnProperty(e)?vn[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(vA(e,n,i,r)&&(n=null),r||i===null?mA(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Yi=Sx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pc=Symbol.for("react.element"),Xo=Symbol.for("react.portal"),Vo=Symbol.for("react.fragment"),h0=Symbol.for("react.strict_mode"),zg=Symbol.for("react.profiler"),wx=Symbol.for("react.provider"),kx=Symbol.for("react.context"),d0=Symbol.for("react.forward_ref"),Yg=Symbol.for("react.suspense"),qg=Symbol.for("react.suspense_list"),p0=Symbol.for("react.memo"),ns=Symbol.for("react.lazy"),xx=Symbol.for("react.offscreen"),y1=Symbol.iterator;function na(t){return t===null||typeof t!="object"?null:(t=y1&&t[y1]||t["@@iterator"],typeof t=="function"?t:null)}var Nt=Object.assign,Sp;function wa(t){if(Sp===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Sp=e&&e[1]||""}return`
34
- `+Sp+t}var bp=!1;function wp(t,e){if(!t||bp)return"";bp=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
- `),s=r.stack.split(`
36
- `),o=i.length-1,l=s.length-1;1<=o&&0<=l&&i[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==s[l]){var a=`
37
- `+i[o].replace(" at new "," at ");return t.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",t.displayName)),a}while(1<=o&&0<=l);break}}}finally{bp=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?wa(t):""}function yA(t){switch(t.tag){case 5:return wa(t.type);case 16:return wa("Lazy");case 13:return wa("Suspense");case 19:return wa("SuspenseList");case 0:case 2:case 15:return t=wp(t.type,!1),t;case 11:return t=wp(t.type.render,!1),t;case 1:return t=wp(t.type,!0),t;default:return""}}function Gg(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Vo:return"Fragment";case Xo:return"Portal";case zg:return"Profiler";case h0:return"StrictMode";case Yg:return"Suspense";case qg:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case kx:return(t.displayName||"Context")+".Consumer";case wx:return(t._context.displayName||"Context")+".Provider";case d0:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case p0:return e=t.displayName||null,e!==null?e:Gg(t.type)||"Memo";case ns:e=t._payload,t=t._init;try{return Gg(t(e))}catch{}}return null}function SA(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Gg(e);case 8:return e===h0?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Qs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Px(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function bA(t){var e=Px(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Cc(t){t._valueTracker||(t._valueTracker=bA(t))}function Cx(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Px(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function zf(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Hg(t,e){var n=e.checked;return Nt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function S1(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Qs(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Qx(t,e){e=e.checked,e!=null&&f0(t,"checked",e,!1)}function Kg(t,e){Qx(t,e);var n=Qs(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Jg(t,e.type,n):e.hasOwnProperty("defaultValue")&&Jg(t,e.type,Qs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function b1(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Jg(t,e,n){(e!=="number"||zf(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ka=Array.isArray;function tl(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Qs(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function em(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(J(91));return Nt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function w1(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(J(92));if(ka(n)){if(1<n.length)throw Error(J(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Qs(n)}}function Ex(t,e){var n=Qs(e.value),r=Qs(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function k1(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function $x(t){switch(t){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 tm(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?$x(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Qc,_x=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Qc=Qc||document.createElement("div"),Qc.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Qc.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ga(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Da={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},wA=["Webkit","ms","Moz","O"];Object.keys(Da).forEach(function(t){wA.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Da[e]=Da[t]})});function Tx(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Da.hasOwnProperty(t)&&Da[t]?(""+e).trim():e+"px"}function Rx(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Tx(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var kA=Nt({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 nm(t,e){if(e){if(kA[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(J(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(J(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(J(61))}if(e.style!=null&&typeof e.style!="object")throw Error(J(62))}}function rm(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 im=null;function g0(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var sm=null,nl=null,rl=null;function x1(t){if(t=Xu(t)){if(typeof sm!="function")throw Error(J(280));var e=t.stateNode;e&&(e=dd(e),sm(t.stateNode,t.type,e))}}function Ax(t){nl?rl?rl.push(t):rl=[t]:nl=t}function Dx(){if(nl){var t=nl,e=rl;if(rl=nl=null,x1(t),e)for(t=0;t<e.length;t++)x1(e[t])}}function Mx(t,e){return t(e)}function Ix(){}var kp=!1;function Nx(t,e,n){if(kp)return t(e,n);kp=!0;try{return Mx(t,e,n)}finally{kp=!1,(nl!==null||rl!==null)&&(Ix(),Dx())}}function Ha(t,e){var n=t.stateNode;if(n===null)return null;var r=dd(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(J(231,e,typeof n));return n}var om=!1;if(ji)try{var ra={};Object.defineProperty(ra,"passive",{get:function(){om=!0}}),window.addEventListener("test",ra,ra),window.removeEventListener("test",ra,ra)}catch{om=!1}function xA(t,e,n,r,i,s,o,l,a){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var Ma=!1,Yf=null,qf=!1,lm=null,PA={onError:function(t){Ma=!0,Yf=t}};function CA(t,e,n,r,i,s,o,l,a){Ma=!1,Yf=null,xA.apply(PA,arguments)}function QA(t,e,n,r,i,s,o,l,a){if(CA.apply(this,arguments),Ma){if(Ma){var u=Yf;Ma=!1,Yf=null}else throw Error(J(198));qf||(qf=!0,lm=u)}}function yo(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Lx(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function P1(t){if(yo(t)!==t)throw Error(J(188))}function EA(t){var e=t.alternate;if(!e){if(e=yo(t),e===null)throw Error(J(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return P1(i),t;if(s===r)return P1(i),e;s=s.sibling}throw Error(J(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(J(189))}}if(n.alternate!==r)throw Error(J(190))}if(n.tag!==3)throw Error(J(188));return n.stateNode.current===n?t:e}function Xx(t){return t=EA(t),t!==null?Vx(t):null}function Vx(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Vx(t);if(e!==null)return e;t=t.sibling}return null}var Zx=cr.unstable_scheduleCallback,C1=cr.unstable_cancelCallback,$A=cr.unstable_shouldYield,_A=cr.unstable_requestPaint,Ut=cr.unstable_now,TA=cr.unstable_getCurrentPriorityLevel,m0=cr.unstable_ImmediatePriority,jx=cr.unstable_UserBlockingPriority,Gf=cr.unstable_NormalPriority,RA=cr.unstable_LowPriority,Bx=cr.unstable_IdlePriority,ud=null,gi=null;function AA(t){if(gi&&typeof gi.onCommitFiberRoot=="function")try{gi.onCommitFiberRoot(ud,t,void 0,(t.current.flags&128)===128)}catch{}}var Fr=Math.clz32?Math.clz32:IA,DA=Math.log,MA=Math.LN2;function IA(t){return t>>>=0,t===0?32:31-(DA(t)/MA|0)|0}var Ec=64,$c=4194304;function xa(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Hf(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=xa(l):(s&=o,s!==0&&(r=xa(s)))}else o=n&~i,o!==0?r=xa(o):s!==0&&(r=xa(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Fr(e),i=1<<n,r|=t[n],e&=~i;return r}function NA(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 LA(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Fr(s),l=1<<o,a=i[o];a===-1?(!(l&n)||l&r)&&(i[o]=NA(l,e)):a<=e&&(t.expiredLanes|=l),s&=~l}}function am(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Fx(){var t=Ec;return Ec<<=1,!(Ec&4194240)&&(Ec=64),t}function xp(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Nu(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fr(e),t[e]=n}function XA(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Fr(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function O0(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Fr(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var lt=0;function Ux(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Wx,v0,zx,Yx,qx,um=!1,_c=[],Os=null,vs=null,ys=null,Ka=new Map,Ja=new Map,ls=[],VA="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 Q1(t,e){switch(t){case"focusin":case"focusout":Os=null;break;case"dragenter":case"dragleave":vs=null;break;case"mouseover":case"mouseout":ys=null;break;case"pointerover":case"pointerout":Ka.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ja.delete(e.pointerId)}}function ia(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Xu(e),e!==null&&v0(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function ZA(t,e,n,r,i){switch(e){case"focusin":return Os=ia(Os,t,e,n,r,i),!0;case"dragenter":return vs=ia(vs,t,e,n,r,i),!0;case"mouseover":return ys=ia(ys,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ka.set(s,ia(Ka.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ja.set(s,ia(Ja.get(s)||null,t,e,n,r,i)),!0}return!1}function Gx(t){var e=Gs(t.target);if(e!==null){var n=yo(e);if(n!==null){if(e=n.tag,e===13){if(e=Lx(n),e!==null){t.blockedOn=e,qx(t.priority,function(){zx(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Sf(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=cm(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);im=r,n.target.dispatchEvent(r),im=null}else return e=Xu(n),e!==null&&v0(e),t.blockedOn=n,!1;e.shift()}return!0}function E1(t,e,n){Sf(t)&&n.delete(e)}function jA(){um=!1,Os!==null&&Sf(Os)&&(Os=null),vs!==null&&Sf(vs)&&(vs=null),ys!==null&&Sf(ys)&&(ys=null),Ka.forEach(E1),Ja.forEach(E1)}function sa(t,e){t.blockedOn===e&&(t.blockedOn=null,um||(um=!0,cr.unstable_scheduleCallback(cr.unstable_NormalPriority,jA)))}function eu(t){function e(i){return sa(i,t)}if(0<_c.length){sa(_c[0],t);for(var n=1;n<_c.length;n++){var r=_c[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Os!==null&&sa(Os,t),vs!==null&&sa(vs,t),ys!==null&&sa(ys,t),Ka.forEach(e),Ja.forEach(e),n=0;n<ls.length;n++)r=ls[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<ls.length&&(n=ls[0],n.blockedOn===null);)Gx(n),n.blockedOn===null&&ls.shift()}var il=Yi.ReactCurrentBatchConfig,Kf=!0;function BA(t,e,n,r){var i=lt,s=il.transition;il.transition=null;try{lt=1,y0(t,e,n,r)}finally{lt=i,il.transition=s}}function FA(t,e,n,r){var i=lt,s=il.transition;il.transition=null;try{lt=4,y0(t,e,n,r)}finally{lt=i,il.transition=s}}function y0(t,e,n,r){if(Kf){var i=cm(t,e,n,r);if(i===null)Dp(t,e,r,Jf,n),Q1(t,r);else if(ZA(i,t,e,n,r))r.stopPropagation();else if(Q1(t,r),e&4&&-1<VA.indexOf(t)){for(;i!==null;){var s=Xu(i);if(s!==null&&Wx(s),s=cm(t,e,n,r),s===null&&Dp(t,e,r,Jf,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Dp(t,e,r,null,n)}}var Jf=null;function cm(t,e,n,r){if(Jf=null,t=g0(r),t=Gs(t),t!==null)if(e=yo(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Lx(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Jf=t,null}function Hx(t){switch(t){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(TA()){case m0:return 1;case jx:return 4;case Gf:case RA:return 16;case Bx:return 536870912;default:return 16}default:return 16}}var fs=null,S0=null,bf=null;function Kx(){if(bf)return bf;var t,e=S0,n=e.length,r,i="value"in fs?fs.value:fs.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return bf=i.slice(t,1<r?1-r:void 0)}function wf(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Tc(){return!0}function $1(){return!1}function hr(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(n=t[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Tc:$1,this.isPropagationStopped=$1,this}return Nt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Tc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Tc)},persist:function(){},isPersistent:Tc}),e}var Ll={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},b0=hr(Ll),Lu=Nt({},Ll,{view:0,detail:0}),UA=hr(Lu),Pp,Cp,oa,cd=Nt({},Lu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:w0,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==oa&&(oa&&t.type==="mousemove"?(Pp=t.screenX-oa.screenX,Cp=t.screenY-oa.screenY):Cp=Pp=0,oa=t),Pp)},movementY:function(t){return"movementY"in t?t.movementY:Cp}}),_1=hr(cd),WA=Nt({},cd,{dataTransfer:0}),zA=hr(WA),YA=Nt({},Lu,{relatedTarget:0}),Qp=hr(YA),qA=Nt({},Ll,{animationName:0,elapsedTime:0,pseudoElement:0}),GA=hr(qA),HA=Nt({},Ll,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),KA=hr(HA),JA=Nt({},Ll,{data:0}),T1=hr(JA),eD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tD={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"},nD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rD(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=nD[t])?!!e[t]:!1}function w0(){return rD}var iD=Nt({},Lu,{key:function(t){if(t.key){var e=eD[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=wf(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?tD[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:w0,charCode:function(t){return t.type==="keypress"?wf(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?wf(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),sD=hr(iD),oD=Nt({},cd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),R1=hr(oD),lD=Nt({},Lu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:w0}),aD=hr(lD),uD=Nt({},Ll,{propertyName:0,elapsedTime:0,pseudoElement:0}),cD=hr(uD),fD=Nt({},cd,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),hD=hr(fD),dD=[9,13,27,32],k0=ji&&"CompositionEvent"in window,Ia=null;ji&&"documentMode"in document&&(Ia=document.documentMode);var pD=ji&&"TextEvent"in window&&!Ia,Jx=ji&&(!k0||Ia&&8<Ia&&11>=Ia),A1=String.fromCharCode(32),D1=!1;function eP(t,e){switch(t){case"keyup":return dD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tP(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Zo=!1;function gD(t,e){switch(t){case"compositionend":return tP(e);case"keypress":return e.which!==32?null:(D1=!0,A1);case"textInput":return t=e.data,t===A1&&D1?null:t;default:return null}}function mD(t,e){if(Zo)return t==="compositionend"||!k0&&eP(t,e)?(t=Kx(),bf=S0=fs=null,Zo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Jx&&e.locale!=="ko"?null:e.data;default:return null}}var OD={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 M1(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!OD[t.type]:e==="textarea"}function nP(t,e,n,r){Ax(r),e=eh(e,"onChange"),0<e.length&&(n=new b0("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Na=null,tu=null;function vD(t){dP(t,0)}function fd(t){var e=Fo(t);if(Cx(e))return t}function yD(t,e){if(t==="change")return e}var rP=!1;if(ji){var Ep;if(ji){var $p="oninput"in document;if(!$p){var I1=document.createElement("div");I1.setAttribute("oninput","return;"),$p=typeof I1.oninput=="function"}Ep=$p}else Ep=!1;rP=Ep&&(!document.documentMode||9<document.documentMode)}function N1(){Na&&(Na.detachEvent("onpropertychange",iP),tu=Na=null)}function iP(t){if(t.propertyName==="value"&&fd(tu)){var e=[];nP(e,tu,t,g0(t)),Nx(vD,e)}}function SD(t,e,n){t==="focusin"?(N1(),Na=e,tu=n,Na.attachEvent("onpropertychange",iP)):t==="focusout"&&N1()}function bD(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return fd(tu)}function wD(t,e){if(t==="click")return fd(e)}function kD(t,e){if(t==="input"||t==="change")return fd(e)}function xD(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Wr=typeof Object.is=="function"?Object.is:xD;function nu(t,e){if(Wr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Wg.call(e,i)||!Wr(t[i],e[i]))return!1}return!0}function L1(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function X1(t,e){var n=L1(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=L1(n)}}function sP(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?sP(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function oP(){for(var t=window,e=zf();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=zf(t.document)}return e}function x0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function PD(t){var e=oP(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&sP(n.ownerDocument.documentElement,n)){if(r!==null&&x0(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=X1(n,s);var o=X1(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var CD=ji&&"documentMode"in document&&11>=document.documentMode,jo=null,fm=null,La=null,hm=!1;function V1(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hm||jo==null||jo!==zf(r)||(r=jo,"selectionStart"in r&&x0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),La&&nu(La,r)||(La=r,r=eh(fm,"onSelect"),0<r.length&&(e=new b0("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=jo)))}function Rc(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Bo={animationend:Rc("Animation","AnimationEnd"),animationiteration:Rc("Animation","AnimationIteration"),animationstart:Rc("Animation","AnimationStart"),transitionend:Rc("Transition","TransitionEnd")},_p={},lP={};ji&&(lP=document.createElement("div").style,"AnimationEvent"in window||(delete Bo.animationend.animation,delete Bo.animationiteration.animation,delete Bo.animationstart.animation),"TransitionEvent"in window||delete Bo.transitionend.transition);function hd(t){if(_p[t])return _p[t];if(!Bo[t])return t;var e=Bo[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in lP)return _p[t]=e[n];return t}var aP=hd("animationend"),uP=hd("animationiteration"),cP=hd("animationstart"),fP=hd("transitionend"),hP=new Map,Z1="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 Ms(t,e){hP.set(t,e),vo(e,[t])}for(var Tp=0;Tp<Z1.length;Tp++){var Rp=Z1[Tp],QD=Rp.toLowerCase(),ED=Rp[0].toUpperCase()+Rp.slice(1);Ms(QD,"on"+ED)}Ms(aP,"onAnimationEnd");Ms(uP,"onAnimationIteration");Ms(cP,"onAnimationStart");Ms("dblclick","onDoubleClick");Ms("focusin","onFocus");Ms("focusout","onBlur");Ms(fP,"onTransitionEnd");ml("onMouseEnter",["mouseout","mouseover"]);ml("onMouseLeave",["mouseout","mouseover"]);ml("onPointerEnter",["pointerout","pointerover"]);ml("onPointerLeave",["pointerout","pointerover"]);vo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vo("onBeforeInput",["compositionend","keypress","textInput","paste"]);vo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pa="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(" "),$D=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pa));function j1(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,QA(r,e,void 0,t),t.currentTarget=null}function dP(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var l=r[o],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==s&&i.isPropagationStopped())break e;j1(i,l,u),s=a}else for(o=0;o<r.length;o++){if(l=r[o],a=l.instance,u=l.currentTarget,l=l.listener,a!==s&&i.isPropagationStopped())break e;j1(i,l,u),s=a}}}if(qf)throw t=lm,qf=!1,lm=null,t}function St(t,e){var n=e[Om];n===void 0&&(n=e[Om]=new Set);var r=t+"__bubble";n.has(r)||(pP(e,t,2,!1),n.add(r))}function Ap(t,e,n){var r=0;e&&(r|=4),pP(n,t,r,e)}var Ac="_reactListening"+Math.random().toString(36).slice(2);function ru(t){if(!t[Ac]){t[Ac]=!0,bx.forEach(function(n){n!=="selectionchange"&&($D.has(n)||Ap(n,!1,t),Ap(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ac]||(e[Ac]=!0,Ap("selectionchange",!1,e))}}function pP(t,e,n,r){switch(Hx(e)){case 1:var i=BA;break;case 4:i=FA;break;default:i=y0}n=i.bind(null,e,n,t),i=void 0,!om||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Dp(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Gs(l),o===null)return;if(a=o.tag,a===5||a===6){r=s=o;continue e}l=l.parentNode}}r=r.return}Nx(function(){var u=s,c=g0(n),f=[];e:{var h=hP.get(t);if(h!==void 0){var p=b0,d=t;switch(t){case"keypress":if(wf(n)===0)break e;case"keydown":case"keyup":p=sD;break;case"focusin":d="focus",p=Qp;break;case"focusout":d="blur",p=Qp;break;case"beforeblur":case"afterblur":p=Qp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=_1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=zA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=aD;break;case aP:case uP:case cP:p=GA;break;case fP:p=cD;break;case"scroll":p=UA;break;case"wheel":p=hD;break;case"copy":case"cut":case"paste":p=KA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=R1}var g=(e&4)!==0,O=!g&&t==="scroll",m=g?h!==null?h+"Capture":null:h;g=[];for(var S=u,y;S!==null;){y=S;var b=y.stateNode;if(y.tag===5&&b!==null&&(y=b,m!==null&&(b=Ha(S,m),b!=null&&g.push(iu(S,b,y)))),O)break;S=S.return}0<g.length&&(h=new p(h,d,null,n,c),f.push({event:h,listeners:g}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",h&&n!==im&&(d=n.relatedTarget||n.fromElement)&&(Gs(d)||d[Bi]))break e;if((p||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,p?(d=n.relatedTarget||n.toElement,p=u,d=d?Gs(d):null,d!==null&&(O=yo(d),d!==O||d.tag!==5&&d.tag!==6)&&(d=null)):(p=null,d=u),p!==d)){if(g=_1,b="onMouseLeave",m="onMouseEnter",S="mouse",(t==="pointerout"||t==="pointerover")&&(g=R1,b="onPointerLeave",m="onPointerEnter",S="pointer"),O=p==null?h:Fo(p),y=d==null?h:Fo(d),h=new g(b,S+"leave",p,n,c),h.target=O,h.relatedTarget=y,b=null,Gs(c)===u&&(g=new g(m,S+"enter",d,n,c),g.target=y,g.relatedTarget=O,b=g),O=b,p&&d)t:{for(g=p,m=d,S=0,y=g;y;y=$o(y))S++;for(y=0,b=m;b;b=$o(b))y++;for(;0<S-y;)g=$o(g),S--;for(;0<y-S;)m=$o(m),y--;for(;S--;){if(g===m||m!==null&&g===m.alternate)break t;g=$o(g),m=$o(m)}g=null}else g=null;p!==null&&B1(f,h,p,g,!1),d!==null&&O!==null&&B1(f,O,d,g,!0)}}e:{if(h=u?Fo(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var C=yD;else if(M1(h))if(rP)C=kD;else{C=bD;var Q=SD}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=wD);if(C&&(C=C(t,u))){nP(f,C,n,c);break e}Q&&Q(t,h,u),t==="focusout"&&(Q=h._wrapperState)&&Q.controlled&&h.type==="number"&&Jg(h,"number",h.value)}switch(Q=u?Fo(u):window,t){case"focusin":(M1(Q)||Q.contentEditable==="true")&&(jo=Q,fm=u,La=null);break;case"focusout":La=fm=jo=null;break;case"mousedown":hm=!0;break;case"contextmenu":case"mouseup":case"dragend":hm=!1,V1(f,n,c);break;case"selectionchange":if(CD)break;case"keydown":case"keyup":V1(f,n,c)}var _;if(k0)e:{switch(t){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Zo?eP(t,n)&&(k="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(Jx&&n.locale!=="ko"&&(Zo||k!=="onCompositionStart"?k==="onCompositionEnd"&&Zo&&(_=Kx()):(fs=c,S0="value"in fs?fs.value:fs.textContent,Zo=!0)),Q=eh(u,k),0<Q.length&&(k=new T1(k,t,null,n,c),f.push({event:k,listeners:Q}),_?k.data=_:(_=tP(n),_!==null&&(k.data=_)))),(_=pD?gD(t,n):mD(t,n))&&(u=eh(u,"onBeforeInput"),0<u.length&&(c=new T1("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=_))}dP(f,e)})}function iu(t,e,n){return{instance:t,listener:e,currentTarget:n}}function eh(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ha(t,n),s!=null&&r.unshift(iu(t,s,i)),s=Ha(t,e),s!=null&&r.push(iu(t,s,i))),t=t.return}return r}function $o(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function B1(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=Ha(n,s),a!=null&&o.unshift(iu(n,a,l))):i||(a=Ha(n,s),a!=null&&o.push(iu(n,a,l)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var _D=/\r\n?/g,TD=/\u0000|\uFFFD/g;function F1(t){return(typeof t=="string"?t:""+t).replace(_D,`
38
- `).replace(TD,"")}function Dc(t,e,n){if(e=F1(e),F1(t)!==e&&n)throw Error(J(425))}function th(){}var dm=null,pm=null;function gm(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var mm=typeof setTimeout=="function"?setTimeout:void 0,RD=typeof clearTimeout=="function"?clearTimeout:void 0,U1=typeof Promise=="function"?Promise:void 0,AD=typeof queueMicrotask=="function"?queueMicrotask:typeof U1<"u"?function(t){return U1.resolve(null).then(t).catch(DD)}:mm;function DD(t){setTimeout(function(){throw t})}function Mp(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),eu(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);eu(e)}function Ss(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function W1(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Xl=Math.random().toString(36).slice(2),ui="__reactFiber$"+Xl,su="__reactProps$"+Xl,Bi="__reactContainer$"+Xl,Om="__reactEvents$"+Xl,MD="__reactListeners$"+Xl,ID="__reactHandles$"+Xl;function Gs(t){var e=t[ui];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Bi]||n[ui]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=W1(t);t!==null;){if(n=t[ui])return n;t=W1(t)}return e}t=n,n=t.parentNode}return null}function Xu(t){return t=t[ui]||t[Bi],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Fo(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(J(33))}function dd(t){return t[su]||null}var vm=[],Uo=-1;function Is(t){return{current:t}}function kt(t){0>Uo||(t.current=vm[Uo],vm[Uo]=null,Uo--)}function Ot(t,e){Uo++,vm[Uo]=t.current,t.current=e}var Es={},Cn=Is(Es),Wn=Is(!1),ao=Es;function Ol(t,e){var n=t.type.contextTypes;if(!n)return Es;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function zn(t){return t=t.childContextTypes,t!=null}function nh(){kt(Wn),kt(Cn)}function z1(t,e,n){if(Cn.current!==Es)throw Error(J(168));Ot(Cn,e),Ot(Wn,n)}function gP(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(J(108,SA(t)||"Unknown",i));return Nt({},n,r)}function rh(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Es,ao=Cn.current,Ot(Cn,t),Ot(Wn,Wn.current),!0}function Y1(t,e,n){var r=t.stateNode;if(!r)throw Error(J(169));n?(t=gP(t,e,ao),r.__reactInternalMemoizedMergedChildContext=t,kt(Wn),kt(Cn),Ot(Cn,t)):kt(Wn),Ot(Wn,n)}var Ri=null,pd=!1,Ip=!1;function mP(t){Ri===null?Ri=[t]:Ri.push(t)}function ND(t){pd=!0,mP(t)}function Ns(){if(!Ip&&Ri!==null){Ip=!0;var t=0,e=lt;try{var n=Ri;for(lt=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Ri=null,pd=!1}catch(i){throw Ri!==null&&(Ri=Ri.slice(t+1)),Zx(m0,Ns),i}finally{lt=e,Ip=!1}}return null}var Wo=[],zo=0,ih=null,sh=0,yr=[],Sr=0,uo=null,Mi=1,Ii="";function Fs(t,e){Wo[zo++]=sh,Wo[zo++]=ih,ih=t,sh=e}function OP(t,e,n){yr[Sr++]=Mi,yr[Sr++]=Ii,yr[Sr++]=uo,uo=t;var r=Mi;t=Ii;var i=32-Fr(r)-1;r&=~(1<<i),n+=1;var s=32-Fr(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Mi=1<<32-Fr(e)+i|n<<i|r,Ii=s+t}else Mi=1<<s|n<<i|r,Ii=t}function P0(t){t.return!==null&&(Fs(t,1),OP(t,1,0))}function C0(t){for(;t===ih;)ih=Wo[--zo],Wo[zo]=null,sh=Wo[--zo],Wo[zo]=null;for(;t===uo;)uo=yr[--Sr],yr[Sr]=null,Ii=yr[--Sr],yr[Sr]=null,Mi=yr[--Sr],yr[Sr]=null}var lr=null,sr=null,Et=!1,Vr=null;function vP(t,e){var n=wr(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function q1(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,lr=t,sr=Ss(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,lr=t,sr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=uo!==null?{id:Mi,overflow:Ii}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=wr(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,lr=t,sr=null,!0):!1;default:return!1}}function ym(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Sm(t){if(Et){var e=sr;if(e){var n=e;if(!q1(t,e)){if(ym(t))throw Error(J(418));e=Ss(n.nextSibling);var r=lr;e&&q1(t,e)?vP(r,n):(t.flags=t.flags&-4097|2,Et=!1,lr=t)}}else{if(ym(t))throw Error(J(418));t.flags=t.flags&-4097|2,Et=!1,lr=t}}}function G1(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;lr=t}function Mc(t){if(t!==lr)return!1;if(!Et)return G1(t),Et=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!gm(t.type,t.memoizedProps)),e&&(e=sr)){if(ym(t))throw yP(),Error(J(418));for(;e;)vP(t,e),e=Ss(e.nextSibling)}if(G1(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(J(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){sr=Ss(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}sr=null}}else sr=lr?Ss(t.stateNode.nextSibling):null;return!0}function yP(){for(var t=sr;t;)t=Ss(t.nextSibling)}function vl(){sr=lr=null,Et=!1}function Q0(t){Vr===null?Vr=[t]:Vr.push(t)}var LD=Yi.ReactCurrentBatchConfig;function Lr(t,e){if(t&&t.defaultProps){e=Nt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var oh=Is(null),lh=null,Yo=null,E0=null;function $0(){E0=Yo=lh=null}function _0(t){var e=oh.current;kt(oh),t._currentValue=e}function bm(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function sl(t,e){lh=t,E0=Yo=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Bn=!0),t.firstContext=null)}function Er(t){var e=t._currentValue;if(E0!==t)if(t={context:t,memoizedValue:e,next:null},Yo===null){if(lh===null)throw Error(J(308));Yo=t,lh.dependencies={lanes:0,firstContext:t}}else Yo=Yo.next=t;return e}var Hs=null;function T0(t){Hs===null?Hs=[t]:Hs.push(t)}function SP(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,T0(e)):(n.next=i.next,i.next=n),e.interleaved=n,Fi(t,r)}function Fi(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var rs=!1;function R0(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bP(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ni(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function bs(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,He&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Fi(t,n)}return i=r.interleaved,i===null?(e.next=e,T0(r)):(e.next=i.next,i.next=e),r.interleaved=e,Fi(t,n)}function kf(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,O0(t,n)}}function H1(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function ah(t,e,n,r){var i=t.updateQueue;rs=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=t.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var f=i.baseState;o=0,c=u=a=null,l=s;do{var h=l.lane,p=l.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var d=t,g=l;switch(h=e,p=n,g.tag){case 1:if(d=g.payload,typeof d=="function"){f=d.call(p,f,h);break e}f=d;break e;case 3:d.flags=d.flags&-65537|128;case 0:if(d=g.payload,h=typeof d=="function"?d.call(p,f,h):d,h==null)break e;f=Nt({},f,h);break e;case 2:rs=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,a=f):c=c.next=p,o|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(1);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);fo|=o,t.lanes=o,t.memoizedState=f}}function K1(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(J(191,i));i.call(r)}}}var wP=new Sx.Component().refs;function wm(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Nt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var gd={isMounted:function(t){return(t=t._reactInternals)?yo(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Dn(),i=ks(t),s=Ni(r,i);s.payload=e,n!=null&&(s.callback=n),e=bs(t,s,i),e!==null&&(Ur(e,t,i,r),kf(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Dn(),i=ks(t),s=Ni(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=bs(t,s,i),e!==null&&(Ur(e,t,i,r),kf(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Dn(),r=ks(t),i=Ni(n,r);i.tag=2,e!=null&&(i.callback=e),e=bs(t,i,r),e!==null&&(Ur(e,t,r,n),kf(e,t,r))}};function J1(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!nu(n,r)||!nu(i,s):!0}function kP(t,e,n){var r=!1,i=Es,s=e.contextType;return typeof s=="object"&&s!==null?s=Er(s):(i=zn(e)?ao:Cn.current,r=e.contextTypes,s=(r=r!=null)?Ol(t,i):Es),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=gd,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function eS(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&gd.enqueueReplaceState(e,e.state,null)}function km(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=wP,R0(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=Er(s):(s=zn(e)?ao:Cn.current,i.context=Ol(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(wm(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&gd.enqueueReplaceState(i,i.state,null),ah(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function la(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(J(309));var r=n.stateNode}if(!r)throw Error(J(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var l=i.refs;l===wP&&(l=i.refs={}),o===null?delete l[s]:l[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(J(284));if(!n._owner)throw Error(J(290,t))}return t}function Ic(t,e){throw t=Object.prototype.toString.call(e),Error(J(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function tS(t){var e=t._init;return e(t._payload)}function xP(t){function e(m,S){if(t){var y=m.deletions;y===null?(m.deletions=[S],m.flags|=16):y.push(S)}}function n(m,S){if(!t)return null;for(;S!==null;)e(m,S),S=S.sibling;return null}function r(m,S){for(m=new Map;S!==null;)S.key!==null?m.set(S.key,S):m.set(S.index,S),S=S.sibling;return m}function i(m,S){return m=xs(m,S),m.index=0,m.sibling=null,m}function s(m,S,y){return m.index=y,t?(y=m.alternate,y!==null?(y=y.index,y<S?(m.flags|=2,S):y):(m.flags|=2,S)):(m.flags|=1048576,S)}function o(m){return t&&m.alternate===null&&(m.flags|=2),m}function l(m,S,y,b){return S===null||S.tag!==6?(S=Bp(y,m.mode,b),S.return=m,S):(S=i(S,y),S.return=m,S)}function a(m,S,y,b){var C=y.type;return C===Vo?c(m,S,y.props.children,b,y.key):S!==null&&(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ns&&tS(C)===S.type)?(b=i(S,y.props),b.ref=la(m,S,y),b.return=m,b):(b=$f(y.type,y.key,y.props,null,m.mode,b),b.ref=la(m,S,y),b.return=m,b)}function u(m,S,y,b){return S===null||S.tag!==4||S.stateNode.containerInfo!==y.containerInfo||S.stateNode.implementation!==y.implementation?(S=Fp(y,m.mode,b),S.return=m,S):(S=i(S,y.children||[]),S.return=m,S)}function c(m,S,y,b,C){return S===null||S.tag!==7?(S=ro(y,m.mode,b,C),S.return=m,S):(S=i(S,y),S.return=m,S)}function f(m,S,y){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Bp(""+S,m.mode,y),S.return=m,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Pc:return y=$f(S.type,S.key,S.props,null,m.mode,y),y.ref=la(m,null,S),y.return=m,y;case Xo:return S=Fp(S,m.mode,y),S.return=m,S;case ns:var b=S._init;return f(m,b(S._payload),y)}if(ka(S)||na(S))return S=ro(S,m.mode,y,null),S.return=m,S;Ic(m,S)}return null}function h(m,S,y,b){var C=S!==null?S.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return C!==null?null:l(m,S,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Pc:return y.key===C?a(m,S,y,b):null;case Xo:return y.key===C?u(m,S,y,b):null;case ns:return C=y._init,h(m,S,C(y._payload),b)}if(ka(y)||na(y))return C!==null?null:c(m,S,y,b,null);Ic(m,y)}return null}function p(m,S,y,b,C){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(y)||null,l(S,m,""+b,C);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Pc:return m=m.get(b.key===null?y:b.key)||null,a(S,m,b,C);case Xo:return m=m.get(b.key===null?y:b.key)||null,u(S,m,b,C);case ns:var Q=b._init;return p(m,S,y,Q(b._payload),C)}if(ka(b)||na(b))return m=m.get(y)||null,c(S,m,b,C,null);Ic(S,b)}return null}function d(m,S,y,b){for(var C=null,Q=null,_=S,k=S=0,w=null;_!==null&&k<y.length;k++){_.index>k?(w=_,_=null):w=_.sibling;var P=h(m,_,y[k],b);if(P===null){_===null&&(_=w);break}t&&_&&P.alternate===null&&e(m,_),S=s(P,S,k),Q===null?C=P:Q.sibling=P,Q=P,_=w}if(k===y.length)return n(m,_),Et&&Fs(m,k),C;if(_===null){for(;k<y.length;k++)_=f(m,y[k],b),_!==null&&(S=s(_,S,k),Q===null?C=_:Q.sibling=_,Q=_);return Et&&Fs(m,k),C}for(_=r(m,_);k<y.length;k++)w=p(_,m,k,y[k],b),w!==null&&(t&&w.alternate!==null&&_.delete(w.key===null?k:w.key),S=s(w,S,k),Q===null?C=w:Q.sibling=w,Q=w);return t&&_.forEach(function(E){return e(m,E)}),Et&&Fs(m,k),C}function g(m,S,y,b){var C=na(y);if(typeof C!="function")throw Error(J(150));if(y=C.call(y),y==null)throw Error(J(151));for(var Q=C=null,_=S,k=S=0,w=null,P=y.next();_!==null&&!P.done;k++,P=y.next()){_.index>k?(w=_,_=null):w=_.sibling;var E=h(m,_,P.value,b);if(E===null){_===null&&(_=w);break}t&&_&&E.alternate===null&&e(m,_),S=s(E,S,k),Q===null?C=E:Q.sibling=E,Q=E,_=w}if(P.done)return n(m,_),Et&&Fs(m,k),C;if(_===null){for(;!P.done;k++,P=y.next())P=f(m,P.value,b),P!==null&&(S=s(P,S,k),Q===null?C=P:Q.sibling=P,Q=P);return Et&&Fs(m,k),C}for(_=r(m,_);!P.done;k++,P=y.next())P=p(_,m,k,P.value,b),P!==null&&(t&&P.alternate!==null&&_.delete(P.key===null?k:P.key),S=s(P,S,k),Q===null?C=P:Q.sibling=P,Q=P);return t&&_.forEach(function(A){return e(m,A)}),Et&&Fs(m,k),C}function O(m,S,y,b){if(typeof y=="object"&&y!==null&&y.type===Vo&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Pc:e:{for(var C=y.key,Q=S;Q!==null;){if(Q.key===C){if(C=y.type,C===Vo){if(Q.tag===7){n(m,Q.sibling),S=i(Q,y.props.children),S.return=m,m=S;break e}}else if(Q.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ns&&tS(C)===Q.type){n(m,Q.sibling),S=i(Q,y.props),S.ref=la(m,Q,y),S.return=m,m=S;break e}n(m,Q);break}else e(m,Q);Q=Q.sibling}y.type===Vo?(S=ro(y.props.children,m.mode,b,y.key),S.return=m,m=S):(b=$f(y.type,y.key,y.props,null,m.mode,b),b.ref=la(m,S,y),b.return=m,m=b)}return o(m);case Xo:e:{for(Q=y.key;S!==null;){if(S.key===Q)if(S.tag===4&&S.stateNode.containerInfo===y.containerInfo&&S.stateNode.implementation===y.implementation){n(m,S.sibling),S=i(S,y.children||[]),S.return=m,m=S;break e}else{n(m,S);break}else e(m,S);S=S.sibling}S=Fp(y,m.mode,b),S.return=m,m=S}return o(m);case ns:return Q=y._init,O(m,S,Q(y._payload),b)}if(ka(y))return d(m,S,y,b);if(na(y))return g(m,S,y,b);Ic(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,S!==null&&S.tag===6?(n(m,S.sibling),S=i(S,y),S.return=m,m=S):(n(m,S),S=Bp(y,m.mode,b),S.return=m,m=S),o(m)):n(m,S)}return O}var yl=xP(!0),PP=xP(!1),Vu={},mi=Is(Vu),ou=Is(Vu),lu=Is(Vu);function Ks(t){if(t===Vu)throw Error(J(174));return t}function A0(t,e){switch(Ot(lu,e),Ot(ou,t),Ot(mi,Vu),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:tm(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=tm(e,t)}kt(mi),Ot(mi,e)}function Sl(){kt(mi),kt(ou),kt(lu)}function CP(t){Ks(lu.current);var e=Ks(mi.current),n=tm(e,t.type);e!==n&&(Ot(ou,t),Ot(mi,n))}function D0(t){ou.current===t&&(kt(mi),kt(ou))}var Dt=Is(0);function uh(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Np=[];function M0(){for(var t=0;t<Np.length;t++)Np[t]._workInProgressVersionPrimary=null;Np.length=0}var xf=Yi.ReactCurrentDispatcher,Lp=Yi.ReactCurrentBatchConfig,co=0,It=null,Gt=null,sn=null,ch=!1,Xa=!1,au=0,XD=0;function bn(){throw Error(J(321))}function I0(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Wr(t[n],e[n]))return!1;return!0}function N0(t,e,n,r,i,s){if(co=s,It=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,xf.current=t===null||t.memoizedState===null?BD:FD,t=n(r,i),Xa){s=0;do{if(Xa=!1,au=0,25<=s)throw Error(J(301));s+=1,sn=Gt=null,e.updateQueue=null,xf.current=UD,t=n(r,i)}while(Xa)}if(xf.current=fh,e=Gt!==null&&Gt.next!==null,co=0,sn=Gt=It=null,ch=!1,e)throw Error(J(300));return t}function L0(){var t=au!==0;return au=0,t}function si(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?It.memoizedState=sn=t:sn=sn.next=t,sn}function $r(){if(Gt===null){var t=It.alternate;t=t!==null?t.memoizedState:null}else t=Gt.next;var e=sn===null?It.memoizedState:sn.next;if(e!==null)sn=e,Gt=t;else{if(t===null)throw Error(J(310));Gt=t,t={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},sn===null?It.memoizedState=sn=t:sn=sn.next=t}return sn}function uu(t,e){return typeof e=="function"?e(t):e}function Xp(t){var e=$r(),n=e.queue;if(n===null)throw Error(J(311));n.lastRenderedReducer=t;var r=Gt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var l=o=null,a=null,u=s;do{var c=u.lane;if((co&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,o=r):a=a.next=f,It.lanes|=c,fo|=c}u=u.next}while(u!==null&&u!==s);a===null?o=r:a.next=l,Wr(r,e.memoizedState)||(Bn=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=a,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,It.lanes|=s,fo|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Vp(t){var e=$r(),n=e.queue;if(n===null)throw Error(J(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Wr(s,e.memoizedState)||(Bn=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function QP(){}function EP(t,e){var n=It,r=$r(),i=e(),s=!Wr(r.memoizedState,i);if(s&&(r.memoizedState=i,Bn=!0),r=r.queue,X0(TP.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||sn!==null&&sn.memoizedState.tag&1){if(n.flags|=2048,cu(9,_P.bind(null,n,r,i,e),void 0,null),on===null)throw Error(J(349));co&30||$P(n,e,i)}return i}function $P(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=It.updateQueue,e===null?(e={lastEffect:null,stores:null},It.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function _P(t,e,n,r){e.value=n,e.getSnapshot=r,RP(e)&&AP(t)}function TP(t,e,n){return n(function(){RP(e)&&AP(t)})}function RP(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Wr(t,n)}catch{return!0}}function AP(t){var e=Fi(t,1);e!==null&&Ur(e,t,1,-1)}function nS(t){var e=si();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:uu,lastRenderedState:t},e.queue=t,t=t.dispatch=jD.bind(null,It,t),[e.memoizedState,t]}function cu(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=It.updateQueue,e===null?(e={lastEffect:null,stores:null},It.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function DP(){return $r().memoizedState}function Pf(t,e,n,r){var i=si();It.flags|=t,i.memoizedState=cu(1|e,n,void 0,r===void 0?null:r)}function md(t,e,n,r){var i=$r();r=r===void 0?null:r;var s=void 0;if(Gt!==null){var o=Gt.memoizedState;if(s=o.destroy,r!==null&&I0(r,o.deps)){i.memoizedState=cu(e,n,s,r);return}}It.flags|=t,i.memoizedState=cu(1|e,n,s,r)}function rS(t,e){return Pf(8390656,8,t,e)}function X0(t,e){return md(2048,8,t,e)}function MP(t,e){return md(4,2,t,e)}function IP(t,e){return md(4,4,t,e)}function NP(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function LP(t,e,n){return n=n!=null?n.concat([t]):null,md(4,4,NP.bind(null,e,t),n)}function V0(){}function XP(t,e){var n=$r();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&I0(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function VP(t,e){var n=$r();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&I0(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function ZP(t,e,n){return co&21?(Wr(n,e)||(n=Fx(),It.lanes|=n,fo|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Bn=!0),t.memoizedState=n)}function VD(t,e){var n=lt;lt=n!==0&&4>n?n:4,t(!0);var r=Lp.transition;Lp.transition={};try{t(!1),e()}finally{lt=n,Lp.transition=r}}function jP(){return $r().memoizedState}function ZD(t,e,n){var r=ks(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},BP(t))FP(e,n);else if(n=SP(t,e,n,r),n!==null){var i=Dn();Ur(n,t,r,i),UP(n,e,r)}}function jD(t,e,n){var r=ks(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(BP(t))FP(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,Wr(l,o)){var a=e.interleaved;a===null?(i.next=i,T0(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}n=SP(t,e,i,r),n!==null&&(i=Dn(),Ur(n,t,r,i),UP(n,e,r))}}function BP(t){var e=t.alternate;return t===It||e!==null&&e===It}function FP(t,e){Xa=ch=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function UP(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,O0(t,n)}}var fh={readContext:Er,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useInsertionEffect:bn,useLayoutEffect:bn,useMemo:bn,useReducer:bn,useRef:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useMutableSource:bn,useSyncExternalStore:bn,useId:bn,unstable_isNewReconciler:!1},BD={readContext:Er,useCallback:function(t,e){return si().memoizedState=[t,e===void 0?null:e],t},useContext:Er,useEffect:rS,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Pf(4194308,4,NP.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Pf(4194308,4,t,e)},useInsertionEffect:function(t,e){return Pf(4,2,t,e)},useMemo:function(t,e){var n=si();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=si();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=ZD.bind(null,It,t),[r.memoizedState,t]},useRef:function(t){var e=si();return t={current:t},e.memoizedState=t},useState:nS,useDebugValue:V0,useDeferredValue:function(t){return si().memoizedState=t},useTransition:function(){var t=nS(!1),e=t[0];return t=VD.bind(null,t[1]),si().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=It,i=si();if(Et){if(n===void 0)throw Error(J(407));n=n()}else{if(n=e(),on===null)throw Error(J(349));co&30||$P(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,rS(TP.bind(null,r,s,t),[t]),r.flags|=2048,cu(9,_P.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=si(),e=on.identifierPrefix;if(Et){var n=Ii,r=Mi;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=au++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=XD++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},FD={readContext:Er,useCallback:XP,useContext:Er,useEffect:X0,useImperativeHandle:LP,useInsertionEffect:MP,useLayoutEffect:IP,useMemo:VP,useReducer:Xp,useRef:DP,useState:function(){return Xp(uu)},useDebugValue:V0,useDeferredValue:function(t){var e=$r();return ZP(e,Gt.memoizedState,t)},useTransition:function(){var t=Xp(uu)[0],e=$r().memoizedState;return[t,e]},useMutableSource:QP,useSyncExternalStore:EP,useId:jP,unstable_isNewReconciler:!1},UD={readContext:Er,useCallback:XP,useContext:Er,useEffect:X0,useImperativeHandle:LP,useInsertionEffect:MP,useLayoutEffect:IP,useMemo:VP,useReducer:Vp,useRef:DP,useState:function(){return Vp(uu)},useDebugValue:V0,useDeferredValue:function(t){var e=$r();return Gt===null?e.memoizedState=t:ZP(e,Gt.memoizedState,t)},useTransition:function(){var t=Vp(uu)[0],e=$r().memoizedState;return[t,e]},useMutableSource:QP,useSyncExternalStore:EP,useId:jP,unstable_isNewReconciler:!1};function bl(t,e){try{var n="",r=e;do n+=yA(r),r=r.return;while(r);var i=n}catch(s){i=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:t,source:e,stack:i,digest:null}}function Zp(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function xm(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var WD=typeof WeakMap=="function"?WeakMap:Map;function WP(t,e,n){n=Ni(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){dh||(dh=!0,Dm=r),xm(t,e)},n}function zP(t,e,n){n=Ni(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){xm(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){xm(t,e),typeof r!="function"&&(ws===null?ws=new Set([this]):ws.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function iS(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new WD;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=oM.bind(null,t,e,n),e.then(t,t))}function sS(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function oS(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Ni(-1,1),e.tag=2,bs(n,e,1))),n.lanes|=1),t)}var zD=Yi.ReactCurrentOwner,Bn=!1;function Tn(t,e,n,r){e.child=t===null?PP(e,null,n,r):yl(e,t.child,n,r)}function lS(t,e,n,r,i){n=n.render;var s=e.ref;return sl(e,i),r=N0(t,e,n,r,s,i),n=L0(),t!==null&&!Bn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ui(t,e,i)):(Et&&n&&P0(e),e.flags|=1,Tn(t,e,r,i),e.child)}function aS(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!Y0(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,YP(t,e,s,r,i)):(t=$f(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:nu,n(o,r)&&t.ref===e.ref)return Ui(t,e,i)}return e.flags|=1,t=xs(s,r),t.ref=e.ref,t.return=e,e.child=t}function YP(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(nu(s,r)&&t.ref===e.ref)if(Bn=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Bn=!0);else return e.lanes=t.lanes,Ui(t,e,i)}return Pm(t,e,n,r,i)}function qP(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ot(Go,tr),tr|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ot(Go,tr),tr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ot(Go,tr),tr|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Ot(Go,tr),tr|=r;return Tn(t,e,i,n),e.child}function GP(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Pm(t,e,n,r,i){var s=zn(n)?ao:Cn.current;return s=Ol(e,s),sl(e,i),n=N0(t,e,n,r,s,i),r=L0(),t!==null&&!Bn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ui(t,e,i)):(Et&&r&&P0(e),e.flags|=1,Tn(t,e,n,i),e.child)}function uS(t,e,n,r,i){if(zn(n)){var s=!0;rh(e)}else s=!1;if(sl(e,i),e.stateNode===null)Cf(t,e),kP(e,n,r),km(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,l=e.memoizedProps;o.props=l;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Er(u):(u=zn(n)?ao:Cn.current,u=Ol(e,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||a!==u)&&eS(e,o,r,u),rs=!1;var h=e.memoizedState;o.state=h,ah(e,r,o,i),a=e.memoizedState,l!==r||h!==a||Wn.current||rs?(typeof c=="function"&&(wm(e,n,c,r),a=e.memoizedState),(l=rs||J1(e,n,l,r,h,a,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=a),o.props=r,o.state=a,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,bP(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:Lr(e.type,l),o.props=u,f=e.pendingProps,h=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=Er(a):(a=zn(n)?ao:Cn.current,a=Ol(e,a));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||h!==a)&&eS(e,o,r,a),rs=!1,h=e.memoizedState,o.state=h,ah(e,r,o,i);var d=e.memoizedState;l!==f||h!==d||Wn.current||rs?(typeof p=="function"&&(wm(e,n,p,r),d=e.memoizedState),(u=rs||J1(e,n,u,r,h,d,a)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,d,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,d,a)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=d),o.props=r,o.state=d,o.context=a,r=u):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return Cm(t,e,n,r,s,i)}function Cm(t,e,n,r,i,s){GP(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&Y1(e,n,!1),Ui(t,e,s);r=e.stateNode,zD.current=e;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=yl(e,t.child,null,s),e.child=yl(e,null,l,s)):Tn(t,e,l,s),e.memoizedState=r.state,i&&Y1(e,n,!0),e.child}function HP(t){var e=t.stateNode;e.pendingContext?z1(t,e.pendingContext,e.pendingContext!==e.context):e.context&&z1(t,e.context,!1),A0(t,e.containerInfo)}function cS(t,e,n,r,i){return vl(),Q0(i),e.flags|=256,Tn(t,e,n,r),e.child}var Qm={dehydrated:null,treeContext:null,retryLane:0};function Em(t){return{baseLanes:t,cachePool:null,transitions:null}}function KP(t,e,n){var r=e.pendingProps,i=Dt.current,s=!1,o=(e.flags&128)!==0,l;if((l=o)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Ot(Dt,i&1),t===null)return Sm(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=yd(o,r,0,null),t=ro(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Em(n),e.memoizedState=Qm,t):Z0(e,o));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return YD(t,e,o,r,l,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=a,e.deletions=null):(r=xs(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=xs(l,s):(s=ro(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Em(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=Qm,r}return s=t.child,t=s.sibling,r=xs(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Z0(t,e){return e=yd({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Nc(t,e,n,r){return r!==null&&Q0(r),yl(e,t.child,null,n),t=Z0(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function YD(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=Zp(Error(J(422))),Nc(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=yd({mode:"visible",children:r.children},i,0,null),s=ro(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&yl(e,t.child,null,o),e.child.memoizedState=Em(o),e.memoizedState=Qm,s);if(!(e.mode&1))return Nc(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(J(419)),r=Zp(s,r,void 0),Nc(t,e,o,r)}if(l=(o&t.childLanes)!==0,Bn||l){if(r=on,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Fi(t,i),Ur(r,t,i,-1))}return z0(),r=Zp(Error(J(421))),Nc(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=lM.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,sr=Ss(i.nextSibling),lr=e,Et=!0,Vr=null,t!==null&&(yr[Sr++]=Mi,yr[Sr++]=Ii,yr[Sr++]=uo,Mi=t.id,Ii=t.overflow,uo=e),e=Z0(e,r.children),e.flags|=4096,e)}function fS(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),bm(t.return,e,n)}function jp(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function JP(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Tn(t,e,r.children,n),r=Dt.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fS(t,n,e);else if(t.tag===19)fS(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Ot(Dt,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&uh(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),jp(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&uh(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}jp(e,!0,n,null,s);break;case"together":jp(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Cf(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ui(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),fo|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(J(153));if(e.child!==null){for(t=e.child,n=xs(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=xs(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function qD(t,e,n){switch(e.tag){case 3:HP(e),vl();break;case 5:CP(e);break;case 1:zn(e.type)&&rh(e);break;case 4:A0(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Ot(oh,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Ot(Dt,Dt.current&1),e.flags|=128,null):n&e.child.childLanes?KP(t,e,n):(Ot(Dt,Dt.current&1),t=Ui(t,e,n),t!==null?t.sibling:null);Ot(Dt,Dt.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return JP(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ot(Dt,Dt.current),r)break;return null;case 22:case 23:return e.lanes=0,qP(t,e,n)}return Ui(t,e,n)}var eC,$m,tC,nC;eC=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$m=function(){};tC=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Ks(mi.current);var s=null;switch(n){case"input":i=Hg(t,i),r=Hg(t,r),s=[];break;case"select":i=Nt({},i,{value:void 0}),r=Nt({},r,{value:void 0}),s=[];break;case"textarea":i=em(t,i),r=em(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=th)}nm(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(qa.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(qa.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&St("scroll",t),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};nC=function(t,e,n,r){n!==r&&(e.flags|=4)};function aa(t,e){if(!Et)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function wn(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function GD(t,e,n){var r=e.pendingProps;switch(C0(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wn(e),null;case 1:return zn(e.type)&&nh(),wn(e),null;case 3:return r=e.stateNode,Sl(),kt(Wn),kt(Cn),M0(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Mc(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Vr!==null&&(Nm(Vr),Vr=null))),$m(t,e),wn(e),null;case 5:D0(e);var i=Ks(lu.current);if(n=e.type,t!==null&&e.stateNode!=null)tC(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(J(166));return wn(e),null}if(t=Ks(mi.current),Mc(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[ui]=e,r[su]=s,t=(e.mode&1)!==0,n){case"dialog":St("cancel",r),St("close",r);break;case"iframe":case"object":case"embed":St("load",r);break;case"video":case"audio":for(i=0;i<Pa.length;i++)St(Pa[i],r);break;case"source":St("error",r);break;case"img":case"image":case"link":St("error",r),St("load",r);break;case"details":St("toggle",r);break;case"input":S1(r,s),St("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},St("invalid",r);break;case"textarea":w1(r,s),St("invalid",r)}nm(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&Dc(r.textContent,l,t),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Dc(r.textContent,l,t),i=["children",""+l]):qa.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&St("scroll",r)}switch(n){case"input":Cc(r),b1(r,s,!0);break;case"textarea":Cc(r),k1(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=th)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=$x(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[ui]=e,t[su]=r,eC(t,e,!1,!1),e.stateNode=t;e:{switch(o=rm(n,r),n){case"dialog":St("cancel",t),St("close",t),i=r;break;case"iframe":case"object":case"embed":St("load",t),i=r;break;case"video":case"audio":for(i=0;i<Pa.length;i++)St(Pa[i],t);i=r;break;case"source":St("error",t),i=r;break;case"img":case"image":case"link":St("error",t),St("load",t),i=r;break;case"details":St("toggle",t),i=r;break;case"input":S1(t,r),i=Hg(t,r),St("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=Nt({},r,{value:void 0}),St("invalid",t);break;case"textarea":w1(t,r),i=em(t,r),St("invalid",t);break;default:i=r}nm(n,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?Rx(t,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&_x(t,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ga(t,a):typeof a=="number"&&Ga(t,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(qa.hasOwnProperty(s)?a!=null&&s==="onScroll"&&St("scroll",t):a!=null&&f0(t,s,a,o))}switch(n){case"input":Cc(t),b1(t,r,!1);break;case"textarea":Cc(t),k1(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Qs(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?tl(t,!!r.multiple,s,!1):r.defaultValue!=null&&tl(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=th)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return wn(e),null;case 6:if(t&&e.stateNode!=null)nC(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(J(166));if(n=Ks(lu.current),Ks(mi.current),Mc(e)){if(r=e.stateNode,n=e.memoizedProps,r[ui]=e,(s=r.nodeValue!==n)&&(t=lr,t!==null))switch(t.tag){case 3:Dc(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Dc(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ui]=e,e.stateNode=r}return wn(e),null;case 13:if(kt(Dt),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Et&&sr!==null&&e.mode&1&&!(e.flags&128))yP(),vl(),e.flags|=98560,s=!1;else if(s=Mc(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(J(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(J(317));s[ui]=e}else vl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;wn(e),s=!1}else Vr!==null&&(Nm(Vr),Vr=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Dt.current&1?Kt===0&&(Kt=3):z0())),e.updateQueue!==null&&(e.flags|=4),wn(e),null);case 4:return Sl(),$m(t,e),t===null&&ru(e.stateNode.containerInfo),wn(e),null;case 10:return _0(e.type._context),wn(e),null;case 17:return zn(e.type)&&nh(),wn(e),null;case 19:if(kt(Dt),s=e.memoizedState,s===null)return wn(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)aa(s,!1);else{if(Kt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=uh(t),o!==null){for(e.flags|=128,aa(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Ot(Dt,Dt.current&1|2),e.child}t=t.sibling}s.tail!==null&&Ut()>wl&&(e.flags|=128,r=!0,aa(s,!1),e.lanes=4194304)}else{if(!r)if(t=uh(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),aa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Et)return wn(e),null}else 2*Ut()-s.renderingStartTime>wl&&n!==1073741824&&(e.flags|=128,r=!0,aa(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ut(),e.sibling=null,n=Dt.current,Ot(Dt,r?n&1|2:n&1),e):(wn(e),null);case 22:case 23:return W0(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?tr&1073741824&&(wn(e),e.subtreeFlags&6&&(e.flags|=8192)):wn(e),null;case 24:return null;case 25:return null}throw Error(J(156,e.tag))}function HD(t,e){switch(C0(e),e.tag){case 1:return zn(e.type)&&nh(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Sl(),kt(Wn),kt(Cn),M0(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return D0(e),null;case 13:if(kt(Dt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(J(340));vl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return kt(Dt),null;case 4:return Sl(),null;case 10:return _0(e.type._context),null;case 22:case 23:return W0(),null;case 24:return null;default:return null}}var Lc=!1,Pn=!1,KD=typeof WeakSet=="function"?WeakSet:Set,ge=null;function qo(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Vt(t,e,r)}else n.current=null}function _m(t,e,n){try{n()}catch(r){Vt(t,e,r)}}var hS=!1;function JD(t,e){if(dm=Kf,t=oP(),x0(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(l=o+i),f!==s||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===t)break t;if(h===n&&++u===i&&(l=o),h===s&&++c===r&&(a=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(pm={focusedElem:t,selectionRange:n},Kf=!1,ge=e;ge!==null;)if(e=ge,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ge=t;else for(;ge!==null;){e=ge;try{var d=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(d!==null){var g=d.memoizedProps,O=d.memoizedState,m=e.stateNode,S=m.getSnapshotBeforeUpdate(e.elementType===e.type?g:Lr(e.type,g),O);m.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(J(163))}}catch(b){Vt(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,ge=t;break}ge=e.return}return d=hS,hS=!1,d}function Va(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&_m(e,n,s)}i=i.next}while(i!==r)}}function Od(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Tm(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function rC(t){var e=t.alternate;e!==null&&(t.alternate=null,rC(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ui],delete e[su],delete e[Om],delete e[MD],delete e[ID])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function iC(t){return t.tag===5||t.tag===3||t.tag===4}function dS(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||iC(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Rm(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=th));else if(r!==4&&(t=t.child,t!==null))for(Rm(t,e,n),t=t.sibling;t!==null;)Rm(t,e,n),t=t.sibling}function Am(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Am(t,e,n),t=t.sibling;t!==null;)Am(t,e,n),t=t.sibling}var cn=null,Xr=!1;function es(t,e,n){for(n=n.child;n!==null;)sC(t,e,n),n=n.sibling}function sC(t,e,n){if(gi&&typeof gi.onCommitFiberUnmount=="function")try{gi.onCommitFiberUnmount(ud,n)}catch{}switch(n.tag){case 5:Pn||qo(n,e);case 6:var r=cn,i=Xr;cn=null,es(t,e,n),cn=r,Xr=i,cn!==null&&(Xr?(t=cn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):cn.removeChild(n.stateNode));break;case 18:cn!==null&&(Xr?(t=cn,n=n.stateNode,t.nodeType===8?Mp(t.parentNode,n):t.nodeType===1&&Mp(t,n),eu(t)):Mp(cn,n.stateNode));break;case 4:r=cn,i=Xr,cn=n.stateNode.containerInfo,Xr=!0,es(t,e,n),cn=r,Xr=i;break;case 0:case 11:case 14:case 15:if(!Pn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&_m(n,e,o),i=i.next}while(i!==r)}es(t,e,n);break;case 1:if(!Pn&&(qo(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Vt(n,e,l)}es(t,e,n);break;case 21:es(t,e,n);break;case 22:n.mode&1?(Pn=(r=Pn)||n.memoizedState!==null,es(t,e,n),Pn=r):es(t,e,n);break;default:es(t,e,n)}}function pS(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new KD),e.forEach(function(r){var i=aM.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Mr(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,l=o;e:for(;l!==null;){switch(l.tag){case 5:cn=l.stateNode,Xr=!1;break e;case 3:cn=l.stateNode.containerInfo,Xr=!0;break e;case 4:cn=l.stateNode.containerInfo,Xr=!0;break e}l=l.return}if(cn===null)throw Error(J(160));sC(s,o,i),cn=null,Xr=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){Vt(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)oC(e,t),e=e.sibling}function oC(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Mr(e,t),Jr(t),r&4){try{Va(3,t,t.return),Od(3,t)}catch(g){Vt(t,t.return,g)}try{Va(5,t,t.return)}catch(g){Vt(t,t.return,g)}}break;case 1:Mr(e,t),Jr(t),r&512&&n!==null&&qo(n,n.return);break;case 5:if(Mr(e,t),Jr(t),r&512&&n!==null&&qo(n,n.return),t.flags&32){var i=t.stateNode;try{Ga(i,"")}catch(g){Vt(t,t.return,g)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,l=t.type,a=t.updateQueue;if(t.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Qx(i,s),rm(l,o);var u=rm(l,s);for(o=0;o<a.length;o+=2){var c=a[o],f=a[o+1];c==="style"?Rx(i,f):c==="dangerouslySetInnerHTML"?_x(i,f):c==="children"?Ga(i,f):f0(i,c,f,u)}switch(l){case"input":Kg(i,s);break;case"textarea":Ex(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?tl(i,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?tl(i,!!s.multiple,s.defaultValue,!0):tl(i,!!s.multiple,s.multiple?[]:"",!1))}i[su]=s}catch(g){Vt(t,t.return,g)}}break;case 6:if(Mr(e,t),Jr(t),r&4){if(t.stateNode===null)throw Error(J(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(g){Vt(t,t.return,g)}}break;case 3:if(Mr(e,t),Jr(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{eu(e.containerInfo)}catch(g){Vt(t,t.return,g)}break;case 4:Mr(e,t),Jr(t);break;case 13:Mr(e,t),Jr(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(F0=Ut())),r&4&&pS(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Pn=(u=Pn)||c,Mr(e,t),Pn=u):Mr(e,t),Jr(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(ge=t,c=t.child;c!==null;){for(f=ge=c;ge!==null;){switch(h=ge,p=h.child,h.tag){case 0:case 11:case 14:case 15:Va(4,h,h.return);break;case 1:qo(h,h.return);var d=h.stateNode;if(typeof d.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,d.props=e.memoizedProps,d.state=e.memoizedState,d.componentWillUnmount()}catch(g){Vt(r,n,g)}}break;case 5:qo(h,h.return);break;case 22:if(h.memoizedState!==null){mS(f);continue}}p!==null?(p.return=h,ge=p):mS(f)}c=c.sibling}e:for(c=null,f=t;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,a=f.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Tx("display",o))}catch(g){Vt(t,t.return,g)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Vt(t,t.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Mr(e,t),Jr(t),r&4&&pS(t);break;case 21:break;default:Mr(e,t),Jr(t)}}function Jr(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(iC(n)){var r=n;break e}n=n.return}throw Error(J(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ga(i,""),r.flags&=-33);var s=dS(t);Am(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=dS(t);Rm(t,l,o);break;default:throw Error(J(161))}}catch(a){Vt(t,t.return,a)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function eM(t,e,n){ge=t,lC(t)}function lC(t,e,n){for(var r=(t.mode&1)!==0;ge!==null;){var i=ge,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Lc;if(!o){var l=i.alternate,a=l!==null&&l.memoizedState!==null||Pn;l=Lc;var u=Pn;if(Lc=o,(Pn=a)&&!u)for(ge=i;ge!==null;)o=ge,a=o.child,o.tag===22&&o.memoizedState!==null?OS(i):a!==null?(a.return=o,ge=a):OS(i);for(;s!==null;)ge=s,lC(s),s=s.sibling;ge=i,Lc=l,Pn=u}gS(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ge=s):gS(t)}}function gS(t){for(;ge!==null;){var e=ge;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Pn||Od(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Pn)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Lr(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&K1(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}K1(e,o,n)}break;case 5:var l=e.stateNode;if(n===null&&e.flags&4){n=l;var a=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&eu(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(J(163))}Pn||e.flags&512&&Tm(e)}catch(h){Vt(e,e.return,h)}}if(e===t){ge=null;break}if(n=e.sibling,n!==null){n.return=e.return,ge=n;break}ge=e.return}}function mS(t){for(;ge!==null;){var e=ge;if(e===t){ge=null;break}var n=e.sibling;if(n!==null){n.return=e.return,ge=n;break}ge=e.return}}function OS(t){for(;ge!==null;){var e=ge;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Od(4,e)}catch(a){Vt(e,n,a)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(a){Vt(e,i,a)}}var s=e.return;try{Tm(e)}catch(a){Vt(e,s,a)}break;case 5:var o=e.return;try{Tm(e)}catch(a){Vt(e,o,a)}}}catch(a){Vt(e,e.return,a)}if(e===t){ge=null;break}var l=e.sibling;if(l!==null){l.return=e.return,ge=l;break}ge=e.return}}var tM=Math.ceil,hh=Yi.ReactCurrentDispatcher,j0=Yi.ReactCurrentOwner,Cr=Yi.ReactCurrentBatchConfig,He=0,on=null,Yt=null,On=0,tr=0,Go=Is(0),Kt=0,fu=null,fo=0,vd=0,B0=0,Za=null,Zn=null,F0=0,wl=1/0,Ti=null,dh=!1,Dm=null,ws=null,Xc=!1,hs=null,ph=0,ja=0,Mm=null,Qf=-1,Ef=0;function Dn(){return He&6?Ut():Qf!==-1?Qf:Qf=Ut()}function ks(t){return t.mode&1?He&2&&On!==0?On&-On:LD.transition!==null?(Ef===0&&(Ef=Fx()),Ef):(t=lt,t!==0||(t=window.event,t=t===void 0?16:Hx(t.type)),t):1}function Ur(t,e,n,r){if(50<ja)throw ja=0,Mm=null,Error(J(185));Nu(t,n,r),(!(He&2)||t!==on)&&(t===on&&(!(He&2)&&(vd|=n),Kt===4&&as(t,On)),Yn(t,r),n===1&&He===0&&!(e.mode&1)&&(wl=Ut()+500,pd&&Ns()))}function Yn(t,e){var n=t.callbackNode;LA(t,e);var r=Hf(t,t===on?On:0);if(r===0)n!==null&&C1(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&C1(n),e===1)t.tag===0?ND(vS.bind(null,t)):mP(vS.bind(null,t)),AD(function(){!(He&6)&&Ns()}),n=null;else{switch(Ux(r)){case 1:n=m0;break;case 4:n=jx;break;case 16:n=Gf;break;case 536870912:n=Bx;break;default:n=Gf}n=gC(n,aC.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function aC(t,e){if(Qf=-1,Ef=0,He&6)throw Error(J(327));var n=t.callbackNode;if(ol()&&t.callbackNode!==n)return null;var r=Hf(t,t===on?On:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=gh(t,r);else{e=r;var i=He;He|=2;var s=cC();(on!==t||On!==e)&&(Ti=null,wl=Ut()+500,no(t,e));do try{iM();break}catch(l){uC(t,l)}while(1);$0(),hh.current=s,He=i,Yt!==null?e=0:(on=null,On=0,e=Kt)}if(e!==0){if(e===2&&(i=am(t),i!==0&&(r=i,e=Im(t,i))),e===1)throw n=fu,no(t,0),as(t,r),Yn(t,Ut()),n;if(e===6)as(t,r);else{if(i=t.current.alternate,!(r&30)&&!nM(i)&&(e=gh(t,r),e===2&&(s=am(t),s!==0&&(r=s,e=Im(t,s))),e===1))throw n=fu,no(t,0),as(t,r),Yn(t,Ut()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(J(345));case 2:Us(t,Zn,Ti);break;case 3:if(as(t,r),(r&130023424)===r&&(e=F0+500-Ut(),10<e)){if(Hf(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Dn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=mm(Us.bind(null,t,Zn,Ti),e);break}Us(t,Zn,Ti);break;case 4:if(as(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Fr(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=Ut()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tM(r/1960))-r,10<r){t.timeoutHandle=mm(Us.bind(null,t,Zn,Ti),r);break}Us(t,Zn,Ti);break;case 5:Us(t,Zn,Ti);break;default:throw Error(J(329))}}}return Yn(t,Ut()),t.callbackNode===n?aC.bind(null,t):null}function Im(t,e){var n=Za;return t.current.memoizedState.isDehydrated&&(no(t,e).flags|=256),t=gh(t,e),t!==2&&(e=Zn,Zn=n,e!==null&&Nm(e)),t}function Nm(t){Zn===null?Zn=t:Zn.push.apply(Zn,t)}function nM(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Wr(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function as(t,e){for(e&=~B0,e&=~vd,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Fr(e),r=1<<n;t[n]=-1,e&=~r}}function vS(t){if(He&6)throw Error(J(327));ol();var e=Hf(t,0);if(!(e&1))return Yn(t,Ut()),null;var n=gh(t,e);if(t.tag!==0&&n===2){var r=am(t);r!==0&&(e=r,n=Im(t,r))}if(n===1)throw n=fu,no(t,0),as(t,e),Yn(t,Ut()),n;if(n===6)throw Error(J(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Us(t,Zn,Ti),Yn(t,Ut()),null}function U0(t,e){var n=He;He|=1;try{return t(e)}finally{He=n,He===0&&(wl=Ut()+500,pd&&Ns())}}function ho(t){hs!==null&&hs.tag===0&&!(He&6)&&ol();var e=He;He|=1;var n=Cr.transition,r=lt;try{if(Cr.transition=null,lt=1,t)return t()}finally{lt=r,Cr.transition=n,He=e,!(He&6)&&Ns()}}function W0(){tr=Go.current,kt(Go)}function no(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,RD(n)),Yt!==null)for(n=Yt.return;n!==null;){var r=n;switch(C0(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&nh();break;case 3:Sl(),kt(Wn),kt(Cn),M0();break;case 5:D0(r);break;case 4:Sl();break;case 13:kt(Dt);break;case 19:kt(Dt);break;case 10:_0(r.type._context);break;case 22:case 23:W0()}n=n.return}if(on=t,Yt=t=xs(t.current,null),On=tr=e,Kt=0,fu=null,B0=vd=fo=0,Zn=Za=null,Hs!==null){for(e=0;e<Hs.length;e++)if(n=Hs[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Hs=null}return t}function uC(t,e){do{var n=Yt;try{if($0(),xf.current=fh,ch){for(var r=It.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ch=!1}if(co=0,sn=Gt=It=null,Xa=!1,au=0,j0.current=null,n===null||n.return===null){Kt=1,fu=e,Yt=null;break}e:{var s=t,o=n.return,l=n,a=e;if(e=On,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=sS(o);if(p!==null){p.flags&=-257,oS(p,o,l,s,e),p.mode&1&&iS(s,u,e),e=p,a=u;var d=e.updateQueue;if(d===null){var g=new Set;g.add(a),e.updateQueue=g}else d.add(a);break e}else{if(!(e&1)){iS(s,u,e),z0();break e}a=Error(J(426))}}else if(Et&&l.mode&1){var O=sS(o);if(O!==null){!(O.flags&65536)&&(O.flags|=256),oS(O,o,l,s,e),Q0(bl(a,l));break e}}s=a=bl(a,l),Kt!==4&&(Kt=2),Za===null?Za=[s]:Za.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var m=WP(s,a,e);H1(s,m);break e;case 1:l=a;var S=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof S.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ws===null||!ws.has(y)))){s.flags|=65536,e&=-e,s.lanes|=e;var b=zP(s,l,e);H1(s,b);break e}}s=s.return}while(s!==null)}hC(n)}catch(C){e=C,Yt===n&&n!==null&&(Yt=n=n.return);continue}break}while(1)}function cC(){var t=hh.current;return hh.current=fh,t===null?fh:t}function z0(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),on===null||!(fo&268435455)&&!(vd&268435455)||as(on,On)}function gh(t,e){var n=He;He|=2;var r=cC();(on!==t||On!==e)&&(Ti=null,no(t,e));do try{rM();break}catch(i){uC(t,i)}while(1);if($0(),He=n,hh.current=r,Yt!==null)throw Error(J(261));return on=null,On=0,Kt}function rM(){for(;Yt!==null;)fC(Yt)}function iM(){for(;Yt!==null&&!$A();)fC(Yt)}function fC(t){var e=pC(t.alternate,t,tr);t.memoizedProps=t.pendingProps,e===null?hC(t):Yt=e,j0.current=null}function hC(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=HD(n,e),n!==null){n.flags&=32767,Yt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Kt=6,Yt=null;return}}else if(n=GD(n,e,tr),n!==null){Yt=n;return}if(e=e.sibling,e!==null){Yt=e;return}Yt=e=t}while(e!==null);Kt===0&&(Kt=5)}function Us(t,e,n){var r=lt,i=Cr.transition;try{Cr.transition=null,lt=1,sM(t,e,n,r)}finally{Cr.transition=i,lt=r}return null}function sM(t,e,n,r){do ol();while(hs!==null);if(He&6)throw Error(J(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(J(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(XA(t,s),t===on&&(Yt=on=null,On=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Xc||(Xc=!0,gC(Gf,function(){return ol(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Cr.transition,Cr.transition=null;var o=lt;lt=1;var l=He;He|=4,j0.current=null,JD(t,n),oC(n,t),PD(pm),Kf=!!dm,pm=dm=null,t.current=n,eM(n),_A(),He=l,lt=o,Cr.transition=s}else t.current=n;if(Xc&&(Xc=!1,hs=t,ph=i),s=t.pendingLanes,s===0&&(ws=null),AA(n.stateNode),Yn(t,Ut()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(dh)throw dh=!1,t=Dm,Dm=null,t;return ph&1&&t.tag!==0&&ol(),s=t.pendingLanes,s&1?t===Mm?ja++:(ja=0,Mm=t):ja=0,Ns(),null}function ol(){if(hs!==null){var t=Ux(ph),e=Cr.transition,n=lt;try{if(Cr.transition=null,lt=16>t?16:t,hs===null)var r=!1;else{if(t=hs,hs=null,ph=0,He&6)throw Error(J(331));var i=He;for(He|=4,ge=t.current;ge!==null;){var s=ge,o=s.child;if(ge.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(ge=u;ge!==null;){var c=ge;switch(c.tag){case 0:case 11:case 15:Va(8,c,s)}var f=c.child;if(f!==null)f.return=c,ge=f;else for(;ge!==null;){c=ge;var h=c.sibling,p=c.return;if(rC(c),c===u){ge=null;break}if(h!==null){h.return=p,ge=h;break}ge=p}}}var d=s.alternate;if(d!==null){var g=d.child;if(g!==null){d.child=null;do{var O=g.sibling;g.sibling=null,g=O}while(g!==null)}}ge=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ge=o;else e:for(;ge!==null;){if(s=ge,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Va(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,ge=m;break e}ge=s.return}}var S=t.current;for(ge=S;ge!==null;){o=ge;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,ge=y;else e:for(o=S;ge!==null;){if(l=ge,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Od(9,l)}}catch(C){Vt(l,l.return,C)}if(l===o){ge=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,ge=b;break e}ge=l.return}}if(He=i,Ns(),gi&&typeof gi.onPostCommitFiberRoot=="function")try{gi.onPostCommitFiberRoot(ud,t)}catch{}r=!0}return r}finally{lt=n,Cr.transition=e}}return!1}function yS(t,e,n){e=bl(n,e),e=WP(t,e,1),t=bs(t,e,1),e=Dn(),t!==null&&(Nu(t,1,e),Yn(t,e))}function Vt(t,e,n){if(t.tag===3)yS(t,t,n);else for(;e!==null;){if(e.tag===3){yS(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ws===null||!ws.has(r))){t=bl(n,t),t=zP(e,t,1),e=bs(e,t,1),t=Dn(),e!==null&&(Nu(e,1,t),Yn(e,t));break}}e=e.return}}function oM(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Dn(),t.pingedLanes|=t.suspendedLanes&n,on===t&&(On&n)===n&&(Kt===4||Kt===3&&(On&130023424)===On&&500>Ut()-F0?no(t,0):B0|=n),Yn(t,e)}function dC(t,e){e===0&&(t.mode&1?(e=$c,$c<<=1,!($c&130023424)&&($c=4194304)):e=1);var n=Dn();t=Fi(t,e),t!==null&&(Nu(t,e,n),Yn(t,n))}function lM(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),dC(t,n)}function aM(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(J(314))}r!==null&&r.delete(e),dC(t,n)}var pC;pC=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Wn.current)Bn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Bn=!1,qD(t,e,n);Bn=!!(t.flags&131072)}else Bn=!1,Et&&e.flags&1048576&&OP(e,sh,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Cf(t,e),t=e.pendingProps;var i=Ol(e,Cn.current);sl(e,n),i=N0(null,e,r,t,i,n);var s=L0();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,zn(r)?(s=!0,rh(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,R0(e),i.updater=gd,e.stateNode=i,i._reactInternals=e,km(e,r,t,n),e=Cm(null,e,r,!0,s,n)):(e.tag=0,Et&&s&&P0(e),Tn(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Cf(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=cM(r),t=Lr(r,t),i){case 0:e=Pm(null,e,r,t,n);break e;case 1:e=uS(null,e,r,t,n);break e;case 11:e=lS(null,e,r,t,n);break e;case 14:e=aS(null,e,r,Lr(r.type,t),n);break e}throw Error(J(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lr(r,i),Pm(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lr(r,i),uS(t,e,r,i,n);case 3:e:{if(HP(e),t===null)throw Error(J(387));r=e.pendingProps,s=e.memoizedState,i=s.element,bP(t,e),ah(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=bl(Error(J(423)),e),e=cS(t,e,r,n,i);break e}else if(r!==i){i=bl(Error(J(424)),e),e=cS(t,e,r,n,i);break e}else for(sr=Ss(e.stateNode.containerInfo.firstChild),lr=e,Et=!0,Vr=null,n=PP(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vl(),r===i){e=Ui(t,e,n);break e}Tn(t,e,r,n)}e=e.child}return e;case 5:return CP(e),t===null&&Sm(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,gm(r,i)?o=null:s!==null&&gm(r,s)&&(e.flags|=32),GP(t,e),Tn(t,e,o,n),e.child;case 6:return t===null&&Sm(e),null;case 13:return KP(t,e,n);case 4:return A0(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=yl(e,null,r,n):Tn(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lr(r,i),lS(t,e,r,i,n);case 7:return Tn(t,e,e.pendingProps,n),e.child;case 8:return Tn(t,e,e.pendingProps.children,n),e.child;case 12:return Tn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Ot(oh,r._currentValue),r._currentValue=o,s!==null)if(Wr(s.value,o)){if(s.children===i.children&&!Wn.current){e=Ui(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=Ni(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),bm(s.return,n,e),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(J(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),bm(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Tn(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,sl(e,n),i=Er(i),r=r(i),e.flags|=1,Tn(t,e,r,n),e.child;case 14:return r=e.type,i=Lr(r,e.pendingProps),i=Lr(r.type,i),aS(t,e,r,i,n);case 15:return YP(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lr(r,i),Cf(t,e),e.tag=1,zn(r)?(t=!0,rh(e)):t=!1,sl(e,n),kP(e,r,i),km(e,r,i,n),Cm(null,e,r,!0,t,n);case 19:return JP(t,e,n);case 22:return qP(t,e,n)}throw Error(J(156,e.tag))};function gC(t,e){return Zx(t,e)}function uM(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wr(t,e,n,r){return new uM(t,e,n,r)}function Y0(t){return t=t.prototype,!(!t||!t.isReactComponent)}function cM(t){if(typeof t=="function")return Y0(t)?1:0;if(t!=null){if(t=t.$$typeof,t===d0)return 11;if(t===p0)return 14}return 2}function xs(t,e){var n=t.alternate;return n===null?(n=wr(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function $f(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")Y0(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Vo:return ro(n.children,i,s,e);case h0:o=8,i|=8;break;case zg:return t=wr(12,n,e,i|2),t.elementType=zg,t.lanes=s,t;case Yg:return t=wr(13,n,e,i),t.elementType=Yg,t.lanes=s,t;case qg:return t=wr(19,n,e,i),t.elementType=qg,t.lanes=s,t;case xx:return yd(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case wx:o=10;break e;case kx:o=9;break e;case d0:o=11;break e;case p0:o=14;break e;case ns:o=16,r=null;break e}throw Error(J(130,t==null?t:typeof t,""))}return e=wr(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function ro(t,e,n,r){return t=wr(7,t,r,e),t.lanes=n,t}function yd(t,e,n,r){return t=wr(22,t,r,e),t.elementType=xx,t.lanes=n,t.stateNode={isHidden:!1},t}function Bp(t,e,n){return t=wr(6,t,null,e),t.lanes=n,t}function Fp(t,e,n){return e=wr(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function fM(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xp(0),this.expirationTimes=xp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xp(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function q0(t,e,n,r,i,s,o,l,a){return t=new fM(t,e,n,l,a),e===1?(e=1,s===!0&&(e|=8)):e=0,s=wr(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},R0(s),t}function hM(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xo,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function mC(t){if(!t)return Es;t=t._reactInternals;e:{if(yo(t)!==t||t.tag!==1)throw Error(J(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(zn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(J(171))}if(t.tag===1){var n=t.type;if(zn(n))return gP(t,n,e)}return e}function OC(t,e,n,r,i,s,o,l,a){return t=q0(n,r,!0,t,i,s,o,l,a),t.context=mC(null),n=t.current,r=Dn(),i=ks(n),s=Ni(r,i),s.callback=e??null,bs(n,s,i),t.current.lanes=i,Nu(t,i,r),Yn(t,r),t}function Sd(t,e,n,r){var i=e.current,s=Dn(),o=ks(i);return n=mC(n),e.context===null?e.context=n:e.pendingContext=n,e=Ni(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=bs(i,e,o),t!==null&&(Ur(t,i,o,s),kf(t,i,o)),o}function mh(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function SS(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function G0(t,e){SS(t,e),(t=t.alternate)&&SS(t,e)}function dM(){return null}var vC=typeof reportError=="function"?reportError:function(t){console.error(t)};function H0(t){this._internalRoot=t}bd.prototype.render=H0.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(J(409));Sd(t,e,null,null)};bd.prototype.unmount=H0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;ho(function(){Sd(null,t,null,null)}),e[Bi]=null}};function bd(t){this._internalRoot=t}bd.prototype.unstable_scheduleHydration=function(t){if(t){var e=Yx();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ls.length&&e!==0&&e<ls[n].priority;n++);ls.splice(n,0,t),n===0&&Gx(t)}};function K0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function wd(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function bS(){}function pM(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=mh(o);s.call(u)}}var o=OC(e,r,t,0,null,!1,!1,"",bS);return t._reactRootContainer=o,t[Bi]=o.current,ru(t.nodeType===8?t.parentNode:t),ho(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=mh(a);l.call(u)}}var a=q0(t,0,!1,null,null,!1,!1,"",bS);return t._reactRootContainer=a,t[Bi]=a.current,ru(t.nodeType===8?t.parentNode:t),ho(function(){Sd(e,a,n,r)}),a}function kd(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var a=mh(o);l.call(a)}}Sd(e,o,t,i)}else o=pM(n,e,t,i,r);return mh(o)}Wx=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=xa(e.pendingLanes);n!==0&&(O0(e,n|1),Yn(e,Ut()),!(He&6)&&(wl=Ut()+500,Ns()))}break;case 13:ho(function(){var r=Fi(t,1);if(r!==null){var i=Dn();Ur(r,t,1,i)}}),G0(t,1)}};v0=function(t){if(t.tag===13){var e=Fi(t,134217728);if(e!==null){var n=Dn();Ur(e,t,134217728,n)}G0(t,134217728)}};zx=function(t){if(t.tag===13){var e=ks(t),n=Fi(t,e);if(n!==null){var r=Dn();Ur(n,t,e,r)}G0(t,e)}};Yx=function(){return lt};qx=function(t,e){var n=lt;try{return lt=t,e()}finally{lt=n}};sm=function(t,e,n){switch(e){case"input":if(Kg(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=dd(r);if(!i)throw Error(J(90));Cx(r),Kg(r,i)}}}break;case"textarea":Ex(t,n);break;case"select":e=n.value,e!=null&&tl(t,!!n.multiple,e,!1)}};Mx=U0;Ix=ho;var gM={usingClientEntryPoint:!1,Events:[Xu,Fo,dd,Ax,Dx,U0]},ua={findFiberByHostInstance:Gs,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},mM={bundleType:ua.bundleType,version:ua.version,rendererPackageName:ua.rendererPackageName,rendererConfig:ua.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yi.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Xx(t),t===null?null:t.stateNode},findFiberByHostInstance:ua.findFiberByHostInstance||dM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vc.isDisabled&&Vc.supportsFiber)try{ud=Vc.inject(mM),gi=Vc}catch{}}fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gM;fr.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!K0(e))throw Error(J(200));return hM(t,e,null,n)};fr.createRoot=function(t,e){if(!K0(t))throw Error(J(299));var n=!1,r="",i=vC;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=q0(t,1,!1,null,null,n,!1,r,i),t[Bi]=e.current,ru(t.nodeType===8?t.parentNode:t),new H0(e)};fr.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(J(188)):(t=Object.keys(t).join(","),Error(J(268,t)));return t=Xx(e),t=t===null?null:t.stateNode,t};fr.flushSync=function(t){return ho(t)};fr.hydrate=function(t,e,n){if(!wd(e))throw Error(J(200));return kd(null,t,e,!0,n)};fr.hydrateRoot=function(t,e,n){if(!K0(t))throw Error(J(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=vC;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=OC(e,null,t,1,n??null,i,!1,s,o),t[Bi]=e.current,ru(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new bd(e)};fr.render=function(t,e,n){if(!wd(e))throw Error(J(200));return kd(null,t,e,!1,n)};fr.unmountComponentAtNode=function(t){if(!wd(t))throw Error(J(40));return t._reactRootContainer?(ho(function(){kd(null,null,t,!1,function(){t._reactRootContainer=null,t[Bi]=null})}),!0):!1};fr.unstable_batchedUpdates=U0;fr.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!wd(n))throw Error(J(200));if(t==null||t._reactInternals===void 0)throw Error(J(38));return kd(t,e,n,!1,r)};fr.version="18.2.0-next-9e3b772b8-20220608";function yC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yC)}catch(t){console.error(t)}}yC(),Ox.exports=fr;var J0=Ox.exports;const Ho=Ds(J0);var SC,wS=J0;SC=wS.createRoot,wS.hydrateRoot;function ds(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bC={exports:{}};(function(t,e){(function(n){t.exports=n()})(function(){return function(){function n(r,i,s){function o(u,c){if(!i[u]){if(!r[u]){var f=typeof ds=="function"&&ds;if(!c&&f)return f(u,!0);if(l)return l(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var p=i[u]={exports:{}};r[u][0].call(p.exports,function(d){var g=r[u][1][d];return o(g||d)},p,p.exports,n,r,i,s)}return i[u].exports}for(var l=typeof ds=="function"&&ds,a=0;a<s.length;a++)o(s[a]);return o}return n}()({1:[function(n,r,i){(function(s,o,l){(function(){(function(a,u){u(typeof i=="object"&&typeof r<"u"?i:a.async=a.async||{})})(this,function(a){function u(x,$){$=$|0;for(var T=Math.max(x.length-$,0),D=Array(T),X=0;X<T;X++)D[X]=x[$+X];return D}var c=function(x){var $=u(arguments,1);return function(){var T=u(arguments);return x.apply(null,$.concat(T))}},f=function(x){return function(){var $=u(arguments),T=$.pop();x.call(this,$,T)}};function h(x){var $=typeof x;return x!=null&&($=="object"||$=="function")}var p=typeof l=="function"&&l,d=typeof s=="object"&&typeof s.nextTick=="function";function g(x){setTimeout(x,0)}function O(x){return function($){var T=u(arguments,1);x(function(){$.apply(null,T)})}}var m;p?m=l:d?m=s.nextTick:m=g;var S=O(m);function y(x){return f(function($,T){var D;try{D=x.apply(this,$)}catch(X){return T(X)}h(D)&&typeof D.then=="function"?D.then(function(X){b(T,null,X)},function(X){b(T,X.message?X:new Error(X))}):T(null,D)})}function b(x,$,T){try{x($,T)}catch(D){S(C,D)}}function C(x){throw x}var Q=typeof Symbol=="function";function _(x){return Q&&x[Symbol.toStringTag]==="AsyncFunction"}function k(x){return _(x)?y(x):x}function w(x){return function($){var T=u(arguments,1),D=f(function(X,L){var B=this;return x($,function(q,ae){k(q).apply(B,X.concat(ae))},L)});return T.length?D.apply(this,T):D}}var P=typeof o=="object"&&o&&o.Object===Object&&o,E=typeof self=="object"&&self&&self.Object===Object&&self,A=P||E||Function("return this")(),M=A.Symbol,N=Object.prototype,z=N.hasOwnProperty,re=N.toString,se=M?M.toStringTag:void 0;function V(x){var $=z.call(x,se),T=x[se];try{x[se]=void 0;var D=!0}catch{}var X=re.call(x);return D&&($?x[se]=T:delete x[se]),X}var G=Object.prototype,te=G.toString;function Ae(x){return te.call(x)}var xe="[object Null]",je="[object Undefined]",Ke=M?M.toStringTag:void 0;function Pt(x){return x==null?x===void 0?je:xe:Ke&&Ke in Object(x)?V(x):Ae(x)}var ct="[object AsyncFunction]",ut="[object Function]",$n="[object GeneratorFunction]",yn="[object Proxy]";function I(x){if(!h(x))return!1;var $=Pt(x);return $==ut||$==$n||$==ct||$==yn}var j=9007199254740991;function K(x){return typeof x=="number"&&x>-1&&x%1==0&&x<=j}function ee(x){return x!=null&&K(x.length)&&!I(x)}var F={};function W(){}function be(x){return function(){if(x!==null){var $=x;x=null,$.apply(this,arguments)}}}var Ce=typeof Symbol=="function"&&Symbol.iterator,Y=function(x){return Ce&&x[Ce]&&x[Ce]()};function oe(x,$){for(var T=-1,D=Array(x);++T<x;)D[T]=$(T);return D}function le(x){return x!=null&&typeof x=="object"}var ce="[object Arguments]";function $e(x){return le(x)&&Pt(x)==ce}var Te=Object.prototype,H=Te.hasOwnProperty,ne=Te.propertyIsEnumerable,ze=$e(function(){return arguments}())?$e:function(x){return le(x)&&H.call(x,"callee")&&!ne.call(x,"callee")},Ne=Array.isArray;function Xe(){return!1}var ft=typeof a=="object"&&a&&!a.nodeType&&a,pr=ft&&typeof r=="object"&&r&&!r.nodeType&&r,qt=pr&&pr.exports===ft,Xt=qt?A.Buffer:void 0,pt=Xt?Xt.isBuffer:void 0,Ln=pt||Xe,Gn=9007199254740991,Ci=/^(?:0|[1-9]\d*)$/;function Xn(x,$){var T=typeof x;return $=$??Gn,!!$&&(T=="number"||T!="symbol"&&Ci.test(x))&&x>-1&&x%1==0&&x<$}var _n="[object Arguments]",Rr="[object Array]",Ye="[object Boolean]",pe="[object Date]",Me="[object Error]",Se="[object Function]",he="[object Map]",Qe="[object Number]",Be="[object Object]",Fe="[object RegExp]",Ge="[object Set]",_t="[object String]",Ct="[object WeakMap]",gt="[object ArrayBuffer]",Wt="[object DataView]",Ze="[object Float32Array]",de="[object Float64Array]",Le="[object Int8Array]",Tt="[object Int16Array]",nn="[object Int32Array]",Ar="[object Uint8Array]",Qi="[object Uint8ClampedArray]",Hn="[object Uint16Array]",Vs="[object Uint32Array]",Je={};Je[Ze]=Je[de]=Je[Le]=Je[Tt]=Je[nn]=Je[Ar]=Je[Qi]=Je[Hn]=Je[Vs]=!0,Je[_n]=Je[Rr]=Je[gt]=Je[Ye]=Je[Wt]=Je[pe]=Je[Me]=Je[Se]=Je[he]=Je[Qe]=Je[Be]=Je[Fe]=Je[Ge]=Je[_t]=Je[Ct]=!1;function gr(x){return le(x)&&K(x.length)&&!!Je[Pt(x)]}function mr(x){return function($){return x($)}}var Ee=typeof a=="object"&&a&&!a.nodeType&&a,tt=Ee&&typeof r=="object"&&r&&!r.nodeType&&r,Bt=tt&&tt.exports===Ee,ht=Bt&&P.process,Vn=function(){try{var x=tt&&tt.require&&tt.require("util").types;return x||ht&&ht.binding&&ht.binding("util")}catch{}}(),Or=Vn&&Vn.isTypedArray,zl=Or?mr(Or):gr,bo=Object.prototype,tc=bo.hasOwnProperty;function qr(x,$){var T=Ne(x),D=!T&&ze(x),X=!T&&!D&&Ln(x),L=!T&&!D&&!X&&zl(x),B=T||D||X||L,q=B?oe(x.length,String):[],ae=q.length;for(var ke in x)($||tc.call(x,ke))&&!(B&&(ke=="length"||X&&(ke=="offset"||ke=="parent")||L&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||Xn(ke,ae)))&&q.push(ke);return q}var Kn=Object.prototype;function Hi(x){var $=x&&x.constructor,T=typeof $=="function"&&$.prototype||Kn;return x===T}function Ei(x,$){return function(T){return x($(T))}}var $i=Ei(Object.keys,Object),N2=Object.prototype,L2=N2.hasOwnProperty;function X2(x){if(!Hi(x))return $i(x);var $=[];for(var T in Object(x))L2.call(x,T)&&T!="constructor"&&$.push(T);return $}function rp(x){return ee(x)?qr(x):X2(x)}function V2(x){var $=-1,T=x.length;return function(){return++$<T?{value:x[$],key:$}:null}}function Z2(x){var $=-1;return function(){var D=x.next();return D.done?null:($++,{value:D.value,key:$})}}function j2(x){var $=rp(x),T=-1,D=$.length;return function X(){var L=$[++T];return L==="__proto__"?X():T<D?{value:x[L],key:L}:null}}function B2(x){if(ee(x))return V2(x);var $=Y(x);return $?Z2($):j2(x)}function Gr(x){return function(){if(x===null)throw new Error("Callback was already called.");var $=x;x=null,$.apply(this,arguments)}}function nc(x){return function($,T,D){if(D=be(D||W),x<=0||!$)return D(null);var X=B2($),L=!1,B=0,q=!1;function ae(fe,De){if(B-=1,fe)L=!0,D(fe);else{if(De===F||L&&B<=0)return L=!0,D(null);q||ke()}}function ke(){for(q=!0;B<x&&!L;){var fe=X();if(fe===null){L=!0,B<=0&&D(null);return}B+=1,T(fe.value,fe.key,Gr(ae))}q=!1}ke()}}function Zs(x,$,T,D){nc($)(x,k(T),D)}function un(x,$){return function(T,D,X){return x(T,$,D,X)}}function F2(x,$,T){T=be(T||W);var D=0,X=0,L=x.length;L===0&&T(null);function B(q,ae){q?T(q):(++X===L||ae===F)&&T(null)}for(;D<L;D++)$(x[D],D,Gr(B))}var U2=un(Zs,1/0),Ki=function(x,$,T){var D=ee(x)?F2:U2;D(x,k($),T)};function wo(x){return function($,T,D){return x(Ki,$,k(T),D)}}function uy(x,$,T,D){D=D||W,$=$||[];var X=[],L=0,B=k(T);x($,function(q,ae,ke){var fe=L++;B(q,function(De,yt){X[fe]=yt,ke(De)})},function(q){D(q,X)})}var rc=wo(uy),cy=w(rc);function ko(x){return function($,T,D,X){return x(nc(T),$,k(D),X)}}var xo=ko(uy),ip=un(xo,1),fy=w(ip);function ic(x,$){for(var T=-1,D=x==null?0:x.length;++T<D&&$(x[T],T,x)!==!1;);return x}function W2(x){return function($,T,D){for(var X=-1,L=Object($),B=D($),q=B.length;q--;){var ae=B[x?q:++X];if(T(L[ae],ae,L)===!1)break}return $}}var z2=W2();function Yl(x,$){return x&&z2(x,$,rp)}function Y2(x,$,T,D){for(var X=x.length,L=T+(D?1:-1);D?L--:++L<X;)if($(x[L],L,x))return L;return-1}function q2(x){return x!==x}function G2(x,$,T){for(var D=T-1,X=x.length;++D<X;)if(x[D]===$)return D;return-1}function sc(x,$,T){return $===$?G2(x,$,T):Y2(x,q2,T)}var sp=function(x,$,T){typeof $=="function"&&(T=$,$=null),T=be(T||W);var D=rp(x),X=D.length;if(!X)return T(null);$||($=X);var L={},B=0,q=!1,ae=Object.create(null),ke=[],fe=[],De={};Yl(x,function(Qt,Rt){if(!Ne(Qt)){yt(Rt,[Qt]),fe.push(Rt);return}var rn=Qt.slice(0,Qt.length-1),_i=rn.length;if(_i===0){yt(Rt,Qt),fe.push(Rt);return}De[Rt]=_i,ic(rn,function(Eo){if(!x[Eo])throw new Error("async.auto task `"+Rt+"` has a non-existent dependency `"+Eo+"` in "+rn.join(", "));Hr(Eo,function(){_i--,_i===0&&yt(Rt,Qt)})})}),jR(),Sn();function yt(Qt,Rt){ke.push(function(){Kr(Qt,Rt)})}function Sn(){if(ke.length===0&&B===0)return T(null,L);for(;ke.length&&B<$;){var Qt=ke.shift();Qt()}}function Hr(Qt,Rt){var rn=ae[Qt];rn||(rn=ae[Qt]=[]),rn.push(Rt)}function vr(Qt){var Rt=ae[Qt]||[];ic(Rt,function(rn){rn()}),Sn()}function Kr(Qt,Rt){if(!q){var rn=Gr(function(Eo,Op){if(B--,arguments.length>2&&(Op=u(arguments,1)),Eo){var vp={};Yl(L,function(FR,UR){vp[UR]=FR}),vp[Qt]=Op,q=!0,ae=Object.create(null),T(Eo,vp)}else L[Qt]=Op,vr(Qt)});B++;var _i=k(Rt[Rt.length-1]);Rt.length>1?_i(L,rn):_i(rn)}}function jR(){for(var Qt,Rt=0;fe.length;)Qt=fe.pop(),Rt++,ic(BR(Qt),function(rn){--De[rn]===0&&fe.push(rn)});if(Rt!==X)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function BR(Qt){var Rt=[];return Yl(x,function(rn,_i){Ne(rn)&&sc(rn,Qt,0)>=0&&Rt.push(_i)}),Rt}};function Po(x,$){for(var T=-1,D=x==null?0:x.length,X=Array(D);++T<D;)X[T]=$(x[T],T,x);return X}var H2="[object Symbol]";function K2(x){return typeof x=="symbol"||le(x)&&Pt(x)==H2}var J2=1/0,hy=M?M.prototype:void 0,dy=hy?hy.toString:void 0;function op(x){if(typeof x=="string")return x;if(Ne(x))return Po(x,op)+"";if(K2(x))return dy?dy.call(x):"";var $=x+"";return $=="0"&&1/x==-J2?"-0":$}function eR(x,$,T){var D=-1,X=x.length;$<0&&($=-$>X?0:X+$),T=T>X?X:T,T<0&&(T+=X),X=$>T?0:T-$>>>0,$>>>=0;for(var L=Array(X);++D<X;)L[D]=x[D+$];return L}function tR(x,$,T){var D=x.length;return T=T===void 0?D:T,!$&&T>=D?x:eR(x,$,T)}function nR(x,$){for(var T=x.length;T--&&sc($,x[T],0)>-1;);return T}function rR(x,$){for(var T=-1,D=x.length;++T<D&&sc($,x[T],0)>-1;);return T}function iR(x){return x.split("")}var sR="\\ud800-\\udfff",oR="\\u0300-\\u036f",lR="\\ufe20-\\ufe2f",aR="\\u20d0-\\u20ff",uR=oR+lR+aR,cR="\\ufe0e\\ufe0f",fR="\\u200d",hR=RegExp("["+fR+sR+uR+cR+"]");function dR(x){return hR.test(x)}var py="\\ud800-\\udfff",pR="\\u0300-\\u036f",gR="\\ufe20-\\ufe2f",mR="\\u20d0-\\u20ff",OR=pR+gR+mR,vR="\\ufe0e\\ufe0f",yR="["+py+"]",lp="["+OR+"]",ap="\\ud83c[\\udffb-\\udfff]",SR="(?:"+lp+"|"+ap+")",gy="[^"+py+"]",my="(?:\\ud83c[\\udde6-\\uddff]){2}",Oy="[\\ud800-\\udbff][\\udc00-\\udfff]",bR="\\u200d",vy=SR+"?",yy="["+vR+"]?",wR="(?:"+bR+"(?:"+[gy,my,Oy].join("|")+")"+yy+vy+")*",kR=yy+vy+wR,xR="(?:"+[gy+lp+"?",lp,my,Oy,yR].join("|")+")",PR=RegExp(ap+"(?="+ap+")|"+xR+kR,"g");function CR(x){return x.match(PR)||[]}function Sy(x){return dR(x)?CR(x):iR(x)}function QR(x){return x==null?"":op(x)}var ER=/^\s+|\s+$/g;function $R(x,$,T){if(x=QR(x),x&&(T||$===void 0))return x.replace(ER,"");if(!x||!($=op($)))return x;var D=Sy(x),X=Sy($),L=rR(D,X),B=nR(D,X)+1;return tR(D,L,B).join("")}var _R=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,TR=/,/,RR=/(=.+)?(\s*)$/,AR=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;function DR(x){return x=x.toString().replace(AR,""),x=x.match(_R)[2].replace(" ",""),x=x?x.split(TR):[],x=x.map(function($){return $R($.replace(RR,""))}),x}function by(x,$){var T={};Yl(x,function(D,X){var L,B=_(D),q=!B&&D.length===1||B&&D.length===0;if(Ne(D))L=D.slice(0,-1),D=D[D.length-1],T[X]=L.concat(L.length>0?ae:D);else if(q)T[X]=D;else{if(L=DR(D),D.length===0&&!B&&L.length===0)throw new Error("autoInject task functions require explicit parameters.");B||L.pop(),T[X]=L.concat(ae)}function ae(ke,fe){var De=Po(L,function(yt){return ke[yt]});De.push(fe),k(D).apply(null,De)}}),sp(T,$)}function Dr(){this.head=this.tail=null,this.length=0}function wy(x,$){x.length=1,x.head=x.tail=$}Dr.prototype.removeLink=function(x){return x.prev?x.prev.next=x.next:this.head=x.next,x.next?x.next.prev=x.prev:this.tail=x.prev,x.prev=x.next=null,this.length-=1,x},Dr.prototype.empty=function(){for(;this.head;)this.shift();return this},Dr.prototype.insertAfter=function(x,$){$.prev=x,$.next=x.next,x.next?x.next.prev=$:this.tail=$,x.next=$,this.length+=1},Dr.prototype.insertBefore=function(x,$){$.prev=x.prev,$.next=x,x.prev?x.prev.next=$:this.head=$,x.prev=$,this.length+=1},Dr.prototype.unshift=function(x){this.head?this.insertBefore(this.head,x):wy(this,x)},Dr.prototype.push=function(x){this.tail?this.insertAfter(this.tail,x):wy(this,x)},Dr.prototype.shift=function(){return this.head&&this.removeLink(this.head)},Dr.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},Dr.prototype.toArray=function(){for(var x=Array(this.length),$=this.head,T=0;T<this.length;T++)x[T]=$.data,$=$.next;return x},Dr.prototype.remove=function(x){for(var $=this.head;$;){var T=$.next;x($)&&this.removeLink($),$=T}return this};function ky(x,$,T){if($==null)$=1;else if($===0)throw new Error("Concurrency must not be zero");var D=k(x),X=0,L=[],B=!1;function q(De,yt,Sn){if(Sn!=null&&typeof Sn!="function")throw new Error("task callback must be a function");if(fe.started=!0,Ne(De)||(De=[De]),De.length===0&&fe.idle())return S(function(){fe.drain()});for(var Hr=0,vr=De.length;Hr<vr;Hr++){var Kr={data:De[Hr],callback:Sn||W};yt?fe._tasks.unshift(Kr):fe._tasks.push(Kr)}B||(B=!0,S(function(){B=!1,fe.process()}))}function ae(De){return function(yt){X-=1;for(var Sn=0,Hr=De.length;Sn<Hr;Sn++){var vr=De[Sn],Kr=sc(L,vr,0);Kr===0?L.shift():Kr>0&&L.splice(Kr,1),vr.callback.apply(vr,arguments),yt!=null&&fe.error(yt,vr.data)}X<=fe.concurrency-fe.buffer&&fe.unsaturated(),fe.idle()&&fe.drain(),fe.process()}}var ke=!1,fe={_tasks:new Dr,concurrency:$,payload:T,saturated:W,unsaturated:W,buffer:$/4,empty:W,drain:W,error:W,started:!1,paused:!1,push:function(De,yt){q(De,!1,yt)},kill:function(){fe.drain=W,fe._tasks.empty()},unshift:function(De,yt){q(De,!0,yt)},remove:function(De){fe._tasks.remove(De)},process:function(){if(!ke){for(ke=!0;!fe.paused&&X<fe.concurrency&&fe._tasks.length;){var De=[],yt=[],Sn=fe._tasks.length;fe.payload&&(Sn=Math.min(Sn,fe.payload));for(var Hr=0;Hr<Sn;Hr++){var vr=fe._tasks.shift();De.push(vr),L.push(vr),yt.push(vr.data)}X+=1,fe._tasks.length===0&&fe.empty(),X===fe.concurrency&&fe.saturated();var Kr=Gr(ae(De));D(yt,Kr)}ke=!1}},length:function(){return fe._tasks.length},running:function(){return X},workersList:function(){return L},idle:function(){return fe._tasks.length+X===0},pause:function(){fe.paused=!0},resume:function(){fe.paused!==!1&&(fe.paused=!1,S(fe.process))}};return fe}function xy(x,$){return ky(x,1,$)}var Co=un(Zs,1);function Ji(x,$,T,D){D=be(D||W);var X=k(T);Co(x,function(L,B,q){X($,L,function(ae,ke){$=ke,q(ae)})},function(L){D(L,$)})}function up(){var x=Po(arguments,k);return function(){var $=u(arguments),T=this,D=$[$.length-1];typeof D=="function"?$.pop():D=W,Ji(x,$,function(X,L,B){L.apply(T,X.concat(function(q){var ae=u(arguments,1);B(q,ae)}))},function(X,L){D.apply(T,[X].concat(L))})}}var Py=function(){return up.apply(null,u(arguments).reverse())},MR=Array.prototype.concat,oc=function(x,$,T,D){D=D||W;var X=k(T);xo(x,$,function(L,B){X(L,function(q){return q?B(q):B(null,u(arguments,1))})},function(L,B){for(var q=[],ae=0;ae<B.length;ae++)B[ae]&&(q=MR.apply(q,B[ae]));return D(L,q)})},Cy=un(oc,1/0),Qy=un(oc,1),Ey=function(){var x=u(arguments),$=[null].concat(x);return function(){var T=arguments[arguments.length-1];return T.apply(this,$)}};function ql(x){return x}function Qo(x,$){return function(T,D,X,L){L=L||W;var B=!1,q;T(D,function(ae,ke,fe){X(ae,function(De,yt){De?fe(De):x(yt)&&!q?(B=!0,q=$(!0,ae),fe(null,F)):fe()})},function(ae){ae?L(ae):L(null,B?q:$(!1))})}}function $y(x,$){return $}var lc=wo(Qo(ql,$y)),Gl=ko(Qo(ql,$y)),ac=un(Gl,1);function _y(x){return function($){var T=u(arguments,1);T.push(function(D){var X=u(arguments,1);typeof console=="object"&&(D?console.error&&console.error(D):console[x]&&ic(X,function(L){console[x](L)}))}),k($).apply(null,T)}}var Ty=_y("dir");function Ry(x,$,T){T=Gr(T||W);var D=k(x),X=k($);function L(q){if(q)return T(q);var ae=u(arguments,1);ae.push(B),X.apply(this,ae)}function B(q,ae){if(q)return T(q);if(!ae)return T(null);D(L)}B(null,!0)}function cp(x,$,T){T=Gr(T||W);var D=k(x),X=function(L){if(L)return T(L);var B=u(arguments,1);if($.apply(this,B))return D(X);T.apply(null,[null].concat(B))};D(X)}function Ay(x,$,T){cp(x,function(){return!$.apply(this,arguments)},T)}function Dy(x,$,T){T=Gr(T||W);var D=k($),X=k(x);function L(q){if(q)return T(q);X(B)}function B(q,ae){if(q)return T(q);if(!ae)return T(null);D(L)}X(B)}function My(x){return function($,T,D){return x($,D)}}function uc(x,$,T){Ki(x,My(k($)),T)}function Hl(x,$,T,D){nc($)(x,My(k(T)),D)}var Kl=un(Hl,1);function fp(x){return _(x)?x:f(function($,T){var D=!0;$.push(function(){var X=arguments;D?S(function(){T.apply(null,X)}):T.apply(null,X)}),x.apply(this,$),D=!1})}function cc(x){return!x}var fc=wo(Qo(cc,cc)),Jl=ko(Qo(cc,cc)),hc=un(Jl,1);function Iy(x){return function($){return $==null?void 0:$[x]}}function IR(x,$,T,D){var X=new Array($.length);x($,function(L,B,q){T(L,function(ae,ke){X[B]=!!ke,q(ae)})},function(L){if(L)return D(L);for(var B=[],q=0;q<$.length;q++)X[q]&&B.push($[q]);D(null,B)})}function NR(x,$,T,D){var X=[];x($,function(L,B,q){T(L,function(ae,ke){ae?q(ae):(ke&&X.push({index:B,value:L}),q())})},function(L){L?D(L):D(null,Po(X.sort(function(B,q){return B.index-q.index}),Iy("value")))})}function hp(x,$,T,D){var X=ee($)?IR:NR;X(x,$,k(T),D||W)}var dc=wo(hp),ea=ko(hp),pc=un(ea,1);function Ny(x,$){var T=Gr($||W),D=k(fp(x));function X(L){if(L)return T(L);D(X)}X()}var gc=function(x,$,T,D){D=D||W;var X=k(T);xo(x,$,function(L,B){X(L,function(q,ae){return q?B(q):B(null,{key:ae,val:L})})},function(L,B){for(var q={},ae=Object.prototype.hasOwnProperty,ke=0;ke<B.length;ke++)if(B[ke]){var fe=B[ke].key,De=B[ke].val;ae.call(q,fe)?q[fe].push(De):q[fe]=[De]}return D(L,q)})},Ly=un(gc,1/0),Xy=un(gc,1),Vy=_y("log");function mc(x,$,T,D){D=be(D||W);var X={},L=k(T);Zs(x,$,function(B,q,ae){L(B,q,function(ke,fe){if(ke)return ae(ke);X[q]=fe,ae()})},function(B){D(B,X)})}var Zy=un(mc,1/0),jy=un(mc,1);function By(x,$){return $ in x}function Fy(x,$){var T=Object.create(null),D=Object.create(null);$=$||ql;var X=k(x),L=f(function(q,ae){var ke=$.apply(null,q);By(T,ke)?S(function(){ae.apply(null,T[ke])}):By(D,ke)?D[ke].push(ae):(D[ke]=[ae],X.apply(null,q.concat(function(){var fe=u(arguments);T[ke]=fe;var De=D[ke];delete D[ke];for(var yt=0,Sn=De.length;yt<Sn;yt++)De[yt].apply(null,fe)})))});return L.memo=T,L.unmemoized=x,L}var Oc;d?Oc=s.nextTick:p?Oc=l:Oc=g;var Uy=O(Oc);function dp(x,$,T){T=T||W;var D=ee($)?[]:{};x($,function(X,L,B){k(X)(function(q,ae){arguments.length>2&&(ae=u(arguments,1)),D[L]=ae,B(q)})},function(X){T(X,D)})}function Wy(x,$){dp(Ki,x,$)}function zy(x,$,T){dp(nc($),x,T)}var pp=function(x,$){var T=k(x);return ky(function(D,X){T(D[0],X)},$,1)},Yy=function(x,$){var T=pp(x,$);return T.push=function(D,X,L){if(L==null&&(L=W),typeof L!="function")throw new Error("task callback must be a function");if(T.started=!0,Ne(D)||(D=[D]),D.length===0)return S(function(){T.drain()});X=X||0;for(var B=T._tasks.head;B&&X>=B.priority;)B=B.next;for(var q=0,ae=D.length;q<ae;q++){var ke={data:D[q],priority:X,callback:L};B?T._tasks.insertBefore(B,ke):T._tasks.push(ke)}S(T.process)},delete T.unshift,T};function qy(x,$){if($=be($||W),!Ne(x))return $(new TypeError("First argument to race must be an array of functions"));if(!x.length)return $();for(var T=0,D=x.length;T<D;T++)k(x[T])($)}function vc(x,$,T,D){var X=u(x).reverse();Ji(X,$,T,D)}function yc(x){var $=k(x);return f(function(D,X){return D.push(function(B,q){if(B)X(null,{error:B});else{var ae;arguments.length<=2?ae=q:ae=u(arguments,1),X(null,{value:ae})}}),$.apply(this,D)})}function Gy(x){var $;return Ne(x)?$=Po(x,yc):($={},Yl(x,function(T,D){$[D]=yc.call(this,T)})),$}function Hy(x,$,T,D){hp(x,$,function(X,L){T(X,function(B,q){L(B,!q)})},D)}var Ky=wo(Hy),gp=ko(Hy),Jy=un(gp,1);function e1(x){return function(){return x}}function Sc(x,$,T){var D=5,X=0,L={times:D,intervalFunc:e1(X)};function B(fe,De){if(typeof De=="object")fe.times=+De.times||D,fe.intervalFunc=typeof De.interval=="function"?De.interval:e1(+De.interval||X),fe.errorFilter=De.errorFilter;else if(typeof De=="number"||typeof De=="string")fe.times=+De||D;else throw new Error("Invalid arguments for async.retry")}if(arguments.length<3&&typeof x=="function"?(T=$||W,$=x):(B(L,x),T=T||W),typeof $!="function")throw new Error("Invalid arguments for async.retry");var q=k($),ae=1;function ke(){q(function(fe){fe&&ae++<L.times&&(typeof L.errorFilter!="function"||L.errorFilter(fe))?setTimeout(ke,L.intervalFunc(ae)):T.apply(null,arguments)})}ke()}var t1=function(x,$){$||($=x,x=null);var T=k($);return f(function(D,X){function L(B){T.apply(null,D.concat(B))}x?Sc(x,L,X):Sc(L,X)})};function n1(x,$){dp(Co,x,$)}var bc=wo(Qo(Boolean,ql)),ta=ko(Qo(Boolean,ql)),wc=un(ta,1);function r1(x,$,T){var D=k($);rc(x,function(L,B){D(L,function(q,ae){if(q)return B(q);B(null,{value:L,criteria:ae})})},function(L,B){if(L)return T(L);T(null,Po(B.sort(X),Iy("value")))});function X(L,B){var q=L.criteria,ae=B.criteria;return q<ae?-1:q>ae?1:0}}function i1(x,$,T){var D=k(x);return f(function(X,L){var B=!1,q;function ae(){var ke=x.name||"anonymous",fe=new Error('Callback function "'+ke+'" timed out.');fe.code="ETIMEDOUT",T&&(fe.info=T),B=!0,L(fe)}X.push(function(){B||(L.apply(null,arguments),clearTimeout(q))}),q=setTimeout(ae,$),D.apply(null,X)})}var LR=Math.ceil,XR=Math.max;function VR(x,$,T,D){for(var X=-1,L=XR(LR(($-x)/(T||1)),0),B=Array(L);L--;)B[D?L:++X]=x,x+=T;return B}function kc(x,$,T,D){var X=k(T);xo(VR(0,x,1),$,X,D)}var s1=un(kc,1/0),o1=un(kc,1);function l1(x,$,T,D){arguments.length<=3&&(D=T,T=$,$=Ne(x)?[]:{}),D=be(D||W);var X=k(T);Ki(x,function(L,B,q){X($,L,B,q)},function(L){D(L,$)})}function a1(x,$){var T=null,D;$=$||W,Kl(x,function(X,L){k(X)(function(B,q){arguments.length>2?D=u(arguments,1):D=q,T=B,L(!B)})},function(){$(T,D)})}function u1(x){return function(){return(x.unmemoized||x).apply(null,arguments)}}function mp(x,$,T){T=Gr(T||W);var D=k($);if(!x())return T(null);var X=function(L){if(L)return T(L);if(x())return D(X);var B=u(arguments,1);T.apply(null,[null].concat(B))};D(X)}function c1(x,$,T){mp(function(){return!x.apply(this,arguments)},$,T)}var f1=function(x,$){if($=be($||W),!Ne(x))return $(new Error("First argument to waterfall must be an array of functions"));if(!x.length)return $();var T=0;function D(L){var B=k(x[T++]);L.push(Gr(X)),B.apply(null,L)}function X(L){if(L||T===x.length)return $.apply(null,arguments);D(u(arguments,1))}D([])},ZR={apply:c,applyEach:cy,applyEachSeries:fy,asyncify:y,auto:sp,autoInject:by,cargo:xy,compose:Py,concat:Cy,concatLimit:oc,concatSeries:Qy,constant:Ey,detect:lc,detectLimit:Gl,detectSeries:ac,dir:Ty,doDuring:Ry,doUntil:Ay,doWhilst:cp,during:Dy,each:uc,eachLimit:Hl,eachOf:Ki,eachOfLimit:Zs,eachOfSeries:Co,eachSeries:Kl,ensureAsync:fp,every:fc,everyLimit:Jl,everySeries:hc,filter:dc,filterLimit:ea,filterSeries:pc,forever:Ny,groupBy:Ly,groupByLimit:gc,groupBySeries:Xy,log:Vy,map:rc,mapLimit:xo,mapSeries:ip,mapValues:Zy,mapValuesLimit:mc,mapValuesSeries:jy,memoize:Fy,nextTick:Uy,parallel:Wy,parallelLimit:zy,priorityQueue:Yy,queue:pp,race:qy,reduce:Ji,reduceRight:vc,reflect:yc,reflectAll:Gy,reject:Ky,rejectLimit:gp,rejectSeries:Jy,retry:Sc,retryable:t1,seq:up,series:n1,setImmediate:S,some:bc,someLimit:ta,someSeries:wc,sortBy:r1,timeout:i1,times:s1,timesLimit:kc,timesSeries:o1,transform:l1,tryEach:a1,unmemoize:u1,until:c1,waterfall:f1,whilst:mp,all:fc,allLimit:Jl,allSeries:hc,any:bc,anyLimit:ta,anySeries:wc,find:lc,findLimit:Gl,findSeries:ac,forEach:uc,forEachSeries:Kl,forEachLimit:Hl,forEachOf:Ki,forEachOfSeries:Co,forEachOfLimit:Zs,inject:Ji,foldl:Ji,foldr:vc,select:dc,selectLimit:ea,selectSeries:pc,wrapSync:y};a.default=ZR,a.apply=c,a.applyEach=cy,a.applyEachSeries=fy,a.asyncify=y,a.auto=sp,a.autoInject=by,a.cargo=xy,a.compose=Py,a.concat=Cy,a.concatLimit=oc,a.concatSeries=Qy,a.constant=Ey,a.detect=lc,a.detectLimit=Gl,a.detectSeries=ac,a.dir=Ty,a.doDuring=Ry,a.doUntil=Ay,a.doWhilst=cp,a.during=Dy,a.each=uc,a.eachLimit=Hl,a.eachOf=Ki,a.eachOfLimit=Zs,a.eachOfSeries=Co,a.eachSeries=Kl,a.ensureAsync=fp,a.every=fc,a.everyLimit=Jl,a.everySeries=hc,a.filter=dc,a.filterLimit=ea,a.filterSeries=pc,a.forever=Ny,a.groupBy=Ly,a.groupByLimit=gc,a.groupBySeries=Xy,a.log=Vy,a.map=rc,a.mapLimit=xo,a.mapSeries=ip,a.mapValues=Zy,a.mapValuesLimit=mc,a.mapValuesSeries=jy,a.memoize=Fy,a.nextTick=Uy,a.parallel=Wy,a.parallelLimit=zy,a.priorityQueue=Yy,a.queue=pp,a.race=qy,a.reduce=Ji,a.reduceRight=vc,a.reflect=yc,a.reflectAll=Gy,a.reject=Ky,a.rejectLimit=gp,a.rejectSeries=Jy,a.retry=Sc,a.retryable=t1,a.seq=up,a.series=n1,a.setImmediate=S,a.some=bc,a.someLimit=ta,a.someSeries=wc,a.sortBy=r1,a.timeout=i1,a.times=s1,a.timesLimit=kc,a.timesSeries=o1,a.transform=l1,a.tryEach=a1,a.unmemoize=u1,a.until=c1,a.waterfall=f1,a.whilst=mp,a.all=fc,a.allLimit=Jl,a.allSeries=hc,a.any=bc,a.anyLimit=ta,a.anySeries=wc,a.find=lc,a.findLimit=Gl,a.findSeries=ac,a.forEach=uc,a.forEachSeries=Kl,a.forEachLimit=Hl,a.forEachOf=Ki,a.forEachOfSeries=Co,a.forEachOfLimit=Zs,a.inject=Ji,a.foldl=Ji,a.foldr=vc,a.select=dc,a.selectLimit=ea,a.selectSeries=pc,a.wrapSync=y,Object.defineProperty(a,"__esModule",{value:!0})})}).call(this)}).call(this,n("_process"),typeof h1<"u"?h1:typeof self<"u"?self:typeof window<"u"?window:{},n("timers").setImmediate)},{_process:9,timers:33}],2:[function(n,r,i){var s=typeof Reflect=="object"?Reflect:null,o=s&&typeof s.apply=="function"?s.apply:function(P,E,A){return Function.prototype.apply.call(P,E,A)},l;s&&typeof s.ownKeys=="function"?l=s.ownKeys:Object.getOwnPropertySymbols?l=function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:l=function(P){return Object.getOwnPropertyNames(P)};function a(w){console&&console.warn&&console.warn(w)}var u=Number.isNaN||function(P){return P!==P};function c(){c.init.call(this)}r.exports=c,r.exports.once=Q,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var f=10;function h(w){if(typeof w!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(w){if(typeof w!="number"||w<0||u(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");f=w}}),c.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(P){if(typeof P!="number"||P<0||u(P))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+P+".");return this._maxListeners=P,this};function p(w){return w._maxListeners===void 0?c.defaultMaxListeners:w._maxListeners}c.prototype.getMaxListeners=function(){return p(this)},c.prototype.emit=function(P){for(var E=[],A=1;A<arguments.length;A++)E.push(arguments[A]);var M=P==="error",N=this._events;if(N!==void 0)M=M&&N.error===void 0;else if(!M)return!1;if(M){var z;if(E.length>0&&(z=E[0]),z instanceof Error)throw z;var re=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw re.context=z,re}var se=N[P];if(se===void 0)return!1;if(typeof se=="function")o(se,this,E);else for(var V=se.length,G=y(se,V),A=0;A<V;++A)o(G[A],this,E);return!0};function d(w,P,E,A){var M,N,z;if(h(E),N=w._events,N===void 0?(N=w._events=Object.create(null),w._eventsCount=0):(N.newListener!==void 0&&(w.emit("newListener",P,E.listener?E.listener:E),N=w._events),z=N[P]),z===void 0)z=N[P]=E,++w._eventsCount;else if(typeof z=="function"?z=N[P]=A?[E,z]:[z,E]:A?z.unshift(E):z.push(E),M=p(w),M>0&&z.length>M&&!z.warned){z.warned=!0;var re=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");re.name="MaxListenersExceededWarning",re.emitter=w,re.type=P,re.count=z.length,a(re)}return w}c.prototype.addListener=function(P,E){return d(this,P,E,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(P,E){return d(this,P,E,!0)};function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function O(w,P,E){var A={fired:!1,wrapFn:void 0,target:w,type:P,listener:E},M=g.bind(A);return M.listener=E,A.wrapFn=M,M}c.prototype.once=function(P,E){return h(E),this.on(P,O(this,P,E)),this},c.prototype.prependOnceListener=function(P,E){return h(E),this.prependListener(P,O(this,P,E)),this},c.prototype.removeListener=function(P,E){var A,M,N,z,re;if(h(E),M=this._events,M===void 0)return this;if(A=M[P],A===void 0)return this;if(A===E||A.listener===E)--this._eventsCount===0?this._events=Object.create(null):(delete M[P],M.removeListener&&this.emit("removeListener",P,A.listener||E));else if(typeof A!="function"){for(N=-1,z=A.length-1;z>=0;z--)if(A[z]===E||A[z].listener===E){re=A[z].listener,N=z;break}if(N<0)return this;N===0?A.shift():b(A,N),A.length===1&&(M[P]=A[0]),M.removeListener!==void 0&&this.emit("removeListener",P,re||E)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(P){var E,A,M;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[P]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[P]),this;if(arguments.length===0){var N=Object.keys(A),z;for(M=0;M<N.length;++M)z=N[M],z!=="removeListener"&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(E=A[P],typeof E=="function")this.removeListener(P,E);else if(E!==void 0)for(M=E.length-1;M>=0;M--)this.removeListener(P,E[M]);return this};function m(w,P,E){var A=w._events;if(A===void 0)return[];var M=A[P];return M===void 0?[]:typeof M=="function"?E?[M.listener||M]:[M]:E?C(M):y(M,M.length)}c.prototype.listeners=function(P){return m(this,P,!0)},c.prototype.rawListeners=function(P){return m(this,P,!1)},c.listenerCount=function(w,P){return typeof w.listenerCount=="function"?w.listenerCount(P):S.call(w,P)},c.prototype.listenerCount=S;function S(w){var P=this._events;if(P!==void 0){var E=P[w];if(typeof E=="function")return 1;if(E!==void 0)return E.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function y(w,P){for(var E=new Array(P),A=0;A<P;++A)E[A]=w[A];return E}function b(w,P){for(;P+1<w.length;P++)w[P]=w[P+1];w.pop()}function C(w){for(var P=new Array(w.length),E=0;E<P.length;++E)P[E]=w[E].listener||w[E];return P}function Q(w,P){return new Promise(function(E,A){function M(z){w.removeListener(P,N),A(z)}function N(){typeof w.removeListener=="function"&&w.removeListener("error",M),E([].slice.call(arguments))}k(w,P,N,{once:!0}),P!=="error"&&_(w,M,{once:!0})})}function _(w,P,E){typeof w.on=="function"&&k(w,"error",P,E)}function k(w,P,E,A){if(typeof w.on=="function")A.once?w.once(P,E):w.on(P,E);else if(typeof w.addEventListener=="function")w.addEventListener(P,function M(N){A.once&&w.removeEventListener(P,M),E(N)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w)}},{}],3:[function(n,r,i){var s=Array.isArray,o=Object.keys,l=Object.prototype.hasOwnProperty;r.exports=function a(u,c){if(u===c)return!0;if(u&&c&&typeof u=="object"&&typeof c=="object"){var f=s(u),h=s(c),p,d,g;if(f&&h){if(d=u.length,d!=c.length)return!1;for(p=d;p--!==0;)if(!a(u[p],c[p]))return!1;return!0}if(f!=h)return!1;var O=u instanceof Date,m=c instanceof Date;if(O!=m)return!1;if(O&&m)return u.getTime()==c.getTime();var S=u instanceof RegExp,y=c instanceof RegExp;if(S!=y)return!1;if(S&&y)return u.toString()==c.toString();var b=o(u);if(d=b.length,d!==o(c).length)return!1;for(p=d;p--!==0;)if(!l.call(c,b[p]))return!1;for(p=d;p--!==0;)if(g=b[p],!a(u[g],c[g]))return!1;return!0}return u!==u&&c!==c}},{}],4:[function(n,r,i){var s=r.exports=function(o,l){if(l||(l=16),o===void 0&&(o=128),o<=0)return"0";for(var a=Math.log(Math.pow(2,o))/Math.log(l),u=2;a===1/0;u*=2)a=Math.log(Math.pow(2,o/u))/Math.log(l)*u;for(var c=a-Math.floor(a),f="",u=0;u<Math.floor(a);u++){var h=Math.floor(Math.random()*l).toString(l);f=h+f}if(c){var p=Math.pow(l,c),h=Math.floor(Math.random()*p).toString(l);f=h+f}var d=parseInt(f,l);return d!==1/0&&d>=Math.pow(2,o)?s(o,l):f};s.rack=function(o,l,a){var u=function(f){var h=0;do{if(h++>10)if(a)o+=a;else throw new Error("too many ID collisions, use more bits");var p=s(o,l)}while(Object.hasOwnProperty.call(c,p));return c[p]=f,p},c=u.hats={};return u.get=function(f){return u.hats[f]},u.set=function(f,h){return u.hats[f]=h,u},u.bits=o||128,u.base=l||16,u}},{}],5:[function(n,r,i){r.exports=s;function s(o,l,a,u){var c=function(h,p,d,g){l(d,h,p,"left"),l(g,p,h,"right")},f=o.transformX=function(h,p){a(h),a(p);for(var d=[],g=0;g<p.length;g++){for(var O=p[g],m=[],S=0;S<h.length;){var y=[];if(c(h[S],O,m,y),S++,y.length===1)O=y[0];else if(y.length===0){for(var b=S;b<h.length;b++)u(m,h[b]);O=null;break}else{for(var C=f(h.slice(S),y),Q=0;Q<C[0].length;Q++)u(m,C[0][Q]);for(var _=0;_<C[1].length;_++)u(d,C[1][_]);O=null;break}}O!=null&&u(d,O),h=m}return[h,d]};o.transform=function(h,p,d){if(!(d==="left"||d==="right"))throw new Error("type must be 'left' or 'right'");return p.length===0?h:h.length===1&&p.length===1?l([],h[0],p[0],d):d==="left"?f(h,p)[0]:f(p,h)[1]}}},{}],6:[function(n,r,i){r.exports={type:n("./json0")}},{"./json0":7}],7:[function(n,r,i){var s=function(d){return Object.prototype.toString.call(d)=="[object Array]"},o=function(d){return!!d&&d.constructor===Object},l=function(d){return JSON.parse(JSON.stringify(d))},a={name:"json0",uri:"http://sharejs.org/types/JSONv0"},u={};a.registerSubtype=function(d){u[d.name]=d},a.create=function(d){return d===void 0?null:l(d)},a.invertComponent=function(d){var g={p:d.p};return d.t&&u[d.t]&&(g.t=d.t,g.o=u[d.t].invert(d.o)),d.si!==void 0&&(g.sd=d.si),d.sd!==void 0&&(g.si=d.sd),d.oi!==void 0&&(g.od=d.oi),d.od!==void 0&&(g.oi=d.od),d.li!==void 0&&(g.ld=d.li),d.ld!==void 0&&(g.li=d.ld),d.na!==void 0&&(g.na=-d.na),d.lm!==void 0&&(g.lm=d.p[d.p.length-1],g.p=d.p.slice(0,d.p.length-1).concat([d.lm])),g},a.invert=function(d){for(var g=d.slice().reverse(),O=[],m=0;m<g.length;m++)O.push(a.invertComponent(g[m]));return O},a.checkValidOp=function(d){for(var g=0;g<d.length;g++)if(!s(d[g].p))throw new Error("Missing path")},a.checkList=function(d){if(!s(d))throw new Error("Referenced element not a list")},a.checkObj=function(d){if(!o(d))throw new Error("Referenced element not an object (it was "+JSON.stringify(d)+")")};function c(d){d.t="text0";var g={p:d.p.pop()};d.si!=null&&(g.i=d.si),d.sd!=null&&(g.d=d.sd),d.o=[g]}function f(d){d.p.push(d.o[0].p),d.o[0].i!=null&&(d.si=d.o[0].i),d.o[0].d!=null&&(d.sd=d.o[0].d),delete d.t,delete d.o}a.apply=function(d,g){a.checkValidOp(g),g=l(g);for(var O={data:d},m=0;m<g.length;m++){var S=g[m];(S.si!=null||S.sd!=null)&&c(S);for(var y=null,b=O,C="data",Q=0;Q<S.p.length;Q++){var _=S.p[Q];if(y=b,b=b[C],C=_,y==null)throw new Error("Path invalid")}if(S.t&&S.o!==void 0&&u[S.t])b[C]=u[S.t].apply(b[C],S.o);else if(S.na!==void 0){if(typeof b[C]!="number")throw new Error("Referenced element not a number");b[C]+=S.na}else if(S.li!==void 0&&S.ld!==void 0)a.checkList(b),b[C]=S.li;else if(S.li!==void 0)a.checkList(b),b.splice(C,0,S.li);else if(S.ld!==void 0)a.checkList(b),b.splice(C,1);else if(S.lm!==void 0){if(a.checkList(b),S.lm!=C){var k=b[C];b.splice(C,1),b.splice(S.lm,0,k)}}else if(S.oi!==void 0)a.checkObj(b),b[C]=S.oi;else if(S.od!==void 0)a.checkObj(b),delete b[C];else throw new Error("invalid / missing instruction in op")}return O.data},a.shatter=function(d){for(var g=[],O=0;O<d.length;O++)g.push([d[O]]);return g},a.incrementalApply=function(d,g,O){for(var m=0;m<g.length;m++){var S=[g[m]];d=a.apply(d,S),O(S,d)}return d};var h=a.pathMatches=function(d,g,O){if(d.length!=g.length)return!1;for(var m=0;m<d.length;m++)if(d[m]!==g[m]&&(!O||m!==d.length-1))return!1;return!0};a.append=function(d,g){if(g=l(g),d.length===0){d.push(g);return}var O=d[d.length-1];if((g.si!=null||g.sd!=null)&&(O.si!=null||O.sd!=null)&&(c(g),c(O)),h(g.p,O.p))if(g.t&&O.t&&g.t===O.t&&u[g.t]){if(O.o=u[g.t].compose(O.o,g.o),g.si!=null||g.sd!=null){for(var m=g.p,S=0;S<O.o.length-1;S++)g.o=[O.o.pop()],g.p=m.slice(),f(g),d.push(g);f(O)}}else O.na!=null&&g.na!=null?d[d.length-1]={p:O.p,na:O.na+g.na}:O.li!==void 0&&g.li===void 0&&g.ld===O.li?O.ld!==void 0?delete O.li:d.pop():O.od!==void 0&&O.oi===void 0&&g.oi!==void 0&&g.od===void 0?O.oi=g.oi:O.oi!==void 0&&g.od!==void 0?g.oi!==void 0?O.oi=g.oi:O.od!==void 0?delete O.oi:d.pop():g.lm!==void 0&&g.p[g.p.length-1]===g.lm||d.push(g);else(g.si!=null||g.sd!=null)&&(O.si!=null||O.sd!=null)&&(f(g),f(O)),d.push(g)},a.compose=function(d,g){a.checkValidOp(d),a.checkValidOp(g);for(var O=l(d),m=0;m<g.length;m++)a.append(O,g[m]);return O},a.normalize=function(d){var g=[];d=s(d)?d:[d];for(var O=0;O<d.length;O++){var m=d[O];m.p==null&&(m.p=[]),a.append(g,m)}return g},a.commonLengthForOps=function(d,g){var O=d.p.length,m=g.p.length;if((d.na!=null||d.t)&&O++,(g.na!=null||g.t)&&m++,O===0)return-1;if(m===0)return null;O--,m--;for(var S=0;S<O;S++){var y=d.p[S];if(S>=m||y!==g.p[S])return null}return O},a.canOpAffectPath=function(d,g){return a.commonLengthForOps({p:g},d)!=null},a.transformComponent=function(d,g,O,m){g=l(g);var S=a.commonLengthForOps(O,g),y=a.commonLengthForOps(g,O),b=g.p.length,C=O.p.length;if((g.na!=null||g.t)&&b++,(O.na!=null||O.t)&&C++,y!=null&&C>b&&g.p[y]==O.p[y]){if(g.ld!==void 0){var Q=l(O);Q.p=Q.p.slice(b),g.ld=a.apply(l(g.ld),[Q])}else if(g.od!==void 0){var Q=l(O);Q.p=Q.p.slice(b),g.od=a.apply(l(g.od),[Q])}}if(S!=null){var _=b==C,Q=O;if((g.si!=null||g.sd!=null)&&(O.si!=null||O.sd!=null)&&(c(g),Q=l(O),c(Q)),Q.t&&u[Q.t]){if(g.t&&g.t===Q.t){var k=u[g.t].transform(g.o,Q.o,m);if(g.si!=null||g.sd!=null)for(var w=g.p,P=0;P<k.length;P++)g.o=[k[P]],g.p=w.slice(),f(g),a.append(d,g);else(!s(k)||k.length>0)&&(g.o=k,a.append(d,g));return d}}else if(O.na===void 0){if(O.li!==void 0&&O.ld!==void 0){if(O.p[S]===g.p[S])if(_){if(g.ld!==void 0)if(g.li!==void 0&&m==="left")g.ld=l(O.li);else return d}else return d}else if(O.li!==void 0)g.li!==void 0&&g.ld===void 0&&_&&g.p[S]===O.p[S]?m==="right"&&g.p[S]++:O.p[S]<=g.p[S]&&g.p[S]++,g.lm!==void 0&&_&&O.p[S]<=g.lm&&g.lm++;else if(O.ld!==void 0){if(g.lm!==void 0&&_){if(O.p[S]===g.p[S])return d;var w=O.p[S],E=g.p[S],A=g.lm;(w<A||w===A&&E<A)&&g.lm--}if(O.p[S]<g.p[S])g.p[S]--;else if(O.p[S]===g.p[S]){if(C<b)return d;if(g.ld!==void 0)if(g.li!==void 0)delete g.ld;else return d}}else if(O.lm!==void 0)if(g.lm!==void 0&&b===C){var E=g.p[S],A=g.lm,M=O.p[S],N=O.lm;if(M!==N)if(E===M)if(m==="left")g.p[S]=N,E===A&&(g.lm=N);else return d;else E>M&&g.p[S]--,E>N?g.p[S]++:E===N&&M>N&&(g.p[S]++,E===A&&g.lm++),(A>M||A===M&&A>E)&&g.lm--,A>N?g.lm++:A===N&&(N>M&&A>E||N<M&&A<E?m==="right"&&g.lm++:A>E?g.lm++:A===M&&g.lm--)}else if(g.li!==void 0&&g.ld===void 0&&_){var E=O.p[S],A=O.lm;w=g.p[S],w>E&&g.p[S]--,w>A&&g.p[S]++}else{var E=O.p[S],A=O.lm;w=g.p[S],w===E?g.p[S]=A:(w>E&&g.p[S]--,(w>A||w===A&&E>A)&&g.p[S]++)}else if(O.oi!==void 0&&O.od!==void 0){if(g.p[S]===O.p[S])if(g.oi!==void 0&&_){if(m==="right")return d;g.od=O.oi}else return d}else if(O.oi!==void 0){if(g.oi!==void 0&&g.p[S]===O.p[S])if(m==="left")a.append(d,{p:g.p,od:O.oi});else return d}else if(O.od!==void 0&&g.p[S]==O.p[S]){if(!_)return d;if(g.oi!==void 0)delete g.od;else return d}}}return a.append(d,g),d},n("./bootstrapTransform")(a,a.transformComponent,a.checkValidOp,a.append);var p=n("./text0");a.registerSubtype(p),r.exports=a},{"./bootstrapTransform":5,"./text0":8}],8:[function(n,r,i){var s=r.exports={name:"text0",uri:"http://sharejs.org/types/textv0",create:function(p){if(p!=null&&typeof p!="string")throw new Error("Initial data must be a string");return p||""}},o=function(p,d,g){return p.slice(0,d)+g+p.slice(d)},l=function(p){if(typeof p.p!="number")throw new Error("component missing position field");if(typeof p.i=="string"==(typeof p.d=="string"))throw new Error("component needs an i or d field");if(p.p<0)throw new Error("position cannot be negative")},a=function(p){for(var d=0;d<p.length;d++)l(p[d])};s.apply=function(p,d){var g;a(d);for(var O=0;O<d.length;O++){var m=d[O];if(m.i!=null)p=o(p,m.p,m.i);else{if(g=p.slice(m.p,m.p+m.d.length),m.d!==g)throw new Error("Delete component '"+m.d+"' does not match deleted text '"+g+"'");p=p.slice(0,m.p)+p.slice(m.p+m.d.length)}}return p};var u=s._append=function(p,d){if(!(d.i===""||d.d===""))if(p.length===0)p.push(d);else{var g=p[p.length-1];g.i!=null&&d.i!=null&&g.p<=d.p&&d.p<=g.p+g.i.length?p[p.length-1]={i:o(g.i,d.p-g.p,d.i),p:g.p}:g.d!=null&&d.d!=null&&d.p<=g.p&&g.p<=d.p+d.d.length?p[p.length-1]={d:o(d.d,g.p-d.p,g.d),p:d.p}:p.push(d)}};s.compose=function(p,d){a(p),a(d);for(var g=p.slice(),O=0;O<d.length;O++)u(g,d[O]);return g},s.normalize=function(p){var d=[];(p.i!=null||p.p!=null)&&(p=[p]);for(var g=0;g<p.length;g++){var O=p[g];O.p==null&&(O.p=0),u(d,O)}return d};var c=function(p,d,g){return d.i!=null?d.p<p||d.p===p&&g?p+d.i.length:p:p<=d.p?p:p<=d.p+d.d.length?d.p:p-d.d.length};s.transformCursor=function(p,d,g){for(var O=g==="right",m=0;m<d.length;m++)p=c(p,d[m],O);return p};var f=s._tc=function(p,d,g,O){if(l(d),l(g),d.i!=null)u(p,{i:d.i,p:c(d.p,g,O==="right")});else if(g.i!=null){var m=d.d;d.p<g.p&&(u(p,{d:m.slice(0,g.p-d.p),p:d.p}),m=m.slice(g.p-d.p)),m!==""&&u(p,{d:m,p:d.p+g.i.length})}else if(d.p>=g.p+g.d.length)u(p,{d:d.d,p:d.p-g.d.length});else if(d.p+d.d.length<=g.p)u(p,d);else{var S={d:"",p:d.p};d.p<g.p&&(S.d=d.d.slice(0,g.p-d.p)),d.p+d.d.length>g.p+g.d.length&&(S.d+=d.d.slice(g.p+g.d.length-d.p));var y=Math.max(d.p,g.p),b=Math.min(d.p+d.d.length,g.p+g.d.length),C=d.d.slice(y-d.p,b-d.p),Q=g.d.slice(y-g.p,b-g.p);if(C!==Q)throw new Error("Delete ops delete different text in the same region of the document");S.d!==""&&(S.p=c(S.p,g),u(p,S))}return p},h=function(p){return p.i!=null?{d:p.i,p:p.p}:{i:p.d,p:p.p}};s.invert=function(p){p=p.slice().reverse();for(var d=0;d<p.length;d++)p[d]=h(p[d]);return p},n("./bootstrapTransform")(s,f,a,u)},{"./bootstrapTransform":5}],9:[function(n,r,i){var s=r.exports={},o,l;function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?o=setTimeout:o=a}catch{o=a}try{typeof clearTimeout=="function"?l=clearTimeout:l=u}catch{l=u}})();function c(b){if(o===setTimeout)return setTimeout(b,0);if((o===a||!o)&&setTimeout)return o=setTimeout,setTimeout(b,0);try{return o(b,0)}catch{try{return o.call(null,b,0)}catch{return o.call(this,b,0)}}}function f(b){if(l===clearTimeout)return clearTimeout(b);if((l===u||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(b);try{return l(b)}catch{try{return l.call(null,b)}catch{return l.call(this,b)}}}var h=[],p=!1,d,g=-1;function O(){!p||!d||(p=!1,d.length?h=d.concat(h):g=-1,h.length&&m())}function m(){if(!p){var b=c(O);p=!0;for(var C=h.length;C;){for(d=h,h=[];++g<C;)d&&d[g].run();g=-1,C=h.length}d=null,p=!1,f(b)}}s.nextTick=function(b){var C=new Array(arguments.length-1);if(arguments.length>1)for(var Q=1;Q<arguments.length;Q++)C[Q-1]=arguments[Q];h.push(new S(b,C)),h.length===1&&!p&&c(m)};function S(b,C){this.fun=b,this.array=C}S.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={};function y(){}s.on=y,s.addListener=y,s.once=y,s.off=y,s.removeListener=y,s.removeAllListeners=y,s.emit=y,s.prependListener=y,s.prependOnceListener=y,s.listeners=function(b){return[]},s.binding=function(b){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(b){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],10:[function(n,r,i){var s=n("./doc"),o=n("./query"),l=n("./presence/presence"),a=n("./presence/doc-presence"),u=n("./snapshot-request/snapshot-version-request"),c=n("./snapshot-request/snapshot-timestamp-request"),f=n("../emitter"),h=n("../error"),p=n("../message-actions").ACTIONS,d=n("../types"),g=n("../util"),O=n("../logger"),m=n("./presence/doc-presence-emitter"),S=h.CODES;function y(k){return k.readyState===0||k.readyState===1?"connecting":"disconnected"}r.exports=b;function b(k){f.EventEmitter.call(this),this.collections={},this.nextQueryId=1,this.nextSnapshotRequestId=1,this.queries={},this._presences={},this._docPresenceEmitter=new m,this._snapshotRequests={},this.seq=1,this._presenceSeq=1,this.id=null,this.agent=null,this.debug=!1,this.state=y(k),this.bindToSocket(k)}f.mixin(b),b.prototype.bindToSocket=function(k){this.socket&&(this.socket.close(),this.socket.onmessage=null,this.socket.onopen=null,this.socket.onerror=null,this.socket.onclose=null),this.socket=k;var w=y(k);this._setState(w),this.canSend=!1;var P=this;k.onmessage=function(E){try{var A=typeof E.data=="string"?JSON.parse(E.data):E.data}catch{O.warn("Failed to parse message",E);return}P.debug&&O.info("RECV",JSON.stringify(A));var M={data:A};if(P.emit("receive",M),!!M.data)try{P.handleMessage(M.data)}catch(N){g.nextTick(function(){P.emit("error",N)})}},k.readyState===1&&P._initializeHandshake(),k.onopen=function(){P._setState("connecting"),P._initializeHandshake()},k.onerror=function(E){P.emit("connection error",E)},k.onclose=function(E){E==="closed"||E==="Closed"?P._setState("closed",E):E==="stopped"||E==="Stopped by server"?P._setState("stopped",E):P._setState("disconnected",E)}},b.prototype.handleMessage=function(k){var w=null;switch(k.error&&(w=C(k.error,k),delete k.error),k.a){case p.initLegacy:return this._handleLegacyInit(k);case p.handshake:return this._handleHandshake(w,k);case p.queryFetch:var P=this.queries[k.id];P&&P._handleFetch(w,k.data,k.extra);return;case p.querySubscribe:var P=this.queries[k.id];P&&P._handleSubscribe(w,k.data,k.extra);return;case p.queryUnsubscribe:return;case p.queryUpdate:var P=this.queries[k.id];if(!P)return;if(w)return P._handleError(w);k.diff&&P._handleDiff(k.diff),k.hasOwnProperty("extra")&&P._handleExtra(k.extra);return;case p.bulkFetch:return this._handleBulkMessage(w,k,"_handleFetch");case p.bulkSubscribe:case p.bulkUnsubscribe:return this._handleBulkMessage(w,k,"_handleSubscribe");case p.snapshotFetch:case p.snapshotFetchByTimestamp:return this._handleSnapshotFetch(w,k);case p.fetch:var E=this.getExisting(k.c,k.d);E&&E._handleFetch(w,k.data);return;case p.subscribe:case p.unsubscribe:var E=this.getExisting(k.c,k.d);E&&E._handleSubscribe(w,k.data);return;case p.op:var E=this.getExisting(k.c,k.d);E&&E._handleOp(w,k);return;case p.presence:return this._handlePresence(w,k);case p.presenceSubscribe:return this._handlePresenceSubscribe(w,k);case p.presenceUnsubscribe:return this._handlePresenceUnsubscribe(w,k);case p.presenceRequest:return this._handlePresenceRequest(w,k);case p.pingPong:return this._handlePingPong(w);default:O.warn("Ignoring unrecognized message",k)}};function C(k,w){var P=new Error(k.message);return P.code=k.code,w&&(P.data=w),P}b.prototype._handleBulkMessage=function(k,w,P){if(w.data)for(var E in w.data){var A=w.data[E],M=this.getExisting(w.c,E);M&&(k?M[P](k):A.error?M[P](C(A.error)):M[P](null,A))}else if(Array.isArray(w.b))for(var N=0;N<w.b.length;N++){var E=w.b[N],M=this.getExisting(w.c,E);M&&M[P](k)}else if(w.b)for(var E in w.b){var M=this.getExisting(w.c,E);M&&M[P](k)}else O.error("Invalid bulk message",w)},b.prototype._reset=function(){this.agent=null},b.prototype._setState=function(k,w){if(this.state!==k){if(k==="connecting"&&this.state!=="disconnected"&&this.state!=="stopped"&&this.state!=="closed"||k==="connected"&&this.state!=="connecting"){var P=new h(S.ERR_CONNECTION_STATE_TRANSITION_INVALID,"Cannot transition directly from "+this.state+" to "+k);return this.emit("error",P)}this.state=k,this.canSend=k==="connected",(k==="disconnected"||k==="stopped"||k==="closed")&&this._reset(),this.startBulk();for(var E in this.queries){var A=this.queries[E];A._onConnectionStateChanged()}for(var M in this.collections){var N=this.collections[M];for(var E in N)N[E]._onConnectionStateChanged()}for(var z in this._presences)this._presences[z]._onConnectionStateChanged();for(var E in this._snapshotRequests){var re=this._snapshotRequests[E];re._onConnectionStateChanged()}this.endBulk(),this.emit(k,w),this.emit("state",k,w)}},b.prototype.startBulk=function(){this.bulk||(this.bulk={})},b.prototype.endBulk=function(){if(this.bulk)for(var k in this.bulk){var w=this.bulk[k];this._sendBulk("f",k,w.f),this._sendBulk("s",k,w.s),this._sendBulk("u",k,w.u)}this.bulk=null},b.prototype._sendBulk=function(k,w,P){if(P){var E=[],A={},M=0,N;for(var z in P){var re=P[z];re==null?E.push(z):(A[z]=re,N=z,M++)}if(E.length===1){var z=E[0];this.send({a:k,c:w,d:z})}else E.length&&this.send({a:"b"+k,c:w,b:E});if(M===1){var se=A[N];this.send({a:k,c:w,d:N,v:se})}else M&&this.send({a:"b"+k,c:w,b:A})}},b.prototype._sendActions=function(k,w,P){if(this._addDoc(w),this.bulk){var E=this.bulk[w.collection]||(this.bulk[w.collection]={}),A=E[k]||(E[k]={}),M=A.hasOwnProperty(w.id);return A[w.id]=P,M}else{var N={a:k,c:w.collection,d:w.id,v:P};this.send(N)}},b.prototype.sendFetch=function(k){return this._sendActions(p.fetch,k,k.version)},b.prototype.sendSubscribe=function(k){return this._sendActions(p.subscribe,k,k.version)},b.prototype.sendUnsubscribe=function(k){return this._sendActions(p.unsubscribe,k)},b.prototype.sendOp=function(k,w){this._addDoc(k);var P={a:p.op,c:k.collection,d:k.id,v:k.version,src:w.src,seq:w.seq,x:{}};"op"in w&&(P.op=w.op),w.create&&(P.create=w.create),w.del&&(P.del=w.del),k.submitSource&&(P.x.source=w.source),this.send(P)},b.prototype.send=function(k){this.debug&&O.info("SEND",JSON.stringify(k)),this.emit("send",k),this.socket.send(JSON.stringify(k))},b.prototype.ping=function(){if(!this.canSend)throw new h(S.ERR_CANNOT_PING_OFFLINE,"Socket must be CONNECTED to ping");var k={a:p.pingPong};this.send(k)},b.prototype.close=function(){this.socket.close()},b.prototype.getExisting=function(k,w){if(this.collections[k])return this.collections[k][w]},b.prototype.get=function(k,w){var P=this.collections[k]||(this.collections[k]={}),E=P[w];return E||(E=P[w]=new s(this,k,w),this.emit("doc",E)),E._wantsDestroy=!1,E},b.prototype._destroyDoc=function(k){k._wantsDestroy&&(g.digAndRemove(this.collections,k.collection,k.id),k.emit("destroy"))},b.prototype._addDoc=function(k){var w=this.collections[k.collection];w||(w=this.collections[k.collection]={}),w[k.id]!==k&&(w[k.id]=k)},b.prototype._createQuery=function(k,w,P,E,A){var M=this.nextQueryId++,N=new o(k,this,M,w,P,E,A);return this.queries[M]=N,N.send(),N},b.prototype._destroyQuery=function(k){delete this.queries[k.id]},b.prototype.createFetchQuery=function(k,w,P,E){return this._createQuery(p.queryFetch,k,w,P,E)},b.prototype.createSubscribeQuery=function(k,w,P,E){return this._createQuery(p.querySubscribe,k,w,P,E)},b.prototype.hasPending=function(){return!!(this._firstDoc(Q)||this._firstQuery(Q)||this._firstSnapshotRequest())};function Q(k){return k.hasPending()}b.prototype.hasWritePending=function(){return!!this._firstDoc(_)};function _(k){return k.hasWritePending()}b.prototype.whenNothingPending=function(k){var w=this._firstDoc(Q);if(w){w.once("nothing pending",this._nothingPendingRetry(k));return}var P=this._firstQuery(Q);if(P){P.once("ready",this._nothingPendingRetry(k));return}var E=this._firstSnapshotRequest();if(E){E.once("ready",this._nothingPendingRetry(k));return}g.nextTick(k)},b.prototype._nothingPendingRetry=function(k){var w=this;return function(){g.nextTick(function(){w.whenNothingPending(k)})}},b.prototype._firstDoc=function(k){for(var w in this.collections){var P=this.collections[w];for(var E in P){var A=P[E];if(k(A))return A}}},b.prototype._firstQuery=function(k){for(var w in this.queries){var P=this.queries[w];if(k(P))return P}},b.prototype._firstSnapshotRequest=function(){for(var k in this._snapshotRequests)return this._snapshotRequests[k]},b.prototype.fetchSnapshot=function(k,w,P,E){typeof P=="function"&&(E=P,P=null);var A=this.nextSnapshotRequestId++,M=new u(this,A,k,w,P,E);this._snapshotRequests[M.requestId]=M,M.send()},b.prototype.fetchSnapshotByTimestamp=function(k,w,P,E){typeof P=="function"&&(E=P,P=null);var A=this.nextSnapshotRequestId++,M=new c(this,A,k,w,P,E);this._snapshotRequests[M.requestId]=M,M.send()},b.prototype._handleSnapshotFetch=function(k,w){var P=this._snapshotRequests[w.id];P&&(delete this._snapshotRequests[w.id],P._handleResponse(k,w))},b.prototype._handleLegacyInit=function(k){if(k.protocolMinor)return this._initializeHandshake();this._initialize(k)},b.prototype._initializeHandshake=function(){this.send({a:p.handshake,id:this.id})},b.prototype._handleHandshake=function(k,w){if(k)return this.emit("error",k);this._initialize(w)},b.prototype._handlePingPong=function(k){if(k)return this.emit("error",k);this.emit("pong")},b.prototype._initialize=function(k){if(this.state==="connecting"){if(k.protocol!==1)return this.emit("error",new h(S.ERR_PROTOCOL_VERSION_NOT_SUPPORTED,"Unsupported protocol version: "+k.protocol));if(d.map[k.type]!==d.defaultType)return this.emit("error",new h(S.ERR_DEFAULT_TYPE_MISMATCH,k.type+" does not match the server default type"));if(typeof k.id!="string")return this.emit("error",new h(S.ERR_CLIENT_ID_BADLY_FORMED,"Client id must be a string"));this.id=k.id,this._setState("connected")}},b.prototype.getPresence=function(k){var w=this,P=g.digOrCreate(this._presences,k,function(){return new l(w,k)});return P._wantsDestroy=!1,P},b.prototype.getDocPresence=function(k,w){var P=a.channel(k,w),E=this,A=g.digOrCreate(this._presences,P,function(){return new a(E,k,w)});return A._wantsDestroy=!1,A},b.prototype._sendPresenceAction=function(k,w,P){this._addPresence(P);var E={a:k,ch:P.channel,seq:w};return this.send(E),E.seq},b.prototype._addPresence=function(k){g.digOrCreate(this._presences,k.channel,function(){return k})},b.prototype._handlePresenceSubscribe=function(k,w){var P=g.dig(this._presences,w.ch);P&&P._handleSubscribe(k,w.seq)},b.prototype._handlePresenceUnsubscribe=function(k,w){var P=g.dig(this._presences,w.ch);P&&P._handleUnsubscribe(k,w.seq)},b.prototype._handlePresence=function(k,w){var P=g.dig(this._presences,w.ch);P&&P._receiveUpdate(k,w)},b.prototype._handlePresenceRequest=function(k,w){var P=g.dig(this._presences,w.ch);P&&P._broadcastAllLocalPresence(k,w)}},{"../emitter":24,"../error":25,"../logger":26,"../message-actions":28,"../types":31,"../util":32,"./doc":11,"./presence/doc-presence":14,"./presence/doc-presence-emitter":13,"./presence/presence":17,"./query":20,"./snapshot-request/snapshot-timestamp-request":22,"./snapshot-request/snapshot-version-request":23}],11:[function(n,r,i){var s=n("../emitter"),o=n("../logger"),l=n("../error"),a=n("../types"),u=n("../util"),c=u.clone,f=n("fast-deep-equal"),h=n("../message-actions").ACTIONS,p=l.CODES;r.exports=d;function d(y,b,C){s.EventEmitter.call(this),this.connection=y,this.collection=b,this.id=C,this.version=null,this.type=null,this.data=void 0,this.inflightFetch=[],this.inflightSubscribe=null,this.pendingFetch=[],this.pendingSubscribe=[],this.subscribed=!1,this.wantSubscribe=!1,this._wantsDestroy=!1,this.inflightOp=null,this.pendingOps=[],this.type=null,this.applyStack=null,this.preventCompose=!1,this.submitSource=!1,this.paused=!1,this._dataStateVersion=0}s.mixin(d),d.prototype.destroy=function(y){this._wantsDestroy=!0;var b=this;b.whenNothingPending(function(){b.wantSubscribe?b.unsubscribe(function(C){if(C)return y?y(C):b.emit("error",C);b.connection._destroyDoc(b),y&&y()}):(b.connection._destroyDoc(b),y&&y())})},d.prototype._setType=function(y){if(typeof y=="string"&&(y=a.map[y]),y)this.type=y;else if(y===null)this.type=y,this._setData(void 0);else{var b=new l(p.ERR_DOC_TYPE_NOT_RECOGNIZED,"Missing type "+y);return this.emit("error",b)}},d.prototype._setData=function(y){this.data=y,this._dataStateVersion++},d.prototype.ingestSnapshot=function(y,b){if(!y)return b&&b();if(typeof y.v!="number"){var C=new l(p.ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION,"Missing version in ingested snapshot. "+this.collection+"."+this.id);return b?b(C):this.emit("error",C)}if(this.type||this.hasWritePending()){if(this.version==null){if(this.hasWritePending())return b&&this.once("no write pending",b);var C=new l(p.ERR_DOC_MISSING_VERSION,"Cannot ingest snapshot in doc with null version. "+this.collection+"."+this.id);return b?b(C):this.emit("error",C)}return y.v>this.version?this.fetch(b):b&&b()}if(this.version>y.v)return b&&b();this.version=y.v;var Q=y.type===void 0?a.defaultType:y.type;this._setType(Q),this._setData(this.type&&this.type.deserialize?this.type.deserialize(y.data):y.data),this.emit("load"),b&&b()},d.prototype.whenNothingPending=function(y){var b=this;u.nextTick(function(){if(b.hasPending()){b.once("nothing pending",y);return}y()})},d.prototype.hasPending=function(){return!!(this.inflightOp||this.pendingOps.length||this.inflightFetch.length||this.inflightSubscribe||this.pendingFetch.length||this.pendingSubscribe.length)},d.prototype.hasWritePending=function(){return!!(this.inflightOp||this.pendingOps.length)},d.prototype._emitNothingPending=function(){this.hasWritePending()||(this.emit("no write pending"),!this.hasPending()&&this.emit("nothing pending"))},d.prototype._emitResponseError=function(y,b){if(y&&y.code===p.ERR_SNAPSHOT_READ_SILENT_REJECTION){this.wantSubscribe=!1,b&&b(),this._emitNothingPending();return}if(b){b(y),this._emitNothingPending();return}this._emitNothingPending(),this.emit("error",y)},d.prototype._handleFetch=function(y,b){var C=this.pendingFetch;this.pendingFetch=[];var Q=this.inflightFetch.shift();if(Q&&C.push(Q),C.length&&(Q=function(_){u.callEach(C,_)}),y)return this._emitResponseError(y,Q);this.ingestSnapshot(b,Q),this._emitNothingPending()},d.prototype._handleSubscribe=function(y,b){var C=this.inflightSubscribe;this.inflightSubscribe=null;var Q=this.pendingFetch;this.pendingFetch=[],C.callback&&Q.push(C.callback);var _;if(Q.length&&(_=function(k){u.callEach(Q,k)}),y)return this._emitResponseError(y,_);this.subscribed=C.wantSubscribe,this.subscribed?this.ingestSnapshot(b,_):_&&_(),this._emitNothingPending(),this._flushSubscribe()},d.prototype._handleOp=function(y,b){if(y)return this.inflightOp?(y.code===p.ERR_OP_SUBMIT_REJECTED&&(y=null),this._rollback(y)):this.emit("error",y);if(this.inflightOp&&b.src===this.inflightOp.src&&b.seq===this.inflightOp.seq){this._opAcknowledged(b);return}if(this.version==null||b.v>this.version){this.fetch();return}if(!(b.v<this.version)){if(this.inflightOp){var C=S(this.inflightOp,b);if(C)return this._hardRollback(C)}for(var Q=0;Q<this.pendingOps.length;Q++){var C=S(this.pendingOps[Q],b);if(C)return this._hardRollback(C)}this.version++;try{this._otApply(b,!1)}catch(_){return this._hardRollback(_)}}},d.prototype._onConnectionStateChanged=function(){this.connection.canSend?(this.flush(),this._resubscribe()):(this.inflightOp&&(this.pendingOps.unshift(this.inflightOp),this.inflightOp=null),this.subscribed=!1,this.inflightSubscribe&&(this.inflightSubscribe.wantSubscribe?(this.pendingSubscribe.unshift(this.inflightSubscribe),this.inflightSubscribe=null):this._handleSubscribe()),this.inflightFetch.length&&(this.pendingFetch=this.pendingFetch.concat(this.inflightFetch),this.inflightFetch.length=0))},d.prototype._resubscribe=function(){if(!this.pendingSubscribe.length&&this.wantSubscribe)return this.subscribe();var y=this.pendingSubscribe.some(function(b){return b.wantSubscribe});!y&&this.pendingFetch.length&&this.fetch(),this._flushSubscribe()},d.prototype.fetch=function(y){if(this.connection.canSend){var b=this.connection.sendFetch(this);g(this.inflightFetch,b,y);return}this.pendingFetch.push(y)},d.prototype.subscribe=function(y){var b=!0;this._queueSubscribe(b,y)},d.prototype.unsubscribe=function(y){var b=!1;this._queueSubscribe(b,y)},d.prototype._queueSubscribe=function(y,b){var C=this.pendingSubscribe[this.pendingSubscribe.length-1]||this.inflightSubscribe,Q=C&&C.wantSubscribe===y;if(Q){C.callback=O([C.callback,b]);return}this.pendingSubscribe.push({wantSubscribe:!!y,callback:b}),this._flushSubscribe()},d.prototype._flushSubscribe=function(){if(!(this.inflightSubscribe||!this.pendingSubscribe.length)){if(this.connection.canSend){this.inflightSubscribe=this.pendingSubscribe.shift(),this.wantSubscribe=this.inflightSubscribe.wantSubscribe,this.wantSubscribe?this.connection.sendSubscribe(this):(this.subscribed=!1,this.connection.sendUnsubscribe(this));return}if(!this.pendingSubscribe[0].wantSubscribe){this.inflightSubscribe=this.pendingSubscribe.shift();var y=this;u.nextTick(function(){y._handleSubscribe()})}}};function g(y,b,C){if(b){var Q=y.pop();y.push(function(_){Q&&Q(_),C&&C(_)})}else y.push(C)}function O(y){return y=y.filter(u.truthy),y.length?function(b){u.callEach(y,b)}:null}d.prototype.flush=function(){!this.connection.canSend||this.inflightOp||!this.paused&&this.pendingOps.length&&this._sendOp()};function m(y){delete y.op,delete y.create,delete y.del}function S(y,b){if(y.del)return m(b);if(b.del)return new l(p.ERR_DOC_WAS_DELETED,"Document was deleted");if(b.create)return new l(p.ERR_DOC_ALREADY_CREATED,"Document already created");if("op"in b){if(y.create)return new l(p.ERR_DOC_ALREADY_CREATED,"Document already created");if(y.type.transformX){var C=y.type.transformX(y.op,b.op);y.op=C[0],b.op=C[1]}else{var Q=y.type.transform(y.op,b.op,"left"),_=y.type.transform(b.op,y.op,"right");y.op=Q,b.op=_}}}d.prototype._otApply=function(y,b){if("op"in y){if(!this.type)throw new l(p.ERR_DOC_DOES_NOT_EXIST,"Cannot apply op to uncreated document. "+this.collection+"."+this.id);if(this.emit("before op batch",y.op,b),!b&&this.type===a.defaultType&&y.op.length>1){this.applyStack||(this.applyStack=[]);for(var C=this.applyStack.length,Q=0;Q<y.op.length;Q++){var _=y.op[Q],k={op:[_]};this.emit("before op",k.op,b,y.src);for(var w=C;w<this.applyStack.length;w++){var P=S(this.applyStack[w],k);if(P)return this._hardRollback(P)}this._setData(this.type.apply(this.data,k.op)),this.emit("op",k.op,b,y.src)}this.emit("op batch",y.op,b),this._popApplyStack(C);return}this.emit("before op",y.op,b,y.src),this._setData(this.type.apply(this.data,y.op)),this.emit("op",y.op,b,y.src),this.emit("op batch",y.op,b);return}if(y.create){this._setType(y.create.type),this.type.deserialize?this.type.createDeserialized?this._setData(this.type.createDeserialized(y.create.data)):this._setData(this.type.deserialize(this.type.create(y.create.data))):this._setData(this.type.create(y.create.data)),this.emit("create",b);return}if(y.del){var E=this.data;this._setType(null),this.emit("del",E,b);return}},d.prototype._sendOp=function(){if(this.connection.canSend){var y=this.connection.id;this.inflightOp||(this.inflightOp=this.pendingOps.shift());var b=this.inflightOp;if(!b){var C=new l(p.ERR_INFLIGHT_OP_MISSING,"No op to send on call to _sendOp");return this.emit("error",C)}if(b.sentAt=Date.now(),b.retries=b.retries==null?0:b.retries+1,b.seq==null){if(this.connection.seq>=u.MAX_SAFE_INTEGER)return this.emit("error",new l(p.ERR_CONNECTION_SEQ_INTEGER_OVERFLOW,"Connection seq has exceeded the max safe integer, maybe from being open for too long"));b.seq=this.connection.seq++}this.connection.sendOp(this,b),b.src==null&&(b.src=y)}},d.prototype._submit=function(y,b,C){if(b||(b=!0),"op"in y){if(!this.type){var Q=new l(p.ERR_DOC_DOES_NOT_EXIST,"Cannot submit op. Document has not been created. "+this.collection+"."+this.id);return C?C(Q):this.emit("error",Q)}this.type.normalize&&(y.op=this.type.normalize(y.op))}try{this._pushOp(y,b,C),this._otApply(y,b)}catch(k){return this._hardRollback(k)}var _=this;u.nextTick(function(){_.flush()})},d.prototype._pushOp=function(y,b,C){if(y.source=b,this.applyStack)this.applyStack.push(y);else{var Q=this._tryCompose(y);if(Q){Q.callbacks.push(C);return}}y.type=this.type,y.callbacks=[C],this.pendingOps.push(y)},d.prototype._popApplyStack=function(y){if(y>0){this.applyStack.length=y;return}var b=this.applyStack[0];if(this.applyStack=null,!!b){var C=this.pendingOps.indexOf(b);if(C!==-1)for(var Q=this.pendingOps.splice(C),C=0;C<Q.length;C++){var b=Q[C],_=this._tryCompose(b);_?_.callbacks=_.callbacks.concat(b.callbacks):this.pendingOps.push(b)}}},d.prototype._tryCompose=function(y){if(!this.preventCompose){var b=this.pendingOps[this.pendingOps.length-1];if(!(!b||b.sentAt)&&!(this.submitSource&&!f(y.source,b.source))){if(b.create&&"op"in y)return b.create.data=this.type.apply(b.create.data,y.op),b;if("op"in b&&"op"in y&&this.type.compose)return b.op=this.type.compose(b.op,y.op),b}}},d.prototype.submitOp=function(y,b,C){typeof b=="function"&&(C=b,b=null);var Q={op:y},_=b&&b.source;this._submit(Q,_,C)},d.prototype.create=function(y,b,C,Q){if(typeof b=="function"?(Q=b,C=null,b=null):typeof C=="function"&&(Q=C,C=null),b||(b=a.defaultType.uri),this.type){var _=new l(p.ERR_DOC_ALREADY_CREATED,"Document already exists");return Q?Q(_):this.emit("error",_)}var k={create:{type:b,data:y}},w=C&&C.source;this._submit(k,w,Q)},d.prototype.del=function(y,b){if(typeof y=="function"&&(b=y,y=null),!this.type){var C=new l(p.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");return b?b(C):this.emit("error",C)}var Q={del:!0},_=y&&y.source;this._submit(Q,_,b)},d.prototype.pause=function(){this.paused=!0},d.prototype.resume=function(){this.paused=!1,this.flush()},d.prototype.toSnapshot=function(){return{v:this.version,data:c(this.data),type:this.type.uri}},d.prototype._opAcknowledged=function(y){if(this.inflightOp.create)this.version=y.v;else if(y.v!==this.version)return o.warn("Invalid version from server. Expected: "+this.version+" Received: "+y.v,y),this.fetch();if(y[h.fixup])for(var b=0;b<y[h.fixup].length;b++){for(var C=y[h.fixup][b],Q=0;Q<this.pendingOps.length;Q++){var _=S(this.pendingOps[b],C);if(_)return this._hardRollback(_)}try{this._otApply(C,!1)}catch(k){return this._hardRollback(k)}}this.version++,this._clearInflightOp()},d.prototype._rollback=function(y){var b=this.inflightOp;if("op"in b&&b.type.invert){try{b.op=b.type.invert(b.op)}catch{return this._hardRollback(y)}for(var C=0;C<this.pendingOps.length;C++){var Q=S(this.pendingOps[C],b);if(Q)return this._hardRollback(Q)}try{this._otApply(b,!1)}catch(_){return this._hardRollback(_)}this._clearInflightOp(y);return}this._hardRollback(y)},d.prototype._hardRollback=function(y){var b=[];this.inflightOp&&b.push(this.inflightOp),b=b.concat(this.pendingOps),this._setType(null),this.version=null,this.inflightOp=null,this.pendingOps=[];var C=this;this.fetch(function(){for(var Q=!!b.length,_=0;_<b.length;_++)Q=u.callEach(b[_].callbacks,y)&&Q;if(y&&!Q)return C.emit("error",y)})},d.prototype._clearInflightOp=function(y){var b=this.inflightOp;this.inflightOp=null;var C=u.callEach(b.callbacks,y);if(this.flush(),this._emitNothingPending(),y&&!C)return this.emit("error",y)}},{"../emitter":24,"../error":25,"../logger":26,"../message-actions":28,"../types":31,"../util":32,"fast-deep-equal":3}],12:[function(n,r,i){i.Connection=n("./connection"),i.Doc=n("./doc"),i.Error=n("../error"),i.Query=n("./query"),i.types=n("../types"),i.logger=n("../logger")},{"../error":25,"../logger":26,"../types":31,"./connection":10,"./doc":11,"./query":20}],13:[function(n,r,i){var s=n("../../util"),o=n("events").EventEmitter,l=["create","del","destroy","load","op"];r.exports=a;function a(){this._docs={},this._forwarders={},this._emitters={}}a.prototype.addEventListener=function(u,c,f){this._registerDoc(u);var h=s.dig(this._emitters,u.collection,u.id);h.on(c,f)},a.prototype.removeEventListener=function(u,c,f){var h=s.dig(this._emitters,u.collection,u.id);h&&(h.off(c,f),h._eventsCount===1&&this._unregisterDoc(u))},a.prototype._registerDoc=function(u){var c=!0;if(s.digOrCreate(this._docs,u.collection,u.id,function(){return c=!1,u}),!c){var f=s.digOrCreate(this._emitters,u.collection,u.id,function(){var p=new o;return p.setMaxListeners(1e3),p}),h=this;l.forEach(function(p){var d=s.digOrCreate(h._forwarders,u.collection,u.id,p,function(){return f.emit.bind(f,p)});u.on(p,d)}),this.addEventListener(u,"destroy",this._unregisterDoc.bind(this,u))}},a.prototype._unregisterDoc=function(u){var c=s.dig(this._forwarders,u.collection,u.id);for(var f in c)u.off(f,c[f]);var h=s.dig(this._emitters,u.collection,u.id);h.removeAllListeners(),s.digAndRemove(this._forwarders,u.collection,u.id),s.digAndRemove(this._emitters,u.collection,u.id),s.digAndRemove(this._docs,u.collection,u.id)}},{"../../util":32,events:2}],14:[function(n,r,i){var s=n("./presence"),o=n("./local-doc-presence"),l=n("./remote-doc-presence");function a(u,c,f){var h=a.channel(c,f);s.call(this,u,h),this.collection=c,this.id=f}r.exports=a,a.prototype=Object.create(s.prototype),a.channel=function(u,c){return u+"."+c},a.prototype._createLocalPresence=function(u){return new o(this,u)},a.prototype._createRemotePresence=function(u){return new l(this,u)}},{"./local-doc-presence":15,"./presence":17,"./remote-doc-presence":18}],15:[function(n,r,i){var s=n("./local-presence"),o=n("../../error"),l=n("../../util"),a=o.CODES;r.exports=u;function u(c,f){s.call(this,c,f),this.collection=this.presence.collection,this.id=this.presence.id,this._doc=this.connection.get(this.collection,this.id),this._emitter=this.connection._docPresenceEmitter,this._isSending=!1,this._docDataVersionByPresenceVersion={},this._opHandler=this._transformAgainstOp.bind(this),this._createOrDelHandler=this._handleCreateOrDel.bind(this),this._loadHandler=this._handleLoad.bind(this),this._destroyHandler=this.destroy.bind(this),this._registerWithDoc()}u.prototype=Object.create(s.prototype),u.prototype.submit=function(c,f){if(!this._doc.type){if(c===null)return this._callbackOrEmit(null,f);var h={code:a.ERR_DOC_DOES_NOT_EXIST,message:"Cannot submit presence. Document has not been created"};return this._callbackOrEmit(h,f)}this._docDataVersionByPresenceVersion[this.presenceVersion]=this._doc._dataStateVersion,s.prototype.submit.call(this,c,f)},u.prototype.destroy=function(c){this._emitter.removeEventListener(this._doc,"op",this._opHandler),this._emitter.removeEventListener(this._doc,"create",this._createOrDelHandler),this._emitter.removeEventListener(this._doc,"del",this._createOrDelHandler),this._emitter.removeEventListener(this._doc,"load",this._loadHandler),this._emitter.removeEventListener(this._doc,"destroy",this._destroyHandler),s.prototype.destroy.call(this,c)},u.prototype._sendPending=function(){if(!this._isSending){this._isSending=!0;var c=this;this._doc.whenNothingPending(function(){c._isSending=!1,c.connection.canSend&&(c._pendingMessages.forEach(function(f){f.t=c._doc.type.uri,f.v=c._doc.version,c.connection.send(f)}),c._pendingMessages=[],c._docDataVersionByPresenceVersion={})})}},u.prototype._registerWithDoc=function(){this._emitter.addEventListener(this._doc,"op",this._opHandler),this._emitter.addEventListener(this._doc,"create",this._createOrDelHandler),this._emitter.addEventListener(this._doc,"del",this._createOrDelHandler),this._emitter.addEventListener(this._doc,"load",this._loadHandler),this._emitter.addEventListener(this._doc,"destroy",this._destroyHandler)},u.prototype._transformAgainstOp=function(c,f){var h=this,p=this._doc._dataStateVersion;this._pendingMessages.forEach(function(d){var g=h._docDataVersionByPresenceVersion[d.pv];if(!(g>=p))try{d.p=h._transformPresence(d.p,c,f),h._docDataVersionByPresenceVersion[d.pv]=p}catch(m){var O=h._getCallback(d.pv);h._callbackOrEmit(m,O)}});try{this.value=this._transformPresence(this.value,c,f)}catch(d){this.emit("error",d)}},u.prototype._handleCreateOrDel=function(){this._pendingMessages.forEach(function(c){c.p=null}),this.value=null},u.prototype._handleLoad=function(){this.value=null,this._pendingMessages=[],this._docDataVersionByPresenceVersion={}},u.prototype._message=function(){var c=s.prototype._message.call(this);return c.c=this.collection,c.d=this.id,c.v=null,c.t=null,c},u.prototype._transformPresence=function(c,f,h){var p=this._doc.type;if(!l.supportsPresence(p))throw new o(a.ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE,"Type does not support presence: "+p.name);return p.transformPresence(c,f,h)}},{"../../error":25,"../../util":32,"./local-presence":16}],16:[function(n,r,i){var s=n("../../emitter"),o=n("../../message-actions").ACTIONS,l=n("../../util");r.exports=a;function a(u,c){if(s.EventEmitter.call(this),!c||typeof c!="string")throw new Error("LocalPresence presenceId must be a string");this.presence=u,this.presenceId=c,this.connection=u.connection,this.presenceVersion=0,this.value=null,this._pendingMessages=[],this._callbacksByPresenceVersion={}}s.mixin(a),a.prototype.submit=function(u,c){this.value=u,this.send(c)},a.prototype.send=function(u){var c=this._message();this._pendingMessages.push(c),this._callbacksByPresenceVersion[c.pv]=u,this._sendPending()},a.prototype.destroy=function(u){var c=this;this.submit(null,function(f){if(f)return c._callbackOrEmit(f,u);delete c.presence.localPresences[c.presenceId],u&&u()})},a.prototype._sendPending=function(){if(this.connection.canSend){var u=this;this._pendingMessages.forEach(function(c){u.connection.send(c)}),this._pendingMessages=[]}},a.prototype._ack=function(u,c){var f=this._getCallback(c);this._callbackOrEmit(u,f)},a.prototype._message=function(){return{a:o.presence,ch:this.presence.channel,id:this.presenceId,p:this.value,pv:this.presenceVersion++}},a.prototype._getCallback=function(u){var c=this._callbacksByPresenceVersion[u];return delete this._callbacksByPresenceVersion[u],c},a.prototype._callbackOrEmit=function(u,c){if(c)return l.nextTick(c,u);u&&this.emit("error",u)}},{"../../emitter":24,"../../message-actions":28,"../../util":32}],17:[function(n,r,i){var s=n("../../emitter"),o=n("./local-presence"),l=n("./remote-presence"),a=n("../../util"),u=n("async"),c=n("hat"),f=n("../../message-actions").ACTIONS;r.exports=h;function h(p,d){if(s.EventEmitter.call(this),!d||typeof d!="string")throw new Error("Presence channel must be provided");this.connection=p,this.channel=d,this.wantSubscribe=!1,this.subscribed=!1,this.remotePresences={},this.localPresences={},this._remotePresenceInstances={},this._subscriptionCallbacksBySeq={},this._wantsDestroy=!1}s.mixin(h),h.prototype.subscribe=function(p){this._sendSubscriptionAction(!0,p)},h.prototype.unsubscribe=function(p){this._sendSubscriptionAction(!1,p)},h.prototype.create=function(p){if(this._wantsDestroy)throw new Error("Presence is being destroyed");p=p||c();var d=this._createLocalPresence(p);return this.localPresences[p]=d,d},h.prototype.destroy=function(p){this._wantsDestroy=!0;var d=this,g=Object.keys(d.localPresences);this.unsubscribe(function(O){if(O)return d._callbackOrEmit(O,p);var m=Object.keys(d._remotePresenceInstances);u.parallel([function(S){u.each(g,function(y,b){d.localPresences[y].destroy(b)},S)},function(S){if(!d._wantsDestroy)return S();u.each(m,function(y,b){d._remotePresenceInstances[y].destroy(b)},S)}],function(S){d._wantsDestroy&&delete d.connection._presences[d.channel],d._callbackOrEmit(S,p)})})},h.prototype._sendSubscriptionAction=function(p,d){this.wantSubscribe=!!p;var g=this.wantSubscribe?f.presenceSubscribe:f.presenceUnsubscribe,O=this.connection._presenceSeq++;this._subscriptionCallbacksBySeq[O]=d,this.connection.canSend&&this.connection._sendPresenceAction(g,O,this)},h.prototype._handleSubscribe=function(p,d){this.wantSubscribe&&(this.subscribed=!0);var g=this._subscriptionCallback(d);this._callbackOrEmit(p,g)},h.prototype._handleUnsubscribe=function(p,d){this.subscribed=!1;var g=this._subscriptionCallback(d);this._callbackOrEmit(p,g)},h.prototype._receiveUpdate=function(p,d){var g=a.dig(this.localPresences,d.id);if(g)return g._ack(p,d.pv);if(p)return this.emit("error",p);var O=this,m=a.digOrCreate(this._remotePresenceInstances,d.id,function(){return O._createRemotePresence(d.id)});m.receiveUpdate(d)},h.prototype._updateRemotePresence=function(p){this.remotePresences[p.presenceId]=p.value,p.value===null&&this._removeRemotePresence(p.presenceId),this.emit("receive",p.presenceId,p.value)},h.prototype._broadcastAllLocalPresence=function(p){if(p)return this.emit("error",p);for(var d in this.localPresences){var g=this.localPresences[d];g.value!==null&&g.send()}},h.prototype._removeRemotePresence=function(p){this._remotePresenceInstances[p].destroy(),delete this._remotePresenceInstances[p],delete this.remotePresences[p]},h.prototype._onConnectionStateChanged=function(){if(this.connection.canSend){this._resubscribe();for(var p in this.localPresences)this.localPresences[p]._sendPending()}},h.prototype._resubscribe=function(){var p=[];for(var d in this._subscriptionCallbacksBySeq){var g=this._subscriptionCallback(d);p.push(g)}if(!this.wantSubscribe)return this._callEachOrEmit(p);var O=this;this.subscribe(function(m){O._callEachOrEmit(p,m)})},h.prototype._subscriptionCallback=function(p){var d=this._subscriptionCallbacksBySeq[p];return delete this._subscriptionCallbacksBySeq[p],d},h.prototype._callbackOrEmit=function(p,d){if(d)return a.nextTick(d,p);p&&this.emit("error",p)},h.prototype._createLocalPresence=function(p){return new o(this,p)},h.prototype._createRemotePresence=function(p){return new l(this,p)},h.prototype._callEachOrEmit=function(p,d){var g=a.callEach(p,d);!g&&d&&this.emit("error",d)}},{"../../emitter":24,"../../message-actions":28,"../../util":32,"./local-presence":16,"./remote-presence":19,async:1,hat:4}],18:[function(n,r,i){var s=n("./remote-presence"),o=n("../../ot");r.exports=l;function l(a,u){s.call(this,a,u),this.collection=this.presence.collection,this.id=this.presence.id,this.src=null,this.presenceVersion=null,this._doc=this.connection.get(this.collection,this.id),this._emitter=this.connection._docPresenceEmitter,this._pending=null,this._opCache=null,this._pendingSetPending=!1,this._opHandler=this._handleOp.bind(this),this._createDelHandler=this._handleCreateDel.bind(this),this._loadHandler=this._handleLoad.bind(this),this._registerWithDoc()}l.prototype=Object.create(s.prototype),l.prototype.receiveUpdate=function(a){this._pending&&a.pv<this._pending.pv||(this.src=a.src,this._pending=a,this._setPendingPresence())},l.prototype.destroy=function(a){this._emitter.removeEventListener(this._doc,"op",this._opHandler),this._emitter.removeEventListener(this._doc,"create",this._createDelHandler),this._emitter.removeEventListener(this._doc,"del",this._createDelHandler),this._emitter.removeEventListener(this._doc,"load",this._loadHandler),s.prototype.destroy.call(this,a)},l.prototype._registerWithDoc=function(){this._emitter.addEventListener(this._doc,"op",this._opHandler),this._emitter.addEventListener(this._doc,"create",this._createDelHandler),this._emitter.addEventListener(this._doc,"del",this._createDelHandler),this._emitter.addEventListener(this._doc,"load",this._loadHandler)},l.prototype._setPendingPresence=function(){if(!this._pendingSetPending){this._pendingSetPending=!0;var a=this;this._doc.whenNothingPending(function(){if(a._pendingSetPending=!1,!!a._pending){if(a._pending.pv<a.presenceVersion)return a._pending=null;if(a._pending.v>a._doc.version)return a._doc.fetch();a._catchUpStalePresence()&&(a.value=a._pending.p,a.presenceVersion=a._pending.pv,a._pending=null,a.presence._updateRemotePresence(a))}})}},l.prototype._handleOp=function(a,u,c){var f=c===this.src;this._transformAgainstOp(a,f),this._cacheOp(a,f),this._setPendingPresence()},s.prototype._handleCreateDel=function(){this._cacheOp(null),this._setPendingPresence()},s.prototype._handleLoad=function(){this.value=null,this._pending=null,this._opCache=null,this.presence._updateRemotePresence(this)},l.prototype._transformAgainstOp=function(a,u){if(this.value){try{this.value=this._doc.type.transformPresence(this.value,a,u)}catch(c){return this.presence.emit("error",c)}this.presence._updateRemotePresence(this)}},l.prototype._catchUpStalePresence=function(){if(this._pending.v>=this._doc.version)return!0;if(!this._opCache)return this._startCachingOps(),this._doc.fetch(),this.presence.subscribe(),!1;for(;this._opCache[this._pending.v];){var a=this._opCache[this._pending.v],u=a.op,c=a.isOwnOp;u===null?(this._pending.p=null,this._pending.v++):o.transformPresence(this._pending,u,c)}var f=this._pending.v>=this._doc.version;return f&&this._stopCachingOps(),f},l.prototype._startCachingOps=function(){this._opCache=[]},l.prototype._stopCachingOps=function(){this._opCache=null},l.prototype._cacheOp=function(a,u){this._opCache&&(a=a?{op:a}:null,this._opCache[this._doc.version-1]={op:a,isOwnOp:u})}},{"../../ot":29,"./remote-presence":19}],19:[function(n,r,i){var s=n("../../util");r.exports=o;function o(l,a){this.presence=l,this.presenceId=a,this.connection=this.presence.connection,this.value=null,this.presenceVersion=0}o.prototype.receiveUpdate=function(l){l.pv<this.presenceVersion||(this.value=l.p,this.presenceVersion=l.pv,this.presence._updateRemotePresence(this))},o.prototype.destroy=function(l){delete this.presence._remotePresenceInstances[this.presenceId],delete this.presence.remotePresences[this.presenceId],l&&s.nextTick(l)}},{"../../util":32}],20:[function(n,r,i){var s=n("../emitter"),o=n("../message-actions").ACTIONS,l=n("../util");r.exports=a;function a(u,c,f,h,p,d,g){s.EventEmitter.call(this),this.action=u,this.connection=c,this.id=f,this.collection=h,this.query=p,this.results=null,d&&d.results&&(this.results=d.results,delete d.results),this.extra=void 0,this.options=d,this.callback=g,this.ready=!1,this.sent=!1}s.mixin(a),a.prototype.hasPending=function(){return!this.ready},a.prototype.send=function(){if(this.connection.canSend){var u={a:this.action,id:this.id,c:this.collection,q:this.query};if(this.options&&(u.o=this.options),this.results){for(var c=[],f=0;f<this.results.length;f++){var h=this.results[f];c.push([h.id,h.version])}u.r=c}this.connection.send(u),this.sent=!0}},a.prototype.destroy=function(u){this.connection.canSend&&this.action===o.querySubscribe&&this.connection.send({a:o.queryUnsubscribe,id:this.id}),this.connection._destroyQuery(this),u&&l.nextTick(u)},a.prototype._onConnectionStateChanged=function(){this.connection.canSend&&!this.sent?this.send():this.sent=!1},a.prototype._handleFetch=function(u,c,f){this.connection._destroyQuery(this),this._handleResponse(u,c,f)},a.prototype._handleSubscribe=function(u,c,f){this._handleResponse(u,c,f)},a.prototype._handleResponse=function(u,c,f){var h=this.callback;if(this.callback=null,u)return this._finishResponse(u,h);if(!c)return this._finishResponse(null,h);var p=this,d=1,g=function(y){if(y)return p._finishResponse(y,h);--d||p._finishResponse(null,h)};if(Array.isArray(c))d+=c.length,this.results=this._ingestSnapshots(c,g),this.extra=f;else for(var O in c){d++;var m=c[O],S=this.connection.get(m.c||this.collection,O);S.ingestSnapshot(m,g)}g()},a.prototype._ingestSnapshots=function(u,c){for(var f=[],h=0;h<u.length;h++){var p=u[h],d=this.connection.get(p.c||this.collection,p.d);d.ingestSnapshot(p,c),f.push(d)}return f},a.prototype._finishResponse=function(u,c){if(this.emit("ready"),this.ready=!0,u)return this.connection._destroyQuery(this),c?c(u):this.emit("error",u);c&&c(null,this.results,this.extra)},a.prototype._handleError=function(u){this.emit("error",u)},a.prototype._handleDiff=function(u){for(var c=0;c<u.length;c++){var f=u[c];f.type==="insert"&&(f.values=this._ingestSnapshots(f.values))}for(var c=0;c<u.length;c++){var f=u[c];switch(f.type){case"insert":var h=f.values;Array.prototype.splice.apply(this.results,[f.index,0].concat(h)),this.emit("insert",h,f.index);break;case"remove":var d=f.howMany||1,p=this.results.splice(f.index,d);this.emit("remove",p,f.index);break;case"move":var d=f.howMany||1,g=this.results.splice(f.from,d);Array.prototype.splice.apply(this.results,[f.to,0].concat(g)),this.emit("move",g,f.from,f.to);break}}this.emit("changed",this.results)},a.prototype._handleExtra=function(u){this.extra=u,this.emit("extra",u)}},{"../emitter":24,"../message-actions":28,"../util":32}],21:[function(n,r,i){var s=n("../../snapshot"),o=n("../../emitter");r.exports=l;function l(a,u,c,f,h){if(o.EventEmitter.call(this),typeof h!="function")throw new Error("Callback is required for SnapshotRequest");this.requestId=u,this.connection=a,this.id=f,this.collection=c,this.callback=h,this.sent=!1}o.mixin(l),l.prototype.send=function(){this.connection.canSend&&(this.connection.send(this._message()),this.sent=!0)},l.prototype._onConnectionStateChanged=function(){this.connection.canSend?this.sent||this.send():this.sent=!1},l.prototype._handleResponse=function(a,u){if(this.emit("ready"),a)return this.callback(a);var c=u.meta?u.meta:null,f=new s(this.id,u.v,u.type,u.data,c);this.callback(null,f)}},{"../../emitter":24,"../../snapshot":30}],22:[function(n,r,i){var s=n("./snapshot-request"),o=n("../../util"),l=n("../../message-actions").ACTIONS;r.exports=a;function a(u,c,f,h,p,d){if(s.call(this,u,c,f,h,d),!o.isValidTimestamp(p))throw new Error("Snapshot timestamp must be a positive integer or null");this.timestamp=p}a.prototype=Object.create(s.prototype),a.prototype._message=function(){return{a:l.snapshotFetchByTimestamp,id:this.requestId,c:this.collection,d:this.id,ts:this.timestamp}}},{"../../message-actions":28,"../../util":32,"./snapshot-request":21}],23:[function(n,r,i){var s=n("./snapshot-request"),o=n("../../util"),l=n("../../message-actions").ACTIONS;r.exports=a;function a(u,c,f,h,p,d){if(s.call(this,u,c,f,h,d),!o.isValidVersion(p))throw new Error("Snapshot version must be a positive integer or null");this.version=p}a.prototype=Object.create(s.prototype),a.prototype._message=function(){return{a:l.snapshotFetch,id:this.requestId,c:this.collection,d:this.id,v:this.version}}},{"../../message-actions":28,"../../util":32,"./snapshot-request":21}],24:[function(n,r,i){var s=n("events").EventEmitter;i.EventEmitter=s,i.mixin=o;function o(l){for(var a in s.prototype)l.prototype[a]=s.prototype[a]}},{events:2}],25:[function(n,r,i){function s(o,l){this.code=o,this.message=l||"",Error.captureStackTrace?Error.captureStackTrace(this,s):this.stack=new Error().stack}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.prototype.name="ShareDBError",s.CODES={ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT:"ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT",ERR_APPLY_SNAPSHOT_NOT_PROVIDED:"ERR_APPLY_SNAPSHOT_NOT_PROVIDED",ERR_FIXUP_IS_ONLY_VALID_ON_APPLY:"ERR_FIXUP_IS_ONLY_VALID_ON_APPLY",ERR_CANNOT_FIXUP_DELETION:"ERR_CANNOT_FIXUP_DELETION",ERR_CLIENT_ID_BADLY_FORMED:"ERR_CLIENT_ID_BADLY_FORMED",ERR_CANNOT_PING_OFFLINE:"ERR_CANNOT_PING_OFFLINE",ERR_CONNECTION_SEQ_INTEGER_OVERFLOW:"ERR_CONNECTION_SEQ_INTEGER_OVERFLOW",ERR_CONNECTION_STATE_TRANSITION_INVALID:"ERR_CONNECTION_STATE_TRANSITION_INVALID",ERR_DATABASE_ADAPTER_NOT_FOUND:"ERR_DATABASE_ADAPTER_NOT_FOUND",ERR_DATABASE_DOES_NOT_SUPPORT_SUBSCRIBE:"ERR_DATABASE_DOES_NOT_SUPPORT_SUBSCRIBE",ERR_DATABASE_METHOD_NOT_IMPLEMENTED:"ERR_DATABASE_METHOD_NOT_IMPLEMENTED",ERR_DEFAULT_TYPE_MISMATCH:"ERR_DEFAULT_TYPE_MISMATCH",ERR_DOC_MISSING_VERSION:"ERR_DOC_MISSING_VERSION",ERR_DOC_ALREADY_CREATED:"ERR_DOC_ALREADY_CREATED",ERR_DOC_DOES_NOT_EXIST:"ERR_DOC_DOES_NOT_EXIST",ERR_DOC_TYPE_NOT_RECOGNIZED:"ERR_DOC_TYPE_NOT_RECOGNIZED",ERR_DOC_WAS_DELETED:"ERR_DOC_WAS_DELETED",ERR_INFLIGHT_OP_MISSING:"ERR_INFLIGHT_OP_MISSING",ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION:"ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION",ERR_MAX_SUBMIT_RETRIES_EXCEEDED:"ERR_MAX_SUBMIT_RETRIES_EXCEEDED",ERR_MESSAGE_BADLY_FORMED:"ERR_MESSAGE_BADLY_FORMED",ERR_MILESTONE_ARGUMENT_INVALID:"ERR_MILESTONE_ARGUMENT_INVALID",ERR_OP_ALREADY_SUBMITTED:"ERR_OP_ALREADY_SUBMITTED",ERR_OP_NOT_ALLOWED_IN_PROJECTION:"ERR_OP_NOT_ALLOWED_IN_PROJECTION",ERR_OP_SUBMIT_REJECTED:"ERR_OP_SUBMIT_REJECTED",ERR_OP_VERSION_MISMATCH_AFTER_TRANSFORM:"ERR_OP_VERSION_MISMATCH_AFTER_TRANSFORM",ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM:"ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM",ERR_OP_VERSION_NEWER_THAN_CURRENT_SNAPSHOT:"ERR_OP_VERSION_NEWER_THAN_CURRENT_SNAPSHOT",ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED:"ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED",ERR_OT_OP_BADLY_FORMED:"ERR_OT_OP_BADLY_FORMED",ERR_OT_OP_NOT_APPLIED:"ERR_OT_OP_NOT_APPLIED",ERR_OT_OP_NOT_PROVIDED:"ERR_OT_OP_NOT_PROVIDED",ERR_PRESENCE_TRANSFORM_FAILED:"ERR_PRESENCE_TRANSFORM_FAILED",ERR_PROTOCOL_VERSION_NOT_SUPPORTED:"ERR_PROTOCOL_VERSION_NOT_SUPPORTED",ERR_QUERY_CHANNEL_MISSING:"ERR_QUERY_CHANNEL_MISSING",ERR_QUERY_EMITTER_LISTENER_NOT_ASSIGNED:"ERR_QUERY_EMITTER_LISTENER_NOT_ASSIGNED",ERR_SNAPSHOT_READ_SILENT_REJECTION:"ERR_SNAPSHOT_READ_SILENT_REJECTION",ERR_SNAPSHOT_READS_REJECTED:"ERR_SNAPSHOT_READS_REJECTED",ERR_SUBMIT_TRANSFORM_OPS_NOT_FOUND:"ERR_SUBMIT_TRANSFORM_OPS_NOT_FOUND",ERR_TYPE_CANNOT_BE_PROJECTED:"ERR_TYPE_CANNOT_BE_PROJECTED",ERR_TYPE_DOES_NOT_SUPPORT_COMPOSE:"ERR_TYPE_DOES_NOT_SUPPORT_COMPOSE",ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE:"ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE",ERR_UNKNOWN_ERROR:"ERR_UNKNOWN_ERROR"},r.exports=s},{}],26:[function(n,r,i){var s=n("./logger"),o=new s;r.exports=o},{"./logger":27}],27:[function(n,r,i){var s=["info","warn","error"];function o(){var l={};s.forEach(function(a){l[a]=console[a].bind(console)}),this.setMethods(l)}r.exports=o,o.prototype.setMethods=function(l){l=l||{};var a=this;s.forEach(function(u){typeof l[u]=="function"&&(a[u]=l[u])})}},{}],28:[function(n,r,i){i.ACTIONS={initLegacy:"init",handshake:"hs",queryFetch:"qf",querySubscribe:"qs",queryUnsubscribe:"qu",queryUpdate:"q",bulkFetch:"bf",bulkSubscribe:"bs",bulkUnsubscribe:"bu",fetch:"f",fixup:"fixup",subscribe:"s",unsubscribe:"u",op:"op",snapshotFetch:"nf",snapshotFetchByTimestamp:"nt",pingPong:"pp",presence:"p",presenceSubscribe:"ps",presenceUnsubscribe:"pu",presenceRequest:"pr"}},{}],29:[function(n,r,i){var s=n("./types"),o=n("./error"),l=n("./util"),a=o.CODES;i.checkOp=function(f){if(f==null||typeof f!="object")return new o(a.ERR_OT_OP_BADLY_FORMED,"Op must be an object");if(f.create!=null){if(typeof f.create!="object")return new o(a.ERR_OT_OP_BADLY_FORMED,"Create data must be an object");var h=f.create.type;if(typeof h!="string")return new o(a.ERR_OT_OP_BADLY_FORMED,"Missing create type");var p=s.map[h];if(p==null||typeof p!="object")return new o(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type")}else if(f.del!=null){if(f.del!==!0)return new o(a.ERR_OT_OP_BADLY_FORMED,"del value must be true")}else if(!("op"in f))return new o(a.ERR_OT_OP_BADLY_FORMED,"Missing op, create, or del");if(f.src!=null&&typeof f.src!="string")return new o(a.ERR_OT_OP_BADLY_FORMED,"src must be a string");if(f.seq!=null&&typeof f.seq!="number")return new o(a.ERR_OT_OP_BADLY_FORMED,"seq must be a number");if(f.src==null&&f.seq!=null||f.src!=null&&f.seq==null)return new o(a.ERR_OT_OP_BADLY_FORMED,"Both src and seq must be set together");if(f.m!=null&&typeof f.m!="object")return new o(a.ERR_OT_OP_BADLY_FORMED,"op.m must be an object or null")},i.normalizeType=function(f){return s.map[f]&&s.map[f].uri},i.apply=function(f,h){if(typeof f!="object")return new o(a.ERR_APPLY_SNAPSHOT_NOT_PROVIDED,"Missing snapshot");if(f.v!=null&&h.v!=null&&f.v!==h.v)return new o(a.ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT,"Version mismatch");if(h.create){if(f.type)return new o(a.ERR_DOC_ALREADY_CREATED,"Document already exists");var p=h.create,d=s.map[p.type];if(!d)return new o(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{f.data=d.create(p.data),f.type=d.uri,f.v++}catch(O){return O}}else if(h.del)f.data=void 0,f.type=null,f.v++;else if("op"in h){var g=u(f,h.op);if(g)return g;f.v++}else f.v++};function u(f,h){if(!f.type)return new o(a.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");if(h===void 0)return new o(a.ERR_OT_OP_NOT_PROVIDED,"Missing op");var p=s.map[f.type];if(!p)return new o(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{f.data=p.apply(f.data,h)}catch(d){return new o(a.ERR_OT_OP_NOT_APPLIED,d.message)}}i.transform=function(f,h,p){if(h.v!=null&&h.v!==p.v)return new o(a.ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM,"Version mismatch");if(p.del){if(h.create||"op"in h)return new o(a.ERR_DOC_WAS_DELETED,"Document was deleted")}else{if(p.create&&("op"in h||h.create||h.del)||"op"in p&&h.create)return new o(a.ERR_DOC_ALREADY_CREATED,"Document was created remotely");if("op"in p&&"op"in h){if(!f)return new o(a.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");if(typeof f=="string"&&(f=s.map[f],!f))return new o(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{h.op=f.transform(h.op,p.op,"left")}catch(d){return d}}}h.v!=null&&h.v++},i.applyOps=function(f,h,p){p=p||{};for(var d=0;d<h.length;d++){var g=h[d];if(p._normalizeLegacyJson0Ops)try{c(f,g)}catch{return new o(a.ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED,"Cannot normalize legacy json0 op")}f.v=g.v;var O=i.apply(f,g);if(O)return O}},i.transformPresence=function(f,h,p){var d=this.checkOp(h);if(d)return d;var g=f.t;if(typeof g=="string"&&(g=s.map[g]),!g)return{code:a.ERR_DOC_TYPE_NOT_RECOGNIZED,message:"Unknown type"};if(!l.supportsPresence(g))return{code:a.ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE,message:"Type does not support presence"};if(h.create||h.del){f.p=null,f.v++;return}try{f.p=f.p===null?null:g.transformPresence(f.p,h.op,p)}catch(O){return{code:a.ERR_PRESENCE_TRANSFORM_FAILED,message:O.message||O}}f.v++};function c(f,h){if(f.type===s.defaultType.uri){var p=h.op;if(p){var d=f.data;p.length>1&&(d=l.clone(d));for(var g=0;g<p.length;g++){var O=p[g];typeof O.lm=="string"&&(O.lm=+O.lm);for(var m=O.p,S=d,y=0;y<m.length;y++){var b=m[y];Object.prototype.toString.call(S)=="[object Array]"?m[y]=+b:S.constructor===Object&&(m[y]=b.toString()),S=S[b]}g<p.length-1&&(d=s.defaultType.apply(d,[O]))}}}}},{"./error":25,"./types":31,"./util":32}],30:[function(n,r,i){r.exports=s;function s(o,l,a,u,c){this.id=o,this.v=l,this.type=a,this.data=u,this.m=c}},{}],31:[function(n,r,i){i.defaultType=n("ot-json0").type,i.map={},i.register=function(s){s.name&&(i.map[s.name]=s),s.uri&&(i.map[s.uri]=s)},i.register(i.defaultType)},{"ot-json0":6}],32:[function(n,r,i){(function(s){(function(){i.doNothing=o;function o(){}i.hasKeys=function(l){for(var a in l)return!0;return!1},i.isInteger=Number.isInteger||function(l){return typeof l=="number"&&isFinite(l)&&Math.floor(l)===l},i.isValidVersion=function(l){return l===null?!0:i.isInteger(l)&&l>=0},i.isValidTimestamp=function(l){return i.isValidVersion(l)},i.MAX_SAFE_INTEGER=9007199254740991,i.dig=function(){for(var l=arguments[0],a=1;a<arguments.length;a++){var u=arguments[a];l=l[u]||(a===arguments.length-1?void 0:{})}return l},i.digOrCreate=function(){for(var l=arguments[0],a=arguments[arguments.length-1],u=1;u<arguments.length-1;u++){var c=arguments[u];l=l[c]||(l[c]=u===arguments.length-2?a():{})}return l},i.digAndRemove=function(){for(var l=arguments[0],a=[l],u=1;u<arguments.length-1;u++){var c=arguments[u];if(!l.hasOwnProperty(c))break;l=l[c],a.push(l)}for(var u=a.length-1;u>=0;u--){var f=a[u],c=arguments[u+1],h=f[c];(u===a.length-1||!i.hasKeys(h))&&delete f[c]}},i.supportsPresence=function(l){return l&&typeof l.transformPresence=="function"},i.callEach=function(l,a){var u=!1;return l.forEach(function(c){c&&(c(a),u=!0)}),u},i.truthy=function(l){return!!l},i.nextTick=function(l){if(typeof s<"u"&&s.nextTick)return s.nextTick.apply(null,arguments);for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];setTimeout(function(){l.apply(null,a)})},i.clone=function(l){return l===void 0?void 0:JSON.parse(JSON.stringify(l))}}).call(this)}).call(this,n("_process"))},{_process:9}],33:[function(n,r,i){(function(s,o){(function(){var l=n("process/browser.js").nextTick,a=Function.prototype.apply,u=Array.prototype.slice,c={},f=0;i.setTimeout=function(){return new h(a.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new h(a.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(p){p.close()};function h(p,d){this._id=p,this._clearFn=d}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(p,d){clearTimeout(p._idleTimeoutId),p._idleTimeout=d},i.unenroll=function(p){clearTimeout(p._idleTimeoutId),p._idleTimeout=-1},i._unrefActive=i.active=function(p){clearTimeout(p._idleTimeoutId);var d=p._idleTimeout;d>=0&&(p._idleTimeoutId=setTimeout(function(){p._onTimeout&&p._onTimeout()},d))},i.setImmediate=typeof s=="function"?s:function(p){var d=f++,g=arguments.length<2?!1:u.call(arguments,1);return c[d]=!0,l(function(){c[d]&&(g?p.apply(null,g):p.call(null),i.clearImmediate(d))}),d},i.clearImmediate=typeof o=="function"?o:function(p){delete c[p]}}).call(this)}).call(this,n("timers").setImmediate,n("timers").clearImmediate)},{"process/browser.js":9,timers:33}],34:[function(n,r,i){r.exports=n("sharedb/lib/client")},{"sharedb/lib/client":12}]},{},[34])(34)})})(bC);var OM=bC.exports;const wC=Ds(OM);var kC={exports:{}};(function(t,e){(function(n){t.exports=n()})(function(){return function(){function n(r,i,s){function o(u,c){if(!i[u]){if(!r[u]){var f=typeof ds=="function"&&ds;if(!c&&f)return f(u,!0);if(l)return l(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var p=i[u]={exports:{}};r[u][0].call(p.exports,function(d){var g=r[u][1][d];return o(g||d)},p,p.exports,n,r,i,s)}return i[u].exports}for(var l=typeof ds=="function"&&ds,a=0;a<s.length;a++)o(s[a]);return o}return n}()({1:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.eachChildOf=i.advancer=i.readCursor=i.writeCursor=i.WriteCursor=i.ReadCursor=i.isValidPathItem=void 0;function s(d,g){if(!d)throw new Error(g)}const o=d=>d!=null&&typeof d=="object"&&!Array.isArray(d),l=(d,g)=>typeof d==typeof g?d>g:typeof d=="string"&&typeof g=="number";function a(d,g){for(let O in d){const m=O;g.write(m,d[m])}}i.isValidPathItem=d=>typeof d=="number"||typeof d=="string"&&d!=="__proto__";class u{constructor(g=null){this.parents=[],this.indexes=[],this.lcIdx=-1,this.idx=-1,this.container=g}ascend(){s(this.parents.length===this.indexes.length/2),this.idx===0?this.parents.length?(this.lcIdx=this.indexes.pop(),this.container=this.parents.pop(),this.idx=this.indexes.pop()):(this.lcIdx=0,this.idx=-1):(s(this.idx>0),this.idx--,o(this.container[this.idx])&&this.idx--)}getPath(){const g=[];let O=this.container,m=this.parents.length-1,S=this.idx;for(;S>=0;)g.unshift(O[S]),S===0?(S=this.indexes[m*2],O=this.parents[m--]):S-=o(O[S-1])?2:1;return g}}class c extends u{get(){return this.container?this.container.slice(this.idx+1):null}getKey(){return s(this.container!=null,"Invalid call to getKey before cursor descended"),this.container[this.idx]}getComponent(){let g;return this.container&&this.container.length>this.idx+1&&o(g=this.container[this.idx+1])?g:null}descendFirst(){let g=this.idx+1;if(!this.container||g>=this.container.length||o(this.container[g])&&g+1>=this.container.length)return!1;o(this.container[g])&&g++;const O=this.container[g];return Array.isArray(O)?(this.indexes.push(this.idx),this.parents.push(this.container),this.indexes.push(g),this.idx=0,this.container=O):this.idx=g,!0}nextSibling(){if(s(this.parents.length===this.indexes.length/2),this.idx>0||this.parents.length===0)return!1;const g=this.indexes[this.indexes.length-1]+1,O=this.parents[this.parents.length-1];return g>=O.length?!1:(s(!isNaN(g)),this.indexes[this.indexes.length-1]=g,this.container=O[g],!0)}_init(g,O,m,S){this.container=g,this.idx=O,this.parents=m.slice(),this.indexes=S.slice()}clone(){const g=new c;return g._init(this.container,this.idx,this.parents,this.indexes),g}*[Symbol.iterator](){if(this.descendFirst()){do yield this.getKey();while(this.nextSibling());this.ascend()}}traverse(g,O){const m=this.getComponent();m&&O(m,g);for(const S of this)g&&g.descend(S),this.traverse(g,O),g&&g.ascend()}eachPick(g,O){this.traverse(g,(m,S)=>{m.p!=null&&O(m.p,S)})}eachDrop(g,O){this.traverse(g,(m,S)=>{m.d!=null&&O(m.d,S)})}}i.ReadCursor=c;class f extends u{constructor(g=null){super(g),this.pendingDescent=[],this._op=g}flushDescent(){s(this.parents.length===this.indexes.length/2),this.container===null&&(this._op=this.container=[]);for(let g=0;g<this.pendingDescent.length;g++){const O=this.pendingDescent[g];let m=this.idx+1;if(m<this.container.length&&o(this.container[m])&&m++,s(m===this.container.length||!o(this.container[m])),m===this.container.length)this.container.push(O),this.idx=m;else if(this.container[m]===O)this.idx=m;else{if(!Array.isArray(this.container[m])){const S=this.container.splice(m,this.container.length-m);this.container.push(S),this.lcIdx>-1&&(this.lcIdx=m)}for(this.indexes.push(this.idx),this.parents.push(this.container),this.lcIdx!==-1&&(s(l(O,this.container[this.lcIdx][0])),m=this.lcIdx+1,this.lcIdx=-1);m<this.container.length&&l(O,this.container[m][0]);)m++;if(this.indexes.push(m),this.idx=0,m<this.container.length&&this.container[m][0]===O)this.container=this.container[m];else{const S=[O];this.container.splice(m,0,S),this.container=S}}}this.pendingDescent.length=0}reset(){this.lcIdx=-1}getComponent(){this.flushDescent();const g=this.idx+1;if(g<this.container.length&&o(this.container[g]))return this.container[g];{const O={};return this.container.splice(g,0,O),O}}write(g,O){const m=this.getComponent();s(m[g]==null||m[g]===O,"Internal consistency error: Overwritten component. File a bug"),m[g]=O}get(){return this._op}descend(g){if(!i.isValidPathItem(g))throw Error("Invalid JSON key");this.pendingDescent.push(g)}descendPath(g){return this.pendingDescent.push(...g),this}ascend(){this.pendingDescent.length?this.pendingDescent.pop():super.ascend()}mergeTree(g,O=a){if(g===null)return;if(s(Array.isArray(g)),g===this._op)throw Error("Cannot merge into my own tree");const m=this.lcIdx,S=this.parents.length;let y=0;for(let b=0;b<g.length;b++){const C=g[b];typeof C=="string"||typeof C=="number"?(y++,this.descend(C)):Array.isArray(C)?this.mergeTree(C,O):typeof C=="object"&&O(C,this)}for(;y--;)this.ascend();this.lcIdx=this.parents.length===S?m:-1}at(g,O){this.descendPath(g),O(this);for(let m=0;m<g.length;m++)this.ascend();return this}writeAtPath(g,O,m){return this.at(g,()=>this.write(O,m)),this.reset(),this}writeMove(g,O,m=0){return this.writeAtPath(g,"p",m).writeAtPath(O,"d",m)}getPath(){const g=super.getPath();return g.push(...this.pendingDescent),g}}i.WriteCursor=f,i.writeCursor=()=>new f,i.readCursor=d=>new c(d);function h(d,g,O){let m,S;S=m=d?d.descendFirst():!1;function y(b){let C;for(;S;){const Q=C=d.getKey();if(b!=null){let _=!1;if(g&&typeof Q=="number"&&(C=g(Q,d.getComponent()),C<0&&(C=~C,_=!0)),l(C,b))return null;if(C===b&&!_)return d}O&&typeof C=="number"&&O(C,d.getComponent()),S=d.nextSibling()}return null}return y.end=()=>{m&&d.ascend()},y}i.advancer=h;function p(d,g,O){let m,S,y,b;for(m=S=d&&d.descendFirst(),y=b=g&&g.descendFirst();m||y;){let C=m?d.getKey():null,Q=y?g.getKey():null;C!==null&&Q!==null&&(l(Q,C)?Q=null:C!==Q&&(C=null)),O(C??Q,C!=null?d:null,Q!=null?g:null),C!=null&&m&&(m=d.nextSibling()),Q!=null&&y&&(y=g.nextSibling())}S&&d.ascend(),b&&g.ascend()}i.eachChildOf=p},{}],2:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});function s(o){if(o===null)return null;if(Array.isArray(o))return o.map(s);if(typeof o=="object"){const l={};for(let a in o)l[a]=s(o[a]);return l}else return o}i.default=s},{}],3:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});function s(a,u){if(Array.isArray(u))return!1;for(let c in a)if(!l(a[c],u[c]))return!1;for(let c in u)if(a[c]===void 0)return!1;return!0}function o(a,u){if(!Array.isArray(u)||a.length!==u.length)return!1;for(let c=0;c<a.length;c++)if(!l(a[c],u[c]))return!1;return!0}function l(a,u){return a===u?!0:a===null||u===null||typeof a!="object"||typeof u!="object"?!1:Array.isArray(a)?o(a,u):s(a,u)}i.default=l},{}],4:[function(n,r,i){var s=this&&this.__createBinding||(Object.create?function(u,c,f,h){h===void 0&&(h=f),Object.defineProperty(u,h,{enumerable:!0,get:function(){return c[f]}})}:function(u,c,f,h){h===void 0&&(h=f),u[h]=c[f]}),o=this&&this.__exportStar||function(u,c){for(var f in u)f!=="default"&&!c.hasOwnProperty(f)&&s(c,u,f)};Object.defineProperty(i,"__esModule",{value:!0}),o(n("./json1.release.js"),i);var l=n("./cursor.js");Object.defineProperty(i,"ReadCursor",{enumerable:!0,get:function(){return l.ReadCursor}}),Object.defineProperty(i,"WriteCursor",{enumerable:!0,get:function(){return l.WriteCursor}});var a=n("./types");Object.defineProperty(i,"ConflictType",{enumerable:!0,get:function(){return a.ConflictType}})},{"./cursor.js":1,"./json1.release.js":5,"./types":6}],5:[function(n,r,i){var s=this&&this.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(i,"__esModule",{value:!0}),i.editOp=i.replaceOp=i.insertOp=i.moveOp=i.removeOp=i.type=void 0;const o=s(n("./deepEqual.js")),l=s(n("./deepClone.js")),a=n("./cursor.js"),u=n("./types.js");function c(I,j){if(!I)throw new Error(j)}i.type={name:"p",uri:"p",readCursor:a.readCursor,writeCursor:a.writeCursor,create:I=>I,isNoop:I=>I==null,setDebug(I){},registerSubtype:C,checkValidOp:M,normalize:N,apply:z,transformPosition:re,transformPresence:se,compose:V,tryTransform:Ke,transform:ct,makeInvertible:Ae,invert:G,invertWithDoc:xe,RM_UNEXPECTED_CONTENT:u.ConflictType.RM_UNEXPECTED_CONTENT,DROP_COLLISION:u.ConflictType.DROP_COLLISION,BLACKHOLE:u.ConflictType.BLACKHOLE,transformNoConflict:(I,j,K)=>yn(()=>!0,I,j,K),typeAllowingConflictsPred:I=>Object.assign(Object.assign({},i.type),{transform:(j,K,ee)=>yn(I,j,K,ee)})};const f=I=>I?I.getComponent():null;function h(I){return I&&typeof I=="object"&&!Array.isArray(I)}const p=I=>Array.isArray(I)?I.slice():I!==null&&typeof I=="object"?Object.assign({},I):I,d=I=>I&&(I.p!=null||I.r!==void 0),g=I=>I&&(I.d!=null||I.i!==void 0);function O(I,j){return c(I!=null),typeof j=="number"?(c(Array.isArray(I),"Invalid key - child is not an array"),(I=I.slice()).splice(j,1)):(c(h(I),"Invalid key - child is not an object"),delete(I=Object.assign({},I))[j]),I}function m(I,j,K){return typeof j=="number"?(c(I!=null,"Container is missing for key"),c(Array.isArray(I),"Cannot use numerical key for object container"),c(I.length>=j,"Cannot insert into out of bounds index"),I.splice(j,0,K)):(c(h(I),"Cannot insert into missing item"),c(I[j]===void 0,"Trying to overwrite value at key. Your op needs to remove it first"),I[j]=K),K}i.removeOp=(I,j=!0)=>a.writeCursor().writeAtPath(I,"r",j).get(),i.moveOp=(I,j)=>a.writeCursor().writeMove(I,j).get(),i.insertOp=(I,j)=>a.writeCursor().writeAtPath(I,"i",j).get(),i.replaceOp=(I,j,K)=>a.writeCursor().at(I,ee=>{ee.write("r",j),ee.write("i",K)}).get(),i.editOp=(I,j,K,ee=!1)=>a.writeCursor().at(I,F=>P(F,j,K,ee)).get();const S=(I,j)=>I!=null&&(typeof j=="number"?Array.isArray(I):typeof I=="object"),y=(I,j)=>S(I,j)?I[j]:void 0,b={};function C(I){let j=I.type?I.type:I;j.name&&(b[j.name]=j),j.uri&&(b[j.uri]=j)}const Q=I=>{const j=b[I];if(j)return j;throw Error("Missing type: "+I)};C(n("ot-text-unicode"));const _=(I,j)=>I+j;C({name:"number",apply:_,compose:_,invert:I=>-I,transform:I=>I});const k=I=>I==null?null:I.et?Q(I.et):I.es?b["text-unicode"]:I.ena!=null?b.number:null,w=I=>I.es?I.es:I.ena!=null?I.ena:I.e,P=(I,j,K,ee=!1)=>{const[F,W]=typeof j=="string"?[Q(j),j]:[j,j.name];!ee&&F.isNoop&&F.isNoop(K)||(W==="number"?I.write("ena",K):W==="text-unicode"?I.write("es",K):(I.write("et",W),I.write("e",K)))};function E(I){c(typeof I=="number"),c(I>=0),c(I===(0|I))}function A(I){typeof I=="number"?E(I):c(typeof I=="string")}function M(I){if(I===null)return;const j=new Set,K=new Set,ee=W=>{let be=!0,Ce=!1;for(let Y in W){const oe=W[Y];if(be=!1,c(Y==="p"||Y==="r"||Y==="d"||Y==="i"||Y==="e"||Y==="es"||Y==="ena"||Y==="et","Invalid component item '"+Y+"'"),Y==="p")E(oe),c(!j.has(oe)),j.add(oe),c(W.r===void 0);else if(Y==="d")E(oe),c(!K.has(oe)),K.add(oe),c(W.i===void 0);else if(Y==="e"||Y==="es"||Y==="ena"){c(!Ce),Ce=!0;const le=k(W);c(le,"Missing type in edit"),le.checkValidOp&&le.checkValidOp(w(W))}}c(!be)},F=(W,be,Ce)=>{if(!Array.isArray(W))throw Error("Op must be null or a list");if(W.length===0)throw Error("Empty descent");be||A(W[0]);let Y=1,oe=0,le=0;for(let ce=0;ce<W.length;ce++){const $e=W[ce];if(c($e!=null),Array.isArray($e)){const Te=F($e,!1);if(oe){const H=typeof le,ne=typeof Te;H===ne?c(le<Te,"descent keys are not in order"):c(H==="number"&&ne==="string")}le=Te,oe++,Y=3}else typeof $e=="object"?(c(Y===1,"Prev not scalar - instead "+Y),ee($e),Y=2):(c(Y!==3),A($e),c(a.isValidPathItem($e),"Invalid path key"),Y=1)}return c(oe!==1,"Operation makes multiple descents. Remove some []"),c(Y===2||Y===3),W[0]};F(I,!0),c(j.size===K.size,"Mismatched picks and drops in op");for(let W=0;W<j.size;W++)c(j.has(W)),c(K.has(W))}function N(I){let j=0,K=[];const ee=a.writeCursor();return ee.mergeTree(I,(F,W)=>{const be=k(F);if(be){const Y=w(F);P(W,be,be.normalize?be.normalize(Y):Y)}for(const Y of["r","p","i","d"])if(F[Y]!==void 0){const oe=Y==="p"||Y==="d"?(Ce=F[Y],K[Ce]==null&&(K[Ce]=j++),K[Ce]):F[Y];W.write(Y,oe)}var Ce}),ee.get()}function z(I,j){if(M(j),j===null)return I;const K=[];return function ee(F,W){let be=F,Ce=0,Y={root:F},oe=0,le=Y,ce="root";function $e(){for(;oe<Ce;oe++){let Te=W[oe];typeof Te!="object"&&(c(S(le,ce)),le=le[ce]=p(le[ce]),ce=Te)}}for(;Ce<W.length;Ce++){const Te=W[Ce];if(Array.isArray(Te)){const H=ee(be,Te);H!==be&&H!==void 0&&($e(),be=le[ce]=H)}else if(typeof Te=="object"){Te.d!=null?($e(),be=m(le,ce,K[Te.d])):Te.i!==void 0&&($e(),be=m(le,ce,Te.i));const H=k(Te);if(H)$e(),be=le[ce]=H.apply(be,w(Te));else if(Te.e!==void 0)throw Error("Subtype "+Te.et+" undefined")}else be=y(be,Te)}return Y.root}(I=function ee(F,W){const be=[];let Ce=0;for(;Ce<W.length;Ce++){const ce=W[Ce];if(Array.isArray(ce))break;typeof ce!="object"&&(be.push(F),F=y(F,ce))}for(let ce=W.length-1;ce>=Ce;ce--)F=ee(F,W[ce]);for(--Ce;Ce>=0;Ce--){const ce=W[Ce];if(typeof ce!="object"){const $e=be.pop();F=F===y($e,ce)?$e:F===void 0?O($e,ce):(oe=ce,le=F,(Y=p(Y=$e))[oe]=le,Y)}else d(ce)&&(c(F!==void 0,"Cannot pick up or remove undefined"),ce.p!=null&&(K[ce.p]=F),F=void 0)}var Y,oe,le;return F}(I,j),j)}function re(I,j){I=I.slice(),M(j);const K=a.readCursor(j);let ee,F,W=!1;const be=[];for(let Y=0;;Y++){const oe=I[Y],le=K.getComponent();if(le&&(le.r!==void 0?W=!0:le.p!=null&&(W=!1,ee=le.p,F=Y)),Y>=I.length)break;let ce=0;const $e=a.advancer(K,void 0,(H,ne)=>{d(ne)&&ce++});be.unshift($e);const Te=$e(oe);if(typeof oe=="number"&&(I[Y]-=ce),!Te)break}if(be.forEach(Y=>Y.end()),W)return null;const Ce=()=>{let Y=0;if(ee!=null){const oe=K.getPath();Y=oe.length,I=oe.concat(I.slice(F))}for(;Y<I.length;Y++){const oe=I[Y],le=f(K),ce=k(le);if(ce){const H=w(le);ce.transformPosition?I[Y]=ce.transformPosition(I[Y],H):ce.transformCursor&&(I[Y]=ce.transformCursor(I[Y],H));break}let $e=0;const Te=a.advancer(K,(H,ne)=>g(ne)?~(H-$e):H-$e,(H,ne)=>{g(ne)&&$e++})(oe);if(typeof oe=="number"&&(I[Y]+=$e),!Te)break}};return ee!=null?K.eachDrop(null,Y=>{Y===ee&&Ce()}):Ce(),I}function se(I,j){if(!I||!I.start||!I.end)return null;const K=re(I.start,j),ee=re(I.end,j);return K&&ee?Object.assign(Object.assign({},I),{start:K,end:ee}):K?Object.assign(Object.assign({},I),{start:K,end:K}):ee?Object.assign(Object.assign({},I),{start:ee,end:ee}):null}function V(I,j){if(M(I),M(j),I==null)return j;if(j==null)return I;let K=0;const ee=a.readCursor(I),F=a.readCursor(j),W=a.writeCursor(),be=[],Ce=[],Y=[],oe=[],le=[],ce=[],$e=new Set;ee.traverse(null,H=>{H.p!=null&&(Y[H.p]=ee.clone())}),F.traverse(null,H=>{H.d!=null&&(oe[H.d]=F.clone())});const Te=a.writeCursor();return function H(ne,ze,Ne,Xe,ft,pr,qt,Xt){c(ze||Ne);const pt=f(ze),Ln=f(Ne),Gn=!!Ln&&Ln.r!==void 0,Ci=!!pt&&pt.i!==void 0,Xn=pt?pt.d:null,_n=Ln?Ln.p:null,Rr=(pr||Gn)&&_n==null;if(_n!=null)Xe=oe[_n],qt=Ce[_n]=new a.WriteCursor;else if(Ln&&Ln.r!==void 0)Xe=null;else{const de=f(Xe);de&&de.d!=null&&(Xe=null)}const Ye=f(Xe);if(Xn!=null)if(ne=Y[Xn],Xt=be[Xn]=new a.WriteCursor,Rr)pr&&!Gn&&Xt.write("r",!0);else{const de=le[Xn]=K++;qt.write("d",de)}else if(pt&&pt.i!==void 0)ne=null;else{const de=f(ne);de&&de.p!=null&&(ne=null)}let pe;Ci?(c(ft===void 0),pe=pt.i):pe=ft;const Me=(_n==null?!Ci||pr||Gn:pe===void 0)?null:qt.getComponent();if(_n!=null){if(!(ft!==void 0||Ci)){const de=Xn!=null?le[Xn]:K++;ce[_n]=de,Xt.write("p",de)}}else Gn&&(Ci||ft!==void 0||(Ln.r,Xt.write("r",Ln.r)));const Se=Rr?null:k(pt),he=k(Ye);if((Se||he)&&(Se&&Se.name,he&&he.name),Se&&he){c(Se===he);const de=w(pt),Le=w(Ye),Tt=Se.compose(de,Le);P(qt,Se,Tt),$e.add(Ye)}else Se?P(qt,Se,w(pt)):he&&(P(qt,he,w(Ye)),$e.add(Ye));const Qe=typeof pe=="object"&&pe!=null;let Be=!1,Fe=0,Ge=0,_t=0,Ct=0,gt=0;const Wt=a.advancer(Xe,(de,Le)=>g(Le)?Ct-de-1:de-Ct,(de,Le)=>{g(Le)&&Ct++}),Ze=a.advancer(ne,(de,Le)=>d(Le)?Fe-de-1:de-Fe,(de,Le)=>{d(Le)&&Fe++});if(a.eachChildOf(ze,Ne,(de,Le,Tt)=>{let nn,Ar,Qi=de,Hn=de,Vs=de;if(typeof de=="number"){let Bt=de+_t;Ar=Wt(Bt),Hn=Bt+Ct;let ht=de+Ge;nn=Ze(ht),g(f(Ar))&&(nn=null),Qi=ht+Fe,Vs=de+gt,c(Qi>=0,"p1PickKey is negative"),c(Hn>=0,"p2DropKey is negative");const Vn=g(f(Le)),Or=d(f(Tt));(Vn||Or&&!Rr)&&gt--,Vn&&Ge--,Or&&_t--}else nn=Ze(de),Ar=Wt(de);Xt.descend(Qi),qt.descend(Hn);const Je=Qe&&!g(f(Le))?pe[Vs]:void 0,gr=H(nn,Le,Tt,Ar,Je,Rr,qt,Xt);var mr,Ee,tt;Qe&&!Rr?Je!==gr&&(Be||(pe=Array.isArray(pe)?pe.slice():Object.assign({},pe),Be=!0),mr=pe,tt=gr,typeof(Ee=Vs)=="number"?(c(Array.isArray(mr)),c(Ee<mr.length)):(c(!Array.isArray(mr)),c(mr[Ee]!==void 0)),tt===void 0?typeof Ee=="number"?mr.splice(Ee,1):delete mr[Ee]:mr[Ee]=tt):c(gr===void 0),qt.ascend(),Xt.ascend()}),Ze.end(),Wt.end(),Me!=null)Me.i=pe;else if(!pr&&!Gn&&_n==null)return pe}(ee,ee.clone(),F,F.clone(),void 0,!1,W,Te),W.reset(),W.mergeTree(Te.get()),W.reset(),W.get(),be.map(H=>H.get()),Ce.map(H=>H.get()),ee.traverse(W,(H,ne)=>{const ze=H.p;if(ze!=null){const Ne=le[ze];Ne!=null&&ne.write("p",Ne);const Xe=be[ze];Xe&&Xe.get(),Xe&&ne.mergeTree(Xe.get())}else H.r!==void 0&&ne.write("r",H.r)}),W.reset(),W.get(),F.traverse(W,(H,ne)=>{const ze=H.d;if(ze!=null){const Xe=ce[ze];Xe!=null&&ne.write("d",Xe);const ft=Ce[ze];ft&&ne.mergeTree(ft.get())}else H.i!==void 0&&ne.write("i",H.i);const Ne=k(H);Ne&&!$e.has(H)&&P(ne,Ne,w(H))}),W.get()}function G(I){if(I==null)return null;const j=new a.ReadCursor(I),K=new a.WriteCursor;let ee;const F=[],W=[];return function be(Ce,Y,oe){const le=Ce.getComponent();let ce,$e=!1;if(le){le.p!=null&&(Y.write("d",le.p),F[le.p]=Ce.clone()),le.r!==void 0&&Y.write("i",le.r),le.d!=null&&(Y.write("p",le.d),oe=void 0),le.i!==void 0&&(oe=ce=le.i);const H=k(le);H&&(oe===void 0?(ee||(ee=new Set),ee.add(le)):(w(le),oe=H.apply(oe,w(le)),$e=!0))}let Te=0;for(const H of Ce){Y.descend(H);const ne=typeof H=="number"?H-Te:H,ze=y(oe,ne);g(Ce.getComponent())&&Te++;const Ne=be(Ce,Y,ze);if(oe!==void 0&&Ne!==void 0){if($e||($e=!0,oe=p(oe)),!S(oe,ne))throw Error("Cannot modify child - invalid operation");oe[ne]=Ne}Y.ascend()}if(ce===void 0)return $e?oe:void 0;Y.write("r",oe)}(j,K,void 0),ee&&(K.reset(),function be(Ce,Y,oe){const le=Y.getComponent();if(le){const H=le.d;if(H!=null&&(Ce=F[H],oe=W[H]=a.writeCursor()),ee.has(le)){const ne=k(le);if(!ne.invert)throw Error("Cannot invert subtype "+ne.name);P(oe,ne,ne.invert(w(le)))}}let ce=0,$e=0;const Te=a.advancer(Ce,(H,ne)=>d(ne)?ce-H-1:H-ce,(H,ne)=>{d(ne)&&ce++});for(const H of Y)if(typeof H=="number"){const ne=H-$e,ze=Te(ne),Ne=ne+ce;oe.descend(Ne),be(ze,Y,oe),g(Y.getComponent())&&$e++,oe.ascend()}else oe.descend(H),be(Te(H),Y,oe),oe.ascend();Te.end()}(j.clone(),j,K),W.length&&(K.reset(),j.traverse(K,(be,Ce)=>{const Y=be.p;if(Y!=null){const oe=W[Y];oe&&oe.get(),oe&&Ce.mergeTree(oe.get())}}))),K.get()}const te=(I,j)=>I.some(K=>typeof K=="object"&&(Array.isArray(K)?te(K,j):j(K)));function Ae(I,j){if(I==null||!te(I,Y=>{var oe;return Y.r!==void 0||((oe=k(Y))===null||oe===void 0?void 0:oe.makeInvertible)!=null}))return I;const K=new a.ReadCursor(I),ee=new a.WriteCursor;let F=!1;const W=[],be=[],Ce=(Y,oe,le)=>{const ce=Y.getComponent();let $e=!1;if(ce){ce.d!=null&&oe.write("d",ce.d),ce.i!==void 0&&oe.write("i",ce.i);const H=ce.p;if(H!=null&&(W[H]=Y.clone(),c(le!==void 0,"Operation picks up at an invalid key"),be[H]=le,oe.write("p",ce.p)),ce.r!==void 0&&le===void 0)throw Error("Invalid doc / op in makeInvertible: removed item missing from doc");const ne=k(ce);ne&&(ne.makeInvertible?F=!0:P(oe,ne,w(ce),!0))}let Te=0;for(const H of Y){oe.descend(H);const ne=typeof H=="number"?H-Te:H,ze=y(le,ne),Ne=Ce(Y,oe,ze);ze!==Ne&&($e||($e=!0,le=p(le)),Ne===void 0?(le=O(le,ne),typeof H=="number"&&Te++):le[ne]=Ne),oe.ascend()}return ce&&(ce.r!==void 0?(oe.write("r",l.default(le)),le=void 0):ce.p!=null&&(le=void 0)),le};return Ce(K,ee,j),ee.get(),F&&(ee.reset(),function Y(oe,le,ce,$e,Te){const H=le.getComponent();if(H){H.i!==void 0?($e=H.i,Te=!0):H.d!=null&&($e=be[H.d],oe=W[H.d],Te=!1,H.d);let Xe=k(H);if(Xe&&Xe.makeInvertible){const ft=w(H);P(ce,Xe,Xe.makeInvertible(ft,$e),!0)}}let ne=0,ze=0;const Ne=a.advancer(oe,(Xe,ft)=>d(ft)?ne-Xe-1:Xe-ne,(Xe,ft)=>{d(ft)&&ne++});for(const Xe of le)if(typeof Xe=="number"){const ft=Xe-ze,pr=Ne(ft),qt=ft+ne,Xt=y($e,Te?ft:qt);ce.descend(Xe),Y(pr,le,ce,Xt,Te),g(le.getComponent())&&ze++,ce.ascend()}else{const ft=y($e,Xe);ce.descend(Xe),Y(Ne(Xe),le,ce,ft,Te),ce.ascend()}Ne.end()}(K.clone(),K,ee,j,!1)),ee.get()}function xe(I,j){return G(Ae(I,j))}const je=I=>{if(I==null)return null;const j=I.slice();for(let K=0;K<I.length;K++){const ee=j[K];Array.isArray(ee)&&(j[K]=je(ee))}return j};function Ke(I,j,K){c(K==="left"||K==="right","Direction must be left or right");const ee=K==="left"?0:1;if(j==null)return{ok:!0,result:I};M(I),M(j);let F=null;const W=[],be=[],Ce=[],Y=[],oe=[],le=[],ce=[],$e=[],Te=[],H=[],ne=[],ze=[],Ne=[],Xe=[],ft=[];let pr=0;const qt=a.readCursor(I),Xt=a.readCursor(j),pt=a.writeCursor();if(function Ye(pe,Me=null,Se){const he=f(Me);he&&(he.r!==void 0?Se=Me.clone():he.p!=null&&(Se=null,le[he.p]=pe.clone()));const Qe=pe.getComponent();let Be;Qe&&(Be=Qe.p)!=null&&(oe[Be]=Me?Me.clone():null,Ce[Be]=pe.clone(),Se&&(H[Be]=!0,Te[Be]=Se),he&&he.p!=null&&(Xe[Be]=he.p));const Fe=a.advancer(Me);for(const Ge of pe)Ye(pe,Fe(Ge),Se);Fe.end()}(Xt,qt,null),function Ye(pe,Me,Se,he,Qe){const Be=Se.getComponent();let Fe,Ge=!1;Be&&((Fe=Be.d)!=null?(Y[Fe]=Se.clone(),he!=null&&(ft[he]==null&&(ft[he]=[]),ft[he].push(Fe)),pe=oe[Fe]||null,Me=Ce[Fe]||null,H[Fe]?(Qe&&(ne[Fe]=!0),Qe=Te[Fe]||null):!Qe||ee!==1&&Xe[Fe]!=null||F==null&&(F={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:i.removeOp(Qe.getPath()),op2:i.moveOp(Me.getPath(),Se.getPath())}),Ge=!0):Be.i!==void 0&&(pe=Me=null,Ge=!0,Qe&&F==null&&(F={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:i.removeOp(Qe.getPath()),op2:i.insertOp(Se.getPath(),Be.i)})));const _t=f(pe);_t&&(_t.r!==void 0?Qe=pe.clone():_t.p!=null&&(_t.p,he=_t.p,Qe=null));const Ct=k(Be);Ct&&Qe&&F==null&&(F={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:i.removeOp(Qe.getPath()),op2:i.editOp(Se.getPath(),Ct,w(Be),!0)});let gt=0,Wt=0;const Ze=a.advancer(Me,(Le,Tt)=>d(Tt)?gt-Le-1:Le-gt,(Le,Tt)=>{d(Tt)&&gt++}),de=a.advancer(pe);for(const Le of Se)if(typeof Le=="number"){const Tt=Le-Wt,nn=Ze(Tt);Wt+=+Ye(de(Tt+gt),nn,Se,he,Qe)}else{const Tt=Ze(Le);Ye(de(Le),Tt,Se,he,Qe)}return Ze.end(),de.end(),Ge}(qt,Xt,Xt.clone(),null,null),Y.map(Ye=>Ye&&Ye.get()),F)return{ok:!1,conflict:F};ne.map(Ye=>!!Ye);const Ln=[];let Gn=null;(function Ye(pe,Me,Se,he,Qe){let Be=!1;const Fe=f(Me);if(d(Fe)){const Ze=Fe.p;Ze!=null?(Se=Y[Ze],he=ze[Ze]=a.writeCursor(),Be=!0,Qe=null):(Se=null,Qe=Me.clone())}else g(f(Se))&&(Se=null);const Ge=pe.getComponent();if(Ge){const Ze=Ge.p;Ze!=null?(Qe&&($e[Ze]=Qe),Ln[Ze]=Qe||ee===1&&Be?null:he.getComponent(),W[Ze]=pe.clone(),Se&&(ce[Ze]=Se.clone())):Ge.r!==void 0&&(Qe||he.write("r",!0),(Qe||Be)&&(Gn==null&&(Gn=new Set),Gn.add(Ge)))}let _t=0,Ct=0;const gt=a.advancer(Me,void 0,(Ze,de)=>{d(de)&&_t++}),Wt=a.advancer(Se,(Ze,de)=>g(de)?~(Ze-Ct):Ze-Ct,(Ze,de)=>{g(de)&&Ct++});if(pe)for(const Ze of pe)if(typeof Ze=="string"){const de=gt(Ze),Le=Wt(Ze);he.descend(Ze),Ye(pe,de,Le,he,Qe),he.ascend()}else{const de=gt(Ze),Le=Ze-_t,Tt=d(f(de))?null:Wt(Le),nn=Le+Ct;c(nn>=0),he.descend(nn),Ye(pe,de,Tt,he,Qe),he.ascend()}gt.end(),Wt.end()})(qt,Xt,Xt.clone(),pt,null),pt.reset();let Ci=[];if(function Ye(pe,Me,Se,he,Qe,Be){c(Me);const Fe=Me.getComponent();let Ge=f(he),_t=!1;const Ct=(Ee,tt,Bt)=>Ee?i.moveOp(Ee.getPath(),tt.getPath()):i.insertOp(tt.getPath(),Bt.i);if(g(Fe)){const Ee=Fe.d;Ee!=null&&(be[Ee]=Me.clone());const tt=Ee!=null?Ln[Ee]:null;let Bt=!1;if(Fe.i!==void 0||Ee!=null&&tt){let ht;Ge&&(Ge.i!==void 0||(ht=Ge.d)!=null&&!H[ht])&&(Bt=ht!=null?Ee!=null&&Ee===Xe[ht]:o.default(Ge.i,Fe.i),Bt||ht!=null&&ee!==1&&Xe[ht]!=null||F==null&&(F={type:u.ConflictType.DROP_COLLISION,op1:Ct(Ee!=null?W[Ee]:null,Me,Fe),op2:Ct(ht!=null?Ce[ht]:null,he,Ge)})),Bt||(Be?F==null&&(F={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:Ct(Ee!=null?W[Ee]:null,Me,Fe),op2:i.removeOp(Be.getPath())}):(Ee!=null?(Ci[pr]=Ee,Qe.write("d",tt.p=pr++)):Qe.write("i",l.default(Fe.i)),_t=!0))}else if(Ee!=null&&!tt){const ht=$e[Ee];ht&&(Be=ht.clone())}Ee!=null?(pe=W[Ee],Se=le[Ee],he=ce[Ee]):Fe.i!==void 0&&(pe=Se=null,Bt||(he=null))}else d(f(pe))&&(pe=Se=he=null);const gt=f(pe),Wt=f(Se);if(d(Wt)){const Ee=Wt.p;Wt.r!==void 0&&(!gt||gt.r===void 0)||H[Ee]?(he=null,Be=Se.clone()):Ee!=null&&(he=Y[Ee],ee!==1&&Xe[Ee]!=null||((Qe=Ne[Ee])||(Qe=Ne[Ee]=a.writeCursor()),Qe.reset(),Be=null))}else!g(Fe)&&g(Ge)&&(he=null);Ge=he!=null?he.getComponent():null;const Ze=k(Fe);if(Ze){const Ee=w(Fe);if(Be)F==null&&(F={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:i.editOp(Me.getPath(),Ze,Ee,!0),op2:i.removeOp(Be.getPath())});else{const tt=k(Ge);let Bt;if(tt){if(Ze!==tt)throw Error("Transforming incompatible types");const ht=w(Ge);Bt=Ze.transform(Ee,ht,K)}else Bt=l.default(Ee);P(Qe,Ze,Bt)}}let de=0,Le=0,Tt=0,nn=0,Ar=0,Qi=0,Hn=pe!=null&&pe.descendFirst(),Vs=Hn;const Je=a.advancer(Se,void 0,(Ee,tt)=>{d(tt)&&Tt++});let gr=he!=null&&he.descendFirst(),mr=gr;for(const Ee of Me)if(typeof Ee=="number"){let tt;const Bt=g(Me.getComponent()),ht=Ee-Le;{let qr;for(;Hn&&typeof(qr=pe.getKey())=="number";){qr+=de;const Kn=pe.getComponent(),Hi=d(Kn);if(qr>ht||qr===ht&&(!Hi||ee===0&&Bt))break;if(Hi){de--;const Ei=Kn.p;Xe.includes(Ei),Kn.d,f(Ne[Kn.d]),d(f(Ne[Kn.d])),(Kn.r===void 0||Gn&&Gn.has(Kn))&&(Ei==null||!Ln[Ei]||ee!==1&&Xe.includes(Ei))||Ar--}Hn=pe.nextSibling()}tt=Hn&&qr===ht?pe:null}const Vn=ht-de;let Or=Je(Vn);const zl=Vn-Tt;let bo=null;{let qr,Kn;for(;gr&&typeof(qr=he.getKey())=="number";){Kn=qr-nn;const Hi=he.getComponent(),Ei=g(Hi);if(Kn>zl)break;if(Kn===zl){if(!Ei){bo=he;break}{if(ee===0&&Bt){bo=he;break}const $i=Or&&d(Or.getComponent());if(ee===0&&$i)break}}if(Ei){const $i=Hi.d;Xe[$i],Hi.i===void 0&&(H[$i]||Xe[$i]!=null&&ee!==1)?(H[$i]||Xe[$i]!=null&&ee===0)&&(nn++,Qi--):nn++}gr=he.nextSibling()}}const tc=zl+nn+Ar+Qi;c(tc>=0,"trying to descend to a negative index"),Qe.descend(tc),Bt&&(tt=Or=bo=null,Le++),Ye(tt,Me,Or,bo,Qe,Be)&&Qi++,Qe.ascend()}else{let tt;for(;Hn&&(tt=pe.getKey(),typeof tt!="string"||!(tt>Ee||tt===Ee));)Hn=pe.nextSibling();const Bt=Hn&&tt===Ee?pe:null,ht=Je(Ee);let Vn;for(;gr&&(Vn=he.getKey(),typeof Vn!="string"||!(Vn>Ee||Vn===Ee));)gr=he.nextSibling();const Or=gr&&Vn===Ee?he:null;Qe.descend(Ee),Ye(Bt,Me,ht,Or,Qe,Be),Qe.ascend()}return Je.end(),Vs&&pe.ascend(),mr&&he.ascend(),_t}(qt,qt.clone(),Xt,Xt.clone(),pt,null),F)return{ok:!1,conflict:F};pt.reset();const Xn=(Ye,pe,Me)=>Ye.traverse(pe,(Se,he)=>{Se.d!=null&&Me(Se.d,Ye,he)});(H.length||ze.length)&&(Xn(Xt,pt,(Ye,pe,Me)=>{H[Ye]&&!ne[Ye]&&Me.write("r",!0),ze[Ye]&&Me.mergeTree(ze[Ye].get())}),pt.reset());const _n=[],Rr=[];if((Ne.length||H.length)&&!F){const Ye=a.readCursor(je(pt.get()));if(Xn(Ye,null,(pe,Me)=>{_n[pe]=Me.clone()}),Ne.forEach(pe=>{pe&&Xn(a.readCursor(pe.get()),null,(Me,Se)=>{_n[Me]=Se.clone()})}),function pe(Me,Se,he,Qe,Be,Fe){const Ge=f(Se);if(Ge&&d(Ge))if(Ge.p!=null){const de=Ge.p;_n[de].getPath(),he=_n[de],Qe=Rr[de]=a.writeCursor()}else Ge.r!==void 0&&(he=null);else g(f(he))&&(he=null);const _t=Me.getComponent();if(_t){let de;if((de=_t.d)!=null){const Le=Ne[de];Le&&(Le.get(),Qe.mergeTree(Le.get()),he=a.readCursor(Le.get()))}}let Ct=0,gt=0;const Wt=a.advancer(Se,void 0,(de,Le)=>{d(Le)&&Ct--}),Ze=a.advancer(he,(de,Le)=>g(Le)?-(de-gt)-1:de-gt,(de,Le)=>{g(Le)&&gt++});for(const de of Me)if(typeof de=="number"){const Le=Wt(de),Tt=de+Ct,nn=Ze(Tt),Ar=Tt+gt;Qe.descend(Ar),pe(Me,Le,nn,Qe),Qe.ascend()}else Qe.descend(de),pe(Me,Wt(de),Ze(de),Qe),Qe.ascend();Wt.end(),Ze.end()}(Xt,Ye,Ye.clone(),pt),pt.reset(),F)return{ok:!1,conflict:F};if(pt.get(),Rr.length){const pe=Rr.map(Se=>Se?Se.get():null),Me=a.readCursor(je(pt.get()));if(Xn(Me,pt,(Se,he,Qe)=>{const Be=pe[Se];Be&&(Qe.mergeTree(Be),pe[Se]=null)}),pe.find(Se=>Se)){const Se=a.writeCursor(),he=a.writeCursor();let Qe=0,Be=0;pe.forEach(Fe=>{Fe!=null&&Xn(a.readCursor(Fe),null,Ge=>{const _t=Ci[Ge];Se.writeMove(W[_t].getPath(),be[_t].getPath(),Qe++);const Ct=ft[_t];Ct&&Ct.forEach(gt=>{H[gt]||ee!==1&&Xe[gt]!=null||he.writeMove(Ce[gt].getPath(),Y[gt].getPath(),Be++)})})}),F={type:u.ConflictType.BLACKHOLE,op1:Se.get(),op2:he.get()}}}}return F?{ok:!1,conflict:F}:{ok:!0,result:pt.get()}}const Pt=I=>{const j=new Error("Transform detected write conflict");throw j.conflict=I,j.type=j.name="writeConflict",j};function ct(I,j,K){const ee=Ke(I,j,K);if(ee.ok)return ee.result;Pt(ee.conflict)}const ut=I=>{const j=a.writeCursor();return a.readCursor(I).traverse(j,(K,ee)=>{(g(K)||k(K))&&ee.write("r",!0)}),j.get()},$n=(I,j)=>{const{type:K,op1:ee,op2:F}=I;switch(K){case u.ConflictType.DROP_COLLISION:return j==="left"?[null,ut(F)]:[ut(ee),null];case u.ConflictType.RM_UNEXPECTED_CONTENT:let W=!1;return a.readCursor(ee).traverse(null,be=>{be.r!==void 0&&(W=!0)}),W?[null,ut(F)]:[ut(ee),null];case u.ConflictType.BLACKHOLE:return[ut(ee),ut(F)];default:throw Error("Unrecognised conflict: "+K)}};function yn(I,j,K,ee){let F=null;for(;;){const W=Ke(j,K,ee);if(W.ok)return V(F,W.result);{const{conflict:be}=W;I(be)||Pt(be);const[Ce,Y]=$n(be,ee);j=V(N(j),Ce),K=V(N(K),Y),F=V(F,Y)}}}},{"./cursor.js":1,"./deepClone.js":2,"./deepEqual.js":3,"./types.js":6,"ot-text-unicode":8}],6:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.ConflictType=void 0,function(s){s[s.RM_UNEXPECTED_CONTENT=1]="RM_UNEXPECTED_CONTENT",s[s.DROP_COLLISION=2]="DROP_COLLISION",s[s.BLACKHOLE=3]="BLACKHOLE"}(i.ConflictType||(i.ConflictType={}))},{}],7:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});const s=n("./type"),o=n("unicount");function l(a,u){return{get:a,getLength(){return a().length},insert(c,f,h){const p=o.strPosToUni(a(),c);return u([p,f],h)},remove(c,f,h){const p=o.strPosToUni(a(),c);return u([p,{d:f}],h)},_onOp(c){s.eachOp(c,(f,h,p)=>{switch(typeof f){case"string":this.onInsert&&this.onInsert(p,f);break;case"object":const d=s.dlen(f.d);this.onRemove&&this.onRemove(p,d)}})},onInsert:null,onRemove:null}}i.default=l,l.provides={text:!0}},{"./type":9,unicount:10}],8:[function(n,r,i){var s=this&&this.__createBinding||(Object.create?function(O,m,S,y){y===void 0&&(y=S),Object.defineProperty(O,y,{enumerable:!0,get:function(){return m[S]}})}:function(O,m,S,y){y===void 0&&(y=S),O[y]=m[S]}),o=this&&this.__setModuleDefault||(Object.create?function(O,m){Object.defineProperty(O,"default",{enumerable:!0,value:m})}:function(O,m){O.default=m}),l=this&&this.__importStar||function(O){if(O&&O.__esModule)return O;var m={};if(O!=null)for(var S in O)Object.hasOwnProperty.call(O,S)&&s(m,O,S);return o(m,O),m},a=this&&this.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(i,"__esModule",{value:!0}),i.type=i.remove=i.insert=void 0;const u=n("unicount"),c=l(n("./type")),f=a(n("./api")),h={create(O){return O},toString(O){return O},builder(O){if(typeof O!="string")throw Error("Invalid document snapshot: "+O);const m=[];return{skip(S){let y=u.uniToStrPos(O,S);if(y>O.length)throw Error("The op is too long for this document");m.push(O.slice(0,y)),O=O.slice(y)},append(S){m.push(S)},del(S){O=O.slice(u.uniToStrPos(O,S))},build(){return m.join("")+O}}},slice:c.uniSlice},p=c.default(h),d=Object.assign(Object.assign({},p),{api:f.default});i.type=d,i.insert=(O,m)=>m.length===0?[]:O===0?[m]:[O,m],i.remove=(O,m)=>c.dlen(m)===0?[]:O===0?[{d:m}]:[O,{d:m}];var g=n("./type");Object.defineProperty(i,"makeType",{enumerable:!0,get:function(){return g.default}})},{"./api":7,"./type":9,unicount:10}],9:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniSlice=i.dlen=i.eachOp=void 0;const s=n("unicount"),o=w=>{if(!Array.isArray(w))throw Error("Op must be an array of components");let P=null;for(let E=0;E<w.length;E++){const A=w[E];switch(typeof A){case"object":if(typeof A.d!="number"&&typeof A.d!="string")throw Error("Delete must be number or string");if(i.dlen(A.d)<=0)throw Error("Deletes must not be empty");break;case"string":if(!(A.length>0))throw Error("Inserts cannot be empty");break;case"number":if(!(A>0))throw Error("Skip components must be >0");if(typeof P=="number")throw Error("Adjacent skip components should be combined");break}P=A}if(typeof P=="number")throw Error("Op has a trailing skip")};function l(w,P){let E=0,A=0;for(let M=0;M<w.length;M++){const N=w[M];switch(P(N,E,A),typeof N){case"object":E+=i.dlen(N.d);break;case"string":A+=s.strPosToUni(N);break;case"number":E+=N,A+=N;break}}}i.eachOp=l;function a(w,P){const E=[],A=f(E);return l(w,(M,N,z)=>{A(P(M,N,z))}),g(E)}const u=w=>w,c=w=>a(w,u);i.dlen=w=>typeof w=="number"?w:s.strPosToUni(w);const f=w=>P=>{if(!(!P||P.d===0||P.d===""))if(w.length===0)w.push(P);else if(typeof P==typeof w[w.length-1])if(typeof P=="object"){const E=w[w.length-1];E.d=typeof E.d=="string"&&typeof P.d=="string"?E.d+P.d:i.dlen(E.d)+i.dlen(P.d)}else w[w.length-1]+=P;else w.push(P)},h=w=>typeof w=="number"?w:typeof w=="string"?s.strPosToUni(w):typeof w.d=="number"?w.d:s.strPosToUni(w.d);i.uniSlice=(w,P,E)=>{const A=s.uniToStrPos(w,P),M=E==null?1/0:s.uniToStrPos(w,E);return w.slice(A,M)};const p=(w,P,E)=>typeof w=="number"?E==null?w-P:Math.min(w,E)-P:i.uniSlice(w,P,E),d=w=>{let P=0,E=0;return{take:(N,z)=>{if(P===w.length)return N===-1?null:N;const re=w[P];let se;if(typeof re=="number")return N===-1||re-E<=N?(se=re-E,++P,E=0,se):(E+=N,N);if(typeof re=="string"){if(N===-1||z==="i"||s.strPosToUni(re.slice(E))<=N)return se=re.slice(E),++P,E=0,se;{const V=E+s.uniToStrPos(re.slice(E),N);return se=re.slice(E,V),E=V,se}}else{if(N===-1||z==="d"||i.dlen(re.d)-E<=N)return se={d:p(re.d,E)},++P,E=0,se;{let V=p(re.d,E,E+N);return E+=N,{d:V}}}},peek:()=>w[P]}},g=w=>(w.length>0&&typeof w[w.length-1]=="number"&&w.pop(),w);function O(w,P,E){if(E!=="left"&&E!=="right")throw Error("side ("+E+") must be 'left' or 'right'");o(w),o(P);const A=[],M=f(A),{take:N,peek:z}=d(w);for(let se=0;se<P.length;se++){const V=P[se];let G,te;switch(typeof V){case"number":for(G=V;G>0;)te=N(G,"i"),M(te),typeof te!="string"&&(G-=h(te));break;case"string":E==="left"&&typeof z()=="string"&&M(N(-1)),M(s.strPosToUni(V));break;case"object":for(G=i.dlen(V.d);G>0;)switch(te=N(G,"i"),typeof te){case"number":G-=te;break;case"string":M(te);break;case"object":G-=i.dlen(te.d)}break}}let re;for(;re=N(-1);)M(re);return g(A)}function m(w,P){o(w),o(P);const E=[],A=f(E),{take:M}=d(w);for(let z=0;z<P.length;z++){const re=P[z];let se,V;switch(typeof re){case"number":for(se=re;se>0;)V=M(se,"d"),A(V),typeof V!="object"&&(se-=h(V));break;case"string":A(re);break;case"object":se=i.dlen(re.d);let G=0;for(;G<se;)switch(V=M(se-G,"d"),typeof V){case"number":A({d:p(re.d,G,G+V)}),G+=V;break;case"string":G+=s.strPosToUni(V);break;case"object":A(V)}break}}let N;for(;N=M(-1);)A(N);return g(E)}const S=(w,P)=>{let E=0;for(let A=0;A<P.length&&w>E;A++){const M=P[A];switch(typeof M){case"number":{E+=M;break}case"string":const N=s.strPosToUni(M);E+=N,w+=N;break;case"object":w-=Math.min(i.dlen(M.d),w-E);break}}return w},y=(w,P)=>typeof w=="number"?S(w,P):w.map(E=>S(E,P));function b(w,P,E){return a(w,(A,M)=>typeof A=="object"&&typeof A.d=="number"?{d:E.slice(P,M,M+A.d)}:A)}function C(w){return a(w,P=>{switch(typeof P){case"object":if(typeof P.d=="number")throw Error("Cannot invert text op: Deleted characters missing from operation. makeInvertible must be called first.");return P.d;case"string":return{d:P};case"number":return P}})}function Q(w){return a(w,P=>typeof P=="object"&&typeof P.d=="string"?{d:s.strPosToUni(P.d)}:P)}function _(w){let P=!0;return l(w,E=>{typeof E=="object"&&typeof E.d=="number"&&(P=!1)}),P}function k(w){return{name:"text-unicode",uri:"http://sharejs.org/types/text-unicode",trim:g,normalize:c,checkOp:o,create(P=""){if(typeof P!="string")throw Error("Initial data must be a string");return w.create(P)},apply(P,E){o(E);const A=w.builder(P);for(let M=0;M<E.length;M++){const N=E[M];switch(typeof N){case"number":A.skip(N);break;case"string":A.append(N);break;case"object":A.del(i.dlen(N.d));break}}return A.build()},transform:O,compose:m,transformPosition:S,transformSelection:y,isInvertible:_,makeInvertible(P,E){return b(P,E,w)},stripInvertible:Q,invert:C,invertWithDoc(P,E){return C(b(P,E,w))},isNoop:P=>P.length===0}}i.default=k},{unicount:10}],10:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniToStrPos=i.strPosToUni=void 0,i.strPosToUni=(s,o=s.length)=>{let l=0,a=0;for(;a<o;a++){const u=s.charCodeAt(a);u>=55296&&u<=57343&&(l++,a++)}if(a!==o)throw Error("Invalid offset - splits unicode bytes");return a-l},i.uniToStrPos=(s,o)=>{let l=0;for(;o>0;o--){const a=s.charCodeAt(l);l+=a>=55296&&a<=57343?2:1}return l}},{}],11:[function(n,r,i){const s=n("ot-json1-presence"),o=n("ot-text-unicode");r.exports={json1Presence:s,textUnicode:o}},{"ot-json1-presence":4,"ot-text-unicode":8}]},{},[11])(11)})})(kC);var vM=kC.exports;const yM=Ds(vM),{json1Presence:ev,textUnicode:xC}=yM,kS=()=>Math.floor(Math.random()*1e10)+"";class et{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,n,r){let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),ci.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let r=[];return this.decompose(e,n,r,0),ci.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Ba(this),s=new Ba(e);for(let o=n,l=n;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new Ba(this,e)}iterRange(e,n=this.length){return new PC(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new CC(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]?et.empty:e.length<=32?new Ft(e):ci.from(Ft.split(e,[]))}}class Ft extends et{constructor(e,n=SM(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],l=i+o.length;if((n?r:l)>=e)return new bM(i,l,r,o);i=l+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new Ft(xS(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),l=_f(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new Ft(l,o.length+s.length));else{let a=l.length>>1;r.push(new Ft(l.slice(0,a)),new Ft(l.slice(a)))}}else r.push(s)}replace(e,n,r){if(!(r instanceof Ft))return super.replace(e,n,r);let i=_f(this.text,_f(r.text,xS(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new Ft(i,s):ci.from(Ft.split(i,[]),s)}sliceString(e,n=this.length,r=`
41
- `){let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(i+=r),e<a&&n>s&&(i+=l.slice(Math.max(0,e-s),n-s)),s=a+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new Ft(r,i)),r=[],i=-1);return i>-1&&n.push(new Ft(r,i)),n}}class ci extends et{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],l=i+o.length,a=r+o.lines-1;if((n?a:l)>=e)return o.lineInner(e,n,r,i);i=l+1,r=a+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&n>=o){let u=i&((o<=e?1:0)|(a>=n?2:0));o>=e&&a<=n&&!u?r.push(l):l.decompose(e-o,n-o,r,u)}o=a+1}}replace(e,n,r){if(r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e>=s&&n<=l){let a=o.replace(e-s,n-s,r),u=this.lines-o.lines+a.lines;if(a.lines<u>>5-1&&a.lines>u>>5+1){let c=this.children.slice();return c[i]=a,new ci(c,this.length-(n-e)+r.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
42
- `){let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(i+=r),e<a&&n>o&&(i+=l.sliceString(e-o,n-o,r)),o=a+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof ci))return 0;let r=0,[i,s,o,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==l)return r;let a=this.children[i],u=e.children[s];if(a!=u)return r+a.scanIdentical(u,n);r+=a.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let p of e)r+=p.lines;if(r<32){let p=[];for(let d of e)d.flatten(p);return new Ft(p,n)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,l=[],a=0,u=-1,c=[];function f(p){let d;if(p.lines>s&&p instanceof ci)for(let g of p.children)f(g);else p.lines>o&&(a>o||!a)?(h(),l.push(p)):p instanceof Ft&&a&&(d=c[c.length-1])instanceof Ft&&p.lines+d.lines<=32?(a+=p.lines,u+=p.length+1,c[c.length-1]=new Ft(d.text.concat(p.text),d.length+1+p.length)):(a+p.lines>i&&h(),a+=p.lines,u+=p.length+1,c.push(p))}function h(){a!=0&&(l.push(c.length==1?c[0]:ci.from(c,u)),u=-1,a=c.length=0)}for(let p of e)f(p);return h(),l.length==1?l[0]:new ci(l,n)}}et.empty=new Ft([""],0);function SM(t){let e=-1;for(let n of t)e+=n.length+1;return e}function _f(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let l=t[s],a=i+l.length;a>=n&&(a>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),o?(e[e.length-1]+=l,o=!1):e.push(l)),i=a+1}return e}function xS(t,e,n){return _f(t,[""],e,n)}class Ba{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Ft?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,l=i instanceof Ft?i.text.length:i.children.length;if(o==(n>0?l:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
43
- `,this;e--}else if(i instanceof Ft){let a=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,a.length>Math.max(0,e))return this.value=e==0?a:n>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=i.children[o+(n<0?-1:0)];e>a.length?(e-=a.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(a),this.offsets.push(n>0?1:(a instanceof Ft?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class PC{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Ba(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<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)*n,this.value=i.length<=r?i:n<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 CC{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n?(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"&&(et.prototype[Symbol.iterator]=function(){return this.iter()},Ba.prototype[Symbol.iterator]=PC.prototype[Symbol.iterator]=CC.prototype[Symbol.iterator]=function(){return this});let bM=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}},ll="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(t=>t?parseInt(t,36):1);for(let t=1;t<ll.length;t++)ll[t]+=ll[t-1];function wM(t){for(let e=1;e<ll.length;e+=2)if(ll[e]>t)return ll[e-1]<=t;return!1}function PS(t){return t>=127462&&t<=127487}const CS=8205;function Rn(t,e,n=!0,r=!0){return(n?QC:kM)(t,e,r)}function QC(t,e,n){if(e==t.length)return e;e&&EC(t.charCodeAt(e))&&$C(t.charCodeAt(e-1))&&e--;let r=dn(t,e);for(e+=br(r);e<t.length;){let i=dn(t,e);if(r==CS||i==CS||n&&wM(i))e+=br(i),r=i;else if(PS(i)){let s=0,o=e-2;for(;o>=0&&PS(dn(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function kM(t,e,n){for(;e>0;){let r=QC(t,e-2,n);if(r<e)return r;e--}return 0}function EC(t){return t>=56320&&t<57344}function $C(t){return t>=55296&&t<56320}function dn(t,e){let n=t.charCodeAt(e);if(!$C(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return EC(r)?(n-55296<<10)+(r-56320)+65536:n}function tv(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function br(t){return t<65536?1:2}const Lm=/\r\n?|\n/;var gn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(gn||(gn={}));class Oi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){Xm(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Oi(e)}composeDesc(e){return this.empty?e:e.empty?this:_C(this,e)}mapDesc(e,n=!1){return e.empty?this:Vm(this,e,n)}mapPos(e,n=-1,r=gn.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],u=i+l;if(a<0){if(u>e)return s+(e-i);s+=l}else{if(r!=gn.Simple&&u>=e&&(r==gn.TrackDel&&i<e&&u>e||r==gn.TrackBefore&&i<e||r==gn.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!l)return e==i||n<0?s:s+a;s+=a}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],l=i+s;if(o>=0&&i<=n&&l>=e)return i<e&&l>n?"cover":!0;i=l}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Oi(e)}static create(e){return new Oi(e)}}class Ht extends Oi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Xm(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return Vm(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=o;let a=i>>1;for(;r.length<a;)r.push(et.empty);r.push(o?e.slice(s,s+o):et.empty)}s+=o}return new Ht(n,r)}compose(e){return this.empty?e:e.empty?this:_C(this,e,!0)}map(e,n=!1){return e.empty?this:Vm(this,e,n,!0)}iterChanges(e,n=!1){Xm(this,e,n)}get desc(){return Oi.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new hu(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,a-l);xn(i,c,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;xn(n,c,f),f>0&&ps(r,n,s.text),s.forward(c),l+=c}let u=e[o++];for(;l<u;){if(s.done)break e;let c=Math.min(s.len,u-l);xn(n,c,-1),xn(i,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),l+=c}}return{changes:new Ht(n,r),filtered:Oi.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,l=null;function a(c=!1){if(!c&&!i.length)return;o<n&&xn(i,n-o,-1);let f=new Ht(i,s);l=l?l.compose(f.map(l)):f,i=[],s=[],o=0}function u(c){if(Array.isArray(c))for(let f of c)u(f);else if(c instanceof Ht){if(c.length!=n)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:h=f,insert:p}=c;if(f>h||f<0||h>n)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${n})`);let d=p?typeof p=="string"?et.of(p.split(r||Lm)):p:et.empty,g=d.length;if(f==h&&g==0)return;f<o&&a(),f>o&&xn(i,f-o,-1),xn(i,h-f,g),ps(s,i,d),o=h}}return u(e),a(!l),l}static empty(e){return new Ht(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;r.length<i;)r.push(et.empty);r[i]=et.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new Ht(n,r)}static createSet(e,n){return new Ht(e,n)}}function xn(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function ps(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(et.empty);t.push(n)}}function Xm(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let l=t.sections[o++],a=t.sections[o++];if(a<0)i+=l,s+=l;else{let u=i,c=s,f=et.empty;for(;u+=l,c+=a,a&&r&&(f=f.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],a=t.sections[o++];e(i,u,s,c,f),i=u,s=c}}}function Vm(t,e,n,r=!1){let i=[],s=r?[]:null,o=new hu(t),l=new hu(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let u=Math.min(o.len,l.len);xn(i,u,-1),o.forward(u),l.forward(u)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!n))){let u=l.len;for(xn(i,l.ins,-1);u;){let c=Math.min(o.len,u);o.ins>=0&&a<o.i&&o.len<=c&&(xn(i,0,o.ins),s&&ps(s,i,o.text),a=o.i),o.forward(c),u-=c}l.next()}else if(o.ins>=0){let u=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);u+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;xn(i,u,a<o.i?o.ins:0),s&&a<o.i&&ps(s,i,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return s?Ht.createSet(i,s):Oi.create(i);throw new Error("Mismatched change set lengths")}}function _C(t,e,n=!1){let r=[],i=n?[]:null,s=new hu(t),o=new hu(e);for(let l=!1;;){if(s.done&&o.done)return i?Ht.createSet(r,i):Oi.create(r);if(s.ins==0)xn(r,s.len,0,l),s.next();else if(o.len==0&&!o.done)xn(r,0,o.ins,l),i&&ps(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),u=r.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;xn(r,a,c,l),i&&c&&ps(i,r,o.text)}else o.ins==-1?(xn(r,s.off?0:s.len,a,l),i&&ps(i,r,s.textBit(a))):(xn(r,s.off?0:s.len,o.off?0:o.ins,l),i&&!o.off&&ps(i,r,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||r.length>u),s.forward2(a),o.forward(a)}}}}class hu{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,n=this.i-2>>1;return n>=e.length?et.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?et.empty:n[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 Js{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Js(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Z.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Z.range(this.anchor,r)}eq(e){return this.anchor==e.anchor&&this.head==e.head}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 Z.range(e.anchor,e.head)}static create(e,n,r){return new Js(e,n,r)}}class Z{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Z.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Z([this.main],0)}addRange(e,n=!0){return Z.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,Z.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 Z(e.ranges.map(n=>Js.fromJSON(n)),e.main)}static single(e,n=e){return new Z([Z.range(e,n)],0)}static create(e,n=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 Z.normalized(e.slice(),n);r=s.to}return new Z(e,n)}static cursor(e,n=0,r,i){return Js.create(e,e,(n==0?0:n<0?4:8)|(r==null?3:Math.min(2,r))|(i??33554431)<<5)}static range(e,n,r,i){let s=(r??33554431)<<5|(i==null?3:Math.min(2,i));return n<e?Js.create(n,e,24|s):Js.create(e,n,(n>e?4:0)|s)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);i<=n&&n--,e.splice(--i,2,s.anchor>s.head?Z.range(a,l):Z.range(l,a))}}return new Z(e,n)}}function TC(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let nv=0;class Oe{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=nv++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}static define(e={}){return new Oe(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:rv),!!e.static,e.enables)}of(e){return new Tf([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Tf(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Tf(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function rv(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Tf{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=nv++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,u=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?u=!0:((n=e[f.id])!==null&&n!==void 0?n:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=r(f),1},update(f,h){if(a&&h.docChanged||u&&(h.docChanged||h.selection)||Zm(f,c)){let p=r(f);if(l?!QS(p,f.values[o],i):!i(p,f.values[o]))return f.values[o]=p,1}return 0},reconfigure:(f,h)=>{let p,d=h.config.address[s];if(d!=null){let g=vh(h,d);if(this.dependencies.every(O=>O instanceof Oe?h.facet(O)===f.facet(O):O instanceof ln?h.field(O,!1)==f.field(O,!1):!0)||(l?QS(p=r(f),g,i):i(p=r(f),g)))return f.values[o]=g,0}else p=r(f);return f.values[o]=p,1}}}}function QS(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function Zm(t,e){let n=!1;for(let r of e)Fa(t,r)&1&&(n=!0);return n}function xM(t,e,n){let r=n.map(a=>t[a.id]),i=n.map(a=>a.type),s=r.filter(a=>!(a&1)),o=t[e.id]>>1;function l(a){let u=[];for(let c=0;c<r.length;c++){let f=vh(a,r[c]);if(i[c]==2)for(let h of f)u.push(h);else u.push(f)}return e.combine(u)}return{create(a){for(let u of r)Fa(a,u);return a.values[o]=l(a),1},update(a,u){if(!Zm(a,s))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,u){let c=Zm(a,r),f=u.config.facets[e.id],h=u.facet(e);if(f&&!c&&rv(n,f))return a.values[o]=h,0;let p=l(a);return e.compare(p,h)?(a.values[o]=h,0):(a.values[o]=p,1)}}}const ES=Oe.define({static:!0});class ln{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new ln(nv++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(ES).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,ES.of({field:this,create:e})]}get extension(){return this}}const zs={lowest:4,low:3,default:2,high:1,highest:0};function ca(t){return e=>new RC(e,t)}const Ls={highest:ca(zs.highest),high:ca(zs.high),default:ca(zs.default),low:ca(zs.low),lowest:ca(zs.lowest)};class RC{constructor(e,n){this.inner=e,this.prec=n}}class Zu{of(e){return new jm(this,e)}reconfigure(e){return Zu.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class jm{constructor(e,n){this.compartment=e,this.inner=n}}class Oh{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let h of PM(e,n,o))h instanceof ln?i.push(h):(s[h.facet.id]||(s[h.facet.id]=[])).push(h);let l=Object.create(null),a=[],u=[];for(let h of i)l[h.id]=u.length<<1,u.push(p=>h.slot(p));let c=r==null?void 0:r.config.facets;for(let h in s){let p=s[h],d=p[0].facet,g=c&&c[h]||[];if(p.every(O=>O.type==0))if(l[d.id]=a.length<<1|1,rv(g,p))a.push(r.facet(d));else{let O=d.combine(p.map(m=>m.value));a.push(r&&d.compare(O,r.facet(d))?r.facet(d):O)}else{for(let O of p)O.type==0?(l[O.id]=a.length<<1|1,a.push(O.value)):(l[O.id]=u.length<<1,u.push(m=>O.dynamicSlot(m)));l[d.id]=u.length<<1,u.push(O=>xM(O,d,p))}}let f=u.map(h=>h(l));return new Oh(e,o,f,l,a,s)}}function PM(t,e,n){let r=[[],[],[],[],[]],i=new Map;function s(o,l){let a=i.get(o);if(a!=null){if(a<=l)return;let u=r[a].indexOf(o);u>-1&&r[a].splice(u,1),o instanceof jm&&n.delete(o.compartment)}if(i.set(o,l),Array.isArray(o))for(let u of o)s(u,l);else if(o instanceof jm){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;n.set(o.compartment,u),s(u,l)}else if(o instanceof RC)s(o.inner,o.prec);else if(o instanceof ln)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof Tf)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,zs.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,l)}}return s(t,zs.default),r.reduce((o,l)=>o.concat(l))}function Fa(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function vh(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const AC=Oe.define(),DC=Oe.define({combine:t=>t.some(e=>e),static:!0}),MC=Oe.define({combine:t=>t.length?t[0]:void 0,static:!0}),IC=Oe.define(),NC=Oe.define(),LC=Oe.define(),XC=Oe.define({combine:t=>t.length?t[0]:!1});class bi{constructor(e,n){this.type=e,this.value=n}static define(){return new CM}}class CM{of(e){return new bi(this,e)}}class QM{constructor(e){this.map=e}of(e){return new Ve(this,e)}}class Ve{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ve(this.type,n)}is(e){return this.type==e}static define(e={}){return new QM(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}Ve.reconfigure=Ve.define();Ve.appendConfig=Ve.define();class Jt{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&TC(r,n.newLength),s.some(l=>l.type==Jt.time)||(this.annotations=s.concat(Jt.time.of(Date.now())))}static create(e,n,r,i,s,o){return new Jt(e,n,r,i,s,o)}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 n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Jt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Jt.time=bi.define();Jt.userEvent=bi.define();Jt.addToHistory=bi.define();Jt.remote=bi.define();function EM(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function VC(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=Ht.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Ve.mapEffects(t.effects,i).concat(Ve.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Bm(t,e,n){let r=e.selection,i=al(e.annotations);return e.userEvent&&(i=i.concat(Jt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Ht?e.changes:Ht.of(e.changes||[],n,t.facet(MC)),selection:r&&(r instanceof Z?r:Z.single(r.anchor,r.head)),effects:al(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function ZC(t,e,n){let r=Bm(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=VC(r,Bm(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=Jt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return _M(n?$M(i):i)}function $M(t){let e=t.startState,n=!0;for(let i of e.facet(IC)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:EM(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=Ht.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=Jt.create(e,i,t.selection&&t.selection.map(s),Ve.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(NC);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof Jt?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Jt?t=s[0]:t=ZC(e,al(s),!1)}return t}function _M(t){let e=t.startState,n=e.facet(LC),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=VC(r,Bm(e,s,t.changes.newLength),!0))}return r==t?t:Jt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const TM=[];function al(t){return t==null?TM:Array.isArray(t)?t:[t]}var $t=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}($t||($t={}));const RM=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Fm;try{Fm=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function AM(t){if(Fm)return Fm.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||RM.test(n)))return!0}return!1}function DM(t){return e=>{if(!/\S/.test(e))return $t.Space;if(AM(e))return $t.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return $t.Word;return $t.Other}}class qe{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Fa(this,l<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Fa(this,r),vh(this,r)}update(...e){return ZC(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let o of e.effects)o.is(Zu.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,a)=>i.set(a,l)),n=null),i.set(o.value.compartment,o.value.extension)):o.is(Ve.reconfigure)?(n=null,r=o.value):o.is(Ve.appendConfig)&&(n=null,r=al(r).concat(o.value));let s;n?s=e.startState.values.slice():(n=Oh.resolve(r,i,this),s=new qe(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new qe(n,e.newDoc,e.newSelection,s,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Z.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=al(r.effects);for(let l=1;l<n.ranges.length;l++){let a=e(n.ranges[l]),u=this.changes(a.changes),c=u.map(i);for(let h=0;h<l;h++)s[h]=s[h].map(c);let f=i.mapDesc(u,!0);s.push(a.range.map(f)),i=i.compose(c),o=Ve.mapEffects(o,c).concat(Ve.mapEffects(al(a.effects),f))}return{changes:i,selection:Z.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof Ht?e:Ht.of(e,this.doc.length,this.facet(qe.lineSeparator))}toText(e){return et.of(e.split(this.facet(qe.lineSeparator)||Lm))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Fa(this,n),vh(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof ln&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},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 o=r[s],l=e[s];i.push(o.init(a=>o.spec.fromJSON(l,a)))}}return qe.create({doc:e.doc,selection:Z.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Oh.resolve(e.extensions||[],new Map),r=e.doc instanceof et?e.doc:et.of((e.doc||"").split(n.staticFacet(qe.lineSeparator)||Lm)),i=e.selection?e.selection instanceof Z?e.selection:Z.single(e.selection.anchor,e.selection.head):Z.single(0);return TC(i,r.length),n.staticFacet(DC)||(i=i.asSingle()),new qe(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(qe.tabSize)}get lineBreak(){return this.facet(qe.lineSeparator)||`
44
- `}get readOnly(){return this.facet(XC)}phrase(e,...n){for(let r of this.facet(qe.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(AC))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){return DM(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let a=Rn(n,o,!1);if(s(n.slice(a,o))!=$t.Word)break;o=a}for(;l<i;){let a=Rn(n,l);if(s(n.slice(l,a))!=$t.Word)break;l=a}return o==l?null:Z.range(o+r,l+r)}}qe.allowMultipleSelections=DC;qe.tabSize=Oe.define({combine:t=>t.length?t[0]:4});qe.lineSeparator=MC;qe.readOnly=XC;qe.phrases=Oe.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});qe.languageData=AC;qe.changeFilter=IC;qe.transactionFilter=NC;qe.transactionExtender=LC;Zu.reconfigure=Ve.define();function wi(t,e,n={}){let r={};for(let i of t)for(let s of Object.keys(i)){let o=i[s],l=r[s];if(l===void 0)r[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(n,s))r[s]=n[s](l,o);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 po{eq(e){return this==e}range(e,n=e){return Um.create(e,n,this)}}po.prototype.startSide=po.prototype.endSide=0;po.prototype.point=!1;po.prototype.mapMode=gn.TrackDel;let Um=class jC{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new jC(e,n,r)}};function Wm(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class iv{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let s=r?this.to:this.from;for(let o=i,l=s.length;;){if(o==l)return o;let a=o+l>>1,u=s[a]-e||(r?this.value[a].endSide:this.value[a].startSide)-n;if(a==o)return u>=0?o:l;u>=0?l=a:o=a+1}}between(e,n,r,i){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let r=[],i=[],s=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let u=this.value[a],c=this.from[a]+e,f=this.to[a]+e,h,p;if(c==f){let d=n.mapPos(c,u.startSide,u.mapMode);if(d==null||(h=p=d,u.startSide!=u.endSide&&(p=n.mapPos(c,u.endSide),p<h)))continue}else if(h=n.mapPos(c,u.startSide),p=n.mapPos(f,u.endSide),h>p||h==p&&u.startSide>0&&u.endSide<=0)continue;(p-h||u.endSide-u.startSide)<0||(o<0&&(o=h),u.point&&(l=Math.max(l,p-h)),r.push(u),i.push(h-o),s.push(p-o))}return{mapped:r.length?new iv(i,s,r,l):null,pos:o}}}class st{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new st(e,n,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 n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(Wm)),this.isEmpty)return n.length?st.of(n):this;let l=new BC(this,null,-1).goto(0),a=0,u=[],c=new $s;for(;l.value||a<n.length;)if(a<n.length&&(l.from-n[a].from||l.startSide-n[a].value.startSide)>=0){let f=n[a++];c.addInner(f.from,f.to,f.value)||u.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==n.length||this.chunkEnd(l.chunkIndex)<n[a].from)&&(!o||i>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||i>l.to||s<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||u.push(Um.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?st.empty:this.nextLayer.update({add:u,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],u=e.touchesRange(l,l+a.length);if(u===!1)i=Math.max(i,a.maxPoint),n.push(a),r.push(e.mapPos(l));else if(u===!0){let{mapped:c,pos:f}=a.map(l,e);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(f))}}let s=this.nextLayer.map(e);return n.length==0?s:new st(r,n,s||st.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return du.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return du.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=$S(o,l,r),u=new fa(o,a,s),c=new fa(l,a,s);r.iterGaps((f,h,p)=>_S(u,f,c,h,p,i)),r.empty&&r.length==0&&_S(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=1e9-1);let s=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),o=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=$S(s,o),a=new fa(s,l,0).goto(r),u=new fa(o,l,0).goto(r);for(;;){if(a.to!=u.to||!zm(a.active,u.active)||a.point&&(!u.point||!a.point.eq(u.point)))return!1;if(a.to>i)return!0;a.next(),u.next()}}static spans(e,n,r,i,s=-1){let o=new fa(e,null,s).goto(n),l=n,a=o.openStart;for(;;){let u=Math.min(o.to,r);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFrom<n?c.length+1:Math.min(c.length,a);i.point(l,u,o.point,c,f,o.pointRank),a=Math.min(o.openEnd(u),c.length)}else u>l&&(i.span(l,u,o.active,a),a=o.openEnd(u));if(o.to>r)return a+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,n=!1){let r=new $s;for(let i of e instanceof Um?[e]:n?MM(e):e)r.add(i.from,i.to,i.value);return r.finish()}}st.empty=new st([],[],null,-1);function MM(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(Wm(e,r)>0)return t.slice().sort(Wm);e=r}return t}st.empty.nextLayer=st.empty;class $s{finishChunk(e){this.chunks.push(new iv(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,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new $s)).add(e,n,r)}addInner(e,n,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(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(st.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=st.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function $S(t,e,n){let r=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=r.get(s.chunk[o]);l!=null&&(n?n.mapPos(l):l)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(l,l+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class BC{constructor(e,n,r,i=0){this.layer=e,this.skip=n,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,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,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],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!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],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.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 du{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new BC(o,n,r,s));return i.length==1?i[0]:new du(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)Up(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)Up(this.heap,r);(this.to-e||this.value.endSide-n)<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(),Up(this.heap,0)}}}function Up(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class fa{constructor(e,n,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=du.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Zc(this.active,e),Zc(this.activeTo,e),Zc(this.activeRank,e),this.minActive=TS(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&this.activeRank[n]<=s;)n++;jc(this.active,n,r),jc(this.activeTo,n,i),jc(this.activeRank,n,s),e&&jc(e,n,this.cursor.from),this.minActive=TS(this.active,this.activeTo)}next(){let e=this.to,n=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&&Zc(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(n&&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 n=[];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)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function _S(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,l=r,a=r-e;for(;;){let u=t.to+a-n.to||t.endSide-n.endSide,c=u<0?t.to+a:n.to,f=Math.min(c,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&zm(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(l,f,t.point,n.point):f>l&&!zm(t.active,n.active)&&s.compareRange(l,f,t.active,n.active),c>o)break;l=c,u<=0&&t.next(),u>=0&&n.next()}}function zm(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Zc(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function jc(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function TS(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function ju(t,e,n=t.length){let r=0;for(let i=0;i<n;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Rn(t,i));return r}function Ym(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=Rn(t,i)}return r===!0?-1:t.length}const qm="ͼ",RS=typeof Symbol>"u"?"__"+qm:Symbol.for(qm),Gm=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),AS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class _s{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,a,u){let c=[],f=/^@(\w+)\b/.exec(o[0]),h=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let p in l){let d=l[p];if(/&/.test(p))s(p.split(/,\s*/).map(g=>o.map(O=>g.replace(/&/,O))).reduce((g,O)=>g.concat(O)),d,a);else if(d&&typeof d=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(i(p),d,c,h)}else d!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+d+";")}(c.length||h)&&a.push((r&&!f&&!u?o.map(r):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
45
- `)}static newName(){let e=AS[RS]||1;return AS[RS]=e+1,qm+e.toString(36)}static mount(e,n){(e[Gm]||new IM(e)).mount(Array.isArray(n)?n:[n])}}let Bc=null;class IM{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Bc)return e.adoptedStyleSheets=[Bc.sheet,...e.adoptedStyleSheets],e[Gm]=Bc;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Bc=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let n=e.head||e;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],e[Gm]=this}mount(e){let n=this.sheet,r=0,i=0;for(let s=0;s<e.length;s++){let o=e[s],l=this.modules.indexOf(o);if(l<i&&l>-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,o),n)for(let a=0;a<o.rules.length;a++)n.insertRule(o.rules[a],r++)}else{for(;i<l;)r+=this.modules[i++].rules.length;r+=o.rules.length,i++}}if(!n){let s="";for(let o=0;o<this.modules.length;o++)s+=this.modules[o].getRules()+`
46
- `;this.styleTag.textContent=s}}}var Ts={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:"'"},pu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},DS=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),NM=typeof navigator<"u"&&/Mac/.test(navigator.platform),LM=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),XM=NM||DS&&+DS[1]<57;for(var pn=0;pn<10;pn++)Ts[48+pn]=Ts[96+pn]=String(pn);for(var pn=1;pn<=24;pn++)Ts[pn+111]="F"+pn;for(var pn=65;pn<=90;pn++)Ts[pn]=String.fromCharCode(pn+32),pu[pn]=String.fromCharCode(pn);for(var Wp in Ts)pu.hasOwnProperty(Wp)||(pu[Wp]=Ts[Wp]);function VM(t){var e=XM&&(t.ctrlKey||t.altKey||t.metaKey)||LM&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?pu:Ts)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function yh(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function kl(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function ZM(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Rf(t,e){if(!e.anchorNode)return!1;try{return kl(t,e.anchorNode)}catch{return!1}}function gu(t){return t.nodeType==3?xl(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Sh(t,e,n,r){return n?MS(t,e,n,r,-1)||MS(t,e,n,r,1):!1}function bh(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function MS(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:mu(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=bh(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?mu(t):0}else return!1}}function mu(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}const FC={left:0,right:0,top:0,bottom:0};function sv(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function jM(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function BM(t,e,n,r,i,s,o,l){let a=t.ownerDocument,u=a.defaultView||window;for(let c=t;c;)if(c.nodeType==1){let f,h=c==a.body;if(h)f=jM(u);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let p=0,d=0;if(i=="nearest")e.top<f.top?(d=-(f.top-e.top+o),n>0&&e.bottom>f.bottom+d&&(d=e.bottom-f.bottom+d+o)):e.bottom>f.bottom&&(d=e.bottom-f.bottom+o,n<0&&e.top-d<f.top&&(d=-(f.top+d-e.top+o)));else{let g=e.bottom-e.top,O=f.bottom-f.top;d=(i=="center"&&g<=O?e.top+g/2-O/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-O+o)-f.top}if(r=="nearest"?e.left<f.left?(p=-(f.left-e.left+s),n>0&&e.right>f.right+p&&(p=e.right-f.right+p+s)):e.right>f.right&&(p=e.right-f.right+s,n<0&&e.left<f.left+p&&(p=-(f.left+p-e.left+s))):p=(r=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:r=="start"==l?e.left-s:e.right-(f.right-f.left)+s)-f.left,p||d)if(h)u.scrollBy(p,d);else{let g=0,O=0;if(d){let m=c.scrollTop;c.scrollTop+=d,O=c.scrollTop-m}if(p){let m=c.scrollLeft;c.scrollLeft+=p,g=c.scrollLeft-m}e={left:e.left-g,top:e.top-O,right:e.right-g,bottom:e.bottom-O},g&&Math.abs(g-p)<1&&(r="nearest"),O&&Math.abs(O-d)<1&&(i="nearest")}if(h)break;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function FM(t){let e=t.ownerDocument;for(let n=t.parentNode;n&&n!=e.body;)if(n.nodeType==1){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class UM{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){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let _o=null;function UC(t){if(t.setActive)return t.setActive();if(_o)return t.focus(_o);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(_o==null?{get preventScroll(){return _o={preventScroll:!0},!0}}:void 0),!_o){_o=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let IS;function xl(t,e,n=e){let r=IS||(IS=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function ul(t,e,n){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,t.dispatchEvent(i);let s=new KeyboardEvent("keyup",r);return s.synthetic=!0,t.dispatchEvent(s),i.defaultPrevented||s.defaultPrevented}function WM(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function WC(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function zM(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(;;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=mu(n))}else{if(n==t)return!0;r=bh(n),n=n.parentNode}}class mn{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new mn(e.parentNode,bh(e),n)}static after(e,n){return new mn(e.parentNode,bh(e)+1,n)}}const ov=[];class xt{constructor(){this.parent=null,this.dom=null,this.dirty=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}coordsAt(e,n){return null}sync(e,n){if(this.dirty&2){let r=this.dom,i=null,s;for(let o of this.children){if(o.dirty){if(!o.dom&&(s=i?i.nextSibling:r.firstChild)){let l=xt.get(s);(!l||!l.parent&&l.canReuseDOM(o))&&o.reuseDOM(s)}o.sync(e,n),o.dirty=0}if(s=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&s!=o.dom&&(n.written=!0),o.dom.parentNode==r)for(;s&&s!=o.dom;)s=NS(s);else r.insertBefore(o.dom,s);i=o.dom}for(s=i?i.nextSibling:r.firstChild,s&&n&&n.node==r&&(n.written=!0);s;)s=NS(s)}else if(this.dirty&1)for(let r of this.children)r.dirty&&(r.sync(e,n),r.dirty=0)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=mu(e)==0?0:n==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;i==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?i=-1:i=1),e=s}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!xt.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,s=0;;i++){let o=this.children[i];if(o.dom==r)return s;s+=o.length+o.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,s=-1,o=-1,l=-1;for(let a=0,u=r,c=r;a<this.children.length;a++){let f=this.children[a],h=u+f.length;if(u<e&&h>n)return f.domBoundsAround(e,n,u);if(h>=e&&i==-1&&(i=a,s=u),u>n&&f.dom.parentNode==this.dom){o=a,l=c;break}c=h,u=h+f.breakAfter}return{from:s,to:l<0?r+this.length:l,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.dirty|=2),n.dirty&1)return;n.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=ov){this.markDirty();for(let i=e;i<n;i++){let s=this.children[i];s.parent==this&&s.destroy()}this.children.splice(e,n-e,...r);for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new zC(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}merge(e,n,r,i,s,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}xt.prototype.breakAfter=0;function NS(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class zC{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function YC(t,e,n,r,i,s,o,l,a){let{children:u}=t,c=u.length?u[e]:null,f=s.length?s[s.length-1]:null,h=f?f.breakAfter:o;if(!(e==r&&c&&!o&&!h&&s.length<2&&c.merge(n,i,s.length?f:null,n==0,l,a))){if(r<u.length){let p=u[r];p&&i<p.length?(e==r&&(p=p.split(i),i=0),!h&&f&&p.merge(0,i,f,!0,0,a)?s[s.length-1]=p:(i&&p.merge(0,i,null,!1,0,a),s.push(p))):p!=null&&p.breakAfter&&(f?f.breakAfter=1:o=1),r++}for(c&&(c.breakAfter=o,n>0&&(!o&&s.length&&c.merge(n,c.length,s[0],!1,l,0)?c.breakAfter=s.shift().breakAfter:(n<c.length||c.children.length&&c.children[c.children.length-1].length==0)&&c.merge(n,c.length,null,!1,l,0),e++));e<r&&s.length;)if(u[r-1].become(s[s.length-1]))r--,s.pop(),a=s.length?0:l;else if(u[e].become(s[0]))e++,s.shift(),l=s.length?0:a;else break;!s.length&&e&&r<u.length&&!u[e-1].breakAfter&&u[r].merge(0,0,u[e-1],!1,l,a)&&e--,(e<r||s.length)&&t.replaceChildren(e,r,s)}}function qC(t,e,n,r,i,s){let o=t.childCursor(),{i:l,off:a}=o.findPos(n,1),{i:u,off:c}=o.findPos(e,-1),f=e-n;for(let h of r)f+=h.length;t.length+=f,YC(t,u,c,l,a,r,0,i,s)}let ir=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Hm=typeof document<"u"?document:{documentElement:{style:{}}};const Km=/Edge\/(\d+)/.exec(ir.userAgent),GC=/MSIE \d/.test(ir.userAgent),Jm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ir.userAgent),xd=!!(GC||Jm||Km),LS=!xd&&/gecko\/(\d+)/i.test(ir.userAgent),zp=!xd&&/Chrome\/(\d+)/.exec(ir.userAgent),XS="webkitFontSmoothing"in Hm.documentElement.style,HC=!xd&&/Apple Computer/.test(ir.vendor),VS=HC&&(/Mobile\/\w+/.test(ir.userAgent)||ir.maxTouchPoints>2);var ye={mac:VS||/Mac/.test(ir.platform),windows:/Win/.test(ir.platform),linux:/Linux|X11/.test(ir.platform),ie:xd,ie_version:GC?Hm.documentMode||6:Jm?+Jm[1]:Km?+Km[1]:0,gecko:LS,gecko_version:LS?+(/Firefox\/(\d+)/.exec(ir.userAgent)||[0,0])[1]:0,chrome:!!zp,chrome_version:zp?+zp[1]:0,ios:VS,android:/Android\b/.test(ir.userAgent),webkit:XS,safari:HC,webkit_version:XS?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Hm.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const YM=256;class Rs extends xt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return r&&(!(r instanceof Rs)||this.length-(n-e)+r.length>YM)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Rs(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new mn(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return eO(this.dom,e,n)}}class Si extends xt{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(WC(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e,n){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,s,o){return r&&(!(r instanceof Si&&r.mark.eq(this.mark))||e&&s<=0||n<this.length&&o<=0)?!1:(qC(this,e,n,r?r.children:[],s-1,o-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,s=0;for(let l of this.children){let a=r+l.length;a>e&&n.push(r<e?l.split(e-r):l),i<0&&r>=e&&(i=s),r=a,s++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Si(this.mark,n,o)}domAtPos(e){return eQ(this,e)}coordsAt(e,n){return nQ(this,e,n)}}function eO(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?ye.chrome||ye.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let l=xl(t,i,s).getClientRects();if(!l.length)return FC;let a=l[(o?o<0:n>=0)?0:l.length-1];return ye.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,u=>u.width)||a),o?sv(a,o<0):a||null}class gs extends xt{constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}static create(e,n,r){return new(e.customView||gs)(e,n,r)}split(e){let n=gs.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,r,i,s,o){return r&&(!(r instanceof gs)||!this.widget.compare(r.widget)||e>0&&s<=0||n<this.length&&o<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e.length==this.length&&e instanceof gs&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.eq(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return et.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):et.empty}domAtPos(e){return e==0?mn.before(this.dom):mn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.dom.getClientRects(),i=null;if(!r.length)return FC;for(let s=e>0?r.length-1:0;i=r[s],!(e>0?s==0:s==r.length-1||i.top<i.bottom);s+=e>0?-1:1);return this.length?i:sv(i,this.side>0)}get isEditable(){return!1}get isWidget(){return!0}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class KC extends gs{domAtPos(e){let{topView:n,text:r}=this.widget;return n?tO(e,0,n,r,(i,s)=>i.domAtPos(s),i=>new mn(r,Math.min(i,r.nodeValue.length))):new mn(r,Math.min(e,r.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,n){let{topView:r,text:i}=this.widget;return r?JC(e,n,r,i):Math.min(n,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,n){let{topView:r,text:i}=this.widget;return r?tO(e,n,r,i,(s,o,l)=>s.coordsAt(o,l),(s,o)=>eO(i,s,o)):eO(i,e,n)}destroy(){var e;super.destroy(),(e=this.widget.topView)===null||e===void 0||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function tO(t,e,n,r,i,s){if(n instanceof Si){for(let o=n.dom.firstChild;o;o=o.nextSibling){let l=xt.get(o);if(!l)return s(t,e);let a=kl(o,r),u=l.length+(a?r.nodeValue.length:0);if(t<u||t==u&&l.getSide()<=0)return a?tO(t,e,l,r,i,s):i(l,t,e);t-=u}return i(n,n.length,-1)}else return n.dom==r?s(t,e):i(n,t,e)}function JC(t,e,n,r){if(n instanceof Si){let i=0;for(let s of n.children){let o=kl(s.dom,r);if(kl(s.dom,t))return i+(o?JC(t,e,s,r):s.localPosFromDOM(t,e));i+=o?r.nodeValue.length:s.length}}else if(n.dom==r)return Math.min(e,r.nodeValue.length);return n.localPosFromDOM(t,e)}class Pl extends xt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Pl&&e.side==this.side}split(){return new Pl(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?mn.before(this.dom):mn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){let n=this.dom.getBoundingClientRect(),r=qM(this,this.side>0?-1:1);return r&&r.top<n.bottom&&r.bottom>n.top?{left:n.left,right:n.right,top:r.top,bottom:r.bottom}:n}get overrideDOMText(){return et.empty}}Rs.prototype.children=gs.prototype.children=Pl.prototype.children=ov;function qM(t,e){let n=t.parent,r=n?n.children.indexOf(t):-1;for(;n&&r>=0;)if(e<0?r>0:r<n.children.length){let i=n.children[r+e];if(i instanceof Rs){let s=i.coordsAt(e<0?i.length:0,e);if(s)return s}r+=e}else if(n instanceof Si&&n.parent)r=n.parent.children.indexOf(n)+(e<0?0:1),n=n.parent;else{let i=n.dom.lastChild;if(i&&i.nodeName=="BR")return i.getClientRects()[0];break}}function eQ(t,e){let n=t.dom,{children:r}=t,i=0;for(let s=0;i<r.length;i++){let o=r[i],l=s+o.length;if(!(l==s&&o.getSide()<=0)){if(e>s&&e<l&&o.dom.parentNode==n)return o.domAtPos(e-s);if(e<=s)break;s=l}}for(let s=i;s>0;s--){let o=r[s-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let s=i;s<r.length;s++){let o=r[s];if(o.dom.parentNode==n)return o.domAtPos(0)}return new mn(n,0)}function tQ(t,e,n){let r,{children:i}=t;n>0&&e instanceof Si&&i.length&&(r=i[i.length-1])instanceof Si&&r.mark.eq(e.mark)?tQ(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function nQ(t,e,n){let r=null,i=-1,s=null,o=-1;function l(u,c){for(let f=0,h=0;f<u.children.length&&h<=c;f++){let p=u.children[f],d=h+p.length;d>=c&&(p.children.length?l(p,c-h):!s&&(d>c||h==d&&p.getSide()>0)?(s=p,o=c-h):(h<c||h==d&&p.getSide()<0)&&(r=p,i=c-h)),h=d}}l(t,e);let a=(n<0?r:s)||r||s;return a?a.coordsAt(Math.max(0,a==r?i:o),n):GM(t)}function GM(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=gu(e);return n[n.length-1]||null}function nO(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}function lv(t,e){if(t==e)return!0;if(!t||!e)return!1;let n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(let i of n)if(r.indexOf(i)==-1||t[i]!==e[i])return!1;return!0}function rO(t,e,n){let r=null;if(e)for(let i in e)n&&i in n||t.removeAttribute(r=i);if(n)for(let i in n)e&&e[i]==n[i]||t.setAttribute(r=i,n[i]);return!!r}class ki{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}ignoreEvent(e){return!0}get customView(){return null}destroy(e){}}var dt=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(dt||(dt={}));class Pe extends po{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Pd(e)}static widget(e){let n=e.side||0,r=!!e.block;return n+=r?n>0?3e8:-4e8:n>0?1e8:-1e8,new go(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=rQ(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new go(e,r,i,n,e.widget||null,!0)}static line(e){return new Bu(e)}static set(e,n=!1){return st.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Pe.none=st.empty;class Pd extends Pe{constructor(e){let{start:n,end:r}=rQ(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof Pd&&this.tagName==e.tagName&&this.class==e.class&&lv(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Pd.prototype.point=!1;class Bu extends Pe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Bu&&this.spec.class==e.spec.class&&lv(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Bu.prototype.mapMode=gn.TrackBefore;Bu.prototype.point=!0;class go extends Pe{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?gn.TrackBefore:gn.TrackAfter:gn.TrackDel}get type(){return this.startSide<this.endSide?dt.WidgetRange:this.startSide<=0?dt.WidgetBefore:dt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(e){return e instanceof go&&HM(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}go.prototype.point=!0;function rQ(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function HM(t,e){return t==e||!!(t&&e&&t.compare(e))}function iO(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class An extends xt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,s,o){if(r){if(!(r instanceof An))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),qC(this,e,n,r?r.children:[],s,o),!0}split(e){let n=new An;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let s=r;s<this.children.length;s++)n.append(this.children[s],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){lv(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){tQ(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=nO(n,this.attrs||{})),r&&(this.attrs=nO({class:r},this.attrs||{}))}domAtPos(e){return eQ(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.dirty|=6)}sync(e,n){var r;this.dom?this.dirty&4&&(WC(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(rO(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&xt.get(i)instanceof Si;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=xt.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!ye.ios||!this.children.some(s=>s instanceof Rs))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof Rs)||/[^ -~]/.test(r.text))return null;let i=gu(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=nQ(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,s=r.bottom-r.top;if(Math.abs(s-i.lineHeight)<2&&i.textHeight<s){let o=(s-i.textHeight)/2;return{top:r.top+o,bottom:r.bottom-o,left:r.left,right:r.left}}}return r}become(e){return!1}get type(){return dt.Text}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let s=e.children[r],o=i+s.length;if(o>=n){if(s instanceof An)return s;if(o>n)break}i=o+s.breakAfter}return null}}class io extends xt{constructor(e,n,r){super(),this.widget=e,this.length=n,this.type=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,s,o){return r&&(!(r instanceof io)||!this.widget.compare(r.widget)||e>0&&s<=0||n<this.length&&o<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?mn.before(this.dom):mn.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new io(this.widget,n,this.type);return r.breakAfter=this.breakAfter,r}get children(){return ov}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):et.empty}domBoundsAround(){return null}become(e){return e instanceof io&&e.type==this.type&&e.widget.constructor==this.widget.constructor?(e.widget.eq(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class av{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!e.breakAfter&&!(e instanceof io&&e.type==dt.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new An),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Fc(new Pl(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(Fc(new Rs(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,s,o){if(this.disallowBlockEffectsFor[o]&&r instanceof go){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=n-e;if(r instanceof go)if(r.block){let{type:a}=r;a==dt.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new io(r.widget||new ZS("div"),l,a))}else{let a=gs.create(r.widget||new ZS("span"),l,l?0:r.startSide),u=this.atCursorPos&&!a.isEditable&&s<=i.length&&(e<n||r.startSide>0),c=!a.isEditable&&(e<n||s>i.length||r.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!u&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(f.append(Fc(new Pl(1),i),s),s=i.length+Math.max(0,s-i.length)),f.append(Fc(a,i),s),this.atCursorPos=c,this.pendingBuffer=c?e<n||s>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,r,i,s){let o=new av(e,n,r,s);return o.openEnd=st.spans(i,n,r,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Fc(t,e){for(let n of e)t=new Si(n,[t],t.length);return t}class ZS extends ki{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}}const iQ=Oe.define(),sQ=Oe.define(),oQ=Oe.define(),lQ=Oe.define(),sO=Oe.define(),aQ=Oe.define(),uQ=Oe.define(),cQ=Oe.define({combine:t=>t.some(e=>e)}),fQ=Oe.define({combine:t=>t.some(e=>e)});class wh{constructor(e,n="nearest",r="nearest",i=5,s=5){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s}map(e){return e.empty?this:new wh(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const jS=Ve.define({map:(t,e)=>t.map(e)});function ar(t,e,n){let r=t.facet(lQ);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Cd=Oe.define({combine:t=>t.length?t[0]:!0});let KM=0;const Ca=Oe.define();class jt{constructor(e,n,r,i){this.id=e,this.create=n,this.domEventHandlers=r,this.extension=i(this)}static define(e,n){const{eventHandlers:r,provide:i,decorations:s}=n||{};return new jt(KM++,e,r,o=>{let l=[Ca.of(o)];return s&&l.push(Ou.of(a=>{let u=a.plugin(o);return u?s(u):Pe.none})),i&&l.push(i(o)),l})}static fromClass(e,n){return jt.define(r=>new e(r),n)}}class Yp{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(ar(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){ar(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){ar(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const hQ=Oe.define(),uv=Oe.define(),Ou=Oe.define(),dQ=Oe.define(),pQ=Oe.define(),Qa=Oe.define();class vi{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new vi(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 n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,s=0,o=0,l=0;;i++){let a=i==e.length?null:e[i],u=o-l,c=a?a.fromB:1e9;for(;s<n.length&&n[s]<c;){let f=n[s],h=n[s+1],p=Math.max(l,f),d=Math.min(c,h);if(p<=d&&new vi(p+u,d+u,p,d).addToSet(r),h>c)break;s+=2}if(!a)return r;new vi(a.fromA,a.toA,a.fromB,a.toB).addToSet(r),o=a.toA,l=a.toB}}}class kh{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Ht.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,l,a)=>i.push(new vi(s,o,l,a))),this.changedRanges=i}static create(e,n,r){return new kh(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>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}}var Mt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Mt||(Mt={}));const oO=Mt.LTR,JM=Mt.RTL;function gQ(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const eI=gQ("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),tI=gQ("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),lO=Object.create(null),ei=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);lO[e]=n,lO[n]=-e}function nI(t){return t<=247?eI[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?tI[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8203?256:64336<=t&&t<=65023?4:t==8204?256:1}const rI=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class cl{constructor(e,n,r){this.from=e,this.to=n,this.level=r}get dir(){return this.level%2?JM:oO}side(e,n){return this.dir==n==e?this.to:this.from}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=n&&l.to>=n){if(l.level==r)return o;(s<0||(i!=0?i<0?l.from<n:l.to>n:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}const At=[];function iI(t,e){let n=t.length,r=e==oO?1:2,i=e==oO?2:1;if(!t||r==1&&!rI.test(t))return mQ(n);for(let o=0,l=r,a=r;o<n;o++){let u=nI(t.charCodeAt(o));u==512?u=l:u==8&&a==4&&(u=16),At[o]=u==4?2:u,u&7&&(a=u),l=u}for(let o=0,l=r,a=r;o<n;o++){let u=At[o];if(u==128)o<n-1&&l==At[o+1]&&l&24?u=At[o]=l:At[o]=256;else if(u==64){let c=o+1;for(;c<n&&At[c]==64;)c++;let f=o&&l==8||c<n&&At[c]==8?a==1?1:8:256;for(let h=o;h<c;h++)At[h]=f;o=c-1}else u==8&&a==1&&(At[o]=1);l=u,u&7&&(a=u)}for(let o=0,l=0,a=0,u,c,f;o<n;o++)if(c=lO[u=t.charCodeAt(o)])if(c<0){for(let h=l-3;h>=0;h-=3)if(ei[h+1]==-c){let p=ei[h+2],d=p&2?r:p&4?p&1?i:r:0;d&&(At[o]=At[ei[h]]=d),l=h;break}}else{if(ei.length==189)break;ei[l++]=o,ei[l++]=u,ei[l++]=a}else if((f=At[o])==2||f==1){let h=f==r;a=h?0:1;for(let p=l-3;p>=0;p-=3){let d=ei[p+2];if(d&2)break;if(h)ei[p+2]|=2;else{if(d&4)break;ei[p+2]|=4}}}for(let o=0;o<n;o++)if(At[o]==256){let l=o+1;for(;l<n&&At[l]==256;)l++;let a=(o?At[o-1]:r)==1,u=(l<n?At[l]:r)==1,c=a==u?a?1:2:r;for(let f=o;f<l;f++)At[f]=c;o=l-1}let s=[];if(r==1)for(let o=0;o<n;){let l=o,a=At[o++]!=1;for(;o<n&&a==(At[o]!=1);)o++;if(a)for(let u=o;u>l;){let c=u,f=At[--u]!=2;for(;u>l&&f==(At[u-1]!=2);)u--;s.push(new cl(u,c,f?2:1))}else s.push(new cl(l,o,0))}else for(let o=0;o<n;){let l=o,a=At[o++]==2;for(;o<n&&a==(At[o]==2);)o++;s.push(new cl(l,o,a?1:2))}return s}function mQ(t){return[new cl(0,t,0)]}let OQ="";function sI(t,e,n,r,i){var s;let o=r.head-t.from,l=-1;if(o==0){if(!i||!t.length)return null;e[0].level!=n&&(o=e[0].side(!1,n),l=0)}else if(o==t.length){if(i)return null;let h=e[e.length-1];h.level!=n&&(o=h.side(!0,n),l=e.length-1)}l<0&&(l=cl.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc));let a=e[l];o==a.side(i,n)&&(a=e[l+=i?1:-1],o=a.side(!i,n));let u=i==(a.dir==n),c=Rn(t.text,o,u);if(OQ=t.text.slice(Math.min(o,c),Math.max(o,c)),c!=a.side(i,n))return Z.cursor(c+t.from,u?-1:1,a.level);let f=l==(i?e.length-1:0)?null:e[l+(i?1:-1)];return!f&&a.level!=n?Z.cursor(i?t.to:t.from,i?-1:1,n):f&&f.level<a.level?Z.cursor(f.side(!i,n)+t.from,i?1:-1,f.level):Z.cursor(c+t.from,i?-1:1,a.level)}const ms="￿";class vQ{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(qe.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ms}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i),this.readNode(i);let s=i.nextSibling;if(s==n)break;let o=xt.get(i),l=xt.get(s);(o&&l?o.breakAfter:(o?o.breakAfter:BS(i))||BS(s)&&(i.nodeName!="BR"||i.cmIgnore))&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=i.exec(n))&&(s=l.index,o=l[0].length),this.append(n.slice(r,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);r=s+o}}readNode(e){if(e.cmIgnore)return;let n=xt.get(e),r=n&&n.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,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+Math.min(n,r.offset))}}function BS(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class FS{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class US extends xt{constructor(e){super(),this.view=e,this.compositionDeco=Pe.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new An],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new vi(0,0,0,e.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(e){let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:o,toA:l})=>l<this.minWidthFrom||o>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.view.inputState.composing<0?this.compositionDeco=Pe.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=lI(this.view,e.changes)),(ye.ie||ye.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let r=this.decorations,i=this.updateDeco(),s=fI(r,i,e.changes);return n=vi.extendWithRanges(n,s),this.dirty==0&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=ye.chrome||ye.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.dirty=0,s&&(s.written||r.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof io&&s.widget instanceof WS&&i.push(s.dom);r.updateGaps(i)}updateChildren(e,n){let r=this.childCursor(n);for(let i=e.length-1;;i--){let s=i>=0?e[i]:null;if(!s)break;let{fromA:o,toA:l,fromB:a,toB:u}=s,{content:c,breakAtStart:f,openStart:h,openEnd:p}=av.build(this.view.state.doc,a,u,this.decorations,this.dynamicDecorationMap),{i:d,off:g}=r.findPos(l,1),{i:O,off:m}=r.findPos(o,-1);YC(this,O,m,d,g,c,f,h,p)}}updateSelection(e=!1,n=!1){if((e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange(),!(n||this.mayControlSelection()))return;let r=this.forceSelection;this.forceSelection=!1;let i=this.view.state.selection.main,s=this.domAtPos(i.anchor),o=i.empty?s:this.domAtPos(i.head);if(ye.gecko&&i.empty&&oI(s)){let a=document.createTextNode("");this.view.observer.ignore(()=>s.node.insertBefore(a,s.node.childNodes[s.offset]||null)),s=o=new mn(a,0),r=!0}let l=this.view.observer.selectionRange;(r||!l.focusNode||!Sh(s.node,s.offset,l.anchorNode,l.anchorOffset)||!Sh(o.node,o.offset,l.focusNode,l.focusOffset))&&(this.view.observer.ignore(()=>{ye.android&&ye.chrome&&this.dom.contains(l.focusNode)&&hI(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let a=yh(this.view.root);if(a)if(i.empty){if(ye.gecko){let u=uI(s.node,s.offset);if(u&&u!=3){let c=SQ(s.node,s.offset,u==1?1:-1);c&&(s=new mn(c,u==1?0:c.nodeValue.length))}}a.collapse(s.node,s.offset),i.bidiLevel!=null&&l.cursorBidiLevel!=null&&(l.cursorBidiLevel=i.bidiLevel)}else if(a.extend){a.collapse(s.node,s.offset);try{a.extend(o.node,o.offset)}catch{}}else{let u=document.createRange();i.anchor>i.head&&([s,o]=[o,s]),u.setEnd(o.node,o.offset),u.setStart(s.node,s.offset),a.removeAllRanges(),a.addRange(u)}}),this.view.observer.setSelectionRange(s,o)),this.impreciseAnchor=s.precise?null:new mn(l.anchorNode,l.anchorOffset),this.impreciseHead=o.precise?null:new mn(l.focusNode,l.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,n=e.state.selection.main,r=yh(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=An.find(this,n.head);if(!o)return;let l=o.posAtStart;if(n.head==l||n.head==l+o.length)return;let a=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!a||!u||a.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,s)}mayControlSelection(){let e=this.view.root.activeElement;return e==this.dom||Rf(this.dom,this.view.observer.selectionRange)&&!(e&&this.dom.contains(e))}nearest(e){for(let n=e;n;){let r=xt.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof An)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){for(let r=this.length,i=this.children.length-1;;i--){let s=this.children[i],o=r-s.breakAfter-s.length;if(e>o||e==o&&s.type!=dt.WidgetBefore&&s.type!=dt.WidgetAfter&&(!i||n==2||this.children[i-1].breakAfter||this.children[i-1].type==dt.WidgetBefore&&n>-2))return s.coordsAt(e-o,n);r=o}}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==Mt.LTR;for(let u=0,c=0;c<this.children.length;c++){let f=this.children[c],h=u+f.length;if(h>i)break;if(u>=r){let p=f.dom.getBoundingClientRect();if(n.push(p.height),o){let d=f.dom.lastChild,g=d?gu(d):[];if(g.length){let O=g[g.length-1],m=a?O.right-p.left:p.right-O.left;m>l&&(l=m,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=h)}}}u=h+f.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Mt.RTL:Mt.LTR}measureTextSize(){for(let s of this.children)if(s instanceof An){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=gu(e.firstChild)[0];n=e.getBoundingClientRect().height,r=s?s.width/27:7,i=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new zC(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.length;if(o>r){let l=n.lineBlockAt(o).bottom-n.lineBlockAt(r).top;e.push(Pe.replace({widget:new WS(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return Pe.set(e)}updateDeco(){let e=this.view.state.facet(Ou).map((n,r)=>(this.dynamicDecorationMap[r]=typeof n=="function")?n(this.view):n);for(let n=e.length;n<e.length+3;n++)this.dynamicDecorationMap[n]=!1;return this.decorations=[...e,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=0,o=0,l=0,a=0;for(let c of this.view.state.facet(pQ).map(f=>f(this.view)))if(c){let{left:f,right:h,top:p,bottom:d}=c;f!=null&&(s=Math.max(s,f)),h!=null&&(o=Math.max(o,h)),p!=null&&(l=Math.max(l,p)),d!=null&&(a=Math.max(a,d))}let u={left:r.left-s,top:r.top-l,right:r.right+o,bottom:r.bottom+a};BM(this.view.scrollDOM,u,n.head<n.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==Mt.LTR)}}function oI(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}class WS extends ki{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function yQ(t){let e=t.observer.selectionRange,n=e.focusNode&&SQ(e.focusNode,e.focusOffset,0);if(!n)return null;let r=t.docView.nearest(n);if(!r)return null;if(r instanceof An){let i=n;for(;i.parentNode!=r.dom;)i=i.parentNode;let s=i.previousSibling;for(;s&&!xt.get(s);)s=s.previousSibling;let o=s?xt.get(s).posAtEnd:r.posAtStart;return{from:o,to:o,node:i,text:n}}else{for(;;){let{parent:s}=r;if(!s)return null;if(s instanceof An)break;r=s}let i=r.posAtStart;return{from:i,to:i+r.length,node:r.dom,text:n}}}function lI(t,e){let n=yQ(t);if(!n)return Pe.none;let{from:r,to:i,node:s,text:o}=n,l=e.mapPos(r,1),a=Math.max(l,e.mapPos(i,-1)),{state:u}=t,c=s.nodeType==3?s.nodeValue:new vQ([],u).readRange(s.firstChild,null).text;if(a-l<c.length)if(u.doc.sliceString(l,Math.min(u.doc.length,l+c.length),ms)==c)a=l+c.length;else if(u.doc.sliceString(Math.max(0,a-c.length),a,ms)==c)l=a-c.length;else return Pe.none;else if(u.doc.sliceString(l,a,ms)!=c)return Pe.none;let f=xt.get(s);return f instanceof KC?f=f.widget.topView:f&&(f.parent=null),Pe.set(Pe.replace({widget:new aI(s,o,f),inclusive:!0}).range(l,a))}class aI extends ki{constructor(e,n,r){super(),this.top=e,this.text=n,this.topView=r}eq(e){return this.top==e.top&&this.text==e.text}toDOM(){return this.top}ignoreEvent(){return!1}get customView(){return KC}}function SQ(t,e,n){if(n<=0)for(let r=t,i=e;;){if(r.nodeType==3)return r;if(r.nodeType==1&&i>0)r=r.childNodes[i-1],i=mu(r);else break}if(n>=0)for(let r=t,i=e;;){if(r.nodeType==3)return r;if(r.nodeType==1&&i<r.childNodes.length&&n>=0)r=r.childNodes[i],i=0;else break}return null}function uI(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}class cI{constructor(){this.changes=[]}compareRange(e,n){iO(e,n,this.changes)}comparePoint(e,n){iO(e,n,this.changes)}}function fI(t,e,n){let r=new cI;return st.compare(t,e,n,r),r.changes}function hI(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function dI(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return Z.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,l=s;n<0?o=Rn(i.text,s,!1):l=Rn(i.text,s);let a=r(i.text.slice(o,l));for(;o>0;){let u=Rn(i.text,o,!1);if(r(i.text.slice(u,o))!=a)break;o=u}for(;l<i.length;){let u=Rn(i.text,l);if(r(i.text.slice(l,u))!=a)break;l=u}return Z.range(o+i.from,l+i.from)}function pI(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function gI(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function qp(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function zS(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function YS(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function aO(t,e,n){let r,i,s,o,l=!1,a,u,c,f;for(let d=t.firstChild;d;d=d.nextSibling){let g=gu(d);for(let O=0;O<g.length;O++){let m=g[O];i&&qp(i,m)&&(m=zS(YS(m,i.bottom),i.top));let S=pI(e,m),y=gI(n,m);if(S==0&&y==0)return d.nodeType==3?qS(d,e,n):aO(d,e,n);if(!r||o>y||o==y&&s>S){r=d,i=m,s=S,o=y;let b=y?n<m.top?-1:1:S?e<m.left?-1:1:0;l=!b||(b>0?O<g.length-1:O>0)}S==0?n>m.bottom&&(!c||c.bottom<m.bottom)?(a=d,c=m):n<m.top&&(!f||f.top>m.top)&&(u=d,f=m):c&&qp(c,m)?c=YS(c,m.bottom):f&&qp(f,m)&&(f=zS(f,m.top))}}if(c&&c.bottom>=n?(r=a,i=c):f&&f.top<=n&&(r=u,i=f),!r)return{node:t,offset:0};let h=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return qS(r,h,n);if(l&&r.contentEditable!="false")return aO(r,h,n);let p=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:p}}function qS(t,e,n){let r=t.nodeValue.length,i=-1,s=1e9,o=0;for(let l=0;l<r;l++){let a=xl(t,l,l+1).getClientRects();for(let u=0;u<a.length;u++){let c=a[u];if(c.top==c.bottom)continue;o||(o=e-c.left);let f=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f<s){let h=e>=(c.left+c.right)/2,p=h;if((ye.chrome||ye.gecko)&&xl(t,l).getBoundingClientRect().left==c.right&&(p=!h),f<=0)return{node:t,offset:l+(p?1:0)};i=l+(p?1:0),s=f}}}return{node:t,offset:i>-1?i:o>0?t.nodeValue.length:0}}function bQ(t,e,n,r=-1){var i,s;let o=t.contentDOM.getBoundingClientRect(),l=o.top+t.viewState.paddingTop,a,{docHeight:u}=t.viewState,{x:c,y:f}=e,h=f-l;if(h<0)return 0;if(h>u)return t.state.doc.length;for(let b=t.defaultLineHeight/2,C=!1;a=t.elementAtHeight(h),a.type!=dt.Text;)for(;h=r>0?a.bottom+b:a.top-b,!(h>=0&&h<=u);){if(C)return n?null:0;C=!0,r=-r}f=l+h;let p=a.from;if(p<t.viewport.from)return t.viewport.from==0?0:n?null:GS(t,o,a,c,f);if(p>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:GS(t,o,a,c,f);let d=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:d,O=g.elementFromPoint(c,f);O&&!t.contentDOM.contains(O)&&(O=null),O||(c=Math.max(o.left+1,Math.min(o.right-1,c)),O=g.elementFromPoint(c,f),O&&!t.contentDOM.contains(O)&&(O=null));let m,S=-1;if(O&&((i=t.docView.nearest(O))===null||i===void 0?void 0:i.isEditable)!=!1){if(d.caretPositionFromPoint){let b=d.caretPositionFromPoint(c,f);b&&({offsetNode:m,offset:S}=b)}else if(d.caretRangeFromPoint){let b=d.caretRangeFromPoint(c,f);b&&({startContainer:m,startOffset:S}=b,(!t.contentDOM.contains(m)||ye.safari&&mI(m,S,c)||ye.chrome&&OI(m,S,c))&&(m=void 0))}}if(!m||!t.docView.dom.contains(m)){let b=An.find(t.docView,p);if(!b)return h>a.top+a.height/2?a.to:a.from;({node:m,offset:S}=aO(b.dom,c,f))}let y=t.docView.nearest(m);if(!y)return null;if(y.isWidget&&((s=y.dom)===null||s===void 0?void 0:s.nodeType)==1){let b=y.dom.getBoundingClientRect();return e.y<b.top||e.y<=b.bottom&&e.x<=(b.left+b.right)/2?y.posAtStart:y.posAtEnd}else return y.localPosFromDOM(m,S)+y.posAtStart}function GS(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let l=Math.floor((i-n.top)/t.defaultLineHeight);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+Ym(o,s,t.state.tabSize)}function mI(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return xl(t,r-1,r).getBoundingClientRect().left>n}function OI(t,e,n){if(e!=0)return!1;for(let i=t;;){let s=i.parentNode;if(!s||s.nodeType!=1||s.firstChild!=i)return!1;if(s.classList.contains("cm-line"))break;i=s}let r=t.nodeType==1?t.getBoundingClientRect():xl(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function vI(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=!r||!t.lineWrapping?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let a=t.dom.getBoundingClientRect(),u=t.textDirectionAt(i.from),c=t.posAtCoords({x:n==(u==Mt.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(c!=null)return Z.cursor(c,n?-1:1)}let o=An.find(t.docView,e.head),l=o?n?o.posAtEnd:o.posAtStart:n?i.to:i.from;return Z.cursor(l,n?-1:1)}function HS(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let l=e,a=null;;){let u=sI(i,s,o,l,n),c=OQ;if(!u){if(i.number==(n?t.state.doc.lines:1))return l;c=`
47
- `,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),u=Z.cursor(n?i.from:i.to)}if(a){if(!a(c))return l}else{if(!r)return u;a=r(c)}l=u}}function yI(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==$t.Space&&(i=o),i==o}}function SI(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return Z.cursor(i,e.assoc);let o=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i),c=t.documentTop;if(u)o==null&&(o=u.left-a.left),l=s<0?u.top:u.bottom;else{let p=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(a.right-a.left,t.defaultCharacterWidth*(i-p.from))),l=(s<0?p.top:p.bottom)+c}let f=a.left+o,h=r??t.defaultLineHeight>>1;for(let p=0;;p+=10){let d=l+(h+p)*s,g=bQ(t,{x:f,y:d},!1,s);if(d<a.top||d>a.bottom||(s<0?g<i:g>i))return Z.cursor(g,e.assoc,void 0,o)}}function Gp(t,e,n){let r=t.state.facet(dQ).map(i=>i(t));for(;;){let i=!1;for(let s of r)s.between(n.from-1,n.from+1,(o,l,a)=>{n.from>o&&n.from<l&&(n=e.head>n.from?Z.cursor(o,1):Z.cursor(l,-1),i=!0)});if(!i)return n}}class bI{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;let n=(r,i)=>{this.ignoreDuringComposition(i)||i.type=="keydown"&&this.keydown(e,i)||(this.mustFlushObserver(i)&&e.observer.forceFlush(),this.runCustomHandlers(i.type,e,i)?i.preventDefault():r(e,i))};for(let r in en){let i=en[r];e.contentDOM.addEventListener(r,s=>{KS(e,s)&&n(i,s)},uO[r]),this.registeredEvents.push(r)}e.scrollDOM.addEventListener("mousedown",r=>{if(r.target==e.scrollDOM&&r.clientY>e.contentDOM.getBoundingClientRect().bottom&&(n(en.mousedown,r),!r.defaultPrevented&&r.button==2)){let i=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=i,200)}}),ye.chrome&&ye.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,ye.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,n){var r;let i;this.customHandlers=[];for(let s of n)if(i=(r=s.update(e).spec)===null||r===void 0?void 0:r.domEventHandlers){this.customHandlers.push({plugin:s.value,handlers:i});for(let o in i)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{KS(e,l)&&this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,n,r){for(let i of this.customHandlers){let s=i.handlers[e];if(s)try{if(s.call(i.plugin,r,n)||r.defaultPrevented)return!0}catch(o){ar(n.state,o)}}return!1}runScrollHandlers(e,n){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let r of this.customHandlers){let i=r.handlers.scroll;if(i)try{i.call(r.plugin,n,e)}catch(s){ar(e.state,s)}}}keydown(e,n){if(this.lastKeyCode=n.keyCode,this.lastKeyTime=Date.now(),n.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(ye.android&&ye.chrome&&!n.synthetic&&(n.keyCode==13||n.keyCode==8))return e.observer.delayAndroidKey(n.key,n.keyCode),!0;let r;return ye.ios&&!n.synthetic&&!n.altKey&&!n.metaKey&&((r=wQ.find(i=>i.keyCode==n.keyCode))&&!n.ctrlKey||wI.indexOf(n.key)>-1&&n.ctrlKey&&!n.shiftKey)?(this.pendingIOSKey=r||n,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let n=this.pendingIOSKey;return n?(this.pendingIOSKey=void 0,ul(e.contentDOM,n.key,n.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:ye.safari&&!ye.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const wQ=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],wI="dthko",kQ=[16,17,18,20,91,92,224,225];function Uc(t){return t*.7+8}class kI{constructor(e,n,r,i){this.view=e,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=FM(e.contentDOM);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=n.shiftKey,this.multiple=e.state.facet(qe.allowMultipleSelections)&&xI(e,n),this.dragMove=PI(e,n),this.dragging=CI(e,n)&&QQ(n)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=e);let r=0,i=0,s=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=s.left?r=-Uc(s.left-e.clientX):e.clientX>=s.right&&(r=Uc(e.clientX-s.right)),e.clientY<=s.top?i=-Uc(s.top-e.clientY):e.clientY>=s.bottom&&(i=Uc(e.clientY-s.bottom)),this.setScrollSpeed(r,i)}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=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}select(e){let n=this.style.get(e,this.extend,this.multiple);(this.mustSelect||!n.eq(this.view.state.selection)||n.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function xI(t,e){let n=t.state.facet(iQ);return n.length?n[0](e):ye.mac?e.metaKey:e.ctrlKey}function PI(t,e){let n=t.state.facet(sQ);return n.length?n[0](e):ye.mac?!e.altKey:!e.ctrlKey}function CI(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=yh(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function KS(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=xt.get(n))&&r.ignoreEvent(e))return!1;return!0}const en=Object.create(null),uO=Object.create(null),xQ=ye.ie&&ye.ie_version<15||ye.ios&&ye.webkit_version<604;function QI(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),PQ(t,n.value)},50)}function PQ(t,e){let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(cO!=null&&n.selection.ranges.every(a=>a.empty)&&cO==s.toString()){let a=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==a)return{range:u};a=c.from;let f=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:f},range:Z.cursor(u.from+f.length)}})}else o?r=n.changeByRange(a=>{let u=s.line(i++);return{changes:{from:a.from,to:a.to,insert:u.text},range:Z.cursor(a.from+u.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}en.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select"),e.keyCode==27?t.inputState.lastEscPress=Date.now():kQ.indexOf(e.keyCode)<0&&(t.inputState.lastEscPress=0)};en.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};en.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};uO.touchstart=uO.touchmove={passive:!0};en.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let r of t.state.facet(oQ))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=_I(t,e)),n){let r=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new kI(t,e,n,r)),r&&t.observer.ignore(()=>UC(t.contentDOM)),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(e)}};function JS(t,e,n,r){if(r==1)return Z.cursor(e,n);if(r==2)return dI(t.state,e,n);{let i=An.find(t.docView,e),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,l=i?i.posAtEnd:s.to;return l<t.state.doc.length&&l==s.to&&l++,Z.range(o,l)}}let CQ=(t,e)=>t>=e.top&&t<=e.bottom,eb=(t,e,n)=>CQ(e,n)&&t>=n.left&&t<=n.right;function EI(t,e,n,r){let i=An.find(t.docView,e);if(!i)return 1;let s=e-i.posAtStart;if(s==0)return 1;if(s==i.length)return-1;let o=i.coordsAt(s,-1);if(o&&eb(n,r,o))return-1;let l=i.coordsAt(s,1);return l&&eb(n,r,l)?1:o&&CQ(r,o)?-1:1}function tb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:EI(t,n,e.clientX,e.clientY)}}const $I=ye.ie&&ye.ie_version<=11;let nb=null,rb=0,ib=0;function QQ(t){if(!$I)return t.detail;let e=nb,n=ib;return nb=t,ib=Date.now(),rb=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(rb+1)%3:1}function _I(t,e){let n=tb(t,e),r=QQ(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,l){let a=tb(t,s),u=JS(t,a.pos,a.bias,r);if(n.pos!=a.pos&&!o){let c=JS(t,n.pos,n.bias,r),f=Math.min(c.from,u.from),h=Math.max(c.to,u.to);u=f<u.from?Z.range(f,h):Z.range(h,f)}return o?i.replaceRange(i.main.extend(u.from,u.to)):l&&i.ranges.length>1&&i.ranges.some(c=>c.eq(u))?TI(i,u):l?i.addRange(u):Z.create([u])}}}function TI(t,e){for(let n=0;;n++)if(t.ranges[n].eq(e))return Z.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}en.dragstart=(t,e)=>{let{selection:{main:n}}=t.state,{mouseSelection:r}=t.inputState;r&&(r.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove")};function sb(t,e,n,r){if(!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:s}=t.inputState,o=r&&s&&s.dragging&&s.dragMove?{from:s.dragging.from,to:s.dragging.to}:null,l={from:i,insert:n},a=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(i,-1),head:a.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"})}en.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let n=e.dataTransfer.files;if(n&&n.length){e.preventDefault();let r=Array(n.length),i=0,s=()=>{++i==n.length&&sb(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(n[o])}}else sb(t,e,e.dataTransfer.getData("Text"),!0)};en.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let n=xQ?null:e.clipboardData;n?(PQ(t,n.getData("text/plain")||n.getData("text/uri-text")),e.preventDefault()):QI(t)};function RI(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.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(),t.focus()},50)}function AI(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:r}}let cO=null;en.copy=en.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=AI(t.state);if(!n&&!i)return;cO=i?n:null;let s=xQ?null:e.clipboardData;s?(e.preventDefault(),s.clearData(),s.setData("text/plain",n)):RI(t,n),e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})};const EQ=bi.define();function $Q(t,e){let n=[];for(let r of t.facet(uQ)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:EQ.of(!0)}):null}function _Q(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=$Q(t.state,e);n?t.dispatch(n):t.update([])}},10)}en.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),_Q(t)};en.blur=t=>{t.observer.clearSelectionRange(),_Q(t)};en.compositionstart=en.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};en.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,ye.chrome&&ye.android&&t.observer.flushSoon(),setTimeout(()=>{t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)};en.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};en.beforeinput=(t,e)=>{var n;let r;if(ye.chrome&&ye.android&&(r=wQ.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let i=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};const ob=["pre-wrap","normal","pre-line","break-spaces"];class DI{constructor(e){this.lineWrapping=e,this.doc=et.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return ob.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let l=ob.indexOf(e)>-1,a=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=s,a){this.heightSamples={};for(let u=0;u<o.length;u++){let c=o[u];c<0?u++:this.heightSamples[Math.floor(c*10)]=!0}}return a}}class MI{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Di{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this.type=s}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(e){let n=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(e.type)?e.type:[e]);return new Di(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var bt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(bt||(bt={}));const Af=.001;class Mn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>Af&&(e.heightChanged=!0),this.height=n)}replace(e,n,r){return Mn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let s=this,o=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:a,toA:u,fromB:c,toB:f}=i[l],h=s.lineAt(a,bt.ByPosNoHeight,r.setDoc(n),0,0),p=h.to>=u?h:s.lineAt(u,bt.ByPosNoHeight,r,0,0);for(f+=p.to-u,u=p.to;l>0&&h.from<=i[l-1].toA;)a=i[l-1].fromA,c=i[l-1].fromB,l--,a<h.from&&(h=s.lineAt(a,bt.ByPosNoHeight,r,0,0));c+=h.from-a,a=h.from;let d=cv.build(r.setDoc(o),e,c,f);s=s.replace(a,u,d)}return s.updateHeight(r,0)}static empty(){return new nr(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(s>i*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(i<s){let l=e[n++];l&&(i+=l.size)}else{let l=e[--r];l&&(s+=l.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new II(Mn.of(e.slice(0,n)),o,Mn.of(e.slice(r)))}}Mn.prototype.size=1;class TQ extends Mn{constructor(e,n,r){super(e,n),this.type=r}blockAt(e,n,r,i){return new Di(i,this.length,r,this.height,this.type)}lineAt(e,n,r,i,s){return this.blockAt(0,r,i,s)}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.blockAt(0,r,i,s))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(e,i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class nr extends TQ{constructor(e,n){super(e,n,dt.Text),this.collapsed=0,this.widgetHeight=0}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof nr||i instanceof fn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof fn?i=new nr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Mn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(e,i.heights[i.index++]):(r||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class fn extends Mn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,s=i-r+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*s);o=a/s,l=(this.height-a)/(this.length-s-1)}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:l}}blockAt(e,n,r,i){let{firstLine:s,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(n,i);if(n.lineWrapping){let u=i+Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length),c=n.doc.lineAt(u),f=l+c.length*a,h=Math.max(r,e-f/2);return new Di(c.from,c.length,h,f,dt.Text)}else{let u=Math.max(0,Math.min(o-s,Math.floor((e-r)/l))),{from:c,length:f}=n.doc.line(s+u);return new Di(c,f,r+l*u,l,dt.Text)}}lineAt(e,n,r,i,s){if(n==bt.ByHeight)return this.blockAt(e,r,i,s);if(n==bt.ByPosNoHeight){let{from:p,to:d}=r.doc.lineAt(e);return new Di(p,d-p,0,0,dt.Text)}let{firstLine:o,perLine:l,perChar:a}=this.heightMetrics(r,s),u=r.doc.lineAt(e),c=l+u.length*a,f=u.number-o,h=i+l*f+a*(u.from-s-f);return new Di(u.from,u.length,Math.max(i,Math.min(h,i+this.height-c)),c,dt.Text)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:l,perLine:a,perChar:u}=this.heightMetrics(r,s);for(let c=e,f=i;c<=n;){let h=r.doc.lineAt(c);if(c==e){let d=h.number-l;f+=a*d+u*(e-s-d)}let p=a+u*h.length;o(new Di(h.from,h.length,f,p,dt.Text)),f+=p,c=h.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof fn?r[r.length-1]=new fn(s.length+i):r.push(null,new fn(i-1))}if(e>0){let s=r[0];s instanceof fn?r[0]=new fn(e+s.length):r.unshift(new fn(e-1),null)}return Mn.of(r)}decomposeLeft(e,n){n.push(new fn(e-1),null)}decomposeRight(e,n){n.push(null,new fn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],l=Math.max(n,i.from),a=-1;for(i.from>n&&o.push(new fn(i.from-n-1).updateHeight(e,n));l<=s&&i.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=i.heights[i.index++];a==-1?a=f:Math.abs(f-a)>=Af&&(a=-2);let h=new nr(c,f);h.outdated=!1,o.push(h),l+=c+1}l<=s&&o.push(null,new fn(s-l).updateHeight(e,l));let u=Mn.of(o);return(a<0||Math.abs(u.height-this.height)>=Af||Math.abs(a-this.heightMetrics(e,n).perLine)>=Af)&&(e.heightChanged=!0),u}else(r||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class II extends Mn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(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,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,l=s+this.left.length+this.break,a=n==bt.ByHeight?e<o:e<l,u=a?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,l);if(this.break||(a?u.to<l:u.from>l))return u;let c=n==bt.ByPosNoHeight?bt.ByPosNoHeight:bt.ByPos;return a?u.join(this.right.lineAt(l,c,r,o,l)):this.left.lineAt(l,c,r,i,s).join(u)}forEachLine(e,n,r,i,s,o){let l=i+this.left.height,a=s+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,n,r,i,s,o),n>=a&&this.right.forEachLine(e,n,r,l,a,o);else{let u=this.lineAt(a,bt.ByPos,r,i,s);e<u.from&&this.left.forEachLine(e,u.from-1,r,i,s,o),u.to>=e&&u.from<=n&&o(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,l,a,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&lb(s,o-1),n<this.length){let l=s.length;this.decomposeRight(n,s),lb(s,l)}return Mn.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Mn.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,l=n+s.length+this.break,a=null;return i&&i.from<=n+s.length&&i.more?a=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,r),i&&i.from<=l+o.length&&i.more?a=o=o.updateHeight(e,l,r,i):o.updateHeight(e,l,r),a?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function lb(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof fn&&(r=t[e+1])instanceof fn&&t.splice(e-1,3,new fn(n.length+1+r.length))}const NI=5;class cv{constructor(e,n){this.pos=e,this.oracle=n,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,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof nr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new nr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new TQ(s,i,r.type)):(s||i>=NI)&&this.addLineDeco(i,s)}else n>e&&this.span(e,n);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:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,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 nr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new fn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof nr)return e;let n=new nr(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine(),e.type==dt.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=dt.WidgetBefore&&(this.covering=e)}addLineDeco(e,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),this.writtenTo=this.pos=this.pos+n}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof nr)&&!this.isCovered?this.nodes.push(new nr(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof nr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new cv(r,e);return st.spans(n,r,i,s,0),s.finish(r)}}function LI(t,e,n){let r=new XI;return st.compare(t,e,n,r,0),r.changes}class XI{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&iO(e,n,this.changes,5)}}function VI(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),a=Math.min(i.innerHeight,n.bottom);for(let u=t.parentNode;u&&u!=r.body;)if(u.nodeType==1){let c=u,f=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let h=c.getBoundingClientRect();s=Math.max(s,h.left),o=Math.min(o,h.right),l=Math.max(l,h.top),a=u==t.parentNode?h.bottom:Math.min(a,h.bottom)}u=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:l-(n.top+e),bottom:Math.max(l,a)-(n.top+e)}}function ZI(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Hp{constructor(e,n,r){this.from=e,this.to=n,this.size=r}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e){return Pe.replace({widget:new jI(this.size,e)}).range(this.from,this.to)}}class jI extends ki{constructor(e,n){super(),this.size=e,this.vertical=n}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){this.state=e,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.scaler=ub,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Mt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(uv).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new DI(n),this.stateDeco=e.facet(Ou).filter(r=>typeof r!="function"),this.heightMap=Mn.empty().applyChanges(this.stateDeco,et.empty,this.heightOracle.setDoc(e.doc),[new vi(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Pe.set(this.lineGaps.map(r=>r.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new Wc(s,o))}}this.viewports=e.sort((r,i)=>r.from-i.from),this.scaler=this.heightMap.height<=7e6?ub:new UI(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Ea(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Ou).filter(u=>typeof u!="function");let i=e.changedRanges,s=vi.extendWithRanges(i,LI(r,this.stateDeco,e?e.changes:Ht.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=o&&(e.flags|=2);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let a=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),a&&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(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(fQ)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Mt.RTL:Mt.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),l=n.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let u=0,c=0,f=parseInt(r.paddingTop)||0,h=parseInt(r.paddingBottom)||0;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let p=(this.printing?ZI:VI)(n,this.paddingTop),d=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView&&(this.inView=O,O&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let m=l.width;if((this.contentDOMWidth!=m||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),a){let y=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(y)&&(o=!0),o||i.lineWrapping&&Math.abs(m-this.contentDOMWidth)>i.charWidth){let{lineHeight:b,charWidth:C,textHeight:Q}=e.docView.measureTextSize();o=b>0&&i.refresh(s,b,C,Q,m/C,y),o&&(e.docView.minWidth=0,u|=8)}d>0&&g>0?c=Math.max(d,g):d<0&&g<0&&(c=Math.min(d,g)),i.heightChanged=!1;for(let b of this.viewports){let C=b.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(b);this.heightMap=(o?Mn.empty().applyChanges(this.stateDeco,et.empty,this.heightOracle,[new vi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new MI(b.from,C))}i.heightChanged&&(u|=2)}let S=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return S&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new Wc(i.lineAt(o-r*1e3,bt.ByHeight,s,0,0).from,i.lineAt(l+(1-r)*1e3,bt.ByHeight,s,0,0).to);if(n){let{head:u}=n.range;if(u<a.from||u>a.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(u,bt.ByPos,s,0,0),h;n.y=="center"?h=(f.top+f.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u<a.from?h=f.top:h=f.bottom-c,a=new Wc(i.lineAt(h-1e3/2,bt.ByHeight,s,0,0).from,i.lineAt(h+c+1e3/2,bt.ByHeight,s,0,0).to)}}return a}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new Wc(this.heightMap.lineAt(r,bt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,bt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,bt.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,bt.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=l+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new Hp(n.mapPos(i.from),n.mapPos(i.to),i.size));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=Mt.LTR&&!r)return[];let l=[],a=(u,c,f,h)=>{if(c-u<s)return;let p=this.state.selection.main,d=[p.from];p.empty||d.push(p.to);for(let O of d)if(O>u&&O<c){a(u,O-10,f,h),a(O+10,c,f,h);return}let g=FI(e,O=>O.from>=f.from&&O.to<=f.to&&Math.abs(O.from-u)<s&&Math.abs(O.to-c)<s&&!d.some(m=>O.from<m&&O.to>m));if(!g){if(c<f.to&&n&&r&&n.visibleRanges.some(O=>O.from<=c&&O.to>=c)){let O=n.moveToLineBoundary(Z.cursor(c),!1,!0).head;O>u&&(c=O)}g=new Hp(u,c,this.gapSize(f,u,c,h))}l.push(g)};for(let u of this.viewportLines){if(u.length<o)continue;let c=BI(u.from,u.to,this.stateDeco);if(c.total<o)continue;let f=this.scrollTarget?this.scrollTarget.range.head:null,h,p;if(r){let d=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,O;if(f!=null){let m=Yc(c,f),S=((this.visibleBottom-this.visibleTop)/2+d)/u.height;g=m-S,O=m+S}else g=(this.visibleTop-u.top-d)/u.height,O=(this.visibleBottom-u.top+d)/u.height;h=zc(c,g),p=zc(c,O)}else{let d=c.total*this.heightOracle.charWidth,g=i*this.heightOracle.charWidth,O,m;if(f!=null){let S=Yc(c,f),y=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/d;O=S-y,m=S+y}else O=(this.pixelViewport.left-g)/d,m=(this.pixelViewport.right+g)/d;h=zc(c,O),p=zc(c,m)}h>u.from&&a(u.from,h,u,c),p<u.to&&a(p,u.to,u,c)}return l}gapSize(e,n,r,i){let s=Yc(i,r)-Yc(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){Hp.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Pe.set(e.map(n=>n.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];st.spans(e,this.viewport.from,this.viewport.to,{span(i,s){n.push({from:i,to:s})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,s)=>i.from!=n[s].from||i.to!=n[s].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Ea(this.heightMap.lineAt(e,bt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Ea(this.heightMap.lineAt(this.scaler.fromDOM(e),bt.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return Ea(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 Wc{constructor(e,n){this.from=e,this.to=n}}function BI(t,e,n){let r=[],i=t,s=0;return st.spans(n,t,e,{span(){},point(o,l){o>i&&(r.push({from:i,to:o}),s+=o-i),i=l}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function zc({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],l=o-s;if(r<=l)return s+r;r-=l}}function Yc(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function FI(t,e){for(let n of t)if(e(n))return n}const ub={toDOM(t){return t},fromDOM(t){return t},scale:1};class UI{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:l,to:a})=>{let u=n.lineAt(l,bt.ByPos,e,0,0).top,c=n.lineAt(a,bt.ByPos,e,0,0).bottom;return i+=c-u,{from:l,to:a,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]: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 n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]: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}}}function Ea(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Di(t.from,t.length,n,r-n,Array.isArray(t.type)?t.type.map(i=>Ea(i,e)):t.type)}const qc=Oe.define({combine:t=>t.join(" ")}),fO=Oe.define({combine:t=>t.indexOf(!0)>-1}),hO=_s.newName(),RQ=_s.newName(),AQ=_s.newName(),DQ={"&light":"."+RQ,"&dark":"."+AQ};function dO(t,e,n){return new _s(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const WI=dO("."+hO,{"&":{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},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",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-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .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:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused .cm-cursor":{display:"block"},"&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",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&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},"&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-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"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".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"}},DQ);class zI{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let l=s||o?[]:qI(e),a=new vQ(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=GI(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!kl(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),u=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!kl(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=Z.single(u,a)}}}function MQ(t,e){let n,{newSel:r}=e,i=t.state.selection.main;if(e.bounds){let{from:s,to:o}=e.bounds,l=i.from,a=null;(t.inputState.lastKeyCode===8&&t.inputState.lastKeyTime>Date.now()-100||ye.android&&e.text.length<o-s)&&(l=i.to,a="end");let u=YI(t.state.doc.sliceString(s,o,ms),e.text,l-s,a);u&&(ye.chrome&&t.inputState.lastKeyCode==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==ms+ms&&u.toB--,n={from:s+u.from,to:s+u.toA,insert:et.of(e.text.slice(u.from,u.toB).split(ms))})}else r&&(!t.hasFocus&&t.state.facet(Cd)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(ye.mac||ye.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Z.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:et.of([" "])}):ye.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
48
- `&&t.lineWrapping&&(r&&(r=Z.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:et.of([" "])}),n){let s=t.state;if(ye.ios&&t.inputState.flushIOSKey(t)||ye.android&&(n.from==i.from&&n.to==i.to&&n.insert.length==1&&n.insert.lines==2&&ul(t.contentDOM,"Enter",13)||n.from==i.from-1&&n.to==i.to&&n.insert.length==0&&ul(t.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&n.insert.length==0&&ul(t.contentDOM,"Delete",46)))return!0;let o=n.insert.toString();if(t.state.facet(aQ).some(u=>u(t,n.from,n.to,o)))return!0;t.inputState.composing>=0&&t.inputState.composing++;let l;if(n.from>=i.from&&n.to<=i.to&&n.to-n.from>=(i.to-i.from)/3&&(!r||r.main.empty&&r.main.from==n.from+n.insert.length)&&t.inputState.composing<0){let u=i.from<n.from?s.sliceDoc(i.from,n.from):"",c=i.to>n.to?s.sliceDoc(n.to,i.to):"";l=s.replaceSelection(t.state.toText(u+n.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let u=s.changes(n),c=r&&!s.selection.main.eq(r.main)&&r.main.to<=u.newLength?r.main:void 0;if(s.selection.ranges.length>1&&t.inputState.composing>=0&&n.to<=i.to&&n.to>=i.to-10){let f=t.state.sliceDoc(n.from,n.to),h=yQ(t)||t.state.doc.lineAt(i.head),p=i.to-n.to,d=i.to-i.from;l=s.changeByRange(g=>{if(g.from==i.from&&g.to==i.to)return{changes:u,range:c||g.map(u)};let O=g.to-p,m=O-f.length;if(g.to-g.from!=d||t.state.sliceDoc(m,O)!=f||h&&g.to>=h.from&&g.from<=h.to)return{range:g};let S=s.changes({from:m,to:O,insert:n.insert}),y=g.to-i.to;return{changes:S,range:c?Z.range(Math.max(0,c.anchor+y),Math.max(0,c.head+y)):g.map(S)}})}else l={changes:u,selection:c&&s.selection.replaceRange(c)}}let a="input.type";return t.composing&&(a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(l,{scrollIntoView:!0,userEvent:a}),!0}else if(r&&!r.main.eq(i)){let s=!1,o="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),o=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:s,userEvent:o}),!0}else return!1}function YI(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,l=e.length;for(;o>0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let a=Math.max(0,s-Math.min(o,l));n-=o+a-s}if(o<s&&t.length<e.length){let a=n<=s&&n>=o?s-n:0;s-=a,l=s+(l-o),o=s}else if(l<s){let a=n<=s&&n>=l?s-n:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function qI(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new FS(n,r)),(i!=n||s!=r)&&e.push(new FS(i,s))),e}function GI(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Z.single(n+e,r+e):null}const HI={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Kp=ye.ie&&ye.ie_version<=11;class KI{constructor(e){this.view=e,this.active=!1,this.selectionRange=new UM,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.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(ye.ie&&ye.ie_version<=11||ye.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),Kp&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM),this.resizeContent=new ResizeObserver(()=>this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){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((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Cd)?r.root.activeElement!=this.dom:!Rf(r.dom,i))return;let s=i.anchorNode&&r.docView.nearest(i.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(ye.ie&&ye.ie_version<=11||ye.android&&ye.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Sh(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=ye.safari&&e.root.nodeType==11&&ZM(this.dom.ownerDocument)==this.dom&&JI(this.view)||yh(e.root);if(!n||this.selectionRange.eq(n))return!1;let r=Rf(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&zM(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)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,HI),Kp&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Kp&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),!this.flush()&&s.force&&ul(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,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()}processRecords(){let e=this.queue;for(let s of this.observer.takeRecords())e.push(s);e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Rf(this.dom,this.selectionRange);return e<0&&!i?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new zI(this.view,e,n,r))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return!1;let r=this.view.state,i=MQ(this.view,n);return this.view.state==r&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.dirty|=4),e.type=="childList"){let r=cb(n,e.previousSibling||e.target.previousSibling,-1),i=cb(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.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),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),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,r,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect(),(i=this.resizeContent)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function cb(t,e,n){for(;e;){let r=xt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function JI(t){let e=null;function n(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let r=e.startContainer,i=e.startOffset,s=e.endContainer,o=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);return Sh(l.node,l.offset,s,o)&&([r,i,s,o]=[s,o,r,i]),{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}}class me{constructor(e={}){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.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(n=>this.update([n])),this.dispatch=this.dispatch.bind(this),this._root=e.root||WM(e.parent)||document,this.viewState=new ab(e.state||qe.create(e)),this.plugins=this.state.facet(Ca).map(n=>new Yp(n));for(let n of this.plugins)n.update(this);this.observer=new KI(this),this.inputState=new bI(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new US(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}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.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(e.length==1&&e[0]instanceof Jt?e[0]:this.state.update(...e))}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,s=this.state;for(let h of e){if(h.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=h.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,a=null;e.some(h=>h.annotation(EQ))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=$Q(s,o),a||(l=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(c=null)):this.observer.clear(),s.facet(qe.phrases)!=this.state.facet(qe.phrases))return this.setState(s);i=kh.create(this,s,e),i.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:p}=h.state.selection;f=new wh(p.empty?p:Z.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of h.effects)p.is(jS)&&(f=p.value)}this.viewState.update(i,f),this.bidiCache=xh.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Qa)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(qc)!=i.state.facet(qc)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty)for(let h of this.state.facet(sO))h(i);(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!MQ(this,c)&&u.force&&ul(this.contentDOM,u.key,u.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 n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new ab(e),this.plugins=e.facet(Ca).map(r=>new Yp(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView=new US(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ca),r=e.state.facet(Ca);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new Yp(s));else{let l=this.plugins[o];l.mustUpdate=e,i.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this)}measure(e=!0){if(this.destroyed)return;this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,{scrollHeight:r,scrollTop:i,clientHeight:s}=this.scrollDOM,o=i>r-s-4?r:i;try{for(let l=0;;l++){this.updateState=1;let a=this.viewport,u=this.viewState.lineBlockAtHeight(o),c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let f=[];c&4||([this.measureRequests,f]=[f,this.measureRequests]);let h=f.map(O=>{try{return O.read(this)}catch(m){return ar(this.state,m),fb}}),p=kh.create(this,this.state,[]),d=!1,g=!1;p.flags|=c,n?n.flags|=c:n=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),d=this.docView.update(p));for(let O=0;O<f.length;O++)if(h[O]!=fb)try{let m=f[O];m.write&&m.write(h[O],this)}catch(m){ar(this.state,m)}if(this.viewState.editorHeight)if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,g=!0;else{let O=this.viewState.lineBlockAt(u.from).top-u.top;(O>1||O<-1)&&(this.scrollDOM.scrollTop+=O,g=!0)}if(d&&this.docView.updateSelection(!0),this.viewport.from==a.from&&this.viewport.to==a.to&&!g&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(sO))l(n)}get themeClasses(){return hO+" "+(this.state.facet(fO)?AQ:RQ)+" "+this.state.facet(qc)}updateAttrs(){let e=hb(this,hQ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Cd)?"true":"false",class:"cm-content",style:`${ye.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),hb(this,uv,n);let r=this.observer.ignore(()=>{let i=rO(this.contentDOM,this.contentAttrs,n),s=rO(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(me.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Qa),_s.mount(this.root,this.styleModules.concat(WI).reverse())}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 n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}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,n,r){return Gp(this,e,HS(this,e,n,r))}moveByGroup(e,n){return Gp(this,e,HS(this,e,n,r=>yI(this,e.head,r)))}moveToLineBoundary(e,n,r=!0){return vI(this,e,n,r)}moveVertically(e,n,r){return Gp(this,e,SI(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),bQ(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[cl.find(s,e-i.from,-1,n)];return sv(r,o.dir==Mt.LTR==n>0)}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(cQ)||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>e5)return mQ(e.length);let n=this.textDirectionAt(e.from);for(let i of this.bidiCache)if(i.from==e.from&&i.dir==n)return i.order;let r=iI(e.text,n);return this.bidiCache.push(new xh(e.from,e.to,n,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ye.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{UC(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(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return jS.of(new wh(typeof e=="number"?Z.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(e){return jt.define(()=>({}),{eventHandlers:e})}static theme(e,n){let r=_s.newName(),i=[qc.of(r),Qa.of(dO(`.${r}`,e))];return n&&n.dark&&i.push(fO.of(!0)),i}static baseTheme(e){return Ls.lowest(Qa.of(dO("."+hO,e,DQ)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&xt.get(r)||xt.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}me.styleModule=Qa;me.inputHandler=aQ;me.focusChangeEffect=uQ;me.perLineTextDirection=cQ;me.exceptionSink=lQ;me.updateListener=sO;me.editable=Cd;me.mouseSelectionStyle=oQ;me.dragMovesSelection=sQ;me.clickAddsSelectionRange=iQ;me.decorations=Ou;me.atomicRanges=dQ;me.scrollMargins=pQ;me.darkTheme=fO;me.contentAttributes=uv;me.editorAttributes=hQ;me.lineWrapping=me.contentAttributes.of({class:"cm-lineWrapping"});me.announce=Ve.define();const e5=4096,fb={};class xh{constructor(e,n,r,i){this.from=e,this.to=n,this.dir=r,this.order=i}static update(e,n){if(n.empty)return e;let r=[],i=e.length?e[e.length-1].dir:Mt.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new xh(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.order))}return r}}function hb(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&nO(o,n)}return n}const t5=ye.mac?"mac":ye.windows?"win":ye.linux?"linux":"key";function n5(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,l;for(let a=0;a<n.length-1;++a){const u=n[a];if(/^(cmd|meta|m)$/i.test(u))l=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))s=!0;else if(/^s(hift)?$/i.test(u))o=!0;else if(/^mod$/i.test(u))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),l&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function Gc(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const r5=Ls.default(me.domEventHandlers({keydown(t,e){return NQ(IQ(e.state),t,e,"editor")}})),Fu=Oe.define({enables:r5}),db=new WeakMap;function IQ(t){let e=t.facet(Fu),n=db.get(e);return n||db.set(e,n=o5(e.reduce((r,i)=>r.concat(i),[]))),n}function i5(t,e,n){return NQ(IQ(t.state),e,t,n)}let us=null;const s5=4e3;function o5(t,e=t5){let n=Object.create(null),r=Object.create(null),i=(o,l)=>{let a=r[o];if(a==null)r[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,a,u)=>{var c,f;let h=n[o]||(n[o]=Object.create(null)),p=l.split(/ (?!$)/).map(O=>n5(O,e));for(let O=1;O<p.length;O++){let m=p.slice(0,O).join(" ");i(m,!0),h[m]||(h[m]={preventDefault:!0,run:[S=>{let y=us={view:S,prefix:m,scope:o};return setTimeout(()=>{us==y&&(us=null)},s5),!0}]})}let d=p.join(" ");i(d,!1);let g=h[d]||(h[d]={preventDefault:!1,run:((f=(c=h._any)===null||c===void 0?void 0:c.run)===null||f===void 0?void 0:f.slice())||[]});a&&g.run.push(a),u&&(g.preventDefault=!0)};for(let o of t){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of l){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,run:[]});for(let f in c)c[f].run.push(o.any)}let a=o[e]||o.key;if(a)for(let u of l)s(u,a,o.run,o.preventDefault),o.shift&&s(u,"Shift-"+a,o.shift,o.preventDefault)}return n}function NQ(t,e,n,r){let i=VM(e),s=dn(i,0),o=br(s)==i.length&&i!=" ",l="",a=!1;us&&us.view==n&&us.scope==r&&(l=us.prefix+" ",(a=kQ.indexOf(e.keyCode)<0)&&(us=null));let u=new Set,c=d=>{if(d){for(let g of d.run)if(!u.has(g)&&(u.add(g),g(n,e)))return!0;d.preventDefault&&(a=!0)}return!1},f=t[r],h,p;if(f){if(c(f[l+Gc(i,e,!o)]))return!0;if(o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ye.windows&&e.ctrlKey&&e.altKey)&&(h=Ts[e.keyCode])&&h!=i){if(c(f[l+Gc(h,e,!0)]))return!0;if(e.shiftKey&&(p=pu[e.keyCode])!=i&&p!=h&&c(f[l+Gc(p,e,!1)]))return!0}else if(o&&e.shiftKey&&c(f[l+Gc(i,e,!0)]))return!0;if(c(f._any))return!0}return a}class Uu{constructor(e,n,r,i,s){this.className=e,this.left=n,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,n){return n.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,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=LQ(e);return[new Uu(n,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return l5(e,n,r)}}function LQ(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Mt.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function pb(t,e,n){let r=Z.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(r,!0,!0).from),type:dt.Text}}function gb(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==dt.Text))return r}return n}function l5(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),s=t.textDirection==Mt.LTR,o=t.contentDOM,l=o.getBoundingClientRect(),a=LQ(t),u=o.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=l.right-(c?parseInt(c.paddingRight):0),p=gb(t,r),d=gb(t,i),g=p.type==dt.Text?p:null,O=d.type==dt.Text?d:null;if(t.lineWrapping&&(g&&(g=pb(t,r,g)),O&&(O=pb(t,i,O))),g&&O&&g.from==O.from)return S(y(n.from,n.to,g));{let C=g?y(n.from,null,g):b(p,!1),Q=O?y(null,n.to,O):b(d,!0),_=[];return(g||p).to<(O||d).from-1?_.push(m(f,C.bottom,h,Q.top)):C.bottom<Q.top&&t.elementAtHeight((C.bottom+Q.top)/2).type==dt.Text&&(C.bottom=Q.top=(C.bottom+Q.top)/2),S(C).concat(_).concat(S(Q))}function m(C,Q,_,k){return new Uu(e,C-a.left,Q-a.top-.01,_-C,k-Q+.01)}function S({top:C,bottom:Q,horizontal:_}){let k=[];for(let w=0;w<_.length;w+=2)k.push(m(_[w],C,_[w+1],Q));return k}function y(C,Q,_){let k=1e9,w=-1e9,P=[];function E(N,z,re,se,V){let G=t.coordsAtPos(N,N==_.to?-2:2),te=t.coordsAtPos(re,re==_.from?2:-2);k=Math.min(G.top,te.top,k),w=Math.max(G.bottom,te.bottom,w),V==Mt.LTR?P.push(s&&z?f:G.left,s&&se?h:te.right):P.push(!s&&se?f:te.left,!s&&z?h:G.right)}let A=C??_.from,M=Q??_.to;for(let N of t.visibleRanges)if(N.to>A&&N.from<M)for(let z=Math.max(N.from,A),re=Math.min(N.to,M);;){let se=t.state.doc.lineAt(z);for(let V of t.bidiSpans(se)){let G=V.from+se.from,te=V.to+se.from;if(G>=re)break;te>z&&E(Math.max(G,z),C==null&&G<=A,Math.min(te,re),Q==null&&te>=M,V.dir)}if(z=se.to+1,z>=re)break}return P.length==0&&E(A,C==null,M,Q==null,t.textDirection),{top:k,bottom:w,horizontal:P}}function b(C,Q){let _=l.top+(Q?C.top:C.bottom);return{top:_,bottom:_,horizontal:[]}}}function a5(t,e){return t.constructor==e.constructor&&t.eq(e)}class u5{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],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"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Df)!=e.state.facet(Df)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(Df);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!a5(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Df=Oe.define();function XQ(t){return[jt.define(e=>new u5(e,t)),Df.of(t)]}const VQ=!ye.ios,vu=Oe.define({combine(t){return wi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function c5(t={}){return[vu.of(t),f5,h5,d5,fQ.of(!0)]}function ZQ(t){return t.startState.facet(vu)!=t.state.facet(vu)}const f5=XQ({above:!0,markers(t){let{state:e}=t,n=e.facet(vu),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty?!s||VQ:n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=i.empty?i:Z.cursor(i.head,i.head>i.anchor?-1:1);for(let a of Uu.forRange(t,o,l))r.push(a)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=ZQ(t);return n&&mb(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){mb(e.state,t)},class:"cm-cursorLayer"});function mb(t,e){e.style.animationDuration=t.facet(vu).cursorBlinkRate+"ms"}const h5=XQ({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Uu.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||ZQ(t)},class:"cm-selectionLayer"}),jQ={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};VQ&&(jQ[".cm-line"].caretColor="transparent !important");const d5=Ls.highest(me.theme(jQ)),BQ=Ve.define({map(t,e){return t==null?null:e.mapPos(t)}}),$a=ln.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(BQ)?r.value:n,t)}}),p5=jt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field($a);n==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"),(t.startState.field($a)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let t=this.view.state.field($a),e=t!=null&&this.view.coordsAtPos(t);if(!e)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-n.left+this.view.scrollDOM.scrollLeft,top:e.top-n.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field($a)!=t&&this.view.dispatch({effects:BQ.of(t)})}},{eventHandlers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function g5(){return[$a,p5]}function Ob(t,e,n,r,i){e.lastIndex=0;for(let s=t.iterRange(n,r),o=n,l;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)i(o+l.index,l)}function m5(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),s=Math.min(t.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 O5{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(l,a,u,c)=>i(c,u,u+l[0].length,l,a);else if(typeof r=="function")this.addMatch=(l,a,u,c)=>{let f=r(l,a,u);f&&c(u,u+l[0].length,f)};else if(r)this.addMatch=(l,a,u,c)=>c(u,u+l[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new $s,r=n.add.bind(n);for(let{from:i,to:s}of m5(e,this.maxLength))Ob(e.state.doc,this.regexp,i,s,(o,l)=>this.addMatch(l,e,o,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,o,l,a)=>{a>e.view.viewport.from&&l<e.view.viewport.to&&(r=Math.min(l,r),i=Math.max(a,i))}),e.viewportChanged||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let s of e.visibleRanges){let o=Math.max(s.from,r),l=Math.min(s.to,i);if(l>o){let a=e.state.doc.lineAt(o),u=a.to<l?e.state.doc.lineAt(l):a,c=Math.max(s.from,a.from),f=Math.min(s.to,u.to);if(this.boundary){for(;o>a.from;o--)if(this.boundary.test(a.text[o-1-a.from])){c=o;break}for(;l<u.to;l++)if(this.boundary.test(u.text[l-u.from])){f=l;break}}let h=[],p,d=(g,O,m)=>h.push(m.range(g,O));if(a==u)for(this.regexp.lastIndex=c-a.from;(p=this.regexp.exec(a.text))&&p.index<f-a.from;)this.addMatch(p,e,p.index+a.from,d);else Ob(e.state.doc,this.regexp,c,f,(g,O)=>this.addMatch(O,e,g,d));n=n.update({filterFrom:c,filterTo:f,filter:(g,O)=>g<c||O>f,add:h})}}return n}}const pO=/x/.unicode!=null?"gu":"g",v5=new RegExp(`[\0-\b
49
- --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,pO),y5={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 Jp=null;function S5(){var t;if(Jp==null&&typeof document<"u"&&document.body){let e=document.body.style;Jp=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Jp||!1}const Mf=Oe.define({combine(t){let e=wi(t,{render:null,specialChars:v5,addSpecialChars:null});return(e.replaceTabs=!S5())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,pO)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,pO)),e}});function b5(t={}){return[Mf.of(t),w5()]}let vb=null;function w5(){return vb||(vb=jt.fromClass(class{constructor(t){this.view=t,this.decorations=Pe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Mf)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new O5({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,s=dn(e[0],0);if(s==9){let o=i.lineAt(r),l=n.state.tabSize,a=ju(o.text,l,r-o.from);return Pe.replace({widget:new C5((l-a%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[s]||(this.decorationCache[s]=Pe.replace({widget:new P5(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Mf);t.startState.facet(Mf)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const k5="•";function x5(t){return t>=32?k5:t==10?"␤":String.fromCharCode(9216+t)}class P5 extends ki{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=x5(this.code),r=e.state.phrase("Control character")+" "+(y5[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let s=document.createElement("span");return s.textContent=n,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class C5 extends ki{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 Q5(){return $5}const E5=Pe.line({class:"cm-activeLine"}),$5=jt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(E5.range(i.from)),e=i.from)}return Pe.set(n)}},{decorations:t=>t.decorations}),gO=2e3;function _5(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),s=[];if(e.off>gO||n.off>gO||e.col<0||n.col<0){let o=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let a=r;a<=i;a++){let u=t.doc.line(a);u.length<=l&&s.push(Z.range(u.from+o,u.to+l))}}else{let o=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let a=r;a<=i;a++){let u=t.doc.line(a),c=Ym(u.text,o,t.tabSize,!0);if(c<0)s.push(Z.cursor(u.to));else{let f=Ym(u.text,l,t.tabSize);s.push(Z.range(u.from+c,u.from+f))}}}return s}function T5(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function yb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,s=i>gO?-1:i==r.length?T5(t,e.clientX):ju(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function R5(t,e){let n=yb(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(n.line).from),o=i.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let l=yb(t,i);if(!l)return r;let a=_5(t.state,n,l);return a.length?o?Z.create(a.concat(r.ranges)):Z.create(a):r}}:null}function A5(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return me.mouseSelectionStyle.of((n,r)=>e(r)?R5(n,r):null)}const D5={Alt:[18,t=>t.altKey],Control:[17,t=>t.ctrlKey],Shift:[16,t=>t.shiftKey],Meta:[91,t=>t.metaKey]},M5={style:"cursor: crosshair"};function I5(t={}){let[e,n]=D5[t.key||"Alt"],r=jt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventHandlers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,me.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?M5:null})]}const Hc="-10000px";class FQ{constructor(e,n,r){this.facet=n,this.createTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(i=>i),this.tooltipViews=this.tooltips.map(r)}update(e){var n;let r=e.state.facet(this.facet),i=r.filter(o=>o);if(r===this.input){for(let o of this.tooltipViews)o.update&&o.update(e);return!1}let s=[];for(let o=0;o<i.length;o++){let l=i[o],a=-1;if(l){for(let u=0;u<this.tooltips.length;u++){let c=this.tooltips[u];c&&c.create==l.create&&(a=u)}if(a<0)s[o]=this.createTooltipView(l);else{let u=s[o]=this.tooltipViews[a];u.update&&u.update(e)}}}for(let o of this.tooltipViews)s.indexOf(o)<0&&(o.dom.remove(),(n=o.destroy)===null||n===void 0||n.call(o));return this.input=r,this.tooltips=i,this.tooltipViews=s,!0}}function N5(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const eg=Oe.define({combine:t=>{var e,n,r;return{position:ye.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||N5}}}),Sb=new WeakMap,UQ=jt.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(eg);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new FQ(t,fv,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.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 t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(eg);if(r.position!=this.position){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!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);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=Hc,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((e,n)=>{let r=this.manager.tooltipViews[n];return r.getCoords?r.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(eg).tooltipSpace(this.view)}}writeMeasure(t){var e;let{editor:n,space:r}=t,i=[];for(let s=0;s<this.manager.tooltips.length;s++){let o=this.manager.tooltips[s],l=this.manager.tooltipViews[s],{dom:a}=l,u=t.pos[s],c=t.size[s];if(!u||u.bottom<=Math.max(n.top,r.top)||u.top>=Math.min(n.bottom,r.bottom)||u.right<Math.max(n.left,r.left)-.1||u.left>Math.min(n.right,r.right)+.1){a.style.top=Hc;continue}let f=o.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,h=f?7:0,p=c.right-c.left,d=(e=Sb.get(l))!==null&&e!==void 0?e:c.bottom-c.top,g=l.offset||X5,O=this.view.textDirection==Mt.LTR,m=c.width>r.right-r.left?O?r.left:r.right-c.width:O?Math.min(u.left-(f?14:0)+g.x,r.right-p):Math.max(r.left,u.left-p+(f?14:0)-g.x),S=!!o.above;!o.strictSide&&(S?u.top-(c.bottom-c.top)-g.y<r.top:u.bottom+(c.bottom-c.top)+g.y>r.bottom)&&S==r.bottom-u.bottom>u.top-r.top&&(S=!S);let y=(S?u.top-r.top:r.bottom-u.bottom)-h;if(y<d&&l.resize!==!1){if(y<this.view.defaultLineHeight){a.style.top=Hc;continue}Sb.set(l,d),a.style.height=(d=y)+"px"}else a.style.height&&(a.style.height="");let b=S?u.top-d-h-g.y:u.bottom+h+g.y,C=m+p;if(l.overlap!==!0)for(let Q of i)Q.left<C&&Q.right>m&&Q.top<b+d&&Q.bottom>b&&(b=S?Q.top-d-2-h:Q.bottom+h+2);this.position=="absolute"?(a.style.top=b-t.parent.top+"px",a.style.left=m-t.parent.left+"px"):(a.style.top=b+"px",a.style.left=m+"px"),f&&(f.style.left=`${u.left+(O?g.x:-g.x)-(m+14-7)}px`),l.overlap!==!0&&i.push({left:m,top:b,right:C,bottom:b+d}),a.classList.toggle("cm-tooltip-above",S),a.classList.toggle("cm-tooltip-below",!S),l.positioned&&l.positioned(t.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 t of this.manager.tooltipViews)t.dom.style.top=Hc}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),L5=me.baseTheme({".cm-tooltip":{zIndex:100,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:`${7*2}px`,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"}}}),X5={x:0,y:0},fv=Oe.define({enables:[UQ,L5]}),Ph=Oe.define();class hv{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new FQ(e,Ph,n=>this.createHostedView(n))}static create(e){return new hv(e)}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}}const V5=fv.compute([Ph],t=>{let e=t.facet(Ph).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:hv.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class Z5{constructor(e,n,r,i,s){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=s,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(){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)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{lastMove:e}=this,n=this.view.contentDOM.contains(e.target)?this.view.posAtCoords(e):null;if(n==null)return;let r=this.view.coordsAtPos(n);if(r==null||e.y<r.top||e.y>r.bottom||e.x<r.left-this.view.defaultCharacterWidth||e.x>r.right+this.view.defaultCharacterWidth)return;let i=this.view.bidiSpans(this.view.state.doc.lineAt(n)).find(l=>l.from<=n&&l.to>=n),s=i&&i.dir==Mt.RTL?-1:1,o=this.source(this.view,n,e.x<r.left?-s:s);if(o!=null&&o.then){let l=this.pending={pos:n};o.then(a=>{this.pending==l&&(this.pending=null,a&&this.view.dispatch({effects:this.setHover.of(a)}))},a=>ar(this.view.state,a,"hover tooltip"))}else o&&this.view.dispatch({effects:this.setHover.of(o)})}mousemove(e){var n;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 r=this.active;if(r&&!bb(this.lastMove.target)||this.pending){let{pos:i}=r||this.pending,s=(n=r==null?void 0:r.end)!==null&&n!==void 0?n:i;(i==s?this.view.posAtCoords(this.lastMove)!=i:!j5(this.view,i,s,e.clientX,e.clientY,6))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!bb(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function bb(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function j5(t,e,n,r,i,s){let o=document.createRange(),l=t.domAtPos(e),a=t.domAtPos(n);o.setEnd(a.node,a.offset),o.setStart(l.node,l.offset);let u=o.getClientRects();o.detach();for(let c=0;c<u.length;c++){let f=u[c];if(Math.max(f.top-i,i-f.bottom,f.left-r,r-f.right)<=s)return!0}return!1}function B5(t,e={}){let n=Ve.define(),r=ln.define({create(){return null},update(i,s){if(i&&(e.hideOnChange&&(s.docChanged||s.selection)||e.hideOn&&e.hideOn(s,i)))return null;if(i&&s.docChanged){let o=s.changes.mapPos(i.pos,-1,gn.TrackDel);if(o==null)return null;let l=Object.assign(Object.create(null),i);l.pos=o,i.end!=null&&(l.end=s.changes.mapPos(i.end)),i=l}for(let o of s.effects)o.is(n)&&(i=o.value),o.is(F5)&&(i=null);return i},provide:i=>Ph.from(i)});return[r,jt.define(i=>new Z5(i,t,r,n,e.hoverTime||300)),V5]}function WQ(t,e){let n=t.plugin(UQ);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const F5=Ve.define(),wb=Oe.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function yu(t,e){let n=t.plugin(zQ),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const zQ=jt.fromClass(class{constructor(t){this.input=t.state.facet(Su),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(wb);this.top=new Kc(t,!0,e.topContainer),this.bottom=new Kc(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(wb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Kc(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Kc(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Su);if(n!=this.input){let r=n.filter(a=>a),i=[],s=[],o=[],l=[];for(let a of r){let u=this.specs.indexOf(a),c;u<0?(c=a(t.view),l.push(c)):(c=this.panels[u],c.update&&c.update(t)),i.push(c),(c.top?s:o).push(c)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>me.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Kc{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.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 n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=kb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=kb(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 kb(t){let e=t.nextSibling;return t.remove(),e}const Su=Oe.define({enables:zQ});class Wi extends po{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Wi.prototype.elementClass="";Wi.prototype.toDOM=void 0;Wi.prototype.mapMode=gn.TrackBefore;Wi.prototype.startSide=Wi.prototype.endSide=-1;Wi.prototype.point=!0;const If=Oe.define(),U5={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>st.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Ua=Oe.define();function W5(t){return[YQ(),Ua.of(Object.assign(Object.assign({},U5),t))]}const mO=Oe.define({combine:t=>t.some(e=>e)});function YQ(t){let e=[z5];return t&&t.fixed===!1&&e.push(mO.of(!0)),e}const z5=jt.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(Ua).map(e=>new Pb(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(mO),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(mO)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=st.iter(this.view.state.facet(If),this.view.viewport.from),r=[],i=this.gutters.map(s=>new Y5(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks){let o;if(Array.isArray(s.type)){for(let l of s.type)if(l.type==dt.Text){o=l;break}}else o=s.type==dt.Text?s:void 0;if(o){r.length&&(r=[]),qQ(n,r,s.from);for(let l of i)l.line(this.view,o,r)}}for(let s of i)s.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Ua),n=t.state.facet(Ua),r=t.docChanged||t.heightChanged||t.viewportChanged||!st.eq(t.startState.facet(If),t.state.facet(If),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new Pb(this.view,s)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>me.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==Mt.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}})});function xb(t){return Array.isArray(t)?t:[t]}function qQ(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Y5{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=st.iter(e.markers,n.from)}line(e,n,r){let i=[];qQ(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;if(i.length==0&&!o.config.renderEmptyElements)return;let l=n.top-this.height;if(this.i==o.elements.length){let a=new GQ(e,n.height,l,i);o.elements.push(a),o.dom.appendChild(a.dom)}else o.elements[this.i].update(e,n.height,l,i);this.height=n.bottom,this.i++}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Pb{constructor(e,n){this.view=e,this.config=n,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 n.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let a=s.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=i.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=xb(n.markers(e)),n.initialSpacer&&(this.spacer=new GQ(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=xb(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!st.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class GQ{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.dom.style.height=(this.height=n)+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),q5(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let l=o,a=s<n.length?n[s++]:null,u=!1;if(a){let c=a.elementClass;c&&(r+=" "+c);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(a)){l=f,u=!0;break}}else l=this.markers.length;for(;o<l;){let c=this.markers[o++];if(c.toDOM){c.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!a)break;a.toDOM&&(u?i=i.nextSibling:this.dom.insertBefore(a.toDOM(e),i)),u&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function q5(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const G5=Oe.define(),Ko=Oe.define({combine(t){return wi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(l,a,u)=>s(l,a,u)||o(l,a,u):o}return r}})}});class tg extends Wi{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function ng(t,e){return t.state.facet(Ko).formatNumber(e,t.state)}const H5=Ua.compute([Ko],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(G5)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new tg(ng(e,e.state.doc.lineAt(n.from).number))},lineMarkerChange:e=>e.startState.facet(Ko)!=e.state.facet(Ko),initialSpacer(e){return new tg(ng(e,Cb(e.state.doc.lines)))},updateSpacer(e,n){let r=ng(n.view,Cb(n.view.state.doc.lines));return r==e.number?e:new tg(r)},domEventHandlers:t.facet(Ko).domEventHandlers}));function K5(t={}){return[Ko.of(t),YQ(),H5]}function Cb(t){let e=9;for(;e<t;)e=e*10+9;return e}const J5=new class extends Wi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},eN=If.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(J5.range(i)))}return st.of(e)});function tN(){return eN}const HQ=1024;let nN=0;class kr{constructor(e,n){this.from=e,this.to=n}}class Ie{constructor(e={}){this.id=nN++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=tn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Ie.closedBy=new Ie({deserialize:t=>t.split(" ")});Ie.openedBy=new Ie({deserialize:t=>t.split(" ")});Ie.group=new Ie({deserialize:t=>t.split(" ")});Ie.contextHash=new Ie({perNode:!0});Ie.lookAhead=new Ie({perNode:!0});Ie.mounted=new Ie({perNode:!0});class rN{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}}const iN=Object.create(null);class tn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):iN,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new tn(e.name||"",n,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");n[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 n=this.prop(Ie.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Ie.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}tn.none=new tn("",Object.create(null),0,8);class Wu{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);o&&(i||(i=Object.assign({},r.props)),i[o[0].id]=o[1])}n.push(i?new tn(r.name,i,r.id,r.flags):r)}return new Wu(n)}}const Jc=new WeakMap,Qb=new WeakMap;var wt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(wt||(wt={}));class ot{constructor(e,n,r,i,s){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=this.prop(Ie.mounted);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new bu(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Jc.get(this)||this.topNode,s=new bu(i);return s.moveTo(e,n),Jc.set(this,s._tree),s}get topNode(){return new Qr(this,0,0,null)}resolve(e,n=0){let r=Cl(Jc.get(this)||this.topNode,e,n,!1);return Jc.set(this,r),r}resolveInner(e,n=0){let r=Cl(Qb.get(this)||this.topNode,e,n,!0);return Qb.set(this,r),r}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e;for(let o=this.cursor((e.mode||0)|wt.IncludeAnonymous);;){let l=!1;if(o.from<=s&&o.to>=i&&(o.type.isAnonymous||n(o)!==!1)){if(o.firstChild())continue;l=!0}for(;l&&r&&!o.type.isAnonymous&&r(o),!o.nextSibling();){if(!o.parent())return;l=!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 n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:gv(tn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new ot(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new ot(tn.none,n,r,i)))}static build(e){return oN(e)}}ot.empty=new ot(tn.none,[],[],0);class dv{constructor(e,n){this.buffer=e,this.index=n}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 dv(this.buffer,this.index)}}class So{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return tn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,r,i,s){let{buffer:o}=this,l=-1;for(let a=e;a!=n&&!(KQ(s,i,o[a+1],o[a+2])&&(l=a,r>0));a=o[a+3]);return l}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let l=e,a=0;l<n;){s[a++]=i[l++],s[a++]=i[l++]-r;let u=s[a++]=i[l++]-r;s[a++]=i[l++]-e,o=Math.max(o,u)}return new So(s,o,this.set)}}function KQ(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function JQ(t,e){let n=t.childBefore(e);for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(t=n,n=r.prevSibling):n=r}return t}function Cl(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof Qr&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:wt.IgnoreOverlays;if(r)for(let o=t,l=o.parent;l;o=l,l=o.parent)o instanceof Qr&&o.index<0&&((i=l.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=l);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class Qr{constructor(e,n,r,i){this._tree=e,this.from=n,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,n,r,i,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,u=n>0?l.length:-1;e!=u;e+=n){let c=l[e],f=a[e]+o.from;if(KQ(i,r,f,f+c.length)){if(c instanceof So){if(s&wt.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,n,r-f,i);if(h>-1)return new hi(new sN(o,c,e,f),null,h)}else if(s&wt.IncludeAnonymous||!c.type.isAnonymous||pv(c)){let h;if(!(s&wt.IgnoreMounts)&&c.props&&(h=c.prop(Ie.mounted))&&!h.overlay)return new Qr(h.tree,f,e,o);let p=new Qr(c,f,e,o);return s&wt.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(s&wt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))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)}enter(e,n,r=0){let i;if(!(r&wt.IgnoreOverlays)&&(i=this._tree.prop(Ie.mounted))&&i.overlay){let s=e-this.from;for(let{from:o,to:l}of i.overlay)if((n>0?o<=s:o<s)&&(n<0?l>=s:l>s))return new Qr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,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}cursor(e=0){return new bu(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,n=0){return Cl(this,e,n,!1)}resolveInner(e,n=0){return Cl(this,e,n,!0)}enterUnfinishedNodesBefore(e){return JQ(this,e)}getChild(e,n=null,r=null){let i=Ch(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Ch(this,e,n,r)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return Qh(this,e)}}function Ch(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(;!i.type.is(n);)if(!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 Qh(t,e,n=e.length-1){for(let r=t.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class sN{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class hi{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,n,r){this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new hi(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)}enter(e,n,r=0){if(r&wt.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new hi(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,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new hi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new hi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}cursor(e=0){return new bu(this,e)}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),n.push(0)}return new ot(this.type,e,n,this.to-this.from)}resolve(e,n=0){return Cl(this,e,n,!1)}resolveInner(e,n=0){return Cl(this,e,n,!0)}enterUnfinishedNodesBefore(e){return JQ(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,n=null,r=null){let i=Ch(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Ch(this,e,n,r)}get node(){return this}matchContext(e){return Qh(this,e)}}class bu{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Qr)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,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||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 Qr?(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,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-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,n,r=this.mode){return this.buffer?r&wt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&wt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&wt.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:n}=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(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.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 n,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:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&wt.IncludeAnonymous||l instanceof So||!l.type.isAnonymous||pv(l))return!1}return!0}move(e,n){if(n&&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,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new hi(this.buffer,n,this.stack[i]);return this.bufferNode=new hi(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){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(;i&&n&&n(this),i=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return Qh(this.node,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return Qh(this.node,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function pv(t){return t.children.some(e=>e instanceof So||!e.type.isAnonymous||pv(e))}function oN(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=HQ,reused:s=[],minRepeatType:o=r.types.length}=t,l=Array.isArray(n)?new dv(n,n.length):n,a=r.types,u=0,c=0;function f(b,C,Q,_,k){let{id:w,start:P,end:E,size:A}=l,M=c;for(;A<0;)if(l.next(),A==-1){let V=s[w];Q.push(V),_.push(P-b);return}else if(A==-3){u=w;return}else if(A==-4){c=w;return}else throw new RangeError(`Unrecognized record size: ${A}`);let N=a[w],z,re,se=P-b;if(E-P<=i&&(re=g(l.pos-C,k))){let V=new Uint16Array(re.size-re.skip),G=l.pos-re.size,te=V.length;for(;l.pos>G;)te=O(re.start,V,te);z=new So(V,E-re.start,r),se=re.start-b}else{let V=l.pos-A;l.next();let G=[],te=[],Ae=w>=o?w:-1,xe=0,je=E;for(;l.pos>V;)Ae>=0&&l.id==Ae&&l.size>=0?(l.end<=je-i&&(p(G,te,P,xe,l.end,je,Ae,M),xe=G.length,je=l.end),l.next()):f(P,V,G,te,Ae);if(Ae>=0&&xe>0&&xe<G.length&&p(G,te,P,xe,P,je,Ae,M),G.reverse(),te.reverse(),Ae>-1&&xe>0){let Ke=h(N);z=gv(N,G,te,0,G.length,0,E-P,Ke,Ke)}else z=d(N,G,te,E-P,M-E)}Q.push(z),_.push(se)}function h(b){return(C,Q,_)=>{let k=0,w=C.length-1,P,E;if(w>=0&&(P=C[w])instanceof ot){if(!w&&P.type==b&&P.length==_)return P;(E=P.prop(Ie.lookAhead))&&(k=Q[w]+P.length+E)}return d(b,C,Q,_,k)}}function p(b,C,Q,_,k,w,P,E){let A=[],M=[];for(;b.length>_;)A.push(b.pop()),M.push(C.pop()+Q-k);b.push(d(r.types[P],A,M,w-k,E-w)),C.push(k-Q)}function d(b,C,Q,_,k=0,w){if(u){let P=[Ie.contextHash,u];w=w?[P].concat(w):[P]}if(k>25){let P=[Ie.lookAhead,k];w=w?[P].concat(w):[P]}return new ot(b,C,Q,_,w)}function g(b,C){let Q=l.fork(),_=0,k=0,w=0,P=Q.end-i,E={size:0,start:0,skip:0};e:for(let A=Q.pos-b;Q.pos>A;){let M=Q.size;if(Q.id==C&&M>=0){E.size=_,E.start=k,E.skip=w,w+=4,_+=4,Q.next();continue}let N=Q.pos-M;if(M<0||N<A||Q.start<P)break;let z=Q.id>=o?4:0,re=Q.start;for(Q.next();Q.pos>N;){if(Q.size<0)if(Q.size==-3)z+=4;else break e;else Q.id>=o&&(z+=4);Q.next()}k=re,_+=M,w+=z}return(C<0||_==b)&&(E.size=_,E.start=k,E.skip=w),E.size>4?E:void 0}function O(b,C,Q){let{id:_,start:k,end:w,size:P}=l;if(l.next(),P>=0&&_<o){let E=Q;if(P>4){let A=l.pos-(P-4);for(;l.pos>A;)Q=O(b,C,Q)}C[--Q]=E,C[--Q]=w-b,C[--Q]=k-b,C[--Q]=_}else P==-3?u=_:P==-4&&(c=_);return Q}let m=[],S=[];for(;l.pos>0;)f(t.start||0,t.bufferStart||0,m,S,-1);let y=(e=t.length)!==null&&e!==void 0?e:m.length?S[0]+m[0].length:0;return new ot(a[t.topID],m.reverse(),S.reverse(),y)}const Eb=new WeakMap;function Nf(t,e){if(!t.isAnonymous||e instanceof So||e.type!=t)return 1;let n=Eb.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof ot)){n=1;break}n+=Nf(t,r)}Eb.set(e,n)}return n}function gv(t,e,n,r,i,s,o,l,a){let u=0;for(let d=r;d<i;d++)u+=Nf(t,e[d]);let c=Math.ceil(u*1.5/8),f=[],h=[];function p(d,g,O,m,S){for(let y=O;y<m;){let b=y,C=g[y],Q=Nf(t,d[y]);for(y++;y<m;y++){let _=Nf(t,d[y]);if(Q+_>=c)break;Q+=_}if(y==b+1){if(Q>c){let _=d[b];p(_.children,_.positions,0,_.children.length,g[b]+S);continue}f.push(d[b])}else{let _=g[y-1]+d[y-1].length-C;f.push(gv(t,d,g,b,y,C,_,null,a))}h.push(C+S-s)}}return p(e,n,r,i,0),(l||a)(f,h,o)}class eE{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof hi?this.setBuffer(e.context.buffer,e.index,n):e instanceof Qr&&this.map.set(e.tree,n)}get(e){return e instanceof hi?this.getBuffer(e.context.buffer,e.index):e instanceof Qr?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Li{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Li(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,u=0;;l++){let c=l<n.length?n[l]:null,f=c?c.fromA:1e9;if(f-a>=r)for(;o&&o.from<f;){let h=o;if(a>=h.from||f<=h.to||u){let p=Math.max(h.from,a)-u,d=Math.min(h.to,f)-u;h=p>=d?null:new Li(p,d,h.tree,h.offset+u,l>0,!!c)}if(h&&i.push(h),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,u=c.toA-c.toB}return i}}class mv{startParse(e,n,r){return typeof e=="string"&&(e=new lN(e)),r=r?r.length?r.map(i=>new kr(i.from,i.to)):[new kr(0,0)]:[new kr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let s=i.advance();if(s)return s}}}class lN{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function tE(t){return(e,n,r,i)=>new uN(e,t,n,r,i)}class $b{constructor(e,n,r,i,s){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.ranges=s}}class aN{constructor(e,n,r,i,s,o,l){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const OO=new Ie({perNode:!0});class uN{constructor(e,n,r,i,s){this.nest=n,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 ot(r.type,r.children,r.positions,r.length,r.propValues.concat([[OO,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Ie.mounted.id]=new rN(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].ranges[0].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new hN(this.fragments),n=null,r=null,i=new bu(new Qr(this.baseTree,this.ranges[0].from,0,null),wt.IncludeAnonymous|wt.IgnoreMounts);e:for(let s,o;this.stoppedAt==null||i.from<this.stoppedAt;){let l=!0,a;if(e.hasNode(i)){if(n){let u=n.mounts.find(c=>c.frag.from<=i.from&&c.frag.to>=i.to&&c.mount.overlay);if(u)for(let c of u.mount.overlay){let f=c.from+u.pos,h=c.to+u.pos;f>=i.from&&h<=i.to&&!n.ranges.some(p=>p.from<h&&p.to>f)&&n.ranges.push({from:f,to:h})}}l=!1}else if(r&&(o=cN(r.ranges,i.from,i.to)))l=o!=2;else if(!i.type.isAnonymous&&i.from<i.to&&(s=this.nest(i,this.input))){i.tree||fN(i);let u=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")n=new aN(s.parser,s.overlay,u,this.inner.length,i.from,i.tree,n);else{let c=Rb(this.ranges,s.overlay||[new kr(i.from,i.to)]);c.length&&this.inner.push(new $b(s.parser,s.parser.startParse(this.input,Ab(u,c),c),s.overlay?s.overlay.map(f=>new kr(f.from-i.from,f.to-i.from)):null,i.tree,c)),s.overlay?c.length&&(r={ranges:c,depth:0,prev:r}):l=!1}}else n&&(a=n.predicate(i))&&(a===!0&&(a=new kr(i.from,i.to)),a.from<a.to&&n.ranges.push(a));if(l&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let u=Rb(this.ranges,n.ranges);u.length&&this.inner.splice(n.index,0,new $b(n.parser,n.parser.startParse(this.input,Ab(n.mounts,u),u),n.ranges.map(c=>new kr(c.from-n.start,c.to-n.start)),n.target,u)),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function cN(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function _b(t,e,n,r,i,s){if(e<n){let o=t.buffer[e+1];r.push(t.slice(e,n,o)),i.push(o-s)}}function fN(t){let{node:e}=t,n=0;do t.parent(),n++;while(!t.tree);let r=0,i=t.tree,s=0;for(;s=i.positions[r]+t.from,!(s<=e.from&&s+i.children[r].length>=e.to);r++);let o=i.children[r],l=o.buffer;function a(u,c,f,h,p){let d=u;for(;l[d+2]+s<=e.from;)d=l[d+3];let g=[],O=[];_b(o,u,d,g,O,h);let m=l[d+1],S=l[d+2],y=m+s==e.from&&S+s==e.to&&l[d]==e.type.id;return g.push(y?e.toTree():a(d+4,l[d+3],o.set.types[l[d]],m,S-m)),O.push(m-h),_b(o,l[d+3],c,g,O,h),new ot(f,g,O,p)}i.children[r]=a(0,l.length,tn.none,0,o.length);for(let u=0;u<=n;u++)t.childAfter(e.from)}class Tb{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(wt.IncludeAnonymous|wt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,wt.IgnoreOverlays|wt.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof ot)n=n.children[0];else break}return!1}}let hN=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(OO))!==null&&n!==void 0?n:r.to,this.inner=new Tb(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 n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(OO))!==null&&e!==void 0?e:n.to,this.inner=new Tb(n.tree,-n.offset)}}findMounts(e,n){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 o=(r=s.tree)===null||r===void 0?void 0:r.prop(Ie.mounted);if(o&&o.parser==n)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&i.push({frag:a,pos:s.from-a.offset,mount:o})}}}return i}};function Rb(t,e){let n=null,r=e;for(let i=1,s=0;i<t.length;i++){let o=t[i-1].to,l=t[i].from;for(;s<r.length;s++){let a=r[s];if(a.from>=l)break;a.to<=o||(n||(r=n=e.slice()),a.from<o?(n[s]=new kr(a.from,o),a.to>l&&n.splice(s+1,0,new kr(l,a.to))):a.to>l?n[s--]=new kr(l,a.to):n.splice(s--,1))}}return r}function dN(t,e,n,r){let i=0,s=0,o=!1,l=!1,a=-1e9,u=[];for(;;){let c=i==t.length?1e9:o?t[i].to:t[i].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let h=Math.max(a,n),p=Math.min(c,f,r);h<p&&u.push(new kr(h,p))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,i++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return u}function Ab(t,e){let n=[];for(let{pos:r,mount:i,frag:s}of t){let o=r+(i.overlay?i.overlay[0].from:0),l=o+i.tree.length,a=Math.max(s.from,o),u=Math.min(s.to,l);if(i.overlay){let c=i.overlay.map(h=>new kr(h.from+r,h.to+r)),f=dN(e,c,a,u);for(let h=0,p=a;;h++){let d=h==f.length,g=d?u:f[h].from;if(g>p&&n.push(new Li(p,g,i.tree,-o,s.from>=p||s.openStart,s.to<=g||s.openEnd)),d)break;p=f[h].to}}else n.push(new Li(a,u,i.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return n}let pN=0;class Zr{constructor(e,n,r){this.set=e,this.base=n,this.modified=r,this.id=pN++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Zr([],null,[]);if(n.set.push(n),e)for(let r of e.set)n.set.push(r);return n}static defineModifier(){let e=new Eh;return n=>n.modified.indexOf(e)>-1?n:Eh.get(n.base||n,n.modified.concat(e).sort((r,i)=>r.id-i.id))}}let gN=0;class Eh{constructor(){this.instances=[],this.id=gN++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(l=>l.base==e&&mN(n,l.modified));if(r)return r;let i=[],s=new Zr(i,e,n);for(let l of n)l.instances.push(s);let o=ON(n);for(let l of e.set)if(!l.modified.length)for(let a of o)i.push(Eh.get(l,a));return s}}function mN(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function ON(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Vl(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let s=[],o=2,l=i;for(let f=0;;){if(l=="..."&&f>0&&f+3==i.length){o=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!h)throw new RangeError("Invalid path: "+i);if(s.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==i.length)break;let p=i[f++];if(f==i.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+i);l=i.slice(f)}let a=s.length-1,u=s[a];if(!u)throw new RangeError("Invalid path: "+i);let c=new $h(r,o,a>0?s.slice(0,a):null);e[u]=c.sort(e[u])}}return nE.add(e)}const nE=new Ie;class $h{constructor(e,n,r,i){this.tags=e,this.mode=n,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}}$h.empty=new $h([],2,null);function rE(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let l of s)for(let a of l.set){let u=n[a.id];if(u){o=o?o+" "+u:u;break}}return o},scope:r}}function vN(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function yN(t,e,n,r=0,i=t.length){let s=new SN(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class SN{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:l,to:a}=e;if(l>=r||a<=n)return;o.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(o)));let u=i,c=bN(e)||$h.empty,f=vN(s,c.tags);if(f&&(u&&(u+=" "),u+=f,c.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(e.from,u),c.opaque)return;let h=e.tree&&e.tree.prop(Ie.mounted);if(h&&h.overlay){let p=e.node.enter(h.overlay[0].from+l,1),d=this.highlighters.filter(O=>!O.scope||O.scope(h.tree.type)),g=e.firstChild();for(let O=0,m=l;;O++){let S=O<h.overlay.length?h.overlay[O]:null,y=S?S.from+l:a,b=Math.max(n,m),C=Math.min(r,y);if(b<C&&g)for(;e.from<C&&(this.highlightRange(e,b,C,i,s),this.startSpan(Math.min(C,e.to),u),!(e.to>=y||!e.nextSibling())););if(!S||y>r)break;m=S.to+l,m>n&&(this.highlightRange(p.cursor(),Math.max(n,S.from+l),Math.min(r,m),i,d),this.startSpan(m,u))}g&&e.parent()}else if(e.firstChild()){do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function bN(t){let e=t.type.prop(nE);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ue=Zr.define,ef=ue(),is=ue(),Db=ue(is),Mb=ue(is),ss=ue(),tf=ue(ss),rg=ue(ss),ii=ue(),js=ue(ii),ti=ue(),ni=ue(),vO=ue(),ha=ue(vO),nf=ue(),v={comment:ef,lineComment:ue(ef),blockComment:ue(ef),docComment:ue(ef),name:is,variableName:ue(is),typeName:Db,tagName:ue(Db),propertyName:Mb,attributeName:ue(Mb),className:ue(is),labelName:ue(is),namespace:ue(is),macroName:ue(is),literal:ss,string:tf,docString:ue(tf),character:ue(tf),attributeValue:ue(tf),number:rg,integer:ue(rg),float:ue(rg),bool:ue(ss),regexp:ue(ss),escape:ue(ss),color:ue(ss),url:ue(ss),keyword:ti,self:ue(ti),null:ue(ti),atom:ue(ti),unit:ue(ti),modifier:ue(ti),operatorKeyword:ue(ti),controlKeyword:ue(ti),definitionKeyword:ue(ti),moduleKeyword:ue(ti),operator:ni,derefOperator:ue(ni),arithmeticOperator:ue(ni),logicOperator:ue(ni),bitwiseOperator:ue(ni),compareOperator:ue(ni),updateOperator:ue(ni),definitionOperator:ue(ni),typeOperator:ue(ni),controlOperator:ue(ni),punctuation:vO,separator:ue(vO),bracket:ha,angleBracket:ue(ha),squareBracket:ue(ha),paren:ue(ha),brace:ue(ha),content:ii,heading:js,heading1:ue(js),heading2:ue(js),heading3:ue(js),heading4:ue(js),heading5:ue(js),heading6:ue(js),contentSeparator:ue(ii),list:ue(ii),quote:ue(ii),emphasis:ue(ii),strong:ue(ii),link:ue(ii),monospace:ue(ii),strikethrough:ue(ii),inserted:ue(),deleted:ue(),changed:ue(),invalid:ue(),meta:nf,documentMeta:ue(nf),annotation:ue(nf),processingInstruction:ue(nf),definition:Zr.defineModifier(),constant:Zr.defineModifier(),function:Zr.defineModifier(),standard:Zr.defineModifier(),local:Zr.defineModifier(),special:Zr.defineModifier()};rE([{tag:v.link,class:"tok-link"},{tag:v.heading,class:"tok-heading"},{tag:v.emphasis,class:"tok-emphasis"},{tag:v.strong,class:"tok-strong"},{tag:v.keyword,class:"tok-keyword"},{tag:v.atom,class:"tok-atom"},{tag:v.bool,class:"tok-bool"},{tag:v.url,class:"tok-url"},{tag:v.labelName,class:"tok-labelName"},{tag:v.inserted,class:"tok-inserted"},{tag:v.deleted,class:"tok-deleted"},{tag:v.literal,class:"tok-literal"},{tag:v.string,class:"tok-string"},{tag:v.number,class:"tok-number"},{tag:[v.regexp,v.escape,v.special(v.string)],class:"tok-string2"},{tag:v.variableName,class:"tok-variableName"},{tag:v.local(v.variableName),class:"tok-variableName tok-local"},{tag:v.definition(v.variableName),class:"tok-variableName tok-definition"},{tag:v.special(v.variableName),class:"tok-variableName2"},{tag:v.definition(v.propertyName),class:"tok-propertyName tok-definition"},{tag:v.typeName,class:"tok-typeName"},{tag:v.namespace,class:"tok-namespace"},{tag:v.className,class:"tok-className"},{tag:v.macroName,class:"tok-macroName"},{tag:v.propertyName,class:"tok-propertyName"},{tag:v.operator,class:"tok-operator"},{tag:v.comment,class:"tok-comment"},{tag:v.meta,class:"tok-meta"},{tag:v.invalid,class:"tok-invalid"},{tag:v.punctuation,class:"tok-punctuation"}]);var ig;const eo=new Ie;function Ov(t){return Oe.define({combine:t?e=>e.concat(t):void 0})}const vv=new Ie;class xr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,qe.prototype.hasOwnProperty("tree")||Object.defineProperty(qe.prototype,"tree",{get(){return vt(this)}}),this.parser=n,this.extension=[As.of(this),qe.languageData.of((s,o,l)=>{let a=Ib(s,o,l),u=a.type.prop(eo);if(!u)return[];let c=s.facet(u),f=a.type.prop(vv);if(f){let h=a.resolve(o-a.from,l);for(let p of f)if(p.test(h,s)){let d=s.facet(p.facet);return p.type=="replace"?d:d.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return Ib(e,n,r).type.prop(eo)==this.data}findRegions(e){let n=e.facet(As);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(eo)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(Ie.mounted);if(l){if(l.tree.prop(eo)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+o,to:a.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let a=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>a)return}}for(let a=0;a<s.children.length;a++){let u=s.children[a];u instanceof ot&&i(u,s.positions[a]+o)}};return i(vt(e),0),r}get allowsNesting(){return!0}}xr.setState=Ve.define();function Ib(t,e,n){let r=t.facet(As),i=vt(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,wt.ExcludeBuffers))s.type.isTop&&(i=s);return i}class Ql extends xr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=Ov(e.languageData);return new Ql(n,e.parser.configure({props:[eo.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Ql(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function vt(t){let e=t.field(xr.state,!1);return e?e.tree:ot.empty}class wN{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,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let da=null;class wu{constructor(e,n,r=[],i,s,o,l,a){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new wu(e,n,[],ot.empty,0,r,[],null)}startParse(){return this.parser.startParse(new wN(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=ot.empty&&this.isDone(n??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()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){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<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Li.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=da;da=this;try{return e()}finally{da=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Nb(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((u,c,f,h)=>a.push({fromA:u,toA:c,fromB:f,toB:h})),r=Li.applyChanges(r,a),i=ot.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),f=e.mapPos(u.to,-1);c<f&&l.push({from:c,to:f})}}}return new wu(this.parser,n,r,i,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=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=Nb(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends mv{createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let a=da;if(a){for(let u of i)a.tempSkipped.push(u);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new ot(tn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return da}}function Nb(t,e,n){return Li.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class El{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=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),n.viewport.to);return n.work(20,r)||n.takeTree(),new El(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=wu.create(e.facet(As).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new El(r)}}xr.state=ln.define({create:El.init,update(t,e){for(let n of e.effects)if(n.is(xr.setState))return n.value;return e.startState.facet(As)!=e.state.facet(As)?El.init(e.state):t.apply(e)}});let iE=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(iE=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const sg=typeof navigator<"u"&&(!((ig=navigator.scheduling)===null||ig===void 0)&&ig.isInputPending)?()=>navigator.scheduling.isInputPending():null,kN=jt.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 n=this.view.state.field(xr.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(xr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=iE(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(xr.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!sg?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<i&&r.doc.length>i+1e3,a=s.context.work(()=>sg&&sg()||Date.now()>o,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:xr.setState.of(new El(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>ar(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),As=Oe.define({combine(t){return t.length?t[0]:null},enables:t=>[xr.state,kN,me.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class ku{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class _h{constructor(e,n,r,i,s,o=void 0){this.name=e,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,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:n,support:r}=e;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new _h(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,n,r)}static matchFilename(e,n){for(let i of e)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,n,r=!0){n=n.toLowerCase();for(let i of e)if(i.alias.some(s=>s==n))return i;if(r)for(let i of e)for(let s of i.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return i}return null}}const xN=Oe.define(),Qd=Oe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Th(t){let e=t.facet(Qd);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function xu(t,e){let n="",r=t.tabSize,i=t.facet(Qd)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let s=0;s<e;s++)n+=i;return n}function yv(t,e){t instanceof qe&&(t=new Ed(t));for(let r of t.state.facet(xN)){let i=r(t,e);if(i!==void 0)return i}let n=vt(t.state);return n?PN(t,n,e):null}class Ed{constructor(e,n={}){this.state=e,this.options=n,this.unit=Th(e)}lineAt(e,n=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}:(n<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,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,n=e.length){return ju(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const zu=new Ie;function PN(t,e,n){return sE(e.resolveInner(n).enterUnfinishedNodesBefore(n),n,t)}function CN(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function QN(t){let e=t.type.prop(zu);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Ie.closedBy))){let i=t.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>oE(o,!0,1,void 0,s&&!CN(o)?i.from:void 0)}return t.parent==null?EN:null}function sE(t,e,n){for(;t;t=t.parent){let r=QN(t);if(r)return r(Sv.create(n,e,t))}return null}function EN(){return 0}class Sv extends Ed{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.node=r}static create(e,n,r){return new Sv(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let n=this.node.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if($N(n,this.node))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?sE(e,this.pos,this.base):0}}function $N(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function _N(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==r)return null;if(!a.type.isSkipped)return a.from<o?n:null;l=a.to}}function TN({closing:t,align:e=!0,units:n=1}){return r=>oE(r,e,n,t)}function oE(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==t.pos+o,a=e?_N(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*n)}const RN=t=>t.baseIndent;function Lf({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const AN=200;function DN(){return qe.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+AN)return t;let s=n.sliceString(i.from,r);if(!e.some(u=>u.test(s)))return t;let{state:o}=t,l=-1,a=[];for(let{head:u}of o.selection.ranges){let c=o.doc.lineAt(u);if(c.from==l)continue;l=c.from;let f=yv(o,c.from);if(f==null)continue;let h=/^\s*/.exec(c.text)[0],p=xu(o,f);h!=p&&a.push({from:c.from,to:c.from+h.length,insert:p})}return a.length?[t,{changes:a,sequential:!0}]:t})}const lE=Oe.define(),Yu=new Ie;function aE(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function MN(t,e,n){let r=vt(t);if(r.length<n)return null;let i=r.resolveInner(n,1),s=null;for(let o=i;o;o=o.parent){if(o.to<=n||o.from>n)continue;if(s&&o.from<e)break;let l=o.type.prop(Yu);if(l&&(o.to<r.length-50||r.length==t.doc.length||!IN(o))){let a=l(o,t);a&&a.from<=n&&a.from>=e&&a.to>n&&(s=a)}}return s}function IN(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Rh(t,e,n){for(let r of t.facet(lE)){let i=r(t,e,n);if(i)return i}return MN(t,e,n)}function uE(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const $d=Ve.define({map:uE}),qu=Ve.define({map:uE});function cE(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const mo=ln.define({create(){return Pe.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is($d)&&!NN(t,n.value.from,n.value.to)?t=t.update({add:[Lb.range(n.value.from,n.value.to)]}):n.is(qu)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,s)=>{i<r&&s>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,s)=>s<=r||i>=r}))}return t},provide:t=>me.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(Lb.range(r,i))}return Pe.set(e,!0)}});function Ah(t,e,n){var r;let i=null;return(r=t.field(mo,!1))===null||r===void 0||r.between(e,n,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function NN(t,e,n){let r=!1;return t.between(e,e,(i,s)=>{i==e&&s==n&&(r=!0)}),r}function fE(t,e){return t.field(mo,!1)?e:e.concat(Ve.appendConfig.of(pE()))}const LN=t=>{for(let e of cE(t)){let n=Rh(t.state,e.from,e.to);if(n)return t.dispatch({effects:fE(t.state,[$d.of(n),hE(t,n)])}),!0}return!1},XN=t=>{if(!t.state.field(mo,!1))return!1;let e=[];for(let n of cE(t)){let r=Ah(t.state,n.from,n.to);r&&e.push(qu.of(r),hE(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function hE(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return me.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const VN=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),s=Rh(e,i.from,i.to);s&&n.push($d.of(s)),r=(s?t.lineBlockAt(s.to):i).to+1}return n.length&&t.dispatch({effects:fE(t.state,n)}),!!n.length},ZN=t=>{let e=t.state.field(mo,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(qu.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},jN=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:LN},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:XN},{key:"Ctrl-Alt-[",run:VN},{key:"Ctrl-Alt-]",run:ZN}],BN={placeholderDOM:null,placeholderText:"…"},dE=Oe.define({combine(t){return wi(t,BN)}});function pE(t){let e=[mo,WN];return t&&e.push(dE.of(t)),e}const Lb=Pe.replace({widget:new class extends ki{toDOM(t){let{state:e}=t,n=e.facet(dE),r=s=>{let o=t.lineBlockAt(t.posAtDOM(s.target)),l=Ah(t.state,o.from,o.to);l&&t.dispatch({effects:qu.of(l)}),s.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,r);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",e.phrase("folded code")),i.title=e.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}}}),FN={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class og extends Wi{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function UN(t={}){let e=Object.assign(Object.assign({},FN),t),n=new og(e,!0),r=new og(e,!1),i=jt.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(As)!=o.state.facet(As)||o.startState.field(mo,!1)!=o.state.field(mo,!1)||vt(o.startState)!=vt(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new $s;for(let a of o.viewportLineBlocks){let u=Ah(o.state,a.from,a.to)?r:Rh(o.state,a.from,a.to)?n:null;u&&l.add(a.from,a.from,u)}return l.finish()}}),{domEventHandlers:s}=e;return[i,W5({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(i))===null||l===void 0?void 0:l.markers)||st.empty},initialSpacer(){return new og(e,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(o,l,a)=>{if(s.click&&s.click(o,l,a))return!0;let u=Ah(o.state,l.from,l.to);if(u)return o.dispatch({effects:qu.of(u)}),!0;let c=Rh(o.state,l.from,l.to);return c?(o.dispatch({effects:$d.of(c)}),!0):!1}})}),pE()]}const WN=me.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 Zl{constructor(e,n){this.specs=e;let r;function i(l){let a=_s.newName();return(r||(r=Object.create(null)))["."+a]=l,a}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof xr?l=>l.prop(eo)==o.data:o?l=>l==o:void 0,this.style=rE(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new _s(r):null,this.themeType=n.themeType}static define(e,n){return new Zl(e,n||{})}}const yO=Oe.define(),gE=Oe.define({combine(t){return t.length?[t[0]]:null}});function lg(t){let e=t.facet(yO);return e.length?e:t.facet(gE)}function bv(t,e){let n=[YN],r;return t instanceof Zl&&(t.module&&n.push(me.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(gE.of(t)):r?n.push(yO.computeN([me.darkTheme],i=>i.facet(me.darkTheme)==(r=="dark")?[t]:[])):n.push(yO.of(t)),n}class zN{constructor(e){this.markCache=Object.create(null),this.tree=vt(e.state),this.decorations=this.buildDeco(e,lg(e.state))}update(e){let n=vt(e.state),r=lg(e.state),i=r!=lg(e.startState);n.length<e.view.viewport.to&&!i&&n.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r))}buildDeco(e,n){if(!n||!this.tree.length)return Pe.none;let r=new $s;for(let{from:i,to:s}of e.visibleRanges)yN(this.tree,n,(o,l,a)=>{r.add(o,l,this.markCache[a]||(this.markCache[a]=Pe.mark({class:a})))},i,s);return r.finish()}}const YN=Ls.high(jt.fromClass(zN,{decorations:t=>t.decorations})),qN=Zl.define([{tag:v.meta,color:"#404740"},{tag:v.link,textDecoration:"underline"},{tag:v.heading,textDecoration:"underline",fontWeight:"bold"},{tag:v.emphasis,fontStyle:"italic"},{tag:v.strong,fontWeight:"bold"},{tag:v.strikethrough,textDecoration:"line-through"},{tag:v.keyword,color:"#708"},{tag:[v.atom,v.bool,v.url,v.contentSeparator,v.labelName],color:"#219"},{tag:[v.literal,v.inserted],color:"#164"},{tag:[v.string,v.deleted],color:"#a11"},{tag:[v.regexp,v.escape,v.special(v.string)],color:"#e40"},{tag:v.definition(v.variableName),color:"#00f"},{tag:v.local(v.variableName),color:"#30a"},{tag:[v.typeName,v.namespace],color:"#085"},{tag:v.className,color:"#167"},{tag:[v.special(v.variableName),v.macroName],color:"#256"},{tag:v.definition(v.propertyName),color:"#00c"},{tag:v.comment,color:"#940"},{tag:v.invalid,color:"#f00"}]),GN=me.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),mE=1e4,OE="()[]{}",vE=Oe.define({combine(t){return wi(t,{afterCursor:!0,brackets:OE,maxScanDistance:mE,renderMatch:JN})}}),HN=Pe.mark({class:"cm-matchingBracket"}),KN=Pe.mark({class:"cm-nonmatchingBracket"});function JN(t){let e=[],n=t.matched?HN:KN;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const eL=ln.define({create(){return Pe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(vE);for(let i of e.state.selection.ranges){if(!i.empty)continue;let s=di(e.state,i.head,-1,r)||i.head>0&&di(e.state,i.head-1,1,r)||r.afterCursor&&(di(e.state,i.head,1,r)||i.head<e.state.doc.length&&di(e.state,i.head+1,-1,r));s&&(n=n.concat(r.renderMatch(s,e.state)))}return Pe.set(n,!0)},provide:t=>me.decorations.from(t)}),tL=[eL,GN];function nL(t={}){return[vE.of(t),tL]}const yE=new Ie;function SO(t,e,n){let r=t.prop(e<0?Ie.openedBy:Ie.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function bO(t){let e=t.type.prop(yE);return e?e(t.node):t}function di(t,e,n,r={}){let i=r.maxScanDistance||mE,s=r.brackets||OE,o=vt(t),l=o.resolveInner(e,n);for(let a=l;a;a=a.parent){let u=SO(a.type,n,s);if(u&&a.from<a.to){let c=bO(a);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return rL(t,e,n,a,c,u,s)}}return iL(t,e,n,o,l.type,i,s)}function rL(t,e,n,r,i,s,o){let l=r.parent,a={from:i.from,to:i.to},u=0,c=l==null?void 0:l.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&s.indexOf(c.type.name)>-1&&c.from<c.to){let f=bO(c);return{start:a,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(SO(c.type,n,o))u++;else if(SO(c.type,-n,o)){if(u==0){let f=bO(c);return{start:a,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:a,matched:!1}}function iL(t,e,n,r,i,s,o){let l=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),a=o.indexOf(l);if(a<0||a%2==0!=n>0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let h=0;!c.next().done&&h<=s;){let p=c.value;n<0&&(h+=p.length);let d=e+h*n;for(let g=n>0?0:p.length-1,O=n>0?p.length:-1;g!=O;g+=n){let m=o.indexOf(p[g]);if(!(m<0||r.resolveInner(d+g,1).type!=i))if(m%2==0==n>0)f++;else{if(f==1)return{start:u,end:{from:d+g,to:d+g+1},matched:m>>1==a>>1};f--}}n>0&&(h+=p.length)}return c.done?{start:u,matched:!1}:null}const sL=Object.create(null),Xb=[tn.none],Vb=[],oL=Object.create(null);for(let[t,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"]])oL[t]=lL(sL,e);function ag(t,e){Vb.indexOf(t)>-1||(Vb.push(t),console.warn(e))}function lL(t,e){let n=null;for(let s of e.split(".")){let o=t[s]||v[s];o?typeof o=="function"?n?n=o(n):ag(s,`Modifier ${s} used at start of tag`):n?ag(s,`Tag ${s} used as modifier`):n=o:ag(s,`Unknown highlighting tag ${s}`)}if(!n)return 0;let r=e.replace(/ /g,"_"),i=tn.define({id:Xb.length,name:r,props:[Vl({[r]:n})]});return Xb.push(i),i.id}const aL="#e5c07b",Zb="#e06c75",uL="#56b6c2",cL="#ffffff",Xf="#abb2bf",wO="#7d8799",fL="#61afef",hL="#98c379",jb="#d19a66",dL="#c678dd",pL="#21252b",Bb="#2c313a",Fb="#282c34",ug="#353a42",gL="#3E4451",Ub="#528bff",mL=me.theme({"&":{color:Xf,backgroundColor:Fb},".cm-content":{caretColor:Ub},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ub},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:gL},".cm-panels":{backgroundColor:pL,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:Fb,color:wO,border:"none"},".cm-activeLineGutter":{backgroundColor:Bb},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ug},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ug,borderBottomColor:ug},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Bb,color:Xf}}},{dark:!0}),OL=Zl.define([{tag:v.keyword,color:dL},{tag:[v.name,v.deleted,v.character,v.propertyName,v.macroName],color:Zb},{tag:[v.function(v.variableName),v.labelName],color:fL},{tag:[v.color,v.constant(v.name),v.standard(v.name)],color:jb},{tag:[v.definition(v.name),v.separator],color:Xf},{tag:[v.typeName,v.className,v.number,v.changed,v.annotation,v.modifier,v.self,v.namespace],color:aL},{tag:[v.operator,v.operatorKeyword,v.url,v.escape,v.regexp,v.link,v.special(v.string)],color:uL},{tag:[v.meta,v.comment],color:wO},{tag:v.strong,fontWeight:"bold"},{tag:v.emphasis,fontStyle:"italic"},{tag:v.strikethrough,textDecoration:"line-through"},{tag:v.link,color:wO,textDecoration:"underline"},{tag:v.heading,fontWeight:"bold",color:Zb},{tag:[v.atom,v.bool,v.special(v.variableName)],color:jb},{tag:[v.processingInstruction,v.string,v.inserted],color:hL},{tag:v.invalid,color:cL}]),vL=[mL,bv(OL)];function ve(){return ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ve.apply(this,arguments)}var zr=t=>{var{theme:e,settings:n={},styles:r=[]}=t,i={".cm-gutters":{}},s={};n.background&&(s.backgroundColor=n.background),n.foreground&&(s.color=n.foreground),(n.background||n.foreground)&&(i["&"]=s),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var o={};n.gutterActiveForeground&&(o.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},o.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=o,n.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={backgroundColor:n.selection}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var l=me.theme(i,{dark:e==="dark"}),a=Zl.define(r),u=[l,bv(a)];return u},yL={background:"#272822",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#49483E",selectionMatch:"#49483E",gutterBackground:"#272822",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},SL=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},yL,n),styles:[{tag:[v.comment,v.documentMeta],color:"#8292a2"},{tag:[v.number,v.bool,v.null,v.atom],color:"#ae81ff"},{tag:[v.attributeValue,v.className,v.name],color:"#e6db74"},{tag:[v.propertyName,v.attributeName],color:"#a6e22e"},{tag:[v.variableName],color:"#9effff"},{tag:[v.squareBracket],color:"#bababa"},{tag:[v.string,v.special(v.brace)],color:"#e6db74"},{tag:[v.regexp,v.className,v.typeName,v.definition(v.typeName)],color:"#66d9ef"},{tag:[v.definition(v.variableName),v.definition(v.propertyName),v.function(v.variableName)],color:"#fd971f"},{tag:[v.keyword,v.definitionKeyword,v.modifier,v.tagName,v.angleBracket],color:"#f92672"},...r]})},bL=SL(),wL={background:"#0f0f0f",foreground:"#defdef",caret:"#00FF00",selection:"#515151",selectionMatch:"#515151",gutterBackground:"#555",gutterForeground:"#FFFFFF",lineHighlight:"#314151"},kL=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},wL,n),styles:[{tag:v.keyword,color:"darkgoldenrod",fontWeight:"bold"},{tag:v.atom,color:"#77F"},{tag:v.comment,color:"#7a7b7c",fontStyle:"italic"},{tag:v.number,color:"violet"},{tag:v.definition(v.variableName),color:"#fffabc"},{tag:v.variableName,color:"#abcdef"},{tag:v.function(v.variableName),color:"#fffabc"},{tag:v.typeName,color:"#FFDD44"},{tag:v.tagName,color:"#def"},{tag:v.string,color:"#2b4"},{tag:v.meta,color:"#C9F"},{tag:v.bracket,color:"#8a8a8a"},{tag:v.attributeName,color:"#DDFF00"},{tag:v.heading,color:"aquamarine",fontWeight:"bold"},{tag:v.link,color:"blueviolet",fontWeight:"bold"},...r]})},xL=kL(),PL={background:"#282a36",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"#282a36",gutterForeground:"#6D8A88",gutterBorder:"transparent",lineHighlight:"rgba(255, 255, 255, 0.1)"},CL=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},PL,n),styles:[{tag:v.comment,color:"#6272a4"},{tag:v.string,color:"#f1fa8c"},{tag:v.atom,color:"#bd93f9"},{tag:v.meta,color:"#f8f8f2"},{tag:[v.keyword,v.operator,v.tagName],color:"#ff79c6"},{tag:[v.function(v.propertyName),v.propertyName],color:"#66d9ef"},{tag:[v.definition(v.variableName),v.function(v.variableName),v.className,v.attributeName],color:"#50fa7b"},{tag:v.atom,color:"#bd93f9"},...r]})},QL=CL(),EL={background:"#fff",foreground:"#000",caret:"#FFFFFF",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#f7f7f7",gutterForeground:"#999",lineHighlight:"#e8f2ff",gutterBorder:"transparent"},$L=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},EL,n),styles:[{tag:[v.comment],color:"#3F7F5F"},{tag:[v.documentMeta],color:"#FF1717"},{tag:v.keyword,color:"#7F0055",fontWeight:"bold"},{tag:v.atom,color:"#00f"},{tag:v.number,color:"#164"},{tag:v.propertyName,color:"#164"},{tag:[v.variableName,v.definition(v.variableName)],color:"#0000C0"},{tag:v.function(v.variableName),color:"#0000C0"},{tag:v.string,color:"#2A00FF"},{tag:v.operator,color:"black"},{tag:v.tagName,color:"#170"},{tag:v.attributeName,color:"#00c"},{tag:v.link,color:"#219"},...r]})},_L=$L(),TL={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},RL=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},TL,n),styles:[{tag:[v.standard(v.tagName),v.tagName],color:"#116329"},{tag:[v.comment,v.bracket],color:"#6a737d"},{tag:[v.className,v.propertyName],color:"#6f42c1"},{tag:[v.variableName,v.attributeName,v.number,v.operator],color:"#005cc5"},{tag:[v.keyword,v.typeName,v.typeOperator,v.typeName],color:"#d73a49"},{tag:[v.string,v.meta,v.regexp],color:"#032f62"},{tag:[v.name,v.quote],color:"#22863a"},{tag:[v.heading],color:"#24292e",fontWeight:"bold"},{tag:[v.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[v.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[v.atom,v.bool,v.special(v.variableName)],color:"#e36209"},{tag:[v.url,v.escape,v.regexp,v.link],color:"#032f62"},{tag:v.link,textDecoration:"underline"},{tag:v.strikethrough,textDecoration:"line-through"},{tag:v.invalid,color:"#cb2431"},...r]})};RL();var AL={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},DL=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},AL,n),styles:[{tag:[v.standard(v.tagName),v.tagName],color:"#7ee787"},{tag:[v.comment,v.bracket],color:"#8b949e"},{tag:[v.className,v.propertyName],color:"#d2a8ff"},{tag:[v.variableName,v.attributeName,v.number,v.operator],color:"#79c0ff"},{tag:[v.keyword,v.typeName,v.typeOperator,v.typeName],color:"#ff7b72"},{tag:[v.string,v.meta,v.regexp],color:"#a5d6ff"},{tag:[v.name,v.quote],color:"#7ee787"},{tag:[v.heading],color:"#d2a8ff",fontWeight:"bold"},{tag:[v.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[v.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[v.atom,v.bool,v.special(v.variableName)],color:"#ffab70"},{tag:v.link,textDecoration:"underline"},{tag:v.strikethrough,textDecoration:"line-through"},{tag:v.invalid,color:"#f97583"},...r]})},ML=DL(),IL={background:"#2e3235",foreground:"#bdbdbd",caret:"#a0a4ae",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#2e3235",gutterForeground:"#999",gutterActiveForeground:"#4f5b66",lineHighlight:"#545b61"},SE=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},IL,n),styles:[{tag:v.keyword,color:"#cf6edf"},{tag:[v.name,v.deleted,v.character,v.macroName],color:"#56c8d8"},{tag:[v.propertyName],color:"#facf4e"},{tag:[v.variableName],color:"#bdbdbd"},{tag:[v.function(v.variableName)],color:"#56c8d8"},{tag:[v.labelName],color:"#cf6edf"},{tag:[v.color,v.constant(v.name),v.standard(v.name)],color:"#facf4e"},{tag:[v.definition(v.name),v.separator],color:"#fa5788"},{tag:[v.brace],color:"#cf6edf"},{tag:[v.annotation],color:"#ff5f52"},{tag:[v.number,v.changed,v.annotation,v.modifier,v.self,v.namespace],color:"#ffad42"},{tag:[v.typeName,v.className],color:"#ffad42"},{tag:[v.operator,v.operatorKeyword],color:"#7186f0"},{tag:[v.tagName],color:"#99d066"},{tag:[v.squareBracket],color:"#ff5f52"},{tag:[v.angleBracket],color:"#606f7a"},{tag:[v.attributeName],color:"#bdbdbd"},{tag:[v.regexp],color:"#ff5f52"},{tag:[v.quote],color:"#6abf69"},{tag:[v.string],color:"#99d066"},{tag:v.link,color:"#56c8d8",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[v.url,v.escape,v.special(v.string)],color:"#facf4e"},{tag:[v.meta],color:"#707d8b"},{tag:[v.comment],color:"#707d8b",fontStyle:"italic"},{tag:v.monospace,color:"#bdbdbd"},{tag:v.strong,fontWeight:"bold",color:"#ff5f52"},{tag:v.emphasis,fontStyle:"italic",color:"#99d066"},{tag:v.strikethrough,textDecoration:"line-through"},{tag:v.heading,fontWeight:"bold",color:"#facf4e"},{tag:v.heading1,fontWeight:"bold",color:"#facf4e"},{tag:[v.heading2,v.heading3,v.heading4],fontWeight:"bold",color:"#facf4e"},{tag:[v.heading5,v.heading6],color:"#facf4e"},{tag:[v.atom,v.bool,v.special(v.variableName)],color:"#56c8d8"},{tag:[v.processingInstruction,v.inserted],color:"#ff5f52"},{tag:[v.contentSeparator],color:"#56c8d8"},{tag:v.invalid,color:"#606f7a",borderBottom:"1px dotted #ff5f52"},...r]})};SE();var NL=SE(),LL={background:"#FAFAFA",foreground:"#90A4AE",caret:"#272727",selection:"#80CBC440",selectionMatch:"#FAFAFA",gutterBackground:"#FAFAFA",gutterForeground:"#90A4AE",gutterBorder:"transparent",lineHighlight:"#CCD7DA50"},XL=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},LL,n),styles:[{tag:v.keyword,color:"#39ADB5"},{tag:[v.name,v.deleted,v.character,v.macroName],color:"#90A4AE"},{tag:[v.propertyName],color:"#6182B8"},{tag:[v.processingInstruction,v.string,v.inserted,v.special(v.string)],color:"#91B859"},{tag:[v.function(v.variableName),v.labelName],color:"#6182B8"},{tag:[v.color,v.constant(v.name),v.standard(v.name)],color:"#39ADB5"},{tag:[v.definition(v.name),v.separator],color:"#90A4AE"},{tag:[v.className],color:"#E2931D"},{tag:[v.number,v.changed,v.annotation,v.modifier,v.self,v.namespace],color:"#F76D47"},{tag:[v.typeName],color:"#E2931D",fontStyle:"#E2931D"},{tag:[v.operator,v.operatorKeyword],color:"#39ADB5"},{tag:[v.url,v.escape,v.regexp,v.link],color:"#91B859"},{tag:[v.meta,v.comment],color:"#90A4AE"},{tag:v.strong,fontWeight:"bold"},{tag:v.emphasis,fontStyle:"italic"},{tag:v.link,textDecoration:"underline"},{tag:v.heading,fontWeight:"bold",color:"#39ADB5"},{tag:[v.atom,v.bool,v.special(v.variableName)],color:"#90A4AE"},{tag:v.invalid,color:"#E5393570"},{tag:v.strikethrough,textDecoration:"line-through"},...r]})};XL();var VL={background:"#2e3440",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#3b4252",selectionMatch:"#e5e9f0",gutterBackground:"#2e3440",gutterForeground:"#4c566a",gutterActiveForeground:"#d8dee9",lineHighlight:"#4c566a"},ZL=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},VL,n),styles:[{tag:v.keyword,color:"#5e81ac"},{tag:[v.name,v.deleted,v.character,v.propertyName,v.macroName],color:"#88c0d0"},{tag:[v.variableName],color:"#8fbcbb"},{tag:[v.function(v.variableName)],color:"#8fbcbb"},{tag:[v.labelName],color:"#81a1c1"},{tag:[v.color,v.constant(v.name),v.standard(v.name)],color:"#5e81ac"},{tag:[v.definition(v.name),v.separator],color:"#a3be8c"},{tag:[v.brace],color:"#8fbcbb"},{tag:[v.annotation],color:"#d30102"},{tag:[v.number,v.changed,v.annotation,v.modifier,v.self,v.namespace],color:"#b48ead"},{tag:[v.typeName,v.className],color:"#ebcb8b"},{tag:[v.operator,v.operatorKeyword],color:"#a3be8c"},{tag:[v.tagName],color:"#b48ead"},{tag:[v.squareBracket],color:"#bf616a"},{tag:[v.angleBracket],color:"#d08770"},{tag:[v.attributeName],color:"#ebcb8b"},{tag:[v.regexp],color:"#5e81ac"},{tag:[v.quote],color:"#b48ead"},{tag:[v.string],color:"#a3be8c"},{tag:v.link,color:"#a3be8c",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[v.url,v.escape,v.special(v.string)],color:"#8fbcbb"},{tag:[v.meta],color:"#88c0d0"},{tag:[v.monospace],color:"#d8dee9",fontStyle:"italic"},{tag:[v.comment],color:"#4c566a",fontStyle:"italic"},{tag:v.strong,fontWeight:"bold",color:"#5e81ac"},{tag:v.emphasis,fontStyle:"italic",color:"#5e81ac"},{tag:v.strikethrough,textDecoration:"line-through"},{tag:v.heading,fontWeight:"bold",color:"#5e81ac"},{tag:v.special(v.heading1),fontWeight:"bold",color:"#5e81ac"},{tag:v.heading1,fontWeight:"bold",color:"#5e81ac"},{tag:[v.heading2,v.heading3,v.heading4],fontWeight:"bold",color:"#5e81ac"},{tag:[v.heading5,v.heading6],color:"#5e81ac"},{tag:[v.atom,v.bool,v.special(v.variableName)],color:"#d08770"},{tag:[v.processingInstruction,v.inserted],color:"#8fbcbb"},{tag:[v.contentSeparator],color:"#ebcb8b"},{tag:v.invalid,color:"#434c5e",borderBottom:"1px dotted #d30102"},...r]})},jL=ZL(),BL={background:"#fff",foreground:"#3D3D3D",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#AFAFAF",lineHighlight:"#EDF4FF"};function FL(t){var{theme:e="light",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},BL,n),styles:[{tag:[v.comment,v.quote],color:"#707F8D"},{tag:[v.typeName,v.typeOperator],color:"#aa0d91"},{tag:[v.keyword],color:"#aa0d91",fontWeight:"bold"},{tag:[v.string,v.meta],color:"#D23423"},{tag:[v.name],color:"#032f62"},{tag:[v.typeName],color:"#522BB2"},{tag:[v.variableName],color:"#23575C"},{tag:[v.definition(v.variableName)],color:"#327A9E"},{tag:[v.regexp,v.link],color:"#0e0eff"},...r]})}var UL=FL(),WL={background:"#292A30",foreground:"#CECFD0",caret:"#fff",selection:"#727377",selectionMatch:"#727377",lineHighlight:"#2F3239"},zL=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return zr({theme:e,settings:ve({},WL,n),styles:[{tag:[v.comment,v.quote],color:"#7F8C98"},{tag:[v.keyword],color:"#FF7AB2",fontWeight:"bold"},{tag:[v.string,v.meta],color:"#FF8170"},{tag:[v.typeName],color:"#DABAFF"},{tag:[v.definition(v.variableName)],color:"#6BDFFF"},{tag:[v.name],color:"#6BAA9F"},{tag:[v.variableName],color:"#ACF2E4"},{tag:[v.regexp,v.link],color:"#FF8170"},...r]})};zL();const bE=[{value:xL,label:"abcdef"},{value:QL,label:"darcula"},{value:_L,label:"eclipse"},{value:NL,label:"material"},{value:jL,label:"nord"},{value:vL,label:"oneDark"},{value:bL,label:"okaidia"},{value:ML,label:"github"},{value:UL,label:"xcode"}],YL=bE.reduce((t,e)=>(t[e.label]=e.value,t),{}),wE="oneDark",qL=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=kv(t.state,n.from);return r.line?GL(t):r.block?KL(t):!1};function wv(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const GL=wv(t3,0),HL=wv(kE,0),KL=wv((t,e)=>kE(t,e,e3(e)),0);function kv(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const pa=50;function JL(t,{open:e,close:n},r,i){let s=t.sliceDoc(r-pa,r),o=t.sliceDoc(i,i+pa),l=/\s*$/.exec(s)[0].length,a=/^\s*/.exec(o)[0].length,u=s.length-l;if(s.slice(u-e.length,u)==e&&o.slice(a,a+n.length)==n)return{open:{pos:r-l,margin:l&&1},close:{pos:i+a,margin:a&&1}};let c,f;i-r<=2*pa?c=f=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+pa),f=t.sliceDoc(i-pa,i));let h=/^\s*/.exec(c)[0].length,p=/\s*$/.exec(f)[0].length,d=f.length-p-n.length;return c.slice(h,h+e.length)==e&&f.slice(d,d+n.length)==n?{open:{pos:r+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:i-p-n.length,margin:/\s/.test(f.charAt(d-1))?1:0}}:null}function e3(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to),s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from,to:i.to})}return e}function kE(t,e,n=e.selection.ranges){let r=n.map(s=>kv(e,s.from).block);if(!r.every(s=>s))return null;let i=n.map((s,o)=>JL(e,r[o],s.from,s.to));if(t!=2&&!i.every(s=>s))return{changes:e.changes(n.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(t!=1&&i.some(s=>s)){let s=[];for(let o=0,l;o<i.length;o++)if(l=i[o]){let a=r[o],{open:u,close:c}=l;s.push({from:u.pos-a.open.length,to:u.pos+u.margin},{from:c.pos-c.margin,to:c.pos+a.close.length})}return{changes:s}}return null}function t3(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:s,to:o}of n){let l=r.length,a=1e9,u=kv(e,s).line;if(u){for(let c=s;c<=o;){let f=e.doc.lineAt(c);if(f.from>i&&(s==o||o>f.from)){i=f.from;let h=/^\s*/.exec(f.text)[0].length,p=h==f.length,d=f.text.slice(h,h+u.length)==u?h:-1;h<f.text.length&&h<a&&(a=h),r.push({line:f,comment:d,token:u,indent:h,empty:p,single:!1})}c=f.to+1}if(a<1e9)for(let c=l;c<r.length;c++)r[c].indent<r[c].line.text.length&&(r[c].indent=a);r.length==l+1&&(r[l].single=!0)}}if(t!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:a,indent:u,empty:c,single:f}of r)(f||!c)&&s.push({from:l.from+u,insert:a+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:a}of r)if(l>=0){let u=o.from+l,c=u+a.length;o.text[c-o.from]==" "&&c++,s.push({from:u,to:c})}return{changes:s}}return null}const kO=bi.define(),n3=bi.define(),r3=Oe.define(),xE=Oe.define({combine(t){return wi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}});function i3(t){let e=0;return t.iterChangedRanges((n,r)=>e=r),e}const PE=ln.define({create(){return pi.empty},update(t,e){let n=e.state.facet(xE),r=e.annotation(kO);if(r){let a=e.docChanged?Z.single(i3(e.changes)):void 0,u=Fn.fromTransaction(e,a),c=r.side,f=c==0?t.undone:t.done;return u?f=Dh(f,f.length,n.minDepth,u):f=EE(f,e.startState.selection),new pi(c==0?r.rest:f,c==0?f:r.rest)}let i=e.annotation(n3);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Jt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=Fn.fromTransaction(e),o=e.annotation(Jt.time),l=e.annotation(Jt.userEvent);return s?t=t.addChanges(s,o,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,l,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new pi(t.done.map(Fn.fromJSON),t.undone.map(Fn.fromJSON))}});function s3(t={}){return[PE,xE.of(t),me.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?CE:e.inputType=="historyRedo"?xO:null;return r?(e.preventDefault(),r(n)):!1}})]}function _d(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(PE,!1);if(!i)return!1;let s=i.pop(t,n,e);return s?(r(s),!0):!1}}const CE=_d(0,!1),xO=_d(1,!1),o3=_d(0,!0),l3=_d(1,!0);class Fn{constructor(e,n,r,i,s){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new Fn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.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 Fn(e.changes&&Ht.fromJSON(e.changes),[],e.mapped&&Oi.fromJSON(e.mapped),e.startSelection&&Z.fromJSON(e.startSelection),e.selectionsAfter.map(Z.fromJSON))}static fromTransaction(e,n){let r=Pr;for(let i of e.startState.facet(r3)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new Fn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Pr)}static selection(e){return new Fn(void 0,Pr,void 0,void 0,e)}}function Dh(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function a3(t,e){let n=[],r=!1;return t.iterChangedRanges((i,s)=>n.push(i,s)),e.iterChangedRanges((i,s,o,l)=>{for(let a=0;a<n.length;){let u=n[a++],c=n[a++];l>=u&&o<=c&&(r=!0)}}),r}function u3(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function QE(t,e){return t.length?e.length?t.concat(e):t:e}const Pr=[],c3=200;function EE(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-c3));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Dh(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Fn.selection([e])]}function f3(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function cg(t,e){if(!t.length)return t;let n=t.length,r=Pr;for(;n;){let i=h3(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=t.slice(0,n);return s[n-1]=i,s}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Fn.selection(r)]:Pr}function h3(t,e,n){let r=QE(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):Pr,n);if(!t.changes)return Fn.selection(r);let i=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new Fn(i,Ve.mapEffects(t.effects,e),o,t.startSelection.map(s),r)}const d3=/^(input\.type|delete)($|\.)/;class pi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new pi(this.done,this.undone):this}addChanges(e,n,r,i,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!r||d3.test(r))&&(!l.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,a3(l.changes,e.changes))||r=="input.type.compose")?o=Dh(o,o.length-1,i.minDepth,new Fn(e.changes.compose(l.changes),QE(e.effects,l.effects),l.mapped,l.startSelection,Pr)):o=Dh(o,o.length,i.minDepth,e),new pi(o,Pr,n,r)}addSelection(e,n,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Pr;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&u3(s[s.length-1],e)?this:new pi(EE(this.done,e),this.undone,n,r)}addMapping(e){return new pi(cg(this.done,e),cg(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1];if(r&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:kO.of({side:e,rest:f3(i)}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let o=i.length==1?Pr:i.slice(0,i.length-1);return s.mapped&&(o=cg(o,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:kO.of({side:e,rest:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}pi.empty=new pi(Pr,Pr);const p3=[{key:"Mod-z",run:CE,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:xO,preventDefault:!0},{linux:"Ctrl-Shift-z",run:xO,preventDefault:!0},{key:"Mod-u",run:o3,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:l3,preventDefault:!0}];function jl(t,e){return Z.create(t.ranges.map(e),t.mainIndex)}function xi(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Yr({state:t,dispatch:e},n){let r=jl(t.selection,n);return r.eq(t.selection)?!1:(e(xi(t,r)),!0)}function Td(t,e){return Z.cursor(e?t.to:t.from)}function $E(t,e){return Yr(t,n=>n.empty?t.moveByChar(n,e):Td(n,e))}function En(t){return t.textDirectionAt(t.state.selection.main.head)==Mt.LTR}const _E=t=>$E(t,!En(t)),TE=t=>$E(t,En(t));function RE(t,e){return Yr(t,n=>n.empty?t.moveByGroup(n,e):Td(n,e))}const g3=t=>RE(t,!En(t)),m3=t=>RE(t,En(t));function O3(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Rd(t,e,n){let r=vt(t).resolveInner(e.head),i=n?Ie.closedBy:Ie.openedBy;for(let a=e.head;;){let u=n?r.childAfter(a):r.childBefore(a);if(!u)break;O3(t,u,i)?r=u:a=n?u.to:u.from}let s=r.type.prop(i),o,l;return s&&(o=n?di(t,r.from,1):di(t,r.to,-1))&&o.matched?l=n?o.end.to:o.end.from:l=n?r.to:r.from,Z.cursor(l,n?-1:1)}const v3=t=>Yr(t,e=>Rd(t.state,e,!En(t))),y3=t=>Yr(t,e=>Rd(t.state,e,En(t)));function AE(t,e){return Yr(t,n=>{if(!n.empty)return Td(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const DE=t=>AE(t,!1),ME=t=>AE(t,!0);function IE(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let s of t.state.facet(me.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function NE(t,e){let n=IE(t),{state:r}=t,i=jl(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):Td(o,e));if(i.eq(r.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,u=l.bottom-n.marginBottom;o&&o.top>a&&o.bottom<u&&(s=me.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-a}))}return t.dispatch(xi(r,i),{effects:s}),!0}const Wb=t=>NE(t,!1),PO=t=>NE(t,!0);function Xs(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let s=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=Z.cursor(r.from+s))}return i}const S3=t=>Yr(t,e=>Xs(t,e,!0)),b3=t=>Yr(t,e=>Xs(t,e,!1)),w3=t=>Yr(t,e=>Xs(t,e,!En(t))),k3=t=>Yr(t,e=>Xs(t,e,En(t))),x3=t=>Yr(t,e=>Z.cursor(t.lineBlockAt(e.head).from,1)),P3=t=>Yr(t,e=>Z.cursor(t.lineBlockAt(e.head).to,-1));function C3(t,e,n){let r=!1,i=jl(t.selection,s=>{let o=di(t,s.head,-1)||di(t,s.head,1)||s.head>0&&di(t,s.head-1,1)||s.head<t.doc.length&&di(t,s.head+1,-1);if(!o||!o.end)return s;r=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return n?Z.range(s.anchor,l):Z.cursor(l)});return r?(e(xi(t,i)),!0):!1}const Q3=({state:t,dispatch:e})=>C3(t,e,!1);function _r(t,e){let n=jl(t.state.selection,r=>{let i=e(r);return Z.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(xi(t.state,n)),!0)}function LE(t,e){return _r(t,n=>t.moveByChar(n,e))}const XE=t=>LE(t,!En(t)),VE=t=>LE(t,En(t));function ZE(t,e){return _r(t,n=>t.moveByGroup(n,e))}const E3=t=>ZE(t,!En(t)),$3=t=>ZE(t,En(t)),_3=t=>_r(t,e=>Rd(t.state,e,!En(t))),T3=t=>_r(t,e=>Rd(t.state,e,En(t)));function jE(t,e){return _r(t,n=>t.moveVertically(n,e))}const BE=t=>jE(t,!1),FE=t=>jE(t,!0);function UE(t,e){return _r(t,n=>t.moveVertically(n,e,IE(t).height))}const zb=t=>UE(t,!1),Yb=t=>UE(t,!0),R3=t=>_r(t,e=>Xs(t,e,!0)),A3=t=>_r(t,e=>Xs(t,e,!1)),D3=t=>_r(t,e=>Xs(t,e,!En(t))),M3=t=>_r(t,e=>Xs(t,e,En(t))),I3=t=>_r(t,e=>Z.cursor(t.lineBlockAt(e.head).from)),N3=t=>_r(t,e=>Z.cursor(t.lineBlockAt(e.head).to)),qb=({state:t,dispatch:e})=>(e(xi(t,{anchor:0})),!0),Gb=({state:t,dispatch:e})=>(e(xi(t,{anchor:t.doc.length})),!0),Hb=({state:t,dispatch:e})=>(e(xi(t,{anchor:t.selection.main.anchor,head:0})),!0),Kb=({state:t,dispatch:e})=>(e(xi(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),L3=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),X3=({state:t,dispatch:e})=>{let n=Dd(t).map(({from:r,to:i})=>Z.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:Z.create(n),userEvent:"select"})),!0},V3=({state:t,dispatch:e})=>{let n=jl(t.selection,r=>{var i;let s=vt(t).resolveInner(r.head,1);for(;!(s.from<r.from&&s.to>=r.to||s.to>r.to&&s.from<=r.from||!(!((i=s.parent)===null||i===void 0)&&i.parent));)s=s.parent;return Z.range(s.to,s.from)});return e(xi(t,n)),!0},Z3=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Z.create([n.main]):n.main.empty||(r=Z.create([Z.cursor(n.main.head)])),r?(e(xi(t,r)),!0):!1};function Ad(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let a=e(o);a<o?(n="delete.backward",a=rf(t,a,!1)):a>o&&(n="delete.forward",a=rf(t,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=rf(t,o,!1),l=rf(t,l,!0);return o==l?{range:s}:{changes:{from:o,to:l},range:Z.cursor(o)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?me.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function rf(t,e,n){if(t instanceof me)for(let r of t.state.facet(me.atomicRanges).map(i=>i(t)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=n?s:i)});return e}const WE=(t,e)=>Ad(t,n=>{let{state:r}=t,i=r.doc.lineAt(n),s,o;if(!e&&n>i.from&&n<i.from+200&&!/[^ \t]/.test(s=i.text.slice(0,n-i.from))){if(s[s.length-1]==" ")return n-1;let l=ju(s,r.tabSize),a=l%Th(r)||Th(r);for(let u=0;u<a&&s[s.length-1-u]==" ";u++)n--;o=n}else o=Rn(i.text,n-i.from,e,e)+i.from,o==n&&i.number!=(e?r.doc.lines:1)&&(o+=e?1:-1);return o}),CO=t=>WE(t,!1),zE=t=>WE(t,!0),YE=(t,e)=>Ad(t,n=>{let r=n,{state:i}=t,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let l=null;;){if(r==(e?s.to:s.from)){r==n&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let a=Rn(s.text,r-s.from,e)+s.from,u=s.text.slice(Math.min(r,a)-s.from,Math.max(r,a)-s.from),c=o(u);if(l!=null&&c!=l)break;(u!=" "||r!=n)&&(l=c),r=a}return r}),qE=t=>YE(t,!1),j3=t=>YE(t,!0),GE=t=>Ad(t,e=>{let n=t.lineBlockAt(e).to;return e<n?n:Math.min(t.state.doc.length,e+1)}),B3=t=>Ad(t,e=>{let n=t.lineBlockAt(e).from;return e>n?n:Math.max(0,e-1)}),F3=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:et.of(["",""])},range:Z.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},U3=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,s=t.doc.lineAt(i),o=i==s.from?i-1:Rn(s.text,i-s.from,!1)+s.from,l=i==s.to?i+1:Rn(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:t.doc.slice(i,l).append(t.doc.slice(o,i))},range:Z.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Dd(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=t.doc.lineAt(r.to-1)),n>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return e}function HE(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let s of Dd(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),l=o.length+1;if(n){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let a of s.ranges)i.push(Z.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let a of s.ranges)i.push(Z.range(a.anchor-l,a.head-l))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Z.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const W3=({state:t,dispatch:e})=>HE(t,e,!1),z3=({state:t,dispatch:e})=>HE(t,e,!0);function KE(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Dd(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Y3=({state:t,dispatch:e})=>KE(t,e,!1),q3=({state:t,dispatch:e})=>KE(t,e,!0),G3=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Dd(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=jl(e.selection,i=>t.moveVertically(i,!0)).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function H3(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=vt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(Ie.closedBy))&&s.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from?{from:r.to,to:i.from}:null}const K3=JE(!1),J3=JE(!0);function JE(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,l=e.doc.lineAt(s),a=!t&&s==o&&H3(e,s);t&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let u=new Ed(e,{simulateBreak:s,simulateDoubleBreak:!!a}),c=yv(u,s);for(c==null&&(c=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);o<l.to&&/\s/.test(l.text[o-l.from]);)o++;a?{from:s,to:o}=a:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let f=["",xu(e,c)];return a&&f.push(xu(e,u.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:et.of(f)},range:Z.cursor(s+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function xv(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let l=t.doc.lineAt(o);l.number>n&&(r.empty||r.to>l.from)&&(e(l,i,r),n=l.number),o=l.to+1}let s=t.changes(i);return{changes:i,range:Z.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const eX=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Ed(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),i=xv(t,(s,o,l)=>{let a=yv(r,s.from);if(a==null)return;/\S/.test(s.text)||(a=0);let u=/^\s*/.exec(s.text)[0],c=xu(t,a);(u!=c||l.from<s.from+u.length)&&(n[s.from]=a,o.push({from:s.from,to:s.from+u.length,insert:c}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},tX=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(xv(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Qd)})}),{userEvent:"input.indent"})),!0),nX=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(xv(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let s=ju(i,t.tabSize),o=0,l=xu(t,Math.max(0,s-Th(t)));for(;o<i.length&&o<l.length&&i.charCodeAt(o)==l.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),rX=[{key:"Ctrl-b",run:_E,shift:XE,preventDefault:!0},{key:"Ctrl-f",run:TE,shift:VE},{key:"Ctrl-p",run:DE,shift:BE},{key:"Ctrl-n",run:ME,shift:FE},{key:"Ctrl-a",run:x3,shift:I3},{key:"Ctrl-e",run:P3,shift:N3},{key:"Ctrl-d",run:zE},{key:"Ctrl-h",run:CO},{key:"Ctrl-k",run:GE},{key:"Ctrl-Alt-h",run:qE},{key:"Ctrl-o",run:F3},{key:"Ctrl-t",run:U3},{key:"Ctrl-v",run:PO}],iX=[{key:"ArrowLeft",run:_E,shift:XE,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:g3,shift:E3,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:w3,shift:D3,preventDefault:!0},{key:"ArrowRight",run:TE,shift:VE,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:m3,shift:$3,preventDefault:!0},{mac:"Cmd-ArrowRight",run:k3,shift:M3,preventDefault:!0},{key:"ArrowUp",run:DE,shift:BE,preventDefault:!0},{mac:"Cmd-ArrowUp",run:qb,shift:Hb},{mac:"Ctrl-ArrowUp",run:Wb,shift:zb},{key:"ArrowDown",run:ME,shift:FE,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Gb,shift:Kb},{mac:"Ctrl-ArrowDown",run:PO,shift:Yb},{key:"PageUp",run:Wb,shift:zb},{key:"PageDown",run:PO,shift:Yb},{key:"Home",run:b3,shift:A3,preventDefault:!0},{key:"Mod-Home",run:qb,shift:Hb},{key:"End",run:S3,shift:R3,preventDefault:!0},{key:"Mod-End",run:Gb,shift:Kb},{key:"Enter",run:K3},{key:"Mod-a",run:L3},{key:"Backspace",run:CO,shift:CO},{key:"Delete",run:zE},{key:"Mod-Backspace",mac:"Alt-Backspace",run:qE},{key:"Mod-Delete",mac:"Alt-Delete",run:j3},{mac:"Mod-Backspace",run:B3},{mac:"Mod-Delete",run:GE}].concat(rX.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),sX=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:v3,shift:_3},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:y3,shift:T3},{key:"Alt-ArrowUp",run:W3},{key:"Shift-Alt-ArrowUp",run:Y3},{key:"Alt-ArrowDown",run:z3},{key:"Shift-Alt-ArrowDown",run:q3},{key:"Escape",run:Z3},{key:"Mod-Enter",run:J3},{key:"Alt-l",mac:"Ctrl-l",run:X3},{key:"Mod-i",run:V3,preventDefault:!0},{key:"Mod-[",run:nX},{key:"Mod-]",run:tX},{key:"Mod-Alt-\\",run:eX},{key:"Shift-Mod-k",run:G3},{key:"Shift-Mod-\\",run:Q3},{key:"Mod-/",run:qL},{key:"Alt-A",run:HL}].concat(iX);function mt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)e$(t,arguments[e]);return t}function e$(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)e$(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const Jb=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class $l{constructor(e,n,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?l=>s(Jb(l)):Jb,this.query=this.normalize(n)}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 dn(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 n=tv(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=br(e);let i=this.normalize(n);for(let s=0,o=r;;s++){let l=i.charCodeAt(s),a=this.match(l,o);if(a)return this.value=a,this;if(s==i.length-1)break;o==r&&s<n.length&&n.charCodeAt(s)==l&&o++}}}match(e,n){let r=null;for(let i=0;i<this.matches.length;i+=2){let s=this.matches[i],o=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?r={from:this.matches[i+1],to:n+1}:(this.matches[i]++,o=!0)),o||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:n,to:n+1}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferPos)&&(r=null),r}}typeof Symbol<"u"&&($l.prototype[Symbol.iterator]=function(){return this});const t$={from:-1,to:-1,match:/.*/.exec("")},Pv="gm"+(/x/.unicode==null?"":"u");class n${constructor(e,n,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=t$,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new r$(e,n,r,i,s);this.re=new RegExp(n,Pv+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=Mh(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 n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Mh(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,n)))return this.value={from:r,to:i,match:n},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 fg=new WeakMap;class fl{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=fg.get(e);if(!i||i.from>=r||i.to<=n){let l=new fl(n,e.sliceString(n,r));return fg.set(e,l),l}if(i.from==n&&i.to==r)return i;let{text:s,from:o}=i;return o>n&&(s=e.sliceString(n,o)+s,o=n),i.to<r&&(s+=e.sliceString(i.to,r)),fg.set(e,new fl(o,s)),new fl(n,s.slice(n-o,r-o))}}class r${constructor(e,n,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=t$,this.matchPos=Mh(e,i),this.re=new RegExp(n,Pv+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=fl.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,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Mh(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=fl.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(n$.prototype[Symbol.iterator]=r$.prototype[Symbol.iterator]=function(){return this});function oX(t){try{return new RegExp(t,Pv),!0}catch{return!1}}function Mh(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function QO(t){let e=mt("input",{class:"cm-textfield",name:"line"}),n=mt("form",{class:"cm-gotoLine",onkeydown:i=>{i.keyCode==27?(i.preventDefault(),t.dispatch({effects:Ih.of(!1)}),t.focus()):i.keyCode==13&&(i.preventDefault(),r())},onsubmit:i=>{i.preventDefault(),r()}},mt("label",t.state.phrase("Go to line"),": ",e)," ",mt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:s}=t,o=s.doc.lineAt(s.selection.main.head),[,l,a,u,c]=i,f=u?+u.slice(1):0,h=a?+a:o.number;if(a&&c){let d=h/100;l&&(d=d*(l=="-"?-1:1)+o.number/s.doc.lines),h=Math.round(s.doc.lines*d)}else a&&l&&(h=h*(l=="-"?-1:1)+o.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,h)));t.dispatch({effects:Ih.of(!1),selection:Z.cursor(p.from+Math.max(0,Math.min(f,p.length))),scrollIntoView:!0}),t.focus()}return{dom:n}}const Ih=Ve.define(),ew=ln.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Ih)&&(t=n.value);return t},provide:t=>Su.from(t,e=>e?QO:null)}),lX=t=>{let e=yu(t,QO);if(!e){let n=[Ih.of(!0)];t.state.field(ew,!1)==null&&n.push(Ve.appendConfig.of([ew,aX])),t.dispatch({effects:n}),e=yu(t,QO)}return e&&e.dom.querySelector("input").focus(),!0},aX=me.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),uX={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},i$=Oe.define({combine(t){return wi(t,uX,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function cX(t){let e=[gX,pX];return t&&e.push(i$.of(t)),e}const fX=Pe.mark({class:"cm-selectionMatch"}),hX=Pe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function tw(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=$t.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=$t.Word)}function dX(t,e,n,r){return t(e.sliceDoc(n,n+1))==$t.Word&&t(e.sliceDoc(r-1,r))==$t.Word}const pX=jt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(i$),{state:n}=t,r=n.selection;if(r.ranges.length>1)return Pe.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return Pe.none;let a=n.wordAt(i.head);if(!a)return Pe.none;o=n.charCategorizer(i.head),s=n.sliceDoc(a.from,a.to)}else{let a=i.to-i.from;if(a<e.minSelectionLength||a>200)return Pe.none;if(e.wholeWords){if(s=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(tw(o,n,i.from,i.to)&&dX(o,n,i.from,i.to)))return Pe.none}else if(s=n.sliceDoc(i.from,i.to).trim(),!s)return Pe.none}let l=[];for(let a of t.visibleRanges){let u=new $l(n.doc,s,a.from,a.to);for(;!u.next().done;){let{from:c,to:f}=u.value;if((!o||tw(o,n,c,f))&&(i.empty&&c<=i.from&&f>=i.to?l.push(hX.range(c,f)):(c>=i.to||f<=i.from)&&l.push(fX.range(c,f)),l.length>e.maxMatches))return Pe.none}}return Pe.set(l)}},{decorations:t=>t.decorations}),gX=me.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),mX=({state:t,dispatch:e})=>{let{selection:n}=t,r=Z.create(n.ranges.map(i=>t.wordAt(i.head)||Z.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function OX(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let o=!1,l=new $l(t.doc,e,r[r.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new $l(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(a=>a.from==l.value.from))continue;if(s){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const vX=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return mX({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=r))return!1;let i=OX(t,r);return i?(e(t.update({selection:t.selection.addRange(Z.range(i.from,i.to),!1),effects:me.scrollIntoView(i.to)})),!0):!1},Bl=Oe.define({combine(t){return wi(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new _X(e),scrollToMatch:e=>me.scrollIntoView(e)})}});class s${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||oX(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
50
- `: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}create(){return this.regexp?new wX(this):new SX(this)}getCursor(e,n=0,r){let i=e.doc?e:qe.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?No(this,i,n,r):Io(this,i,n,r)}}class o${constructor(e){this.spec=e}}function Io(t,e,n,r){return new $l(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?yX(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function yX(t,e){return(n,r,i,s)=>((s>n||s+i.length<r)&&(s=Math.max(0,n-2),i=t.sliceString(s,Math.min(t.length,r+2))),(e(Nh(i,n-s))!=$t.Word||e(Lh(i,n-s))!=$t.Word)&&(e(Lh(i,r-s))!=$t.Word||e(Nh(i,r-s))!=$t.Word))}class SX extends o${constructor(e){super(e)}nextMatch(e,n,r){let i=Io(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=Io(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let s=Math.max(n,i-1e4-this.spec.unquoted.length),o=Io(this.spec,e,s,i),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=Io(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Io(this.spec,e,Math.max(0,n-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 No(t,e,n,r){return new n$(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?bX(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Nh(t,e){return t.slice(Rn(t,e,!1),e)}function Lh(t,e){return t.slice(e,Rn(t,e))}function bX(t){return(e,n,r)=>!r[0].length||(t(Nh(r.input,r.index))!=$t.Word||t(Lh(r.input,r.index))!=$t.Word)&&(t(Lh(r.input,r.index+r[0].length))!=$t.Word||t(Nh(r.input,r.index+r[0].length))!=$t.Word)}class wX extends o${nextMatch(e,n,r){let i=No(this.spec,e,r,e.doc.length).next();return i.done&&(i=No(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let s=Math.max(n,r-i*1e4),o=No(this.spec,e,s,r),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==n||l.from>s+10))return l;if(s==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n))}matchAll(e,n){let r=No(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=No(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const Pu=Ve.define(),Cv=Ve.define(),Ps=ln.define({create(t){return new hg(EO(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Pu)?t=new hg(n.value.create(),t.panel):n.is(Cv)&&(t=new hg(t.query,n.value?Qv:null));return t},provide:t=>Su.from(t,e=>e.panel)});class hg{constructor(e,n){this.query=e,this.panel=n}}const kX=Pe.mark({class:"cm-searchMatch"}),xX=Pe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),PX=jt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ps))}update(t){let e=t.state.field(Ps);(e!=t.startState.field(Ps)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Pe.none;let{view:n}=this,r=new $s;for(let i=0,s=n.visibleRanges,o=s.length;i<o;i++){let{from:l,to:a}=s[i];for(;i<o-1&&a>s[i+1].from-2*250;)a=s[++i].to;t.highlight(n.state,l,a,(u,c)=>{let f=n.state.selection.ranges.some(h=>h.from==u&&h.to==c);r.add(u,c,f?xX:kX)})}return r.finish()}},{decorations:t=>t.decorations});function Gu(t){return e=>{let n=e.state.field(Ps,!1);return n&&n.query.spec.valid?t(e,n):l$(e)}}const Xh=Gu((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=Z.single(r.from,r.to),s=t.state.facet(Bl);return t.dispatch({selection:i,effects:[Ev(t,r),s.scrollToMatch(i.main)],userEvent:"select.search"}),!0}),Vh=Gu((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let s=Z.single(i.from,i.to),o=t.state.facet(Bl);return t.dispatch({selection:s,effects:[Ev(t,i),o.scrollToMatch(s.main)],userEvent:"select.search"}),!0}),CX=Gu((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Z.create(n.map(r=>Z.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),QX=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let l=new $l(t.doc,t.sliceDoc(r,i));!l.next().done;){if(s.length>1e3)return!1;l.value.from==r&&(o=s.length),s.push(Z.range(l.value.from,l.value.to))}return e(t.update({selection:Z.create(s,o),userEvent:"select.search.matches"})),!0},nw=Gu((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,r,r);if(!s)return!1;let o=[],l,a,u=[];if(s.from==r&&s.to==i&&(a=n.toText(e.getReplacement(s)),o.push({from:s.from,to:s.to,insert:a}),s=e.nextMatch(n,s.from,s.to),u.push(me.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),s){let c=o.length==0||o[0].from>=s.to?0:s.to-s.from-a.length;l=Z.single(s.from-c,s.to-c),u.push(Ev(t,s)),u.push(n.facet(Bl).scrollToMatch(l.main))}return t.dispatch({changes:o,selection:l,effects:u,userEvent:"input.replace"}),!0}),EX=Gu((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:me.announce.of(r),userEvent:"input.replace.all"}),!0});function Qv(t){return t.state.facet(Bl).createPanel(t)}function EO(t,e){var n,r,i,s;let o=t.selection.main,l=o.empty||o.to>o.from+100?"":t.sliceDoc(o.from,o.to);if(e&&!l)return e;let a=t.facet(Bl);return new s$({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:a.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:a.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:a.literal,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:a.wholeWord})}const l$=t=>{let e=t.state.field(Ps,!1);if(e&&e.panel){let n=yu(t,Qv);if(!n)return!1;let r=n.dom.querySelector("[main-field]");if(r&&r!=t.root.activeElement){let i=EO(t.state,e.query.spec);i.valid&&t.dispatch({effects:Pu.of(i)}),r.focus(),r.select()}}else t.dispatch({effects:[Cv.of(!0),e?Pu.of(EO(t.state,e.query.spec)):Ve.appendConfig.of(RX)]});return!0},a$=t=>{let e=t.state.field(Ps,!1);if(!e||!e.panel)return!1;let n=yu(t,Qv);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Cv.of(!1)}),!0},$X=[{key:"Mod-f",run:l$,scope:"editor search-panel"},{key:"F3",run:Xh,shift:Vh,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Xh,shift:Vh,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:a$,scope:"editor search-panel"},{key:"Mod-Shift-l",run:QX},{key:"Alt-g",run:lX},{key:"Mod-d",run:vX,preventDefault:!0}];class _X{constructor(e){this.view=e;let n=this.query=e.state.field(Ps).query.spec;this.commit=this.commit.bind(this),this.searchField=mt("input",{value:n.search,placeholder:Jn(e,"Find"),"aria-label":Jn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=mt("input",{value:n.replace,placeholder:Jn(e,"Replace"),"aria-label":Jn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=mt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=mt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=mt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,s,o){return mt("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=mt("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Xh(e),[Jn(e,"next")]),r("prev",()=>Vh(e),[Jn(e,"previous")]),r("select",()=>CX(e),[Jn(e,"all")]),mt("label",null,[this.caseField,Jn(e,"match case")]),mt("label",null,[this.reField,Jn(e,"regexp")]),mt("label",null,[this.wordField,Jn(e,"by word")]),...e.state.readOnly?[]:[mt("br"),this.replaceField,r("replace",()=>nw(e),[Jn(e,"replace")]),r("replaceAll",()=>EX(e),[Jn(e,"replace all")])],mt("button",{name:"close",onclick:()=>a$(e),"aria-label":Jn(e,"close"),type:"button"},["×"])])}commit(){let e=new s$({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:Pu.of(e)}))}keydown(e){i5(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Vh:Xh)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),nw(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Pu)&&!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(Bl).top}}function Jn(t,e){return t.state.phrase(e)}const sf=30,of=/[\s\.,:;?!]/;function Ev(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,s=Math.max(r.from,e-sf),o=Math.min(i,n+sf),l=t.state.sliceDoc(s,o);if(s!=r.from){for(let a=0;a<sf;a++)if(!of.test(l[a+1])&&of.test(l[a])){l=l.slice(a);break}}if(o!=i){for(let a=l.length-1;a>l.length-sf;a--)if(!of.test(l[a-1])&&of.test(l[a])){l=l.slice(0,a);break}}return me.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${r.number}.`)}const TX=me.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"}}),RX=[Ps,Ls.lowest(PX),TX];class $v{constructor(e,n,r){this.state=e,this.pos=n,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let n=vt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),s=i.search(c$(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function rw(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function AX(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=rw(e)+rw(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function u$(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:AX(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}function DX(t,e){return n=>{for(let r=vt(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}let iw=class{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}};function Cs(t){return t.selection.main.from}function c$(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const f$=bi.define();function MX(t,e,n,r){let{main:i}=t.selection,s=n-i.from,o=r-i.from;return Object.assign(Object.assign({},t.changeByRange(l=>l!=i&&n!=r&&t.sliceDoc(l.from+s,l.from+o)!=t.sliceDoc(n,r)?{range:l}:{changes:{from:l.from+s,to:r==i.from?l.to:l.from+o,insert:e},range:Z.cursor(l.from+s+e.length)})),{userEvent:"input.complete"})}const sw=new WeakMap;function IX(t){if(!Array.isArray(t))return t;let e=sw.get(t);return e||sw.set(t,e=u$(t)),e}const _v=Ve.define(),Cu=Ve.define();class NX{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=dn(e,n),i=br(r);this.chars.push(r);let s=e.slice(n,n+i),o=s.toUpperCase();this.folded.push(dn(o==s?s.toLowerCase():o,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,!0}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return!1;let{chars:n,folded:r,any:i,precise:s,byWord:o}=this;if(n.length==1){let S=dn(e,0),y=br(S),b=y==e.length?0:-100;if(S!=n[0])if(S==r[0])b+=-200;else return!1;return this.ret(b,[0,y])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=n.length,u=0;if(l<0){for(let S=0,y=Math.min(e.length,200);S<y&&u<a;){let b=dn(e,S);(b==n[u]||b==r[u])&&(i[u++]=S),S+=br(b)}if(u<a)return!1}let c=0,f=0,h=!1,p=0,d=-1,g=-1,O=/[a-z]/.test(e),m=!0;for(let S=0,y=Math.min(e.length,200),b=0;S<y&&f<a;){let C=dn(e,S);l<0&&(c<a&&C==n[c]&&(s[c++]=S),p<a&&(C==n[p]||C==r[p]?(p==0&&(d=S),g=S+1,p++):p=0));let Q,_=C<255?C>=48&&C<=57||C>=97&&C<=122?2:C>=65&&C<=90?1:0:(Q=tv(C))!=Q.toLowerCase()?1:Q!=Q.toUpperCase()?2:0;(!S||_==1&&O||b==0&&_!=0)&&(n[f]==C||r[f]==C&&(h=!0)?o[f++]=S:o.length&&(m=!1)),b=_,S+=br(C)}return f==a&&o[0]==0&&m?this.result(-100+(h?-200:0),o,e):p==a&&d==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):p==a?this.ret(-200+-700-e.length,[d,g]):f==a?this.result(-100+(h?-200:0)+-700+(m?0:-1100),o,e):n.length==2?!1:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],s=0;for(let o of n){let l=o+(this.astral?br(dn(r,o)):1);s&&i[s-1]==o?i[s-1]=l:(i[s++]=o,i[s++]=l)}return this.ret(e-r.length,i)}}const Un=Oe.define({combine(t){return wi(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:LX,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>ow(e(r),n(r)),optionClass:(e,n)=>r=>ow(e(r),n(r)),addToOptions:(e,n)=>e.concat(n)})}});function ow(t,e){return t?e?t+" "+e:t:e}function LX(t,e,n,r,i){let s=t.textDirection==Mt.RTL,o=s,l=!1,a="top",u,c,f=e.left-i.left,h=i.right-e.right,p=r.right-r.left,d=r.bottom-r.top;if(o&&f<Math.min(p,h)?o=!1:!o&&h<Math.min(p,f)&&(o=!0),p<=(o?f:h))u=Math.max(i.top,Math.min(n.top,i.bottom-d))-e.top,c=Math.min(400,o?f:h);else{l=!0,c=Math.min(400,(s?e.right:i.right-e.left)-30);let g=i.bottom-e.bottom;g>=d||g>e.top?u=n.bottom-e.top:(a="bottom",u=e.bottom-n.top)}return{style:`${a}: ${u}px; max-width: ${c}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":o?"left":"right")}}function XX(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i){let s=document.createElement("span");s.className="cm-completionLabel";let o=n.displayLabel||n.label,l=0;for(let a=0;a<i.length;){let u=i[a++],c=i[a++];u>l&&s.appendChild(document.createTextNode(o.slice(l,u)));let f=s.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(o.slice(u,c))),f.className="cm-completionMatchedText",l=c}return l<o.length&&s.appendChild(document.createTextNode(o.slice(l))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function lw(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class VX{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:s,selected:o}=i.open,l=e.state.facet(Un);this.optionContent=XX(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=lw(s.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{for(let u=a.target,c;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(c=/-(\d+)$/.exec(u.id))&&+c[1]<s.length){this.applyCompletion(e,s[+c[1]]),a.preventDefault();return}}),this.dom.addEventListener("focusout",a=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Un).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Cu.of(null)})}),this.list=this.dom.appendChild(this.createListBox(s,i.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(e){var n,r,i;let s=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),s!=o&&(this.updateSel(),((n=s.open)===null||n===void 0?void 0:n.disabled)!=((r=o.open)===null||r===void 0?void 0:r.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((i=s.open)===null||i===void 0)&&i.disabled)))}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=lw(n.options.length,n.selected,this.view.state.facet(Un).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let s=typeof i=="string"?document.createTextNode(i):i(r);if(!s)return;"then"in s?s.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,r)}).catch(o=>ar(this.view.state,o,"completion info")):this.addInfoPane(s,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",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 n=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"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&jX(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return i.top>Math.min(s.bottom,n.bottom)-10||i.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(Un).positionInfo(this.view,n,i,r,s)}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,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let s=null;for(let o=r.from;o<r.to;o++){let{completion:l,match:a}=e[o],{section:u}=l;if(u){let h=typeof u=="string"?u:u.name;if(h!=s&&(o>r.from||r.from==0))if(s=h,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let p=i.appendChild(document.createElement("completion-section"));p.textContent=h}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let h of this.optionContent){let p=h(l,this.view.state,a);p&&c.appendChild(p)}}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 ZX(t,e){return n=>new VX(n,t,e)}function jX(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.top<n.top?t.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(t.scrollTop+=r.bottom-n.bottom)}function aw(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function BX(t,e){let n=[],r=null,i=a=>{n.push(a);let{section:u}=a.completion;if(u){r||(r=[]);let c=typeof u=="string"?u:u.name;r.some(f=>f.name==c)||r.push(typeof u=="string"?{name:c}:u)}};for(let a of t)if(a.hasResult()){let u=a.result.getMatch;if(a.result.filter===!1)for(let c of a.result.options)i(new iw(c,a.source,u?u(c):[],1e9-n.length));else{let c=new NX(e.sliceDoc(a.from,a.to));for(let f of a.result.options)if(c.match(f.label)){let h=f.displayLabel?u?u(f,c.matched):[]:c.matched;i(new iw(f,a.source,h,c.score+(f.boost||0)))}}}if(r){let a=Object.create(null),u=0,c=(f,h)=>{var p,d;return((p=f.rank)!==null&&p!==void 0?p:1e9)-((d=h.rank)!==null&&d!==void 0?d:1e9)||(f.name<h.name?-1:1)};for(let f of r.sort(c))u-=1e5,a[f.name]=u;for(let f of n){let{section:h}=f.completion;h&&(f.score+=a[typeof h=="string"?h:h.name])}}let s=[],o=null,l=e.facet(Un).compareCompletions;for(let a of n.sort((u,c)=>c.score-u.score||l(u.completion,c.completion))){let u=a.completion;!o||o.label!=u.label||o.detail!=u.detail||o.type!=null&&u.type!=null&&o.type!=u.type||o.apply!=u.apply||o.boost!=u.boost?s.push(a):aw(a.completion)>aw(o)&&(s[s.length-1]=a),o=a.completion}return s}class Jo{constructor(e,n,r,i,s,o){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Jo(this.options,uw(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,s){let o=BX(e,n);if(!o.length)return i&&e.some(a=>a.state==1)?new Jo(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let l=n.facet(Un).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let a=i.options[i.selected].completion;for(let u=0;u<o.length;u++)if(o[u].completion==a){l=u;break}}return new Jo(o,uw(r,l),{pos:e.reduce((a,u)=>u.hasResult()?Math.min(a,u.from):a,1e8),create:ZX(rr,p$),above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new Jo(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Zh{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Zh(WX,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Un),s=(r.override||n.languageDataAt("autocomplete",Cs(n)).map(IX)).map(l=>(this.active.find(u=>u.source==l)||new jn(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((l,a)=>l==this.active[a])&&(s=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!FX(s,this.active)?o=Jo.build(s,n,this.id,o,r):o&&o.disabled&&!s.some(l=>l.state==1)&&(o=null),!o&&s.every(l=>l.state!=1)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new jn(l.source,0):l));for(let l of e.effects)l.is(d$)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new Zh(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:UX}}function FX(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult;)n++;for(;r<e.length&&!e[r].hasResult;)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}const UX={"aria-autocomplete":"list"};function uw(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const WX=[];function $O(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class jn{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=$O(e),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&i.state!=0&&(i=new jn(i.source,0));for(let s of e.effects)if(s.is(_v))i=new jn(i.source,1,s.value?Cs(e.state):-1);else if(s.is(Cu))i=new jn(i.source,0);else if(s.is(h$))for(let o of s.value)o.source==i.source&&(i=o);return i}handleUserEvent(e,n,r){return n=="delete"||!r.activateOnTyping?this.map(e.changes):new jn(this.source,1)}handleChange(e){return e.changes.touchesRange(Cs(e.startState))?new jn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new jn(this.source,this.state,e.mapPos(this.explicitPos))}}class hl extends jn{constructor(e,n,r,i,s){super(e,2,n),this.result=r,this.from=i,this.to=s}hasResult(){return!0}handleUserEvent(e,n,r){var i;let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Cs(e.state);if((this.explicitPos<0?l<=s:l<this.from)||l>o||n=="delete"&&Cs(e.startState)==this.from)return new jn(this.source,n=="input"&&r.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return zX(this.result.validFor,e.state,s,o)?new hl(this.source,a,this.result,s,o):this.result.update&&(u=this.result.update(this.result,s,o,new $v(e.state,l,a>=0)))?new hl(this.source,a,u,u.from,(i=u.to)!==null&&i!==void 0?i:Cs(e.state)):new jn(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new jn(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new hl(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function zX(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):c$(t,!0).test(i)}const h$=Ve.define({map(t,e){return t.map(n=>n.map(e))}}),d$=Ve.define(),rr=ln.define({create(){return Zh.start()},update(t,e){return t.update(e)},provide:t=>[fv.from(t,e=>e.tooltip),me.contentAttributes.from(t,e=>e.attrs)]});function p$(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(rr).active.find(i=>i.source==e.source);return r instanceof hl?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},MX(t.state,n,r.from,r.to)),{annotations:f$.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}function lf(t,e="option"){return n=>{let r=n.state.field(rr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Un).interactionDelay)return!1;let i=1,s;e=="page"&&(s=WQ(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),n.dispatch({effects:d$.of(l)}),!0}}const YX=t=>{let e=t.state.field(rr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Un).interactionDelay?!1:p$(t,e.open.options[e.open.selected])},qX=t=>t.state.field(rr,!1)?(t.dispatch({effects:_v.of(!0)}),!0):!1,GX=t=>{let e=t.state.field(rr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Cu.of(null)}),!0)};class HX{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const cw=50,KX=50,JX=1e3,e4=jt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(rr).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(rr);if(!t.selectionSet&&!t.docChanged&&t.startState.field(rr)==e)return;let n=t.transactions.some(r=>(r.selection||r.docChanged)&&!$O(r));for(let r=0;r<this.running.length;r++){let i=this.running[r];if(n||i.updates.length+t.transactions.length>KX&&Date.now()-i.time>JX){for(let s of i.context.abortListeners)try{s()}catch(o){ar(this.view.state,o)}i.context.abortListeners=null,this.running.splice(r--,1)}else i.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(i=>i.active.source==r.source))?setTimeout(()=>this.startUpdate(),cw):-1,this.composing!=0)for(let r of t.transactions)$O(r)=="input"?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(rr);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=Cs(e),r=new $v(e,n,t.explicitPos==n),i=new HX(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Cu.of(null)}),ar(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),cw))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Un);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let o=new hl(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:Cs(i.updates.length?i.updates[0].startState:this.view.state));for(let l of i.updates)o=o.update(l,n);if(o.hasResult()){e.push(o);continue}}let s=this.view.state.field(rr).active.find(o=>o.source==i.active.source);if(s&&s.state==1)if(i.done==null){let o=new jn(i.active.source,0);for(let l of i.updates)o=o.update(l,n);o.state!=1&&e.push(o)}else this.startQuery(s)}e.length&&this.view.dispatch({effects:h$.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(rr,!1);if(e&&e.tooltip&&this.view.state.facet(Un).closeOnBlur){let n=e.open&&WQ(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:Cu.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:_v.of(!1)}),20),this.composing=0}}}),g$=me.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"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".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 t4{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class Tv{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,gn.TrackDel),r=e.mapPos(this.to,1,gn.TrackDel);return n==null||r==null?null:new Tv(this.field,n,r)}}class Rv{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let a of this.lines){if(r.length){let u=o,c=/^\t*/.exec(a)[0].length;for(let f=0;f<c;f++)u+=e.facet(Qd);i.push(n+u.length-c),a=u+a.slice(c)}r.push(a),n+=a.length+1}let l=this.fieldPositions.map(a=>new Tv(a.field,i[a.line]+a.from,i[a.line]+a.to));return{text:r,ranges:l}}static parse(e){let n=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let l=s[1]?+s[1]:null,a=s[2]||s[3]||"",u=-1;for(let c=0;c<n.length;c++)(l!=null?n[c].seq==l:a&&n[c].name==a)&&(u=c);if(u<0){let c=0;for(;c<n.length&&(l==null||n[c].seq!=null&&n[c].seq<l);)c++;n.splice(c,0,{seq:l,name:a}),u=c;for(let f of i)f.field>=u&&f.field++}i.push(new t4(u,r.length,s.index,s.index+a.length)),o=o.slice(0,s.index)+a+o.slice(s.index+s[0].length)}for(let l;l=/\\([{}])/.exec(o);){o=o.slice(0,l.index)+l[1]+o.slice(l.index+l[0].length);for(let a of i)a.line==r.length&&a.from>l.index&&(a.from--,a.to--)}r.push(o)}return new Rv(r,i)}}let n4=Pe.widget({widget:new class extends ki{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),r4=Pe.mark({class:"cm-snippetField"});class Fl{constructor(e,n){this.ranges=e,this.active=n,this.deco=Pe.set(e.map(r=>(r.from==r.to?n4:r4).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Fl(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Hu=Ve.define({map(t,e){return t&&t.map(e)}}),i4=Ve.define(),Qu=ln.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Hu))return n.value;if(n.is(i4)&&t)return new Fl(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>me.decorations.from(t,e=>e?e.deco:Pe.none)});function Av(t,e){return Z.create(t.filter(n=>n.field==e).map(n=>Z.range(n.from,n.to)))}function s4(t){let e=Rv.parse(t);return(n,r,i,s)=>{let{text:o,ranges:l}=e.instantiate(n.state,i),a={changes:{from:i,to:s,insert:et.of(o)},scrollIntoView:!0,annotations:r?f$.of(r):void 0};if(l.length&&(a.selection=Av(l,0)),l.length>1){let u=new Fl(l,0),c=a.effects=[Hu.of(u)];n.state.field(Qu,!1)===void 0&&c.push(Ve.appendConfig.of([Qu,c4,f4,g$]))}n.dispatch(n.state.update(a))}}function m$(t){return({state:e,dispatch:n})=>{let r=e.field(Qu,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:Av(r.ranges,i),effects:Hu.of(s?null:new Fl(r.ranges,i))})),!0}}const o4=({state:t,dispatch:e})=>t.field(Qu,!1)?(e(t.update({effects:Hu.of(null)})),!0):!1,l4=m$(1),a4=m$(-1),u4=[{key:"Tab",run:l4,shift:a4},{key:"Escape",run:o4}],fw=Oe.define({combine(t){return t.length?t[0]:u4}}),c4=Ls.highest(Fu.compute([fw],t=>t.facet(fw)));function Ir(t,e){return Object.assign(Object.assign({},e),{apply:s4(t)})}const f4=me.domEventHandlers({mousedown(t,e){let n=e.state.field(Qu,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:Av(n.ranges,i.field),effects:Hu.of(n.ranges.some(s=>s.field>i.field)?new Fl(n.ranges,i.field):null)}),!0)}}),Eu={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},to=Ve.define({map(t,e){let n=e.mapPos(t,-1,gn.TrackAfter);return n??void 0}}),Dv=new class extends po{};Dv.startSide=1;Dv.endSide=-1;const O$=ln.define({create(){return st.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,r=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(r,-1)&&(t=st.empty)}t=t.map(e.changes);for(let n of e.effects)n.is(to)&&(t=t.update({add:[Dv.range(n.value,n.value+1)]}));return t}});function h4(){return[p4,O$]}const dg="()[]{}<>";function v$(t){for(let e=0;e<dg.length;e+=2)if(dg.charCodeAt(e)==t)return dg.charAt(e+1);return tv(t<128?t:t+1)}function y$(t,e){return t.languageDataAt("closeBrackets",e)[0]||Eu}const d4=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),p4=me.inputHandler.of((t,e,n,r)=>{if((d4?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&br(dn(r,0))==1||e!=i.from||n!=i.to)return!1;let s=O4(t.state,r);return s?(t.dispatch(s),!0):!1}),g4=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=y$(t,t.selection.main.head).brackets||Eu.brackets,i=null,s=t.changeByRange(o=>{if(o.empty){let l=v4(t.doc,o.head);for(let a of r)if(a==l&&Md(t.doc,o.head)==v$(dn(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:Z.cursor(o.head-a.length)}}return{range:i=o}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},m4=[{key:"Backspace",run:g4}];function O4(t,e){let n=y$(t,t.selection.main.head),r=n.brackets||Eu.brackets;for(let i of r){let s=v$(dn(i,0));if(e==i)return s==i?b4(t,i,r.indexOf(i+i+i)>-1,n):y4(t,i,s,n.before||Eu.before);if(e==s&&S$(t,t.selection.main.from))return S4(t,i,s)}return null}function S$(t,e){let n=!1;return t.field(O$).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function Md(t,e){let n=t.sliceString(e,e+2);return n.slice(0,br(dn(n,0)))}function v4(t,e){let n=t.sliceString(e-2,e);return br(dn(n,0))==n.length?n:n.slice(1)}function y4(t,e,n,r){let i=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:to.of(o.to+e.length),range:Z.range(o.anchor+e.length,o.head+e.length)};let l=Md(t.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:o.head},effects:to.of(o.head+e.length),range:Z.cursor(o.head+e.length)}:{range:i=o}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function S4(t,e,n){let r=null,i=t.changeByRange(s=>s.empty&&Md(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:Z.cursor(s.head+n.length)}:r={range:s});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function b4(t,e,n,r){let i=r.stringPrefixes||Eu.stringPrefixes,s=null,o=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:to.of(l.to+e.length),range:Z.range(l.anchor+e.length,l.head+e.length)};let a=l.head,u=Md(t.doc,a),c;if(u==e){if(hw(t,a))return{changes:{insert:e+e,from:a},effects:to.of(a+e.length),range:Z.cursor(a+e.length)};if(S$(t,a)){let h=n&&t.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+h.length,insert:h},range:Z.cursor(a+h.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(c=dw(t,a-2*e.length,i))>-1&&hw(t,c))return{changes:{insert:e+e+e+e,from:a},effects:to.of(a+e.length),range:Z.cursor(a+e.length)};if(t.charCategorizer(a)(u)!=$t.Word&&dw(t,a,i)>-1&&!w4(t,a,e,i))return{changes:{insert:e+e,from:a},effects:to.of(a+e.length),range:Z.cursor(a+e.length)}}return{range:s=l}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function hw(t,e){let n=vt(t).resolveInner(e+1);return n.parent&&n.from==e}function w4(t,e,n,r){let i=vt(t).resolveInner(e,-1),s=r.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),a=l.indexOf(n);if(!a||a>-1&&r.indexOf(l.slice(0,a))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>n.length+a;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function dw(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=$t.Word)return e;for(let i of n){let s=e-i.length;if(t.sliceDoc(s,e)==i&&r(t.sliceDoc(s-1,s))!=$t.Word)return s}return-1}function k4(t={}){return[rr,Un.of(t),e4,x4,g$]}const b$=[{key:"Ctrl-Space",run:qX},{key:"Escape",run:GX},{key:"ArrowDown",run:lf(!0)},{key:"ArrowUp",run:lf(!1)},{key:"PageDown",run:lf(!0,"page")},{key:"PageUp",run:lf(!1,"page")},{key:"Enter",run:YX}],x4=Ls.highest(Fu.computeN([Un],t=>t.facet(Un).defaultKeymap?[b$]:[]));class P4{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Ys{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,s=r.facet(el).markerFilter;s&&(i=s(i));let o=Pe.set(i.map(l=>l.from==l.to||l.from==l.to-1&&r.doc.lineAt(l.from).to==l.from?Pe.widget({widget:new M4(l),diagnostic:l}).range(l.from):Pe.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity},diagnostic:l}).range(l.from,l.to)),!0);return new Ys(o,n,_l(o))}}function _l(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,s,{spec:o})=>{if(!(e&&o.diagnostic!=e))return r=new P4(i,s,o.diagnostic),!1}),r}function C4(t,e){return!!(t.effects.some(n=>n.is(Mv))||t.changes.touchesRange(e.pos))}function w$(t,e){return t.field(or,!1)?e:e.concat(Ve.appendConfig.of([or,me.decorations.compute([or],n=>{let{selected:r,panel:i}=n.field(or);return!r||!i||r.from==r.to?Pe.none:Pe.set([E4.range(r.from,r.to)])}),B5($4,{hideOn:C4}),N4]))}function Q4(t,e){return{effects:w$(t,[Mv.of(e)])}}const Mv=Ve.define(),Iv=Ve.define(),k$=Ve.define(),or=ln.define({create(){return new Ys(Pe.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),r=null;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=_l(n,t.selected.diagnostic,i)||_l(n,null,i)}t=new Ys(n,t.panel,r)}for(let n of e.effects)n.is(Mv)?t=Ys.init(n.value,t.panel,e.state):n.is(Iv)?t=new Ys(t.diagnostics,n.value?Id.open:null,t.selected):n.is(k$)&&(t=new Ys(t.diagnostics,t.panel,n.value));return t},provide:t=>[Su.from(t,e=>e.panel),me.decorations.from(t,e=>e.diagnostics)]}),E4=Pe.mark({class:"cm-lintRange cm-lintRange-active"});function $4(t,e,n){let{diagnostics:r}=t.state.field(or),i=[],s=2e8,o=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(a,u,{spec:c})=>{e>=a&&e<=u&&(a==u||(e>a||n>0)&&(e<u||n<0))&&(i.push(c.diagnostic),s=Math.min(a,s),o=Math.max(u,o))});let l=t.state.facet(el).tooltipFilter;return l&&(i=l(i)),i.length?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create(){return{dom:_4(t,i)}}}:null}function _4(t,e){return mt("ul",{class:"cm-tooltip-lint"},e.map(n=>P$(t,n,!1)))}const T4=t=>{let e=t.state.field(or,!1);(!e||!e.panel)&&t.dispatch({effects:w$(t.state,[Iv.of(!0)])});let n=yu(t,Id.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},pw=t=>{let e=t.state.field(or,!1);return!e||!e.panel?!1:(t.dispatch({effects:Iv.of(!1)}),!0)},R4=t=>{let e=t.state.field(or,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},A4=[{key:"Mod-Shift-m",run:T4,preventDefault:!0},{key:"F8",run:R4}],D4=jt.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(el);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let t=Date.now();if(t<this.lintTime-10)setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:n}=e.facet(el);Promise.all(n.map(r=>Promise.resolve(r(this.view)))).then(r=>{let i=r.reduce((s,o)=>s.concat(o));this.view.state.doc==e.doc&&this.view.dispatch(Q4(this.view.state,i))},r=>{ar(this.view.state,r)})}}update(t){let e=t.state.facet(el);(t.docChanged||e!=t.startState.facet(el)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),el=Oe.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},wi(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))},enables:D4});function x$(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function P$(t,e,n){var r;let i=n?x$(e.actions):[];return mt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},mt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,o)=>{let l=!1,a=h=>{if(h.preventDefault(),l)return;l=!0;let p=_l(t.state.field(or).diagnostics,e);p&&s.apply(t,p.from,p.to)},{name:u}=s,c=i[o]?u.indexOf(i[o]):-1,f=c<0?u:[u.slice(0,c),mt("u",u.slice(c,c+1)),u.slice(c+1)];return mt("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[o]})"`}.`},f)}),e.source&&mt("div",{class:"cm-diagnosticSource"},e.source))}class M4 extends ki{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return mt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class gw{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=P$(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Id{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)pw(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],o=x$(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==i.keyCode){let a=_l(this.view.state.field(or).diagnostics,s);a&&s.actions[l].apply(e,a.from,a.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=mt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=mt("div",{class:"cm-panel-lint"},this.list,mt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>pw(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(or).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(or),r=0,i=!1,s=null;for(e.between(0,this.view.state.doc.length,(o,l,{spec:a})=>{let u=-1,c;for(let f=r;f<this.items.length;f++)if(this.items[f].diagnostic==a.diagnostic){u=f;break}u<0?(c=new gw(this.view,a.diagnostic),this.items.splice(r,0,c),i=!0):(c=this.items[u],u>r&&(this.items.splice(r,u-r),i=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),s=c):c.dom.hasAttribute("aria-selected")&&c.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 gw(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:l})=>{o.top<l.top?this.list.scrollTop-=l.top-o.top:o.bottom>l.bottom&&(this.list.scrollTop+=o.bottom-l.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(or),r=_l(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:k$.of(r)})}static open(e){return new Id(e)}}function I4(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function pg(t){return I4(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const N4=me.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-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:pg("#d11")},".cm-lintRange-warning":{backgroundImage:pg("orange")},".cm-lintRange-info":{backgroundImage:pg("#999")},".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-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}}}),L4=(()=>[K5(),tN(),b5(),s3(),UN(),c5(),g5(),qe.allowMultipleSelections.of(!0),DN(),bv(qN,{fallback:!0}),nL(),h4(),k4(),A5(),I5(),Q5(),cX(),Fu.of([...m4,...sX,...$X,...p3,...jN,...b$,...A4])])();class jh{constructor(e,n,r,i,s,o,l,a,u,c=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=u,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new jh(e,[],n,r,r,0,[],0,i?new mw(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:s}=this.p,o=s.dynamicPrecedence(i);if(o&&(this.score+=o),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),a=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-a;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let c=l?this.stack[l-1]:0,f=this.bufferBase+this.buffer.length-c;if(i<s.minRepeatTerm||e&131072){let h=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,h,f+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=s.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,a)}storeNode(e,n,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(n==r)return;if(o.buffer[l-2]>=n){o.buffer[l-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4);this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r){let i=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let s=e,{parser:o}=this.p;(r>this.pos||n<=o.maxNode)&&(this.pos=r,o.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,r,4)}}apply(e,n,r){e&65536?this.reduce(e):this.shift(e,n,r)}useNode(e,n){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(n,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,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new jh(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new X4(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((l,a)=>a&1&&l==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.score-=200,r.push(o)}return r}forceReduce(){let e=this.p.parser.stateSlot(this.state,5);if(!(e&65536))return!1;let{parser:n}=this.p;if(!n.validAction(this.state,e)){let r=e>>19,i=e&65535,s=this.stack.length-r*3;if(s<0||n.getGoto(this.stack[s],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!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.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 n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.reducePos,this.reducePos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.reducePos,this.reducePos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new mw(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class mw{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}var Ow;(function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth",t[t.MinBigReduction=2e3]="MinBigReduction"})(Ow||(Ow={}));class X4{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=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],n,!0);this.state=i}}class Bh{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Bh(e,n,n-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 Bh(this.stack,this.pos,this.index)}}function _a(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.charCodeAt(r++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}n?n[i++]=s:n=new e(s)}return n}class Vf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const vw=new Vf;class V4{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=vw,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;n<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);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 o=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-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}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>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,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=vw,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,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class dl{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;C$(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}dl.prototype.contextual=dl.prototype.fallback=dl.prototype.extend=!1;class Fh{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?_a(e):e}token(e,n){let r=e.pos,i;for(;i=e.pos,C$(this.data,e,n,0,this.data,this.precTable),!(e.token.value>-1);){if(this.elseToken==null)return;if(e.next<0)break;e.advance(),e.reset(i+1,e.token)}i>r&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i-r))}}Fh.prototype.contextual=dl.prototype.fallback=dl.prototype.extend=!1;class Pi{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function C$(t,e,n,r,i,s){let o=0,l=1<<r,{dialect:a}=n.p.parser;e:for(;l&t[o];){let u=t[o+1];for(let p=o+3;p<u;p+=2)if((t[p+1]&l)>0){let d=t[p];if(a.allows(d)&&(e.token.value==-1||e.token.value==d||Z4(d,e.token.value,i,s))){e.acceptToken(d);break}}let c=e.next,f=0,h=t[o+2];if(e.next<0&&h>f&&t[u+h*3-3]==65535&&t[u+h*3-3]==65535){o=t[u+h*3-1];continue e}for(;f<h;){let p=f+h>>1,d=u+p+(p<<1),g=t[d],O=t[d+1]||65536;if(c<g)h=p;else if(c>=O)f=p+1;else{o=t[d+2],e.advance();continue e}}break}}function yw(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Z4(t,e,n,r){let i=yw(n,r,e);return i<0||yw(n,r,t)<i}const Nr=typeof process<"u"&&process.env&&/\bparse\b/.test({}.LOG);let gg=null;var Sw;(function(t){t[t.Margin=25]="Margin"})(Sw||(Sw={}));function bw(t,e,n){let r=t.cursor(wt.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}let j4=class{constructor(e,n){this.fragments=e,this.nodeSet=n,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?bw(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?bw(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 n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof ot){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let a=s.prop(Ie.lookAhead);if(!a||l+a<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}};class B4{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Vf)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let u=0;u<s.length;u++){if(!(1<<u&o))continue;let c=s[u],f=this.tokens[u];if(!(r&&!c.fallback)&&((c.contextual||f.start!=e.pos||f.mask!=o||f.context!=l)&&(this.updateCachedToken(f,c,e),f.mask=o,f.context=l),f.lookAhead>f.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let h=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!c.extend&&(r=f,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return a&&e.setLookAhead(a),!r&&e.pos==this.stream.end&&(r=new Vf,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Vf,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),r);if(l>=0&&r.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,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++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let a=0;a<2;a++)for(let u=o.stateSlot(s,a?2:1);;u+=3){if(l[u]==65535)if(l[u+1]==1)u=Ai(l,u+2);else{i==0&&l[u+1]==2&&(i=this.putAction(Ai(l,u+2),n,r,i));break}l[u]==n&&(i=this.putAction(Ai(l,u+1),n,r,i))}return i}}var ww;(function(t){t[t.Distance=5]="Distance",t[t.MaxRemainingPerStep=3]="MaxRemainingPerStep",t[t.MinBufferLengthPrune=500]="MinBufferLengthPrune",t[t.ForceReduceLimit=10]="ForceReduceLimit",t[t.CutDepth=15e3]="CutDepth",t[t.CutTo=9e3]="CutTo",t[t.MaxLeftAssociativeReductionCount=300]="MaxLeftAssociativeReductionCount",t[t.MaxStackCount=12]="MaxStackCount"})(ww||(ww={}));class F4{constructor(e,n,r,i){this.parser=e,this.input=n,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 V4(n,i),this.tokens=new B4(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[jh.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new j4(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>n)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],s=[]),i.push(l);let a=this.tokens.getMainToken(l);s.push(a.value,a.end)}}break}}if(!r.length){let o=i&&W4(i);if(o)return this.stackToTree(o);if(this.parser.strict)throw Nr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((l,a)=>a.score-l.score);r.length>o;)r.pop();r.some(l=>l.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let l=r[o];for(let a=o+1;a<r.length;a++){let u=r[a];if(l.sameState(u)||l.buffer.length>500&&u.buffer.length>500)if((l.score-u.score||l.buffer.length-u.buffer.length)>0)r.splice(a--,1);else{r.splice(o--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].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,n,r){let i=e.pos,{parser:s}=this,o=Nr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(h>-1&&f.length&&(!u||(f.prop(Ie.contextHash)||0)==c))return e.useNode(f,h),Nr&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof ot)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof ot&&f.positions[0]==0)f=p;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Nr&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let u=0;u<a.length;){let c=a[u++],f=a[u++],h=a[u++],p=u==a.length||!r,d=p?e:e.split();if(d.apply(c,f,h),Nr&&console.log(o+this.stackID(d)+` (via ${c&65536?`reduce of ${s.getName(c&65535)}`:"shift"} for ${s.getName(f)} @ ${i}${d==e?"":", split"})`),p)return!0;d.pos>i?n.push(d):r.push(d)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return kw(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],a=n[o<<1],u=n[(o<<1)+1],c=Nr?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Nr&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let f=l.split(),h=c;for(let p=0;f.forceReduce()&&p<10&&(Nr&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));p++)Nr&&(h=this.stackID(f)+" -> ");for(let p of l.recoverByInsert(a))Nr&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,r);this.stream.end>l.pos?(u==l.pos&&(u++,a=0),l.recoverByDelete(a,u),Nr&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),kw(l,r)):(!i||i.score<l.score)&&(i=l)}return i}stackToTree(e){return e.close(),ot.build({buffer:Bh.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 n=(gg||(gg=new WeakMap)).get(e);return n||gg.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function kw(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class U4{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const mg=t=>t;class Q${constructor(e){this.start=e.start,this.shift=e.shift||mg,this.reduce=e.reduce||mg,this.reuse=e.reuse||mg,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Tl extends mv{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<e.repeatNodeCount;l++)n.push("");let r=Object.keys(e.topRules).map(l=>e.topRules[l][1]),i=[];for(let l=0;l<n.length;l++)i.push([]);function s(l,a,u){i[l].push([a,a.deserialize(String(u))])}if(e.nodeProps)for(let l of e.nodeProps){let a=l[0];typeof a=="string"&&(a=Ie[a]);for(let u=1;u<l.length;){let c=l[u++];if(c>=0)s(c,a,l[u++]);else{let f=l[u+-c];for(let h=-c;h>0;h--)s(l[u++],a,f);u++}}}this.nodeSet=new Wu(n.map((l,a)=>tn.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:i[a],top:r.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=HQ;let o=_a(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(xw),this.states=_a(e.states,Uint32Array),this.data=_a(e.stateData),this.goto=_a(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new dl(o,l):l),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,n,r){let i=new F4(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+1];;){let o=i[s++],l=o&1,a=i[s++];if(l&&r)return a;for(let u=s+(o>>1);s<u;s++)if(i[s]==e)return a;if(l)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Ai(r,s+2)];else{if(r[s+1]==2)return Ai(r,s+2);break}if(o==n||o==0)return Ai(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){if(n==this.stateSlot(e,4))return!0;for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ai(this.data,r+2);else return!1;if(n==Ai(this.data,r+1))return!0}}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ai(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Tl.prototype),this);if(e.props&&(n.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}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(l=>l.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return n.specializers[i]=xw(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}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 n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],l;(l=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new U4(e,r,i)}static deserialize(e){return new Tl(e)}}function Ai(t,e){return t[e]|t[e+1]<<16}function W4(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function xw(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const Pw=302,Cw=1,z4=2,Qw=303,Y4=305,q4=306,G4=3,H4=4,K4=[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],E$=125,J4=59,Ew=47,eV=42,tV=43,nV=45,rV=new Q$({start:!1,shift(t,e){return e==G4||e==H4||e==Y4?t:e==q4},strict:!1}),iV=new Pi((t,e)=>{let{next:n}=t;(n==E$||n==-1||e.context)&&e.canShift(Qw)&&t.acceptToken(Qw)},{contextual:!0,fallback:!0}),sV=new Pi((t,e)=>{let{next:n}=t,r;K4.indexOf(n)>-1||n==Ew&&((r=t.peek(1))==Ew||r==eV)||n!=E$&&n!=J4&&n!=-1&&!e.context&&e.canShift(Pw)&&t.acceptToken(Pw)},{contextual:!0}),oV=new Pi((t,e)=>{let{next:n}=t;if((n==tV||n==nV)&&(t.advance(),n==t.next)){t.advance();let r=!e.context&&e.canShift(Cw);t.acceptToken(r?Cw:z4)}},{contextual:!0}),lV=Vl({"get set async static":v.modifier,"for while do if else switch try catch finally return throw break continue default case":v.controlKeyword,"in of await yield void typeof delete instanceof":v.operatorKeyword,"let var const function class extends":v.definitionKeyword,"import export from":v.moduleKeyword,"with debugger as new":v.keyword,TemplateString:v.special(v.string),super:v.atom,BooleanLiteral:v.bool,this:v.self,null:v.null,Star:v.modifier,VariableName:v.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":v.function(v.variableName),VariableDefinition:v.definition(v.variableName),Label:v.labelName,PropertyName:v.propertyName,PrivatePropertyName:v.special(v.propertyName),"CallExpression/MemberExpression/PropertyName":v.function(v.propertyName),"FunctionDeclaration/VariableDefinition":v.function(v.definition(v.variableName)),"ClassDeclaration/VariableDefinition":v.definition(v.className),PropertyDefinition:v.definition(v.propertyName),PrivatePropertyDefinition:v.definition(v.special(v.propertyName)),UpdateOp:v.updateOperator,LineComment:v.lineComment,BlockComment:v.blockComment,Number:v.number,String:v.string,Escape:v.escape,ArithOp:v.arithmeticOperator,LogicOp:v.logicOperator,BitOp:v.bitwiseOperator,CompareOp:v.compareOperator,RegExp:v.regexp,Equals:v.definitionOperator,Arrow:v.function(v.punctuation),": Spread":v.punctuation,"( )":v.paren,"[ ]":v.squareBracket,"{ }":v.brace,"InterpolationStart InterpolationEnd":v.special(v.brace),".":v.derefOperator,", ;":v.separator,"@":v.meta,TypeName:v.typeName,TypeDefinition:v.definition(v.typeName),"type enum interface implements namespace module declare":v.definitionKeyword,"abstract global Privacy readonly override":v.modifier,"is keyof unique infer":v.operatorKeyword,JSXAttributeValue:v.attributeValue,JSXText:v.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":v.angleBracket,"JSXIdentifier JSXNameSpacedName":v.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":v.attributeName,"JSXBuiltin/JSXIdentifier":v.standard(v.tagName)}),aV={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},uV={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},cV={__proto__:null,"<":137},fV=Tl.deserialize({version:14,states:"$EnO`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#I`'#I`O0}QSO'#GkOOQO'#Ei'#EiO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#J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r!X#b%^&e&g&h&j,`,e1j1mQ&_!TR,T&[V%{|},^R0y+tR,S&YQ%tzR+f%uR+[%oT&c!U&fT&d!U&fT1l,e1m",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList 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 : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression 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 in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration 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:363,context:rV,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[lV],skippedNodes:[0,3,4,269],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#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_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[sV,oV,2,3,4,5,6,7,8,9,10,11,12,13,iV,new Fh("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!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(T~~",141,326),new Fh("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:13525,ts:13527},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:t=>aV[t]||-1},{term:328,get:t=>uV[t]||-1},{term:67,get:t=>cV[t]||-1}],tokenPrec:13551}),hV=[Ir("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ir("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ir("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ir("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ir("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ir(`try {
51
- \${}
52
- } catch (\${error}) {
53
- \${}
54
- }`,{label:"try",detail:"/ catch block",type:"keyword"}),Ir("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ir(`if (\${}) {
55
- \${}
56
- } else {
57
- \${}
58
- }`,{label:"if",detail:"/ else block",type:"keyword"}),Ir(`class \${name} {
59
- constructor(\${params}) {
60
- \${}
61
- }
62
- }`,{label:"class",detail:"definition",type:"keyword"}),Ir('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ir('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],$w=new eE,$$=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ga(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const dV=["FunctionDeclaration"],pV={FunctionDeclaration:ga("function"),ClassDeclaration:ga("class"),ClassExpression:()=>!0,EnumDeclaration:ga("constant"),TypeAliasDeclaration:ga("type"),NamespaceDeclaration:ga("namespace"),VariableDefinition(t,e){t.matchContext(dV)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function _$(t,e){let n=$w.get(e);if(n)return n;let r=[],i=!0;function s(o,l){let a=t.sliceString(o.from,o.to);r.push({label:a,type:l})}return e.cursor(wt.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let l=pV[o.name];if(l&&l(o,s)||$$.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of _$(t,o.node))r.push(l);return!1}}),$w.set(e,r),r}const _w=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,T$=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function gV(t){let e=vt(t.state).resolveInner(t.pos,-1);if(T$.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&_w.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)$$.has(i.name)&&(r=r.concat(_$(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:_w}}const Xi=Ql.define({name:"javascript",parser:fV.configure({props:[zu.add({IfStatement:Lf({except:/^\s*({|else\b)/}),TryStatement:Lf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:RN,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:TN({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Lf({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Yu.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":aE,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),R$={test:t=>/^JSX/.test(t.name),facet:Ov({commentTokens:{block:{open:"{/*",close:"*/}"}}})},A$=Xi.configure({dialect:"ts"},"typescript"),D$=Xi.configure({dialect:"jsx",props:[vv.add(t=>t.isTop?[R$]:void 0)]}),M$=Xi.configure({dialect:"jsx ts",props:[vv.add(t=>t.isTop?[R$]:void 0)]},"typescript"),mV="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(t=>({label:t,type:"keyword"}));function I$(t={}){let e=t.jsx?t.typescript?M$:D$:t.typescript?A$:Xi;return new ku(e,[Xi.data.of({autocomplete:DX(T$,u$(hV.concat(mV)))}),Xi.data.of({autocomplete:gV}),t.jsx?SV:[]])}function OV(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Tw(t,e,n=t.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 t.sliceString(r.from,Math.min(r.to,n));return""}function vV(t){return t&&(t.name=="JSXEndTag"||t.name=="JSXSelfCloseEndTag")}const yV=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),SV=me.inputHandler.of((t,e,n,r)=>{if((yV?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Xi.isActiveAt(t.state,e,-1))return!1;let{state:i}=t,s=i.changeByRange(o=>{var l;let{head:a}=o,u=vt(i).resolveInner(a,-1),c;if(u.name=="JSXStartTag"&&(u=u.parent),!(u.name=="JSXAttributeValue"&&u.to>a)){if(r==">"&&u.name=="JSXFragmentTag")return{range:Z.cursor(a+1),changes:{from:a,insert:"></>"}};if(r=="/"&&u.name=="JSXFragmentTag"){let f=u.parent,h=f==null?void 0:f.parent;if(f.from==a-1&&((l=h.lastChild)===null||l===void 0?void 0:l.name)!="JSXEndTag"&&(c=Tw(i.doc,h==null?void 0:h.firstChild,a))){let p=`/${c}>`;return{range:Z.cursor(a+p.length),changes:{from:a,insert:p}}}}else if(r==">"){let f=OV(u);if(f&&!vV(f.lastChild)&&i.sliceDoc(a,a+2)!="</"&&(c=Tw(i.doc,f,a)))return{range:Z.cursor(a+1),changes:{from:a,insert:`></${c}>`}}}}return{range:o}});return s.changes.empty?!1:(t.dispatch(s,{userEvent:"input.type",scrollIntoView:!0}),!0)});class Uh{static create(e,n,r,i,s){let o=i+(i<<8)+e+(n<<4)|0;return new Uh(e,n,r,o,s,[],[])}constructor(e,n,r,i,s,o,l){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=l,this.hashProp=[[Ie.contextHash,i]]}addChild(e,n){e.prop(Ie.contextHash)!=this.hash&&(e=new ot(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new ot(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,s,o)=>new ot(tn.none,i,s,o,this.hashProp)})}}var ie;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.URL=33]="URL",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel"})(ie||(ie={}));class bV{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class wV{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 Wa(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,n=0,r=0){for(let i=n;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let n=0;for(let r=0;n<this.text.length&&r<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function Rw(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(t.type==ie.OrderedList?Xv:Lv)(n,e,!1);return r>0&&(t.type!=ie.BulletList||Nv(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const N$={[ie.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(it(ie.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Tr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[ie.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[ie.OrderedList]:Rw,[ie.BulletList]:Rw,[ie.Document](){return!0}};function Tr(t){return t==32||t==9||t==10||t==13}function Wa(t,e=0){for(;e<t.length&&Tr(t.charCodeAt(e));)e++;return e}function Aw(t,e,n){for(;e>n&&Tr(t.charCodeAt(e-1));)e--;return e}function L$(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function X$(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function Nv(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let r=1;for(let i=t.pos+1;i<t.text.length;i++){let s=t.text.charCodeAt(i);if(s==t.next)r++;else if(!Tr(s))return-1}return n&&t.next==45&&j$(t)>-1&&t.depth==e.stack.length||r<3?-1:1}function V$(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function Lv(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Tr(t.text.charCodeAt(t.pos+1)))&&(!n||V$(e,ie.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Xv(t,e,n){let r=t.pos,i=t.next;for(;i>=48&&i<=57;){r++;if(r==t.text.length)return-1;i=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||i!=46&&i!=41||r<t.text.length-1&&!Tr(t.text.charCodeAt(r+1))||n&&!V$(e,ie.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function Z$(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function j$(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&Tr(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const _O=/^[ \t]*$/,B$=/-->/,F$=/\?>/,TO=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,B$],[/^\s*<\?/,F$],[/^\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,_O],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,_O]];function U$(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,s=TO.length-(n?1:0);i<s;i++)if(TO[i][0].test(r))return i;return-1}function Dw(t,e){let n=t.countIndent(e,t.pos,t.indent),r=t.countIndent(t.skipSpace(e),e,n);return r>=n+5?n+1:r}function Bs(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==ie.CodeText?t[r].to=n:t.push(it(ie.CodeText,e,n))}const af={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let r=e.findColumn(n),i=t.lineStart+r,s=t.lineStart+e.text.length,o=[],l=[];for(Bs(o,i,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Bs(l,t.lineStart-1,t.lineStart);for(let a of e.markers)l.push(a)}else{if(e.indent<n)break;{if(l.length){for(let u of l)u.type==ie.CodeText?Bs(o,u.from,u.to):o.push(u);l=[]}Bs(o,t.lineStart-1,t.lineStart);for(let u of e.markers)o.push(u);s=t.lineStart+e.text.length;let a=t.lineStart+e.findColumn(e.baseIndent+4);a<s&&Bs(o,a,s)}}return l.length&&(l=l.filter(a=>a.type!=ie.CodeText),l.length&&(e.markers=l.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-i).finish(ie.CodeBlock,s-i),i),!0},FencedCode(t,e){let n=L$(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,s=n-e.pos,o=e.skipSpace(n),l=Aw(e.text,e.text.length,o),a=[it(ie.CodeMark,r,r+s)];o<l&&a.push(it(ie.CodeInfo,t.lineStart+o,t.lineStart+l));for(let u=!0;t.nextLine()&&e.depth>=t.stack.length;u=!1){let c=e.pos;if(e.indent-e.baseIndent<4)for(;c<e.text.length&&e.text.charCodeAt(c)==i;)c++;if(c-e.pos>=s&&e.skipSpace(c)==e.text.length){for(let f of e.markers)a.push(f);a.push(it(ie.CodeMark,t.lineStart+e.pos,t.lineStart+c)),t.nextLine();break}else{u||Bs(a,t.lineStart-1,t.lineStart);for(let p of e.markers)a.push(p);let f=t.lineStart+e.basePos,h=t.lineStart+e.text.length;f<h&&Bs(a,f,h)}}return t.addNode(t.buffer.writeElements(a,-r).finish(ie.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=X$(e);return n<0?!1:(t.startContext(ie.Blockquote,e.pos),t.addNode(ie.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(Nv(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(ie.HorizontalRule,n),!0},BulletList(t,e){let n=Lv(e,t,!1);if(n<0)return!1;t.block.type!=ie.BulletList&&t.startContext(ie.BulletList,e.basePos,e.next);let r=Dw(e,e.pos+1);return t.startContext(ie.ListItem,e.basePos,r-e.baseIndent),t.addNode(ie.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=Xv(e,t,!1);if(n<0)return!1;t.block.type!=ie.OrderedList&&t.startContext(ie.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=Dw(e,e.pos+n);return t.startContext(ie.ListItem,e.basePos,r-e.baseIndent),t.addNode(ie.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=Z$(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,s=Aw(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!Tr(e.text.charCodeAt(o-1)))&&(o=e.text.length);let l=t.buffer.write(ie.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,o),i+n+1),-i);o<e.text.length&&l.write(ie.HeaderMark,o-r,s-r);let a=l.finish(ie.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(a,i),!0},HTMLBlock(t,e){let n=U$(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=TO[n][1],s=[],o=i!=_O;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let u of e.markers)s.push(u)}o&&t.nextLine();let l=i==B$?ie.CommentBlock:i==F$?ie.ProcessingInstructionBlock:ie.HTMLBlock,a=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-r).finish(l,a-r),r),!0},SetextHeading:void 0};class kV{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,r){if(this.stage==-1)return!1;let i=r.content+`
63
- `+n.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,n){return(this.stage==2||this.stage==3)&&Wa(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,r){return e.addLeafElement(n,it(ie.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(e_(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(it(ie.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(K$(e,Wa(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=Wa(e,this.pos),r=0;if(n>this.pos){let i=J$(e,n,this.start);if(i){let s=Og(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=Og(e,this.pos)),r>0&&r<e.length?r:-1}else return Og(e,this.pos)}}}function Og(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!Tr(n))return-1}return e}class xV{nextLine(e,n,r){let i=n.depth<e.stack.length?-1:j$(n),s=n.next;if(i<0)return!1;let o=it(ie.HeaderMark,e.lineStart+n.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,it(s==61?ie.SetextHeading1:ie.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const PV={LinkReference(t,e){return e.content.charCodeAt(0)==91?new kV(e):null},SetextHeading(){return new xV}},CV=[(t,e)=>Z$(e)>=0,(t,e)=>L$(e)>=0,(t,e)=>X$(e)>=0,(t,e)=>Lv(e,t,!0)>=0,(t,e)=>Xv(e,t,!0)>=0,(t,e)=>Nv(e,t,!0)>=0,(t,e)=>U$(e,t,!0)>=0],QV={text:"",end:0};class EV{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.line=new wV,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=Uh.create(ie.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new RV(r,n):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(;e.depth<this.stack.length;)this.finishContext();for(let r of e.markers)this.addNode(r.type,r.from,r.to);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 n=new bV(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,n);i&&n.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,n))break e}for(let r of n.parsers)if(r.nextLine(this,e,n))return null;n.content+=`
64
- `+e.scrub();for(let r of e.markers)n.marks.push(r)}return this.finishLeaf(n),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 n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=t_(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)}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 n=QV;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<n.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);n.end=s+o.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+o,r=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(n);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 "+ie[i.type]);if(!s(i,this,e))break;e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),r;if(this.input.lineChunks)r=n==`
65
- `?"":n;else{let i=n.indexOf(`
66
- `);r=i<0?n:n.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,n,r=0){this.block=Uh.create(e,r,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,r=0){this.startContext(this.parser.getNodeType(e),n,r)}addNode(e,n,r){typeof e=="number"&&(e=new ot(this.parser.nodeSet.types[e],Rl,Rl,(r??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(AO(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}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?W$(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 n=AO(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(ie.Paragraph,e.content.length),e.start)}elt(e,n,r,i){return typeof e=="string"?it(this.parser.getNodeType(e),n,r,i):new q$(e,n)}get buffer(){return new Y$(this.parser.nodeSet)}}function W$(t,e,n,r,i){let s=t[e].to,o=[],l=[],a=n.from+r;function u(c,f){for(;f?c>=s:c>s;){let h=t[e+1].from-s;r+=h,c+=h,e++,s=t[e].to}}for(let c=n.firstChild;c;c=c.nextSibling){u(c.from+r,!0);let f=c.from+r,h,p=i.get(c.tree);p?h=p:c.to+r>s?(h=W$(t,e,c,r,i),u(c.to+r,!1)):h=c.toTree(),o.push(h),l.push(f-a)}return u(n.to+r,!1),new ot(n.type,o,l,n.to+r-a,n.tree?n.tree.propValues:void 0)}class Nd extends mv{constructor(e,n,r,i,s,o,l,a,u){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=l,this.inlineNames=a,this.wrappers=u,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,n,r){let i=new EV(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}configure(e){let n=RO(e);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),l=this.blockNames.slice(),a=this.inlineParsers.slice(),u=this.inlineNames.slice(),c=this.endLeafBlock.slice(),f=this.wrappers;if(ma(n.defineNodes)){i=Object.assign({},i);let h=r.types.slice(),p;for(let d of n.defineNodes){let{name:g,block:O,composite:m,style:S}=typeof d=="string"?{name:d}:d;if(h.some(C=>C.name==g))continue;m&&(i[h.length]=(C,Q,_)=>m(Q,_,C.value));let y=h.length,b=m?["Block","BlockContext"]:O?y>=ie.ATXHeading1&&y<=ie.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;h.push(tn.define({id:y,name:g,props:b&&[[Ie.group,b]]})),S&&(p||(p={}),Array.isArray(S)||S instanceof Zr?p[g]=S:Object.assign(p,S))}r=new Wu(h),p&&(r=r.extend(Vl(p)))}if(ma(n.props)&&(r=r.extend(...n.props)),ma(n.remove))for(let h of n.remove){let p=this.blockNames.indexOf(h),d=this.inlineNames.indexOf(h);p>-1&&(s[p]=o[p]=void 0),d>-1&&(a[d]=void 0)}if(ma(n.parseBlock))for(let h of n.parseBlock){let p=l.indexOf(h.name);if(p>-1)s[p]=h.parse,o[p]=h.leaf;else{let d=h.before?uf(l,h.before):h.after?uf(l,h.after)+1:l.length-1;s.splice(d,0,h.parse),o.splice(d,0,h.leaf),l.splice(d,0,h.name)}h.endLeaf&&c.push(h.endLeaf)}if(ma(n.parseInline))for(let h of n.parseInline){let p=u.indexOf(h.name);if(p>-1)a[p]=h.parse;else{let d=h.before?uf(u,h.before):h.after?uf(u,h.after)+1:u.length-1;a.splice(d,0,h.parse),u.splice(d,0,h.name)}}return n.wrap&&(f=f.concat(n.wrap)),new Nd(r,s,o,l,c,i,a,u,f)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let r=new _V(this,e,n);e:for(let i=n;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let l=o(r,s,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}}function ma(t){return t!=null&&t.length>0}function RO(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=RO(t[0]);if(t.length==1)return e;let n=RO(t.slice(1));if(!n||!e)return e||n;let r=(o,l)=>(o||Rl).concat(l||Rl),i=e.wrap,s=n.wrap;return{props:r(e.props,n.props),defineNodes:r(e.defineNodes,n.defineNodes),parseBlock:r(e.parseBlock,n.parseBlock),parseInline:r(e.parseInline,n.parseInline),remove:r(e.remove,n.remove),wrap:i?s?(o,l,a,u)=>i(s(o,l,a,u),l,a,u):i:s}}function uf(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let z$=[tn.none];for(let t=1,e;e=ie[t];t++)z$[t]=tn.define({id:t,name:e,props:t>=ie.Escape?[]:[[Ie.group,t in N$?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Rl=[];class Y${constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,r,i=0){return this.content.push(e,n,r,4+i*4),this}writeElements(e,n=0){for(let r of e)r.writeTo(this,n);return this}finish(e,n){return ot.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let $u=class{constructor(e,n,r,i=Rl){this.type=e,this.from=n,this.to=r,this.children=i}writeTo(e,n){let r=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-r)}toTree(e){return new Y$(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class q${constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Rl}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function it(t,e,n,r){return new $u(t,e,n,r)}const G$={resolve:"Emphasis",mark:"EmphasisMark"},H$={resolve:"Emphasis",mark:"EmphasisMark"},Oa={},Mw={};class jr{constructor(e,n,r,i){this.type=e,this.from=n,this.to=r,this.side=i}}const Iw="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let _u=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{_u=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch{}const vg={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let r=t.char(n+1);for(let i=0;i<Iw.length;i++)if(Iw.charCodeAt(i)==r)return t.append(it(ie.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return r?t.append(it(ie.Entity,n,n+1+r[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let r=n+1;for(;r<t.end&&t.char(r)==96;)r++;let i=r-n,s=0;for(;r<t.end;r++)if(t.char(r)==96){if(s++,s==i&&t.char(r+1)!=96)return t.append(it(ie.InlineCode,n,r+1,[it(ie.CodeMark,n,n+i),it(ie.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let r=t.slice(n+1,t.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 t.append(it(ie.URL,n,n+1+i[0].length));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return t.append(it(ie.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return t.append(it(ie.ProcessingInstruction,n,n+1+o[0].length));let l=/^(?:![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 l?t.append(it(ie.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let r=n+1;for(;t.char(r)==e;)r++;let i=t.slice(n-1,n),s=t.slice(r,r+1),o=_u.test(i),l=_u.test(s),a=/\s|^$/.test(i),u=/\s|^$/.test(s),c=!u&&(!l||a||o),f=!a&&(!o||u||l),h=c&&(e==42||!f||o),p=f&&(e==42||!c||l);return t.append(new jr(e==95?G$:H$,n,r,(h?1:0)|(p?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(it(ie.HardBreak,n,n+2));if(e==32){let r=n+1;for(;t.char(r)==32;)r++;if(t.char(r)==10&&r>=n+2)return t.append(it(ie.HardBreak,n,r+1))}return-1},Link(t,e,n){return e==91?t.append(new jr(Oa,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new jr(Mw,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let r=t.parts.length-1;r>=0;r--){let i=t.parts[r];if(i instanceof jr&&(i.type==Oa||i.type==Mw)){if(!i.side||t.skipSpace(i.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;let s=t.takeContent(r),o=t.parts[r]=$V(t,s,i.type==Oa?ie.Link:ie.Image,i.from,n+1);if(i.type==Oa)for(let l=0;l<r;l++){let a=t.parts[l];a instanceof jr&&a.type==Oa&&(a.side=0)}return o.to}}return-1}};function $V(t,e,n,r,i){let{text:s}=t,o=t.char(i),l=i;if(e.unshift(it(ie.LinkMark,r,r+(n==ie.Image?2:1))),e.push(it(ie.LinkMark,i-1,i)),o==40){let a=t.skipSpace(i+1),u=K$(s,a-t.offset,t.offset),c;u&&(a=t.skipSpace(u.to),c=J$(s,a-t.offset,t.offset),c&&(a=t.skipSpace(c.to))),t.char(a)==41&&(e.push(it(ie.LinkMark,i,i+1)),l=a+1,u&&e.push(u),c&&e.push(c),e.push(it(ie.LinkMark,a,l)))}else if(o==91){let a=e_(s,i-t.offset,t.offset,!1);a&&(e.push(a),l=a.to)}return it(n,r,l,e)}function K$(t,e,n){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let s=t.charCodeAt(i);if(s==62)return it(ie.URL,e+n,i+1+n);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<t.length;s++){let l=t.charCodeAt(s);if(Tr(l))break;if(o)o=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(o=!0)}return s>e?it(ie.URL,e+n,s+n):s==t.length?null:!1}}function J$(t,e,n){let r=t.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<t.length;s++){let l=t.charCodeAt(s);if(o)o=!1;else{if(l==i)return it(ie.LinkTitle,e+n,s+1+n);l==92&&(o=!0)}}return null}function e_(t,e,n,r){for(let i=!1,s=e+1,o=Math.min(t.length,s+999);s<o;s++){let l=t.charCodeAt(s);if(i)i=!1;else{if(l==93)return r?!1:it(ie.LinkLabel,e+n,s+1+n);if(r&&!Tr(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}class _V{constructor(e,n,r){this.parser=e,this.text=n,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,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,r,i,s){return this.append(new jr(e,n,r,(i?1:0)|(s?2:0)))}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 jr&&i.type.resolve&&i.side&2))continue;let s=i.type==G$||i.type==H$,o=i.to-i.from,l,a=r-1;for(;a>=e;a--){let g=this.parts[a];if(g instanceof jr&&g.side&1&&g.type==i.type&&!(s&&(i.side&1||g.side&2)&&(g.to-g.from+o)%3==0&&((g.to-g.from)%3||o%3))){l=g;break}}if(!l)continue;let u=i.type.resolve,c=[],f=l.from,h=i.to;if(s){let g=Math.min(2,l.to-l.from,o);f=l.to-g,h=i.from+g,u=g==1?"Emphasis":"StrongEmphasis"}l.type.mark&&c.push(this.elt(l.type.mark,f,l.to));for(let g=a+1;g<r;g++)this.parts[g]instanceof $u&&c.push(this.parts[g]),this.parts[g]=null;i.type.mark&&c.push(this.elt(i.type.mark,i.from,h));let p=this.elt(u,f,h,c);this.parts[a]=s&&l.from!=f?new jr(l.type,l.from,f,l.side):null,(this.parts[r]=s&&i.to!=h?new jr(i.type,h,i.to,i.side):null)?this.parts.splice(r,0,p):this.parts[r]=p}let n=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof $u&&n.push(i)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let r=this.parts[n];if(r instanceof jr&&r.type==e)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}skipSpace(e){return Wa(this.text,e-this.offset)+this.offset}elt(e,n,r,i){return typeof e=="string"?it(this.parser.getNodeType(e),n,r,i):new q$(e,n)}}function AO(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),r=0;for(let i of e){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let s=n[r];s instanceof $u&&(n[r]=new $u(s.type,s.from,s.to,AO(s.children,[i])))}else n.splice(r++,0,i)}return n}const TV=[ie.CodeBlock,ie.ListItem,ie.OrderedList,ie.BulletList];class RV{constructor(e,n){this.fragments=e,this.input=n,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,n){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)!=`
67
- `;)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<=n;if(!r.childAfter(i))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Ie.contextHash)==e}takeNodes(e){let n=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,l=e.block.children.length,a=o,u=l;for(;;){if(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}let c=t_(n.from-r,e.ranges);if(n.to-r<=e.ranges[e.rangeI].to)e.addNode(n.tree,c);else{let f=new ot(e.parser.nodeSet.types[ie.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,n.tree),e.addNode(f,c)}if(n.type.is("Block")&&(TV.indexOf(n.type.id)<0?(o=n.to-r,l=e.block.children.length):(o=a,l=u,a=n.to-r,u=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-s}}function t_(t,e){let n=t;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<t&&(n-=s-i)}return n}const AV=Vl({"Blockquote/...":v.quote,HorizontalRule:v.contentSeparator,"ATXHeading1/... SetextHeading1/...":v.heading1,"ATXHeading2/... SetextHeading2/...":v.heading2,"ATXHeading3/...":v.heading3,"ATXHeading4/...":v.heading4,"ATXHeading5/...":v.heading5,"ATXHeading6/...":v.heading6,"Comment CommentBlock":v.comment,Escape:v.escape,Entity:v.character,"Emphasis/...":v.emphasis,"StrongEmphasis/...":v.strong,"Link/... Image/...":v.link,"OrderedList/... BulletList/...":v.list,"BlockQuote/...":v.quote,"InlineCode CodeText":v.monospace,URL:v.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":v.processingInstruction,"CodeInfo LinkLabel":v.labelName,LinkTitle:v.string,Paragraph:v.content}),DV=new Nd(new Wu(z$).extend(AV),Object.keys(af).map(t=>af[t]),Object.keys(af).map(t=>PV[t]),Object.keys(af),CV,N$,Object.keys(vg).map(t=>vg[t]),Object.keys(vg),[]);function MV(t,e,n){let r=[];for(let i=t.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:n;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function IV(t){let{codeParser:e,htmlParser:n}=t;return{wrap:tE((i,s)=>{let o=i.type.id;if(e&&(o==ie.CodeBlock||o==ie.FencedCode)){let l="";if(o==ie.FencedCode){let u=i.node.getChild(ie.CodeInfo);u&&(l=s.read(u.from,u.to))}let a=e(l);if(a)return{parser:a,overlay:u=>u.type.id==ie.CodeText}}else if(n&&(o==ie.HTMLBlock||o==ie.HTMLTag))return{parser:n,overlay:MV(i.node,i.from,i.to)};return null})}}const NV={resolve:"Strikethrough",mark:"StrikethroughMark"},LV={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":v.strikethrough}},{name:"StrikethroughMark",style:v.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let r=t.slice(n-1,n),i=t.slice(n+2,n+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),l=_u.test(r),a=_u.test(i);return t.addDelimiter(NV,n,n+2,!o&&(!a||s||l),!s&&(!l||o||a))},after:"Emphasis"}]};function za(t,e,n=0,r,i=0){let s=0,o=!0,l=-1,a=-1,u=!1,c=()=>{r.push(t.elt("TableCell",i+l,i+a,t.parser.parseInline(e.slice(l,a),i+l)))};for(let f=n;f<e.length;f++){let h=e.charCodeAt(f);h==124&&!u?((!o||l>-1)&&s++,o=!1,r&&(l>-1&&c(),r.push(t.elt("TableDelimiter",f+i,f+i+1))),l=a=-1):(u||h!=32&&h!=9)&&(l<0&&(l=f),a=f+1),u=!u&&h==92}return l>-1&&(s++,r&&c()),s}function Nw(t,e){for(let n=e;n<t.length;n++){let r=t.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}const n_=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Lw{constructor(){this.rows=null}nextLine(e,n,r){if(this.rows==null){this.rows=!1;let i;if((n.next==45||n.next==58||n.next==124)&&n_.test(i=n.text.slice(n.pos))){let s=[];za(e,r.content,0,s,r.start)==za(e,i,n.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let i=[];za(e,n.text,n.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,i))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const XV={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":v.heading}},"TableRow",{name:"TableCell",style:v.content},{name:"TableDelimiter",style:v.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return Nw(e.content,0)?new Lw:null},endLeaf(t,e,n){if(n.parsers.some(i=>i instanceof Lw)||!Nw(e.text,e.basePos))return!1;let r=t.scanLine(t.absoluteLineEnd+1).text;return n_.test(r)&&za(t,e.text,e.basePos)==za(t,r,e.basePos)},before:"SetextHeading"}]};class VV{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const ZV={defineNodes:[{name:"Task",block:!0,style:v.list},{name:"TaskMarker",style:v.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new VV:null},after:"SetextHeading"}]},jV=[XV,ZV,LV];function r_(t,e,n){return(r,i,s)=>{if(i!=t||r.char(s+1)==t)return-1;let o=[r.elt(n,s,s+1)];for(let l=s+1;l<r.end;l++){let a=r.char(l);if(a==t)return r.addElement(r.elt(e,s,l+1,o.concat(r.elt(n,l,l+1))));if(a==92&&o.push(r.elt("Escape",l,l+++2)),Tr(a))break}return-1}}const BV={defineNodes:[{name:"Superscript",style:v.special(v.content)},{name:"SuperscriptMark",style:v.processingInstruction}],parseInline:[{name:"Superscript",parse:r_(94,"Superscript","SuperscriptMark")}]},FV={defineNodes:[{name:"Subscript",style:v.special(v.content)},{name:"SubscriptMark",style:v.processingInstruction}],parseInline:[{name:"Subscript",parse:r_(126,"Subscript","SubscriptMark")}]},UV={defineNodes:[{name:"Emoji",style:v.character}],parseInline:[{name:"Emoji",parse(t,e,n){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+r[0].length))}}]},WV=54,zV=1,YV=55,qV=2,GV=56,HV=3,Xw=4,KV=5,Wh=6,i_=7,s_=8,o_=9,l_=10,JV=11,eZ=12,tZ=13,yg=57,nZ=14,Vw=58,a_=20,rZ=22,u_=23,iZ=24,DO=26,c_=27,sZ=28,oZ=31,lZ=34,aZ=36,uZ=37,cZ=0,fZ=1,hZ={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},dZ={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Zw={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 pZ(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function f_(t){return t==9||t==10||t==13||t==32}let jw=null,Bw=null,Fw=0;function MO(t,e){let n=t.pos+e;if(Fw==n&&Bw==t)return jw;let r=t.peek(e);for(;f_(r);)r=t.peek(++e);let i="";for(;pZ(r);)i+=String.fromCharCode(r),r=t.peek(++e);return Bw=t,Fw=n,jw=i?i.toLowerCase():r==gZ||r==mZ?void 0:null}const h_=60,zh=62,Vv=47,gZ=63,mZ=33,OZ=45;function Uw(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(let n=0;n<t.length;n++)this.hash+=(this.hash<<4)+t.charCodeAt(n)+(t.charCodeAt(n)<<8)}const vZ=[Wh,l_,i_,s_,o_],yZ=new Q$({start:null,shift(t,e,n,r){return vZ.indexOf(e)>-1?new Uw(MO(r,1)||"",t):t},reduce(t,e){return e==a_&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==Wh||i==aZ?new Uw(MO(r,1)||"",t):t},hash(t){return t?t.hash:0},strict:!1}),SZ=new Pi((t,e)=>{if(t.next!=h_){t.next<0&&e.context&&t.acceptToken(yg);return}t.advance();let n=t.next==Vv;n&&t.advance();let r=MO(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?nZ:Wh);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(JV);if(i&&dZ[i])return t.acceptToken(yg,-2);if(e.dialectEnabled(cZ))return t.acceptToken(eZ);for(let s=e.context;s;s=s.parent)if(s.name==r)return;t.acceptToken(tZ)}else{if(r=="script")return t.acceptToken(i_);if(r=="style")return t.acceptToken(s_);if(r=="textarea")return t.acceptToken(o_);if(hZ.hasOwnProperty(r))return t.acceptToken(l_);i&&Zw[i]&&Zw[i][r]?t.acceptToken(yg,-1):t.acceptToken(Wh)}},{contextual:!0}),bZ=new Pi(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(Vw);break}if(t.next==OZ)e++;else if(t.next==zh&&e>=2){n>3&&t.acceptToken(Vw,-2);break}else e=0;t.advance()}});function wZ(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const kZ=new Pi((t,e)=>{if(t.next==Vv&&t.peek(1)==zh){let n=e.dialectEnabled(fZ)||wZ(e.context);t.acceptToken(n?KV:Xw,2)}else t.next==zh&&t.acceptToken(Xw,1)});function Zv(t,e,n){let r=2+t.length;return new Pi(i=>{for(let s=0,o=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==h_||s==1&&i.next==Vv||s>=2&&s<r&&i.next==t.charCodeAt(s-2))s++,o++;else if((s==2||s==r)&&f_(i.next))o++;else if(s==r&&i.next==zh){l>o?i.acceptToken(e,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const xZ=Zv("script",WV,zV),PZ=Zv("style",YV,qV),CZ=Zv("textarea",GV,HV),QZ=Vl({"Text RawText":v.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":v.angleBracket,TagName:v.tagName,"MismatchedCloseTag/TagName":[v.tagName,v.invalid],AttributeName:v.attributeName,"AttributeValue UnquotedAttributeValue":v.attributeValue,Is:v.definitionOperator,"EntityReference CharacterReference":v.character,Comment:v.blockComment,ProcessingInst:v.processingInstruction,DoctypeDecl:v.documentMeta}),EZ=Tl.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#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^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!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 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:67,context:yZ,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[QZ],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$|c`PkW!a`!cpOX$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&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(V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a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[xZ,PZ,CZ,kZ,SZ,bZ,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function d_(t,e){let n=Object.create(null);for(let r of t.getChildren(u_)){let i=r.getChild(iZ),s=r.getChild(DO)||r.getChild(c_);i&&(n[e.read(i.from,i.to)]=s?s.type.id==DO?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function Ww(t,e){let n=t.getChild(rZ);return n?e.read(n.from,n.to):" "}function Sg(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=d_(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function p_(t=[],e=[]){let n=[],r=[],i=[],s=[];for(let l of t)(l.tag=="script"?n:l.tag=="style"?r:l.tag=="textarea"?i:s).push(l);let o=e.length?Object.create(null):null;for(let l of e)(o[l.name]||(o[l.name]=[])).push(l);return tE((l,a)=>{let u=l.type.id;if(u==sZ)return Sg(l,a,n);if(u==oZ)return Sg(l,a,r);if(u==lZ)return Sg(l,a,i);if(u==a_&&s.length){let c=l.node,f=c.firstChild,h=f&&Ww(f,a),p;if(h){for(let d of s)if(d.tag==h&&(!d.attrs||d.attrs(p||(p=d_(c,a))))){let g=c.lastChild;return{parser:d.parser,overlay:[{from:f.to,to:g.type.id==uZ?g.from:c.to}]}}}}if(o&&u==u_){let c=l.node,f;if(f=c.firstChild){let h=o[a.read(f.from,f.to)];if(h)for(let p of h){if(p.tagName&&p.tagName!=Ww(c.parent,a))continue;let d=c.lastChild;if(d.type.id==DO){let g=d.from+1,O=d.lastChild,m=d.to-(O&&O.isError?0:1);if(m>g)return{parser:p.parser,overlay:[{from:g,to:m}]}}else if(d.type.id==c_)return{parser:p.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}const $Z=96,zw=1,_Z=97,TZ=98,Yw=2,g_=[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],RZ=58,AZ=40,m_=95,DZ=91,Zf=45,MZ=46,IZ=35,NZ=37;function Yh(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function LZ(t){return t>=48&&t<=57}const XZ=new Pi((t,e)=>{for(let n=!1,r=0,i=0;;i++){let{next:s}=t;if(Yh(s)||s==Zf||s==m_||n&&LZ(s))!n&&(s!=Zf||i>0)&&(n=!0),r===i&&s==Zf&&r++,t.advance();else{n&&t.acceptToken(s==AZ?_Z:r==2&&e.canShift(Yw)?Yw:TZ);break}}}),VZ=new Pi(t=>{if(g_.includes(t.peek(-1))){let{next:e}=t;(Yh(e)||e==m_||e==IZ||e==MZ||e==DZ||e==RZ||e==Zf)&&t.acceptToken($Z)}}),ZZ=new Pi(t=>{if(!g_.includes(t.peek(-1))){let{next:e}=t;if(e==NZ&&(t.advance(),t.acceptToken(zw)),Yh(e)){do t.advance();while(Yh(t.next));t.acceptToken(zw)}}}),jZ=Vl({"AtKeyword import charset namespace keyframes media supports":v.definitionKeyword,"from to selector":v.keyword,NamespaceName:v.namespace,KeyframeName:v.labelName,KeyframeRangeName:v.operatorKeyword,TagName:v.tagName,ClassName:v.className,PseudoClassName:v.constant(v.className),IdName:v.labelName,"FeatureName PropertyName":v.propertyName,AttributeName:v.attributeName,NumberLiteral:v.number,KeywordQuery:v.keyword,UnaryQueryOp:v.operatorKeyword,"CallTag ValueName":v.atom,VariableName:v.variableName,Callee:v.operatorKeyword,Unit:v.unit,"UniversalSelector NestingSelector":v.definitionOperator,MatchOp:v.compareOperator,"ChildOp SiblingOp, LogicOp":v.logicOperator,BinOp:v.arithmeticOperator,Important:v.modifier,Comment:v.blockComment,ColorLiteral:v.color,"ParenthesizedContent StringLiteral":v.string,":":v.punctuation,"PseudoOp #":v.derefOperator,"; ,":v.separator,"( )":v.paren,"[ ]":v.squareBracket,"{ }":v.brace}),BZ={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},FZ={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},UZ={__proto__:null,not:128,only:128},WZ=Tl.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[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R#z$R$j$o${Q#|#TQ$O#WS$a#l$cQ$f#uR$w$bR#x#QQiPR#PwQ!b[Q!jaR#X!VU!^[a!VQ!i`Q#^!]Q#b!_Q$T#_R$U#`",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:114,nodeProps:[["openedBy",17,"(",48,"{"],["closedBy",18,")",49,"}"]],propSources:[jZ],skippedNodes:[0,3,85],repeatNodeCount:10,tokenData:"J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#q#rI^#r#sIo#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`JW<%lO$}`%QSOy%^z;'S%^;'S;=`%o<%lO%^`%cSo`Oy%^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%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[VZ,ZZ,XZ,1,2,3,4,new Fh("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:t=>BZ[t]||-1},{term:56,get:t=>FZ[t]||-1},{term:98,get:t=>UZ[t]||-1}],tokenPrec:1169});let bg=null;function wg(){if(!bg&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));bg=e.sort().map(r=>({type:"property",label:r}))}return bg||[]}const qw=["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(t=>({type:"class",label:t})),Gw=["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(t=>({type:"keyword",label:t})).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(t=>({type:"constant",label:t}))),zZ=["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(t=>({type:"type",label:t})),ts=/^(\w[\w-]*|-\w[\w-]*|)$/,YZ=/^-(-[\w-]*)?$/;function qZ(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const Hw=new eE,GZ=["Declaration"];function HZ(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function O_(t,e,n){if(e.to-e.from>4096){let r=Hw.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(wt.IncludeAnonymous);if(o.firstChild())do for(let l of O_(t,o.node,n))s.has(l.label)||(s.add(l.label),i.push(l));while(o.nextSibling());return Hw.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(GZ)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let l=t.sliceString(s.from,s.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}const KZ=t=>e=>{let{state:n,pos:r}=e,i=vt(n).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&n.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:wg(),validFor:ts};if(i.name=="ValueName")return{from:i.from,options:Gw,validFor:ts};if(i.name=="PseudoClassName")return{from:i.from,options:qw,validFor:ts};if(t(i)||(e.explicit||s)&&qZ(i,n.doc))return{from:t(i)||s?i.from:r,options:O_(n.doc,HZ(i),t),validFor:YZ};if(i.name=="TagName"){for(let{parent:a}=i;a;a=a.parent)if(a.name=="Block")return{from:i.from,options:wg(),validFor:ts};return{from:i.from,options:zZ,validFor:ts}}if(!e.explicit)return null;let o=i.resolve(r),l=o.childBefore(r);return l&&l.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:qw,validFor:ts}:l&&l.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:Gw,validFor:ts}:o.name=="Block"||o.name=="Styles"?{from:r,options:wg(),validFor:ts}:null},JZ=KZ(t=>t.name=="VariableName"),qh=Ql.define({name:"css",parser:WZ.configure({props:[zu.add({Declaration:Lf()}),Yu.add({Block:aE})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function v_(){return new ku(qh,qh.data.of({autocomplete:JZ}))}const va=["_blank","_self","_top","_parent"],kg=["ascii","utf-8","utf-16","latin1","latin1"],xg=["get","post","put","delete"],Pg=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],er=["true","false"],we={},ej={a:{attrs:{href:null,ping:null,type:null,media:null,target:va,hreflang:null}},abbr:we,address:we,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:we,aside:we,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:we,base:{attrs:{href:null,target:va}},bdi:we,bdo:we,blockquote:{attrs:{cite:null}},body:we,br:we,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Pg,formmethod:xg,formnovalidate:["novalidate"],formtarget:va,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:we,center:we,cite:we,code:we,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:we,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:we,div:we,dl:we,dt:we,em:we,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:we,figure:we,footer:we,form:{attrs:{action:null,name:null,"accept-charset":kg,autocomplete:["on","off"],enctype:Pg,method:xg,novalidate:["novalidate"],target:va}},h1:we,h2:we,h3:we,h4:we,h5:we,h6:we,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:we,hgroup:we,hr:we,html:{attrs:{manifest:null}},i:we,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:Pg,formmethod:xg,formnovalidate:["novalidate"],formtarget:va,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:we,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:we,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:we,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:kg,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:we,noscript:we,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:we,param:{attrs:{name:null,value:null}},pre:we,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:we,rt:we,ruby:we,samp:we,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:kg}},section:we,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:we,source:{attrs:{src:null,type:null,media:null}},span:we,strong:we,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:we,summary:we,sup:we,table:we,tbody:we,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:we,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:we,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:we,time:{attrs:{datetime:null}},title:we,tr:we,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:we,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:we},y_={accesskey:null,class:null,contenteditable:er,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:er,autocorrect:er,autocapitalize:er,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":er,"aria-autocomplete":["inline","list","both","none"],"aria-busy":er,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":er,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":er,"aria-hidden":er,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":er,"aria-multiselectable":er,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":er,"aria-relevant":null,"aria-required":er,"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},S_="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(t=>"on"+t);for(let t of S_)y_[t]=null;class Tu{constructor(e,n){this.tags=Object.assign(Object.assign({},ej),e),this.globalAttrs=Object.assign(Object.assign({},y_),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Tu.default=new Tu;function Al(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function Dl(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function b_(t,e,n){let r=n.tags[Al(t,Dl(e))];return(r==null?void 0:r.children)||n.allTags}function jv(t,e){let n=[];for(let r=Dl(e);r&&!r.type.isTop;r=Dl(r.parent)){let i=Al(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const w_=/^[:\-\.\w\u00b7-\uffff]*$/;function Kw(t,e,n,r,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",o=Dl(n,!0);return{from:r,to:i,options:b_(t.doc,o,e).map(l=>({label:l,type:"type"})).concat(jv(t.doc,n).map((l,a)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Jw(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:jv(t.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:w_}}function tj(t,e,n,r){let i=[],s=0;for(let o of b_(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let o of jv(t.doc,n))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function nj(t,e,n,r,i){let s=Dl(n),o=s?e.tags[Al(t.doc,s)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],a=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:a.map(u=>({label:u,type:"property"})),validFor:w_}}function rj(t,e,n,r,i){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],a;if(o){let u=t.sliceDoc(o.from,o.to),c=e.globalAttrs[u];if(!c){let f=Dl(n),h=f?e.tags[Al(t.doc,f)]:null;c=(h==null?void 0:h.attrs)&&h.attrs[u]}if(c){let f=t.sliceDoc(r,i).toLowerCase(),h='"',p='"';/^['"]/.test(f)?(a=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",p=t.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):a=/^[^\s<>='"]*$/;for(let d of c)l.push({label:d,apply:h+d+p,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}function k_(t,e){let{state:n,pos:r}=e,i=vt(n).resolveInner(r,-1),s=i.resolve(r);for(let o=r,l;s==i&&(l=i.childBefore(o));){let a=l.lastChild;if(!a||!a.type.isError||a.from<a.to)break;s=i=l,o=a.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?Jw(n,i,i.from,r):Kw(n,t,i,i.from,r):i.name=="StartTag"?Kw(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?Jw(n,i,r,r):e.explicit&&(i.name=="OpenTag"||i.name=="SelfClosingTag")||i.name=="AttributeName"?nj(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?rj(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?tj(n,t,i,r):null}function ij(t){return k_(Tu.default,t)}function sj(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new Tu(e,n):Tu.default;return i=>k_(r,i)}const x_=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:A$.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:D$.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:M$.parser},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Xi.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:qh.parser}],P_=[{name:"style",parser:qh.parser.configure({top:"Styles"})}].concat(S_.map(t=>({name:t,parser:Xi.parser}))),C_=Ql.define({name:"html",parser:EZ.configure({props:[zu.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),Yu.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),yE.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),jf=C_.configure({wrap:p_(x_,P_)});function Q_(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=p_((t.nestedLanguages||[]).concat(x_),(t.nestedAttributes||[]).concat(P_)));let r=n?C_.configure({wrap:n,dialect:e}):e?jf.configure({dialect:e}):jf;return new ku(r,[jf.data.of({autocomplete:sj(t)}),t.autoCloseTags!==!1?oj:[],I$().support,v_().support])}const ek=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),oj=me.inputHandler.of((t,e,n,r)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!jf.isActiveAt(t.state,e,-1))return!1;let{state:i}=t,s=i.changeByRange(o=>{var l,a,u;let{head:c}=o,f=vt(i).resolveInner(c,-1),h;if((f.name=="TagName"||f.name=="StartTag")&&(f=f.parent),r==">"&&f.name=="OpenTag"){if(((a=(l=f.parent)===null||l===void 0?void 0:l.lastChild)===null||a===void 0?void 0:a.name)!="CloseTag"&&(h=Al(i.doc,f.parent,c))&&!ek.has(h)){let p=t.state.doc.sliceString(c,c+1)===">",d=`${p?"":">"}</${h}>`;return{range:Z.cursor(c+1),changes:{from:c+(p?1:0),insert:d}}}}else if(r=="/"&&f.name=="OpenTag"){let p=f.parent,d=p==null?void 0:p.parent;if(p.from==c-1&&((u=d.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(h=Al(i.doc,d,c))&&!ek.has(h)){let g=t.state.doc.sliceString(c,c+1)===">",O=`/${h}${g?"":">"}`,m=c+O.length+(g?1:0);return{range:Z.cursor(m),changes:{from:c,insert:O}}}}return{range:o}});return s.changes.empty?!1:(t.dispatch(s,{userEvent:"input.type",scrollIntoView:!0}),!0)}),E_=Ov({commentTokens:{block:{open:"<!--",close:"-->"}}}),$_=new Ie,__=DV.configure({props:[Yu.add(t=>!t.is("Block")||t.is("Document")||IO(t)!=null?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),$_.add(IO),zu.add({Document:()=>null}),eo.add({Document:E_})]});function IO(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function lj(t,e){let n=t;for(;;){let r=n.nextSibling,i;if(!r||(i=IO(r.type))!=null&&i<=e)break;n=r}return n.to}const aj=lE.of((t,e,n)=>{for(let r=vt(t).resolveInner(n,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop($_);if(i==null)continue;let s=lj(r,i);if(s>n)return{from:n,to:s}}return null});function Bv(t){return new xr(E_,t,[aj],"markdown")}const uj=Bv(__),cj=__.configure([jV,FV,BV,UV]),T_=Bv(cj);function fj(t,e){return n=>{if(n&&t){let r=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?r=t(n):r=_h.matchLanguageName(t,n,!0),r instanceof _h)return r.support?r.support.language.parser:wu.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}let cf=class{constructor(e,n,r,i,s,o,l){this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=l}blank(e,n=!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+(n?this.spaceAfter:"")}}marker(e,n){let r=this.node.name=="OrderedList"?String(+A_(this.item,e)[2]+n):"";return this.spaceBefore+r+this.type+this.spaceAfter}};function R_(t,e){let n=[];for(let i=t;i&&i.name!="Document";i=i.parent)(i.name=="ListItem"||i.name=="Blockquote"||i.name=="FencedCode")&&n.push(i);let r=[];for(let i=n.length-1;i>=0;i--){let s=n[i],o,l=e.lineAt(s.from),a=s.from-l.from;if(s.name=="FencedCode")r.push(new cf(s,a,a,"","","",null));else if(s.name=="Blockquote"&&(o=/^[ \t]*>( ?)/.exec(l.text.slice(a))))r.push(new cf(s,a,a+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^([ \t]*)\d+([.)])([ \t]*)/.exec(l.text.slice(a)))){let u=o[3],c=o[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),r.push(new cf(s.parent,a,a+c,o[1],u,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^([ \t]*)([-+*])([ \t]{1,4}\[[ xX]\])?([ \t]+)/.exec(l.text.slice(a)))){let u=o[4],c=o[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),r.push(new cf(s.parent,a,a+c,o[1],u,f,s))}}return r}function A_(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Cg(t,e,n,r=0){for(let i=-1,s=t;;){if(s.name=="ListItem"){let l=A_(s,e),a=+l[2];if(i>=0){if(a!=i+1)return;n.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(i+2+r)})}i=a}let o=s.nextSibling;if(!o)break;s=o}}const hj=({state:t,dispatch:e})=>{let n=vt(t),{doc:r}=t,i=null,s=t.changeByRange(o=>{if(!o.empty||!T_.isActiveAt(t,o.from))return i={range:o};let l=o.from,a=r.lineAt(l),u=R_(n.resolveInner(l,-1),r);for(;u.length&&u[u.length-1].from>l-a.from;)u.pop();if(!u.length)return i={range:o};let c=u[u.length-1];if(c.to-c.spaceAfter.length>l-a.from)return i={range:o};let f=l>=c.to-c.spaceAfter.length&&!/\S/.test(a.text.slice(c.to));if(c.item&&f)if(c.node.firstChild.to>=l||a.from>0&&!/[^\s>]/.test(r.lineAt(a.from-1).text)){let O=u.length>1?u[u.length-2]:null,m,S="";O&&O.item?(m=a.from+O.from,S=O.marker(r,1)):m=a.from+(O?O.to:0);let y=[{from:m,to:l,insert:S}];return c.node.name=="OrderedList"&&Cg(c.item,r,y,-2),O&&O.node.name=="OrderedList"&&Cg(O.item,r,y),{range:Z.cursor(m+S.length),changes:y}}else{let O="";for(let m=0,S=u.length-2;m<=S;m++)O+=u[m].blank(m<S?u[m+1].from-O.length:null,m<S);return O+=t.lineBreak,{range:Z.cursor(l+O.length),changes:{from:a.from,insert:O}}}if(c.node.name=="Blockquote"&&f&&a.from){let O=r.lineAt(a.from-1),m=/>\s*$/.exec(O.text);if(m&&m.index==c.from){let S=t.changes([{from:O.from+m.index,to:O.to},{from:a.from+c.from,to:a.to}]);return{range:o.map(S),changes:S}}}let h=[];c.node.name=="OrderedList"&&Cg(c.item,r,h);let p=c.item&&c.item.from<a.from,d="";if(!p||/^[\s\d.)\-+*>]*/.exec(a.text)[0].length>=c.to)for(let O=0,m=u.length-1;O<=m;O++)d+=O==m&&!p?u[O].marker(r,1):u[O].blank(O<m?u[O+1].from-d.length:null);let g=l;for(;g>a.from&&/\s/.test(a.text.charAt(g-a.from-1));)g--;return d=t.lineBreak+d,h.push({from:g,to:l,insert:d}),{range:Z.cursor(g+d.length),changes:h}});return i?!1:(e(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0)};function tk(t){return t.name=="QuoteMark"||t.name=="ListMark"}function dj(t,e){let n=t.resolveInner(e,-1),r=e;tk(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(tk(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}const pj=({state:t,dispatch:e})=>{let n=vt(t),r=null,i=t.changeByRange(s=>{let o=s.from,{doc:l}=t;if(s.empty&&T_.isActiveAt(t,s.from)){let a=l.lineAt(o),u=R_(dj(n,o),l);if(u.length){let c=u[u.length-1],f=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(o-a.from>f&&!/\S/.test(a.text.slice(f,o-a.from)))return{range:Z.cursor(a.from+f),changes:{from:a.from+f,to:o}};if(o-a.from==f&&(!c.item||a.from<=c.item.from||!/\S/.test(a.text.slice(0,c.to)))){let h=a.from+c.from;if(c.item&&c.node.from<c.item.from&&/\S/.test(a.text.slice(c.from,c.to)))return{range:s,changes:{from:h,to:a.from+c.to,insert:c.blank(c.to-c.from)}};if(h<o)return{range:Z.cursor(h),changes:{from:h,to:o}}}}}return r={range:s}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},gj=[{key:"Enter",run:hj},{key:"Backspace",run:pj}],NO=Q_({matchClosingTags:!1});function mj(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=uj,completeHTMLTags:s=!0}=t;if(!(i instanceof Nd))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let o=t.extensions?[t.extensions]:[],l=[NO.support],a;n instanceof ku?(l.push(n.support),a=n.language):n&&(a=n);let u=e||a?fj(e,a):void 0;o.push(IV({codeParser:u,htmlParser:NO.language.parser})),r&&l.push(Ls.high(Fu.of(gj)));let c=Bv(i.configure(o));return s&&l.push(c.data.of({autocomplete:Oj})),new ku(c,l)}function Oj(t){let{state:e,pos:n}=t,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!r)return null;let i=vt(e).resolveInner(n,-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:n-r[0].length,to:n,options:vj(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Qg=null;function vj(){if(Qg)return Qg;let t=ij(new $v(qe.create({extensions:NO}),0,!0));return Qg=t?t.options:[]}const nk=(t,e,n,r,i)=>{const s=[];e.iterChanges((l,a,u,c,f)=>{if(t.concat([l]),l!==a&&s.push(i.remove(l,n.sliceString(l,a))),f.length>0){const h=f.sliceString(0,f.length,`
68
- `);s.push(i.insert(l,h))}});const o=s.reduce(i.type.compose);return r.editOp(t,"text-unicode",o)},rk=t=>{const e=[];for(const n of t){const{es:r}=n;if(r!==void 0){const i=r.length===1?0:r[0];r.length===3?e.push({from:i,to:i+r[2].d.length,insert:r[1]}):r.length===2&&typeof r[0]!="number"&&r[1].d!==void 0?e.push({from:0,to:r[1].d.length,insert:r[0]}):r[r.length-1].d!==void 0?e.push({from:i,to:i+r[r.length-1].d.length}):e.push({from:i,to:i,insert:r[r.length-1]})}}return e},yj=(t,e)=>{for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Sj=({shareDBDoc:t,path:e=[],json1:n,textUnicode:r,debug:i=!1})=>jt.fromClass(class{constructor(s){this.view=s,this.handleOp=o=>{!this.lock&&yj(o,e)&&(this.lock=!0,i&&(console.log("Received op from ShareDB"),console.log(" op: "+JSON.stringify(o)),console.log(" generated changes: "+JSON.stringify(rk(o)))),s.dispatch({changes:rk(o)}),this.lock=!1)},t.on("op",this.handleOp)}update(s){!this.lock&&s.docChanged&&(this.lock=!0,i&&(console.log("Received change from CodeMirror"),console.log(" changes:"+JSON.stringify(s.changes.toJSON())),console.log(" iterChanges:"),s.changes.iterChanges((o,l,a,u,c)=>{console.log(" "+JSON.stringify({fromA:o,toA:l,fromB:a,toB:u,inserted:c.sliceString(0,c.length,`
69
- `)}))}),console.log(" generated json1 op: "+JSON.stringify(nk(e,s.changes,s.startState.doc,n,r)))),t.submitOp(nk(e,s.changes,s.startState.doc,n,r)),this.lock=!1)}destroy(){t.off("op",this.handleOp)}}),bj=({path:t,localPresence:e})=>me.updateListener.of(n=>{if(n.selectionSet){const r=n.state.selection.ranges[0],{from:i,to:s}=r,o={start:[...t,i],end:[...t,s]};e.submit(o,l=>{if(l)throw l})}}),wj=({path:t,docPresence:e})=>[jt.fromClass(class{constructor(n){this.decorations=st.of([]);const r={};e.on("receive",(i,s)=>{s&&xj(t,s)?r[i]=s:delete r[i],this.decorations=Pe.set(Object.keys(r).map(o=>{const l=r[o],{start:a,end:u}=l,c=a[a.length-1];return{from:c,to:c,value:Pe.widget({side:-1,block:!1,widget:new Pj(o)})}}),!0),setTimeout(()=>{n.dispatch({annotations:[kj.of(!0)]})},0)})}},{decorations:n=>n.decorations}),Cj],kj=bi.define(),xj=(t,e)=>{for(let n=0;n<t.length;n++)if(t[n]!==e.start[n])return!1;return!0};class Pj extends ki{constructor(e){super(),this.id=e}eq(e){return e.id===this.id}toDOM(){const e=document.createElement("span");return e.setAttribute("aria-hidden","true"),e.className="cm-json1-presence",e.appendChild(document.createElement("div")),e}ignoreEvent(){return!1}}const Cj=me.baseTheme({".cm-json1-presence":{position:"relative"},".cm-json1-presence > div":{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",borderLeft:"1px solid yellow"}}),ik=new Map,sk=(t,e)=>{let n=t;for(const r of e){if(!n)return;n=n[r]}return n},Qj=({fileId:t,shareDBDoc:e,filesPath:n,localPresence:r,docPresence:i,theme:s})=>{const o=e.data,l=[...n,t,"text"],a=[...n,t,"name"],u=sk(o,l),f=sk(o,a).split(".").pop();let h=new Zu;const p=[];p.push(Sj({shareDBDoc:e,path:l,json1:ev,textUnicode:xC})),r&&p.push(bj({path:l,localPresence:r})),i&&p.push(wj({path:l,docPresence:i})),p.push(L4),p.push(h.of(s)),f==="js"||f==="json"||f==="jsx"||f==="ts"?p.push(I$()):f==="html"?p.push(Q_()):f==="css"?p.push(v_()):f==="md"&&p.push(mj());let d=ik.get(t);return d||(d=new me({state:qe.create({doc:u,extensions:p})}),ik.set(t,d)),d};const Ej=({activeFileId:t,shareDBDoc:e,localPresence:n,docPresence:r,theme:i=wE,filesPath:s=[]})=>{const o=R.useRef(null);return R.useLayoutEffect(()=>{if(!o.current||!e)return;const l=Qj({fileId:t,shareDBDoc:e,filesPath:s,localPresence:n,docPresence:r,theme:YL[i]});return o.current.appendChild(l.dom),()=>{o.current.removeChild(l.dom)}},[e,t]),U.jsx("div",{className:"vz-code-editor",ref:o})};var ok=Object.prototype.toString,D_=function(e){var n=ok.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&ok.call(e.callee)==="[object Function]"),r},Eg,lk;function $j(){if(lk)return Eg;lk=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=D_,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(h){var p=h.constructor;return p&&p.prototype===h},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!u["$"+h]&&e.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{a(window[h])}catch{return!0}}catch{return!0}return!1}(),f=function(h){if(typeof window>"u"||!c)return a(h);try{return a(h)}catch{return!1}};t=function(p){var d=p!==null&&typeof p=="object",g=n.call(p)==="[object Function]",O=r(p),m=d&&n.call(p)==="[object String]",S=[];if(!d&&!g&&!O)throw new TypeError("Object.keys called on a non-object");var y=o&&g;if(m&&p.length>0&&!e.call(p,0))for(var b=0;b<p.length;++b)S.push(String(b));if(O&&p.length>0)for(var C=0;C<p.length;++C)S.push(String(C));else for(var Q in p)!(y&&Q==="prototype")&&e.call(p,Q)&&S.push(String(Q));if(s)for(var _=f(p),k=0;k<l.length;++k)!(_&&l[k]==="constructor")&&e.call(p,l[k])&&S.push(l[k]);return S}}return Eg=t,Eg}var _j=Array.prototype.slice,Tj=D_,ak=Object.keys,Bf=ak?function(e){return ak(e)}:$j(),uk=Object.keys;Bf.shim=function(){if(Object.keys){var e=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);e||(Object.keys=function(r){return Tj(r)?uk(_j.call(r)):uk(r)})}else Object.keys=Bf;return Object.keys||Bf};var M_=Bf,I_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,n);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Rj=I_,Fv=function(){return Rj()&&!!Symbol.toStringTag},ck=typeof Symbol<"u"&&Symbol,Aj=I_,Dj=function(){return typeof ck!="function"||typeof Symbol!="function"||typeof ck("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Aj()},Mj="Function.prototype.bind called on incompatible ",$g=Array.prototype.slice,Ij=Object.prototype.toString,Nj="[object Function]",Lj=function(e){var n=this;if(typeof n!="function"||Ij.call(n)!==Nj)throw new TypeError(Mj+n);for(var r=$g.call(arguments,1),i,s=function(){if(this instanceof i){var c=n.apply(this,r.concat($g.call(arguments)));return Object(c)===c?c:this}else return n.apply(e,r.concat($g.call(arguments)))},o=Math.max(0,n.length-r.length),l=[],a=0;a<o;a++)l.push("$"+a);if(i=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var u=function(){};u.prototype=n.prototype,i.prototype=new u,u.prototype=null}return i},Xj=Lj,Uv=Function.prototype.bind||Xj,Vj=Uv,Zj=Vj.call(Function.call,Object.prototype.hasOwnProperty),Ue,Ml=SyntaxError,N_=Function,pl=TypeError,_g=function(t){try{return N_('"use strict"; return ('+t+").constructor;")()}catch{}},so=Object.getOwnPropertyDescriptor;if(so)try{so({},"")}catch{so=null}var Tg=function(){throw new pl},jj=so?function(){try{return arguments.callee,Tg}catch{try{return so(arguments,"callee").get}catch{return Tg}}}():Tg,To=Dj(),oi=Object.getPrototypeOf||function(t){return t.__proto__},Lo={},Bj=typeof Uint8Array>"u"?Ue:oi(Uint8Array),oo={"%AggregateError%":typeof AggregateError>"u"?Ue:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ue:ArrayBuffer,"%ArrayIteratorPrototype%":To?oi([][Symbol.iterator]()):Ue,"%AsyncFromSyncIteratorPrototype%":Ue,"%AsyncFunction%":Lo,"%AsyncGenerator%":Lo,"%AsyncGeneratorFunction%":Lo,"%AsyncIteratorPrototype%":Lo,"%Atomics%":typeof Atomics>"u"?Ue:Atomics,"%BigInt%":typeof BigInt>"u"?Ue:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ue:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ue:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ue:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Ue:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ue:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ue:FinalizationRegistry,"%Function%":N_,"%GeneratorFunction%":Lo,"%Int8Array%":typeof Int8Array>"u"?Ue:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ue:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ue:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":To?oi(oi([][Symbol.iterator]())):Ue,"%JSON%":typeof JSON=="object"?JSON:Ue,"%Map%":typeof Map>"u"?Ue:Map,"%MapIteratorPrototype%":typeof Map>"u"||!To?Ue:oi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ue:Promise,"%Proxy%":typeof Proxy>"u"?Ue:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Ue:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ue:Set,"%SetIteratorPrototype%":typeof Set>"u"||!To?Ue:oi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ue:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":To?oi(""[Symbol.iterator]()):Ue,"%Symbol%":To?Symbol:Ue,"%SyntaxError%":Ml,"%ThrowTypeError%":jj,"%TypedArray%":Bj,"%TypeError%":pl,"%Uint8Array%":typeof Uint8Array>"u"?Ue:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ue:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ue:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ue:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Ue:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ue:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ue:WeakSet};try{null.error}catch(t){var Fj=oi(oi(t));oo["%Error.prototype%"]=Fj}var Uj=function t(e){var n;if(e==="%AsyncFunction%")n=_g("async function () {}");else if(e==="%GeneratorFunction%")n=_g("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=_g("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&(n=oi(i.prototype))}return oo[e]=n,n},fk={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ku=Uv,Gh=Zj,Wj=Ku.call(Function.call,Array.prototype.concat),zj=Ku.call(Function.apply,Array.prototype.splice),hk=Ku.call(Function.call,String.prototype.replace),Hh=Ku.call(Function.call,String.prototype.slice),Yj=Ku.call(Function.call,RegExp.prototype.exec),qj=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Gj=/\\(\\)?/g,Hj=function(e){var n=Hh(e,0,1),r=Hh(e,-1);if(n==="%"&&r!=="%")throw new Ml("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ml("invalid intrinsic syntax, expected opening `%`");var i=[];return hk(e,qj,function(s,o,l,a){i[i.length]=l?hk(a,Gj,"$1"):o||s}),i},Kj=function(e,n){var r=e,i;if(Gh(fk,r)&&(i=fk[r],r="%"+i[0]+"%"),Gh(oo,r)){var s=oo[r];if(s===Lo&&(s=Uj(r)),typeof s>"u"&&!n)throw new pl("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:s}}throw new Ml("intrinsic "+e+" does not exist!")},Wv=function(e,n){if(typeof e!="string"||e.length===0)throw new pl("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new pl('"allowMissing" argument must be a boolean');if(Yj(/^%?[^%]*%?$/,e)===null)throw new Ml("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Hj(e),i=r.length>0?r[0]:"",s=Kj("%"+i+"%",n),o=s.name,l=s.value,a=!1,u=s.alias;u&&(i=u[0],zj(r,Wj([0,1],u)));for(var c=1,f=!0;c<r.length;c+=1){var h=r[c],p=Hh(h,0,1),d=Hh(h,-1);if((p==='"'||p==="'"||p==="`"||d==='"'||d==="'"||d==="`")&&p!==d)throw new Ml("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(a=!0),i+="."+h,o="%"+i+"%",Gh(oo,o))l=oo[o];else if(l!=null){if(!(h in l)){if(!n)throw new pl("base intrinsic for "+e+" exists, but the property is not available.");return}if(so&&c+1>=r.length){var g=so(l,h);f=!!g,f&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[h]}else f=Gh(l,h),l=l[h];f&&!a&&(oo[o]=l)}}return l},L_={exports:{}};(function(t){var e=Uv,n=Wv,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||e.call(i,r),o=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),a=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(f){var h=s(e,i,arguments);if(o&&l){var p=o(h,"length");p.configurable&&l(h,"length",{value:1+a(0,f.length-(arguments.length-1))})}return h};var u=function(){return s(e,r,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(L_);var zv=L_.exports,X_=Wv,V_=zv,Jj=V_(X_("String.prototype.indexOf")),Z_=function(e,n){var r=X_(e,!!n);return typeof r=="function"&&Jj(e,".prototype.")>-1?V_(r):r},eB=Fv(),tB=Z_,LO=tB("Object.prototype.toString"),Ld=function(e){return eB&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:LO(e)==="[object Arguments]"},j_=function(e){return Ld(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&LO(e)!=="[object Array]"&&LO(e.callee)==="[object Function]"},nB=function(){return Ld(arguments)}();Ld.isLegacyArguments=j_;var rB=nB?Ld:j_,iB=Wv,XO=iB("%Object.defineProperty%",!0),VO=function(){if(XO)try{return XO({},"a",{value:1}),!0}catch{return!1}return!1};VO.hasArrayLengthDefineBug=function(){if(!VO())return null;try{return XO([],"length",{value:1}).length!==1}catch{return!0}};var sB=VO,oB=M_,lB=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",aB=Object.prototype.toString,uB=Array.prototype.concat,B_=Object.defineProperty,cB=function(t){return typeof t=="function"&&aB.call(t)==="[object Function]"},fB=sB(),F_=B_&&fB,hB=function(t,e,n,r){if(e in t){if(r===!0){if(t[e]===n)return}else if(!cB(r)||!r())return}F_?B_(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n},U_=function(t,e){var n=arguments.length>2?arguments[2]:{},r=oB(e);lB&&(r=uB.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i<r.length;i+=1)hB(t,r[i],e[r[i]],n[r[i]])};U_.supportsDescriptors=!!F_;var Ju=U_,dk=function(t){return t!==t},W_=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||dk(e)&&dk(n))},dB=W_,z_=function(){return typeof Object.is=="function"?Object.is:dB},pB=z_,gB=Ju,mB=function(){var e=pB();return gB(Object,{is:e},{is:function(){return Object.is!==e}}),e},OB=Ju,vB=zv,yB=W_,Y_=z_,SB=mB,q_=vB(Y_(),Object);OB(q_,{getPolyfill:Y_,implementation:yB,shim:SB});var bB=q_,ZO=Z_,G_=Fv(),H_,K_,jO,BO;if(G_){H_=ZO("Object.prototype.hasOwnProperty"),K_=ZO("RegExp.prototype.exec"),jO={};var Rg=function(){throw jO};BO={toString:Rg,valueOf:Rg},typeof Symbol.toPrimitive=="symbol"&&(BO[Symbol.toPrimitive]=Rg)}var wB=ZO("Object.prototype.toString"),kB=Object.getOwnPropertyDescriptor,xB="[object RegExp]",PB=G_?function(e){if(!e||typeof e!="object")return!1;var n=kB(e,"lastIndex"),r=n&&H_(n,"value");if(!r)return!1;try{K_(e,BO)}catch(i){return i===jO}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:wB(e)===xB},J_={exports:{}},Ru=function(){return typeof(function(){}).name=="string"},Ya=Object.getOwnPropertyDescriptor;if(Ya)try{Ya([],"length")}catch{Ya=null}Ru.functionsHaveConfigurableNames=function(){if(!Ru()||!Ya)return!1;var e=Ya(function(){},"name");return!!e&&!!e.configurable};var CB=Function.prototype.bind;Ru.boundFunctionsHaveNames=function(){return Ru()&&typeof CB=="function"&&(function(){}).bind().name!==""};var QB=Ru;(function(t){var e=QB.functionsHaveConfigurableNames(),n=Object,r=TypeError;t.exports=function(){if(this!=null&&this!==n(this))throw new r("RegExp.prototype.flags getter called on non-object");var s="";return this.hasIndices&&(s+="d"),this.global&&(s+="g"),this.ignoreCase&&(s+="i"),this.multiline&&(s+="m"),this.dotAll&&(s+="s"),this.unicode&&(s+="u"),this.sticky&&(s+="y"),s},e&&Object.defineProperty&&Object.defineProperty(t.exports,"name",{value:"get flags"})})(J_);var eT=J_.exports,EB=eT,$B=Ju.supportsDescriptors,_B=Object.getOwnPropertyDescriptor,tT=function(){if($B&&/a/mig.flags==="gim"){var e=_B(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),n==="dy")return e.get}}return EB},TB=Ju.supportsDescriptors,RB=tT,AB=Object.getOwnPropertyDescriptor,DB=Object.defineProperty,MB=TypeError,pk=Object.getPrototypeOf,IB=/a/,NB=function(){if(!TB||!pk)throw new MB("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=RB(),n=pk(IB),r=AB(n,"flags");return(!r||r.get!==e)&&DB(n,"flags",{configurable:!0,enumerable:!1,get:e}),e},LB=Ju,XB=zv,VB=eT,nT=tT,ZB=NB,rT=XB(nT());LB(rT,{getPolyfill:nT,implementation:VB,shim:ZB});var jB=rT,BB=Date.prototype.getDay,FB=function(e){try{return BB.call(e),!0}catch{return!1}},UB=Object.prototype.toString,WB="[object Date]",zB=Fv(),YB=function(e){return typeof e!="object"||e===null?!1:zB?FB(e):UB.call(e)===WB},gk=M_,mk=rB,Ok=bB,vk=PB,yk=jB,Sk=YB,bk=Date.prototype.getTime;function iT(t,e,n){var r=n||{};return(r.strict?Ok(t,e):t===e)?!0:!t||!e||typeof t!="object"&&typeof e!="object"?r.strict?Ok(t,e):t==e:qB(t,e,r)}function wk(t){return t==null}function kk(t){return!(!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number")}function qB(t,e,n){var r,i;if(typeof t!=typeof e||wk(t)||wk(e)||t.prototype!==e.prototype||mk(t)!==mk(e))return!1;var s=vk(t),o=vk(e);if(s!==o)return!1;if(s||o)return t.source===e.source&&yk(t)===yk(e);if(Sk(t)&&Sk(e))return bk.call(t)===bk.call(e);var l=kk(t),a=kk(e);if(l!==a)return!1;if(l||a){if(t.length!==e.length)return!1;for(r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}if(typeof t!=typeof e)return!1;try{var u=gk(t),c=gk(e)}catch{return!1}if(u.length!==c.length)return!1;for(u.sort(),c.sort(),r=u.length-1;r>=0;r--)if(u[r]!=c[r])return!1;for(r=u.length-1;r>=0;r--)if(i=u[r],!iT(t[i],e[i],n))return!1;return!0}var GB=iT,FO=GB,UO;function xk(t,e,n,r,i){var s;return i?s=i.replaceOp(t,n,r):(s={p:t},s[e?"od":"ld"]=n,s[e?"oi":"li"]=r),[s]}function HB(t,e,n,r,i,s){const o=[];var l=UO.patch_make(e,n);return Object.keys(l).forEach(function(a){var u=l[a],c=u.start1;u.diffs.forEach(function([f,h]){switch(f){case r.DIFF_DELETE:if(s){var p=s.remove(c,h);o.push(i.editOp(t,s.type,p))}else o.push({sd:h,p:[...t,c]});break;case r.DIFF_INSERT:if(s){var p=s.insert(c,h);o.push(i.editOp(t,s.type,p))}else o.push({si:h,p:[...t,c]});case r.DIFF_EQUAL:c+=h.length;break;default:throw Error(`Unsupported operation type: ${f}`)}})}),o}var KB=function(t,e){if(e&&e.json1){var n=e.json1.type.compose;return t.reduce(n,null)}for(var r=0,i=t.length-1;r<i;++r){var s=t[r],o=t[r+1];FO(s.p.slice(0,-1),o.p.slice(0,-1))&&s.p[s.p.length-1]+1===o.p[o.p.length-1]&&(!s.li||!o.ld||FO(s.li,o.ld)&&(delete s.li,delete o.ld))}return t=t.filter(function(l){return Object.keys(l).length>1}),t},Ta=function(t,e,n=[],r){var i=r&&r.diffMatchPatch,s=r&&r.json1,o=r&&r.textUnicode,l=typeof n[n.length-1]=="string"||n.length===0;if(FO(t,e)&&Array.isArray(t)===Array.isArray(e))return[];if(typeof e>"u"){var a;return s?a=s.removeOp(n,t):(a={p:n},a[l?"od":"ld"]=t),[a]}if(typeof t>"u"){var a;return s?a=s.insertOp(n,e):(a={p:n},a[l?"oi":"li"]=e),[a]}if(t===null||e===null){var m=[];if(s)m.push(s.removeOp(n,t)),m.push(s.insertOp(n,e));else{var u={p:n};u[l?"od":"ld"]=t;var c={p:n};c[l?"oi":"li"]=e,m=[u,c]}return m}if(i&&typeof t=="string"&&typeof e=="string")return UO||(UO=new i),HB(n,t,e,i,s,o);var f=["string","number","boolean"];if(f.includes(typeof e)||f.includes(typeof t))return xk(n,l,t,e,s);if(Array.isArray(e)&&Array.isArray(t)){for(var m=[],h=t.length,p=e.length,d=Math.min(h,p),m=[],g=0;g<d;++g){var O=Ta(t[g],e[g],[...n,g],r);O.forEach(function(b){m.push(b)})}if(p>h)for(var g=d;g<p;g++){var O=Ta(void 0,e[g],[...n,g],r);O.forEach(function(Q){m.push(Q)})}else if(p<h)for(var g=d;g<h;g++){var O=Ta(t[g],void 0,[...n,d],r);O.forEach(function(Q){m.push(Q)})}return m}else if(Array.isArray(e)||Array.isArray(t))return xk(n,l,t,e,s);var m=[],S=new Set([...Object.keys(t),...Object.keys(e)]);return S.forEach(function(y){var b=Ta(t[y],e[y],[...n,y],r);m=m.concat(b)}),m},JB=function(t,e,n,r,i){var s={diffMatchPatch:n,json1:r,textUnicode:i};return KB(Ta(t,e,[],s),s)},eF=JB;const tF=Ds(eF);var sT={exports:{}};(function(t){var e=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,i=0;e.Diff=function(s,o){return[s,o]},e.prototype.diff_main=function(s,o,l,a){typeof a>"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var u=a;if(s==null||o==null)throw new Error("Null input. (diff_main)");if(s==o)return s?[new e.Diff(i,s)]:[];typeof l>"u"&&(l=!0);var c=l,f=this.diff_commonPrefix(s,o),h=s.substring(0,f);s=s.substring(f),o=o.substring(f),f=this.diff_commonSuffix(s,o);var p=s.substring(s.length-f);s=s.substring(0,s.length-f),o=o.substring(0,o.length-f);var d=this.diff_compute_(s,o,c,u);return h&&d.unshift(new e.Diff(i,h)),p&&d.push(new e.Diff(i,p)),this.diff_cleanupMerge(d),d},e.prototype.diff_compute_=function(s,o,l,a){var u;if(!s)return[new e.Diff(r,o)];if(!o)return[new e.Diff(n,s)];var c=s.length>o.length?s:o,f=s.length>o.length?o:s,h=c.indexOf(f);if(h!=-1)return u=[new e.Diff(r,c.substring(0,h)),new e.Diff(i,f),new e.Diff(r,c.substring(h+f.length))],s.length>o.length&&(u[0][0]=u[2][0]=n),u;if(f.length==1)return[new e.Diff(n,s),new e.Diff(r,o)];var p=this.diff_halfMatch_(s,o);if(p){var d=p[0],g=p[1],O=p[2],m=p[3],S=p[4],y=this.diff_main(d,O,l,a),b=this.diff_main(g,m,l,a);return y.concat([new e.Diff(i,S)],b)}return l&&s.length>100&&o.length>100?this.diff_lineMode_(s,o,a):this.diff_bisect_(s,o,a)},e.prototype.diff_lineMode_=function(s,o,l){var a=this.diff_linesToChars_(s,o);s=a.chars1,o=a.chars2;var u=a.lineArray,c=this.diff_main(s,o,!1,l);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(i,""));for(var f=0,h=0,p=0,d="",g="";f<c.length;){switch(c[f][0]){case r:p++,g+=c[f][1];break;case n:h++,d+=c[f][1];break;case i:if(h>=1&&p>=1){c.splice(f-h-p,h+p),f=f-h-p;for(var O=this.diff_main(d,g,!1,l),m=O.length-1;m>=0;m--)c.splice(f,0,O[m]);f=f+O.length}p=0,h=0,d="",g="";break}f++}return c.pop(),c},e.prototype.diff_bisect_=function(s,o,l){for(var a=s.length,u=o.length,c=Math.ceil((a+u)/2),f=c,h=2*c,p=new Array(h),d=new Array(h),g=0;g<h;g++)p[g]=-1,d[g]=-1;p[f+1]=0,d[f+1]=0;for(var O=a-u,m=O%2!=0,S=0,y=0,b=0,C=0,Q=0;Q<c&&!(new Date().getTime()>l);Q++){for(var _=-Q+S;_<=Q-y;_+=2){var k=f+_,w;_==-Q||_!=Q&&p[k-1]<p[k+1]?w=p[k+1]:w=p[k-1]+1;for(var P=w-_;w<a&&P<u&&s.charAt(w)==o.charAt(P);)w++,P++;if(p[k]=w,w>a)y+=2;else if(P>u)S+=2;else if(m){var E=f+O-_;if(E>=0&&E<h&&d[E]!=-1){var A=a-d[E];if(w>=A)return this.diff_bisectSplit_(s,o,w,P,l)}}}for(var M=-Q+b;M<=Q-C;M+=2){var E=f+M,A;M==-Q||M!=Q&&d[E-1]<d[E+1]?A=d[E+1]:A=d[E-1]+1;for(var N=A-M;A<a&&N<u&&s.charAt(a-A-1)==o.charAt(u-N-1);)A++,N++;if(d[E]=A,A>a)C+=2;else if(N>u)b+=2;else if(!m){var k=f+O-M;if(k>=0&&k<h&&p[k]!=-1){var w=p[k],P=f+w-k;if(A=a-A,w>=A)return this.diff_bisectSplit_(s,o,w,P,l)}}}}return[new e.Diff(n,s),new e.Diff(r,o)]},e.prototype.diff_bisectSplit_=function(s,o,l,a,u){var c=s.substring(0,l),f=o.substring(0,a),h=s.substring(l),p=o.substring(a),d=this.diff_main(c,f,!1,u),g=this.diff_main(h,p,!1,u);return d.concat(g)},e.prototype.diff_linesToChars_=function(s,o){var l=[],a={};l[0]="";function u(p){for(var d="",g=0,O=-1,m=l.length;O<p.length-1;){O=p.indexOf(`
70
- `,g),O==-1&&(O=p.length-1);var S=p.substring(g,O+1);(a.hasOwnProperty?a.hasOwnProperty(S):a[S]!==void 0)?d+=String.fromCharCode(a[S]):(m==c&&(S=p.substring(g),O=p.length),d+=String.fromCharCode(m),a[S]=m,l[m++]=S),g=O+1}return d}var c=4e4,f=u(s);c=65535;var h=u(o);return{chars1:f,chars2:h,lineArray:l}},e.prototype.diff_charsToLines_=function(s,o){for(var l=0;l<s.length;l++){for(var a=s[l][1],u=[],c=0;c<a.length;c++)u[c]=o[a.charCodeAt(c)];s[l][1]=u.join("")}},e.prototype.diff_commonPrefix=function(s,o){if(!s||!o||s.charAt(0)!=o.charAt(0))return 0;for(var l=0,a=Math.min(s.length,o.length),u=a,c=0;l<u;)s.substring(c,u)==o.substring(c,u)?(l=u,c=l):a=u,u=Math.floor((a-l)/2+l);return u},e.prototype.diff_commonSuffix=function(s,o){if(!s||!o||s.charAt(s.length-1)!=o.charAt(o.length-1))return 0;for(var l=0,a=Math.min(s.length,o.length),u=a,c=0;l<u;)s.substring(s.length-u,s.length-c)==o.substring(o.length-u,o.length-c)?(l=u,c=l):a=u,u=Math.floor((a-l)/2+l);return u},e.prototype.diff_commonOverlap_=function(s,o){var l=s.length,a=o.length;if(l==0||a==0)return 0;l>a?s=s.substring(l-a):l<a&&(o=o.substring(0,l));var u=Math.min(l,a);if(s==o)return u;for(var c=0,f=1;;){var h=s.substring(u-f),p=o.indexOf(h);if(p==-1)return c;f+=p,(p==0||s.substring(u-f)==o.substring(0,f))&&(c=f,f++)}},e.prototype.diff_halfMatch_=function(s,o){if(this.Diff_Timeout<=0)return null;var l=s.length>o.length?s:o,a=s.length>o.length?o:s;if(l.length<4||a.length*2<l.length)return null;var u=this;function c(y,b,C){for(var Q=y.substring(C,C+Math.floor(y.length/4)),_=-1,k="",w,P,E,A;(_=b.indexOf(Q,_+1))!=-1;){var M=u.diff_commonPrefix(y.substring(C),b.substring(_)),N=u.diff_commonSuffix(y.substring(0,C),b.substring(0,_));k.length<N+M&&(k=b.substring(_-N,_)+b.substring(_,_+M),w=y.substring(0,C-N),P=y.substring(C+M),E=b.substring(0,_-N),A=b.substring(_+M))}return k.length*2>=y.length?[w,P,E,A,k]:null}var f=c(l,a,Math.ceil(l.length/4)),h=c(l,a,Math.ceil(l.length/2)),p;if(!f&&!h)return null;h?f?p=f[4].length>h[4].length?f:h:p=h:p=f;var d,g,O,m;s.length>o.length?(d=p[0],g=p[1],O=p[2],m=p[3]):(O=p[0],m=p[1],d=p[2],g=p[3]);var S=p[4];return[d,g,O,m,S]},e.prototype.diff_cleanupSemantic=function(s){for(var o=!1,l=[],a=0,u=null,c=0,f=0,h=0,p=0,d=0;c<s.length;)s[c][0]==i?(l[a++]=c,f=p,h=d,p=0,d=0,u=s[c][1]):(s[c][0]==r?p+=s[c][1].length:d+=s[c][1].length,u&&u.length<=Math.max(f,h)&&u.length<=Math.max(p,d)&&(s.splice(l[a-1],0,new e.Diff(n,u)),s[l[a-1]+1][0]=r,a--,a--,c=a>0?l[a-1]:-1,f=0,h=0,p=0,d=0,u=null,o=!0)),c++;for(o&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),c=1;c<s.length;){if(s[c-1][0]==n&&s[c][0]==r){var g=s[c-1][1],O=s[c][1],m=this.diff_commonOverlap_(g,O),S=this.diff_commonOverlap_(O,g);m>=S?(m>=g.length/2||m>=O.length/2)&&(s.splice(c,0,new e.Diff(i,O.substring(0,m))),s[c-1][1]=g.substring(0,g.length-m),s[c+1][1]=O.substring(m),c++):(S>=g.length/2||S>=O.length/2)&&(s.splice(c,0,new e.Diff(i,g.substring(0,S))),s[c-1][0]=r,s[c-1][1]=O.substring(0,O.length-S),s[c+1][0]=n,s[c+1][1]=g.substring(S),c++),c++}c++}},e.prototype.diff_cleanupSemanticLossless=function(s){function o(S,y){if(!S||!y)return 6;var b=S.charAt(S.length-1),C=y.charAt(0),Q=b.match(e.nonAlphaNumericRegex_),_=C.match(e.nonAlphaNumericRegex_),k=Q&&b.match(e.whitespaceRegex_),w=_&&C.match(e.whitespaceRegex_),P=k&&b.match(e.linebreakRegex_),E=w&&C.match(e.linebreakRegex_),A=P&&S.match(e.blanklineEndRegex_),M=E&&y.match(e.blanklineStartRegex_);return A||M?5:P||E?4:Q&&!k&&w?3:k||w?2:Q||_?1:0}for(var l=1;l<s.length-1;){if(s[l-1][0]==i&&s[l+1][0]==i){var a=s[l-1][1],u=s[l][1],c=s[l+1][1],f=this.diff_commonSuffix(a,u);if(f){var h=u.substring(u.length-f);a=a.substring(0,a.length-f),u=h+u.substring(0,u.length-f),c=h+c}for(var p=a,d=u,g=c,O=o(a,u)+o(u,c);u.charAt(0)===c.charAt(0);){a+=u.charAt(0),u=u.substring(1)+c.charAt(0),c=c.substring(1);var m=o(a,u)+o(u,c);m>=O&&(O=m,p=a,d=u,g=c)}s[l-1][1]!=p&&(p?s[l-1][1]=p:(s.splice(l-1,1),l--),s[l][1]=d,g?s[l+1][1]=g:(s.splice(l+1,1),l--))}l++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(s){for(var o=!1,l=[],a=0,u=null,c=0,f=!1,h=!1,p=!1,d=!1;c<s.length;)s[c][0]==i?(s[c][1].length<this.Diff_EditCost&&(p||d)?(l[a++]=c,f=p,h=d,u=s[c][1]):(a=0,u=null),p=d=!1):(s[c][0]==n?d=!0:p=!0,u&&(f&&h&&p&&d||u.length<this.Diff_EditCost/2&&f+h+p+d==3)&&(s.splice(l[a-1],0,new e.Diff(n,u)),s[l[a-1]+1][0]=r,a--,u=null,f&&h?(p=d=!0,a=0):(a--,c=a>0?l[a-1]:-1,p=d=!1),o=!0)),c++;o&&this.diff_cleanupMerge(s)},e.prototype.diff_cleanupMerge=function(s){s.push(new e.Diff(i,""));for(var o=0,l=0,a=0,u="",c="",f;o<s.length;)switch(s[o][0]){case r:a++,c+=s[o][1],o++;break;case n:l++,u+=s[o][1],o++;break;case i:l+a>1?(l!==0&&a!==0&&(f=this.diff_commonPrefix(c,u),f!==0&&(o-l-a>0&&s[o-l-a-1][0]==i?s[o-l-a-1][1]+=c.substring(0,f):(s.splice(0,0,new e.Diff(i,c.substring(0,f))),o++),c=c.substring(f),u=u.substring(f)),f=this.diff_commonSuffix(c,u),f!==0&&(s[o][1]=c.substring(c.length-f)+s[o][1],c=c.substring(0,c.length-f),u=u.substring(0,u.length-f))),o-=l+a,s.splice(o,l+a),u.length&&(s.splice(o,0,new e.Diff(n,u)),o++),c.length&&(s.splice(o,0,new e.Diff(r,c)),o++),o++):o!==0&&s[o-1][0]==i?(s[o-1][1]+=s[o][1],s.splice(o,1)):o++,a=0,l=0,u="",c="";break}s[s.length-1][1]===""&&s.pop();var h=!1;for(o=1;o<s.length-1;)s[o-1][0]==i&&s[o+1][0]==i&&(s[o][1].substring(s[o][1].length-s[o-1][1].length)==s[o-1][1]?(s[o][1]=s[o-1][1]+s[o][1].substring(0,s[o][1].length-s[o-1][1].length),s[o+1][1]=s[o-1][1]+s[o+1][1],s.splice(o-1,1),h=!0):s[o][1].substring(0,s[o+1][1].length)==s[o+1][1]&&(s[o-1][1]+=s[o+1][1],s[o][1]=s[o][1].substring(s[o+1][1].length)+s[o+1][1],s.splice(o+1,1),h=!0)),o++;h&&this.diff_cleanupMerge(s)},e.prototype.diff_xIndex=function(s,o){var l=0,a=0,u=0,c=0,f;for(f=0;f<s.length&&(s[f][0]!==r&&(l+=s[f][1].length),s[f][0]!==n&&(a+=s[f][1].length),!(l>o));f++)u=l,c=a;return s.length!=f&&s[f][0]===n?c:c+(o-u)},e.prototype.diff_prettyHtml=function(s){for(var o=[],l=/&/g,a=/</g,u=/>/g,c=/\n/g,f=0;f<s.length;f++){var h=s[f][0],p=s[f][1],d=p.replace(l,"&amp;").replace(a,"&lt;").replace(u,"&gt;").replace(c,"&para;<br>");switch(h){case r:o[f]='<ins style="background:#e6ffe6;">'+d+"</ins>";break;case n:o[f]='<del style="background:#ffe6e6;">'+d+"</del>";break;case i:o[f]="<span>"+d+"</span>";break}}return o.join("")},e.prototype.diff_text1=function(s){for(var o=[],l=0;l<s.length;l++)s[l][0]!==r&&(o[l]=s[l][1]);return o.join("")},e.prototype.diff_text2=function(s){for(var o=[],l=0;l<s.length;l++)s[l][0]!==n&&(o[l]=s[l][1]);return o.join("")},e.prototype.diff_levenshtein=function(s){for(var o=0,l=0,a=0,u=0;u<s.length;u++){var c=s[u][0],f=s[u][1];switch(c){case r:l+=f.length;break;case n:a+=f.length;break;case i:o+=Math.max(l,a),l=0,a=0;break}}return o+=Math.max(l,a),o},e.prototype.diff_toDelta=function(s){for(var o=[],l=0;l<s.length;l++)switch(s[l][0]){case r:o[l]="+"+encodeURI(s[l][1]);break;case n:o[l]="-"+s[l][1].length;break;case i:o[l]="="+s[l][1].length;break}return o.join(" ").replace(/%20/g," ")},e.prototype.diff_fromDelta=function(s,o){for(var l=[],a=0,u=0,c=o.split(/\t/g),f=0;f<c.length;f++){var h=c[f].substring(1);switch(c[f].charAt(0)){case"+":try{l[a++]=new e.Diff(r,decodeURI(h))}catch{throw new Error("Illegal escape in diff_fromDelta: "+h)}break;case"-":case"=":var p=parseInt(h,10);if(isNaN(p)||p<0)throw new Error("Invalid number in diff_fromDelta: "+h);var d=s.substring(u,u+=p);c[f].charAt(0)=="="?l[a++]=new e.Diff(i,d):l[a++]=new e.Diff(n,d);break;default:if(c[f])throw new Error("Invalid diff operation in diff_fromDelta: "+c[f])}}if(u!=s.length)throw new Error("Delta length ("+u+") does not equal source text length ("+s.length+").");return l},e.prototype.match_main=function(s,o,l){if(s==null||o==null||l==null)throw new Error("Null input. (match_main)");return l=Math.max(0,Math.min(l,s.length)),s==o?0:s.length?s.substring(l,l+o.length)==o?l:this.match_bitap_(s,o,l):-1},e.prototype.match_bitap_=function(s,o,l){if(o.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(o),u=this;function c(w,P){var E=w/o.length,A=Math.abs(l-P);return u.Match_Distance?E+A/u.Match_Distance:A?1:E}var f=this.Match_Threshold,h=s.indexOf(o,l);h!=-1&&(f=Math.min(c(0,h),f),h=s.lastIndexOf(o,l+o.length),h!=-1&&(f=Math.min(c(0,h),f)));var p=1<<o.length-1;h=-1;for(var d,g,O=o.length+s.length,m,S=0;S<o.length;S++){for(d=0,g=O;d<g;)c(S,l+g)<=f?d=g:O=g,g=Math.floor((O-d)/2+d);O=g;var y=Math.max(1,l-g+1),b=Math.min(l+g,s.length)+o.length,C=Array(b+2);C[b+1]=(1<<S)-1;for(var Q=b;Q>=y;Q--){var _=a[s.charAt(Q-1)];if(S===0?C[Q]=(C[Q+1]<<1|1)&_:C[Q]=(C[Q+1]<<1|1)&_|((m[Q+1]|m[Q])<<1|1)|m[Q+1],C[Q]&p){var k=c(S,Q-1);if(k<=f)if(f=k,h=Q-1,h>l)y=Math.max(1,2*l-h);else break}}if(c(S+1,l)>f)break;m=C}return h},e.prototype.match_alphabet_=function(s){for(var o={},l=0;l<s.length;l++)o[s.charAt(l)]=0;for(var l=0;l<s.length;l++)o[s.charAt(l)]|=1<<s.length-l-1;return o},e.prototype.patch_addContext_=function(s,o){if(o.length!=0){if(s.start2===null)throw Error("patch not initialized");for(var l=o.substring(s.start2,s.start2+s.length1),a=0;o.indexOf(l)!=o.lastIndexOf(l)&&l.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)a+=this.Patch_Margin,l=o.substring(s.start2-a,s.start2+s.length1+a);a+=this.Patch_Margin;var u=o.substring(s.start2-a,s.start2);u&&s.diffs.unshift(new e.Diff(i,u));var c=o.substring(s.start2+s.length1,s.start2+s.length1+a);c&&s.diffs.push(new e.Diff(i,c)),s.start1-=u.length,s.start2-=u.length,s.length1+=u.length+c.length,s.length2+=u.length+c.length}},e.prototype.patch_make=function(s,o,l){var a,u;if(typeof s=="string"&&typeof o=="string"&&typeof l>"u")a=s,u=this.diff_main(a,o,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(s&&typeof s=="object"&&typeof o>"u"&&typeof l>"u")u=s,a=this.diff_text1(u);else if(typeof s=="string"&&o&&typeof o=="object"&&typeof l>"u")a=s,u=o;else if(typeof s=="string"&&typeof o=="string"&&l&&typeof l=="object")a=s,u=l;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],f=new e.patch_obj,h=0,p=0,d=0,g=a,O=a,m=0;m<u.length;m++){var S=u[m][0],y=u[m][1];switch(!h&&S!==i&&(f.start1=p,f.start2=d),S){case r:f.diffs[h++]=u[m],f.length2+=y.length,O=O.substring(0,d)+y+O.substring(d);break;case n:f.length1+=y.length,f.diffs[h++]=u[m],O=O.substring(0,d)+O.substring(d+y.length);break;case i:y.length<=2*this.Patch_Margin&&h&&u.length!=m+1?(f.diffs[h++]=u[m],f.length1+=y.length,f.length2+=y.length):y.length>=2*this.Patch_Margin&&h&&(this.patch_addContext_(f,g),c.push(f),f=new e.patch_obj,h=0,g=O,p=d);break}S!==r&&(p+=y.length),S!==n&&(d+=y.length)}return h&&(this.patch_addContext_(f,g),c.push(f)),c},e.prototype.patch_deepCopy=function(s){for(var o=[],l=0;l<s.length;l++){var a=s[l],u=new e.patch_obj;u.diffs=[];for(var c=0;c<a.diffs.length;c++)u.diffs[c]=new e.Diff(a.diffs[c][0],a.diffs[c][1]);u.start1=a.start1,u.start2=a.start2,u.length1=a.length1,u.length2=a.length2,o[l]=u}return o},e.prototype.patch_apply=function(s,o){if(s.length==0)return[o,[]];s=this.patch_deepCopy(s);var l=this.patch_addPadding(s);o=l+o+l,this.patch_splitMax(s);for(var a=0,u=[],c=0;c<s.length;c++){var f=s[c].start2+a,h=this.diff_text1(s[c].diffs),p,d=-1;if(h.length>this.Match_MaxBits?(p=this.match_main(o,h.substring(0,this.Match_MaxBits),f),p!=-1&&(d=this.match_main(o,h.substring(h.length-this.Match_MaxBits),f+h.length-this.Match_MaxBits),(d==-1||p>=d)&&(p=-1))):p=this.match_main(o,h,f),p==-1)u[c]=!1,a-=s[c].length2-s[c].length1;else{u[c]=!0,a=p-f;var g;if(d==-1?g=o.substring(p,p+h.length):g=o.substring(p,d+this.Match_MaxBits),h==g)o=o.substring(0,p)+this.diff_text2(s[c].diffs)+o.substring(p+h.length);else{var O=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(O)/h.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(O);for(var m=0,S,y=0;y<s[c].diffs.length;y++){var b=s[c].diffs[y];b[0]!==i&&(S=this.diff_xIndex(O,m)),b[0]===r?o=o.substring(0,p+S)+b[1]+o.substring(p+S):b[0]===n&&(o=o.substring(0,p+S)+o.substring(p+this.diff_xIndex(O,m+b[1].length))),b[0]!==n&&(m+=b[1].length)}}}}}return o=o.substring(l.length,o.length-l.length),[o,u]},e.prototype.patch_addPadding=function(s){for(var o=this.Patch_Margin,l="",a=1;a<=o;a++)l+=String.fromCharCode(a);for(var a=0;a<s.length;a++)s[a].start1+=o,s[a].start2+=o;var u=s[0],c=u.diffs;if(c.length==0||c[0][0]!=i)c.unshift(new e.Diff(i,l)),u.start1-=o,u.start2-=o,u.length1+=o,u.length2+=o;else if(o>c[0][1].length){var f=o-c[0][1].length;c[0][1]=l.substring(c[0][1].length)+c[0][1],u.start1-=f,u.start2-=f,u.length1+=f,u.length2+=f}if(u=s[s.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=i)c.push(new e.Diff(i,l)),u.length1+=o,u.length2+=o;else if(o>c[c.length-1][1].length){var f=o-c[c.length-1][1].length;c[c.length-1][1]+=l.substring(0,f),u.length1+=f,u.length2+=f}return l},e.prototype.patch_splitMax=function(s){for(var o=this.Match_MaxBits,l=0;l<s.length;l++)if(!(s[l].length1<=o)){var a=s[l];s.splice(l--,1);for(var u=a.start1,c=a.start2,f="";a.diffs.length!==0;){var h=new e.patch_obj,p=!0;for(h.start1=u-f.length,h.start2=c-f.length,f!==""&&(h.length1=h.length2=f.length,h.diffs.push(new e.Diff(i,f)));a.diffs.length!==0&&h.length1<o-this.Patch_Margin;){var d=a.diffs[0][0],g=a.diffs[0][1];d===r?(h.length2+=g.length,c+=g.length,h.diffs.push(a.diffs.shift()),p=!1):d===n&&h.diffs.length==1&&h.diffs[0][0]==i&&g.length>2*o?(h.length1+=g.length,u+=g.length,p=!1,h.diffs.push(new e.Diff(d,g)),a.diffs.shift()):(g=g.substring(0,o-h.length1-this.Patch_Margin),h.length1+=g.length,u+=g.length,d===i?(h.length2+=g.length,c+=g.length):p=!1,h.diffs.push(new e.Diff(d,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}f=this.diff_text2(h.diffs),f=f.substring(f.length-this.Patch_Margin);var O=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);O!==""&&(h.length1+=O.length,h.length2+=O.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===i?h.diffs[h.diffs.length-1][1]+=O:h.diffs.push(new e.Diff(i,O))),p||s.splice(++l,0,h)}}},e.prototype.patch_toText=function(s){for(var o=[],l=0;l<s.length;l++)o[l]=s[l];return o.join("")},e.prototype.patch_fromText=function(s){var o=[];if(!s)return o;for(var l=s.split(`
71
- `),a=0,u=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;a<l.length;){var c=l[a].match(u);if(!c)throw new Error("Invalid patch string: "+l[a]);var f=new e.patch_obj;for(o.push(f),f.start1=parseInt(c[1],10),c[2]===""?(f.start1--,f.length1=1):c[2]=="0"?f.length1=0:(f.start1--,f.length1=parseInt(c[2],10)),f.start2=parseInt(c[3],10),c[4]===""?(f.start2--,f.length2=1):c[4]=="0"?f.length2=0:(f.start2--,f.length2=parseInt(c[4],10)),a++;a<l.length;){var h=l[a].charAt(0);try{var p=decodeURI(l[a].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+p)}if(h=="-")f.diffs.push(new e.Diff(n,p));else if(h=="+")f.diffs.push(new e.Diff(r,p));else if(h==" ")f.diffs.push(new e.Diff(i,p));else{if(h=="@")break;if(h!=="")throw new Error('Invalid patch mode "'+h+'" in: '+p)}a++}}return o},e.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},e.patch_obj.prototype.toString=function(){var s,o;this.length1===0?s=this.start1+",0":this.length1==1?s=this.start1+1:s=this.start1+1+","+this.length1,this.length2===0?o=this.start2+",0":this.length2==1?o=this.start2+1:o=this.start2+1+","+this.length2;for(var l=["@@ -"+s+" +"+o+` @@
72
- `],a,u=0;u<this.diffs.length;u++){switch(this.diffs[u][0]){case r:a="+";break;case n:a="-";break;case i:a=" ";break}l[u+1]=a+encodeURI(this.diffs[u][1])+`
73
- `}return l.join("").replace(/%20/g," ")},t.exports=e,t.exports.diff_match_patch=e,t.exports.DIFF_DELETE=n,t.exports.DIFF_INSERT=r,t.exports.DIFF_EQUAL=i})(sT);var nF=sT.exports;const rF=Ds(nF),Ag=(t,e)=>tF(t,e,rF,ev,xC);var oT={exports:{}};/*!
74
- Copyright (c) 2018 Jed Watson.
75
- Licensed under the MIT License (MIT), see
76
- http://jedwatson.github.io/classnames
77
- */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var s=arguments[i];if(s){var o=typeof s;if(o==="string"||o==="number")r.push(s);else if(Array.isArray(s)){if(s.length){var l=n.apply(null,s);l&&r.push(l)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){r.push(s.toString());continue}for(var a in s)e.call(s,a)&&s[a]&&r.push(a)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(oT);var iF=oT.exports;const Lt=Ds(iF),Ul=!!(typeof window<"u"&&window.document&&window.document.createElement);var WO=!1,zO=!1;try{var Dg={get passive(){return WO=!0},get once(){return zO=WO=!0}};Ul&&(window.addEventListener("test",Dg,Dg),window.removeEventListener("test",Dg,!0))}catch{}function lT(t,e,n,r){if(r&&typeof r!="boolean"&&!zO){var i=r.once,s=r.capture,o=n;!zO&&i&&(o=n.__once||function l(a){this.removeEventListener(e,l,s),n.call(this,a)},n.__once=o),t.addEventListener(e,o,WO?r:s)}t.addEventListener(e,n,r)}function Xd(t){return t&&t.ownerDocument||document}function YO(t,e,n,r){var i=r&&typeof r!="boolean"?r.capture:r;t.removeEventListener(e,n,i),n.__once&&t.removeEventListener(e,n.__once,i)}var ff;function Pk(t){if((!ff&&ff!==0||t)&&Ul){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),ff=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return ff}function sF(){return R.useState(null)}function oF(t){var e=R.useRef(t);return R.useEffect(function(){e.current=t},[t]),e}function fi(t){var e=oF(t);return R.useCallback(function(){return e.current&&e.current.apply(e,arguments)},[e])}var Ck=function(e){return!e||typeof e=="function"?e:function(n){e.current=n}};function lF(t,e){var n=Ck(t),r=Ck(e);return function(i){n&&n(i),r&&r(i)}}function Vd(t,e){return R.useMemo(function(){return lF(t,e)},[t,e])}function aF(t){var e=R.useRef(t);return e.current=t,e}function aT(t){var e=aF(t);R.useEffect(function(){return function(){return e.current()}},[])}function uF(t){var e=Xd(t);return e&&e.defaultView||window}function cF(t,e){return uF(t).getComputedStyle(t,e)}var fF=/([A-Z])/g;function hF(t){return t.replace(fF,"-$1").toLowerCase()}var dF=/^ms-/;function hf(t){return hF(t).replace(dF,"-ms-")}var pF=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function gF(t){return!!(t&&pF.test(t))}function lo(t,e){var n="",r="";if(typeof e=="string")return t.style.getPropertyValue(hf(e))||cF(t).getPropertyValue(hf(e));Object.keys(e).forEach(function(i){var s=e[i];!s&&s!==0?t.style.removeProperty(hf(i)):gF(i)?r+=i+"("+s+") ":n+=hf(i)+": "+s+";"}),r&&(n+="transform: "+r+";"),t.style.cssText+=";"+n}function Kh(t,e,n,r){return lT(t,e,n,r),function(){YO(t,e,n,r)}}function mF(t,e,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),t){var i=document.createEvent("HTMLEvents");i.initEvent(e,n,r),t.dispatchEvent(i)}}function OF(t){var e=lo(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function vF(t,e,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||mF(t,"transitionend",!0)},e+n),s=Kh(t,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),s()}}function uT(t,e,n,r){n==null&&(n=OF(t)||0);var i=vF(t,n,r),s=Kh(t,"transitionend",e);return function(){i(),s()}}function Mg(t){t===void 0&&(t=Xd());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function Qk(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}function yF(){var t=R.useRef(!0),e=R.useRef(function(){return t.current});return R.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e.current}function SF(t){var e=R.useRef(null);return R.useEffect(function(){e.current=t}),e.current}const bF="data-rr-ui-";function wF(t){return`${bF}${t}`}function kF(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const Ek=wF("modal-open");class xF{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return kF(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();e.style={overflow:i.style.overflow,[r]:i.style[r]},e.scrollBarWidth&&(n[r]=`${parseInt(lo(i,r)||"0",10)+e.scrollBarWidth}px`),i.setAttribute(Ek,""),lo(i,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(Ek),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const Yv=xF,cT=R.createContext(Ul?window:void 0);cT.Provider;function fT(){return R.useContext(cT)}const Ig=(t,e)=>Ul?t==null?(e||Xd()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function PF(t,e){const n=fT(),[r,i]=R.useState(()=>Ig(t,n==null?void 0:n.document));if(!r){const s=Ig(t);s&&i(s)}return R.useEffect(()=>{e&&r&&e(r)},[e,r]),R.useEffect(()=>{const s=Ig(t);s!==r&&i(s)},[t,r]),r}var CF=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",QF=typeof document<"u";const $k=QF||CF?R.useLayoutEffect:R.useEffect;function EF({children:t,in:e,onExited:n,mountOnEnter:r,unmountOnExit:i}){const s=R.useRef(null),o=R.useRef(e),l=fi(n);R.useEffect(()=>{e?o.current=!0:l(s.current)},[e,l]);const a=Vd(s,t.ref),u=R.cloneElement(t,{ref:a});return e?u:i||!o.current&&r?null:u}function $F({in:t,onTransition:e}){const n=R.useRef(null),r=R.useRef(!0),i=fi(e);return $k(()=>{if(!n.current)return;let s=!1;return i({in:t,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[t,i]),$k(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function _F({children:t,in:e,onExited:n,onEntered:r,transition:i}){const[s,o]=R.useState(!e);e&&s&&o(!1);const l=$F({in:!!e,onTransition:u=>{const c=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(o(!0),n==null||n(u.element)))};Promise.resolve(i(u)).then(c,f=>{throw u.in||o(!0),f})}}),a=Vd(l,t.ref);return s&&!e?null:R.cloneElement(t,{ref:a})}function _k(t,e,n){return t?U.jsx(t,Object.assign({},n)):e?U.jsx(_F,Object.assign({},n,{transition:e})):U.jsx(EF,Object.assign({},n))}function TF(t){return t.code==="Escape"||t.keyCode===27}const RF=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function AF(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let Ng;function DF(t){return Ng||(Ng=new Yv({ownerDocument:t==null?void 0:t.document})),Ng}function MF(t){const e=fT(),n=t||DF(e),r=R.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:R.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:R.useCallback(i=>{r.current.backdrop=i},[])})}const hT=R.forwardRef((t,e)=>{let{show:n=!1,role:r="dialog",className:i,style:s,children:o,backdrop:l=!0,keyboard:a=!0,onBackdropClick:u,onEscapeKeyDown:c,transition:f,runTransition:h,backdropTransition:p,runBackdropTransition:d,autoFocus:g=!0,enforceFocus:O=!0,restoreFocus:m=!0,restoreFocusOptions:S,renderDialog:y,renderBackdrop:b=F=>U.jsx("div",Object.assign({},F)),manager:C,container:Q,onShow:_,onHide:k=()=>{},onExit:w,onExited:P,onExiting:E,onEnter:A,onEntering:M,onEntered:N}=t,z=AF(t,RF);const re=PF(Q),se=MF(C),V=yF(),G=SF(n),[te,Ae]=R.useState(!n),xe=R.useRef(null);R.useImperativeHandle(e,()=>se,[se]),Ul&&!G&&n&&(xe.current=Mg()),n&&te&&Ae(!1);const je=fi(()=>{if(se.add(),yn.current=Kh(document,"keydown",ut),$n.current=Kh(document,"focus",()=>setTimeout(Pt),!0),_&&_(),g){const F=Mg(document);se.dialog&&F&&!Qk(se.dialog,F)&&(xe.current=F,se.dialog.focus())}}),Ke=fi(()=>{if(se.remove(),yn.current==null||yn.current(),$n.current==null||$n.current(),m){var F;(F=xe.current)==null||F.focus==null||F.focus(S),xe.current=null}});R.useEffect(()=>{!n||!re||je()},[n,re,je]),R.useEffect(()=>{te&&Ke()},[te,Ke]),aT(()=>{Ke()});const Pt=fi(()=>{if(!O||!V()||!se.isTopModal())return;const F=Mg();se.dialog&&F&&!Qk(se.dialog,F)&&se.dialog.focus()}),ct=fi(F=>{F.target===F.currentTarget&&(u==null||u(F),l===!0&&k())}),ut=fi(F=>{a&&TF(F)&&se.isTopModal()&&(c==null||c(F),F.defaultPrevented||k())}),$n=R.useRef(),yn=R.useRef(),I=(...F)=>{Ae(!0),P==null||P(...F)};if(!re)return null;const j=Object.assign({role:r,ref:se.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},z,{style:s,className:i,tabIndex:-1});let K=y?y(j):U.jsx("div",Object.assign({},j,{children:R.cloneElement(o,{role:"document"})}));K=_k(f,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:w,onExiting:E,onExited:I,onEnter:A,onEntering:M,onEntered:N,children:K});let ee=null;return l&&(ee=b({ref:se.setBackdropRef,onClick:ct}),ee=_k(p,d,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ee})),U.jsx(U.Fragment,{children:Ho.createPortal(U.jsxs(U.Fragment,{children:[ee,K]}),re)})});hT.displayName="Modal";const IF=Object.assign(hT,{Manager:Yv});function NF(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function LF(t,e){t.classList?t.classList.add(e):NF(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}var XF=Function.prototype.bind.call(Function.prototype.call,[].slice);function Ro(t,e){return XF(t.querySelectorAll(e))}function Tk(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function VF(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Tk(t.className,e):t.setAttribute("class",Tk(t.className&&t.className.baseVal||"",e))}const Ao={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class ZF extends Yv{adjustAndStore(e,n,r){const i=n.style[e];n.dataset[e]=i,lo(n,{[e]:`${parseFloat(lo(n,e))+r}px`})}restore(e,n){const r=n.dataset[e];r!==void 0&&(delete n.dataset[e],lo(n,{[e]:r}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(LF(n,"modal-open"),!e.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Ro(n,Ao.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,e.scrollBarWidth)),Ro(n,Ao.STICKY_CONTENT).forEach(s=>this.adjustAndStore(i,s,-e.scrollBarWidth)),Ro(n,Ao.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(i,s,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();VF(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Ro(n,Ao.FIXED_CONTENT).forEach(s=>this.restore(r,s)),Ro(n,Ao.STICKY_CONTENT).forEach(s=>this.restore(i,s)),Ro(n,Ao.NAVBAR_TOGGLER).forEach(s=>this.restore(i,s))}}let Lg;function jF(t){return Lg||(Lg=new ZF(t)),Lg}function dT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Jh(t,e){return Jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Jh(t,e)}function BF(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jh(t,e)}var pT={exports:{}},FF="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",UF=FF,WF=UF;function gT(){}function mT(){}mT.resetWarningCache=gT;var zF=function(){function t(r,i,s,o,l,a){if(a!==WF){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:mT,resetWarningCache:gT};return n.PropTypes=n,n};pT.exports=zF();var YF=pT.exports;const Vi=Ds(YF),Rk={disabled:!1},OT=cs.createContext(null);var qF=function(e){return e.scrollTop},Ra="unmounted",Ws="exited",os="entering",qs="entered",qO="exiting",qi=function(t){BF(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,l=o&&!o.isMounting?r.enter:r.appear,a;return s.appearStatus=null,r.in?l?(a=Ws,s.appearStatus=os):a=qs:r.unmountOnExit||r.mountOnEnter?a=Ra:a=Ws,s.state={status:a},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===Ra?{status:Ws}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==os&&o!==qs&&(s=os):(o===os||o===qs)&&(s=qO)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,l;return s=o=l=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,l=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:l}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===os){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Ho.findDOMNode(this);o&&qF(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ws&&this.setState({status:Ra})},n.performEnter=function(i){var s=this,o=this.props.enter,l=this.context?this.context.isMounting:i,a=this.props.nodeRef?[l]:[Ho.findDOMNode(this),l],u=a[0],c=a[1],f=this.getTimeouts(),h=l?f.appear:f.enter;if(!i&&!o||Rk.disabled){this.safeSetState({status:qs},function(){s.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:os},function(){s.props.onEntering(u,c),s.onTransitionEnd(h,function(){s.safeSetState({status:qs},function(){s.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),l=this.props.nodeRef?void 0:Ho.findDOMNode(this);if(!s||Rk.disabled){this.safeSetState({status:Ws},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:qO},function(){i.props.onExiting(l),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Ws},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(l){o&&(o=!1,s.nextCallback=null,i(l))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:Ho.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!o||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],u=a[0],c=a[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Ra)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=dT(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return cs.createElement(OT.Provider,{value:null},typeof o=="function"?o(i,l):cs.cloneElement(cs.Children.only(o),l))},e}(cs.Component);qi.contextType=OT;qi.propTypes={};function Do(){}qi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Do,onEntering:Do,onEntered:Do,onExit:Do,onExiting:Do,onExited:Do};qi.UNMOUNTED=Ra;qi.EXITED=Ws;qi.ENTERING=os;qi.ENTERED=qs;qi.EXITING=qO;const GF=qi;function Ak(t,e){const n=lo(t,e)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function HF(t,e){const n=Ak(t,"transitionDuration"),r=Ak(t,"transitionDelay"),i=uT(t,s=>{s.target===t&&(i(),e(s))},n+r)}function KF(t){t.offsetHeight}function JF(t){return t&&"setState"in t?Ho.findDOMNode(t):t??null}const eU=cs.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,onExited:s,addEndListener:o,children:l,childRef:a,...u},c)=>{const f=R.useRef(null),h=Vd(f,a),p=Q=>{h(JF(Q))},d=Q=>_=>{Q&&f.current&&Q(f.current,_)},g=R.useCallback(d(t),[t]),O=R.useCallback(d(e),[e]),m=R.useCallback(d(n),[n]),S=R.useCallback(d(r),[r]),y=R.useCallback(d(i),[i]),b=R.useCallback(d(s),[s]),C=R.useCallback(d(o),[o]);return U.jsx(GF,{ref:c,...u,onEnter:g,onEntered:m,onEntering:O,onExit:S,onExited:b,onExiting:y,addEndListener:C,nodeRef:f,children:typeof l=="function"?(Q,_)=>l(Q,{..._,ref:p}):cs.cloneElement(l,{ref:p})})}),tU=eU,nU={[os]:"show",[qs]:"show"},vT=R.forwardRef(({className:t,children:e,transitionClasses:n={},onEnter:r,...i},s)=>{const o={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},l=R.useCallback((a,u)=>{KF(a),r==null||r(a,u)},[r]);return U.jsx(tU,{ref:s,addEndListener:HF,...o,onEnter:l,childRef:e.ref,children:(a,u)=>R.cloneElement(e,{...u,className:Lt("fade",t,e.props.className,nU[a],n[a])})})});vT.displayName="Fade";const yT=vT;var rU=/-(.)/g;function iU(t){return t.replace(rU,function(e,n){return n.toUpperCase()})}const sU=["xxl","xl","lg","md","sm","xs"],oU="xs",Zd=R.createContext({prefixes:{},breakpoints:sU,minBreakpoint:oU});function Qn(t,e){const{prefixes:n}=R.useContext(Zd);return t||n[e]||e}function lU(){const{breakpoints:t}=R.useContext(Zd);return t}function aU(){const{minBreakpoint:t}=R.useContext(Zd);return t}function uU(){const{dir:t}=R.useContext(Zd);return t==="rtl"}const cU=t=>t[0].toUpperCase()+iU(t).slice(1);function jd(t,{displayName:e=cU(t),Component:n,defaultProps:r}={}){const i=R.forwardRef(({className:s,bsPrefix:o,as:l=n||"div",...a},u)=>{const c={...r,...a},f=Qn(o,t);return U.jsx(l,{ref:u,className:Lt(s,f),...c})});return i.displayName=e,i}const fU=jd("modal-body"),hU=R.createContext({onHide(){}}),ST=hU,bT=R.forwardRef(({bsPrefix:t,className:e,contentClassName:n,centered:r,size:i,fullscreen:s,children:o,scrollable:l,...a},u)=>{t=Qn(t,"modal");const c=`${t}-dialog`,f=typeof s=="string"?`${t}-fullscreen-${s}`:`${t}-fullscreen`;return U.jsx("div",{...a,ref:u,className:Lt(c,e,i&&`${t}-${i}`,r&&`${c}-centered`,l&&`${c}-scrollable`,s&&f),children:U.jsx("div",{className:Lt(`${t}-content`,n),children:o})})});bT.displayName="ModalDialog";const wT=bT,dU=jd("modal-footer"),pU={"aria-label":Vi.string,onClick:Vi.func,variant:Vi.oneOf(["white"])},qv=R.forwardRef(({className:t,variant:e,"aria-label":n="Close",...r},i)=>U.jsx("button",{ref:i,type:"button",className:Lt("btn-close",e&&`btn-close-${e}`,t),"aria-label":n,...r}));qv.displayName="CloseButton";qv.propTypes=pU;const gU=qv,mU=R.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:n=!1,onHide:r,children:i,...s},o)=>{const l=R.useContext(ST),a=fi(()=>{l==null||l.onHide(),r==null||r()});return U.jsxs("div",{ref:o,...s,children:[i,n&&U.jsx(gU,{"aria-label":t,variant:e,onClick:a})]})}),OU=mU,kT=R.forwardRef(({bsPrefix:t,className:e,closeLabel:n="Close",closeButton:r=!1,...i},s)=>(t=Qn(t,"modal-header"),U.jsx(OU,{ref:s,...i,className:Lt(e,t),closeLabel:n,closeButton:r})));kT.displayName="ModalHeader";const vU=kT,yU=t=>R.forwardRef((e,n)=>U.jsx("div",{...e,ref:n,className:Lt(e.className,t)})),SU=yU("h4"),bU=jd("modal-title",{Component:SU});function wU(t){return U.jsx(yT,{...t,timeout:null})}function kU(t){return U.jsx(yT,{...t,timeout:null})}const xT=R.forwardRef(({bsPrefix:t,className:e,style:n,dialogClassName:r,contentClassName:i,children:s,dialogAs:o=wT,"aria-labelledby":l,"aria-describedby":a,"aria-label":u,show:c=!1,animation:f=!0,backdrop:h=!0,keyboard:p=!0,onEscapeKeyDown:d,onShow:g,onHide:O,container:m,autoFocus:S=!0,enforceFocus:y=!0,restoreFocus:b=!0,restoreFocusOptions:C,onEntered:Q,onExit:_,onExiting:k,onEnter:w,onEntering:P,onExited:E,backdropClassName:A,manager:M,...N},z)=>{const[re,se]=R.useState({}),[V,G]=R.useState(!1),te=R.useRef(!1),Ae=R.useRef(!1),xe=R.useRef(null),[je,Ke]=sF(),Pt=Vd(z,Ke),ct=fi(O),ut=uU();t=Qn(t,"modal");const $n=R.useMemo(()=>({onHide:ct}),[ct]);function yn(){return M||jF({isRTL:ut})}function I(ne){if(!Ul)return;const ze=yn().getScrollbarWidth()>0,Ne=ne.scrollHeight>Xd(ne).documentElement.clientHeight;se({paddingRight:ze&&!Ne?Pk():void 0,paddingLeft:!ze&&Ne?Pk():void 0})}const j=fi(()=>{je&&I(je.dialog)});aT(()=>{YO(window,"resize",j),xe.current==null||xe.current()});const K=()=>{te.current=!0},ee=ne=>{te.current&&je&&ne.target===je.dialog&&(Ae.current=!0),te.current=!1},F=()=>{G(!0),xe.current=uT(je.dialog,()=>{G(!1)})},W=ne=>{ne.target===ne.currentTarget&&F()},be=ne=>{if(h==="static"){W(ne);return}if(Ae.current||ne.target!==ne.currentTarget){Ae.current=!1;return}O==null||O()},Ce=ne=>{p?d==null||d(ne):(ne.preventDefault(),h==="static"&&F())},Y=(ne,ze)=>{ne&&I(ne),w==null||w(ne,ze)},oe=ne=>{xe.current==null||xe.current(),_==null||_(ne)},le=(ne,ze)=>{P==null||P(ne,ze),lT(window,"resize",j)},ce=ne=>{ne&&(ne.style.display=""),E==null||E(ne),YO(window,"resize",j)},$e=R.useCallback(ne=>U.jsx("div",{...ne,className:Lt(`${t}-backdrop`,A,!f&&"show")}),[f,A,t]),Te={...n,...re};Te.display="block";const H=ne=>U.jsx("div",{role:"dialog",...ne,style:Te,className:Lt(e,t,V&&`${t}-static`,!f&&"show"),onClick:h?be:void 0,onMouseUp:ee,"aria-label":u,"aria-labelledby":l,"aria-describedby":a,children:U.jsx(o,{...N,onMouseDown:K,className:r,contentClassName:i,children:s})});return U.jsx(ST.Provider,{value:$n,children:U.jsx(IF,{show:c,ref:Pt,backdrop:h,container:m,keyboard:!0,autoFocus:S,enforceFocus:y,restoreFocus:b,restoreFocusOptions:C,onEscapeKeyDown:Ce,onShow:g,onHide:O,onEnter:Y,onEntering:le,onEntered:Q,onExit:oe,onExiting:k,onExited:ce,manager:yn(),transition:f?wU:void 0,backdropTransition:f?kU:void 0,renderBackdrop:$e,renderDialog:H})})});xT.displayName="Modal";const ya=Object.assign(xT,{Body:fU,Header:vU,Title:bU,Footer:dU,Dialog:wT,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),xU={type:Vi.string,tooltip:Vi.bool,as:Vi.elementType},Gv=R.forwardRef(({as:t="div",className:e,type:n="valid",tooltip:r=!1,...i},s)=>U.jsx(t,{...i,ref:s,className:Lt(e,`${n}-${r?"tooltip":"feedback"}`)}));Gv.displayName="Feedback";Gv.propTypes=xU;const PT=Gv,PU=R.createContext({}),zi=PU,CT=R.forwardRef(({id:t,bsPrefix:e,className:n,type:r="checkbox",isValid:i=!1,isInvalid:s=!1,as:o="input",...l},a)=>{const{controlId:u}=R.useContext(zi);return e=Qn(e,"form-check-input"),U.jsx(o,{...l,ref:a,type:r,id:t||u,className:Lt(n,e,i&&"is-valid",s&&"is-invalid")})});CT.displayName="FormCheckInput";const QT=CT,ET=R.forwardRef(({bsPrefix:t,className:e,htmlFor:n,...r},i)=>{const{controlId:s}=R.useContext(zi);return t=Qn(t,"form-check-label"),U.jsx("label",{...r,ref:i,htmlFor:n||s,className:Lt(e,t)})});ET.displayName="FormCheckLabel";const GO=ET;function CU(t,e){return R.Children.toArray(t).some(n=>R.isValidElement(n)&&n.type===e)}const $T=R.forwardRef(({id:t,bsPrefix:e,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:s=!1,isValid:o=!1,isInvalid:l=!1,feedbackTooltip:a=!1,feedback:u,feedbackType:c,className:f,style:h,title:p="",type:d="checkbox",label:g,children:O,as:m="input",...S},y)=>{e=Qn(e,"form-check"),n=Qn(n,"form-switch");const{controlId:b}=R.useContext(zi),C=R.useMemo(()=>({controlId:t||b}),[b,t]),Q=!O&&g!=null&&g!==!1||CU(O,GO),_=U.jsx(QT,{...S,type:d==="switch"?"checkbox":d,ref:y,isValid:o,isInvalid:l,disabled:s,as:m});return U.jsx(zi.Provider,{value:C,children:U.jsx("div",{style:h,className:Lt(f,Q&&e,r&&`${e}-inline`,i&&`${e}-reverse`,d==="switch"&&n),children:O||U.jsxs(U.Fragment,{children:[_,Q&&U.jsx(GO,{title:p,children:g}),u&&U.jsx(PT,{type:c,tooltip:a,children:u})]})})})});$T.displayName="FormCheck";const ed=Object.assign($T,{Input:QT,Label:GO}),_T=R.forwardRef(({bsPrefix:t,type:e,size:n,htmlSize:r,id:i,className:s,isValid:o=!1,isInvalid:l=!1,plaintext:a,readOnly:u,as:c="input",...f},h)=>{const{controlId:p}=R.useContext(zi);t=Qn(t,"form-control");let d;return a?d={[`${t}-plaintext`]:!0}:d={[t]:!0,[`${t}-${n}`]:n},U.jsx(c,{...f,type:e,size:r,ref:h,readOnly:u,id:i||p,className:Lt(s,d,o&&"is-valid",l&&"is-invalid",e==="color"&&`${t}-color`)})});_T.displayName="FormControl";const QU=Object.assign(_T,{Feedback:PT}),EU=jd("form-floating"),TT=R.forwardRef(({controlId:t,as:e="div",...n},r)=>{const i=R.useMemo(()=>({controlId:t}),[t]);return U.jsx(zi.Provider,{value:i,children:U.jsx(e,{...n,ref:r})})});TT.displayName="FormGroup";const RT=TT;function $U({as:t,bsPrefix:e,className:n,...r}){e=Qn(e,"col");const i=lU(),s=aU(),o=[],l=[];return i.forEach(a=>{const u=r[a];delete r[a];let c,f,h;typeof u=="object"&&u!=null?{span:c,offset:f,order:h}=u:c=u;const p=a!==s?`-${a}`:"";c&&o.push(c===!0?`${e}${p}`:`${e}${p}-${c}`),h!=null&&l.push(`order${p}-${h}`),f!=null&&l.push(`offset${p}-${f}`)}),[{...r,className:Lt(n,...o,...l)},{as:t,bsPrefix:e,spans:o}]}const AT=R.forwardRef((t,e)=>{const[{className:n,...r},{as:i="div",bsPrefix:s,spans:o}]=$U(t);return U.jsx(i,{...r,ref:e,className:Lt(n,!o.length&&s)})});AT.displayName="Col";const _U=AT,DT=R.forwardRef(({as:t="label",bsPrefix:e,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:s,...o},l)=>{const{controlId:a}=R.useContext(zi);e=Qn(e,"form-label");let u="col-form-label";typeof n=="string"&&(u=`${u} ${u}-${n}`);const c=Lt(i,e,r&&"visually-hidden",n&&u);return s=s||a,n?U.jsx(_U,{ref:l,as:"label",className:c,htmlFor:s,...o}):U.jsx(t,{ref:l,className:c,htmlFor:s,...o})});DT.displayName="FormLabel";const TU=DT,MT=R.forwardRef(({bsPrefix:t,className:e,id:n,...r},i)=>{const{controlId:s}=R.useContext(zi);return t=Qn(t,"form-range"),U.jsx("input",{...r,type:"range",ref:i,className:Lt(e,t),id:n||s})});MT.displayName="FormRange";const RU=MT,IT=R.forwardRef(({bsPrefix:t,size:e,htmlSize:n,className:r,isValid:i=!1,isInvalid:s=!1,id:o,...l},a)=>{const{controlId:u}=R.useContext(zi);return t=Qn(t,"form-select"),U.jsx("select",{...l,size:n,ref:a,className:Lt(r,t,e&&`${t}-${e}`,i&&"is-valid",s&&"is-invalid"),id:o||u})});IT.displayName="FormSelect";const AU=IT,NT=R.forwardRef(({bsPrefix:t,className:e,as:n="small",muted:r,...i},s)=>(t=Qn(t,"form-text"),U.jsx(n,{...i,ref:s,className:Lt(e,t,r&&"text-muted")})));NT.displayName="FormText";const DU=NT,LT=R.forwardRef((t,e)=>U.jsx(ed,{...t,ref:e,type:"switch"}));LT.displayName="Switch";const MU=Object.assign(LT,{Input:ed.Input,Label:ed.Label}),XT=R.forwardRef(({bsPrefix:t,className:e,children:n,controlId:r,label:i,...s},o)=>(t=Qn(t,"form-floating"),U.jsxs(RT,{ref:o,className:Lt(e,t),controlId:r,...s,children:[n,U.jsx("label",{htmlFor:r,children:i})]})));XT.displayName="FloatingLabel";const IU=XT,NU={_ref:Vi.any,validated:Vi.bool,as:Vi.elementType},Hv=R.forwardRef(({className:t,validated:e,as:n="form",...r},i)=>U.jsx(n,{...r,ref:i,className:Lt(t,e&&"was-validated")}));Hv.displayName="Form";Hv.propTypes=NU;const ri=Object.assign(Hv,{Group:RT,Control:QU,Floating:EU,Check:ed,Switch:MU,Label:TU,Text:DU,Range:RU,Select:AU,FloatingLabel:IU}),LU=["as","disabled"];function XU(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function VU(t){return!t||t.trim()==="#"}function VT({tagName:t,disabled:e,href:n,target:r,rel:i,role:s,onClick:o,tabIndex:l=0,type:a}){t||(n!=null||r!=null||i!=null?t="a":t="button");const u={tagName:t};if(t==="button")return[{type:a||"button",disabled:e},u];const c=h=>{if((e||t==="a"&&VU(n))&&h.preventDefault(),e){h.stopPropagation();return}o==null||o(h)},f=h=>{h.key===" "&&(h.preventDefault(),c(h))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:s??"button",disabled:void 0,tabIndex:e?void 0:l,href:n,target:t==="a"?r:void 0,"aria-disabled":e||void 0,rel:t==="a"?i:void 0,onClick:c,onKeyDown:f},u]}const ZU=R.forwardRef((t,e)=>{let{as:n,disabled:r}=t,i=XU(t,LU);const[s,{tagName:o}]=VT(Object.assign({tagName:n,disabled:r},i));return U.jsx(o,Object.assign({},i,s,{ref:e}))});ZU.displayName="Button";const ZT=R.forwardRef(({as:t,bsPrefix:e,variant:n="primary",size:r,active:i=!1,disabled:s=!1,className:o,...l},a)=>{const u=Qn(e,"btn"),[c,{tagName:f}]=VT({tagName:t,disabled:s,...l}),h=f;return U.jsx(h,{...c,...l,ref:a,disabled:s,className:Lt(o,u,i&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&s&&"disabled")})});ZT.displayName="Button";const jU=ZT;function Oo(t){"@babel/helpers - typeof";return Oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oo(t)}function BU(t,e){if(Oo(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Oo(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jT(t){var e=BU(t,"string");return Oo(e)==="symbol"?e:String(e)}function Aa(t,e,n){return e=jT(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _e(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dk(Object(n),!0).forEach(function(r){Aa(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function FU(t){if(Array.isArray(t))return t}function UU(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,l=[],a=!0,u=!1;try{if(s=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=s.call(n)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(c){u=!0,i=c}finally{try{if(!a&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function HO(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function BT(t,e){if(t){if(typeof t=="string")return HO(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HO(t,e)}}function WU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
78
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zi(t,e){return FU(t)||UU(t,e)||BT(t,e)||WU()}function Gi(t,e){if(t==null)return{};var n=dT(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var zU=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function YU(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,i=r===void 0?!1:r,s=t.defaultValue,o=s===void 0?null:s,l=t.inputValue,a=t.menuIsOpen,u=t.onChange,c=t.onInputChange,f=t.onMenuClose,h=t.onMenuOpen,p=t.value,d=Gi(t,zU),g=R.useState(l!==void 0?l:n),O=Zi(g,2),m=O[0],S=O[1],y=R.useState(a!==void 0?a:i),b=Zi(y,2),C=b[0],Q=b[1],_=R.useState(p!==void 0?p:o),k=Zi(_,2),w=k[0],P=k[1],E=R.useCallback(function(V,G){typeof u=="function"&&u(V,G),P(V)},[u]),A=R.useCallback(function(V,G){var te;typeof c=="function"&&(te=c(V,G)),S(te!==void 0?te:V)},[c]),M=R.useCallback(function(){typeof h=="function"&&h(),Q(!0)},[h]),N=R.useCallback(function(){typeof f=="function"&&f(),Q(!1)},[f]),z=l!==void 0?l:m,re=a!==void 0?a:C,se=p!==void 0?p:w;return _e(_e({},d),{},{inputValue:z,menuIsOpen:re,onChange:E,onInputChange:A,onMenuClose:N,onMenuOpen:M,value:se})}function qU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,jT(r.key),r)}}function GU(t,e,n){return e&&Mk(t.prototype,e),n&&Mk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function HU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jh(t,e)}function td(t){return td=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},td(t)}function KU(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function JU(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function eW(t,e){if(e&&(Oo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JU(t)}function tW(t){var e=KU();return function(){var r=td(t),i;if(e){var s=td(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return eW(this,i)}}function nW(t){if(Array.isArray(t))return HO(t)}function rW(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function iW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
79
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FT(t){return nW(t)||rW(t)||BT(t)||iW()}function sW(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function oW(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var lW=function(){function t(n){var r=this;this._insertTag=function(i){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,s),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(oW(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=sW(i);try{s.insertRule(r,s.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},t}(),kn="-ms-",nd="-moz-",nt="-webkit-",UT="comm",Kv="rule",Jv="decl",aW="@import",WT="@keyframes",uW="@layer",cW=Math.abs,Bd=String.fromCharCode,fW=Object.assign;function hW(t,e){return hn(t,0)^45?(((e<<2^hn(t,0))<<2^hn(t,1))<<2^hn(t,2))<<2^hn(t,3):0}function zT(t){return t.trim()}function dW(t,e){return(t=e.exec(t))?t[0]:t}function rt(t,e,n){return t.replace(e,n)}function KO(t,e){return t.indexOf(e)}function hn(t,e){return t.charCodeAt(e)|0}function Au(t,e,n){return t.slice(e,n)}function li(t){return t.length}function ey(t){return t.length}function df(t,e){return e.push(t),t}function pW(t,e){return t.map(e).join("")}var Fd=1,Il=1,YT=0,qn=0,zt=0,Wl="";function Ud(t,e,n,r,i,s,o){return{value:t,root:e,parent:n,type:r,props:i,children:s,line:Fd,column:Il,length:o,return:""}}function Sa(t,e){return fW(Ud("",null,null,"",null,null,0),t,{length:-t.length},e)}function gW(){return zt}function mW(){return zt=qn>0?hn(Wl,--qn):0,Il--,zt===10&&(Il=1,Fd--),zt}function ur(){return zt=qn<YT?hn(Wl,qn++):0,Il++,zt===10&&(Il=1,Fd++),zt}function yi(){return hn(Wl,qn)}function Ff(){return qn}function ec(t,e){return Au(Wl,t,e)}function Du(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function qT(t){return Fd=Il=1,YT=li(Wl=t),qn=0,[]}function GT(t){return Wl="",t}function Uf(t){return zT(ec(qn-1,JO(t===91?t+2:t===40?t+1:t)))}function OW(t){for(;(zt=yi())&&zt<33;)ur();return Du(t)>2||Du(zt)>3?"":" "}function vW(t,e){for(;--e&&ur()&&!(zt<48||zt>102||zt>57&&zt<65||zt>70&&zt<97););return ec(t,Ff()+(e<6&&yi()==32&&ur()==32))}function JO(t){for(;ur();)switch(zt){case t:return qn;case 34:case 39:t!==34&&t!==39&&JO(zt);break;case 40:t===41&&JO(t);break;case 92:ur();break}return qn}function yW(t,e){for(;ur()&&t+zt!==47+10;)if(t+zt===42+42&&yi()===47)break;return"/*"+ec(e,qn-1)+"*"+Bd(t===47?t:ur())}function SW(t){for(;!Du(yi());)ur();return ec(t,qn)}function bW(t){return GT(Wf("",null,null,null,[""],t=qT(t),0,[0],t))}function Wf(t,e,n,r,i,s,o,l,a){for(var u=0,c=0,f=o,h=0,p=0,d=0,g=1,O=1,m=1,S=0,y="",b=i,C=s,Q=r,_=y;O;)switch(d=S,S=ur()){case 40:if(d!=108&&hn(_,f-1)==58){KO(_+=rt(Uf(S),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:_+=Uf(S);break;case 9:case 10:case 13:case 32:_+=OW(d);break;case 92:_+=vW(Ff()-1,7);continue;case 47:switch(yi()){case 42:case 47:df(wW(yW(ur(),Ff()),e,n),a);break;default:_+="/"}break;case 123*g:l[u++]=li(_)*m;case 125*g:case 59:case 0:switch(S){case 0:case 125:O=0;case 59+c:m==-1&&(_=rt(_,/\f/g,"")),p>0&&li(_)-f&&df(p>32?Nk(_+";",r,n,f-1):Nk(rt(_," ","")+";",r,n,f-2),a);break;case 59:_+=";";default:if(df(Q=Ik(_,e,n,u,c,i,l,y,b=[],C=[],f),s),S===123)if(c===0)Wf(_,e,Q,Q,b,s,f,l,C);else switch(h===99&&hn(_,3)===110?100:h){case 100:case 108:case 109:case 115:Wf(t,Q,Q,r&&df(Ik(t,Q,Q,0,0,i,l,y,i,b=[],f),C),i,C,f,l,r?b:C);break;default:Wf(_,Q,Q,Q,[""],C,0,l,C)}}u=c=p=0,g=m=1,y=_="",f=o;break;case 58:f=1+li(_),p=d;default:if(g<1){if(S==123)--g;else if(S==125&&g++==0&&mW()==125)continue}switch(_+=Bd(S),S*g){case 38:m=c>0?1:(_+="\f",-1);break;case 44:l[u++]=(li(_)-1)*m,m=1;break;case 64:yi()===45&&(_+=Uf(ur())),h=yi(),c=f=li(y=_+=SW(Ff())),S++;break;case 45:d===45&&li(_)==2&&(g=0)}}return s}function Ik(t,e,n,r,i,s,o,l,a,u,c){for(var f=i-1,h=i===0?s:[""],p=ey(h),d=0,g=0,O=0;d<r;++d)for(var m=0,S=Au(t,f+1,f=cW(g=o[d])),y=t;m<p;++m)(y=zT(g>0?h[m]+" "+S:rt(S,/&\f/g,h[m])))&&(a[O++]=y);return Ud(t,e,n,i===0?Kv:l,a,u,c)}function wW(t,e,n){return Ud(t,e,n,UT,Bd(gW()),Au(t,2,-2),0)}function Nk(t,e,n,r){return Ud(t,e,n,Jv,Au(t,0,r),Au(t,r+1,-1),r)}function gl(t,e){for(var n="",r=ey(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function kW(t,e,n,r){switch(t.type){case uW:if(t.children.length)break;case aW:case Jv:return t.return=t.return||t.value;case UT:return"";case WT:return t.return=t.value+"{"+gl(t.children,r)+"}";case Kv:t.value=t.props.join(",")}return li(n=gl(t.children,r))?t.return=t.value+"{"+n+"}":""}function xW(t){var e=ey(t);return function(n,r,i,s){for(var o="",l=0;l<e;l++)o+=t[l](n,r,i,s)||"";return o}}function PW(t){return function(e){e.root||(e=e.return)&&t(e)}}function CW(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var QW=function(e,n,r){for(var i=0,s=0;i=s,s=yi(),i===38&&s===12&&(n[r]=1),!Du(s);)ur();return ec(e,qn)},EW=function(e,n){var r=-1,i=44;do switch(Du(i)){case 0:i===38&&yi()===12&&(n[r]=1),e[r]+=QW(qn-1,n,r);break;case 2:e[r]+=Uf(i);break;case 4:if(i===44){e[++r]=yi()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=Bd(i)}while(i=ur());return e},$W=function(e,n){return GT(EW(qT(e),n))},Lk=new WeakMap,_W=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Lk.get(r))&&!i){Lk.set(e,!0);for(var s=[],o=$W(n,s),l=r.props,a=0,u=0;a<o.length;a++)for(var c=0;c<l.length;c++,u++)e.props[u]=s[a]?o[a].replace(/&\f/g,l[c]):l[c]+" "+o[a]}}},TW=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function HT(t,e){switch(hW(t,e)){case 5103:return nt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return nt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return nt+t+nd+t+kn+t+t;case 6828:case 4268:return nt+t+kn+t+t;case 6165:return nt+t+kn+"flex-"+t+t;case 5187:return nt+t+rt(t,/(\w+).+(:[^]+)/,nt+"box-$1$2"+kn+"flex-$1$2")+t;case 5443:return nt+t+kn+"flex-item-"+rt(t,/flex-|-self/,"")+t;case 4675:return nt+t+kn+"flex-line-pack"+rt(t,/align-content|flex-|-self/,"")+t;case 5548:return nt+t+kn+rt(t,"shrink","negative")+t;case 5292:return nt+t+kn+rt(t,"basis","preferred-size")+t;case 6060:return nt+"box-"+rt(t,"-grow","")+nt+t+kn+rt(t,"grow","positive")+t;case 4554:return nt+rt(t,/([^-])(transform)/g,"$1"+nt+"$2")+t;case 6187:return rt(rt(rt(t,/(zoom-|grab)/,nt+"$1"),/(image-set)/,nt+"$1"),t,"")+t;case 5495:case 3959:return rt(t,/(image-set\([^]*)/,nt+"$1$`$1");case 4968:return rt(rt(t,/(.+:)(flex-)?(.*)/,nt+"box-pack:$3"+kn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+nt+t+t;case 4095:case 3583:case 4068:case 2532:return rt(t,/(.+)-inline(.+)/,nt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(li(t)-1-e>6)switch(hn(t,e+1)){case 109:if(hn(t,e+4)!==45)break;case 102:return rt(t,/(.+:)(.+)-([^]+)/,"$1"+nt+"$2-$3$1"+nd+(hn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~KO(t,"stretch")?HT(rt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(hn(t,e+1)!==115)break;case 6444:switch(hn(t,li(t)-3-(~KO(t,"!important")&&10))){case 107:return rt(t,":",":"+nt)+t;case 101:return rt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nt+(hn(t,14)===45?"inline-":"")+"box$3$1"+nt+"$2$3$1"+kn+"$2box$3")+t}break;case 5936:switch(hn(t,e+11)){case 114:return nt+t+kn+rt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return nt+t+kn+rt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return nt+t+kn+rt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return nt+t+kn+t+t}return t}var RW=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case Jv:e.return=HT(e.value,e.length);break;case WT:return gl([Sa(e,{value:rt(e.value,"@","@"+nt)})],i);case Kv:if(e.length)return pW(e.props,function(s){switch(dW(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return gl([Sa(e,{props:[rt(s,/:(read-\w+)/,":"+nd+"$1")]})],i);case"::placeholder":return gl([Sa(e,{props:[rt(s,/:(plac\w+)/,":"+nt+"input-$1")]}),Sa(e,{props:[rt(s,/:(plac\w+)/,":"+nd+"$1")]}),Sa(e,{props:[rt(s,/:(plac\w+)/,kn+"input-$1")]})],i)}return""})}},AW=[RW],DW=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var O=g.getAttribute("data-emotion");O.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||AW,s={},o,l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var O=g.getAttribute("data-emotion").split(" "),m=1;m<O.length;m++)s[O[m]]=!0;l.push(g)});var a,u=[_W,TW];{var c,f=[kW,PW(function(g){c.insert(g)})],h=xW(u.concat(i,f)),p=function(O){return gl(bW(O),h)};a=function(O,m,S,y){c=S,p(O?O+"{"+m.styles+"}":m.styles),y&&(d.inserted[m.name]=!0)}}var d={key:n,sheet:new lW({key:n,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:a};return d.sheet.hydrate(l),d},KT={exports:{}},at={};/** @license React v16.13.1
80
- * react-is.production.min.js
81
- *
82
- * Copyright (c) Facebook, Inc. and its affiliates.
83
- *
84
- * This source code is licensed under the MIT license found in the
85
- * LICENSE file in the root directory of this source tree.
86
- */var an=typeof Symbol=="function"&&Symbol.for,ty=an?Symbol.for("react.element"):60103,ny=an?Symbol.for("react.portal"):60106,Wd=an?Symbol.for("react.fragment"):60107,zd=an?Symbol.for("react.strict_mode"):60108,Yd=an?Symbol.for("react.profiler"):60114,qd=an?Symbol.for("react.provider"):60109,Gd=an?Symbol.for("react.context"):60110,ry=an?Symbol.for("react.async_mode"):60111,Hd=an?Symbol.for("react.concurrent_mode"):60111,Kd=an?Symbol.for("react.forward_ref"):60112,Jd=an?Symbol.for("react.suspense"):60113,MW=an?Symbol.for("react.suspense_list"):60120,ep=an?Symbol.for("react.memo"):60115,tp=an?Symbol.for("react.lazy"):60116,IW=an?Symbol.for("react.block"):60121,NW=an?Symbol.for("react.fundamental"):60117,LW=an?Symbol.for("react.responder"):60118,XW=an?Symbol.for("react.scope"):60119;function dr(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case ty:switch(t=t.type,t){case ry:case Hd:case Wd:case Yd:case zd:case Jd:return t;default:switch(t=t&&t.$$typeof,t){case Gd:case Kd:case tp:case ep:case qd:return t;default:return e}}case ny:return e}}}function JT(t){return dr(t)===Hd}at.AsyncMode=ry;at.ConcurrentMode=Hd;at.ContextConsumer=Gd;at.ContextProvider=qd;at.Element=ty;at.ForwardRef=Kd;at.Fragment=Wd;at.Lazy=tp;at.Memo=ep;at.Portal=ny;at.Profiler=Yd;at.StrictMode=zd;at.Suspense=Jd;at.isAsyncMode=function(t){return JT(t)||dr(t)===ry};at.isConcurrentMode=JT;at.isContextConsumer=function(t){return dr(t)===Gd};at.isContextProvider=function(t){return dr(t)===qd};at.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===ty};at.isForwardRef=function(t){return dr(t)===Kd};at.isFragment=function(t){return dr(t)===Wd};at.isLazy=function(t){return dr(t)===tp};at.isMemo=function(t){return dr(t)===ep};at.isPortal=function(t){return dr(t)===ny};at.isProfiler=function(t){return dr(t)===Yd};at.isStrictMode=function(t){return dr(t)===zd};at.isSuspense=function(t){return dr(t)===Jd};at.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Wd||t===Hd||t===Yd||t===zd||t===Jd||t===MW||typeof t=="object"&&t!==null&&(t.$$typeof===tp||t.$$typeof===ep||t.$$typeof===qd||t.$$typeof===Gd||t.$$typeof===Kd||t.$$typeof===NW||t.$$typeof===LW||t.$$typeof===XW||t.$$typeof===IW)};at.typeOf=dr;KT.exports=at;var VW=KT.exports,e2=VW,ZW={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},jW={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},t2={};t2[e2.ForwardRef]=ZW;t2[e2.Memo]=jW;var BW=!0;function FW(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var n2=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||BW===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},UW=function(e,n,r){n2(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+i:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function WW(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var zW={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},YW=/[A-Z]|^ms/g,qW=/_EMO_([^_]+?)_([^]*?)_EMO_/g,r2=function(e){return e.charCodeAt(1)===45},Xk=function(e){return e!=null&&typeof e!="boolean"},Xg=CW(function(t){return r2(t)?t:t.replace(YW,"-$&").toLowerCase()}),Vk=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(qW,function(r,i,s){return ai={name:i,styles:s,next:ai},i})}return zW[e]!==1&&!r2(e)&&typeof n=="number"&&n!==0?n+"px":n};function Mu(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ai={name:n.name,styles:n.styles,next:ai},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ai={name:r.name,styles:r.styles,next:ai},r=r.next;var i=n.styles+";";return i}return GW(t,e,n)}case"function":{if(t!==void 0){var s=ai,o=n(t);return ai=s,Mu(t,e,o)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function GW(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Mu(t,e,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object")e!=null&&e[o]!==void 0?r+=s+"{"+e[o]+"}":Xk(o)&&(r+=Xg(s)+":"+Vk(s,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var l=0;l<o.length;l++)Xk(o[l])&&(r+=Xg(s)+":"+Vk(s,o[l])+";");else{var a=Mu(t,e,o);switch(s){case"animation":case"animationName":{r+=Xg(s)+":"+a+";";break}default:r+=s+"{"+a+"}"}}}return r}var Zk=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ai,i2=function(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,s="";ai=void 0;var o=e[0];o==null||o.raw===void 0?(i=!1,s+=Mu(r,n,o)):s+=o[0];for(var l=1;l<e.length;l++)s+=Mu(r,n,e[l]),i&&(s+=o[l]);Zk.lastIndex=0;for(var a="",u;(u=Zk.exec(s))!==null;)a+="-"+u[1];var c=WW(s)+a;return{name:c,styles:s,next:ai}},HW=function(e){return e()},KW=m1["useInsertionEffect"]?m1["useInsertionEffect"]:!1,JW=KW||HW,iy={}.hasOwnProperty,s2=R.createContext(typeof HTMLElement<"u"?DW({key:"css"}):null);s2.Provider;var ez=function(e){return R.forwardRef(function(n,r){var i=R.useContext(s2);return e(n,i,r)})},tz=R.createContext({}),e0="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",nz=function(e,n){var r={};for(var i in n)iy.call(n,i)&&(r[i]=n[i]);return r[e0]=e,r},rz=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return n2(n,r,i),JW(function(){return UW(n,r,i)}),null},iz=ez(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[e0],s=[r],o="";typeof t.className=="string"?o=FW(e.registered,s,t.className):t.className!=null&&(o=t.className+" ");var l=i2(s,void 0,R.useContext(tz));o+=e.key+"-"+l.name;var a={};for(var u in t)iy.call(t,u)&&u!=="css"&&u!==e0&&(a[u]=t[u]);return a.ref=n,a.className=o,R.createElement(R.Fragment,null,R.createElement(rz,{cache:e,serialized:l,isStringTag:typeof i=="string"}),R.createElement(i,a))}),sz=iz,Re=function(e,n){var r=arguments;if(n==null||!iy.call(n,"css"))return R.createElement.apply(void 0,r);var i=r.length,s=new Array(i);s[0]=sz,s[1]=nz(e,n);for(var o=2;o<i;o++)s[o]=r[o];return R.createElement.apply(null,s)};function sy(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i2(e)}var oz=function(){var e=sy.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function lz(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function az(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}const uz=["top","right","bottom","left"];uz.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);function Br(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function o2(t){return Br(t).getComputedStyle(t)}function l2(t){return t instanceof Br(t).Node}function a2(t){return l2(t)?(t.nodeName||"").toLowerCase():"#document"}function oy(t){return t instanceof HTMLElement||t instanceof Br(t).HTMLElement}function jk(t){return typeof ShadowRoot<"u"&&(t instanceof Br(t).ShadowRoot||t instanceof ShadowRoot)}function u2(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=o2(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function cz(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function fz(t){return["html","body","#document"].includes(a2(t))}const hz=Math.min,dz=Math.max,rd=Math.round,pf=Math.floor,id=t=>({x:t,y:t});function pz(t){const e=o2(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=oy(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,l=rd(n)!==s||rd(r)!==o;return l&&(n=s,r=o),{width:n,height:r,$:l}}function t0(t){return t instanceof Element||t instanceof Br(t).Element}function ly(t){return t0(t)?t:t.contextElement}function Vg(t){const e=ly(t);if(!oy(e))return id(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=pz(e);let o=(s?rd(n.width):n.width)/r,l=(s?rd(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),l&&Number.isFinite(l)||(l=1),{x:o,y:l}}const gz=id(0);function mz(t){const e=Br(t);return cz()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:gz}function Bk(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=ly(t);let o=id(1);e&&(r?t0(r)&&(o=Vg(r)):o=Vg(t));const l=function(h,p,d){return p===void 0&&(p=!1),!(!d||p&&d!==Br(h))&&p}(s,n,r)?mz(s):id(0);let a=(i.left+l.x)/o.x,u=(i.top+l.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(s){const h=Br(s),p=r&&t0(r)?Br(r):r;let d=h.frameElement;for(;d&&r&&p!==h;){const g=Vg(d),O=d.getBoundingClientRect(),m=getComputedStyle(d),S=O.left+(d.clientLeft+parseFloat(m.paddingLeft))*g.x,y=O.top+(d.clientTop+parseFloat(m.paddingTop))*g.y;a*=g.x,u*=g.y,c*=g.x,f*=g.y,a+=S,u+=y,d=Br(d).frameElement}}return az({width:c,height:f,x:a,y:u})}function c2(t){var e;return(e=(l2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Oz(t){if(a2(t)==="html")return t;const e=t.assignedSlot||t.parentNode||jk(t)&&t.host||c2(t);return jk(e)?e.host:e}function f2(t){const e=Oz(t);return fz(e)?t.ownerDocument?t.ownerDocument.body:t.body:oy(e)&&u2(e)?e:f2(e)}function n0(t,e){var n;e===void 0&&(e=[]);const r=f2(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=Br(r);return i?e.concat(s,s.visualViewport||[],u2(r)?r:[]):e.concat(r,n0(r))}function vz(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=ly(t),c=i||s?[...u?n0(u):[],...n0(e)]:[];c.forEach(O=>{i&&O.addEventListener("scroll",n,{passive:!0}),s&&O.addEventListener("resize",n)});const f=u&&l?function(O,m){let S,y=null;const b=c2(O);function C(){clearTimeout(S),y&&y.disconnect(),y=null}return function Q(_,k){_===void 0&&(_=!1),k===void 0&&(k=1),C();const{left:w,top:P,width:E,height:A}=O.getBoundingClientRect();if(_||m(),!E||!A)return;const M={rootMargin:-pf(P)+"px "+-pf(b.clientWidth-(w+E))+"px "+-pf(b.clientHeight-(P+A))+"px "+-pf(w)+"px",threshold:dz(0,hz(1,k))||1};let N=!0;function z(re){const se=re[0].intersectionRatio;if(se!==k){if(!N)return Q();se?Q(!1,se):S=setTimeout(()=>{Q(!1,1e-7)},100)}N=!1}try{y=new IntersectionObserver(z,{...M,root:b.ownerDocument})}catch{y=new IntersectionObserver(z,M)}y.observe(O)}(!0),C}(u,n):null;let h,p=-1,d=null;o&&(d=new ResizeObserver(O=>{let[m]=O;m&&m.target===u&&d&&(d.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{d&&d.observe(e)})),n()}),u&&!a&&d.observe(u),d.observe(e));let g=a?Bk(t):null;return a&&function O(){const m=Bk(t);!g||m.x===g.x&&m.y===g.y&&m.width===g.width&&m.height===g.height||n(),g=m,h=requestAnimationFrame(O)}(),n(),()=>{c.forEach(O=>{i&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),f&&f(),d&&d.disconnect(),d=null,a&&cancelAnimationFrame(h)}}var r0=R.useLayoutEffect,yz=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],sd=function(){};function Sz(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function bz(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=[].concat(r);if(e&&t)for(var o in e)e.hasOwnProperty(o)&&e[o]&&s.push("".concat(Sz(t,o)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Fk=function(e){return _z(e)?e.filter(Boolean):Oo(e)==="object"&&e!==null?[e]:[]},h2=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var n=Gi(e,yz);return _e({},n)},Zt=function(e,n,r){var i=e.cx,s=e.getStyles,o=e.getClassNames,l=e.className;return{css:s(n,e),className:i(r??{},o(n,e),l)}};function np(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function wz(t){return np(t)?window.innerHeight:t.clientHeight}function d2(t){return np(t)?window.pageYOffset:t.scrollTop}function od(t,e){if(np(t)){window.scrollTo(0,e);return}t.scrollTop=e}function kz(t){var e=getComputedStyle(t),n=e.position==="absolute",r=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),!(n&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return i;return document.documentElement}function xz(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function gf(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:sd,i=d2(t),s=e-i,o=10,l=0;function a(){l+=o;var u=xz(l,i,s,n);od(t,u),l<n?window.requestAnimationFrame(a):r(t)}a()}function Uk(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?od(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&od(t,Math.max(e.offsetTop-i,0))}function Pz(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function Wk(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Cz(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var p2=!1,Qz={get passive(){return p2=!0}},mf=typeof window<"u"?window:{};mf.addEventListener&&mf.removeEventListener&&(mf.addEventListener("p",sd,Qz),mf.removeEventListener("p",sd,!1));var Ez=p2;function $z(t){return t!=null}function _z(t){return Array.isArray(t)}function Of(t,e,n){return t?e:n}var Tz=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=Object.entries(e).filter(function(o){var l=Zi(o,1),a=l[0];return!r.includes(a)});return s.reduce(function(o,l){var a=Zi(l,2),u=a[0],c=a[1];return o[u]=c,o},{})},Rz=["children","innerProps"],Az=["children","innerProps"];function Dz(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,s=t.shouldScroll,o=t.isFixedPosition,l=t.controlHeight,a=kz(n),u={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return u;var c=a.getBoundingClientRect(),f=c.height,h=n.getBoundingClientRect(),p=h.bottom,d=h.height,g=h.top,O=n.offsetParent.getBoundingClientRect(),m=O.top,S=o?window.innerHeight:wz(a),y=d2(a),b=parseInt(getComputedStyle(n).marginBottom,10),C=parseInt(getComputedStyle(n).marginTop,10),Q=m-C,_=S-g,k=Q+y,w=f-y-g,P=p-S+y+b,E=y+g-C,A=160;switch(i){case"auto":case"bottom":if(_>=d)return{placement:"bottom",maxHeight:e};if(w>=d&&!o)return s&&gf(a,P,A),{placement:"bottom",maxHeight:e};if(!o&&w>=r||o&&_>=r){s&&gf(a,P,A);var M=o?_-b:w-b;return{placement:"bottom",maxHeight:M}}if(i==="auto"||o){var N=e,z=o?Q:k;return z>=r&&(N=Math.min(z-b-l,e)),{placement:"top",maxHeight:N}}if(i==="bottom")return s&&od(a,P),{placement:"bottom",maxHeight:e};break;case"top":if(Q>=d)return{placement:"top",maxHeight:e};if(k>=d&&!o)return s&&gf(a,E,A),{placement:"top",maxHeight:e};if(!o&&k>=r||o&&Q>=r){var re=e;return(!o&&k>=r||o&&Q>=r)&&(re=o?Q-C:k-C),s&&gf(a,E,A),{placement:"top",maxHeight:re}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function Mz(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var g2=function(e){return e==="auto"?"bottom":e},Iz=function(e,n){var r,i=e.placement,s=e.theme,o=s.borderRadius,l=s.spacing,a=s.colors;return _e((r={label:"menu"},Aa(r,Mz(i),"100%"),Aa(r,"position","absolute"),Aa(r,"width","100%"),Aa(r,"zIndex",1),r),n?{}:{backgroundColor:a.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},m2=R.createContext(null),Nz=function(e){var n=e.children,r=e.minMenuHeight,i=e.maxMenuHeight,s=e.menuPlacement,o=e.menuPosition,l=e.menuShouldScrollIntoView,a=e.theme,u=R.useContext(m2)||{},c=u.setPortalPlacement,f=R.useRef(null),h=R.useState(i),p=Zi(h,2),d=p[0],g=p[1],O=R.useState(null),m=Zi(O,2),S=m[0],y=m[1],b=a.spacing.controlHeight;return r0(function(){var C=f.current;if(C){var Q=o==="fixed",_=l&&!Q,k=Dz({maxHeight:i,menuEl:C,minHeight:r,placement:s,shouldScroll:_,isFixedPosition:Q,controlHeight:b});g(k.maxHeight),y(k.placement),c==null||c(k.placement)}},[i,s,o,l,r,c,b]),n({ref:f,placerProps:_e(_e({},e),{},{placement:S||g2(s),maxHeight:d})})},Lz=function(e){var n=e.children,r=e.innerRef,i=e.innerProps;return Re("div",ve({},Zt(e,"menu",{menu:!0}),{ref:r},i),n)},Xz=Lz,Vz=function(e,n){var r=e.maxHeight,i=e.theme.spacing.baseUnit;return _e({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},Zz=function(e){var n=e.children,r=e.innerProps,i=e.innerRef,s=e.isMulti;return Re("div",ve({},Zt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:i},r),n)},O2=function(e,n){var r=e.theme,i=r.spacing.baseUnit,s=r.colors;return _e({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},jz=O2,Bz=O2,Fz=function(e){var n=e.children,r=n===void 0?"No options":n,i=e.innerProps,s=Gi(e,Rz);return Re("div",ve({},Zt(_e(_e({},s),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},Uz=function(e){var n=e.children,r=n===void 0?"Loading...":n,i=e.innerProps,s=Gi(e,Az);return Re("div",ve({},Zt(_e(_e({},s),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},Wz=function(e){var n=e.rect,r=e.offset,i=e.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},zz=function(e){var n=e.appendTo,r=e.children,i=e.controlElement,s=e.innerProps,o=e.menuPlacement,l=e.menuPosition,a=R.useRef(null),u=R.useRef(null),c=R.useState(g2(o)),f=Zi(c,2),h=f[0],p=f[1],d=R.useMemo(function(){return{setPortalPlacement:p}},[]),g=R.useState(null),O=Zi(g,2),m=O[0],S=O[1],y=R.useCallback(function(){if(i){var _=Pz(i),k=l==="fixed"?0:window.pageYOffset,w=_[h]+k;(w!==(m==null?void 0:m.offset)||_.left!==(m==null?void 0:m.rect.left)||_.width!==(m==null?void 0:m.rect.width))&&S({offset:w,rect:_})}},[i,l,h,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);r0(function(){y()},[y]);var b=R.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&a.current&&(u.current=vz(i,a.current,y,{elementResize:"ResizeObserver"in window}))},[i,y]);r0(function(){b()},[b]);var C=R.useCallback(function(_){a.current=_,b()},[b]);if(!n&&l!=="fixed"||!m)return null;var Q=Re("div",ve({ref:C},Zt(_e(_e({},e),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return Re(m2.Provider,{value:d},n?J0.createPortal(Q,n):Q)},Yz=function(e){var n=e.isDisabled,r=e.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},qz=function(e){var n=e.children,r=e.innerProps,i=e.isDisabled,s=e.isRtl;return Re("div",ve({},Zt(e,"container",{"--is-disabled":i,"--is-rtl":s}),r),n)},Gz=function(e,n){var r=e.theme.spacing,i=e.isMulti,s=e.hasValue,o=e.selectProps.controlShouldRenderValue;return _e({alignItems:"center",display:i&&s&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Hz=function(e){var n=e.children,r=e.innerProps,i=e.isMulti,s=e.hasValue;return Re("div",ve({},Zt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s}),r),n)},Kz=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Jz=function(e){var n=e.children,r=e.innerProps;return Re("div",ve({},Zt(e,"indicatorsContainer",{indicators:!0}),r),n)},zk,e8=["size"],t8=["innerProps","isRtl","size"],n8={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},v2=function(e){var n=e.size,r=Gi(e,e8);return Re("svg",ve({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:n8},r))},ay=function(e){return Re(v2,ve({size:20},e),Re("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},y2=function(e){return Re(v2,ve({size:20},e),Re("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},S2=function(e,n){var r=e.isFocused,i=e.theme,s=i.spacing.baseUnit,o=i.colors;return _e({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?o.neutral60:o.neutral20,padding:s*2,":hover":{color:r?o.neutral80:o.neutral40}})},r8=S2,i8=function(e){var n=e.children,r=e.innerProps;return Re("div",ve({},Zt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Re(y2,null))},s8=S2,o8=function(e){var n=e.children,r=e.innerProps;return Re("div",ve({},Zt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Re(ay,null))},l8=function(e,n){var r=e.isDisabled,i=e.theme,s=i.spacing.baseUnit,o=i.colors;return _e({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:s*2,marginTop:s*2})},a8=function(e){var n=e.innerProps;return Re("span",ve({},n,Zt(e,"indicatorSeparator",{"indicator-separator":!0})))},u8=oz(zk||(zk=lz([`
87
- 0%, 80%, 100% { opacity: 0; }
88
- 40% { opacity: 1; }
89
- `]))),c8=function(e,n){var r=e.isFocused,i=e.size,s=e.theme,o=s.colors,l=s.spacing.baseUnit;return _e({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:l*2})},Zg=function(e){var n=e.delay,r=e.offset;return Re("span",{css:sy({animation:"".concat(u8," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},f8=function(e){var n=e.innerProps,r=e.isRtl,i=e.size,s=i===void 0?4:i,o=Gi(e,t8);return Re("div",ve({},Zt(_e(_e({},o),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Re(Zg,{delay:0,offset:r}),Re(Zg,{delay:160,offset:!0}),Re(Zg,{delay:320,offset:!r}))},h8=function(e,n){var r=e.isDisabled,i=e.isFocused,s=e.theme,o=s.colors,l=s.borderRadius,a=s.spacing;return _e({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:i?o.primary:o.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},d8=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,s=e.innerRef,o=e.innerProps,l=e.menuIsOpen;return Re("div",ve({ref:s},Zt(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),o),n)},p8=d8,g8=["data"],m8=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},O8=function(e){var n=e.children,r=e.cx,i=e.getStyles,s=e.getClassNames,o=e.Heading,l=e.headingProps,a=e.innerProps,u=e.label,c=e.theme,f=e.selectProps;return Re("div",ve({},Zt(e,"group",{group:!0}),a),Re(o,ve({},l,{selectProps:f,theme:c,getStyles:i,getClassNames:s,cx:r}),u),Re("div",null,n))},v8=function(e,n){var r=e.theme,i=r.colors,s=r.spacing;return _e({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},y8=function(e){var n=h2(e);n.data;var r=Gi(n,g8);return Re("div",ve({},Zt(e,"groupHeading",{"group-heading":!0}),r))},S8=O8,b8=["innerRef","isDisabled","isHidden","inputClassName"],w8=function(e,n){var r=e.isDisabled,i=e.value,s=e.theme,o=s.spacing,l=s.colors;return _e(_e({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},k8),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:l.neutral80})},b2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},k8={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":_e({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},b2)},x8=function(e){return _e({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},b2)},P8=function(e){var n=e.cx,r=e.value,i=h2(e),s=i.innerRef,o=i.isDisabled,l=i.isHidden,a=i.inputClassName,u=Gi(i,b8);return Re("div",ve({},Zt(e,"input",{"input-container":!0}),{"data-value":r||""}),Re("input",ve({className:n({input:!0},a),ref:s,style:x8(l),disabled:o},u)))},C8=P8,Q8=function(e,n){var r=e.theme,i=r.spacing,s=r.borderRadius,o=r.colors;return _e({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:s/2,margin:i.baseUnit/2})},E8=function(e,n){var r=e.theme,i=r.borderRadius,s=r.colors,o=e.cropWithEllipsis;return _e({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},$8=function(e,n){var r=e.theme,i=r.spacing,s=r.borderRadius,o=r.colors,l=e.isFocused;return _e({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:l?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},w2=function(e){var n=e.children,r=e.innerProps;return Re("div",r,n)},_8=w2,T8=w2;function R8(t){var e=t.children,n=t.innerProps;return Re("div",ve({role:"button"},n),e||Re(ay,{size:14}))}var A8=function(e){var n=e.children,r=e.components,i=e.data,s=e.innerProps,o=e.isDisabled,l=e.removeProps,a=e.selectProps,u=r.Container,c=r.Label,f=r.Remove;return Re(u,{data:i,innerProps:_e(_e({},Zt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),s),selectProps:a},Re(c,{data:i,innerProps:_e({},Zt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},n),Re(f,{data:i,innerProps:_e(_e({},Zt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:a}))},D8=A8,M8=function(e,n){var r=e.isDisabled,i=e.isFocused,s=e.isSelected,o=e.theme,l=o.spacing,a=o.colors;return _e({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?a.primary:i?a.primary25:"transparent",color:r?a.neutral20:s?a.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?a.primary:a.primary50}})},I8=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,s=e.isSelected,o=e.innerRef,l=e.innerProps;return Re("div",ve({},Zt(e,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":s}),{ref:o,"aria-disabled":r},l),n)},N8=I8,L8=function(e,n){var r=e.theme,i=r.spacing,s=r.colors;return _e({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},X8=function(e){var n=e.children,r=e.innerProps;return Re("div",ve({},Zt(e,"placeholder",{placeholder:!0}),r),n)},V8=X8,Z8=function(e,n){var r=e.isDisabled,i=e.theme,s=i.spacing,o=i.colors;return _e({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},j8=function(e){var n=e.children,r=e.isDisabled,i=e.innerProps;return Re("div",ve({},Zt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},B8=j8,F8={ClearIndicator:o8,Control:p8,DropdownIndicator:i8,DownChevron:y2,CrossIcon:ay,Group:S8,GroupHeading:y8,IndicatorsContainer:Jz,IndicatorSeparator:a8,Input:C8,LoadingIndicator:f8,Menu:Xz,MenuList:Zz,MenuPortal:zz,LoadingMessage:Uz,NoOptionsMessage:Fz,MultiValue:D8,MultiValueContainer:_8,MultiValueLabel:T8,MultiValueRemove:R8,Option:N8,Placeholder:V8,SelectContainer:qz,SingleValue:B8,ValueContainer:Hz},U8=function(e){return _e(_e({},F8),e.components)},Yk=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function W8(t,e){return!!(t===e||Yk(t)&&Yk(e))}function z8(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!W8(t[n],e[n]))return!1;return!0}function Y8(t,e){e===void 0&&(e=z8);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var o=t.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}var q8={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},G8=function(e){return Re("span",ve({css:q8},e))},qk=G8,H8={guidance:function(e){var n=e.isSearchable,r=e.isMulti,i=e.isDisabled,s=e.tabSelectsValue,o=e.context;switch(o){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(s?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var n=e.action,r=e.label,i=r===void 0?"":r,s=e.labels,o=e.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return o?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(e){var n=e.context,r=e.focused,i=e.options,s=e.label,o=s===void 0?"":s,l=e.selectValue,a=e.isDisabled,u=e.isSelected,c=function(d,g){return d&&d.length?"".concat(d.indexOf(g)+1," of ").concat(d.length):""};if(n==="value"&&l)return"value ".concat(o," focused, ").concat(c(l,r),".");if(n==="menu"){var f=a?" disabled":"",h="".concat(u?"selected":"focused").concat(f);return"option ".concat(o," ").concat(h,", ").concat(c(i,r),".")}return""},onFilter:function(e){var n=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},K8=function(e){var n=e.ariaSelection,r=e.focusedOption,i=e.focusedValue,s=e.focusableOptions,o=e.isFocused,l=e.selectValue,a=e.selectProps,u=e.id,c=a.ariaLiveMessages,f=a.getOptionLabel,h=a.inputValue,p=a.isMulti,d=a.isOptionDisabled,g=a.isSearchable,O=a.menuIsOpen,m=a.options,S=a.screenReaderStatus,y=a.tabSelectsValue,b=a["aria-label"],C=a["aria-live"],Q=R.useMemo(function(){return _e(_e({},H8),c||{})},[c]),_=R.useMemo(function(){var N="";if(n&&Q.onChange){var z=n.option,re=n.options,se=n.removedValue,V=n.removedValues,G=n.value,te=function(ut){return Array.isArray(ut)?null:ut},Ae=se||z||te(G),xe=Ae?f(Ae):"",je=re||V||void 0,Ke=je?je.map(f):[],Pt=_e({isDisabled:Ae&&d(Ae,l),label:xe,labels:Ke},n);N=Q.onChange(Pt)}return N},[n,Q,d,l,f]),k=R.useMemo(function(){var N="",z=r||i,re=!!(r&&l&&l.includes(r));if(z&&Q.onFocus){var se={focused:z,label:f(z),isDisabled:d(z,l),isSelected:re,options:s,context:z===r?"menu":"value",selectValue:l};N=Q.onFocus(se)}return N},[r,i,f,d,Q,s,l]),w=R.useMemo(function(){var N="";if(O&&m.length&&Q.onFilter){var z=S({count:s.length});N=Q.onFilter({inputValue:h,resultsMessage:z})}return N},[s,h,O,Q,m,S]),P=R.useMemo(function(){var N="";if(Q.guidance){var z=i?"value":O?"menu":"input";N=Q.guidance({"aria-label":b,context:z,isDisabled:r&&d(r,l),isMulti:p,isSearchable:g,tabSelectsValue:y})}return N},[b,r,i,p,d,g,O,Q,l,y]),E="".concat(k," ").concat(w," ").concat(P),A=Re(R.Fragment,null,Re("span",{id:"aria-selection"},_),Re("span",{id:"aria-context"},E)),M=(n==null?void 0:n.action)==="initial-input-focus";return Re(R.Fragment,null,Re(qk,{id:u},M&&A),Re(qk,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text"},o&&!M&&A))},J8=K8,i0=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],e6=new RegExp("["+i0.map(function(t){return t.letters}).join("")+"]","g"),k2={};for(var jg=0;jg<i0.length;jg++)for(var Bg=i0[jg],Fg=0;Fg<Bg.letters.length;Fg++)k2[Bg.letters[Fg]]=Bg.base;var x2=function(e){return e.replace(e6,function(n){return k2[n]})},t6=Y8(x2),Gk=function(e){return e.replace(/^\s+|\s+$/g,"")},n6=function(e){return"".concat(e.label," ").concat(e.value)},r6=function(e){return function(n,r){if(n.data.__isNew__)return!0;var i=_e({ignoreCase:!0,ignoreAccents:!0,stringify:n6,trim:!0,matchFrom:"any"},e),s=i.ignoreCase,o=i.ignoreAccents,l=i.stringify,a=i.trim,u=i.matchFrom,c=a?Gk(r):r,f=a?Gk(l(n)):l(n);return s&&(c=c.toLowerCase(),f=f.toLowerCase()),o&&(c=t6(c),f=x2(f)),u==="start"?f.substr(0,c.length)===c:f.indexOf(c)>-1}},i6=["innerRef"];function s6(t){var e=t.innerRef,n=Gi(t,i6),r=Tz(n,"onExited","in","enter","exit","appear");return Re("input",ve({ref:e},r,{css:sy({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var o6=function(e){e.preventDefault(),e.stopPropagation()};function l6(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,s=t.onTopLeave,o=R.useRef(!1),l=R.useRef(!1),a=R.useRef(0),u=R.useRef(null),c=R.useCallback(function(O,m){if(u.current!==null){var S=u.current,y=S.scrollTop,b=S.scrollHeight,C=S.clientHeight,Q=u.current,_=m>0,k=b-C-y,w=!1;k>m&&o.current&&(r&&r(O),o.current=!1),_&&l.current&&(s&&s(O),l.current=!1),_&&m>k?(n&&!o.current&&n(O),Q.scrollTop=b,w=!0,o.current=!0):!_&&-m>y&&(i&&!l.current&&i(O),Q.scrollTop=0,w=!0,l.current=!0),w&&o6(O)}},[n,r,i,s]),f=R.useCallback(function(O){c(O,O.deltaY)},[c]),h=R.useCallback(function(O){a.current=O.changedTouches[0].clientY},[]),p=R.useCallback(function(O){var m=a.current-O.changedTouches[0].clientY;c(O,m)},[c]),d=R.useCallback(function(O){if(O){var m=Ez?{passive:!1}:!1;O.addEventListener("wheel",f,m),O.addEventListener("touchstart",h,m),O.addEventListener("touchmove",p,m)}},[p,h,f]),g=R.useCallback(function(O){O&&(O.removeEventListener("wheel",f,!1),O.removeEventListener("touchstart",h,!1),O.removeEventListener("touchmove",p,!1))},[p,h,f]);return R.useEffect(function(){if(e){var O=u.current;return d(O),function(){g(O)}}},[e,d,g]),function(O){u.current=O}}var Hk=["boxSizing","height","overflow","paddingRight","position"],Kk={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jk(t){t.preventDefault()}function ex(t){t.stopPropagation()}function tx(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function nx(){return"ontouchstart"in window||navigator.maxTouchPoints}var rx=!!(typeof window<"u"&&window.document&&window.document.createElement),ba=0,Mo={capture:!1,passive:!1};function a6(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=R.useRef({}),s=R.useRef(null),o=R.useCallback(function(a){if(rx){var u=document.body,c=u&&u.style;if(r&&Hk.forEach(function(d){var g=c&&c[d];i.current[d]=g}),r&&ba<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Kk).forEach(function(d){var g=Kk[d];c&&(c[d]=g)}),c&&(c.paddingRight="".concat(p,"px"))}u&&nx()&&(u.addEventListener("touchmove",Jk,Mo),a&&(a.addEventListener("touchstart",tx,Mo),a.addEventListener("touchmove",ex,Mo))),ba+=1}},[r]),l=R.useCallback(function(a){if(rx){var u=document.body,c=u&&u.style;ba=Math.max(ba-1,0),r&&ba<1&&Hk.forEach(function(f){var h=i.current[f];c&&(c[f]=h)}),u&&nx()&&(u.removeEventListener("touchmove",Jk,Mo),a&&(a.removeEventListener("touchstart",tx,Mo),a.removeEventListener("touchmove",ex,Mo)))}},[r]);return R.useEffect(function(){if(e){var a=s.current;return o(a),function(){l(a)}}},[e,o,l]),function(a){s.current=a}}var u6=function(){return document.activeElement&&document.activeElement.blur()},c6={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function f6(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,s=t.onBottomArrive,o=t.onBottomLeave,l=t.onTopArrive,a=t.onTopLeave,u=l6({isEnabled:i,onBottomArrive:s,onBottomLeave:o,onTopArrive:l,onTopLeave:a}),c=a6({isEnabled:n}),f=function(p){u(p),c(p)};return Re(R.Fragment,null,n&&Re("div",{onClick:u6,css:c6}),e(f))}var h6={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},d6=function(e){var n=e.name,r=e.onFocus;return Re("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:h6,value:"",onChange:function(){}})},p6=d6,g6=function(e){return e.label},m6=function(e){return e.label},O6=function(e){return e.value},v6=function(e){return!!e.isDisabled},y6={clearIndicator:s8,container:Yz,control:h8,dropdownIndicator:r8,group:m8,groupHeading:v8,indicatorsContainer:Kz,indicatorSeparator:l8,input:w8,loadingIndicator:c8,loadingMessage:Bz,menu:Iz,menuList:Vz,menuPortal:Wz,multiValue:Q8,multiValueLabel:E8,multiValueRemove:$8,noOptionsMessage:jz,option:M8,placeholder:L8,singleValue:Z8,valueContainer:Gz},S6={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},b6=4,P2=4,w6=38,k6=P2*2,x6={baseUnit:P2,controlHeight:w6,menuGutter:k6},Ug={borderRadius:b6,colors:S6,spacing:x6},P6={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Wk(),captureMenuScroll:!Wk(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:r6(),formatGroupLabel:g6,getOptionLabel:m6,getOptionValue:O6,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:v6,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Cz(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function ix(t,e,n,r){var i=$2(t,e,n),s=_2(t,e,n),o=E2(t,e),l=ld(t,e);return{type:"option",data:e,isDisabled:i,isSelected:s,label:o,value:l,index:r}}function C2(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(o,l){return ix(t,o,e,l)}).filter(function(o){return sx(t,o)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var s=ix(t,n,e,r);return sx(t,s)?s:void 0}).filter($z)}function Q2(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,FT(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function C6(t,e){return Q2(C2(t,e))}function sx(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,s=e.isSelected,o=e.label,l=e.value;return(!R2(t)||!s)&&T2(t,{label:o,value:l,data:i},r)}function Q6(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var s=e.indexOf(n);if(s>-1)return n;if(i<e.length)return e[i]}return null}function E6(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var E2=function(e,n){return e.getOptionLabel(n)},ld=function(e,n){return e.getOptionValue(n)};function $2(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function _2(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=ld(t,e);return n.some(function(i){return ld(t,i)===r})}function T2(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var R2=function(e){var n=e.hideSelectedOptions,r=e.isMulti;return n===void 0?r:n},$6=1,A2=function(t){HU(n,t);var e=tW(n);function n(r){var i;if(qU(this,n),i=e.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,a){var u=i.props,c=u.onChange,f=u.name;a.name=f,i.ariaOnChange(l,a),c(l,a)},i.setValue=function(l,a,u){var c=i.props,f=c.closeMenuOnSelect,h=c.isMulti,p=c.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:p}),f&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:a,option:u})},i.selectOption=function(l){var a=i.props,u=a.blurInputOnSelect,c=a.isMulti,f=a.name,h=i.state.selectValue,p=c&&i.isOptionSelected(l,h),d=i.isOptionDisabled(l,h);if(p){var g=i.getOptionValue(l);i.setValue(h.filter(function(O){return i.getOptionValue(O)!==g}),"deselect-option",l)}else if(!d)c?i.setValue([].concat(FT(h),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:f});return}u&&i.blurInput()},i.removeValue=function(l){var a=i.props.isMulti,u=i.state.selectValue,c=i.getOptionValue(l),f=u.filter(function(p){return i.getOptionValue(p)!==c}),h=Of(a,f,f[0]||null);i.onChange(h,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(Of(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,a=i.state.selectValue,u=a[a.length-1],c=a.slice(0,a.length-1),f=Of(l,c,c[0]||null);i.onChange(f,{action:"pop-value",removedValue:u})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];return bz.apply(void 0,[i.props.classNamePrefix].concat(a))},i.getOptionLabel=function(l){return E2(i.props,l)},i.getOptionValue=function(l){return ld(i.props,l)},i.getStyles=function(l,a){var u=i.props.unstyled,c=y6[l](a,u);c.boxSizing="border-box";var f=i.props.styles[l];return f?f(c,a):c},i.getClassNames=function(l,a){var u,c;return(u=(c=i.props.classNames)[l])===null||u===void 0?void 0:u.call(c,a)},i.getElementId=function(l){return"".concat(i.instancePrefix,"-").concat(l)},i.getComponents=function(){return U8(i.props)},i.buildCategorizedOptions=function(){return C2(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Q2(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,a){i.setState({ariaSelection:_e({value:l},a)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var a=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():a&&i.openMenu("first"):(a&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var a=i.props,u=a.isMulti,c=a.menuIsOpen;i.focusInput(),c?(i.setState({inputIsHiddenAfterUpdate:!u}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&np(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var a=l.touches,u=a&&a.item(0);u&&(i.initialTouchX=u.clientX,i.initialTouchY=u.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var a=l.touches,u=a&&a.item(0);if(u){var c=Math.abs(u.clientX-i.initialTouchX),f=Math.abs(u.clientY-i.initialTouchY),h=5;i.userIsDragging=c>h||f>h}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var a=i.props.inputValue,u=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:a}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var a=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:a}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){i.blockOptionHover||i.state.focusedOption===l||i.setState({focusedOption:l})},i.shouldHideSelectedOptions=function(){return R2(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var a=i.props,u=a.isMulti,c=a.backspaceRemovesValue,f=a.escapeClearsValue,h=a.inputValue,p=a.isClearable,d=a.isDisabled,g=a.menuIsOpen,O=a.onKeyDown,m=a.tabSelectsValue,S=a.openMenuOnFocus,y=i.state,b=y.focusedOption,C=y.focusedValue,Q=y.selectValue;if(!d&&!(typeof O=="function"&&(O(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||h)return;i.focusValue("previous");break;case"ArrowRight":if(!u||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(C)i.removeValue(C);else{if(!c)return;u?i.popValue():p&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!g||!m||!b||S&&i.isOptionSelected(b,Q))return;i.selectOption(b);break;case"Enter":if(l.keyCode===229)break;if(g){if(!b||i.isComposing)return;i.selectOption(b);break}return;case"Escape":g?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):p&&f&&i.clearValue();break;case" ":if(h)return;if(!g){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":g?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":g?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!g)return;i.focusOption("pageup");break;case"PageDown":if(!g)return;i.focusOption("pagedown");break;case"Home":if(!g)return;i.focusOption("first");break;case"End":if(!g)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++$6),i.state.selectValue=Fk(r.value),r.menuIsOpen&&i.state.selectValue.length){var s=i.buildFocusableOptions(),o=s.indexOf(i.state.selectValue[0]);i.state.focusedOption=s[o]}return i}return GU(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Uk(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isDisabled,l=s.menuIsOpen,a=this.state.isFocused;(a&&!o&&i.isDisabled||a&&l&&!i.menuIsOpen)&&this.focusInput(),a&&o&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!a&&!o&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Uk(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,s){this.props.onInputChange(i,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var s=this,o=this.state,l=o.selectValue,a=o.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(l[0]);f>-1&&(c=f)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c]},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(i){var s=this.state,o=s.selectValue,l=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=o.indexOf(l);l||(a=-1);var u=o.length-1,c=-1;if(o.length){switch(i){case"previous":a===0?c=0:a===-1?c=u:c=a-1;break;case"next":a>-1&&a<u&&(c=a+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:o[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,o=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var a=0,u=l.indexOf(o);o||(u=-1),i==="up"?a=u>0?u-1:l.length-1:i==="down"?a=(u+1)%l.length:i==="pageup"?(a=u-s,a<0&&(a=0)):i==="pagedown"?(a=u+s,a>l.length-1&&(a=l.length-1)):i==="last"&&(a=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Ug):_e(_e({},Ug),this.props.theme):Ug}},{key:"getCommonProps",value:function(){var i=this.clearValue,s=this.cx,o=this.getStyles,l=this.getClassNames,a=this.getValue,u=this.selectOption,c=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,d=f.options,g=this.hasValue();return{clearValue:i,cx:s,getStyles:o,getClassNames:l,getValue:a,hasValue:g,isMulti:h,isRtl:p,options:d,selectOption:u,selectProps:f,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,s=i.isClearable,o=i.isMulti;return s===void 0?o:s}},{key:"isOptionDisabled",value:function(i,s){return $2(this.props,i,s)}},{key:"isOptionSelected",value:function(i,s){return _2(this.props,i,s)}},{key:"filterOption",value:function(i,s){return T2(this.props,i,s)}},{key:"formatOptionLabel",value:function(i,s){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:s,inputValue:o,selectValue:l})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,s=i.isDisabled,o=i.isSearchable,l=i.inputId,a=i.inputValue,u=i.tabIndex,c=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),d=p.Input,g=this.state,O=g.inputIsHidden,m=g.ariaSelection,S=this.commonProps,y=l||this.getElementId("input"),b=_e(_e(_e({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox"},f&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?R.createElement(d,ve({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:s,isHidden:O,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:a},b)):R.createElement(s6,ve({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:sd,onFocus:this.onInputFocus,disabled:s,tabIndex:u,inputMode:"none",form:c,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,s=this.getComponents(),o=s.MultiValue,l=s.MultiValueContainer,a=s.MultiValueLabel,u=s.MultiValueRemove,c=s.SingleValue,f=s.Placeholder,h=this.commonProps,p=this.props,d=p.controlShouldRenderValue,g=p.isDisabled,O=p.isMulti,m=p.inputValue,S=p.placeholder,y=this.state,b=y.selectValue,C=y.focusedValue,Q=y.isFocused;if(!this.hasValue()||!d)return m?null:R.createElement(f,ve({},h,{key:"placeholder",isDisabled:g,isFocused:Q,innerProps:{id:this.getElementId("placeholder")}}),S);if(O)return b.map(function(k,w){var P=k===C,E="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return R.createElement(o,ve({},h,{components:{Container:l,Label:a,Remove:u},isFocused:P,isDisabled:g,key:E,index:w,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(M){M.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(m)return null;var _=b[0];return R.createElement(c,ve({},h,{data:_,isDisabled:g}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),s=i.ClearIndicator,o=this.commonProps,l=this.props,a=l.isDisabled,u=l.isLoading,c=this.state.isFocused;if(!this.isClearable()||!s||a||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return R.createElement(s,ve({},o,{innerProps:f,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),s=i.LoadingIndicator,o=this.commonProps,l=this.props,a=l.isDisabled,u=l.isLoading,c=this.state.isFocused;if(!s||!u)return null;var f={"aria-hidden":"true"};return R.createElement(s,ve({},o,{innerProps:f,isDisabled:a,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator,o=i.IndicatorSeparator;if(!s||!o)return null;var l=this.commonProps,a=this.props.isDisabled,u=this.state.isFocused;return R.createElement(o,ve({},l,{isDisabled:a,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator;if(!s)return null;var o=this.commonProps,l=this.props.isDisabled,a=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return R.createElement(s,ve({},o,{innerProps:u,isDisabled:l,isFocused:a}))}},{key:"renderMenu",value:function(){var i=this,s=this.getComponents(),o=s.Group,l=s.GroupHeading,a=s.Menu,u=s.MenuList,c=s.MenuPortal,f=s.LoadingMessage,h=s.NoOptionsMessage,p=s.Option,d=this.commonProps,g=this.state.focusedOption,O=this.props,m=O.captureMenuScroll,S=O.inputValue,y=O.isLoading,b=O.loadingMessage,C=O.minMenuHeight,Q=O.maxMenuHeight,_=O.menuIsOpen,k=O.menuPlacement,w=O.menuPosition,P=O.menuPortalTarget,E=O.menuShouldBlockScroll,A=O.menuShouldScrollIntoView,M=O.noOptionsMessage,N=O.onMenuScrollToTop,z=O.onMenuScrollToBottom;if(!_)return null;var re=function(je,Ke){var Pt=je.type,ct=je.data,ut=je.isDisabled,$n=je.isSelected,yn=je.label,I=je.value,j=g===ct,K=ut?void 0:function(){return i.onOptionHover(ct)},ee=ut?void 0:function(){return i.selectOption(ct)},F="".concat(i.getElementId("option"),"-").concat(Ke),W={id:F,onClick:ee,onMouseMove:K,onMouseOver:K,tabIndex:-1};return R.createElement(p,ve({},d,{innerProps:W,data:ct,isDisabled:ut,isSelected:$n,key:F,label:yn,type:Pt,value:I,isFocused:j,innerRef:j?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(je.data,"menu"))},se;if(this.hasOptions())se=this.getCategorizedOptions().map(function(xe){if(xe.type==="group"){var je=xe.data,Ke=xe.options,Pt=xe.index,ct="".concat(i.getElementId("group"),"-").concat(Pt),ut="".concat(ct,"-heading");return R.createElement(o,ve({},d,{key:ct,data:je,options:Ke,Heading:l,headingProps:{id:ut,data:xe.data},label:i.formatGroupLabel(xe.data)}),xe.options.map(function($n){return re($n,"".concat(Pt,"-").concat($n.index))}))}else if(xe.type==="option")return re(xe,"".concat(xe.index))});else if(y){var V=b({inputValue:S});if(V===null)return null;se=R.createElement(f,d,V)}else{var G=M({inputValue:S});if(G===null)return null;se=R.createElement(h,d,G)}var te={minMenuHeight:C,maxMenuHeight:Q,menuPlacement:k,menuPosition:w,menuShouldScrollIntoView:A},Ae=R.createElement(Nz,ve({},d,te),function(xe){var je=xe.ref,Ke=xe.placerProps,Pt=Ke.placement,ct=Ke.maxHeight;return R.createElement(a,ve({},d,te,{innerRef:je,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:y,placement:Pt}),R.createElement(f6,{captureEnabled:m,onTopArrive:N,onBottomArrive:z,lockEnabled:E},function(ut){return R.createElement(u,ve({},d,{innerRef:function(yn){i.getMenuListRef(yn),ut(yn)},isLoading:y,maxHeight:ct,focusedOption:g}),se)}))});return P||w==="fixed"?R.createElement(c,ve({},d,{appendTo:P,controlElement:this.controlRef,menuPlacement:k,menuPosition:w}),Ae):Ae}},{key:"renderFormField",value:function(){var i=this,s=this.props,o=s.delimiter,l=s.isDisabled,a=s.isMulti,u=s.name,c=s.required,f=this.state.selectValue;if(c&&!this.hasValue()&&!l)return R.createElement(p6,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(a)if(o){var h=f.map(function(g){return i.getOptionValue(g)}).join(o);return R.createElement("input",{name:u,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,O){return R.createElement("input",{key:"i-".concat(O),name:u,type:"hidden",value:i.getOptionValue(g)})}):R.createElement("input",{name:u,type:"hidden",value:""});return R.createElement("div",null,p)}else{var d=f[0]?this.getOptionValue(f[0]):"";return R.createElement("input",{name:u,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,s=this.state,o=s.ariaSelection,l=s.focusedOption,a=s.focusedValue,u=s.isFocused,c=s.selectValue,f=this.getFocusableOptions();return R.createElement(J8,ve({},i,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:l,focusedValue:a,isFocused:u,selectValue:c,focusableOptions:f}))}},{key:"render",value:function(){var i=this.getComponents(),s=i.Control,o=i.IndicatorsContainer,l=i.SelectContainer,a=i.ValueContainer,u=this.props,c=u.className,f=u.id,h=u.isDisabled,p=u.menuIsOpen,d=this.state.isFocused,g=this.commonProps=this.getCommonProps();return R.createElement(l,ve({},g,{className:c,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:d}),this.renderLiveRegion(),R.createElement(s,ve({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:d,menuIsOpen:p}),R.createElement(a,ve({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),R.createElement(o,ve({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,s){var o=s.prevProps,l=s.clearFocusValueOnUpdate,a=s.inputIsHiddenAfterUpdate,u=s.ariaSelection,c=s.isFocused,f=s.prevWasFocused,h=i.options,p=i.value,d=i.menuIsOpen,g=i.inputValue,O=i.isMulti,m=Fk(p),S={};if(o&&(p!==o.value||h!==o.options||d!==o.menuIsOpen||g!==o.inputValue)){var y=d?C6(i,m):[],b=l?Q6(s,m):null,C=E6(s,y);S={selectValue:m,focusedOption:C,focusedValue:b,clearFocusValueOnUpdate:!1}}var Q=a!=null&&i!==o?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},_=u,k=c&&f;return c&&!k&&(_={value:Of(O,m,m[0]||null),options:m,action:"initial-input-focus"},k=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(_=null),_e(_e(_e({},S),Q),{},{prevProps:i,ariaSelection:_,prevWasFocused:k})}}]),n}(R.Component);A2.defaultProps=P6;var _6=R.forwardRef(function(t,e){var n=YU(t);return R.createElement(A2,ve({ref:e},n))}),ox=_6;const T6=[{value:1,label:"1 second"},{value:5,label:"5 seconds"},{value:10,label:"10 seconds"},{value:30,label:"30 seconds"}],R6=({show:t,onClose:e,setTheme:n})=>{const r=R.useCallback(s=>{n(s.label)},[]),i=R.useCallback(s=>{const o=[{value:s.value}];fetch("/saveTime",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},[]);return t?U.jsxs(ya,{className:"vz-settings",show:t,onHide:e,animation:!1,children:[U.jsx(ya.Header,{closeButton:!0,children:U.jsx(ya.Title,{children:"Settings"})}),U.jsxs(ya.Body,{children:[U.jsxs(ri.Group,{className:"mb-3",controlId:"formFork",children:[U.jsx(ri.Label,{children:"Username"}),U.jsx(ri.Control,{type:"text",placeholder:"Enter username"}),U.jsx(ri.Text,{className:"text-muted",children:"Enter a username to be displayed on your cursor"})]}),U.jsxs(ri.Group,{className:"mb-3",controlId:"formFork",children:[U.jsx(ri.Label,{children:"Theme"}),U.jsx(ox,{options:bE,onChange:r}),U.jsx(ri.Text,{className:"text-muted",children:"Select a color theme for the editor"})]}),U.jsxs(ri.Group,{className:"mb-3",controlId:"formFork",children:[U.jsx(ri.Label,{children:"Auto-Save Time"}),U.jsx(ox,{options:T6,onChange:i}),U.jsx(ri.Text,{className:"text-muted",children:"Select an auto save time"})]})]}),U.jsx(ya.Footer,{children:U.jsx(jU,{variant:"primary",onClick:e,children:"Done"})})]}):null},A6=t=>{const e={name:"files"};for(const n of Object.keys(t)){const r=t[n],i=r.name.split("/"),s=i.length;let o=e;for(let l=0;l<s-1;l++){let a;const u=i[l];if(o.children)for(let c=0;c<o.children.length;c++){const f=o.children[c];if(f.name===u){a=f;break}}a||(a={name:i[l],path:i.slice(0,l+1).join("/")},(o.children||(o.children=[])).push(a)),o=a}r.text!==null&&(o.children||(o.children=[])).push({name:i[s-1],file:r,fileId:n})}return e},D2=t=>(t.children&&(t.children.sort((e,n)=>{const r=e.file?1:0,i=n.file?1:0;return r-i||e.name.localeCompare(n.name)}),t.children.forEach(D2)),t),M2=({children:t,handleClick:e,handleRenameClick:n,handleDeleteClick:r})=>{const[i,s]=R.useState(!1),o=R.useCallback(()=>{s(!0)},[]),l=R.useCallback(()=>{s(!1)},[]);return U.jsxs("div",{className:"full-box file-or-directory",onClick:e,onMouseEnter:o,onMouseLeave:l,children:[U.jsx("div",{className:"name",children:t}),i?U.jsxs("div",{className:"utils",children:[U.jsx("i",{className:"bx bxs-edit utilities",style:{color:"#abdafb"},onClick:n}),U.jsx("i",{className:"bx bx-trash",style:{color:"#eb336c"},onClick:r})]}):null]})},D6=({height:t=10,fill:e="currentcolor"})=>U.jsx("svg",{height:t,viewBox:"4 4 16 16",children:U.jsx("path",{fill:e,d:"M8 17l9-5-9-5v10z"})}),M6=({name:t,path:e,children:n,handleRenameFileClick:r,handleDeleteFileClick:i,handleFileClick:s,isDirectoryOpen:o,toggleDirectory:l})=>{const a=R.useCallback(()=>{l(e)},[l]),u=R.useCallback(()=>{console.log("TODO handleDeleteDirectoryClick")},[]),c=R.useCallback(()=>{console.log("TODO handleRenameDirectoryClick")},[]),f=R.useMemo(()=>o(e),[o,e]);return U.jsxs(U.Fragment,{children:[U.jsxs(M2,{name:t,handleClick:a,handleDeleteClick:u,handleRenameClick:c,children:[U.jsx("div",{className:"arrow-wrapper",style:{transform:`rotate(${f?90:0}deg)`},children:U.jsx(D6,{})}),t]}),n&&f?U.jsx("div",{className:"indentation",children:n.map(h=>{const{fileId:p}=h,{path:d}=h;return U.jsx(I2,{entity:h,handleRenameFileClick:r,handleDeleteFileClick:i,handleFileClick:s,isDirectoryOpen:o,toggleDirectory:l},p||d)})}):null]})},I6=({name:t,fileId:e,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i})=>{const s=R.useCallback(()=>{i(e)},[e,i]),o=R.useCallback(a=>{r(e,a)},[e]),l=R.useCallback(()=>{n(e)},[e]);return U.jsx(M2,{handleClick:s,handleDeleteClick:o,handleRenameClick:l,children:t})},I2=({entity:t,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r,isDirectoryOpen:i,toggleDirectory:s})=>{const{name:o,file:l,fileId:a}=t,{path:u,children:c}=t;return l?U.jsx(I6,{fileId:a,name:o,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r}):U.jsx(M6,{name:o,path:u,children:c,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r,isDirectoryOpen:i,toggleDirectory:s})};const N6=({createFile:t,files:e,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i,setIsSettingsOpen:s,isDirectoryOpen:o,toggleDirectory:l})=>{const a=R.useMemo(()=>e?D2(A6(e)):null,[e]);return R.useCallback(()=>{s(!0)},[]),U.jsxs("div",{className:"vz-sidebar",children:[U.jsxs("div",{className:"files",children:[U.jsxs("div",{className:"full-box",children:[U.jsx("div",{children:U.jsx("a",{className:"link-name",href:"#",children:"Files"})}),U.jsx("div",{children:U.jsx("i",{className:"bx bxs-file-plus new-btn",style:{color:"#dbdde1"},onClick:t})})]}),a?a.children.map(u=>{const{fileId:c}=u,{path:f}=u,h=c||f;return U.jsx(I2,{entity:u,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i,isDirectoryOpen:o,toggleDirectory:l},h)}):null]}),null]})};const L6=t=>{const e=t.split("/");return e.length===1?e[e.length-1]:e[e.length-2]+"/"+e[e.length-1]},X6=({fileId:t,isActive:e,setActiveFileId:n,closeTab:r,fileName:i})=>{const s=R.useCallback(l=>{l.stopPropagation(),r(t)},[r,t]),o=R.useMemo(()=>L6(i),[i]);return U.jsxs("div",{className:e?"tab active":"tab",onClick:()=>{n(t)},children:[o,U.jsx("div",{className:e?"bx bx-x tab-close":"",onClick:s})]})},V6=({files:t,tabList:e,activeFileId:n,setActiveFileId:r,closeTab:i})=>U.jsx("div",{className:"vz-tab-list",children:t&&e.map(s=>U.jsx(X6,{fileId:s,isActive:s===n,setActiveFileId:r,closeTab:i,fileName:t[s].name},s))}),Z6=()=>{const[t,e]=R.useState(new Set),n=R.useCallback(i=>t.has(i),[t]),r=R.useCallback(i=>{const s=new Set(t);s[n(i)?"delete":"add"](i),e(s)},[t,n]);return{isDirectoryOpen:n,toggleDirectory:r}},j6=(t,e,n,r)=>{const i=R.useCallback(o=>{const l=n.findIndex(a=>a===o);if(l!==-1){const a=[...n.slice(0,l),...n.slice(l+1)];r(a),t===o&&(a.length>0?e(l===0?a[l]:a[l-1]):e(null))}},[n,t]),s=R.useCallback(o=>{e(o),n.includes(o)||r([...n,o])},[n]);return{tabList:n,closeTab:i,openTab:s}};wC.types.register(ev.type);const{Connection:B6}=wC,F6=window.location.protocol==="https:"?"wss://":"ws://",U6=new WebSocket(F6+window.location.host+"/ws"),W6=new B6(U6);function z6(){const[t,e]=R.useState(null),[n,r]=R.useState(null),[i,s]=R.useState(null),[o,l]=R.useState(null),[a,u]=R.useState(null),[c,f]=R.useState([]),{closeTab:h,openTab:p}=j6(a,u,c,f),[d,g]=R.useState(wE),[O,m]=R.useState(!1),{isDirectoryOpen:S,toggleDirectory:y}=Z6();R.useEffect(()=>{const w="documents",P="1",E=W6.get(w,P);return E.subscribe(()=>{e(E),l(E.data),E.on("op",()=>{l(E.data)});const A=E.connection.getDocPresence(w,P);A.subscribe(function(M){if(M)throw M}),r(A.create(kS())),s(A)}),()=>{}},[]);const b=R.useCallback(w=>{const P=prompt("Enter new name");if(P){const E=t.data,A={...E,[w]:{...E[w],name:P}};t.submitOp(Ag(E,A))}},[t]),C=R.useCallback(w=>{h(w);const P=t.data,E={...P};delete E[w],t.submitOp(Ag(P,E))},[t,h]),Q=R.useCallback((w,P)=>{P.stopPropagation(),C(w)},[C]),_=R.useCallback(()=>{const w=prompt("Enter new file name");if(!w)return;const P=t.data,E={...P,[kS()]:{name:w,text:""}};t.submitOp(Ag(P,E))},[t]),k=R.useCallback(()=>{m(!1)},[]);return U.jsxs("div",{className:"app",children:[U.jsxs("div",{className:"left",children:[U.jsx(N6,{createFile:_,files:o,handleRenameFileClick:b,handleDeleteFileClick:Q,handleFileClick:p,setIsSettingsOpen:m,isDirectoryOpen:S,toggleDirectory:y}),U.jsx(R6,{show:O,onClose:k,setTheme:g})]}),U.jsxs("div",{className:"right",children:[U.jsx(V6,{files:o,tabList:c,activeFileId:a,setActiveFileId:u,closeTab:h}),o&&a?U.jsx(Ej,{shareDBDoc:t,localPresence:n,docPresence:i,activeFileId:a,theme:d}):null]})]})}SC(document.getElementById("root")).render(U.jsx(R.StrictMode,{children:U.jsx(z6,{})}));