vzcode 0.15.0 → 0.16.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,115 +0,0 @@
1
- function H2(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 o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var $r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gP={exports:{}},Od={},mP={exports:{}},st={};/**
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 Yu=Symbol.for("react.element"),K2=Symbol.for("react.portal"),J2=Symbol.for("react.fragment"),eR=Symbol.for("react.strict_mode"),tR=Symbol.for("react.profiler"),nR=Symbol.for("react.provider"),rR=Symbol.for("react.context"),iR=Symbol.for("react.forward_ref"),oR=Symbol.for("react.suspense"),sR=Symbol.for("react.memo"),lR=Symbol.for("react.lazy"),S1=Symbol.iterator;function aR(t){return t===null||typeof t!="object"?null:(t=S1&&t[S1]||t["@@iterator"],typeof t=="function"?t:null)}var OP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yP=Object.assign,vP={};function ql(t,e,n){this.props=t,this.context=e,this.refs=vP,this.updater=n||OP}ql.prototype.isReactComponent={};ql.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")};ql.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function SP(){}SP.prototype=ql.prototype;function hy(t,e,n){this.props=t,this.context=e,this.refs=vP,this.updater=n||OP}var dy=hy.prototype=new SP;dy.constructor=hy;yP(dy,ql.prototype);dy.isPureReactComponent=!0;var b1=Array.isArray,bP=Object.prototype.hasOwnProperty,py={current:null},wP={key:!0,ref:!0,__self:!0,__source:!0};function kP(t,e,n){var r,i={},o=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)bP.call(e,r)&&!wP.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:Yu,type:t,key:o,ref:s,props:i,_owner:py.current}}function uR(t,e){return{$$typeof:Yu,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function gy(t){return typeof t=="object"&&t!==null&&t.$$typeof===Yu}function cR(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var w1=/\/+/g;function Ep(t,e){return typeof t=="object"&&t!==null&&t.key!=null?cR(""+t.key):e.toString(36)}function Qf(t,e,n,r,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case Yu:case K2:s=!0}}if(s)return s=t,i=i(s),t=r===""?"."+Ep(s,0):r,b1(i)?(n="",t!=null&&(n=t.replace(w1,"$&/")+"/"),Qf(i,e,n,"",function(u){return u})):i!=null&&(gy(i)&&(i=uR(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(w1,"$&/")+"/")+t)),e.push(i)),1;if(s=0,r=r===""?".":r+":",b1(t))for(var l=0;l<t.length;l++){o=t[l];var a=r+Ep(o,l);s+=Qf(o,e,n,a,i)}else if(a=aR(t),typeof a=="function")for(t=a.call(t),l=0;!(o=t.next()).done;)o=o.value,a=r+Ep(o,l++),s+=Qf(o,e,n,a,i);else if(o==="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 s}function Dc(t,e,n){if(t==null)return t;var r=[],i=0;return Qf(t,r,"","",function(o){return e.call(n,o,i++)}),r}function fR(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 zn={current:null},$f={transition:null},hR={ReactCurrentDispatcher:zn,ReactCurrentBatchConfig:$f,ReactCurrentOwner:py};st.Children={map:Dc,forEach:function(t,e,n){Dc(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Dc(t,function(){e++}),e},toArray:function(t){return Dc(t,function(e){return e})||[]},only:function(t){if(!gy(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};st.Component=ql;st.Fragment=J2;st.Profiler=tR;st.PureComponent=hy;st.StrictMode=eR;st.Suspense=oR;st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hR;st.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=yP({},t.props),i=t.key,o=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,s=py.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(a in e)bP.call(e,a)&&!wP.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:Yu,type:t.type,key:i,ref:o,props:r,_owner:s}};st.createContext=function(t){return t={$$typeof:rR,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:nR,_context:t},t.Consumer=t};st.createElement=kP;st.createFactory=function(t){var e=kP.bind(null,t);return e.type=t,e};st.createRef=function(){return{current:null}};st.forwardRef=function(t){return{$$typeof:iR,render:t}};st.isValidElement=gy;st.lazy=function(t){return{$$typeof:lR,_payload:{_status:-1,_result:t},_init:fR}};st.memo=function(t,e){return{$$typeof:sR,type:t,compare:e===void 0?null:e}};st.startTransition=function(t){var e=$f.transition;$f.transition={};try{t()}finally{$f.transition=e}};st.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};st.useCallback=function(t,e){return zn.current.useCallback(t,e)};st.useContext=function(t){return zn.current.useContext(t)};st.useDebugValue=function(){};st.useDeferredValue=function(t){return zn.current.useDeferredValue(t)};st.useEffect=function(t,e){return zn.current.useEffect(t,e)};st.useId=function(){return zn.current.useId()};st.useImperativeHandle=function(t,e,n){return zn.current.useImperativeHandle(t,e,n)};st.useInsertionEffect=function(t,e){return zn.current.useInsertionEffect(t,e)};st.useLayoutEffect=function(t,e){return zn.current.useLayoutEffect(t,e)};st.useMemo=function(t,e){return zn.current.useMemo(t,e)};st.useReducer=function(t,e,n){return zn.current.useReducer(t,e,n)};st.useRef=function(t){return zn.current.useRef(t)};st.useState=function(t){return zn.current.useState(t)};st.useSyncExternalStore=function(t,e,n){return zn.current.useSyncExternalStore(t,e,n)};st.useTransition=function(){return zn.current.useTransition()};st.version="18.2.0";mP.exports=st;var I=mP.exports;const bo=Uo(I),k1=H2({__proto__:null,default:bo},[I]);/**
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 dR=I,pR=Symbol.for("react.element"),gR=Symbol.for("react.fragment"),mR=Object.prototype.hasOwnProperty,OR=dR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yR={key:!0,ref:!0,__self:!0,__source:!0};function PP(t,e,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)mR.call(e,r)&&!yR.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:pR,type:t,key:o,ref:s,props:i,_owner:OR.current}}Od.Fragment=gR;Od.jsx=PP;Od.jsxs=PP;gP.exports=Od;var ne=gP.exports,xP={exports:{}},wr={},CP={exports:{}},EP={};/**
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(A,X){var z=A.length;A.push(X);e:for(;0<z;){var pe=z-1>>>1,ae=A[pe];if(0<i(ae,X))A[pe]=X,A[z]=ae,z=pe;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var X=A[0],z=A.pop();if(z!==X){A[0]=z;e:for(var pe=0,ae=A.length,B=ae>>>1;pe<B;){var q=2*(pe+1)-1,te=A[q],we=q+1,F=A[we];if(0>i(te,z))we<ae&&0>i(F,te)?(A[pe]=F,A[we]=z,pe=we):(A[pe]=te,A[q]=z,pe=q);else if(we<ae&&0>i(F,z))A[pe]=F,A[we]=z,pe=we;else break e}}return X}function i(A,X){var z=A.sortIndex-X.sortIndex;return z!==0?z:A.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,f=null,h=3,d=!1,p=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,m=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(A){for(var X=n(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=A)r(u),X.sortIndex=X.expirationTime,e(a,X);else break;X=n(u)}}function b(A){if(g=!1,y(A),!p)if(n(a)!==null)p=!0,M(x);else{var X=n(u);X!==null&&j(b,X.startTime-A)}}function x(A,X){p=!1,g&&(g=!1,O(w),w=-1),d=!0;var z=h;try{for(y(X),f=n(a);f!==null&&(!(f.expirationTime>X)||A&&!Q());){var pe=f.callback;if(typeof pe=="function"){f.callback=null,h=f.priorityLevel;var ae=pe(f.expirationTime<=X);X=t.unstable_now(),typeof ae=="function"?f.callback=ae:f===n(a)&&r(a),y(X)}else r(a);f=n(a)}if(f!==null)var B=!0;else{var q=n(u);q!==null&&j(b,q.startTime-X),B=!1}return B}finally{f=null,h=z,d=!1}}var E=!1,T=null,w=-1,k=5,C=-1;function Q(){return!(t.unstable_now()-C<k)}function D(){if(T!==null){var A=t.unstable_now();C=A;var X=!0;try{X=T(!0,A)}finally{X?N():(E=!1,T=null)}}else E=!1}var N;if(typeof m=="function")N=function(){m(D)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,G=V.port2;V.port1.onmessage=D,N=function(){G.postMessage(null)}}else N=function(){v(D,0)};function M(A){T=A,E||(E=!0,N())}function j(A,X){w=v(function(){A(t.unstable_now())},X)}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(A){A.callback=null},t.unstable_continueExecution=function(){p||d||(p=!0,M(x))},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(a)},t.unstable_next=function(A){switch(h){case 1:case 2:case 3:var X=3;break;default:X=h}var z=h;h=X;try{return A()}finally{h=z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(A,X){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var z=h;h=A;try{return X()}finally{h=z}},t.unstable_scheduleCallback=function(A,X,z){var pe=t.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?pe+z:pe):z=pe,A){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=z+ae,A={id:c++,callback:X,priorityLevel:A,startTime:z,expirationTime:ae,sortIndex:-1},z>pe?(A.sortIndex=z,e(u,A),n(a)===null&&A===n(u)&&(g?(O(w),w=-1):g=!0,j(b,z-pe))):(A.sortIndex=ae,e(a,A),p||d||(p=!0,M(x))),A},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(A){var X=h;return function(){var z=h;h=X;try{return A.apply(this,arguments)}finally{h=z}}}})(EP);CP.exports=EP;var vR=CP.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 QP=I,br=vR;function se(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 $P=new Set,su={};function $s(t,e){Ql(t,e),Ql(t+"Capture",e)}function Ql(t,e){for(su[t]=e,t=0;t<e.length;t++)$P.add(e[t])}var Ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jg=Object.prototype.hasOwnProperty,SR=/^[: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]*$/,P1={},x1={};function bR(t){return Jg.call(x1,t)?!0:Jg.call(P1,t)?!1:SR.test(t)?x1[t]=!0:(P1[t]=!0,!1)}function wR(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 kR(t,e,n,r){if(e===null||typeof e>"u"||wR(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 qn(t,e,n,r,i,o,s){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=o,this.removeEmptyString=s}var $n={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){$n[t]=new qn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];$n[e]=new qn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){$n[t]=new qn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){$n[t]=new qn(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){$n[t]=new qn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){$n[t]=new qn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){$n[t]=new qn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){$n[t]=new qn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){$n[t]=new qn(t,5,!1,t.toLowerCase(),null,!1,!1)});var my=/[\-:]([a-z])/g;function Oy(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(my,Oy);$n[e]=new qn(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(my,Oy);$n[e]=new qn(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(my,Oy);$n[e]=new qn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){$n[t]=new qn(t,1,!1,t.toLowerCase(),null,!1,!1)});$n.xlinkHref=new qn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){$n[t]=new qn(t,1,!1,t.toLowerCase(),null,!0,!0)});function yy(t,e,n,r){var i=$n.hasOwnProperty(e)?$n[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(kR(e,n,i,r)&&(n=null),r||i===null?bR(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 io=QP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Mc=Symbol.for("react.element"),Gs=Symbol.for("react.portal"),Hs=Symbol.for("react.fragment"),vy=Symbol.for("react.strict_mode"),em=Symbol.for("react.profiler"),_P=Symbol.for("react.provider"),TP=Symbol.for("react.context"),Sy=Symbol.for("react.forward_ref"),tm=Symbol.for("react.suspense"),nm=Symbol.for("react.suspense_list"),by=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),AP=Symbol.for("react.offscreen"),C1=Symbol.iterator;function da(t){return t===null||typeof t!="object"?null:(t=C1&&t[C1]||t["@@iterator"],typeof t=="function"?t:null)}var zt=Object.assign,Qp;function Ra(t){if(Qp===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Qp=e&&e[1]||""}return`
34
- `+Qp+t}var $p=!1;function _p(t,e){if(!t||$p)return"";$p=!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
- `),o=r.stack.split(`
36
- `),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
37
- `+i[s].replace(" at new "," at ");return t.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{$p=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ra(t):""}function PR(t){switch(t.tag){case 5:return Ra(t.type);case 16:return Ra("Lazy");case 13:return Ra("Suspense");case 19:return Ra("SuspenseList");case 0:case 2:case 15:return t=_p(t.type,!1),t;case 11:return t=_p(t.type.render,!1),t;case 1:return t=_p(t.type,!0),t;default:return""}}function rm(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 Hs:return"Fragment";case Gs:return"Portal";case em:return"Profiler";case vy:return"StrictMode";case tm:return"Suspense";case nm:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case TP:return(t.displayName||"Context")+".Consumer";case _P:return(t._context.displayName||"Context")+".Provider";case Sy:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case by:return e=t.displayName||null,e!==null?e:rm(t.type)||"Memo";case ho:e=t._payload,t=t._init;try{return rm(t(e))}catch{}}return null}function xR(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 rm(e);case 8:return e===vy?"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 jo(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function RP(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function CR(t){var e=RP(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,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ic(t){t._valueTracker||(t._valueTracker=CR(t))}function DP(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=RP(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ih(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 im(t,e){var n=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function E1(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=jo(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 MP(t,e){e=e.checked,e!=null&&yy(t,"checked",e,!1)}function om(t,e){MP(t,e);var n=jo(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")?sm(t,e.type,n):e.hasOwnProperty("defaultValue")&&sm(t,e.type,jo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Q1(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 sm(t,e,n){(e!=="number"||ih(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Da=Array.isArray;function hl(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=""+jo(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 lm(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(se(91));return zt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function $1(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(se(92));if(Da(n)){if(1<n.length)throw Error(se(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:jo(n)}}function IP(t,e){var n=jo(e.value),r=jo(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 _1(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function NP(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 am(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?NP(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Nc,jP=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(Nc=Nc||document.createElement("div"),Nc.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Nc.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function lu(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ua={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},ER=["Webkit","ms","Moz","O"];Object.keys(Ua).forEach(function(t){ER.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ua[e]=Ua[t]})});function LP(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ua.hasOwnProperty(t)&&Ua[t]?(""+e).trim():e+"px"}function VP(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=LP(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var QR=zt({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 um(t,e){if(e){if(QR[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(se(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(se(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(se(61))}if(e.style!=null&&typeof e.style!="object")throw Error(se(62))}}function cm(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 fm=null;function wy(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var hm=null,dl=null,pl=null;function T1(t){if(t=Gu(t)){if(typeof hm!="function")throw Error(se(280));var e=t.stateNode;e&&(e=wd(e),hm(t.stateNode,t.type,e))}}function BP(t){dl?pl?pl.push(t):pl=[t]:dl=t}function FP(){if(dl){var t=dl,e=pl;if(pl=dl=null,T1(t),e)for(t=0;t<e.length;t++)T1(e[t])}}function XP(t,e){return t(e)}function WP(){}var Tp=!1;function UP(t,e,n){if(Tp)return t(e,n);Tp=!0;try{return XP(t,e,n)}finally{Tp=!1,(dl!==null||pl!==null)&&(WP(),FP())}}function au(t,e){var n=t.stateNode;if(n===null)return null;var r=wd(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(se(231,e,typeof n));return n}var dm=!1;if(Ki)try{var pa={};Object.defineProperty(pa,"passive",{get:function(){dm=!0}}),window.addEventListener("test",pa,pa),window.removeEventListener("test",pa,pa)}catch{dm=!1}function $R(t,e,n,r,i,o,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var Za=!1,oh=null,sh=!1,pm=null,_R={onError:function(t){Za=!0,oh=t}};function TR(t,e,n,r,i,o,s,l,a){Za=!1,oh=null,$R.apply(_R,arguments)}function AR(t,e,n,r,i,o,s,l,a){if(TR.apply(this,arguments),Za){if(Za){var u=oh;Za=!1,oh=null}else throw Error(se(198));sh||(sh=!0,pm=u)}}function _s(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 ZP(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 A1(t){if(_s(t)!==t)throw Error(se(188))}function RR(t){var e=t.alternate;if(!e){if(e=_s(t),e===null)throw Error(se(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return A1(i),t;if(o===r)return A1(i),e;o=o.sibling}throw Error(se(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(se(189))}}if(n.alternate!==r)throw Error(se(190))}if(n.tag!==3)throw Error(se(188));return n.stateNode.current===n?t:e}function YP(t){return t=RR(t),t!==null?zP(t):null}function zP(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=zP(t);if(e!==null)return e;t=t.sibling}return null}var qP=br.unstable_scheduleCallback,R1=br.unstable_cancelCallback,DR=br.unstable_shouldYield,MR=br.unstable_requestPaint,rn=br.unstable_now,IR=br.unstable_getCurrentPriorityLevel,ky=br.unstable_ImmediatePriority,GP=br.unstable_UserBlockingPriority,lh=br.unstable_NormalPriority,NR=br.unstable_LowPriority,HP=br.unstable_IdlePriority,yd=null,Ci=null;function jR(t){if(Ci&&typeof Ci.onCommitFiberRoot=="function")try{Ci.onCommitFiberRoot(yd,t,void 0,(t.current.flags&128)===128)}catch{}}var ei=Math.clz32?Math.clz32:BR,LR=Math.log,VR=Math.LN2;function BR(t){return t>>>=0,t===0?32:31-(LR(t)/VR|0)|0}var jc=64,Lc=4194304;function Ma(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 ah(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Ma(l):(o&=s,o!==0&&(r=Ma(o)))}else s=n&~i,s!==0?r=Ma(s):o!==0&&(r=Ma(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&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-ei(e),i=1<<n,r|=t[n],e&=~i;return r}function FR(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 XR(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-ei(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=FR(l,e)):a<=e&&(t.expiredLanes|=l),o&=~l}}function gm(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function KP(){var t=jc;return jc<<=1,!(jc&4194240)&&(jc=64),t}function Ap(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function zu(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ei(e),t[e]=n}function WR(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-ei(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}function Py(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-ei(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var St=0;function JP(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var ex,xy,tx,nx,rx,mm=!1,Vc=[],Qo=null,$o=null,_o=null,uu=new Map,cu=new Map,yo=[],UR="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 D1(t,e){switch(t){case"focusin":case"focusout":Qo=null;break;case"dragenter":case"dragleave":$o=null;break;case"mouseover":case"mouseout":_o=null;break;case"pointerover":case"pointerout":uu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":cu.delete(e.pointerId)}}function ga(t,e,n,r,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Gu(e),e!==null&&xy(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function ZR(t,e,n,r,i){switch(e){case"focusin":return Qo=ga(Qo,t,e,n,r,i),!0;case"dragenter":return $o=ga($o,t,e,n,r,i),!0;case"mouseover":return _o=ga(_o,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return uu.set(o,ga(uu.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,cu.set(o,ga(cu.get(o)||null,t,e,n,r,i)),!0}return!1}function ix(t){var e=as(t.target);if(e!==null){var n=_s(e);if(n!==null){if(e=n.tag,e===13){if(e=ZP(n),e!==null){t.blockedOn=e,rx(t.priority,function(){tx(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 _f(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Om(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);fm=r,n.target.dispatchEvent(r),fm=null}else return e=Gu(n),e!==null&&xy(e),t.blockedOn=n,!1;e.shift()}return!0}function M1(t,e,n){_f(t)&&n.delete(e)}function YR(){mm=!1,Qo!==null&&_f(Qo)&&(Qo=null),$o!==null&&_f($o)&&($o=null),_o!==null&&_f(_o)&&(_o=null),uu.forEach(M1),cu.forEach(M1)}function ma(t,e){t.blockedOn===e&&(t.blockedOn=null,mm||(mm=!0,br.unstable_scheduleCallback(br.unstable_NormalPriority,YR)))}function fu(t){function e(i){return ma(i,t)}if(0<Vc.length){ma(Vc[0],t);for(var n=1;n<Vc.length;n++){var r=Vc[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Qo!==null&&ma(Qo,t),$o!==null&&ma($o,t),_o!==null&&ma(_o,t),uu.forEach(e),cu.forEach(e),n=0;n<yo.length;n++)r=yo[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<yo.length&&(n=yo[0],n.blockedOn===null);)ix(n),n.blockedOn===null&&yo.shift()}var gl=io.ReactCurrentBatchConfig,uh=!0;function zR(t,e,n,r){var i=St,o=gl.transition;gl.transition=null;try{St=1,Cy(t,e,n,r)}finally{St=i,gl.transition=o}}function qR(t,e,n,r){var i=St,o=gl.transition;gl.transition=null;try{St=4,Cy(t,e,n,r)}finally{St=i,gl.transition=o}}function Cy(t,e,n,r){if(uh){var i=Om(t,e,n,r);if(i===null)Fp(t,e,r,ch,n),D1(t,r);else if(ZR(i,t,e,n,r))r.stopPropagation();else if(D1(t,r),e&4&&-1<UR.indexOf(t)){for(;i!==null;){var o=Gu(i);if(o!==null&&ex(o),o=Om(t,e,n,r),o===null&&Fp(t,e,r,ch,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Fp(t,e,r,null,n)}}var ch=null;function Om(t,e,n,r){if(ch=null,t=wy(r),t=as(t),t!==null)if(e=_s(t),e===null)t=null;else if(n=e.tag,n===13){if(t=ZP(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 ch=t,null}function ox(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(IR()){case ky:return 1;case GP:return 4;case lh:case NR:return 16;case HP:return 536870912;default:return 16}default:return 16}}var wo=null,Ey=null,Tf=null;function sx(){if(Tf)return Tf;var t,e=Ey,n=e.length,r,i="value"in wo?wo.value:wo.textContent,o=i.length;for(t=0;t<n&&e[t]===i[t];t++);var s=n-t;for(r=1;r<=s&&e[n-r]===i[o-r];r++);return Tf=i.slice(t,1<r?1-r:void 0)}function Af(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 Bc(){return!0}function I1(){return!1}function kr(t){function e(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(n=t[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Bc:I1,this.isPropagationStopped=I1,this}return zt(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=Bc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Bc)},persist:function(){},isPersistent:Bc}),e}var Gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qy=kr(Gl),qu=zt({},Gl,{view:0,detail:0}),GR=kr(qu),Rp,Dp,Oa,vd=zt({},qu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$y,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"?(Rp=t.screenX-Oa.screenX,Dp=t.screenY-Oa.screenY):Dp=Rp=0,Oa=t),Rp)},movementY:function(t){return"movementY"in t?t.movementY:Dp}}),N1=kr(vd),HR=zt({},vd,{dataTransfer:0}),KR=kr(HR),JR=zt({},qu,{relatedTarget:0}),Mp=kr(JR),eD=zt({},Gl,{animationName:0,elapsedTime:0,pseudoElement:0}),tD=kr(eD),nD=zt({},Gl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),rD=kr(nD),iD=zt({},Gl,{data:0}),j1=kr(iD),oD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sD={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"},lD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aD(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=lD[t])?!!e[t]:!1}function $y(){return aD}var uD=zt({},qu,{key:function(t){if(t.key){var e=oD[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Af(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?sD[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$y,charCode:function(t){return t.type==="keypress"?Af(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Af(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),cD=kr(uD),fD=zt({},vd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),L1=kr(fD),hD=zt({},qu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$y}),dD=kr(hD),pD=zt({},Gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),gD=kr(pD),mD=zt({},vd,{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}),OD=kr(mD),yD=[9,13,27,32],_y=Ki&&"CompositionEvent"in window,Ya=null;Ki&&"documentMode"in document&&(Ya=document.documentMode);var vD=Ki&&"TextEvent"in window&&!Ya,lx=Ki&&(!_y||Ya&&8<Ya&&11>=Ya),V1=String.fromCharCode(32),B1=!1;function ax(t,e){switch(t){case"keyup":return yD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ux(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ks=!1;function SD(t,e){switch(t){case"compositionend":return ux(e);case"keypress":return e.which!==32?null:(B1=!0,V1);case"textInput":return t=e.data,t===V1&&B1?null:t;default:return null}}function bD(t,e){if(Ks)return t==="compositionend"||!_y&&ax(t,e)?(t=sx(),Tf=Ey=wo=null,Ks=!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 lx&&e.locale!=="ko"?null:e.data;default:return null}}var wD={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 F1(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!wD[t.type]:e==="textarea"}function cx(t,e,n,r){BP(r),e=fh(e,"onChange"),0<e.length&&(n=new Qy("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var za=null,hu=null;function kD(t){bx(t,0)}function Sd(t){var e=tl(t);if(DP(e))return t}function PD(t,e){if(t==="change")return e}var fx=!1;if(Ki){var Ip;if(Ki){var Np="oninput"in document;if(!Np){var X1=document.createElement("div");X1.setAttribute("oninput","return;"),Np=typeof X1.oninput=="function"}Ip=Np}else Ip=!1;fx=Ip&&(!document.documentMode||9<document.documentMode)}function W1(){za&&(za.detachEvent("onpropertychange",hx),hu=za=null)}function hx(t){if(t.propertyName==="value"&&Sd(hu)){var e=[];cx(e,hu,t,wy(t)),UP(kD,e)}}function xD(t,e,n){t==="focusin"?(W1(),za=e,hu=n,za.attachEvent("onpropertychange",hx)):t==="focusout"&&W1()}function CD(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Sd(hu)}function ED(t,e){if(t==="click")return Sd(e)}function QD(t,e){if(t==="input"||t==="change")return Sd(e)}function $D(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ni=typeof Object.is=="function"?Object.is:$D;function du(t,e){if(ni(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(!Jg.call(e,i)||!ni(t[i],e[i]))return!1}return!0}function U1(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Z1(t,e){var n=U1(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=U1(n)}}function dx(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?dx(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function px(){for(var t=window,e=ih();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ih(t.document)}return e}function Ty(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 _D(t){var e=px(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&dx(n.ownerDocument.documentElement,n)){if(r!==null&&Ty(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,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=Z1(n,o);var s=Z1(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.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 TD=Ki&&"documentMode"in document&&11>=document.documentMode,Js=null,ym=null,qa=null,vm=!1;function Y1(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vm||Js==null||Js!==ih(r)||(r=Js,"selectionStart"in r&&Ty(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}),qa&&du(qa,r)||(qa=r,r=fh(ym,"onSelect"),0<r.length&&(e=new Qy("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Js)))}function Fc(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var el={animationend:Fc("Animation","AnimationEnd"),animationiteration:Fc("Animation","AnimationIteration"),animationstart:Fc("Animation","AnimationStart"),transitionend:Fc("Transition","TransitionEnd")},jp={},gx={};Ki&&(gx=document.createElement("div").style,"AnimationEvent"in window||(delete el.animationend.animation,delete el.animationiteration.animation,delete el.animationstart.animation),"TransitionEvent"in window||delete el.transitionend.transition);function bd(t){if(jp[t])return jp[t];if(!el[t])return t;var e=el[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in gx)return jp[t]=e[n];return t}var mx=bd("animationend"),Ox=bd("animationiteration"),yx=bd("animationstart"),vx=bd("transitionend"),Sx=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 Zo(t,e){Sx.set(t,e),$s(e,[t])}for(var Lp=0;Lp<z1.length;Lp++){var Vp=z1[Lp],AD=Vp.toLowerCase(),RD=Vp[0].toUpperCase()+Vp.slice(1);Zo(AD,"on"+RD)}Zo(mx,"onAnimationEnd");Zo(Ox,"onAnimationIteration");Zo(yx,"onAnimationStart");Zo("dblclick","onDoubleClick");Zo("focusin","onFocus");Zo("focusout","onBlur");Zo(vx,"onTransitionEnd");Ql("onMouseEnter",["mouseout","mouseover"]);Ql("onMouseLeave",["mouseout","mouseover"]);Ql("onPointerEnter",["pointerout","pointerover"]);Ql("onPointerLeave",["pointerout","pointerover"]);$s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$s("onBeforeInput",["compositionend","keypress","textInput","paste"]);$s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ia="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(" "),DD=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ia));function q1(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,AR(r,e,void 0,t),t.currentTarget=null}function bx(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 o=void 0;if(e)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;q1(i,l,u),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;q1(i,l,u),o=a}}}if(sh)throw t=pm,sh=!1,pm=null,t}function Rt(t,e){var n=e[Pm];n===void 0&&(n=e[Pm]=new Set);var r=t+"__bubble";n.has(r)||(wx(e,t,2,!1),n.add(r))}function Bp(t,e,n){var r=0;e&&(r|=4),wx(n,t,r,e)}var Xc="_reactListening"+Math.random().toString(36).slice(2);function pu(t){if(!t[Xc]){t[Xc]=!0,$P.forEach(function(n){n!=="selectionchange"&&(DD.has(n)||Bp(n,!1,t),Bp(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Xc]||(e[Xc]=!0,Bp("selectionchange",!1,e))}}function wx(t,e,n,r){switch(ox(e)){case 1:var i=zR;break;case 4:i=qR;break;default:i=Cy}n=i.bind(null,e,n,t),i=void 0,!dm||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 Fp(t,e,n,r,i){var o=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=as(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}UP(function(){var u=o,c=wy(n),f=[];e:{var h=Sx.get(t);if(h!==void 0){var d=Qy,p=t;switch(t){case"keypress":if(Af(n)===0)break e;case"keydown":case"keyup":d=cD;break;case"focusin":p="focus",d=Mp;break;case"focusout":p="blur",d=Mp;break;case"beforeblur":case"afterblur":d=Mp;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":d=N1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=KR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=dD;break;case mx:case Ox:case yx:d=tD;break;case vx:d=gD;break;case"scroll":d=GR;break;case"wheel":d=OD;break;case"copy":case"cut":case"paste":d=rD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=L1}var g=(e&4)!==0,v=!g&&t==="scroll",O=g?h!==null?h+"Capture":null:h;g=[];for(var m=u,y;m!==null;){y=m;var b=y.stateNode;if(y.tag===5&&b!==null&&(y=b,O!==null&&(b=au(m,O),b!=null&&g.push(gu(m,b,y)))),v)break;m=m.return}0<g.length&&(h=new d(h,p,null,n,c),f.push({event:h,listeners:g}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",h&&n!==fm&&(p=n.relatedTarget||n.fromElement)&&(as(p)||p[Ji]))break e;if((d||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(p=n.relatedTarget||n.toElement,d=u,p=p?as(p):null,p!==null&&(v=_s(p),p!==v||p.tag!==5&&p.tag!==6)&&(p=null)):(d=null,p=u),d!==p)){if(g=N1,b="onMouseLeave",O="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(g=L1,b="onPointerLeave",O="onPointerEnter",m="pointer"),v=d==null?h:tl(d),y=p==null?h:tl(p),h=new g(b,m+"leave",d,n,c),h.target=v,h.relatedTarget=y,b=null,as(c)===u&&(g=new g(O,m+"enter",p,n,c),g.target=y,g.relatedTarget=v,b=g),v=b,d&&p)t:{for(g=d,O=p,m=0,y=g;y;y=Vs(y))m++;for(y=0,b=O;b;b=Vs(b))y++;for(;0<m-y;)g=Vs(g),m--;for(;0<y-m;)O=Vs(O),y--;for(;m--;){if(g===O||O!==null&&g===O.alternate)break t;g=Vs(g),O=Vs(O)}g=null}else g=null;d!==null&&G1(f,h,d,g,!1),p!==null&&v!==null&&G1(f,v,p,g,!0)}}e:{if(h=u?tl(u):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var x=PD;else if(F1(h))if(fx)x=QD;else{x=CD;var E=xD}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(x=ED);if(x&&(x=x(t,u))){cx(f,x,n,c);break e}E&&E(t,h,u),t==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&sm(h,"number",h.value)}switch(E=u?tl(u):window,t){case"focusin":(F1(E)||E.contentEditable==="true")&&(Js=E,ym=u,qa=null);break;case"focusout":qa=ym=Js=null;break;case"mousedown":vm=!0;break;case"contextmenu":case"mouseup":case"dragend":vm=!1,Y1(f,n,c);break;case"selectionchange":if(TD)break;case"keydown":case"keyup":Y1(f,n,c)}var T;if(_y)e:{switch(t){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Ks?ax(t,n)&&(w="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(w="onCompositionStart");w&&(lx&&n.locale!=="ko"&&(Ks||w!=="onCompositionStart"?w==="onCompositionEnd"&&Ks&&(T=sx()):(wo=c,Ey="value"in wo?wo.value:wo.textContent,Ks=!0)),E=fh(u,w),0<E.length&&(w=new j1(w,t,null,n,c),f.push({event:w,listeners:E}),T?w.data=T:(T=ux(n),T!==null&&(w.data=T)))),(T=vD?SD(t,n):bD(t,n))&&(u=fh(u,"onBeforeInput"),0<u.length&&(c=new j1("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=T))}bx(f,e)})}function gu(t,e,n){return{instance:t,listener:e,currentTarget:n}}function fh(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=au(t,n),o!=null&&r.unshift(gu(t,o,i)),o=au(t,e),o!=null&&r.push(gu(t,o,i))),t=t.return}return r}function Vs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function G1(t,e,n,r,i){for(var o=e._reactName,s=[];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=au(n,o),a!=null&&s.unshift(gu(n,a,l))):i||(a=au(n,o),a!=null&&s.push(gu(n,a,l)))),n=n.return}s.length!==0&&t.push({event:e,listeners:s})}var MD=/\r\n?/g,ID=/\u0000|\uFFFD/g;function H1(t){return(typeof t=="string"?t:""+t).replace(MD,`
38
- `).replace(ID,"")}function Wc(t,e,n){if(e=H1(e),H1(t)!==e&&n)throw Error(se(425))}function hh(){}var Sm=null,bm=null;function wm(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 km=typeof setTimeout=="function"?setTimeout:void 0,ND=typeof clearTimeout=="function"?clearTimeout:void 0,K1=typeof Promise=="function"?Promise:void 0,jD=typeof queueMicrotask=="function"?queueMicrotask:typeof K1<"u"?function(t){return K1.resolve(null).then(t).catch(LD)}:km;function LD(t){setTimeout(function(){throw t})}function Xp(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),fu(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);fu(e)}function To(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 J1(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 Hl=Math.random().toString(36).slice(2),vi="__reactFiber$"+Hl,mu="__reactProps$"+Hl,Ji="__reactContainer$"+Hl,Pm="__reactEvents$"+Hl,VD="__reactListeners$"+Hl,BD="__reactHandles$"+Hl;function as(t){var e=t[vi];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ji]||n[vi]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=J1(t);t!==null;){if(n=t[vi])return n;t=J1(t)}return e}t=n,n=t.parentNode}return null}function Gu(t){return t=t[vi]||t[Ji],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function tl(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(se(33))}function wd(t){return t[mu]||null}var xm=[],nl=-1;function Yo(t){return{current:t}}function It(t){0>nl||(t.current=xm[nl],xm[nl]=null,nl--)}function Et(t,e){nl++,xm[nl]=t.current,t.current=e}var Lo={},Vn=Yo(Lo),ir=Yo(!1),Ss=Lo;function $l(t,e){var n=t.type.contextTypes;if(!n)return Lo;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function or(t){return t=t.childContextTypes,t!=null}function dh(){It(ir),It(Vn)}function eS(t,e,n){if(Vn.current!==Lo)throw Error(se(168));Et(Vn,e),Et(ir,n)}function kx(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(se(108,xR(t)||"Unknown",i));return zt({},n,r)}function ph(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Lo,Ss=Vn.current,Et(Vn,t),Et(ir,ir.current),!0}function tS(t,e,n){var r=t.stateNode;if(!r)throw Error(se(169));n?(t=kx(t,e,Ss),r.__reactInternalMemoizedMergedChildContext=t,It(ir),It(Vn),Et(Vn,t)):It(ir),Et(ir,n)}var Fi=null,kd=!1,Wp=!1;function Px(t){Fi===null?Fi=[t]:Fi.push(t)}function FD(t){kd=!0,Px(t)}function zo(){if(!Wp&&Fi!==null){Wp=!0;var t=0,e=St;try{var n=Fi;for(St=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Fi=null,kd=!1}catch(i){throw Fi!==null&&(Fi=Fi.slice(t+1)),qP(ky,zo),i}finally{St=e,Wp=!1}}return null}var rl=[],il=0,gh=null,mh=0,_r=[],Tr=0,bs=null,Ui=1,Zi="";function ns(t,e){rl[il++]=mh,rl[il++]=gh,gh=t,mh=e}function xx(t,e,n){_r[Tr++]=Ui,_r[Tr++]=Zi,_r[Tr++]=bs,bs=t;var r=Ui;t=Zi;var i=32-ei(r)-1;r&=~(1<<i),n+=1;var o=32-ei(e)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Ui=1<<32-ei(e)+i|n<<i|r,Zi=o+t}else Ui=1<<o|n<<i|r,Zi=t}function Ay(t){t.return!==null&&(ns(t,1),xx(t,1,0))}function Ry(t){for(;t===gh;)gh=rl[--il],rl[il]=null,mh=rl[--il],rl[il]=null;for(;t===bs;)bs=_r[--Tr],_r[Tr]=null,Zi=_r[--Tr],_r[Tr]=null,Ui=_r[--Tr],_r[Tr]=null}var yr=null,mr=null,Vt=!1,Hr=null;function Cx(t,e){var n=Rr(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 nS(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,yr=t,mr=To(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,yr=t,mr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=bs!==null?{id:Ui,overflow:Zi}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Rr(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,yr=t,mr=null,!0):!1;default:return!1}}function Cm(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Em(t){if(Vt){var e=mr;if(e){var n=e;if(!nS(t,e)){if(Cm(t))throw Error(se(418));e=To(n.nextSibling);var r=yr;e&&nS(t,e)?Cx(r,n):(t.flags=t.flags&-4097|2,Vt=!1,yr=t)}}else{if(Cm(t))throw Error(se(418));t.flags=t.flags&-4097|2,Vt=!1,yr=t}}}function rS(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;yr=t}function Uc(t){if(t!==yr)return!1;if(!Vt)return rS(t),Vt=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!wm(t.type,t.memoizedProps)),e&&(e=mr)){if(Cm(t))throw Ex(),Error(se(418));for(;e;)Cx(t,e),e=To(e.nextSibling)}if(rS(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(se(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){mr=To(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}mr=null}}else mr=yr?To(t.stateNode.nextSibling):null;return!0}function Ex(){for(var t=mr;t;)t=To(t.nextSibling)}function _l(){mr=yr=null,Vt=!1}function Dy(t){Hr===null?Hr=[t]:Hr.push(t)}var XD=io.ReactCurrentBatchConfig;function qr(t,e){if(t&&t.defaultProps){e=zt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var Oh=Yo(null),yh=null,ol=null,My=null;function Iy(){My=ol=yh=null}function Ny(t){var e=Oh.current;It(Oh),t._currentValue=e}function Qm(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 ml(t,e){yh=t,My=ol=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(tr=!0),t.firstContext=null)}function Lr(t){var e=t._currentValue;if(My!==t)if(t={context:t,memoizedValue:e,next:null},ol===null){if(yh===null)throw Error(se(308));ol=t,yh.dependencies={lanes:0,firstContext:t}}else ol=ol.next=t;return e}var us=null;function jy(t){us===null?us=[t]:us.push(t)}function Qx(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,jy(e)):(n.next=i.next,i.next=n),e.interleaved=n,eo(t,r)}function eo(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 po=!1;function Ly(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $x(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 Yi(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Ao(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,dt&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,eo(t,n)}return i=r.interleaved,i===null?(e.next=e,jy(r)):(e.next=i.next,i.next=e),r.interleaved=e,eo(t,n)}function Rf(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,Py(t,n)}}function iS(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 vh(t,e,n,r){var i=t.updateQueue;po=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=t.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;s=0,c=u=a=null,l=o;do{var h=l.lane,d=l.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=t,g=l;switch(h=e,d=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(d,f,h):p,h==null)break e;f=zt({},f,h);break e;case 2:po=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else d={eventTime:d,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=d,a=f):c=c.next=d,s|=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 s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);ks|=s,t.lanes=s,t.memoizedState=f}}function oS(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(se(191,i));i.call(r)}}}var _x=new QP.Component().refs;function $m(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:zt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Pd={isMounted:function(t){return(t=t._reactInternals)?_s(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Zn(),i=Do(t),o=Yi(r,i);o.payload=e,n!=null&&(o.callback=n),e=Ao(t,o,i),e!==null&&(ti(e,t,i,r),Rf(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Zn(),i=Do(t),o=Yi(r,i);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=Ao(t,o,i),e!==null&&(ti(e,t,i,r),Rf(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Zn(),r=Do(t),i=Yi(n,r);i.tag=2,e!=null&&(i.callback=e),e=Ao(t,i,r),e!==null&&(ti(e,t,r,n),Rf(e,t,r))}};function sS(t,e,n,r,i,o,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,s):e.prototype&&e.prototype.isPureReactComponent?!du(n,r)||!du(i,o):!0}function Tx(t,e,n){var r=!1,i=Lo,o=e.contextType;return typeof o=="object"&&o!==null?o=Lr(o):(i=or(e)?Ss:Vn.current,r=e.contextTypes,o=(r=r!=null)?$l(t,i):Lo),e=new e(n,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Pd,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function lS(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&&Pd.enqueueReplaceState(e,e.state,null)}function _m(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=_x,Ly(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=Lr(o):(o=or(e)?Ss:Vn.current,i.context=$l(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&($m(t,e,o,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&&Pd.enqueueReplaceState(i,i.state,null),vh(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function ya(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(se(309));var r=n.stateNode}if(!r)throw Error(se(147,t));var i=r,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(s){var l=i.refs;l===_x&&(l=i.refs={}),s===null?delete l[o]:l[o]=s},e._stringRef=o,e)}if(typeof t!="string")throw Error(se(284));if(!n._owner)throw Error(se(290,t))}return t}function Zc(t,e){throw t=Object.prototype.toString.call(e),Error(se(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function aS(t){var e=t._init;return e(t._payload)}function Ax(t){function e(O,m){if(t){var y=O.deletions;y===null?(O.deletions=[m],O.flags|=16):y.push(m)}}function n(O,m){if(!t)return null;for(;m!==null;)e(O,m),m=m.sibling;return null}function r(O,m){for(O=new Map;m!==null;)m.key!==null?O.set(m.key,m):O.set(m.index,m),m=m.sibling;return O}function i(O,m){return O=Mo(O,m),O.index=0,O.sibling=null,O}function o(O,m,y){return O.index=y,t?(y=O.alternate,y!==null?(y=y.index,y<m?(O.flags|=2,m):y):(O.flags|=2,m)):(O.flags|=1048576,m)}function s(O){return t&&O.alternate===null&&(O.flags|=2),O}function l(O,m,y,b){return m===null||m.tag!==6?(m=Hp(y,O.mode,b),m.return=O,m):(m=i(m,y),m.return=O,m)}function a(O,m,y,b){var x=y.type;return x===Hs?c(O,m,y.props.children,b,y.key):m!==null&&(m.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===ho&&aS(x)===m.type)?(b=i(m,y.props),b.ref=ya(O,m,y),b.return=O,b):(b=Lf(y.type,y.key,y.props,null,O.mode,b),b.ref=ya(O,m,y),b.return=O,b)}function u(O,m,y,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==y.containerInfo||m.stateNode.implementation!==y.implementation?(m=Kp(y,O.mode,b),m.return=O,m):(m=i(m,y.children||[]),m.return=O,m)}function c(O,m,y,b,x){return m===null||m.tag!==7?(m=gs(y,O.mode,b,x),m.return=O,m):(m=i(m,y),m.return=O,m)}function f(O,m,y){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Hp(""+m,O.mode,y),m.return=O,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Mc:return y=Lf(m.type,m.key,m.props,null,O.mode,y),y.ref=ya(O,null,m),y.return=O,y;case Gs:return m=Kp(m,O.mode,y),m.return=O,m;case ho:var b=m._init;return f(O,b(m._payload),y)}if(Da(m)||da(m))return m=gs(m,O.mode,y,null),m.return=O,m;Zc(O,m)}return null}function h(O,m,y,b){var x=m!==null?m.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return x!==null?null:l(O,m,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Mc:return y.key===x?a(O,m,y,b):null;case Gs:return y.key===x?u(O,m,y,b):null;case ho:return x=y._init,h(O,m,x(y._payload),b)}if(Da(y)||da(y))return x!==null?null:c(O,m,y,b,null);Zc(O,y)}return null}function d(O,m,y,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return O=O.get(y)||null,l(m,O,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Mc:return O=O.get(b.key===null?y:b.key)||null,a(m,O,b,x);case Gs:return O=O.get(b.key===null?y:b.key)||null,u(m,O,b,x);case ho:var E=b._init;return d(O,m,y,E(b._payload),x)}if(Da(b)||da(b))return O=O.get(y)||null,c(m,O,b,x,null);Zc(m,b)}return null}function p(O,m,y,b){for(var x=null,E=null,T=m,w=m=0,k=null;T!==null&&w<y.length;w++){T.index>w?(k=T,T=null):k=T.sibling;var C=h(O,T,y[w],b);if(C===null){T===null&&(T=k);break}t&&T&&C.alternate===null&&e(O,T),m=o(C,m,w),E===null?x=C:E.sibling=C,E=C,T=k}if(w===y.length)return n(O,T),Vt&&ns(O,w),x;if(T===null){for(;w<y.length;w++)T=f(O,y[w],b),T!==null&&(m=o(T,m,w),E===null?x=T:E.sibling=T,E=T);return Vt&&ns(O,w),x}for(T=r(O,T);w<y.length;w++)k=d(T,O,w,y[w],b),k!==null&&(t&&k.alternate!==null&&T.delete(k.key===null?w:k.key),m=o(k,m,w),E===null?x=k:E.sibling=k,E=k);return t&&T.forEach(function(Q){return e(O,Q)}),Vt&&ns(O,w),x}function g(O,m,y,b){var x=da(y);if(typeof x!="function")throw Error(se(150));if(y=x.call(y),y==null)throw Error(se(151));for(var E=x=null,T=m,w=m=0,k=null,C=y.next();T!==null&&!C.done;w++,C=y.next()){T.index>w?(k=T,T=null):k=T.sibling;var Q=h(O,T,C.value,b);if(Q===null){T===null&&(T=k);break}t&&T&&Q.alternate===null&&e(O,T),m=o(Q,m,w),E===null?x=Q:E.sibling=Q,E=Q,T=k}if(C.done)return n(O,T),Vt&&ns(O,w),x;if(T===null){for(;!C.done;w++,C=y.next())C=f(O,C.value,b),C!==null&&(m=o(C,m,w),E===null?x=C:E.sibling=C,E=C);return Vt&&ns(O,w),x}for(T=r(O,T);!C.done;w++,C=y.next())C=d(T,O,w,C.value,b),C!==null&&(t&&C.alternate!==null&&T.delete(C.key===null?w:C.key),m=o(C,m,w),E===null?x=C:E.sibling=C,E=C);return t&&T.forEach(function(D){return e(O,D)}),Vt&&ns(O,w),x}function v(O,m,y,b){if(typeof y=="object"&&y!==null&&y.type===Hs&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Mc:e:{for(var x=y.key,E=m;E!==null;){if(E.key===x){if(x=y.type,x===Hs){if(E.tag===7){n(O,E.sibling),m=i(E,y.props.children),m.return=O,O=m;break e}}else if(E.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===ho&&aS(x)===E.type){n(O,E.sibling),m=i(E,y.props),m.ref=ya(O,E,y),m.return=O,O=m;break e}n(O,E);break}else e(O,E);E=E.sibling}y.type===Hs?(m=gs(y.props.children,O.mode,b,y.key),m.return=O,O=m):(b=Lf(y.type,y.key,y.props,null,O.mode,b),b.ref=ya(O,m,y),b.return=O,O=b)}return s(O);case Gs:e:{for(E=y.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(O,m.sibling),m=i(m,y.children||[]),m.return=O,O=m;break e}else{n(O,m);break}else e(O,m);m=m.sibling}m=Kp(y,O.mode,b),m.return=O,O=m}return s(O);case ho:return E=y._init,v(O,m,E(y._payload),b)}if(Da(y))return p(O,m,y,b);if(da(y))return g(O,m,y,b);Zc(O,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(O,m.sibling),m=i(m,y),m.return=O,O=m):(n(O,m),m=Hp(y,O.mode,b),m.return=O,O=m),s(O)):n(O,m)}return v}var Tl=Ax(!0),Rx=Ax(!1),Hu={},Ei=Yo(Hu),Ou=Yo(Hu),yu=Yo(Hu);function cs(t){if(t===Hu)throw Error(se(174));return t}function Vy(t,e){switch(Et(yu,e),Et(Ou,t),Et(Ei,Hu),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:am(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=am(e,t)}It(Ei),Et(Ei,e)}function Al(){It(Ei),It(Ou),It(yu)}function Dx(t){cs(yu.current);var e=cs(Ei.current),n=am(e,t.type);e!==n&&(Et(Ou,t),Et(Ei,n))}function By(t){Ou.current===t&&(It(Ei),It(Ou))}var Ut=Yo(0);function Sh(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 Up=[];function Fy(){for(var t=0;t<Up.length;t++)Up[t]._workInProgressVersionPrimary=null;Up.length=0}var Df=io.ReactCurrentDispatcher,Zp=io.ReactCurrentBatchConfig,ws=0,Yt=null,cn=null,Sn=null,bh=!1,Ga=!1,vu=0,WD=0;function Dn(){throw Error(se(321))}function Xy(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!ni(t[n],e[n]))return!1;return!0}function Wy(t,e,n,r,i,o){if(ws=o,Yt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Df.current=t===null||t.memoizedState===null?zD:qD,t=n(r,i),Ga){o=0;do{if(Ga=!1,vu=0,25<=o)throw Error(se(301));o+=1,Sn=cn=null,e.updateQueue=null,Df.current=GD,t=n(r,i)}while(Ga)}if(Df.current=wh,e=cn!==null&&cn.next!==null,ws=0,Sn=cn=Yt=null,bh=!1,e)throw Error(se(300));return t}function Uy(){var t=vu!==0;return vu=0,t}function gi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?Yt.memoizedState=Sn=t:Sn=Sn.next=t,Sn}function Vr(){if(cn===null){var t=Yt.alternate;t=t!==null?t.memoizedState:null}else t=cn.next;var e=Sn===null?Yt.memoizedState:Sn.next;if(e!==null)Sn=e,cn=t;else{if(t===null)throw Error(se(310));cn=t,t={memoizedState:cn.memoizedState,baseState:cn.baseState,baseQueue:cn.baseQueue,queue:cn.queue,next:null},Sn===null?Yt.memoizedState=Sn=t:Sn=Sn.next=t}return Sn}function Su(t,e){return typeof e=="function"?e(t):e}function Yp(t){var e=Vr(),n=e.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=t;var r=cn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((ws&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,s=r):a=a.next=f,Yt.lanes|=c,ks|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,ni(r,e.memoizedState)||(tr=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=a,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do o=i.lane,Yt.lanes|=o,ks|=o,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function zp(t){var e=Vr(),n=e.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=t(o,s.action),s=s.next;while(s!==i);ni(o,e.memoizedState)||(tr=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function Mx(){}function Ix(t,e){var n=Yt,r=Vr(),i=e(),o=!ni(r.memoizedState,i);if(o&&(r.memoizedState=i,tr=!0),r=r.queue,Zy(Lx.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||Sn!==null&&Sn.memoizedState.tag&1){if(n.flags|=2048,bu(9,jx.bind(null,n,r,i,e),void 0,null),bn===null)throw Error(se(349));ws&30||Nx(n,e,i)}return i}function Nx(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Yt.updateQueue,e===null?(e={lastEffect:null,stores:null},Yt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function jx(t,e,n,r){e.value=n,e.getSnapshot=r,Vx(e)&&Bx(t)}function Lx(t,e,n){return n(function(){Vx(e)&&Bx(t)})}function Vx(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ni(t,n)}catch{return!0}}function Bx(t){var e=eo(t,1);e!==null&&ti(e,t,1,-1)}function uS(t){var e=gi();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Su,lastRenderedState:t},e.queue=t,t=t.dispatch=YD.bind(null,Yt,t),[e.memoizedState,t]}function bu(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Yt.updateQueue,e===null?(e={lastEffect:null,stores:null},Yt.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 Fx(){return Vr().memoizedState}function Mf(t,e,n,r){var i=gi();Yt.flags|=t,i.memoizedState=bu(1|e,n,void 0,r===void 0?null:r)}function xd(t,e,n,r){var i=Vr();r=r===void 0?null:r;var o=void 0;if(cn!==null){var s=cn.memoizedState;if(o=s.destroy,r!==null&&Xy(r,s.deps)){i.memoizedState=bu(e,n,o,r);return}}Yt.flags|=t,i.memoizedState=bu(1|e,n,o,r)}function cS(t,e){return Mf(8390656,8,t,e)}function Zy(t,e){return xd(2048,8,t,e)}function Xx(t,e){return xd(4,2,t,e)}function Wx(t,e){return xd(4,4,t,e)}function Ux(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 Zx(t,e,n){return n=n!=null?n.concat([t]):null,xd(4,4,Ux.bind(null,e,t),n)}function Yy(){}function Yx(t,e){var n=Vr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Xy(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function zx(t,e){var n=Vr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Xy(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function qx(t,e,n){return ws&21?(ni(n,e)||(n=KP(),Yt.lanes|=n,ks|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,tr=!0),t.memoizedState=n)}function UD(t,e){var n=St;St=n!==0&&4>n?n:4,t(!0);var r=Zp.transition;Zp.transition={};try{t(!1),e()}finally{St=n,Zp.transition=r}}function Gx(){return Vr().memoizedState}function ZD(t,e,n){var r=Do(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Hx(t))Kx(e,n);else if(n=Qx(t,e,n,r),n!==null){var i=Zn();ti(n,t,r,i),Jx(n,e,r)}}function YD(t,e,n){var r=Do(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hx(t))Kx(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,ni(l,s)){var a=e.interleaved;a===null?(i.next=i,jy(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}n=Qx(t,e,i,r),n!==null&&(i=Zn(),ti(n,t,r,i),Jx(n,e,r))}}function Hx(t){var e=t.alternate;return t===Yt||e!==null&&e===Yt}function Kx(t,e){Ga=bh=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Jx(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Py(t,n)}}var wh={readContext:Lr,useCallback:Dn,useContext:Dn,useEffect:Dn,useImperativeHandle:Dn,useInsertionEffect:Dn,useLayoutEffect:Dn,useMemo:Dn,useReducer:Dn,useRef:Dn,useState:Dn,useDebugValue:Dn,useDeferredValue:Dn,useTransition:Dn,useMutableSource:Dn,useSyncExternalStore:Dn,useId:Dn,unstable_isNewReconciler:!1},zD={readContext:Lr,useCallback:function(t,e){return gi().memoizedState=[t,e===void 0?null:e],t},useContext:Lr,useEffect:cS,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Mf(4194308,4,Ux.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Mf(4194308,4,t,e)},useInsertionEffect:function(t,e){return Mf(4,2,t,e)},useMemo:function(t,e){var n=gi();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=gi();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,Yt,t),[r.memoizedState,t]},useRef:function(t){var e=gi();return t={current:t},e.memoizedState=t},useState:uS,useDebugValue:Yy,useDeferredValue:function(t){return gi().memoizedState=t},useTransition:function(){var t=uS(!1),e=t[0];return t=UD.bind(null,t[1]),gi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Yt,i=gi();if(Vt){if(n===void 0)throw Error(se(407));n=n()}else{if(n=e(),bn===null)throw Error(se(349));ws&30||Nx(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,cS(Lx.bind(null,r,o,t),[t]),r.flags|=2048,bu(9,jx.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=gi(),e=bn.identifierPrefix;if(Vt){var n=Zi,r=Ui;n=(r&~(1<<32-ei(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=vu++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=WD++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},qD={readContext:Lr,useCallback:Yx,useContext:Lr,useEffect:Zy,useImperativeHandle:Zx,useInsertionEffect:Xx,useLayoutEffect:Wx,useMemo:zx,useReducer:Yp,useRef:Fx,useState:function(){return Yp(Su)},useDebugValue:Yy,useDeferredValue:function(t){var e=Vr();return qx(e,cn.memoizedState,t)},useTransition:function(){var t=Yp(Su)[0],e=Vr().memoizedState;return[t,e]},useMutableSource:Mx,useSyncExternalStore:Ix,useId:Gx,unstable_isNewReconciler:!1},GD={readContext:Lr,useCallback:Yx,useContext:Lr,useEffect:Zy,useImperativeHandle:Zx,useInsertionEffect:Xx,useLayoutEffect:Wx,useMemo:zx,useReducer:zp,useRef:Fx,useState:function(){return zp(Su)},useDebugValue:Yy,useDeferredValue:function(t){var e=Vr();return cn===null?e.memoizedState=t:qx(e,cn.memoizedState,t)},useTransition:function(){var t=zp(Su)[0],e=Vr().memoizedState;return[t,e]},useMutableSource:Mx,useSyncExternalStore:Ix,useId:Gx,unstable_isNewReconciler:!1};function Rl(t,e){try{var n="",r=e;do n+=PR(r),r=r.return;while(r);var i=n}catch(o){i=`
39
- Error generating stack: `+o.message+`
40
- `+o.stack}return{value:t,source:e,stack:i,digest:null}}function qp(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Tm(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var HD=typeof WeakMap=="function"?WeakMap:Map;function eC(t,e,n){n=Yi(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ph||(Ph=!0,Bm=r),Tm(t,e)},n}function tC(t,e,n){n=Yi(-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(){Tm(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Tm(t,e),typeof r!="function"&&(Ro===null?Ro=new Set([this]):Ro.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function fS(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new HD;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=fM.bind(null,t,e,n),e.then(t,t))}function hS(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 dS(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=Yi(-1,1),e.tag=2,Ao(n,e,1))),n.lanes|=1),t)}var KD=io.ReactCurrentOwner,tr=!1;function Xn(t,e,n,r){e.child=t===null?Rx(e,null,n,r):Tl(e,t.child,n,r)}function pS(t,e,n,r,i){n=n.render;var o=e.ref;return ml(e,i),r=Wy(t,e,n,r,o,i),n=Uy(),t!==null&&!tr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,to(t,e,i)):(Vt&&n&&Ay(e),e.flags|=1,Xn(t,e,r,i),e.child)}function gS(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!tv(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,nC(t,e,o,r,i)):(t=Lf(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:du,n(s,r)&&t.ref===e.ref)return to(t,e,i)}return e.flags|=1,t=Mo(o,r),t.ref=e.ref,t.return=e,e.child=t}function nC(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(du(o,r)&&t.ref===e.ref)if(tr=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&(tr=!0);else return e.lanes=t.lanes,to(t,e,i)}return Am(t,e,n,r,i)}function rC(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(ll,hr),hr|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Et(ll,hr),hr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Et(ll,hr),hr|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,Et(ll,hr),hr|=r;return Xn(t,e,i,n),e.child}function iC(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Am(t,e,n,r,i){var o=or(n)?Ss:Vn.current;return o=$l(e,o),ml(e,i),n=Wy(t,e,n,r,o,i),r=Uy(),t!==null&&!tr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,to(t,e,i)):(Vt&&r&&Ay(e),e.flags|=1,Xn(t,e,n,i),e.child)}function mS(t,e,n,r,i){if(or(n)){var o=!0;ph(e)}else o=!1;if(ml(e,i),e.stateNode===null)If(t,e),Tx(e,n,r),_m(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,l=e.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Lr(u):(u=or(n)?Ss:Vn.current,u=$l(e,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&lS(e,s,r,u),po=!1;var h=e.memoizedState;s.state=h,vh(e,r,s,i),a=e.memoizedState,l!==r||h!==a||ir.current||po?(typeof c=="function"&&($m(e,n,c,r),a=e.memoizedState),(l=po||sS(e,n,l,r,h,a,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,$x(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:qr(e.type,l),s.props=u,f=e.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Lr(a):(a=or(n)?Ss:Vn.current,a=$l(e,a));var d=n.getDerivedStateFromProps;(c=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||h!==a)&&lS(e,s,r,a),po=!1,h=e.memoizedState,s.state=h,vh(e,r,s,i);var p=e.memoizedState;l!==f||h!==p||ir.current||po?(typeof d=="function"&&($m(e,n,d,r),p=e.memoizedState),(u=po||sS(e,n,u,r,h,p,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,a)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),s.props=r,s.state=p,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return Rm(t,e,n,r,o,i)}function Rm(t,e,n,r,i,o){iC(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&tS(e,n,!1),to(t,e,o);r=e.stateNode,KD.current=e;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=Tl(e,t.child,null,o),e.child=Tl(e,null,l,o)):Xn(t,e,l,o),e.memoizedState=r.state,i&&tS(e,n,!0),e.child}function oC(t){var e=t.stateNode;e.pendingContext?eS(t,e.pendingContext,e.pendingContext!==e.context):e.context&&eS(t,e.context,!1),Vy(t,e.containerInfo)}function OS(t,e,n,r,i){return _l(),Dy(i),e.flags|=256,Xn(t,e,n,r),e.child}var Dm={dehydrated:null,treeContext:null,retryLane:0};function Mm(t){return{baseLanes:t,cachePool:null,transitions:null}}function sC(t,e,n){var r=e.pendingProps,i=Ut.current,o=!1,s=(e.flags&128)!==0,l;if((l=s)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Et(Ut,i&1),t===null)return Em(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):(s=r.children,t=r.fallback,o?(r=e.mode,o=e.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Qd(s,r,0,null),t=gs(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Mm(n),e.memoizedState=Dm,t):zy(e,s));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return JD(t,e,s,r,l,i,n);if(o){o=r.fallback,s=e.mode,i=t.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=a,e.deletions=null):(r=Mo(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Mo(l,o):(o=gs(o,s,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,s=t.child.memoizedState,s=s===null?Mm(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=Dm,r}return o=t.child,t=o.sibling,r=Mo(o,{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 zy(t,e){return e=Qd({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Yc(t,e,n,r){return r!==null&&Dy(r),Tl(e,t.child,null,n),t=zy(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function JD(t,e,n,r,i,o,s){if(n)return e.flags&256?(e.flags&=-257,r=qp(Error(se(422))),Yc(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=Qd({mode:"visible",children:r.children},i,0,null),o=gs(o,i,s,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&Tl(e,t.child,null,s),e.child.memoizedState=Mm(s),e.memoizedState=Dm,o);if(!(e.mode&1))return Yc(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(se(419)),r=qp(o,r,void 0),Yc(t,e,s,r)}if(l=(s&t.childLanes)!==0,tr||l){if(r=bn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,eo(t,i),ti(r,t,i,-1))}return ev(),r=qp(Error(se(421))),Yc(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=hM.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,mr=To(i.nextSibling),yr=e,Vt=!0,Hr=null,t!==null&&(_r[Tr++]=Ui,_r[Tr++]=Zi,_r[Tr++]=bs,Ui=t.id,Zi=t.overflow,bs=e),e=zy(e,r.children),e.flags|=4096,e)}function yS(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Qm(t.return,e,n)}function Gp(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function lC(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Xn(t,e,r.children,n),r=Ut.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&&yS(t,n,e);else if(t.tag===19)yS(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(Et(Ut,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&&Sh(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Gp(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Sh(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Gp(e,!0,n,null,o);break;case"together":Gp(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function If(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function to(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ks|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(se(153));if(e.child!==null){for(t=e.child,n=Mo(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Mo(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function eM(t,e,n){switch(e.tag){case 3:oC(e),_l();break;case 5:Dx(e);break;case 1:or(e.type)&&ph(e);break;case 4:Vy(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Et(Oh,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Et(Ut,Ut.current&1),e.flags|=128,null):n&e.child.childLanes?sC(t,e,n):(Et(Ut,Ut.current&1),t=to(t,e,n),t!==null?t.sibling:null);Et(Ut,Ut.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return lC(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Et(Ut,Ut.current),r)break;return null;case 22:case 23:return e.lanes=0,rC(t,e,n)}return to(t,e,n)}var aC,Im,uC,cC;aC=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}};Im=function(){};uC=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,cs(Ei.current);var o=null;switch(n){case"input":i=im(t,i),r=im(t,r),o=[];break;case"select":i=zt({},i,{value:void 0}),r=zt({},r,{value:void 0}),o=[];break;case"textarea":i=lm(t,i),r=lm(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=hh)}um(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(su.hasOwnProperty(u)?o||(o=[]):(o=o||[]).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(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(su.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Rt("scroll",t),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(e.updateQueue=u)&&(e.flags|=4)}};cC=function(t,e,n,r){n!==r&&(e.flags|=4)};function va(t,e){if(!Vt)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 Mn(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 tM(t,e,n){var r=e.pendingProps;switch(Ry(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mn(e),null;case 1:return or(e.type)&&dh(),Mn(e),null;case 3:return r=e.stateNode,Al(),It(ir),It(Vn),Fy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Uc(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Hr!==null&&(Wm(Hr),Hr=null))),Im(t,e),Mn(e),null;case 5:By(e);var i=cs(yu.current);if(n=e.type,t!==null&&e.stateNode!=null)uC(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(se(166));return Mn(e),null}if(t=cs(Ei.current),Uc(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[vi]=e,r[mu]=o,t=(e.mode&1)!==0,n){case"dialog":Rt("cancel",r),Rt("close",r);break;case"iframe":case"object":case"embed":Rt("load",r);break;case"video":case"audio":for(i=0;i<Ia.length;i++)Rt(Ia[i],r);break;case"source":Rt("error",r);break;case"img":case"image":case"link":Rt("error",r),Rt("load",r);break;case"details":Rt("toggle",r);break;case"input":E1(r,o),Rt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Rt("invalid",r);break;case"textarea":$1(r,o),Rt("invalid",r)}um(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&Wc(r.textContent,l,t),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Wc(r.textContent,l,t),i=["children",""+l]):su.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Rt("scroll",r)}switch(n){case"input":Ic(r),Q1(r,o,!0);break;case"textarea":Ic(r),_1(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=hh)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=NP(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[vi]=e,t[mu]=r,aC(t,e,!1,!1),e.stateNode=t;e:{switch(s=cm(n,r),n){case"dialog":Rt("cancel",t),Rt("close",t),i=r;break;case"iframe":case"object":case"embed":Rt("load",t),i=r;break;case"video":case"audio":for(i=0;i<Ia.length;i++)Rt(Ia[i],t);i=r;break;case"source":Rt("error",t),i=r;break;case"img":case"image":case"link":Rt("error",t),Rt("load",t),i=r;break;case"details":Rt("toggle",t),i=r;break;case"input":E1(t,r),i=im(t,r),Rt("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=zt({},r,{value:void 0}),Rt("invalid",t);break;case"textarea":$1(t,r),i=lm(t,r),Rt("invalid",t);break;default:i=r}um(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?VP(t,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&jP(t,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&lu(t,a):typeof a=="number"&&lu(t,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(su.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Rt("scroll",t):a!=null&&yy(t,o,a,s))}switch(n){case"input":Ic(t),Q1(t,r,!1);break;case"textarea":Ic(t),_1(t);break;case"option":r.value!=null&&t.setAttribute("value",""+jo(r.value));break;case"select":t.multiple=!!r.multiple,o=r.value,o!=null?hl(t,!!r.multiple,o,!1):r.defaultValue!=null&&hl(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=hh)}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 Mn(e),null;case 6:if(t&&e.stateNode!=null)cC(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(se(166));if(n=cs(yu.current),cs(Ei.current),Uc(e)){if(r=e.stateNode,n=e.memoizedProps,r[vi]=e,(o=r.nodeValue!==n)&&(t=yr,t!==null))switch(t.tag){case 3:Wc(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Wc(r.nodeValue,n,(t.mode&1)!==0)}o&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[vi]=e,e.stateNode=r}return Mn(e),null;case 13:if(It(Ut),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Vt&&mr!==null&&e.mode&1&&!(e.flags&128))Ex(),_l(),e.flags|=98560,o=!1;else if(o=Uc(e),r!==null&&r.dehydrated!==null){if(t===null){if(!o)throw Error(se(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(se(317));o[vi]=e}else _l(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Mn(e),o=!1}else Hr!==null&&(Wm(Hr),Hr=null),o=!0;if(!o)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||Ut.current&1?dn===0&&(dn=3):ev())),e.updateQueue!==null&&(e.flags|=4),Mn(e),null);case 4:return Al(),Im(t,e),t===null&&pu(e.stateNode.containerInfo),Mn(e),null;case 10:return Ny(e.type._context),Mn(e),null;case 17:return or(e.type)&&dh(),Mn(e),null;case 19:if(It(Ut),o=e.memoizedState,o===null)return Mn(e),null;if(r=(e.flags&128)!==0,s=o.rendering,s===null)if(r)va(o,!1);else{if(dn!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=Sh(t),s!==null){for(e.flags|=128,va(o,!1),r=s.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)o=n,t=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,t=s.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Et(Ut,Ut.current&1|2),e.child}t=t.sibling}o.tail!==null&&rn()>Dl&&(e.flags|=128,r=!0,va(o,!1),e.lanes=4194304)}else{if(!r)if(t=Sh(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),va(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Vt)return Mn(e),null}else 2*rn()-o.renderingStartTime>Dl&&n!==1073741824&&(e.flags|=128,r=!0,va(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=rn(),e.sibling=null,n=Ut.current,Et(Ut,r?n&1|2:n&1),e):(Mn(e),null);case 22:case 23:return Jy(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?hr&1073741824&&(Mn(e),e.subtreeFlags&6&&(e.flags|=8192)):Mn(e),null;case 24:return null;case 25:return null}throw Error(se(156,e.tag))}function nM(t,e){switch(Ry(e),e.tag){case 1:return or(e.type)&&dh(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Al(),It(ir),It(Vn),Fy(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return By(e),null;case 13:if(It(Ut),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(se(340));_l()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return It(Ut),null;case 4:return Al(),null;case 10:return Ny(e.type._context),null;case 22:case 23:return Jy(),null;case 24:return null;default:return null}}var zc=!1,jn=!1,rM=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function sl(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Kt(t,e,r)}else n.current=null}function Nm(t,e,n){try{n()}catch(r){Kt(t,e,r)}}var vS=!1;function iM(t,e){if(Sm=uh,t=px(),Ty(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var d;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===t)break t;if(h===n&&++u===i&&(l=s),h===o&&++c===r&&(a=s),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(bm={focusedElem:t,selectionRange:n},uh=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,v=p.memoizedState,O=e.stateNode,m=O.getSnapshotBeforeUpdate(e.elementType===e.type?g:qr(e.type,g),v);O.__reactInternalSnapshotBeforeUpdate=m}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(se(163))}}catch(b){Kt(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=vS,vS=!1,p}function Ha(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 o=i.destroy;i.destroy=void 0,o!==void 0&&Nm(e,n,o)}i=i.next}while(i!==r)}}function Cd(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 jm(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 fC(t){var e=t.alternate;e!==null&&(t.alternate=null,fC(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[vi],delete e[mu],delete e[Pm],delete e[VD],delete e[BD])),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 hC(t){return t.tag===5||t.tag===3||t.tag===4}function SS(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||hC(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 Lm(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=hh));else if(r!==4&&(t=t.child,t!==null))for(Lm(t,e,n),t=t.sibling;t!==null;)Lm(t,e,n),t=t.sibling}function Vm(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(Vm(t,e,n),t=t.sibling;t!==null;)Vm(t,e,n),t=t.sibling}var kn=null,Gr=!1;function co(t,e,n){for(n=n.child;n!==null;)dC(t,e,n),n=n.sibling}function dC(t,e,n){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(yd,n)}catch{}switch(n.tag){case 5:jn||sl(n,e);case 6:var r=kn,i=Gr;kn=null,co(t,e,n),kn=r,Gr=i,kn!==null&&(Gr?(t=kn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):kn.removeChild(n.stateNode));break;case 18:kn!==null&&(Gr?(t=kn,n=n.stateNode,t.nodeType===8?Xp(t.parentNode,n):t.nodeType===1&&Xp(t,n),fu(t)):Xp(kn,n.stateNode));break;case 4:r=kn,i=Gr,kn=n.stateNode.containerInfo,Gr=!0,co(t,e,n),kn=r,Gr=i;break;case 0:case 11:case 14:case 15:if(!jn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Nm(n,e,s),i=i.next}while(i!==r)}co(t,e,n);break;case 1:if(!jn&&(sl(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Kt(n,e,l)}co(t,e,n);break;case 21:co(t,e,n);break;case 22:n.mode&1?(jn=(r=jn)||n.memoizedState!==null,co(t,e,n),jn=r):co(t,e,n);break;default:co(t,e,n)}}function bS(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new rM),e.forEach(function(r){var i=dM.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Yr(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=t,s=e,l=s;e:for(;l!==null;){switch(l.tag){case 5:kn=l.stateNode,Gr=!1;break e;case 3:kn=l.stateNode.containerInfo,Gr=!0;break e;case 4:kn=l.stateNode.containerInfo,Gr=!0;break e}l=l.return}if(kn===null)throw Error(se(160));dC(o,s,i),kn=null,Gr=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){Kt(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)pC(e,t),e=e.sibling}function pC(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Yr(e,t),ui(t),r&4){try{Ha(3,t,t.return),Cd(3,t)}catch(g){Kt(t,t.return,g)}try{Ha(5,t,t.return)}catch(g){Kt(t,t.return,g)}}break;case 1:Yr(e,t),ui(t),r&512&&n!==null&&sl(n,n.return);break;case 5:if(Yr(e,t),ui(t),r&512&&n!==null&&sl(n,n.return),t.flags&32){var i=t.stateNode;try{lu(i,"")}catch(g){Kt(t,t.return,g)}}if(r&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,s=n!==null?n.memoizedProps:o,l=t.type,a=t.updateQueue;if(t.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&MP(i,o),cm(l,s);var u=cm(l,o);for(s=0;s<a.length;s+=2){var c=a[s],f=a[s+1];c==="style"?VP(i,f):c==="dangerouslySetInnerHTML"?jP(i,f):c==="children"?lu(i,f):yy(i,c,f,u)}switch(l){case"input":om(i,o);break;case"textarea":IP(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var d=o.value;d!=null?hl(i,!!o.multiple,d,!1):h!==!!o.multiple&&(o.defaultValue!=null?hl(i,!!o.multiple,o.defaultValue,!0):hl(i,!!o.multiple,o.multiple?[]:"",!1))}i[mu]=o}catch(g){Kt(t,t.return,g)}}break;case 6:if(Yr(e,t),ui(t),r&4){if(t.stateNode===null)throw Error(se(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(g){Kt(t,t.return,g)}}break;case 3:if(Yr(e,t),ui(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{fu(e.containerInfo)}catch(g){Kt(t,t.return,g)}break;case 4:Yr(e,t),ui(t);break;case 13:Yr(e,t),ui(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Hy=rn())),r&4&&bS(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(jn=(u=jn)||c,Yr(e,t),jn=u):Yr(e,t),ui(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(Pe=t,c=t.child;c!==null;){for(f=Pe=c;Pe!==null;){switch(h=Pe,d=h.child,h.tag){case 0:case 11:case 14:case 15:Ha(4,h,h.return);break;case 1:sl(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(g){Kt(r,n,g)}}break;case 5:sl(h,h.return);break;case 22:if(h.memoizedState!==null){kS(f);continue}}d!==null?(d.return=h,Pe=d):kS(f)}c=c.sibling}e:for(c=null,f=t;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,a=f.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=LP("display",s))}catch(g){Kt(t,t.return,g)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Kt(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:Yr(e,t),ui(t),r&4&&bS(t);break;case 21:break;default:Yr(e,t),ui(t)}}function ui(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(hC(n)){var r=n;break e}n=n.return}throw Error(se(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(lu(i,""),r.flags&=-33);var o=SS(t);Vm(t,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=SS(t);Lm(t,l,s);break;default:throw Error(se(161))}}catch(a){Kt(t,t.return,a)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function oM(t,e,n){Pe=t,gC(t)}function gC(t,e,n){for(var r=(t.mode&1)!==0;Pe!==null;){var i=Pe,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||zc;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||jn;l=zc;var u=jn;if(zc=s,(jn=a)&&!u)for(Pe=i;Pe!==null;)s=Pe,a=s.child,s.tag===22&&s.memoizedState!==null?PS(i):a!==null?(a.return=s,Pe=a):PS(i);for(;o!==null;)Pe=o,gC(o),o=o.sibling;Pe=i,zc=l,jn=u}wS(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Pe=o):wS(t)}}function wS(t){for(;Pe!==null;){var e=Pe;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:jn||Cd(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!jn)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:qr(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&oS(e,o,r);break;case 3:var s=e.updateQueue;if(s!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}oS(e,s,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&&fu(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(se(163))}jn||e.flags&512&&jm(e)}catch(h){Kt(e,e.return,h)}}if(e===t){Pe=null;break}if(n=e.sibling,n!==null){n.return=e.return,Pe=n;break}Pe=e.return}}function kS(t){for(;Pe!==null;){var e=Pe;if(e===t){Pe=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Pe=n;break}Pe=e.return}}function PS(t){for(;Pe!==null;){var e=Pe;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Cd(4,e)}catch(a){Kt(e,n,a)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(a){Kt(e,i,a)}}var o=e.return;try{jm(e)}catch(a){Kt(e,o,a)}break;case 5:var s=e.return;try{jm(e)}catch(a){Kt(e,s,a)}}}catch(a){Kt(e,e.return,a)}if(e===t){Pe=null;break}var l=e.sibling;if(l!==null){l.return=e.return,Pe=l;break}Pe=e.return}}var sM=Math.ceil,kh=io.ReactCurrentDispatcher,qy=io.ReactCurrentOwner,Nr=io.ReactCurrentBatchConfig,dt=0,bn=null,ln=null,Qn=0,hr=0,ll=Yo(0),dn=0,wu=null,ks=0,Ed=0,Gy=0,Ka=null,Jn=null,Hy=0,Dl=1/0,Bi=null,Ph=!1,Bm=null,Ro=null,qc=!1,ko=null,xh=0,Ja=0,Fm=null,Nf=-1,jf=0;function Zn(){return dt&6?rn():Nf!==-1?Nf:Nf=rn()}function Do(t){return t.mode&1?dt&2&&Qn!==0?Qn&-Qn:XD.transition!==null?(jf===0&&(jf=KP()),jf):(t=St,t!==0||(t=window.event,t=t===void 0?16:ox(t.type)),t):1}function ti(t,e,n,r){if(50<Ja)throw Ja=0,Fm=null,Error(se(185));zu(t,n,r),(!(dt&2)||t!==bn)&&(t===bn&&(!(dt&2)&&(Ed|=n),dn===4&&vo(t,Qn)),sr(t,r),n===1&&dt===0&&!(e.mode&1)&&(Dl=rn()+500,kd&&zo()))}function sr(t,e){var n=t.callbackNode;XR(t,e);var r=ah(t,t===bn?Qn:0);if(r===0)n!==null&&R1(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&R1(n),e===1)t.tag===0?FD(xS.bind(null,t)):Px(xS.bind(null,t)),jD(function(){!(dt&6)&&zo()}),n=null;else{switch(JP(r)){case 1:n=ky;break;case 4:n=GP;break;case 16:n=lh;break;case 536870912:n=HP;break;default:n=lh}n=kC(n,mC.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function mC(t,e){if(Nf=-1,jf=0,dt&6)throw Error(se(327));var n=t.callbackNode;if(Ol()&&t.callbackNode!==n)return null;var r=ah(t,t===bn?Qn:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Ch(t,r);else{e=r;var i=dt;dt|=2;var o=yC();(bn!==t||Qn!==e)&&(Bi=null,Dl=rn()+500,ps(t,e));do try{uM();break}catch(l){OC(t,l)}while(1);Iy(),kh.current=o,dt=i,ln!==null?e=0:(bn=null,Qn=0,e=dn)}if(e!==0){if(e===2&&(i=gm(t),i!==0&&(r=i,e=Xm(t,i))),e===1)throw n=wu,ps(t,0),vo(t,r),sr(t,rn()),n;if(e===6)vo(t,r);else{if(i=t.current.alternate,!(r&30)&&!lM(i)&&(e=Ch(t,r),e===2&&(o=gm(t),o!==0&&(r=o,e=Xm(t,o))),e===1))throw n=wu,ps(t,0),vo(t,r),sr(t,rn()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(se(345));case 2:rs(t,Jn,Bi);break;case 3:if(vo(t,r),(r&130023424)===r&&(e=Hy+500-rn(),10<e)){if(ah(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Zn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=km(rs.bind(null,t,Jn,Bi),e);break}rs(t,Jn,Bi);break;case 4:if(vo(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var s=31-ei(r);o=1<<s,s=e[s],s>i&&(i=s),r&=~o}if(r=i,r=rn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sM(r/1960))-r,10<r){t.timeoutHandle=km(rs.bind(null,t,Jn,Bi),r);break}rs(t,Jn,Bi);break;case 5:rs(t,Jn,Bi);break;default:throw Error(se(329))}}}return sr(t,rn()),t.callbackNode===n?mC.bind(null,t):null}function Xm(t,e){var n=Ka;return t.current.memoizedState.isDehydrated&&(ps(t,e).flags|=256),t=Ch(t,e),t!==2&&(e=Jn,Jn=n,e!==null&&Wm(e)),t}function Wm(t){Jn===null?Jn=t:Jn.push.apply(Jn,t)}function lM(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],o=i.getSnapshot;i=i.value;try{if(!ni(o(),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 vo(t,e){for(e&=~Gy,e&=~Ed,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-ei(e),r=1<<n;t[n]=-1,e&=~r}}function xS(t){if(dt&6)throw Error(se(327));Ol();var e=ah(t,0);if(!(e&1))return sr(t,rn()),null;var n=Ch(t,e);if(t.tag!==0&&n===2){var r=gm(t);r!==0&&(e=r,n=Xm(t,r))}if(n===1)throw n=wu,ps(t,0),vo(t,e),sr(t,rn()),n;if(n===6)throw Error(se(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,rs(t,Jn,Bi),sr(t,rn()),null}function Ky(t,e){var n=dt;dt|=1;try{return t(e)}finally{dt=n,dt===0&&(Dl=rn()+500,kd&&zo())}}function Ps(t){ko!==null&&ko.tag===0&&!(dt&6)&&Ol();var e=dt;dt|=1;var n=Nr.transition,r=St;try{if(Nr.transition=null,St=1,t)return t()}finally{St=r,Nr.transition=n,dt=e,!(dt&6)&&zo()}}function Jy(){hr=ll.current,It(ll)}function ps(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,ND(n)),ln!==null)for(n=ln.return;n!==null;){var r=n;switch(Ry(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&dh();break;case 3:Al(),It(ir),It(Vn),Fy();break;case 5:By(r);break;case 4:Al();break;case 13:It(Ut);break;case 19:It(Ut);break;case 10:Ny(r.type._context);break;case 22:case 23:Jy()}n=n.return}if(bn=t,ln=t=Mo(t.current,null),Qn=hr=e,dn=0,wu=null,Gy=Ed=ks=0,Jn=Ka=null,us!==null){for(e=0;e<us.length;e++)if(n=us[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}us=null}return t}function OC(t,e){do{var n=ln;try{if(Iy(),Df.current=wh,bh){for(var r=Yt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}bh=!1}if(ws=0,Sn=cn=Yt=null,Ga=!1,vu=0,qy.current=null,n===null||n.return===null){dn=1,wu=e,ln=null;break}e:{var o=t,s=n.return,l=n,a=e;if(e=Qn,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 d=hS(s);if(d!==null){d.flags&=-257,dS(d,s,l,o,e),d.mode&1&&fS(o,u,e),e=d,a=u;var p=e.updateQueue;if(p===null){var g=new Set;g.add(a),e.updateQueue=g}else p.add(a);break e}else{if(!(e&1)){fS(o,u,e),ev();break e}a=Error(se(426))}}else if(Vt&&l.mode&1){var v=hS(s);if(v!==null){!(v.flags&65536)&&(v.flags|=256),dS(v,s,l,o,e),Dy(Rl(a,l));break e}}o=a=Rl(a,l),dn!==4&&(dn=2),Ka===null?Ka=[o]:Ka.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var O=eC(o,a,e);iS(o,O);break e;case 1:l=a;var m=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ro===null||!Ro.has(y)))){o.flags|=65536,e&=-e,o.lanes|=e;var b=tC(o,l,e);iS(o,b);break e}}o=o.return}while(o!==null)}SC(n)}catch(x){e=x,ln===n&&n!==null&&(ln=n=n.return);continue}break}while(1)}function yC(){var t=kh.current;return kh.current=wh,t===null?wh:t}function ev(){(dn===0||dn===3||dn===2)&&(dn=4),bn===null||!(ks&268435455)&&!(Ed&268435455)||vo(bn,Qn)}function Ch(t,e){var n=dt;dt|=2;var r=yC();(bn!==t||Qn!==e)&&(Bi=null,ps(t,e));do try{aM();break}catch(i){OC(t,i)}while(1);if(Iy(),dt=n,kh.current=r,ln!==null)throw Error(se(261));return bn=null,Qn=0,dn}function aM(){for(;ln!==null;)vC(ln)}function uM(){for(;ln!==null&&!DR();)vC(ln)}function vC(t){var e=wC(t.alternate,t,hr);t.memoizedProps=t.pendingProps,e===null?SC(t):ln=e,qy.current=null}function SC(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=nM(n,e),n!==null){n.flags&=32767,ln=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{dn=6,ln=null;return}}else if(n=tM(n,e,hr),n!==null){ln=n;return}if(e=e.sibling,e!==null){ln=e;return}ln=e=t}while(e!==null);dn===0&&(dn=5)}function rs(t,e,n){var r=St,i=Nr.transition;try{Nr.transition=null,St=1,cM(t,e,n,r)}finally{Nr.transition=i,St=r}return null}function cM(t,e,n,r){do Ol();while(ko!==null);if(dt&6)throw Error(se(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(se(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(WR(t,o),t===bn&&(ln=bn=null,Qn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||qc||(qc=!0,kC(lh,function(){return Ol(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Nr.transition,Nr.transition=null;var s=St;St=1;var l=dt;dt|=4,qy.current=null,iM(t,n),pC(n,t),_D(bm),uh=!!Sm,bm=Sm=null,t.current=n,oM(n),MR(),dt=l,St=s,Nr.transition=o}else t.current=n;if(qc&&(qc=!1,ko=t,xh=i),o=t.pendingLanes,o===0&&(Ro=null),jR(n.stateNode),sr(t,rn()),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(Ph)throw Ph=!1,t=Bm,Bm=null,t;return xh&1&&t.tag!==0&&Ol(),o=t.pendingLanes,o&1?t===Fm?Ja++:(Ja=0,Fm=t):Ja=0,zo(),null}function Ol(){if(ko!==null){var t=JP(xh),e=Nr.transition,n=St;try{if(Nr.transition=null,St=16>t?16:t,ko===null)var r=!1;else{if(t=ko,ko=null,xh=0,dt&6)throw Error(se(331));var i=dt;for(dt|=4,Pe=t.current;Pe!==null;){var o=Pe,s=o.child;if(Pe.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(Pe=u;Pe!==null;){var c=Pe;switch(c.tag){case 0:case 11:case 15:Ha(8,c,o)}var f=c.child;if(f!==null)f.return=c,Pe=f;else for(;Pe!==null;){c=Pe;var h=c.sibling,d=c.return;if(fC(c),c===u){Pe=null;break}if(h!==null){h.return=d,Pe=h;break}Pe=d}}}var p=o.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}Pe=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Pe=s;else e:for(;Pe!==null;){if(o=Pe,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ha(9,o,o.return)}var O=o.sibling;if(O!==null){O.return=o.return,Pe=O;break e}Pe=o.return}}var m=t.current;for(Pe=m;Pe!==null;){s=Pe;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,Pe=y;else e:for(s=m;Pe!==null;){if(l=Pe,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Cd(9,l)}}catch(x){Kt(l,l.return,x)}if(l===s){Pe=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,Pe=b;break e}Pe=l.return}}if(dt=i,zo(),Ci&&typeof Ci.onPostCommitFiberRoot=="function")try{Ci.onPostCommitFiberRoot(yd,t)}catch{}r=!0}return r}finally{St=n,Nr.transition=e}}return!1}function CS(t,e,n){e=Rl(n,e),e=eC(t,e,1),t=Ao(t,e,1),e=Zn(),t!==null&&(zu(t,1,e),sr(t,e))}function Kt(t,e,n){if(t.tag===3)CS(t,t,n);else for(;e!==null;){if(e.tag===3){CS(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ro===null||!Ro.has(r))){t=Rl(n,t),t=tC(e,t,1),e=Ao(e,t,1),t=Zn(),e!==null&&(zu(e,1,t),sr(e,t));break}}e=e.return}}function fM(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Zn(),t.pingedLanes|=t.suspendedLanes&n,bn===t&&(Qn&n)===n&&(dn===4||dn===3&&(Qn&130023424)===Qn&&500>rn()-Hy?ps(t,0):Gy|=n),sr(t,e)}function bC(t,e){e===0&&(t.mode&1?(e=Lc,Lc<<=1,!(Lc&130023424)&&(Lc=4194304)):e=1);var n=Zn();t=eo(t,e),t!==null&&(zu(t,e,n),sr(t,n))}function hM(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),bC(t,n)}function dM(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(se(314))}r!==null&&r.delete(e),bC(t,n)}var wC;wC=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ir.current)tr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return tr=!1,eM(t,e,n);tr=!!(t.flags&131072)}else tr=!1,Vt&&e.flags&1048576&&xx(e,mh,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;If(t,e),t=e.pendingProps;var i=$l(e,Vn.current);ml(e,n),i=Wy(null,e,r,t,i,n);var o=Uy();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,or(r)?(o=!0,ph(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ly(e),i.updater=Pd,e.stateNode=i,i._reactInternals=e,_m(e,r,t,n),e=Rm(null,e,r,!0,o,n)):(e.tag=0,Vt&&o&&Ay(e),Xn(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(If(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=gM(r),t=qr(r,t),i){case 0:e=Am(null,e,r,t,n);break e;case 1:e=mS(null,e,r,t,n);break e;case 11:e=pS(null,e,r,t,n);break e;case 14:e=gS(null,e,r,qr(r.type,t),n);break e}throw Error(se(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qr(r,i),Am(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qr(r,i),mS(t,e,r,i,n);case 3:e:{if(oC(e),t===null)throw Error(se(387));r=e.pendingProps,o=e.memoizedState,i=o.element,$x(t,e),vh(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Rl(Error(se(423)),e),e=OS(t,e,r,n,i);break e}else if(r!==i){i=Rl(Error(se(424)),e),e=OS(t,e,r,n,i);break e}else for(mr=To(e.stateNode.containerInfo.firstChild),yr=e,Vt=!0,Hr=null,n=Rx(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_l(),r===i){e=to(t,e,n);break e}Xn(t,e,r,n)}e=e.child}return e;case 5:return Dx(e),t===null&&Em(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,wm(r,i)?s=null:o!==null&&wm(r,o)&&(e.flags|=32),iC(t,e),Xn(t,e,s,n),e.child;case 6:return t===null&&Em(e),null;case 13:return sC(t,e,n);case 4:return Vy(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Tl(e,null,r,n):Xn(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qr(r,i),pS(t,e,r,i,n);case 7:return Xn(t,e,e.pendingProps,n),e.child;case 8:return Xn(t,e,e.pendingProps.children,n),e.child;case 12:return Xn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Et(Oh,r._currentValue),r._currentValue=s,o!==null)if(ni(o.value,s)){if(o.children===i.children&&!ir.current){e=to(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Yi(-1,n&-n),a.tag=2;var u=o.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}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Qm(o.return,n,e),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(se(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Qm(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Xn(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ml(e,n),i=Lr(i),r=r(i),e.flags|=1,Xn(t,e,r,n),e.child;case 14:return r=e.type,i=qr(r,e.pendingProps),i=qr(r.type,i),gS(t,e,r,i,n);case 15:return nC(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:qr(r,i),If(t,e),e.tag=1,or(r)?(t=!0,ph(e)):t=!1,ml(e,n),Tx(e,r,i),_m(e,r,i,n),Rm(null,e,r,!0,t,n);case 19:return lC(t,e,n);case 22:return rC(t,e,n)}throw Error(se(156,e.tag))};function kC(t,e){return qP(t,e)}function pM(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 Rr(t,e,n,r){return new pM(t,e,n,r)}function tv(t){return t=t.prototype,!(!t||!t.isReactComponent)}function gM(t){if(typeof t=="function")return tv(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Sy)return 11;if(t===by)return 14}return 2}function Mo(t,e){var n=t.alternate;return n===null?(n=Rr(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 Lf(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")tv(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Hs:return gs(n.children,i,o,e);case vy:s=8,i|=8;break;case em:return t=Rr(12,n,e,i|2),t.elementType=em,t.lanes=o,t;case tm:return t=Rr(13,n,e,i),t.elementType=tm,t.lanes=o,t;case nm:return t=Rr(19,n,e,i),t.elementType=nm,t.lanes=o,t;case AP:return Qd(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case _P:s=10;break e;case TP:s=9;break e;case Sy:s=11;break e;case by:s=14;break e;case ho:s=16,r=null;break e}throw Error(se(130,t==null?t:typeof t,""))}return e=Rr(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function gs(t,e,n,r){return t=Rr(7,t,r,e),t.lanes=n,t}function Qd(t,e,n,r){return t=Rr(22,t,r,e),t.elementType=AP,t.lanes=n,t.stateNode={isHidden:!1},t}function Hp(t,e,n){return t=Rr(6,t,null,e),t.lanes=n,t}function Kp(t,e,n){return e=Rr(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function mM(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=Ap(0),this.expirationTimes=Ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ap(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nv(t,e,n,r,i,o,s,l,a){return t=new mM(t,e,n,l,a),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Rr(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ly(o),t}function OM(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gs,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function PC(t){if(!t)return Lo;t=t._reactInternals;e:{if(_s(t)!==t||t.tag!==1)throw Error(se(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(or(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(se(171))}if(t.tag===1){var n=t.type;if(or(n))return kx(t,n,e)}return e}function xC(t,e,n,r,i,o,s,l,a){return t=nv(n,r,!0,t,i,o,s,l,a),t.context=PC(null),n=t.current,r=Zn(),i=Do(n),o=Yi(r,i),o.callback=e??null,Ao(n,o,i),t.current.lanes=i,zu(t,i,r),sr(t,r),t}function $d(t,e,n,r){var i=e.current,o=Zn(),s=Do(i);return n=PC(n),e.context===null?e.context=n:e.pendingContext=n,e=Yi(o,s),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Ao(i,e,s),t!==null&&(ti(t,i,s,o),Rf(t,i,s)),s}function Eh(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 ES(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function rv(t,e){ES(t,e),(t=t.alternate)&&ES(t,e)}function yM(){return null}var CC=typeof reportError=="function"?reportError:function(t){console.error(t)};function iv(t){this._internalRoot=t}_d.prototype.render=iv.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(se(409));$d(t,e,null,null)};_d.prototype.unmount=iv.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ps(function(){$d(null,t,null,null)}),e[Ji]=null}};function _d(t){this._internalRoot=t}_d.prototype.unstable_scheduleHydration=function(t){if(t){var e=nx();t={blockedOn:null,target:t,priority:e};for(var n=0;n<yo.length&&e!==0&&e<yo[n].priority;n++);yo.splice(n,0,t),n===0&&ix(t)}};function ov(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Td(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function QS(){}function vM(t,e,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=Eh(s);o.call(u)}}var s=xC(e,r,t,0,null,!1,!1,"",QS);return t._reactRootContainer=s,t[Ji]=s.current,pu(t.nodeType===8?t.parentNode:t),Ps(),s}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=Eh(a);l.call(u)}}var a=nv(t,0,!1,null,null,!1,!1,"",QS);return t._reactRootContainer=a,t[Ji]=a.current,pu(t.nodeType===8?t.parentNode:t),Ps(function(){$d(e,a,n,r)}),a}function Ad(t,e,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=Eh(s);l.call(a)}}$d(e,s,t,i)}else s=vM(n,e,t,i,r);return Eh(s)}ex=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Ma(e.pendingLanes);n!==0&&(Py(e,n|1),sr(e,rn()),!(dt&6)&&(Dl=rn()+500,zo()))}break;case 13:Ps(function(){var r=eo(t,1);if(r!==null){var i=Zn();ti(r,t,1,i)}}),rv(t,1)}};xy=function(t){if(t.tag===13){var e=eo(t,134217728);if(e!==null){var n=Zn();ti(e,t,134217728,n)}rv(t,134217728)}};tx=function(t){if(t.tag===13){var e=Do(t),n=eo(t,e);if(n!==null){var r=Zn();ti(n,t,e,r)}rv(t,e)}};nx=function(){return St};rx=function(t,e){var n=St;try{return St=t,e()}finally{St=n}};hm=function(t,e,n){switch(e){case"input":if(om(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=wd(r);if(!i)throw Error(se(90));DP(r),om(r,i)}}}break;case"textarea":IP(t,n);break;case"select":e=n.value,e!=null&&hl(t,!!n.multiple,e,!1)}};XP=Ky;WP=Ps;var SM={usingClientEntryPoint:!1,Events:[Gu,tl,wd,BP,FP,Ky]},Sa={findFiberByHostInstance:as,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},bM={bundleType:Sa.bundleType,version:Sa.version,rendererPackageName:Sa.rendererPackageName,rendererConfig:Sa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:io.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=YP(t),t===null?null:t.stateNode},findFiberByHostInstance:Sa.findFiberByHostInstance||yM,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 Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gc.isDisabled&&Gc.supportsFiber)try{yd=Gc.inject(bM),Ci=Gc}catch{}}wr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SM;wr.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ov(e))throw Error(se(200));return OM(t,e,null,n)};wr.createRoot=function(t,e){if(!ov(t))throw Error(se(299));var n=!1,r="",i=CC;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=nv(t,1,!1,null,null,n,!1,r,i),t[Ji]=e.current,pu(t.nodeType===8?t.parentNode:t),new iv(e)};wr.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(se(188)):(t=Object.keys(t).join(","),Error(se(268,t)));return t=YP(e),t=t===null?null:t.stateNode,t};wr.flushSync=function(t){return Ps(t)};wr.hydrate=function(t,e,n){if(!Td(e))throw Error(se(200));return Ad(null,t,e,!0,n)};wr.hydrateRoot=function(t,e,n){if(!ov(t))throw Error(se(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=CC;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),e=xC(e,null,t,1,n??null,i,!1,o,s),t[Ji]=e.current,pu(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 _d(e)};wr.render=function(t,e,n){if(!Td(e))throw Error(se(200));return Ad(null,t,e,!1,n)};wr.unmountComponentAtNode=function(t){if(!Td(t))throw Error(se(40));return t._reactRootContainer?(Ps(function(){Ad(null,null,t,!1,function(){t._reactRootContainer=null,t[Ji]=null})}),!0):!1};wr.unstable_batchedUpdates=Ky;wr.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Td(n))throw Error(se(200));if(t==null||t._reactInternals===void 0)throw Error(se(38));return Ad(t,e,n,!1,r)};wr.version="18.2.0-next-9e3b772b8-20220608";function EC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(EC)}catch(t){console.error(t)}}EC(),xP.exports=wr;var sv=xP.exports;const al=Uo(sv);var QC,$S=sv;QC=$S.createRoot,$S.hydrateRoot;function Po(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 $C={exports:{}};(function(t,e){(function(n){t.exports=n()})(function(){return function(){function n(r,i,o){function s(u,c){if(!i[u]){if(!r[u]){var f=typeof Po=="function"&&Po;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 d=i[u]={exports:{}};r[u][0].call(d.exports,function(p){var g=r[u][1][p];return s(g||p)},d,d.exports,n,r,i,o)}return i[u].exports}for(var l=typeof Po=="function"&&Po,a=0;a<o.length;a++)s(o[a]);return s}return n}()({1:[function(n,r,i){(function(o,s,l){(function(){(function(a,u){u(typeof i=="object"&&typeof r<"u"?i:a.async=a.async||{})})(this,function(a){function u(P,_){_=_|0;for(var R=Math.max(P.length-_,0),L=Array(R),Z=0;Z<R;Z++)L[Z]=P[_+Z];return L}var c=function(P){var _=u(arguments,1);return function(){var R=u(arguments);return P.apply(null,_.concat(R))}},f=function(P){return function(){var _=u(arguments),R=_.pop();P.call(this,_,R)}};function h(P){var _=typeof P;return P!=null&&(_=="object"||_=="function")}var d=typeof l=="function"&&l,p=typeof o=="object"&&typeof o.nextTick=="function";function g(P){setTimeout(P,0)}function v(P){return function(_){var R=u(arguments,1);P(function(){_.apply(null,R)})}}var O;d?O=l:p?O=o.nextTick:O=g;var m=v(O);function y(P){return f(function(_,R){var L;try{L=P.apply(this,_)}catch(Z){return R(Z)}h(L)&&typeof L.then=="function"?L.then(function(Z){b(R,null,Z)},function(Z){b(R,Z.message?Z:new Error(Z))}):R(null,L)})}function b(P,_,R){try{P(_,R)}catch(L){m(x,L)}}function x(P){throw P}var E=typeof Symbol=="function";function T(P){return E&&P[Symbol.toStringTag]==="AsyncFunction"}function w(P){return T(P)?y(P):P}function k(P){return function(_){var R=u(arguments,1),L=f(function(Z,U){var ee=this;return P(_,function(re,he){w(re).apply(ee,Z.concat(he))},U)});return R.length?L.apply(this,R):L}}var C=typeof s=="object"&&s&&s.Object===Object&&s,Q=typeof self=="object"&&self&&self.Object===Object&&self,D=C||Q||Function("return this")(),N=D.Symbol,V=Object.prototype,G=V.hasOwnProperty,M=V.toString,j=N?N.toStringTag:void 0;function A(P){var _=G.call(P,j),R=P[j];try{P[j]=void 0;var L=!0}catch{}var Z=M.call(P);return L&&(_?P[j]=R:delete P[j]),Z}var X=Object.prototype,z=X.toString;function pe(P){return z.call(P)}var ae="[object Null]",B="[object Undefined]",q=N?N.toStringTag:void 0;function te(P){return P==null?P===void 0?B:ae:q&&q in Object(P)?A(P):pe(P)}var we="[object AsyncFunction]",F="[object Function]",W="[object GeneratorFunction]",Y="[object Proxy]";function fe(P){if(!h(P))return!1;var _=te(P);return _==F||_==W||_==we||_==Y}var Se=9007199254740991;function Be(P){return typeof P=="number"&&P>-1&&P%1==0&&P<=Se}function Ie(P){return P!=null&&Be(P.length)&&!fe(P)}var je={};function ie(){}function lt(P){return function(){if(P!==null){var _=P;P=null,_.apply(this,arguments)}}}var en=typeof Symbol=="function"&&Symbol.iterator,Xr=function(P){return en&&P[en]&&P[en]()};function xr(P,_){for(var R=-1,L=Array(P);++R<P;)L[R]=_(R);return L}function yn(P){return P!=null&&typeof P=="object"}var Ho="[object Arguments]";function Ni(P){return yn(P)&&te(P)==Ho}var $=Object.prototype,H=$.hasOwnProperty,K=$.propertyIsEnumerable,ue=Ni(function(){return arguments}())?Ni:function(P){return yn(P)&&H.call(P,"callee")&&!K.call(P,"callee")},le=Array.isArray;function Oe(){return!1}var Ge=typeof a=="object"&&a&&!a.nodeType&&a,Ke=Ge&&typeof r=="object"&&r&&!r.nodeType&&r,oe=Ke&&Ke.exports===Ge,Xe=oe?D.Buffer:void 0,Ee=Xe?Xe.isBuffer:void 0,ve=Ee||Oe,me=9007199254740991,Qe=/^(?:0|[1-9]\d*)$/;function Je(P,_){var R=typeof P;return _=_??me,!!_&&(R=="number"||R!="symbol"&&Qe.test(P))&&P>-1&&P%1==0&&P<_}var Le="[object Arguments]",ke="[object Array]",Ue="[object Boolean]",ft="[object Date]",ut="[object Error]",wt="[object Function]",jt="[object Map]",Ft="[object Number]",$t="[object Object]",_n="[object RegExp]",Tn="[object Set]",oi="[object String]",Cr="[object WeakMap]",ar="[object ArrayBuffer]",Gn="[object DataView]",rt="[object Float32Array]",De="[object Float64Array]",Ne="[object Int8Array]",Ve="[object Int16Array]",ye="[object Int32Array]",$e="[object Uint8Array]",nt="[object Uint8ClampedArray]",it="[object Uint16Array]",at="[object Uint32Array]",Ye={};Ye[rt]=Ye[De]=Ye[Ne]=Ye[Ve]=Ye[ye]=Ye[$e]=Ye[nt]=Ye[it]=Ye[at]=!0,Ye[Le]=Ye[ke]=Ye[ar]=Ye[Ue]=Ye[Gn]=Ye[ft]=Ye[ut]=Ye[wt]=Ye[jt]=Ye[Ft]=Ye[$t]=Ye[_n]=Ye[Tn]=Ye[oi]=Ye[Cr]=!1;function Ht(P){return yn(P)&&Be(P.length)&&!!Ye[te(P)]}function kt(P){return function(_){return P(_)}}var on=typeof a=="object"&&a&&!a.nodeType&&a,He=on&&typeof r=="object"&&r&&!r.nodeType&&r,et=He&&He.exports===on,xe=et&&C.process,ht=function(){try{var P=He&&He.require&&He.require("util").types;return P||xe&&xe.binding&&xe.binding("util")}catch{}}(),an=ht&&ht.isTypedArray,Wr=an?kt(an):Ht,si=Object.prototype,ur=si.hasOwnProperty;function Ko(P,_){var R=le(P),L=!R&&ue(P),Z=!R&&!L&&ve(P),U=!R&&!L&&!Z&&Wr(P),ee=R||L||Z||U,re=ee?xr(P.length,String):[],he=re.length;for(var Me in P)(_||ur.call(P,Me))&&!(ee&&(Me=="length"||Z&&(Me=="offset"||Me=="parent")||U&&(Me=="buffer"||Me=="byteLength"||Me=="byteOffset")||Je(Me,he)))&&re.push(Me);return re}var ji=Object.prototype;function Ur(P){var _=P&&P.constructor,R=typeof _=="function"&&_.prototype||ji;return P===R}function Jo(P,_){return function(R){return P(_(R))}}var Ze=Jo(Object.keys,Object),xt=Object.prototype,tn=xt.hasOwnProperty;function _t(P){if(!Ur(P))return Ze(P);var _=[];for(var R in Object(P))tn.call(P,R)&&R!="constructor"&&_.push(R);return _}function Er(P){return Ie(P)?Ko(P):_t(P)}function lo(P){var _=-1,R=P.length;return function(){return++_<R?{value:P[_],key:_}:null}}function ia(P){var _=-1;return function(){var L=P.next();return L.done?null:(_++,{value:L.value,key:_})}}function As(P){var _=Er(P),R=-1,L=_.length;return function Z(){var U=_[++R];return U==="__proto__"?Z():R<L?{value:P[U],key:U}:null}}function hc(P){if(Ie(P))return lo(P);var _=Xr(P);return _?ia(_):As(P)}function un(P){return function(){if(P===null)throw new Error("Callback was already called.");var _=P;P=null,_.apply(this,arguments)}}function An(P){return function(_,R,L){if(L=lt(L||ie),P<=0||!_)return L(null);var Z=hc(_),U=!1,ee=0,re=!1;function he(ge,ze){if(ee-=1,ge)U=!0,L(ge);else{if(ze===je||U&&ee<=0)return U=!0,L(null);re||Me()}}function Me(){for(re=!0;ee<P&&!U;){var ge=Z();if(ge===null){U=!0,ee<=0&&L(null);return}ee+=1,R(ge.value,ge.key,un(he))}re=!1}Me()}}function Hn(P,_,R,L){An(_)(P,w(R),L)}function Tt(P,_){return function(R,L,Z){return P(R,_,L,Z)}}function Li(P,_,R){R=lt(R||ie);var L=0,Z=0,U=P.length;U===0&&R(null);function ee(re,he){re?R(re):(++Z===U||he===je)&&R(null)}for(;L<U;L++)_(P[L],L,un(ee))}var GA=Tt(Hn,1/0),ao=function(P,_,R){var L=Ie(P)?Li:GA;L(P,w(_),R)};function Rs(P){return function(_,R,L){return P(ao,_,w(R),L)}}function O0(P,_,R,L){L=L||ie,_=_||[];var Z=[],U=0,ee=w(R);P(_,function(re,he,Me){var ge=U++;ee(re,function(ze,At){Z[ge]=At,Me(ze)})},function(re){L(re,Z)})}var dc=Rs(O0),y0=k(dc);function Ds(P){return function(_,R,L,Z){return P(An(R),_,w(L),Z)}}var Ms=Ds(O0),hp=Tt(Ms,1),v0=k(hp);function pc(P,_){for(var R=-1,L=P==null?0:P.length;++R<L&&_(P[R],R,P)!==!1;);return P}function HA(P){return function(_,R,L){for(var Z=-1,U=Object(_),ee=L(_),re=ee.length;re--;){var he=ee[P?re:++Z];if(R(U[he],he,U)===!1)break}return _}}var KA=HA();function oa(P,_){return P&&KA(P,_,Er)}function JA(P,_,R,L){for(var Z=P.length,U=R+(L?1:-1);L?U--:++U<Z;)if(_(P[U],U,P))return U;return-1}function e2(P){return P!==P}function t2(P,_,R){for(var L=R-1,Z=P.length;++L<Z;)if(P[L]===_)return L;return-1}function gc(P,_,R){return _===_?t2(P,_,R):JA(P,e2,R)}var dp=function(P,_,R){typeof _=="function"&&(R=_,_=null),R=lt(R||ie);var L=Er(P),Z=L.length;if(!Z)return R(null);_||(_=Z);var U={},ee=0,re=!1,he=Object.create(null),Me=[],ge=[],ze={};oa(P,function(Lt,Xt){if(!le(Lt)){At(Xt,[Lt]),ge.push(Xt);return}var vn=Lt.slice(0,Lt.length-1),Vi=vn.length;if(Vi===0){At(Xt,Lt),ge.push(Xt);return}ze[Xt]=Vi,pc(vn,function(Ls){if(!P[Ls])throw new Error("async.auto task `"+Xt+"` has a non-existent dependency `"+Ls+"` in "+vn.join(", "));li(Ls,function(){Vi--,Vi===0&&At(Xt,Lt)})})}),Y2(),Rn();function At(Lt,Xt){Me.push(function(){ai(Lt,Xt)})}function Rn(){if(Me.length===0&&ee===0)return R(null,U);for(;Me.length&&ee<_;){var Lt=Me.shift();Lt()}}function li(Lt,Xt){var vn=he[Lt];vn||(vn=he[Lt]=[]),vn.push(Xt)}function Qr(Lt){var Xt=he[Lt]||[];pc(Xt,function(vn){vn()}),Rn()}function ai(Lt,Xt){if(!re){var vn=un(function(Ls,xp){if(ee--,arguments.length>2&&(xp=u(arguments,1)),Ls){var Cp={};oa(U,function(q2,G2){Cp[G2]=q2}),Cp[Lt]=xp,re=!0,he=Object.create(null),R(Ls,Cp)}else U[Lt]=xp,Qr(Lt)});ee++;var Vi=w(Xt[Xt.length-1]);Xt.length>1?Vi(U,vn):Vi(vn)}}function Y2(){for(var Lt,Xt=0;ge.length;)Lt=ge.pop(),Xt++,pc(z2(Lt),function(vn){--ze[vn]===0&&ge.push(vn)});if(Xt!==Z)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function z2(Lt){var Xt=[];return oa(P,function(vn,Vi){le(vn)&&gc(vn,Lt,0)>=0&&Xt.push(Vi)}),Xt}};function Is(P,_){for(var R=-1,L=P==null?0:P.length,Z=Array(L);++R<L;)Z[R]=_(P[R],R,P);return Z}var n2="[object Symbol]";function r2(P){return typeof P=="symbol"||yn(P)&&te(P)==n2}var i2=1/0,S0=N?N.prototype:void 0,b0=S0?S0.toString:void 0;function pp(P){if(typeof P=="string")return P;if(le(P))return Is(P,pp)+"";if(r2(P))return b0?b0.call(P):"";var _=P+"";return _=="0"&&1/P==-i2?"-0":_}function o2(P,_,R){var L=-1,Z=P.length;_<0&&(_=-_>Z?0:Z+_),R=R>Z?Z:R,R<0&&(R+=Z),Z=_>R?0:R-_>>>0,_>>>=0;for(var U=Array(Z);++L<Z;)U[L]=P[L+_];return U}function s2(P,_,R){var L=P.length;return R=R===void 0?L:R,!_&&R>=L?P:o2(P,_,R)}function l2(P,_){for(var R=P.length;R--&&gc(_,P[R],0)>-1;);return R}function a2(P,_){for(var R=-1,L=P.length;++R<L&&gc(_,P[R],0)>-1;);return R}function u2(P){return P.split("")}var c2="\\ud800-\\udfff",f2="\\u0300-\\u036f",h2="\\ufe20-\\ufe2f",d2="\\u20d0-\\u20ff",p2=f2+h2+d2,g2="\\ufe0e\\ufe0f",m2="\\u200d",O2=RegExp("["+m2+c2+p2+g2+"]");function y2(P){return O2.test(P)}var w0="\\ud800-\\udfff",v2="\\u0300-\\u036f",S2="\\ufe20-\\ufe2f",b2="\\u20d0-\\u20ff",w2=v2+S2+b2,k2="\\ufe0e\\ufe0f",P2="["+w0+"]",gp="["+w2+"]",mp="\\ud83c[\\udffb-\\udfff]",x2="(?:"+gp+"|"+mp+")",k0="[^"+w0+"]",P0="(?:\\ud83c[\\udde6-\\uddff]){2}",x0="[\\ud800-\\udbff][\\udc00-\\udfff]",C2="\\u200d",C0=x2+"?",E0="["+k2+"]?",E2="(?:"+C2+"(?:"+[k0,P0,x0].join("|")+")"+E0+C0+")*",Q2=E0+C0+E2,$2="(?:"+[k0+gp+"?",gp,P0,x0,P2].join("|")+")",_2=RegExp(mp+"(?="+mp+")|"+$2+Q2,"g");function T2(P){return P.match(_2)||[]}function Q0(P){return y2(P)?T2(P):u2(P)}function A2(P){return P==null?"":pp(P)}var R2=/^\s+|\s+$/g;function D2(P,_,R){if(P=A2(P),P&&(R||_===void 0))return P.replace(R2,"");if(!P||!(_=pp(_)))return P;var L=Q0(P),Z=Q0(_),U=a2(L,Z),ee=l2(L,Z)+1;return s2(L,U,ee).join("")}var M2=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,I2=/,/,N2=/(=.+)?(\s*)$/,j2=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;function L2(P){return P=P.toString().replace(j2,""),P=P.match(M2)[2].replace(" ",""),P=P?P.split(I2):[],P=P.map(function(_){return D2(_.replace(N2,""))}),P}function $0(P,_){var R={};oa(P,function(L,Z){var U,ee=T(L),re=!ee&&L.length===1||ee&&L.length===0;if(le(L))U=L.slice(0,-1),L=L[L.length-1],R[Z]=U.concat(U.length>0?he:L);else if(re)R[Z]=L;else{if(U=L2(L),L.length===0&&!ee&&U.length===0)throw new Error("autoInject task functions require explicit parameters.");ee||U.pop(),R[Z]=U.concat(he)}function he(Me,ge){var ze=Is(U,function(At){return Me[At]});ze.push(ge),w(L).apply(null,ze)}}),dp(R,_)}function Zr(){this.head=this.tail=null,this.length=0}function _0(P,_){P.length=1,P.head=P.tail=_}Zr.prototype.removeLink=function(P){return P.prev?P.prev.next=P.next:this.head=P.next,P.next?P.next.prev=P.prev:this.tail=P.prev,P.prev=P.next=null,this.length-=1,P},Zr.prototype.empty=function(){for(;this.head;)this.shift();return this},Zr.prototype.insertAfter=function(P,_){_.prev=P,_.next=P.next,P.next?P.next.prev=_:this.tail=_,P.next=_,this.length+=1},Zr.prototype.insertBefore=function(P,_){_.prev=P.prev,_.next=P,P.prev?P.prev.next=_:this.head=_,P.prev=_,this.length+=1},Zr.prototype.unshift=function(P){this.head?this.insertBefore(this.head,P):_0(this,P)},Zr.prototype.push=function(P){this.tail?this.insertAfter(this.tail,P):_0(this,P)},Zr.prototype.shift=function(){return this.head&&this.removeLink(this.head)},Zr.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},Zr.prototype.toArray=function(){for(var P=Array(this.length),_=this.head,R=0;R<this.length;R++)P[R]=_.data,_=_.next;return P},Zr.prototype.remove=function(P){for(var _=this.head;_;){var R=_.next;P(_)&&this.removeLink(_),_=R}return this};function T0(P,_,R){if(_==null)_=1;else if(_===0)throw new Error("Concurrency must not be zero");var L=w(P),Z=0,U=[],ee=!1;function re(ze,At,Rn){if(Rn!=null&&typeof Rn!="function")throw new Error("task callback must be a function");if(ge.started=!0,le(ze)||(ze=[ze]),ze.length===0&&ge.idle())return m(function(){ge.drain()});for(var li=0,Qr=ze.length;li<Qr;li++){var ai={data:ze[li],callback:Rn||ie};At?ge._tasks.unshift(ai):ge._tasks.push(ai)}ee||(ee=!0,m(function(){ee=!1,ge.process()}))}function he(ze){return function(At){Z-=1;for(var Rn=0,li=ze.length;Rn<li;Rn++){var Qr=ze[Rn],ai=gc(U,Qr,0);ai===0?U.shift():ai>0&&U.splice(ai,1),Qr.callback.apply(Qr,arguments),At!=null&&ge.error(At,Qr.data)}Z<=ge.concurrency-ge.buffer&&ge.unsaturated(),ge.idle()&&ge.drain(),ge.process()}}var Me=!1,ge={_tasks:new Zr,concurrency:_,payload:R,saturated:ie,unsaturated:ie,buffer:_/4,empty:ie,drain:ie,error:ie,started:!1,paused:!1,push:function(ze,At){re(ze,!1,At)},kill:function(){ge.drain=ie,ge._tasks.empty()},unshift:function(ze,At){re(ze,!0,At)},remove:function(ze){ge._tasks.remove(ze)},process:function(){if(!Me){for(Me=!0;!ge.paused&&Z<ge.concurrency&&ge._tasks.length;){var ze=[],At=[],Rn=ge._tasks.length;ge.payload&&(Rn=Math.min(Rn,ge.payload));for(var li=0;li<Rn;li++){var Qr=ge._tasks.shift();ze.push(Qr),U.push(Qr),At.push(Qr.data)}Z+=1,ge._tasks.length===0&&ge.empty(),Z===ge.concurrency&&ge.saturated();var ai=un(he(ze));L(At,ai)}Me=!1}},length:function(){return ge._tasks.length},running:function(){return Z},workersList:function(){return U},idle:function(){return ge._tasks.length+Z===0},pause:function(){ge.paused=!0},resume:function(){ge.paused!==!1&&(ge.paused=!1,m(ge.process))}};return ge}function A0(P,_){return T0(P,1,_)}var Ns=Tt(Hn,1);function uo(P,_,R,L){L=lt(L||ie);var Z=w(R);Ns(P,function(U,ee,re){Z(_,U,function(he,Me){_=Me,re(he)})},function(U){L(U,_)})}function Op(){var P=Is(arguments,w);return function(){var _=u(arguments),R=this,L=_[_.length-1];typeof L=="function"?_.pop():L=ie,uo(P,_,function(Z,U,ee){U.apply(R,Z.concat(function(re){var he=u(arguments,1);ee(re,he)}))},function(Z,U){L.apply(R,[Z].concat(U))})}}var R0=function(){return Op.apply(null,u(arguments).reverse())},V2=Array.prototype.concat,mc=function(P,_,R,L){L=L||ie;var Z=w(R);Ms(P,_,function(U,ee){Z(U,function(re){return re?ee(re):ee(null,u(arguments,1))})},function(U,ee){for(var re=[],he=0;he<ee.length;he++)ee[he]&&(re=V2.apply(re,ee[he]));return L(U,re)})},D0=Tt(mc,1/0),M0=Tt(mc,1),I0=function(){var P=u(arguments),_=[null].concat(P);return function(){var R=arguments[arguments.length-1];return R.apply(this,_)}};function sa(P){return P}function js(P,_){return function(R,L,Z,U){U=U||ie;var ee=!1,re;R(L,function(he,Me,ge){Z(he,function(ze,At){ze?ge(ze):P(At)&&!re?(ee=!0,re=_(!0,he),ge(null,je)):ge()})},function(he){he?U(he):U(null,ee?re:_(!1))})}}function N0(P,_){return _}var Oc=Rs(js(sa,N0)),la=Ds(js(sa,N0)),yc=Tt(la,1);function j0(P){return function(_){var R=u(arguments,1);R.push(function(L){var Z=u(arguments,1);typeof console=="object"&&(L?console.error&&console.error(L):console[P]&&pc(Z,function(U){console[P](U)}))}),w(_).apply(null,R)}}var L0=j0("dir");function V0(P,_,R){R=un(R||ie);var L=w(P),Z=w(_);function U(re){if(re)return R(re);var he=u(arguments,1);he.push(ee),Z.apply(this,he)}function ee(re,he){if(re)return R(re);if(!he)return R(null);L(U)}ee(null,!0)}function yp(P,_,R){R=un(R||ie);var L=w(P),Z=function(U){if(U)return R(U);var ee=u(arguments,1);if(_.apply(this,ee))return L(Z);R.apply(null,[null].concat(ee))};L(Z)}function B0(P,_,R){yp(P,function(){return!_.apply(this,arguments)},R)}function F0(P,_,R){R=un(R||ie);var L=w(_),Z=w(P);function U(re){if(re)return R(re);Z(ee)}function ee(re,he){if(re)return R(re);if(!he)return R(null);L(U)}Z(ee)}function X0(P){return function(_,R,L){return P(_,L)}}function vc(P,_,R){ao(P,X0(w(_)),R)}function aa(P,_,R,L){An(_)(P,X0(w(R)),L)}var ua=Tt(aa,1);function vp(P){return T(P)?P:f(function(_,R){var L=!0;_.push(function(){var Z=arguments;L?m(function(){R.apply(null,Z)}):R.apply(null,Z)}),P.apply(this,_),L=!1})}function Sc(P){return!P}var bc=Rs(js(Sc,Sc)),ca=Ds(js(Sc,Sc)),wc=Tt(ca,1);function W0(P){return function(_){return _==null?void 0:_[P]}}function B2(P,_,R,L){var Z=new Array(_.length);P(_,function(U,ee,re){R(U,function(he,Me){Z[ee]=!!Me,re(he)})},function(U){if(U)return L(U);for(var ee=[],re=0;re<_.length;re++)Z[re]&&ee.push(_[re]);L(null,ee)})}function F2(P,_,R,L){var Z=[];P(_,function(U,ee,re){R(U,function(he,Me){he?re(he):(Me&&Z.push({index:ee,value:U}),re())})},function(U){U?L(U):L(null,Is(Z.sort(function(ee,re){return ee.index-re.index}),W0("value")))})}function Sp(P,_,R,L){var Z=Ie(_)?B2:F2;Z(P,_,w(R),L||ie)}var kc=Rs(Sp),fa=Ds(Sp),Pc=Tt(fa,1);function U0(P,_){var R=un(_||ie),L=w(vp(P));function Z(U){if(U)return R(U);L(Z)}Z()}var xc=function(P,_,R,L){L=L||ie;var Z=w(R);Ms(P,_,function(U,ee){Z(U,function(re,he){return re?ee(re):ee(null,{key:he,val:U})})},function(U,ee){for(var re={},he=Object.prototype.hasOwnProperty,Me=0;Me<ee.length;Me++)if(ee[Me]){var ge=ee[Me].key,ze=ee[Me].val;he.call(re,ge)?re[ge].push(ze):re[ge]=[ze]}return L(U,re)})},Z0=Tt(xc,1/0),Y0=Tt(xc,1),z0=j0("log");function Cc(P,_,R,L){L=lt(L||ie);var Z={},U=w(R);Hn(P,_,function(ee,re,he){U(ee,re,function(Me,ge){if(Me)return he(Me);Z[re]=ge,he()})},function(ee){L(ee,Z)})}var q0=Tt(Cc,1/0),G0=Tt(Cc,1);function H0(P,_){return _ in P}function K0(P,_){var R=Object.create(null),L=Object.create(null);_=_||sa;var Z=w(P),U=f(function(re,he){var Me=_.apply(null,re);H0(R,Me)?m(function(){he.apply(null,R[Me])}):H0(L,Me)?L[Me].push(he):(L[Me]=[he],Z.apply(null,re.concat(function(){var ge=u(arguments);R[Me]=ge;var ze=L[Me];delete L[Me];for(var At=0,Rn=ze.length;At<Rn;At++)ze[At].apply(null,ge)})))});return U.memo=R,U.unmemoized=P,U}var Ec;p?Ec=o.nextTick:d?Ec=l:Ec=g;var J0=v(Ec);function bp(P,_,R){R=R||ie;var L=Ie(_)?[]:{};P(_,function(Z,U,ee){w(Z)(function(re,he){arguments.length>2&&(he=u(arguments,1)),L[U]=he,ee(re)})},function(Z){R(Z,L)})}function e1(P,_){bp(ao,P,_)}function t1(P,_,R){bp(An(_),P,R)}var wp=function(P,_){var R=w(P);return T0(function(L,Z){R(L[0],Z)},_,1)},n1=function(P,_){var R=wp(P,_);return R.push=function(L,Z,U){if(U==null&&(U=ie),typeof U!="function")throw new Error("task callback must be a function");if(R.started=!0,le(L)||(L=[L]),L.length===0)return m(function(){R.drain()});Z=Z||0;for(var ee=R._tasks.head;ee&&Z>=ee.priority;)ee=ee.next;for(var re=0,he=L.length;re<he;re++){var Me={data:L[re],priority:Z,callback:U};ee?R._tasks.insertBefore(ee,Me):R._tasks.push(Me)}m(R.process)},delete R.unshift,R};function r1(P,_){if(_=lt(_||ie),!le(P))return _(new TypeError("First argument to race must be an array of functions"));if(!P.length)return _();for(var R=0,L=P.length;R<L;R++)w(P[R])(_)}function Qc(P,_,R,L){var Z=u(P).reverse();uo(Z,_,R,L)}function $c(P){var _=w(P);return f(function(L,Z){return L.push(function(ee,re){if(ee)Z(null,{error:ee});else{var he;arguments.length<=2?he=re:he=u(arguments,1),Z(null,{value:he})}}),_.apply(this,L)})}function i1(P){var _;return le(P)?_=Is(P,$c):(_={},oa(P,function(R,L){_[L]=$c.call(this,R)})),_}function o1(P,_,R,L){Sp(P,_,function(Z,U){R(Z,function(ee,re){U(ee,!re)})},L)}var s1=Rs(o1),kp=Ds(o1),l1=Tt(kp,1);function a1(P){return function(){return P}}function _c(P,_,R){var L=5,Z=0,U={times:L,intervalFunc:a1(Z)};function ee(ge,ze){if(typeof ze=="object")ge.times=+ze.times||L,ge.intervalFunc=typeof ze.interval=="function"?ze.interval:a1(+ze.interval||Z),ge.errorFilter=ze.errorFilter;else if(typeof ze=="number"||typeof ze=="string")ge.times=+ze||L;else throw new Error("Invalid arguments for async.retry")}if(arguments.length<3&&typeof P=="function"?(R=_||ie,_=P):(ee(U,P),R=R||ie),typeof _!="function")throw new Error("Invalid arguments for async.retry");var re=w(_),he=1;function Me(){re(function(ge){ge&&he++<U.times&&(typeof U.errorFilter!="function"||U.errorFilter(ge))?setTimeout(Me,U.intervalFunc(he)):R.apply(null,arguments)})}Me()}var u1=function(P,_){_||(_=P,P=null);var R=w(_);return f(function(L,Z){function U(ee){R.apply(null,L.concat(ee))}P?_c(P,U,Z):_c(U,Z)})};function c1(P,_){bp(Ns,P,_)}var Tc=Rs(js(Boolean,sa)),ha=Ds(js(Boolean,sa)),Ac=Tt(ha,1);function f1(P,_,R){var L=w(_);dc(P,function(U,ee){L(U,function(re,he){if(re)return ee(re);ee(null,{value:U,criteria:he})})},function(U,ee){if(U)return R(U);R(null,Is(ee.sort(Z),W0("value")))});function Z(U,ee){var re=U.criteria,he=ee.criteria;return re<he?-1:re>he?1:0}}function h1(P,_,R){var L=w(P);return f(function(Z,U){var ee=!1,re;function he(){var Me=P.name||"anonymous",ge=new Error('Callback function "'+Me+'" timed out.');ge.code="ETIMEDOUT",R&&(ge.info=R),ee=!0,U(ge)}Z.push(function(){ee||(U.apply(null,arguments),clearTimeout(re))}),re=setTimeout(he,_),L.apply(null,Z)})}var X2=Math.ceil,W2=Math.max;function U2(P,_,R,L){for(var Z=-1,U=W2(X2((_-P)/(R||1)),0),ee=Array(U);U--;)ee[L?U:++Z]=P,P+=R;return ee}function Rc(P,_,R,L){var Z=w(R);Ms(U2(0,P,1),_,Z,L)}var d1=Tt(Rc,1/0),p1=Tt(Rc,1);function g1(P,_,R,L){arguments.length<=3&&(L=R,R=_,_=le(P)?[]:{}),L=lt(L||ie);var Z=w(R);ao(P,function(U,ee,re){Z(_,U,ee,re)},function(U){L(U,_)})}function m1(P,_){var R=null,L;_=_||ie,ua(P,function(Z,U){w(Z)(function(ee,re){arguments.length>2?L=u(arguments,1):L=re,R=ee,U(!ee)})},function(){_(R,L)})}function O1(P){return function(){return(P.unmemoized||P).apply(null,arguments)}}function Pp(P,_,R){R=un(R||ie);var L=w(_);if(!P())return R(null);var Z=function(U){if(U)return R(U);if(P())return L(Z);var ee=u(arguments,1);R.apply(null,[null].concat(ee))};L(Z)}function y1(P,_,R){Pp(function(){return!P.apply(this,arguments)},_,R)}var v1=function(P,_){if(_=lt(_||ie),!le(P))return _(new Error("First argument to waterfall must be an array of functions"));if(!P.length)return _();var R=0;function L(U){var ee=w(P[R++]);U.push(un(Z)),ee.apply(null,U)}function Z(U){if(U||R===P.length)return _.apply(null,arguments);L(u(arguments,1))}L([])},Z2={apply:c,applyEach:y0,applyEachSeries:v0,asyncify:y,auto:dp,autoInject:$0,cargo:A0,compose:R0,concat:D0,concatLimit:mc,concatSeries:M0,constant:I0,detect:Oc,detectLimit:la,detectSeries:yc,dir:L0,doDuring:V0,doUntil:B0,doWhilst:yp,during:F0,each:vc,eachLimit:aa,eachOf:ao,eachOfLimit:Hn,eachOfSeries:Ns,eachSeries:ua,ensureAsync:vp,every:bc,everyLimit:ca,everySeries:wc,filter:kc,filterLimit:fa,filterSeries:Pc,forever:U0,groupBy:Z0,groupByLimit:xc,groupBySeries:Y0,log:z0,map:dc,mapLimit:Ms,mapSeries:hp,mapValues:q0,mapValuesLimit:Cc,mapValuesSeries:G0,memoize:K0,nextTick:J0,parallel:e1,parallelLimit:t1,priorityQueue:n1,queue:wp,race:r1,reduce:uo,reduceRight:Qc,reflect:$c,reflectAll:i1,reject:s1,rejectLimit:kp,rejectSeries:l1,retry:_c,retryable:u1,seq:Op,series:c1,setImmediate:m,some:Tc,someLimit:ha,someSeries:Ac,sortBy:f1,timeout:h1,times:d1,timesLimit:Rc,timesSeries:p1,transform:g1,tryEach:m1,unmemoize:O1,until:y1,waterfall:v1,whilst:Pp,all:bc,allLimit:ca,allSeries:wc,any:Tc,anyLimit:ha,anySeries:Ac,find:Oc,findLimit:la,findSeries:yc,forEach:vc,forEachSeries:ua,forEachLimit:aa,forEachOf:ao,forEachOfSeries:Ns,forEachOfLimit:Hn,inject:uo,foldl:uo,foldr:Qc,select:kc,selectLimit:fa,selectSeries:Pc,wrapSync:y};a.default=Z2,a.apply=c,a.applyEach=y0,a.applyEachSeries=v0,a.asyncify=y,a.auto=dp,a.autoInject=$0,a.cargo=A0,a.compose=R0,a.concat=D0,a.concatLimit=mc,a.concatSeries=M0,a.constant=I0,a.detect=Oc,a.detectLimit=la,a.detectSeries=yc,a.dir=L0,a.doDuring=V0,a.doUntil=B0,a.doWhilst=yp,a.during=F0,a.each=vc,a.eachLimit=aa,a.eachOf=ao,a.eachOfLimit=Hn,a.eachOfSeries=Ns,a.eachSeries=ua,a.ensureAsync=vp,a.every=bc,a.everyLimit=ca,a.everySeries=wc,a.filter=kc,a.filterLimit=fa,a.filterSeries=Pc,a.forever=U0,a.groupBy=Z0,a.groupByLimit=xc,a.groupBySeries=Y0,a.log=z0,a.map=dc,a.mapLimit=Ms,a.mapSeries=hp,a.mapValues=q0,a.mapValuesLimit=Cc,a.mapValuesSeries=G0,a.memoize=K0,a.nextTick=J0,a.parallel=e1,a.parallelLimit=t1,a.priorityQueue=n1,a.queue=wp,a.race=r1,a.reduce=uo,a.reduceRight=Qc,a.reflect=$c,a.reflectAll=i1,a.reject=s1,a.rejectLimit=kp,a.rejectSeries=l1,a.retry=_c,a.retryable=u1,a.seq=Op,a.series=c1,a.setImmediate=m,a.some=Tc,a.someLimit=ha,a.someSeries=Ac,a.sortBy=f1,a.timeout=h1,a.times=d1,a.timesLimit=Rc,a.timesSeries=p1,a.transform=g1,a.tryEach=m1,a.unmemoize=O1,a.until=y1,a.waterfall=v1,a.whilst=Pp,a.all=bc,a.allLimit=ca,a.allSeries=wc,a.any=Tc,a.anyLimit=ha,a.anySeries=Ac,a.find=Oc,a.findLimit=la,a.findSeries=yc,a.forEach=vc,a.forEachSeries=ua,a.forEachLimit=aa,a.forEachOf=ao,a.forEachOfSeries=Ns,a.forEachOfLimit=Hn,a.inject=uo,a.foldl=uo,a.foldr=Qc,a.select=kc,a.selectLimit=fa,a.selectSeries=Pc,a.wrapSync=y,Object.defineProperty(a,"__esModule",{value:!0})})}).call(this)}).call(this,n("_process"),typeof $r<"u"?$r:typeof self<"u"?self:typeof window<"u"?window:{},n("timers").setImmediate)},{_process:9,timers:33}],2:[function(n,r,i){var o=typeof Reflect=="object"?Reflect:null,s=o&&typeof o.apply=="function"?o.apply:function(C,Q,D){return Function.prototype.apply.call(C,Q,D)},l;o&&typeof o.ownKeys=="function"?l=o.ownKeys:Object.getOwnPropertySymbols?l=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:l=function(C){return Object.getOwnPropertyNames(C)};function a(k){console&&console.warn&&console.warn(k)}var u=Number.isNaN||function(C){return C!==C};function c(){c.init.call(this)}r.exports=c,r.exports.once=E,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var f=10;function h(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(k){if(typeof k!="number"||k<0||u(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");f=k}}),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(C){if(typeof C!="number"||C<0||u(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function d(k){return k._maxListeners===void 0?c.defaultMaxListeners:k._maxListeners}c.prototype.getMaxListeners=function(){return d(this)},c.prototype.emit=function(C){for(var Q=[],D=1;D<arguments.length;D++)Q.push(arguments[D]);var N=C==="error",V=this._events;if(V!==void 0)N=N&&V.error===void 0;else if(!N)return!1;if(N){var G;if(Q.length>0&&(G=Q[0]),G instanceof Error)throw G;var M=new Error("Unhandled error."+(G?" ("+G.message+")":""));throw M.context=G,M}var j=V[C];if(j===void 0)return!1;if(typeof j=="function")s(j,this,Q);else for(var A=j.length,X=y(j,A),D=0;D<A;++D)s(X[D],this,Q);return!0};function p(k,C,Q,D){var N,V,G;if(h(Q),V=k._events,V===void 0?(V=k._events=Object.create(null),k._eventsCount=0):(V.newListener!==void 0&&(k.emit("newListener",C,Q.listener?Q.listener:Q),V=k._events),G=V[C]),G===void 0)G=V[C]=Q,++k._eventsCount;else if(typeof G=="function"?G=V[C]=D?[Q,G]:[G,Q]:D?G.unshift(Q):G.push(Q),N=d(k),N>0&&G.length>N&&!G.warned){G.warned=!0;var M=new Error("Possible EventEmitter memory leak detected. "+G.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");M.name="MaxListenersExceededWarning",M.emitter=k,M.type=C,M.count=G.length,a(M)}return k}c.prototype.addListener=function(C,Q){return p(this,C,Q,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(C,Q){return p(this,C,Q,!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 v(k,C,Q){var D={fired:!1,wrapFn:void 0,target:k,type:C,listener:Q},N=g.bind(D);return N.listener=Q,D.wrapFn=N,N}c.prototype.once=function(C,Q){return h(Q),this.on(C,v(this,C,Q)),this},c.prototype.prependOnceListener=function(C,Q){return h(Q),this.prependListener(C,v(this,C,Q)),this},c.prototype.removeListener=function(C,Q){var D,N,V,G,M;if(h(Q),N=this._events,N===void 0)return this;if(D=N[C],D===void 0)return this;if(D===Q||D.listener===Q)--this._eventsCount===0?this._events=Object.create(null):(delete N[C],N.removeListener&&this.emit("removeListener",C,D.listener||Q));else if(typeof D!="function"){for(V=-1,G=D.length-1;G>=0;G--)if(D[G]===Q||D[G].listener===Q){M=D[G].listener,V=G;break}if(V<0)return this;V===0?D.shift():b(D,V),D.length===1&&(N[C]=D[0]),N.removeListener!==void 0&&this.emit("removeListener",C,M||Q)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(C){var Q,D,N;if(D=this._events,D===void 0)return this;if(D.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):D[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete D[C]),this;if(arguments.length===0){var V=Object.keys(D),G;for(N=0;N<V.length;++N)G=V[N],G!=="removeListener"&&this.removeAllListeners(G);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Q=D[C],typeof Q=="function")this.removeListener(C,Q);else if(Q!==void 0)for(N=Q.length-1;N>=0;N--)this.removeListener(C,Q[N]);return this};function O(k,C,Q){var D=k._events;if(D===void 0)return[];var N=D[C];return N===void 0?[]:typeof N=="function"?Q?[N.listener||N]:[N]:Q?x(N):y(N,N.length)}c.prototype.listeners=function(C){return O(this,C,!0)},c.prototype.rawListeners=function(C){return O(this,C,!1)},c.listenerCount=function(k,C){return typeof k.listenerCount=="function"?k.listenerCount(C):m.call(k,C)},c.prototype.listenerCount=m;function m(k){var C=this._events;if(C!==void 0){var Q=C[k];if(typeof Q=="function")return 1;if(Q!==void 0)return Q.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function y(k,C){for(var Q=new Array(C),D=0;D<C;++D)Q[D]=k[D];return Q}function b(k,C){for(;C+1<k.length;C++)k[C]=k[C+1];k.pop()}function x(k){for(var C=new Array(k.length),Q=0;Q<C.length;++Q)C[Q]=k[Q].listener||k[Q];return C}function E(k,C){return new Promise(function(Q,D){function N(G){k.removeListener(C,V),D(G)}function V(){typeof k.removeListener=="function"&&k.removeListener("error",N),Q([].slice.call(arguments))}w(k,C,V,{once:!0}),C!=="error"&&T(k,N,{once:!0})})}function T(k,C,Q){typeof k.on=="function"&&w(k,"error",C,Q)}function w(k,C,Q,D){if(typeof k.on=="function")D.once?k.once(C,Q):k.on(C,Q);else if(typeof k.addEventListener=="function")k.addEventListener(C,function N(V){D.once&&k.removeEventListener(C,N),Q(V)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k)}},{}],3:[function(n,r,i){var o=Array.isArray,s=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=o(u),h=o(c),d,p,g;if(f&&h){if(p=u.length,p!=c.length)return!1;for(d=p;d--!==0;)if(!a(u[d],c[d]))return!1;return!0}if(f!=h)return!1;var v=u instanceof Date,O=c instanceof Date;if(v!=O)return!1;if(v&&O)return u.getTime()==c.getTime();var m=u instanceof RegExp,y=c instanceof RegExp;if(m!=y)return!1;if(m&&y)return u.toString()==c.toString();var b=s(u);if(p=b.length,p!==s(c).length)return!1;for(d=p;d--!==0;)if(!l.call(c,b[d]))return!1;for(d=p;d--!==0;)if(g=b[d],!a(u[g],c[g]))return!1;return!0}return u!==u&&c!==c}},{}],4:[function(n,r,i){var o=r.exports=function(s,l){if(l||(l=16),s===void 0&&(s=128),s<=0)return"0";for(var a=Math.log(Math.pow(2,s))/Math.log(l),u=2;a===1/0;u*=2)a=Math.log(Math.pow(2,s/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 d=Math.pow(l,c),h=Math.floor(Math.random()*d).toString(l);f=h+f}var p=parseInt(f,l);return p!==1/0&&p>=Math.pow(2,s)?o(s,l):f};o.rack=function(s,l,a){var u=function(f){var h=0;do{if(h++>10)if(a)s+=a;else throw new Error("too many ID collisions, use more bits");var d=o(s,l)}while(Object.hasOwnProperty.call(c,d));return c[d]=f,d},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=s||128,u.base=l||16,u}},{}],5:[function(n,r,i){r.exports=o;function o(s,l,a,u){var c=function(h,d,p,g){l(p,h,d,"left"),l(g,d,h,"right")},f=s.transformX=function(h,d){a(h),a(d);for(var p=[],g=0;g<d.length;g++){for(var v=d[g],O=[],m=0;m<h.length;){var y=[];if(c(h[m],v,O,y),m++,y.length===1)v=y[0];else if(y.length===0){for(var b=m;b<h.length;b++)u(O,h[b]);v=null;break}else{for(var x=f(h.slice(m),y),E=0;E<x[0].length;E++)u(O,x[0][E]);for(var T=0;T<x[1].length;T++)u(p,x[1][T]);v=null;break}}v!=null&&u(p,v),h=O}return[h,p]};s.transform=function(h,d,p){if(!(p==="left"||p==="right"))throw new Error("type must be 'left' or 'right'");return d.length===0?h:h.length===1&&d.length===1?l([],h[0],d[0],p):p==="left"?f(h,d)[0]:f(d,h)[1]}}},{}],6:[function(n,r,i){r.exports={type:n("./json0")}},{"./json0":7}],7:[function(n,r,i){var o=function(p){return Object.prototype.toString.call(p)=="[object Array]"},s=function(p){return!!p&&p.constructor===Object},l=function(p){return JSON.parse(JSON.stringify(p))},a={name:"json0",uri:"http://sharejs.org/types/JSONv0"},u={};a.registerSubtype=function(p){u[p.name]=p},a.create=function(p){return p===void 0?null:l(p)},a.invertComponent=function(p){var g={p:p.p};return p.t&&u[p.t]&&(g.t=p.t,g.o=u[p.t].invert(p.o)),p.si!==void 0&&(g.sd=p.si),p.sd!==void 0&&(g.si=p.sd),p.oi!==void 0&&(g.od=p.oi),p.od!==void 0&&(g.oi=p.od),p.li!==void 0&&(g.ld=p.li),p.ld!==void 0&&(g.li=p.ld),p.na!==void 0&&(g.na=-p.na),p.lm!==void 0&&(g.lm=p.p[p.p.length-1],g.p=p.p.slice(0,p.p.length-1).concat([p.lm])),g},a.invert=function(p){for(var g=p.slice().reverse(),v=[],O=0;O<g.length;O++)v.push(a.invertComponent(g[O]));return v},a.checkValidOp=function(p){for(var g=0;g<p.length;g++)if(!o(p[g].p))throw new Error("Missing path")},a.checkList=function(p){if(!o(p))throw new Error("Referenced element not a list")},a.checkObj=function(p){if(!s(p))throw new Error("Referenced element not an object (it was "+JSON.stringify(p)+")")};function c(p){p.t="text0";var g={p:p.p.pop()};p.si!=null&&(g.i=p.si),p.sd!=null&&(g.d=p.sd),p.o=[g]}function f(p){p.p.push(p.o[0].p),p.o[0].i!=null&&(p.si=p.o[0].i),p.o[0].d!=null&&(p.sd=p.o[0].d),delete p.t,delete p.o}a.apply=function(p,g){a.checkValidOp(g),g=l(g);for(var v={data:p},O=0;O<g.length;O++){var m=g[O];(m.si!=null||m.sd!=null)&&c(m);for(var y=null,b=v,x="data",E=0;E<m.p.length;E++){var T=m.p[E];if(y=b,b=b[x],x=T,y==null)throw new Error("Path invalid")}if(m.t&&m.o!==void 0&&u[m.t])b[x]=u[m.t].apply(b[x],m.o);else if(m.na!==void 0){if(typeof b[x]!="number")throw new Error("Referenced element not a number");b[x]+=m.na}else if(m.li!==void 0&&m.ld!==void 0)a.checkList(b),b[x]=m.li;else if(m.li!==void 0)a.checkList(b),b.splice(x,0,m.li);else if(m.ld!==void 0)a.checkList(b),b.splice(x,1);else if(m.lm!==void 0){if(a.checkList(b),m.lm!=x){var w=b[x];b.splice(x,1),b.splice(m.lm,0,w)}}else if(m.oi!==void 0)a.checkObj(b),b[x]=m.oi;else if(m.od!==void 0)a.checkObj(b),delete b[x];else throw new Error("invalid / missing instruction in op")}return v.data},a.shatter=function(p){for(var g=[],v=0;v<p.length;v++)g.push([p[v]]);return g},a.incrementalApply=function(p,g,v){for(var O=0;O<g.length;O++){var m=[g[O]];p=a.apply(p,m),v(m,p)}return p};var h=a.pathMatches=function(p,g,v){if(p.length!=g.length)return!1;for(var O=0;O<p.length;O++)if(p[O]!==g[O]&&(!v||O!==p.length-1))return!1;return!0};a.append=function(p,g){if(g=l(g),p.length===0){p.push(g);return}var v=p[p.length-1];if((g.si!=null||g.sd!=null)&&(v.si!=null||v.sd!=null)&&(c(g),c(v)),h(g.p,v.p))if(g.t&&v.t&&g.t===v.t&&u[g.t]){if(v.o=u[g.t].compose(v.o,g.o),g.si!=null||g.sd!=null){for(var O=g.p,m=0;m<v.o.length-1;m++)g.o=[v.o.pop()],g.p=O.slice(),f(g),p.push(g);f(v)}}else v.na!=null&&g.na!=null?p[p.length-1]={p:v.p,na:v.na+g.na}:v.li!==void 0&&g.li===void 0&&g.ld===v.li?v.ld!==void 0?delete v.li:p.pop():v.od!==void 0&&v.oi===void 0&&g.oi!==void 0&&g.od===void 0?v.oi=g.oi:v.oi!==void 0&&g.od!==void 0?g.oi!==void 0?v.oi=g.oi:v.od!==void 0?delete v.oi:p.pop():g.lm!==void 0&&g.p[g.p.length-1]===g.lm||p.push(g);else(g.si!=null||g.sd!=null)&&(v.si!=null||v.sd!=null)&&(f(g),f(v)),p.push(g)},a.compose=function(p,g){a.checkValidOp(p),a.checkValidOp(g);for(var v=l(p),O=0;O<g.length;O++)a.append(v,g[O]);return v},a.normalize=function(p){var g=[];p=o(p)?p:[p];for(var v=0;v<p.length;v++){var O=p[v];O.p==null&&(O.p=[]),a.append(g,O)}return g},a.commonLengthForOps=function(p,g){var v=p.p.length,O=g.p.length;if((p.na!=null||p.t)&&v++,(g.na!=null||g.t)&&O++,v===0)return-1;if(O===0)return null;v--,O--;for(var m=0;m<v;m++){var y=p.p[m];if(m>=O||y!==g.p[m])return null}return v},a.canOpAffectPath=function(p,g){return a.commonLengthForOps({p:g},p)!=null},a.transformComponent=function(p,g,v,O){g=l(g);var m=a.commonLengthForOps(v,g),y=a.commonLengthForOps(g,v),b=g.p.length,x=v.p.length;if((g.na!=null||g.t)&&b++,(v.na!=null||v.t)&&x++,y!=null&&x>b&&g.p[y]==v.p[y]){if(g.ld!==void 0){var E=l(v);E.p=E.p.slice(b),g.ld=a.apply(l(g.ld),[E])}else if(g.od!==void 0){var E=l(v);E.p=E.p.slice(b),g.od=a.apply(l(g.od),[E])}}if(m!=null){var T=b==x,E=v;if((g.si!=null||g.sd!=null)&&(v.si!=null||v.sd!=null)&&(c(g),E=l(v),c(E)),E.t&&u[E.t]){if(g.t&&g.t===E.t){var w=u[g.t].transform(g.o,E.o,O);if(g.si!=null||g.sd!=null)for(var k=g.p,C=0;C<w.length;C++)g.o=[w[C]],g.p=k.slice(),f(g),a.append(p,g);else(!o(w)||w.length>0)&&(g.o=w,a.append(p,g));return p}}else if(v.na===void 0){if(v.li!==void 0&&v.ld!==void 0){if(v.p[m]===g.p[m])if(T){if(g.ld!==void 0)if(g.li!==void 0&&O==="left")g.ld=l(v.li);else return p}else return p}else if(v.li!==void 0)g.li!==void 0&&g.ld===void 0&&T&&g.p[m]===v.p[m]?O==="right"&&g.p[m]++:v.p[m]<=g.p[m]&&g.p[m]++,g.lm!==void 0&&T&&v.p[m]<=g.lm&&g.lm++;else if(v.ld!==void 0){if(g.lm!==void 0&&T){if(v.p[m]===g.p[m])return p;var k=v.p[m],Q=g.p[m],D=g.lm;(k<D||k===D&&Q<D)&&g.lm--}if(v.p[m]<g.p[m])g.p[m]--;else if(v.p[m]===g.p[m]){if(x<b)return p;if(g.ld!==void 0)if(g.li!==void 0)delete g.ld;else return p}}else if(v.lm!==void 0)if(g.lm!==void 0&&b===x){var Q=g.p[m],D=g.lm,N=v.p[m],V=v.lm;if(N!==V)if(Q===N)if(O==="left")g.p[m]=V,Q===D&&(g.lm=V);else return p;else Q>N&&g.p[m]--,Q>V?g.p[m]++:Q===V&&N>V&&(g.p[m]++,Q===D&&g.lm++),(D>N||D===N&&D>Q)&&g.lm--,D>V?g.lm++:D===V&&(V>N&&D>Q||V<N&&D<Q?O==="right"&&g.lm++:D>Q?g.lm++:D===N&&g.lm--)}else if(g.li!==void 0&&g.ld===void 0&&T){var Q=v.p[m],D=v.lm;k=g.p[m],k>Q&&g.p[m]--,k>D&&g.p[m]++}else{var Q=v.p[m],D=v.lm;k=g.p[m],k===Q?g.p[m]=D:(k>Q&&g.p[m]--,(k>D||k===D&&Q>D)&&g.p[m]++)}else if(v.oi!==void 0&&v.od!==void 0){if(g.p[m]===v.p[m])if(g.oi!==void 0&&T){if(O==="right")return p;g.od=v.oi}else return p}else if(v.oi!==void 0){if(g.oi!==void 0&&g.p[m]===v.p[m])if(O==="left")a.append(p,{p:g.p,od:v.oi});else return p}else if(v.od!==void 0&&g.p[m]==v.p[m]){if(!T)return p;if(g.oi!==void 0)delete g.od;else return p}}}return a.append(p,g),p},n("./bootstrapTransform")(a,a.transformComponent,a.checkValidOp,a.append);var d=n("./text0");a.registerSubtype(d),r.exports=a},{"./bootstrapTransform":5,"./text0":8}],8:[function(n,r,i){var o=r.exports={name:"text0",uri:"http://sharejs.org/types/textv0",create:function(d){if(d!=null&&typeof d!="string")throw new Error("Initial data must be a string");return d||""}},s=function(d,p,g){return d.slice(0,p)+g+d.slice(p)},l=function(d){if(typeof d.p!="number")throw new Error("component missing position field");if(typeof d.i=="string"==(typeof d.d=="string"))throw new Error("component needs an i or d field");if(d.p<0)throw new Error("position cannot be negative")},a=function(d){for(var p=0;p<d.length;p++)l(d[p])};o.apply=function(d,p){var g;a(p);for(var v=0;v<p.length;v++){var O=p[v];if(O.i!=null)d=s(d,O.p,O.i);else{if(g=d.slice(O.p,O.p+O.d.length),O.d!==g)throw new Error("Delete component '"+O.d+"' does not match deleted text '"+g+"'");d=d.slice(0,O.p)+d.slice(O.p+O.d.length)}}return d};var u=o._append=function(d,p){if(!(p.i===""||p.d===""))if(d.length===0)d.push(p);else{var g=d[d.length-1];g.i!=null&&p.i!=null&&g.p<=p.p&&p.p<=g.p+g.i.length?d[d.length-1]={i:s(g.i,p.p-g.p,p.i),p:g.p}:g.d!=null&&p.d!=null&&p.p<=g.p&&g.p<=p.p+p.d.length?d[d.length-1]={d:s(p.d,g.p-p.p,g.d),p:p.p}:d.push(p)}};o.compose=function(d,p){a(d),a(p);for(var g=d.slice(),v=0;v<p.length;v++)u(g,p[v]);return g},o.normalize=function(d){var p=[];(d.i!=null||d.p!=null)&&(d=[d]);for(var g=0;g<d.length;g++){var v=d[g];v.p==null&&(v.p=0),u(p,v)}return p};var c=function(d,p,g){return p.i!=null?p.p<d||p.p===d&&g?d+p.i.length:d:d<=p.p?d:d<=p.p+p.d.length?p.p:d-p.d.length};o.transformCursor=function(d,p,g){for(var v=g==="right",O=0;O<p.length;O++)d=c(d,p[O],v);return d};var f=o._tc=function(d,p,g,v){if(l(p),l(g),p.i!=null)u(d,{i:p.i,p:c(p.p,g,v==="right")});else if(g.i!=null){var O=p.d;p.p<g.p&&(u(d,{d:O.slice(0,g.p-p.p),p:p.p}),O=O.slice(g.p-p.p)),O!==""&&u(d,{d:O,p:p.p+g.i.length})}else if(p.p>=g.p+g.d.length)u(d,{d:p.d,p:p.p-g.d.length});else if(p.p+p.d.length<=g.p)u(d,p);else{var m={d:"",p:p.p};p.p<g.p&&(m.d=p.d.slice(0,g.p-p.p)),p.p+p.d.length>g.p+g.d.length&&(m.d+=p.d.slice(g.p+g.d.length-p.p));var y=Math.max(p.p,g.p),b=Math.min(p.p+p.d.length,g.p+g.d.length),x=p.d.slice(y-p.p,b-p.p),E=g.d.slice(y-g.p,b-g.p);if(x!==E)throw new Error("Delete ops delete different text in the same region of the document");m.d!==""&&(m.p=c(m.p,g),u(d,m))}return d},h=function(d){return d.i!=null?{d:d.i,p:d.p}:{i:d.d,p:d.p}};o.invert=function(d){d=d.slice().reverse();for(var p=0;p<d.length;p++)d[p]=h(d[p]);return d},n("./bootstrapTransform")(o,f,a,u)},{"./bootstrapTransform":5}],9:[function(n,r,i){var o=r.exports={},s,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"?s=setTimeout:s=a}catch{s=a}try{typeof clearTimeout=="function"?l=clearTimeout:l=u}catch{l=u}})();function c(b){if(s===setTimeout)return setTimeout(b,0);if((s===a||!s)&&setTimeout)return s=setTimeout,setTimeout(b,0);try{return s(b,0)}catch{try{return s.call(null,b,0)}catch{return s.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=[],d=!1,p,g=-1;function v(){!d||!p||(d=!1,p.length?h=p.concat(h):g=-1,h.length&&O())}function O(){if(!d){var b=c(v);d=!0;for(var x=h.length;x;){for(p=h,h=[];++g<x;)p&&p[g].run();g=-1,x=h.length}p=null,d=!1,f(b)}}o.nextTick=function(b){var x=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)x[E-1]=arguments[E];h.push(new m(b,x)),h.length===1&&!d&&c(O)};function m(b,x){this.fun=b,this.array=x}m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function y(){}o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(b){return[]},o.binding=function(b){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(b){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],10:[function(n,r,i){var o=n("./doc"),s=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"),d=n("../message-actions").ACTIONS,p=n("../types"),g=n("../util"),v=n("../logger"),O=n("./presence/doc-presence-emitter"),m=h.CODES;function y(w){return w.readyState===0||w.readyState===1?"connecting":"disconnected"}r.exports=b;function b(w){f.EventEmitter.call(this),this.collections={},this.nextQueryId=1,this.nextSnapshotRequestId=1,this.queries={},this._presences={},this._docPresenceEmitter=new O,this._snapshotRequests={},this.seq=1,this._presenceSeq=1,this.id=null,this.agent=null,this.debug=!1,this.state=y(w),this.bindToSocket(w)}f.mixin(b),b.prototype.bindToSocket=function(w){this.socket&&(this.socket.close(),this.socket.onmessage=null,this.socket.onopen=null,this.socket.onerror=null,this.socket.onclose=null),this.socket=w;var k=y(w);this._setState(k),this.canSend=!1;var C=this;w.onmessage=function(Q){try{var D=typeof Q.data=="string"?JSON.parse(Q.data):Q.data}catch{v.warn("Failed to parse message",Q);return}C.debug&&v.info("RECV",JSON.stringify(D));var N={data:D};if(C.emit("receive",N),!!N.data)try{C.handleMessage(N.data)}catch(V){g.nextTick(function(){C.emit("error",V)})}},w.readyState===1&&C._initializeHandshake(),w.onopen=function(){C._setState("connecting"),C._initializeHandshake()},w.onerror=function(Q){C.emit("connection error",Q)},w.onclose=function(Q){Q==="closed"||Q==="Closed"?C._setState("closed",Q):Q==="stopped"||Q==="Stopped by server"?C._setState("stopped",Q):C._setState("disconnected",Q)}},b.prototype.handleMessage=function(w){var k=null;switch(w.error&&(k=x(w.error,w),delete w.error),w.a){case d.initLegacy:return this._handleLegacyInit(w);case d.handshake:return this._handleHandshake(k,w);case d.queryFetch:var C=this.queries[w.id];C&&C._handleFetch(k,w.data,w.extra);return;case d.querySubscribe:var C=this.queries[w.id];C&&C._handleSubscribe(k,w.data,w.extra);return;case d.queryUnsubscribe:return;case d.queryUpdate:var C=this.queries[w.id];if(!C)return;if(k)return C._handleError(k);w.diff&&C._handleDiff(w.diff),w.hasOwnProperty("extra")&&C._handleExtra(w.extra);return;case d.bulkFetch:return this._handleBulkMessage(k,w,"_handleFetch");case d.bulkSubscribe:case d.bulkUnsubscribe:return this._handleBulkMessage(k,w,"_handleSubscribe");case d.snapshotFetch:case d.snapshotFetchByTimestamp:return this._handleSnapshotFetch(k,w);case d.fetch:var Q=this.getExisting(w.c,w.d);Q&&Q._handleFetch(k,w.data);return;case d.subscribe:case d.unsubscribe:var Q=this.getExisting(w.c,w.d);Q&&Q._handleSubscribe(k,w.data);return;case d.op:var Q=this.getExisting(w.c,w.d);Q&&Q._handleOp(k,w);return;case d.presence:return this._handlePresence(k,w);case d.presenceSubscribe:return this._handlePresenceSubscribe(k,w);case d.presenceUnsubscribe:return this._handlePresenceUnsubscribe(k,w);case d.presenceRequest:return this._handlePresenceRequest(k,w);case d.pingPong:return this._handlePingPong(k);default:v.warn("Ignoring unrecognized message",w)}};function x(w,k){var C=new Error(w.message);return C.code=w.code,k&&(C.data=k),C}b.prototype._handleBulkMessage=function(w,k,C){if(k.data)for(var Q in k.data){var D=k.data[Q],N=this.getExisting(k.c,Q);N&&(w?N[C](w):D.error?N[C](x(D.error)):N[C](null,D))}else if(Array.isArray(k.b))for(var V=0;V<k.b.length;V++){var Q=k.b[V],N=this.getExisting(k.c,Q);N&&N[C](w)}else if(k.b)for(var Q in k.b){var N=this.getExisting(k.c,Q);N&&N[C](w)}else v.error("Invalid bulk message",k)},b.prototype._reset=function(){this.agent=null},b.prototype._setState=function(w,k){if(this.state!==w){if(w==="connecting"&&this.state!=="disconnected"&&this.state!=="stopped"&&this.state!=="closed"||w==="connected"&&this.state!=="connecting"){var C=new h(m.ERR_CONNECTION_STATE_TRANSITION_INVALID,"Cannot transition directly from "+this.state+" to "+w);return this.emit("error",C)}this.state=w,this.canSend=w==="connected",(w==="disconnected"||w==="stopped"||w==="closed")&&this._reset(),this.startBulk();for(var Q in this.queries){var D=this.queries[Q];D._onConnectionStateChanged()}for(var N in this.collections){var V=this.collections[N];for(var Q in V)V[Q]._onConnectionStateChanged()}for(var G in this._presences)this._presences[G]._onConnectionStateChanged();for(var Q in this._snapshotRequests){var M=this._snapshotRequests[Q];M._onConnectionStateChanged()}this.endBulk(),this.emit(w,k),this.emit("state",w,k)}},b.prototype.startBulk=function(){this.bulk||(this.bulk={})},b.prototype.endBulk=function(){if(this.bulk)for(var w in this.bulk){var k=this.bulk[w];this._sendBulk("f",w,k.f),this._sendBulk("s",w,k.s),this._sendBulk("u",w,k.u)}this.bulk=null},b.prototype._sendBulk=function(w,k,C){if(C){var Q=[],D={},N=0,V;for(var G in C){var M=C[G];M==null?Q.push(G):(D[G]=M,V=G,N++)}if(Q.length===1){var G=Q[0];this.send({a:w,c:k,d:G})}else Q.length&&this.send({a:"b"+w,c:k,b:Q});if(N===1){var j=D[V];this.send({a:w,c:k,d:V,v:j})}else N&&this.send({a:"b"+w,c:k,b:D})}},b.prototype._sendActions=function(w,k,C){if(this._addDoc(k),this.bulk){var Q=this.bulk[k.collection]||(this.bulk[k.collection]={}),D=Q[w]||(Q[w]={}),N=D.hasOwnProperty(k.id);return D[k.id]=C,N}else{var V={a:w,c:k.collection,d:k.id,v:C};this.send(V)}},b.prototype.sendFetch=function(w){return this._sendActions(d.fetch,w,w.version)},b.prototype.sendSubscribe=function(w){return this._sendActions(d.subscribe,w,w.version)},b.prototype.sendUnsubscribe=function(w){return this._sendActions(d.unsubscribe,w)},b.prototype.sendOp=function(w,k){this._addDoc(w);var C={a:d.op,c:w.collection,d:w.id,v:w.version,src:k.src,seq:k.seq,x:{}};"op"in k&&(C.op=k.op),k.create&&(C.create=k.create),k.del&&(C.del=k.del),w.submitSource&&(C.x.source=k.source),this.send(C)},b.prototype.send=function(w){this.debug&&v.info("SEND",JSON.stringify(w)),this.emit("send",w),this.socket.send(JSON.stringify(w))},b.prototype.ping=function(){if(!this.canSend)throw new h(m.ERR_CANNOT_PING_OFFLINE,"Socket must be CONNECTED to ping");var w={a:d.pingPong};this.send(w)},b.prototype.close=function(){this.socket.close()},b.prototype.getExisting=function(w,k){if(this.collections[w])return this.collections[w][k]},b.prototype.get=function(w,k){var C=this.collections[w]||(this.collections[w]={}),Q=C[k];return Q||(Q=C[k]=new o(this,w,k),this.emit("doc",Q)),Q._wantsDestroy=!1,Q},b.prototype._destroyDoc=function(w){w._wantsDestroy&&(g.digAndRemove(this.collections,w.collection,w.id),w.emit("destroy"))},b.prototype._addDoc=function(w){var k=this.collections[w.collection];k||(k=this.collections[w.collection]={}),k[w.id]!==w&&(k[w.id]=w)},b.prototype._createQuery=function(w,k,C,Q,D){var N=this.nextQueryId++,V=new s(w,this,N,k,C,Q,D);return this.queries[N]=V,V.send(),V},b.prototype._destroyQuery=function(w){delete this.queries[w.id]},b.prototype.createFetchQuery=function(w,k,C,Q){return this._createQuery(d.queryFetch,w,k,C,Q)},b.prototype.createSubscribeQuery=function(w,k,C,Q){return this._createQuery(d.querySubscribe,w,k,C,Q)},b.prototype.hasPending=function(){return!!(this._firstDoc(E)||this._firstQuery(E)||this._firstSnapshotRequest())};function E(w){return w.hasPending()}b.prototype.hasWritePending=function(){return!!this._firstDoc(T)};function T(w){return w.hasWritePending()}b.prototype.whenNothingPending=function(w){var k=this._firstDoc(E);if(k){k.once("nothing pending",this._nothingPendingRetry(w));return}var C=this._firstQuery(E);if(C){C.once("ready",this._nothingPendingRetry(w));return}var Q=this._firstSnapshotRequest();if(Q){Q.once("ready",this._nothingPendingRetry(w));return}g.nextTick(w)},b.prototype._nothingPendingRetry=function(w){var k=this;return function(){g.nextTick(function(){k.whenNothingPending(w)})}},b.prototype._firstDoc=function(w){for(var k in this.collections){var C=this.collections[k];for(var Q in C){var D=C[Q];if(w(D))return D}}},b.prototype._firstQuery=function(w){for(var k in this.queries){var C=this.queries[k];if(w(C))return C}},b.prototype._firstSnapshotRequest=function(){for(var w in this._snapshotRequests)return this._snapshotRequests[w]},b.prototype.fetchSnapshot=function(w,k,C,Q){typeof C=="function"&&(Q=C,C=null);var D=this.nextSnapshotRequestId++,N=new u(this,D,w,k,C,Q);this._snapshotRequests[N.requestId]=N,N.send()},b.prototype.fetchSnapshotByTimestamp=function(w,k,C,Q){typeof C=="function"&&(Q=C,C=null);var D=this.nextSnapshotRequestId++,N=new c(this,D,w,k,C,Q);this._snapshotRequests[N.requestId]=N,N.send()},b.prototype._handleSnapshotFetch=function(w,k){var C=this._snapshotRequests[k.id];C&&(delete this._snapshotRequests[k.id],C._handleResponse(w,k))},b.prototype._handleLegacyInit=function(w){if(w.protocolMinor)return this._initializeHandshake();this._initialize(w)},b.prototype._initializeHandshake=function(){this.send({a:d.handshake,id:this.id})},b.prototype._handleHandshake=function(w,k){if(w)return this.emit("error",w);this._initialize(k)},b.prototype._handlePingPong=function(w){if(w)return this.emit("error",w);this.emit("pong")},b.prototype._initialize=function(w){if(this.state==="connecting"){if(w.protocol!==1)return this.emit("error",new h(m.ERR_PROTOCOL_VERSION_NOT_SUPPORTED,"Unsupported protocol version: "+w.protocol));if(p.map[w.type]!==p.defaultType)return this.emit("error",new h(m.ERR_DEFAULT_TYPE_MISMATCH,w.type+" does not match the server default type"));if(typeof w.id!="string")return this.emit("error",new h(m.ERR_CLIENT_ID_BADLY_FORMED,"Client id must be a string"));this.id=w.id,this._setState("connected")}},b.prototype.getPresence=function(w){var k=this,C=g.digOrCreate(this._presences,w,function(){return new l(k,w)});return C._wantsDestroy=!1,C},b.prototype.getDocPresence=function(w,k){var C=a.channel(w,k),Q=this,D=g.digOrCreate(this._presences,C,function(){return new a(Q,w,k)});return D._wantsDestroy=!1,D},b.prototype._sendPresenceAction=function(w,k,C){this._addPresence(C);var Q={a:w,ch:C.channel,seq:k};return this.send(Q),Q.seq},b.prototype._addPresence=function(w){g.digOrCreate(this._presences,w.channel,function(){return w})},b.prototype._handlePresenceSubscribe=function(w,k){var C=g.dig(this._presences,k.ch);C&&C._handleSubscribe(w,k.seq)},b.prototype._handlePresenceUnsubscribe=function(w,k){var C=g.dig(this._presences,k.ch);C&&C._handleUnsubscribe(w,k.seq)},b.prototype._handlePresence=function(w,k){var C=g.dig(this._presences,k.ch);C&&C._receiveUpdate(w,k)},b.prototype._handlePresenceRequest=function(w,k){var C=g.dig(this._presences,k.ch);C&&C._broadcastAllLocalPresence(w,k)}},{"../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 o=n("../emitter"),s=n("../logger"),l=n("../error"),a=n("../types"),u=n("../util"),c=u.clone,f=n("fast-deep-equal"),h=n("../message-actions").ACTIONS,d=l.CODES;r.exports=p;function p(m,y,b){o.EventEmitter.call(this),this.connection=m,this.collection=y,this.id=b,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}o.mixin(p),p.prototype.destroy=function(m){this._wantsDestroy=!0;var y=this;y.whenNothingPending(function(){y.wantSubscribe?y.unsubscribe(function(b){if(b)return m?m(b):y.emit("error",b);y.connection._destroyDoc(y),m&&m()}):(y.connection._destroyDoc(y),m&&m())})},p.prototype._setType=function(m){if(typeof m=="string"&&(m=a.map[m]),m)this.type=m;else if(m===null)this.type=m,this._setData(void 0);else{var y=new l(d.ERR_DOC_TYPE_NOT_RECOGNIZED,"Missing type "+m);return this.emit("error",y)}},p.prototype._setData=function(m){this.data=m,this._dataStateVersion++},p.prototype.ingestSnapshot=function(m,y){if(!m)return y&&y();if(typeof m.v!="number"){var b=new l(d.ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION,"Missing version in ingested snapshot. "+this.collection+"."+this.id);return y?y(b):this.emit("error",b)}if(this.type||this.hasWritePending()){if(this.version==null){if(this.hasWritePending())return y&&this.once("no write pending",y);var b=new l(d.ERR_DOC_MISSING_VERSION,"Cannot ingest snapshot in doc with null version. "+this.collection+"."+this.id);return y?y(b):this.emit("error",b)}return m.v>this.version?this.fetch(y):y&&y()}if(this.version>m.v)return y&&y();this.version=m.v;var x=m.type===void 0?a.defaultType:m.type;this._setType(x),this._setData(this.type&&this.type.deserialize?this.type.deserialize(m.data):m.data),this.emit("load"),y&&y()},p.prototype.whenNothingPending=function(m){var y=this;u.nextTick(function(){if(y.hasPending()){y.once("nothing pending",m);return}m()})},p.prototype.hasPending=function(){return!!(this.inflightOp||this.pendingOps.length||this.inflightFetch.length||this.inflightSubscribe||this.pendingFetch.length||this.pendingSubscribe.length)},p.prototype.hasWritePending=function(){return!!(this.inflightOp||this.pendingOps.length)},p.prototype._emitNothingPending=function(){this.hasWritePending()||(this.emit("no write pending"),!this.hasPending()&&this.emit("nothing pending"))},p.prototype._emitResponseError=function(m,y){if(m&&m.code===d.ERR_SNAPSHOT_READ_SILENT_REJECTION){this.wantSubscribe=!1,y&&y(),this._emitNothingPending();return}if(y){y(m),this._emitNothingPending();return}this._emitNothingPending(),this.emit("error",m)},p.prototype._handleFetch=function(m,y){var b=this.pendingFetch;this.pendingFetch=[];var x=this.inflightFetch.shift();if(x&&b.push(x),b.length&&(x=function(E){u.callEach(b,E)}),m)return this._emitResponseError(m,x);this.ingestSnapshot(y,x),this._emitNothingPending()},p.prototype._handleSubscribe=function(m,y){var b=this.inflightSubscribe;this.inflightSubscribe=null;var x=this.pendingFetch;this.pendingFetch=[],b.callback&&x.push(b.callback);var E;if(x.length&&(E=function(T){u.callEach(x,T)}),m)return this._emitResponseError(m,E);this.subscribed=b.wantSubscribe,this.subscribed?this.ingestSnapshot(y,E):E&&E(),this._emitNothingPending(),this._flushSubscribe()},p.prototype._handleOp=function(m,y){if(m)return this.inflightOp?(m.code===d.ERR_OP_SUBMIT_REJECTED&&(m=null),this._rollback(m)):this.emit("error",m);if(this.inflightOp&&y.src===this.inflightOp.src&&y.seq===this.inflightOp.seq){this._opAcknowledged(y);return}if(this.version==null||y.v>this.version){this.fetch();return}if(!(y.v<this.version)){if(this.inflightOp){var b=O(this.inflightOp,y);if(b)return this._hardRollback(b)}for(var x=0;x<this.pendingOps.length;x++){var b=O(this.pendingOps[x],y);if(b)return this._hardRollback(b)}this.version++;try{this._otApply(y,!1)}catch(E){return this._hardRollback(E)}}},p.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))},p.prototype._resubscribe=function(){if(!this.pendingSubscribe.length&&this.wantSubscribe)return this.subscribe();var m=this.pendingSubscribe.some(function(y){return y.wantSubscribe});!m&&this.pendingFetch.length&&this.fetch(),this._flushSubscribe()},p.prototype.fetch=function(m){this._fetch({},m)},p.prototype._fetch=function(m,y){this.pendingFetch.push(y);var b=this.connection.canSend&&(m.force||!this.inflightFetch.length);b&&(this.inflightFetch.push(this.pendingFetch.shift()),this.connection.sendFetch(this))},p.prototype.subscribe=function(m){var y=!0;this._queueSubscribe(y,m)},p.prototype.unsubscribe=function(m){var y=!1;this._queueSubscribe(y,m)},p.prototype._queueSubscribe=function(m,y){var b=this.pendingSubscribe[this.pendingSubscribe.length-1]||this.inflightSubscribe,x=b&&b.wantSubscribe===m;if(x){b.callback=g([b.callback,y]);return}this.pendingSubscribe.push({wantSubscribe:!!m,callback:y}),this._flushSubscribe()},p.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 m=this;u.nextTick(function(){m._handleSubscribe()})}}};function g(m){return m=m.filter(u.truthy),m.length?function(y){u.callEach(m,y)}:null}p.prototype.flush=function(){!this.connection.canSend||this.inflightOp||!this.paused&&this.pendingOps.length&&this._sendOp()};function v(m){delete m.op,delete m.create,delete m.del}function O(m,y){if(m.del)return v(y);if(y.del)return new l(d.ERR_DOC_WAS_DELETED,"Document was deleted");if(y.create)return new l(d.ERR_DOC_ALREADY_CREATED,"Document already created");if("op"in y){if(m.create)return new l(d.ERR_DOC_ALREADY_CREATED,"Document already created");if(m.type.transformX){var b=m.type.transformX(m.op,y.op);m.op=b[0],y.op=b[1]}else{var x=m.type.transform(m.op,y.op,"left"),E=m.type.transform(y.op,m.op,"right");m.op=x,y.op=E}}}p.prototype._otApply=function(m,y){if("op"in m){if(!this.type)throw new l(d.ERR_DOC_DOES_NOT_EXIST,"Cannot apply op to uncreated document. "+this.collection+"."+this.id);if(this.emit("before op batch",m.op,y),!y&&this.type===a.defaultType&&m.op.length>1){this.applyStack||(this.applyStack=[]);for(var b=this.applyStack.length,x=0;x<m.op.length;x++){var E=m.op[x],T={op:[E]};this.emit("before op",T.op,y,m.src);for(var w=b;w<this.applyStack.length;w++){var k=O(this.applyStack[w],T);if(k)return this._hardRollback(k)}this._setData(this.type.apply(this.data,T.op)),this.emit("op",T.op,y,m.src)}this.emit("op batch",m.op,y),this._popApplyStack(b);return}this.emit("before op",m.op,y,m.src),this._setData(this.type.apply(this.data,m.op)),this.emit("op",m.op,y,m.src),this.emit("op batch",m.op,y);return}if(m.create){this._setType(m.create.type),this.type.deserialize?this.type.createDeserialized?this._setData(this.type.createDeserialized(m.create.data)):this._setData(this.type.deserialize(this.type.create(m.create.data))):this._setData(this.type.create(m.create.data)),this.emit("create",y);return}if(m.del){var C=this.data;this._setType(null),this.emit("del",C,y);return}},p.prototype._sendOp=function(){if(this.connection.canSend){var m=this.connection.id;this.inflightOp||(this.inflightOp=this.pendingOps.shift());var y=this.inflightOp;if(!y){var b=new l(d.ERR_INFLIGHT_OP_MISSING,"No op to send on call to _sendOp");return this.emit("error",b)}if(y.sentAt=Date.now(),y.retries=y.retries==null?0:y.retries+1,y.seq==null){if(this.connection.seq>=u.MAX_SAFE_INTEGER)return this.emit("error",new l(d.ERR_CONNECTION_SEQ_INTEGER_OVERFLOW,"Connection seq has exceeded the max safe integer, maybe from being open for too long"));y.seq=this.connection.seq++}this.connection.sendOp(this,y),y.src==null&&(y.src=m)}},p.prototype._submit=function(m,y,b){if(y||(y=!0),"op"in m){if(!this.type){var x=new l(d.ERR_DOC_DOES_NOT_EXIST,"Cannot submit op. Document has not been created. "+this.collection+"."+this.id);return b?b(x):this.emit("error",x)}this.type.normalize&&(m.op=this.type.normalize(m.op))}try{this._pushOp(m,y,b),this._otApply(m,y)}catch(T){return this._hardRollback(T)}var E=this;u.nextTick(function(){E.flush()})},p.prototype._pushOp=function(m,y,b){if(m.source=y,this.applyStack)this.applyStack.push(m);else{var x=this._tryCompose(m);if(x){x.callbacks.push(b);return}}m.type=this.type,m.callbacks=[b],this.pendingOps.push(m)},p.prototype._popApplyStack=function(m){if(m>0){this.applyStack.length=m;return}var y=this.applyStack[0];if(this.applyStack=null,!!y){var b=this.pendingOps.indexOf(y);if(b!==-1)for(var x=this.pendingOps.splice(b),b=0;b<x.length;b++){var y=x[b],E=this._tryCompose(y);E?E.callbacks=E.callbacks.concat(y.callbacks):this.pendingOps.push(y)}}},p.prototype._tryCompose=function(m){if(!this.preventCompose){var y=this.pendingOps[this.pendingOps.length-1];if(!(!y||y.sentAt)&&!(this.submitSource&&!f(m.source,y.source))){if(y.create&&"op"in m)return y.create.data=this.type.apply(y.create.data,m.op),y;if("op"in y&&"op"in m&&this.type.compose)return y.op=this.type.compose(y.op,m.op),y}}},p.prototype.submitOp=function(m,y,b){typeof y=="function"&&(b=y,y=null);var x={op:m},E=y&&y.source;this._submit(x,E,b)},p.prototype.create=function(m,y,b,x){if(typeof y=="function"?(x=y,b=null,y=null):typeof b=="function"&&(x=b,b=null),y||(y=a.defaultType.uri),this.type){var E=new l(d.ERR_DOC_ALREADY_CREATED,"Document already exists");return x?x(E):this.emit("error",E)}var T={create:{type:y,data:m}},w=b&&b.source;this._submit(T,w,x)},p.prototype.del=function(m,y){if(typeof m=="function"&&(y=m,m=null),!this.type){var b=new l(d.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");return y?y(b):this.emit("error",b)}var x={del:!0},E=m&&m.source;this._submit(x,E,y)},p.prototype.pause=function(){this.paused=!0},p.prototype.resume=function(){this.paused=!1,this.flush()},p.prototype.toSnapshot=function(){return{v:this.version,data:c(this.data),type:this.type.uri}},p.prototype._opAcknowledged=function(m){if(this.inflightOp.create)this.version=m.v;else if(m.v!==this.version)return s.warn("Invalid version from server. Expected: "+this.version+" Received: "+m.v,m),this.fetch();if(m[h.fixup])for(var y=0;y<m[h.fixup].length;y++){for(var b=m[h.fixup][y],x=0;x<this.pendingOps.length;x++){var E=O(this.pendingOps[y],b);if(E)return this._hardRollback(E)}try{this._otApply(b,!1)}catch(T){return this._hardRollback(T)}}this.version++,this._clearInflightOp()},p.prototype._rollback=function(m){var y=this.inflightOp;if("op"in y&&y.type.invert){try{y.op=y.type.invert(y.op)}catch{return this._hardRollback(m)}for(var b=0;b<this.pendingOps.length;b++){var x=O(this.pendingOps[b],y);if(x)return this._hardRollback(x)}try{this._otApply(y,!1)}catch(E){return this._hardRollback(E)}this._clearInflightOp(m);return}this._hardRollback(m)},p.prototype._hardRollback=function(m){var y=[];this.inflightOp&&y.push(this.inflightOp),y=y.concat(this.pendingOps),this._setType(null),this.version=null,this.inflightOp=null,this.pendingOps=[];var b=this;this._fetch({force:!0},function(){for(var x=!!y.length,E=0;E<y.length;E++)x=u.callEach(y[E].callbacks,m)&&x;if(m&&!x)return b.emit("error",m)})},p.prototype._clearInflightOp=function(m){var y=this.inflightOp;this.inflightOp=null;var b=u.callEach(y.callbacks,m);if(this.flush(),this._emitNothingPending(),m&&!b)return this.emit("error",m)}},{"../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 o=n("../../util"),s=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=o.dig(this._emitters,u.collection,u.id);h.on(c,f)},a.prototype.removeEventListener=function(u,c,f){var h=o.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(o.digOrCreate(this._docs,u.collection,u.id,function(){return c=!1,u}),!c){var f=o.digOrCreate(this._emitters,u.collection,u.id,function(){var d=new s;return d.setMaxListeners(1e3),d}),h=this;l.forEach(function(d){var p=o.digOrCreate(h._forwarders,u.collection,u.id,d,function(){return f.emit.bind(f,d)});u.on(d,p)}),this.addEventListener(u,"destroy",this._unregisterDoc.bind(this,u))}},a.prototype._unregisterDoc=function(u){var c=o.dig(this._forwarders,u.collection,u.id);for(var f in c)u.off(f,c[f]);var h=o.dig(this._emitters,u.collection,u.id);h.removeAllListeners(),o.digAndRemove(this._forwarders,u.collection,u.id),o.digAndRemove(this._emitters,u.collection,u.id),o.digAndRemove(this._docs,u.collection,u.id)}},{"../../util":32,events:2}],14:[function(n,r,i){var o=n("./presence"),s=n("./local-doc-presence"),l=n("./remote-doc-presence");function a(u,c,f){var h=a.channel(c,f);o.call(this,u,h),this.collection=c,this.id=f}r.exports=a,a.prototype=Object.create(o.prototype),a.channel=function(u,c){return u+"."+c},a.prototype._createLocalPresence=function(u){return new s(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 o=n("./local-presence"),s=n("../../error"),l=n("../../util"),a=s.CODES;r.exports=u;function u(c,f){o.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(o.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,o.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),o.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,d=this._doc._dataStateVersion;this._pendingMessages.forEach(function(p){var g=h._docDataVersionByPresenceVersion[p.pv];if(!(g>=d))try{p.p=h._transformPresence(p.p,c,f),h._docDataVersionByPresenceVersion[p.pv]=d}catch(O){var v=h._getCallback(p.pv);h._callbackOrEmit(O,v)}});try{this.value=this._transformPresence(this.value,c,f)}catch(p){this.emit("error",p)}},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=o.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 d=this._doc.type;if(!l.supportsPresence(d))throw new s(a.ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE,"Type does not support presence: "+d.name);return d.transformPresence(c,f,h)}},{"../../error":25,"../../util":32,"./local-presence":16}],16:[function(n,r,i){var o=n("../../emitter"),s=n("../../message-actions").ACTIONS,l=n("../../util");r.exports=a;function a(u,c){if(o.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={}}o.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:s.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 o=n("../../emitter"),s=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(d,p){if(o.EventEmitter.call(this),!p||typeof p!="string")throw new Error("Presence channel must be provided");this.connection=d,this.channel=p,this.wantSubscribe=!1,this.subscribed=!1,this.remotePresences={},this.localPresences={},this._remotePresenceInstances={},this._subscriptionCallbacksBySeq={},this._wantsDestroy=!1}o.mixin(h),h.prototype.subscribe=function(d){this._sendSubscriptionAction(!0,d)},h.prototype.unsubscribe=function(d){this._sendSubscriptionAction(!1,d)},h.prototype.create=function(d){if(this._wantsDestroy)throw new Error("Presence is being destroyed");d=d||c();var p=this._createLocalPresence(d);return this.localPresences[d]=p,p},h.prototype.destroy=function(d){this._wantsDestroy=!0;var p=this,g=Object.keys(p.localPresences);this.unsubscribe(function(v){if(v)return p._callbackOrEmit(v,d);var O=Object.keys(p._remotePresenceInstances);u.parallel([function(m){u.each(g,function(y,b){p.localPresences[y].destroy(b)},m)},function(m){if(!p._wantsDestroy)return m();u.each(O,function(y,b){p._remotePresenceInstances[y].destroy(b)},m)}],function(m){p._wantsDestroy&&delete p.connection._presences[p.channel],p._callbackOrEmit(m,d)})})},h.prototype._sendSubscriptionAction=function(d,p){this.wantSubscribe=!!d;var g=this.wantSubscribe?f.presenceSubscribe:f.presenceUnsubscribe,v=this.connection._presenceSeq++;this._subscriptionCallbacksBySeq[v]=p,this.connection.canSend&&this.connection._sendPresenceAction(g,v,this)},h.prototype._handleSubscribe=function(d,p){this.wantSubscribe&&(this.subscribed=!0);var g=this._subscriptionCallback(p);this._callbackOrEmit(d,g)},h.prototype._handleUnsubscribe=function(d,p){this.subscribed=!1;var g=this._subscriptionCallback(p);this._callbackOrEmit(d,g)},h.prototype._receiveUpdate=function(d,p){var g=a.dig(this.localPresences,p.id);if(g)return g._ack(d,p.pv);if(d)return this.emit("error",d);var v=this,O=a.digOrCreate(this._remotePresenceInstances,p.id,function(){return v._createRemotePresence(p.id)});O.receiveUpdate(p)},h.prototype._updateRemotePresence=function(d){this.remotePresences[d.presenceId]=d.value,d.value===null&&this._removeRemotePresence(d.presenceId),this.emit("receive",d.presenceId,d.value)},h.prototype._broadcastAllLocalPresence=function(d){if(d)return this.emit("error",d);for(var p in this.localPresences){var g=this.localPresences[p];g.value!==null&&g.send()}},h.prototype._removeRemotePresence=function(d){this._remotePresenceInstances[d].destroy(),delete this._remotePresenceInstances[d],delete this.remotePresences[d]},h.prototype._onConnectionStateChanged=function(){if(this.connection.canSend){this._resubscribe();for(var d in this.localPresences)this.localPresences[d]._sendPending()}},h.prototype._resubscribe=function(){var d=[];for(var p in this._subscriptionCallbacksBySeq){var g=this._subscriptionCallback(p);d.push(g)}if(!this.wantSubscribe)return this._callEachOrEmit(d);var v=this;this.subscribe(function(O){v._callEachOrEmit(d,O)})},h.prototype._subscriptionCallback=function(d){var p=this._subscriptionCallbacksBySeq[d];return delete this._subscriptionCallbacksBySeq[d],p},h.prototype._callbackOrEmit=function(d,p){if(p)return a.nextTick(p,d);d&&this.emit("error",d)},h.prototype._createLocalPresence=function(d){return new s(this,d)},h.prototype._createRemotePresence=function(d){return new l(this,d)},h.prototype._callEachOrEmit=function(d,p){var g=a.callEach(d,p);!g&&p&&this.emit("error",p)}},{"../../emitter":24,"../../message-actions":28,"../../util":32,"./local-presence":16,"./remote-presence":19,async:1,hat:4}],18:[function(n,r,i){var o=n("./remote-presence"),s=n("../../ot");r.exports=l;function l(a,u){o.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(o.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),o.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()},o.prototype._handleCreateDel=function(){this._cacheOp(null),this._setPendingPresence()},o.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++):s.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 o=n("../../util");r.exports=s;function s(l,a){this.presence=l,this.presenceId=a,this.connection=this.presence.connection,this.value=null,this.presenceVersion=0}s.prototype.receiveUpdate=function(l){l.pv<this.presenceVersion||(this.value=l.p,this.presenceVersion=l.pv,this.presence._updateRemotePresence(this))},s.prototype.destroy=function(l){delete this.presence._remotePresenceInstances[this.presenceId],delete this.presence.remotePresences[this.presenceId],l&&o.nextTick(l)}},{"../../util":32}],20:[function(n,r,i){var o=n("../emitter"),s=n("../message-actions").ACTIONS,l=n("../util");r.exports=a;function a(u,c,f,h,d,p,g){o.EventEmitter.call(this),this.action=u,this.connection=c,this.id=f,this.collection=h,this.query=d,this.results=null,p&&p.results&&(this.results=p.results,delete p.results),this.extra=void 0,this.options=p,this.callback=g,this.ready=!1,this.sent=!1}o.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===s.querySubscribe&&this.connection.send({a:s.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 d=this,p=1,g=function(y){if(y)return d._finishResponse(y,h);--p||d._finishResponse(null,h)};if(Array.isArray(c))p+=c.length,this.results=this._ingestSnapshots(c,g),this.extra=f;else for(var v in c){p++;var O=c[v],m=this.connection.get(O.c||this.collection,v);m.ingestSnapshot(O,g)}g()},a.prototype._ingestSnapshots=function(u,c){for(var f=[],h=0;h<u.length;h++){var d=u[h],p=this.connection.get(d.c||this.collection,d.d);p.ingestSnapshot(d,c),f.push(p)}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 p=f.howMany||1,d=this.results.splice(f.index,p);this.emit("remove",d,f.index);break;case"move":var p=f.howMany||1,g=this.results.splice(f.from,p);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 o=n("../../snapshot"),s=n("../../emitter");r.exports=l;function l(a,u,c,f,h){if(s.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}s.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 o(this.id,u.v,u.type,u.data,c);this.callback(null,f)}},{"../../emitter":24,"../../snapshot":30}],22:[function(n,r,i){var o=n("./snapshot-request"),s=n("../../util"),l=n("../../message-actions").ACTIONS;r.exports=a;function a(u,c,f,h,d,p){if(o.call(this,u,c,f,h,p),!s.isValidTimestamp(d))throw new Error("Snapshot timestamp must be a positive integer or null");this.timestamp=d}a.prototype=Object.create(o.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 o=n("./snapshot-request"),s=n("../../util"),l=n("../../message-actions").ACTIONS;r.exports=a;function a(u,c,f,h,d,p){if(o.call(this,u,c,f,h,p),!s.isValidVersion(d))throw new Error("Snapshot version must be a positive integer or null");this.version=d}a.prototype=Object.create(o.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 o=n("events").EventEmitter;i.EventEmitter=o,i.mixin=s;function s(l){for(var a in o.prototype)l.prototype[a]=o.prototype[a]}},{events:2}],25:[function(n,r,i){function o(s,l){this.code=s,this.message=l||"",Error.captureStackTrace?Error.captureStackTrace(this,o):this.stack=new Error().stack}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.prototype.name="ShareDBError",o.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=o},{}],26:[function(n,r,i){var o=n("./logger"),s=new o;r.exports=s},{"./logger":27}],27:[function(n,r,i){var o=["info","warn","error"];function s(){var l={};o.forEach(function(a){l[a]=console[a].bind(console)}),this.setMethods(l)}r.exports=s,s.prototype.setMethods=function(l){l=l||{};var a=this;o.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 o=n("./types"),s=n("./error"),l=n("./util"),a=s.CODES;i.checkOp=function(f){if(f==null||typeof f!="object")return new s(a.ERR_OT_OP_BADLY_FORMED,"Op must be an object");if(f.create!=null){if(typeof f.create!="object")return new s(a.ERR_OT_OP_BADLY_FORMED,"Create data must be an object");var h=f.create.type;if(typeof h!="string")return new s(a.ERR_OT_OP_BADLY_FORMED,"Missing create type");var d=o.map[h];if(d==null||typeof d!="object")return new s(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type")}else if(f.del!=null){if(f.del!==!0)return new s(a.ERR_OT_OP_BADLY_FORMED,"del value must be true")}else if(!("op"in f))return new s(a.ERR_OT_OP_BADLY_FORMED,"Missing op, create, or del");if(f.src!=null&&typeof f.src!="string")return new s(a.ERR_OT_OP_BADLY_FORMED,"src must be a string");if(f.seq!=null&&typeof f.seq!="number")return new s(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 s(a.ERR_OT_OP_BADLY_FORMED,"Both src and seq must be set together");if(f.m!=null&&typeof f.m!="object")return new s(a.ERR_OT_OP_BADLY_FORMED,"op.m must be an object or null")},i.normalizeType=function(f){return o.map[f]&&o.map[f].uri},i.apply=function(f,h){if(typeof f!="object")return new s(a.ERR_APPLY_SNAPSHOT_NOT_PROVIDED,"Missing snapshot");if(f.v!=null&&h.v!=null&&f.v!==h.v)return new s(a.ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT,"Version mismatch");if(h.create){if(f.type)return new s(a.ERR_DOC_ALREADY_CREATED,"Document already exists");var d=h.create,p=o.map[d.type];if(!p)return new s(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{f.data=p.create(d.data),f.type=p.uri,f.v++}catch(v){return v}}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 s(a.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");if(h===void 0)return new s(a.ERR_OT_OP_NOT_PROVIDED,"Missing op");var d=o.map[f.type];if(!d)return new s(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{f.data=d.apply(f.data,h)}catch(p){return new s(a.ERR_OT_OP_NOT_APPLIED,p.message)}}i.transform=function(f,h,d){if(h.v!=null&&h.v!==d.v)return new s(a.ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM,"Version mismatch");if(d.del){if(h.create||"op"in h)return new s(a.ERR_DOC_WAS_DELETED,"Document was deleted")}else{if(d.create&&("op"in h||h.create||h.del)||"op"in d&&h.create)return new s(a.ERR_DOC_ALREADY_CREATED,"Document was created remotely");if("op"in d&&"op"in h){if(!f)return new s(a.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");if(typeof f=="string"&&(f=o.map[f],!f))return new s(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{h.op=f.transform(h.op,d.op,"left")}catch(p){return p}}}h.v!=null&&h.v++},i.applyOps=function(f,h,d){d=d||{};for(var p=0;p<h.length;p++){var g=h[p];if(d._normalizeLegacyJson0Ops)try{c(f,g)}catch{return new s(a.ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED,"Cannot normalize legacy json0 op")}f.v=g.v;var v=i.apply(f,g);if(v)return v}},i.transformPresence=function(f,h,d){var p=this.checkOp(h);if(p)return p;var g=f.t;if(typeof g=="string"&&(g=o.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,d)}catch(v){return{code:a.ERR_PRESENCE_TRANSFORM_FAILED,message:v.message||v}}f.v++};function c(f,h){if(f.type===o.defaultType.uri){var d=h.op;if(d){var p=f.data;d.length>1&&(p=l.clone(p));for(var g=0;g<d.length;g++){var v=d[g];typeof v.lm=="string"&&(v.lm=+v.lm);for(var O=v.p,m=p,y=0;y<O.length;y++){var b=O[y];Object.prototype.toString.call(m)=="[object Array]"?O[y]=+b:m.constructor===Object&&(O[y]=b.toString()),m=m[b]}g<d.length-1&&(p=o.defaultType.apply(p,[v]))}}}}},{"./error":25,"./types":31,"./util":32}],30:[function(n,r,i){r.exports=o;function o(s,l,a,u,c){this.id=s,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(o){o.name&&(i.map[o.name]=o),o.uri&&(i.map[o.uri]=o)},i.register(i.defaultType)},{"ot-json0":6}],32:[function(n,r,i){(function(o){(function(){i.doNothing=s;function s(){}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 o<"u"&&o.nextTick)return o.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(o,s){(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(d){d.close()};function h(d,p){this._id=d,this._clearFn=p}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(d,p){clearTimeout(d._idleTimeoutId),d._idleTimeout=p},i.unenroll=function(d){clearTimeout(d._idleTimeoutId),d._idleTimeout=-1},i._unrefActive=i.active=function(d){clearTimeout(d._idleTimeoutId);var p=d._idleTimeout;p>=0&&(d._idleTimeoutId=setTimeout(function(){d._onTimeout&&d._onTimeout()},p))},i.setImmediate=typeof o=="function"?o:function(d){var p=f++,g=arguments.length<2?!1:u.call(arguments,1);return c[p]=!0,l(function(){c[p]&&(g?d.apply(null,g):d.call(null),i.clearImmediate(p))}),p},i.clearImmediate=typeof s=="function"?s:function(d){delete c[d]}}).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)})})($C);var wM=$C.exports;const _C=Uo(wM);var TC={exports:{}};(function(t,e){(function(n){t.exports=n()})(function(){return function(){function n(r,i,o){function s(u,c){if(!i[u]){if(!r[u]){var f=typeof Po=="function"&&Po;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 d=i[u]={exports:{}};r[u][0].call(d.exports,function(p){var g=r[u][1][p];return s(g||p)},d,d.exports,n,r,i,o)}return i[u].exports}for(var l=typeof Po=="function"&&Po,a=0;a<o.length;a++)s(o[a]);return s}return n}()({1:[function(n,r,i){(function(o){(function(){var s=n("object-assign");/*!
41
- * The buffer module from node.js, for the browser.
42
- *
43
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
44
- * @license MIT
45
- */function l(M,j){if(M===j)return 0;for(var A=M.length,X=j.length,z=0,pe=Math.min(A,X);z<pe;++z)if(M[z]!==j[z]){A=M[z],X=j[z];break}return A<X?-1:X<A?1:0}function a(M){return o.Buffer&&typeof o.Buffer.isBuffer=="function"?o.Buffer.isBuffer(M):!!(M!=null&&M._isBuffer)}var u=n("util/"),c=Object.prototype.hasOwnProperty,f=Array.prototype.slice,h=function(){return(function(){}).name==="foo"}();function d(M){return Object.prototype.toString.call(M)}function p(M){return a(M)||typeof o.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(M):M?!!(M instanceof DataView||M.buffer&&M.buffer instanceof ArrayBuffer):!1}var g=r.exports=E,v=/\s*function\s+([^\(\s]*)\s*/;function O(M){if(u.isFunction(M)){if(h)return M.name;var j=M.toString(),A=j.match(v);return A&&A[1]}}g.AssertionError=function(j){this.name="AssertionError",this.actual=j.actual,this.expected=j.expected,this.operator=j.operator,j.message?(this.message=j.message,this.generatedMessage=!1):(this.message=b(this),this.generatedMessage=!0);var A=j.stackStartFunction||x;if(Error.captureStackTrace)Error.captureStackTrace(this,A);else{var X=new Error;if(X.stack){var z=X.stack,pe=O(A),ae=z.indexOf(`
46
- `+pe);if(ae>=0){var B=z.indexOf(`
47
- `,ae+1);z=z.substring(B+1)}this.stack=z}}},u.inherits(g.AssertionError,Error);function m(M,j){return typeof M=="string"?M.length<j?M:M.slice(0,j):M}function y(M){if(h||!u.isFunction(M))return u.inspect(M);var j=O(M),A=j?": "+j:"";return"[Function"+A+"]"}function b(M){return m(y(M.actual),128)+" "+M.operator+" "+m(y(M.expected),128)}function x(M,j,A,X,z){throw new g.AssertionError({message:A,actual:M,expected:j,operator:X,stackStartFunction:z})}g.fail=x;function E(M,j){M||x(M,!0,j,"==",g.ok)}g.ok=E,g.equal=function(j,A,X){j!=A&&x(j,A,X,"==",g.equal)},g.notEqual=function(j,A,X){j==A&&x(j,A,X,"!=",g.notEqual)},g.deepEqual=function(j,A,X){T(j,A,!1)||x(j,A,X,"deepEqual",g.deepEqual)},g.deepStrictEqual=function(j,A,X){T(j,A,!0)||x(j,A,X,"deepStrictEqual",g.deepStrictEqual)};function T(M,j,A,X){if(M===j)return!0;if(a(M)&&a(j))return l(M,j)===0;if(u.isDate(M)&&u.isDate(j))return M.getTime()===j.getTime();if(u.isRegExp(M)&&u.isRegExp(j))return M.source===j.source&&M.global===j.global&&M.multiline===j.multiline&&M.lastIndex===j.lastIndex&&M.ignoreCase===j.ignoreCase;if((M===null||typeof M!="object")&&(j===null||typeof j!="object"))return A?M===j:M==j;if(p(M)&&p(j)&&d(M)===d(j)&&!(M instanceof Float32Array||M instanceof Float64Array))return l(new Uint8Array(M.buffer),new Uint8Array(j.buffer))===0;if(a(M)!==a(j))return!1;X=X||{actual:[],expected:[]};var z=X.actual.indexOf(M);return z!==-1&&z===X.expected.indexOf(j)?!0:(X.actual.push(M),X.expected.push(j),k(M,j,A,X))}function w(M){return Object.prototype.toString.call(M)=="[object Arguments]"}function k(M,j,A,X){if(M==null||j===null||j===void 0)return!1;if(u.isPrimitive(M)||u.isPrimitive(j))return M===j;if(A&&Object.getPrototypeOf(M)!==Object.getPrototypeOf(j))return!1;var z=w(M),pe=w(j);if(z&&!pe||!z&&pe)return!1;if(z)return M=f.call(M),j=f.call(j),T(M,j,A);var ae=G(M),B=G(j),q,te;if(ae.length!==B.length)return!1;for(ae.sort(),B.sort(),te=ae.length-1;te>=0;te--)if(ae[te]!==B[te])return!1;for(te=ae.length-1;te>=0;te--)if(q=ae[te],!T(M[q],j[q],A,X))return!1;return!0}g.notDeepEqual=function(j,A,X){T(j,A,!1)&&x(j,A,X,"notDeepEqual",g.notDeepEqual)},g.notDeepStrictEqual=C;function C(M,j,A){T(M,j,!0)&&x(M,j,A,"notDeepStrictEqual",C)}g.strictEqual=function(j,A,X){j!==A&&x(j,A,X,"===",g.strictEqual)},g.notStrictEqual=function(j,A,X){j===A&&x(j,A,X,"!==",g.notStrictEqual)};function Q(M,j){if(!M||!j)return!1;if(Object.prototype.toString.call(j)=="[object RegExp]")return j.test(M);try{if(M instanceof j)return!0}catch{}return Error.isPrototypeOf(j)?!1:j.call({},M)===!0}function D(M){var j;try{M()}catch(A){j=A}return j}function N(M,j,A,X){var z;if(typeof j!="function")throw new TypeError('"block" argument must be a function');typeof A=="string"&&(X=A,A=null),z=D(j),X=(A&&A.name?" ("+A.name+").":".")+(X?" "+X:"."),M&&!z&&x(z,A,"Missing expected exception"+X);var pe=typeof X=="string",ae=!M&&u.isError(z),B=!M&&z&&!A;if((ae&&pe&&Q(z,A)||B)&&x(z,A,"Got unwanted exception"+X),M&&z&&A&&!Q(z,A)||!M&&z)throw z}g.throws=function(M,j,A){N(!0,M,j,A)},g.doesNotThrow=function(M,j,A){N(!1,M,j,A)},g.ifError=function(M){if(M)throw M};function V(M,j){M||x(M,!0,j,"==",V)}g.strict=s(V,g,{equal:g.strictEqual,deepEqual:g.deepStrictEqual,notEqual:g.notStrictEqual,notDeepEqual:g.notDeepStrictEqual}),g.strict.strict=g.strict;var G=Object.keys||function(M){var j=[];for(var A in M)c.call(M,A)&&j.push(A);return j}}).call(this)}).call(this,typeof $r<"u"?$r:typeof self<"u"?self:typeof window<"u"?window:{})},{"object-assign":22,"util/":4}],2:[function(n,r,i){typeof Object.create=="function"?r.exports=function(s,l){s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:r.exports=function(s,l){s.super_=l;var a=function(){};a.prototype=l.prototype,s.prototype=new a,s.prototype.constructor=s}},{}],3:[function(n,r,i){r.exports=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}},{}],4:[function(n,r,i){(function(o,s){(function(){var l=/%[sdj%]/g;i.format=function(B){if(!k(B)){for(var q=[],te=0;te<arguments.length;te++)q.push(c(arguments[te]));return q.join(" ")}for(var te=1,we=arguments,F=we.length,W=String(B).replace(l,function(fe){if(fe==="%%")return"%";if(te>=F)return fe;switch(fe){case"%s":return String(we[te++]);case"%d":return Number(we[te++]);case"%j":try{return JSON.stringify(we[te++])}catch{return"[Circular]"}default:return fe}}),Y=we[te];te<F;Y=we[++te])E(Y)||!N(Y)?W+=" "+Y:W+=" "+c(Y);return W},i.deprecate=function(B,q){if(Q(s.process))return function(){return i.deprecate(B,q).apply(this,arguments)};if(o.noDeprecation===!0)return B;var te=!1;function we(){if(!te){if(o.throwDeprecation)throw new Error(q);o.traceDeprecation?console.trace(q):console.error(q),te=!0}return B.apply(this,arguments)}return we};var a={},u;i.debuglog=function(B){if(Q(u)&&(u={}.NODE_DEBUG||""),B=B.toUpperCase(),!a[B])if(new RegExp("\\b"+B+"\\b","i").test(u)){var q=o.pid;a[B]=function(){var te=i.format.apply(i,arguments);console.error("%s %d: %s",B,q,te)}}else a[B]=function(){};return a[B]};function c(B,q){var te={seen:[],stylize:h};return arguments.length>=3&&(te.depth=arguments[2]),arguments.length>=4&&(te.colors=arguments[3]),x(q)?te.showHidden=q:q&&i._extend(te,q),Q(te.showHidden)&&(te.showHidden=!1),Q(te.depth)&&(te.depth=2),Q(te.colors)&&(te.colors=!1),Q(te.customInspect)&&(te.customInspect=!0),te.colors&&(te.stylize=f),p(te,B,te.depth)}i.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function f(B,q){var te=c.styles[q];return te?"\x1B["+c.colors[te][0]+"m"+B+"\x1B["+c.colors[te][1]+"m":B}function h(B,q){return B}function d(B){var q={};return B.forEach(function(te,we){q[te]=!0}),q}function p(B,q,te){if(B.customInspect&&q&&M(q.inspect)&&q.inspect!==i.inspect&&!(q.constructor&&q.constructor.prototype===q)){var we=q.inspect(te,B);return k(we)||(we=p(B,we,te)),we}var F=g(B,q);if(F)return F;var W=Object.keys(q),Y=d(W);if(B.showHidden&&(W=Object.getOwnPropertyNames(q)),G(q)&&(W.indexOf("message")>=0||W.indexOf("description")>=0))return v(q);if(W.length===0){if(M(q)){var fe=q.name?": "+q.name:"";return B.stylize("[Function"+fe+"]","special")}if(D(q))return B.stylize(RegExp.prototype.toString.call(q),"regexp");if(V(q))return B.stylize(Date.prototype.toString.call(q),"date");if(G(q))return v(q)}var Se="",Be=!1,Ie=["{","}"];if(b(q)&&(Be=!0,Ie=["[","]"]),M(q)){var je=q.name?": "+q.name:"";Se=" [Function"+je+"]"}if(D(q)&&(Se=" "+RegExp.prototype.toString.call(q)),V(q)&&(Se=" "+Date.prototype.toUTCString.call(q)),G(q)&&(Se=" "+v(q)),W.length===0&&(!Be||q.length==0))return Ie[0]+Se+Ie[1];if(te<0)return D(q)?B.stylize(RegExp.prototype.toString.call(q),"regexp"):B.stylize("[Object]","special");B.seen.push(q);var ie;return Be?ie=O(B,q,te,Y,W):ie=W.map(function(lt){return m(B,q,te,Y,lt,Be)}),B.seen.pop(),y(ie,Se,Ie)}function g(B,q){if(Q(q))return B.stylize("undefined","undefined");if(k(q)){var te="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(te,"string")}if(w(q))return B.stylize(""+q,"number");if(x(q))return B.stylize(""+q,"boolean");if(E(q))return B.stylize("null","null")}function v(B){return"["+Error.prototype.toString.call(B)+"]"}function O(B,q,te,we,F){for(var W=[],Y=0,fe=q.length;Y<fe;++Y)ae(q,String(Y))?W.push(m(B,q,te,we,String(Y),!0)):W.push("");return F.forEach(function(Se){Se.match(/^\d+$/)||W.push(m(B,q,te,we,Se,!0))}),W}function m(B,q,te,we,F,W){var Y,fe,Se;if(Se=Object.getOwnPropertyDescriptor(q,F)||{value:q[F]},Se.get?Se.set?fe=B.stylize("[Getter/Setter]","special"):fe=B.stylize("[Getter]","special"):Se.set&&(fe=B.stylize("[Setter]","special")),ae(we,F)||(Y="["+F+"]"),fe||(B.seen.indexOf(Se.value)<0?(E(te)?fe=p(B,Se.value,null):fe=p(B,Se.value,te-1),fe.indexOf(`
48
- `)>-1&&(W?fe=fe.split(`
49
- `).map(function(Be){return" "+Be}).join(`
50
- `).substr(2):fe=`
51
- `+fe.split(`
52
- `).map(function(Be){return" "+Be}).join(`
53
- `))):fe=B.stylize("[Circular]","special")),Q(Y)){if(W&&F.match(/^\d+$/))return fe;Y=JSON.stringify(""+F),Y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Y=Y.substr(1,Y.length-2),Y=B.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=B.stylize(Y,"string"))}return Y+": "+fe}function y(B,q,te){var we=B.reduce(function(F,W){return W.indexOf(`
54
- `)>=0,F+W.replace(/\u001b\[\d\d?m/g,"").length+1},0);return we>60?te[0]+(q===""?"":q+`
55
- `)+" "+B.join(`,
56
- `)+" "+te[1]:te[0]+q+" "+B.join(", ")+" "+te[1]}function b(B){return Array.isArray(B)}i.isArray=b;function x(B){return typeof B=="boolean"}i.isBoolean=x;function E(B){return B===null}i.isNull=E;function T(B){return B==null}i.isNullOrUndefined=T;function w(B){return typeof B=="number"}i.isNumber=w;function k(B){return typeof B=="string"}i.isString=k;function C(B){return typeof B=="symbol"}i.isSymbol=C;function Q(B){return B===void 0}i.isUndefined=Q;function D(B){return N(B)&&A(B)==="[object RegExp]"}i.isRegExp=D;function N(B){return typeof B=="object"&&B!==null}i.isObject=N;function V(B){return N(B)&&A(B)==="[object Date]"}i.isDate=V;function G(B){return N(B)&&(A(B)==="[object Error]"||B instanceof Error)}i.isError=G;function M(B){return typeof B=="function"}i.isFunction=M;function j(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}i.isPrimitive=j,i.isBuffer=n("./support/isBuffer");function A(B){return Object.prototype.toString.call(B)}function X(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(){var B=new Date,q=[X(B.getHours()),X(B.getMinutes()),X(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],q].join(" ")}i.log=function(){console.log("%s - %s",pe(),i.format.apply(i,arguments))},i.inherits=n("inherits"),i._extend=function(B,q){if(!q||!N(q))return B;for(var te=Object.keys(q),we=te.length;we--;)B[te[we]]=q[te[we]];return B};function ae(B,q){return Object.prototype.hasOwnProperty.call(B,q)}}).call(this)}).call(this,n("_process"),typeof $r<"u"?$r:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":3,_process:33,inherits:2}],5:[function(n,r,i){(function(o){(function(){var s=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],l=typeof globalThis>"u"?o:globalThis;r.exports=function(){for(var u=[],c=0;c<s.length;c++)typeof l[s[c]]=="function"&&(u[u.length]=s[c]);return u}}).call(this)}).call(this,typeof $r<"u"?$r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],6:[function(n,r,i){var o=n("get-intrinsic"),s=n("./"),l=s(o("String.prototype.indexOf"));r.exports=function(u,c){var f=o(u,!!c);return typeof f=="function"&&l(u,".prototype.")>-1?s(f):f}},{"./":7,"get-intrinsic":11}],7:[function(n,r,i){var o=n("function-bind"),s=n("get-intrinsic"),l=s("%Function.prototype.apply%"),a=s("%Function.prototype.call%"),u=s("%Reflect.apply%",!0)||o.call(a,l),c=s("%Object.getOwnPropertyDescriptor%",!0),f=s("%Object.defineProperty%",!0),h=s("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}r.exports=function(g){var v=u(o,a,arguments);if(c&&f){var O=c(v,"length");O.configurable&&f(v,"length",{value:1+h(0,g.length-(arguments.length-1))})}return v};var d=function(){return u(o,l,arguments)};f?f(r.exports,"apply",{value:d}):r.exports.apply=d},{"function-bind":10,"get-intrinsic":11}],8:[function(n,r,i){var o=n("is-callable"),s=Object.prototype.toString,l=Object.prototype.hasOwnProperty,a=function(d,p,g){for(var v=0,O=d.length;v<O;v++)l.call(d,v)&&(g==null?p(d[v],v,d):p.call(g,d[v],v,d))},u=function(d,p,g){for(var v=0,O=d.length;v<O;v++)g==null?p(d.charAt(v),v,d):p.call(g,d.charAt(v),v,d)},c=function(d,p,g){for(var v in d)l.call(d,v)&&(g==null?p(d[v],v,d):p.call(g,d[v],v,d))},f=function(d,p,g){if(!o(p))throw new TypeError("iterator must be a function");var v;arguments.length>=3&&(v=g),s.call(d)==="[object Array]"?a(d,p,v):typeof d=="string"?u(d,p,v):c(d,p,v)};r.exports=f},{"is-callable":19}],9:[function(n,r,i){var o="Function.prototype.bind called on incompatible ",s=Array.prototype.slice,l=Object.prototype.toString,a="[object Function]";r.exports=function(c){var f=this;if(typeof f!="function"||l.call(f)!==a)throw new TypeError(o+f);for(var h=s.call(arguments,1),d,p=function(){if(this instanceof d){var y=f.apply(this,h.concat(s.call(arguments)));return Object(y)===y?y:this}else return f.apply(c,h.concat(s.call(arguments)))},g=Math.max(0,f.length-h.length),v=[],O=0;O<g;O++)v.push("$"+O);if(d=Function("binder","return function ("+v.join(",")+"){ return binder.apply(this,arguments); }")(p),f.prototype){var m=function(){};m.prototype=f.prototype,d.prototype=new m,m.prototype=null}return d}},{}],10:[function(n,r,i){var o=n("./implementation");r.exports=Function.prototype.bind||o},{"./implementation":9}],11:[function(n,r,i){var o,s=SyntaxError,l=Function,a=TypeError,u=function(M){try{return l('"use strict"; return ('+M+").constructor;")()}catch{}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch{c=null}var f=function(){throw new a},h=c?function(){try{return arguments.callee,f}catch{try{return c(arguments,"callee").get}catch{return f}}}():f,d=n("has-symbols")(),p=Object.getPrototypeOf||function(M){return M.__proto__},g={},v=typeof Uint8Array>"u"?o:p(Uint8Array),O={"%AggregateError%":typeof AggregateError>"u"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?o:ArrayBuffer,"%ArrayIteratorPrototype%":d?p([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":typeof Atomics>"u"?o:Atomics,"%BigInt%":typeof BigInt>"u"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?o:Float32Array,"%Float64Array%":typeof Float64Array>"u"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?o:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":g,"%Int8Array%":typeof Int8Array>"u"?o:Int8Array,"%Int16Array%":typeof Int16Array>"u"?o:Int16Array,"%Int32Array%":typeof Int32Array>"u"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?p(p([][Symbol.iterator]())):o,"%JSON%":typeof JSON=="object"?JSON:o,"%Map%":typeof Map>"u"?o:Map,"%MapIteratorPrototype%":typeof Map>"u"||!d?o:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?o:Promise,"%Proxy%":typeof Proxy>"u"?o:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?o:Set,"%SetIteratorPrototype%":typeof Set>"u"||!d?o:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?p(""[Symbol.iterator]()):o,"%Symbol%":d?Symbol:o,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":v,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?o:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?o:WeakMap,"%WeakRef%":typeof WeakRef>"u"?o:WeakRef,"%WeakSet%":typeof WeakSet>"u"?o:WeakSet};try{null.error}catch(M){var m=p(p(M));O["%Error.prototype%"]=m}var y=function M(j){var A;if(j==="%AsyncFunction%")A=u("async function () {}");else if(j==="%GeneratorFunction%")A=u("function* () {}");else if(j==="%AsyncGeneratorFunction%")A=u("async function* () {}");else if(j==="%AsyncGenerator%"){var X=M("%AsyncGeneratorFunction%");X&&(A=X.prototype)}else if(j==="%AsyncIteratorPrototype%"){var z=M("%AsyncGenerator%");z&&(A=p(z.prototype))}return O[j]=A,A},b={"%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"]},x=n("function-bind"),E=n("has"),T=x.call(Function.call,Array.prototype.concat),w=x.call(Function.apply,Array.prototype.splice),k=x.call(Function.call,String.prototype.replace),C=x.call(Function.call,String.prototype.slice),Q=x.call(Function.call,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,V=function(j){var A=C(j,0,1),X=C(j,-1);if(A==="%"&&X!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(X==="%"&&A!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var z=[];return k(j,D,function(pe,ae,B,q){z[z.length]=B?k(q,N,"$1"):ae||pe}),z},G=function(j,A){var X=j,z;if(E(b,X)&&(z=b[X],X="%"+z[0]+"%"),E(O,X)){var pe=O[X];if(pe===g&&(pe=y(X)),typeof pe>"u"&&!A)throw new a("intrinsic "+j+" exists, but is not available. Please file an issue!");return{alias:z,name:X,value:pe}}throw new s("intrinsic "+j+" does not exist!")};r.exports=function(j,A){if(typeof j!="string"||j.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof A!="boolean")throw new a('"allowMissing" argument must be a boolean');if(Q(/^%?[^%]*%?$/,j)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var X=V(j),z=X.length>0?X[0]:"",pe=G("%"+z+"%",A),ae=pe.name,B=pe.value,q=!1,te=pe.alias;te&&(z=te[0],w(X,T([0,1],te)));for(var we=1,F=!0;we<X.length;we+=1){var W=X[we],Y=C(W,0,1),fe=C(W,-1);if((Y==='"'||Y==="'"||Y==="`"||fe==='"'||fe==="'"||fe==="`")&&Y!==fe)throw new s("property names with quotes must have matching quotes");if((W==="constructor"||!F)&&(q=!0),z+="."+W,ae="%"+z+"%",E(O,ae))B=O[ae];else if(B!=null){if(!(W in B)){if(!A)throw new a("base intrinsic for "+j+" exists, but the property is not available.");return}if(c&&we+1>=X.length){var Se=c(B,W);F=!!Se,F&&"get"in Se&&!("originalValue"in Se.get)?B=Se.get:B=B[W]}else F=E(B,W),B=B[W];F&&!q&&(O[ae]=B)}}return B}},{"function-bind":10,has:16,"has-symbols":13}],12:[function(n,r,i){var o=n("get-intrinsic"),s=o("%Object.getOwnPropertyDescriptor%",!0);if(s)try{s([],"length")}catch{s=null}r.exports=s},{"get-intrinsic":11}],13:[function(n,r,i){var o=typeof Symbol<"u"&&Symbol,s=n("./shams");r.exports=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()}},{"./shams":14}],14:[function(n,r,i){r.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},l=Symbol("test"),a=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var u=42;s[l]=u;for(l in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var c=Object.getOwnPropertySymbols(s);if(c.length!==1||c[0]!==l||!Object.prototype.propertyIsEnumerable.call(s,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(s,l);if(f.value!==u||f.enumerable!==!0)return!1}return!0}},{}],15:[function(n,r,i){var o=n("has-symbols/shams");r.exports=function(){return o()&&!!Symbol.toStringTag}},{"has-symbols/shams":14}],16:[function(n,r,i){var o=n("function-bind");r.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":10}],17:[function(n,r,i){typeof Object.create=="function"?r.exports=function(s,l){l&&(s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:r.exports=function(s,l){if(l){s.super_=l;var a=function(){};a.prototype=l.prototype,s.prototype=new a,s.prototype.constructor=s}}},{}],18:[function(n,r,i){var o=n("has-tostringtag/shams")(),s=n("call-bind/callBound"),l=s("Object.prototype.toString"),a=function(h){return o&&h&&typeof h=="object"&&Symbol.toStringTag in h?!1:l(h)==="[object Arguments]"},u=function(h){return a(h)?!0:h!==null&&typeof h=="object"&&typeof h.length=="number"&&h.length>=0&&l(h)!=="[object Array]"&&l(h.callee)==="[object Function]"},c=function(){return a(arguments)}();a.isLegacyArguments=u,r.exports=c?a:u},{"call-bind/callBound":6,"has-tostringtag/shams":15}],19:[function(n,r,i){var o=Function.prototype.toString,s=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,l,a;if(typeof s=="function"&&typeof Object.defineProperty=="function")try{l=Object.defineProperty({},"length",{get:function(){throw a}}),a={},s(function(){throw 42},null,l)}catch(T){T!==a&&(s=null)}else s=null;var u=/^\s*class\b/,c=function(w){try{var k=o.call(w);return u.test(k)}catch{return!1}},f=function(w){try{return c(w)?!1:(o.call(w),!0)}catch{return!1}},h=Object.prototype.toString,d="[object Object]",p="[object Function]",g="[object GeneratorFunction]",v="[object HTMLAllCollection]",O="[object HTML document.all class]",m="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,b=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var E=document.all;h.call(E)===h.call(document.all)&&(x=function(w){if((b||!w)&&(typeof w>"u"||typeof w=="object"))try{var k=h.call(w);return(k===v||k===O||k===m||k===d)&&w("")==null}catch{}return!1})}r.exports=s?function(w){if(x(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{s(w,null,l)}catch(k){if(k!==a)return!1}return!c(w)&&f(w)}:function(w){if(x(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(y)return f(w);if(c(w))return!1;var k=h.call(w);return k!==p&&k!==g&&!/^\[object HTML/.test(k)?!1:f(w)}},{}],20:[function(n,r,i){var o=Object.prototype.toString,s=Function.prototype.toString,l=/^\s*(?:function)?\*/,a=n("has-tostringtag/shams")(),u=Object.getPrototypeOf,c=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch{}},f;r.exports=function(d){if(typeof d!="function")return!1;if(l.test(s.call(d)))return!0;if(!a){var p=o.call(d);return p==="[object GeneratorFunction]"}if(!u)return!1;if(typeof f>"u"){var g=c();f=g?u(g):!1}return u(d)===f}},{"has-tostringtag/shams":15}],21:[function(n,r,i){(function(o){(function(){var s=n("for-each"),l=n("available-typed-arrays"),a=n("call-bind/callBound"),u=a("Object.prototype.toString"),c=n("has-tostringtag/shams")(),f=n("gopd"),h=typeof globalThis>"u"?o:globalThis,d=l(),p=a("Array.prototype.indexOf",!0)||function(b,x){for(var E=0;E<b.length;E+=1)if(b[E]===x)return E;return-1},g=a("String.prototype.slice"),v={},O=Object.getPrototypeOf;c&&f&&O&&s(d,function(y){var b=new h[y];if(Symbol.toStringTag in b){var x=O(b),E=f(x,Symbol.toStringTag);if(!E){var T=O(x);E=f(T,Symbol.toStringTag)}v[y]=E.get}});var m=function(b){var x=!1;return s(v,function(E,T){if(!x)try{x=E.call(b)===T}catch{}}),x};r.exports=function(b){if(!b||typeof b!="object")return!1;if(!c||!(Symbol.toStringTag in b)){var x=g(u(b),8,-1);return p(d,x)>-1}return f?m(b):!1}}).call(this)}).call(this,typeof $r<"u"?$r:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":5,"call-bind/callBound":6,"for-each":8,gopd:12,"has-tostringtag/shams":15}],22:[function(n,r,i){var o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function a(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}function u(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var f={},h=0;h<10;h++)f["_"+String.fromCharCode(h)]=h;var d=Object.getOwnPropertyNames(f).map(function(g){return f[g]});if(d.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(g){p[g]=g}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}r.exports=u()?Object.assign:function(c,f){for(var h,d=a(c),p,g=1;g<arguments.length;g++){h=Object(arguments[g]);for(var v in h)s.call(h,v)&&(d[v]=h[v]);if(o){p=o(h);for(var O=0;O<p.length;O++)l.call(h,p[O])&&(d[p[O]]=h[p[O]])}}return d}},{}],23:[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 o(O,m){if(!O)throw new Error(m)}const s=O=>O!=null&&typeof O=="object"&&!Array.isArray(O),l=(O,m)=>typeof O==typeof m?O>m:typeof O=="string"&&typeof m=="number";function a(O,m){for(let y in O){const b=y;m.write(b,O[b])}}const u=O=>typeof O=="number"||typeof O=="string"&&O!=="__proto__";i.isValidPathItem=u;class c{constructor(m=null){this.parents=[],this.indexes=[],this.lcIdx=-1,this.idx=-1,this.container=m}ascend(){o(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):(o(this.idx>0),this.idx--,s(this.container[this.idx])&&this.idx--)}getPath(){const m=[];let y=this.container,b=this.parents.length-1,x=this.idx;for(;x>=0;)m.unshift(y[x]),x===0?(x=this.indexes[b*2],y=this.parents[b--]):x-=s(y[x-1])?2:1;return m}}class f extends c{get(){return this.container?this.container.slice(this.idx+1):null}getKey(){return o(this.container!=null,"Invalid call to getKey before cursor descended"),this.container[this.idx]}getComponent(){let m;return this.container&&this.container.length>this.idx+1&&s(m=this.container[this.idx+1])?m:null}descendFirst(){let m=this.idx+1;if(!this.container||m>=this.container.length||s(this.container[m])&&m+1>=this.container.length)return!1;s(this.container[m])&&m++;const y=this.container[m];return Array.isArray(y)?(this.indexes.push(this.idx),this.parents.push(this.container),this.indexes.push(m),this.idx=0,this.container=y):this.idx=m,!0}nextSibling(){if(o(this.parents.length===this.indexes.length/2),this.idx>0||this.parents.length===0)return!1;const m=this.indexes[this.indexes.length-1]+1,y=this.parents[this.parents.length-1];return m>=y.length?!1:(o(!isNaN(m)),this.indexes[this.indexes.length-1]=m,this.container=y[m],!0)}_init(m,y,b,x){this.container=m,this.idx=y,this.parents=b.slice(),this.indexes=x.slice()}clone(){const m=new f;return m._init(this.container,this.idx,this.parents,this.indexes),m}*[Symbol.iterator](){if(this.descendFirst()){do yield this.getKey();while(this.nextSibling());this.ascend()}}traverse(m,y){const b=this.getComponent();b&&y(b,m);for(const x of this)m&&m.descend(x),this.traverse(m,y),m&&m.ascend()}eachPick(m,y){this.traverse(m,(b,x)=>{b.p!=null&&y(b.p,x)})}eachDrop(m,y){this.traverse(m,(b,x)=>{b.d!=null&&y(b.d,x)})}}i.ReadCursor=f;class h extends c{constructor(m=null){super(m),this.pendingDescent=[],this._op=m}flushDescent(){o(this.parents.length===this.indexes.length/2),this.container===null&&(this._op=this.container=[]);for(let m=0;m<this.pendingDescent.length;m++){const y=this.pendingDescent[m];let b=this.idx+1;if(b<this.container.length&&s(this.container[b])&&b++,o(b===this.container.length||!s(this.container[b])),b===this.container.length)this.container.push(y),this.idx=b;else if(this.container[b]===y)this.idx=b;else{if(!Array.isArray(this.container[b])){const x=this.container.splice(b,this.container.length-b);this.container.push(x),this.lcIdx>-1&&(this.lcIdx=b)}for(this.indexes.push(this.idx),this.parents.push(this.container),this.lcIdx!==-1&&(o(l(y,this.container[this.lcIdx][0])),b=this.lcIdx+1,this.lcIdx=-1);b<this.container.length&&l(y,this.container[b][0]);)b++;if(this.indexes.push(b),this.idx=0,b<this.container.length&&this.container[b][0]===y)this.container=this.container[b];else{const x=[y];this.container.splice(b,0,x),this.container=x}}}this.pendingDescent.length=0}reset(){this.lcIdx=-1}getComponent(){this.flushDescent();const m=this.idx+1;if(m<this.container.length&&s(this.container[m]))return this.container[m];{const y={};return this.container.splice(m,0,y),y}}write(m,y){const b=this.getComponent();o(b[m]==null||b[m]===y,"Internal consistency error: Overwritten component. File a bug"),b[m]=y}get(){return this._op}descend(m){if(!(0,i.isValidPathItem)(m))throw Error("Invalid JSON key");this.pendingDescent.push(m)}descendPath(m){return this.pendingDescent.push(...m),this}ascend(){this.pendingDescent.length?this.pendingDescent.pop():super.ascend()}mergeTree(m,y=a){if(m===null)return;if(o(Array.isArray(m)),m===this._op)throw Error("Cannot merge into my own tree");const b=this.lcIdx,x=this.parents.length;let E=0;for(let T=0;T<m.length;T++){const w=m[T];typeof w=="string"||typeof w=="number"?(E++,this.descend(w)):Array.isArray(w)?this.mergeTree(w,y):typeof w=="object"&&y(w,this)}for(;E--;)this.ascend();this.lcIdx=this.parents.length===x?b:-1}at(m,y){this.descendPath(m),y(this);for(let b=0;b<m.length;b++)this.ascend();return this}writeAtPath(m,y,b){return this.at(m,()=>this.write(y,b)),this.reset(),this}writeMove(m,y,b=0){return this.writeAtPath(m,"p",b).writeAtPath(y,"d",b)}getPath(){const m=super.getPath();return m.push(...this.pendingDescent),m}}i.WriteCursor=h;const d=()=>new h;i.writeCursor=d;const p=O=>new f(O);i.readCursor=p;function g(O,m,y){let b,x;x=b=O?O.descendFirst():!1;function E(T){let w;for(;x;){const k=w=O.getKey();if(T!=null){let C=!1;if(m&&typeof k=="number"&&(w=m(k,O.getComponent()),w<0&&(w=~w,C=!0)),l(w,T))return null;if(w===T&&!C)return O}y&&typeof w=="number"&&y(w,O.getComponent()),x=O.nextSibling()}return null}return E.end=()=>{b&&O.ascend()},E}i.advancer=g;function v(O,m,y){let b,x,E,T;for(b=x=O&&O.descendFirst(),E=T=m&&m.descendFirst();b||E;){let w=b?O.getKey():null,k=E?m.getKey():null;w!==null&&k!==null&&(l(k,w)?k=null:w!==k&&(w=null)),y(w??k,w!=null?O:null,k!=null?m:null),w!=null&&b&&(b=O.nextSibling()),k!=null&&E&&(E=m.nextSibling())}x&&O.ascend(),T&&m.ascend()}i.eachChildOf=v},{}],24:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});function o(s){if(s===null)return null;if(Array.isArray(s))return s.map(o);if(typeof s=="object"){const l={};for(let a in s)l[a]=o(s[a]);return l}else return s}i.default=o},{}],25:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});function o(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 s(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)?s(a,u):o(a,u)}i.default=l},{}],26:[function(n,r,i){var o=this&&this.__createBinding||(Object.create?function(u,c,f,h){h===void 0&&(h=f);var d=Object.getOwnPropertyDescriptor(c,f);(!d||("get"in d?!c.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(u,h,d)}:function(u,c,f,h){h===void 0&&(h=f),u[h]=c[f]}),s=this&&this.__exportStar||function(u,c){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&o(c,u,f)};Object.defineProperty(i,"__esModule",{value:!0}),i.ConflictType=i.WriteCursor=i.ReadCursor=void 0,s(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":23,"./json1.release.js":27,"./types":29}],27:[function(n,r,i){var o=this&&this.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(i,"__esModule",{value:!0}),i.editOp=i.replaceOp=i.insertOp=i.moveOp=i.removeOp=i.type=void 0;const s=o(n("./deepEqual.js")),l=o(n("./deepClone.js")),a=n("./cursor.js"),u=n("./types.js"),c=!0,f=()=>{};function h($,H){if(!$)throw new Error(H)}let d=!1;i.type={name:"p",uri:"p",readCursor:a.readCursor,writeCursor:a.writeCursor,create:$=>$,isNoop:$=>$==null,setDebug($){d=$,f.quiet=!$},registerSubtype:V,checkValidOp:ae,normalize:B,apply:q,transformPosition:we,transformPresence:F,compose:Y,tryTransform:en,transform:xr,makeInvertible:Be,invert:fe,invertWithDoc:Ie,RM_UNEXPECTED_CONTENT:u.ConflictType.RM_UNEXPECTED_CONTENT,DROP_COLLISION:u.ConflictType.DROP_COLLISION,BLACKHOLE:u.ConflictType.BLACKHOLE,transformNoConflict:($,H,K)=>Ni(()=>!0,$,H,K),typeAllowingConflictsPred:$=>Object.assign(Object.assign({},i.type),{transform:(H,K,ue)=>Ni($,H,K,ue)})};const p=$=>$?$.getComponent():null;function g($){return $&&typeof $=="object"&&!Array.isArray($)}const v=$=>Array.isArray($)?$.slice():$!==null&&typeof $=="object"?Object.assign({},$):$,O=$=>$&&($.p!=null||$.r!==void 0),m=$=>$&&($.d!=null||$.i!==void 0),y=($,H=!0)=>(0,a.writeCursor)().writeAtPath($,"r",H).get();i.removeOp=y;const b=($,H)=>(0,a.writeCursor)().writeMove($,H).get();i.moveOp=b;const x=($,H)=>(0,a.writeCursor)().writeAtPath($,"i",H).get();i.insertOp=x;const E=($,H,K)=>(0,a.writeCursor)().at($,ue=>{ue.write("r",H),ue.write("i",K)}).get();i.replaceOp=E;const T=($,H,K,ue=!1)=>(0,a.writeCursor)().at($,le=>X(le,H,K,ue)).get();function w($,H){return h($!=null),typeof H=="number"?(h(Array.isArray($),"Invalid key - child is not an array"),($=$.slice()).splice(H,1)):(h(g($),"Invalid key - child is not an object"),delete($=Object.assign({},$))[H]),$}function k($,H,K){return typeof H=="number"?(h($!=null,"Container is missing for key"),h(Array.isArray($),"Cannot use numerical key for object container"),h($.length>=H,"Cannot insert into out of bounds index"),$.splice(H,0,K)):(h(g($),"Cannot insert into missing item"),h($[H]===void 0,"Trying to overwrite value at key. Your op needs to remove it first"),$[H]=K),K}i.editOp=T;const C=($,H,K)=>(($=v($))[H]=K,$),Q=($,H)=>$!=null&&(typeof H=="number"?Array.isArray($):typeof $=="object"),D=($,H)=>Q($,H)?$[H]:void 0,N={};function V($){let H=$.type?$.type:$;H.name&&(N[H.name]=H),H.uri&&(N[H.uri]=H)}const G=$=>{const H=N[$];if(H)return H;throw Error("Missing type: "+$)};V(n("ot-text-unicode"));const M=($,H)=>$+H;V({name:"number",apply:M,compose:M,invert:$=>-$,transform:$=>$});const j=$=>$==null?null:$.et?G($.et):$.es?N["text-unicode"]:$.ena!=null?N.number:null,A=$=>$.es?$.es:$.ena!=null?$.ena:$.e,X=($,H,K,ue=!1)=>{const[le,Oe]=typeof H=="string"?[G(H),H]:[H,H.name];!ue&&le.isNoop&&le.isNoop(K)||(Oe==="number"?$.write("ena",K):Oe==="text-unicode"?$.write("es",K):($.write("et",Oe),$.write("e",K)))};function z($){h(typeof $=="number"),h($>=0),h($===(0|$))}function pe($){typeof $=="number"?z($):h(typeof $=="string")}function ae($){if($===null)return;const H=new Set,K=new Set,ue=Oe=>{let Ge=!0,Ke=!1;for(let oe in Oe){const Xe=Oe[oe];if(Ge=!1,h(oe==="p"||oe==="r"||oe==="d"||oe==="i"||oe==="e"||oe==="es"||oe==="ena"||oe==="et","Invalid component item '"+oe+"'"),oe==="p")z(Xe),h(!H.has(Xe)),H.add(Xe),h(Oe.r===void 0);else if(oe==="d")z(Xe),h(!K.has(Xe)),K.add(Xe),h(Oe.i===void 0);else if(oe==="e"||oe==="es"||oe==="ena"){h(!Ke),Ke=!0;const Ee=j(Oe);h(Ee,"Missing type in edit"),Ee.checkValidOp&&Ee.checkValidOp(A(Oe))}}h(!Ge)},le=(Oe,Ge,Ke)=>{if(!Array.isArray(Oe))throw Error("Op must be null or a list");if(Oe.length===0)throw Error("Empty descent");Ge||pe(Oe[0]);let oe=1,Xe=0,Ee=0;for(let ve=0;ve<Oe.length;ve++){const me=Oe[ve];if(h(me!=null),Array.isArray(me)){const Qe=le(me,!1);if(Xe){const Je=typeof Ee,Le=typeof Qe;Je===Le?h(Ee<Qe,"descent keys are not in order"):h(Je==="number"&&Le==="string")}Ee=Qe,Xe++,oe=3}else typeof me=="object"?(h(oe===1,`Prev not scalar - instead ${oe}`),ue(me),oe=2):(h(oe!==3),pe(me),h((0,a.isValidPathItem)(me),"Invalid path key"),oe=1)}return h(Xe!==1,"Operation makes multiple descents. Remove some []"),h(oe===2||oe===3),Oe[0]};le($,!0),h(H.size===K.size,"Mismatched picks and drops in op");for(let Oe=0;Oe<H.size;Oe++)h(H.has(Oe)),h(K.has(Oe))}function B($){let H=0,K=[];const ue=(0,a.writeCursor)();return ue.mergeTree($,(le,Oe)=>{const Ge=j(le);if(Ge){const oe=A(le);X(Oe,Ge,Ge.normalize?Ge.normalize(oe):oe)}for(const oe of["r","p","i","d"])if(le[oe]!==void 0){const Xe=oe==="p"||oe==="d"?(Ke=le[oe],K[Ke]==null&&(K[Ke]=H++),K[Ke]):le[oe];Oe.write(oe,Xe)}var Ke}),ue.get()}function q($,H){if(f.quiet=!d,ae(H),H===null)return $;const K=[];return $=function ue(le,Oe){let Ge=le,Ke=0,oe={root:le},Xe=0,Ee=oe,ve="root";function me(){for(;Xe<Ke;Xe++){let Qe=Oe[Xe];typeof Qe!="object"&&(h(Q(Ee,ve)),Ee=Ee[ve]=v(Ee[ve]),ve=Qe)}}for(;Ke<Oe.length;Ke++){const Qe=Oe[Ke];if(Array.isArray(Qe)){const Je=ue(Ge,Qe);Je!==Ge&&Je!==void 0&&(me(),Ge=Ee[ve]=Je)}else if(typeof Qe=="object"){Qe.d!=null?(me(),Ge=k(Ee,ve,K[Qe.d])):Qe.i!==void 0&&(me(),Ge=k(Ee,ve,Qe.i));const Je=j(Qe);if(Je)me(),Ge=Ee[ve]=Je.apply(Ge,A(Qe));else if(Qe.e!==void 0)throw Error("Subtype "+Qe.et+" undefined")}else Ge=D(Ge,Qe)}return oe.root}($=function ue(le,Oe){const Ge=[];let Ke=0;for(;Ke<Oe.length;Ke++){const oe=Oe[Ke];if(Array.isArray(oe))break;typeof oe!="object"&&(Ge.push(le),le=D(le,oe))}for(let oe=Oe.length-1;oe>=Ke;oe--)le=ue(le,Oe[oe]);for(--Ke;Ke>=0;Ke--){const oe=Oe[Ke];if(typeof oe!="object"){const Xe=Ge.pop();le=le===D(Xe,oe)?Xe:le===void 0?w(Xe,oe):C(Xe,oe,le)}else O(oe)&&(h(le!==void 0,"Cannot pick up or remove undefined"),oe.p!=null&&(K[oe.p]=le),le=void 0)}return le}($,H),H)}const te=()=>{};function we($,H){$=$.slice(),ae(H);const K=(0,a.readCursor)(H);let ue,le,Oe=!1;const Ge=[];for(let oe=0;;oe++){const Xe=$[oe],Ee=K.getComponent();if(Ee&&(Ee.r!==void 0?Oe=!0:Ee.p!=null&&(Oe=!1,ue=Ee.p,le=oe)),oe>=$.length)break;let ve=0;const me=(0,a.advancer)(K,void 0,(Je,Le)=>{O(Le)&&ve++});Ge.unshift(me);const Qe=me(Xe);if(typeof Xe=="number"&&($[oe]-=ve),!Qe)break}if(Ge.forEach(oe=>oe.end()),Oe)return null;const Ke=()=>{let oe=0;if(ue!=null){const Xe=K.getPath();oe=Xe.length,$=Xe.concat($.slice(le))}for(c;oe<$.length;oe++){const Xe=$[oe],Ee=p(K),ve=j(Ee);if(ve){const Le=A(Ee);ve.transformPosition?$[oe]=ve.transformPosition($[oe],Le):ve.transformCursor&&($[oe]=ve.transformCursor($[oe],Le));break}let me=0;const Qe=(0,a.advancer)(K,(Le,ke)=>m(ke)?~(Le-me):Le-me,(Le,ke)=>{m(ke)&&me++}),Je=Qe(Xe);if(typeof Xe=="number"&&($[oe]+=me),!Je)break}};return ue!=null?K.eachDrop(null,oe=>{oe===ue&&Ke()}):Ke(),$}function F($,H){if(!$||!$.start||!$.end)return null;const K=we($.start,H),ue=we($.end,H);return K&&ue?Object.assign(Object.assign({},$),{start:K,end:ue}):K?Object.assign(Object.assign({},$),{start:K,end:K}):ue?Object.assign(Object.assign({},$),{start:ue,end:ue}):null}const W=($,H,K)=>{typeof H=="number"?(h(Array.isArray($)),h(H<$.length)):(h(!Array.isArray($)),h($[H]!==void 0)),K===void 0?typeof H=="number"?$.splice(H,1):delete $[H]:$[H]=K};function Y($,H){if(ae($),ae(H),$==null)return H;if(H==null)return $;let K=0;const ue=(0,a.readCursor)($),le=(0,a.readCursor)(H),Oe=(0,a.writeCursor)(),Ge=[],Ke=[],oe=[],Xe=[],Ee=[],ve=[],me=new Set;ue.traverse(null,Le=>{Le.p!=null&&(oe[Le.p]=ue.clone())}),le.traverse(null,Le=>{Le.d!=null&&(Xe[Le.d]=le.clone())});const Qe=(0,a.writeCursor)();return function Le(ke,Ue,ft,ut,wt,jt,Ft,$t){h(Ue||ft);const _n=p(Ue),Tn=p(ft),oi=!!Tn&&Tn.r!==void 0,Cr=!!_n&&_n.i!==void 0,ar=_n?_n.d:null,Gn=Tn?Tn.p:null,rt=(jt||oi)&&Gn==null;if(Gn!=null)ut=Xe[Gn],Ft=Ke[Gn]=new a.WriteCursor;else if(Tn&&Tn.r!==void 0)ut=null;else{const xe=p(ut);xe&&xe.d!=null&&(ut=null)}const De=p(ut);if(ar!=null)if(ke=oe[ar],$t=Ge[ar]=new a.WriteCursor,rt)jt&&!oi&&$t.write("r",!0);else{const xe=Ee[ar]=K++;Ft.write("d",xe)}else if(_n&&_n.i!==void 0)ke=null;else{const xe=p(ke);xe&&xe.p!=null&&(ke=null)}let Ne;Cr?(h(wt===void 0),Ne=_n.i):Ne=wt;const Ve=(Gn==null?!Cr||jt||oi:Ne===void 0)?null:Ft.getComponent();if(Gn!=null){if(!(wt!==void 0||Cr)){const xe=ar!=null?Ee[ar]:K++;ve[Gn]=xe,$t.write("p",xe)}}else oi&&(Cr||wt!==void 0||(Tn.r,$t.write("r",Tn.r)));const ye=rt?null:j(_n),$e=j(De);if((ye||$e)&&(ye&&ye.name,$e&&$e.name),ye&&$e){h(ye===$e);const xe=A(_n),ht=A(De),an=ye.compose(xe,ht);X(Ft,ye,an),me.add(De)}else ye?X(Ft,ye,A(_n)):$e&&(X(Ft,$e,A(De)),me.add(De));const nt=typeof Ne=="object"&&Ne!=null;let it=!1,at=0,Ye=0,Ht=0,kt=0,on=0;const He=(0,a.advancer)(ut,(xe,ht)=>m(ht)?kt-xe-1:xe-kt,(xe,ht)=>{m(ht)&&kt++}),et=(0,a.advancer)(ke,(xe,ht)=>O(ht)?at-xe-1:xe-at,(xe,ht)=>{O(ht)&&at++});if((0,a.eachChildOf)(Ue,ft,(xe,ht,an)=>{let Wr,si,ur=xe,Ko=xe,ji=xe;if(typeof xe=="number"){let Ze=xe+Ht;si=He(Ze),Ko=Ze+kt;let xt=xe+Ye;Wr=et(xt),m(p(si))&&(Wr=null),ur=xt+at,ji=xe+on,h(ur>=0,"p1PickKey is negative"),h(Ko>=0,"p2DropKey is negative");const tn=m(p(ht)),_t=O(p(an));(tn||_t&&!rt)&&on--,tn&&Ye--,_t&&Ht--}else Wr=et(xe),si=He(xe);$t.descend(ur),Ft.descend(Ko);const Ur=nt&&!m(p(ht))?Ne[ji]:void 0,Jo=Le(Wr,ht,an,si,Ur,rt,Ft,$t);nt&&!rt?Ur!==Jo&&(it||(Ne=Array.isArray(Ne)?Ne.slice():Object.assign({},Ne),it=!0),W(Ne,ji,Jo)):h(Jo===void 0),Ft.ascend(),$t.ascend()}),et.end(),He.end(),Ve!=null)Ve.i=Ne;else if(!jt&&!oi&&Gn==null)return Ne}(ue,ue.clone(),le,le.clone(),void 0,!1,Oe,Qe),Oe.reset(),Oe.mergeTree(Qe.get()),Oe.reset(),Oe.get(),Ge.map(Le=>Le.get()),Ke.map(Le=>Le.get()),ue.traverse(Oe,(Le,ke)=>{const Ue=Le.p;if(Ue!=null){const ft=Ee[Ue];ft!=null&&ke.write("p",ft);const ut=Ge[Ue];ut&&ut.get(),ut&&ke.mergeTree(ut.get())}else Le.r!==void 0&&ke.write("r",Le.r)}),Oe.reset(),Oe.get(),le.traverse(Oe,(Le,ke)=>{const Ue=Le.d;if(Ue!=null){const ut=ve[Ue];ut!=null&&ke.write("d",ut);const wt=Ke[Ue];wt&&ke.mergeTree(wt.get())}else Le.i!==void 0&&ke.write("i",Le.i);const ft=j(Le);ft&&!me.has(Le)&&X(ke,ft,A(Le))}),Oe.get()}function fe($){if($==null)return null;const H=new a.ReadCursor($),K=new a.WriteCursor;let ue;const le=[],Oe=[];if(function oe(Xe,Ee,ve){const me=Xe.getComponent();let Qe,Je=!1;if(me){me.p!=null&&(Ee.write("d",me.p),le[me.p]=Xe.clone()),me.r!==void 0&&Ee.write("i",me.r),me.d!=null&&(Ee.write("p",me.d),ve=void 0),me.i!==void 0&&(ve=Qe=me.i);const ke=j(me);ke&&(ve===void 0?(ue||(ue=new Set),ue.add(me)):(A(me),ve=ke.apply(ve,A(me)),Je=!0))}let Le=0;for(const ke of Xe){Ee.descend(ke);const Ue=typeof ke=="number"?ke-Le:ke,ft=D(ve,Ue);m(Xe.getComponent())&&Le++;const ut=oe(Xe,Ee,ft);if(ve!==void 0&&ut!==void 0){if(Je||(Je=!0,ve=v(ve)),!Q(ve,Ue))throw Error("Cannot modify child - invalid operation");ve[Ue]=ut}Ee.ascend()}if(Qe===void 0)return Je?ve:void 0;Ee.write("r",ve)}(H,K,void 0),ue){let oe=function(Xe,Ee,ve){const me=Ee.getComponent();if(me){const ke=me.d;if(ke!=null&&(Xe=le[ke],ve=Oe[ke]=(0,a.writeCursor)()),ue.has(me)){const Ue=j(me);if(!Ue.invert)throw Error(`Cannot invert subtype ${Ue.name}`);X(ve,Ue,Ue.invert(A(me)))}}let Qe=0,Je=0;const Le=(0,a.advancer)(Xe,(ke,Ue)=>O(Ue)?Qe-ke-1:ke-Qe,(ke,Ue)=>{O(Ue)&&Qe++});for(const ke of Ee)if(typeof ke=="number"){const Ue=ke-Je,ft=Le(Ue),ut=Ue+Qe;ve.descend(ut),oe(ft,Ee,ve),m(Ee.getComponent())&&Je++,ve.ascend()}else ve.descend(ke),oe(Le(ke),Ee,ve),ve.ascend();Le.end()};var Ke=oe;K.reset(),oe(H.clone(),H,K),Oe.length&&(K.reset(),H.traverse(K,(Xe,Ee)=>{const ve=Xe.p;if(ve!=null){const me=Oe[ve];me&&me.get(),me&&Ee.mergeTree(me.get())}}))}return K.get()}const Se=($,H)=>$.some(K=>typeof K=="object"&&(Array.isArray(K)?Se(K,H):H(K)));function Be($,H){if($==null||!Se($,Ee=>{var ve;return Ee.r!==void 0||((ve=j(Ee))===null||ve===void 0?void 0:ve.makeInvertible)!=null}))return $;const K=new a.ReadCursor($),ue=new a.WriteCursor;let le=!1;const Oe=[],Ge=[],Ke=(Ee,ve,me)=>{const Qe=Ee.getComponent();let Je=!1;if(Qe){Qe.d!=null&&ve.write("d",Qe.d),Qe.i!==void 0&&ve.write("i",Qe.i);const ke=Qe.p;if(ke!=null&&(Oe[ke]=Ee.clone(),h(me!==void 0,"Operation picks up at an invalid key"),Ge[ke]=me,ve.write("p",Qe.p)),Qe.r!==void 0&&me===void 0)throw Error("Invalid doc / op in makeInvertible: removed item missing from doc");const Ue=j(Qe);Ue&&(Ue.makeInvertible?le=!0:X(ve,Ue,A(Qe),!0))}let Le=0;for(const ke of Ee){ve.descend(ke);const Ue=typeof ke=="number"?ke-Le:ke,ft=D(me,Ue),ut=Ke(Ee,ve,ft);ft!==ut&&(Je||(Je=!0,me=v(me)),ut===void 0?(me=w(me,Ue),typeof ke=="number"&&Le++):me[Ue]=ut),ve.ascend()}return Qe&&(Qe.r!==void 0?(ve.write("r",(0,l.default)(me)),me=void 0):Qe.p!=null&&(me=void 0)),me};if(Ke(K,ue,H),ue.get(),le){let Ee=function(ve,me,Qe,Je,Le){const ke=me.getComponent();if(ke){ke.i!==void 0?(Je=ke.i,Le=!0):ke.d!=null&&(Je=Ge[ke.d],ve=Oe[ke.d],Le=!1,ke.d);let wt=j(ke);if(wt&&wt.makeInvertible){const jt=A(ke);X(Qe,wt,wt.makeInvertible(jt,Je),!0)}}let Ue=0,ft=0;const ut=(0,a.advancer)(ve,(wt,jt)=>O(jt)?Ue-wt-1:wt-Ue,(wt,jt)=>{O(jt)&&Ue++});for(const wt of me)if(typeof wt=="number"){const jt=wt-ft,Ft=ut(jt),$t=D(Je,Le?jt:jt+Ue);Qe.descend(wt),Ee(Ft,me,Qe,$t,Le),m(me.getComponent())&&ft++,Qe.ascend()}else{const jt=D(Je,wt);Qe.descend(wt),Ee(ut(wt),me,Qe,jt,Le),Qe.ascend()}ut.end()};var Xe=Ee;ue.reset(),Ee(K.clone(),K,ue,H,!1)}return ue.get()}function Ie($,H){return fe(Be($,H))}const je=0,ie=1,lt=$=>{if($==null)return null;const H=$.slice();for(let K=0;K<$.length;K++){const ue=H[K];Array.isArray(ue)&&(H[K]=lt(ue))}return H};function en($,H,K){h(K==="left"||K==="right","Direction must be left or right");const ue=K==="left"?je:ie;if(f.quiet=!d,f.prefix=0,H==null)return{ok:!0,result:$};ae($),ae(H);let le=null;const Oe=[],Ge=[],Ke=[],oe=[],Xe=[],Ee=[],ve=[],me=[],Qe=[],Je=[],Le=[],ke=[],Ue=[],ft=[],ut=[];let wt=0;const jt=(0,a.readCursor)($),Ft=(0,a.readCursor)(H),$t=(0,a.writeCursor)();if(function rt(De,Ne=null,Ve){const ye=p(Ne);ye&&(ye.r!==void 0?Ve=Ne.clone():ye.p!=null&&(Ve=null,Ee[ye.p]=De.clone()));const $e=De.getComponent();let nt;$e&&(nt=$e.p)!=null&&(Xe[nt]=Ne?Ne.clone():null,Ke[nt]=De.clone(),Ve&&(Je[nt]=!0,Qe[nt]=Ve),ye&&ye.p!=null&&(ft[nt]=ye.p));const it=(0,a.advancer)(Ne);for(const at of De)rt(De,it(at),Ve);it.end()}(Ft,jt,null),function rt(De,Ne,Ve,ye,$e){const nt=Ve.getComponent();let it,at=!1;nt&&((it=nt.d)!=null?(oe[it]=Ve.clone(),ye!=null&&(ut[ye]==null&&(ut[ye]=[]),ut[ye].push(it)),De=Xe[it]||null,Ne=Ke[it]||null,Je[it]?($e&&(Le[it]=!0),$e=Qe[it]||null):!$e||ue!==ie&&ft[it]!=null||le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)($e.getPath()),op2:(0,i.moveOp)(Ne.getPath(),Ve.getPath())}),at=!0):nt.i!==void 0&&(De=Ne=null,at=!0,$e&&le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)($e.getPath()),op2:(0,i.insertOp)(Ve.getPath(),nt.i)})));const Ye=p(De);Ye&&(Ye.r!==void 0?$e=De.clone():Ye.p!=null&&(Ye.p,ye=Ye.p,$e=null));const Ht=j(nt);Ht&&$e&&le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)($e.getPath()),op2:(0,i.editOp)(Ve.getPath(),Ht,A(nt),!0)});let kt=0,on=0;const He=(0,a.advancer)(Ne,(xe,ht)=>O(ht)?kt-xe-1:xe-kt,(xe,ht)=>{O(ht)&&kt++}),et=(0,a.advancer)(De);for(const xe of Ve)if(typeof xe=="number"){const ht=xe-on,an=He(ht);on+=+rt(et(ht+kt),an,Ve,ye,$e)}else{const ht=He(xe);rt(et(xe),ht,Ve,ye,$e)}return He.end(),et.end(),at}(jt,Ft,Ft.clone(),null,null),oe.map(rt=>rt&&rt.get()),le)return{ok:!1,conflict:le};Le.map(rt=>!!rt);const _n=[];let Tn=null;(function rt(De,Ne,Ve,ye,$e){let nt=!1;const it=p(Ne);if(O(it)){const He=it.p;He!=null?(Ve=oe[He],ye=ke[He]=(0,a.writeCursor)(),nt=!0,$e=null):(Ve=null,$e=Ne.clone())}else m(p(Ve))&&(Ve=null);const at=De.getComponent();if(at){const He=at.p;He!=null?($e&&(me[He]=$e),_n[He]=$e||ue===ie&&nt?null:ye.getComponent(),Oe[He]=De.clone(),Ve&&(ve[He]=Ve.clone())):at.r!==void 0&&($e||ye.write("r",!0),($e||nt)&&(Tn==null&&(Tn=new Set),Tn.add(at)))}let Ye=0,Ht=0;const kt=(0,a.advancer)(Ne,void 0,(He,et)=>{O(et)&&Ye++}),on=(0,a.advancer)(Ve,(He,et)=>m(et)?~(He-Ht):He-Ht,(He,et)=>{m(et)&&Ht++});if(De)for(const He of De)if(typeof He=="string"){const et=kt(He),xe=on(He);ye.descend(He),rt(De,et,xe,ye,$e),ye.ascend()}else{const et=kt(He),xe=He-Ye,ht=O(p(et))?null:on(xe),an=xe+Ht;h(an>=0),ye.descend(an),rt(De,et,ht,ye,$e),ye.ascend()}kt.end(),on.end()})(jt,Ft,Ft.clone(),$t,null),$t.reset();let oi=[];if(function rt(De,Ne,Ve,ye,$e,nt){h(Ne);const it=Ne.getComponent();let at=p(ye),Ye=!1;const Ht=(Ze,xt,tn)=>Ze?(0,i.moveOp)(Ze.getPath(),xt.getPath()):(0,i.insertOp)(xt.getPath(),tn.i);if(m(it)){const Ze=it.d;Ze!=null&&(Ge[Ze]=Ne.clone());const xt=Ze!=null?_n[Ze]:null;let tn=!1;if(it.i!==void 0||Ze!=null&&xt){let _t;at&&(at.i!==void 0||(_t=at.d)!=null&&!Je[_t])&&(tn=_t!=null?Ze!=null&&Ze===ft[_t]:(0,s.default)(at.i,it.i),tn||_t!=null&&ue!==ie&&ft[_t]!=null||le==null&&(le={type:u.ConflictType.DROP_COLLISION,op1:Ht(Ze!=null?Oe[Ze]:null,Ne,it),op2:Ht(_t!=null?Ke[_t]:null,ye,at)})),tn||(nt?le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:Ht(Ze!=null?Oe[Ze]:null,Ne,it),op2:(0,i.removeOp)(nt.getPath())}):(Ze!=null?(oi[wt]=Ze,$e.write("d",xt.p=wt++)):$e.write("i",(0,l.default)(it.i)),Ye=!0))}else if(Ze!=null&&!xt){const _t=me[Ze];_t&&(nt=_t.clone())}Ze!=null?(De=Oe[Ze],Ve=Ee[Ze],ye=ve[Ze]):it.i!==void 0&&(De=Ve=null,tn||(ye=null))}else O(p(De))&&(De=Ve=ye=null);const kt=p(De),on=p(Ve);if(O(on)){const Ze=on.p;on.r!==void 0&&(!kt||kt.r===void 0)||Je[Ze]?(ye=null,nt=Ve.clone()):Ze!=null&&(ye=oe[Ze],ue!==ie&&ft[Ze]!=null||(($e=Ue[Ze])||($e=Ue[Ze]=(0,a.writeCursor)()),$e.reset(),nt=null))}else!m(it)&&m(at)&&(ye=null);at=ye!=null?ye.getComponent():null;const He=j(it);if(He){const Ze=A(it);if(nt)le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.editOp)(Ne.getPath(),He,Ze,!0),op2:(0,i.removeOp)(nt.getPath())});else{const xt=j(at);let tn;if(xt){if(He!==xt)throw Error("Transforming incompatible types");const _t=A(at);tn=He.transform(Ze,_t,K)}else tn=(0,l.default)(Ze);X($e,He,tn)}}let et=0,xe=0,ht=0,an=0,Wr=0,si=0,ur=De!=null&&De.descendFirst(),Ko=ur;const ji=(0,a.advancer)(Ve,void 0,(Ze,xt)=>{O(xt)&&ht++});let Ur=ye!=null&&ye.descendFirst(),Jo=Ur;for(const Ze of Ne)if(typeof Ze=="number"){let xt;const tn=m(Ne.getComponent()),_t=Ze-xe;{let un;for(te();ur&&typeof(un=De.getKey())=="number";){un+=et;const An=De.getComponent(),Hn=O(An);if(un>_t||un===_t&&(!Hn||ue===je&&tn))break;if(Hn){et--;const Tt=An.p;ft.includes(Tt),An.d,p(Ue[An.d]),O(p(Ue[An.d])),(An.r===void 0||Tn&&Tn.has(An))&&(Tt==null||!_n[Tt]||ue!==ie&&ft.includes(Tt))||Wr--}ur=De.nextSibling()}xt=ur&&un===_t?De:null}const Er=_t-et;let lo=ji(Er);const ia=Er-ht;let As=null;{let un,An;for(te();Ur&&typeof(un=ye.getKey())=="number";){An=un-an;const Hn=ye.getComponent(),Tt=m(Hn);if(An>ia)break;if(An===ia){if(!Tt){As=ye;break}{if(ue===je&&tn){As=ye;break}const Li=lo&&O(lo.getComponent());if(ue===je&&Li)break}}if(Tt){const Li=Hn.d;ft[Li],Hn.i===void 0&&(Je[Li]||ft[Li]!=null&&ue!==ie)?(Je[Li]||ft[Li]!=null&&ue===je)&&(an++,si--):an++}Ur=ye.nextSibling()}}const hc=ia+an+Wr+si;h(hc>=0,"trying to descend to a negative index"),$e.descend(hc),tn&&(xt=lo=As=null,xe++),rt(xt,Ne,lo,As,$e,nt)&&si++,$e.ascend()}else{let xt;for(;ur&&(xt=De.getKey(),typeof xt!="string"||!(xt>Ze||xt===Ze));)ur=De.nextSibling();const tn=ur&&xt===Ze?De:null,_t=ji(Ze);let Er;for(;Ur&&(Er=ye.getKey(),typeof Er!="string"||!(Er>Ze||Er===Ze));)Ur=ye.nextSibling();const lo=Ur&&Er===Ze?ye:null;$e.descend(Ze),rt(tn,Ne,_t,lo,$e,nt),$e.ascend()}return ji.end(),Ko&&De.ascend(),Jo&&ye.ascend(),Ye}(jt,jt.clone(),Ft,Ft.clone(),$t,null),le)return{ok:!1,conflict:le};$t.reset();const Cr=(rt,De,Ne)=>rt.traverse(De,(Ve,ye)=>{Ve.d!=null&&Ne(Ve.d,rt,ye)});(Je.length||ke.length)&&(Cr(Ft,$t,(rt,De,Ne)=>{Je[rt]&&!Le[rt]&&Ne.write("r",!0),ke[rt]&&Ne.mergeTree(ke[rt].get())}),$t.reset());const ar=[],Gn=[];if((Ue.length||Je.length)&&!le){const rt=(0,a.readCursor)(lt($t.get()));if(Cr(rt,null,(De,Ne)=>{ar[De]=Ne.clone()}),Ue.forEach(De=>{De&&Cr((0,a.readCursor)(De.get()),null,(Ne,Ve)=>{ar[Ne]=Ve.clone()})}),function De(Ne,Ve,ye,$e,nt,it){f.prefix++;const at=p(Ve);if(at&&O(at))if(at.p!=null){const et=at.p;ar[et].getPath(),ye=ar[et],$e=Gn[et]=(0,a.writeCursor)()}else at.r!==void 0&&(ye=null);else m(p(ye))&&(ye=null);const Ye=Ne.getComponent();if(Ye){let et;if((et=Ye.d)!=null){const xe=Ue[et];xe&&(xe.get(),$e.mergeTree(xe.get()),ye=(0,a.readCursor)(xe.get()))}}let Ht=0,kt=0;const on=(0,a.advancer)(Ve,void 0,(et,xe)=>{O(xe)&&Ht--}),He=(0,a.advancer)(ye,(et,xe)=>m(xe)?-(et-kt)-1:et-kt,(et,xe)=>{m(xe)&&kt++});for(const et of Ne)if(typeof et=="number"){const xe=on(et),ht=et+Ht,an=He(ht),Wr=ht+kt;$e.descend(Wr),De(Ne,xe,an,$e),$e.ascend()}else $e.descend(et),De(Ne,on(et),He(et),$e),$e.ascend();on.end(),He.end()}(Ft,rt,rt.clone(),$t),$t.reset(),le)return{ok:!1,conflict:le};if($t.get(),Gn.length){const De=Gn.map(Ve=>Ve?Ve.get():null),Ne=(0,a.readCursor)(lt($t.get()));if(Cr(Ne,$t,(Ve,ye,$e)=>{const nt=De[Ve];nt&&($e.mergeTree(nt),De[Ve]=null)}),De.find(Ve=>Ve)){const Ve=(0,a.writeCursor)(),ye=(0,a.writeCursor)();let $e=0,nt=0;De.forEach(it=>{it!=null&&Cr((0,a.readCursor)(it),null,at=>{const Ye=oi[at];Ve.writeMove(Oe[Ye].getPath(),Ge[Ye].getPath(),$e++);const Ht=ut[Ye];Ht&&Ht.forEach(kt=>{Je[kt]||ue!==ie&&ft[kt]!=null||ye.writeMove(Ke[kt].getPath(),oe[kt].getPath(),nt++)})})}),le={type:u.ConflictType.BLACKHOLE,op1:Ve.get(),op2:ye.get()}}}}return le?{ok:!1,conflict:le}:{ok:!0,result:$t.get()}}const Xr=$=>{const H=new Error("Transform detected write conflict");throw H.conflict=$,H.type=H.name="writeConflict",H};function xr($,H,K){const ue=en($,H,K);if(ue.ok)return ue.result;Xr(ue.conflict)}const yn=$=>{const H=(0,a.writeCursor)();return(0,a.readCursor)($).traverse(H,(K,ue)=>{(m(K)||j(K))&&ue.write("r",!0)}),H.get()},Ho=($,H)=>{const{type:K,op1:ue,op2:le}=$;switch(K){case u.ConflictType.DROP_COLLISION:return H==="left"?[null,yn(le)]:[yn(ue),null];case u.ConflictType.RM_UNEXPECTED_CONTENT:let Oe=!1;return(0,a.readCursor)(ue).traverse(null,Ge=>{Ge.r!==void 0&&(Oe=!0)}),Oe?[null,yn(le)]:[yn(ue),null];case u.ConflictType.BLACKHOLE:return[yn(ue),yn(le)];default:throw Error("Unrecognised conflict: "+K)}};function Ni($,H,K,ue){let le=null;for(;;){const Oe=en(H,K,ue);if(Oe.ok)return Y(le,Oe.result);{const{conflict:Ge}=Oe;$(Ge)||Xr(Ge);const[Ke,oe]=Ho(Ge,ue);H=Y(B(H),Ke),K=Y(B(K),oe),le=Y(le,oe)}}}},{"./cursor.js":23,"./deepClone.js":24,"./deepEqual.js":25,"./log":28,"./types.js":29,assert:1,"ot-text-unicode":31}],28:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});function o(...s){if(o.quiet)return;const{inspect:l}=n("util"),a=c=>typeof c=="string"?c:l(c,{depth:10,colors:!0}),u=Array(o.prefix).fill(" ").join("");console.log(u+s.map(a).join(" "))}i.default=o,o.quiet=!0,o.prefix=0},{util:37}],29:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.ConflictType=void 0;var o;(function(s){s[s.RM_UNEXPECTED_CONTENT=1]="RM_UNEXPECTED_CONTENT",s[s.DROP_COLLISION=2]="DROP_COLLISION",s[s.BLACKHOLE=3]="BLACKHOLE"})(o||(i.ConflictType=o={}))},{}],30:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});const o=n("./type"),s=n("unicount");function l(a,u){return{get:a,getLength(){return a().length},insert(c,f,h){const d=s.strPosToUni(a(),c);return u([d,f],h)},remove(c,f,h){const d=s.strPosToUni(a(),c);return u([d,{d:f}],h)},_onOp(c){o.eachOp(c,(f,h,d)=>{switch(typeof f){case"string":this.onInsert&&this.onInsert(d,f);break;case"object":const p=o.dlen(f.d);this.onRemove&&this.onRemove(d,p)}})},onInsert:null,onRemove:null}}i.default=l,l.provides={text:!0}},{"./type":32,unicount:34}],31:[function(n,r,i){var o=this&&this.__createBinding||(Object.create?function(v,O,m,y){y===void 0&&(y=m),Object.defineProperty(v,y,{enumerable:!0,get:function(){return O[m]}})}:function(v,O,m,y){y===void 0&&(y=m),v[y]=O[m]}),s=this&&this.__setModuleDefault||(Object.create?function(v,O){Object.defineProperty(v,"default",{enumerable:!0,value:O})}:function(v,O){v.default=O}),l=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var O={};if(v!=null)for(var m in v)Object.hasOwnProperty.call(v,m)&&o(O,v,m);return s(O,v),O},a=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};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(v){return v},toString(v){return v},builder(v){if(typeof v!="string")throw Error("Invalid document snapshot: "+v);const O=[];return{skip(m){let y=u.uniToStrPos(v,m);if(y>v.length)throw Error("The op is too long for this document");O.push(v.slice(0,y)),v=v.slice(y)},append(m){O.push(m)},del(m){v=v.slice(u.uniToStrPos(v,m))},build(){return O.join("")+v}}},slice:c.uniSlice},d=c.default(h),p=Object.assign(Object.assign({},d),{api:f.default});i.type=p,i.insert=(v,O)=>O.length===0?[]:v===0?[O]:[v,O],i.remove=(v,O)=>c.dlen(O)===0?[]:v===0?[{d:O}]:[v,{d:O}];var g=n("./type");Object.defineProperty(i,"makeType",{enumerable:!0,get:function(){return g.default}})},{"./api":30,"./type":32,unicount:34}],32:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniSlice=i.dlen=i.eachOp=void 0;const o=n("unicount"),s=k=>{if(!Array.isArray(k))throw Error("Op must be an array of components");let C=null;for(let Q=0;Q<k.length;Q++){const D=k[Q];switch(typeof D){case"object":if(typeof D.d!="number"&&typeof D.d!="string")throw Error("Delete must be number or string");if(i.dlen(D.d)<=0)throw Error("Deletes must not be empty");break;case"string":if(!(D.length>0))throw Error("Inserts cannot be empty");break;case"number":if(!(D>0))throw Error("Skip components must be >0");if(typeof C=="number")throw Error("Adjacent skip components should be combined");break}C=D}if(typeof C=="number")throw Error("Op has a trailing skip")};function l(k,C){let Q=0,D=0;for(let N=0;N<k.length;N++){const V=k[N];switch(C(V,Q,D),typeof V){case"object":Q+=i.dlen(V.d);break;case"string":D+=o.strPosToUni(V);break;case"number":Q+=V,D+=V;break}}}i.eachOp=l;function a(k,C){const Q=[],D=f(Q);return l(k,(N,V,G)=>{D(C(N,V,G))}),g(Q)}const u=k=>k,c=k=>a(k,u);i.dlen=k=>typeof k=="number"?k:o.strPosToUni(k);const f=k=>C=>{if(!(!C||C.d===0||C.d===""))if(k.length===0)k.push(C);else if(typeof C==typeof k[k.length-1])if(typeof C=="object"){const Q=k[k.length-1];Q.d=typeof Q.d=="string"&&typeof C.d=="string"?Q.d+C.d:i.dlen(Q.d)+i.dlen(C.d)}else k[k.length-1]+=C;else k.push(C)},h=k=>typeof k=="number"?k:typeof k=="string"?o.strPosToUni(k):typeof k.d=="number"?k.d:o.strPosToUni(k.d);i.uniSlice=(k,C,Q)=>{const D=o.uniToStrPos(k,C),N=Q==null?1/0:o.uniToStrPos(k,Q);return k.slice(D,N)};const d=(k,C,Q)=>typeof k=="number"?Q==null?k-C:Math.min(k,Q)-C:i.uniSlice(k,C,Q),p=k=>{let C=0,Q=0;return{take:(V,G)=>{if(C===k.length)return V===-1?null:V;const M=k[C];let j;if(typeof M=="number")return V===-1||M-Q<=V?(j=M-Q,++C,Q=0,j):(Q+=V,V);if(typeof M=="string"){if(V===-1||G==="i"||o.strPosToUni(M.slice(Q))<=V)return j=M.slice(Q),++C,Q=0,j;{const A=Q+o.uniToStrPos(M.slice(Q),V);return j=M.slice(Q,A),Q=A,j}}else{if(V===-1||G==="d"||i.dlen(M.d)-Q<=V)return j={d:d(M.d,Q)},++C,Q=0,j;{let A=d(M.d,Q,Q+V);return Q+=V,{d:A}}}},peek:()=>k[C]}},g=k=>(k.length>0&&typeof k[k.length-1]=="number"&&k.pop(),k);function v(k,C,Q){if(Q!=="left"&&Q!=="right")throw Error("side ("+Q+") must be 'left' or 'right'");s(k),s(C);const D=[],N=f(D),{take:V,peek:G}=p(k);for(let j=0;j<C.length;j++){const A=C[j];let X,z;switch(typeof A){case"number":for(X=A;X>0;)z=V(X,"i"),N(z),typeof z!="string"&&(X-=h(z));break;case"string":Q==="left"&&typeof G()=="string"&&N(V(-1)),N(o.strPosToUni(A));break;case"object":for(X=i.dlen(A.d);X>0;)switch(z=V(X,"i"),typeof z){case"number":X-=z;break;case"string":N(z);break;case"object":X-=i.dlen(z.d)}break}}let M;for(;M=V(-1);)N(M);return g(D)}function O(k,C){s(k),s(C);const Q=[],D=f(Q),{take:N}=p(k);for(let G=0;G<C.length;G++){const M=C[G];let j,A;switch(typeof M){case"number":for(j=M;j>0;)A=N(j,"d"),D(A),typeof A!="object"&&(j-=h(A));break;case"string":D(M);break;case"object":j=i.dlen(M.d);let X=0;for(;X<j;)switch(A=N(j-X,"d"),typeof A){case"number":D({d:d(M.d,X,X+A)}),X+=A;break;case"string":X+=o.strPosToUni(A);break;case"object":D(A)}break}}let V;for(;V=N(-1);)D(V);return g(Q)}const m=(k,C)=>{let Q=0;for(let D=0;D<C.length&&k>Q;D++){const N=C[D];switch(typeof N){case"number":{Q+=N;break}case"string":const V=o.strPosToUni(N);Q+=V,k+=V;break;case"object":k-=Math.min(i.dlen(N.d),k-Q);break}}return k},y=(k,C)=>typeof k=="number"?m(k,C):k.map(Q=>m(Q,C));function b(k,C,Q){return a(k,(D,N)=>typeof D=="object"&&typeof D.d=="number"?{d:Q.slice(C,N,N+D.d)}:D)}function x(k){return a(k,C=>{switch(typeof C){case"object":if(typeof C.d=="number")throw Error("Cannot invert text op: Deleted characters missing from operation. makeInvertible must be called first.");return C.d;case"string":return{d:C};case"number":return C}})}function E(k){return a(k,C=>typeof C=="object"&&typeof C.d=="string"?{d:o.strPosToUni(C.d)}:C)}function T(k){let C=!0;return l(k,Q=>{typeof Q=="object"&&typeof Q.d=="number"&&(C=!1)}),C}function w(k){return{name:"text-unicode",uri:"http://sharejs.org/types/text-unicode",trim:g,normalize:c,checkOp:s,create(C=""){if(typeof C!="string")throw Error("Initial data must be a string");return k.create(C)},apply(C,Q){s(Q);const D=k.builder(C);for(let N=0;N<Q.length;N++){const V=Q[N];switch(typeof V){case"number":D.skip(V);break;case"string":D.append(V);break;case"object":D.del(i.dlen(V.d));break}}return D.build()},transform:v,compose:O,transformPosition:m,transformSelection:y,isInvertible:T,makeInvertible(C,Q){return b(C,Q,k)},stripInvertible:E,invert:x,invertWithDoc(C,Q){return x(b(C,Q,k))},isNoop:C=>C.length===0}}i.default=w},{unicount:34}],33:[function(n,r,i){var o=r.exports={},s,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"?s=setTimeout:s=a}catch{s=a}try{typeof clearTimeout=="function"?l=clearTimeout:l=u}catch{l=u}})();function c(b){if(s===setTimeout)return setTimeout(b,0);if((s===a||!s)&&setTimeout)return s=setTimeout,setTimeout(b,0);try{return s(b,0)}catch{try{return s.call(null,b,0)}catch{return s.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=[],d=!1,p,g=-1;function v(){!d||!p||(d=!1,p.length?h=p.concat(h):g=-1,h.length&&O())}function O(){if(!d){var b=c(v);d=!0;for(var x=h.length;x;){for(p=h,h=[];++g<x;)p&&p[g].run();g=-1,x=h.length}p=null,d=!1,f(b)}}o.nextTick=function(b){var x=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)x[E-1]=arguments[E];h.push(new m(b,x)),h.length===1&&!d&&c(O)};function m(b,x){this.fun=b,this.array=x}m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function y(){}o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(b){return[]},o.binding=function(b){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(b){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],34:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniToStrPos=i.strPosToUni=void 0,i.strPosToUni=(o,s=o.length)=>{let l=0,a=0;for(;a<s;a++){const u=o.charCodeAt(a);u>=55296&&u<=57343&&(l++,a++)}if(a!==s)throw Error("Invalid offset - splits unicode bytes");return a-l},i.uniToStrPos=(o,s)=>{let l=0;for(;s>0;s--){const a=o.charCodeAt(l);l+=a>=55296&&a<=57343?2:1}return l}},{}],35:[function(n,r,i){arguments[4][3][0].apply(i,arguments)},{dup:3}],36:[function(n,r,i){var o=n("is-arguments"),s=n("is-generator-function"),l=n("which-typed-array"),a=n("is-typed-array");function u($){return $.call.bind($)}var c=typeof BigInt<"u",f=typeof Symbol<"u",h=u(Object.prototype.toString),d=u(Number.prototype.valueOf),p=u(String.prototype.valueOf),g=u(Boolean.prototype.valueOf);if(c)var v=u(BigInt.prototype.valueOf);if(f)var O=u(Symbol.prototype.valueOf);function m($,H){if(typeof $!="object")return!1;try{return H($),!0}catch{return!1}}i.isArgumentsObject=o,i.isGeneratorFunction=s,i.isTypedArray=a;function y($){return typeof Promise<"u"&&$ instanceof Promise||$!==null&&typeof $=="object"&&typeof $.then=="function"&&typeof $.catch=="function"}i.isPromise=y;function b($){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView($):a($)||F($)}i.isArrayBufferView=b;function x($){return l($)==="Uint8Array"}i.isUint8Array=x;function E($){return l($)==="Uint8ClampedArray"}i.isUint8ClampedArray=E;function T($){return l($)==="Uint16Array"}i.isUint16Array=T;function w($){return l($)==="Uint32Array"}i.isUint32Array=w;function k($){return l($)==="Int8Array"}i.isInt8Array=k;function C($){return l($)==="Int16Array"}i.isInt16Array=C;function Q($){return l($)==="Int32Array"}i.isInt32Array=Q;function D($){return l($)==="Float32Array"}i.isFloat32Array=D;function N($){return l($)==="Float64Array"}i.isFloat64Array=N;function V($){return l($)==="BigInt64Array"}i.isBigInt64Array=V;function G($){return l($)==="BigUint64Array"}i.isBigUint64Array=G;function M($){return h($)==="[object Map]"}M.working=typeof Map<"u"&&M(new Map);function j($){return typeof Map>"u"?!1:M.working?M($):$ instanceof Map}i.isMap=j;function A($){return h($)==="[object Set]"}A.working=typeof Set<"u"&&A(new Set);function X($){return typeof Set>"u"?!1:A.working?A($):$ instanceof Set}i.isSet=X;function z($){return h($)==="[object WeakMap]"}z.working=typeof WeakMap<"u"&&z(new WeakMap);function pe($){return typeof WeakMap>"u"?!1:z.working?z($):$ instanceof WeakMap}i.isWeakMap=pe;function ae($){return h($)==="[object WeakSet]"}ae.working=typeof WeakSet<"u"&&ae(new WeakSet);function B($){return ae($)}i.isWeakSet=B;function q($){return h($)==="[object ArrayBuffer]"}q.working=typeof ArrayBuffer<"u"&&q(new ArrayBuffer);function te($){return typeof ArrayBuffer>"u"?!1:q.working?q($):$ instanceof ArrayBuffer}i.isArrayBuffer=te;function we($){return h($)==="[object DataView]"}we.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&we(new DataView(new ArrayBuffer(1),0,1));function F($){return typeof DataView>"u"?!1:we.working?we($):$ instanceof DataView}i.isDataView=F;var W=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Y($){return h($)==="[object SharedArrayBuffer]"}function fe($){return typeof W>"u"?!1:(typeof Y.working>"u"&&(Y.working=Y(new W)),Y.working?Y($):$ instanceof W)}i.isSharedArrayBuffer=fe;function Se($){return h($)==="[object AsyncFunction]"}i.isAsyncFunction=Se;function Be($){return h($)==="[object Map Iterator]"}i.isMapIterator=Be;function Ie($){return h($)==="[object Set Iterator]"}i.isSetIterator=Ie;function je($){return h($)==="[object Generator]"}i.isGeneratorObject=je;function ie($){return h($)==="[object WebAssembly.Module]"}i.isWebAssemblyCompiledModule=ie;function lt($){return m($,d)}i.isNumberObject=lt;function en($){return m($,p)}i.isStringObject=en;function Xr($){return m($,g)}i.isBooleanObject=Xr;function xr($){return c&&m($,v)}i.isBigIntObject=xr;function yn($){return f&&m($,O)}i.isSymbolObject=yn;function Ho($){return lt($)||en($)||Xr($)||xr($)||yn($)}i.isBoxedPrimitive=Ho;function Ni($){return typeof Uint8Array<"u"&&(te($)||fe($))}i.isAnyArrayBuffer=Ni,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function($){Object.defineProperty(i,$,{enumerable:!1,value:function(){throw new Error($+" is not supported in userland")}})})},{"is-arguments":18,"is-generator-function":20,"is-typed-array":21,"which-typed-array":38}],37:[function(n,r,i){(function(o){(function(){var s=Object.getOwnPropertyDescriptors||function(W){for(var Y=Object.keys(W),fe={},Se=0;Se<Y.length;Se++)fe[Y[Se]]=Object.getOwnPropertyDescriptor(W,Y[Se]);return fe},l=/%[sdj%]/g;i.format=function(F){if(!C(F)){for(var W=[],Y=0;Y<arguments.length;Y++)W.push(f(arguments[Y]));return W.join(" ")}for(var Y=1,fe=arguments,Se=fe.length,Be=String(F).replace(l,function(je){if(je==="%%")return"%";if(Y>=Se)return je;switch(je){case"%s":return String(fe[Y++]);case"%d":return Number(fe[Y++]);case"%j":try{return JSON.stringify(fe[Y++])}catch{return"[Circular]"}default:return je}}),Ie=fe[Y];Y<Se;Ie=fe[++Y])T(Ie)||!V(Ie)?Be+=" "+Ie:Be+=" "+f(Ie);return Be},i.deprecate=function(F,W){if(typeof o<"u"&&o.noDeprecation===!0)return F;if(typeof o>"u")return function(){return i.deprecate(F,W).apply(this,arguments)};var Y=!1;function fe(){if(!Y){if(o.throwDeprecation)throw new Error(W);o.traceDeprecation?console.trace(W):console.error(W),Y=!0}return F.apply(this,arguments)}return fe};var a={},u=/^$/;if({}.NODE_DEBUG){var c={}.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+c+"$","i")}i.debuglog=function(F){if(F=F.toUpperCase(),!a[F])if(u.test(F)){var W=o.pid;a[F]=function(){var Y=i.format.apply(i,arguments);console.error("%s %d: %s",F,W,Y)}}else a[F]=function(){};return a[F]};function f(F,W){var Y={seen:[],stylize:d};return arguments.length>=3&&(Y.depth=arguments[2]),arguments.length>=4&&(Y.colors=arguments[3]),E(W)?Y.showHidden=W:W&&i._extend(Y,W),D(Y.showHidden)&&(Y.showHidden=!1),D(Y.depth)&&(Y.depth=2),D(Y.colors)&&(Y.colors=!1),D(Y.customInspect)&&(Y.customInspect=!0),Y.colors&&(Y.stylize=h),g(Y,F,Y.depth)}i.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(F,W){var Y=f.styles[W];return Y?"\x1B["+f.colors[Y][0]+"m"+F+"\x1B["+f.colors[Y][1]+"m":F}function d(F,W){return F}function p(F){var W={};return F.forEach(function(Y,fe){W[Y]=!0}),W}function g(F,W,Y){if(F.customInspect&&W&&j(W.inspect)&&W.inspect!==i.inspect&&!(W.constructor&&W.constructor.prototype===W)){var fe=W.inspect(Y,F);return C(fe)||(fe=g(F,fe,Y)),fe}var Se=v(F,W);if(Se)return Se;var Be=Object.keys(W),Ie=p(Be);if(F.showHidden&&(Be=Object.getOwnPropertyNames(W)),M(W)&&(Be.indexOf("message")>=0||Be.indexOf("description")>=0))return O(W);if(Be.length===0){if(j(W)){var je=W.name?": "+W.name:"";return F.stylize("[Function"+je+"]","special")}if(N(W))return F.stylize(RegExp.prototype.toString.call(W),"regexp");if(G(W))return F.stylize(Date.prototype.toString.call(W),"date");if(M(W))return O(W)}var ie="",lt=!1,en=["{","}"];if(x(W)&&(lt=!0,en=["[","]"]),j(W)){var Xr=W.name?": "+W.name:"";ie=" [Function"+Xr+"]"}if(N(W)&&(ie=" "+RegExp.prototype.toString.call(W)),G(W)&&(ie=" "+Date.prototype.toUTCString.call(W)),M(W)&&(ie=" "+O(W)),Be.length===0&&(!lt||W.length==0))return en[0]+ie+en[1];if(Y<0)return N(W)?F.stylize(RegExp.prototype.toString.call(W),"regexp"):F.stylize("[Object]","special");F.seen.push(W);var xr;return lt?xr=m(F,W,Y,Ie,Be):xr=Be.map(function(yn){return y(F,W,Y,Ie,yn,lt)}),F.seen.pop(),b(xr,ie,en)}function v(F,W){if(D(W))return F.stylize("undefined","undefined");if(C(W)){var Y="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(Y,"string")}if(k(W))return F.stylize(""+W,"number");if(E(W))return F.stylize(""+W,"boolean");if(T(W))return F.stylize("null","null")}function O(F){return"["+Error.prototype.toString.call(F)+"]"}function m(F,W,Y,fe,Se){for(var Be=[],Ie=0,je=W.length;Ie<je;++Ie)B(W,String(Ie))?Be.push(y(F,W,Y,fe,String(Ie),!0)):Be.push("");return Se.forEach(function(ie){ie.match(/^\d+$/)||Be.push(y(F,W,Y,fe,ie,!0))}),Be}function y(F,W,Y,fe,Se,Be){var Ie,je,ie;if(ie=Object.getOwnPropertyDescriptor(W,Se)||{value:W[Se]},ie.get?ie.set?je=F.stylize("[Getter/Setter]","special"):je=F.stylize("[Getter]","special"):ie.set&&(je=F.stylize("[Setter]","special")),B(fe,Se)||(Ie="["+Se+"]"),je||(F.seen.indexOf(ie.value)<0?(T(Y)?je=g(F,ie.value,null):je=g(F,ie.value,Y-1),je.indexOf(`
57
- `)>-1&&(Be?je=je.split(`
58
- `).map(function(lt){return" "+lt}).join(`
59
- `).slice(2):je=`
60
- `+je.split(`
61
- `).map(function(lt){return" "+lt}).join(`
62
- `))):je=F.stylize("[Circular]","special")),D(Ie)){if(Be&&Se.match(/^\d+$/))return je;Ie=JSON.stringify(""+Se),Ie.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ie=Ie.slice(1,-1),Ie=F.stylize(Ie,"name")):(Ie=Ie.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ie=F.stylize(Ie,"string"))}return Ie+": "+je}function b(F,W,Y){var fe=F.reduce(function(Se,Be){return Be.indexOf(`
63
- `)>=0,Se+Be.replace(/\u001b\[\d\d?m/g,"").length+1},0);return fe>60?Y[0]+(W===""?"":W+`
64
- `)+" "+F.join(`,
65
- `)+" "+Y[1]:Y[0]+W+" "+F.join(", ")+" "+Y[1]}i.types=n("./support/types");function x(F){return Array.isArray(F)}i.isArray=x;function E(F){return typeof F=="boolean"}i.isBoolean=E;function T(F){return F===null}i.isNull=T;function w(F){return F==null}i.isNullOrUndefined=w;function k(F){return typeof F=="number"}i.isNumber=k;function C(F){return typeof F=="string"}i.isString=C;function Q(F){return typeof F=="symbol"}i.isSymbol=Q;function D(F){return F===void 0}i.isUndefined=D;function N(F){return V(F)&&X(F)==="[object RegExp]"}i.isRegExp=N,i.types.isRegExp=N;function V(F){return typeof F=="object"&&F!==null}i.isObject=V;function G(F){return V(F)&&X(F)==="[object Date]"}i.isDate=G,i.types.isDate=G;function M(F){return V(F)&&(X(F)==="[object Error]"||F instanceof Error)}i.isError=M,i.types.isNativeError=M;function j(F){return typeof F=="function"}i.isFunction=j;function A(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||typeof F>"u"}i.isPrimitive=A,i.isBuffer=n("./support/isBuffer");function X(F){return Object.prototype.toString.call(F)}function z(F){return F<10?"0"+F.toString(10):F.toString(10)}var pe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ae(){var F=new Date,W=[z(F.getHours()),z(F.getMinutes()),z(F.getSeconds())].join(":");return[F.getDate(),pe[F.getMonth()],W].join(" ")}i.log=function(){console.log("%s - %s",ae(),i.format.apply(i,arguments))},i.inherits=n("inherits"),i._extend=function(F,W){if(!W||!V(W))return F;for(var Y=Object.keys(W),fe=Y.length;fe--;)F[Y[fe]]=W[Y[fe]];return F};function B(F,W){return Object.prototype.hasOwnProperty.call(F,W)}var q=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;i.promisify=function(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');if(q&&W[q]){var Y=W[q];if(typeof Y!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Y,q,{value:Y,enumerable:!1,writable:!1,configurable:!0}),Y}function Y(){for(var fe,Se,Be=new Promise(function(ie,lt){fe=ie,Se=lt}),Ie=[],je=0;je<arguments.length;je++)Ie.push(arguments[je]);Ie.push(function(ie,lt){ie?Se(ie):fe(lt)});try{W.apply(this,Ie)}catch(ie){Se(ie)}return Be}return Object.setPrototypeOf(Y,Object.getPrototypeOf(W)),q&&Object.defineProperty(Y,q,{value:Y,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Y,s(W))},i.promisify.custom=q;function te(F,W){if(!F){var Y=new Error("Promise was rejected with a falsy value");Y.reason=F,F=Y}return W(F)}function we(F){if(typeof F!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var Y=[],fe=0;fe<arguments.length;fe++)Y.push(arguments[fe]);var Se=Y.pop();if(typeof Se!="function")throw new TypeError("The last argument must be of type Function");var Be=this,Ie=function(){return Se.apply(Be,arguments)};F.apply(this,Y).then(function(je){o.nextTick(Ie.bind(null,null,je))},function(je){o.nextTick(te.bind(null,je,Ie))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(F)),Object.defineProperties(W,s(F)),W}i.callbackify=we}).call(this)}).call(this,n("_process"))},{"./support/isBuffer":35,"./support/types":36,_process:33,inherits:17}],38:[function(n,r,i){(function(o){(function(){var s=n("for-each"),l=n("available-typed-arrays"),a=n("call-bind/callBound"),u=n("gopd"),c=a("Object.prototype.toString"),f=n("has-tostringtag/shams")(),h=typeof globalThis>"u"?o:globalThis,d=l(),p=a("String.prototype.slice"),g={},v=Object.getPrototypeOf;f&&u&&v&&s(d,function(y){if(typeof h[y]=="function"){var b=new h[y];if(Symbol.toStringTag in b){var x=v(b),E=u(x,Symbol.toStringTag);if(!E){var T=v(x);E=u(T,Symbol.toStringTag)}g[y]=E.get}}});var O=function(b){var x=!1;return s(g,function(E,T){if(!x)try{var w=E.call(b);w===T&&(x=w)}catch{}}),x},m=n("is-typed-array");r.exports=function(b){return m(b)?!f||!(Symbol.toStringTag in b)?p(c(b),8,-1):O(b):!1}}).call(this)}).call(this,typeof $r<"u"?$r:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":5,"call-bind/callBound":6,"for-each":8,gopd:12,"has-tostringtag/shams":15,"is-typed-array":21}],39:[function(n,r,i){const o=n("ot-json1-presence"),s=n("ot-text-unicode");r.exports={json1Presence:o,textUnicode:s}},{"ot-json1-presence":26,"ot-text-unicode":31}]},{},[39])(39)})})(TC);var kM=TC.exports;const PM=Uo(kM),{json1Presence:lv,textUnicode:AC}=PM,_S=()=>Math.floor(Math.random()*1e10)+"";class pt{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),Si.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),Si.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 eu(this),o=new eu(e);for(let s=n,l=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new eu(this,e)}iterRange(e,n=this.length){return new RC(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 DC(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]?pt.empty:e.length<=32?new nn(e):Si.from(nn.split(e,[]))}}class nn extends pt{constructor(e,n=xM(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 o=0;;o++){let s=this.text[o],l=i+s.length;if((n?r:l)>=e)return new CM(i,l,r,s);i=l+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new nn(TS(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),l=Vf(o.text,s.text.slice(),0,o.length);if(l.length<=32)r.push(new nn(l,s.length+o.length));else{let a=l.length>>1;r.push(new nn(l.slice(0,a)),new nn(l.slice(a)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof nn))return super.replace(e,n,r);let i=Vf(this.text,Vf(r.text,TS(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new nn(i,o):Si.from(nn.split(i,[]),o)}sliceString(e,n=this.length,r=`
66
- `){let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let l=this.text[s],a=o+l.length;o>e&&s&&(i+=r),e<a&&n>o&&(i+=l.slice(Math.max(0,e-o),n-o)),o=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 o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new nn(r,i)),r=[],i=-1);return i>-1&&n.push(new nn(r,i)),n}}class Si extends pt{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 o=0;;o++){let s=this.children[o],l=i+s.length,a=r+s.lines-1;if((n?a:l)>=e)return s.lineInner(e,n,r,i);i=l+1,r=a+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let l=this.children[o],a=s+l.length;if(e<=a&&n>=s){let u=i&((s<=e?1:0)|(a>=n?2:0));s>=e&&a<=n&&!u?r.push(l):l.decompose(e-s,n-s,r,u)}s=a+1}}replace(e,n,r){if(r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],l=o+s.length;if(e>=o&&n<=l){let a=s.replace(e-o,n-o,r),u=this.lines-s.lines+a.lines;if(a.lines<u>>5-1&&a.lines>u>>5+1){let c=this.children.slice();return c[i]=a,new Si(c,this.length-(n-e)+r.length)}return super.replace(o,l,a)}o=l+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
67
- `){let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let l=this.children[o],a=s+l.length;s>e&&o&&(i+=r),e<a&&n>s&&(i+=l.sliceString(e-s,n-s,r)),s=a+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Si))return 0;let r=0,[i,o,s,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==l)return r;let a=this.children[i],u=e.children[o];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 d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new nn(d,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,l=[],a=0,u=-1,c=[];function f(d){let p;if(d.lines>o&&d instanceof Si)for(let g of d.children)f(g);else d.lines>s&&(a>s||!a)?(h(),l.push(d)):d instanceof nn&&a&&(p=c[c.length-1])instanceof nn&&d.lines+p.lines<=32?(a+=d.lines,u+=d.length+1,c[c.length-1]=new nn(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>i&&h(),a+=d.lines,u+=d.length+1,c.push(d))}function h(){a!=0&&(l.push(c.length==1?c[0]:Si.from(c,u)),u=-1,a=c.length=0)}for(let d of e)f(d);return h(),l.length==1?l[0]:new Si(l,n)}}pt.empty=new nn([""],0);function xM(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Vf(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let l=t[o],a=i+l.length;a>=n&&(a>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),s?(e[e.length-1]+=l,s=!1):e.push(l)),i=a+1}return e}function TS(t,e,n){return Vf(t,[""],e,n)}class eu{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 nn?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],o=this.offsets[r],s=o>>1,l=i instanceof nn?i.text.length:i.children.length;if(s==(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((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
68
- `,this;e--}else if(i instanceof nn){let a=i.text[s+(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[s+(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 nn?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 RC{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new eu(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 DC{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"&&(pt.prototype[Symbol.iterator]=function(){return this.iter()},eu.prototype[Symbol.iterator]=RC.prototype[Symbol.iterator]=DC.prototype[Symbol.iterator]=function(){return this});let CM=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}},yl="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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,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<yl.length;t++)yl[t]+=yl[t-1];function EM(t){for(let e=1;e<yl.length;e+=2)if(yl[e]>t)return yl[e-1]<=t;return!1}function AS(t){return t>=127462&&t<=127487}const RS=8205;function Wn(t,e,n=!0,r=!0){return(n?MC:QM)(t,e,r)}function MC(t,e,n){if(e==t.length)return e;e&&IC(t.charCodeAt(e))&&NC(t.charCodeAt(e-1))&&e--;let r=Cn(t,e);for(e+=Ar(r);e<t.length;){let i=Cn(t,e);if(r==RS||i==RS||n&&EM(i))e+=Ar(i),r=i;else if(AS(i)){let o=0,s=e-2;for(;s>=0&&AS(Cn(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function QM(t,e,n){for(;e>0;){let r=MC(t,e-2,n);if(r<e)return r;e--}return 0}function IC(t){return t>=56320&&t<57344}function NC(t){return t>=55296&&t<56320}function Cn(t,e){let n=t.charCodeAt(e);if(!NC(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return IC(r)?(n-55296<<10)+(r-56320)+65536:n}function av(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Ar(t){return t<65536?1:2}const Um=/\r\n?|\n/;var hn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(hn||(hn={}));class Qi{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 o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){Zm(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 Qi(e)}composeDesc(e){return this.empty?e:e.empty?this:jC(this,e)}mapDesc(e,n=!1){return e.empty?this:Ym(this,e,n)}mapPos(e,n=-1,r=hn.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let l=this.sections[s++],a=this.sections[s++],u=i+l;if(a<0){if(u>e)return o+(e-i);o+=l}else{if(r!=hn.Simple&&u>=e&&(r==hn.TrackDel&&i<e&&u>e||r==hn.TrackBefore&&i<e||r==hn.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!l)return e==i||n<0?o:o+a;o+=a}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],l=i+o;if(s>=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 Qi(e)}static create(e){return new Qi(e)}}class fn extends Qi{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 Zm(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return Ym(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=s;let a=i>>1;for(;r.length<a;)r.push(pt.empty);r.push(s?e.slice(o,o+s):pt.empty)}o+=s}return new fn(n,r)}compose(e){return this.empty?e:e.empty?this:jC(this,e,!0)}map(e,n=!1){return e.empty?this:Ym(this,e,n,!0)}iterChanges(e,n=!1){Zm(this,e,n)}get desc(){return Qi.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new ku(this);e:for(let s=0,l=0;;){let a=s==e.length?1e9:e[s++];for(;l<a||l==a&&o.len==0;){if(o.done)break e;let c=Math.min(o.len,a-l);Nn(i,c,-1);let f=o.ins==-1?-1:o.off==0?o.ins:0;Nn(n,c,f),f>0&&xo(r,n,o.text),o.forward(c),l+=c}let u=e[s++];for(;l<u;){if(o.done)break e;let c=Math.min(o.len,u-l);Nn(n,c,-1),Nn(i,c,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(c),l+=c}}return{changes:new fn(n,r),filtered:Qi.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=[],o=[],s=0,l=null;function a(c=!1){if(!c&&!i.length)return;s<n&&Nn(i,n-s,-1);let f=new fn(i,o);l=l?l.compose(f.map(l)):f,i=[],o=[],s=0}function u(c){if(Array.isArray(c))for(let f of c)u(f);else if(c instanceof fn){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:d}=c;if(f>h||f<0||h>n)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${n})`);let p=d?typeof d=="string"?pt.of(d.split(r||Um)):d:pt.empty,g=p.length;if(f==h&&g==0)return;f<s&&a(),f>s&&Nn(i,f-s,-1),Nn(i,h-f,g),xo(o,i,p),s=h}}return u(e),a(!l),l}static empty(e){return new fn(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 o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,l)=>l&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(pt.empty);r[i]=pt.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new fn(n,r)}static createSet(e,n){return new fn(e,n)}}function Nn(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 xo(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(pt.empty);t.push(n)}}function Zm(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let l=t.sections[s++],a=t.sections[s++];if(a<0)i+=l,o+=l;else{let u=i,c=o,f=pt.empty;for(;u+=l,c+=a,a&&r&&(f=f.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)l=t.sections[s++],a=t.sections[s++];e(i,u,o,c,f),i=u,o=c}}}function Ym(t,e,n,r=!1){let i=[],o=r?[]:null,s=new ku(t),l=new ku(e);for(let a=-1;;)if(s.ins==-1&&l.ins==-1){let u=Math.min(s.len,l.len);Nn(i,u,-1),s.forward(u),l.forward(u)}else if(l.ins>=0&&(s.ins<0||a==s.i||s.off==0&&(l.len<s.len||l.len==s.len&&!n))){let u=l.len;for(Nn(i,l.ins,-1);u;){let c=Math.min(s.len,u);s.ins>=0&&a<s.i&&s.len<=c&&(Nn(i,0,s.ins),o&&xo(o,i,s.text),a=s.i),s.forward(c),u-=c}l.next()}else if(s.ins>=0){let u=0,c=s.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;Nn(i,u,a<s.i?s.ins:0),o&&a<s.i&&xo(o,i,s.text),a=s.i,s.forward(s.len-c)}else{if(s.done&&l.done)return o?fn.createSet(i,o):Qi.create(i);throw new Error("Mismatched change set lengths")}}function jC(t,e,n=!1){let r=[],i=n?[]:null,o=new ku(t),s=new ku(e);for(let l=!1;;){if(o.done&&s.done)return i?fn.createSet(r,i):Qi.create(r);if(o.ins==0)Nn(r,o.len,0,l),o.next();else if(s.len==0&&!s.done)Nn(r,0,s.ins,l),i&&xo(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let a=Math.min(o.len2,s.len),u=r.length;if(o.ins==-1){let c=s.ins==-1?-1:s.off?0:s.ins;Nn(r,a,c,l),i&&c&&xo(i,r,s.text)}else s.ins==-1?(Nn(r,o.off?0:o.len,a,l),i&&xo(i,r,o.textBit(a))):(Nn(r,o.off?0:o.len,s.off?0:s.ins,l),i&&!s.off&&xo(i,r,s.text));l=(o.ins>a||s.ins>=0&&s.len>a)&&(l||r.length>u),o.forward2(a),s.forward(a)}}}}class ku{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?pt.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?pt.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 fs{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 fs(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return J.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return J.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 J.range(e.anchor,e.head)}static create(e,n,r){return new fs(e,n,r)}}class J{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:J.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 J([this.main],0)}addRange(e,n=!0){return J.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,J.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 J(e.ranges.map(n=>fs.fromJSON(n)),e.main)}static single(e,n=e){return new J([J.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 o=e[i];if(o.empty?o.from<=r:o.from<r)return J.normalized(e.slice(),n);r=o.to}return new J(e,n)}static cursor(e,n=0,r,i){return fs.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 o=(r??33554431)<<5|(i==null?3:Math.min(2,i));return n<e?fs.create(n,e,24|o):fs.create(e,n,(n>e?4:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let l=s.from,a=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?J.range(a,l):J.range(l,a))}}return new J(e,n)}}function LC(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let uv=0;class Ce{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=uv++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}static define(e={}){return new Ce(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:cv),!!e.static,e.enables)}of(e){return new Bf([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bf(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bf(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function cv(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Bf{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=uv++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>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[s]=r(f),1},update(f,h){if(a&&h.docChanged||u&&(h.docChanged||h.selection)||zm(f,c)){let d=r(f);if(l?!DS(d,f.values[s],i):!i(d,f.values[s]))return f.values[s]=d,1}return 0},reconfigure:(f,h)=>{let d,p=h.config.address[o];if(p!=null){let g=$h(h,p);if(this.dependencies.every(v=>v instanceof Ce?h.facet(v)===f.facet(v):v instanceof On?h.field(v,!1)==f.field(v,!1):!0)||(l?DS(d=r(f),g,i):i(d=r(f),g)))return f.values[s]=g,0}else d=r(f);return f.values[s]=d,1}}}}function DS(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)tu(t,r)&1&&(n=!0);return n}function $M(t,e,n){let r=n.map(a=>t[a.id]),i=n.map(a=>a.type),o=r.filter(a=>!(a&1)),s=t[e.id]>>1;function l(a){let u=[];for(let c=0;c<r.length;c++){let f=$h(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)tu(a,u);return a.values[s]=l(a),1},update(a,u){if(!zm(a,o))return 0;let c=l(a);return e.compare(c,a.values[s])?0:(a.values[s]=c,1)},reconfigure(a,u){let c=zm(a,r),f=u.config.facets[e.id],h=u.facet(e);if(f&&!c&&cv(n,f))return a.values[s]=h,0;let d=l(a);return e.compare(d,h)?(a.values[s]=h,0):(a.values[s]=d,1)}}}const MS=Ce.define({static:!0});class On{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new On(uv++,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(MS).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 o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,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,MS.of({field:this,create:e})]}get extension(){return this}}const os={lowest:4,low:3,default:2,high:1,highest:0};function ba(t){return e=>new VC(e,t)}const qo={highest:ba(os.highest),high:ba(os.high),default:ba(os.default),low:ba(os.low),lowest:ba(os.lowest)};class VC{constructor(e,n){this.inner=e,this.prec=n}}class Ku{of(e){return new qm(this,e)}reconfigure(e){return Ku.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class qm{constructor(e,n){this.compartment=e,this.inner=n}}class Qh{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,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=[],o=Object.create(null),s=new Map;for(let h of _M(e,n,s))h instanceof On?i.push(h):(o[h.facet.id]||(o[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(d=>h.slot(d));let c=r==null?void 0:r.config.facets;for(let h in o){let d=o[h],p=d[0].facet,g=c&&c[h]||[];if(d.every(v=>v.type==0))if(l[p.id]=a.length<<1|1,cv(g,d))a.push(r.facet(p));else{let v=p.combine(d.map(O=>O.value));a.push(r&&p.compare(v,r.facet(p))?r.facet(p):v)}else{for(let v of d)v.type==0?(l[v.id]=a.length<<1|1,a.push(v.value)):(l[v.id]=u.length<<1,u.push(O=>v.dynamicSlot(O)));l[p.id]=u.length<<1,u.push(v=>$M(v,p,d))}}let f=u.map(h=>h(l));return new Qh(e,s,f,l,a,o)}}function _M(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,l){let a=i.get(s);if(a!=null){if(a<=l)return;let u=r[a].indexOf(s);u>-1&&r[a].splice(u,1),s instanceof qm&&n.delete(s.compartment)}if(i.set(s,l),Array.isArray(s))for(let u of s)o(u,l);else if(s instanceof qm){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),o(u,l)}else if(s instanceof VC)o(s.inner,s.prec);else if(s instanceof On)r[l].push(s),s.provides&&o(s.provides,l);else if(s instanceof Bf)r[l].push(s),s.facet.extensions&&o(s.facet.extensions,os.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,l)}}return o(t,os.default),r.reduce((s,l)=>s.concat(l))}function tu(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 $h(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const BC=Ce.define(),FC=Ce.define({combine:t=>t.some(e=>e),static:!0}),XC=Ce.define({combine:t=>t.length?t[0]:void 0,static:!0}),WC=Ce.define(),UC=Ce.define(),ZC=Ce.define(),YC=Ce.define({combine:t=>t.length?t[0]:!1});class Ai{constructor(e,n){this.type=e,this.value=n}static define(){return new TM}}class TM{of(e){return new Ai(this,e)}}class AM{constructor(e){this.map=e}of(e){return new tt(this,e)}}class tt{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 tt(this.type,n)}is(e){return this.type==e}static define(e={}){return new AM(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}tt.reconfigure=tt.define();tt.appendConfig=tt.define();class pn{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&LC(r,n.newLength),o.some(l=>l.type==pn.time)||(this.annotations=o.concat(pn.time.of(Date.now())))}static create(e,n,r,i,o,s){return new pn(e,n,r,i,o,s)}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(pn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}pn.time=Ai.define();pn.userEvent=Ai.define();pn.addToHistory=Ai.define();pn.remote=Ai.define();function RM(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function zC(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=fn.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:tt.mapEffects(t.effects,i).concat(tt.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Gm(t,e,n){let r=e.selection,i=vl(e.annotations);return e.userEvent&&(i=i.concat(pn.userEvent.of(e.userEvent))),{changes:e.changes instanceof fn?e.changes:fn.of(e.changes||[],n,t.facet(XC)),selection:r&&(r instanceof J?r:J.single(r.anchor,r.head)),effects:vl(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function qC(t,e,n){let r=Gm(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=zC(r,Gm(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=pn.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return MM(n?DM(i):i)}function DM(t){let e=t.startState,n=!0;for(let i of e.facet(WC)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:RM(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=fn.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=pn.create(e,i,t.selection&&t.selection.map(o),tt.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(UC);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof pn?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof pn?t=o[0]:t=qC(e,vl(o),!1)}return t}function MM(t){let e=t.startState,n=e.facet(ZC),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=zC(r,Gm(e,o,t.changes.newLength),!0))}return r==t?t:pn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const IM=[];function vl(t){return t==null?IM:Array.isArray(t)?t:[t]}var Bt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Bt||(Bt={}));const NM=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Hm;try{Hm=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function jM(t){if(Hm)return Hm.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||NM.test(n)))return!0}return!1}function LM(t){return e=>{if(!/\S/.test(e))return Bt.Space;if(jM(e))return Bt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Bt.Word;return Bt.Other}}class ct{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)tu(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 tu(this,r),$h(this,r)}update(...e){return qC(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let s of e.effects)s.is(Ku.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,a)=>i.set(a,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(tt.reconfigure)?(n=null,r=s.value):s.is(tt.appendConfig)&&(n=null,r=vl(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=Qh.resolve(r,i,this),o=new ct(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new ct(n,e.newDoc,e.newSelection,o,(s,l)=>l.update(s,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:J.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=vl(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++)o[h]=o[h].map(c);let f=i.mapDesc(u,!0);o.push(a.range.map(f)),i=i.compose(c),s=tt.mapEffects(s,c).concat(tt.mapEffects(vl(a.effects),f))}return{changes:i,selection:J.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof fn?e:fn.of(e,this.doc.length,this.facet(ct.lineSeparator))}toText(e){return pt.of(e.split(this.facet(ct.lineSeparator)||Um))}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:(tu(this,n),$h(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 On&&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 o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],l=e[o];i.push(s.init(a=>s.spec.fromJSON(l,a)))}}return ct.create({doc:e.doc,selection:J.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Qh.resolve(e.extensions||[],new Map),r=e.doc instanceof pt?e.doc:pt.of((e.doc||"").split(n.staticFacet(ct.lineSeparator)||Um)),i=e.selection?e.selection instanceof J?e.selection:J.single(e.selection.anchor,e.selection.head):J.single(0);return LC(i,r.length),n.staticFacet(FC)||(i=i.asSingle()),new ct(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(ct.tabSize)}get lineBreak(){return this.facet(ct.lineSeparator)||`
69
- `}get readOnly(){return this.facet(YC)}phrase(e,...n){for(let r of this.facet(ct.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 o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(BC))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return LM(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,l=e-r;for(;s>0;){let a=Wn(n,s,!1);if(o(n.slice(a,s))!=Bt.Word)break;s=a}for(;l<i;){let a=Wn(n,l);if(o(n.slice(l,a))!=Bt.Word)break;l=a}return s==l?null:J.range(s+r,l+r)}}ct.allowMultipleSelections=FC;ct.tabSize=Ce.define({combine:t=>t.length?t[0]:4});ct.lineSeparator=XC;ct.readOnly=YC;ct.phrases=Ce.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])}});ct.languageData=BC;ct.changeFilter=WC;ct.transactionFilter=UC;ct.transactionExtender=ZC;Ku.reconfigure=tt.define();function Ri(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],l=r[o];if(l===void 0)r[o]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](l,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class xs{eq(e){return this==e}range(e,n=e){return Km.create(e,n,this)}}xs.prototype.startSide=xs.prototype.endSide=0;xs.prototype.point=!1;xs.prototype.mapMode=hn.TrackDel;let Km=class GC{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new GC(e,n,r)}};function Jm(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class fv{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 o=r?this.to:this.from;for(let s=i,l=o.length;;){if(s==l)return s;let a=s+l>>1,u=o[a]-e||(r?this.value[a].endSide:this.value[a].startSide)-n;if(a==s)return u>=0?s:l;u>=0?l=a:s=a+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-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,d;if(c==f){let p=n.mapPos(c,u.startSide,u.mapMode);if(p==null||(h=d=p,u.startSide!=u.endSide&&(d=n.mapPos(c,u.endSide),d<h)))continue}else if(h=n.mapPos(c,u.startSide),d=n.mapPos(f,u.endSide),h>d||h==d&&u.startSide>0&&u.endSide<=0)continue;(d-h||u.endSide-u.startSide)<0||(s<0&&(s=h),u.point&&(l=Math.max(l,d-h)),r.push(u),i.push(h-s),o.push(d-s))}return{mapped:r.length?new fv(i,o,r,l):null,pos:s}}}class yt{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 yt(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:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(Jm)),this.isEmpty)return n.length?yt.of(n):this;let l=new HC(this,null,-1).goto(0),a=0,u=[],c=new Vo;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)&&(!s||i>this.chunkEnd(l.chunkIndex)||o<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!s||i>l.to||o<l.from||s(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||u.push(Km.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?yt.empty:this.nextLayer.update({add:u,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let l=this.chunkPos[s],a=this.chunk[s],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 o=this.nextLayer.map(e);return n.length==0?o:new yt(r,n,o||yt.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Pu.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Pu.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),l=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),a=IS(s,l,r),u=new wa(s,a,o),c=new wa(l,a,o);r.iterGaps((f,h,d)=>NS(u,f,c,h,d,i)),r.empty&&r.length==0&&NS(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=1e9-1);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),s=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let l=IS(o,s),a=new wa(o,l,0).goto(r),u=new wa(s,l,0).goto(r);for(;;){if(a.to!=u.to||!eO(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,o=-1){let s=new wa(e,null,o).goto(n),l=n,a=s.openStart;for(;;){let u=Math.min(s.to,r);if(s.point){let c=s.activeForPoint(s.to),f=s.pointFrom<n?c.length+1:Math.min(c.length,a);i.point(l,u,s.point,c,f,s.pointRank),a=Math.min(s.openEnd(u),c.length)}else u>l&&(i.span(l,u,s.active,a),a=s.openEnd(u));if(s.to>r)return a+(s.point&&s.to>r?1:0);l=s.to,s.next()}}static of(e,n=!1){let r=new Vo;for(let i of e instanceof Km?[e]:n?VM(e):e)r.add(i.from,i.to,i.value);return r.finish()}}yt.empty=new yt([],[],null,-1);function VM(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(Jm(e,r)>0)return t.slice().sort(Jm);e=r}return t}yt.empty.nextLayer=yt.empty;class Vo{finishChunk(e){this.chunks.push(new fv(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 Vo)).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(yt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=yt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function IS(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let l=r.get(o.chunk[s]);l!=null&&(n?n.mapPos(l):l)==o.chunkPos[s]&&!(n!=null&&n.touchesRange(l,l+o.chunk[s].length))&&i.add(o.chunk[s])}return i}class HC{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 Pu{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new HC(s,n,r,o));return i.length==1?i[0]:new Pu(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--)Jp(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--)Jp(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(),Jp(this.heap,0)}}}function Jp(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 wa{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=Pu.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){Hc(this.active,e),Hc(this.activeTo,e),Hc(this.activeRank,e),this.minActive=jS(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&this.activeRank[n]<=o;)n++;Kc(this.active,n,r),Kc(this.activeTo,n,i),Kc(this.activeRank,n,o),e&&Kc(e,n,this.cursor.from),this.minActive=jS(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&&Hc(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 o=this.cursor.value;if(!o.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=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.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 NS(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=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,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&eO(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(l,f,t.point,n.point):f>l&&!eO(t.active,n.active)&&o.compareRange(l,f,t.active,n.active),c>s)break;l=c,u<=0&&t.next(),u>=0&&n.next()}}function eO(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 Hc(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Kc(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function jS(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=Wn(t,i));return r}function tO(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Wn(t,i)}return r===!0?-1:t.length}const nO="ͼ",LS=typeof Symbol>"u"?"__"+nO:Symbol.for(nO),rO=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),VS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Bo{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,l,a,u){let c=[],f=/^@(\w+)\b/.exec(s[0]),h=f&&f[1]=="keyframes";if(f&&l==null)return a.push(s[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))o(d.split(/,\s*/).map(g=>s.map(v=>g.replace(/&/,v))).reduce((g,v)=>g.concat(v)),p,a);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");o(i(d),p,c,h)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||h)&&a.push((r&&!f&&!u?s.map(r):s).join(", ")+" {"+c.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
70
- `)}static newName(){let e=VS[LS]||1;return VS[LS]=e+1,nO+e.toString(36)}static mount(e,n){(e[rO]||new BM(e)).mount(Array.isArray(n)?n:[n])}}let Jc=null;class BM{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Jc)return e.adoptedStyleSheets=[Jc.sheet].concat(e.adoptedStyleSheets),e[rO]=Jc;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),Jc=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let n=e.head||e;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],e[rO]=this}mount(e){let n=this.sheet,r=0,i=0;for(let o=0;o<e.length;o++){let s=e[o],l=this.modules.indexOf(s);if(l<i&&l>-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,s),n)for(let a=0;a<s.rules.length;a++)n.insertRule(s.rules[a],r++)}else{for(;i<l;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(!n){let o="";for(let s=0;s<this.modules.length;s++)o+=this.modules[s].getRules()+`
71
- `;this.styleTag.textContent=o}}}var Fo={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:"'"},xu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},BS=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),FM=typeof navigator<"u"&&/Mac/.test(navigator.platform),XM=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),WM=FM||BS&&+BS[1]<57;for(var En=0;En<10;En++)Fo[48+En]=Fo[96+En]=String(En);for(var En=1;En<=24;En++)Fo[En+111]="F"+En;for(var En=65;En<=90;En++)Fo[En]=String.fromCharCode(En+32),xu[En]=String.fromCharCode(En);for(var eg in Fo)xu.hasOwnProperty(eg)||(xu[eg]=Fo[eg]);function UM(t){var e=WM&&(t.ctrlKey||t.altKey||t.metaKey)||XM&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?xu:Fo)[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 _h(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Ml(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 Ff(t,e){if(!e.anchorNode)return!1;try{return Ml(t,e.anchorNode)}catch{return!1}}function Cu(t){return t.nodeType==3?Il(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Th(t,e,n,r){return n?FS(t,e,n,r,-1)||FS(t,e,n,r,1):!1}function Ah(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function FS(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Eu(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=Ah(t)+(i<0?0:1),t=o}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?Eu(t):0}else return!1}}function Eu(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}const KC={left:0,right:0,top:0,bottom:0};function hv(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function YM(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function zM(t,e,n,r,i,o,s,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=YM(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 d=0,p=0;if(i=="nearest")e.top<f.top?(p=-(f.top-e.top+s),n>0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+s)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+s,n<0&&e.top-p<f.top&&(p=-(f.top+p-e.top+s)));else{let g=e.bottom-e.top,v=f.bottom-f.top;p=(i=="center"&&g<=v?e.top+g/2-v/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-v+s)-f.top}if(r=="nearest"?e.left<f.left?(d=-(f.left-e.left+o),n>0&&e.right>f.right+d&&(d=e.right-f.right+d+o)):e.right>f.right&&(d=e.right-f.right+o,n<0&&e.left<f.left+d&&(d=-(f.left+d-e.left+o))):d=(r=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:r=="start"==l?e.left-o:e.right-(f.right-f.left)+o)-f.left,d||p)if(h)u.scrollBy(d,p);else{let g=0,v=0;if(p){let O=c.scrollTop;c.scrollTop+=p,v=c.scrollTop-O}if(d){let O=c.scrollLeft;c.scrollLeft+=d,g=c.scrollLeft-O}e={left:e.left-g,top:e.top-v,right:e.right-g,bottom:e.bottom-v},g&&Math.abs(g-d)<1&&(r="nearest"),v&&Math.abs(v-p)<1&&(i="nearest")}if(h)break;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function qM(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 GM{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 Bs=null;function JC(t){if(t.setActive)return t.setActive();if(Bs)return t.focus(Bs);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Bs==null?{get preventScroll(){return Bs={preventScroll:!0},!0}}:void 0),!Bs){Bs=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let XS;function Il(t,e,n=e){let r=XS||(XS=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Sl(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 o=new KeyboardEvent("keyup",r);return o.synthetic=!0,t.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function HM(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function eE(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function KM(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=Eu(n))}else{if(n==t)return!0;r=Ah(n),n=n.parentNode}}class Ln{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new Ln(e.parentNode,Ah(e),n)}static after(e,n){return new Ln(e.parentNode,Ah(e)+1,n)}}const dv=[];class Nt{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,o;for(let s of this.children){if(s.dirty){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let l=Nt.get(o);(!l||!l.parent&&l.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.dirty=0}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=WS(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=WS(o)}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=Eu(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!Nt.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-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,o=u),u>n&&f.dom.parentNode==this.dom){s=a,l=c;break}c=h,u=h+f.breakAfter}return{from:o,to:l<0?r+this.length:l,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].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=dv){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&o.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 tE(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,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}Nt.prototype.breakAfter=0;function WS(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class tE{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 nE(t,e,n,r,i,o,s,l,a){let{children:u}=t,c=u.length?u[e]:null,f=o.length?o[o.length-1]:null,h=f?f.breakAfter:s;if(!(e==r&&c&&!s&&!h&&o.length<2&&c.merge(n,i,o.length?f:null,n==0,l,a))){if(r<u.length){let d=u[r];d&&i<d.length?(e==r&&(d=d.split(i),i=0),!h&&f&&d.merge(0,i,f,!0,0,a)?o[o.length-1]=d:(i&&d.merge(0,i,null,!1,0,a),o.push(d))):d!=null&&d.breakAfter&&(f?f.breakAfter=1:s=1),r++}for(c&&(c.breakAfter=s,n>0&&(!s&&o.length&&c.merge(n,c.length,o[0],!1,l,0)?c.breakAfter=o.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&&o.length;)if(u[r-1].become(o[o.length-1]))r--,o.pop(),a=o.length?0:l;else if(u[e].become(o[0]))e++,o.shift(),l=o.length?0:a;else break;!o.length&&e&&r<u.length&&!u[e-1].breakAfter&&u[r].merge(0,0,u[e-1],!1,l,a)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function rE(t,e,n,r,i,o){let s=t.childCursor(),{i:l,off:a}=s.findPos(n,1),{i:u,off:c}=s.findPos(e,-1),f=e-n;for(let h of r)f+=h.length;t.length+=f,nE(t,u,c,l,a,r,0,i,o)}let gr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},iO=typeof document<"u"?document:{documentElement:{style:{}}};const oO=/Edge\/(\d+)/.exec(gr.userAgent),iE=/MSIE \d/.test(gr.userAgent),sO=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(gr.userAgent),Rd=!!(iE||sO||oO),US=!Rd&&/gecko\/(\d+)/i.test(gr.userAgent),tg=!Rd&&/Chrome\/(\d+)/.exec(gr.userAgent),ZS="webkitFontSmoothing"in iO.documentElement.style,oE=!Rd&&/Apple Computer/.test(gr.vendor),YS=oE&&(/Mobile\/\w+/.test(gr.userAgent)||gr.maxTouchPoints>2);var Te={mac:YS||/Mac/.test(gr.platform),windows:/Win/.test(gr.platform),linux:/Linux|X11/.test(gr.platform),ie:Rd,ie_version:iE?iO.documentMode||6:sO?+sO[1]:oO?+oO[1]:0,gecko:US,gecko_version:US?+(/Firefox\/(\d+)/.exec(gr.userAgent)||[0,0])[1]:0,chrome:!!tg,chrome_version:tg?+tg[1]:0,ios:YS,android:/Android\b/.test(gr.userAgent),webkit:ZS,safari:oE,webkit_version:ZS?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:iO.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const JM=256;class Xo extends Nt{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 Xo)||this.length-(n-e)+r.length>JM)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Xo(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 Ln(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 lO(this.dom,e,n)}}class Ti extends Nt{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(eE(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,o,s){return r&&(!(r instanceof Ti&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(rE(this,e,n,r?r.children:[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=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=o),r=a,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Ti(this.mark,n,s)}domAtPos(e){return aE(this,e)}coordsAt(e,n){return cE(this,e,n)}}function lO(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?Te.chrome||Te.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let l=Il(t,i,o).getClientRects();if(!l.length)return KC;let a=l[(s?s<0:n>=0)?0:l.length-1];return Te.safari&&!s&&a.width==0&&(a=Array.prototype.find.call(l,u=>u.width)||a),s?hv(a,s<0):a||null}class Co extends Nt{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||Co)(e,n,r)}split(e){let n=Co.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,o,s){return r&&(!(r instanceof Co)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e.length==this.length&&e instanceof Co&&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 pt.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):pt.empty}domAtPos(e){return e==0?Ln.before(this.dom):Ln.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.dom.getClientRects(),i=null;if(!r.length)return KC;for(let o=e>0?r.length-1:0;i=r[o],!(e>0?o==0:o==r.length-1||i.top<i.bottom);o+=e>0?-1:1);return this.length?i:hv(i,this.side>0)}get isEditable(){return!1}get isWidget(){return!0}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class sE extends Co{domAtPos(e){let{topView:n,text:r}=this.widget;return n?aO(e,0,n,r,(i,o)=>i.domAtPos(o),i=>new Ln(r,Math.min(i,r.nodeValue.length))):new Ln(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?lE(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?aO(e,n,r,i,(o,s,l)=>o.coordsAt(s,l),(o,s)=>lO(i,o,s)):lO(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 aO(t,e,n,r,i,o){if(n instanceof Ti){for(let s=n.dom.firstChild;s;s=s.nextSibling){let l=Nt.get(s);if(!l)return o(t,e);let a=Ml(s,r),u=l.length+(a?r.nodeValue.length:0);if(t<u||t==u&&l.getSide()<=0)return a?aO(t,e,l,r,i,o):i(l,t,e);t-=u}return i(n,n.length,-1)}else return n.dom==r?o(t,e):i(n,t,e)}function lE(t,e,n,r){if(n instanceof Ti)for(let i of n.children){let o=0,s=Ml(i.dom,r);if(Ml(i.dom,t))return o+(s?lE(t,e,i,r):i.localPosFromDOM(t,e));o+=s?r.nodeValue.length:i.length}else if(n.dom==r)return Math.min(e,r.nodeValue.length);return n.localPosFromDOM(t,e)}class Nl extends Nt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Nl&&e.side==this.side}split(){return new Nl(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 Ln.before(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){let n=this.dom.getBoundingClientRect(),r=eI(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 pt.empty}}Xo.prototype.children=Co.prototype.children=Nl.prototype.children=dv;function eI(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 Xo){let o=i.coordsAt(e<0?i.length:0,e);if(o)return o}r+=e}else if(n instanceof Ti&&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 aE(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],l=o+s.length;if(!(l==o&&s.getSide()<=0)){if(e>o&&e<l&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=l}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new Ln(n,0)}function uE(t,e,n){let r,{children:i}=t;n>0&&e instanceof Ti&&i.length&&(r=i[i.length-1])instanceof Ti&&r.mark.eq(e.mark)?uE(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function cE(t,e,n){let r=null,i=-1,o=null,s=-1;function l(u,c){for(let f=0,h=0;f<u.children.length&&h<=c;f++){let d=u.children[f],p=h+d.length;p>=c&&(d.children.length?l(d,c-h):!o&&(p>c||h==p&&d.getSide()>0)?(o=d,s=c-h):(h<c||h==p&&d.getSide()<0)&&(r=d,i=c-h)),h=p}}l(t,e);let a=(n<0?r:o)||r||o;return a?a.coordsAt(Math.max(0,a==r?i:s),n):tI(t)}function tI(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Cu(e);return n[n.length-1]||null}function uO(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 pv(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 cO(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 Di{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 Pt=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Pt||(Pt={}));class Ae extends xs{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 Dd(e)}static widget(e){let n=e.side||0,r=!!e.block;return n+=r?n>0?3e8:-4e8:n>0?1e8:-1e8,new Cs(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:o,end:s}=fE(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new Cs(e,r,i,n,e.widget||null,!0)}static line(e){return new ec(e)}static set(e,n=!1){return yt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ae.none=yt.empty;class Dd extends Ae{constructor(e){let{start:n,end:r}=fE(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 Dd&&this.tagName==e.tagName&&this.class==e.class&&pv(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)}}Dd.prototype.point=!1;class ec extends Ae{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ec&&this.spec.class==e.spec.class&&pv(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)}}ec.prototype.mapMode=hn.TrackBefore;ec.prototype.point=!0;class Cs extends Ae{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?hn.TrackBefore:hn.TrackAfter:hn.TrackDel}get type(){return this.startSide<this.endSide?Pt.WidgetRange:this.startSide<=0?Pt.WidgetBefore:Pt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(e){return e instanceof Cs&&nI(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)}}Cs.prototype.point=!0;function fE(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 nI(t,e){return t==e||!!(t&&e&&t.compare(e))}function fO(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 Un extends Nt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof Un))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),rE(this,e,n,r?r.children:[],o,s),!0}split(e){let n=new Un;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 o=r;o<this.children.length;o++)n.append(this.children[o],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){pv(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){uE(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=uO(n,this.attrs||{})),r&&(this.attrs=uO({class:r},this.attrs||{}))}domAtPos(e){return aE(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.dirty|=6)}sync(e,n){var r;this.dom?this.dirty&4&&(eE(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&&(cO(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&&Nt.get(i)instanceof Ti;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Nt.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Te.ios||!this.children.some(o=>o instanceof Xo))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0;for(let n of this.children){if(!(n instanceof Xo)||/[^ -~]/.test(n.text))return null;let r=Cu(n.dom);if(r.length!=1)return null;e+=r[0].width}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length}:null}coordsAt(e,n){return cE(this,e,n)}become(e){return!1}get type(){return Pt.Text}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof Un)return o;if(s>n)break}i=s+o.breakAfter}return null}}class ms extends Nt{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,o,s){return r&&(!(r instanceof ms)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?Ln.before(this.dom):Ln.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new ms(this.widget,n,this.type);return r.breakAfter=this.breakAfter,r}get children(){return dv}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):pt.empty}domBoundsAround(){return null}become(e){return e instanceof ms&&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 gv{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 ms&&e.type==Pt.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new Un),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ef(new Nl(-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:o,lineBreak:s,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(s){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=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(ef(new Xo(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,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Cs){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 Cs)if(r.block){let{type:a}=r;a==Pt.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ms(r.widget||new zS("div"),l,a))}else{let a=Co.create(r.widget||new zS("span"),l,l?0:r.startSide),u=this.atCursorPos&&!a.isEditable&&o<=i.length&&(e<n||r.startSide>0),c=!a.isEditable&&(e<n||o>i.length||r.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!u&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(f.append(ef(new Nl(1),i),o),o=i.length+Math.max(0,o-i.length)),f.append(ef(a,i),o),this.atCursorPos=c,this.pendingBuffer=c?e<n||o>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=o)}static build(e,n,r,i,o){let s=new gv(e,n,r,o);return s.openEnd=yt.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function ef(t,e){for(let n of e)t=new Ti(n,[t],t.length);return t}class zS extends Di{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 hE=Ce.define(),dE=Ce.define(),pE=Ce.define(),gE=Ce.define(),hO=Ce.define(),mE=Ce.define(),OE=Ce.define(),yE=Ce.define({combine:t=>t.some(e=>e)}),vE=Ce.define({combine:t=>t.some(e=>e)});class Rh{constructor(e,n="nearest",r="nearest",i=5,o=5){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o}map(e){return e.empty?this:new Rh(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const qS=tt.define({map:(t,e)=>t.map(e)});function vr(t,e,n){let r=t.facet(gE);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 Md=Ce.define({combine:t=>t.length?t[0]:!0});let rI=0;const Na=Ce.define();class qt{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:o}=n||{};return new qt(rI++,e,r,s=>{let l=[Na.of(s)];return o&&l.push(Qu.of(a=>{let u=a.plugin(s);return u?o(u):Ae.none})),i&&l.push(i(s)),l})}static fromClass(e,n){return qt.define(r=>new e(r),n)}}class ng{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(vr(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){vr(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){vr(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const SE=Ce.define(),mv=Ce.define(),Qu=Ce.define(),bE=Ce.define(),wE=Ce.define(),ja=Ce.define();class $i{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new $i(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,o=0,s=0,l=0;;i++){let a=i==e.length?null:e[i],u=s-l,c=a?a.fromB:1e9;for(;o<n.length&&n[o]<c;){let f=n[o],h=n[o+1],d=Math.max(l,f),p=Math.min(c,h);if(d<=p&&new $i(d+u,p+u,d,p).addToSet(r),h>c)break;o+=2}if(!a)return r;new $i(a.fromA,a.toA,a.fromB,a.toB).addToSet(r),s=a.toA,l=a.toB}}}class Dh{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=fn.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,l,a)=>i.push(new $i(o,s,l,a))),this.changedRanges=i}static create(e,n,r){return new Dh(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 Zt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Zt||(Zt={}));const dO=Zt.LTR,iI=Zt.RTL;function kE(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const oI=kE("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),sI=kE("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),pO=Object.create(null),ci=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);pO[e]=n,pO[n]=-e}function lI(t){return t<=247?oI[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?sI[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8203?256:64336<=t&&t<=65023?4:t==8204?256:1}const aI=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class bl{constructor(e,n,r){this.from=e,this.to=n,this.level=r}get dir(){return this.level%2?iI:dO}side(e,n){return this.dir==n==e?this.to:this.from}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let l=e[s];if(l.from<=n&&l.to>=n){if(l.level==r)return s;(o<0||(i!=0?i<0?l.from<n:l.to>n:e[o].level>l.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}const Wt=[];function uI(t,e){let n=t.length,r=e==dO?1:2,i=e==dO?2:1;if(!t||r==1&&!aI.test(t))return PE(n);for(let s=0,l=r,a=r;s<n;s++){let u=lI(t.charCodeAt(s));u==512?u=l:u==8&&a==4&&(u=16),Wt[s]=u==4?2:u,u&7&&(a=u),l=u}for(let s=0,l=r,a=r;s<n;s++){let u=Wt[s];if(u==128)s<n-1&&l==Wt[s+1]&&l&24?u=Wt[s]=l:Wt[s]=256;else if(u==64){let c=s+1;for(;c<n&&Wt[c]==64;)c++;let f=s&&l==8||c<n&&Wt[c]==8?a==1?1:8:256;for(let h=s;h<c;h++)Wt[h]=f;s=c-1}else u==8&&a==1&&(Wt[s]=1);l=u,u&7&&(a=u)}for(let s=0,l=0,a=0,u,c,f;s<n;s++)if(c=pO[u=t.charCodeAt(s)])if(c<0){for(let h=l-3;h>=0;h-=3)if(ci[h+1]==-c){let d=ci[h+2],p=d&2?r:d&4?d&1?i:r:0;p&&(Wt[s]=Wt[ci[h]]=p),l=h;break}}else{if(ci.length==189)break;ci[l++]=s,ci[l++]=u,ci[l++]=a}else if((f=Wt[s])==2||f==1){let h=f==r;a=h?0:1;for(let d=l-3;d>=0;d-=3){let p=ci[d+2];if(p&2)break;if(h)ci[d+2]|=2;else{if(p&4)break;ci[d+2]|=4}}}for(let s=0;s<n;s++)if(Wt[s]==256){let l=s+1;for(;l<n&&Wt[l]==256;)l++;let a=(s?Wt[s-1]:r)==1,u=(l<n?Wt[l]:r)==1,c=a==u?a?1:2:r;for(let f=s;f<l;f++)Wt[f]=c;s=l-1}let o=[];if(r==1)for(let s=0;s<n;){let l=s,a=Wt[s++]!=1;for(;s<n&&a==(Wt[s]!=1);)s++;if(a)for(let u=s;u>l;){let c=u,f=Wt[--u]!=2;for(;u>l&&f==(Wt[u-1]!=2);)u--;o.push(new bl(u,c,f?2:1))}else o.push(new bl(l,s,0))}else for(let s=0;s<n;){let l=s,a=Wt[s++]==2;for(;s<n&&a==(Wt[s]==2);)s++;o.push(new bl(l,s,a?1:2))}return o}function PE(t){return[new bl(0,t,0)]}let xE="";function cI(t,e,n,r,i){var o;let s=r.head-t.from,l=-1;if(s==0){if(!i||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),l=0)}else if(s==t.length){if(i)return null;let h=e[e.length-1];h.level!=n&&(s=h.side(!0,n),l=e.length-1)}l<0&&(l=bl.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc));let a=e[l];s==a.side(i,n)&&(a=e[l+=i?1:-1],s=a.side(!i,n));let u=i==(a.dir==n),c=Wn(t.text,s,u);if(xE=t.text.slice(Math.min(s,c),Math.max(s,c)),c!=a.side(i,n))return J.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?J.cursor(i?t.to:t.from,i?-1:1,n):f&&f.level<a.level?J.cursor(f.side(!i,n)+t.from,i?1:-1,f.level):J.cursor(c+t.from,i?-1:1,a.level)}const Eo="￿";class CE{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(ct.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Eo}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i),this.readNode(i);let o=i.nextSibling;if(o==n)break;let s=Nt.get(i),l=Nt.get(o);(s&&l?s.breakAfter:(s?s.breakAfter:GS(i))||GS(o)&&(i.nodeName!="BR"||i.cmIgnore))&&this.lineBreak(),i=o}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 o=-1,s=1,l;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(l=i.exec(n))&&(o=l.index,s=l[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=s-1);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=Nt.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 GS(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class HS{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class KS extends Nt{constructor(e){super(),this.view=e,this.compositionDeco=Ae.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 Un],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new $i(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:s,toA:l})=>l<this.minWidthFrom||s>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=Ae.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=hI(this.view,e.changes)),(Te.ie||Te.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let r=this.decorations,i=this.updateDeco(),o=mI(r,i,e.changes);return n=$i.extendWithRanges(n,o),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 o=Te.chrome||Te.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.dirty=0,o&&(o.written||r.selectionRange.focusNode!=o.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 o of this.children)o instanceof ms&&o.widget instanceof JS&&i.push(o.dom);r.updateGaps(i)}updateChildren(e,n){let r=this.childCursor(n);for(let i=e.length-1;;i--){let o=i>=0?e[i]:null;if(!o)break;let{fromA:s,toA:l,fromB:a,toB:u}=o,{content:c,breakAtStart:f,openStart:h,openEnd:d}=gv.build(this.view.state.doc,a,u,this.decorations,this.dynamicDecorationMap),{i:p,off:g}=r.findPos(l,1),{i:v,off:O}=r.findPos(s,-1);nE(this,v,O,p,g,c,f,h,d)}}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,o=this.domAtPos(i.anchor),s=i.empty?o:this.domAtPos(i.head);if(Te.gecko&&i.empty&&fI(o)){let a=document.createTextNode("");this.view.observer.ignore(()=>o.node.insertBefore(a,o.node.childNodes[o.offset]||null)),o=s=new Ln(a,0),r=!0}let l=this.view.observer.selectionRange;(r||!l.focusNode||!Th(o.node,o.offset,l.anchorNode,l.anchorOffset)||!Th(s.node,s.offset,l.focusNode,l.focusOffset))&&(this.view.observer.ignore(()=>{Te.android&&Te.chrome&&this.dom.contains(l.focusNode)&&OI(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let a=_h(this.view.root);if(a)if(i.empty){if(Te.gecko){let u=pI(o.node,o.offset);if(u&&u!=3){let c=QE(o.node,o.offset,u==1?1:-1);c&&(o=new Ln(c,u==1?0:c.nodeValue.length))}}a.collapse(o.node,o.offset),i.bidiLevel!=null&&l.cursorBidiLevel!=null&&(l.cursorBidiLevel=i.bidiLevel)}else if(a.extend){a.collapse(o.node,o.offset);try{a.extend(s.node,s.offset)}catch{}}else{let u=document.createRange();i.anchor>i.head&&([o,s]=[s,o]),u.setEnd(s.node,s.offset),u.setStart(o.node,o.offset),a.removeAllRanges(),a.addRange(u)}}),this.view.observer.setSelectionRange(o,s)),this.impreciseAnchor=o.precise?null:new Ln(l.anchorNode,l.anchorOffset),this.impreciseHead=s.precise?null:new Ln(l.focusNode,l.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,n=e.state.selection.main,r=_h(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=Un.find(this,n.head);if(!s)return;let l=s.posAtStart;if(n.head==l||n.head==l+s.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,o)}mayControlSelection(){let e=this.view.root.activeElement;return e==this.dom||Ff(this.dom,this.view.observer.selectionRange)&&!(e&&this.dom.contains(e))}nearest(e){for(let n=e;n;){let r=Nt.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 Un)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 o=this.children[i],s=r-o.breakAfter-o.length;if(e>s||e==s&&o.type!=Pt.WidgetBefore&&o.type!=Pt.WidgetAfter&&(!i||n==2||this.children[i-1].breakAfter||this.children[i-1].type==Pt.WidgetBefore&&n>-2))return o.coordsAt(e-s,n);r=s}}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==Zt.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 d=f.dom.getBoundingClientRect();if(n.push(d.height),s){let p=f.dom.lastChild,g=p?Cu(p):[];if(g.length){let v=g[g.length-1],O=a?v.right-d.left:d.right-v.left;O>l&&(l=O,this.minWidth=o,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"?Zt.RTL:Zt.LTR}measureTextSize(){for(let i of this.children)if(i instanceof Un){let o=i.measureTextSize();if(o)return o}let e=document.createElement("div"),n,r;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 i=Cu(e.firstChild)[0];n=e.getBoundingClientRect().height,r=i?i.width/27:7,e.remove()}),{lineHeight:n,charWidth:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new tE(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let l=n.lineBlockAt(s).bottom-n.lineBlockAt(r).top;e.push(Ae.replace({widget:new JS(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return Ae.set(e)}updateDeco(){let e=this.view.state.facet(Qu).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 o=0,s=0,l=0,a=0;for(let c of this.view.state.facet(wE).map(f=>f(this.view)))if(c){let{left:f,right:h,top:d,bottom:p}=c;f!=null&&(o=Math.max(o,f)),h!=null&&(s=Math.max(s,h)),d!=null&&(l=Math.max(l,d)),p!=null&&(a=Math.max(a,p))}let u={left:r.left-o,top:r.top-l,right:r.right+s,bottom:r.bottom+a};zM(this.view.scrollDOM,u,n.head<n.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==Zt.LTR)}}function fI(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 JS extends Di{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 EE(t){let e=t.observer.selectionRange,n=e.focusNode&&QE(e.focusNode,e.focusOffset,0);if(!n)return null;let r=t.docView.nearest(n);if(!r)return null;if(r instanceof Un){let i=n;for(;i.parentNode!=r.dom;)i=i.parentNode;let o=i.previousSibling;for(;o&&!Nt.get(o);)o=o.previousSibling;let s=o?Nt.get(o).posAtEnd:r.posAtStart;return{from:s,to:s,node:i,text:n}}else{for(;;){let{parent:o}=r;if(!o)return null;if(o instanceof Un)break;r=o}let i=r.posAtStart;return{from:i,to:i+r.length,node:r.dom,text:n}}}function hI(t,e){let n=EE(t);if(!n)return Ae.none;let{from:r,to:i,node:o,text:s}=n,l=e.mapPos(r,1),a=Math.max(l,e.mapPos(i,-1)),{state:u}=t,c=o.nodeType==3?o.nodeValue:new CE([],u).readRange(o.firstChild,null).text;if(a-l<c.length)if(u.doc.sliceString(l,Math.min(u.doc.length,l+c.length),Eo)==c)a=l+c.length;else if(u.doc.sliceString(Math.max(0,a-c.length),a,Eo)==c)l=a-c.length;else return Ae.none;else if(u.doc.sliceString(l,a,Eo)!=c)return Ae.none;let f=Nt.get(o);return f instanceof sE?f=f.widget.topView:f&&(f.parent=null),Ae.set(Ae.replace({widget:new dI(o,s,f),inclusive:!0}).range(l,a))}class dI extends Di{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 sE}}function QE(t,e,n){for(;;){if(t.nodeType==3)return t;if(t.nodeType==1&&e>0&&n<=0)t=t.childNodes[e-1],e=Eu(t);else if(t.nodeType==1&&e<t.childNodes.length&&n>=0)t=t.childNodes[e],e=0;else return null}}function pI(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 gI{constructor(){this.changes=[]}compareRange(e,n){fO(e,n,this.changes)}comparePoint(e,n){fO(e,n,this.changes)}}function mI(t,e,n){let r=new gI;return yt.compare(t,e,n,r),r.changes}function OI(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 yI(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return J.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,l=o;n<0?s=Wn(i.text,o,!1):l=Wn(i.text,o);let a=r(i.text.slice(s,l));for(;s>0;){let u=Wn(i.text,s,!1);if(r(i.text.slice(u,s))!=a)break;s=u}for(;l<i.length;){let u=Wn(i.text,l);if(r(i.text.slice(l,u))!=a)break;l=u}return J.range(s+i.from,l+i.from)}function vI(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function SI(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function rg(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function eb(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function tb(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function gO(t,e,n){let r,i,o,s,l=!1,a,u,c,f;for(let p=t.firstChild;p;p=p.nextSibling){let g=Cu(p);for(let v=0;v<g.length;v++){let O=g[v];i&&rg(i,O)&&(O=eb(tb(O,i.bottom),i.top));let m=vI(e,O),y=SI(n,O);if(m==0&&y==0)return p.nodeType==3?nb(p,e,n):gO(p,e,n);if(!r||s>y||s==y&&o>m){r=p,i=O,o=m,s=y;let b=y?n<O.top?-1:1:m?e<O.left?-1:1:0;l=!b||(b>0?v<g.length-1:v>0)}m==0?n>O.bottom&&(!c||c.bottom<O.bottom)?(a=p,c=O):n<O.top&&(!f||f.top>O.top)&&(u=p,f=O):c&&rg(c,O)?c=tb(c,O.bottom):f&&rg(f,O)&&(f=eb(f,O.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 nb(r,h,n);if(l&&r.contentEditable!="false")return gO(r,h,n);let d=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:d}}function nb(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let l=0;l<r;l++){let a=Il(t,l,l+1).getClientRects();for(let u=0;u<a.length;u++){let c=a[u];if(c.top==c.bottom)continue;s||(s=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<o){let h=e>=(c.left+c.right)/2,d=h;if((Te.chrome||Te.gecko)&&Il(t,l).getBoundingClientRect().left==c.right&&(d=!h),f<=0)return{node:t,offset:l+(d?1:0)};i=l+(d?1:0),o=f}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function $E(t,e,n,r=-1){var i;let o=t.contentDOM.getBoundingClientRect(),s=o.top+t.viewState.paddingTop,l,{docHeight:a}=t.viewState,{x:u,y:c}=e,f=c-s;if(f<0)return 0;if(f>a)return t.state.doc.length;for(let y=t.defaultLineHeight/2,b=!1;l=t.elementAtHeight(f),l.type!=Pt.Text;)for(;f=r>0?l.bottom+y:l.top-y,!(f>=0&&f<=a);){if(b)return n?null:0;b=!0,r=-r}c=s+f;let h=l.from;if(h<t.viewport.from)return t.viewport.from==0?0:n?null:rb(t,o,l,u,c);if(h>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:rb(t,o,l,u,c);let d=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:d,g=p.elementFromPoint(u,c);g&&!t.contentDOM.contains(g)&&(g=null),g||(u=Math.max(o.left+1,Math.min(o.right-1,u)),g=p.elementFromPoint(u,c),g&&!t.contentDOM.contains(g)&&(g=null));let v,O=-1;if(g&&((i=t.docView.nearest(g))===null||i===void 0?void 0:i.isEditable)!=!1){if(d.caretPositionFromPoint){let y=d.caretPositionFromPoint(u,c);y&&({offsetNode:v,offset:O}=y)}else if(d.caretRangeFromPoint){let y=d.caretRangeFromPoint(u,c);y&&({startContainer:v,startOffset:O}=y,(!t.contentDOM.contains(v)||Te.safari&&bI(v,O,u)||Te.chrome&&wI(v,O,u))&&(v=void 0))}}if(!v||!t.docView.dom.contains(v)){let y=Un.find(t.docView,h);if(!y)return f>l.top+l.height/2?l.to:l.from;({node:v,offset:O}=gO(y.dom,u,c))}let m=t.docView.nearest(v);if(!m)return null;if(m.isWidget){let y=m.dom.getBoundingClientRect();return e.y<y.top||e.y<=y.bottom&&e.x<=(y.left+y.right)/2?m.posAtStart:m.posAtEnd}else return m.localPosFromDOM(v,O)+m.posAtStart}function rb(t,e,n,r,i){let o=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);o+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+tO(s,o,t.state.tabSize)}function bI(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 Il(t,r-1,r).getBoundingClientRect().left>n}function wI(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():Il(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function kI(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=!r||!t.lineWrapping?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),u=t.textDirectionAt(i.from),c=t.posAtCoords({x:n==(u==Zt.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(c!=null)return J.cursor(c,n?-1:1)}let s=Un.find(t.docView,e.head),l=s?n?s.posAtEnd:s.posAtStart:n?i.to:i.from;return J.cursor(l,n?-1:1)}function ib(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let l=e,a=null;;){let u=cI(i,o,s,l,n),c=xE;if(!u){if(i.number==(n?t.state.doc.lines:1))return l;c=`
72
- `,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),u=J.cursor(n?i.from:i.to)}if(a){if(!a(c))return l}else{if(!r)return u;a=r(c)}l=u}}function PI(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==Bt.Space&&(i=s),i==s}}function xI(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return J.cursor(i,e.assoc);let s=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i),c=t.documentTop;if(u)s==null&&(s=u.left-a.left),l=o<0?u.top:u.bottom;else{let d=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(a.right-a.left,t.defaultCharacterWidth*(i-d.from))),l=(o<0?d.top:d.bottom)+c}let f=a.left+s,h=r??t.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(h+d)*o,g=$E(t,{x:f,y:p},!1,o);if(p<a.top||p>a.bottom||(o<0?g<i:g>i))return J.cursor(g,e.assoc,void 0,s)}}function ig(t,e,n){let r=t.state.facet(bE).map(i=>i(t));for(;;){let i=!1;for(let o of r)o.between(n.from-1,n.from+1,(s,l,a)=>{n.from>s&&n.from<l&&(n=e.head>n.from?J.cursor(s,1):J.cursor(l,-1),i=!0)});if(!i)return n}}class CI{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 gn){let i=gn[r];e.contentDOM.addEventListener(r,o=>{ob(e,o)&&n(i,o)},mO[r]),this.registeredEvents.push(r)}e.scrollDOM.addEventListener("mousedown",r=>{r.target==e.scrollDOM&&r.clientY>e.contentDOM.getBoundingClientRect().bottom&&n(gn.mousedown,r)}),Te.chrome&&Te.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,Te.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 o of n)if(i=(r=o.update(e).spec)===null||r===void 0?void 0:r.domEventHandlers){this.customHandlers.push({plugin:o.value,handlers:i});for(let s in i)this.registeredEvents.indexOf(s)<0&&s!="scroll"&&(this.registeredEvents.push(s),e.contentDOM.addEventListener(s,l=>{ob(e,l)&&this.runCustomHandlers(s,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,n,r){for(let i of this.customHandlers){let o=i.handlers[e];if(o)try{if(o.call(i.plugin,r,n)||r.defaultPrevented)return!0}catch(s){vr(n.state,s)}}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(o){vr(e.state,o)}}}keydown(e,n){if(this.lastKeyCode=n.keyCode,this.lastKeyTime=Date.now(),n.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(Te.android&&Te.chrome&&!n.synthetic&&(n.keyCode==13||n.keyCode==8))return e.observer.delayAndroidKey(n.key,n.keyCode),!0;let r;return Te.ios&&!n.synthetic&&!n.altKey&&!n.metaKey&&((r=_E.find(i=>i.keyCode==n.keyCode))&&!n.ctrlKey||EI.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,Sl(e.contentDOM,n.key,n.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Te.safari&&!Te.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 _E=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],EI="dthko",TE=[16,17,18,20,91,92,224,225];function tf(t){return t*.7+8}class QI{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=qM(e.contentDOM);let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(ct.allowMultipleSelections)&&$I(e,n),this.dragMove=_I(e,n),this.dragging=TI(e,n)&&ME(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,o=((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<=o.left?r=-tf(o.left-e.clientX):e.clientX>=o.right&&(r=tf(e.clientX-o.right)),e.clientY<=o.top?i=-tf(o.top-e.clientY):e.clientY>=o.bottom&&(i=tf(e.clientY-o.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 $I(t,e){let n=t.state.facet(hE);return n.length?n[0](e):Te.mac?e.metaKey:e.ctrlKey}function _I(t,e){let n=t.state.facet(dE);return n.length?n[0](e):Te.mac?!e.altKey:!e.ctrlKey}function TI(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=_h(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function ob(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=Nt.get(n))&&r.ignoreEvent(e))return!1;return!0}const gn=Object.create(null),mO=Object.create(null),AE=Te.ie&&Te.ie_version<15||Te.ios&&Te.webkit_version<604;function AI(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(),RE(t,n.value)},50)}function RE(t,e){let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(OO!=null&&n.selection.ranges.every(a=>a.empty)&&OO==o.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((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:f},range:J.cursor(u.from+f.length)}})}else s?r=n.changeByRange(a=>{let u=o.line(i++);return{changes:{from:a.from,to:a.to,insert:u.text},range:J.cursor(a.from+u.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}gn.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select"),e.keyCode==27?t.inputState.lastEscPress=Date.now():TE.indexOf(e.keyCode)<0&&(t.inputState.lastEscPress=0)};gn.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};gn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};mO.touchstart=mO.touchmove={passive:!0};gn.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let r of t.state.facet(pE))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=MI(t,e)),n){let r=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new QI(t,e,n,r)),r&&t.observer.ignore(()=>JC(t.contentDOM)),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(e)}};function sb(t,e,n,r){if(r==1)return J.cursor(e,n);if(r==2)return yI(t.state,e,n);{let i=Un.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,l=i?i.posAtEnd:o.to;return l<t.state.doc.length&&l==o.to&&l++,J.range(s,l)}}let DE=(t,e)=>t>=e.top&&t<=e.bottom,lb=(t,e,n)=>DE(e,n)&&t>=n.left&&t<=n.right;function RI(t,e,n,r){let i=Un.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&lb(n,r,s))return-1;let l=i.coordsAt(o,1);return l&&lb(n,r,l)?1:s&&DE(r,s)?-1:1}function ab(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:RI(t,n,e.clientX,e.clientY)}}const DI=Te.ie&&Te.ie_version<=11;let ub=null,cb=0,fb=0;function ME(t){if(!DI)return t.detail;let e=ub,n=fb;return ub=t,fb=Date.now(),cb=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(cb+1)%3:1}function MI(t,e){let n=ab(t,e),r=ME(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,l){let a=ab(t,o),u=sb(t,a.pos,a.bias,r);if(n.pos!=a.pos&&!s){let c=sb(t,n.pos,n.bias,r),f=Math.min(c.from,u.from),h=Math.max(c.to,u.to);u=f<u.from?J.range(f,h):J.range(h,f)}return s?i.replaceRange(i.main.extend(u.from,u.to)):l&&i.ranges.length>1&&i.ranges.some(c=>c.eq(u))?II(i,u):l?i.addRange(u):J.create([u])}}}function II(t,e){for(let n=0;;n++)if(t.ranges[n].eq(e))return J.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}gn.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 hb(t,e,n,r){if(!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:o}=t.inputState,s=r&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,l={from:i,insert:n},a=t.state.changes(s?[s,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(i,-1),head:a.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"})}gn.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,o=()=>{++i==n.length&&hb(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let l=new FileReader;l.onerror=o,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[s]=l.result),o()},l.readAsText(n[s])}}else hb(t,e,e.dataTransfer.getData("Text"),!0)};gn.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let n=AE?null:e.clipboardData;n?(RE(t,n.getData("text/plain")),e.preventDefault()):AI(t)};function NI(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 jI(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:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:r}}let OO=null;gn.copy=gn.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=jI(t.state);if(!n&&!i)return;OO=i?n:null;let o=AE?null:e.clipboardData;o?(e.preventDefault(),o.clearData(),o.setData("text/plain",n)):NI(t,n),e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})};const IE=Ai.define();function NE(t,e){let n=[];for(let r of t.facet(OE)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:IE.of(!0)}):null}function jE(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=NE(t.state,e);n?t.dispatch(n):t.update([])}},10)}gn.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),jE(t)};gn.blur=t=>{t.observer.clearSelectionRange(),jE(t)};gn.compositionstart=gn.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};gn.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,Te.chrome&&Te.android&&t.observer.flushSoon(),setTimeout(()=>{t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)};gn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};gn.beforeinput=(t,e)=>{var n;let r;if(Te.chrome&&Te.android&&(r=_E.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 o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};const db=["pre-wrap","normal","pre-line","break-spaces"];class LI{constructor(e){this.lineWrapping=e,this.doc=pt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,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 db.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,o){let s=db.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.lineLength=i,l){this.heightSamples={};for(let a=0;a<o.length;a++){let u=o[a];u<0?a++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class VI{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Wi{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this.type=o}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 Wi(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Dt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Dt||(Dt={}));const Xf=.001;class Yn{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)>Xf&&(e.heightChanged=!0),this.height=n)}replace(e,n,r){return Yn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:a,toA:u,fromB:c,toB:f}=i[l],h=o.lineAt(a,Dt.ByPosNoHeight,r.setDoc(n),0,0),d=h.to>=u?h:o.lineAt(u,Dt.ByPosNoHeight,r,0,0);for(f+=d.to-u,u=d.to;l>0&&h.from<=i[l-1].toA;)a=i[l-1].fromA,c=i[l-1].fromB,l--,a<h.from&&(h=o.lineAt(a,Dt.ByPosNoHeight,r,0,0));c+=h.from-a,a=h.from;let p=Ov.build(r.setDoc(s),e,c,f);o=o.replace(a,u,p)}return o.updateHeight(r,0)}static empty(){return new dr(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*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(o>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,o-=l.size}else break;else if(i<o){let l=e[n++];l&&(i+=l.size)}else{let l=e[--r];l&&(o+=l.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new BI(Yn.of(e.slice(0,n)),s,Yn.of(e.slice(r)))}}Yn.prototype.size=1;class LE extends Yn{constructor(e,n,r){super(e,n),this.type=r}blockAt(e,n,r,i){return new Wi(i,this.length,r,this.height,this.type)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}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 dr extends LE{constructor(e,n){super(e,n,Pt.Text),this.collapsed=0,this.widgetHeight=0}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof dr||i instanceof Pn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Pn?i=new dr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Yn.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 Pn extends Yn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,s,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*o);s=a/o,l=(this.height-a)/(this.length-o-1)}else s=this.height/o;return{firstLine:r,lastLine:i,perLine:s,perChar:l}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,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 Wi(c.from,c.length,h,f,Pt.Text)}else{let u=Math.max(0,Math.min(s-o,Math.floor((e-r)/l))),{from:c,length:f}=n.doc.line(o+u);return new Wi(c,f,r+l*u,l,Pt.Text)}}lineAt(e,n,r,i,o){if(n==Dt.ByHeight)return this.blockAt(e,r,i,o);if(n==Dt.ByPosNoHeight){let{from:d,to:p}=r.doc.lineAt(e);return new Wi(d,p-d,0,0,Pt.Text)}let{firstLine:s,perLine:l,perChar:a}=this.heightMetrics(r,o),u=r.doc.lineAt(e),c=l+u.length*a,f=u.number-s,h=i+l*f+a*(u.from-o-f);return new Wi(u.from,u.length,Math.max(i,Math.min(h,i+this.height-c)),c,Pt.Text)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:l,perLine:a,perChar:u}=this.heightMetrics(r,o);for(let c=e,f=i;c<=n;){let h=r.doc.lineAt(c);if(c==e){let p=h.number-l;f+=a*p+u*(e-o-p)}let d=a+u*h.length;s(new Wi(h.from,h.length,f,d,Pt.Text)),f+=d,c=h.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof Pn?r[r.length-1]=new Pn(o.length+i):r.push(null,new Pn(i-1))}if(e>0){let o=r[0];o instanceof Pn?r[0]=new Pn(e+o.length):r.unshift(new Pn(e-1),null)}return Yn.of(r)}decomposeLeft(e,n){n.push(new Pn(e-1),null)}decomposeRight(e,n){n.push(null,new Pn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],l=Math.max(n,i.from),a=-1;for(i.from>n&&s.push(new Pn(i.from-n-1).updateHeight(e,n));l<=o&&i.more;){let c=e.doc.lineAt(l).length;s.length&&s.push(null);let f=i.heights[i.index++];a==-1?a=f:Math.abs(f-a)>=Xf&&(a=-2);let h=new dr(c,f);h.outdated=!1,s.push(h),l+=c+1}l<=o&&s.push(null,new Pn(o-l).updateHeight(e,l));let u=Yn.of(s);return(a<0||Math.abs(u.height-this.height)>=Xf||Math.abs(a-this.heightMetrics(e,n).perLine)>=Xf)&&(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 BI extends Yn{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 o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,l=o+this.left.length+this.break,a=n==Dt.ByHeight?e<s:e<l,u=a?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,l);if(this.break||(a?u.to<l:u.from>l))return u;let c=n==Dt.ByPosNoHeight?Dt.ByPosNoHeight:Dt.ByPos;return a?u.join(this.right.lineAt(l,c,r,s,l)):this.left.lineAt(l,c,r,i,o).join(u)}forEachLine(e,n,r,i,o,s){let l=i+this.left.height,a=o+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,n,r,i,o,s),n>=a&&this.right.forEachLine(e,n,r,l,a,s);else{let u=this.lineAt(a,Dt.ByPos,r,i,o);e<u.from&&this.left.forEachLine(e,u.from-1,r,i,o,s),u.to>=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,l,a,s)}}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 o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let l of r)o.push(l);if(e>0&&pb(o,s-1),n<this.length){let l=o.length;this.decomposeRight(n,o),pb(o,l)}return Yn.of(o)}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?Yn.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:o,right:s}=this,l=n+o.length+this.break,a=null;return i&&i.from<=n+o.length&&i.more?a=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=l+s.length&&i.more?a=s=s.updateHeight(e,l,r,i):s.updateHeight(e,l,r),a?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function pb(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Pn&&(r=t[e+1])instanceof Pn&&t.splice(e-1,3,new Pn(n.length+1+r.length))}const FI=5;class Ov{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 dr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new dr(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 o=n-e;r.block?this.addBlock(new LE(o,i,r.type)):(o||i>=FI)&&this.addLineDeco(i,o)}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 dr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Pn(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 dr)return e;let n=new dr(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine(),e.type==Pt.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=Pt.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 dr)&&!this.isCovered?this.nodes.push(new dr(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 dr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new Ov(r,e);return yt.spans(n,r,i,o,0),o.finish(r)}}function XI(t,e,n){let r=new WI;return yt.compare(t,e,n,r,0),r.changes}class WI{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&fO(e,n,this.changes,5)}}function UI(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=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();o=Math.max(o,h.left),s=Math.min(s,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:o-n.left,right:Math.max(o,s)-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 og{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],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e){return Ae.replace({widget:new YI(this.size,e)}).range(this.from,this.to)}}class YI extends Di{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 gb{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=mb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Zt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(mv).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new LI(n),this.stateDeco=e.facet(Qu).filter(r=>typeof r!="function"),this.heightMap=Yn.empty().applyChanges(this.stateDeco,pt.empty,this.heightOracle.setDoc(e.doc),[new $i(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ae.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:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new nf(o,s))}}this.viewports=e.sort((r,i)=>r.from-i.from),this.scaler=this.heightMap.height<=7e6?mb:new GI(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:La(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Qu).filter(u=>typeof u!="function");let i=e.changedRanges,o=$i.extendWithRanges(i,XI(r,this.stateDeco,e?e.changes:fn.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2);let l=o.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(vE)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Zt.RTL:Zt.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),l=n.getBoundingClientRect(),a=s||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 d=(this.printing?ZI:UI)(n,this.paddingTop),p=d.top-this.pixelViewport.top,g=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let O=l.width;if((this.contentDOMWidth!=O||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)&&(s=!0),s||i.lineWrapping&&Math.abs(O-this.contentDOMWidth)>i.charWidth){let{lineHeight:b,charWidth:x}=e.docView.measureTextSize();s=b>0&&i.refresh(o,b,x,O/x,y),s&&(e.docView.minWidth=0,u|=8)}p>0&&g>0?c=Math.max(p,g):p<0&&g<0&&(c=Math.min(p,g)),i.heightChanged=!1;for(let b of this.viewports){let x=b.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(b);this.heightMap=(s?Yn.empty().applyChanges(this.stateDeco,pt.empty,this.heightOracle,[new $i(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new VI(b.from,x))}i.heightChanged&&(u|=2)}let m=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return m&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||m)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]: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,o=this.heightOracle,{visibleTop:s,visibleBottom:l}=this,a=new nf(i.lineAt(s-r*1e3,Dt.ByHeight,o,0,0).from,i.lineAt(l+(1-r)*1e3,Dt.ByHeight,o,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,Dt.ByPos,o,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 nf(i.lineAt(h-1e3/2,Dt.ByHeight,o,0,0).from,i.lineAt(h+c+1e3/2,Dt.ByHeight,o,0,0).to)}}return a}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new nf(this.heightMap.lineAt(r,Dt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Dt.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,Dt.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,Dt.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:l}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=l+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<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 og(n.mapPos(i.from),n.mapPos(i.to),i.size));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=Zt.LTR&&!r)return[];let l=[],a=(u,c,f,h)=>{if(c-u<o)return;let d=this.state.selection.main,p=[d.from];d.empty||p.push(d.to);for(let v of p)if(v>u&&v<c){a(u,v-10,f,h),a(v+10,c,f,h);return}let g=qI(e,v=>v.from>=f.from&&v.to<=f.to&&Math.abs(v.from-u)<o&&Math.abs(v.to-c)<o&&!p.some(O=>v.from<O&&v.to>O));if(!g){if(c<f.to&&n&&r&&n.visibleRanges.some(v=>v.from<=c&&v.to>=c)){let v=n.moveToLineBoundary(J.cursor(c),!1,!0).head;v>u&&(c=v)}g=new og(u,c,this.gapSize(f,u,c,h))}l.push(g)};for(let u of this.viewportLines){if(u.length<s)continue;let c=zI(u.from,u.to,this.stateDeco);if(c.total<s)continue;let f=this.scrollTarget?this.scrollTarget.range.head:null,h,d;if(r){let p=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,v;if(f!=null){let O=of(c,f),m=((this.visibleBottom-this.visibleTop)/2+p)/u.height;g=O-m,v=O+m}else g=(this.visibleTop-u.top-p)/u.height,v=(this.visibleBottom-u.top+p)/u.height;h=rf(c,g),d=rf(c,v)}else{let p=c.total*this.heightOracle.charWidth,g=i*this.heightOracle.charWidth,v,O;if(f!=null){let m=of(c,f),y=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/p;v=m-y,O=m+y}else v=(this.pixelViewport.left-g)/p,O=(this.pixelViewport.right+g)/p;h=rf(c,v),d=rf(c,O)}h>u.from&&a(u.from,h,u,c),d<u.to&&a(d,u.to,u,c)}return l}gapSize(e,n,r,i){let o=of(i,r)-of(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){og.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ae.set(e.map(n=>n.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];yt.spans(e,this.viewport.from,this.viewport.to,{span(i,o){n.push({from:i,to:o})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=n[o].from||i.to!=n[o].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)||La(this.heightMap.lineAt(e,Dt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return La(this.heightMap.lineAt(this.scaler.fromDOM(e),Dt.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return La(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 nf{constructor(e,n){this.from=e,this.to=n}}function zI(t,e,n){let r=[],i=t,o=0;return yt.spans(n,t,e,{span(){},point(s,l){s>i&&(r.push({from:i,to:s}),o+=s-i),i=l}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function rf({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:o,to:s}=e[i],l=s-o;if(r<=l)return o+r;r-=l}}function of(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 qI(t,e){for(let n of t)if(e(n))return n}const mb={toDOM(t){return t},fromDOM(t){return t},scale:1};class GI{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:l,to:a})=>{let u=n.lineAt(l,Dt.ByPos,e,0,0).top,c=n.lineAt(a,Dt.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=s+(l.top-o)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),o=l.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}}function La(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Wi(t.from,t.length,n,r-n,Array.isArray(t.type)?t.type.map(i=>La(i,e)):t.type)}const sf=Ce.define({combine:t=>t.join(" ")}),yO=Ce.define({combine:t=>t.indexOf(!0)>-1}),vO=Bo.newName(),VE=Bo.newName(),BE=Bo.newName(),FE={"&light":"."+VE,"&dark":"."+BE};function SO(t,e,n){return new Bo(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 HI=SO("."+vO,{"&":{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":{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"}},FE);class KI{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:s}=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=o||s?[]:eN(e),a=new CE(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=tN(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=o&&o.node==l.focusNode&&o.offset==l.focusOffset||!Ml(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),u=s&&s.node==l.anchorNode&&s.offset==l.anchorOffset||!Ml(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=J.single(u,a)}}}function XE(t,e){let n,{newSel:r}=e,i=t.state.selection.main;if(e.bounds){let{from:o,to:s}=e.bounds,l=i.from,a=null;(t.inputState.lastKeyCode===8&&t.inputState.lastKeyTime>Date.now()-100||Te.android&&e.text.length<s-o)&&(l=i.to,a="end");let u=JI(t.state.doc.sliceString(o,s,Eo),e.text,l-o,a);u&&(Te.chrome&&t.inputState.lastKeyCode==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Eo+Eo&&u.toB--,n={from:o+u.from,to:o+u.toA,insert:pt.of(e.text.slice(u.from,u.toB).split(Eo))})}else r&&(!t.hasFocus&&t.state.facet(Md)||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))}:(Te.mac||Te.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=J.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:pt.of([" "])}):Te.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
73
- `&&t.lineWrapping&&(r&&(r=J.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:pt.of([" "])}),n){let o=t.state;if(Te.ios&&t.inputState.flushIOSKey(t)||Te.android&&(n.from==i.from&&n.to==i.to&&n.insert.length==1&&n.insert.lines==2&&Sl(t.contentDOM,"Enter",13)||n.from==i.from-1&&n.to==i.to&&n.insert.length==0&&Sl(t.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&n.insert.length==0&&Sl(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();if(t.state.facet(mE).some(u=>u(t,n.from,n.to,s)))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?o.sliceDoc(i.from,n.from):"",c=i.to>n.to?o.sliceDoc(n.to,i.to):"";l=o.replaceSelection(t.state.toText(u+n.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let u=o.changes(n),c=r&&!o.selection.main.eq(r.main)&&r.main.to<=u.newLength?r.main:void 0;if(o.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=EE(t)||t.state.doc.lineAt(i.head),d=i.to-n.to,p=i.to-i.from;l=o.changeByRange(g=>{if(g.from==i.from&&g.to==i.to)return{changes:u,range:c||g.map(u)};let v=g.to-d,O=v-f.length;if(g.to-g.from!=p||t.state.sliceDoc(O,v)!=f||h&&g.to>=h.from&&g.from<=h.to)return{range:g};let m=o.changes({from:O,to:v,insert:n.insert}),y=g.to-i.to;return{changes:m,range:c?J.range(Math.max(0,c.anchor+y),Math.max(0,c.head+y)):g.map(m)}})}else l={changes:u,selection:c&&o.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 o=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:o,userEvent:s}),!0}else return!1}function JI(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,l=e.length;for(;s>0&&l>0&&t.charCodeAt(s-1)==e.charCodeAt(l-1);)s--,l--;if(r=="end"){let a=Math.max(0,o-Math.min(s,l));n-=s+a-o}if(s<o&&t.length<e.length){let a=n<=o&&n>=s?o-n:0;o-=a,l=o+(l-s),s=o}else if(l<o){let a=n<=o&&n>=l?o-n:0;o-=a,s=o+(s-l),l=o}return{from:o,toA:s,toB:l}}function eN(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new HS(n,r)),(i!=n||o!=r)&&e.push(new HS(i,o))),e}function tN(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?J.single(n+e,r+e):null}const nN={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},sg=Te.ie&&Te.ie_version<=11;class rN{constructor(e){this.view=e,this.active=!1,this.selectionRange=new GM,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);(Te.ie&&Te.ie_version<=11||Te.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()}),sg&&(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(Md)?r.root.activeElement!=this.dom:!Ff(r.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Te.ie&&Te.ie_version<=11||Te.android&&Te.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Th(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Te.safari&&e.root.nodeType==11&&ZM(this.dom.ownerDocument)==this.dom&&iN(this.view)||_h(e.root);if(!n||this.selectionRange.eq(n))return!1;let r=Ff(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&KM(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,nN),sg&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),sg&&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 o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),!this.flush()&&o.force&&Sl(this.dom,o.key,o.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 o of this.observer.takeRecords())e.push(o);e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Ff(this.dom,this.selectionRange);return e<0&&!i?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new KI(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=XE(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=Ob(n,e.previousSibling||e.target.previousSibling,-1),i=Ob(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 o of this.scrollTargets)o.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 Ob(t,e,n){for(;e;){let r=Nt.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 iN(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,o=e.endContainer,s=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);return Th(l.node,l.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}class be{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||HM(e.parent)||document,this.viewState=new gb(e.state||ct.create(e)),this.plugins=this.state.facet(Na).map(n=>new ng(n));for(let n of this.plugins)n.update(this);this.observer=new rN(this),this.inputState=new CI(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new KS(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 pn?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,o=this.state;for(let h of e){if(h.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=h.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,l=0,a=null;e.some(h=>h.annotation(IE))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,a=NE(o,s),a||(l=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(ct.phrases)!=this.state.facet(ct.phrases))return this.setState(o);i=Dh.create(this,o,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:d}=h.state.selection;f=new Rh(d.empty?d:J.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of h.effects)d.is(qS)&&(f=d.value)}this.viewState.update(i,f),this.bidiCache=Mh.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(ja)!=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(sf)!=i.state.facet(sf)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty)for(let h of this.state.facet(hO))h(i);(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!XE(this,c)&&u.force&&Sl(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 gb(e),this.plugins=e.facet(Na).map(r=>new ng(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView=new KS(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(Na),r=e.state.facet(Na);if(n!=r){let i=[];for(let o of r){let s=n.indexOf(o);if(s<0)i.push(new ng(o));else{let l=this.plugins[s];l.mustUpdate=e,i.push(l)}}for(let o of this.plugins)o.mustUpdate!=e&&o.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&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,{scrollHeight:r,scrollTop:i,clientHeight:o}=this.scrollDOM,s=i>r-o-4?r:i;try{for(let l=0;;l++){this.updateState=1;let a=this.viewport,u=this.viewState.lineBlockAtHeight(s),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(v=>{try{return v.read(this)}catch(O){return vr(this.state,O),yb}}),d=Dh.create(this,this.state,[]),p=!1,g=!1;d.flags|=c,n?n.flags|=c:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),p=this.docView.update(d));for(let v=0;v<f.length;v++)if(h[v]!=yb)try{let O=f[v];O.write&&O.write(h[v],this)}catch(O){vr(this.state,O)}if(this.viewState.editorHeight)if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,g=!0;else{let v=this.viewState.lineBlockAt(u.from).top-u.top;(v>1||v<-1)&&(this.scrollDOM.scrollTop+=v,g=!0)}if(p&&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(hO))l(n)}get themeClasses(){return vO+" "+(this.state.facet(yO)?BE:VE)+" "+this.state.facet(sf)}updateAttrs(){let e=vb(this,SE,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Md)?"true":"false",class:"cm-content",style:`${Te.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),vb(this,mv,n);let r=this.observer.ignore(()=>{let i=cO(this.contentDOM,this.contentAttrs,n),o=cO(this.dom,this.editorAttrs,e);return i||o});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(be.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ja),Bo.mount(this.root,this.styleModules.concat(HI).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 ig(this,e,ib(this,e,n,r))}moveByGroup(e,n){return ig(this,e,ib(this,e,n,r=>PI(this,e.head,r)))}moveToLineBoundary(e,n,r=!0){return kI(this,e,n,r)}moveVertically(e,n,r){return ig(this,e,xI(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(),$E(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),o=this.bidiSpans(i),s=o[bl.find(o,e-i.from,-1,n)];return hv(r,s.dir==Zt.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(yE)||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>oN)return PE(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=uI(e.text,n);return this.bidiCache.push(new Mh(e.from,e.to,n,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Te.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{JC(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&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return qS.of(new Rh(typeof e=="number"?J.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(e){return qt.define(()=>({}),{eventHandlers:e})}static theme(e,n){let r=Bo.newName(),i=[sf.of(r),ja.of(SO(`.${r}`,e))];return n&&n.dark&&i.push(yO.of(!0)),i}static baseTheme(e){return qo.lowest(ja.of(SO("."+vO,e,FE)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&Nt.get(r)||Nt.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}be.styleModule=ja;be.inputHandler=mE;be.focusChangeEffect=OE;be.perLineTextDirection=yE;be.exceptionSink=gE;be.updateListener=hO;be.editable=Md;be.mouseSelectionStyle=pE;be.dragMovesSelection=dE;be.clickAddsSelectionRange=hE;be.decorations=Qu;be.atomicRanges=bE;be.scrollMargins=wE;be.darkTheme=yO;be.contentAttributes=mv;be.editorAttributes=SE;be.lineWrapping=be.contentAttributes.of({class:"cm-lineWrapping"});be.announce=tt.define();const oN=4096,yb={};class Mh{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:Zt.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new Mh(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.order))}return r}}function vb(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],s=typeof o=="function"?o(t):o;s&&uO(s,n)}return n}const sN=Te.mac?"mac":Te.windows?"win":Te.linux?"linux":"key";function lN(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,s,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))o=!0;else if(/^s(hift)?$/i.test(u))s=!0;else if(/^mod$/i.test(u))e=="mac"?l=!0:o=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),l&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function lf(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 aN=qo.default(be.domEventHandlers({keydown(t,e){return UE(WE(e.state),t,e,"editor")}})),tc=Ce.define({enables:aN}),Sb=new WeakMap;function WE(t){let e=t.facet(tc),n=Sb.get(e);return n||Sb.set(e,n=fN(e.reduce((r,i)=>r.concat(i),[]))),n}function uN(t,e,n){return UE(WE(t.state),e,t,n)}let So=null;const cN=4e3;function fN(t,e=sN){let n=Object.create(null),r=Object.create(null),i=(s,l)=>{let a=r[s];if(a==null)r[s]=l;else if(a!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,l,a,u)=>{var c,f;let h=n[s]||(n[s]=Object.create(null)),d=l.split(/ (?!$)/).map(v=>lN(v,e));for(let v=1;v<d.length;v++){let O=d.slice(0,v).join(" ");i(O,!0),h[O]||(h[O]={preventDefault:!0,run:[m=>{let y=So={view:m,prefix:O,scope:s};return setTimeout(()=>{So==y&&(So=null)},cN),!0}]})}let p=d.join(" ");i(p,!1);let g=h[p]||(h[p]={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 s of t){let l=s.scope?s.scope.split(" "):["editor"];if(s.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(s.any)}let a=s[e]||s.key;if(a)for(let u of l)o(u,a,s.run,s.preventDefault),s.shift&&o(u,"Shift-"+a,s.shift,s.preventDefault)}return n}function UE(t,e,n,r){let i=UM(e),o=Cn(i,0),s=Ar(o)==i.length&&i!=" ",l="",a=!1;So&&So.view==n&&So.scope==r&&(l=So.prefix+" ",(a=TE.indexOf(e.keyCode)<0)&&(So=null));let u=new Set,c=p=>{if(p){for(let g of p.run)if(!u.has(g)&&(u.add(g),g(n,e)))return!0;p.preventDefault&&(a=!0)}return!1},f=t[r],h,d;if(f){if(c(f[l+lf(i,e,!s)]))return!0;if(s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Te.windows&&e.ctrlKey&&e.altKey)&&(h=Fo[e.keyCode])&&h!=i){if(c(f[l+lf(h,e,!0)]))return!0;if(e.shiftKey&&(d=xu[e.keyCode])!=i&&d!=h&&c(f[l+lf(d,e,!1)]))return!0}else if(s&&e.shiftKey&&c(f[l+lf(i,e,!0)]))return!0;if(c(f._any))return!0}return a}class nc{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}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 o=ZE(e);return[new nc(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return hN(e,n,r)}}function ZE(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Zt.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function bb(t,e,n){let r=J.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:Pt.Text}}function wb(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==Pt.Text))return r}return n}function hN(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),o=t.textDirection==Zt.LTR,s=t.contentDOM,l=s.getBoundingClientRect(),a=ZE(t),u=window.getComputedStyle(s.firstChild),c=l.left+parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)),f=l.right-parseInt(u.paddingRight),h=wb(t,r),d=wb(t,i),p=h.type==Pt.Text?h:null,g=d.type==Pt.Text?d:null;if(t.lineWrapping&&(p&&(p=bb(t,r,p)),g&&(g=bb(t,i,g))),p&&g&&p.from==g.from)return O(m(n.from,n.to,p));{let b=p?m(n.from,null,p):y(h,!1),x=g?m(null,n.to,g):y(d,!0),E=[];return(p||h).to<(g||d).from-1?E.push(v(c,b.bottom,f,x.top)):b.bottom<x.top&&t.elementAtHeight((b.bottom+x.top)/2).type==Pt.Text&&(b.bottom=x.top=(b.bottom+x.top)/2),O(b).concat(E).concat(O(x))}function v(b,x,E,T){return new nc(e,b-a.left,x-a.top-.01,E-b,T-x+.01)}function O({top:b,bottom:x,horizontal:E}){let T=[];for(let w=0;w<E.length;w+=2)T.push(v(E[w],b,E[w+1],x));return T}function m(b,x,E){let T=1e9,w=-1e9,k=[];function C(N,V,G,M,j){let A=t.coordsAtPos(N,N==E.to?-2:2),X=t.coordsAtPos(G,G==E.from?2:-2);T=Math.min(A.top,X.top,T),w=Math.max(A.bottom,X.bottom,w),j==Zt.LTR?k.push(o&&V?c:A.left,o&&M?f:X.right):k.push(!o&&M?c:X.left,!o&&V?f:A.right)}let Q=b??E.from,D=x??E.to;for(let N of t.visibleRanges)if(N.to>Q&&N.from<D)for(let V=Math.max(N.from,Q),G=Math.min(N.to,D);;){let M=t.state.doc.lineAt(V);for(let j of t.bidiSpans(M)){let A=j.from+M.from,X=j.to+M.from;if(A>=G)break;X>V&&C(Math.max(A,V),b==null&&A<=Q,Math.min(X,G),x==null&&X>=D,j.dir)}if(V=M.to+1,V>=G)break}return k.length==0&&C(Q,b==null,D,x==null,t.textDirection),{top:T,bottom:w,horizontal:k}}function y(b,x){let E=l.top+(x?b.top:b.bottom);return{top:E,bottom:E,horizontal:[]}}}function dN(t,e){return t.constructor==e.constructor&&t.eq(e)}class pN{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(Wf)!=e.state.facet(Wf)&&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(Wf);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)=>!dN(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 Wf=Ce.define();function YE(t){return[qt.define(e=>new pN(e,t)),Wf.of(t)]}const zE=!Te.ios,$u=Ce.define({combine(t){return Ri(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function gN(t={}){return[$u.of(t),mN,ON,yN,vE.of(!0)]}function qE(t){return t.startState.facet($u)!=t.state.facet($u)}const mN=YE({above:!0,markers(t){let{state:e}=t,n=e.facet($u),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||zE:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=i.empty?i:J.cursor(i.head,i.head>i.anchor?-1:1);for(let a of nc.forRange(t,s,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=qE(t);return n&&kb(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){kb(e.state,t)},class:"cm-cursorLayer"});function kb(t,e){e.style.animationDuration=t.facet($u).cursorBlinkRate+"ms"}const ON=YE({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:nc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||qE(t)},class:"cm-selectionLayer"}),GE={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};zE&&(GE[".cm-line"].caretColor="transparent !important");const yN=qo.highest(be.theme(GE)),HE=tt.define({map(t,e){return t==null?null:e.mapPos(t)}}),Va=On.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(HE)?r.value:n,t)}}),vN=qt.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(Va);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(Va)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let t=this.view.state.field(Va),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(Va)!=t&&this.view.dispatch({effects:HE.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 SN(){return[Va,vN]}function Pb(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),s=n,l;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;l=e.exec(o.value);)i(s+l.index,l)}function bN(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:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class wN{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:s=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=o,this.maxLength=s}createDeco(e){let n=new Vo,r=n.add.bind(n);for(let{from:i,to:o}of bN(e,this.maxLength))Pb(e.state.doc,this.regexp,i,o,(s,l)=>this.addMatch(l,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,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 o of e.visibleRanges){let s=Math.max(o.from,r),l=Math.min(o.to,i);if(l>s){let a=e.state.doc.lineAt(s),u=a.to<l?e.state.doc.lineAt(l):a,c=Math.max(o.from,a.from),f=Math.min(o.to,u.to);if(this.boundary){for(;s>a.from;s--)if(this.boundary.test(a.text[s-1-a.from])){c=s;break}for(;l<u.to;l++)if(this.boundary.test(u.text[l-u.from])){f=l;break}}let h=[],d,p=(g,v,O)=>h.push(O.range(g,v));if(a==u)for(this.regexp.lastIndex=c-a.from;(d=this.regexp.exec(a.text))&&d.index<f-a.from;)this.addMatch(d,e,d.index+a.from,p);else Pb(e.state.doc,this.regexp,c,f,(g,v)=>this.addMatch(v,e,g,p));n=n.update({filterFrom:c,filterTo:f,filter:(g,v)=>g<c||v>f,add:h})}}return n}}const bO=/x/.unicode!=null?"gu":"g",kN=new RegExp(`[\0-\b
74
- --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,bO),PN={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 lg=null;function xN(){var t;if(lg==null&&typeof document<"u"&&document.body){let e=document.body.style;lg=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return lg||!1}const Uf=Ce.define({combine(t){let e=Ri(t,{render:null,specialChars:kN,addSpecialChars:null});return(e.replaceTabs=!xN())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,bO)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,bO)),e}});function CN(t={}){return[Uf.of(t),EN()]}let xb=null;function EN(){return xb||(xb=qt.fromClass(class{constructor(t){this.view=t,this.decorations=Ae.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Uf)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new wN({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Cn(e[0],0);if(o==9){let s=i.lineAt(r),l=n.state.tabSize,a=Ju(s.text,l,r-s.from);return Ae.replace({widget:new TN((l-a%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[o]||(this.decorationCache[o]=Ae.replace({widget:new _N(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Uf);t.startState.facet(Uf)!=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 QN="•";function $N(t){return t>=32?QN:t==10?"␤":String.fromCharCode(9216+t)}class _N extends Di{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=$N(this.code),r=e.state.phrase("Control character")+" "+(PN[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class TN extends Di{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 AN(){return DN}const RN=Ae.line({class:"cm-activeLine"}),DN=qt.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(RN.range(i.from)),e=i.from)}return Ae.set(n)}},{decorations:t=>t.decorations}),wO=2e3;function MN(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>wO||n.off>wO||e.col<0||n.col<0){let s=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&&o.push(J.range(u.from+s,u.to+l))}}else{let s=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=tO(u.text,s,t.tabSize,!0);if(c<0)o.push(J.cursor(u.to));else{let f=tO(u.text,l,t.tabSize);o.push(J.range(u.from+c,u.from+f))}}}return o}function IN(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Cb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>wO?-1:i==r.length?IN(t,e.clientX):Ju(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function NN(t,e){let n=Cb(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let l=Cb(t,i);if(!l)return r;let a=MN(t.state,n,l);return a.length?s?J.create(a.concat(r.ranges)):J.create(a):r}}:null}function jN(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return be.mouseSelectionStyle.of((n,r)=>e(r)?NN(n,r):null)}const LN={Alt:[18,t=>t.altKey],Control:[17,t=>t.ctrlKey],Shift:[16,t=>t.shiftKey],Meta:[91,t=>t.metaKey]},VN={style:"cursor: crosshair"};function BN(t={}){let[e,n]=LN[t.key||"Alt"],r=qt.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,be.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?VN:null})]}const af="-10000px";class KE{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(s=>s);if(r===this.input){for(let s of this.tooltipViews)s.update&&s.update(e);return!1}let o=[];for(let s=0;s<i.length;s++){let l=i[s],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)o[s]=this.createTooltipView(l);else{let u=o[s]=this.tooltipViews[a];u.update&&u.update(e)}}}for(let s of this.tooltipViews)o.indexOf(s)<0&&(s.dom.remove(),(n=s.destroy)===null||n===void 0||n.call(s));return this.input=r,this.tooltips=i,this.tooltipViews=o,!0}}function FN(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const ag=Ce.define({combine:t=>{var e,n,r;return{position:Te.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)||FN}}}),Eb=new WeakMap,JE=qt.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(ag);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 KE(t,yv,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(ag);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=af,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(ag).tooltipSpace(this.view)}}writeMeasure(t){var e;let{editor:n,space:r}=t,i=[];for(let o=0;o<this.manager.tooltips.length;o++){let s=this.manager.tooltips[o],l=this.manager.tooltipViews[o],{dom:a}=l,u=t.pos[o],c=t.size[o];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=af;continue}let f=s.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,h=f?7:0,d=c.right-c.left,p=(e=Eb.get(l))!==null&&e!==void 0?e:c.bottom-c.top,g=l.offset||WN,v=this.view.textDirection==Zt.LTR,O=c.width>r.right-r.left?v?r.left:r.right-c.width:v?Math.min(u.left-(f?14:0)+g.x,r.right-d):Math.max(r.left,u.left-d+(f?14:0)-g.x),m=!!s.above;!s.strictSide&&(m?u.top-(c.bottom-c.top)-g.y<r.top:u.bottom+(c.bottom-c.top)+g.y>r.bottom)&&m==r.bottom-u.bottom>u.top-r.top&&(m=!m);let y=(m?u.top-r.top:r.bottom-u.bottom)-h;if(y<p&&l.resize!==!1){if(y<this.view.defaultLineHeight){a.style.top=af;continue}Eb.set(l,p),a.style.height=(p=y)+"px"}else a.style.height&&(a.style.height="");let b=m?u.top-p-h-g.y:u.bottom+h+g.y,x=O+d;if(l.overlap!==!0)for(let E of i)E.left<x&&E.right>O&&E.top<b+p&&E.bottom>b&&(b=m?E.top-p-2-h:E.bottom+h+2);this.position=="absolute"?(a.style.top=b-t.parent.top+"px",a.style.left=O-t.parent.left+"px"):(a.style.top=b+"px",a.style.left=O+"px"),f&&(f.style.left=`${u.left+(v?g.x:-g.x)-(O+14-7)}px`),l.overlap!==!0&&i.push({left:O,top:b,right:x,bottom:b+p}),a.classList.toggle("cm-tooltip-above",m),a.classList.toggle("cm-tooltip-below",!m),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=af}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),XN=be.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"}}}),WN={x:0,y:0},yv=Ce.define({enables:[JE,XN]}),Ih=Ce.define();class vv{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new KE(e,Ih,n=>this.createHostedView(n))}static create(e){return new vv(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 UN=yv.compute([Ih],t=>{let e=t.facet(Ih).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:vv.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class ZN{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,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),o=i&&i.dir==Zt.RTL?-1:1,s=this.source(this.view,n,e.x<r.left?-o:o);if(s!=null&&s.then){let l=this.pending={pos:n};s.then(a=>{this.pending==l&&(this.pending=null,a&&this.view.dispatch({effects:this.setHover.of(a)}))},a=>vr(this.view.state,a,"hover tooltip"))}else s&&this.view.dispatch({effects:this.setHover.of(s)})}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&&!Qb(this.lastMove.target)||this.pending){let{pos:i}=r||this.pending,o=(n=r==null?void 0:r.end)!==null&&n!==void 0?n:i;(i==o?this.view.posAtCoords(this.lastMove)!=i:!YN(this.view,i,o,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&&!Qb(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 Qb(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function YN(t,e,n,r,i,o){let s=document.createRange(),l=t.domAtPos(e),a=t.domAtPos(n);s.setEnd(a.node,a.offset),s.setStart(l.node,l.offset);let u=s.getClientRects();s.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)<=o)return!0}return!1}function zN(t,e={}){let n=tt.define(),r=On.define({create(){return null},update(i,o){if(i&&(e.hideOnChange&&(o.docChanged||o.selection)||e.hideOn&&e.hideOn(o,i)))return null;if(i&&o.docChanged){let s=o.changes.mapPos(i.pos,-1,hn.TrackDel);if(s==null)return null;let l=Object.assign(Object.create(null),i);l.pos=s,i.end!=null&&(l.end=o.changes.mapPos(i.end)),i=l}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(qN)&&(i=null);return i},provide:i=>Ih.from(i)});return[r,qt.define(i=>new ZN(i,t,r,n,e.hoverTime||300)),UN]}function eQ(t,e){let n=t.plugin(JE);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const qN=tt.define(),$b=Ce.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 _u(t,e){let n=t.plugin(tQ),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const tQ=qt.fromClass(class{constructor(t){this.input=t.state.facet(Tu),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet($b);this.top=new uf(t,!0,e.topContainer),this.bottom=new uf(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($b);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new uf(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new uf(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Tu);if(n!=this.input){let r=n.filter(a=>a),i=[],o=[],s=[],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?o:s).push(c)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(s);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=>be.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class uf{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=_b(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=_b(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 _b(t){let e=t.nextSibling;return t.remove(),e}const Tu=Ce.define({enables:tQ});class no extends xs{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}no.prototype.elementClass="";no.prototype.toDOM=void 0;no.prototype.mapMode=hn.TrackBefore;no.prototype.startSide=no.prototype.endSide=-1;no.prototype.point=!0;const Zf=Ce.define(),GN={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>yt.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},nu=Ce.define();function HN(t){return[nQ(),nu.of(Object.assign(Object.assign({},GN),t))]}const kO=Ce.define({combine:t=>t.some(e=>e)});function nQ(t){let e=[KN];return t&&t.fixed===!1&&e.push(kO.of(!0)),e}const KN=qt.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(nu).map(e=>new Ab(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(kO),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(kO)!=!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=yt.iter(this.view.state.facet(Zf),this.view.viewport.from),r=[],i=this.gutters.map(o=>new JN(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks){let s;if(Array.isArray(o.type)){for(let l of o.type)if(l.type==Pt.Text){s=l;break}}else s=o.type==Pt.Text?o:void 0;if(s){r.length&&(r=[]),rQ(n,r,o.from);for(let l of i)l.line(this.view,s,r)}}for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(nu),n=t.state.facet(nu),r=t.docChanged||t.heightChanged||t.viewportChanged||!yt.eq(t.startState.facet(Zf),t.state.facet(Zf),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 o of n){let s=e.indexOf(o);s<0?i.push(new Ab(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>be.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==Zt.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}})});function Tb(t){return Array.isArray(t)?t:[t]}function rQ(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class JN{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=yt.iter(e.markers,n.from)}line(e,n,r){let i=[];rQ(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;if(i.length==0&&!s.config.renderEmptyElements)return;let l=n.top-this.height;if(this.i==s.elements.length){let a=new iQ(e,n.height,l,i);s.elements.push(a),s.dom.appendChild(a.dom)}else s.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 Ab{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 o=i.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let a=o.getBoundingClientRect();s=(a.top+a.bottom)/2}else s=i.clientY;let l=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=Tb(n.markers(e)),n.initialSpacer&&(this.spacer=new iQ(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=Tb(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!yt.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 iQ{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":""),e5(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let l=s,a=o<n.length?n[o++]:null,u=!1;if(a){let c=a.elementClass;c&&(r+=" "+c);for(let f=s;f<this.markers.length;f++)if(this.markers[f].compare(a)){l=f,u=!0;break}}else l=this.markers.length;for(;s<l;){let c=this.markers[s++];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&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function e5(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 t5=Ce.define(),ul=Ce.define({combine(t){return Ri(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(l,a,u)=>o(l,a,u)||s(l,a,u):s}return r}})}});class ug extends no{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function cg(t,e){return t.state.facet(ul).formatNumber(e,t.state)}const n5=nu.compute([ul],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(t5)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new ug(cg(e,e.state.doc.lineAt(n.from).number))},lineMarkerChange:e=>e.startState.facet(ul)!=e.state.facet(ul),initialSpacer(e){return new ug(cg(e,Rb(e.state.doc.lines)))},updateSpacer(e,n){let r=cg(n.view,Rb(n.view.state.doc.lines));return r==e.number?e:new ug(r)},domEventHandlers:t.facet(ul).domEventHandlers}));function r5(t={}){return[ul.of(t),nQ(),n5]}function Rb(t){let e=9;for(;e<t;)e=e*10+9;return e}const i5=new class extends no{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},o5=Zf.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(i5.range(i)))}return yt.of(e)});function s5(){return o5}const oQ=1024;let l5=0;class Dr{constructor(e,n){this.from=e,this.to=n}}class qe{constructor(e={}){this.id=l5++,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=mn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}qe.closedBy=new qe({deserialize:t=>t.split(" ")});qe.openedBy=new qe({deserialize:t=>t.split(" ")});qe.group=new qe({deserialize:t=>t.split(" ")});qe.contextHash=new qe({perNode:!0});qe.lookAhead=new qe({perNode:!0});qe.mounted=new qe({perNode:!0});class a5{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}}const u5=Object.create(null);class mn{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):u5,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new mn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[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(qe.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(qe.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}mn.none=new mn("",Object.create(null),0,8);class rc{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 o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new mn(r.name,i,r.id,r.flags):r)}return new rc(n)}}const cf=new WeakMap,Db=new WeakMap;var Mt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Mt||(Mt={}));class vt{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,l]of o)this.props[typeof s=="number"?s:s.id]=l}}toString(){let e=this.prop(qe.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 Au(this.topNode,e)}cursorAt(e,n=0,r=0){let i=cf.get(this)||this.topNode,o=new Au(i);return o.moveTo(e,n),cf.set(this,o._tree),o}get topNode(){return new jr(this,0,0,null)}resolve(e,n=0){let r=jl(cf.get(this)||this.topNode,e,n,!1);return cf.set(this,r),r}resolveInner(e,n=0){let r=jl(Db.get(this)||this.topNode,e,n,!0);return Db.set(this,r),r}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e;for(let s=this.cursor((e.mode||0)|Mt.IncludeAnonymous);;){let l=!1;if(s.from<=o&&s.to>=i&&(s.type.isAnonymous||n(s)!==!1)){if(s.firstChild())continue;l=!0}for(;l&&r&&!s.type.isAnonymous&&r(s),!s.nextSibling();){if(!s.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:wv(mn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new vt(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new vt(mn.none,n,r,i)))}static build(e){return f5(e)}}vt.empty=new vt(mn.none,[],[],0);class Sv{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 Sv(this.buffer,this.index)}}class Ts{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return mn.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],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,l=-1;for(let a=e;a!=n&&!(sQ(o,i,s[a+1],s[a+2])&&(l=a,r>0));a=s[a+3]);return l}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let l=e,a=0;l<n;){o[a++]=i[l++],o[a++]=i[l++]-r;let u=o[a++]=i[l++]-r;o[a++]=i[l++]-e,s=Math.max(s,u)}return new Ts(o,s,this.set)}}function sQ(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 lQ(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 jl(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 s=!r&&t instanceof jr&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Mt.IgnoreOverlays;if(r)for(let s=t,l=s.parent;l;s=l,l=s.parent)s instanceof jr&&s.index<0&&((i=l.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=l);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class jr{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,o=0){for(let s=this;;){for(let{children:l,positions:a}=s._tree,u=n>0?l.length:-1;e!=u;e+=n){let c=l[e],f=a[e]+s.from;if(sQ(i,r,f,f+c.length)){if(c instanceof Ts){if(o&Mt.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,n,r-f,i);if(h>-1)return new wi(new c5(s,c,e,f),null,h)}else if(o&Mt.IncludeAnonymous||!c.type.isAnonymous||bv(c)){let h;if(!(o&Mt.IgnoreMounts)&&c.props&&(h=c.prop(qe.mounted))&&!h.overlay)return new jr(h.tree,f,e,s);let d=new jr(c,f,e,s);return o&Mt.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(o&Mt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))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&Mt.IgnoreOverlays)&&(i=this._tree.prop(qe.mounted))&&i.overlay){let o=e-this.from;for(let{from:s,to:l}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?l>=o:l>o))return new jr(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 Au(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,n=0){return jl(this,e,n,!1)}resolveInner(e,n=0){return jl(this,e,n,!0)}enterUnfinishedNodesBefore(e){return lQ(this,e)}getChild(e,n=null,r=null){let i=Nh(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Nh(this,e,n,r)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return jh(this,e)}}function Nh(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(;!i.type.is(n);)if(!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function jh(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 c5{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class wi{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,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new wi(this.context,this,o)}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&Mt.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new wi(this.context,this,o)}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 wi(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 wi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}cursor(e=0){return new Au(this,e)}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new vt(this.type,e,n,this.to-this.from)}resolve(e,n=0){return jl(this,e,n,!1)}resolveInner(e,n=0){return jl(this,e,n,!0)}enterUnfinishedNodesBefore(e){return lQ(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,n=null,r=null){let i=Nh(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Nh(this,e,n,r)}get node(){return this}matchContext(e){return jh(this,e)}}class Au{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 jr)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 jr?(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,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}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&Mt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Mt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Mt.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 o=0;o<this.index;o++)if(i.buffer.buffer[o+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 o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let l=r._tree.children[o];if(this.mode&Mt.IncludeAnonymous||l instanceof Ts||!l.type.isAnonymous||bv(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,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new wi(this.buffer,n,this.stack[i]);return this.bufferNode=new wi(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 jh(this.node,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return jh(this.node,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function bv(t){return t.children.some(e=>e instanceof Ts||!e.type.isAnonymous||bv(e))}function f5(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=oQ,reused:o=[],minRepeatType:s=r.types.length}=t,l=Array.isArray(n)?new Sv(n,n.length):n,a=r.types,u=0,c=0;function f(b,x,E,T,w){let{id:k,start:C,end:Q,size:D}=l,N=c;for(;D<0;)if(l.next(),D==-1){let A=o[k];E.push(A),T.push(C-b);return}else if(D==-3){u=k;return}else if(D==-4){c=k;return}else throw new RangeError(`Unrecognized record size: ${D}`);let V=a[k],G,M,j=C-b;if(Q-C<=i&&(M=g(l.pos-x,w))){let A=new Uint16Array(M.size-M.skip),X=l.pos-M.size,z=A.length;for(;l.pos>X;)z=v(M.start,A,z);G=new Ts(A,Q-M.start,r),j=M.start-b}else{let A=l.pos-D;l.next();let X=[],z=[],pe=k>=s?k:-1,ae=0,B=Q;for(;l.pos>A;)pe>=0&&l.id==pe&&l.size>=0?(l.end<=B-i&&(d(X,z,C,ae,l.end,B,pe,N),ae=X.length,B=l.end),l.next()):f(C,A,X,z,pe);if(pe>=0&&ae>0&&ae<X.length&&d(X,z,C,ae,C,B,pe,N),X.reverse(),z.reverse(),pe>-1&&ae>0){let q=h(V);G=wv(V,X,z,0,X.length,0,Q-C,q,q)}else G=p(V,X,z,Q-C,N-Q)}E.push(G),T.push(j)}function h(b){return(x,E,T)=>{let w=0,k=x.length-1,C,Q;if(k>=0&&(C=x[k])instanceof vt){if(!k&&C.type==b&&C.length==T)return C;(Q=C.prop(qe.lookAhead))&&(w=E[k]+C.length+Q)}return p(b,x,E,T,w)}}function d(b,x,E,T,w,k,C,Q){let D=[],N=[];for(;b.length>T;)D.push(b.pop()),N.push(x.pop()+E-w);b.push(p(r.types[C],D,N,k-w,Q-k)),x.push(w-E)}function p(b,x,E,T,w=0,k){if(u){let C=[qe.contextHash,u];k=k?[C].concat(k):[C]}if(w>25){let C=[qe.lookAhead,w];k=k?[C].concat(k):[C]}return new vt(b,x,E,T,k)}function g(b,x){let E=l.fork(),T=0,w=0,k=0,C=E.end-i,Q={size:0,start:0,skip:0};e:for(let D=E.pos-b;E.pos>D;){let N=E.size;if(E.id==x&&N>=0){Q.size=T,Q.start=w,Q.skip=k,k+=4,T+=4,E.next();continue}let V=E.pos-N;if(N<0||V<D||E.start<C)break;let G=E.id>=s?4:0,M=E.start;for(E.next();E.pos>V;){if(E.size<0)if(E.size==-3)G+=4;else break e;else E.id>=s&&(G+=4);E.next()}w=M,T+=N,k+=G}return(x<0||T==b)&&(Q.size=T,Q.start=w,Q.skip=k),Q.size>4?Q:void 0}function v(b,x,E){let{id:T,start:w,end:k,size:C}=l;if(l.next(),C>=0&&T<s){let Q=E;if(C>4){let D=l.pos-(C-4);for(;l.pos>D;)E=v(b,x,E)}x[--E]=Q,x[--E]=k-b,x[--E]=w-b,x[--E]=T}else C==-3?u=T:C==-4&&(c=T);return E}let O=[],m=[];for(;l.pos>0;)f(t.start||0,t.bufferStart||0,O,m,-1);let y=(e=t.length)!==null&&e!==void 0?e:O.length?m[0]+O[0].length:0;return new vt(a[t.topID],O.reverse(),m.reverse(),y)}const Mb=new WeakMap;function Yf(t,e){if(!t.isAnonymous||e instanceof Ts||e.type!=t)return 1;let n=Mb.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof vt)){n=1;break}n+=Yf(t,r)}Mb.set(e,n)}return n}function wv(t,e,n,r,i,o,s,l,a){let u=0;for(let p=r;p<i;p++)u+=Yf(t,e[p]);let c=Math.ceil(u*1.5/8),f=[],h=[];function d(p,g,v,O,m){for(let y=v;y<O;){let b=y,x=g[y],E=Yf(t,p[y]);for(y++;y<O;y++){let T=Yf(t,p[y]);if(E+T>=c)break;E+=T}if(y==b+1){if(E>c){let T=p[b];d(T.children,T.positions,0,T.children.length,g[b]+m);continue}f.push(p[b])}else{let T=g[y-1]+p[y-1].length-x;f.push(wv(t,p,g,b,y,x,T,null,a))}h.push(x+m-o)}}return d(e,n,r,i,0),(l||a)(f,h,s)}class aQ{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 wi?this.setBuffer(e.context.buffer,e.index,n):e instanceof jr&&this.map.set(e.tree,n)}get(e){return e instanceof wi?this.getBuffer(e.context.buffer,e.index):e instanceof jr?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 zi{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?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 zi(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=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(;s&&s.from<f;){let h=s;if(a>=h.from||f<=h.to||u){let d=Math.max(h.from,a)-u,p=Math.min(h.to,f)-u;h=d>=p?null:new zi(d,p,h.tree,h.offset+u,l>0,!!c)}if(h&&i.push(h),s.to>f)break;s=o<e.length?e[o++]:null}if(!c)break;a=c.toA,u=c.toA-c.toB}return i}}class kv{startParse(e,n,r){return typeof e=="string"&&(e=new h5(e)),r=r?r.length?r.map(i=>new Dr(i.from,i.to)):[new Dr(0,0)]:[new Dr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class h5{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 uQ(t){return(e,n,r,i)=>new p5(e,t,n,r,i)}class Ib{constructor(e,n,r,i,o){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.ranges=o}}class d5{constructor(e,n,r,i,o,s,l){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=o,this.target=s,this.prev=l,this.depth=0,this.ranges=[]}}const PO=new qe({perNode:!0});class p5{constructor(e,n,r,i,o){this.nest=n,this.input=r,this.fragments=i,this.ranges=o,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 vt(r.type,r.children,r.positions,r.length,r.propValues.concat([[PO,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[qe.mounted.id]=new a5(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 O5(this.fragments),n=null,r=null,i=new Au(new jr(this.baseTree,this.ranges[0].from,0,null),Mt.IncludeAnonymous|Mt.IgnoreMounts);e:for(let o,s;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(d=>d.from<h&&d.to>f)&&n.ranges.push({from:f,to:h})}}l=!1}else if(r&&(s=g5(r.ranges,i.from,i.to)))l=s!=2;else if(!i.type.isAnonymous&&i.from<i.to&&(o=this.nest(i,this.input))){i.tree||m5(i);let u=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")n=new d5(o.parser,o.overlay,u,this.inner.length,i.from,i.tree,n);else{let c=Lb(this.ranges,o.overlay||[new Dr(i.from,i.to)]);c.length&&this.inner.push(new Ib(o.parser,o.parser.startParse(this.input,Vb(u,c),c),o.overlay?o.overlay.map(f=>new Dr(f.from-i.from,f.to-i.from)):null,i.tree,c)),o.overlay?c.length&&(r={ranges:c,depth:0,prev:r}):l=!1}}else n&&(a=n.predicate(i))&&(a===!0&&(a=new Dr(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=Lb(this.ranges,n.ranges);u.length&&this.inner.splice(n.index,0,new Ib(n.parser,n.parser.startParse(this.input,Vb(n.mounts,u),u),n.ranges.map(c=>new Dr(c.from-n.start,c.to-n.start)),n.target,u)),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function g5(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 Nb(t,e,n,r,i,o){if(e<n){let s=t.buffer[e+1];r.push(t.slice(e,n,s)),i.push(s-o)}}function m5(t){let{node:e}=t,n=0;do t.parent(),n++;while(!t.tree);let r=0,i=t.tree,o=0;for(;o=i.positions[r]+t.from,!(o<=e.from&&o+i.children[r].length>=e.to);r++);let s=i.children[r],l=s.buffer;function a(u,c,f,h,d){let p=u;for(;l[p+2]+o<=e.from;)p=l[p+3];let g=[],v=[];Nb(s,u,p,g,v,h);let O=l[p+1],m=l[p+2],y=O+o==e.from&&m+o==e.to&&l[p]==e.type.id;return g.push(y?e.toTree():a(p+4,l[p+3],s.set.types[l[p]],O,m-O)),v.push(O-h),Nb(s,l[p+3],c,g,v,h),new vt(f,g,v,d)}i.children[r]=a(0,l.length,mn.none,0,s.length);for(let u=0;u<=n;u++)t.childAfter(e.from)}class jb{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(Mt.IncludeAnonymous|Mt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,Mt.IgnoreOverlays|Mt.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 vt)n=n.children[0];else break}return!1}}let O5=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(PO))!==null&&n!==void 0?n:r.to,this.inner=new jb(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(PO))!==null&&e!==void 0?e:n.to,this.inner=new jb(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(r=o.tree)===null||r===void 0?void 0:r.prop(qe.mounted);if(s&&s.parser==n)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=o.to)break;a.tree==this.curFrag.tree&&i.push({frag:a,pos:o.from-a.offset,mount:s})}}}return i}};function Lb(t,e){let n=null,r=e;for(let i=1,o=0;i<t.length;i++){let s=t[i-1].to,l=t[i].from;for(;o<r.length;o++){let a=r[o];if(a.from>=l)break;a.to<=s||(n||(r=n=e.slice()),a.from<s?(n[o]=new Dr(a.from,s),a.to>l&&n.splice(o+1,0,new Dr(l,a.to))):a.to>l?n[o--]=new Dr(l,a.to):n.splice(o--,1))}}return r}function y5(t,e,n,r){let i=0,o=0,s=!1,l=!1,a=-1e9,u=[];for(;;){let c=i==t.length?1e9:s?t[i].to:t[i].from,f=o==e.length?1e9:l?e[o].to:e[o].from;if(s!=l){let h=Math.max(a,n),d=Math.min(c,f,r);h<d&&u.push(new Dr(h,d))}if(a=Math.min(c,f),a==1e9)break;c==a&&(s?(s=!1,i++):s=!0),f==a&&(l?(l=!1,o++):l=!0)}return u}function Vb(t,e){let n=[];for(let{pos:r,mount:i,frag:o}of t){let s=r+(i.overlay?i.overlay[0].from:0),l=s+i.tree.length,a=Math.max(o.from,s),u=Math.min(o.to,l);if(i.overlay){let c=i.overlay.map(h=>new Dr(h.from+r,h.to+r)),f=y5(e,c,a,u);for(let h=0,d=a;;h++){let p=h==f.length,g=p?u:f[h].from;if(g>d&&n.push(new zi(d,g,i.tree,-s,o.from>=d||o.openStart,o.to<=g||o.openEnd)),p)break;d=f[h].to}}else n.push(new zi(a,u,i.tree,-s,o.from>=s||o.openStart,o.to<=l||o.openEnd))}return n}let v5=0;class Kr{constructor(e,n,r){this.set=e,this.base=n,this.modified=r,this.id=v5++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Kr([],null,[]);if(n.set.push(n),e)for(let r of e.set)n.set.push(r);return n}static defineModifier(){let e=new Lh;return n=>n.modified.indexOf(e)>-1?n:Lh.get(n.base||n,n.modified.concat(e).sort((r,i)=>r.id-i.id))}}let S5=0;class Lh{constructor(){this.instances=[],this.id=S5++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(l=>l.base==e&&b5(n,l.modified));if(r)return r;let i=[],o=new Kr(i,e,n);for(let l of n)l.instances.push(o);let s=w5(n);for(let l of e.set)if(!l.modified.length)for(let a of s)i.push(Lh.get(l,a));return o}}function b5(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function w5(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 Kl(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 o=[],s=2,l=i;for(let f=0;;){if(l=="..."&&f>0&&f+3==i.length){s=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!h)throw new RangeError("Invalid path: "+i);if(o.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==i.length)break;let d=i[f++];if(f==i.length&&d=="!"){s=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);l=i.slice(f)}let a=o.length-1,u=o[a];if(!u)throw new RangeError("Invalid path: "+i);let c=new Vh(r,s,a>0?o.slice(0,a):null);e[u]=c.sort(e[u])}}return cQ.add(e)}const cQ=new qe;class Vh{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}}Vh.empty=new Vh([],2,null);function fQ(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let l of o)for(let a of l.set){let u=n[a.id];if(u){s=s?s+" "+u:u;break}}return s},scope:r}}function k5(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function P5(t,e,n,r=0,i=t.length){let o=new x5(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class x5{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,o){let{type:s,from:l,to:a}=e;if(l>=r||a<=n)return;s.isTop&&(o=this.highlighters.filter(d=>!d.scope||d.scope(s)));let u=i,c=C5(e)||Vh.empty,f=k5(o,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(qe.mounted);if(h&&h.overlay){let d=e.node.enter(h.overlay[0].from+l,1),p=this.highlighters.filter(v=>!v.scope||v.scope(h.tree.type)),g=e.firstChild();for(let v=0,O=l;;v++){let m=v<h.overlay.length?h.overlay[v]:null,y=m?m.from+l:a,b=Math.max(n,O),x=Math.min(r,y);if(b<x&&g)for(;e.from<x&&(this.highlightRange(e,b,x,i,o),this.startSpan(Math.min(x,e.to),u),!(e.to>=y||!e.nextSibling())););if(!m||y>r)break;O=m.to+l,O>n&&(this.highlightRange(d.cursor(),Math.max(n,m.from+l),Math.min(r,O),i,p),this.startSpan(O,u))}g&&e.parent()}else if(e.firstChild()){do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function C5(t){let e=t.type.prop(cQ);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const de=Kr.define,ff=de(),go=de(),Bb=de(go),Fb=de(go),mo=de(),hf=de(mo),fg=de(mo),pi=de(),es=de(pi),fi=de(),hi=de(),xO=de(),ka=de(xO),df=de(),S={comment:ff,lineComment:de(ff),blockComment:de(ff),docComment:de(ff),name:go,variableName:de(go),typeName:Bb,tagName:de(Bb),propertyName:Fb,attributeName:de(Fb),className:de(go),labelName:de(go),namespace:de(go),macroName:de(go),literal:mo,string:hf,docString:de(hf),character:de(hf),attributeValue:de(hf),number:fg,integer:de(fg),float:de(fg),bool:de(mo),regexp:de(mo),escape:de(mo),color:de(mo),url:de(mo),keyword:fi,self:de(fi),null:de(fi),atom:de(fi),unit:de(fi),modifier:de(fi),operatorKeyword:de(fi),controlKeyword:de(fi),definitionKeyword:de(fi),moduleKeyword:de(fi),operator:hi,derefOperator:de(hi),arithmeticOperator:de(hi),logicOperator:de(hi),bitwiseOperator:de(hi),compareOperator:de(hi),updateOperator:de(hi),definitionOperator:de(hi),typeOperator:de(hi),controlOperator:de(hi),punctuation:xO,separator:de(xO),bracket:ka,angleBracket:de(ka),squareBracket:de(ka),paren:de(ka),brace:de(ka),content:pi,heading:es,heading1:de(es),heading2:de(es),heading3:de(es),heading4:de(es),heading5:de(es),heading6:de(es),contentSeparator:de(pi),list:de(pi),quote:de(pi),emphasis:de(pi),strong:de(pi),link:de(pi),monospace:de(pi),strikethrough:de(pi),inserted:de(),deleted:de(),changed:de(),invalid:de(),meta:df,documentMeta:de(df),annotation:de(df),processingInstruction:de(df),definition:Kr.defineModifier(),constant:Kr.defineModifier(),function:Kr.defineModifier(),standard:Kr.defineModifier(),local:Kr.defineModifier(),special:Kr.defineModifier()};fQ([{tag:S.link,class:"tok-link"},{tag:S.heading,class:"tok-heading"},{tag:S.emphasis,class:"tok-emphasis"},{tag:S.strong,class:"tok-strong"},{tag:S.keyword,class:"tok-keyword"},{tag:S.atom,class:"tok-atom"},{tag:S.bool,class:"tok-bool"},{tag:S.url,class:"tok-url"},{tag:S.labelName,class:"tok-labelName"},{tag:S.inserted,class:"tok-inserted"},{tag:S.deleted,class:"tok-deleted"},{tag:S.literal,class:"tok-literal"},{tag:S.string,class:"tok-string"},{tag:S.number,class:"tok-number"},{tag:[S.regexp,S.escape,S.special(S.string)],class:"tok-string2"},{tag:S.variableName,class:"tok-variableName"},{tag:S.local(S.variableName),class:"tok-variableName tok-local"},{tag:S.definition(S.variableName),class:"tok-variableName tok-definition"},{tag:S.special(S.variableName),class:"tok-variableName2"},{tag:S.definition(S.propertyName),class:"tok-propertyName tok-definition"},{tag:S.typeName,class:"tok-typeName"},{tag:S.namespace,class:"tok-namespace"},{tag:S.className,class:"tok-className"},{tag:S.macroName,class:"tok-macroName"},{tag:S.propertyName,class:"tok-propertyName"},{tag:S.operator,class:"tok-operator"},{tag:S.comment,class:"tok-comment"},{tag:S.meta,class:"tok-meta"},{tag:S.invalid,class:"tok-invalid"},{tag:S.punctuation,class:"tok-punctuation"}]);var hg;const hs=new qe;function Pv(t){return Ce.define({combine:t?e=>e.concat(t):void 0})}const xv=new qe;class Mr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,ct.prototype.hasOwnProperty("tree")||Object.defineProperty(ct.prototype,"tree",{get(){return Qt(this)}}),this.parser=n,this.extension=[Wo.of(this),ct.languageData.of((o,s,l)=>{let a=Xb(o,s,l),u=a.type.prop(hs);if(!u)return[];let c=o.facet(u),f=a.type.prop(xv);if(f){let h=a.resolve(s-a.from,l);for(let d of f)if(d.test(h,o)){let p=o.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return Xb(e,n,r).type.prop(hs)==this.data}findRegions(e){let n=e.facet(Wo);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(hs)==this.data){r.push({from:s,to:s+o.length});return}let l=o.prop(qe.mounted);if(l){if(l.tree.prop(hs)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+s,to:a.to+s});else r.push({from:s,to:s+o.length});return}else if(l.overlay){let a=r.length;if(i(l.tree,l.overlay[0].from+s),r.length>a)return}}for(let a=0;a<o.children.length;a++){let u=o.children[a];u instanceof vt&&i(u,o.positions[a]+s)}};return i(Qt(e),0),r}get allowsNesting(){return!0}}Mr.setState=tt.define();function Xb(t,e,n){let r=t.facet(Wo),i=Qt(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,Mt.ExcludeBuffers))o.type.isTop&&(i=o);return i}class Ll extends Mr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=Pv(e.languageData);return new Ll(n,e.parser.configure({props:[hs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Ll(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Qt(t){let e=t.field(Mr.state,!1);return e?e.tree:vt.empty}class E5{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 Pa=null;class Ru{constructor(e,n,r=[],i,o,s,l,a){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Ru(e,n,[],vt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new E5(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=vt.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(zi.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(zi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Pa;Pa=this;try{return e()}finally{Pa=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Wb(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,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=zi.applyChanges(r,a),i=vt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.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 Ru(this.parser,n,r,i,o,s,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:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=Wb(this.fragments,i,o),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 kv{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let a=Pa;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=s,new vt(mn.none,[],[],s-o)},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 Pa}}function Wb(t,e,n){return zi.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Vl{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 Vl(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Ru.create(e.facet(Wo).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Vl(r)}}Mr.state=On.define({create:Vl.init,update(t,e){for(let n of e.effects)if(n.is(Mr.setState))return n.value;return e.startState.facet(Wo)!=e.state.facet(Wo)?Vl.init(e.state):t.apply(e)}});let hQ=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(hQ=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const dg=typeof navigator<"u"&&(!((hg=navigator.scheduling)===null||hg===void 0)&&hg.isInputPending)?()=>navigator.scheduling.isInputPending():null,Q5=qt.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(Mr.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(Mr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=hQ(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,o=r.field(Mr.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!dg?Math.max(25,e.timeRemaining()-5):1e9),l=o.context.treeLen<i&&r.doc.length>i+1e3,a=o.context.work(()=>dg&&dg()||Date.now()>s,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Mr.setState.of(new Vl(o.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>vr(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()}}}),Wo=Ce.define({combine(t){return t.length?t[0]:null},enables:t=>[Mr.state,Q5,be.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Du{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class Bh{constructor(e,n,r,i,o,s=void 0){this.name=e,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=o,this.support=s,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 Bh(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(o=>o==n))return i;if(r)for(let i of e)for(let o of i.alias){let s=n.indexOf(o);if(s>-1&&(o.length>2||!/\w/.test(n[s-1])&&!/\w/.test(n[s+o.length])))return i}return null}}const $5=Ce.define(),Id=Ce.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 Fh(t){let e=t.facet(Id);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Mu(t,e){let n="",r=t.tabSize,i=t.facet(Id)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function Cv(t,e){t instanceof ct&&(t=new Nd(t));for(let r of t.state.facet($5)){let i=r(t,e);if(i!==void 0)return i}let n=Qt(t.state);return n?_5(t,n,e):null}class Nd{constructor(e,n={}){this.state=e,this.options=n,this.unit=Fh(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&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),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}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),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ic=new qe;function _5(t,e,n){return dQ(e.resolveInner(n).enterUnfinishedNodesBefore(n),n,t)}function T5(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function A5(t){let e=t.type.prop(ic);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(qe.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>pQ(s,!0,1,void 0,o&&!T5(s)?i.from:void 0)}return t.parent==null?R5:null}function dQ(t,e,n){for(;t;t=t.parent){let r=A5(t);if(r)return r(Ev.create(n,e,t))}return null}function R5(){return 0}class Ev extends Nd{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 Ev(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(D5(n,this.node))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?dQ(e,this.pos,this.base):0}}function D5(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function M5(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.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<s?n:null;l=a.to}}function I5({closing:t,align:e=!0,units:n=1}){return r=>pQ(r,e,n,t)}function pQ(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,l=r&&o.slice(s,s+r.length)==r||i==t.pos+s,a=e?M5(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*n)}const N5=t=>t.baseIndent;function zf({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const j5=200;function L5(){return ct.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+j5)return t;let o=n.sliceString(i.from,r);if(!e.some(u=>u.test(o)))return t;let{state:s}=t,l=-1,a=[];for(let{head:u}of s.selection.ranges){let c=s.doc.lineAt(u);if(c.from==l)continue;l=c.from;let f=Cv(s,c.from);if(f==null)continue;let h=/^\s*/.exec(c.text)[0],d=Mu(s,f);h!=d&&a.push({from:c.from,to:c.from+h.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}const gQ=Ce.define(),oc=new qe;function mQ(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 V5(t,e,n){let r=Qt(t);if(r.length<n)return null;let i=r.resolveInner(n,1),o=null;for(let s=i;s;s=s.parent){if(s.to<=n||s.from>n)continue;if(o&&s.from<e)break;let l=s.type.prop(oc);if(l&&(s.to<r.length-50||r.length==t.doc.length||!B5(s))){let a=l(s,t);a&&a.from<=n&&a.from>=e&&a.to>n&&(o=a)}}return o}function B5(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Xh(t,e,n){for(let r of t.facet(gQ)){let i=r(t,e,n);if(i)return i}return V5(t,e,n)}function OQ(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 jd=tt.define({map:OQ}),sc=tt.define({map:OQ});function yQ(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 Es=On.define({create(){return Ae.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(jd)&&!F5(t,n.value.from,n.value.to)?t=t.update({add:[Ub.range(n.value.from,n.value.to)]}):n.is(sc)&&(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,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>be.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(Ub.range(r,i))}return Ae.set(e,!0)}});function Wh(t,e,n){var r;let i=null;return(r=t.field(Es,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function F5(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function vQ(t,e){return t.field(Es,!1)?e:e.concat(tt.appendConfig.of(wQ()))}const X5=t=>{for(let e of yQ(t)){let n=Xh(t.state,e.from,e.to);if(n)return t.dispatch({effects:vQ(t.state,[jd.of(n),SQ(t,n)])}),!0}return!1},W5=t=>{if(!t.state.field(Es,!1))return!1;let e=[];for(let n of yQ(t)){let r=Wh(t.state,n.from,n.to);r&&e.push(sc.of(r),SQ(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function SQ(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return be.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const U5=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=Xh(e,i.from,i.to);o&&n.push(jd.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:vQ(t.state,n)}),!!n.length},Z5=t=>{let e=t.state.field(Es,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(sc.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},Y5=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:X5},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:W5},{key:"Ctrl-Alt-[",run:U5},{key:"Ctrl-Alt-]",run:Z5}],z5={placeholderDOM:null,placeholderText:"…"},bQ=Ce.define({combine(t){return Ri(t,z5)}});function wQ(t){let e=[Es,H5];return t&&e.push(bQ.of(t)),e}const Ub=Ae.replace({widget:new class extends Di{toDOM(t){let{state:e}=t,n=e.facet(bQ),r=o=>{let s=t.lineBlockAt(t.posAtDOM(o.target)),l=Wh(t.state,s.from,s.to);l&&t.dispatch({effects:sc.of(l)}),o.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}}}),q5={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class pg extends no{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 G5(t={}){let e=Object.assign(Object.assign({},q5),t),n=new pg(e,!0),r=new pg(e,!1),i=qt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Wo)!=s.state.facet(Wo)||s.startState.field(Es,!1)!=s.state.field(Es,!1)||Qt(s.startState)!=Qt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let l=new Vo;for(let a of s.viewportLineBlocks){let u=Wh(s.state,a.from,a.to)?r:Xh(s.state,a.from,a.to)?n:null;u&&l.add(a.from,a.from,u)}return l.finish()}}),{domEventHandlers:o}=e;return[i,HN({class:"cm-foldGutter",markers(s){var l;return((l=s.plugin(i))===null||l===void 0?void 0:l.markers)||yt.empty},initialSpacer(){return new pg(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,l,a)=>{if(o.click&&o.click(s,l,a))return!0;let u=Wh(s.state,l.from,l.to);if(u)return s.dispatch({effects:sc.of(u)}),!0;let c=Xh(s.state,l.from,l.to);return c?(s.dispatch({effects:jd.of(c)}),!0):!1}})}),wQ()]}const H5=be.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 Jl{constructor(e,n){this.specs=e;let r;function i(l){let a=Bo.newName();return(r||(r=Object.create(null)))["."+a]=l,a}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof Mr?l=>l.prop(hs)==s.data:s?l=>l==s:void 0,this.style=fQ(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:o}).style,this.module=r?new Bo(r):null,this.themeType=n.themeType}static define(e,n){return new Jl(e,n||{})}}const CO=Ce.define(),kQ=Ce.define({combine(t){return t.length?[t[0]]:null}});function gg(t){let e=t.facet(CO);return e.length?e:t.facet(kQ)}function Qv(t,e){let n=[J5],r;return t instanceof Jl&&(t.module&&n.push(be.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(kQ.of(t)):r?n.push(CO.computeN([be.darkTheme],i=>i.facet(be.darkTheme)==(r=="dark")?[t]:[])):n.push(CO.of(t)),n}class K5{constructor(e){this.markCache=Object.create(null),this.tree=Qt(e.state),this.decorations=this.buildDeco(e,gg(e.state))}update(e){let n=Qt(e.state),r=gg(e.state),i=r!=gg(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 Ae.none;let r=new Vo;for(let{from:i,to:o}of e.visibleRanges)P5(this.tree,n,(s,l,a)=>{r.add(s,l,this.markCache[a]||(this.markCache[a]=Ae.mark({class:a})))},i,o);return r.finish()}}const J5=qo.high(qt.fromClass(K5,{decorations:t=>t.decorations})),e3=Jl.define([{tag:S.meta,color:"#404740"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,textDecoration:"underline",fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strong,fontWeight:"bold"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.keyword,color:"#708"},{tag:[S.atom,S.bool,S.url,S.contentSeparator,S.labelName],color:"#219"},{tag:[S.literal,S.inserted],color:"#164"},{tag:[S.string,S.deleted],color:"#a11"},{tag:[S.regexp,S.escape,S.special(S.string)],color:"#e40"},{tag:S.definition(S.variableName),color:"#00f"},{tag:S.local(S.variableName),color:"#30a"},{tag:[S.typeName,S.namespace],color:"#085"},{tag:S.className,color:"#167"},{tag:[S.special(S.variableName),S.macroName],color:"#256"},{tag:S.definition(S.propertyName),color:"#00c"},{tag:S.comment,color:"#940"},{tag:S.invalid,color:"#f00"}]),t3=be.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),PQ=1e4,xQ="()[]{}",CQ=Ce.define({combine(t){return Ri(t,{afterCursor:!0,brackets:xQ,maxScanDistance:PQ,renderMatch:i3})}}),n3=Ae.mark({class:"cm-matchingBracket"}),r3=Ae.mark({class:"cm-nonmatchingBracket"});function i3(t){let e=[],n=t.matched?n3:r3;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 o3=On.define({create(){return Ae.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(CQ);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=ki(e.state,i.head,-1,r)||i.head>0&&ki(e.state,i.head-1,1,r)||r.afterCursor&&(ki(e.state,i.head,1,r)||i.head<e.state.doc.length&&ki(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return Ae.set(n,!0)},provide:t=>be.decorations.from(t)}),s3=[o3,t3];function l3(t={}){return[CQ.of(t),s3]}const EQ=new qe;function EO(t,e,n){let r=t.prop(e<0?qe.openedBy:qe.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 QO(t){let e=t.type.prop(EQ);return e?e(t.node):t}function ki(t,e,n,r={}){let i=r.maxScanDistance||PQ,o=r.brackets||xQ,s=Qt(t),l=s.resolveInner(e,n);for(let a=l;a;a=a.parent){let u=EO(a.type,n,o);if(u&&a.from<a.to){let c=QO(a);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return a3(t,e,n,a,c,u,o)}}return u3(t,e,n,s,l.type,i,o)}function a3(t,e,n,r,i,o,s){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&&o.indexOf(c.type.name)>-1&&c.from<c.to){let f=QO(c);return{start:a,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(EO(c.type,n,s))u++;else if(EO(c.type,-n,s)){if(u==0){let f=QO(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 u3(t,e,n,r,i,o,s){let l=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),a=s.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<=o;){let d=c.value;n<0&&(h+=d.length);let p=e+h*n;for(let g=n>0?0:d.length-1,v=n>0?d.length:-1;g!=v;g+=n){let O=s.indexOf(d[g]);if(!(O<0||r.resolveInner(p+g,1).type!=i))if(O%2==0==n>0)f++;else{if(f==1)return{start:u,end:{from:p+g,to:p+g+1},matched:O>>1==a>>1};f--}}n>0&&(h+=d.length)}return c.done?{start:u,matched:!1}:null}const c3=Object.create(null),Zb=[mn.none],Yb=[],f3=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"]])f3[t]=h3(c3,e);function mg(t,e){Yb.indexOf(t)>-1||(Yb.push(t),console.warn(e))}function h3(t,e){let n=null;for(let o of e.split(".")){let s=t[o]||S[o];s?typeof s=="function"?n?n=s(n):mg(o,`Modifier ${o} used at start of tag`):n?mg(o,`Tag ${o} used as modifier`):n=s:mg(o,`Unknown highlighting tag ${o}`)}if(!n)return 0;let r=e.replace(/ /g,"_"),i=mn.define({id:Zb.length,name:r,props:[Kl({[r]:n})]});return Zb.push(i),i.id}const d3="#e5c07b",zb="#e06c75",p3="#56b6c2",g3="#ffffff",qf="#abb2bf",$O="#7d8799",m3="#61afef",O3="#98c379",qb="#d19a66",y3="#c678dd",v3="#21252b",Gb="#2c313a",Hb="#282c34",Og="#353a42",S3="#3E4451",Kb="#528bff",b3=be.theme({"&":{color:qf,backgroundColor:Hb},".cm-content":{caretColor:Kb},".cm-cursor, .cm-dropCursor":{borderLeftColor:Kb},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:S3},".cm-panels":{backgroundColor:v3,color:qf},".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:Hb,color:$O,border:"none"},".cm-activeLineGutter":{backgroundColor:Gb},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Og},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Og,borderBottomColor:Og},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Gb,color:qf}}},{dark:!0}),w3=Jl.define([{tag:S.keyword,color:y3},{tag:[S.name,S.deleted,S.character,S.propertyName,S.macroName],color:zb},{tag:[S.function(S.variableName),S.labelName],color:m3},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:qb},{tag:[S.definition(S.name),S.separator],color:qf},{tag:[S.typeName,S.className,S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:d3},{tag:[S.operator,S.operatorKeyword,S.url,S.escape,S.regexp,S.link,S.special(S.string)],color:p3},{tag:[S.meta,S.comment],color:$O},{tag:S.strong,fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.link,color:$O,textDecoration:"underline"},{tag:S.heading,fontWeight:"bold",color:zb},{tag:[S.atom,S.bool,S.special(S.variableName)],color:qb},{tag:[S.processingInstruction,S.string,S.inserted],color:O3},{tag:S.invalid,color:g3}]),k3=[b3,Qv(w3)];function _e(){return _e=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},_e.apply(this,arguments)}var ri=t=>{var{theme:e,settings:n={},styles:r=[]}=t,i={".cm-gutters":{}},o={};n.background&&(o.backgroundColor=n.background),n.foreground&&(o.color=n.foreground),(n.background||n.foreground)&&(i["&"]=o),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 s={};n.gutterActiveForeground&&(s.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},s.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=s,n.selection&&(i["&.cm-focused .cm-selectionBackground, &.cm-focused .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var l=be.theme(i,{dark:e==="dark"}),a=Jl.define(r),u=[l,Qv(a)];return u},P3={background:"#272822",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#49483E",selectionMatch:"#49483E",gutterBackground:"#272822",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},x3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},P3,n),styles:[{tag:[S.comment,S.documentMeta],color:"#8292a2"},{tag:[S.number,S.bool,S.null,S.atom],color:"#ae81ff"},{tag:[S.attributeValue,S.className,S.name],color:"#e6db74"},{tag:[S.propertyName,S.attributeName],color:"#a6e22e"},{tag:[S.variableName],color:"#9effff"},{tag:[S.squareBracket],color:"#bababa"},{tag:[S.string,S.special(S.brace)],color:"#e6db74"},{tag:[S.regexp,S.className,S.typeName,S.definition(S.typeName)],color:"#66d9ef"},{tag:[S.definition(S.variableName),S.definition(S.propertyName),S.function(S.variableName)],color:"#fd971f"},{tag:[S.keyword,S.definitionKeyword,S.modifier,S.tagName,S.angleBracket],color:"#f92672"},...r]})},C3=x3(),E3={background:"#0f0f0f",foreground:"#defdef",caret:"#00FF00",selection:"#515151",selectionMatch:"#515151",gutterBackground:"#555",gutterForeground:"#FFFFFF",lineHighlight:"#314151"},Q3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},E3,n),styles:[{tag:S.keyword,color:"darkgoldenrod",fontWeight:"bold"},{tag:S.atom,color:"#77F"},{tag:S.comment,color:"#7a7b7c",fontStyle:"italic"},{tag:S.number,color:"violet"},{tag:S.definition(S.variableName),color:"#fffabc"},{tag:S.variableName,color:"#abcdef"},{tag:S.function(S.variableName),color:"#fffabc"},{tag:S.typeName,color:"#FFDD44"},{tag:S.tagName,color:"#def"},{tag:S.string,color:"#2b4"},{tag:S.meta,color:"#C9F"},{tag:S.bracket,color:"#8a8a8a"},{tag:S.attributeName,color:"#DDFF00"},{tag:S.heading,color:"aquamarine",fontWeight:"bold"},{tag:S.link,color:"blueviolet",fontWeight:"bold"},...r]})},$3=Q3(),_3={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)"},T3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},_3,n),styles:[{tag:S.comment,color:"#6272a4"},{tag:S.string,color:"#f1fa8c"},{tag:S.atom,color:"#bd93f9"},{tag:S.meta,color:"#f8f8f2"},{tag:[S.keyword,S.operator,S.tagName],color:"#ff79c6"},{tag:[S.function(S.propertyName),S.propertyName],color:"#66d9ef"},{tag:[S.definition(S.variableName),S.function(S.variableName),S.className,S.attributeName],color:"#50fa7b"},{tag:S.atom,color:"#bd93f9"},...r]})},A3=T3(),R3={background:"#fff",foreground:"#000",caret:"#FFFFFF",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#f7f7f7",gutterForeground:"#999",lineHighlight:"#e8f2ff",gutterBorder:"transparent"},D3=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},R3,n),styles:[{tag:[S.comment],color:"#3F7F5F"},{tag:[S.documentMeta],color:"#FF1717"},{tag:S.keyword,color:"#7F0055",fontWeight:"bold"},{tag:S.atom,color:"#00f"},{tag:S.number,color:"#164"},{tag:S.propertyName,color:"#164"},{tag:[S.variableName,S.definition(S.variableName)],color:"#0000C0"},{tag:S.function(S.variableName),color:"#0000C0"},{tag:S.string,color:"#2A00FF"},{tag:S.operator,color:"black"},{tag:S.tagName,color:"#170"},{tag:S.attributeName,color:"#00c"},{tag:S.link,color:"#219"},...r]})},M3=D3(),I3={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},N3=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},I3,n),styles:[{tag:[S.standard(S.tagName),S.tagName],color:"#116329"},{tag:[S.comment,S.bracket],color:"#6a737d"},{tag:[S.className,S.propertyName],color:"#6f42c1"},{tag:[S.variableName,S.attributeName,S.number,S.operator],color:"#005cc5"},{tag:[S.keyword,S.typeName,S.typeOperator,S.typeName],color:"#d73a49"},{tag:[S.string,S.meta,S.regexp],color:"#032f62"},{tag:[S.name,S.quote],color:"#22863a"},{tag:[S.heading],color:"#24292e",fontWeight:"bold"},{tag:[S.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[S.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#e36209"},{tag:[S.url,S.escape,S.regexp,S.link],color:"#032f62"},{tag:S.link,textDecoration:"underline"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.invalid,color:"#cb2431"},...r]})};N3();var j3={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},L3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},j3,n),styles:[{tag:[S.standard(S.tagName),S.tagName],color:"#7ee787"},{tag:[S.comment,S.bracket],color:"#8b949e"},{tag:[S.className,S.propertyName],color:"#d2a8ff"},{tag:[S.variableName,S.attributeName,S.number,S.operator],color:"#79c0ff"},{tag:[S.keyword,S.typeName,S.typeOperator,S.typeName],color:"#ff7b72"},{tag:[S.string,S.meta,S.regexp],color:"#a5d6ff"},{tag:[S.name,S.quote],color:"#7ee787"},{tag:[S.heading],color:"#d2a8ff",fontWeight:"bold"},{tag:[S.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[S.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#ffab70"},{tag:S.link,textDecoration:"underline"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.invalid,color:"#f97583"},...r]})},V3=L3(),B3={background:"#2e3235",foreground:"#bdbdbd",caret:"#a0a4ae",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#2e3235",gutterForeground:"#999",gutterActiveForeground:"#4f5b66",lineHighlight:"#545b61"},QQ=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},B3,n),styles:[{tag:S.keyword,color:"#cf6edf"},{tag:[S.name,S.deleted,S.character,S.macroName],color:"#56c8d8"},{tag:[S.propertyName],color:"#facf4e"},{tag:[S.variableName],color:"#bdbdbd"},{tag:[S.function(S.variableName)],color:"#56c8d8"},{tag:[S.labelName],color:"#cf6edf"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#facf4e"},{tag:[S.definition(S.name),S.separator],color:"#fa5788"},{tag:[S.brace],color:"#cf6edf"},{tag:[S.annotation],color:"#ff5f52"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#ffad42"},{tag:[S.typeName,S.className],color:"#ffad42"},{tag:[S.operator,S.operatorKeyword],color:"#7186f0"},{tag:[S.tagName],color:"#99d066"},{tag:[S.squareBracket],color:"#ff5f52"},{tag:[S.angleBracket],color:"#606f7a"},{tag:[S.attributeName],color:"#bdbdbd"},{tag:[S.regexp],color:"#ff5f52"},{tag:[S.quote],color:"#6abf69"},{tag:[S.string],color:"#99d066"},{tag:S.link,color:"#56c8d8",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[S.url,S.escape,S.special(S.string)],color:"#facf4e"},{tag:[S.meta],color:"#707d8b"},{tag:[S.comment],color:"#707d8b",fontStyle:"italic"},{tag:S.monospace,color:"#bdbdbd"},{tag:S.strong,fontWeight:"bold",color:"#ff5f52"},{tag:S.emphasis,fontStyle:"italic",color:"#99d066"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.heading,fontWeight:"bold",color:"#facf4e"},{tag:S.heading1,fontWeight:"bold",color:"#facf4e"},{tag:[S.heading2,S.heading3,S.heading4],fontWeight:"bold",color:"#facf4e"},{tag:[S.heading5,S.heading6],color:"#facf4e"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#56c8d8"},{tag:[S.processingInstruction,S.inserted],color:"#ff5f52"},{tag:[S.contentSeparator],color:"#56c8d8"},{tag:S.invalid,color:"#606f7a",borderBottom:"1px dotted #ff5f52"},...r]})};QQ();var F3=QQ(),X3={background:"#FAFAFA",foreground:"#90A4AE",caret:"#272727",selection:"#80CBC440",selectionMatch:"#FAFAFA",gutterBackground:"#FAFAFA",gutterForeground:"#90A4AE",gutterBorder:"transparent",lineHighlight:"#CCD7DA50"},W3=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},X3,n),styles:[{tag:S.keyword,color:"#39ADB5"},{tag:[S.name,S.deleted,S.character,S.macroName],color:"#90A4AE"},{tag:[S.propertyName],color:"#6182B8"},{tag:[S.processingInstruction,S.string,S.inserted,S.special(S.string)],color:"#91B859"},{tag:[S.function(S.variableName),S.labelName],color:"#6182B8"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#39ADB5"},{tag:[S.definition(S.name),S.separator],color:"#90A4AE"},{tag:[S.className],color:"#E2931D"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#F76D47"},{tag:[S.typeName],color:"#E2931D",fontStyle:"#E2931D"},{tag:[S.operator,S.operatorKeyword],color:"#39ADB5"},{tag:[S.url,S.escape,S.regexp,S.link],color:"#91B859"},{tag:[S.meta,S.comment],color:"#90A4AE"},{tag:S.strong,fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,fontWeight:"bold",color:"#39ADB5"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#90A4AE"},{tag:S.invalid,color:"#E5393570"},{tag:S.strikethrough,textDecoration:"line-through"},...r]})};W3();var U3={background:"#2e3440",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#3b4252",selectionMatch:"#e5e9f0",gutterBackground:"#2e3440",gutterForeground:"#4c566a",gutterActiveForeground:"#d8dee9",lineHighlight:"#4c566a"},Z3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},U3,n),styles:[{tag:S.keyword,color:"#5e81ac"},{tag:[S.name,S.deleted,S.character,S.propertyName,S.macroName],color:"#88c0d0"},{tag:[S.variableName],color:"#8fbcbb"},{tag:[S.function(S.variableName)],color:"#8fbcbb"},{tag:[S.labelName],color:"#81a1c1"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#5e81ac"},{tag:[S.definition(S.name),S.separator],color:"#a3be8c"},{tag:[S.brace],color:"#8fbcbb"},{tag:[S.annotation],color:"#d30102"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#b48ead"},{tag:[S.typeName,S.className],color:"#ebcb8b"},{tag:[S.operator,S.operatorKeyword],color:"#a3be8c"},{tag:[S.tagName],color:"#b48ead"},{tag:[S.squareBracket],color:"#bf616a"},{tag:[S.angleBracket],color:"#d08770"},{tag:[S.attributeName],color:"#ebcb8b"},{tag:[S.regexp],color:"#5e81ac"},{tag:[S.quote],color:"#b48ead"},{tag:[S.string],color:"#a3be8c"},{tag:S.link,color:"#a3be8c",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[S.url,S.escape,S.special(S.string)],color:"#8fbcbb"},{tag:[S.meta],color:"#88c0d0"},{tag:[S.monospace],color:"#d8dee9",fontStyle:"italic"},{tag:[S.comment],color:"#4c566a",fontStyle:"italic"},{tag:S.strong,fontWeight:"bold",color:"#5e81ac"},{tag:S.emphasis,fontStyle:"italic",color:"#5e81ac"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.heading,fontWeight:"bold",color:"#5e81ac"},{tag:S.special(S.heading1),fontWeight:"bold",color:"#5e81ac"},{tag:S.heading1,fontWeight:"bold",color:"#5e81ac"},{tag:[S.heading2,S.heading3,S.heading4],fontWeight:"bold",color:"#5e81ac"},{tag:[S.heading5,S.heading6],color:"#5e81ac"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#d08770"},{tag:[S.processingInstruction,S.inserted],color:"#8fbcbb"},{tag:[S.contentSeparator],color:"#ebcb8b"},{tag:S.invalid,color:"#434c5e",borderBottom:"1px dotted #d30102"},...r]})},Y3=Z3(),z3={background:"#fff",foreground:"#3D3D3D",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#AFAFAF",lineHighlight:"#EDF4FF"};function q3(t){var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},z3,n),styles:[{tag:[S.comment,S.quote],color:"#707F8D"},{tag:[S.typeName,S.typeOperator],color:"#aa0d91"},{tag:[S.keyword],color:"#aa0d91",fontWeight:"bold"},{tag:[S.string,S.meta],color:"#D23423"},{tag:[S.name],color:"#032f62"},{tag:[S.typeName],color:"#522BB2"},{tag:[S.variableName],color:"#23575C"},{tag:[S.definition(S.variableName)],color:"#327A9E"},{tag:[S.regexp,S.link],color:"#0e0eff"},...r]})}var G3=q3(),H3={background:"#292A30",foreground:"#CECFD0",caret:"#fff",selection:"#727377",selectionMatch:"#727377",lineHighlight:"#2F3239"},K3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ri({theme:e,settings:_e({},H3,n),styles:[{tag:[S.comment,S.quote],color:"#7F8C98"},{tag:[S.keyword],color:"#FF7AB2",fontWeight:"bold"},{tag:[S.string,S.meta],color:"#FF8170"},{tag:[S.typeName],color:"#DABAFF"},{tag:[S.definition(S.variableName)],color:"#6BDFFF"},{tag:[S.name],color:"#6BAA9F"},{tag:[S.variableName],color:"#ACF2E4"},{tag:[S.regexp,S.link],color:"#FF8170"},...r]})};K3();const $Q=[{value:$3,label:"abcdef"},{value:A3,label:"darcula"},{value:M3,label:"eclipse"},{value:F3,label:"material"},{value:Y3,label:"nord"},{value:k3,label:"oneDark"},{value:C3,label:"okaidia"},{value:V3,label:"github"},{value:G3,label:"xcode"}],J3=$Q.reduce((t,e)=>(t[e.label]=e.value,t),{}),_Q="oneDark",ej=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.head),r=_v(t.state,n.from);return r.line?tj(t):r.block?rj(t):!1};function $v(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 tj=$v(sj,0),nj=$v(TQ,0),rj=$v((t,e)=>TQ(t,e,oj(e)),0);function _v(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const xa=50;function ij(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-xa,r),s=t.sliceDoc(i,i+xa),l=/\s*$/.exec(o)[0].length,a=/^\s*/.exec(s)[0].length,u=o.length-l;if(o.slice(u-e.length,u)==e&&s.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*xa?c=f=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+xa),f=t.sliceDoc(i-xa,i));let h=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-n.length;return c.slice(h,h+e.length)==e&&f.slice(p,p+n.length)==n?{open:{pos:r+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:i-d-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function oj(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),o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from,to:i.to})}return e}function TQ(t,e,n=e.selection.ranges){let r=n.map(o=>_v(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>ij(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,l;s<i.length;s++)if(l=i[s]){let a=r[s],{open:u,close:c}=l;o.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:o}}return null}function sj(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let l=r.length,a=1e9;for(let u=o;u<=s;){let c=e.doc.lineAt(u);if(c.from>i&&(o==s||s>c.from)){i=c.from;let f=_v(e,c.from).line;if(!f)continue;let h=/^\s*/.exec(c.text)[0].length,d=h==c.length,p=c.text.slice(h,h+f.length)==f?h:-1;h<c.text.length&&h<a&&(a=h),r.push({line:c,comment:p,token:f,indent:h,empty:d,single:!1})}u=c.to+1}if(a<1e9)for(let u=l;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=a);r.length==l+1&&(r[l].single=!0)}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:l,token:a,indent:u,empty:c,single:f}of r)(f||!c)&&o.push({from:l.from+u,insert:a+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:l,token:a}of r)if(l>=0){let u=s.from+l,c=u+a.length;s.text[c-s.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const _O=Ai.define(),lj=Ai.define(),aj=Ce.define(),AQ=Ce.define({combine(t){return Ri(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 uj(t){let e=0;return t.iterChangedRanges((n,r)=>e=r),e}const RQ=On.define({create(){return Pi.empty},update(t,e){let n=e.state.facet(AQ),r=e.annotation(_O);if(r){let a=e.docChanged?J.single(uj(e.changes)):void 0,u=nr.fromTransaction(e,a),c=r.side,f=c==0?t.undone:t.done;return u?f=Uh(f,f.length,n.minDepth,u):f=IQ(f,e.startState.selection),new Pi(c==0?r.rest:f,c==0?f:r.rest)}let i=e.annotation(lj);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(pn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=nr.fromTransaction(e),s=e.annotation(pn.time),l=e.annotation(pn.userEvent);return o?t=t.addChanges(o,s,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,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(nr.fromJSON),t.undone.map(nr.fromJSON))}});function cj(t={}){return[RQ,AQ.of(t),be.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?DQ:e.inputType=="historyRedo"?TO:null;return r?(e.preventDefault(),r(n)):!1}})]}function Ld(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(RQ,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const DQ=Ld(0,!1),TO=Ld(1,!1),fj=Ld(0,!0),hj=Ld(1,!0);class nr{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new nr(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 nr(e.changes&&fn.fromJSON(e.changes),[],e.mapped&&Qi.fromJSON(e.mapped),e.startSelection&&J.fromJSON(e.startSelection),e.selectionsAfter.map(J.fromJSON))}static fromTransaction(e,n){let r=Ir;for(let i of e.startState.facet(aj)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new nr(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Ir)}static selection(e){return new nr(void 0,Ir,void 0,void 0,e)}}function Uh(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function dj(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,l)=>{for(let a=0;a<n.length;){let u=n[a++],c=n[a++];l>=u&&s<=c&&(r=!0)}}),r}function pj(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function MQ(t,e){return t.length?e.length?t.concat(e):t:e}const Ir=[],gj=200;function IQ(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-gj));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Uh(t,t.length-1,1e9,n.setSelAfter(r)))}else return[nr.selection([e])]}function mj(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 yg(t,e){if(!t.length)return t;let n=t.length,r=Ir;for(;n;){let i=Oj(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[nr.selection(r)]:Ir}function Oj(t,e,n){let r=MQ(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):Ir,n);if(!t.changes)return nr.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new nr(i,tt.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const yj=/^(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,o){let s=this.done,l=s[s.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!r||yj.test(r))&&(!l.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,dj(l.changes,e.changes))||r=="input.type.compose")?s=Uh(s,s.length-1,i.minDepth,new nr(e.changes.compose(l.changes),MQ(e.effects,l.effects),l.mapped,l.startSelection,Ir)):s=Uh(s,s.length,i.minDepth,e),new Pi(s,Ir,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Ir;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&pj(o[o.length-1],e)?this:new Pi(IQ(this.done,e),this.undone,n,r)}addMapping(e){return new Pi(yg(this.done,e),yg(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 o=i[i.length-1];if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:_O.of({side:e,rest:mj(i)}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let s=i.length==1?Ir:i.slice(0,i.length-1);return o.mapped&&(s=yg(s,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:_O.of({side:e,rest:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Pi.empty=new Pi(Ir,Ir);const vj=[{key:"Mod-z",run:DQ,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:TO,preventDefault:!0},{linux:"Ctrl-Shift-z",run:TO,preventDefault:!0},{key:"Mod-u",run:fj,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:hj,preventDefault:!0}];function ea(t,e){return J.create(t.ranges.map(e),t.mainIndex)}function Mi(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ii({state:t,dispatch:e},n){let r=ea(t.selection,n);return r.eq(t.selection)?!1:(e(Mi(t,r)),!0)}function Vd(t,e){return J.cursor(e?t.to:t.from)}function NQ(t,e){return ii(t,n=>n.empty?t.moveByChar(n,e):Vd(n,e))}function Fn(t){return t.textDirectionAt(t.state.selection.main.head)==Zt.LTR}const jQ=t=>NQ(t,!Fn(t)),LQ=t=>NQ(t,Fn(t));function VQ(t,e){return ii(t,n=>n.empty?t.moveByGroup(n,e):Vd(n,e))}const Sj=t=>VQ(t,!Fn(t)),bj=t=>VQ(t,Fn(t));function wj(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 Bd(t,e,n){let r=Qt(t).resolveInner(e.head),i=n?qe.closedBy:qe.openedBy;for(let a=e.head;;){let u=n?r.childAfter(a):r.childBefore(a);if(!u)break;wj(t,u,i)?r=u:a=n?u.to:u.from}let o=r.type.prop(i),s,l;return o&&(s=n?ki(t,r.from,1):ki(t,r.to,-1))&&s.matched?l=n?s.end.to:s.end.from:l=n?r.to:r.from,J.cursor(l,n?-1:1)}const kj=t=>ii(t,e=>Bd(t.state,e,!Fn(t))),Pj=t=>ii(t,e=>Bd(t.state,e,Fn(t)));function BQ(t,e){return ii(t,n=>{if(!n.empty)return Vd(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const FQ=t=>BQ(t,!1),XQ=t=>BQ(t,!0);function WQ(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(be.scrollMargins)){let s=o(t);s!=null&&s.top&&(n=Math.max(s==null?void 0:s.top,n)),s!=null&&s.bottom&&(r=Math.max(s==null?void 0:s.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 UQ(t,e){let n=WQ(t),{state:r}=t,i=ea(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):Vd(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,u=l.bottom-n.marginBottom;s&&s.top>a&&s.bottom<u&&(o=be.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-a}))}return t.dispatch(Mi(r,i),{effects:o}),!0}const Jb=t=>UQ(t,!1),AO=t=>UQ(t,!0);function Go(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 o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=J.cursor(r.from+o))}return i}const xj=t=>ii(t,e=>Go(t,e,!0)),Cj=t=>ii(t,e=>Go(t,e,!1)),Ej=t=>ii(t,e=>Go(t,e,!Fn(t))),Qj=t=>ii(t,e=>Go(t,e,Fn(t))),$j=t=>ii(t,e=>J.cursor(t.lineBlockAt(e.head).from,1)),_j=t=>ii(t,e=>J.cursor(t.lineBlockAt(e.head).to,-1));function Tj(t,e,n){let r=!1,i=ea(t.selection,o=>{let s=ki(t,o.head,-1)||ki(t,o.head,1)||o.head>0&&ki(t,o.head-1,1)||o.head<t.doc.length&&ki(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let l=s.start.from==o.head?s.end.to:s.end.from;return n?J.range(o.anchor,l):J.cursor(l)});return r?(e(Mi(t,i)),!0):!1}const Aj=({state:t,dispatch:e})=>Tj(t,e,!1);function Br(t,e){let n=ea(t.state.selection,r=>{let i=e(r);return J.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Mi(t.state,n)),!0)}function ZQ(t,e){return Br(t,n=>t.moveByChar(n,e))}const YQ=t=>ZQ(t,!Fn(t)),zQ=t=>ZQ(t,Fn(t));function qQ(t,e){return Br(t,n=>t.moveByGroup(n,e))}const Rj=t=>qQ(t,!Fn(t)),Dj=t=>qQ(t,Fn(t)),Mj=t=>Br(t,e=>Bd(t.state,e,!Fn(t))),Ij=t=>Br(t,e=>Bd(t.state,e,Fn(t)));function GQ(t,e){return Br(t,n=>t.moveVertically(n,e))}const HQ=t=>GQ(t,!1),KQ=t=>GQ(t,!0);function JQ(t,e){return Br(t,n=>t.moveVertically(n,e,WQ(t).height))}const ew=t=>JQ(t,!1),tw=t=>JQ(t,!0),Nj=t=>Br(t,e=>Go(t,e,!0)),jj=t=>Br(t,e=>Go(t,e,!1)),Lj=t=>Br(t,e=>Go(t,e,!Fn(t))),Vj=t=>Br(t,e=>Go(t,e,Fn(t))),Bj=t=>Br(t,e=>J.cursor(t.lineBlockAt(e.head).from)),Fj=t=>Br(t,e=>J.cursor(t.lineBlockAt(e.head).to)),nw=({state:t,dispatch:e})=>(e(Mi(t,{anchor:0})),!0),rw=({state:t,dispatch:e})=>(e(Mi(t,{anchor:t.doc.length})),!0),iw=({state:t,dispatch:e})=>(e(Mi(t,{anchor:t.selection.main.anchor,head:0})),!0),ow=({state:t,dispatch:e})=>(e(Mi(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Xj=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Wj=({state:t,dispatch:e})=>{let n=Xd(t).map(({from:r,to:i})=>J.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:J.create(n),userEvent:"select"})),!0},Uj=({state:t,dispatch:e})=>{let n=ea(t.selection,r=>{var i;let o=Qt(t).resolveInner(r.head,1);for(;!(o.from<r.from&&o.to>=r.to||o.to>r.to&&o.from<=r.from||!(!((i=o.parent)===null||i===void 0)&&i.parent));)o=o.parent;return J.range(o.to,o.from)});return e(Mi(t,n)),!0},Zj=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=J.create([n.main]):n.main.empty||(r=J.create([J.cursor(n.main.head)])),r?(e(Mi(t,r)),!0):!1};function Fd(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:l}=o;if(s==l){let a=e(s);a<s?(n="delete.backward",a=pf(t,a,!1)):a>s&&(n="delete.forward",a=pf(t,a,!0)),s=Math.min(s,a),l=Math.max(l,a)}else s=pf(t,s,!1),l=pf(t,l,!0);return s==l?{range:o}:{changes:{from:s,to:l},range:J.cursor(s)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?be.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function pf(t,e,n){if(t instanceof be)for(let r of t.state.facet(be.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const e$=(t,e)=>Fd(t,n=>{let{state:r}=t,i=r.doc.lineAt(n),o,s;if(!e&&n>i.from&&n<i.from+200&&!/[^ \t]/.test(o=i.text.slice(0,n-i.from))){if(o[o.length-1]==" ")return n-1;let l=Ju(o,r.tabSize),a=l%Fh(r)||Fh(r);for(let u=0;u<a&&o[o.length-1-u]==" ";u++)n--;s=n}else s=Wn(i.text,n-i.from,e,e)+i.from,s==n&&i.number!=(e?r.doc.lines:1)&&(s+=e?1:-1);return s}),RO=t=>e$(t,!1),t$=t=>e$(t,!0),n$=(t,e)=>Fd(t,n=>{let r=n,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let l=null;;){if(r==(e?o.to:o.from)){r==n&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let a=Wn(o.text,r-o.from,e)+o.from,u=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),c=s(u);if(l!=null&&c!=l)break;(u!=" "||r!=n)&&(l=c),r=a}return r}),r$=t=>n$(t,!1),Yj=t=>n$(t,!0),i$=t=>Fd(t,e=>{let n=t.lineBlockAt(e).to;return e<n?n:Math.min(t.state.doc.length,e+1)}),zj=t=>Fd(t,e=>{let n=t.lineBlockAt(e).from;return e>n?n:Math.max(0,e-1)}),qj=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:pt.of(["",""])},range:J.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Gj=({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,o=t.doc.lineAt(i),s=i==o.from?i-1:Wn(o.text,i-o.from,!1)+o.from,l=i==o.to?i+1:Wn(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:l,insert:t.doc.slice(i,l).append(t.doc.slice(s,i))},range:J.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Xd(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function o$(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of Xd(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),l=s.length+1;if(n){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let a of o.ranges)i.push(J.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let a of o.ranges)i.push(J.range(a.anchor-l,a.head-l))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:J.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Hj=({state:t,dispatch:e})=>o$(t,e,!1),Kj=({state:t,dispatch:e})=>o$(t,e,!0);function s$(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Xd(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 Jj=({state:t,dispatch:e})=>s$(t,e,!1),eL=({state:t,dispatch:e})=>s$(t,e,!0),tL=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Xd(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=ea(e.selection,i=>t.moveVertically(i,!0)).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function nL(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Qt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(qe.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from?{from:r.to,to:i.from}:null}const rL=l$(!1),iL=l$(!0);function l$(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,l=e.doc.lineAt(o),a=!t&&o==s&&nL(e,o);t&&(o=s=(s<=l.to?l:e.doc.lineAt(s)).to);let u=new Nd(e,{simulateBreak:o,simulateDoubleBreak:!!a}),c=Cv(u,o);for(c==null&&(c=/^\s*/.exec(e.doc.lineAt(o).text)[0].length);s<l.to&&/\s/.test(l.text[s-l.from]);)s++;a?{from:o,to:s}=a:o>l.from&&o<l.from+100&&!/\S/.test(l.text.slice(0,o))&&(o=l.from);let f=["",Mu(e,c)];return a&&f.push(Mu(e,u.lineIndent(l.from,-1))),{changes:{from:o,to:s,insert:pt.of(f)},range:J.cursor(o+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Tv(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let l=t.doc.lineAt(s);l.number>n&&(r.empty||r.to>l.from)&&(e(l,i,r),n=l.number),s=l.to+1}let o=t.changes(i);return{changes:i,range:J.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const oL=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Nd(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=Tv(t,(o,s,l)=>{let a=Cv(r,o.from);if(a==null)return;/\S/.test(o.text)||(a=0);let u=/^\s*/.exec(o.text)[0],c=Mu(t,a);(u!=c||l.from<o.from+u.length)&&(n[o.from]=a,s.push({from:o.from,to:o.from+u.length,insert:c}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},sL=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Tv(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Id)})}),{userEvent:"input.indent"})),!0),lL=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Tv(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Ju(i,t.tabSize),s=0,l=Mu(t,Math.max(0,o-Fh(t)));for(;s<i.length&&s<l.length&&i.charCodeAt(s)==l.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:l.slice(s)})}),{userEvent:"delete.dedent"})),!0),aL=[{key:"Ctrl-b",run:jQ,shift:YQ,preventDefault:!0},{key:"Ctrl-f",run:LQ,shift:zQ},{key:"Ctrl-p",run:FQ,shift:HQ},{key:"Ctrl-n",run:XQ,shift:KQ},{key:"Ctrl-a",run:$j,shift:Bj},{key:"Ctrl-e",run:_j,shift:Fj},{key:"Ctrl-d",run:t$},{key:"Ctrl-h",run:RO},{key:"Ctrl-k",run:i$},{key:"Ctrl-Alt-h",run:r$},{key:"Ctrl-o",run:qj},{key:"Ctrl-t",run:Gj},{key:"Ctrl-v",run:AO}],uL=[{key:"ArrowLeft",run:jQ,shift:YQ,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Sj,shift:Rj,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Ej,shift:Lj,preventDefault:!0},{key:"ArrowRight",run:LQ,shift:zQ,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:bj,shift:Dj,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Qj,shift:Vj,preventDefault:!0},{key:"ArrowUp",run:FQ,shift:HQ,preventDefault:!0},{mac:"Cmd-ArrowUp",run:nw,shift:iw},{mac:"Ctrl-ArrowUp",run:Jb,shift:ew},{key:"ArrowDown",run:XQ,shift:KQ,preventDefault:!0},{mac:"Cmd-ArrowDown",run:rw,shift:ow},{mac:"Ctrl-ArrowDown",run:AO,shift:tw},{key:"PageUp",run:Jb,shift:ew},{key:"PageDown",run:AO,shift:tw},{key:"Home",run:Cj,shift:jj,preventDefault:!0},{key:"Mod-Home",run:nw,shift:iw},{key:"End",run:xj,shift:Nj,preventDefault:!0},{key:"Mod-End",run:rw,shift:ow},{key:"Enter",run:rL},{key:"Mod-a",run:Xj},{key:"Backspace",run:RO,shift:RO},{key:"Delete",run:t$},{key:"Mod-Backspace",mac:"Alt-Backspace",run:r$},{key:"Mod-Delete",mac:"Alt-Delete",run:Yj},{mac:"Mod-Backspace",run:zj},{mac:"Mod-Delete",run:i$}].concat(aL.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),cL=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:kj,shift:Mj},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Pj,shift:Ij},{key:"Alt-ArrowUp",run:Hj},{key:"Shift-Alt-ArrowUp",run:Jj},{key:"Alt-ArrowDown",run:Kj},{key:"Shift-Alt-ArrowDown",run:eL},{key:"Escape",run:Zj},{key:"Mod-Enter",run:iL},{key:"Alt-l",mac:"Ctrl-l",run:Wj},{key:"Mod-i",run:Uj,preventDefault:!0},{key:"Mod-[",run:lL},{key:"Mod-]",run:sL},{key:"Mod-Alt-\\",run:oL},{key:"Shift-Mod-k",run:tL},{key:"Shift-Mod-\\",run:Aj},{key:"Mod-/",run:ej},{key:"Alt-A",run:nj}].concat(uL);function Ct(){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++)a$(t,arguments[e]);return t}function a$(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++)a$(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const sw=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Bl{constructor(e,n,r=0,i=e.length,o,s){this.test=s,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=o?l=>o(sw(l)):sw,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 Cn(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=av(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Ar(e);let i=this.normalize(n);for(let o=0,s=r;;o++){let l=i.charCodeAt(o),a=this.match(l,s);if(a)return this.value=a,this;if(o==i.length-1)break;s==r&&o<n.length&&n.charCodeAt(o)==l&&s++}}}match(e,n){let r=null;for(let i=0;i<this.matches.length;i+=2){let o=this.matches[i],s=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[i+1],to:n+1}:(this.matches[i]++,s=!0)),s||(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"&&(Bl.prototype[Symbol.iterator]=function(){return this});const u$={from:-1,to:-1,match:/.*/.exec("")},Av="gm"+(/x/.unicode==null?"":"u");class c${constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=u$,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new f$(e,n,r,i,o);this.re=new RegExp(n,Av+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=Zh(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=Zh(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 vg=new WeakMap;class wl{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=vg.get(e);if(!i||i.from>=r||i.to<=n){let l=new wl(n,e.sliceString(n,r));return vg.set(e,l),l}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),vg.set(e,new wl(s,o)),new wl(n,o.slice(n-s,r-s))}}class f${constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=u$,this.matchPos=Zh(e,i),this.re=new RegExp(n,Av+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=wl.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=Zh(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=wl.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(c$.prototype[Symbol.iterator]=f$.prototype[Symbol.iterator]=function(){return this});function fL(t){try{return new RegExp(t,Av),!0}catch{return!1}}function Zh(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 DO(t){let e=Ct("input",{class:"cm-textfield",name:"line"}),n=Ct("form",{class:"cm-gotoLine",onkeydown:i=>{i.keyCode==27?(i.preventDefault(),t.dispatch({effects:Yh.of(!1)}),t.focus()):i.keyCode==13&&(i.preventDefault(),r())},onsubmit:i=>{i.preventDefault(),r()}},Ct("label",t.state.phrase("Go to line"),": ",e)," ",Ct("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:o}=t,s=o.doc.lineAt(o.selection.main.head),[,l,a,u,c]=i,f=u?+u.slice(1):0,h=a?+a:s.number;if(a&&c){let p=h/100;l&&(p=p*(l=="-"?-1:1)+s.number/o.doc.lines),h=Math.round(o.doc.lines*p)}else a&&l&&(h=h*(l=="-"?-1:1)+s.number);let d=o.doc.line(Math.max(1,Math.min(o.doc.lines,h)));t.dispatch({effects:Yh.of(!1),selection:J.cursor(d.from+Math.max(0,Math.min(f,d.length))),scrollIntoView:!0}),t.focus()}return{dom:n}}const Yh=tt.define(),lw=On.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Yh)&&(t=n.value);return t},provide:t=>Tu.from(t,e=>e?DO:null)}),hL=t=>{let e=_u(t,DO);if(!e){let n=[Yh.of(!0)];t.state.field(lw,!1)==null&&n.push(tt.appendConfig.of([lw,dL])),t.dispatch({effects:n}),e=_u(t,DO)}return e&&e.dom.querySelector("input").focus(),!0},dL=be.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),pL={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},h$=Ce.define({combine(t){return Ri(t,pL,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function gL(t){let e=[SL,vL];return t&&e.push(h$.of(t)),e}const mL=Ae.mark({class:"cm-selectionMatch"}),OL=Ae.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function aw(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Bt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Bt.Word)}function yL(t,e,n,r){return t(e.sliceDoc(n,n+1))==Bt.Word&&t(e.sliceDoc(r-1,r))==Bt.Word}const vL=qt.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(h$),{state:n}=t,r=n.selection;if(r.ranges.length>1)return Ae.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ae.none;let a=n.wordAt(i.head);if(!a)return Ae.none;s=n.charCategorizer(i.head),o=n.sliceDoc(a.from,a.to)}else{let a=i.to-i.from;if(a<e.minSelectionLength||a>200)return Ae.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(aw(s,n,i.from,i.to)&&yL(s,n,i.from,i.to)))return Ae.none}else if(o=n.sliceDoc(i.from,i.to).trim(),!o)return Ae.none}let l=[];for(let a of t.visibleRanges){let u=new Bl(n.doc,o,a.from,a.to);for(;!u.next().done;){let{from:c,to:f}=u.value;if((!s||aw(s,n,c,f))&&(i.empty&&c<=i.from&&f>=i.to?l.push(OL.range(c,f)):(c>=i.to||f<=i.from)&&l.push(mL.range(c,f)),l.length>e.maxMatches))return Ae.none}}return Ae.set(l)}},{decorations:t=>t.decorations}),SL=be.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),bL=({state:t,dispatch:e})=>{let{selection:n}=t,r=J.create(n.ranges.map(i=>t.wordAt(i.head)||J.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function wL(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,l=new Bl(t.doc,e,r[r.length-1].to);;)if(l.next(),l.done){if(s)return null;l=new Bl(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.some(a=>a.from==l.value.from))continue;if(o){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const kL=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return bL({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=wL(t,r);return i?(e(t.update({selection:t.selection.addRange(J.range(i.from,i.to),!1),effects:be.scrollIntoView(i.to)})),!0):!1},Rv=Ce.define({combine(t){return Ri(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new ML(e)})}});class d${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||fL(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"?`
75
- `: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 EL(this):new xL(this)}getCursor(e,n=0,r){let i=e.doc?e:ct.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?zs(this,i,n,r):Ys(this,i,n,r)}}class p${constructor(e){this.spec=e}}function Ys(t,e,n,r){return new Bl(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?PL(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function PL(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(zh(i,n-o))!=Bt.Word||e(qh(i,n-o))!=Bt.Word)&&(e(qh(i,r-o))!=Bt.Word||e(zh(i,r-o))!=Bt.Word))}class xL extends p${constructor(e){super(e)}nextMatch(e,n,r){let i=Ys(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=Ys(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=Ys(this.spec,e,o,i),l=null;for(;!s.nextOverlapping().done;)l=s.value;if(l)return l;if(o==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=Ys(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 o=Ys(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function zs(t,e,n,r){return new c$(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?CL(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function zh(t,e){return t.slice(Wn(t,e,!1),e)}function qh(t,e){return t.slice(e,Wn(t,e))}function CL(t){return(e,n,r)=>!r[0].length||(t(zh(r.input,r.index))!=Bt.Word||t(qh(r.input,r.index))!=Bt.Word)&&(t(qh(r.input,r.index+r[0].length))!=Bt.Word||t(zh(r.input,r.index+r[0].length))!=Bt.Word)}class EL extends p${nextMatch(e,n,r){let i=zs(this.spec,e,r,e.doc.length).next();return i.done&&(i=zs(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=zs(this.spec,e,o,r),l=null;for(;!s.next().done;)l=s.value;if(l&&(o==n||l.from>o+10))return l;if(o==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=zs(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 o=zs(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const Iu=tt.define(),Dv=tt.define(),Io=On.define({create(t){return new Sg(MO(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Iu)?t=new Sg(n.value.create(),t.panel):n.is(Dv)&&(t=new Sg(t.query,n.value?Mv:null));return t},provide:t=>Tu.from(t,e=>e.panel)});class Sg{constructor(e,n){this.query=e,this.panel=n}}const QL=Ae.mark({class:"cm-searchMatch"}),$L=Ae.mark({class:"cm-searchMatch cm-searchMatch-selected"}),_L=qt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Io))}update(t){let e=t.state.field(Io);(e!=t.startState.field(Io)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ae.none;let{view:n}=this,r=new Vo;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:l,to:a}=o[i];for(;i<s-1&&a>o[i+1].from-2*250;)a=o[++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?$L:QL)})}return r.finish()}},{decorations:t=>t.decorations});function lc(t){return e=>{let n=e.state.field(Io,!1);return n&&n.query.spec.valid?t(e,n):g$(e)}}const Gh=lc((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);return r?(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Iv(t,r),userEvent:"select.search"}),!0):!1}),Hh=lc((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);return i?(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Iv(t,i),userEvent:"select.search"}),!0):!1}),TL=lc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:J.create(n.map(r=>J.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),AL=({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,o=[],s=0;for(let l=new Bl(t.doc,t.sliceDoc(r,i));!l.next().done;){if(o.length>1e3)return!1;l.value.from==r&&(s=o.length),o.push(J.range(l.value.from,l.value.to))}return e(t.update({selection:J.create(o,s),userEvent:"select.search.matches"})),!0},uw=lc((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=[],l,a,u=[];if(o.from==r&&o.to==i&&(a=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:a}),o=e.nextMatch(n,o.from,o.to),u.push(be.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let c=s.length==0||s[0].from>=o.to?0:o.to-o.from-a.length;l={anchor:o.from-c,head:o.to-c},u.push(Iv(t,o))}return t.dispatch({changes:s,selection:l,scrollIntoView:!!l,effects:u,userEvent:"input.replace"}),!0}),RL=lc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:be.announce.of(r),userEvent:"input.replace.all"}),!0});function Mv(t){return t.state.facet(Rv).createPanel(t)}function MO(t,e){var n,r,i,o;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let a=t.facet(Rv);return new d$({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:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:a.wholeWord})}const g$=t=>{let e=t.state.field(Io,!1);if(e&&e.panel){let n=_u(t,Mv);if(!n)return!1;let r=n.dom.querySelector("[main-field]");if(r&&r!=t.root.activeElement){let i=MO(t.state,e.query.spec);i.valid&&t.dispatch({effects:Iu.of(i)}),r.focus(),r.select()}}else t.dispatch({effects:[Dv.of(!0),e?Iu.of(MO(t.state,e.query.spec)):tt.appendConfig.of(NL)]});return!0},m$=t=>{let e=t.state.field(Io,!1);if(!e||!e.panel)return!1;let n=_u(t,Mv);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Dv.of(!1)}),!0},DL=[{key:"Mod-f",run:g$,scope:"editor search-panel"},{key:"F3",run:Gh,shift:Hh,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Gh,shift:Hh,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:m$,scope:"editor search-panel"},{key:"Mod-Shift-l",run:AL},{key:"Alt-g",run:hL},{key:"Mod-d",run:kL,preventDefault:!0}];class ML{constructor(e){this.view=e;let n=this.query=e.state.field(Io).query.spec;this.commit=this.commit.bind(this),this.searchField=Ct("input",{value:n.search,placeholder:cr(e,"Find"),"aria-label":cr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ct("input",{value:n.replace,placeholder:cr(e,"Replace"),"aria-label":cr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ct("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Ct("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Ct("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return Ct("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=Ct("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Gh(e),[cr(e,"next")]),r("prev",()=>Hh(e),[cr(e,"previous")]),r("select",()=>TL(e),[cr(e,"all")]),Ct("label",null,[this.caseField,cr(e,"match case")]),Ct("label",null,[this.reField,cr(e,"regexp")]),Ct("label",null,[this.wordField,cr(e,"by word")]),...e.state.readOnly?[]:[Ct("br"),this.replaceField,r("replace",()=>uw(e),[cr(e,"replace")]),r("replaceAll",()=>RL(e),[cr(e,"replace all")])],Ct("button",{name:"close",onclick:()=>m$(e),"aria-label":cr(e,"close"),type:"button"},["×"])])}commit(){let e=new d$({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:Iu.of(e)}))}keydown(e){uN(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Hh:Gh)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),uw(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Iu)&&!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(Rv).top}}function cr(t,e){return t.state.phrase(e)}const gf=30,mf=/[\s\.,:;?!]/;function Iv(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-gf),s=Math.min(i,n+gf),l=t.state.sliceDoc(o,s);if(o!=r.from){for(let a=0;a<gf;a++)if(!mf.test(l[a+1])&&mf.test(l[a])){l=l.slice(a);break}}if(s!=i){for(let a=l.length-1;a>l.length-gf;a--)if(!mf.test(l[a-1])&&mf.test(l[a])){l=l.slice(0,a);break}}return be.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${r.number}.`)}const IL=be.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"}}),NL=[Io,qo.lowest(_L),IL];class Nv{constructor(e,n,r){this.state=e,this.pos=n,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let n=Qt(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),o=i.search(y$(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function cw(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 jL(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=cw(e)+cw(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function O$(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:jL(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function LL(t,e){return n=>{for(let r=Qt(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 fw=class{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}};function No(t){return t.selection.main.from}function y$(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const v$=Ai.define();function VL(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(l=>l!=i&&n!=r&&t.sliceDoc(l.from+o,l.from+s)!=t.sliceDoc(n,r)?{range:l}:{changes:{from:l.from+o,to:r==i.from?l.to:l.from+s,insert:e},range:J.cursor(l.from+o+e.length)})),{userEvent:"input.complete"})}const hw=new WeakMap;function BL(t){if(!Array.isArray(t))return t;let e=hw.get(t);return e||hw.set(t,e=O$(t)),e}const jv=tt.define(),Nu=tt.define();class FL{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=Cn(e,n),i=Ar(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(Cn(s==o?o.toLowerCase():s,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:o,byWord:s}=this;if(n.length==1){let m=Cn(e,0),y=Ar(m),b=y==e.length?0:-100;if(m!=n[0])if(m==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 m=0,y=Math.min(e.length,200);m<y&&u<a;){let b=Cn(e,m);(b==n[u]||b==r[u])&&(i[u++]=m),m+=Ar(b)}if(u<a)return!1}let c=0,f=0,h=!1,d=0,p=-1,g=-1,v=/[a-z]/.test(e),O=!0;for(let m=0,y=Math.min(e.length,200),b=0;m<y&&f<a;){let x=Cn(e,m);l<0&&(c<a&&x==n[c]&&(o[c++]=m),d<a&&(x==n[d]||x==r[d]?(d==0&&(p=m),g=m+1,d++):d=0));let E,T=x<255?x>=48&&x<=57||x>=97&&x<=122?2:x>=65&&x<=90?1:0:(E=av(x))!=E.toLowerCase()?1:E!=E.toUpperCase()?2:0;(!m||T==1&&v||b==0&&T!=0)&&(n[f]==x||r[f]==x&&(h=!0)?s[f++]=m:s.length&&(O=!1)),b=T,m+=Ar(x)}return f==a&&s[0]==0&&O?this.result(-100+(h?-200:0),s,e):d==a&&p==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]):d==a?this.ret(-200+-700-e.length,[p,g]):f==a?this.result(-100+(h?-200:0)+-700+(O?0:-1100),s,e):n.length==2?!1:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let l=s+(this.astral?Ar(Cn(r,s)):1);o&&i[o-1]==s?i[o-1]=l:(i[o++]=s,i[o++]=l)}return this.ret(e-r.length,i)}}const rr=Ce.define({combine(t){return Ri(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:XL,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=>dw(e(r),n(r)),optionClass:(e,n)=>r=>dw(e(r),n(r)),addToOptions:(e,n)=>e.concat(n)})}});function dw(t,e){return t?e?t+" "+e:t:e}function XL(t,e,n,r,i){let o=t.textDirection==Zt.RTL,s=o,l=!1,a="top",u,c,f=e.left-i.left,h=i.right-e.right,d=r.right-r.left,p=r.bottom-r.top;if(s&&f<Math.min(d,h)?s=!1:!s&&h<Math.min(d,f)&&(s=!0),d<=(s?f:h))u=Math.max(i.top,Math.min(n.top,i.bottom-p))-e.top,c=Math.min(400,s?f:h);else{l=!0,c=Math.min(400,(o?e.right:i.right-e.left)-30);let g=i.bottom-e.bottom;g>=p||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?o?"left-narrow":"right-narrow":s?"left":"right")}}function WL(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 o=document.createElement("span");o.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let a=0;a<i.length;){let u=i[a++],c=i[a++];u>l&&o.appendChild(document.createTextNode(s.slice(l,u)));let f=o.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(u,c))),f.className="cm-completionMatchedText",l=c}return l<s.length&&o.appendChild(document.createTextNode(s.slice(l))),o},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 pw(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 UL{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:o,selected:s}=i.open,l=e.state.facet(rr);this.optionContent=WL(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=pw(o.length,s,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]<o.length){this.applyCompletion(e,o[+c[1]]),a.preventDefault();return}}),this.dom.addEventListener("focusout",a=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(rr).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Nu.of(null)})}),this.list=this.dom.appendChild(this.createListBox(o,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 o=e.state.field(this.stateField),s=e.startState.field(this.stateField);this.updateTooltipClass(e.state),o!=s&&(this.updateSel(),((n=o.open)===null||n===void 0?void 0:n.disabled)!=((r=s.open)===null||r===void 0?void 0:r.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((i=o.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=pw(n.options.length,n.selected,this.view.state.facet(rr).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 o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>vr(this.view.state,s,"completion info")):this.addInfoPane(o,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:o}=e;r.appendChild(i),this.infoDestroy=o||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&&YL(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(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(rr).positionInfo(this.view,n,i,r,o)}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 o=null;for(let s=r.from;s<r.to;s++){let{completion:l,match:a}=e[s],{section:u}=l;if(u){let h=typeof u=="string"?u:u.name;if(h!=o&&(s>r.from||r.from==0))if(o=h,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=h}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+s,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let h of this.optionContent){let d=h(l,this.view.state,a);d&&c.appendChild(d)}}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 ZL(t,e){return n=>new UL(n,t,e)}function YL(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 gw(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function zL(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 fw(c,a.source,u?u(c):[],1e9-n.length));else{let c=new FL(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 fw(f,a.source,h,c.score+(f.boost||0)))}}}if(r){let a=Object.create(null),u=0,c=(f,h)=>{var d,p;return((d=f.rank)!==null&&d!==void 0?d:1e9)-((p=h.rank)!==null&&p!==void 0?p: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 o=[],s=null,l=e.facet(rr).compareCompletions;for(let a of n.sort((u,c)=>c.score-u.score||l(u.completion,c.completion))){let u=a.completion;!s||s.label!=u.label||s.detail!=u.detail||s.type!=null&&u.type!=null&&s.type!=u.type||s.apply!=u.apply||s.boost!=u.boost?o.push(a):gw(a.completion)>gw(s)&&(o[o.length-1]=a),s=a.completion}return o}class cl{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new cl(this.options,mw(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o){let s=zL(e,n);if(!s.length)return i&&e.some(a=>a.state==1)?new cl(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let l=n.facet(rr).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let a=i.options[i.selected].completion;for(let u=0;u<s.length;u++)if(s[u].completion==a){l=u;break}}return new cl(s,mw(r,l),{pos:e.reduce((a,u)=>u.hasResult()?Math.min(a,u.from):a,1e8),create:ZL(pr,w$),above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new cl(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Kh{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Kh(HL,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(rr),o=(r.override||n.languageDataAt("autocomplete",No(n)).map(BL)).map(l=>(this.active.find(u=>u.source==l)||new er(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,a)=>l==this.active[a])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!qL(o,this.active)?s=cl.build(o,n,this.id,s,r):s&&s.disabled&&!o.some(l=>l.state==1)&&(s=null),!s&&o.every(l=>l.state!=1)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new er(l.source,0):l));for(let l of e.effects)l.is(b$)&&(s=s&&s.setSelected(l.value,this.id));return o==this.active&&s==this.open?this:new Kh(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:GL}}function qL(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,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const GL={"aria-autocomplete":"list"};function mw(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const HL=[];function IO(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class er{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=IO(e),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&i.state!=0&&(i=new er(i.source,0));for(let o of e.effects)if(o.is(jv))i=new er(i.source,1,o.value?No(e.state):-1);else if(o.is(Nu))i=new er(i.source,0);else if(o.is(S$))for(let s of o.value)s.source==i.source&&(i=s);return i}handleUserEvent(e,n,r){return n=="delete"||!r.activateOnTyping?this.map(e.changes):new er(this.source,1)}handleChange(e){return e.changes.touchesRange(No(e.startState))?new er(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new er(this.source,this.state,e.mapPos(this.explicitPos))}}class kl extends er{constructor(e,n,r,i,o){super(e,2,n),this.result=r,this.from=i,this.to=o}hasResult(){return!0}handleUserEvent(e,n,r){var i;let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=No(e.state);if((this.explicitPos<0?l<=o:l<this.from)||l>s||n=="delete"&&No(e.startState)==this.from)return new er(this.source,n=="input"&&r.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return KL(this.result.validFor,e.state,o,s)?new kl(this.source,a,this.result,o,s):this.result.update&&(u=this.result.update(this.result,o,s,new Nv(e.state,l,a>=0)))?new kl(this.source,a,u,u.from,(i=u.to)!==null&&i!==void 0?i:No(e.state)):new er(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new er(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new kl(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function KL(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):y$(t,!0).test(i)}const S$=tt.define({map(t,e){return t.map(n=>n.map(e))}}),b$=tt.define(),pr=On.define({create(){return Kh.start()},update(t,e){return t.update(e)},provide:t=>[yv.from(t,e=>e.tooltip),be.contentAttributes.from(t,e=>e.attrs)]});function w$(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(pr).active.find(i=>i.source==e.source);return r instanceof kl?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},VL(t.state,n,r.from,r.to)),{annotations:v$.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}function Of(t,e="option"){return n=>{let r=n.state.field(pr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(rr).interactionDelay)return!1;let i=1,o;e=="page"&&(o=eQ(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:s-1;return l<0?l=e=="page"?0:s-1:l>=s&&(l=e=="page"?s-1:0),n.dispatch({effects:b$.of(l)}),!0}}const JL=t=>{let e=t.state.field(pr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(rr).interactionDelay?!1:w$(t,e.open.options[e.open.selected])},eV=t=>t.state.field(pr,!1)?(t.dispatch({effects:jv.of(!0)}),!0):!1,tV=t=>{let e=t.state.field(pr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Nu.of(null)}),!0)};class nV{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Ow=50,rV=50,iV=1e3,oV=qt.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(pr).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(pr);if(!t.selectionSet&&!t.docChanged&&t.startState.field(pr)==e)return;let n=t.transactions.some(r=>(r.selection||r.docChanged)&&!IO(r));for(let r=0;r<this.running.length;r++){let i=this.running[r];if(n||i.updates.length+t.transactions.length>rV&&Date.now()-i.time>iV){for(let o of i.context.abortListeners)try{o()}catch(s){vr(this.view.state,s)}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(),Ow):-1,this.composing!=0)for(let r of t.transactions)IO(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(pr);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=No(e),r=new Nv(e,n,t.explicitPos==n),i=new nV(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:Nu.of(null)}),vr(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),Ow))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(rr);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 s=new kl(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:No(i.updates.length?i.updates[0].startState:this.view.state));for(let l of i.updates)s=s.update(l,n);if(s.hasResult()){e.push(s);continue}}let o=this.view.state.field(pr).active.find(s=>s.source==i.active.source);if(o&&o.state==1)if(i.done==null){let s=new er(i.active.source,0);for(let l of i.updates)s=s.update(l,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:S$.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(pr,!1);if(e&&e.tooltip&&this.view.state.facet(rr).closeOnBlur){let n=e.open&&eQ(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:Nu.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:jv.of(!1)}),20),this.composing=0}}}),k$=be.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 sV{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class Lv{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,hn.TrackDel),r=e.mapPos(this.to,1,hn.TrackDel);return n==null||r==null?null:new Lv(this.field,n,r)}}class Vv{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),s=/^\s*/.exec(o.text)[0];for(let a of this.lines){if(r.length){let u=s,c=/^\t*/.exec(a)[0].length;for(let f=0;f<c;f++)u+=e.facet(Id);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 Lv(a.field,i[a.line]+a.from,i[a.line]+a.to));return{text:r,ranges:l}}static parse(e){let n=[],r=[],i=[],o;for(let s of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let l=o[1]?+o[1]:null,a=o[2]||o[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 sV(u,r.length,o.index,o.index+a.length)),s=s.slice(0,o.index)+a+s.slice(o.index+o[0].length)}for(let l;l=/\\([{}])/.exec(s);){s=s.slice(0,l.index)+l[1]+s.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(s)}return new Vv(r,i)}}let lV=Ae.widget({widget:new class extends Di{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),aV=Ae.mark({class:"cm-snippetField"});class ta{constructor(e,n){this.ranges=e,this.active=n,this.deco=Ae.set(e.map(r=>(r.from==r.to?lV:aV).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 ta(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 ac=tt.define({map(t,e){return t&&t.map(e)}}),uV=tt.define(),ju=On.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(ac))return n.value;if(n.is(uV)&&t)return new ta(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=>be.decorations.from(t,e=>e?e.deco:Ae.none)});function Bv(t,e){return J.create(t.filter(n=>n.field==e).map(n=>J.range(n.from,n.to)))}function cV(t){let e=Vv.parse(t);return(n,r,i,o)=>{let{text:s,ranges:l}=e.instantiate(n.state,i),a={changes:{from:i,to:o,insert:pt.of(s)},scrollIntoView:!0,annotations:r?v$.of(r):void 0};if(l.length&&(a.selection=Bv(l,0)),l.length>1){let u=new ta(l,0),c=a.effects=[ac.of(u)];n.state.field(ju,!1)===void 0&&c.push(tt.appendConfig.of([ju,gV,mV,k$]))}n.dispatch(n.state.update(a))}}function P$(t){return({state:e,dispatch:n})=>{let r=e.field(ju,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(s=>s.field==i+t);return n(e.update({selection:Bv(r.ranges,i),effects:ac.of(o?null:new ta(r.ranges,i))})),!0}}const fV=({state:t,dispatch:e})=>t.field(ju,!1)?(e(t.update({effects:ac.of(null)})),!0):!1,hV=P$(1),dV=P$(-1),pV=[{key:"Tab",run:hV,shift:dV},{key:"Escape",run:fV}],yw=Ce.define({combine(t){return t.length?t[0]:pV}}),gV=qo.highest(tc.compute([yw],t=>t.facet(yw)));function Kn(t,e){return Object.assign(Object.assign({},e),{apply:cV(t)})}const mV=be.domEventHandlers({mousedown(t,e){let n=e.state.field(ju,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:Bv(n.ranges,i.field),effects:ac.of(n.ranges.some(o=>o.field>i.field)?new ta(n.ranges,i.field):null)}),!0)}}),Lu={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ds=tt.define({map(t,e){let n=e.mapPos(t,-1,hn.TrackAfter);return n??void 0}}),Fv=new class extends xs{};Fv.startSide=1;Fv.endSide=-1;const x$=On.define({create(){return yt.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=yt.empty)}t=t.map(e.changes);for(let n of e.effects)n.is(ds)&&(t=t.update({add:[Fv.range(n.value,n.value+1)]}));return t}});function OV(){return[vV,x$]}const bg="()[]{}<>";function C$(t){for(let e=0;e<bg.length;e+=2)if(bg.charCodeAt(e)==t)return bg.charAt(e+1);return av(t<128?t:t+1)}function E$(t,e){return t.languageDataAt("closeBrackets",e)[0]||Lu}const yV=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vV=be.inputHandler.of((t,e,n,r)=>{if((yV?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Ar(Cn(r,0))==1||e!=i.from||n!=i.to)return!1;let o=wV(t.state,r);return o?(t.dispatch(o),!0):!1}),SV=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=E$(t,t.selection.main.head).brackets||Lu.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let l=kV(t.doc,s.head);for(let a of r)if(a==l&&Wd(t.doc,s.head)==C$(Cn(a,0)))return{changes:{from:s.head-a.length,to:s.head+a.length},range:J.cursor(s.head-a.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},bV=[{key:"Backspace",run:SV}];function wV(t,e){let n=E$(t,t.selection.main.head),r=n.brackets||Lu.brackets;for(let i of r){let o=C$(Cn(i,0));if(e==i)return o==i?CV(t,i,r.indexOf(i+i+i)>-1,n):PV(t,i,o,n.before||Lu.before);if(e==o&&Q$(t,t.selection.main.from))return xV(t,i,o)}return null}function Q$(t,e){let n=!1;return t.field(x$).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function Wd(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Ar(Cn(n,0)))}function kV(t,e){let n=t.sliceString(e-2,e);return Ar(Cn(n,0))==n.length?n:n.slice(1)}function PV(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:ds.of(s.to+e.length),range:J.range(s.anchor+e.length,s.head+e.length)};let l=Wd(t.doc,s.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:s.head},effects:ds.of(s.head+e.length),range:J.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function xV(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&Wd(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:J.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function CV(t,e,n,r){let i=r.stringPrefixes||Lu.stringPrefixes,o=null,s=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:ds.of(l.to+e.length),range:J.range(l.anchor+e.length,l.head+e.length)};let a=l.head,u=Wd(t.doc,a),c;if(u==e){if(vw(t,a))return{changes:{insert:e+e,from:a},effects:ds.of(a+e.length),range:J.cursor(a+e.length)};if(Q$(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:J.cursor(a+h.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(c=Sw(t,a-2*e.length,i))>-1&&vw(t,c))return{changes:{insert:e+e+e+e,from:a},effects:ds.of(a+e.length),range:J.cursor(a+e.length)};if(t.charCategorizer(a)(u)!=Bt.Word&&Sw(t,a,i)>-1&&!EV(t,a,e,i))return{changes:{insert:e+e,from:a},effects:ds.of(a+e.length),range:J.cursor(a+e.length)}}return{range:o=l}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function vw(t,e){let n=Qt(t).resolveInner(e+1);return n.parent&&n.from==e}function EV(t,e,n,r){let i=Qt(t).resolveInner(e,-1),o=r.reduce((s,l)=>Math.max(s,l.length),0);for(let s=0;s<5;s++){let l=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),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 Sw(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Bt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Bt.Word)return o}return-1}function QV(t={}){return[pr,rr.of(t),oV,$V,k$]}const $$=[{key:"Ctrl-Space",run:eV},{key:"Escape",run:tV},{key:"ArrowDown",run:Of(!0)},{key:"ArrowUp",run:Of(!1)},{key:"PageDown",run:Of(!0,"page")},{key:"PageUp",run:Of(!1,"page")},{key:"Enter",run:JL}],$V=qo.highest(tc.computeN([rr],t=>t.facet(rr).defaultKeymap?[$$]:[]));class _V{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class ss{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(fl).markerFilter;o&&(i=o(i));let s=Ae.set(i.map(l=>l.from==l.to||l.from==l.to-1&&r.doc.lineAt(l.from).to==l.from?Ae.widget({widget:new VV(l),diagnostic:l}).range(l.from):Ae.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity},diagnostic:l}).range(l.from,l.to)),!0);return new ss(s,n,Fl(s))}}function Fl(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new _V(i,o,s.diagnostic),!1}),r}function TV(t,e){return!!(t.effects.some(n=>n.is(Xv))||t.changes.touchesRange(e.pos))}function _$(t,e){return t.field(Or,!1)?e:e.concat(tt.appendConfig.of([Or,be.decorations.compute([Or],n=>{let{selected:r,panel:i}=n.field(Or);return!r||!i||r.from==r.to?Ae.none:Ae.set([RV.range(r.from,r.to)])}),zN(DV,{hideOn:TV}),FV]))}function AV(t,e){return{effects:_$(t,[Xv.of(e)])}}const Xv=tt.define(),Wv=tt.define(),T$=tt.define(),Or=On.define({create(){return new ss(Ae.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=Fl(n,t.selected.diagnostic,i)||Fl(n,null,i)}t=new ss(n,t.panel,r)}for(let n of e.effects)n.is(Xv)?t=ss.init(n.value,t.panel,e.state):n.is(Wv)?t=new ss(t.diagnostics,n.value?Ud.open:null,t.selected):n.is(T$)&&(t=new ss(t.diagnostics,t.panel,n.value));return t},provide:t=>[Tu.from(t,e=>e.panel),be.decorations.from(t,e=>e.diagnostics)]}),RV=Ae.mark({class:"cm-lintRange cm-lintRange-active"});function DV(t,e,n){let{diagnostics:r}=t.state.field(Or),i=[],o=2e8,s=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),o=Math.min(a,o),s=Math.max(u,s))});let l=t.state.facet(fl).tooltipFilter;return l&&(i=l(i)),i.length?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:MV(t,i)}}}:null}function MV(t,e){return Ct("ul",{class:"cm-tooltip-lint"},e.map(n=>R$(t,n,!1)))}const IV=t=>{let e=t.state.field(Or,!1);(!e||!e.panel)&&t.dispatch({effects:_$(t.state,[Wv.of(!0)])});let n=_u(t,Ud.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},bw=t=>{let e=t.state.field(Or,!1);return!e||!e.panel?!1:(t.dispatch({effects:Wv.of(!1)}),!0)},NV=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)},jV=[{key:"Mod-Shift-m",run:IV,preventDefault:!0},{key:"F8",run:NV}],LV=qt.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(fl);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(fl);Promise.all(n.map(r=>Promise.resolve(r(this.view)))).then(r=>{let i=r.reduce((o,s)=>o.concat(s));this.view.state.doc==e.doc&&this.view.dispatch(AV(this.view.state,i))},r=>{vr(this.view.state,r)})}}update(t){let e=t.state.facet(fl);(t.docChanged||e!=t.startState.facet(fl)||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)}}),fl=Ce.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},Ri(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:LV});function A$(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(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function R$(t,e,n){var r;let i=n?A$(e.actions):[];return Ct("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Ct("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let l=!1,a=h=>{if(h.preventDefault(),l)return;l=!0;let d=Fl(t.state.field(Or).diagnostics,e);d&&o.apply(t,d.from,d.to)},{name:u}=o,c=i[s]?u.indexOf(i[s]):-1,f=c<0?u:[u.slice(0,c),Ct("u",u.slice(c,c+1)),u.slice(c+1)];return Ct("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[s]})"`}.`},f)}),e.source&&Ct("div",{class:"cm-diagnosticSource"},e.source))}class VV extends Di{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Ct("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class ww{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=R$(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ud{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)bw(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:o}=this.items[this.selectedIndex],s=A$(o.actions);for(let l=0;l<s.length;l++)if(s[l].toUpperCase().charCodeAt(0)==i.keyCode){let a=Fl(this.view.state.field(Or).diagnostics,o);a&&o.actions[l].apply(e,a.from,a.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=Ct("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=Ct("div",{class:"cm-panel-lint"},this.list,Ct("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>bw(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,o=null;for(e.between(0,this.view.state.doc.length,(s,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 ww(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"),o=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 ww(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{s.top<l.top?this.list.scrollTop-=l.top-s.top:s.bottom>l.bottom&&(this.list.scrollTop+=s.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=Fl(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:T$.of(r)})}static open(e){return new Ud(e)}}function BV(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 wg(t){return BV(`<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 FV=be.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:wg("#d11")},".cm-lintRange-warning":{backgroundImage:wg("orange")},".cm-lintRange-info":{backgroundImage:wg("#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}}}),XV=(()=>[r5(),s5(),CN(),cj(),G5(),gN(),SN(),ct.allowMultipleSelections.of(!0),L5(),Qv(e3,{fallback:!0}),l3(),OV(),QV(),jN(),BN(),AN(),gL(),tc.of([...bV,...cL,...DL,...vj,...Y5,...$$,...jV])])();class Jh{constructor(e,n,r,i,o,s,l,a,u,c=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,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 kw(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:o}=this.p,s=o.dynamicPrecedence(i);if(s&&(this.score+=s),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.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<o.minRepeatTerm||e&131072){let h=o.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=o.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,a)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,l=this.buffer.length;if(l==0&&s.parent&&(l=s.bufferBase-s.parent.bufferBase,s=s.parent),l>0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(n==r)return;if(s.buffer[l-2]>=n){s.buffer[l-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+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 o=e,{parser:s}=this.p;(r>this.pos||n<=s.maxNode)&&(this.pos=r,s.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,i),this.shiftContext(n,i),n<=s.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 WV(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 o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((l,a)=>a&1&&l==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.score-=200,r.push(s)}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,o=this.stack.length-r*3;if(o<0||n.getGoto(this.stack[o],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 kw(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 kw{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}var Pw;(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"})(Pw||(Pw={}));class WV{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 ed{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 ed(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 ed(this.stack,this.pos,this.index)}}function Ba(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),l=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let a=s-32;if(a>=46&&(a-=46,l=!0),o+=a,l)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class Gf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const xw=new Gf;class UV{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=xw,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,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}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 o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++s];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=xw,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,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 Pl{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;D$(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Pl.prototype.contextual=Pl.prototype.fallback=Pl.prototype.extend=!1;class NO{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?Ba(e):e}token(e,n){let r=e.pos,i;for(;i=e.pos,D$(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))}}NO.prototype.contextual=Pl.prototype.fallback=Pl.prototype.extend=!1;class Ii{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function D$(t,e,n,r,i,o){let s=0,l=1<<r,{dialect:a}=n.p.parser;e:for(;l&t[s];){let u=t[s+1];for(let d=s+3;d<u;d+=2)if((t[d+1]&l)>0){let p=t[d];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||ZV(p,e.token.value,i,o))){e.acceptToken(p);break}}let c=e.next,f=0,h=t[s+2];if(e.next<0&&h>f&&t[u+h*3-3]==65535&&t[u+h*3-3]==65535){s=t[u+h*3-1];continue e}for(;f<h;){let d=f+h>>1,p=u+d+(d<<1),g=t[p],v=t[p+1]||65536;if(c<g)h=d;else if(c>=v)f=d+1;else{s=t[p+2],e.advance();continue e}}break}}function Cw(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function ZV(t,e,n,r){let i=Cw(n,r,e);return i<0||Cw(n,r,t)<i}const zr=typeof process<"u"&&process.env&&/\bparse\b/.test({}.LOG);let kg=null;var Ew;(function(t){t[t.Margin=25]="Margin"})(Ew||(Ew={}));function Qw(t,e,n){let r=t.cursor(Mt.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 YV=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?Qw(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Qw(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 o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof vt){if(s==e){if(s<this.safeFrom)return null;let l=s+o.length;if(l<=this.safeTo){let a=o.prop(qe.lookAhead);if(!a||l+a<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}};class zV{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Gf)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let u=0;u<o.length;u++){if(!(1<<u&s))continue;let c=o[u],f=this.tokens[u];if(!(r&&!c.fallback)&&((c.contextual||f.start!=e.pos||f.mask!=s||f.context!=l)&&(this.updateCachedToken(f,c,e),f.mask=s,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 Gf,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 Gf,{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:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let l=o.specializers[s](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 o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:l}=s;for(let a=0;a<2;a++)for(let u=s.stateSlot(o,a?2:1);;u+=3){if(l[u]==65535)if(l[u+1]==1)u=Xi(l,u+2);else{i==0&&l[u+1]==2&&(i=this.putAction(Xi(l,u+2),n,r,i));break}l[u]==n&&(i=this.putAction(Xi(l,u+1),n,r,i))}return i}}var $w;(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"})($w||($w={}));class qV{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 UV(n,i),this.tokens=new zV(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[Jh.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new YV(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let l=e[s];for(;;){if(this.tokens.mainToken=null,l.pos>n)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],o=[]),i.push(l);let a=this.tokens.getMainToken(l);o.push(a.value,a.end)}}break}}if(!r.length){let s=i&&HV(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw zr&&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 s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((l,a)=>a.score-l.score);r.length>s;)r.pop();r.some(l=>l.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let l=r[s];for(let a=s+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(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].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:o}=this,s=zr?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?o.getGoto(e.state,f.type.id):-1;if(h>-1&&f.length&&(!u||(f.prop(qe.contextHash)||0)==c))return e.useNode(f,h),zr&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(f.type.id)})`),!0;if(!(f instanceof vt)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof vt&&f.positions[0]==0)f=d;else break}}let l=o.stateSlot(e.state,4);if(l>0)return e.reduce(l),zr&&console.log(s+this.stackID(e)+` (via always-reduce ${o.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++],d=u==a.length||!r,p=d?e:e.split();if(p.apply(c,f,h),zr&&console.log(s+this.stackID(p)+` (via ${c&65536?`reduce of ${o.getName(c&65535)}`:"shift"} for ${o.getName(f)} @ ${i}${p==e?"":", split"})`),d)return!0;p.pos>i?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return _w(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let l=e[s],a=n[s<<1],u=n[(s<<1)+1],c=zr?this.stackID(l)+" -> ":"";if(l.deadEnd&&(o||(o=!0,l.restart(),zr&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let f=l.split(),h=c;for(let d=0;f.forceReduce()&&d<10&&(zr&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));d++)zr&&(h=this.stackID(f)+" -> ");for(let d of l.recoverByInsert(a))zr&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,r);this.stream.end>l.pos?(u==l.pos&&(u++,a=0),l.recoverByDelete(a,u),zr&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),_w(l,r)):(!i||i.score<l.score)&&(i=l)}return i}stackToTree(e){return e.close(),vt.build({buffer:ed.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=(kg||(kg=new WeakMap)).get(e);return n||kg.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function _w(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 GV{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const Pg=t=>t;class M${constructor(e){this.start=e.start,this.shift=e.shift||Pg,this.reduce=e.reduce||Pg,this.reuse=e.reuse||Pg,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Xl extends kv{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 o(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=qe[a]);for(let u=1;u<l.length;){let c=l[u++];if(c>=0)o(c,a,l[u++]);else{let f=l[u+-c];for(let h=-c;h>0;h--)o(l[u++],a,f);u++}}}this.nodeSet=new rc(n.map((l,a)=>mn.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=oQ;let s=Ba(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(Tw),this.states=Ba(e.states,Uint32Array),this.data=Ba(e.stateData),this.goto=Ba(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Pl(s,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 qV(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],l=s&1,a=i[o++];if(l&&r)return a;for(let u=o+(s>>1);o<u;o++)if(i[o]==e)return a;if(l)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=Xi(r,o+2)];else{if(r[o+1]==2)return Xi(r,o+2);break}if(s==n||s==0)return Xi(r,o+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=Xi(this.data,r+2);else return!1;if(n==Xi(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=Xi(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Xl.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(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(l=>l.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=Tw(s),s})),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 o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],l;(l=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new GV(e,r,i)}static deserialize(e){return new Xl(e)}}function Xi(t,e){return t[e]|t[e+1]<<16}function HV(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 Tw(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const Aw=301,Rw=1,KV=2,Dw=302,JV=304,e4=305,t4=3,n4=4,r4=[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],I$=125,i4=59,Mw=47,o4=42,s4=43,l4=45,a4=new M$({start:!1,shift(t,e){return e==t4||e==n4||e==JV?t:e==e4},strict:!1}),u4=new Ii((t,e)=>{let{next:n}=t;(n==I$||n==-1||e.context)&&e.canShift(Dw)&&t.acceptToken(Dw)},{contextual:!0,fallback:!0}),c4=new Ii((t,e)=>{let{next:n}=t,r;r4.indexOf(n)>-1||n==Mw&&((r=t.peek(1))==Mw||r==o4)||n!=I$&&n!=i4&&n!=-1&&!e.context&&e.canShift(Aw)&&t.acceptToken(Aw)},{contextual:!0}),f4=new Ii((t,e)=>{let{next:n}=t;if((n==s4||n==l4)&&(t.advance(),n==t.next)){t.advance();let r=!e.context&&e.canShift(Rw);t.acceptToken(r?Rw:KV)}},{contextual:!0}),h4=Kl({"get set async static":S.modifier,"for while do if else switch try catch finally return throw break continue default case":S.controlKeyword,"in of await yield void typeof delete instanceof":S.operatorKeyword,"let var const function class extends":S.definitionKeyword,"import export from":S.moduleKeyword,"with debugger as new":S.keyword,TemplateString:S.special(S.string),super:S.atom,BooleanLiteral:S.bool,this:S.self,null:S.null,Star:S.modifier,VariableName:S.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":S.function(S.variableName),VariableDefinition:S.definition(S.variableName),Label:S.labelName,PropertyName:S.propertyName,PrivatePropertyName:S.special(S.propertyName),"CallExpression/MemberExpression/PropertyName":S.function(S.propertyName),"FunctionDeclaration/VariableDefinition":S.function(S.definition(S.variableName)),"ClassDeclaration/VariableDefinition":S.definition(S.className),PropertyDefinition:S.definition(S.propertyName),PrivatePropertyDefinition:S.definition(S.special(S.propertyName)),UpdateOp:S.updateOperator,LineComment:S.lineComment,BlockComment:S.blockComment,Number:S.number,String:S.string,Escape:S.escape,ArithOp:S.arithmeticOperator,LogicOp:S.logicOperator,BitOp:S.bitwiseOperator,CompareOp:S.compareOperator,RegExp:S.regexp,Equals:S.definitionOperator,Arrow:S.function(S.punctuation),": Spread":S.punctuation,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace,"InterpolationStart InterpolationEnd":S.special(S.brace),".":S.derefOperator,", ;":S.separator,"@":S.meta,TypeName:S.typeName,TypeDefinition:S.definition(S.typeName),"type enum interface implements namespace module declare":S.definitionKeyword,"abstract global Privacy readonly override":S.modifier,"is keyof unique infer":S.operatorKeyword,JSXAttributeValue:S.attributeValue,JSXText:S.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":S.angleBracket,"JSXIdentifier JSXNameSpacedName":S.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":S.attributeName,"JSXBuiltin/JSXIdentifier":S.standard(S.tagName)}),d4={__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:219,private:219,protected:219,readonly:221,instanceof:240,satisfies:243,in:244,const:246,import:278,keyof:333,unique:337,infer:343,is:379,abstract:399,implements:401,type:403,let:406,var:408,interface:415,enum:419,namespace:425,module:427,declare:431,global:435,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},p4={__proto__:null,async:117,get:119,set:121,public:181,private:181,protected:181,static:183,abstract:185,override:187,readonly:193,accessor:195,new:383},g4={__proto__:null,"<":137},m4=Xl.deserialize({version:14,states:"$BhO`QUOOO%QQUOOO'TQWOOP(_OSOOO*mQ(CjO'#CfO*tOpO'#CgO+SO!bO'#CgO+bO07`O'#DZO-sQUO'#DaO.TQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0rQSO'#ETOOQO'#I_'#I_O0zQSO'#GjOOQO'#Eh'#EhO1VQSO'#EgO1[QSO'#EgO3^Q(CjO'#JbO5}Q(CjO'#JcO6kQSO'#FVO6pQ#tO'#FnOOQ(CY'#F_'#F_O6{O&jO'#F_O7ZQ,UO'#FuO8qQSO'#FtOOQ(CY'#Jc'#JcOOQ(CW'#Jb'#JbOOQQ'#J|'#J|O8vQSO'#IOO8{Q(C[O'#IPOOQQ'#JO'#JOOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9TQUO'#DzO%QQUO'#D|O9[QSO'#GjO9aQ,UO'#ClO9oQSO'#EfO9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6m2}Q6n<cQ6s<eQ6t<lQ7l4vQ8f5{Q8j6UQ8y<mQ8}<rQ9O<sQ:O8lQ:d9aQ:r9|Q:t:QQ;X:vQ;d;ZQ;p#PR=S=`R#XWR&{!cU!oQ'Q-OS&w!c,vY'[!m!s!t!u!vS'i!p!r['k!w4z5S5T5U5VS,s&x'PS-_']'^U-a'_'`'aY-f'b7p7q7r7|Q2Q,|S2`-`-bU2c-c9e9fS2d-d-eS4{0z5QS6Y2b2eS6]2f:gQ6^2gS8o6[6_Q8r6`R:T8qR(m#tR(p#uQ!dQT,}'Q-OQ#l]R'Z;oT#hZ%ZS#gZ%ZU%y|},[U(V#d#f#iS-u(W(XQ-|(]Q0m+iQ2i-vU2l-z-{-}S6c2m2nR8s6d`#ZW#T#W%v'v(P+f-st#eZ|}#d#f#i%Z(W(X(]+i-v-z-{-}2m2n6dQ1d,[Q1w,pQ5y1oQ8e5zT<z&y+gT#^W%vS#]W%vS'w#T(PS'|#W+fS,u&y+gT-n'v-sT'O!c%wQ$hfR)l$mT)a$h)bR3f.pT*Q$u*SR*Y$xQ0S*{Q2p.TQ5X0|Q6h2tQ8P5[Q8v6gQ9m8OQ:V8uQ:m9oQ:z:XQ;U:nR;]:{lpOXr!X#a%]&d&f&g&i,^,c1g1jQ&^!TR,R&ZV%z|},[R0v+rR,Q&XQ%szR+d%tR+Y%nT&b!U&eT&c!U&eT1i,c1j",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 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:362,context:a4,nodeProps:[["group",-26,6,14,16,62,198,202,205,206,208,211,214,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,102,103,112,113,130,133,135,136,137,138,140,141,161,162,164,"Expression",-23,24,26,30,34,36,38,165,167,169,170,172,173,174,176,177,178,180,181,182,192,194,196,197,"Type",-3,84,95,101,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",142,"JSXStartTag",154,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",143,"JSXSelfCloseEndTag JSXEndTag",159,"JSXEndTag"]],propSources:[h4],skippedNodes:[0,3,4,268],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#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$<s$I}$JO$<s$JO$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(n%d_$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO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O>P",tokenizers:[c4,f4,2,3,4,5,6,7,8,9,10,11,12,13,u4,new NO("$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(S~~",141,325),new NO("j~RQYZXz{^~^O'p~~aP!P!Qd~iO'q~~",25,307)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:13213,ts:13215},dynamicPrecedences:{76:1,78:1,162:1,190:1},specialized:[{term:311,get:t=>d4[t]||-1},{term:327,get:t=>p4[t]||-1},{term:67,get:t=>g4[t]||-1}],tokenPrec:13238}),N$=[Kn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Kn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Kn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Kn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Kn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Kn(`try {
76
- \${}
77
- } catch (\${error}) {
78
- \${}
79
- }`,{label:"try",detail:"/ catch block",type:"keyword"}),Kn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Kn(`if (\${}) {
80
- \${}
81
- } else {
82
- \${}
83
- }`,{label:"if",detail:"/ else block",type:"keyword"}),Kn(`class \${name} {
84
- constructor(\${params}) {
85
- \${}
86
- }
87
- }`,{label:"class",detail:"definition",type:"keyword"}),Kn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Kn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],O4=N$.concat([Kn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Kn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Kn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Iw=new aQ,j$=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Ca(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const y4=["FunctionDeclaration"],v4={FunctionDeclaration:Ca("function"),ClassDeclaration:Ca("class"),ClassExpression:()=>!0,EnumDeclaration:Ca("constant"),TypeAliasDeclaration:Ca("type"),NamespaceDeclaration:Ca("namespace"),VariableDefinition(t,e){t.matchContext(y4)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function L$(t,e){let n=Iw.get(e);if(n)return n;let r=[],i=!0;function o(s,l){let a=t.sliceString(s.from,s.to);r.push({label:a,type:l})}return e.cursor(Mt.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let l=v4[s.name];if(l&&l(s,o)||j$.has(s.name))return!1}else if(s.to-s.from>8192){for(let l of L$(t,s.node))r.push(l);return!1}}),Iw.set(e,r),r}const Nw=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,V$=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function S4(t){let e=Qt(t.state).resolveInner(t.pos,-1);if(V$.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Nw.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)j$.has(i.name)&&(r=r.concat(L$(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Nw}}const qi=Ll.define({name:"javascript",parser:m4.configure({props:[ic.add({IfStatement:zf({except:/^\s*({|else\b)/}),TryStatement:zf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:N5,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:I5({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":zf({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}}),oc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":mQ,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),B$={test:t=>/^JSX/.test(t.name),facet:Pv({commentTokens:{block:{open:"{/*",close:"*/}"}}})},F$=qi.configure({dialect:"ts"},"typescript"),X$=qi.configure({dialect:"jsx",props:[xv.add(t=>t.isTop?[B$]:void 0)]}),W$=qi.configure({dialect:"jsx ts",props:[xv.add(t=>t.isTop?[B$]:void 0)]},"typescript");let U$=t=>({label:t,type:"keyword"});const Z$="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(U$),b4=Z$.concat(["declare","implements","private","protected","public"].map(U$));function Y$(t={}){let e=t.jsx?t.typescript?W$:X$:t.typescript?F$:qi,n=t.typescript?O4.concat(b4):N$.concat(Z$);return new Du(e,[qi.data.of({autocomplete:LL(V$,O$(n))}),qi.data.of({autocomplete:S4}),t.jsx?x4:[]])}function w4(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 jw(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 k4(t){return t&&(t.name=="JSXEndTag"||t.name=="JSXSelfCloseEndTag")}const P4=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),x4=be.inputHandler.of((t,e,n,r)=>{if((P4?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!qi.isActiveAt(t.state,e,-1))return!1;let{state:i}=t,o=i.changeByRange(s=>{var l;let{head:a}=s,u=Qt(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:J.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=jw(i.doc,h==null?void 0:h.firstChild,a))){let d=`/${c}>`;return{range:J.cursor(a+d.length),changes:{from:a,insert:d}}}}else if(r==">"){let f=w4(u);if(f&&!k4(f.lastChild)&&i.sliceDoc(a,a+2)!="</"&&(c=jw(i.doc,f,a)))return{range:J.cursor(a+1),changes:{from:a,insert:`></${c}>`}}}}return{range:s}});return o.changes.empty?!1:(t.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)});class td{constructor(e,n,r,i,o,s,l){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=o,this.children=s,this.positions=l,this.hashProp=[[qe.contextHash,i]]}static create(e,n,r,i,o){let s=i+(i<<8)+e+(n<<4)|0;return new td(e,n,r,s,o,[],[])}addChild(e,n){e.prop(qe.contextHash)!=this.hash&&(e=new vt(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 vt(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(o,s,l)=>new vt(mn.none,o,s,l,this.hashProp)})}}var ce;(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"})(ce||(ce={}));class C4{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class E4{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 ru(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 Lw(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==ce.OrderedList?Yv:Zv)(n,e,!1);return r>0&&(t.type!=ce.BulletList||Uv(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const z$={[ce.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(mt(ce.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Fr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[ce.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[ce.OrderedList]:Lw,[ce.BulletList]:Lw,[ce.Document](){return!0}};function Fr(t){return t==32||t==9||t==10||t==13}function ru(t,e=0){for(;e<t.length&&Fr(t.charCodeAt(e));)e++;return e}function Vw(t,e,n){for(;e>n&&Fr(t.charCodeAt(e-1));)e--;return e}function q$(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 G$(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function Uv(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 o=t.text.charCodeAt(i);if(o==t.next)r++;else if(!Fr(o))return-1}return n&&t.next==45&&J$(t)>-1&&t.depth==e.stack.length||r<3?-1:1}function H$(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function Zv(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Fr(t.text.charCodeAt(t.pos+1)))&&(!n||H$(e,ce.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Yv(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&&!Fr(t.text.charCodeAt(r+1))||n&&!H$(e,ce.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function K$(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&&Fr(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const jO=/^[ \t]*$/,e_=/-->/,t_=/\?>/,LO=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,e_],[/^\s*<\?/,t_],[/^\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,jO],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,jO]];function n_(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,o=LO.length-(n?1:0);i<o;i++)if(LO[i][0].test(r))return i;return-1}function Bw(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 ts(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==ce.CodeText?t[r].to=n:t.push(mt(ce.CodeText,e,n))}const yf={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,o=t.lineStart+e.text.length,s=[],l=[];for(ts(s,i,o);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){ts(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==ce.CodeText?ts(s,u.from,u.to):s.push(u);l=[]}ts(s,t.lineStart-1,t.lineStart);for(let u of e.markers)s.push(u);o=t.lineStart+e.text.length;let a=t.lineStart+e.findColumn(e.baseIndent+4);a<o&&ts(s,a,o)}}return l.length&&(l=l.filter(a=>a.type!=ce.CodeText),l.length&&(e.markers=l.concat(e.markers))),t.addNode(t.buffer.writeElements(s,-i).finish(ce.CodeBlock,o-i),i),!0},FencedCode(t,e){let n=q$(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,o=n-e.pos,s=e.skipSpace(n),l=Vw(e.text,e.text.length,s),a=[mt(ce.CodeMark,r,r+o)];s<l&&a.push(mt(ce.CodeInfo,t.lineStart+s,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>=o&&e.skipSpace(c)==e.text.length){for(let f of e.markers)a.push(f);a.push(mt(ce.CodeMark,t.lineStart+e.pos,t.lineStart+c)),t.nextLine();break}else{u||ts(a,t.lineStart-1,t.lineStart);for(let d of e.markers)a.push(d);let f=t.lineStart+e.basePos,h=t.lineStart+e.text.length;f<h&&ts(a,f,h)}}return t.addNode(t.buffer.writeElements(a,-r).finish(ce.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=G$(e);return n<0?!1:(t.startContext(ce.Blockquote,e.pos),t.addNode(ce.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(Uv(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(ce.HorizontalRule,n),!0},BulletList(t,e){let n=Zv(e,t,!1);if(n<0)return!1;t.block.type!=ce.BulletList&&t.startContext(ce.BulletList,e.basePos,e.next);let r=Bw(e,e.pos+1);return t.startContext(ce.ListItem,e.basePos,r-e.baseIndent),t.addNode(ce.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=Yv(e,t,!1);if(n<0)return!1;t.block.type!=ce.OrderedList&&t.startContext(ce.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=Bw(e,e.pos+n);return t.startContext(ce.ListItem,e.basePos,r-e.baseIndent),t.addNode(ce.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=K$(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,o=Vw(e.text,e.text.length,r),s=o;for(;s>r&&e.text.charCodeAt(s-1)==e.next;)s--;(s==o||s==r||!Fr(e.text.charCodeAt(s-1)))&&(s=e.text.length);let l=t.buffer.write(ce.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,s),i+n+1),-i);s<e.text.length&&l.write(ce.HeaderMark,s-r,o-r);let a=l.finish(ce.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(a,i),!0},HTMLBlock(t,e){let n=n_(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=LO[n][1],o=[],s=i!=jO;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){s=!1;break}for(let u of e.markers)o.push(u)}s&&t.nextLine();let l=i==e_?ce.CommentBlock:i==t_?ce.ProcessingInstructionBlock:ce.HTMLBlock,a=t.prevLineEnd();return t.addNode(t.buffer.writeElements(o,-r).finish(l,a-r),r),!0},SetextHeading:void 0};class Q4{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+`
88
- `+n.scrub(),o=this.advance(i);return o>-1&&o<i.length?this.complete(e,r,o):!1}finish(e,n){return(this.stage==2||this.stage==3)&&ru(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,r){return e.addLeafElement(n,mt(ce.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(f_(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(mt(ce.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(u_(e,ru(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=ru(e,this.pos),r=0;if(n>this.pos){let i=c_(e,n,this.start);if(i){let o=xg(e,i.to-this.start);o>0&&(this.nextStage(i),r=o)}}return r||(r=xg(e,this.pos)),r>0&&r<e.length?r:-1}else return xg(e,this.pos)}}}function xg(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!Fr(n))return-1}return e}class $4{nextLine(e,n,r){let i=n.depth<e.stack.length?-1:J$(n),o=n.next;if(i<0)return!1;let s=mt(ce.HeaderMark,e.lineStart+n.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,mt(o==61?ce.SetextHeading1:ce.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),s])),!0}finish(){return!1}}const _4={LinkReference(t,e){return e.content.charCodeAt(0)==91?new Q4(e):null},SetextHeading(){return new $4}},T4=[(t,e)=>K$(e)>=0,(t,e)=>q$(e)>=0,(t,e)=>G$(e)>=0,(t,e)=>Zv(e,t,!0)>=0,(t,e)=>Yv(e,t,!0)>=0,(t,e)=>Uv(e,t,!0)>=0,(t,e)=>n_(e,t,!0)>=0],A4={text:"",end:0};class R4{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.line=new E4,this.atEnd=!1,this.dontInject=new Set,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=td.create(ce.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new N4(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 C4(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+=`
89
- `+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);if(!n)return!1;let r=n,i=this.absoluteLineStart+n;for(let o=1;o<this.ranges.length;o++){let s=this.ranges[o-1].to,l=this.ranges[o].from;s>=this.lineStart&&l<i&&(r-=l-s)}return this.lineStart+=r,this.absoluteLineStart+=n,this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0}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=A4;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 o=this.ranges[i].from,s=this.lineChunkAt(o);n.end=o+s.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+s,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],o=this.parser.skipContextMarkup[i.type];if(!o)throw new Error("Unhandled block context "+ce[i.type]);if(!o(i,this,e))break;e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),r;if(this.input.lineChunks)r=n==`
90
- `?"":n;else{let i=n.indexOf(`
91
- `);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=td.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 vt(this.parser.nodeSet.types[e],Wl,Wl,(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(BO(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?r_(this.ranges,0,e.topNode,this.ranges[0].from,this.dontInject):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let n=BO(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(ce.Paragraph,e.content.length),e.start)}elt(e,n,r,i){return typeof e=="string"?mt(this.parser.getNodeType(e),n,r,i):new s_(e,n)}get buffer(){return new o_(this.parser.nodeSet)}}function r_(t,e,n,r,i){if(i.has(n.tree))return n.tree;let o=t[e].to,s=[],l=[],a=n.from+r;function u(c,f){for(;f?c>=o:c>o;){let h=t[e+1].from-o;r+=h,c+=h,e++,o=t[e].to}}for(let c=n.firstChild;c;c=c.nextSibling){u(c.from+r,!0);let f=c.from+r,h;c.to+r>o?(h=r_(t,e,c,r,i),u(c.to+r,!1)):h=c.toTree(),s.push(h),l.push(f-a)}return u(n.to+r,!1),new vt(n.type,s,l,n.to+r-a,n.tree?n.tree.propValues:void 0)}class Zd extends kv{constructor(e,n,r,i,o,s,l,a,u){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=o,this.skipContextMarkup=s,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 R4(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}configure(e){let n=VO(e);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,o=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),l=this.blockNames.slice(),a=this.inlineParsers.slice(),u=this.inlineNames.slice(),c=this.endLeafBlock.slice(),f=this.wrappers;if(Ea(n.defineNodes)){i=Object.assign({},i);let h=r.types.slice(),d;for(let p of n.defineNodes){let{name:g,block:v,composite:O,style:m}=typeof p=="string"?{name:p}:p;if(h.some(x=>x.name==g))continue;O&&(i[h.length]=(x,E,T)=>O(E,T,x.value));let y=h.length,b=O?["Block","BlockContext"]:v?y>=ce.ATXHeading1&&y<=ce.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;h.push(mn.define({id:y,name:g,props:b&&[[qe.group,b]]})),m&&(d||(d={}),Array.isArray(m)||m instanceof Kr?d[g]=m:Object.assign(d,m))}r=new rc(h),d&&(r=r.extend(Kl(d)))}if(Ea(n.props)&&(r=r.extend(...n.props)),Ea(n.remove))for(let h of n.remove){let d=this.blockNames.indexOf(h),p=this.inlineNames.indexOf(h);d>-1&&(o[d]=s[d]=void 0),p>-1&&(a[p]=void 0)}if(Ea(n.parseBlock))for(let h of n.parseBlock){let d=l.indexOf(h.name);if(d>-1)o[d]=h.parse,s[d]=h.leaf;else{let p=h.before?vf(l,h.before):h.after?vf(l,h.after)+1:l.length-1;o.splice(p,0,h.parse),s.splice(p,0,h.leaf),l.splice(p,0,h.name)}h.endLeaf&&c.push(h.endLeaf)}if(Ea(n.parseInline))for(let h of n.parseInline){let d=u.indexOf(h.name);if(d>-1)a[d]=h.parse;else{let p=h.before?vf(u,h.before):h.after?vf(u,h.after)+1:u.length-1;a.splice(p,0,h.parse),u.splice(p,0,h.name)}}return n.wrap&&(f=f.concat(n.wrap)),new Zd(r,o,s,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 M4(this,e,n);e:for(let i=n;i<r.end;){let o=r.char(i);for(let s of this.inlineParsers)if(s){let l=s(r,o,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}}function Ea(t){return t!=null&&t.length>0}function VO(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=VO(t[0]);if(t.length==1)return e;let n=VO(t.slice(1));if(!n||!e)return e||n;let r=(s,l)=>(s||Wl).concat(l||Wl),i=e.wrap,o=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?o?(s,l,a,u)=>i(o(s,l,a,u),l,a,u):i:o}}function vf(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let i_=[mn.none];for(let t=1,e;e=ce[t];t++)i_[t]=mn.define({id:t,name:e,props:t>=ce.Escape?[]:[[qe.group,t in z$?["Block","BlockContext"]:["Block","LeafBlock"]]]});const Wl=[];class o_{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 vt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let Vu=class{constructor(e,n,r,i=Wl){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 o_(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class s_{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 Wl}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 mt(t,e,n,r){return new Vu(t,e,n,r)}const l_={resolve:"Emphasis",mark:"EmphasisMark"},a_={resolve:"Emphasis",mark:"EmphasisMark"},Qa={},Fw={};class Jr{constructor(e,n,r,i){this.type=e,this.from=n,this.to=r,this.side=i}}const Xw="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Bu=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Bu=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch{}const Cg={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let r=t.char(n+1);for(let i=0;i<Xw.length;i++)if(Xw.charCodeAt(i)==r)return t.append(mt(ce.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(mt(ce.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,o=0;for(;r<t.end;r++)if(t.char(r)==96){if(o++,o==i&&t.char(r+1)!=96)return t.append(mt(ce.InlineCode,n,r+1,[mt(ce.CodeMark,n,n+i),mt(ce.CodeMark,r+1-i,r+1)]))}else o=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(mt(ce.URL,n,n+1+i[0].length));let o=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(o)return t.append(mt(ce.Comment,n,n+1+o[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return t.append(mt(ce.ProcessingInstruction,n,n+1+s[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(mt(ce.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),o=t.slice(r,r+1),s=Bu.test(i),l=Bu.test(o),a=/\s|^$/.test(i),u=/\s|^$/.test(o),c=!u&&(!l||a||s),f=!a&&(!s||u||l),h=c&&(e==42||!f||s),d=f&&(e==42||!c||l);return t.append(new Jr(e==95?l_:a_,n,r,(h?1:0)|(d?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(mt(ce.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(mt(ce.HardBreak,n,r+1))}return-1},Link(t,e,n){return e==91?t.append(new Jr(Qa,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Jr(Fw,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==Qa||i.type==Fw)){if(!i.side||t.skipSpace(i.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;let o=t.takeContent(r),s=t.parts[r]=D4(t,o,i.type==Qa?ce.Link:ce.Image,i.from,n+1);if(i.type==Qa)for(let l=0;l<r;l++){let a=t.parts[l];a instanceof Jr&&a.type==Qa&&(a.side=0)}return s.to}}return-1}};function D4(t,e,n,r,i){let{text:o}=t,s=t.char(i),l=i;if(e.unshift(mt(ce.LinkMark,r,r+(n==ce.Image?2:1))),e.push(mt(ce.LinkMark,i-1,i)),s==40){let a=t.skipSpace(i+1),u=u_(o,a-t.offset,t.offset),c;u&&(a=t.skipSpace(u.to),c=c_(o,a-t.offset,t.offset),c&&(a=t.skipSpace(c.to))),t.char(a)==41&&(e.push(mt(ce.LinkMark,i,i+1)),l=a+1,u&&e.push(u),c&&e.push(c),e.push(mt(ce.LinkMark,a,l)))}else if(s==91){let a=f_(o,i-t.offset,t.offset,!1);a&&(e.push(a),l=a.to)}return mt(n,r,l,e)}function u_(t,e,n){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let o=t.charCodeAt(i);if(o==62)return mt(ce.URL,e+n,i+1+n);if(o==60||o==10)return!1}return null}else{let i=0,o=e;for(let s=!1;o<t.length;o++){let l=t.charCodeAt(o);if(Fr(l))break;if(s)s=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(s=!0)}return o>e?mt(ce.URL,e+n,o+n):o==t.length?null:!1}}function c_(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 o=e+1,s=!1;o<t.length;o++){let l=t.charCodeAt(o);if(s)s=!1;else{if(l==i)return mt(ce.LinkTitle,e+n,o+1+n);l==92&&(s=!0)}}return null}function f_(t,e,n,r){for(let i=!1,o=e+1,s=Math.min(t.length,o+999);o<s;o++){let l=t.charCodeAt(o);if(i)i=!1;else{if(l==93)return r?!1:mt(ce.LinkLabel,e+n,o+1+n);if(r&&!Fr(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}class M4{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,o){return this.append(new Jr(e,n,r,(i?1:0)|(o?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 o=i.type==l_||i.type==a_,s=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&&!(o&&(i.side&1||g.side&2)&&(g.to-g.from+s)%3==0&&((g.to-g.from)%3||s%3))){l=g;break}}if(!l)continue;let u=i.type.resolve,c=[],f=l.from,h=i.to;if(o){let g=Math.min(2,l.to-l.from,s);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 Vu&&c.push(this.parts[g]),this.parts[g]=null;i.type.mark&&c.push(this.elt(i.type.mark,i.from,h));let d=this.elt(u,f,h,c);this.parts[a]=o&&l.from!=f?new Jr(l.type,l.from,f,l.side):null,(this.parts[r]=o&&i.to!=h?new Jr(i.type,h,i.to,i.side):null)?this.parts.splice(r,0,d):this.parts[r]=d}let n=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof Vu&&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 ru(this.text,e-this.offset)+this.offset}elt(e,n,r,i){return typeof e=="string"?mt(this.parser.getNodeType(e),n,r,i):new s_(e,n)}}function BO(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 o=n[r];o instanceof Vu&&(n[r]=new Vu(o.type,o.from,o.to,BO(o.children,[i])))}else n.splice(r++,0,i)}return n}const I4=[ce.CodeBlock,ce.ListItem,ce.OrderedList,ce.BulletList];class N4{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 o=this.fragment.to;for(;o>0&&this.input.read(o-1,o)!=`
92
- `;)o--;this.fragmentEnd=o?o-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(qe.contextHash)==e}takeNodes(e){let n=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),o=e.absoluteLineStart,s=o,l=e.block.children.length,a=s,u=l;for(;;){if(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}if(e.dontInject.add(n.tree),e.addNode(n.tree,n.from-r),n.type.is("Block")&&(I4.indexOf(n.type.id)<0?(s=n.to-r,l=e.block.children.length):(s=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 s-o}}const j4=Kl({"Blockquote/...":S.quote,HorizontalRule:S.contentSeparator,"ATXHeading1/... SetextHeading1/...":S.heading1,"ATXHeading2/... SetextHeading2/...":S.heading2,"ATXHeading3/...":S.heading3,"ATXHeading4/...":S.heading4,"ATXHeading5/...":S.heading5,"ATXHeading6/...":S.heading6,"Comment CommentBlock":S.comment,Escape:S.escape,Entity:S.character,"Emphasis/...":S.emphasis,"StrongEmphasis/...":S.strong,"Link/... Image/...":S.link,"OrderedList/... BulletList/...":S.list,"BlockQuote/...":S.quote,"InlineCode CodeText":S.monospace,URL:S.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":S.processingInstruction,"CodeInfo LinkLabel":S.labelName,LinkTitle:S.string,Paragraph:S.content}),L4=new Zd(new rc(i_).extend(j4),Object.keys(yf).map(t=>yf[t]),Object.keys(yf).map(t=>_4[t]),Object.keys(yf),T4,z$,Object.keys(Cg).map(t=>Cg[t]),Object.keys(Cg),[]);function V4(t,e,n){let r=[];for(let i=t.firstChild,o=e;;i=i.nextSibling){let s=i?i.from:n;if(s>o&&r.push({from:o,to:s}),!i)break;o=i.to}return r}function B4(t){let{codeParser:e,htmlParser:n}=t;return{wrap:uQ((i,o)=>{let s=i.type.id;if(e&&(s==ce.CodeBlock||s==ce.FencedCode)){let l="";if(s==ce.FencedCode){let u=i.node.getChild(ce.CodeInfo);u&&(l=o.read(u.from,u.to))}let a=e(l);if(a)return{parser:a,overlay:u=>u.type.id==ce.CodeText}}else if(n&&(s==ce.HTMLBlock||s==ce.HTMLTag))return{parser:n,overlay:V4(i.node,i.from,i.to)};return null})}}const F4={resolve:"Strikethrough",mark:"StrikethroughMark"},X4={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":S.strikethrough}},{name:"StrikethroughMark",style:S.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),o=/\s|^$/.test(r),s=/\s|^$/.test(i),l=Bu.test(r),a=Bu.test(i);return t.addDelimiter(F4,n,n+2,!s&&(!a||o||l),!o&&(!l||s||a))},after:"Emphasis"}]};function iu(t,e,n=0,r,i=0){let o=0,s=!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?((!s||l>-1)&&o++,s=!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&&(o++,r&&c()),o}function Ww(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 h_=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Uw{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)&&h_.test(i=n.text.slice(n.pos))){let o=[];iu(e,r.content,0,o,r.start)==iu(e,i,n.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,o),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let i=[];iu(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 W4={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":S.heading}},"TableRow",{name:"TableCell",style:S.content},{name:"TableDelimiter",style:S.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return Ww(e.content,0)?new Uw:null},endLeaf(t,e,n){if(n.parsers.some(i=>i instanceof Uw)||!Ww(e.text,e.basePos))return!1;let r=t.scanLine(t.absoluteLineEnd+1).text;return h_.test(r)&&iu(t,e.text,e.basePos)==iu(t,r,e.basePos)},before:"SetextHeading"}]};class U4{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 Z4={defineNodes:[{name:"Task",block:!0,style:S.list},{name:"TaskMarker",style:S.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\]/.test(e.content)&&t.parentType().name=="ListItem"?new U4:null},after:"SetextHeading"}]},Y4=[W4,Z4,X4];function d_(t,e,n){return(r,i,o)=>{if(i!=t||r.char(o+1)==t)return-1;let s=[r.elt(n,o,o+1)];for(let l=o+1;l<r.end;l++){let a=r.char(l);if(a==t)return r.addElement(r.elt(e,o,l+1,s.concat(r.elt(n,l,l+1))));if(a==92&&s.push(r.elt("Escape",l,l+++2)),Fr(a))break}return-1}}const z4={defineNodes:[{name:"Superscript",style:S.special(S.content)},{name:"SuperscriptMark",style:S.processingInstruction}],parseInline:[{name:"Superscript",parse:d_(94,"Superscript","SuperscriptMark")}]},q4={defineNodes:[{name:"Subscript",style:S.special(S.content)},{name:"SubscriptMark",style:S.processingInstruction}],parseInline:[{name:"Subscript",parse:d_(126,"Subscript","SubscriptMark")}]},G4={defineNodes:[{name:"Emoji",style:S.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))}}]},H4=54,K4=1,J4=55,eB=2,tB=56,nB=3,Zw=4,rB=5,nd=6,p_=7,g_=8,m_=9,O_=10,iB=11,oB=12,sB=13,Eg=57,lB=14,Yw=58,aB=20,uB=22,y_=23,cB=24,FO=26,v_=27,fB=28,hB=31,dB=34,S_=36,pB=37,gB=0,mB=1,OB={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},yB={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 vB(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function b_(t){return t==9||t==10||t==13||t==32}let qw=null,Gw=null,Hw=0;function XO(t,e){let n=t.pos+e;if(Hw==n&&Gw==t)return qw;let r=t.peek(e);for(;b_(r);)r=t.peek(++e);let i="";for(;vB(r);)i+=String.fromCharCode(r),r=t.peek(++e);return Gw=t,Hw=n,qw=i?i.toLowerCase():r==SB||r==bB?void 0:null}const w_=60,rd=62,zv=47,SB=63,bB=33,wB=45;function Kw(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 kB=[nd,O_,p_,g_,m_],PB=new M$({start:null,shift(t,e,n,r){return kB.indexOf(e)>-1?new Kw(XO(r,1)||"",t):t},reduce(t,e){return e==aB&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==nd||i==S_?new Kw(XO(r,1)||"",t):t},hash(t){return t?t.hash:0},strict:!1}),xB=new Ii((t,e)=>{if(t.next!=w_){t.next<0&&e.context&&t.acceptToken(Eg);return}t.advance();let n=t.next==zv;n&&t.advance();let r=XO(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?lB:nd);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(iB);if(i&&yB[i])return t.acceptToken(Eg,-2);if(e.dialectEnabled(gB))return t.acceptToken(oB);for(let o=e.context;o;o=o.parent)if(o.name==r)return;t.acceptToken(sB)}else{if(r=="script")return t.acceptToken(p_);if(r=="style")return t.acceptToken(g_);if(r=="textarea")return t.acceptToken(m_);if(OB.hasOwnProperty(r))return t.acceptToken(O_);i&&zw[i]&&zw[i][r]?t.acceptToken(Eg,-1):t.acceptToken(nd)}},{contextual:!0}),CB=new Ii(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(Yw);break}if(t.next==wB)e++;else if(t.next==rd&&e>=2){n>3&&t.acceptToken(Yw,-2);break}else e=0;t.advance()}});function EB(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const QB=new Ii((t,e)=>{if(t.next==zv&&t.peek(1)==rd){let n=e.dialectEnabled(mB)||EB(e.context);t.acceptToken(n?rB:Zw,2)}else t.next==rd&&t.acceptToken(Zw,1)});function qv(t,e,n){let r=2+t.length;return new Ii(i=>{for(let o=0,s=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(o==0&&i.next==w_||o==1&&i.next==zv||o>=2&&o<r&&i.next==t.charCodeAt(o-2))o++,s++;else if((o==2||o==r)&&b_(i.next))s++;else if(o==r&&i.next==rd){l>s?i.acceptToken(e,-s):i.acceptToken(n,-(s-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else o=s=0;i.advance()}})}const $B=qv("script",H4,K4),_B=qv("style",J4,eB),TB=qv("textarea",tB,nB),AB=Kl({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),RB=Xl.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'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G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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:PB,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:[AB],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!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hbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[$B,_B,TB,QB,xB,CB,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function k_(t,e){let n=Object.create(null);for(let r of t.getChildren(y_)){let i=r.getChild(cB),o=r.getChild(FO)||r.getChild(v_);i&&(n[e.read(i.from,i.to)]=o?o.type.id==FO?e.read(o.from+1,o.to-1):e.read(o.from,o.to):"")}return n}function Jw(t,e){let n=t.getChild(uB);return n?e.read(n.from,n.to):" "}function Qg(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=k_(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function P_(t=[],e=[]){let n=[],r=[],i=[],o=[];for(let l of t)(l.tag=="script"?n:l.tag=="style"?r:l.tag=="textarea"?i:o).push(l);let s=e.length?Object.create(null):null;for(let l of e)(s[l.name]||(s[l.name]=[])).push(l);return uQ((l,a)=>{let u=l.type.id;if(u==fB)return Qg(l,a,n);if(u==hB)return Qg(l,a,r);if(u==dB)return Qg(l,a,i);if(u==S_&&o.length){let c=l.node,f=Jw(c,a),h;for(let d of o)if(d.tag==f&&(!d.attrs||d.attrs(h||(h=k_(c,a))))){let p=c.parent.lastChild;return{parser:d.parser,overlay:[{from:l.to,to:p.type.id==pB?p.from:c.parent.to}]}}}if(s&&u==y_){let c=l.node,f;if(f=c.firstChild){let h=s[a.read(f.from,f.to)];if(h)for(let d of h){if(d.tagName&&d.tagName!=Jw(c.parent,a))continue;let p=c.lastChild;if(p.type.id==FO){let g=p.from+1,v=p.lastChild,O=p.to-(v&&v.isError?0:1);if(O>g)return{parser:d.parser,overlay:[{from:g,to:O}]}}else if(p.type.id==v_)return{parser:d.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const DB=94,ek=1,MB=95,IB=96,tk=2,x_=[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],NB=58,jB=40,C_=95,LB=91,Hf=45,VB=46,BB=35,FB=37;function id(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function XB(t){return t>=48&&t<=57}const WB=new Ii((t,e)=>{for(let n=!1,r=0,i=0;;i++){let{next:o}=t;if(id(o)||o==Hf||o==C_||n&&XB(o))!n&&(o!=Hf||i>0)&&(n=!0),r===i&&o==Hf&&r++,t.advance();else{n&&t.acceptToken(o==jB?MB:r==2&&e.canShift(tk)?tk:IB);break}}}),UB=new Ii(t=>{if(x_.includes(t.peek(-1))){let{next:e}=t;(id(e)||e==C_||e==BB||e==VB||e==LB||e==NB||e==Hf)&&t.acceptToken(DB)}}),ZB=new Ii(t=>{if(!x_.includes(t.peek(-1))){let{next:e}=t;if(e==FB&&(t.advance(),t.acceptToken(ek)),id(e)){do t.advance();while(id(t.next));t.acceptToken(ek)}}}),YB=Kl({"AtKeyword import charset namespace keyframes media supports":S.definitionKeyword,"from to selector":S.keyword,NamespaceName:S.namespace,KeyframeName:S.labelName,TagName:S.tagName,ClassName:S.className,PseudoClassName:S.constant(S.className),IdName:S.labelName,"FeatureName PropertyName":S.propertyName,AttributeName:S.attributeName,NumberLiteral:S.number,KeywordQuery:S.keyword,UnaryQueryOp:S.operatorKeyword,"CallTag ValueName":S.atom,VariableName:S.variableName,Callee:S.operatorKeyword,Unit:S.unit,"UniversalSelector NestingSelector":S.definitionOperator,MatchOp:S.compareOperator,"ChildOp SiblingOp, LogicOp":S.logicOperator,BinOp:S.arithmeticOperator,Important:S.modifier,Comment:S.blockComment,ParenthesizedContent:S.special(S.name),ColorLiteral:S.color,StringLiteral:S.string,":":S.punctuation,"PseudoOp #":S.derefOperator,"; ,":S.separator,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace}),zB={__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},qB={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},GB={__proto__:null,not:128,only:128,from:158,to:160},HB=Xl.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)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P'vP'v'vP#bP#bP#bP(T#bP(W(ZPP#bP#bP(^(m({)R)])c)m)sPPPPPP)y*SP*o*rP+h+k+q+z_aOPcgt!j#hkXOPcglqrst!j!z#]#hkROPcglqrst!j!z#]#hQjSR!mkQxUR!qnQ!qzQ#S!UR#k!sq!WY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mp!WY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mT$R#b$Sq!UY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mp!WY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mQ!b]R#a!cQyUR!rnQ!qyR#k!rQ|VR!toQ!OWR!upQuTQ!pmQ#^!_Q#d!fQ#e!gR$f$RSfPtQ!lgQ#g!jR$Y#hZePgt!j#ha!^Z_`!S!Y![#X#YR#V!YR!c]R!e^R#c!eQcOSgPtU!hcg#hR#h!jQ#r!{U$^#r$d$mQ$d#yR$m$_Q$`#rR$n$`QmTS!om$[R$[#oQ$W#fR$j$WQ!kfS#i!k#jR#j!lQ#Z!ZR#}#ZQ$S#bR$g$S_bOPcgt!j#h^TOPcgt!j#hQ!nlQ!vqQ!wrQ!xsQ#o!zR$O#]R#s!{Q!SYQ!`[Q#O!QQ#f!i[#q!{#r#y$_$d$mQ#t!}Q#v#QS$U#f$WQ$Z#mR$i$VR#p!zQhPR!ytQ!_ZQ!g`R#R!SU!ZZ`!SQ!f_Q#W!YQ#[![Q#{#XR#|#Y",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 from to SupportsStatement supports AtRule Styles",maxTerm:108,nodeProps:[["openedBy",17,"(",48,"{"],["closedBy",18,")",49,"}"]],propSources:[YB],skippedNodes:[0,3],repeatNodeCount:8,tokenData:"Lq~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Cu![!]Dp!]!^El!^!_$}!_!`E}!`!aF`!a!b$}!b!cG[!c!}$}!}#OHt#O#P$}#P#QIV#Q#R6d#R#T$}#T#UIh#U#c$}#c#dJy#d#o$}#o#pK`#p#q6d#q#rKq#r#sLS#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;=`Lk<%lO$}W%QSOy%^z;'S%^;'S;=`%o<%lO%^W%cSoWOy%^z;'S%^;'S;=`%o<%lO%^W%rP;=`<%l%^~%zh#U~OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^~'mh#U~oWOX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^^)[UOy%^z#]%^#]#^)n#^;'S%^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B[t]||-1},{term:96,get:t=>GB[t]||-1}],tokenPrec:1123});let $g=null;function _g(){if(!$g&&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)));$g=e.sort().map(r=>({type:"property",label:r}))}return $g||[]}const nk=["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})),rk=["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}))),KB=["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})),fo=/^(\w[\w-]*|-\w[\w-]*|)$/,JB=/^-(-[\w-]*)?$/;function eF(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 ik=new aQ,tF=["Declaration"];function nF(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function E_(t,e,n){if(e.to-e.from>4096){let r=ik.get(e);if(r)return r;let i=[],o=new Set,s=e.cursor(Mt.IncludeAnonymous);if(s.firstChild())do for(let l of E_(t,s.node,n))o.has(l.label)||(o.add(l.label),i.push(l));while(s.nextSibling());return ik.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(o=>{var s;if(n(o)&&o.matchContext(tF)&&((s=o.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let l=t.sliceString(o.from,o.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}const rF=t=>e=>{let{state:n,pos:r}=e,i=Qt(n).resolveInner(r,-1),o=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(o||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:_g(),validFor:fo};if(i.name=="ValueName")return{from:i.from,options:rk,validFor:fo};if(i.name=="PseudoClassName")return{from:i.from,options:nk,validFor:fo};if(t(i)||(e.explicit||o)&&eF(i,n.doc))return{from:t(i)||o?i.from:r,options:E_(n.doc,nF(i),t),validFor:JB};if(i.name=="TagName"){for(let{parent:a}=i;a;a=a.parent)if(a.name=="Block")return{from:i.from,options:_g(),validFor:fo};return{from:i.from,options:KB,validFor:fo}}if(!e.explicit)return null;let s=i.resolve(r),l=s.childBefore(r);return l&&l.name==":"&&s.name=="PseudoClassSelector"?{from:r,options:nk,validFor:fo}:l&&l.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:r,options:rk,validFor:fo}:s.name=="Block"||s.name=="Styles"?{from:r,options:_g(),validFor:fo}:null},iF=rF(t=>t.name=="VariableName"),od=Ll.define({name:"css",parser:HB.configure({props:[ic.add({Declaration:zf()}),oc.add({"Block KeyframeList":mQ})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Q_(){return new Du(od,od.data.of({autocomplete:iF}))}const $a=["_blank","_self","_top","_parent"],Tg=["ascii","utf-8","utf-16","latin1","latin1"],Ag=["get","post","put","delete"],Rg=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],fr=["true","false"],Re={},oF={a:{attrs:{href:null,ping:null,type:null,media:null,target:$a,hreflang:null}},abbr:Re,address:Re,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Re,aside:Re,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Re,base:{attrs:{href:null,target:$a}},bdi:Re,bdo:Re,blockquote:{attrs:{cite:null}},body:Re,br:Re,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Rg,formmethod:Ag,formnovalidate:["novalidate"],formtarget:$a,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Re,center:Re,cite:Re,code:Re,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:Re,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Re,div:Re,dl:Re,dt:Re,em:Re,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Re,figure:Re,footer:Re,form:{attrs:{action:null,name:null,"accept-charset":Tg,autocomplete:["on","off"],enctype:Rg,method:Ag,novalidate:["novalidate"],target:$a}},h1:Re,h2:Re,h3:Re,h4:Re,h5:Re,h6:Re,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Re,hgroup:Re,hr:Re,html:{attrs:{manifest:null}},i:Re,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:Rg,formmethod:Ag,formnovalidate:["novalidate"],formtarget:$a,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:Re,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Re,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:Re,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Tg,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:Re,noscript:Re,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:Re,param:{attrs:{name:null,value:null}},pre:Re,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Re,rt:Re,ruby:Re,samp:Re,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Tg}},section:Re,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Re,source:{attrs:{src:null,type:null,media:null}},span:Re,strong:Re,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Re,summary:Re,sup:Re,table:Re,tbody:Re,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Re,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:Re,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Re,time:{attrs:{datetime:null}},title:Re,tr:Re,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Re,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:Re},$_={accesskey:null,class:null,contenteditable:fr,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:fr,autocorrect:fr,autocapitalize:fr,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":fr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":fr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":fr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":fr,"aria-hidden":fr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":fr,"aria-multiselectable":fr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":fr,"aria-relevant":null,"aria-required":fr,"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},__="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 __)$_[t]=null;class Fu{constructor(e,n){this.tags=Object.assign(Object.assign({},oF),e),this.globalAttrs=Object.assign(Object.assign({},$_),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Fu.default=new Fu;function Ul(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 Zl(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function T_(t,e,n){let r=n.tags[Ul(t,Zl(e))];return(r==null?void 0:r.children)||n.allTags}function Gv(t,e){let n=[];for(let r=Zl(e);r&&!r.type.isTop;r=Zl(r.parent)){let i=Ul(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 A_=/^[:\-\.\w\u00b7-\uffff]*$/;function ok(t,e,n,r,i){let o=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",s=Zl(n,!0);return{from:r,to:i,options:T_(t.doc,s,e).map(l=>({label:l,type:"type"})).concat(Gv(t.doc,n).map((l,a)=>({label:"/"+l,apply:"/"+l+o,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function sk(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:Gv(t.doc,e).map((o,s)=>({label:o,apply:o+i,type:"type",boost:99-s})),validFor:A_}}function sF(t,e,n,r){let i=[],o=0;for(let s of T_(t.doc,n,e))i.push({label:"<"+s,type:"type"});for(let s of Gv(t.doc,n))i.push({label:"</"+s+">",type:"type",boost:99-o++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function lF(t,e,n,r,i){let o=Zl(n),s=o?e.tags[Ul(t.doc,o)]:null,l=s&&s.attrs?Object.keys(s.attrs):[],a=s&&s.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:A_}}function aF(t,e,n,r,i){var o;let s=(o=n.parent)===null||o===void 0?void 0:o.getChild("AttributeName"),l=[],a;if(s){let u=t.sliceDoc(s.from,s.to),c=e.globalAttrs[u];if(!c){let f=Zl(n),h=f?e.tags[Ul(t.doc,f)]:null;c=(h==null?void 0:h.attrs)&&h.attrs[u]}if(c){let f=t.sliceDoc(r,i).toLowerCase(),h='"',d='"';/^['"]/.test(f)?(a=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",d=t.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):a=/^[^\s<>='"]*$/;for(let p of c)l.push({label:p,apply:h+p+d,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}function R_(t,e){let{state:n,pos:r}=e,i=Qt(n).resolveInner(r,-1),o=i.resolve(r);for(let s=r,l;o==i&&(l=i.childBefore(s));){let a=l.lastChild;if(!a||!a.type.isError||a.from<a.to)break;o=i=l,s=a.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?sk(n,i,i.from,r):ok(n,t,i,i.from,r):i.name=="StartTag"?ok(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?sk(n,i,r,r):e.explicit&&(i.name=="OpenTag"||i.name=="SelfClosingTag")||i.name=="AttributeName"?lF(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?aF(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(o.name=="Element"||o.name=="Text"||o.name=="Document")?sF(n,t,i,r):null}function uF(t){return R_(Fu.default,t)}function cF(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new Fu(e,n):Fu.default;return i=>R_(r,i)}const D_=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:F$.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:X$.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:W$.parser},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:qi.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:od.parser}],M_=[{name:"style",parser:od.parser.configure({top:"Styles"})}].concat(__.map(t=>({name:t,parser:qi.parser}))),I_=Ll.define({name:"html",parser:RB.configure({props:[ic.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}}),oc.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}}}),EQ.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Kf=I_.configure({wrap:P_(D_,M_)});function N_(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(D_),(t.nestedAttributes||[]).concat(M_)));let r=n?I_.configure({wrap:n,dialect:e}):e?Kf.configure({dialect:e}):Kf;return new Du(r,[Kf.data.of({autocomplete:cF(t)}),t.autoCloseTags!==!1?fF:[],Y$().support,Q_().support])}const lk=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),fF=be.inputHandler.of((t,e,n,r)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Kf.isActiveAt(t.state,e,-1))return!1;let{state:i}=t,o=i.changeByRange(s=>{var l,a,u;let{head:c}=s,f=Qt(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=Ul(i.doc,f.parent,c))&&!lk.has(h)){let d=t.state.doc.sliceString(c,c+1)===">",p=`${d?"":">"}</${h}>`;return{range:J.cursor(c+1),changes:{from:c+(d?1:0),insert:p}}}}else if(r=="/"&&f.name=="OpenTag"){let d=f.parent,p=d==null?void 0:d.parent;if(d.from==c-1&&((u=p.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(h=Ul(i.doc,p,c))&&!lk.has(h)){let g=t.state.doc.sliceString(c,c+1)===">",v=`/${h}${g?"":">"}`,O=c+v.length+(g?1:0);return{range:J.cursor(O),changes:{from:c,insert:v}}}}return{range:s}});return o.changes.empty?!1:(t.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)}),j_=Pv({commentTokens:{block:{open:"<!--",close:"-->"}}}),L_=new qe,V_=L4.configure({props:[oc.add(t=>!t.is("Block")||t.is("Document")||WO(t)!=null?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),L_.add(WO),ic.add({Document:()=>null}),hs.add({Document:j_})]});function WO(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function hF(t,e){let n=t;for(;;){let r=n.nextSibling,i;if(!r||(i=WO(r.type))!=null&&i<=e)break;n=r}return n.to}const dF=gQ.of((t,e,n)=>{for(let r=Qt(t).resolveInner(n,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(L_);if(i==null)continue;let o=hF(r,i);if(o>n)return{from:n,to:o}}return null});function Hv(t){return new Mr(j_,t,[dF],"markdown")}const pF=Hv(V_),gF=V_.configure([Y4,q4,z4,G4]),B_=Hv(gF);function mF(t,e){return n=>{if(n&&t){let r=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?r=t(n):r=Bh.matchLanguageName(t,n,!0),r instanceof Bh)return r.support?r.support.language.parser:Ru.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}let Sf=class{constructor(e,n,r,i,o,s,l){this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=o,this.type=s,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(+X_(this.item,e)[2]+n):"";return this.spaceBefore+r+this.type+this.spaceAfter}};function F_(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 o=n[i],s,l=e.lineAt(o.from),a=o.from-l.from;if(o.name=="FencedCode")r.push(new Sf(o,a,a,"","","",null));else if(o.name=="Blockquote"&&(s=/^[ \t]*>( ?)/.exec(l.text.slice(a))))r.push(new Sf(o,a,a+s[0].length,"",s[1],">",null));else if(o.name=="ListItem"&&o.parent.name=="OrderedList"&&(s=/^([ \t]*)\d+([.)])([ \t]*)/.exec(l.text.slice(a)))){let u=s[3],c=s[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),r.push(new Sf(o.parent,a,a+c,s[1],u,s[2],o))}else if(o.name=="ListItem"&&o.parent.name=="BulletList"&&(s=/^([ \t]*)([-+*])([ \t]{1,4}\[[ xX]\])?([ \t]+)/.exec(l.text.slice(a)))){let u=s[4],c=s[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let f=s[2];s[3]&&(f+=s[3].replace(/[xX]/," ")),r.push(new Sf(o.parent,a,a+c,s[1],u,f,o))}}return r}function X_(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Dg(t,e,n,r=0){for(let i=-1,o=t;;){if(o.name=="ListItem"){let l=X_(o,e),a=+l[2];if(i>=0){if(a!=i+1)return;n.push({from:o.from+l[1].length,to:o.from+l[0].length,insert:String(i+2+r)})}i=a}let s=o.nextSibling;if(!s)break;o=s}}const OF=({state:t,dispatch:e})=>{let n=Qt(t),{doc:r}=t,i=null,o=t.changeByRange(s=>{if(!s.empty||!B_.isActiveAt(t,s.from))return i={range:s};let l=s.from,a=r.lineAt(l),u=F_(n.resolveInner(l,-1),r);for(;u.length&&u[u.length-1].from>l-a.from;)u.pop();if(!u.length)return i={range:s};let c=u[u.length-1];if(c.to-c.spaceAfter.length>l-a.from)return i={range:s};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 v=u.length>1?u[u.length-2]:null,O,m="";v&&v.item?(O=a.from+v.from,m=v.marker(r,1)):O=a.from+(v?v.to:0);let y=[{from:O,to:l,insert:m}];return c.node.name=="OrderedList"&&Dg(c.item,r,y,-2),v&&v.node.name=="OrderedList"&&Dg(v.item,r,y),{range:J.cursor(O+m.length),changes:y}}else{let v="";for(let O=0,m=u.length-2;O<=m;O++)v+=u[O].blank(O<m?u[O+1].from-v.length:null,O<m);return v+=t.lineBreak,{range:J.cursor(l+v.length),changes:{from:a.from,insert:v}}}if(c.node.name=="Blockquote"&&f&&a.from){let v=r.lineAt(a.from-1),O=/>\s*$/.exec(v.text);if(O&&O.index==c.from){let m=t.changes([{from:v.from+O.index,to:v.to},{from:a.from+c.from,to:a.to}]);return{range:s.map(m),changes:m}}}let h=[];c.node.name=="OrderedList"&&Dg(c.item,r,h);let d=c.item&&c.item.from<a.from,p="";if(!d||/^[\s\d.)\-+*>]*/.exec(a.text)[0].length>=c.to)for(let v=0,O=u.length-1;v<=O;v++)p+=v==O&&!d?u[v].marker(r,1):u[v].blank(v<O?u[v+1].from-p.length:null);let g=l;for(;g>a.from&&/\s/.test(a.text.charAt(g-a.from-1));)g--;return p=t.lineBreak+p,h.push({from:g,to:l,insert:p}),{range:J.cursor(g+p.length),changes:h}});return i?!1:(e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)};function ak(t){return t.name=="QuoteMark"||t.name=="ListMark"}function yF(t,e){let n=t.resolveInner(e,-1),r=e;ak(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(ak(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}const vF=({state:t,dispatch:e})=>{let n=Qt(t),r=null,i=t.changeByRange(o=>{let s=o.from,{doc:l}=t;if(o.empty&&B_.isActiveAt(t,o.from)){let a=l.lineAt(s),u=F_(yF(n,s),l);if(u.length){let c=u[u.length-1],f=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(s-a.from>f&&!/\S/.test(a.text.slice(f,s-a.from)))return{range:J.cursor(a.from+f),changes:{from:a.from+f,to:s}};if(s-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:o,changes:{from:h,to:a.from+c.to,insert:c.blank(c.to-c.from)}};if(h<s)return{range:J.cursor(h),changes:{from:h,to:s}}}}}return r={range:o}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},SF=[{key:"Enter",run:OF},{key:"Backspace",run:vF}],UO=N_({matchClosingTags:!1});function bF(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=pF,completeHTMLTags:o=!0}=t;if(!(i instanceof Zd))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let s=t.extensions?[t.extensions]:[],l=[UO.support],a;n instanceof Du?(l.push(n.support),a=n.language):n&&(a=n);let u=e||a?mF(e,a):void 0;s.push(B4({codeParser:u,htmlParser:UO.language.parser})),r&&l.push(qo.high(tc.of(SF)));let c=Hv(i.configure(s));return o&&l.push(c.data.of({autocomplete:wF})),new Du(c,l)}function wF(t){let{state:e,pos:n}=t,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!r)return null;let i=Qt(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:kF(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Mg=null;function kF(){if(Mg)return Mg;let t=uF(new Nv(ct.create({extensions:UO}),0,!0));return Mg=t?t.options:[]}const uk=(t,e,n,r,i)=>{let o=[],s=0;return e.iterChanges((l,a,u,c,f)=>{const h=n.sliceString(l,a,`
93
- `),d=f.sliceString(0,f.length,`
94
- `);h&&o.push(i.remove(l+s,h)),d&&o.push(i.insert(l+s,d)),s+=d.length,s-=h.length}),o=o.reduce(i.type.compose),r.editOp(t,"text-unicode",o)},ck=t=>{const e=[];for(const n of t){const{es:r}=n;if(r!==void 0){let i=0;for(let o=0;o<r.length;o++){const s=r[o];if(typeof s=="number")i+=s;else if(typeof s=="string")if(r[o+1]&&typeof r[o+1]=="object"&&r[o+1].d!==void 0){let l=typeof r[o+1].d=="number"?r[o+1].d:r[o+1].d.length;e.push({from:i,to:i+l,insert:s}),i+=l,o++}else e.push({from:i,to:i,insert:s});else s&&s.d!==void 0&&(typeof s.d=="number"?(e.push({from:i,to:i+s.d}),i+=s.d):typeof s.d=="string"&&(e.push({from:i,to:i+s.d.length}),i+=s.d.length))}}}return e},PF=(t,e)=>{if(!t||!e)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},xF=({shareDBDoc:t,path:e=[],json1:n,textUnicode:r,debug:i=!1})=>qt.fromClass(class{constructor(o){this.view=o,this.handleOp=s=>{!this.lock&&PF(s,e)&&(this.lock=!0,i&&(console.log("Received op from ShareDB"),console.log(" op: "+JSON.stringify(s)),console.log(" generated changes: "+JSON.stringify(ck(s)))),o.dispatch({changes:ck(s)}),this.lock=!1)},t.on("op",this.handleOp)}update(o){!this.lock&&o.docChanged&&(this.lock=!0,i&&(console.log("Received change from CodeMirror"),console.log(" changes:"+JSON.stringify(o.changes.toJSON())),console.log(" iterChanges:"),o.changes.iterChanges((s,l,a,u,c)=>{console.log(" "+JSON.stringify({fromA:s,toA:l,fromB:a,toB:u,inserted:c.sliceString(0,c.length,`
95
- `)}))}),console.log(" generated json1 op: "+JSON.stringify(uk(e,o.changes,o.startState.doc,n,r)))),t.submitOp(uk(e,o.changes,o.startState.doc,n,r)),this.lock=!1)}destroy(){t.off("op",this.handleOp)}}),CF=({path:t,localPresence:e})=>be.updateListener.of(n=>{if(n.selectionSet){const r=n.state.selection.ranges[0],{from:i,to:o}=r,s={start:[...t,i],end:[...t,o]};e.submit(s,l=>{if(l)throw l})}}),EF=({path:t,docPresence:e})=>[qt.fromClass(class{constructor(n){this.decorations=yt.of([]);const r={};e.on("receive",(i,o)=>{o&&$F(t,o)?r[i]=o:delete r[i],this.decorations=Ae.set(Object.keys(r).map(s=>{const l=r[s],{start:a,end:u}=l,c=a[a.length-1];return{from:c,to:c,value:Ae.widget({side:-1,block:!1,widget:new _F(s)})}}),!0),setTimeout(()=>{n.dispatch({annotations:[QF.of(!0)]})},0)})}},{decorations:n=>n.decorations}),TF],QF=Ai.define(),$F=(t,e)=>{for(let n=0;n<t.length;n++)if(t[n]!==e.start[n])return!1;return!0};class _F extends Di{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 TF=be.baseTheme({".cm-json1-presence":{position:"relative"},".cm-json1-presence > div":{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",borderLeft:"1px solid yellow"}}),W_=On.define({create:()=>null,update:(t,e)=>{for(const n of e.effects)if(n.is(ZO))return n.value;if(!t)return null;if(!e.changes.empty){const n=e.changes.mapPos(t.pos,-1,hn.TrackDel),r=e.changes.mapPos(t.pos+t.text.length,-1,hn.TrackDel);return n===null||r===null||e.newDoc.sliceString(n,r)!==t.text?null:Object.assign(Object.assign({},t),{pos:n})}return t},provide:t=>[be.decorations.from(t,e=>{if(!e)return Ae.none;const n=e.pos,r=e.pos+e.text.length,i=e.rule.className;return Ae.set(AF({className:i}).range(n,r))}),be.contentAttributes.from(t,e=>!e||!e.rule.cursor?{style:""}:{style:`cursor: ${e.rule.cursor}`})]}),ZO=tt.define(),AF=t=>{var e;return Ae.mark({class:`cm-interact ${(e=t==null?void 0:t.className)!==null&&e!==void 0?e:""}`})},RF=be.theme({".cm-interact":{background:"rgba(128, 128, 255, 0.2)",borderRadius:"4px"}}),U_=Ce.define(),Z_=Ce.define({combine:t=>t[t.length-1]}),DF=qt.define(t=>({target:null,dragging:!1,mouseX:0,mouseY:0,getMatch(){const e=t.state.facet(U_),n=t.posAtCoords({x:this.mouseX,y:this.mouseY});if(!n)return null;const r=t.state.doc.lineAt(n),i=n-r.from;let o=null;for(const s of e)for(const l of r.text.matchAll(s.regexp)){if(l.index===void 0)continue;const a=l[0];if(!a)continue;const u=l.index,c=l.index+a.length;i<u||i>c||(!o||a.length<o.text.length)&&(o={rule:s,pos:r.from+u,text:a})}return o},updateText(e){return n=>{t.dispatch({effects:ZO.of(Object.assign(Object.assign({},e),{text:n})),changes:{from:e.pos,to:e.pos+e.text.length,insert:n}})}},setTarget(e){this.target=e,t.dispatch({effects:ZO.of(e)})},isModKeyDown(e){const n=t.state.facet(Z_),r=!!window.navigator&&window.navigator.userAgent.includes("Macintosh");switch(n){case"alt":return e.altKey;case"shift":return e.shiftKey;case"ctrl":return e.ctrlKey;case"meta":return e.metaKey;case"mod":return r?e.metaKey:e.ctrlKey}throw new Error(`Invalid mod key: ${n}`)},update(e){const n=e.state.field(W_,!1);n!==void 0&&this.target!==n&&(this.target=n,n===null&&this.endDrag())},startDrag(e){this.dragging||this.target&&(this.dragging=!0,this.target.rule.onDragStart&&this.target.rule.onDragStart(this.target.text,this.updateText(this.target),e))},endDrag(){var e;this.dragging&&(this.dragging=!1,!((e=this.target)===null||e===void 0)&&e.rule.onDragEnd&&this.target.rule.onDragEnd(this.target.text,this.updateText(this.target)))}}),{eventHandlers:{mousedown(t,e){this.isModKeyDown(t)&&this.target&&(t.preventDefault(),this.target.rule.onClick&&this.target.rule.onClick(this.target.text,this.updateText(this.target),t),this.target.rule.onDrag&&this.startDrag(t))},mousemove(t,e){if(this.mouseX=t.clientX,this.mouseY=t.clientY,!this.isModKeyDown(t)){this.target&&this.setTarget(null);return}this.target&&this.dragging?this.target.rule.onDrag&&this.target.rule.onDrag(this.target.text,this.updateText(this.target),t):this.setTarget(this.getMatch())},mouseup(t,e){this.endDrag(),this.target&&!this.isModKeyDown(t)&&this.setTarget(null),this.isModKeyDown(t)&&this.setTarget(this.getMatch())},mouseleave(t,e){this.endDrag(),this.target&&this.setTarget(null)},keydown(t,e){!this.target&&this.isModKeyDown(t)&&this.setTarget(this.getMatch())},keyup(t,e){this.target&&!this.isModKeyDown(t)&&(this.endDrag(),this.setTarget(null))}}}),MF=(t={})=>{var e,n;return[W_,RF,DF,Z_.of((e=t.key)!==null&&e!==void 0?e:"alt"),((n=t.rules)!==null&&n!==void 0?n:[]).map(r=>U_.of(r))]},IF=({onInteract:t})=>MF({rules:[{regexp:/-?\b\d+\.?\d*\b/g,cursor:"ew-resize",onDrag:(e,n,r)=>{t&&t();const i=Number(e)+r.movementX;isNaN(i)||n(i.toString())}},{regexp:/true|false/g,cursor:"pointer",onClick:(e,n)=>{switch(t&&t(),e){case"true":return n("false");case"false":return n("true")}}},{regexp:/https?:\/\/[^ "]+/g,cursor:"pointer",onClick:e=>{window.open(e)}}]}),fk=new Map,hk=(t,e)=>{let n=t;for(const r of e){if(!n)return;n=n[r]}return n},NF=({fileId:t,shareDBDoc:e,filesPath:n,localPresence:r,docPresence:i,theme:o,onInteract:s})=>{const l=e.data,a=[...n,t,"text"],u=[...n,t,"name"],c=hk(l,a),h=hk(l,u).split(".").pop();let d=new Ku;const p=[];p.push(xF({shareDBDoc:e,path:a,json1:lv,textUnicode:AC})),r&&p.push(CF({path:a,localPresence:r})),i&&p.push(EF({path:a,docPresence:i})),p.push(XV),p.push(d.of(o)),h==="js"||h==="json"||h==="jsx"||h==="ts"?p.push(Y$()):h==="html"?p.push(N_()):h==="css"?p.push(Q_()):h==="md"&&p.push(bF()),p.push(IF({onInteract:s}));let g=fk.get(t);return g||(g=new be({state:ct.create({doc:c,extensions:p})}),fk.set(t,g)),g};const jF=({activeFileId:t,shareDBDoc:e,localPresence:n,docPresence:r,theme:i=_Q,filesPath:o=["files"],onInteract:s})=>{const l=I.useRef(null);return I.useLayoutEffect(()=>{if(!l.current||!e)return;const a=NF({fileId:t,shareDBDoc:e,filesPath:o,localPresence:n,docPresence:r,theme:J3[i],onInteract:s});return l.current.appendChild(a.dom),()=>{l.current.removeChild(a.dom)}},[e,t]),ne.jsx("div",{className:"vz-code-editor",ref:l})};var dk=Object.prototype.toString,Y_=function(e){var n=dk.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&dk.call(e.callee)==="[object Function]"),r},Ig,pk;function LF(){if(pk)return Ig;pk=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Y_,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(h){var d=h.constructor;return d&&d.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(d){var p=d!==null&&typeof d=="object",g=n.call(d)==="[object Function]",v=r(d),O=p&&n.call(d)==="[object String]",m=[];if(!p&&!g&&!v)throw new TypeError("Object.keys called on a non-object");var y=s&&g;if(O&&d.length>0&&!e.call(d,0))for(var b=0;b<d.length;++b)m.push(String(b));if(v&&d.length>0)for(var x=0;x<d.length;++x)m.push(String(x));else for(var E in d)!(y&&E==="prototype")&&e.call(d,E)&&m.push(String(E));if(o)for(var T=f(d),w=0;w<l.length;++w)!(T&&l[w]==="constructor")&&e.call(d,l[w])&&m.push(l[w]);return m}}return Ig=t,Ig}var VF=Array.prototype.slice,BF=Y_,gk=Object.keys,Jf=gk?function(e){return gk(e)}:LF(),mk=Object.keys;Jf.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 BF(r)?mk(VF.call(r)):mk(r)})}else Object.keys=Jf;return Object.keys||Jf};var z_=Jf,q_=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 o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},FF=q_,Kv=function(){return FF()&&!!Symbol.toStringTag},Ok=typeof Symbol<"u"&&Symbol,XF=q_,WF=function(){return typeof Ok!="function"||typeof Symbol!="function"||typeof Ok("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:XF()},UF="Function.prototype.bind called on incompatible ",Ng=Array.prototype.slice,ZF=Object.prototype.toString,YF="[object Function]",zF=function(e){var n=this;if(typeof n!="function"||ZF.call(n)!==YF)throw new TypeError(UF+n);for(var r=Ng.call(arguments,1),i,o=function(){if(this instanceof i){var c=n.apply(this,r.concat(Ng.call(arguments)));return Object(c)===c?c:this}else return n.apply(e,r.concat(Ng.call(arguments)))},s=Math.max(0,n.length-r.length),l=[],a=0;a<s;a++)l.push("$"+a);if(i=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var u=function(){};u.prototype=n.prototype,i.prototype=new u,u.prototype=null}return i},qF=zF,Jv=Function.prototype.bind||qF,GF=Jv,HF=GF.call(Function.call,Object.prototype.hasOwnProperty),ot,Yl=SyntaxError,G_=Function,xl=TypeError,jg=function(t){try{return G_('"use strict"; return ('+t+").constructor;")()}catch{}},Os=Object.getOwnPropertyDescriptor;if(Os)try{Os({},"")}catch{Os=null}var Lg=function(){throw new xl},KF=Os?function(){try{return arguments.callee,Lg}catch{try{return Os(arguments,"callee").get}catch{return Lg}}}():Lg,Fs=WF(),mi=Object.getPrototypeOf||function(t){return t.__proto__},qs={},JF=typeof Uint8Array>"u"?ot:mi(Uint8Array),ys={"%AggregateError%":typeof AggregateError>"u"?ot:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ot:ArrayBuffer,"%ArrayIteratorPrototype%":Fs?mi([][Symbol.iterator]()):ot,"%AsyncFromSyncIteratorPrototype%":ot,"%AsyncFunction%":qs,"%AsyncGenerator%":qs,"%AsyncGeneratorFunction%":qs,"%AsyncIteratorPrototype%":qs,"%Atomics%":typeof Atomics>"u"?ot:Atomics,"%BigInt%":typeof BigInt>"u"?ot:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ot:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ot:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ot:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ot:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ot:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ot:FinalizationRegistry,"%Function%":G_,"%GeneratorFunction%":qs,"%Int8Array%":typeof Int8Array>"u"?ot:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ot:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ot:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Fs?mi(mi([][Symbol.iterator]())):ot,"%JSON%":typeof JSON=="object"?JSON:ot,"%Map%":typeof Map>"u"?ot:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Fs?ot:mi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ot:Promise,"%Proxy%":typeof Proxy>"u"?ot:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ot:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ot:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Fs?ot:mi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ot:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Fs?mi(""[Symbol.iterator]()):ot,"%Symbol%":Fs?Symbol:ot,"%SyntaxError%":Yl,"%ThrowTypeError%":KF,"%TypedArray%":JF,"%TypeError%":xl,"%Uint8Array%":typeof Uint8Array>"u"?ot:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ot:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ot:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ot:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ot:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ot:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ot:WeakSet};try{null.error}catch(t){var eX=mi(mi(t));ys["%Error.prototype%"]=eX}var tX=function t(e){var n;if(e==="%AsyncFunction%")n=jg("async function () {}");else if(e==="%GeneratorFunction%")n=jg("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=jg("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&(n=mi(i.prototype))}return ys[e]=n,n},yk={"%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"]},uc=Jv,sd=HF,nX=uc.call(Function.call,Array.prototype.concat),rX=uc.call(Function.apply,Array.prototype.splice),vk=uc.call(Function.call,String.prototype.replace),ld=uc.call(Function.call,String.prototype.slice),iX=uc.call(Function.call,RegExp.prototype.exec),oX=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,sX=/\\(\\)?/g,lX=function(e){var n=ld(e,0,1),r=ld(e,-1);if(n==="%"&&r!=="%")throw new Yl("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Yl("invalid intrinsic syntax, expected opening `%`");var i=[];return vk(e,oX,function(o,s,l,a){i[i.length]=l?vk(a,sX,"$1"):s||o}),i},aX=function(e,n){var r=e,i;if(sd(yk,r)&&(i=yk[r],r="%"+i[0]+"%"),sd(ys,r)){var o=ys[r];if(o===qs&&(o=tX(r)),typeof o>"u"&&!n)throw new xl("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Yl("intrinsic "+e+" does not exist!")},e0=function(e,n){if(typeof e!="string"||e.length===0)throw new xl("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new xl('"allowMissing" argument must be a boolean');if(iX(/^%?[^%]*%?$/,e)===null)throw new Yl("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=lX(e),i=r.length>0?r[0]:"",o=aX("%"+i+"%",n),s=o.name,l=o.value,a=!1,u=o.alias;u&&(i=u[0],rX(r,nX([0,1],u)));for(var c=1,f=!0;c<r.length;c+=1){var h=r[c],d=ld(h,0,1),p=ld(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new Yl("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(a=!0),i+="."+h,s="%"+i+"%",sd(ys,s))l=ys[s];else if(l!=null){if(!(h in l)){if(!n)throw new xl("base intrinsic for "+e+" exists, but the property is not available.");return}if(Os&&c+1>=r.length){var g=Os(l,h);f=!!g,f&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[h]}else f=sd(l,h),l=l[h];f&&!a&&(ys[s]=l)}}return l},H_={exports:{}};(function(t){var e=Jv,n=e0,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||e.call(i,r),s=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=o(e,i,arguments);if(s&&l){var d=s(h,"length");d.configurable&&l(h,"length",{value:1+a(0,f.length-(arguments.length-1))})}return h};var u=function(){return o(e,r,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(H_);var t0=H_.exports,K_=e0,J_=t0,uX=J_(K_("String.prototype.indexOf")),eT=function(e,n){var r=K_(e,!!n);return typeof r=="function"&&uX(e,".prototype.")>-1?J_(r):r},cX=Kv(),fX=eT,YO=fX("Object.prototype.toString"),Yd=function(e){return cX&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:YO(e)==="[object Arguments]"},tT=function(e){return Yd(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&YO(e)!=="[object Array]"&&YO(e.callee)==="[object Function]"},hX=function(){return Yd(arguments)}();Yd.isLegacyArguments=tT;var dX=hX?Yd:tT,pX=e0,zO=pX("%Object.defineProperty%",!0),qO=function(){if(zO)try{return zO({},"a",{value:1}),!0}catch{return!1}return!1};qO.hasArrayLengthDefineBug=function(){if(!qO())return null;try{return zO([],"length",{value:1}).length!==1}catch{return!0}};var gX=qO,mX=z_,OX=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",yX=Object.prototype.toString,vX=Array.prototype.concat,nT=Object.defineProperty,SX=function(t){return typeof t=="function"&&yX.call(t)==="[object Function]"},bX=gX(),rT=nT&&bX,wX=function(t,e,n,r){if(e in t){if(r===!0){if(t[e]===n)return}else if(!SX(r)||!r())return}rT?nT(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n},iT=function(t,e){var n=arguments.length>2?arguments[2]:{},r=mX(e);OX&&(r=vX.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i<r.length;i+=1)wX(t,r[i],e[r[i]],n[r[i]])};iT.supportsDescriptors=!!rT;var cc=iT,Sk=function(t){return t!==t},oT=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Sk(e)&&Sk(n))},kX=oT,sT=function(){return typeof Object.is=="function"?Object.is:kX},PX=sT,xX=cc,CX=function(){var e=PX();return xX(Object,{is:e},{is:function(){return Object.is!==e}}),e},EX=cc,QX=t0,$X=oT,lT=sT,_X=CX,aT=QX(lT(),Object);EX(aT,{getPolyfill:lT,implementation:$X,shim:_X});var TX=aT,GO=eT,uT=Kv(),cT,fT,HO,KO;if(uT){cT=GO("Object.prototype.hasOwnProperty"),fT=GO("RegExp.prototype.exec"),HO={};var Vg=function(){throw HO};KO={toString:Vg,valueOf:Vg},typeof Symbol.toPrimitive=="symbol"&&(KO[Symbol.toPrimitive]=Vg)}var AX=GO("Object.prototype.toString"),RX=Object.getOwnPropertyDescriptor,DX="[object RegExp]",MX=uT?function(e){if(!e||typeof e!="object")return!1;var n=RX(e,"lastIndex"),r=n&&cT(n,"value");if(!r)return!1;try{fT(e,KO)}catch(i){return i===HO}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:AX(e)===DX},hT={exports:{}},Xu=function(){return typeof(function(){}).name=="string"},ou=Object.getOwnPropertyDescriptor;if(ou)try{ou([],"length")}catch{ou=null}Xu.functionsHaveConfigurableNames=function(){if(!Xu()||!ou)return!1;var e=ou(function(){},"name");return!!e&&!!e.configurable};var IX=Function.prototype.bind;Xu.boundFunctionsHaveNames=function(){return Xu()&&typeof IX=="function"&&(function(){}).bind().name!==""};var NX=Xu;(function(t){var e=NX.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 o="";return this.hasIndices&&(o+="d"),this.global&&(o+="g"),this.ignoreCase&&(o+="i"),this.multiline&&(o+="m"),this.dotAll&&(o+="s"),this.unicode&&(o+="u"),this.sticky&&(o+="y"),o},e&&Object.defineProperty&&Object.defineProperty(t.exports,"name",{value:"get flags"})})(hT);var dT=hT.exports,jX=dT,LX=cc.supportsDescriptors,VX=Object.getOwnPropertyDescriptor,pT=function(){if(LX&&/a/mig.flags==="gim"){var e=VX(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 jX},BX=cc.supportsDescriptors,FX=pT,XX=Object.getOwnPropertyDescriptor,WX=Object.defineProperty,UX=TypeError,bk=Object.getPrototypeOf,ZX=/a/,YX=function(){if(!BX||!bk)throw new UX("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=FX(),n=bk(ZX),r=XX(n,"flags");return(!r||r.get!==e)&&WX(n,"flags",{configurable:!0,enumerable:!1,get:e}),e},zX=cc,qX=t0,GX=dT,gT=pT,HX=YX,mT=qX(gT());zX(mT,{getPolyfill:gT,implementation:GX,shim:HX});var KX=mT,JX=Date.prototype.getDay,eW=function(e){try{return JX.call(e),!0}catch{return!1}},tW=Object.prototype.toString,nW="[object Date]",rW=Kv(),iW=function(e){return typeof e!="object"||e===null?!1:rW?eW(e):tW.call(e)===nW},wk=z_,kk=dX,Pk=TX,xk=MX,Ck=KX,Ek=iW,Qk=Date.prototype.getTime;function OT(t,e,n){var r=n||{};return(r.strict?Pk(t,e):t===e)?!0:!t||!e||typeof t!="object"&&typeof e!="object"?r.strict?Pk(t,e):t==e:oW(t,e,r)}function $k(t){return t==null}function _k(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 oW(t,e,n){var r,i;if(typeof t!=typeof e||$k(t)||$k(e)||t.prototype!==e.prototype||kk(t)!==kk(e))return!1;var o=xk(t),s=xk(e);if(o!==s)return!1;if(o||s)return t.source===e.source&&Ck(t)===Ck(e);if(Ek(t)&&Ek(e))return Qk.call(t)===Qk.call(e);var l=_k(t),a=_k(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=wk(t),c=wk(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],!OT(t[i],e[i],n))return!1;return!0}var sW=OT,JO=sW,ey;function Tk(t,e,n,r,i){var o;return i?o=i.replaceOp(t,n,r):(o={p:t},o[e?"od":"ld"]=n,o[e?"oi":"li"]=r),[o]}function lW(t,e,n,r,i,o){const s=[];var l=ey.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(o){var d=o.remove(c,h);s.push(i.editOp(t,o.type,d))}else s.push({sd:h,p:[...t,c]});break;case r.DIFF_INSERT:if(o){var d=o.insert(c,h);s.push(i.editOp(t,o.type,d))}else s.push({si:h,p:[...t,c]});case r.DIFF_EQUAL:c+=h.length;break;default:throw Error(`Unsupported operation type: ${f}`)}})}),s}var aW=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 o=t[r],s=t[r+1];JO(o.p.slice(0,-1),s.p.slice(0,-1))&&o.p[o.p.length-1]+1===s.p[s.p.length-1]&&(!o.li||!s.ld||JO(o.li,s.ld)&&(delete o.li,delete s.ld))}return t=t.filter(function(l){return Object.keys(l).length>1}),t},Fa=function(t,e,n=[],r){var i=r&&r.diffMatchPatch,o=r&&r.json1,s=r&&r.textUnicode,l=typeof n[n.length-1]=="string"||n.length===0;if(JO(t,e)&&Array.isArray(t)===Array.isArray(e))return[];if(typeof e>"u"){var a;return o?a=o.removeOp(n,t):(a={p:n},a[l?"od":"ld"]=t),[a]}if(typeof t>"u"){var a;return o?a=o.insertOp(n,e):(a={p:n},a[l?"oi":"li"]=e),[a]}if(t===null||e===null){var O=[];if(o)O.push(o.removeOp(n,t)),O.push(o.insertOp(n,e));else{var u={p:n};u[l?"od":"ld"]=t;var c={p:n};c[l?"oi":"li"]=e,O=[u,c]}return O}if(i&&typeof t=="string"&&typeof e=="string")return ey||(ey=new i),lW(n,t,e,i,o,s);var f=["string","number","boolean"];if(f.includes(typeof e)||f.includes(typeof t))return Tk(n,l,t,e,o);if(Array.isArray(e)&&Array.isArray(t)){for(var O=[],h=t.length,d=e.length,p=Math.min(h,d),O=[],g=0;g<p;++g){var v=Fa(t[g],e[g],[...n,g],r);v.forEach(function(b){O.push(b)})}if(d>h)for(var g=p;g<d;g++){var v=Fa(void 0,e[g],[...n,g],r);v.forEach(function(E){O.push(E)})}else if(d<h)for(var g=p;g<h;g++){var v=Fa(t[g],void 0,[...n,p],r);v.forEach(function(E){O.push(E)})}return O}else if(Array.isArray(e)||Array.isArray(t))return Tk(n,l,t,e,o);var O=[],m=new Set([...Object.keys(t),...Object.keys(e)]);return m.forEach(function(y){var b=Fa(t[y],e[y],[...n,y],r);O=O.concat(b)}),O},uW=function(t,e,n,r,i){var o={diffMatchPatch:n,json1:r,textUnicode:i};return aW(Fa(t,e,[],o),o)},cW=uW;const fW=Uo(cW);var yT={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(o,s){return[o,s]},e.prototype.diff_main=function(o,s,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(o==null||s==null)throw new Error("Null input. (diff_main)");if(o==s)return o?[new e.Diff(i,o)]:[];typeof l>"u"&&(l=!0);var c=l,f=this.diff_commonPrefix(o,s),h=o.substring(0,f);o=o.substring(f),s=s.substring(f),f=this.diff_commonSuffix(o,s);var d=o.substring(o.length-f);o=o.substring(0,o.length-f),s=s.substring(0,s.length-f);var p=this.diff_compute_(o,s,c,u);return h&&p.unshift(new e.Diff(i,h)),d&&p.push(new e.Diff(i,d)),this.diff_cleanupMerge(p),p},e.prototype.diff_compute_=function(o,s,l,a){var u;if(!o)return[new e.Diff(r,s)];if(!s)return[new e.Diff(n,o)];var c=o.length>s.length?o:s,f=o.length>s.length?s:o,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))],o.length>s.length&&(u[0][0]=u[2][0]=n),u;if(f.length==1)return[new e.Diff(n,o),new e.Diff(r,s)];var d=this.diff_halfMatch_(o,s);if(d){var p=d[0],g=d[1],v=d[2],O=d[3],m=d[4],y=this.diff_main(p,v,l,a),b=this.diff_main(g,O,l,a);return y.concat([new e.Diff(i,m)],b)}return l&&o.length>100&&s.length>100?this.diff_lineMode_(o,s,a):this.diff_bisect_(o,s,a)},e.prototype.diff_lineMode_=function(o,s,l){var a=this.diff_linesToChars_(o,s);o=a.chars1,s=a.chars2;var u=a.lineArray,c=this.diff_main(o,s,!1,l);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(i,""));for(var f=0,h=0,d=0,p="",g="";f<c.length;){switch(c[f][0]){case r:d++,g+=c[f][1];break;case n:h++,p+=c[f][1];break;case i:if(h>=1&&d>=1){c.splice(f-h-d,h+d),f=f-h-d;for(var v=this.diff_main(p,g,!1,l),O=v.length-1;O>=0;O--)c.splice(f,0,v[O]);f=f+v.length}d=0,h=0,p="",g="";break}f++}return c.pop(),c},e.prototype.diff_bisect_=function(o,s,l){for(var a=o.length,u=s.length,c=Math.ceil((a+u)/2),f=c,h=2*c,d=new Array(h),p=new Array(h),g=0;g<h;g++)d[g]=-1,p[g]=-1;d[f+1]=0,p[f+1]=0;for(var v=a-u,O=v%2!=0,m=0,y=0,b=0,x=0,E=0;E<c&&!(new Date().getTime()>l);E++){for(var T=-E+m;T<=E-y;T+=2){var w=f+T,k;T==-E||T!=E&&d[w-1]<d[w+1]?k=d[w+1]:k=d[w-1]+1;for(var C=k-T;k<a&&C<u&&o.charAt(k)==s.charAt(C);)k++,C++;if(d[w]=k,k>a)y+=2;else if(C>u)m+=2;else if(O){var Q=f+v-T;if(Q>=0&&Q<h&&p[Q]!=-1){var D=a-p[Q];if(k>=D)return this.diff_bisectSplit_(o,s,k,C,l)}}}for(var N=-E+b;N<=E-x;N+=2){var Q=f+N,D;N==-E||N!=E&&p[Q-1]<p[Q+1]?D=p[Q+1]:D=p[Q-1]+1;for(var V=D-N;D<a&&V<u&&o.charAt(a-D-1)==s.charAt(u-V-1);)D++,V++;if(p[Q]=D,D>a)x+=2;else if(V>u)b+=2;else if(!O){var w=f+v-N;if(w>=0&&w<h&&d[w]!=-1){var k=d[w],C=f+k-w;if(D=a-D,k>=D)return this.diff_bisectSplit_(o,s,k,C,l)}}}}return[new e.Diff(n,o),new e.Diff(r,s)]},e.prototype.diff_bisectSplit_=function(o,s,l,a,u){var c=o.substring(0,l),f=s.substring(0,a),h=o.substring(l),d=s.substring(a),p=this.diff_main(c,f,!1,u),g=this.diff_main(h,d,!1,u);return p.concat(g)},e.prototype.diff_linesToChars_=function(o,s){var l=[],a={};l[0]="";function u(d){for(var p="",g=0,v=-1,O=l.length;v<d.length-1;){v=d.indexOf(`
96
- `,g),v==-1&&(v=d.length-1);var m=d.substring(g,v+1);(a.hasOwnProperty?a.hasOwnProperty(m):a[m]!==void 0)?p+=String.fromCharCode(a[m]):(O==c&&(m=d.substring(g),v=d.length),p+=String.fromCharCode(O),a[m]=O,l[O++]=m),g=v+1}return p}var c=4e4,f=u(o);c=65535;var h=u(s);return{chars1:f,chars2:h,lineArray:l}},e.prototype.diff_charsToLines_=function(o,s){for(var l=0;l<o.length;l++){for(var a=o[l][1],u=[],c=0;c<a.length;c++)u[c]=s[a.charCodeAt(c)];o[l][1]=u.join("")}},e.prototype.diff_commonPrefix=function(o,s){if(!o||!s||o.charAt(0)!=s.charAt(0))return 0;for(var l=0,a=Math.min(o.length,s.length),u=a,c=0;l<u;)o.substring(c,u)==s.substring(c,u)?(l=u,c=l):a=u,u=Math.floor((a-l)/2+l);return u},e.prototype.diff_commonSuffix=function(o,s){if(!o||!s||o.charAt(o.length-1)!=s.charAt(s.length-1))return 0;for(var l=0,a=Math.min(o.length,s.length),u=a,c=0;l<u;)o.substring(o.length-u,o.length-c)==s.substring(s.length-u,s.length-c)?(l=u,c=l):a=u,u=Math.floor((a-l)/2+l);return u},e.prototype.diff_commonOverlap_=function(o,s){var l=o.length,a=s.length;if(l==0||a==0)return 0;l>a?o=o.substring(l-a):l<a&&(s=s.substring(0,l));var u=Math.min(l,a);if(o==s)return u;for(var c=0,f=1;;){var h=o.substring(u-f),d=s.indexOf(h);if(d==-1)return c;f+=d,(d==0||o.substring(u-f)==s.substring(0,f))&&(c=f,f++)}},e.prototype.diff_halfMatch_=function(o,s){if(this.Diff_Timeout<=0)return null;var l=o.length>s.length?o:s,a=o.length>s.length?s:o;if(l.length<4||a.length*2<l.length)return null;var u=this;function c(y,b,x){for(var E=y.substring(x,x+Math.floor(y.length/4)),T=-1,w="",k,C,Q,D;(T=b.indexOf(E,T+1))!=-1;){var N=u.diff_commonPrefix(y.substring(x),b.substring(T)),V=u.diff_commonSuffix(y.substring(0,x),b.substring(0,T));w.length<V+N&&(w=b.substring(T-V,T)+b.substring(T,T+N),k=y.substring(0,x-V),C=y.substring(x+N),Q=b.substring(0,T-V),D=b.substring(T+N))}return w.length*2>=y.length?[k,C,Q,D,w]:null}var f=c(l,a,Math.ceil(l.length/4)),h=c(l,a,Math.ceil(l.length/2)),d;if(!f&&!h)return null;h?f?d=f[4].length>h[4].length?f:h:d=h:d=f;var p,g,v,O;o.length>s.length?(p=d[0],g=d[1],v=d[2],O=d[3]):(v=d[0],O=d[1],p=d[2],g=d[3]);var m=d[4];return[p,g,v,O,m]},e.prototype.diff_cleanupSemantic=function(o){for(var s=!1,l=[],a=0,u=null,c=0,f=0,h=0,d=0,p=0;c<o.length;)o[c][0]==i?(l[a++]=c,f=d,h=p,d=0,p=0,u=o[c][1]):(o[c][0]==r?d+=o[c][1].length:p+=o[c][1].length,u&&u.length<=Math.max(f,h)&&u.length<=Math.max(d,p)&&(o.splice(l[a-1],0,new e.Diff(n,u)),o[l[a-1]+1][0]=r,a--,a--,c=a>0?l[a-1]:-1,f=0,h=0,d=0,p=0,u=null,s=!0)),c++;for(s&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),c=1;c<o.length;){if(o[c-1][0]==n&&o[c][0]==r){var g=o[c-1][1],v=o[c][1],O=this.diff_commonOverlap_(g,v),m=this.diff_commonOverlap_(v,g);O>=m?(O>=g.length/2||O>=v.length/2)&&(o.splice(c,0,new e.Diff(i,v.substring(0,O))),o[c-1][1]=g.substring(0,g.length-O),o[c+1][1]=v.substring(O),c++):(m>=g.length/2||m>=v.length/2)&&(o.splice(c,0,new e.Diff(i,g.substring(0,m))),o[c-1][0]=r,o[c-1][1]=v.substring(0,v.length-m),o[c+1][0]=n,o[c+1][1]=g.substring(m),c++),c++}c++}},e.prototype.diff_cleanupSemanticLossless=function(o){function s(m,y){if(!m||!y)return 6;var b=m.charAt(m.length-1),x=y.charAt(0),E=b.match(e.nonAlphaNumericRegex_),T=x.match(e.nonAlphaNumericRegex_),w=E&&b.match(e.whitespaceRegex_),k=T&&x.match(e.whitespaceRegex_),C=w&&b.match(e.linebreakRegex_),Q=k&&x.match(e.linebreakRegex_),D=C&&m.match(e.blanklineEndRegex_),N=Q&&y.match(e.blanklineStartRegex_);return D||N?5:C||Q?4:E&&!w&&k?3:w||k?2:E||T?1:0}for(var l=1;l<o.length-1;){if(o[l-1][0]==i&&o[l+1][0]==i){var a=o[l-1][1],u=o[l][1],c=o[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 d=a,p=u,g=c,v=s(a,u)+s(u,c);u.charAt(0)===c.charAt(0);){a+=u.charAt(0),u=u.substring(1)+c.charAt(0),c=c.substring(1);var O=s(a,u)+s(u,c);O>=v&&(v=O,d=a,p=u,g=c)}o[l-1][1]!=d&&(d?o[l-1][1]=d:(o.splice(l-1,1),l--),o[l][1]=p,g?o[l+1][1]=g:(o.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(o){for(var s=!1,l=[],a=0,u=null,c=0,f=!1,h=!1,d=!1,p=!1;c<o.length;)o[c][0]==i?(o[c][1].length<this.Diff_EditCost&&(d||p)?(l[a++]=c,f=d,h=p,u=o[c][1]):(a=0,u=null),d=p=!1):(o[c][0]==n?p=!0:d=!0,u&&(f&&h&&d&&p||u.length<this.Diff_EditCost/2&&f+h+d+p==3)&&(o.splice(l[a-1],0,new e.Diff(n,u)),o[l[a-1]+1][0]=r,a--,u=null,f&&h?(d=p=!0,a=0):(a--,c=a>0?l[a-1]:-1,d=p=!1),s=!0)),c++;s&&this.diff_cleanupMerge(o)},e.prototype.diff_cleanupMerge=function(o){o.push(new e.Diff(i,""));for(var s=0,l=0,a=0,u="",c="",f;s<o.length;)switch(o[s][0]){case r:a++,c+=o[s][1],s++;break;case n:l++,u+=o[s][1],s++;break;case i:l+a>1?(l!==0&&a!==0&&(f=this.diff_commonPrefix(c,u),f!==0&&(s-l-a>0&&o[s-l-a-1][0]==i?o[s-l-a-1][1]+=c.substring(0,f):(o.splice(0,0,new e.Diff(i,c.substring(0,f))),s++),c=c.substring(f),u=u.substring(f)),f=this.diff_commonSuffix(c,u),f!==0&&(o[s][1]=c.substring(c.length-f)+o[s][1],c=c.substring(0,c.length-f),u=u.substring(0,u.length-f))),s-=l+a,o.splice(s,l+a),u.length&&(o.splice(s,0,new e.Diff(n,u)),s++),c.length&&(o.splice(s,0,new e.Diff(r,c)),s++),s++):s!==0&&o[s-1][0]==i?(o[s-1][1]+=o[s][1],o.splice(s,1)):s++,a=0,l=0,u="",c="";break}o[o.length-1][1]===""&&o.pop();var h=!1;for(s=1;s<o.length-1;)o[s-1][0]==i&&o[s+1][0]==i&&(o[s][1].substring(o[s][1].length-o[s-1][1].length)==o[s-1][1]?(o[s][1]=o[s-1][1]+o[s][1].substring(0,o[s][1].length-o[s-1][1].length),o[s+1][1]=o[s-1][1]+o[s+1][1],o.splice(s-1,1),h=!0):o[s][1].substring(0,o[s+1][1].length)==o[s+1][1]&&(o[s-1][1]+=o[s+1][1],o[s][1]=o[s][1].substring(o[s+1][1].length)+o[s+1][1],o.splice(s+1,1),h=!0)),s++;h&&this.diff_cleanupMerge(o)},e.prototype.diff_xIndex=function(o,s){var l=0,a=0,u=0,c=0,f;for(f=0;f<o.length&&(o[f][0]!==r&&(l+=o[f][1].length),o[f][0]!==n&&(a+=o[f][1].length),!(l>s));f++)u=l,c=a;return o.length!=f&&o[f][0]===n?c:c+(s-u)},e.prototype.diff_prettyHtml=function(o){for(var s=[],l=/&/g,a=/</g,u=/>/g,c=/\n/g,f=0;f<o.length;f++){var h=o[f][0],d=o[f][1],p=d.replace(l,"&amp;").replace(a,"&lt;").replace(u,"&gt;").replace(c,"&para;<br>");switch(h){case r:s[f]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case n:s[f]='<del style="background:#ffe6e6;">'+p+"</del>";break;case i:s[f]="<span>"+p+"</span>";break}}return s.join("")},e.prototype.diff_text1=function(o){for(var s=[],l=0;l<o.length;l++)o[l][0]!==r&&(s[l]=o[l][1]);return s.join("")},e.prototype.diff_text2=function(o){for(var s=[],l=0;l<o.length;l++)o[l][0]!==n&&(s[l]=o[l][1]);return s.join("")},e.prototype.diff_levenshtein=function(o){for(var s=0,l=0,a=0,u=0;u<o.length;u++){var c=o[u][0],f=o[u][1];switch(c){case r:l+=f.length;break;case n:a+=f.length;break;case i:s+=Math.max(l,a),l=0,a=0;break}}return s+=Math.max(l,a),s},e.prototype.diff_toDelta=function(o){for(var s=[],l=0;l<o.length;l++)switch(o[l][0]){case r:s[l]="+"+encodeURI(o[l][1]);break;case n:s[l]="-"+o[l][1].length;break;case i:s[l]="="+o[l][1].length;break}return s.join(" ").replace(/%20/g," ")},e.prototype.diff_fromDelta=function(o,s){for(var l=[],a=0,u=0,c=s.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 d=parseInt(h,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+h);var p=o.substring(u,u+=d);c[f].charAt(0)=="="?l[a++]=new e.Diff(i,p):l[a++]=new e.Diff(n,p);break;default:if(c[f])throw new Error("Invalid diff operation in diff_fromDelta: "+c[f])}}if(u!=o.length)throw new Error("Delta length ("+u+") does not equal source text length ("+o.length+").");return l},e.prototype.match_main=function(o,s,l){if(o==null||s==null||l==null)throw new Error("Null input. (match_main)");return l=Math.max(0,Math.min(l,o.length)),o==s?0:o.length?o.substring(l,l+s.length)==s?l:this.match_bitap_(o,s,l):-1},e.prototype.match_bitap_=function(o,s,l){if(s.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(s),u=this;function c(k,C){var Q=k/s.length,D=Math.abs(l-C);return u.Match_Distance?Q+D/u.Match_Distance:D?1:Q}var f=this.Match_Threshold,h=o.indexOf(s,l);h!=-1&&(f=Math.min(c(0,h),f),h=o.lastIndexOf(s,l+s.length),h!=-1&&(f=Math.min(c(0,h),f)));var d=1<<s.length-1;h=-1;for(var p,g,v=s.length+o.length,O,m=0;m<s.length;m++){for(p=0,g=v;p<g;)c(m,l+g)<=f?p=g:v=g,g=Math.floor((v-p)/2+p);v=g;var y=Math.max(1,l-g+1),b=Math.min(l+g,o.length)+s.length,x=Array(b+2);x[b+1]=(1<<m)-1;for(var E=b;E>=y;E--){var T=a[o.charAt(E-1)];if(m===0?x[E]=(x[E+1]<<1|1)&T:x[E]=(x[E+1]<<1|1)&T|((O[E+1]|O[E])<<1|1)|O[E+1],x[E]&d){var w=c(m,E-1);if(w<=f)if(f=w,h=E-1,h>l)y=Math.max(1,2*l-h);else break}}if(c(m+1,l)>f)break;O=x}return h},e.prototype.match_alphabet_=function(o){for(var s={},l=0;l<o.length;l++)s[o.charAt(l)]=0;for(var l=0;l<o.length;l++)s[o.charAt(l)]|=1<<o.length-l-1;return s},e.prototype.patch_addContext_=function(o,s){if(s.length!=0){if(o.start2===null)throw Error("patch not initialized");for(var l=s.substring(o.start2,o.start2+o.length1),a=0;s.indexOf(l)!=s.lastIndexOf(l)&&l.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)a+=this.Patch_Margin,l=s.substring(o.start2-a,o.start2+o.length1+a);a+=this.Patch_Margin;var u=s.substring(o.start2-a,o.start2);u&&o.diffs.unshift(new e.Diff(i,u));var c=s.substring(o.start2+o.length1,o.start2+o.length1+a);c&&o.diffs.push(new e.Diff(i,c)),o.start1-=u.length,o.start2-=u.length,o.length1+=u.length+c.length,o.length2+=u.length+c.length}},e.prototype.patch_make=function(o,s,l){var a,u;if(typeof o=="string"&&typeof s=="string"&&typeof l>"u")a=o,u=this.diff_main(a,s,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(o&&typeof o=="object"&&typeof s>"u"&&typeof l>"u")u=o,a=this.diff_text1(u);else if(typeof o=="string"&&s&&typeof s=="object"&&typeof l>"u")a=o,u=s;else if(typeof o=="string"&&typeof s=="string"&&l&&typeof l=="object")a=o,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,d=0,p=0,g=a,v=a,O=0;O<u.length;O++){var m=u[O][0],y=u[O][1];switch(!h&&m!==i&&(f.start1=d,f.start2=p),m){case r:f.diffs[h++]=u[O],f.length2+=y.length,v=v.substring(0,p)+y+v.substring(p);break;case n:f.length1+=y.length,f.diffs[h++]=u[O],v=v.substring(0,p)+v.substring(p+y.length);break;case i:y.length<=2*this.Patch_Margin&&h&&u.length!=O+1?(f.diffs[h++]=u[O],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=v,d=p);break}m!==r&&(d+=y.length),m!==n&&(p+=y.length)}return h&&(this.patch_addContext_(f,g),c.push(f)),c},e.prototype.patch_deepCopy=function(o){for(var s=[],l=0;l<o.length;l++){var a=o[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,s[l]=u}return s},e.prototype.patch_apply=function(o,s){if(o.length==0)return[s,[]];o=this.patch_deepCopy(o);var l=this.patch_addPadding(o);s=l+s+l,this.patch_splitMax(o);for(var a=0,u=[],c=0;c<o.length;c++){var f=o[c].start2+a,h=this.diff_text1(o[c].diffs),d,p=-1;if(h.length>this.Match_MaxBits?(d=this.match_main(s,h.substring(0,this.Match_MaxBits),f),d!=-1&&(p=this.match_main(s,h.substring(h.length-this.Match_MaxBits),f+h.length-this.Match_MaxBits),(p==-1||d>=p)&&(d=-1))):d=this.match_main(s,h,f),d==-1)u[c]=!1,a-=o[c].length2-o[c].length1;else{u[c]=!0,a=d-f;var g;if(p==-1?g=s.substring(d,d+h.length):g=s.substring(d,p+this.Match_MaxBits),h==g)s=s.substring(0,d)+this.diff_text2(o[c].diffs)+s.substring(d+h.length);else{var v=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(v)/h.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(v);for(var O=0,m,y=0;y<o[c].diffs.length;y++){var b=o[c].diffs[y];b[0]!==i&&(m=this.diff_xIndex(v,O)),b[0]===r?s=s.substring(0,d+m)+b[1]+s.substring(d+m):b[0]===n&&(s=s.substring(0,d+m)+s.substring(d+this.diff_xIndex(v,O+b[1].length))),b[0]!==n&&(O+=b[1].length)}}}}}return s=s.substring(l.length,s.length-l.length),[s,u]},e.prototype.patch_addPadding=function(o){for(var s=this.Patch_Margin,l="",a=1;a<=s;a++)l+=String.fromCharCode(a);for(var a=0;a<o.length;a++)o[a].start1+=s,o[a].start2+=s;var u=o[0],c=u.diffs;if(c.length==0||c[0][0]!=i)c.unshift(new e.Diff(i,l)),u.start1-=s,u.start2-=s,u.length1+=s,u.length2+=s;else if(s>c[0][1].length){var f=s-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=o[o.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=i)c.push(new e.Diff(i,l)),u.length1+=s,u.length2+=s;else if(s>c[c.length-1][1].length){var f=s-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(o){for(var s=this.Match_MaxBits,l=0;l<o.length;l++)if(!(o[l].length1<=s)){var a=o[l];o.splice(l--,1);for(var u=a.start1,c=a.start2,f="";a.diffs.length!==0;){var h=new e.patch_obj,d=!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<s-this.Patch_Margin;){var p=a.diffs[0][0],g=a.diffs[0][1];p===r?(h.length2+=g.length,c+=g.length,h.diffs.push(a.diffs.shift()),d=!1):p===n&&h.diffs.length==1&&h.diffs[0][0]==i&&g.length>2*s?(h.length1+=g.length,u+=g.length,d=!1,h.diffs.push(new e.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,s-h.length1-this.Patch_Margin),h.length1+=g.length,u+=g.length,p===i?(h.length2+=g.length,c+=g.length):d=!1,h.diffs.push(new e.Diff(p,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 v=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);v!==""&&(h.length1+=v.length,h.length2+=v.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===i?h.diffs[h.diffs.length-1][1]+=v:h.diffs.push(new e.Diff(i,v))),d||o.splice(++l,0,h)}}},e.prototype.patch_toText=function(o){for(var s=[],l=0;l<o.length;l++)s[l]=o[l];return s.join("")},e.prototype.patch_fromText=function(o){var s=[];if(!o)return s;for(var l=o.split(`
97
- `),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(s.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 d=decodeURI(l[a].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+d)}if(h=="-")f.diffs.push(new e.Diff(n,d));else if(h=="+")f.diffs.push(new e.Diff(r,d));else if(h==" ")f.diffs.push(new e.Diff(i,d));else{if(h=="@")break;if(h!=="")throw new Error('Invalid patch mode "'+h+'" in: '+d)}a++}}return s},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 o,s;this.length1===0?o=this.start1+",0":this.length1==1?o=this.start1+1:o=this.start1+1+","+this.length1,this.length2===0?s=this.start2+",0":this.length2==1?s=this.start2+1:s=this.start2+1+","+this.length2;for(var l=["@@ -"+o+" +"+s+` @@
98
- `],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])+`
99
- `}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})(yT);var hW=yT.exports;const dW=Uo(hW),pW=(t,e)=>fW(t,e,dW,lv,AC);var vT={exports:{}};/*!
100
- Copyright (c) 2018 Jed Watson.
101
- Licensed under the MIT License (MIT), see
102
- http://jedwatson.github.io/classnames
103
- */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&r.push(l)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var a in o)e.call(o,a)&&o[a]&&r.push(a)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(vT);var gW=vT.exports;const Gt=Uo(gW),na=!!(typeof window<"u"&&window.document&&window.document.createElement);var ty=!1,ny=!1;try{var Bg={get passive(){return ty=!0},get once(){return ny=ty=!0}};na&&(window.addEventListener("test",Bg,Bg),window.removeEventListener("test",Bg,!0))}catch{}function ST(t,e,n,r){if(r&&typeof r!="boolean"&&!ny){var i=r.once,o=r.capture,s=n;!ny&&i&&(s=n.__once||function l(a){this.removeEventListener(e,l,o),n.call(this,a)},n.__once=s),t.addEventListener(e,s,ty?r:o)}t.addEventListener(e,n,r)}function zd(t){return t&&t.ownerDocument||document}function ry(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 bf;function Ak(t){if((!bf&&bf!==0||t)&&na){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),bf=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return bf}function mW(){return I.useState(null)}function OW(t){var e=I.useRef(t);return I.useEffect(function(){e.current=t},[t]),e}function bi(t){var e=OW(t);return I.useCallback(function(){return e.current&&e.current.apply(e,arguments)},[e])}var Rk=function(e){return!e||typeof e=="function"?e:function(n){e.current=n}};function yW(t,e){var n=Rk(t),r=Rk(e);return function(i){n&&n(i),r&&r(i)}}function qd(t,e){return I.useMemo(function(){return yW(t,e)},[t,e])}function vW(t){var e=I.useRef(t);return e.current=t,e}function bT(t){var e=vW(t);I.useEffect(function(){return function(){return e.current()}},[])}function SW(t){var e=zd(t);return e&&e.defaultView||window}function bW(t,e){return SW(t).getComputedStyle(t,e)}var wW=/([A-Z])/g;function kW(t){return t.replace(wW,"-$1").toLowerCase()}var PW=/^ms-/;function wf(t){return kW(t).replace(PW,"-ms-")}var xW=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function CW(t){return!!(t&&xW.test(t))}function vs(t,e){var n="",r="";if(typeof e=="string")return t.style.getPropertyValue(wf(e))||bW(t).getPropertyValue(wf(e));Object.keys(e).forEach(function(i){var o=e[i];!o&&o!==0?t.style.removeProperty(wf(i)):CW(i)?r+=i+"("+o+") ":n+=wf(i)+": "+o+";"}),r&&(n+="transform: "+r+";"),t.style.cssText+=";"+n}function ad(t,e,n,r){return ST(t,e,n,r),function(){ry(t,e,n,r)}}function EW(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 QW(t){var e=vs(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function $W(t,e,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||EW(t,"transitionend",!0)},e+n),o=ad(t,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),o()}}function wT(t,e,n,r){n==null&&(n=QW(t)||0);var i=$W(t,n,r),o=ad(t,"transitionend",e);return function(){i(),o()}}function Fg(t){t===void 0&&(t=zd());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function Dk(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}function _W(){var t=I.useRef(!0),e=I.useRef(function(){return t.current});return I.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e.current}function TW(t){var e=I.useRef(null);return I.useEffect(function(){e.current=t}),e.current}const AW="data-rr-ui-";function RW(t){return`${AW}${t}`}function DW(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const Mk=RW("modal-open");class MW{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return DW(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(vs(i,r)||"0",10)+e.scrollBarWidth}px`),i.setAttribute(Mk,""),vs(i,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(Mk),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 n0=MW,kT=I.createContext(na?window:void 0);kT.Provider;function r0(){return I.useContext(kT)}const Xg=(t,e)=>na?t==null?(e||zd()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function IW(t,e){const n=r0(),[r,i]=I.useState(()=>Xg(t,n==null?void 0:n.document));if(!r){const o=Xg(t);o&&i(o)}return I.useEffect(()=>{e&&r&&e(r)},[e,r]),I.useEffect(()=>{const o=Xg(t);o!==r&&i(o)},[t,r]),r}var NW=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",jW=typeof document<"u";const Ik=jW||NW?I.useLayoutEffect:I.useEffect;function LW({children:t,in:e,onExited:n,mountOnEnter:r,unmountOnExit:i}){const o=I.useRef(null),s=I.useRef(e),l=bi(n);I.useEffect(()=>{e?s.current=!0:l(o.current)},[e,l]);const a=qd(o,t.ref),u=I.cloneElement(t,{ref:a});return e?u:i||!s.current&&r?null:u}function VW({in:t,onTransition:e}){const n=I.useRef(null),r=I.useRef(!0),i=bi(e);return Ik(()=>{if(!n.current)return;let o=!1;return i({in:t,element:n.current,initial:r.current,isStale:()=>o}),()=>{o=!0}},[t,i]),Ik(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function BW({children:t,in:e,onExited:n,onEntered:r,transition:i}){const[o,s]=I.useState(!e);e&&o&&s(!1);const l=VW({in:!!e,onTransition:u=>{const c=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(s(!0),n==null||n(u.element)))};Promise.resolve(i(u)).then(c,f=>{throw u.in||s(!0),f})}}),a=qd(l,t.ref);return o&&!e?null:I.cloneElement(t,{ref:a})}function Nk(t,e,n){return t?ne.jsx(t,Object.assign({},n)):e?ne.jsx(BW,Object.assign({},n,{transition:e})):ne.jsx(LW,Object.assign({},n))}function FW(t){return t.code==="Escape"||t.keyCode===27}const XW=["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 WW(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let Wg;function UW(t){return Wg||(Wg=new n0({ownerDocument:t==null?void 0:t.document})),Wg}function ZW(t){const e=r0(),n=t||UW(e),r=I.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:I.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:I.useCallback(i=>{r.current.backdrop=i},[])})}const PT=I.forwardRef((t,e)=>{let{show:n=!1,role:r="dialog",className:i,style:o,children:s,backdrop:l=!0,keyboard:a=!0,onBackdropClick:u,onEscapeKeyDown:c,transition:f,runTransition:h,backdropTransition:d,runBackdropTransition:p,autoFocus:g=!0,enforceFocus:v=!0,restoreFocus:O=!0,restoreFocusOptions:m,renderDialog:y,renderBackdrop:b=ie=>ne.jsx("div",Object.assign({},ie)),manager:x,container:E,onShow:T,onHide:w=()=>{},onExit:k,onExited:C,onExiting:Q,onEnter:D,onEntering:N,onEntered:V}=t,G=WW(t,XW);const M=r0(),j=IW(E),A=ZW(x),X=_W(),z=TW(n),[pe,ae]=I.useState(!n),B=I.useRef(null);I.useImperativeHandle(e,()=>A,[A]),na&&!z&&n&&(B.current=Fg(M==null?void 0:M.document)),n&&pe&&ae(!1);const q=bi(()=>{if(A.add(),fe.current=ad(document,"keydown",W),Y.current=ad(document,"focus",()=>setTimeout(we),!0),T&&T(),g){var ie,lt;const en=Fg((ie=(lt=A.dialog)==null?void 0:lt.ownerDocument)!=null?ie:M==null?void 0:M.document);A.dialog&&en&&!Dk(A.dialog,en)&&(B.current=en,A.dialog.focus())}}),te=bi(()=>{if(A.remove(),fe.current==null||fe.current(),Y.current==null||Y.current(),O){var ie;(ie=B.current)==null||ie.focus==null||ie.focus(m),B.current=null}});I.useEffect(()=>{!n||!j||q()},[n,j,q]),I.useEffect(()=>{pe&&te()},[pe,te]),bT(()=>{te()});const we=bi(()=>{if(!v||!X()||!A.isTopModal())return;const ie=Fg(M==null?void 0:M.document);A.dialog&&ie&&!Dk(A.dialog,ie)&&A.dialog.focus()}),F=bi(ie=>{ie.target===ie.currentTarget&&(u==null||u(ie),l===!0&&w())}),W=bi(ie=>{a&&FW(ie)&&A.isTopModal()&&(c==null||c(ie),ie.defaultPrevented||w())}),Y=I.useRef(),fe=I.useRef(),Se=(...ie)=>{ae(!0),C==null||C(...ie)};if(!j)return null;const Be=Object.assign({role:r,ref:A.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},G,{style:o,className:i,tabIndex:-1});let Ie=y?y(Be):ne.jsx("div",Object.assign({},Be,{children:I.cloneElement(s,{role:"document"})}));Ie=Nk(f,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:k,onExiting:Q,onExited:Se,onEnter:D,onEntering:N,onEntered:V,children:Ie});let je=null;return l&&(je=b({ref:A.setBackdropRef,onClick:F}),je=Nk(d,p,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:je})),ne.jsx(ne.Fragment,{children:al.createPortal(ne.jsxs(ne.Fragment,{children:[je,Ie]}),j)})});PT.displayName="Modal";const YW=Object.assign(PT,{Manager:n0});function zW(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function qW(t,e){t.classList?t.classList.add(e):zW(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}var GW=Function.prototype.bind.call(Function.prototype.call,[].slice);function Xs(t,e){return GW(t.querySelectorAll(e))}function jk(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function HW(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=jk(t.className,e):t.setAttribute("class",jk(t.className&&t.className.baseVal||"",e))}const Ws={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class KW extends n0{adjustAndStore(e,n,r){const i=n.style[e];n.dataset[e]=i,vs(n,{[e]:`${parseFloat(vs(n,e))+r}px`})}restore(e,n){const r=n.dataset[e];r!==void 0&&(delete n.dataset[e],vs(n,{[e]:r}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(qW(n,"modal-open"),!e.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Xs(n,Ws.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,e.scrollBarWidth)),Xs(n,Ws.STICKY_CONTENT).forEach(o=>this.adjustAndStore(i,o,-e.scrollBarWidth)),Xs(n,Ws.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(i,o,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();HW(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Xs(n,Ws.FIXED_CONTENT).forEach(o=>this.restore(r,o)),Xs(n,Ws.STICKY_CONTENT).forEach(o=>this.restore(i,o)),Xs(n,Ws.NAVBAR_TOGGLER).forEach(o=>this.restore(i,o))}}let Ug;function JW(t){return Ug||(Ug=new KW(t)),Ug}function xT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function ud(t,e){return ud=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ud(t,e)}function eU(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ud(t,e)}var CT={exports:{}},tU="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",nU=tU,rU=nU;function ET(){}function QT(){}QT.resetWarningCache=ET;var iU=function(){function t(r,i,o,s,l,a){if(a!==rU){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:QT,resetWarningCache:ET};return n.PropTypes=n,n};CT.exports=iU();var oU=CT.exports;const Gi=Uo(oU),Lk={disabled:!1},$T=bo.createContext(null);var sU=function(e){return e.scrollTop},Xa="unmounted",is="exited",Oo="entering",ls="entered",iy="exiting",oo=function(t){eU(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,a;return o.appearStatus=null,r.in?l?(a=is,o.appearStatus=Oo):a=ls:r.unmountOnExit||r.mountOnEnter?a=Xa:a=is,o.state={status:a},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Xa?{status:is}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Oo&&s!==ls&&(o=Oo):(s===Oo||s===ls)&&(o=iy)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Oo){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:al.findDOMNode(this);s&&sU(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===is&&this.setState({status:Xa})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,a=this.props.nodeRef?[l]:[al.findDOMNode(this),l],u=a[0],c=a[1],f=this.getTimeouts(),h=l?f.appear:f.enter;if(!i&&!s||Lk.disabled){this.safeSetState({status:ls},function(){o.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Oo},function(){o.props.onEntering(u,c),o.onTransitionEnd(h,function(){o.safeSetState({status:ls},function(){o.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:al.findDOMNode(this);if(!o||Lk.disabled){this.safeSetState({status:is},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:iy},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:is},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:al.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,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===Xa)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=xT(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return bo.createElement($T.Provider,{value:null},typeof s=="function"?s(i,l):bo.cloneElement(bo.Children.only(s),l))},e}(bo.Component);oo.contextType=$T;oo.propTypes={};function Us(){}oo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Us,onEntering:Us,onEntered:Us,onExit:Us,onExiting:Us,onExited:Us};oo.UNMOUNTED=Xa;oo.EXITED=is;oo.ENTERING=Oo;oo.ENTERED=ls;oo.EXITING=iy;const lU=oo;function Vk(t,e){const n=vs(t,e)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function aU(t,e){const n=Vk(t,"transitionDuration"),r=Vk(t,"transitionDelay"),i=wT(t,o=>{o.target===t&&(i(),e(o))},n+r)}function uU(t){t.offsetHeight}function cU(t){return t&&"setState"in t?al.findDOMNode(t):t??null}const fU=bo.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,onExited:o,addEndListener:s,children:l,childRef:a,...u},c)=>{const f=I.useRef(null),h=qd(f,a),d=E=>{h(cU(E))},p=E=>T=>{E&&f.current&&E(f.current,T)},g=I.useCallback(p(t),[t]),v=I.useCallback(p(e),[e]),O=I.useCallback(p(n),[n]),m=I.useCallback(p(r),[r]),y=I.useCallback(p(i),[i]),b=I.useCallback(p(o),[o]),x=I.useCallback(p(s),[s]);return ne.jsx(lU,{ref:c,...u,onEnter:g,onEntered:O,onEntering:v,onExit:m,onExited:b,onExiting:y,addEndListener:x,nodeRef:f,children:typeof l=="function"?(E,T)=>l(E,{...T,ref:d}):bo.cloneElement(l,{ref:d})})}),hU=fU,dU={[Oo]:"show",[ls]:"show"},_T=I.forwardRef(({className:t,children:e,transitionClasses:n={},onEnter:r,...i},o)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},l=I.useCallback((a,u)=>{uU(a),r==null||r(a,u)},[r]);return ne.jsx(hU,{ref:o,addEndListener:aU,...s,onEnter:l,childRef:e.ref,children:(a,u)=>I.cloneElement(e,{...u,className:Gt("fade",t,e.props.className,dU[a],n[a])})})});_T.displayName="Fade";const TT=_T;var pU=/-(.)/g;function gU(t){return t.replace(pU,function(e,n){return n.toUpperCase()})}const mU=["xxl","xl","lg","md","sm","xs"],OU="xs",Gd=I.createContext({prefixes:{},breakpoints:mU,minBreakpoint:OU});function Bn(t,e){const{prefixes:n}=I.useContext(Gd);return t||n[e]||e}function yU(){const{breakpoints:t}=I.useContext(Gd);return t}function vU(){const{minBreakpoint:t}=I.useContext(Gd);return t}function SU(){const{dir:t}=I.useContext(Gd);return t==="rtl"}const bU=t=>t[0].toUpperCase()+gU(t).slice(1);function Hd(t,{displayName:e=bU(t),Component:n,defaultProps:r}={}){const i=I.forwardRef(({className:o,bsPrefix:s,as:l=n||"div",...a},u)=>{const c={...r,...a},f=Bn(s,t);return ne.jsx(l,{ref:u,className:Gt(o,f),...c})});return i.displayName=e,i}const wU=Hd("modal-body"),kU=I.createContext({onHide(){}}),AT=kU,RT=I.forwardRef(({bsPrefix:t,className:e,contentClassName:n,centered:r,size:i,fullscreen:o,children:s,scrollable:l,...a},u)=>{t=Bn(t,"modal");const c=`${t}-dialog`,f=typeof o=="string"?`${t}-fullscreen-${o}`:`${t}-fullscreen`;return ne.jsx("div",{...a,ref:u,className:Gt(c,e,i&&`${t}-${i}`,r&&`${c}-centered`,l&&`${c}-scrollable`,o&&f),children:ne.jsx("div",{className:Gt(`${t}-content`,n),children:s})})});RT.displayName="ModalDialog";const DT=RT,PU=Hd("modal-footer"),xU={"aria-label":Gi.string,onClick:Gi.func,variant:Gi.oneOf(["white"])},i0=I.forwardRef(({className:t,variant:e,"aria-label":n="Close",...r},i)=>ne.jsx("button",{ref:i,type:"button",className:Gt("btn-close",e&&`btn-close-${e}`,t),"aria-label":n,...r}));i0.displayName="CloseButton";i0.propTypes=xU;const CU=i0,EU=I.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:n=!1,onHide:r,children:i,...o},s)=>{const l=I.useContext(AT),a=bi(()=>{l==null||l.onHide(),r==null||r()});return ne.jsxs("div",{ref:s,...o,children:[i,n&&ne.jsx(CU,{"aria-label":t,variant:e,onClick:a})]})}),QU=EU,MT=I.forwardRef(({bsPrefix:t,className:e,closeLabel:n="Close",closeButton:r=!1,...i},o)=>(t=Bn(t,"modal-header"),ne.jsx(QU,{ref:o,...i,className:Gt(e,t),closeLabel:n,closeButton:r})));MT.displayName="ModalHeader";const $U=MT,_U=t=>I.forwardRef((e,n)=>ne.jsx("div",{...e,ref:n,className:Gt(e.className,t)})),TU=_U("h4"),AU=Hd("modal-title",{Component:TU});function RU(t){return ne.jsx(TT,{...t,timeout:null})}function DU(t){return ne.jsx(TT,{...t,timeout:null})}const IT=I.forwardRef(({bsPrefix:t,className:e,style:n,dialogClassName:r,contentClassName:i,children:o,dialogAs:s=DT,"aria-labelledby":l,"aria-describedby":a,"aria-label":u,show:c=!1,animation:f=!0,backdrop:h=!0,keyboard:d=!0,onEscapeKeyDown:p,onShow:g,onHide:v,container:O,autoFocus:m=!0,enforceFocus:y=!0,restoreFocus:b=!0,restoreFocusOptions:x,onEntered:E,onExit:T,onExiting:w,onEnter:k,onEntering:C,onExited:Q,backdropClassName:D,manager:N,...V},G)=>{const[M,j]=I.useState({}),[A,X]=I.useState(!1),z=I.useRef(!1),pe=I.useRef(!1),ae=I.useRef(null),[B,q]=mW(),te=qd(G,q),we=bi(v),F=SU();t=Bn(t,"modal");const W=I.useMemo(()=>({onHide:we}),[we]);function Y(){return N||JW({isRTL:F})}function fe(K){if(!na)return;const ue=Y().getScrollbarWidth()>0,le=K.scrollHeight>zd(K).documentElement.clientHeight;j({paddingRight:ue&&!le?Ak():void 0,paddingLeft:!ue&&le?Ak():void 0})}const Se=bi(()=>{B&&fe(B.dialog)});bT(()=>{ry(window,"resize",Se),ae.current==null||ae.current()});const Be=()=>{z.current=!0},Ie=K=>{z.current&&B&&K.target===B.dialog&&(pe.current=!0),z.current=!1},je=()=>{X(!0),ae.current=wT(B.dialog,()=>{X(!1)})},ie=K=>{K.target===K.currentTarget&&je()},lt=K=>{if(h==="static"){ie(K);return}if(pe.current||K.target!==K.currentTarget){pe.current=!1;return}v==null||v()},en=K=>{d?p==null||p(K):(K.preventDefault(),h==="static"&&je())},Xr=(K,ue)=>{K&&fe(K),k==null||k(K,ue)},xr=K=>{ae.current==null||ae.current(),T==null||T(K)},yn=(K,ue)=>{C==null||C(K,ue),ST(window,"resize",Se)},Ho=K=>{K&&(K.style.display=""),Q==null||Q(K),ry(window,"resize",Se)},Ni=I.useCallback(K=>ne.jsx("div",{...K,className:Gt(`${t}-backdrop`,D,!f&&"show")}),[f,D,t]),$={...n,...M};$.display="block";const H=K=>ne.jsx("div",{role:"dialog",...K,style:$,className:Gt(e,t,A&&`${t}-static`,!f&&"show"),onClick:h?lt:void 0,onMouseUp:Ie,"aria-label":u,"aria-labelledby":l,"aria-describedby":a,children:ne.jsx(s,{...V,onMouseDown:Be,className:r,contentClassName:i,children:o})});return ne.jsx(AT.Provider,{value:W,children:ne.jsx(YW,{show:c,ref:te,backdrop:h,container:O,keyboard:!0,autoFocus:m,enforceFocus:y,restoreFocus:b,restoreFocusOptions:x,onEscapeKeyDown:en,onShow:g,onHide:v,onEnter:Xr,onEntering:yn,onEntered:E,onExit:xr,onExiting:w,onExited:Ho,manager:Y(),transition:f?RU:void 0,backdropTransition:f?DU:void 0,renderBackdrop:Ni,renderDialog:H})})});IT.displayName="Modal";const _a=Object.assign(IT,{Body:wU,Header:$U,Title:AU,Footer:PU,Dialog:DT,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),MU={type:Gi.string,tooltip:Gi.bool,as:Gi.elementType},o0=I.forwardRef(({as:t="div",className:e,type:n="valid",tooltip:r=!1,...i},o)=>ne.jsx(t,{...i,ref:o,className:Gt(e,`${n}-${r?"tooltip":"feedback"}`)}));o0.displayName="Feedback";o0.propTypes=MU;const NT=o0,IU=I.createContext({}),ro=IU,jT=I.forwardRef(({id:t,bsPrefix:e,className:n,type:r="checkbox",isValid:i=!1,isInvalid:o=!1,as:s="input",...l},a)=>{const{controlId:u}=I.useContext(ro);return e=Bn(e,"form-check-input"),ne.jsx(s,{...l,ref:a,type:r,id:t||u,className:Gt(n,e,i&&"is-valid",o&&"is-invalid")})});jT.displayName="FormCheckInput";const LT=jT,VT=I.forwardRef(({bsPrefix:t,className:e,htmlFor:n,...r},i)=>{const{controlId:o}=I.useContext(ro);return t=Bn(t,"form-check-label"),ne.jsx("label",{...r,ref:i,htmlFor:n||o,className:Gt(e,t)})});VT.displayName="FormCheckLabel";const oy=VT;function NU(t,e){return I.Children.toArray(t).some(n=>I.isValidElement(n)&&n.type===e)}const BT=I.forwardRef(({id:t,bsPrefix:e,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:o=!1,isValid:s=!1,isInvalid:l=!1,feedbackTooltip:a=!1,feedback:u,feedbackType:c,className:f,style:h,title:d="",type:p="checkbox",label:g,children:v,as:O="input",...m},y)=>{e=Bn(e,"form-check"),n=Bn(n,"form-switch");const{controlId:b}=I.useContext(ro),x=I.useMemo(()=>({controlId:t||b}),[b,t]),E=!v&&g!=null&&g!==!1||NU(v,oy),T=ne.jsx(LT,{...m,type:p==="switch"?"checkbox":p,ref:y,isValid:s,isInvalid:l,disabled:o,as:O});return ne.jsx(ro.Provider,{value:x,children:ne.jsx("div",{style:h,className:Gt(f,E&&e,r&&`${e}-inline`,i&&`${e}-reverse`,p==="switch"&&n),children:v||ne.jsxs(ne.Fragment,{children:[T,E&&ne.jsx(oy,{title:d,children:g}),u&&ne.jsx(NT,{type:c,tooltip:a,children:u})]})})})});BT.displayName="FormCheck";const cd=Object.assign(BT,{Input:LT,Label:oy}),FT=I.forwardRef(({bsPrefix:t,type:e,size:n,htmlSize:r,id:i,className:o,isValid:s=!1,isInvalid:l=!1,plaintext:a,readOnly:u,as:c="input",...f},h)=>{const{controlId:d}=I.useContext(ro);t=Bn(t,"form-control");let p;return a?p={[`${t}-plaintext`]:!0}:p={[t]:!0,[`${t}-${n}`]:n},ne.jsx(c,{...f,type:e,size:r,ref:h,readOnly:u,id:i||d,className:Gt(o,p,s&&"is-valid",l&&"is-invalid",e==="color"&&`${t}-color`)})});FT.displayName="FormControl";const jU=Object.assign(FT,{Feedback:NT}),LU=Hd("form-floating"),XT=I.forwardRef(({controlId:t,as:e="div",...n},r)=>{const i=I.useMemo(()=>({controlId:t}),[t]);return ne.jsx(ro.Provider,{value:i,children:ne.jsx(e,{...n,ref:r})})});XT.displayName="FormGroup";const WT=XT;function VU({as:t,bsPrefix:e,className:n,...r}){e=Bn(e,"col");const i=yU(),o=vU(),s=[],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 d=a!==o?`-${a}`:"";c&&s.push(c===!0?`${e}${d}`:`${e}${d}-${c}`),h!=null&&l.push(`order${d}-${h}`),f!=null&&l.push(`offset${d}-${f}`)}),[{...r,className:Gt(n,...s,...l)},{as:t,bsPrefix:e,spans:s}]}const UT=I.forwardRef((t,e)=>{const[{className:n,...r},{as:i="div",bsPrefix:o,spans:s}]=VU(t);return ne.jsx(i,{...r,ref:e,className:Gt(n,!s.length&&o)})});UT.displayName="Col";const BU=UT,ZT=I.forwardRef(({as:t="label",bsPrefix:e,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:o,...s},l)=>{const{controlId:a}=I.useContext(ro);e=Bn(e,"form-label");let u="col-form-label";typeof n=="string"&&(u=`${u} ${u}-${n}`);const c=Gt(i,e,r&&"visually-hidden",n&&u);return o=o||a,n?ne.jsx(BU,{ref:l,as:"label",className:c,htmlFor:o,...s}):ne.jsx(t,{ref:l,className:c,htmlFor:o,...s})});ZT.displayName="FormLabel";const FU=ZT,YT=I.forwardRef(({bsPrefix:t,className:e,id:n,...r},i)=>{const{controlId:o}=I.useContext(ro);return t=Bn(t,"form-range"),ne.jsx("input",{...r,type:"range",ref:i,className:Gt(e,t),id:n||o})});YT.displayName="FormRange";const XU=YT,zT=I.forwardRef(({bsPrefix:t,size:e,htmlSize:n,className:r,isValid:i=!1,isInvalid:o=!1,id:s,...l},a)=>{const{controlId:u}=I.useContext(ro);return t=Bn(t,"form-select"),ne.jsx("select",{...l,size:n,ref:a,className:Gt(r,t,e&&`${t}-${e}`,i&&"is-valid",o&&"is-invalid"),id:s||u})});zT.displayName="FormSelect";const WU=zT,qT=I.forwardRef(({bsPrefix:t,className:e,as:n="small",muted:r,...i},o)=>(t=Bn(t,"form-text"),ne.jsx(n,{...i,ref:o,className:Gt(e,t,r&&"text-muted")})));qT.displayName="FormText";const UU=qT,GT=I.forwardRef((t,e)=>ne.jsx(cd,{...t,ref:e,type:"switch"}));GT.displayName="Switch";const ZU=Object.assign(GT,{Input:cd.Input,Label:cd.Label}),HT=I.forwardRef(({bsPrefix:t,className:e,children:n,controlId:r,label:i,...o},s)=>(t=Bn(t,"form-floating"),ne.jsxs(WT,{ref:s,className:Gt(e,t),controlId:r,...o,children:[n,ne.jsx("label",{htmlFor:r,children:i})]})));HT.displayName="FloatingLabel";const YU=HT,zU={_ref:Gi.any,validated:Gi.bool,as:Gi.elementType},s0=I.forwardRef(({className:t,validated:e,as:n="form",...r},i)=>ne.jsx(n,{...r,ref:i,className:Gt(t,e&&"was-validated")}));s0.displayName="Form";s0.propTypes=zU;const di=Object.assign(s0,{Group:WT,Control:jU,Floating:LU,Check:cd,Switch:ZU,Label:FU,Text:UU,Range:XU,Select:WU,FloatingLabel:YU}),qU=["as","disabled"];function GU(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function HU(t){return!t||t.trim()==="#"}function KT({tagName:t,disabled:e,href:n,target:r,rel:i,role:o,onClick:s,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"&&HU(n))&&h.preventDefault(),e){h.stopPropagation();return}s==null||s(h)},f=h=>{h.key===" "&&(h.preventDefault(),c(h))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:o??"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 KU=I.forwardRef((t,e)=>{let{as:n,disabled:r}=t,i=GU(t,qU);const[o,{tagName:s}]=KT(Object.assign({tagName:n,disabled:r},i));return ne.jsx(s,Object.assign({},i,o,{ref:e}))});KU.displayName="Button";const JT=I.forwardRef(({as:t,bsPrefix:e,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:s,...l},a)=>{const u=Bn(e,"btn"),[c,{tagName:f}]=KT({tagName:t,disabled:o,...l}),h=f;return ne.jsx(h,{...c,...l,ref:a,disabled:o,className:Gt(s,u,i&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&o&&"disabled")})});JT.displayName="Button";const JU=JT;function Qs(t){"@babel/helpers - typeof";return Qs=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},Qs(t)}function eZ(t,e){if(Qs(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Qs(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function eA(t){var e=eZ(t,"string");return Qs(e)==="symbol"?e:String(e)}function Wa(t,e,n){return e=eA(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bk(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 Fe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bk(Object(n),!0).forEach(function(r){Wa(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function tZ(t){if(Array.isArray(t))return t}function nZ(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,l=[],a=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.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&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function sy(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 tA(t,e){if(t){if(typeof t=="string")return sy(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 sy(t,e)}}function rZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
104
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hi(t,e){return tZ(t)||nZ(t,e)||tA(t,e)||rZ()}function so(t,e){if(t==null)return{};var n=xT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var iZ=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function oZ(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,i=r===void 0?!1:r,o=t.defaultValue,s=o===void 0?null:o,l=t.inputValue,a=t.menuIsOpen,u=t.onChange,c=t.onInputChange,f=t.onMenuClose,h=t.onMenuOpen,d=t.value,p=so(t,iZ),g=I.useState(l!==void 0?l:n),v=Hi(g,2),O=v[0],m=v[1],y=I.useState(a!==void 0?a:i),b=Hi(y,2),x=b[0],E=b[1],T=I.useState(d!==void 0?d:s),w=Hi(T,2),k=w[0],C=w[1],Q=I.useCallback(function(A,X){typeof u=="function"&&u(A,X),C(A)},[u]),D=I.useCallback(function(A,X){var z;typeof c=="function"&&(z=c(A,X)),m(z!==void 0?z:A)},[c]),N=I.useCallback(function(){typeof h=="function"&&h(),E(!0)},[h]),V=I.useCallback(function(){typeof f=="function"&&f(),E(!1)},[f]),G=l!==void 0?l:O,M=a!==void 0?a:x,j=d!==void 0?d:k;return Fe(Fe({},p),{},{inputValue:G,menuIsOpen:M,onChange:Q,onInputChange:D,onMenuClose:V,onMenuOpen:N,value:j})}function sZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fk(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,eA(r.key),r)}}function lZ(t,e,n){return e&&Fk(t.prototype,e),n&&Fk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function aZ(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&&ud(t,e)}function fd(t){return fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fd(t)}function uZ(){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 cZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fZ(t,e){if(e&&(Qs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cZ(t)}function hZ(t){var e=uZ();return function(){var r=fd(t),i;if(e){var o=fd(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return fZ(this,i)}}function dZ(t){if(Array.isArray(t))return sy(t)}function pZ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function gZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
105
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nA(t){return dZ(t)||pZ(t)||tA(t)||gZ()}function mZ(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 OZ(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 yZ=function(){function t(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),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(OZ(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=mZ(i);try{o.insertRule(r,o.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}(),In="-ms-",hd="-moz-",gt="-webkit-",rA="comm",l0="rule",a0="decl",vZ="@import",iA="@keyframes",SZ=Math.abs,Kd=String.fromCharCode,bZ=Object.assign;function wZ(t,e){return xn(t,0)^45?(((e<<2^xn(t,0))<<2^xn(t,1))<<2^xn(t,2))<<2^xn(t,3):0}function oA(t){return t.trim()}function kZ(t,e){return(t=e.exec(t))?t[0]:t}function Ot(t,e,n){return t.replace(e,n)}function ly(t,e){return t.indexOf(e)}function xn(t,e){return t.charCodeAt(e)|0}function Wu(t,e,n){return t.slice(e,n)}function Oi(t){return t.length}function u0(t){return t.length}function kf(t,e){return e.push(t),t}function PZ(t,e){return t.map(e).join("")}var Jd=1,zl=1,sA=0,lr=0,sn=0,ra="";function ep(t,e,n,r,i,o,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Jd,column:zl,length:s,return:""}}function Ta(t,e){return bZ(ep("",null,null,"",null,null,0),t,{length:-t.length},e)}function xZ(){return sn}function CZ(){return sn=lr>0?xn(ra,--lr):0,zl--,sn===10&&(zl=1,Jd--),sn}function Sr(){return sn=lr<sA?xn(ra,lr++):0,zl++,sn===10&&(zl=1,Jd++),sn}function _i(){return xn(ra,lr)}function eh(){return lr}function fc(t,e){return Wu(ra,t,e)}function Uu(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 lA(t){return Jd=zl=1,sA=Oi(ra=t),lr=0,[]}function aA(t){return ra="",t}function th(t){return oA(fc(lr-1,ay(t===91?t+2:t===40?t+1:t)))}function EZ(t){for(;(sn=_i())&&sn<33;)Sr();return Uu(t)>2||Uu(sn)>3?"":" "}function QZ(t,e){for(;--e&&Sr()&&!(sn<48||sn>102||sn>57&&sn<65||sn>70&&sn<97););return fc(t,eh()+(e<6&&_i()==32&&Sr()==32))}function ay(t){for(;Sr();)switch(sn){case t:return lr;case 34:case 39:t!==34&&t!==39&&ay(sn);break;case 40:t===41&&ay(t);break;case 92:Sr();break}return lr}function $Z(t,e){for(;Sr()&&t+sn!==47+10;)if(t+sn===42+42&&_i()===47)break;return"/*"+fc(e,lr-1)+"*"+Kd(t===47?t:Sr())}function _Z(t){for(;!Uu(_i());)Sr();return fc(t,lr)}function TZ(t){return aA(nh("",null,null,null,[""],t=lA(t),0,[0],t))}function nh(t,e,n,r,i,o,s,l,a){for(var u=0,c=0,f=s,h=0,d=0,p=0,g=1,v=1,O=1,m=0,y="",b=i,x=o,E=r,T=y;v;)switch(p=m,m=Sr()){case 40:if(p!=108&&xn(T,f-1)==58){ly(T+=Ot(th(m),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:T+=th(m);break;case 9:case 10:case 13:case 32:T+=EZ(p);break;case 92:T+=QZ(eh()-1,7);continue;case 47:switch(_i()){case 42:case 47:kf(AZ($Z(Sr(),eh()),e,n),a);break;default:T+="/"}break;case 123*g:l[u++]=Oi(T)*O;case 125*g:case 59:case 0:switch(m){case 0:case 125:v=0;case 59+c:d>0&&Oi(T)-f&&kf(d>32?Wk(T+";",r,n,f-1):Wk(Ot(T," ","")+";",r,n,f-2),a);break;case 59:T+=";";default:if(kf(E=Xk(T,e,n,u,c,i,l,y,b=[],x=[],f),o),m===123)if(c===0)nh(T,e,E,E,b,o,f,l,x);else switch(h===99&&xn(T,3)===110?100:h){case 100:case 109:case 115:nh(t,E,E,r&&kf(Xk(t,E,E,0,0,i,l,y,i,b=[],f),x),i,x,f,l,r?b:x);break;default:nh(T,E,E,E,[""],x,0,l,x)}}u=c=d=0,g=O=1,y=T="",f=s;break;case 58:f=1+Oi(T),d=p;default:if(g<1){if(m==123)--g;else if(m==125&&g++==0&&CZ()==125)continue}switch(T+=Kd(m),m*g){case 38:O=c>0?1:(T+="\f",-1);break;case 44:l[u++]=(Oi(T)-1)*O,O=1;break;case 64:_i()===45&&(T+=th(Sr())),h=_i(),c=f=Oi(y=T+=_Z(eh())),m++;break;case 45:p===45&&Oi(T)==2&&(g=0)}}return o}function Xk(t,e,n,r,i,o,s,l,a,u,c){for(var f=i-1,h=i===0?o:[""],d=u0(h),p=0,g=0,v=0;p<r;++p)for(var O=0,m=Wu(t,f+1,f=SZ(g=s[p])),y=t;O<d;++O)(y=oA(g>0?h[O]+" "+m:Ot(m,/&\f/g,h[O])))&&(a[v++]=y);return ep(t,e,n,i===0?l0:l,a,u,c)}function AZ(t,e,n){return ep(t,e,n,rA,Kd(xZ()),Wu(t,2,-2),0)}function Wk(t,e,n,r){return ep(t,e,n,a0,Wu(t,0,r),Wu(t,r+1,-1),r)}function Cl(t,e){for(var n="",r=u0(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function RZ(t,e,n,r){switch(t.type){case vZ:case a0:return t.return=t.return||t.value;case rA:return"";case iA:return t.return=t.value+"{"+Cl(t.children,r)+"}";case l0:t.value=t.props.join(",")}return Oi(n=Cl(t.children,r))?t.return=t.value+"{"+n+"}":""}function DZ(t){var e=u0(t);return function(n,r,i,o){for(var s="",l=0;l<e;l++)s+=t[l](n,r,i,o)||"";return s}}function MZ(t){return function(e){e.root||(e=e.return)&&t(e)}}function IZ(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var NZ=function(e,n,r){for(var i=0,o=0;i=o,o=_i(),i===38&&o===12&&(n[r]=1),!Uu(o);)Sr();return fc(e,lr)},jZ=function(e,n){var r=-1,i=44;do switch(Uu(i)){case 0:i===38&&_i()===12&&(n[r]=1),e[r]+=NZ(lr-1,n,r);break;case 2:e[r]+=th(i);break;case 4:if(i===44){e[++r]=_i()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=Kd(i)}while(i=Sr());return e},LZ=function(e,n){return aA(jZ(lA(e),n))},Uk=new WeakMap,VZ=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&&!Uk.get(r))&&!i){Uk.set(e,!0);for(var o=[],s=LZ(n,o),l=r.props,a=0,u=0;a<s.length;a++)for(var c=0;c<l.length;c++,u++)e.props[u]=o[a]?s[a].replace(/&\f/g,l[c]):l[c]+" "+s[a]}}},BZ=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function uA(t,e){switch(wZ(t,e)){case 5103:return gt+"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 gt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return gt+t+hd+t+In+t+t;case 6828:case 4268:return gt+t+In+t+t;case 6165:return gt+t+In+"flex-"+t+t;case 5187:return gt+t+Ot(t,/(\w+).+(:[^]+)/,gt+"box-$1$2"+In+"flex-$1$2")+t;case 5443:return gt+t+In+"flex-item-"+Ot(t,/flex-|-self/,"")+t;case 4675:return gt+t+In+"flex-line-pack"+Ot(t,/align-content|flex-|-self/,"")+t;case 5548:return gt+t+In+Ot(t,"shrink","negative")+t;case 5292:return gt+t+In+Ot(t,"basis","preferred-size")+t;case 6060:return gt+"box-"+Ot(t,"-grow","")+gt+t+In+Ot(t,"grow","positive")+t;case 4554:return gt+Ot(t,/([^-])(transform)/g,"$1"+gt+"$2")+t;case 6187:return Ot(Ot(Ot(t,/(zoom-|grab)/,gt+"$1"),/(image-set)/,gt+"$1"),t,"")+t;case 5495:case 3959:return Ot(t,/(image-set\([^]*)/,gt+"$1$`$1");case 4968:return Ot(Ot(t,/(.+:)(flex-)?(.*)/,gt+"box-pack:$3"+In+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gt+t+t;case 4095:case 3583:case 4068:case 2532:return Ot(t,/(.+)-inline(.+)/,gt+"$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(Oi(t)-1-e>6)switch(xn(t,e+1)){case 109:if(xn(t,e+4)!==45)break;case 102:return Ot(t,/(.+:)(.+)-([^]+)/,"$1"+gt+"$2-$3$1"+hd+(xn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~ly(t,"stretch")?uA(Ot(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(xn(t,e+1)!==115)break;case 6444:switch(xn(t,Oi(t)-3-(~ly(t,"!important")&&10))){case 107:return Ot(t,":",":"+gt)+t;case 101:return Ot(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gt+(xn(t,14)===45?"inline-":"")+"box$3$1"+gt+"$2$3$1"+In+"$2box$3")+t}break;case 5936:switch(xn(t,e+11)){case 114:return gt+t+In+Ot(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return gt+t+In+Ot(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return gt+t+In+Ot(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return gt+t+In+t+t}return t}var FZ=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case a0:e.return=uA(e.value,e.length);break;case iA:return Cl([Ta(e,{value:Ot(e.value,"@","@"+gt)})],i);case l0:if(e.length)return PZ(e.props,function(o){switch(kZ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cl([Ta(e,{props:[Ot(o,/:(read-\w+)/,":"+hd+"$1")]})],i);case"::placeholder":return Cl([Ta(e,{props:[Ot(o,/:(plac\w+)/,":"+gt+"input-$1")]}),Ta(e,{props:[Ot(o,/:(plac\w+)/,":"+hd+"$1")]}),Ta(e,{props:[Ot(o,/:(plac\w+)/,In+"input-$1")]})],i)}return""})}},XZ=[FZ],WZ=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 v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||XZ,o={},s,l=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),O=1;O<v.length;O++)o[v[O]]=!0;l.push(g)});var a,u=[VZ,BZ];{var c,f=[RZ,MZ(function(g){c.insert(g)})],h=DZ(u.concat(i,f)),d=function(v){return Cl(TZ(v),h)};a=function(v,O,m,y){c=m,d(v?v+"{"+O.styles+"}":O.styles),y&&(p.inserted[O.name]=!0)}}var p={key:n,sheet:new yZ({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:a};return p.sheet.hydrate(l),p},cA={exports:{}},bt={};/** @license React v16.13.1
106
- * react-is.production.min.js
107
- *
108
- * Copyright (c) Facebook, Inc. and its affiliates.
109
- *
110
- * This source code is licensed under the MIT license found in the
111
- * LICENSE file in the root directory of this source tree.
112
- */var wn=typeof Symbol=="function"&&Symbol.for,c0=wn?Symbol.for("react.element"):60103,f0=wn?Symbol.for("react.portal"):60106,tp=wn?Symbol.for("react.fragment"):60107,np=wn?Symbol.for("react.strict_mode"):60108,rp=wn?Symbol.for("react.profiler"):60114,ip=wn?Symbol.for("react.provider"):60109,op=wn?Symbol.for("react.context"):60110,h0=wn?Symbol.for("react.async_mode"):60111,sp=wn?Symbol.for("react.concurrent_mode"):60111,lp=wn?Symbol.for("react.forward_ref"):60112,ap=wn?Symbol.for("react.suspense"):60113,UZ=wn?Symbol.for("react.suspense_list"):60120,up=wn?Symbol.for("react.memo"):60115,cp=wn?Symbol.for("react.lazy"):60116,ZZ=wn?Symbol.for("react.block"):60121,YZ=wn?Symbol.for("react.fundamental"):60117,zZ=wn?Symbol.for("react.responder"):60118,qZ=wn?Symbol.for("react.scope"):60119;function Pr(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case c0:switch(t=t.type,t){case h0:case sp:case tp:case rp:case np:case ap:return t;default:switch(t=t&&t.$$typeof,t){case op:case lp:case cp:case up:case ip:return t;default:return e}}case f0:return e}}}function fA(t){return Pr(t)===sp}bt.AsyncMode=h0;bt.ConcurrentMode=sp;bt.ContextConsumer=op;bt.ContextProvider=ip;bt.Element=c0;bt.ForwardRef=lp;bt.Fragment=tp;bt.Lazy=cp;bt.Memo=up;bt.Portal=f0;bt.Profiler=rp;bt.StrictMode=np;bt.Suspense=ap;bt.isAsyncMode=function(t){return fA(t)||Pr(t)===h0};bt.isConcurrentMode=fA;bt.isContextConsumer=function(t){return Pr(t)===op};bt.isContextProvider=function(t){return Pr(t)===ip};bt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===c0};bt.isForwardRef=function(t){return Pr(t)===lp};bt.isFragment=function(t){return Pr(t)===tp};bt.isLazy=function(t){return Pr(t)===cp};bt.isMemo=function(t){return Pr(t)===up};bt.isPortal=function(t){return Pr(t)===f0};bt.isProfiler=function(t){return Pr(t)===rp};bt.isStrictMode=function(t){return Pr(t)===np};bt.isSuspense=function(t){return Pr(t)===ap};bt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===tp||t===sp||t===rp||t===np||t===ap||t===UZ||typeof t=="object"&&t!==null&&(t.$$typeof===cp||t.$$typeof===up||t.$$typeof===ip||t.$$typeof===op||t.$$typeof===lp||t.$$typeof===YZ||t.$$typeof===zZ||t.$$typeof===qZ||t.$$typeof===ZZ)};bt.typeOf=Pr;cA.exports=bt;var GZ=cA.exports,hA=GZ,HZ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},KZ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},dA={};dA[hA.ForwardRef]=HZ;dA[hA.Memo]=KZ;var JZ=!0;function e8(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var pA=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||JZ===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},t8=function(e,n,r){pA(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function n8(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 r8={animationIterationCount: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},i8=/[A-Z]|^ms/g,o8=/_EMO_([^_]+?)_([^]*?)_EMO_/g,gA=function(e){return e.charCodeAt(1)===45},Zk=function(e){return e!=null&&typeof e!="boolean"},Zg=IZ(function(t){return gA(t)?t:t.replace(i8,"-$&").toLowerCase()}),Yk=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(o8,function(r,i,o){return yi={name:i,styles:o,next:yi},i})}return r8[e]!==1&&!gA(e)&&typeof n=="number"&&n!==0?n+"px":n};function Zu(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 yi={name:n.name,styles:n.styles,next:yi},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)yi={name:r.name,styles:r.styles,next:yi},r=r.next;var i=n.styles+";";return i}return s8(t,e,n)}case"function":{if(t!==void 0){var o=yi,s=n(t);return yi=o,Zu(t,e,s)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function s8(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Zu(t,e,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object")e!=null&&e[s]!==void 0?r+=o+"{"+e[s]+"}":Zk(s)&&(r+=Zg(o)+":"+Yk(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)Zk(s[l])&&(r+=Zg(o)+":"+Yk(o,s[l])+";");else{var a=Zu(t,e,s);switch(o){case"animation":case"animationName":{r+=Zg(o)+":"+a+";";break}default:r+=o+"{"+a+"}"}}}return r}var zk=/label:\s*([^\s;\n{]+)\s*(;|$)/g,yi,mA=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,o="";yi=void 0;var s=e[0];s==null||s.raw===void 0?(i=!1,o+=Zu(r,n,s)):o+=s[0];for(var l=1;l<e.length;l++)o+=Zu(r,n,e[l]),i&&(o+=s[l]);zk.lastIndex=0;for(var a="",u;(u=zk.exec(o))!==null;)a+="-"+u[1];var c=n8(o)+a;return{name:c,styles:o,next:yi}},l8=function(e){return e()},a8=k1["useInsertionEffect"]?k1["useInsertionEffect"]:!1,u8=a8||l8,d0={}.hasOwnProperty,OA=I.createContext(typeof HTMLElement<"u"?WZ({key:"css"}):null);OA.Provider;var c8=function(e){return I.forwardRef(function(n,r){var i=I.useContext(OA);return e(n,i,r)})},f8=I.createContext({}),uy="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",h8=function(e,n){var r={};for(var i in n)d0.call(n,i)&&(r[i]=n[i]);return r[uy]=e,r},d8=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return pA(n,r,i),u8(function(){return t8(n,r,i)}),null},p8=c8(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[uy],o=[r],s="";typeof t.className=="string"?s=e8(e.registered,o,t.className):t.className!=null&&(s=t.className+" ");var l=mA(o,void 0,I.useContext(f8));s+=e.key+"-"+l.name;var a={};for(var u in t)d0.call(t,u)&&u!=="css"&&u!==uy&&(a[u]=t[u]);return a.ref=n,a.className=s,I.createElement(I.Fragment,null,I.createElement(d8,{cache:e,serialized:l,isStringTag:typeof i=="string"}),I.createElement(i,a))}),We=function(e,n){var r=arguments;if(n==null||!d0.call(n,"css"))return I.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=p8,o[1]=h8(e,n);for(var s=2;s<i;s++)o[s]=r[s];return I.createElement.apply(null,o)};function p0(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return mA(e)}var g8=function(){var e=p0.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 m8(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function O8(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}const y8=["top","right","bottom","left"];y8.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);function xi(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function yA(t){return xi(t).getComputedStyle(t)}function vA(t){return t instanceof xi(t).Node}function SA(t){return vA(t)?(t.nodeName||"").toLowerCase():""}let Pf;function v8(){if(Pf)return Pf;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(Pf=t.brands.map(e=>e.brand+"/"+e.version).join(" "),Pf):navigator.userAgent}function g0(t){return t instanceof xi(t).HTMLElement}function El(t){return t instanceof xi(t).Element}function qk(t){return typeof ShadowRoot>"u"?!1:t instanceof xi(t).ShadowRoot||t instanceof ShadowRoot}function bA(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=yA(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function S8(){return/^((?!chrome|android).)*safari/i.test(v8())}function b8(t){return["html","body","#document"].includes(SA(t))}const dd=Math.round;function w8(t){const e=yA(t);let n=parseFloat(e.width),r=parseFloat(e.height);const i=g0(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,l=dd(n)!==o||dd(r)!==s;return l&&(n=o,r=s),{width:n,height:r,fallback:l}}function wA(t){return El(t)?t:t.contextElement}const kA={x:1,y:1};function Yg(t){const e=wA(t);if(!g0(e))return kA;const n=e.getBoundingClientRect(),{width:r,height:i,fallback:o}=w8(e);let s=(o?dd(n.width):n.width)/r,l=(o?dd(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}function Gk(t,e,n,r){var i,o;e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),l=wA(t);let a=kA;e&&(r?El(r)&&(a=Yg(r)):a=Yg(t));const u=l?xi(l):window,c=S8()&&n;let f=(s.left+(c&&((i=u.visualViewport)==null?void 0:i.offsetLeft)||0))/a.x,h=(s.top+(c&&((o=u.visualViewport)==null?void 0:o.offsetTop)||0))/a.y,d=s.width/a.x,p=s.height/a.y;if(l){const g=xi(l),v=r&&El(r)?xi(r):r;let O=g.frameElement;for(;O&&r&&v!==g;){const m=Yg(O),y=O.getBoundingClientRect(),b=getComputedStyle(O);y.x+=(O.clientLeft+parseFloat(b.paddingLeft))*m.x,y.y+=(O.clientTop+parseFloat(b.paddingTop))*m.y,f*=m.x,h*=m.y,d*=m.x,p*=m.y,f+=y.x,h+=y.y,O=xi(O).frameElement}}return O8({width:d,height:p,x:f,y:h})}function k8(t){return((vA(t)?t.ownerDocument:t.document)||window.document).documentElement}function P8(t){if(SA(t)==="html")return t;const e=t.assignedSlot||t.parentNode||qk(t)&&t.host||k8(t);return qk(e)?e.host:e}function PA(t){const e=P8(t);return b8(e)?e.ownerDocument.body:g0(e)&&bA(e)?e:PA(e)}function rh(t,e){var n;e===void 0&&(e=[]);const r=PA(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=xi(r);return i?e.concat(o,o.visualViewport||[],bA(r)?r:[]):e.concat(r,rh(r))}function x8(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:l=!1}=r,a=i&&!l,u=a||o?[...El(t)?rh(t):t.contextElement?rh(t.contextElement):[],...rh(e)]:[];u.forEach(d=>{a&&d.addEventListener("scroll",n,{passive:!0}),o&&d.addEventListener("resize",n)});let c,f=null;if(s){let d=!0;f=new ResizeObserver(()=>{d||n(),d=!1}),El(t)&&!l&&f.observe(t),El(t)||!t.contextElement||l||f.observe(t.contextElement),f.observe(e)}let h=l?Gk(t):null;return l&&function d(){const p=Gk(t);!h||p.x===h.x&&p.y===h.y&&p.width===h.width&&p.height===h.height||n(),h=p,c=requestAnimationFrame(d)}(),n(),()=>{var d;u.forEach(p=>{a&&p.removeEventListener("scroll",n),o&&p.removeEventListener("resize",n)}),(d=f)==null||d.disconnect(),f=null,l&&cancelAnimationFrame(c)}}var cy=I.useLayoutEffect,C8=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],pd=function(){};function E8(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function Q8(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 o=[].concat(r);if(e&&t)for(var s in e)e.hasOwnProperty(s)&&e[s]&&o.push("".concat(E8(t,s)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Hk=function(e){return N8(e)?e.filter(Boolean):Qs(e)==="object"&&e!==null?[e]:[]},xA=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=so(e,C8);return Fe({},n)},Jt=function(e,n,r){var i=e.cx,o=e.getStyles,s=e.getClassNames,l=e.className;return{css:o(n,e),className:i(r??{},s(n,e),l)}};function fp(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function $8(t){return fp(t)?window.innerHeight:t.clientHeight}function CA(t){return fp(t)?window.pageYOffset:t.scrollTop}function gd(t,e){if(fp(t)){window.scrollTo(0,e);return}t.scrollTop=e}function _8(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 T8(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function xf(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:pd,i=CA(t),o=e-i,s=10,l=0;function a(){l+=s;var u=T8(l,i,o,n);gd(t,u),l<n?window.requestAnimationFrame(a):r(t)}a()}function Kk(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?gd(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&gd(t,Math.max(e.offsetTop-i,0))}function A8(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 Jk(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function R8(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var EA=!1,D8={get passive(){return EA=!0}},Cf=typeof window<"u"?window:{};Cf.addEventListener&&Cf.removeEventListener&&(Cf.addEventListener("p",pd,D8),Cf.removeEventListener("p",pd,!1));var M8=EA;function I8(t){return t!=null}function N8(t){return Array.isArray(t)}function Ef(t,e,n){return t?e:n}var j8=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 o=Object.entries(e).filter(function(s){var l=Hi(s,1),a=l[0];return!r.includes(a)});return o.reduce(function(s,l){var a=Hi(l,2),u=a[0],c=a[1];return s[u]=c,s},{})},L8=["children","innerProps"],V8=["children","innerProps"];function B8(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,o=t.shouldScroll,s=t.isFixedPosition,l=t.controlHeight,a=_8(n),u={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return u;var c=a.getBoundingClientRect(),f=c.height,h=n.getBoundingClientRect(),d=h.bottom,p=h.height,g=h.top,v=n.offsetParent.getBoundingClientRect(),O=v.top,m=s?window.innerHeight:$8(a),y=CA(a),b=parseInt(getComputedStyle(n).marginBottom,10),x=parseInt(getComputedStyle(n).marginTop,10),E=O-x,T=m-g,w=E+y,k=f-y-g,C=d-m+y+b,Q=y+g-x,D=160;switch(i){case"auto":case"bottom":if(T>=p)return{placement:"bottom",maxHeight:e};if(k>=p&&!s)return o&&xf(a,C,D),{placement:"bottom",maxHeight:e};if(!s&&k>=r||s&&T>=r){o&&xf(a,C,D);var N=s?T-b:k-b;return{placement:"bottom",maxHeight:N}}if(i==="auto"||s){var V=e,G=s?E:w;return G>=r&&(V=Math.min(G-b-l,e)),{placement:"top",maxHeight:V}}if(i==="bottom")return o&&gd(a,C),{placement:"bottom",maxHeight:e};break;case"top":if(E>=p)return{placement:"top",maxHeight:e};if(w>=p&&!s)return o&&xf(a,Q,D),{placement:"top",maxHeight:e};if(!s&&w>=r||s&&E>=r){var M=e;return(!s&&w>=r||s&&E>=r)&&(M=s?E-x:w-x),o&&xf(a,Q,D),{placement:"top",maxHeight:M}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function F8(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var QA=function(e){return e==="auto"?"bottom":e},X8=function(e,n){var r,i=e.placement,o=e.theme,s=o.borderRadius,l=o.spacing,a=o.colors;return Fe((r={label:"menu"},Wa(r,F8(i),"100%"),Wa(r,"position","absolute"),Wa(r,"width","100%"),Wa(r,"zIndex",1),r),n?{}:{backgroundColor:a.neutral0,borderRadius:s,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})},$A=I.createContext(null),W8=function(e){var n=e.children,r=e.minMenuHeight,i=e.maxMenuHeight,o=e.menuPlacement,s=e.menuPosition,l=e.menuShouldScrollIntoView,a=e.theme,u=I.useContext($A)||{},c=u.setPortalPlacement,f=I.useRef(null),h=I.useState(i),d=Hi(h,2),p=d[0],g=d[1],v=I.useState(null),O=Hi(v,2),m=O[0],y=O[1],b=a.spacing.controlHeight;return cy(function(){var x=f.current;if(x){var E=s==="fixed",T=l&&!E,w=B8({maxHeight:i,menuEl:x,minHeight:r,placement:o,shouldScroll:T,isFixedPosition:E,controlHeight:b});g(w.maxHeight),y(w.placement),c==null||c(w.placement)}},[i,o,s,l,r,c,b]),n({ref:f,placerProps:Fe(Fe({},e),{},{placement:m||QA(o),maxHeight:p})})},U8=function(e){var n=e.children,r=e.innerRef,i=e.innerProps;return We("div",_e({},Jt(e,"menu",{menu:!0}),{ref:r},i),n)},Z8=U8,Y8=function(e,n){var r=e.maxHeight,i=e.theme.spacing.baseUnit;return Fe({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},z8=function(e){var n=e.children,r=e.innerProps,i=e.innerRef,o=e.isMulti;return We("div",_e({},Jt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},_A=function(e,n){var r=e.theme,i=r.spacing.baseUnit,o=r.colors;return Fe({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},q8=_A,G8=_A,H8=function(e){var n=e.children,r=n===void 0?"No options":n,i=e.innerProps,o=so(e,L8);return We("div",_e({},Jt(Fe(Fe({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},K8=function(e){var n=e.children,r=n===void 0?"Loading...":n,i=e.innerProps,o=so(e,V8);return We("div",_e({},Jt(Fe(Fe({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},J8=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}},e6=function(e){var n=e.appendTo,r=e.children,i=e.controlElement,o=e.innerProps,s=e.menuPlacement,l=e.menuPosition,a=I.useRef(null),u=I.useRef(null),c=I.useState(QA(s)),f=Hi(c,2),h=f[0],d=f[1],p=I.useMemo(function(){return{setPortalPlacement:d}},[]),g=I.useState(null),v=Hi(g,2),O=v[0],m=v[1],y=I.useCallback(function(){if(i){var T=A8(i),w=l==="fixed"?0:window.pageYOffset,k=T[h]+w;(k!==(O==null?void 0:O.offset)||T.left!==(O==null?void 0:O.rect.left)||T.width!==(O==null?void 0:O.rect.width))&&m({offset:k,rect:T})}},[i,l,h,O==null?void 0:O.offset,O==null?void 0:O.rect.left,O==null?void 0:O.rect.width]);cy(function(){y()},[y]);var b=I.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&a.current&&(u.current=x8(i,a.current,y,{elementResize:"ResizeObserver"in window}))},[i,y]);cy(function(){b()},[b]);var x=I.useCallback(function(T){a.current=T,b()},[b]);if(!n&&l!=="fixed"||!O)return null;var E=We("div",_e({ref:x},Jt(Fe(Fe({},e),{},{offset:O.offset,position:l,rect:O.rect}),"menuPortal",{"menu-portal":!0}),o),r);return We($A.Provider,{value:p},n?sv.createPortal(E,n):E)},t6=function(e){var n=e.isDisabled,r=e.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},n6=function(e){var n=e.children,r=e.innerProps,i=e.isDisabled,o=e.isRtl;return We("div",_e({},Jt(e,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},r6=function(e,n){var r=e.theme.spacing,i=e.isMulti,o=e.hasValue,s=e.selectProps.controlShouldRenderValue;return Fe({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},i6=function(e){var n=e.children,r=e.innerProps,i=e.isMulti,o=e.hasValue;return We("div",_e({},Jt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},o6=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},s6=function(e){var n=e.children,r=e.innerProps;return We("div",_e({},Jt(e,"indicatorsContainer",{indicators:!0}),r),n)},eP,l6=["size"],a6=["innerProps","isRtl","size"],u6={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},TA=function(e){var n=e.size,r=so(e,l6);return We("svg",_e({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:u6},r))},m0=function(e){return We(TA,_e({size:20},e),We("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"}))},AA=function(e){return We(TA,_e({size:20},e),We("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"}))},RA=function(e,n){var r=e.isFocused,i=e.theme,o=i.spacing.baseUnit,s=i.colors;return Fe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},c6=RA,f6=function(e){var n=e.children,r=e.innerProps;return We("div",_e({},Jt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||We(AA,null))},h6=RA,d6=function(e){var n=e.children,r=e.innerProps;return We("div",_e({},Jt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||We(m0,null))},p6=function(e,n){var r=e.isDisabled,i=e.theme,o=i.spacing.baseUnit,s=i.colors;return Fe({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},g6=function(e){var n=e.innerProps;return We("span",_e({},n,Jt(e,"indicatorSeparator",{"indicator-separator":!0})))},m6=g8(eP||(eP=m8([`
113
- 0%, 80%, 100% { opacity: 0; }
114
- 40% { opacity: 1; }
115
- `]))),O6=function(e,n){var r=e.isFocused,i=e.size,o=e.theme,s=o.colors,l=o.spacing.baseUnit;return Fe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:l*2})},zg=function(e){var n=e.delay,r=e.offset;return We("span",{css:p0({animation:"".concat(m6," 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"},"","")})},y6=function(e){var n=e.innerProps,r=e.isRtl,i=e.size,o=i===void 0?4:i,s=so(e,a6);return We("div",_e({},Jt(Fe(Fe({},s),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),We(zg,{delay:0,offset:r}),We(zg,{delay:160,offset:!0}),We(zg,{delay:320,offset:!r}))},v6=function(e,n){var r=e.isDisabled,i=e.isFocused,o=e.theme,s=o.colors,l=o.borderRadius,a=o.spacing;return Fe({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?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},S6=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,o=e.innerRef,s=e.innerProps,l=e.menuIsOpen;return We("div",_e({ref:o},Jt(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),s),n)},b6=S6,w6=["data"],k6=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},P6=function(e){var n=e.children,r=e.cx,i=e.getStyles,o=e.getClassNames,s=e.Heading,l=e.headingProps,a=e.innerProps,u=e.label,c=e.theme,f=e.selectProps;return We("div",_e({},Jt(e,"group",{group:!0}),a),We(s,_e({},l,{selectProps:f,theme:c,getStyles:i,getClassNames:o,cx:r}),u),We("div",null,n))},x6=function(e,n){var r=e.theme,i=r.colors,o=r.spacing;return Fe({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},C6=function(e){var n=xA(e);n.data;var r=so(n,w6);return We("div",_e({},Jt(e,"groupHeading",{"group-heading":!0}),r))},E6=P6,Q6=["innerRef","isDisabled","isHidden","inputClassName"],$6=function(e,n){var r=e.isDisabled,i=e.value,o=e.theme,s=o.spacing,l=o.colors;return Fe(Fe({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},_6),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:l.neutral80})},DA={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},_6={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Fe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},DA)},T6=function(e){return Fe({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},DA)},A6=function(e){var n=e.cx,r=e.value,i=xA(e),o=i.innerRef,s=i.isDisabled,l=i.isHidden,a=i.inputClassName,u=so(i,Q6);return We("div",_e({},Jt(e,"input",{"input-container":!0}),{"data-value":r||""}),We("input",_e({className:n({input:!0},a),ref:o,style:T6(l),disabled:s},u)))},R6=A6,D6=function(e,n){var r=e.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return Fe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},M6=function(e,n){var r=e.theme,i=r.borderRadius,o=r.colors,s=e.cropWithEllipsis;return Fe({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},I6=function(e,n){var r=e.theme,i=r.spacing,o=r.borderRadius,s=r.colors,l=e.isFocused;return Fe({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:l?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},MA=function(e){var n=e.children,r=e.innerProps;return We("div",r,n)},N6=MA,j6=MA;function L6(t){var e=t.children,n=t.innerProps;return We("div",_e({role:"button"},n),e||We(m0,{size:14}))}var V6=function(e){var n=e.children,r=e.components,i=e.data,o=e.innerProps,s=e.isDisabled,l=e.removeProps,a=e.selectProps,u=r.Container,c=r.Label,f=r.Remove;return We(u,{data:i,innerProps:Fe(Fe({},Jt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:a},We(c,{data:i,innerProps:Fe({},Jt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},n),We(f,{data:i,innerProps:Fe(Fe({},Jt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:a}))},B6=V6,F6=function(e,n){var r=e.isDisabled,i=e.isFocused,o=e.isSelected,s=e.theme,l=s.spacing,a=s.colors;return Fe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?a.primary:i?a.primary25:"transparent",color:r?a.neutral20:o?a.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?a.primary:a.primary50}})},X6=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,o=e.isSelected,s=e.innerRef,l=e.innerProps;return We("div",_e({},Jt(e,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},l),n)},W6=X6,U6=function(e,n){var r=e.theme,i=r.spacing,o=r.colors;return Fe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},Z6=function(e){var n=e.children,r=e.innerProps;return We("div",_e({},Jt(e,"placeholder",{placeholder:!0}),r),n)},Y6=Z6,z6=function(e,n){var r=e.isDisabled,i=e.theme,o=i.spacing,s=i.colors;return Fe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},q6=function(e){var n=e.children,r=e.isDisabled,i=e.innerProps;return We("div",_e({},Jt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},G6=q6,H6={ClearIndicator:d6,Control:b6,DropdownIndicator:f6,DownChevron:AA,CrossIcon:m0,Group:E6,GroupHeading:C6,IndicatorsContainer:s6,IndicatorSeparator:g6,Input:R6,LoadingIndicator:y6,Menu:Z8,MenuList:z8,MenuPortal:e6,LoadingMessage:K8,NoOptionsMessage:H8,MultiValue:B6,MultiValueContainer:N6,MultiValueLabel:j6,MultiValueRemove:L6,Option:W6,Placeholder:Y6,SelectContainer:n6,SingleValue:G6,ValueContainer:i6},K6=function(e){return Fe(Fe({},H6),e.components)},tP=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function J6(t,e){return!!(t===e||tP(t)&&tP(e))}function e7(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!J6(t[n],e[n]))return!1;return!0}function t7(t,e){e===void 0&&(e=e7);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var s=t.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}var n7={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"},r7=function(e){return We("span",_e({css:n7},e))},nP=r7,i7={guidance:function(e){var n=e.isSearchable,r=e.isMulti,i=e.isDisabled,o=e.tabSelectsValue,s=e.context;switch(s){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(o?", 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,o=e.labels,s=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(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"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,o=e.label,s=o===void 0?"":o,l=e.selectValue,a=e.isDisabled,u=e.isSelected,c=function(p,g){return p&&p.length?"".concat(p.indexOf(g)+1," of ").concat(p.length):""};if(n==="value"&&l)return"value ".concat(s," focused, ").concat(c(l,r),".");if(n==="menu"){var f=a?" disabled":"",h="".concat(u?"selected":"focused").concat(f);return"option ".concat(s," ").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:"",".")}},o7=function(e){var n=e.ariaSelection,r=e.focusedOption,i=e.focusedValue,o=e.focusableOptions,s=e.isFocused,l=e.selectValue,a=e.selectProps,u=e.id,c=a.ariaLiveMessages,f=a.getOptionLabel,h=a.inputValue,d=a.isMulti,p=a.isOptionDisabled,g=a.isSearchable,v=a.menuIsOpen,O=a.options,m=a.screenReaderStatus,y=a.tabSelectsValue,b=a["aria-label"],x=a["aria-live"],E=I.useMemo(function(){return Fe(Fe({},i7),c||{})},[c]),T=I.useMemo(function(){var V="";if(n&&E.onChange){var G=n.option,M=n.options,j=n.removedValue,A=n.removedValues,X=n.value,z=function(F){return Array.isArray(F)?null:F},pe=j||G||z(X),ae=pe?f(pe):"",B=M||A||void 0,q=B?B.map(f):[],te=Fe({isDisabled:pe&&p(pe,l),label:ae,labels:q},n);V=E.onChange(te)}return V},[n,E,p,l,f]),w=I.useMemo(function(){var V="",G=r||i,M=!!(r&&l&&l.includes(r));if(G&&E.onFocus){var j={focused:G,label:f(G),isDisabled:p(G,l),isSelected:M,options:o,context:G===r?"menu":"value",selectValue:l};V=E.onFocus(j)}return V},[r,i,f,p,E,o,l]),k=I.useMemo(function(){var V="";if(v&&O.length&&E.onFilter){var G=m({count:o.length});V=E.onFilter({inputValue:h,resultsMessage:G})}return V},[o,h,v,E,O,m]),C=I.useMemo(function(){var V="";if(E.guidance){var G=i?"value":v?"menu":"input";V=E.guidance({"aria-label":b,context:G,isDisabled:r&&p(r,l),isMulti:d,isSearchable:g,tabSelectsValue:y})}return V},[b,r,i,d,p,g,v,E,l,y]),Q="".concat(w," ").concat(k," ").concat(C),D=We(I.Fragment,null,We("span",{id:"aria-selection"},T),We("span",{id:"aria-context"},Q)),N=(n==null?void 0:n.action)==="initial-input-focus";return We(I.Fragment,null,We(nP,{id:u},N&&D),We(nP,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text"},s&&!N&&D))},s7=o7,fy=[{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źẑżžẓẕƶȥɀⱬꝣ"}],l7=new RegExp("["+fy.map(function(t){return t.letters}).join("")+"]","g"),IA={};for(var qg=0;qg<fy.length;qg++)for(var Gg=fy[qg],Hg=0;Hg<Gg.letters.length;Hg++)IA[Gg.letters[Hg]]=Gg.base;var NA=function(e){return e.replace(l7,function(n){return IA[n]})},a7=t7(NA),rP=function(e){return e.replace(/^\s+|\s+$/g,"")},u7=function(e){return"".concat(e.label," ").concat(e.value)},c7=function(e){return function(n,r){if(n.data.__isNew__)return!0;var i=Fe({ignoreCase:!0,ignoreAccents:!0,stringify:u7,trim:!0,matchFrom:"any"},e),o=i.ignoreCase,s=i.ignoreAccents,l=i.stringify,a=i.trim,u=i.matchFrom,c=a?rP(r):r,f=a?rP(l(n)):l(n);return o&&(c=c.toLowerCase(),f=f.toLowerCase()),s&&(c=a7(c),f=NA(f)),u==="start"?f.substr(0,c.length)===c:f.indexOf(c)>-1}},f7=["innerRef"];function h7(t){var e=t.innerRef,n=so(t,f7),r=j8(n,"onExited","in","enter","exit","appear");return We("input",_e({ref:e},r,{css:p0({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 d7=function(e){e.preventDefault(),e.stopPropagation()};function p7(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,o=t.onTopLeave,s=I.useRef(!1),l=I.useRef(!1),a=I.useRef(0),u=I.useRef(null),c=I.useCallback(function(v,O){if(u.current!==null){var m=u.current,y=m.scrollTop,b=m.scrollHeight,x=m.clientHeight,E=u.current,T=O>0,w=b-x-y,k=!1;w>O&&s.current&&(r&&r(v),s.current=!1),T&&l.current&&(o&&o(v),l.current=!1),T&&O>w?(n&&!s.current&&n(v),E.scrollTop=b,k=!0,s.current=!0):!T&&-O>y&&(i&&!l.current&&i(v),E.scrollTop=0,k=!0,l.current=!0),k&&d7(v)}},[n,r,i,o]),f=I.useCallback(function(v){c(v,v.deltaY)},[c]),h=I.useCallback(function(v){a.current=v.changedTouches[0].clientY},[]),d=I.useCallback(function(v){var O=a.current-v.changedTouches[0].clientY;c(v,O)},[c]),p=I.useCallback(function(v){if(v){var O=M8?{passive:!1}:!1;v.addEventListener("wheel",f,O),v.addEventListener("touchstart",h,O),v.addEventListener("touchmove",d,O)}},[d,h,f]),g=I.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",h,!1),v.removeEventListener("touchmove",d,!1))},[d,h,f]);return I.useEffect(function(){if(e){var v=u.current;return p(v),function(){g(v)}}},[e,p,g]),function(v){u.current=v}}var iP=["boxSizing","height","overflow","paddingRight","position"],oP={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function sP(t){t.preventDefault()}function lP(t){t.stopPropagation()}function aP(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function uP(){return"ontouchstart"in window||navigator.maxTouchPoints}var cP=!!(typeof window<"u"&&window.document&&window.document.createElement),Aa=0,Zs={capture:!1,passive:!1};function g7(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=I.useRef({}),o=I.useRef(null),s=I.useCallback(function(a){if(cP){var u=document.body,c=u&&u.style;if(r&&iP.forEach(function(p){var g=c&&c[p];i.current[p]=g}),r&&Aa<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,d=window.innerWidth-h+f||0;Object.keys(oP).forEach(function(p){var g=oP[p];c&&(c[p]=g)}),c&&(c.paddingRight="".concat(d,"px"))}u&&uP()&&(u.addEventListener("touchmove",sP,Zs),a&&(a.addEventListener("touchstart",aP,Zs),a.addEventListener("touchmove",lP,Zs))),Aa+=1}},[r]),l=I.useCallback(function(a){if(cP){var u=document.body,c=u&&u.style;Aa=Math.max(Aa-1,0),r&&Aa<1&&iP.forEach(function(f){var h=i.current[f];c&&(c[f]=h)}),u&&uP()&&(u.removeEventListener("touchmove",sP,Zs),a&&(a.removeEventListener("touchstart",aP,Zs),a.removeEventListener("touchmove",lP,Zs)))}},[r]);return I.useEffect(function(){if(e){var a=o.current;return s(a),function(){l(a)}}},[e,s,l]),function(a){o.current=a}}var m7=function(){return document.activeElement&&document.activeElement.blur()},O7={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function y7(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,o=t.onBottomArrive,s=t.onBottomLeave,l=t.onTopArrive,a=t.onTopLeave,u=p7({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:l,onTopLeave:a}),c=g7({isEnabled:n}),f=function(d){u(d),c(d)};return We(I.Fragment,null,n&&We("div",{onClick:m7,css:O7}),e(f))}var v7={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},S7=function(e){var n=e.name,r=e.onFocus;return We("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:v7,value:"",onChange:function(){}})},b7=S7,w7=function(e){return e.label},k7=function(e){return e.label},P7=function(e){return e.value},x7=function(e){return!!e.isDisabled},C7={clearIndicator:h6,container:t6,control:v6,dropdownIndicator:c6,group:k6,groupHeading:x6,indicatorsContainer:o6,indicatorSeparator:p6,input:$6,loadingIndicator:O6,loadingMessage:G8,menu:X8,menuList:Y8,menuPortal:J8,multiValue:D6,multiValueLabel:M6,multiValueRemove:I6,noOptionsMessage:q8,option:F6,placeholder:U6,singleValue:z6,valueContainer:r6},E7={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%)"},Q7=4,jA=4,$7=38,_7=jA*2,T7={baseUnit:jA,controlHeight:$7,menuGutter:_7},Kg={borderRadius:Q7,colors:E7,spacing:T7},A7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Jk(),captureMenuScroll:!Jk(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:c7(),formatGroupLabel:w7,getOptionLabel:k7,getOptionValue:P7,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:x7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!R8(),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 fP(t,e,n,r){var i=FA(t,e,n),o=XA(t,e,n),s=BA(t,e),l=md(t,e);return{type:"option",data:e,isDisabled:i,isSelected:o,label:s,value:l,index:r}}function LA(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,l){return fP(t,s,e,l)}).filter(function(s){return hP(t,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=fP(t,n,e,r);return hP(t,o)?o:void 0}).filter(I8)}function VA(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,nA(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function R7(t,e){return VA(LA(t,e))}function hP(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,o=e.isSelected,s=e.label,l=e.value;return(!UA(t)||!o)&&WA(t,{label:s,value:l,data:i},r)}function D7(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var o=e.indexOf(n);if(o>-1)return n;if(i<e.length)return e[i]}return null}function M7(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var BA=function(e,n){return e.getOptionLabel(n)},md=function(e,n){return e.getOptionValue(n)};function FA(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function XA(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=md(t,e);return n.some(function(i){return md(t,i)===r})}function WA(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var UA=function(e){var n=e.hideSelectedOptions,r=e.isMulti;return n===void 0?r:n},I7=1,ZA=function(t){aZ(n,t);var e=hZ(n);function n(r){var i;if(sZ(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,d=c.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:d}),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,d=c&&i.isOptionSelected(l,h),p=i.isOptionDisabled(l,h);if(d){var g=i.getOptionValue(l);i.setValue(h.filter(function(v){return i.getOptionValue(v)!==g}),"deselect-option",l)}else if(!p)c?i.setValue([].concat(nA(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(d){return i.getOptionValue(d)!==c}),h=Ef(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(Ef(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=Ef(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 Q8.apply(void 0,[i.props.classNamePrefix].concat(a))},i.getOptionLabel=function(l){return BA(i.props,l)},i.getOptionValue=function(l){return md(i.props,l)},i.getStyles=function(l,a){var u=i.props.unstyled,c=C7[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 K6(i.props)},i.buildCategorizedOptions=function(){return LA(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return VA(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,a){i.setState({ariaSelection:Fe({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&&fp(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 UA(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,d=a.isClearable,p=a.isDisabled,g=a.menuIsOpen,v=a.onKeyDown,O=a.tabSelectsValue,m=a.openMenuOnFocus,y=i.state,b=y.focusedOption,x=y.focusedValue,E=y.selectValue;if(!p&&!(typeof v=="function"&&(v(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(x)i.removeValue(x);else{if(!c)return;u?i.popValue():d&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!g||!O||!b||m&&i.isOptionSelected(b,E))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()):d&&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||++I7),i.state.selectValue=Hk(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),s=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[s]}return i}return lZ(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&&Kk(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,l=o.menuIsOpen,a=this.state.isFocused;(a&&!s&&i.isDisabled||a&&l&&!i.menuIsOpen)&&this.focusInput(),a&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!a&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Kk(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,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,l=s.selectValue,a=s.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 o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,l=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=s.indexOf(l);l||(a=-1);var u=s.length-1,c=-1;if(s.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:s[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var a=0,u=l.indexOf(s);s||(u=-1),i==="up"?a=u>0?u-1:l.length-1:i==="down"?a=(u+1)%l.length:i==="pageup"?(a=u-o,a<0&&(a=0)):i==="pagedown"?(a=u+o,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(Kg):Fe(Fe({},Kg),this.props.theme):Kg}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=this.getStyles,l=this.getClassNames,a=this.getValue,u=this.selectOption,c=this.setValue,f=this.props,h=f.isMulti,d=f.isRtl,p=f.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:s,getClassNames:l,getValue:a,hasValue:g,isMulti:h,isRtl:d,options:p,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,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return FA(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return XA(this.props,i,o)}},{key:"filterOption",value:function(i,o){return WA(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,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,o=i.isDisabled,s=i.isSearchable,l=i.inputId,a=i.inputValue,u=i.tabIndex,c=i.form,f=i.menuIsOpen,h=i.required,d=this.getComponents(),p=d.Input,g=this.state,v=g.inputIsHidden,O=g.ariaSelection,m=this.commonProps,y=l||this.getElementId("input"),b=Fe(Fe(Fe({"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")}),!s&&{"aria-readonly":!0}),this.hasValue()?(O==null?void 0:O.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?I.createElement(p,_e({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:a},b)):I.createElement(h7,_e({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:pd,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,l=o.MultiValueContainer,a=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,f=o.Placeholder,h=this.commonProps,d=this.props,p=d.controlShouldRenderValue,g=d.isDisabled,v=d.isMulti,O=d.inputValue,m=d.placeholder,y=this.state,b=y.selectValue,x=y.focusedValue,E=y.isFocused;if(!this.hasValue()||!p)return O?null:I.createElement(f,_e({},h,{key:"placeholder",isDisabled:g,isFocused:E,innerProps:{id:this.getElementId("placeholder")}}),m);if(v)return b.map(function(w,k){var C=w===x,Q="".concat(i.getOptionLabel(w),"-").concat(i.getOptionValue(w));return I.createElement(s,_e({},h,{components:{Container:l,Label:a,Remove:u},isFocused:C,isDisabled:g,key:Q,index:k,removeProps:{onClick:function(){return i.removeValue(w)},onTouchEnd:function(){return i.removeValue(w)},onMouseDown:function(N){N.preventDefault()}},data:w}),i.formatOptionLabel(w,"value"))});if(O)return null;var T=b[0];return I.createElement(c,_e({},h,{data:T,isDisabled:g}),this.formatOptionLabel(T,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,l=this.props,a=l.isDisabled,u=l.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||a||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return I.createElement(o,_e({},s,{innerProps:f,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,l=this.props,a=l.isDisabled,u=l.isLoading,c=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return I.createElement(o,_e({},s,{innerProps:f,isDisabled:a,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var l=this.commonProps,a=this.props.isDisabled,u=this.state.isFocused;return I.createElement(s,_e({},l,{isDisabled:a,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,l=this.props.isDisabled,a=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return I.createElement(o,_e({},s,{innerProps:u,isDisabled:l,isFocused:a}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,l=o.GroupHeading,a=o.Menu,u=o.MenuList,c=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,d=o.Option,p=this.commonProps,g=this.state.focusedOption,v=this.props,O=v.captureMenuScroll,m=v.inputValue,y=v.isLoading,b=v.loadingMessage,x=v.minMenuHeight,E=v.maxMenuHeight,T=v.menuIsOpen,w=v.menuPlacement,k=v.menuPosition,C=v.menuPortalTarget,Q=v.menuShouldBlockScroll,D=v.menuShouldScrollIntoView,N=v.noOptionsMessage,V=v.onMenuScrollToTop,G=v.onMenuScrollToBottom;if(!T)return null;var M=function(B,q){var te=B.type,we=B.data,F=B.isDisabled,W=B.isSelected,Y=B.label,fe=B.value,Se=g===we,Be=F?void 0:function(){return i.onOptionHover(we)},Ie=F?void 0:function(){return i.selectOption(we)},je="".concat(i.getElementId("option"),"-").concat(q),ie={id:je,onClick:Ie,onMouseMove:Be,onMouseOver:Be,tabIndex:-1};return I.createElement(d,_e({},p,{innerProps:ie,data:we,isDisabled:F,isSelected:W,key:je,label:Y,type:te,value:fe,isFocused:Se,innerRef:Se?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(B.data,"menu"))},j;if(this.hasOptions())j=this.getCategorizedOptions().map(function(ae){if(ae.type==="group"){var B=ae.data,q=ae.options,te=ae.index,we="".concat(i.getElementId("group"),"-").concat(te),F="".concat(we,"-heading");return I.createElement(s,_e({},p,{key:we,data:B,options:q,Heading:l,headingProps:{id:F,data:ae.data},label:i.formatGroupLabel(ae.data)}),ae.options.map(function(W){return M(W,"".concat(te,"-").concat(W.index))}))}else if(ae.type==="option")return M(ae,"".concat(ae.index))});else if(y){var A=b({inputValue:m});if(A===null)return null;j=I.createElement(f,p,A)}else{var X=N({inputValue:m});if(X===null)return null;j=I.createElement(h,p,X)}var z={minMenuHeight:x,maxMenuHeight:E,menuPlacement:w,menuPosition:k,menuShouldScrollIntoView:D},pe=I.createElement(W8,_e({},p,z),function(ae){var B=ae.ref,q=ae.placerProps,te=q.placement,we=q.maxHeight;return I.createElement(a,_e({},p,z,{innerRef:B,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:y,placement:te}),I.createElement(y7,{captureEnabled:O,onTopArrive:V,onBottomArrive:G,lockEnabled:Q},function(F){return I.createElement(u,_e({},p,{innerRef:function(Y){i.getMenuListRef(Y),F(Y)},isLoading:y,maxHeight:we,focusedOption:g}),j)}))});return C||k==="fixed"?I.createElement(c,_e({},p,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:k}),pe):pe}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,l=o.isDisabled,a=o.isMulti,u=o.name,c=o.required,f=this.state.selectValue;if(c&&!this.hasValue()&&!l)return I.createElement(b7,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(a)if(s){var h=f.map(function(g){return i.getOptionValue(g)}).join(s);return I.createElement("input",{name:u,type:"hidden",value:h})}else{var d=f.length>0?f.map(function(g,v){return I.createElement("input",{key:"i-".concat(v),name:u,type:"hidden",value:i.getOptionValue(g)})}):I.createElement("input",{name:u,type:"hidden",value:""});return I.createElement("div",null,d)}else{var p=f[0]?this.getOptionValue(f[0]):"";return I.createElement("input",{name:u,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,l=o.focusedOption,a=o.focusedValue,u=o.isFocused,c=o.selectValue,f=this.getFocusableOptions();return I.createElement(s7,_e({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:l,focusedValue:a,isFocused:u,selectValue:c,focusableOptions:f}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=i.IndicatorsContainer,l=i.SelectContainer,a=i.ValueContainer,u=this.props,c=u.className,f=u.id,h=u.isDisabled,d=u.menuIsOpen,p=this.state.isFocused,g=this.commonProps=this.getCommonProps();return I.createElement(l,_e({},g,{className:c,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:p}),this.renderLiveRegion(),I.createElement(o,_e({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:p,menuIsOpen:d}),I.createElement(a,_e({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),I.createElement(s,_e({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,l=o.clearFocusValueOnUpdate,a=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,f=o.prevWasFocused,h=i.options,d=i.value,p=i.menuIsOpen,g=i.inputValue,v=i.isMulti,O=Hk(d),m={};if(s&&(d!==s.value||h!==s.options||p!==s.menuIsOpen||g!==s.inputValue)){var y=p?R7(i,O):[],b=l?D7(o,O):null,x=M7(o,y);m={selectValue:O,focusedOption:x,focusedValue:b,clearFocusValueOnUpdate:!1}}var E=a!=null&&i!==s?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},T=u,w=c&&f;return c&&!w&&(T={value:Ef(v,O,O[0]||null),options:O,action:"initial-input-focus"},w=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(T=null),Fe(Fe(Fe({},m),E),{},{prevProps:i,ariaSelection:T,prevWasFocused:w})}}]),n}(I.Component);ZA.defaultProps=A7;var N7=I.forwardRef(function(t,e){var n=oZ(t);return I.createElement(ZA,_e({ref:e},n))}),dP=N7;const j7=[{value:1,label:"1 second"},{value:5,label:"5 seconds"},{value:10,label:"10 seconds"},{value:30,label:"30 seconds"}],L7=({show:t,onClose:e,setTheme:n})=>{const r=I.useCallback(o=>{n(o.label)},[]),i=I.useCallback(o=>{const s=[{value:o.value}];fetch("/saveTime",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},[]);return t?ne.jsxs(_a,{className:"vz-settings",show:t,onHide:e,animation:!1,children:[ne.jsx(_a.Header,{closeButton:!0,children:ne.jsx(_a.Title,{children:"Settings"})}),ne.jsxs(_a.Body,{children:[ne.jsxs(di.Group,{className:"mb-3",controlId:"formFork",children:[ne.jsx(di.Label,{children:"Username"}),ne.jsx(di.Control,{type:"text",placeholder:"Enter username"}),ne.jsx(di.Text,{className:"text-muted",children:"Enter a username to be displayed on your cursor"})]}),ne.jsxs(di.Group,{className:"mb-3",controlId:"formFork",children:[ne.jsx(di.Label,{children:"Theme"}),ne.jsx(dP,{options:$Q,onChange:r}),ne.jsx(di.Text,{className:"text-muted",children:"Select a color theme for the editor"})]}),ne.jsxs(di.Group,{className:"mb-3",controlId:"formFork",children:[ne.jsx(di.Label,{children:"Auto-Save Time"}),ne.jsx(dP,{options:j7,onChange:i}),ne.jsx(di.Text,{className:"text-muted",children:"Select an auto save time"})]})]}),ne.jsx(_a.Footer,{children:ne.jsx(JU,{variant:"primary",onClick:e,children:"Done"})})]}):null},V7=t=>{const e={name:"files"};for(const n of Object.keys(t)){const r=t[n],i=r.name.split("/"),o=i.length;let s=e;for(let l=0;l<o-1;l++){let a;const u=i[l];if(s.children)for(let c=0;c<s.children.length;c++){const f=s.children[c];if(f.name===u){a=f;break}}a||(a={name:i[l],path:i.slice(0,l+1).join("/")},(s.children||(s.children=[])).push(a)),s=a}r.text!==null&&(s.children||(s.children=[])).push({name:i[o-1],file:r,fileId:n})}return e},YA=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(YA)),t),zA=({children:t,handleClick:e,handleRenameClick:n,handleDeleteClick:r})=>{const[i,o]=I.useState(!1),s=I.useCallback(()=>{o(!0)},[]),l=I.useCallback(()=>{o(!1)},[]);return ne.jsxs("div",{className:"full-box file-or-directory",onClick:e,onMouseEnter:s,onMouseLeave:l,children:[ne.jsx("div",{className:"name",children:t}),i?ne.jsxs("div",{className:"utils",children:[ne.jsx("i",{className:"bx bxs-edit utilities",style:{color:"#abdafb"},onClick:n}),ne.jsx("i",{className:"bx bx-trash",style:{color:"#eb336c"},onClick:r})]}):null]})},B7=({height:t=10,fill:e="currentcolor"})=>ne.jsx("svg",{height:t,viewBox:"4 4 16 16",children:ne.jsx("path",{fill:e,d:"M8 17l9-5-9-5v10z"})}),F7=({name:t,path:e,children:n,handleRenameFileClick:r,handleDeleteFileClick:i,handleFileClick:o,isDirectoryOpen:s,toggleDirectory:l})=>{const a=I.useCallback(()=>{l(e)},[l]),u=I.useCallback(()=>{console.log("TODO handleDeleteDirectoryClick")},[]),c=I.useCallback(()=>{console.log("TODO handleRenameDirectoryClick")},[]),f=I.useMemo(()=>s(e),[s,e]);return ne.jsxs(ne.Fragment,{children:[ne.jsxs(zA,{name:t,handleClick:a,handleDeleteClick:u,handleRenameClick:c,children:[ne.jsx("div",{className:"arrow-wrapper",style:{transform:`rotate(${f?90:0}deg)`},children:ne.jsx(B7,{})}),t]}),n&&f?ne.jsx("div",{className:"indentation",children:n.map(h=>{const{fileId:d}=h,{path:p}=h;return ne.jsx(qA,{entity:h,handleRenameFileClick:r,handleDeleteFileClick:i,handleFileClick:o,isDirectoryOpen:s,toggleDirectory:l},d||p)})}):null]})},X7=({name:t,fileId:e,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i})=>{const o=I.useCallback(()=>{i(e)},[e,i]),s=I.useCallback(a=>{r(e,a)},[e]),l=I.useCallback(()=>{n(e)},[e]);return ne.jsx(zA,{handleClick:o,handleDeleteClick:s,handleRenameClick:l,children:t})},qA=({entity:t,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r,isDirectoryOpen:i,toggleDirectory:o})=>{const{name:s,file:l,fileId:a}=t,{path:u,children:c}=t;return l?ne.jsx(X7,{fileId:a,name:s,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r}):ne.jsx(F7,{name:s,path:u,children:c,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r,isDirectoryOpen:i,toggleDirectory:o})};const W7=({createFile:t,files:e,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i,setIsSettingsOpen:o,isDirectoryOpen:s,toggleDirectory:l})=>{const a=I.useMemo(()=>e?YA(V7(e)):null,[e]);return I.useCallback(()=>{o(!0)},[]),ne.jsxs("div",{className:"vz-sidebar",children:[ne.jsxs("div",{className:"files",children:[ne.jsxs("div",{className:"full-box",children:[ne.jsx("div",{children:ne.jsx("a",{className:"link-name",href:"#",children:"Files"})}),ne.jsx("div",{children:ne.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 ne.jsx(qA,{entity:u,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i,isDirectoryOpen:s,toggleDirectory:l},h)}):null]}),null]})};const U7=t=>{const e=t.split("/");return e.length===1?e[e.length-1]:e[e.length-2]+"/"+e[e.length-1]},Z7=({fileId:t,isActive:e,setActiveFileId:n,closeTab:r,fileName:i})=>{const o=I.useCallback(l=>{l.stopPropagation(),r(t)},[r,t]),s=I.useMemo(()=>U7(i),[i]);return ne.jsxs("div",{className:e?"tab active":"tab",onClick:()=>{n(t)},children:[s,ne.jsx("div",{className:e?"bx bx-x tab-close":"",onClick:o})]})},Y7=({files:t,tabList:e,activeFileId:n,setActiveFileId:r,closeTab:i})=>ne.jsx("div",{className:"vz-tab-list",children:t&&e.map(o=>ne.jsx(Z7,{fileId:o,isActive:o===n,setActiveFileId:r,closeTab:i,fileName:t[o].name},o))}),z7=()=>{const[t,e]=I.useState(new Set),n=I.useCallback(i=>t.has(i),[t]),r=I.useCallback(i=>{const o=new Set(t);o[n(i)?"delete":"add"](i),e(o)},[t,n]);return{isDirectoryOpen:n,toggleDirectory:r}},q7=(t,e,n,r)=>{const i=I.useCallback(s=>{const l=n.findIndex(a=>a===s);if(l!==-1){const a=[...n.slice(0,l),...n.slice(l+1)];r(a),t===s&&(a.length>0?e(l===0?a[l]:a[l-1]):e(null))}},[n,t]),o=I.useCallback(s=>{e(s),n.includes(s)||r([...n,s])},[n]);return{tabList:n,closeTab:i,openTab:o}};function G7(){return new Worker("/assets/worker-aa634fce.js")}const H7=1200,K7=t=>{const e=t.match(/\.([^.]+)$/);return e?e[1]:""},J7=(t,e)=>{const n=new Set,r=I.useRef(!1);I.useEffect(()=>{if(!t)return;const i=new G7,o=u=>{const{fileId:c,error:f,fileTextPrettified:h}=u.data;if(f){console.log(f);return}r.current=!0,e(d=>({...d,files:{...d.files,[c]:{...d.files[c],text:h}}})),r.current=!1};i.addEventListener("message",o);const s=async()=>{const c=t.data.files,f=Array.from(n);n.clear();for(const h of f){const d=c[h],p={fileText:d.text,fileExtension:K7(d.name),fileId:h};i.postMessage(p)}};let l;function a(){clearTimeout(l),l=setTimeout(s,H7)}t.on("op batch",(u,c)=>{if(c){if(r.current)return;if(u&&u.length===4&&u[0]==="files"&&typeof u[1]=="string"&&u[2]==="text"){const f=u[1];n.add(f),a()}}return()=>{i.removeEventListener("message",o),clearTimeout(l)}})},[t])};_C.types.register(lv.type);const{Connection:eY}=_C,tY=window.location.protocol==="https:"?"wss://":"ws://",nY=new WebSocket(tY+window.location.host+"/ws"),pP=new eY(nY);function rY(){const[t,e]=I.useState(null),n=I.useCallback(N=>{const V=t.data,G=pW(V,N(V));G&&t&&t.submitOp(G)},[t]);J7(t,n);const[r,i]=I.useState(null),[o,s]=I.useState(null),[l,a]=I.useState(null),[u,c]=I.useState(null),[f,h]=I.useState([]),{closeTab:d,openTab:p}=q7(u,c,f,h),[g,v]=I.useState(_Q),[O,m]=I.useState(!1),{isDirectoryOpen:y,toggleDirectory:b}=z7();I.useEffect(()=>{const N="documents",V="1",G=pP.get(N,V);return G.subscribe(()=>{e(G),a(G.data),G.on("op",()=>{a(G.data)});const M=pP.getDocPresence(N,V);M.subscribe(function(j){if(j)throw j}),i(M.create(_S())),s(M)}),()=>{}},[]);const x=I.useCallback(N=>{const V=prompt("Enter new name");V&&n(G=>({...G,files:{...G.files,[N]:{...G.files[N],name:V}}}))},[n]),E=I.useCallback(N=>{d(N),n(V=>{const G={...V.files};return delete G[N],{...V,files:G}})},[n,d]),T=I.useCallback(()=>{const N=prompt("Enter new file name");N&&n(V=>({...V,files:{...V.files,[_S()]:{name:N,text:""}}}))},[n]),w=I.useCallback((N,V)=>{V.stopPropagation(),E(N)},[E]),k=I.useCallback(()=>{m(!1)},[]),C=I.useRef(null),Q=I.useCallback(()=>{C.current?clearTimeout(C.current):n(N=>({...N,isInteracting:!0})),C.current=setTimeout(()=>{C.current=null,n(N=>({...N,isInteracting:!1}))},800)},[n]),D=l?l.files:null;return ne.jsxs("div",{className:"app",children:[ne.jsxs("div",{className:"left",children:[ne.jsx(W7,{createFile:T,files:D,handleRenameFileClick:x,handleDeleteFileClick:w,handleFileClick:p,setIsSettingsOpen:m,isDirectoryOpen:y,toggleDirectory:b}),ne.jsx(L7,{show:O,onClose:k,setTheme:v})]}),ne.jsxs("div",{className:"right",children:[ne.jsx(Y7,{files:D,tabList:f,activeFileId:u,setActiveFileId:c,closeTab:d}),l&&u?ne.jsx(jF,{shareDBDoc:t,localPresence:r,docPresence:o,activeFileId:u,theme:g,onInteract:Q}):null]})]})}QC(document.getElementById("root")).render(ne.jsx(I.StrictMode,{children:ne.jsx(rY,{})}));