mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
125 lines
1.2 MiB
125 lines
1.2 MiB
var pn=Object.defineProperty;var fn=(o,e,s)=>e in o?pn(o,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[e]=s;var Rt=(o,e,s)=>(fn(o,typeof e!="symbol"?e+"":e,s),s);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const d of h.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function s(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerpolicy&&(h.referrerPolicy=c.referrerpolicy),c.crossorigin==="use-credentials"?h.credentials="include":c.crossorigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function a(c){if(c.ep)return;c.ep=!0;const h=s(c);fetch(c.href,h)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function getAugmentedNamespace(o){var e=o.default;if(typeof e=="function"){var s=function(){return e.apply(this,arguments)};s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(o).forEach(function(a){var c=Object.getOwnPropertyDescriptor(o,a);Object.defineProperty(s,a,c.get?c:{enumerable:!0,get:function(){return o[a]}})}),s}var react={exports:{}},react_production_min={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var l$1=Symbol.for("react.element"),n$1=Symbol.for("react.portal"),p$3=Symbol.for("react.fragment"),q$1=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t$2=Symbol.for("react.provider"),u=Symbol.for("react.context"),v$1=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z$1=Symbol.iterator;function A$1(o){return o===null||typeof o!="object"?null:(o=z$1&&o[z$1]||o["@@iterator"],typeof o=="function"?o:null)}var B$1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$2=Object.assign,D$1={};function E$1(o,e,s){this.props=o,this.context=e,this.refs=D$1,this.updater=s||B$1}E$1.prototype.isReactComponent={};E$1.prototype.setState=function(o,e){if(typeof o!="object"&&typeof o!="function"&&o!=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,o,e,"setState")};E$1.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function F$1(){}F$1.prototype=E$1.prototype;function G$1(o,e,s){this.props=o,this.context=e,this.refs=D$1,this.updater=s||B$1}var H$1=G$1.prototype=new F$1;H$1.constructor=G$1;C$2(H$1,E$1.prototype);H$1.isPureReactComponent=!0;var I$2=Array.isArray,J=Object.prototype.hasOwnProperty,K$1={current:null},L$1={key:!0,ref:!0,__self:!0,__source:!0};function M$1(o,e,s){var a,c={},h=null,d=null;if(e!=null)for(a in e.ref!==void 0&&(d=e.ref),e.key!==void 0&&(h=""+e.key),e)J.call(e,a)&&!L$1.hasOwnProperty(a)&&(c[a]=e[a]);var g=arguments.length-2;if(g===1)c.children=s;else if(1<g){for(var _=Array(g),b=0;b<g;b++)_[b]=arguments[b+2];c.children=_}if(o&&o.defaultProps)for(a in g=o.defaultProps,g)c[a]===void 0&&(c[a]=g[a]);return{$$typeof:l$1,type:o,key:h,ref:d,props:c,_owner:K$1.current}}function N$1(o,e){return{$$typeof:l$1,type:o.type,key:e,ref:o.ref,props:o.props,_owner:o._owner}}function O$1(o){return typeof o=="object"&&o!==null&&o.$$typeof===l$1}function escape(o){var e={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(s){return e[s]})}var P$1=/\/+/g;function Q$1(o,e){return typeof o=="object"&&o!==null&&o.key!=null?escape(""+o.key):e.toString(36)}function R$1(o,e,s,a,c){var h=typeof o;(h==="undefined"||h==="boolean")&&(o=null);var d=!1;if(o===null)d=!0;else switch(h){case"string":case"number":d=!0;break;case"object":switch(o.$$typeof){case l$1:case n$1:d=!0}}if(d)return d=o,c=c(d),o=a===""?"."+Q$1(d,0):a,I$2(c)?(s="",o!=null&&(s=o.replace(P$1,"$&/")+"/"),R$1(c,e,s,"",function(b){return b})):c!=null&&(O$1(c)&&(c=N$1(c,s+(!c.key||d&&d.key===c.key?"":(""+c.key).replace(P$1,"$&/")+"/")+o)),e.push(c)),1;if(d=0,a=a===""?".":a+":",I$2(o))for(var g=0;g<o.length;g++){h=o[g];var _=a+Q$1(h,g);d+=R$1(h,e,s,_,c)}else if(_=A$1(o),typeof _=="function")for(o=_.call(o),g=0;!(h=o.next()).done;)h=h.value,_=a+Q$1(h,g++),d+=R$1(h,e,s,_,c);else if(h==="object")throw e=String(o),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return d}function S$1(o,e,s){if(o==null)return o;var a=[],c=0;return R$1(o,a,"","",function(h){return e.call(s,h,c++)}),a}function T$2(o){if(o._status===-1){var e=o._result;e=e(),e.then(function(s){(o._status===0||o._status===-1)&&(o._status=1,o._result=s)},function(s){(o._status===0||o._status===-1)&&(o._status=2,o._result=s)}),o._status===-1&&(o._status=0,o._result=e)}if(o._status===1)return o._result.default;throw o._result}var U$1={current:null},V$1={transition:null},W$1={ReactCurrentDispatcher:U$1,ReactCurrentBatchConfig:V$1,ReactCurrentOwner:K$1};react_production_min.Children={map:S$1,forEach:function(o,e,s){S$1(o,function(){e.apply(this,arguments)},s)},count:function(o){var e=0;return S$1(o,function(){e++}),e},toArray:function(o){return S$1(o,function(e){return e})||[]},only:function(o){if(!O$1(o))throw Error("React.Children.only expected to receive a single React element child.");return o}};react_production_min.Component=E$1;react_production_min.Fragment=p$3;react_production_min.Profiler=r;react_production_min.PureComponent=G$1;react_production_min.StrictMode=q$1;react_production_min.Suspense=w;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W$1;react_production_min.cloneElement=function(o,e,s){if(o==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+o+".");var a=C$2({},o.props),c=o.key,h=o.ref,d=o._owner;if(e!=null){if(e.ref!==void 0&&(h=e.ref,d=K$1.current),e.key!==void 0&&(c=""+e.key),o.type&&o.type.defaultProps)var g=o.type.defaultProps;for(_ in e)J.call(e,_)&&!L$1.hasOwnProperty(_)&&(a[_]=e[_]===void 0&&g!==void 0?g[_]:e[_])}var _=arguments.length-2;if(_===1)a.children=s;else if(1<_){g=Array(_);for(var b=0;b<_;b++)g[b]=arguments[b+2];a.children=g}return{$$typeof:l$1,type:o.type,key:c,ref:h,props:a,_owner:d}};react_production_min.createContext=function(o){return o={$$typeof:u,_currentValue:o,_currentValue2:o,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},o.Provider={$$typeof:t$2,_context:o},o.Consumer=o};react_production_min.createElement=M$1;react_production_min.createFactory=function(o){var e=M$1.bind(null,o);return e.type=o,e};react_production_min.createRef=function(){return{current:null}};react_production_min.forwardRef=function(o){return{$$typeof:v$1,render:o}};react_production_min.isValidElement=O$1;react_production_min.lazy=function(o){return{$$typeof:y,_payload:{_status:-1,_result:o},_init:T$2}};react_production_min.memo=function(o,e){return{$$typeof:x,type:o,compare:e===void 0?null:e}};react_production_min.startTransition=function(o){var e=V$1.transition;V$1.transition={};try{o()}finally{V$1.transition=e}};react_production_min.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};react_production_min.useCallback=function(o,e){return U$1.current.useCallback(o,e)};react_production_min.useContext=function(o){return U$1.current.useContext(o)};react_production_min.useDebugValue=function(){};react_production_min.useDeferredValue=function(o){return U$1.current.useDeferredValue(o)};react_production_min.useEffect=function(o,e){return U$1.current.useEffect(o,e)};react_production_min.useId=function(){return U$1.current.useId()};react_production_min.useImperativeHandle=function(o,e,s){return U$1.current.useImperativeHandle(o,e,s)};react_production_min.useInsertionEffect=function(o,e){return U$1.current.useInsertionEffect(o,e)};react_production_min.useLayoutEffect=function(o,e){return U$1.current.useLayoutEffect(o,e)};react_production_min.useMemo=function(o,e){return U$1.current.useMemo(o,e)};react_production_min.useReducer=function(o,e,s){return U$1.current.useReducer(o,e,s)};react_production_min.useRef=function(o){return U$1.current.useRef(o)};react_production_min.useState=function(o){return U$1.current.useState(o)};react_production_min.useSyncExternalStore=function(o,e,s){return U$1.current.useSyncExternalStore(o,e,s)};react_production_min.useTransition=function(){return U$1.current.useTransition()};react_production_min.version="18.2.0";(function(o){o.exports=react_production_min})(react);const React=getDefaultExportFromCjs(react.exports);var client={},reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(o){function e(dt,Dt){var Ct=dt.length;dt.push(Dt);e:for(;0<Ct;){var xt=Ct-1>>>1,Tt=dt[xt];if(0<c(Tt,Dt))dt[xt]=Dt,dt[Ct]=Tt,Ct=xt;else break e}}function s(dt){return dt.length===0?null:dt[0]}function a(dt){if(dt.length===0)return null;var Dt=dt[0],Ct=dt.pop();if(Ct!==Dt){dt[0]=Ct;e:for(var xt=0,Tt=dt.length,kt=Tt>>>1;xt<kt;){var _t=2*(xt+1)-1,Bt=dt[_t],Ft=_t+1,Lt=dt[Ft];if(0>c(Bt,Ct))Ft<Tt&&0>c(Lt,Bt)?(dt[xt]=Lt,dt[Ft]=Ct,xt=Ft):(dt[xt]=Bt,dt[_t]=Ct,xt=_t);else if(Ft<Tt&&0>c(Lt,Ct))dt[xt]=Lt,dt[Ft]=Ct,xt=Ft;else break e}}return Dt}function c(dt,Dt){var Ct=dt.sortIndex-Dt.sortIndex;return Ct!==0?Ct:dt.id-Dt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;o.unstable_now=function(){return h.now()}}else{var d=Date,g=d.now();o.unstable_now=function(){return d.now()-g}}var _=[],b=[],$=1,j=null,_e=3,et=!1,tt=!1,nt=!1,st=typeof setTimeout=="function"?setTimeout:null,rt=typeof clearTimeout=="function"?clearTimeout:null,it=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function at(dt){for(var Dt=s(b);Dt!==null;){if(Dt.callback===null)a(b);else if(Dt.startTime<=dt)a(b),Dt.sortIndex=Dt.expirationTime,e(_,Dt);else break;Dt=s(b)}}function ot(dt){if(nt=!1,at(dt),!tt)if(s(_)!==null)tt=!0,St(ut);else{var Dt=s(b);Dt!==null&&At(ot,Dt.startTime-dt)}}function ut(dt,Dt){tt=!1,nt&&(nt=!1,rt(lt),lt=-1),et=!0;var Ct=_e;try{for(at(Dt),j=s(_);j!==null&&(!(j.expirationTime>Dt)||dt&&!gt());){var xt=j.callback;if(typeof xt=="function"){j.callback=null,_e=j.priorityLevel;var Tt=xt(j.expirationTime<=Dt);Dt=o.unstable_now(),typeof Tt=="function"?j.callback=Tt:j===s(_)&&a(_),at(Dt)}else a(_);j=s(_)}if(j!==null)var kt=!0;else{var _t=s(b);_t!==null&&At(ot,_t.startTime-Dt),kt=!1}return kt}finally{j=null,_e=Ct,et=!1}}var ct=!1,ht=null,lt=-1,pt=5,ft=-1;function gt(){return!(o.unstable_now()-ft<pt)}function yt(){if(ht!==null){var dt=o.unstable_now();ft=dt;var Dt=!0;try{Dt=ht(!0,dt)}finally{Dt?mt():(ct=!1,ht=null)}}else ct=!1}var mt;if(typeof it=="function")mt=function(){it(yt)};else if(typeof MessageChannel<"u"){var Et=new MessageChannel,Ot=Et.port2;Et.port1.onmessage=yt,mt=function(){Ot.postMessage(null)}}else mt=function(){st(yt,0)};function St(dt){ht=dt,ct||(ct=!0,mt())}function At(dt,Dt){lt=st(function(){dt(o.unstable_now())},Dt)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(dt){dt.callback=null},o.unstable_continueExecution=function(){tt||et||(tt=!0,St(ut))},o.unstable_forceFrameRate=function(dt){0>dt||125<dt?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pt=0<dt?Math.floor(1e3/dt):5},o.unstable_getCurrentPriorityLevel=function(){return _e},o.unstable_getFirstCallbackNode=function(){return s(_)},o.unstable_next=function(dt){switch(_e){case 1:case 2:case 3:var Dt=3;break;default:Dt=_e}var Ct=_e;_e=Dt;try{return dt()}finally{_e=Ct}},o.unstable_pauseExecution=function(){},o.unstable_requestPaint=function(){},o.unstable_runWithPriority=function(dt,Dt){switch(dt){case 1:case 2:case 3:case 4:case 5:break;default:dt=3}var Ct=_e;_e=dt;try{return Dt()}finally{_e=Ct}},o.unstable_scheduleCallback=function(dt,Dt,Ct){var xt=o.unstable_now();switch(typeof Ct=="object"&&Ct!==null?(Ct=Ct.delay,Ct=typeof Ct=="number"&&0<Ct?xt+Ct:xt):Ct=xt,dt){case 1:var Tt=-1;break;case 2:Tt=250;break;case 5:Tt=1073741823;break;case 4:Tt=1e4;break;default:Tt=5e3}return Tt=Ct+Tt,dt={id:$++,callback:Dt,priorityLevel:dt,startTime:Ct,expirationTime:Tt,sortIndex:-1},Ct>xt?(dt.sortIndex=Ct,e(b,dt),s(_)===null&&dt===s(b)&&(nt?(rt(lt),lt=-1):nt=!0,At(ot,Ct-xt))):(dt.sortIndex=Tt,e(_,dt),tt||et||(tt=!0,St(ut))),dt},o.unstable_shouldYield=gt,o.unstable_wrapCallback=function(dt){var Dt=_e;return function(){var Ct=_e;_e=Dt;try{return dt.apply(this,arguments)}finally{_e=Ct}}}})(scheduler_production_min);(function(o){o.exports=scheduler_production_min})(scheduler);/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var aa=react.exports,ca=scheduler.exports;function p$2(o){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+o,s=1;s<arguments.length;s++)e+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+o+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da=new Set,ea={};function fa(o,e){ha(o,e),ha(o+"Capture",e)}function ha(o,e){for(ea[o]=e,o=0;o<e.length;o++)da.add(e[o])}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja=Object.prototype.hasOwnProperty,ka=/^[: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]*$/,la={},ma={};function oa(o){return ja.call(ma,o)?!0:ja.call(la,o)?!1:ka.test(o)?ma[o]=!0:(la[o]=!0,!1)}function pa(o,e,s,a){if(s!==null&&s.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return a?!1:s!==null?!s.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function qa(o,e,s,a){if(e===null||typeof e>"u"||pa(o,e,s,a))return!0;if(a)return!1;if(s!==null)switch(s.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 v(o,e,s,a,c,h,d){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=o,this.type=e,this.sanitizeURL=h,this.removeEmptyString=d}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){z[o]=new v(o,0,!1,o,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var e=o[0];z[e]=new v(e,1,!1,o[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(o){z[o]=new v(o,2,!1,o.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){z[o]=new v(o,2,!1,o,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(o){z[o]=new v(o,3,!1,o.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(o){z[o]=new v(o,3,!0,o,null,!1,!1)});["capture","download"].forEach(function(o){z[o]=new v(o,4,!1,o,null,!1,!1)});["cols","rows","size","span"].forEach(function(o){z[o]=new v(o,6,!1,o,null,!1,!1)});["rowSpan","start"].forEach(function(o){z[o]=new v(o,5,!1,o.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(o){return o[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(o){var e=o.replace(ra,sa);z[e]=new v(e,1,!1,o,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var e=o.replace(ra,sa);z[e]=new v(e,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(o){var e=o.replace(ra,sa);z[e]=new v(e,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(o){z[o]=new v(o,1,!1,o.toLowerCase(),null,!1,!1)});z.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(o){z[o]=new v(o,1,!1,o.toLowerCase(),null,!0,!0)});function ta(o,e,s,a){var c=z.hasOwnProperty(e)?z[e]:null;(c!==null?c.type!==0:a||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(qa(e,s,c,a)&&(s=null),a||c===null?oa(e)&&(s===null?o.removeAttribute(e):o.setAttribute(e,""+s)):c.mustUseProperty?o[c.propertyName]=s===null?c.type===3?!1:"":s:(e=c.attributeName,a=c.attributeNamespace,s===null?o.removeAttribute(e):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,a?o.setAttributeNS(a,e,s):o.setAttribute(e,s))))}var ua=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va=Symbol.for("react.element"),wa=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),za=Symbol.for("react.strict_mode"),Aa=Symbol.for("react.profiler"),Ba=Symbol.for("react.provider"),Ca=Symbol.for("react.context"),Da=Symbol.for("react.forward_ref"),Ea=Symbol.for("react.suspense"),Fa=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),Ha=Symbol.for("react.lazy"),Ia=Symbol.for("react.offscreen"),Ja=Symbol.iterator;function Ka(o){return o===null||typeof o!="object"?null:(o=Ja&&o[Ja]||o["@@iterator"],typeof o=="function"?o:null)}var A=Object.assign,La;function Ma(o){if(La===void 0)try{throw Error()}catch(s){var e=s.stack.trim().match(/\n( *(at )?)/);La=e&&e[1]||""}return`
|
||
`+La+o}var Na=!1;function Oa(o,e){if(!o||Na)return"";Na=!0;var s=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(b){var a=b}Reflect.construct(o,[],e)}else{try{e.call()}catch(b){a=b}o.call(e.prototype)}else{try{throw Error()}catch(b){a=b}o()}}catch(b){if(b&&a&&typeof b.stack=="string"){for(var c=b.stack.split(`
|
||
`),h=a.stack.split(`
|
||
`),d=c.length-1,g=h.length-1;1<=d&&0<=g&&c[d]!==h[g];)g--;for(;1<=d&&0<=g;d--,g--)if(c[d]!==h[g]){if(d!==1||g!==1)do if(d--,g--,0>g||c[d]!==h[g]){var _=`
|
||
`+c[d].replace(" at new "," at ");return o.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",o.displayName)),_}while(1<=d&&0<=g);break}}}finally{Na=!1,Error.prepareStackTrace=s}return(o=o?o.displayName||o.name:"")?Ma(o):""}function Pa(o){switch(o.tag){case 5:return Ma(o.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return o=Oa(o.type,!1),o;case 11:return o=Oa(o.type.render,!1),o;case 1:return o=Oa(o.type,!0),o;default:return""}}function Qa(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case Ca:return(o.displayName||"Context")+".Consumer";case Ba:return(o._context.displayName||"Context")+".Provider";case Da:var e=o.render;return o=o.displayName,o||(o=e.displayName||e.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case Ga:return e=o.displayName||null,e!==null?e:Qa(o.type)||"Memo";case Ha:e=o._payload,o=o._init;try{return Qa(o(e))}catch{}}return null}function Ra(o){var e=o.type;switch(o.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 o=e.render,o=o.displayName||o.name||"",e.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(e);case 8:return e===za?"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 Sa(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Ta(o){var e=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ua(o){var e=Ta(o)?"checked":"value",s=Object.getOwnPropertyDescriptor(o.constructor.prototype,e),a=""+o[e];if(!o.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,h=s.set;return Object.defineProperty(o,e,{configurable:!0,get:function(){return c.call(this)},set:function(d){a=""+d,h.call(this,d)}}),Object.defineProperty(o,e,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(d){a=""+d},stopTracking:function(){o._valueTracker=null,delete o[e]}}}}function Va(o){o._valueTracker||(o._valueTracker=Ua(o))}function Wa(o){if(!o)return!1;var e=o._valueTracker;if(!e)return!0;var s=e.getValue(),a="";return o&&(a=Ta(o)?o.checked?"true":"false":o.value),o=a,o!==s?(e.setValue(o),!0):!1}function Xa(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Ya(o,e){var s=e.checked;return A({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s!=null?s:o._wrapperState.initialChecked})}function Za(o,e){var s=e.defaultValue==null?"":e.defaultValue,a=e.checked!=null?e.checked:e.defaultChecked;s=Sa(e.value!=null?e.value:s),o._wrapperState={initialChecked:a,initialValue:s,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ab(o,e){e=e.checked,e!=null&&ta(o,"checked",e,!1)}function bb(o,e){ab(o,e);var s=Sa(e.value),a=e.type;if(s!=null)a==="number"?(s===0&&o.value===""||o.value!=s)&&(o.value=""+s):o.value!==""+s&&(o.value=""+s);else if(a==="submit"||a==="reset"){o.removeAttribute("value");return}e.hasOwnProperty("value")?cb(o,e.type,s):e.hasOwnProperty("defaultValue")&&cb(o,e.type,Sa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(o.defaultChecked=!!e.defaultChecked)}function db(o,e,s){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var a=e.type;if(!(a!=="submit"&&a!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+o._wrapperState.initialValue,s||e===o.value||(o.value=e),o.defaultValue=e}s=o.name,s!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,s!==""&&(o.name=s)}function cb(o,e,s){(e!=="number"||Xa(o.ownerDocument)!==o)&&(s==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+s&&(o.defaultValue=""+s))}var eb=Array.isArray;function fb(o,e,s,a){if(o=o.options,e){e={};for(var c=0;c<s.length;c++)e["$"+s[c]]=!0;for(s=0;s<o.length;s++)c=e.hasOwnProperty("$"+o[s].value),o[s].selected!==c&&(o[s].selected=c),c&&a&&(o[s].defaultSelected=!0)}else{for(s=""+Sa(s),e=null,c=0;c<o.length;c++){if(o[c].value===s){o[c].selected=!0,a&&(o[c].defaultSelected=!0);return}e!==null||o[c].disabled||(e=o[c])}e!==null&&(e.selected=!0)}}function gb(o,e){if(e.dangerouslySetInnerHTML!=null)throw Error(p$2(91));return A({},e,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function hb(o,e){var s=e.value;if(s==null){if(s=e.children,e=e.defaultValue,s!=null){if(e!=null)throw Error(p$2(92));if(eb(s)){if(1<s.length)throw Error(p$2(93));s=s[0]}e=s}e==null&&(e=""),s=e}o._wrapperState={initialValue:Sa(s)}}function ib(o,e){var s=Sa(e.value),a=Sa(e.defaultValue);s!=null&&(s=""+s,s!==o.value&&(o.value=s),e.defaultValue==null&&o.defaultValue!==s&&(o.defaultValue=s)),a!=null&&(o.defaultValue=""+a)}function jb(o){var e=o.textContent;e===o._wrapperState.initialValue&&e!==""&&e!==null&&(o.value=e)}function kb(o){switch(o){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 lb(o,e){return o==null||o==="http://www.w3.org/1999/xhtml"?kb(e):o==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var mb,nb=function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,s,a,c){MSApp.execUnsafeLocalFunction(function(){return o(e,s,a,c)})}:o}(function(o,e){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=e;else{for(mb=mb||document.createElement("div"),mb.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=mb.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;e.firstChild;)o.appendChild(e.firstChild)}});function ob(o,e){if(e){var s=o.firstChild;if(s&&s===o.lastChild&&s.nodeType===3){s.nodeValue=e;return}}o.textContent=e}var pb={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},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(o){qb.forEach(function(e){e=e+o.charAt(0).toUpperCase()+o.substring(1),pb[e]=pb[o]})});function rb(o,e,s){return e==null||typeof e=="boolean"||e===""?"":s||typeof e!="number"||e===0||pb.hasOwnProperty(o)&&pb[o]?(""+e).trim():e+"px"}function sb(o,e){o=o.style;for(var s in e)if(e.hasOwnProperty(s)){var a=s.indexOf("--")===0,c=rb(s,e[s],a);s==="float"&&(s="cssFloat"),a?o.setProperty(s,c):o[s]=c}}var tb=A({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 ub(o,e){if(e){if(tb[o]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(p$2(137,o));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(p$2(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(p$2(61))}if(e.style!=null&&typeof e.style!="object")throw Error(p$2(62))}}function vb(o,e){if(o.indexOf("-")===-1)return typeof e.is=="string";switch(o){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 wb=null;function xb(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var yb=null,zb=null,Ab=null;function Bb(o){if(o=Cb(o)){if(typeof yb!="function")throw Error(p$2(280));var e=o.stateNode;e&&(e=Db(e),yb(o.stateNode,o.type,e))}}function Eb(o){zb?Ab?Ab.push(o):Ab=[o]:zb=o}function Fb(){if(zb){var o=zb,e=Ab;if(Ab=zb=null,Bb(o),e)for(o=0;o<e.length;o++)Bb(e[o])}}function Gb(o,e){return o(e)}function Hb(){}var Ib=!1;function Jb(o,e,s){if(Ib)return o(e,s);Ib=!0;try{return Gb(o,e,s)}finally{Ib=!1,(zb!==null||Ab!==null)&&(Hb(),Fb())}}function Kb(o,e){var s=o.stateNode;if(s===null)return null;var a=Db(s);if(a===null)return null;s=a[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":(a=!a.disabled)||(o=o.type,a=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!a;break e;default:o=!1}if(o)return null;if(s&&typeof s!="function")throw Error(p$2(231,e,typeof s));return s}var Lb=!1;if(ia)try{var Mb={};Object.defineProperty(Mb,"passive",{get:function(){Lb=!0}}),window.addEventListener("test",Mb,Mb),window.removeEventListener("test",Mb,Mb)}catch{Lb=!1}function Nb(o,e,s,a,c,h,d,g,_){var b=Array.prototype.slice.call(arguments,3);try{e.apply(s,b)}catch($){this.onError($)}}var Ob=!1,Pb=null,Qb=!1,Rb=null,Sb={onError:function(o){Ob=!0,Pb=o}};function Tb(o,e,s,a,c,h,d,g,_){Ob=!1,Pb=null,Nb.apply(Sb,arguments)}function Ub(o,e,s,a,c,h,d,g,_){if(Tb.apply(this,arguments),Ob){if(Ob){var b=Pb;Ob=!1,Pb=null}else throw Error(p$2(198));Qb||(Qb=!0,Rb=b)}}function Vb(o){var e=o,s=o;if(o.alternate)for(;e.return;)e=e.return;else{o=e;do e=o,(e.flags&4098)!==0&&(s=e.return),o=e.return;while(o)}return e.tag===3?s:null}function Wb(o){if(o.tag===13){var e=o.memoizedState;if(e===null&&(o=o.alternate,o!==null&&(e=o.memoizedState)),e!==null)return e.dehydrated}return null}function Xb(o){if(Vb(o)!==o)throw Error(p$2(188))}function Yb(o){var e=o.alternate;if(!e){if(e=Vb(o),e===null)throw Error(p$2(188));return e!==o?null:o}for(var s=o,a=e;;){var c=s.return;if(c===null)break;var h=c.alternate;if(h===null){if(a=c.return,a!==null){s=a;continue}break}if(c.child===h.child){for(h=c.child;h;){if(h===s)return Xb(c),o;if(h===a)return Xb(c),e;h=h.sibling}throw Error(p$2(188))}if(s.return!==a.return)s=c,a=h;else{for(var d=!1,g=c.child;g;){if(g===s){d=!0,s=c,a=h;break}if(g===a){d=!0,a=c,s=h;break}g=g.sibling}if(!d){for(g=h.child;g;){if(g===s){d=!0,s=h,a=c;break}if(g===a){d=!0,a=h,s=c;break}g=g.sibling}if(!d)throw Error(p$2(189))}}if(s.alternate!==a)throw Error(p$2(190))}if(s.tag!==3)throw Error(p$2(188));return s.stateNode.current===s?o:e}function Zb(o){return o=Yb(o),o!==null?$b(o):null}function $b(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var e=$b(o);if(e!==null)return e;o=o.sibling}return null}var ac=ca.unstable_scheduleCallback,bc=ca.unstable_cancelCallback,cc=ca.unstable_shouldYield,dc=ca.unstable_requestPaint,B=ca.unstable_now,ec=ca.unstable_getCurrentPriorityLevel,fc=ca.unstable_ImmediatePriority,gc=ca.unstable_UserBlockingPriority,hc=ca.unstable_NormalPriority,ic=ca.unstable_LowPriority,jc=ca.unstable_IdlePriority,kc=null,lc=null;function mc(o){if(lc&&typeof lc.onCommitFiberRoot=="function")try{lc.onCommitFiberRoot(kc,o,void 0,(o.current.flags&128)===128)}catch{}}var oc=Math.clz32?Math.clz32:nc,pc=Math.log,qc=Math.LN2;function nc(o){return o>>>=0,o===0?32:31-(pc(o)/qc|0)|0}var rc=64,sc=4194304;function tc(o){switch(o&-o){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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function uc(o,e){var s=o.pendingLanes;if(s===0)return 0;var a=0,c=o.suspendedLanes,h=o.pingedLanes,d=s&268435455;if(d!==0){var g=d&~c;g!==0?a=tc(g):(h&=d,h!==0&&(a=tc(h)))}else d=s&~c,d!==0?a=tc(d):h!==0&&(a=tc(h));if(a===0)return 0;if(e!==0&&e!==a&&(e&c)===0&&(c=a&-a,h=e&-e,c>=h||c===16&&(h&4194240)!==0))return e;if((a&4)!==0&&(a|=s&16),e=o.entangledLanes,e!==0)for(o=o.entanglements,e&=a;0<e;)s=31-oc(e),c=1<<s,a|=o[s],e&=~c;return a}function vc(o,e){switch(o){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 wc(o,e){for(var s=o.suspendedLanes,a=o.pingedLanes,c=o.expirationTimes,h=o.pendingLanes;0<h;){var d=31-oc(h),g=1<<d,_=c[d];_===-1?((g&s)===0||(g&a)!==0)&&(c[d]=vc(g,e)):_<=e&&(o.expiredLanes|=g),h&=~g}}function xc(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function yc(){var o=rc;return rc<<=1,(rc&4194240)===0&&(rc=64),o}function zc(o){for(var e=[],s=0;31>s;s++)e.push(o);return e}function Ac(o,e,s){o.pendingLanes|=e,e!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,e=31-oc(e),o[e]=s}function Bc(o,e){var s=o.pendingLanes&~e;o.pendingLanes=e,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=e,o.mutableReadLanes&=e,o.entangledLanes&=e,e=o.entanglements;var a=o.eventTimes;for(o=o.expirationTimes;0<s;){var c=31-oc(s),h=1<<c;e[c]=0,a[c]=-1,o[c]=-1,s&=~h}}function Cc(o,e){var s=o.entangledLanes|=e;for(o=o.entanglements;s;){var a=31-oc(s),c=1<<a;c&e|o[a]&e&&(o[a]|=e),s&=~c}}var C$1=0;function Dc(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var Ec,Fc,Gc,Hc,Ic,Jc=!1,Kc=[],Lc=null,Mc=null,Nc=null,Oc=new Map,Pc=new Map,Qc=[],Rc="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 Sc(o,e){switch(o){case"focusin":case"focusout":Lc=null;break;case"dragenter":case"dragleave":Mc=null;break;case"mouseover":case"mouseout":Nc=null;break;case"pointerover":case"pointerout":Oc.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pc.delete(e.pointerId)}}function Tc(o,e,s,a,c,h){return o===null||o.nativeEvent!==h?(o={blockedOn:e,domEventName:s,eventSystemFlags:a,nativeEvent:h,targetContainers:[c]},e!==null&&(e=Cb(e),e!==null&&Fc(e)),o):(o.eventSystemFlags|=a,e=o.targetContainers,c!==null&&e.indexOf(c)===-1&&e.push(c),o)}function Uc(o,e,s,a,c){switch(e){case"focusin":return Lc=Tc(Lc,o,e,s,a,c),!0;case"dragenter":return Mc=Tc(Mc,o,e,s,a,c),!0;case"mouseover":return Nc=Tc(Nc,o,e,s,a,c),!0;case"pointerover":var h=c.pointerId;return Oc.set(h,Tc(Oc.get(h)||null,o,e,s,a,c)),!0;case"gotpointercapture":return h=c.pointerId,Pc.set(h,Tc(Pc.get(h)||null,o,e,s,a,c)),!0}return!1}function Vc(o){var e=Wc(o.target);if(e!==null){var s=Vb(e);if(s!==null){if(e=s.tag,e===13){if(e=Wb(s),e!==null){o.blockedOn=e,Ic(o.priority,function(){Gc(s)});return}}else if(e===3&&s.stateNode.current.memoizedState.isDehydrated){o.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Xc(o){if(o.blockedOn!==null)return!1;for(var e=o.targetContainers;0<e.length;){var s=Yc(o.domEventName,o.eventSystemFlags,e[0],o.nativeEvent);if(s===null){s=o.nativeEvent;var a=new s.constructor(s.type,s);wb=a,s.target.dispatchEvent(a),wb=null}else return e=Cb(s),e!==null&&Fc(e),o.blockedOn=s,!1;e.shift()}return!0}function Zc(o,e,s){Xc(o)&&s.delete(e)}function $c(){Jc=!1,Lc!==null&&Xc(Lc)&&(Lc=null),Mc!==null&&Xc(Mc)&&(Mc=null),Nc!==null&&Xc(Nc)&&(Nc=null),Oc.forEach(Zc),Pc.forEach(Zc)}function ad(o,e){o.blockedOn===e&&(o.blockedOn=null,Jc||(Jc=!0,ca.unstable_scheduleCallback(ca.unstable_NormalPriority,$c)))}function bd(o){function e(c){return ad(c,o)}if(0<Kc.length){ad(Kc[0],o);for(var s=1;s<Kc.length;s++){var a=Kc[s];a.blockedOn===o&&(a.blockedOn=null)}}for(Lc!==null&&ad(Lc,o),Mc!==null&&ad(Mc,o),Nc!==null&&ad(Nc,o),Oc.forEach(e),Pc.forEach(e),s=0;s<Qc.length;s++)a=Qc[s],a.blockedOn===o&&(a.blockedOn=null);for(;0<Qc.length&&(s=Qc[0],s.blockedOn===null);)Vc(s),s.blockedOn===null&&Qc.shift()}var cd=ua.ReactCurrentBatchConfig,dd=!0;function ed(o,e,s,a){var c=C$1,h=cd.transition;cd.transition=null;try{C$1=1,fd(o,e,s,a)}finally{C$1=c,cd.transition=h}}function gd(o,e,s,a){var c=C$1,h=cd.transition;cd.transition=null;try{C$1=4,fd(o,e,s,a)}finally{C$1=c,cd.transition=h}}function fd(o,e,s,a){if(dd){var c=Yc(o,e,s,a);if(c===null)hd(o,e,a,id$2,s),Sc(o,a);else if(Uc(c,o,e,s,a))a.stopPropagation();else if(Sc(o,a),e&4&&-1<Rc.indexOf(o)){for(;c!==null;){var h=Cb(c);if(h!==null&&Ec(h),h=Yc(o,e,s,a),h===null&&hd(o,e,a,id$2,s),h===c)break;c=h}c!==null&&a.stopPropagation()}else hd(o,e,a,null,s)}}var id$2=null;function Yc(o,e,s,a){if(id$2=null,o=xb(a),o=Wc(o),o!==null)if(e=Vb(o),e===null)o=null;else if(s=e.tag,s===13){if(o=Wb(e),o!==null)return o;o=null}else if(s===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;o=null}else e!==o&&(o=null);return id$2=o,null}function jd(o){switch(o){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(ec()){case fc:return 1;case gc:return 4;case hc:case ic:return 16;case jc:return 536870912;default:return 16}default:return 16}}var kd=null,ld=null,md=null;function nd(){if(md)return md;var o,e=ld,s=e.length,a,c="value"in kd?kd.value:kd.textContent,h=c.length;for(o=0;o<s&&e[o]===c[o];o++);var d=s-o;for(a=1;a<=d&&e[s-a]===c[h-a];a++);return md=c.slice(o,1<a?1-a:void 0)}function od(o){var e=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&e===13&&(o=13)):o=e,o===10&&(o=13),32<=o||o===13?o:0}function pd(){return!0}function qd(){return!1}function rd(o){function e(s,a,c,h,d){this._reactName=s,this._targetInst=c,this.type=a,this.nativeEvent=h,this.target=d,this.currentTarget=null;for(var g in o)o.hasOwnProperty(g)&&(s=o[g],this[g]=s?s(h):h[g]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?pd:qd,this.isPropagationStopped=qd,this}return A(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),e}var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=A({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=A({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==yd&&(yd&&o.type==="mousemove"?(wd=o.screenX-yd.screenX,xd=o.screenY-yd.screenY):xd=wd=0,yd=o),wd)},movementY:function(o){return"movementY"in o?o.movementY:xd}}),Bd=rd(Ad),Cd=A({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=A({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=A({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=A({},sd,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=A({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={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"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(o){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(o):(o=Od[o])?!!e[o]:!1}function zd(){return Pd}var Qd=A({},ud,{key:function(o){if(o.key){var e=Md[o.key]||o.key;if(e!=="Unidentified")return e}return o.type==="keypress"?(o=od(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?Nd[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(o){return o.type==="keypress"?od(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?od(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),Rd=rd(Qd),Sd=A({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=A({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=A({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=A({},Ad,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=ia&&"CompositionEvent"in window,be=null;ia&&"documentMode"in document&&(be=document.documentMode);var ce=ia&&"TextEvent"in window&&!be,de=ia&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1;function ge(o,e){switch(o){case"keyup":return $d.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var ie$2=!1;function je(o,e){switch(o){case"compositionend":return he(e);case"keypress":return e.which!==32?null:(fe=!0,ee);case"textInput":return o=e.data,o===ee&&fe?null:o;default:return null}}function ke(o,e){if(ie$2)return o==="compositionend"||!ae&&ge(o,e)?(o=nd(),md=ld=kd=null,ie$2=!1,o):null;switch(o){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 de&&e.locale!=="ko"?null:e.data;default:return null}}var le={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 me(o){var e=o&&o.nodeName&&o.nodeName.toLowerCase();return e==="input"?!!le[o.type]:e==="textarea"}function ne(o,e,s,a){Eb(a),e=oe(e,"onChange"),0<e.length&&(s=new td("onChange","change",null,s,a),o.push({event:s,listeners:e}))}var pe=null,qe=null;function re(o){se(o,0)}function te(o){var e=ue(o);if(Wa(e))return o}function ve(o,e){if(o==="change")return e}var we=!1;if(ia){var xe;if(ia){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;"),ye=typeof ze.oninput=="function"}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(o){if(o.propertyName==="value"&&te(qe)){var e=[];ne(e,qe,o,xb(o)),Jb(re,e)}}function Ce(o,e,s){o==="focusin"?(Ae(),pe=e,qe=s,pe.attachEvent("onpropertychange",Be)):o==="focusout"&&Ae()}function De(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return te(qe)}function Ee(o,e){if(o==="click")return te(e)}function Fe(o,e){if(o==="input"||o==="change")return te(e)}function Ge(o,e){return o===e&&(o!==0||1/o===1/e)||o!==o&&e!==e}var He=typeof Object.is=="function"?Object.is:Ge;function Ie(o,e){if(He(o,e))return!0;if(typeof o!="object"||o===null||typeof e!="object"||e===null)return!1;var s=Object.keys(o),a=Object.keys(e);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var c=s[a];if(!ja.call(e,c)||!He(o[c],e[c]))return!1}return!0}function Je(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Ke(o,e){var s=Je(o);o=0;for(var a;s;){if(s.nodeType===3){if(a=o+s.textContent.length,o<=e&&a>=e)return{node:s,offset:e-o};o=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Je(s)}}function Le(o,e){return o&&e?o===e?!0:o&&o.nodeType===3?!1:e&&e.nodeType===3?Le(o,e.parentNode):"contains"in o?o.contains(e):o.compareDocumentPosition?!!(o.compareDocumentPosition(e)&16):!1:!1}function Me(){for(var o=window,e=Xa();e instanceof o.HTMLIFrameElement;){try{var s=typeof e.contentWindow.location.href=="string"}catch{s=!1}if(s)o=e.contentWindow;else break;e=Xa(o.document)}return e}function Ne(o){var e=o&&o.nodeName&&o.nodeName.toLowerCase();return e&&(e==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||e==="textarea"||o.contentEditable==="true")}function Oe(o){var e=Me(),s=o.focusedElem,a=o.selectionRange;if(e!==s&&s&&s.ownerDocument&&Le(s.ownerDocument.documentElement,s)){if(a!==null&&Ne(s)){if(e=a.start,o=a.end,o===void 0&&(o=e),"selectionStart"in s)s.selectionStart=e,s.selectionEnd=Math.min(o,s.value.length);else if(o=(e=s.ownerDocument||document)&&e.defaultView||window,o.getSelection){o=o.getSelection();var c=s.textContent.length,h=Math.min(a.start,c);a=a.end===void 0?h:Math.min(a.end,c),!o.extend&&h>a&&(c=a,a=h,h=c),c=Ke(s,h);var d=Ke(s,a);c&&d&&(o.rangeCount!==1||o.anchorNode!==c.node||o.anchorOffset!==c.offset||o.focusNode!==d.node||o.focusOffset!==d.offset)&&(e=e.createRange(),e.setStart(c.node,c.offset),o.removeAllRanges(),h>a?(o.addRange(e),o.extend(d.node,d.offset)):(e.setEnd(d.node,d.offset),o.addRange(e)))}}for(e=[],o=s;o=o.parentNode;)o.nodeType===1&&e.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<e.length;s++)o=e[s],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var Pe=ia&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(o,e,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Te||Qe==null||Qe!==Xa(a)||(a=Qe,"selectionStart"in a&&Ne(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Se&&Ie(Se,a)||(Se=a,a=oe(Re,"onSelect"),0<a.length&&(e=new td("onSelect","select",null,e,s),o.push({event:e,listeners:a}),e.target=Qe)))}function Ve(o,e){var s={};return s[o.toLowerCase()]=e.toLowerCase(),s["Webkit"+o]="webkit"+e,s["Moz"+o]="moz"+e,s}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Xe={},Ye={};ia&&(Ye=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);function Ze(o){if(Xe[o])return Xe[o];if(!We[o])return o;var e=We[o],s;for(s in e)if(e.hasOwnProperty(s)&&s in Ye)return Xe[o]=e[s];return o}var $e=Ze("animationend"),af=Ze("animationiteration"),bf=Ze("animationstart"),cf=Ze("transitionend"),df=new Map,ef="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 ff(o,e){df.set(o,e),fa(e,[o])}for(var gf=0;gf<ef.length;gf++){var hf=ef[gf],jf=hf.toLowerCase(),kf=hf[0].toUpperCase()+hf.slice(1);ff(jf,"on"+kf)}ff($e,"onAnimationEnd");ff(af,"onAnimationIteration");ff(bf,"onAnimationStart");ff("dblclick","onDoubleClick");ff("focusin","onFocus");ff("focusout","onBlur");ff(cf,"onTransitionEnd");ha("onMouseEnter",["mouseout","mouseover"]);ha("onMouseLeave",["mouseout","mouseover"]);ha("onPointerEnter",["pointerout","pointerover"]);ha("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf="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(" "),mf=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));function nf(o,e,s){var a=o.type||"unknown-event";o.currentTarget=s,Ub(a,e,void 0,o),o.currentTarget=null}function se(o,e){e=(e&4)!==0;for(var s=0;s<o.length;s++){var a=o[s],c=a.event;a=a.listeners;e:{var h=void 0;if(e)for(var d=a.length-1;0<=d;d--){var g=a[d],_=g.instance,b=g.currentTarget;if(g=g.listener,_!==h&&c.isPropagationStopped())break e;nf(c,g,b),h=_}else for(d=0;d<a.length;d++){if(g=a[d],_=g.instance,b=g.currentTarget,g=g.listener,_!==h&&c.isPropagationStopped())break e;nf(c,g,b),h=_}}}if(Qb)throw o=Rb,Qb=!1,Rb=null,o}function D(o,e){var s=e[of];s===void 0&&(s=e[of]=new Set);var a=o+"__bubble";s.has(a)||(pf(e,o,2,!1),s.add(a))}function qf(o,e,s){var a=0;e&&(a|=4),pf(s,o,a,e)}var rf="_reactListening"+Math.random().toString(36).slice(2);function sf(o){if(!o[rf]){o[rf]=!0,da.forEach(function(s){s!=="selectionchange"&&(mf.has(s)||qf(s,!1,o),qf(s,!0,o))});var e=o.nodeType===9?o:o.ownerDocument;e===null||e[rf]||(e[rf]=!0,qf("selectionchange",!1,e))}}function pf(o,e,s,a){switch(jd(e)){case 1:var c=ed;break;case 4:c=gd;break;default:c=fd}s=c.bind(null,e,s,o),c=void 0,!Lb||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(c=!0),a?c!==void 0?o.addEventListener(e,s,{capture:!0,passive:c}):o.addEventListener(e,s,!0):c!==void 0?o.addEventListener(e,s,{passive:c}):o.addEventListener(e,s,!1)}function hd(o,e,s,a,c){var h=a;if((e&1)===0&&(e&2)===0&&a!==null)e:for(;;){if(a===null)return;var d=a.tag;if(d===3||d===4){var g=a.stateNode.containerInfo;if(g===c||g.nodeType===8&&g.parentNode===c)break;if(d===4)for(d=a.return;d!==null;){var _=d.tag;if((_===3||_===4)&&(_=d.stateNode.containerInfo,_===c||_.nodeType===8&&_.parentNode===c))return;d=d.return}for(;g!==null;){if(d=Wc(g),d===null)return;if(_=d.tag,_===5||_===6){a=h=d;continue e}g=g.parentNode}}a=a.return}Jb(function(){var b=h,$=xb(s),j=[];e:{var _e=df.get(o);if(_e!==void 0){var et=td,tt=o;switch(o){case"keypress":if(od(s)===0)break e;case"keydown":case"keyup":et=Rd;break;case"focusin":tt="focus",et=Fd;break;case"focusout":tt="blur",et=Fd;break;case"beforeblur":case"afterblur":et=Fd;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":et=Bd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":et=Dd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":et=Vd;break;case $e:case af:case bf:et=Hd;break;case cf:et=Xd;break;case"scroll":et=vd;break;case"wheel":et=Zd;break;case"copy":case"cut":case"paste":et=Jd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":et=Td}var nt=(e&4)!==0,st=!nt&&o==="scroll",rt=nt?_e!==null?_e+"Capture":null:_e;nt=[];for(var it=b,at;it!==null;){at=it;var ot=at.stateNode;if(at.tag===5&&ot!==null&&(at=ot,rt!==null&&(ot=Kb(it,rt),ot!=null&&nt.push(tf(it,ot,at)))),st)break;it=it.return}0<nt.length&&(_e=new et(_e,tt,null,s,$),j.push({event:_e,listeners:nt}))}}if((e&7)===0){e:{if(_e=o==="mouseover"||o==="pointerover",et=o==="mouseout"||o==="pointerout",_e&&s!==wb&&(tt=s.relatedTarget||s.fromElement)&&(Wc(tt)||tt[uf]))break e;if((et||_e)&&(_e=$.window===$?$:(_e=$.ownerDocument)?_e.defaultView||_e.parentWindow:window,et?(tt=s.relatedTarget||s.toElement,et=b,tt=tt?Wc(tt):null,tt!==null&&(st=Vb(tt),tt!==st||tt.tag!==5&&tt.tag!==6)&&(tt=null)):(et=null,tt=b),et!==tt)){if(nt=Bd,ot="onMouseLeave",rt="onMouseEnter",it="mouse",(o==="pointerout"||o==="pointerover")&&(nt=Td,ot="onPointerLeave",rt="onPointerEnter",it="pointer"),st=et==null?_e:ue(et),at=tt==null?_e:ue(tt),_e=new nt(ot,it+"leave",et,s,$),_e.target=st,_e.relatedTarget=at,ot=null,Wc($)===b&&(nt=new nt(rt,it+"enter",tt,s,$),nt.target=at,nt.relatedTarget=st,ot=nt),st=ot,et&&tt)t:{for(nt=et,rt=tt,it=0,at=nt;at;at=vf(at))it++;for(at=0,ot=rt;ot;ot=vf(ot))at++;for(;0<it-at;)nt=vf(nt),it--;for(;0<at-it;)rt=vf(rt),at--;for(;it--;){if(nt===rt||rt!==null&&nt===rt.alternate)break t;nt=vf(nt),rt=vf(rt)}nt=null}else nt=null;et!==null&&wf(j,_e,et,nt,!1),tt!==null&&st!==null&&wf(j,st,tt,nt,!0)}}e:{if(_e=b?ue(b):window,et=_e.nodeName&&_e.nodeName.toLowerCase(),et==="select"||et==="input"&&_e.type==="file")var ut=ve;else if(me(_e))if(we)ut=Fe;else{ut=De;var ct=Ce}else(et=_e.nodeName)&&et.toLowerCase()==="input"&&(_e.type==="checkbox"||_e.type==="radio")&&(ut=Ee);if(ut&&(ut=ut(o,b))){ne(j,ut,s,$);break e}ct&&ct(o,_e,b),o==="focusout"&&(ct=_e._wrapperState)&&ct.controlled&&_e.type==="number"&&cb(_e,"number",_e.value)}switch(ct=b?ue(b):window,o){case"focusin":(me(ct)||ct.contentEditable==="true")&&(Qe=ct,Re=b,Se=null);break;case"focusout":Se=Re=Qe=null;break;case"mousedown":Te=!0;break;case"contextmenu":case"mouseup":case"dragend":Te=!1,Ue(j,s,$);break;case"selectionchange":if(Pe)break;case"keydown":case"keyup":Ue(j,s,$)}var ht;if(ae)e:{switch(o){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else ie$2?ge(o,s)&&(lt="onCompositionEnd"):o==="keydown"&&s.keyCode===229&&(lt="onCompositionStart");lt&&(de&&s.locale!=="ko"&&(ie$2||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&ie$2&&(ht=nd()):(kd=$,ld="value"in kd?kd.value:kd.textContent,ie$2=!0)),ct=oe(b,lt),0<ct.length&&(lt=new Ld(lt,o,null,s,$),j.push({event:lt,listeners:ct}),ht?lt.data=ht:(ht=he(s),ht!==null&&(lt.data=ht)))),(ht=ce?je(o,s):ke(o,s))&&(b=oe(b,"onBeforeInput"),0<b.length&&($=new Ld("onBeforeInput","beforeinput",null,s,$),j.push({event:$,listeners:b}),$.data=ht))}se(j,e)})}function tf(o,e,s){return{instance:o,listener:e,currentTarget:s}}function oe(o,e){for(var s=e+"Capture",a=[];o!==null;){var c=o,h=c.stateNode;c.tag===5&&h!==null&&(c=h,h=Kb(o,s),h!=null&&a.unshift(tf(o,h,c)),h=Kb(o,e),h!=null&&a.push(tf(o,h,c))),o=o.return}return a}function vf(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function wf(o,e,s,a,c){for(var h=e._reactName,d=[];s!==null&&s!==a;){var g=s,_=g.alternate,b=g.stateNode;if(_!==null&&_===a)break;g.tag===5&&b!==null&&(g=b,c?(_=Kb(s,h),_!=null&&d.unshift(tf(s,_,g))):c||(_=Kb(s,h),_!=null&&d.push(tf(s,_,g)))),s=s.return}d.length!==0&&o.push({event:e,listeners:d})}var xf=/\r\n?/g,yf=/\u0000|\uFFFD/g;function zf(o){return(typeof o=="string"?o:""+o).replace(xf,`
|
||
`).replace(yf,"")}function Af(o,e,s){if(e=zf(e),zf(o)!==e&&s)throw Error(p$2(425))}function Bf(){}var Cf=null,Df=null;function Ef(o,e){return o==="textarea"||o==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ff=typeof setTimeout=="function"?setTimeout:void 0,Gf=typeof clearTimeout=="function"?clearTimeout:void 0,Hf=typeof Promise=="function"?Promise:void 0,Jf=typeof queueMicrotask=="function"?queueMicrotask:typeof Hf<"u"?function(o){return Hf.resolve(null).then(o).catch(If)}:Ff;function If(o){setTimeout(function(){throw o})}function Kf(o,e){var s=e,a=0;do{var c=s.nextSibling;if(o.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(a===0){o.removeChild(c),bd(e);return}a--}else s!=="$"&&s!=="$?"&&s!=="$!"||a++;s=c}while(s);bd(e)}function Lf(o){for(;o!=null;o=o.nextSibling){var e=o.nodeType;if(e===1||e===3)break;if(e===8){if(e=o.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return o}function Mf(o){o=o.previousSibling;for(var e=0;o;){if(o.nodeType===8){var s=o.data;if(s==="$"||s==="$!"||s==="$?"){if(e===0)return o;e--}else s==="/$"&&e++}o=o.previousSibling}return null}var Nf=Math.random().toString(36).slice(2),Of="__reactFiber$"+Nf,Pf="__reactProps$"+Nf,uf="__reactContainer$"+Nf,of="__reactEvents$"+Nf,Qf="__reactListeners$"+Nf,Rf="__reactHandles$"+Nf;function Wc(o){var e=o[Of];if(e)return e;for(var s=o.parentNode;s;){if(e=s[uf]||s[Of]){if(s=e.alternate,e.child!==null||s!==null&&s.child!==null)for(o=Mf(o);o!==null;){if(s=o[Of])return s;o=Mf(o)}return e}o=s,s=o.parentNode}return null}function Cb(o){return o=o[Of]||o[uf],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function ue(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(p$2(33))}function Db(o){return o[Pf]||null}var Sf=[],Tf=-1;function Uf(o){return{current:o}}function E(o){0>Tf||(o.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(o,e){Tf++,Sf[Tf]=o.current,o.current=e}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(o,e){var s=o.type.contextTypes;if(!s)return Vf;var a=o.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===e)return a.__reactInternalMemoizedMaskedChildContext;var c={},h;for(h in s)c[h]=e[h];return a&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=e,o.__reactInternalMemoizedMaskedChildContext=c),c}function Zf(o){return o=o.childContextTypes,o!=null}function $f(){E(Wf),E(H)}function ag(o,e,s){if(H.current!==Vf)throw Error(p$2(168));G(H,e),G(Wf,s)}function bg(o,e,s){var a=o.stateNode;if(e=e.childContextTypes,typeof a.getChildContext!="function")return s;a=a.getChildContext();for(var c in a)if(!(c in e))throw Error(p$2(108,Ra(o)||"Unknown",c));return A({},s,a)}function cg(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Vf,Xf=H.current,G(H,o),G(Wf,Wf.current),!0}function dg(o,e,s){var a=o.stateNode;if(!a)throw Error(p$2(169));s?(o=bg(o,e,Xf),a.__reactInternalMemoizedMergedChildContext=o,E(Wf),E(H),G(H,o)):E(Wf),G(Wf,s)}var eg=null,fg=!1,gg=!1;function hg(o){eg===null?eg=[o]:eg.push(o)}function ig(o){fg=!0,hg(o)}function jg(){if(!gg&&eg!==null){gg=!0;var o=0,e=C$1;try{var s=eg;for(C$1=1;o<s.length;o++){var a=s[o];do a=a(!0);while(a!==null)}eg=null,fg=!1}catch(c){throw eg!==null&&(eg=eg.slice(o+1)),ac(fc,jg),c}finally{C$1=e,gg=!1}}return null}var kg=[],lg=0,mg=null,ng=0,og=[],pg=0,qg=null,rg=1,sg="";function tg(o,e){kg[lg++]=ng,kg[lg++]=mg,mg=o,ng=e}function ug(o,e,s){og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,qg=o;var a=rg;o=sg;var c=32-oc(a)-1;a&=~(1<<c),s+=1;var h=32-oc(e)+c;if(30<h){var d=c-c%5;h=(a&(1<<d)-1).toString(32),a>>=d,c-=d,rg=1<<32-oc(e)+c|s<<c|a,sg=h+o}else rg=1<<h|s<<c|a,sg=o}function vg(o){o.return!==null&&(tg(o,1),ug(o,1,0))}function wg(o){for(;o===mg;)mg=kg[--lg],kg[lg]=null,ng=kg[--lg],kg[lg]=null;for(;o===qg;)qg=og[--pg],og[pg]=null,sg=og[--pg],og[pg]=null,rg=og[--pg],og[pg]=null}var xg=null,yg=null,I$1=!1,zg=null;function Ag(o,e){var s=Bg(5,null,null,0);s.elementType="DELETED",s.stateNode=e,s.return=o,e=o.deletions,e===null?(o.deletions=[s],o.flags|=16):e.push(s)}function Cg(o,e){switch(o.tag){case 5:var s=o.type;return e=e.nodeType!==1||s.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(o.stateNode=e,xg=o,yg=Lf(e.firstChild),!0):!1;case 6:return e=o.pendingProps===""||e.nodeType!==3?null:e,e!==null?(o.stateNode=e,xg=o,yg=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(s=qg!==null?{id:rg,overflow:sg}:null,o.memoizedState={dehydrated:e,treeContext:s,retryLane:1073741824},s=Bg(18,null,null,0),s.stateNode=e,s.return=o,o.child=s,xg=o,yg=null,!0):!1;default:return!1}}function Dg(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Eg(o){if(I$1){var e=yg;if(e){var s=e;if(!Cg(o,e)){if(Dg(o))throw Error(p$2(418));e=Lf(s.nextSibling);var a=xg;e&&Cg(o,e)?Ag(a,s):(o.flags=o.flags&-4097|2,I$1=!1,xg=o)}}else{if(Dg(o))throw Error(p$2(418));o.flags=o.flags&-4097|2,I$1=!1,xg=o}}}function Fg(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;xg=o}function Gg(o){if(o!==xg)return!1;if(!I$1)return Fg(o),I$1=!0,!1;var e;if((e=o.tag!==3)&&!(e=o.tag!==5)&&(e=o.type,e=e!=="head"&&e!=="body"&&!Ef(o.type,o.memoizedProps)),e&&(e=yg)){if(Dg(o))throw Hg(),Error(p$2(418));for(;e;)Ag(o,e),e=Lf(e.nextSibling)}if(Fg(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(p$2(317));e:{for(o=o.nextSibling,e=0;o;){if(o.nodeType===8){var s=o.data;if(s==="/$"){if(e===0){yg=Lf(o.nextSibling);break e}e--}else s!=="$"&&s!=="$!"&&s!=="$?"||e++}o=o.nextSibling}yg=null}}else yg=xg?Lf(o.stateNode.nextSibling):null;return!0}function Hg(){for(var o=yg;o;)o=Lf(o.nextSibling)}function Ig(){yg=xg=null,I$1=!1}function Jg(o){zg===null?zg=[o]:zg.push(o)}var Kg=ua.ReactCurrentBatchConfig;function Lg(o,e){if(o&&o.defaultProps){e=A({},e),o=o.defaultProps;for(var s in o)e[s]===void 0&&(e[s]=o[s]);return e}return e}var Mg=Uf(null),Ng=null,Og=null,Pg=null;function Qg(){Pg=Og=Ng=null}function Rg(o){var e=Mg.current;E(Mg),o._currentValue=e}function Sg(o,e,s){for(;o!==null;){var a=o.alternate;if((o.childLanes&e)!==e?(o.childLanes|=e,a!==null&&(a.childLanes|=e)):a!==null&&(a.childLanes&e)!==e&&(a.childLanes|=e),o===s)break;o=o.return}}function Tg(o,e){Ng=o,Pg=Og=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&e)!==0&&(Ug=!0),o.firstContext=null)}function Vg(o){var e=o._currentValue;if(Pg!==o)if(o={context:o,memoizedValue:e,next:null},Og===null){if(Ng===null)throw Error(p$2(308));Og=o,Ng.dependencies={lanes:0,firstContext:o}}else Og=Og.next=o;return e}var Wg=null;function Xg(o){Wg===null?Wg=[o]:Wg.push(o)}function Yg(o,e,s,a){var c=e.interleaved;return c===null?(s.next=s,Xg(e)):(s.next=c.next,c.next=s),e.interleaved=s,Zg(o,a)}function Zg(o,e){o.lanes|=e;var s=o.alternate;for(s!==null&&(s.lanes|=e),s=o,o=o.return;o!==null;)o.childLanes|=e,s=o.alternate,s!==null&&(s.childLanes|=e),s=o,o=o.return;return s.tag===3?s.stateNode:null}var $g=!1;function ah(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bh(o,e){o=o.updateQueue,e.updateQueue===o&&(e.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function ch(o,e){return{eventTime:o,lane:e,tag:0,payload:null,callback:null,next:null}}function dh(o,e,s){var a=o.updateQueue;if(a===null)return null;if(a=a.shared,(K&2)!==0){var c=a.pending;return c===null?e.next=e:(e.next=c.next,c.next=e),a.pending=e,Zg(o,s)}return c=a.interleaved,c===null?(e.next=e,Xg(a)):(e.next=c.next,c.next=e),a.interleaved=e,Zg(o,s)}function eh(o,e,s){if(e=e.updateQueue,e!==null&&(e=e.shared,(s&4194240)!==0)){var a=e.lanes;a&=o.pendingLanes,s|=a,e.lanes=s,Cc(o,s)}}function fh(o,e){var s=o.updateQueue,a=o.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var c=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var d={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};h===null?c=h=d:h=h.next=d,s=s.next}while(s!==null);h===null?c=h=e:h=h.next=e}else c=h=e;s={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:a.shared,effects:a.effects},o.updateQueue=s;return}o=s.lastBaseUpdate,o===null?s.firstBaseUpdate=e:o.next=e,s.lastBaseUpdate=e}function gh(o,e,s,a){var c=o.updateQueue;$g=!1;var h=c.firstBaseUpdate,d=c.lastBaseUpdate,g=c.shared.pending;if(g!==null){c.shared.pending=null;var _=g,b=_.next;_.next=null,d===null?h=b:d.next=b,d=_;var $=o.alternate;$!==null&&($=$.updateQueue,g=$.lastBaseUpdate,g!==d&&(g===null?$.firstBaseUpdate=b:g.next=b,$.lastBaseUpdate=_))}if(h!==null){var j=c.baseState;d=0,$=b=_=null,g=h;do{var _e=g.lane,et=g.eventTime;if((a&_e)===_e){$!==null&&($=$.next={eventTime:et,lane:0,tag:g.tag,payload:g.payload,callback:g.callback,next:null});e:{var tt=o,nt=g;switch(_e=e,et=s,nt.tag){case 1:if(tt=nt.payload,typeof tt=="function"){j=tt.call(et,j,_e);break e}j=tt;break e;case 3:tt.flags=tt.flags&-65537|128;case 0:if(tt=nt.payload,_e=typeof tt=="function"?tt.call(et,j,_e):tt,_e==null)break e;j=A({},j,_e);break e;case 2:$g=!0}}g.callback!==null&&g.lane!==0&&(o.flags|=64,_e=c.effects,_e===null?c.effects=[g]:_e.push(g))}else et={eventTime:et,lane:_e,tag:g.tag,payload:g.payload,callback:g.callback,next:null},$===null?(b=$=et,_=j):$=$.next=et,d|=_e;if(g=g.next,g===null){if(g=c.shared.pending,g===null)break;_e=g,g=_e.next,_e.next=null,c.lastBaseUpdate=_e,c.shared.pending=null}}while(1);if($===null&&(_=j),c.baseState=_,c.firstBaseUpdate=b,c.lastBaseUpdate=$,e=c.shared.interleaved,e!==null){c=e;do d|=c.lane,c=c.next;while(c!==e)}else h===null&&(c.shared.lanes=0);hh|=d,o.lanes=d,o.memoizedState=j}}function ih(o,e,s){if(o=e.effects,e.effects=null,o!==null)for(e=0;e<o.length;e++){var a=o[e],c=a.callback;if(c!==null){if(a.callback=null,a=s,typeof c!="function")throw Error(p$2(191,c));c.call(a)}}}var jh=new aa.Component().refs;function kh(o,e,s,a){e=o.memoizedState,s=s(a,e),s=s==null?e:A({},e,s),o.memoizedState=s,o.lanes===0&&(o.updateQueue.baseState=s)}var nh={isMounted:function(o){return(o=o._reactInternals)?Vb(o)===o:!1},enqueueSetState:function(o,e,s){o=o._reactInternals;var a=L(),c=lh(o),h=ch(a,c);h.payload=e,s!=null&&(h.callback=s),e=dh(o,h,c),e!==null&&(mh(e,o,c,a),eh(e,o,c))},enqueueReplaceState:function(o,e,s){o=o._reactInternals;var a=L(),c=lh(o),h=ch(a,c);h.tag=1,h.payload=e,s!=null&&(h.callback=s),e=dh(o,h,c),e!==null&&(mh(e,o,c,a),eh(e,o,c))},enqueueForceUpdate:function(o,e){o=o._reactInternals;var s=L(),a=lh(o),c=ch(s,a);c.tag=2,e!=null&&(c.callback=e),e=dh(o,c,a),e!==null&&(mh(e,o,a,s),eh(e,o,a))}};function oh(o,e,s,a,c,h,d){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(a,h,d):e.prototype&&e.prototype.isPureReactComponent?!Ie(s,a)||!Ie(c,h):!0}function ph(o,e,s){var a=!1,c=Vf,h=e.contextType;return typeof h=="object"&&h!==null?h=Vg(h):(c=Zf(e)?Xf:H.current,a=e.contextTypes,h=(a=a!=null)?Yf(o,c):Vf),e=new e(s,h),o.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=nh,o.stateNode=e,e._reactInternals=o,a&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=c,o.__reactInternalMemoizedMaskedChildContext=h),e}function qh(o,e,s,a){o=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(s,a),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(s,a),e.state!==o&&nh.enqueueReplaceState(e,e.state,null)}function rh(o,e,s,a){var c=o.stateNode;c.props=s,c.state=o.memoizedState,c.refs=jh,ah(o);var h=e.contextType;typeof h=="object"&&h!==null?c.context=Vg(h):(h=Zf(e)?Xf:H.current,c.context=Yf(o,h)),c.state=o.memoizedState,h=e.getDerivedStateFromProps,typeof h=="function"&&(kh(o,e,h,s),c.state=o.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(e=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),e!==c.state&&nh.enqueueReplaceState(c,c.state,null),gh(o,s,c,a),c.state=o.memoizedState),typeof c.componentDidMount=="function"&&(o.flags|=4194308)}function sh(o,e,s){if(o=s.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(p$2(309));var a=s.stateNode}if(!a)throw Error(p$2(147,o));var c=a,h=""+o;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===h?e.ref:(e=function(d){var g=c.refs;g===jh&&(g=c.refs={}),d===null?delete g[h]:g[h]=d},e._stringRef=h,e)}if(typeof o!="string")throw Error(p$2(284));if(!s._owner)throw Error(p$2(290,o))}return o}function th(o,e){throw o=Object.prototype.toString.call(e),Error(p$2(31,o==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":o))}function uh(o){var e=o._init;return e(o._payload)}function vh(o){function e(rt,it){if(o){var at=rt.deletions;at===null?(rt.deletions=[it],rt.flags|=16):at.push(it)}}function s(rt,it){if(!o)return null;for(;it!==null;)e(rt,it),it=it.sibling;return null}function a(rt,it){for(rt=new Map;it!==null;)it.key!==null?rt.set(it.key,it):rt.set(it.index,it),it=it.sibling;return rt}function c(rt,it){return rt=wh(rt,it),rt.index=0,rt.sibling=null,rt}function h(rt,it,at){return rt.index=at,o?(at=rt.alternate,at!==null?(at=at.index,at<it?(rt.flags|=2,it):at):(rt.flags|=2,it)):(rt.flags|=1048576,it)}function d(rt){return o&&rt.alternate===null&&(rt.flags|=2),rt}function g(rt,it,at,ot){return it===null||it.tag!==6?(it=xh(at,rt.mode,ot),it.return=rt,it):(it=c(it,at),it.return=rt,it)}function _(rt,it,at,ot){var ut=at.type;return ut===ya?$(rt,it,at.props.children,ot,at.key):it!==null&&(it.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===Ha&&uh(ut)===it.type)?(ot=c(it,at.props),ot.ref=sh(rt,it,at),ot.return=rt,ot):(ot=yh(at.type,at.key,at.props,null,rt.mode,ot),ot.ref=sh(rt,it,at),ot.return=rt,ot)}function b(rt,it,at,ot){return it===null||it.tag!==4||it.stateNode.containerInfo!==at.containerInfo||it.stateNode.implementation!==at.implementation?(it=zh(at,rt.mode,ot),it.return=rt,it):(it=c(it,at.children||[]),it.return=rt,it)}function $(rt,it,at,ot,ut){return it===null||it.tag!==7?(it=Ah(at,rt.mode,ot,ut),it.return=rt,it):(it=c(it,at),it.return=rt,it)}function j(rt,it,at){if(typeof it=="string"&&it!==""||typeof it=="number")return it=xh(""+it,rt.mode,at),it.return=rt,it;if(typeof it=="object"&&it!==null){switch(it.$$typeof){case va:return at=yh(it.type,it.key,it.props,null,rt.mode,at),at.ref=sh(rt,null,it),at.return=rt,at;case wa:return it=zh(it,rt.mode,at),it.return=rt,it;case Ha:var ot=it._init;return j(rt,ot(it._payload),at)}if(eb(it)||Ka(it))return it=Ah(it,rt.mode,at,null),it.return=rt,it;th(rt,it)}return null}function _e(rt,it,at,ot){var ut=it!==null?it.key:null;if(typeof at=="string"&&at!==""||typeof at=="number")return ut!==null?null:g(rt,it,""+at,ot);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case va:return at.key===ut?_(rt,it,at,ot):null;case wa:return at.key===ut?b(rt,it,at,ot):null;case Ha:return ut=at._init,_e(rt,it,ut(at._payload),ot)}if(eb(at)||Ka(at))return ut!==null?null:$(rt,it,at,ot,null);th(rt,at)}return null}function et(rt,it,at,ot,ut){if(typeof ot=="string"&&ot!==""||typeof ot=="number")return rt=rt.get(at)||null,g(it,rt,""+ot,ut);if(typeof ot=="object"&&ot!==null){switch(ot.$$typeof){case va:return rt=rt.get(ot.key===null?at:ot.key)||null,_(it,rt,ot,ut);case wa:return rt=rt.get(ot.key===null?at:ot.key)||null,b(it,rt,ot,ut);case Ha:var ct=ot._init;return et(rt,it,at,ct(ot._payload),ut)}if(eb(ot)||Ka(ot))return rt=rt.get(at)||null,$(it,rt,ot,ut,null);th(it,ot)}return null}function tt(rt,it,at,ot){for(var ut=null,ct=null,ht=it,lt=it=0,pt=null;ht!==null&<<at.length;lt++){ht.index>lt?(pt=ht,ht=null):pt=ht.sibling;var ft=_e(rt,ht,at[lt],ot);if(ft===null){ht===null&&(ht=pt);break}o&&ht&&ft.alternate===null&&e(rt,ht),it=h(ft,it,lt),ct===null?ut=ft:ct.sibling=ft,ct=ft,ht=pt}if(lt===at.length)return s(rt,ht),I$1&&tg(rt,lt),ut;if(ht===null){for(;lt<at.length;lt++)ht=j(rt,at[lt],ot),ht!==null&&(it=h(ht,it,lt),ct===null?ut=ht:ct.sibling=ht,ct=ht);return I$1&&tg(rt,lt),ut}for(ht=a(rt,ht);lt<at.length;lt++)pt=et(ht,rt,lt,at[lt],ot),pt!==null&&(o&&pt.alternate!==null&&ht.delete(pt.key===null?lt:pt.key),it=h(pt,it,lt),ct===null?ut=pt:ct.sibling=pt,ct=pt);return o&&ht.forEach(function(gt){return e(rt,gt)}),I$1&&tg(rt,lt),ut}function nt(rt,it,at,ot){var ut=Ka(at);if(typeof ut!="function")throw Error(p$2(150));if(at=ut.call(at),at==null)throw Error(p$2(151));for(var ct=ut=null,ht=it,lt=it=0,pt=null,ft=at.next();ht!==null&&!ft.done;lt++,ft=at.next()){ht.index>lt?(pt=ht,ht=null):pt=ht.sibling;var gt=_e(rt,ht,ft.value,ot);if(gt===null){ht===null&&(ht=pt);break}o&&ht&>.alternate===null&&e(rt,ht),it=h(gt,it,lt),ct===null?ut=gt:ct.sibling=gt,ct=gt,ht=pt}if(ft.done)return s(rt,ht),I$1&&tg(rt,lt),ut;if(ht===null){for(;!ft.done;lt++,ft=at.next())ft=j(rt,ft.value,ot),ft!==null&&(it=h(ft,it,lt),ct===null?ut=ft:ct.sibling=ft,ct=ft);return I$1&&tg(rt,lt),ut}for(ht=a(rt,ht);!ft.done;lt++,ft=at.next())ft=et(ht,rt,lt,ft.value,ot),ft!==null&&(o&&ft.alternate!==null&&ht.delete(ft.key===null?lt:ft.key),it=h(ft,it,lt),ct===null?ut=ft:ct.sibling=ft,ct=ft);return o&&ht.forEach(function(yt){return e(rt,yt)}),I$1&&tg(rt,lt),ut}function st(rt,it,at,ot){if(typeof at=="object"&&at!==null&&at.type===ya&&at.key===null&&(at=at.props.children),typeof at=="object"&&at!==null){switch(at.$$typeof){case va:e:{for(var ut=at.key,ct=it;ct!==null;){if(ct.key===ut){if(ut=at.type,ut===ya){if(ct.tag===7){s(rt,ct.sibling),it=c(ct,at.props.children),it.return=rt,rt=it;break e}}else if(ct.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===Ha&&uh(ut)===ct.type){s(rt,ct.sibling),it=c(ct,at.props),it.ref=sh(rt,ct,at),it.return=rt,rt=it;break e}s(rt,ct);break}else e(rt,ct);ct=ct.sibling}at.type===ya?(it=Ah(at.props.children,rt.mode,ot,at.key),it.return=rt,rt=it):(ot=yh(at.type,at.key,at.props,null,rt.mode,ot),ot.ref=sh(rt,it,at),ot.return=rt,rt=ot)}return d(rt);case wa:e:{for(ct=at.key;it!==null;){if(it.key===ct)if(it.tag===4&&it.stateNode.containerInfo===at.containerInfo&&it.stateNode.implementation===at.implementation){s(rt,it.sibling),it=c(it,at.children||[]),it.return=rt,rt=it;break e}else{s(rt,it);break}else e(rt,it);it=it.sibling}it=zh(at,rt.mode,ot),it.return=rt,rt=it}return d(rt);case Ha:return ct=at._init,st(rt,it,ct(at._payload),ot)}if(eb(at))return tt(rt,it,at,ot);if(Ka(at))return nt(rt,it,at,ot);th(rt,at)}return typeof at=="string"&&at!==""||typeof at=="number"?(at=""+at,it!==null&&it.tag===6?(s(rt,it.sibling),it=c(it,at),it.return=rt,rt=it):(s(rt,it),it=xh(at,rt.mode,ot),it.return=rt,rt=it),d(rt)):s(rt,it)}return st}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(o){if(o===Dh)throw Error(p$2(174));return o}function Ih(o,e){switch(G(Gh,e),G(Fh,o),G(Eh,Dh),o=e.nodeType,o){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:lb(null,"");break;default:o=o===8?e.parentNode:e,e=o.namespaceURI||null,o=o.tagName,e=lb(e,o)}E(Eh),G(Eh,e)}function Jh(){E(Eh),E(Fh),E(Gh)}function Kh(o){Hh(Gh.current);var e=Hh(Eh.current),s=lb(e,o.type);e!==s&&(G(Fh,o),G(Eh,s))}function Lh(o){Fh.current===o&&(E(Eh),E(Fh))}var M=Uf(0);function Mh(o){for(var e=o;e!==null;){if(e.tag===13){var s=e.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===o)break;for(;e.sibling===null;){if(e.return===null||e.return===o)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Nh=[];function Oh(){for(var o=0;o<Nh.length;o++)Nh[o]._workInProgressVersionPrimary=null;Nh.length=0}var Ph=ua.ReactCurrentDispatcher,Qh=ua.ReactCurrentBatchConfig,Rh=0,N=null,O=null,P=null,Sh=!1,Th=!1,Uh=0,Vh=0;function Q(){throw Error(p$2(321))}function Wh(o,e){if(e===null)return!1;for(var s=0;s<e.length&&s<o.length;s++)if(!He(o[s],e[s]))return!1;return!0}function Xh(o,e,s,a,c,h){if(Rh=h,N=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ph.current=o===null||o.memoizedState===null?Yh:Zh,o=s(a,c),Th){h=0;do{if(Th=!1,Uh=0,25<=h)throw Error(p$2(301));h+=1,P=O=null,e.updateQueue=null,Ph.current=$h,o=s(a,c)}while(Th)}if(Ph.current=ai,e=O!==null&&O.next!==null,Rh=0,P=O=N=null,Sh=!1,e)throw Error(p$2(300));return o}function bi(){var o=Uh!==0;return Uh=0,o}function ci(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return P===null?N.memoizedState=P=o:P=P.next=o,P}function di(){if(O===null){var o=N.alternate;o=o!==null?o.memoizedState:null}else o=O.next;var e=P===null?N.memoizedState:P.next;if(e!==null)P=e,O=o;else{if(o===null)throw Error(p$2(310));O=o,o={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null},P===null?N.memoizedState=P=o:P=P.next=o}return P}function ei(o,e){return typeof e=="function"?e(o):e}function fi(o){var e=di(),s=e.queue;if(s===null)throw Error(p$2(311));s.lastRenderedReducer=o;var a=O,c=a.baseQueue,h=s.pending;if(h!==null){if(c!==null){var d=c.next;c.next=h.next,h.next=d}a.baseQueue=c=h,s.pending=null}if(c!==null){h=c.next,a=a.baseState;var g=d=null,_=null,b=h;do{var $=b.lane;if((Rh&$)===$)_!==null&&(_=_.next={lane:0,action:b.action,hasEagerState:b.hasEagerState,eagerState:b.eagerState,next:null}),a=b.hasEagerState?b.eagerState:o(a,b.action);else{var j={lane:$,action:b.action,hasEagerState:b.hasEagerState,eagerState:b.eagerState,next:null};_===null?(g=_=j,d=a):_=_.next=j,N.lanes|=$,hh|=$}b=b.next}while(b!==null&&b!==h);_===null?d=a:_.next=g,He(a,e.memoizedState)||(Ug=!0),e.memoizedState=a,e.baseState=d,e.baseQueue=_,s.lastRenderedState=a}if(o=s.interleaved,o!==null){c=o;do h=c.lane,N.lanes|=h,hh|=h,c=c.next;while(c!==o)}else c===null&&(s.lanes=0);return[e.memoizedState,s.dispatch]}function gi(o){var e=di(),s=e.queue;if(s===null)throw Error(p$2(311));s.lastRenderedReducer=o;var a=s.dispatch,c=s.pending,h=e.memoizedState;if(c!==null){s.pending=null;var d=c=c.next;do h=o(h,d.action),d=d.next;while(d!==c);He(h,e.memoizedState)||(Ug=!0),e.memoizedState=h,e.baseQueue===null&&(e.baseState=h),s.lastRenderedState=h}return[h,a]}function hi(){}function ii(o,e){var s=N,a=di(),c=e(),h=!He(a.memoizedState,c);if(h&&(a.memoizedState=c,Ug=!0),a=a.queue,ji(ki.bind(null,s,a,o),[o]),a.getSnapshot!==e||h||P!==null&&P.memoizedState.tag&1){if(s.flags|=2048,li(9,mi.bind(null,s,a,c,e),void 0,null),R===null)throw Error(p$2(349));(Rh&30)!==0||ni(s,e,c)}return c}function ni(o,e,s){o.flags|=16384,o={getSnapshot:e,value:s},e=N.updateQueue,e===null?(e={lastEffect:null,stores:null},N.updateQueue=e,e.stores=[o]):(s=e.stores,s===null?e.stores=[o]:s.push(o))}function mi(o,e,s,a){e.value=s,e.getSnapshot=a,oi(e)&&pi(o)}function ki(o,e,s){return s(function(){oi(e)&&pi(o)})}function oi(o){var e=o.getSnapshot;o=o.value;try{var s=e();return!He(o,s)}catch{return!0}}function pi(o){var e=Zg(o,1);e!==null&&mh(e,o,1,-1)}function qi(o){var e=ci();return typeof o=="function"&&(o=o()),e.memoizedState=e.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:o},e.queue=o,o=o.dispatch=ri.bind(null,N,o),[e.memoizedState,o]}function li(o,e,s,a){return o={tag:o,create:e,destroy:s,deps:a,next:null},e=N.updateQueue,e===null?(e={lastEffect:null,stores:null},N.updateQueue=e,e.lastEffect=o.next=o):(s=e.lastEffect,s===null?e.lastEffect=o.next=o:(a=s.next,s.next=o,o.next=a,e.lastEffect=o)),o}function si(){return di().memoizedState}function ti(o,e,s,a){var c=ci();N.flags|=o,c.memoizedState=li(1|e,s,void 0,a===void 0?null:a)}function ui(o,e,s,a){var c=di();a=a===void 0?null:a;var h=void 0;if(O!==null){var d=O.memoizedState;if(h=d.destroy,a!==null&&Wh(a,d.deps)){c.memoizedState=li(e,s,h,a);return}}N.flags|=o,c.memoizedState=li(1|e,s,h,a)}function vi(o,e){return ti(8390656,8,o,e)}function ji(o,e){return ui(2048,8,o,e)}function wi(o,e){return ui(4,2,o,e)}function xi(o,e){return ui(4,4,o,e)}function yi(o,e){if(typeof e=="function")return o=o(),e(o),function(){e(null)};if(e!=null)return o=o(),e.current=o,function(){e.current=null}}function zi(o,e,s){return s=s!=null?s.concat([o]):null,ui(4,4,yi.bind(null,e,o),s)}function Ai(){}function Bi(o,e){var s=di();e=e===void 0?null:e;var a=s.memoizedState;return a!==null&&e!==null&&Wh(e,a[1])?a[0]:(s.memoizedState=[o,e],o)}function Ci(o,e){var s=di();e=e===void 0?null:e;var a=s.memoizedState;return a!==null&&e!==null&&Wh(e,a[1])?a[0]:(o=o(),s.memoizedState=[o,e],o)}function Di(o,e,s){return(Rh&21)===0?(o.baseState&&(o.baseState=!1,Ug=!0),o.memoizedState=s):(He(s,e)||(s=yc(),N.lanes|=s,hh|=s,o.baseState=!0),e)}function Ei(o,e){var s=C$1;C$1=s!==0&&4>s?s:4,o(!0);var a=Qh.transition;Qh.transition={};try{o(!1),e()}finally{C$1=s,Qh.transition=a}}function Fi(){return di().memoizedState}function Gi(o,e,s){var a=lh(o);if(s={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null},Hi(o))Ii(e,s);else if(s=Yg(o,e,s,a),s!==null){var c=L();mh(s,o,a,c),Ji(s,e,a)}}function ri(o,e,s){var a=lh(o),c={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null};if(Hi(o))Ii(e,c);else{var h=o.alternate;if(o.lanes===0&&(h===null||h.lanes===0)&&(h=e.lastRenderedReducer,h!==null))try{var d=e.lastRenderedState,g=h(d,s);if(c.hasEagerState=!0,c.eagerState=g,He(g,d)){var _=e.interleaved;_===null?(c.next=c,Xg(e)):(c.next=_.next,_.next=c),e.interleaved=c;return}}catch{}finally{}s=Yg(o,e,c,a),s!==null&&(c=L(),mh(s,o,a,c),Ji(s,e,a))}}function Hi(o){var e=o.alternate;return o===N||e!==null&&e===N}function Ii(o,e){Th=Sh=!0;var s=o.pending;s===null?e.next=e:(e.next=s.next,s.next=e),o.pending=e}function Ji(o,e,s){if((s&4194240)!==0){var a=e.lanes;a&=o.pendingLanes,s|=a,e.lanes=s,Cc(o,s)}}var ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(o,e){return ci().memoizedState=[o,e===void 0?null:e],o},useContext:Vg,useEffect:vi,useImperativeHandle:function(o,e,s){return s=s!=null?s.concat([o]):null,ti(4194308,4,yi.bind(null,e,o),s)},useLayoutEffect:function(o,e){return ti(4194308,4,o,e)},useInsertionEffect:function(o,e){return ti(4,2,o,e)},useMemo:function(o,e){var s=ci();return e=e===void 0?null:e,o=o(),s.memoizedState=[o,e],o},useReducer:function(o,e,s){var a=ci();return e=s!==void 0?s(e):e,a.memoizedState=a.baseState=e,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:e},a.queue=o,o=o.dispatch=Gi.bind(null,N,o),[a.memoizedState,o]},useRef:function(o){var e=ci();return o={current:o},e.memoizedState=o},useState:qi,useDebugValue:Ai,useDeferredValue:function(o){return ci().memoizedState=o},useTransition:function(){var o=qi(!1),e=o[0];return o=Ei.bind(null,o[1]),ci().memoizedState=o,[e,o]},useMutableSource:function(){},useSyncExternalStore:function(o,e,s){var a=N,c=ci();if(I$1){if(s===void 0)throw Error(p$2(407));s=s()}else{if(s=e(),R===null)throw Error(p$2(349));(Rh&30)!==0||ni(a,e,s)}c.memoizedState=s;var h={value:s,getSnapshot:e};return c.queue=h,vi(ki.bind(null,a,h,o),[o]),a.flags|=2048,li(9,mi.bind(null,a,h,s,e),void 0,null),s},useId:function(){var o=ci(),e=R.identifierPrefix;if(I$1){var s=sg,a=rg;s=(a&~(1<<32-oc(a)-1)).toString(32)+s,e=":"+e+"R"+s,s=Uh++,0<s&&(e+="H"+s.toString(32)),e+=":"}else s=Vh++,e=":"+e+"r"+s.toString(32)+":";return o.memoizedState=e},unstable_isNewReconciler:!1},Zh={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:fi,useRef:si,useState:function(){return fi(ei)},useDebugValue:Ai,useDeferredValue:function(o){var e=di();return Di(e,O.memoizedState,o)},useTransition:function(){var o=fi(ei)[0],e=di().memoizedState;return[o,e]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1},$h={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:gi,useRef:si,useState:function(){return gi(ei)},useDebugValue:Ai,useDeferredValue:function(o){var e=di();return O===null?e.memoizedState=o:Di(e,O.memoizedState,o)},useTransition:function(){var o=gi(ei)[0],e=di().memoizedState;return[o,e]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1};function Ki(o,e){try{var s="",a=e;do s+=Pa(a),a=a.return;while(a);var c=s}catch(h){c=`
|
||
Error generating stack: `+h.message+`
|
||
`+h.stack}return{value:o,source:e,stack:c,digest:null}}function Li(o,e,s){return{value:o,source:null,stack:s!=null?s:null,digest:e!=null?e:null}}function Mi(o,e){try{console.error(e.value)}catch(s){setTimeout(function(){throw s})}}var Ni=typeof WeakMap=="function"?WeakMap:Map;function Oi(o,e,s){s=ch(-1,s),s.tag=3,s.payload={element:null};var a=e.value;return s.callback=function(){Pi||(Pi=!0,Qi=a),Mi(o,e)},s}function Ri(o,e,s){s=ch(-1,s),s.tag=3;var a=o.type.getDerivedStateFromError;if(typeof a=="function"){var c=e.value;s.payload=function(){return a(c)},s.callback=function(){Mi(o,e)}}var h=o.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(s.callback=function(){Mi(o,e),typeof a!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var d=e.stack;this.componentDidCatch(e.value,{componentStack:d!==null?d:""})}),s}function Ti(o,e,s){var a=o.pingCache;if(a===null){a=o.pingCache=new Ni;var c=new Set;a.set(e,c)}else c=a.get(e),c===void 0&&(c=new Set,a.set(e,c));c.has(s)||(c.add(s),o=Ui.bind(null,o,e,s),e.then(o,o))}function Vi(o){do{var e;if((e=o.tag===13)&&(e=o.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return o;o=o.return}while(o!==null);return null}function Wi(o,e,s,a,c){return(o.mode&1)===0?(o===e?o.flags|=65536:(o.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(e=ch(-1,1),e.tag=2,dh(s,e,1))),s.lanes|=1),o):(o.flags|=65536,o.lanes=c,o)}var Xi=ua.ReactCurrentOwner,Ug=!1;function Yi(o,e,s,a){e.child=o===null?Ch(e,null,s,a):Bh(e,o.child,s,a)}function Zi(o,e,s,a,c){s=s.render;var h=e.ref;return Tg(e,c),a=Xh(o,e,s,a,h,c),s=bi(),o!==null&&!Ug?(e.updateQueue=o.updateQueue,e.flags&=-2053,o.lanes&=~c,$i(o,e,c)):(I$1&&s&&vg(e),e.flags|=1,Yi(o,e,a,c),e.child)}function aj(o,e,s,a,c){if(o===null){var h=s.type;return typeof h=="function"&&!bj(h)&&h.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(e.tag=15,e.type=h,cj(o,e,h,a,c)):(o=yh(s.type,null,a,e,e.mode,c),o.ref=e.ref,o.return=e,e.child=o)}if(h=o.child,(o.lanes&c)===0){var d=h.memoizedProps;if(s=s.compare,s=s!==null?s:Ie,s(d,a)&&o.ref===e.ref)return $i(o,e,c)}return e.flags|=1,o=wh(h,a),o.ref=e.ref,o.return=e,e.child=o}function cj(o,e,s,a,c){if(o!==null){var h=o.memoizedProps;if(Ie(h,a)&&o.ref===e.ref)if(Ug=!1,e.pendingProps=a=h,(o.lanes&c)!==0)(o.flags&131072)!==0&&(Ug=!0);else return e.lanes=o.lanes,$i(o,e,c)}return dj(o,e,s,a,c)}function ej(o,e,s){var a=e.pendingProps,c=a.children,h=o!==null?o.memoizedState:null;if(a.mode==="hidden")if((e.mode&1)===0)e.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(fj,gj),gj|=s;else{if((s&1073741824)===0)return o=h!==null?h.baseLanes|s:s,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:o,cachePool:null,transitions:null},e.updateQueue=null,G(fj,gj),gj|=o,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=h!==null?h.baseLanes:s,G(fj,gj),gj|=a}else h!==null?(a=h.baseLanes|s,e.memoizedState=null):a=s,G(fj,gj),gj|=a;return Yi(o,e,c,s),e.child}function hj(o,e){var s=e.ref;(o===null&&s!==null||o!==null&&o.ref!==s)&&(e.flags|=512,e.flags|=2097152)}function dj(o,e,s,a,c){var h=Zf(s)?Xf:H.current;return h=Yf(e,h),Tg(e,c),s=Xh(o,e,s,a,h,c),a=bi(),o!==null&&!Ug?(e.updateQueue=o.updateQueue,e.flags&=-2053,o.lanes&=~c,$i(o,e,c)):(I$1&&a&&vg(e),e.flags|=1,Yi(o,e,s,c),e.child)}function ij(o,e,s,a,c){if(Zf(s)){var h=!0;cg(e)}else h=!1;if(Tg(e,c),e.stateNode===null)jj(o,e),ph(e,s,a),rh(e,s,a,c),a=!0;else if(o===null){var d=e.stateNode,g=e.memoizedProps;d.props=g;var _=d.context,b=s.contextType;typeof b=="object"&&b!==null?b=Vg(b):(b=Zf(s)?Xf:H.current,b=Yf(e,b));var $=s.getDerivedStateFromProps,j=typeof $=="function"||typeof d.getSnapshotBeforeUpdate=="function";j||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(g!==a||_!==b)&&qh(e,d,a,b),$g=!1;var _e=e.memoizedState;d.state=_e,gh(e,a,d,c),_=e.memoizedState,g!==a||_e!==_||Wf.current||$g?(typeof $=="function"&&(kh(e,s,$,a),_=e.memoizedState),(g=$g||oh(e,s,g,a,_e,_,b))?(j||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(e.flags|=4194308)):(typeof d.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=a,e.memoizedState=_),d.props=a,d.state=_,d.context=b,a=g):(typeof d.componentDidMount=="function"&&(e.flags|=4194308),a=!1)}else{d=e.stateNode,bh(o,e),g=e.memoizedProps,b=e.type===e.elementType?g:Lg(e.type,g),d.props=b,j=e.pendingProps,_e=d.context,_=s.contextType,typeof _=="object"&&_!==null?_=Vg(_):(_=Zf(s)?Xf:H.current,_=Yf(e,_));var et=s.getDerivedStateFromProps;($=typeof et=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(g!==j||_e!==_)&&qh(e,d,a,_),$g=!1,_e=e.memoizedState,d.state=_e,gh(e,a,d,c);var tt=e.memoizedState;g!==j||_e!==tt||Wf.current||$g?(typeof et=="function"&&(kh(e,s,et,a),tt=e.memoizedState),(b=$g||oh(e,s,b,a,_e,tt,_)||!1)?($||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(a,tt,_),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(a,tt,_)),typeof d.componentDidUpdate=="function"&&(e.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof d.componentDidUpdate!="function"||g===o.memoizedProps&&_e===o.memoizedState||(e.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===o.memoizedProps&&_e===o.memoizedState||(e.flags|=1024),e.memoizedProps=a,e.memoizedState=tt),d.props=a,d.state=tt,d.context=_,a=b):(typeof d.componentDidUpdate!="function"||g===o.memoizedProps&&_e===o.memoizedState||(e.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||g===o.memoizedProps&&_e===o.memoizedState||(e.flags|=1024),a=!1)}return kj(o,e,s,a,h,c)}function kj(o,e,s,a,c,h){hj(o,e);var d=(e.flags&128)!==0;if(!a&&!d)return c&&dg(e,s,!1),$i(o,e,h);a=e.stateNode,Xi.current=e;var g=d&&typeof s.getDerivedStateFromError!="function"?null:a.render();return e.flags|=1,o!==null&&d?(e.child=Bh(e,o.child,null,h),e.child=Bh(e,null,g,h)):Yi(o,e,g,h),e.memoizedState=a.state,c&&dg(e,s,!0),e.child}function lj(o){var e=o.stateNode;e.pendingContext?ag(o,e.pendingContext,e.pendingContext!==e.context):e.context&&ag(o,e.context,!1),Ih(o,e.containerInfo)}function mj(o,e,s,a,c){return Ig(),Jg(c),e.flags|=256,Yi(o,e,s,a),e.child}var nj={dehydrated:null,treeContext:null,retryLane:0};function oj(o){return{baseLanes:o,cachePool:null,transitions:null}}function pj(o,e,s){var a=e.pendingProps,c=M.current,h=!1,d=(e.flags&128)!==0,g;if((g=d)||(g=o!==null&&o.memoizedState===null?!1:(c&2)!==0),g?(h=!0,e.flags&=-129):(o===null||o.memoizedState!==null)&&(c|=1),G(M,c&1),o===null)return Eg(e),o=e.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((e.mode&1)===0?e.lanes=1:o.data==="$!"?e.lanes=8:e.lanes=1073741824,null):(d=a.children,o=a.fallback,h?(a=e.mode,h=e.child,d={mode:"hidden",children:d},(a&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=d):h=qj(d,a,0,null),o=Ah(o,a,s,null),h.return=e,o.return=e,h.sibling=o,e.child=h,e.child.memoizedState=oj(s),e.memoizedState=nj,o):rj(e,d));if(c=o.memoizedState,c!==null&&(g=c.dehydrated,g!==null))return sj(o,e,d,a,g,c,s);if(h){h=a.fallback,d=e.mode,c=o.child,g=c.sibling;var _={mode:"hidden",children:a.children};return(d&1)===0&&e.child!==c?(a=e.child,a.childLanes=0,a.pendingProps=_,e.deletions=null):(a=wh(c,_),a.subtreeFlags=c.subtreeFlags&14680064),g!==null?h=wh(g,h):(h=Ah(h,d,s,null),h.flags|=2),h.return=e,a.return=e,a.sibling=h,e.child=a,a=h,h=e.child,d=o.child.memoizedState,d=d===null?oj(s):{baseLanes:d.baseLanes|s,cachePool:null,transitions:d.transitions},h.memoizedState=d,h.childLanes=o.childLanes&~s,e.memoizedState=nj,a}return h=o.child,o=h.sibling,a=wh(h,{mode:"visible",children:a.children}),(e.mode&1)===0&&(a.lanes=s),a.return=e,a.sibling=null,o!==null&&(s=e.deletions,s===null?(e.deletions=[o],e.flags|=16):s.push(o)),e.child=a,e.memoizedState=null,a}function rj(o,e){return e=qj({mode:"visible",children:e},o.mode,0,null),e.return=o,o.child=e}function tj(o,e,s,a){return a!==null&&Jg(a),Bh(e,o.child,null,s),o=rj(e,e.pendingProps.children),o.flags|=2,e.memoizedState=null,o}function sj(o,e,s,a,c,h,d){if(s)return e.flags&256?(e.flags&=-257,a=Li(Error(p$2(422))),tj(o,e,d,a)):e.memoizedState!==null?(e.child=o.child,e.flags|=128,null):(h=a.fallback,c=e.mode,a=qj({mode:"visible",children:a.children},c,0,null),h=Ah(h,c,d,null),h.flags|=2,a.return=e,h.return=e,a.sibling=h,e.child=a,(e.mode&1)!==0&&Bh(e,o.child,null,d),e.child.memoizedState=oj(d),e.memoizedState=nj,h);if((e.mode&1)===0)return tj(o,e,d,null);if(c.data==="$!"){if(a=c.nextSibling&&c.nextSibling.dataset,a)var g=a.dgst;return a=g,h=Error(p$2(419)),a=Li(h,a,void 0),tj(o,e,d,a)}if(g=(d&o.childLanes)!==0,Ug||g){if(a=R,a!==null){switch(d&-d){case 4:c=2;break;case 16:c=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:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(a.suspendedLanes|d))!==0?0:c,c!==0&&c!==h.retryLane&&(h.retryLane=c,Zg(o,c),mh(a,o,c,-1))}return uj(),a=Li(Error(p$2(421))),tj(o,e,d,a)}return c.data==="$?"?(e.flags|=128,e.child=o.child,e=vj.bind(null,o),c._reactRetry=e,null):(o=h.treeContext,yg=Lf(c.nextSibling),xg=e,I$1=!0,zg=null,o!==null&&(og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,rg=o.id,sg=o.overflow,qg=e),e=rj(e,a.children),e.flags|=4096,e)}function wj(o,e,s){o.lanes|=e;var a=o.alternate;a!==null&&(a.lanes|=e),Sg(o.return,e,s)}function xj(o,e,s,a,c){var h=o.memoizedState;h===null?o.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:c}:(h.isBackwards=e,h.rendering=null,h.renderingStartTime=0,h.last=a,h.tail=s,h.tailMode=c)}function yj(o,e,s){var a=e.pendingProps,c=a.revealOrder,h=a.tail;if(Yi(o,e,a.children,s),a=M.current,(a&2)!==0)a=a&1|2,e.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=e.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&wj(o,s,e);else if(o.tag===19)wj(o,s,e);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break e;for(;o.sibling===null;){if(o.return===null||o.return===e)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}a&=1}if(G(M,a),(e.mode&1)===0)e.memoizedState=null;else switch(c){case"forwards":for(s=e.child,c=null;s!==null;)o=s.alternate,o!==null&&Mh(o)===null&&(c=s),s=s.sibling;s=c,s===null?(c=e.child,e.child=null):(c=s.sibling,s.sibling=null),xj(e,!1,c,s,h);break;case"backwards":for(s=null,c=e.child,e.child=null;c!==null;){if(o=c.alternate,o!==null&&Mh(o)===null){e.child=c;break}o=c.sibling,c.sibling=s,s=c,c=o}xj(e,!0,s,null,h);break;case"together":xj(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function jj(o,e){(e.mode&1)===0&&o!==null&&(o.alternate=null,e.alternate=null,e.flags|=2)}function $i(o,e,s){if(o!==null&&(e.dependencies=o.dependencies),hh|=e.lanes,(s&e.childLanes)===0)return null;if(o!==null&&e.child!==o.child)throw Error(p$2(153));if(e.child!==null){for(o=e.child,s=wh(o,o.pendingProps),e.child=s,s.return=e;o.sibling!==null;)o=o.sibling,s=s.sibling=wh(o,o.pendingProps),s.return=e;s.sibling=null}return e.child}function zj(o,e,s){switch(e.tag){case 3:lj(e),Ig();break;case 5:Kh(e);break;case 1:Zf(e.type)&&cg(e);break;case 4:Ih(e,e.stateNode.containerInfo);break;case 10:var a=e.type._context,c=e.memoizedProps.value;G(Mg,a._currentValue),a._currentValue=c;break;case 13:if(a=e.memoizedState,a!==null)return a.dehydrated!==null?(G(M,M.current&1),e.flags|=128,null):(s&e.child.childLanes)!==0?pj(o,e,s):(G(M,M.current&1),o=$i(o,e,s),o!==null?o.sibling:null);G(M,M.current&1);break;case 19:if(a=(s&e.childLanes)!==0,(o.flags&128)!==0){if(a)return yj(o,e,s);e.flags|=128}if(c=e.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),G(M,M.current),a)break;return null;case 22:case 23:return e.lanes=0,ej(o,e,s)}return $i(o,e,s)}var Aj,Bj,Cj,Dj;Aj=function(o,e){for(var s=e.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===e)break;for(;s.sibling===null;){if(s.return===null||s.return===e)return;s=s.return}s.sibling.return=s.return,s=s.sibling}};Bj=function(){};Cj=function(o,e,s,a){var c=o.memoizedProps;if(c!==a){o=e.stateNode,Hh(Eh.current);var h=null;switch(s){case"input":c=Ya(o,c),a=Ya(o,a),h=[];break;case"select":c=A({},c,{value:void 0}),a=A({},a,{value:void 0}),h=[];break;case"textarea":c=gb(o,c),a=gb(o,a),h=[];break;default:typeof c.onClick!="function"&&typeof a.onClick=="function"&&(o.onclick=Bf)}ub(s,a);var d;s=null;for(b in c)if(!a.hasOwnProperty(b)&&c.hasOwnProperty(b)&&c[b]!=null)if(b==="style"){var g=c[b];for(d in g)g.hasOwnProperty(d)&&(s||(s={}),s[d]="")}else b!=="dangerouslySetInnerHTML"&&b!=="children"&&b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(ea.hasOwnProperty(b)?h||(h=[]):(h=h||[]).push(b,null));for(b in a){var _=a[b];if(g=c!=null?c[b]:void 0,a.hasOwnProperty(b)&&_!==g&&(_!=null||g!=null))if(b==="style")if(g){for(d in g)!g.hasOwnProperty(d)||_&&_.hasOwnProperty(d)||(s||(s={}),s[d]="");for(d in _)_.hasOwnProperty(d)&&g[d]!==_[d]&&(s||(s={}),s[d]=_[d])}else s||(h||(h=[]),h.push(b,s)),s=_;else b==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,g=g?g.__html:void 0,_!=null&&g!==_&&(h=h||[]).push(b,_)):b==="children"?typeof _!="string"&&typeof _!="number"||(h=h||[]).push(b,""+_):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&(ea.hasOwnProperty(b)?(_!=null&&b==="onScroll"&&D("scroll",o),h||g===_||(h=[])):(h=h||[]).push(b,_))}s&&(h=h||[]).push("style",s);var b=h;(e.updateQueue=b)&&(e.flags|=4)}};Dj=function(o,e,s,a){s!==a&&(e.flags|=4)};function Ej(o,e){if(!I$1)switch(o.tailMode){case"hidden":e=o.tail;for(var s=null;e!==null;)e.alternate!==null&&(s=e),e=e.sibling;s===null?o.tail=null:s.sibling=null;break;case"collapsed":s=o.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?e||o.tail===null?o.tail=null:o.tail.sibling=null:a.sibling=null}}function S(o){var e=o.alternate!==null&&o.alternate.child===o.child,s=0,a=0;if(e)for(var c=o.child;c!==null;)s|=c.lanes|c.childLanes,a|=c.subtreeFlags&14680064,a|=c.flags&14680064,c.return=o,c=c.sibling;else for(c=o.child;c!==null;)s|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=o,c=c.sibling;return o.subtreeFlags|=a,o.childLanes=s,e}function Fj(o,e,s){var a=e.pendingProps;switch(wg(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(e),null;case 1:return Zf(e.type)&&$f(),S(e),null;case 3:return a=e.stateNode,Jh(),E(Wf),E(H),Oh(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(o===null||o.child===null)&&(Gg(e)?e.flags|=4:o===null||o.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,zg!==null&&(Gj(zg),zg=null))),Bj(o,e),S(e),null;case 5:Lh(e);var c=Hh(Gh.current);if(s=e.type,o!==null&&e.stateNode!=null)Cj(o,e,s,a,c),o.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!a){if(e.stateNode===null)throw Error(p$2(166));return S(e),null}if(o=Hh(Eh.current),Gg(e)){a=e.stateNode,s=e.type;var h=e.memoizedProps;switch(a[Of]=e,a[Pf]=h,o=(e.mode&1)!==0,s){case"dialog":D("cancel",a),D("close",a);break;case"iframe":case"object":case"embed":D("load",a);break;case"video":case"audio":for(c=0;c<lf.length;c++)D(lf[c],a);break;case"source":D("error",a);break;case"img":case"image":case"link":D("error",a),D("load",a);break;case"details":D("toggle",a);break;case"input":Za(a,h),D("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!h.multiple},D("invalid",a);break;case"textarea":hb(a,h),D("invalid",a)}ub(s,h),c=null;for(var d in h)if(h.hasOwnProperty(d)){var g=h[d];d==="children"?typeof g=="string"?a.textContent!==g&&(h.suppressHydrationWarning!==!0&&Af(a.textContent,g,o),c=["children",g]):typeof g=="number"&&a.textContent!==""+g&&(h.suppressHydrationWarning!==!0&&Af(a.textContent,g,o),c=["children",""+g]):ea.hasOwnProperty(d)&&g!=null&&d==="onScroll"&&D("scroll",a)}switch(s){case"input":Va(a),db(a,h,!0);break;case"textarea":Va(a),jb(a);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(a.onclick=Bf)}a=c,e.updateQueue=a,a!==null&&(e.flags|=4)}else{d=c.nodeType===9?c:c.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=kb(s)),o==="http://www.w3.org/1999/xhtml"?s==="script"?(o=d.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof a.is=="string"?o=d.createElement(s,{is:a.is}):(o=d.createElement(s),s==="select"&&(d=o,a.multiple?d.multiple=!0:a.size&&(d.size=a.size))):o=d.createElementNS(o,s),o[Of]=e,o[Pf]=a,Aj(o,e,!1,!1),e.stateNode=o;e:{switch(d=vb(s,a),s){case"dialog":D("cancel",o),D("close",o),c=a;break;case"iframe":case"object":case"embed":D("load",o),c=a;break;case"video":case"audio":for(c=0;c<lf.length;c++)D(lf[c],o);c=a;break;case"source":D("error",o),c=a;break;case"img":case"image":case"link":D("error",o),D("load",o),c=a;break;case"details":D("toggle",o),c=a;break;case"input":Za(o,a),c=Ya(o,a),D("invalid",o);break;case"option":c=a;break;case"select":o._wrapperState={wasMultiple:!!a.multiple},c=A({},a,{value:void 0}),D("invalid",o);break;case"textarea":hb(o,a),c=gb(o,a),D("invalid",o);break;default:c=a}ub(s,c),g=c;for(h in g)if(g.hasOwnProperty(h)){var _=g[h];h==="style"?sb(o,_):h==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,_!=null&&nb(o,_)):h==="children"?typeof _=="string"?(s!=="textarea"||_!=="")&&ob(o,_):typeof _=="number"&&ob(o,""+_):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(ea.hasOwnProperty(h)?_!=null&&h==="onScroll"&&D("scroll",o):_!=null&&ta(o,h,_,d))}switch(s){case"input":Va(o),db(o,a,!1);break;case"textarea":Va(o),jb(o);break;case"option":a.value!=null&&o.setAttribute("value",""+Sa(a.value));break;case"select":o.multiple=!!a.multiple,h=a.value,h!=null?fb(o,!!a.multiple,h,!1):a.defaultValue!=null&&fb(o,!!a.multiple,a.defaultValue,!0);break;default:typeof c.onClick=="function"&&(o.onclick=Bf)}switch(s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return S(e),null;case 6:if(o&&e.stateNode!=null)Dj(o,e,o.memoizedProps,a);else{if(typeof a!="string"&&e.stateNode===null)throw Error(p$2(166));if(s=Hh(Gh.current),Hh(Eh.current),Gg(e)){if(a=e.stateNode,s=e.memoizedProps,a[Of]=e,(h=a.nodeValue!==s)&&(o=xg,o!==null))switch(o.tag){case 3:Af(a.nodeValue,s,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&Af(a.nodeValue,s,(o.mode&1)!==0)}h&&(e.flags|=4)}else a=(s.nodeType===9?s:s.ownerDocument).createTextNode(a),a[Of]=e,e.stateNode=a}return S(e),null;case 13:if(E(M),a=e.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(I$1&&yg!==null&&(e.mode&1)!==0&&(e.flags&128)===0)Hg(),Ig(),e.flags|=98560,h=!1;else if(h=Gg(e),a!==null&&a.dehydrated!==null){if(o===null){if(!h)throw Error(p$2(318));if(h=e.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(p$2(317));h[Of]=e}else Ig(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;S(e),h=!1}else zg!==null&&(Gj(zg),zg=null),h=!0;if(!h)return e.flags&65536?e:null}return(e.flags&128)!==0?(e.lanes=s,e):(a=a!==null,a!==(o!==null&&o.memoizedState!==null)&&a&&(e.child.flags|=8192,(e.mode&1)!==0&&(o===null||(M.current&1)!==0?T$1===0&&(T$1=3):uj())),e.updateQueue!==null&&(e.flags|=4),S(e),null);case 4:return Jh(),Bj(o,e),o===null&&sf(e.stateNode.containerInfo),S(e),null;case 10:return Rg(e.type._context),S(e),null;case 17:return Zf(e.type)&&$f(),S(e),null;case 19:if(E(M),h=e.memoizedState,h===null)return S(e),null;if(a=(e.flags&128)!==0,d=h.rendering,d===null)if(a)Ej(h,!1);else{if(T$1!==0||o!==null&&(o.flags&128)!==0)for(o=e.child;o!==null;){if(d=Mh(o),d!==null){for(e.flags|=128,Ej(h,!1),a=d.updateQueue,a!==null&&(e.updateQueue=a,e.flags|=4),e.subtreeFlags=0,a=s,s=e.child;s!==null;)h=s,o=a,h.flags&=14680066,d=h.alternate,d===null?(h.childLanes=0,h.lanes=o,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=d.childLanes,h.lanes=d.lanes,h.child=d.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=d.memoizedProps,h.memoizedState=d.memoizedState,h.updateQueue=d.updateQueue,h.type=d.type,o=d.dependencies,h.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),s=s.sibling;return G(M,M.current&1|2),e.child}o=o.sibling}h.tail!==null&&B()>Hj&&(e.flags|=128,a=!0,Ej(h,!1),e.lanes=4194304)}else{if(!a)if(o=Mh(d),o!==null){if(e.flags|=128,a=!0,s=o.updateQueue,s!==null&&(e.updateQueue=s,e.flags|=4),Ej(h,!0),h.tail===null&&h.tailMode==="hidden"&&!d.alternate&&!I$1)return S(e),null}else 2*B()-h.renderingStartTime>Hj&&s!==1073741824&&(e.flags|=128,a=!0,Ej(h,!1),e.lanes=4194304);h.isBackwards?(d.sibling=e.child,e.child=d):(s=h.last,s!==null?s.sibling=d:e.child=d,h.last=d)}return h.tail!==null?(e=h.tail,h.rendering=e,h.tail=e.sibling,h.renderingStartTime=B(),e.sibling=null,s=M.current,G(M,a?s&1|2:s&1),e):(S(e),null);case 22:case 23:return Ij(),a=e.memoizedState!==null,o!==null&&o.memoizedState!==null!==a&&(e.flags|=8192),a&&(e.mode&1)!==0?(gj&1073741824)!==0&&(S(e),e.subtreeFlags&6&&(e.flags|=8192)):S(e),null;case 24:return null;case 25:return null}throw Error(p$2(156,e.tag))}function Jj(o,e){switch(wg(e),e.tag){case 1:return Zf(e.type)&&$f(),o=e.flags,o&65536?(e.flags=o&-65537|128,e):null;case 3:return Jh(),E(Wf),E(H),Oh(),o=e.flags,(o&65536)!==0&&(o&128)===0?(e.flags=o&-65537|128,e):null;case 5:return Lh(e),null;case 13:if(E(M),o=e.memoizedState,o!==null&&o.dehydrated!==null){if(e.alternate===null)throw Error(p$2(340));Ig()}return o=e.flags,o&65536?(e.flags=o&-65537|128,e):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(e.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,V=null;function Mj(o,e){var s=o.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(a){W(o,e,a)}else s.current=null}function Nj(o,e,s){try{s()}catch(a){W(o,e,a)}}var Oj=!1;function Pj(o,e){if(Cf=dd,o=Me(),Ne(o)){if("selectionStart"in o)var s={start:o.selectionStart,end:o.selectionEnd};else e:{s=(s=o.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var c=a.anchorOffset,h=a.focusNode;a=a.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var d=0,g=-1,_=-1,b=0,$=0,j=o,_e=null;t:for(;;){for(var et;j!==s||c!==0&&j.nodeType!==3||(g=d+c),j!==h||a!==0&&j.nodeType!==3||(_=d+a),j.nodeType===3&&(d+=j.nodeValue.length),(et=j.firstChild)!==null;)_e=j,j=et;for(;;){if(j===o)break t;if(_e===s&&++b===c&&(g=d),_e===h&&++$===a&&(_=d),(et=j.nextSibling)!==null)break;j=_e,_e=j.parentNode}j=et}s=g===-1||_===-1?null:{start:g,end:_}}else s=null}s=s||{start:0,end:0}}else s=null;for(Df={focusedElem:o,selectionRange:s},dd=!1,V=e;V!==null;)if(e=V,o=e.child,(e.subtreeFlags&1028)!==0&&o!==null)o.return=e,V=o;else for(;V!==null;){e=V;try{var tt=e.alternate;if((e.flags&1024)!==0)switch(e.tag){case 0:case 11:case 15:break;case 1:if(tt!==null){var nt=tt.memoizedProps,st=tt.memoizedState,rt=e.stateNode,it=rt.getSnapshotBeforeUpdate(e.elementType===e.type?nt:Lg(e.type,nt),st);rt.__reactInternalSnapshotBeforeUpdate=it}break;case 3:var at=e.stateNode.containerInfo;at.nodeType===1?at.textContent="":at.nodeType===9&&at.documentElement&&at.removeChild(at.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$2(163))}}catch(ot){W(e,e.return,ot)}if(o=e.sibling,o!==null){o.return=e.return,V=o;break}V=e.return}return tt=Oj,Oj=!1,tt}function Qj(o,e,s){var a=e.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&o)===o){var h=c.destroy;c.destroy=void 0,h!==void 0&&Nj(e,s,h)}c=c.next}while(c!==a)}}function Rj(o,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var s=e=e.next;do{if((s.tag&o)===o){var a=s.create;s.destroy=a()}s=s.next}while(s!==e)}}function Sj(o){var e=o.ref;if(e!==null){var s=o.stateNode;switch(o.tag){case 5:o=s;break;default:o=s}typeof e=="function"?e(o):e.current=o}}function Tj(o){var e=o.alternate;e!==null&&(o.alternate=null,Tj(e)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(e=o.stateNode,e!==null&&(delete e[Of],delete e[Pf],delete e[of],delete e[Qf],delete e[Rf])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function Uj(o){return o.tag===5||o.tag===3||o.tag===4}function Vj(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Uj(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Wj(o,e,s){var a=o.tag;if(a===5||a===6)o=o.stateNode,e?s.nodeType===8?s.parentNode.insertBefore(o,e):s.insertBefore(o,e):(s.nodeType===8?(e=s.parentNode,e.insertBefore(o,s)):(e=s,e.appendChild(o)),s=s._reactRootContainer,s!=null||e.onclick!==null||(e.onclick=Bf));else if(a!==4&&(o=o.child,o!==null))for(Wj(o,e,s),o=o.sibling;o!==null;)Wj(o,e,s),o=o.sibling}function Xj(o,e,s){var a=o.tag;if(a===5||a===6)o=o.stateNode,e?s.insertBefore(o,e):s.appendChild(o);else if(a!==4&&(o=o.child,o!==null))for(Xj(o,e,s),o=o.sibling;o!==null;)Xj(o,e,s),o=o.sibling}var X=null,Yj=!1;function Zj(o,e,s){for(s=s.child;s!==null;)ak(o,e,s),s=s.sibling}function ak(o,e,s){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,s)}catch{}switch(s.tag){case 5:U||Mj(s,e);case 6:var a=X,c=Yj;X=null,Zj(o,e,s),X=a,Yj=c,X!==null&&(Yj?(o=X,s=s.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):X.removeChild(s.stateNode));break;case 18:X!==null&&(Yj?(o=X,s=s.stateNode,o.nodeType===8?Kf(o.parentNode,s):o.nodeType===1&&Kf(o,s),bd(o)):Kf(X,s.stateNode));break;case 4:a=X,c=Yj,X=s.stateNode.containerInfo,Yj=!0,Zj(o,e,s),X=a,Yj=c;break;case 0:case 11:case 14:case 15:if(!U&&(a=s.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var h=c,d=h.destroy;h=h.tag,d!==void 0&&((h&2)!==0||(h&4)!==0)&&Nj(s,e,d),c=c.next}while(c!==a)}Zj(o,e,s);break;case 1:if(!U&&(Mj(s,e),a=s.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=s.memoizedProps,a.state=s.memoizedState,a.componentWillUnmount()}catch(g){W(s,e,g)}Zj(o,e,s);break;case 21:Zj(o,e,s);break;case 22:s.mode&1?(U=(a=U)||s.memoizedState!==null,Zj(o,e,s),U=a):Zj(o,e,s);break;default:Zj(o,e,s)}}function bk(o){var e=o.updateQueue;if(e!==null){o.updateQueue=null;var s=o.stateNode;s===null&&(s=o.stateNode=new Lj),e.forEach(function(a){var c=ck.bind(null,o,a);s.has(a)||(s.add(a),a.then(c,c))})}}function dk(o,e){var s=e.deletions;if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];try{var h=o,d=e,g=d;e:for(;g!==null;){switch(g.tag){case 5:X=g.stateNode,Yj=!1;break e;case 3:X=g.stateNode.containerInfo,Yj=!0;break e;case 4:X=g.stateNode.containerInfo,Yj=!0;break e}g=g.return}if(X===null)throw Error(p$2(160));ak(h,d,c),X=null,Yj=!1;var _=c.alternate;_!==null&&(_.return=null),c.return=null}catch(b){W(c,e,b)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)ek(e,o),e=e.sibling}function ek(o,e){var s=o.alternate,a=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(dk(e,o),fk(o),a&4){try{Qj(3,o,o.return),Rj(3,o)}catch(nt){W(o,o.return,nt)}try{Qj(5,o,o.return)}catch(nt){W(o,o.return,nt)}}break;case 1:dk(e,o),fk(o),a&512&&s!==null&&Mj(s,s.return);break;case 5:if(dk(e,o),fk(o),a&512&&s!==null&&Mj(s,s.return),o.flags&32){var c=o.stateNode;try{ob(c,"")}catch(nt){W(o,o.return,nt)}}if(a&4&&(c=o.stateNode,c!=null)){var h=o.memoizedProps,d=s!==null?s.memoizedProps:h,g=o.type,_=o.updateQueue;if(o.updateQueue=null,_!==null)try{g==="input"&&h.type==="radio"&&h.name!=null&&ab(c,h),vb(g,d);var b=vb(g,h);for(d=0;d<_.length;d+=2){var $=_[d],j=_[d+1];$==="style"?sb(c,j):$==="dangerouslySetInnerHTML"?nb(c,j):$==="children"?ob(c,j):ta(c,$,j,b)}switch(g){case"input":bb(c,h);break;case"textarea":ib(c,h);break;case"select":var _e=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!h.multiple;var et=h.value;et!=null?fb(c,!!h.multiple,et,!1):_e!==!!h.multiple&&(h.defaultValue!=null?fb(c,!!h.multiple,h.defaultValue,!0):fb(c,!!h.multiple,h.multiple?[]:"",!1))}c[Pf]=h}catch(nt){W(o,o.return,nt)}}break;case 6:if(dk(e,o),fk(o),a&4){if(o.stateNode===null)throw Error(p$2(162));c=o.stateNode,h=o.memoizedProps;try{c.nodeValue=h}catch(nt){W(o,o.return,nt)}}break;case 3:if(dk(e,o),fk(o),a&4&&s!==null&&s.memoizedState.isDehydrated)try{bd(e.containerInfo)}catch(nt){W(o,o.return,nt)}break;case 4:dk(e,o),fk(o);break;case 13:dk(e,o),fk(o),c=o.child,c.flags&8192&&(h=c.memoizedState!==null,c.stateNode.isHidden=h,!h||c.alternate!==null&&c.alternate.memoizedState!==null||(gk=B())),a&4&&bk(o);break;case 22:if($=s!==null&&s.memoizedState!==null,o.mode&1?(U=(b=U)||$,dk(e,o),U=b):dk(e,o),fk(o),a&8192){if(b=o.memoizedState!==null,(o.stateNode.isHidden=b)&&!$&&(o.mode&1)!==0)for(V=o,$=o.child;$!==null;){for(j=V=$;V!==null;){switch(_e=V,et=_e.child,_e.tag){case 0:case 11:case 14:case 15:Qj(4,_e,_e.return);break;case 1:Mj(_e,_e.return);var tt=_e.stateNode;if(typeof tt.componentWillUnmount=="function"){a=_e,s=_e.return;try{e=a,tt.props=e.memoizedProps,tt.state=e.memoizedState,tt.componentWillUnmount()}catch(nt){W(a,s,nt)}}break;case 5:Mj(_e,_e.return);break;case 22:if(_e.memoizedState!==null){hk(j);continue}}et!==null?(et.return=_e,V=et):hk(j)}$=$.sibling}e:for($=null,j=o;;){if(j.tag===5){if($===null){$=j;try{c=j.stateNode,b?(h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(g=j.stateNode,_=j.memoizedProps.style,d=_!=null&&_.hasOwnProperty("display")?_.display:null,g.style.display=rb("display",d))}catch(nt){W(o,o.return,nt)}}}else if(j.tag===6){if($===null)try{j.stateNode.nodeValue=b?"":j.memoizedProps}catch(nt){W(o,o.return,nt)}}else if((j.tag!==22&&j.tag!==23||j.memoizedState===null||j===o)&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===o)break e;for(;j.sibling===null;){if(j.return===null||j.return===o)break e;$===j&&($=null),j=j.return}$===j&&($=null),j.sibling.return=j.return,j=j.sibling}}break;case 19:dk(e,o),fk(o),a&4&&bk(o);break;case 21:break;default:dk(e,o),fk(o)}}function fk(o){var e=o.flags;if(e&2){try{e:{for(var s=o.return;s!==null;){if(Uj(s)){var a=s;break e}s=s.return}throw Error(p$2(160))}switch(a.tag){case 5:var c=a.stateNode;a.flags&32&&(ob(c,""),a.flags&=-33);var h=Vj(o);Xj(o,h,c);break;case 3:case 4:var d=a.stateNode.containerInfo,g=Vj(o);Wj(o,g,d);break;default:throw Error(p$2(161))}}catch(_){W(o,o.return,_)}o.flags&=-3}e&4096&&(o.flags&=-4097)}function ik(o,e,s){V=o,jk(o)}function jk(o,e,s){for(var a=(o.mode&1)!==0;V!==null;){var c=V,h=c.child;if(c.tag===22&&a){var d=c.memoizedState!==null||Kj;if(!d){var g=c.alternate,_=g!==null&&g.memoizedState!==null||U;g=Kj;var b=U;if(Kj=d,(U=_)&&!b)for(V=c;V!==null;)d=V,_=d.child,d.tag===22&&d.memoizedState!==null?kk(c):_!==null?(_.return=d,V=_):kk(c);for(;h!==null;)V=h,jk(h),h=h.sibling;V=c,Kj=g,U=b}lk(o)}else(c.subtreeFlags&8772)!==0&&h!==null?(h.return=c,V=h):lk(o)}}function lk(o){for(;V!==null;){var e=V;if((e.flags&8772)!==0){var s=e.alternate;try{if((e.flags&8772)!==0)switch(e.tag){case 0:case 11:case 15:U||Rj(5,e);break;case 1:var a=e.stateNode;if(e.flags&4&&!U)if(s===null)a.componentDidMount();else{var c=e.elementType===e.type?s.memoizedProps:Lg(e.type,s.memoizedProps);a.componentDidUpdate(c,s.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var h=e.updateQueue;h!==null&&ih(e,h,a);break;case 3:var d=e.updateQueue;if(d!==null){if(s=null,e.child!==null)switch(e.child.tag){case 5:s=e.child.stateNode;break;case 1:s=e.child.stateNode}ih(e,d,s)}break;case 5:var g=e.stateNode;if(s===null&&e.flags&4){s=g;var _=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":_.autoFocus&&s.focus();break;case"img":_.src&&(s.src=_.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var b=e.alternate;if(b!==null){var $=b.memoizedState;if($!==null){var j=$.dehydrated;j!==null&&bd(j)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(p$2(163))}U||e.flags&512&&Sj(e)}catch(_e){W(e,e.return,_e)}}if(e===o){V=null;break}if(s=e.sibling,s!==null){s.return=e.return,V=s;break}V=e.return}}function hk(o){for(;V!==null;){var e=V;if(e===o){V=null;break}var s=e.sibling;if(s!==null){s.return=e.return,V=s;break}V=e.return}}function kk(o){for(;V!==null;){var e=V;try{switch(e.tag){case 0:case 11:case 15:var s=e.return;try{Rj(4,e)}catch(_){W(e,s,_)}break;case 1:var a=e.stateNode;if(typeof a.componentDidMount=="function"){var c=e.return;try{a.componentDidMount()}catch(_){W(e,c,_)}}var h=e.return;try{Sj(e)}catch(_){W(e,h,_)}break;case 5:var d=e.return;try{Sj(e)}catch(_){W(e,d,_)}}}catch(_){W(e,e.return,_)}if(e===o){V=null;break}var g=e.sibling;if(g!==null){g.return=e.return,V=g;break}V=e.return}}var mk=Math.ceil,nk=ua.ReactCurrentDispatcher,ok=ua.ReactCurrentOwner,pk=ua.ReactCurrentBatchConfig,K=0,R=null,Y=null,Z=0,gj=0,fj=Uf(0),T$1=0,qk=null,hh=0,rk=0,sk=0,tk=null,uk=null,gk=0,Hj=1/0,vk=null,Pi=!1,Qi=null,Si=null,wk=!1,xk=null,yk=0,zk=0,Ak=null,Bk=-1,Ck=0;function L(){return(K&6)!==0?B():Bk!==-1?Bk:Bk=B()}function lh(o){return(o.mode&1)===0?1:(K&2)!==0&&Z!==0?Z&-Z:Kg.transition!==null?(Ck===0&&(Ck=yc()),Ck):(o=C$1,o!==0||(o=window.event,o=o===void 0?16:jd(o.type)),o)}function mh(o,e,s,a){if(50<zk)throw zk=0,Ak=null,Error(p$2(185));Ac(o,s,a),((K&2)===0||o!==R)&&(o===R&&((K&2)===0&&(rk|=s),T$1===4&&Dk(o,Z)),Ek(o,a),s===1&&K===0&&(e.mode&1)===0&&(Hj=B()+500,fg&&jg()))}function Ek(o,e){var s=o.callbackNode;wc(o,e);var a=uc(o,o===R?Z:0);if(a===0)s!==null&&bc(s),o.callbackNode=null,o.callbackPriority=0;else if(e=a&-a,o.callbackPriority!==e){if(s!=null&&bc(s),e===1)o.tag===0?ig(Fk.bind(null,o)):hg(Fk.bind(null,o)),Jf(function(){(K&6)===0&&jg()}),s=null;else{switch(Dc(a)){case 1:s=fc;break;case 4:s=gc;break;case 16:s=hc;break;case 536870912:s=jc;break;default:s=hc}s=Gk(s,Hk.bind(null,o))}o.callbackPriority=e,o.callbackNode=s}}function Hk(o,e){if(Bk=-1,Ck=0,(K&6)!==0)throw Error(p$2(327));var s=o.callbackNode;if(Ik()&&o.callbackNode!==s)return null;var a=uc(o,o===R?Z:0);if(a===0)return null;if((a&30)!==0||(a&o.expiredLanes)!==0||e)e=Jk(o,a);else{e=a;var c=K;K|=2;var h=Kk();(R!==o||Z!==e)&&(vk=null,Hj=B()+500,Lk(o,e));do try{Mk();break}catch(g){Nk(o,g)}while(1);Qg(),nk.current=h,K=c,Y!==null?e=0:(R=null,Z=0,e=T$1)}if(e!==0){if(e===2&&(c=xc(o),c!==0&&(a=c,e=Ok(o,c))),e===1)throw s=qk,Lk(o,0),Dk(o,a),Ek(o,B()),s;if(e===6)Dk(o,a);else{if(c=o.current.alternate,(a&30)===0&&!Pk(c)&&(e=Jk(o,a),e===2&&(h=xc(o),h!==0&&(a=h,e=Ok(o,h))),e===1))throw s=qk,Lk(o,0),Dk(o,a),Ek(o,B()),s;switch(o.finishedWork=c,o.finishedLanes=a,e){case 0:case 1:throw Error(p$2(345));case 2:Qk(o,uk,vk);break;case 3:if(Dk(o,a),(a&130023424)===a&&(e=gk+500-B(),10<e)){if(uc(o,0)!==0)break;if(c=o.suspendedLanes,(c&a)!==a){L(),o.pingedLanes|=o.suspendedLanes&c;break}o.timeoutHandle=Ff(Qk.bind(null,o,uk,vk),e);break}Qk(o,uk,vk);break;case 4:if(Dk(o,a),(a&4194240)===a)break;for(e=o.eventTimes,c=-1;0<a;){var d=31-oc(a);h=1<<d,d=e[d],d>c&&(c=d),a&=~h}if(a=c,a=B()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*mk(a/1960))-a,10<a){o.timeoutHandle=Ff(Qk.bind(null,o,uk,vk),a);break}Qk(o,uk,vk);break;case 5:Qk(o,uk,vk);break;default:throw Error(p$2(329))}}}return Ek(o,B()),o.callbackNode===s?Hk.bind(null,o):null}function Ok(o,e){var s=tk;return o.current.memoizedState.isDehydrated&&(Lk(o,e).flags|=256),o=Jk(o,e),o!==2&&(e=uk,uk=s,e!==null&&Gj(e)),o}function Gj(o){uk===null?uk=o:uk.push.apply(uk,o)}function Pk(o){for(var e=o;;){if(e.flags&16384){var s=e.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var a=0;a<s.length;a++){var c=s[a],h=c.getSnapshot;c=c.value;try{if(!He(h(),c))return!1}catch{return!1}}}if(s=e.child,e.subtreeFlags&16384&&s!==null)s.return=e,e=s;else{if(e===o)break;for(;e.sibling===null;){if(e.return===null||e.return===o)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Dk(o,e){for(e&=~sk,e&=~rk,o.suspendedLanes|=e,o.pingedLanes&=~e,o=o.expirationTimes;0<e;){var s=31-oc(e),a=1<<s;o[s]=-1,e&=~a}}function Fk(o){if((K&6)!==0)throw Error(p$2(327));Ik();var e=uc(o,0);if((e&1)===0)return Ek(o,B()),null;var s=Jk(o,e);if(o.tag!==0&&s===2){var a=xc(o);a!==0&&(e=a,s=Ok(o,a))}if(s===1)throw s=qk,Lk(o,0),Dk(o,e),Ek(o,B()),s;if(s===6)throw Error(p$2(345));return o.finishedWork=o.current.alternate,o.finishedLanes=e,Qk(o,uk,vk),Ek(o,B()),null}function Rk(o,e){var s=K;K|=1;try{return o(e)}finally{K=s,K===0&&(Hj=B()+500,fg&&jg())}}function Sk(o){xk!==null&&xk.tag===0&&(K&6)===0&&Ik();var e=K;K|=1;var s=pk.transition,a=C$1;try{if(pk.transition=null,C$1=1,o)return o()}finally{C$1=a,pk.transition=s,K=e,(K&6)===0&&jg()}}function Ij(){gj=fj.current,E(fj)}function Lk(o,e){o.finishedWork=null,o.finishedLanes=0;var s=o.timeoutHandle;if(s!==-1&&(o.timeoutHandle=-1,Gf(s)),Y!==null)for(s=Y.return;s!==null;){var a=s;switch(wg(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&$f();break;case 3:Jh(),E(Wf),E(H),Oh();break;case 5:Lh(a);break;case 4:Jh();break;case 13:E(M);break;case 19:E(M);break;case 10:Rg(a.type._context);break;case 22:case 23:Ij()}s=s.return}if(R=o,Y=o=wh(o.current,null),Z=gj=e,T$1=0,qk=null,sk=rk=hh=0,uk=tk=null,Wg!==null){for(e=0;e<Wg.length;e++)if(s=Wg[e],a=s.interleaved,a!==null){s.interleaved=null;var c=a.next,h=s.pending;if(h!==null){var d=h.next;h.next=c,a.next=d}s.pending=a}Wg=null}return o}function Nk(o,e){do{var s=Y;try{if(Qg(),Ph.current=ai,Sh){for(var a=N.memoizedState;a!==null;){var c=a.queue;c!==null&&(c.pending=null),a=a.next}Sh=!1}if(Rh=0,P=O=N=null,Th=!1,Uh=0,ok.current=null,s===null||s.return===null){T$1=1,qk=e,Y=null;break}e:{var h=o,d=s.return,g=s,_=e;if(e=Z,g.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){var b=_,$=g,j=$.tag;if(($.mode&1)===0&&(j===0||j===11||j===15)){var _e=$.alternate;_e?($.updateQueue=_e.updateQueue,$.memoizedState=_e.memoizedState,$.lanes=_e.lanes):($.updateQueue=null,$.memoizedState=null)}var et=Vi(d);if(et!==null){et.flags&=-257,Wi(et,d,g,h,e),et.mode&1&&Ti(h,b,e),e=et,_=b;var tt=e.updateQueue;if(tt===null){var nt=new Set;nt.add(_),e.updateQueue=nt}else tt.add(_);break e}else{if((e&1)===0){Ti(h,b,e),uj();break e}_=Error(p$2(426))}}else if(I$1&&g.mode&1){var st=Vi(d);if(st!==null){(st.flags&65536)===0&&(st.flags|=256),Wi(st,d,g,h,e),Jg(Ki(_,g));break e}}h=_=Ki(_,g),T$1!==4&&(T$1=2),tk===null?tk=[h]:tk.push(h),h=d;do{switch(h.tag){case 3:h.flags|=65536,e&=-e,h.lanes|=e;var rt=Oi(h,_,e);fh(h,rt);break e;case 1:g=_;var it=h.type,at=h.stateNode;if((h.flags&128)===0&&(typeof it.getDerivedStateFromError=="function"||at!==null&&typeof at.componentDidCatch=="function"&&(Si===null||!Si.has(at)))){h.flags|=65536,e&=-e,h.lanes|=e;var ot=Ri(h,g,e);fh(h,ot);break e}}h=h.return}while(h!==null)}Tk(s)}catch(ut){e=ut,Y===s&&s!==null&&(Y=s=s.return);continue}break}while(1)}function Kk(){var o=nk.current;return nk.current=ai,o===null?ai:o}function uj(){(T$1===0||T$1===3||T$1===2)&&(T$1=4),R===null||(hh&268435455)===0&&(rk&268435455)===0||Dk(R,Z)}function Jk(o,e){var s=K;K|=2;var a=Kk();(R!==o||Z!==e)&&(vk=null,Lk(o,e));do try{Uk();break}catch(c){Nk(o,c)}while(1);if(Qg(),K=s,nk.current=a,Y!==null)throw Error(p$2(261));return R=null,Z=0,T$1}function Uk(){for(;Y!==null;)Vk(Y)}function Mk(){for(;Y!==null&&!cc();)Vk(Y)}function Vk(o){var e=Wk(o.alternate,o,gj);o.memoizedProps=o.pendingProps,e===null?Tk(o):Y=e,ok.current=null}function Tk(o){var e=o;do{var s=e.alternate;if(o=e.return,(e.flags&32768)===0){if(s=Fj(s,e,gj),s!==null){Y=s;return}}else{if(s=Jj(s,e),s!==null){s.flags&=32767,Y=s;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{T$1=6,Y=null;return}}if(e=e.sibling,e!==null){Y=e;return}Y=e=o}while(e!==null);T$1===0&&(T$1=5)}function Qk(o,e,s){var a=C$1,c=pk.transition;try{pk.transition=null,C$1=1,Xk(o,e,s,a)}finally{pk.transition=c,C$1=a}return null}function Xk(o,e,s,a){do Ik();while(xk!==null);if((K&6)!==0)throw Error(p$2(327));s=o.finishedWork;var c=o.finishedLanes;if(s===null)return null;if(o.finishedWork=null,o.finishedLanes=0,s===o.current)throw Error(p$2(177));o.callbackNode=null,o.callbackPriority=0;var h=s.lanes|s.childLanes;if(Bc(o,h),o===R&&(Y=R=null,Z=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||wk||(wk=!0,Gk(hc,function(){return Ik(),null})),h=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||h){h=pk.transition,pk.transition=null;var d=C$1;C$1=1;var g=K;K|=4,ok.current=null,Pj(o,s),ek(s,o),Oe(Df),dd=!!Cf,Df=Cf=null,o.current=s,ik(s),dc(),K=g,C$1=d,pk.transition=h}else o.current=s;if(wk&&(wk=!1,xk=o,yk=c),h=o.pendingLanes,h===0&&(Si=null),mc(s.stateNode),Ek(o,B()),e!==null)for(a=o.onRecoverableError,s=0;s<e.length;s++)c=e[s],a(c.value,{componentStack:c.stack,digest:c.digest});if(Pi)throw Pi=!1,o=Qi,Qi=null,o;return(yk&1)!==0&&o.tag!==0&&Ik(),h=o.pendingLanes,(h&1)!==0?o===Ak?zk++:(zk=0,Ak=o):zk=0,jg(),null}function Ik(){if(xk!==null){var o=Dc(yk),e=pk.transition,s=C$1;try{if(pk.transition=null,C$1=16>o?16:o,xk===null)var a=!1;else{if(o=xk,xk=null,yk=0,(K&6)!==0)throw Error(p$2(331));var c=K;for(K|=4,V=o.current;V!==null;){var h=V,d=h.child;if((V.flags&16)!==0){var g=h.deletions;if(g!==null){for(var _=0;_<g.length;_++){var b=g[_];for(V=b;V!==null;){var $=V;switch($.tag){case 0:case 11:case 15:Qj(8,$,h)}var j=$.child;if(j!==null)j.return=$,V=j;else for(;V!==null;){$=V;var _e=$.sibling,et=$.return;if(Tj($),$===b){V=null;break}if(_e!==null){_e.return=et,V=_e;break}V=et}}}var tt=h.alternate;if(tt!==null){var nt=tt.child;if(nt!==null){tt.child=null;do{var st=nt.sibling;nt.sibling=null,nt=st}while(nt!==null)}}V=h}}if((h.subtreeFlags&2064)!==0&&d!==null)d.return=h,V=d;else e:for(;V!==null;){if(h=V,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:Qj(9,h,h.return)}var rt=h.sibling;if(rt!==null){rt.return=h.return,V=rt;break e}V=h.return}}var it=o.current;for(V=it;V!==null;){d=V;var at=d.child;if((d.subtreeFlags&2064)!==0&&at!==null)at.return=d,V=at;else e:for(d=it;V!==null;){if(g=V,(g.flags&2048)!==0)try{switch(g.tag){case 0:case 11:case 15:Rj(9,g)}}catch(ut){W(g,g.return,ut)}if(g===d){V=null;break e}var ot=g.sibling;if(ot!==null){ot.return=g.return,V=ot;break e}V=g.return}}if(K=c,jg(),lc&&typeof lc.onPostCommitFiberRoot=="function")try{lc.onPostCommitFiberRoot(kc,o)}catch{}a=!0}return a}finally{C$1=s,pk.transition=e}}return!1}function Yk(o,e,s){e=Ki(s,e),e=Oi(o,e,1),o=dh(o,e,1),e=L(),o!==null&&(Ac(o,1,e),Ek(o,e))}function W(o,e,s){if(o.tag===3)Yk(o,o,s);else for(;e!==null;){if(e.tag===3){Yk(e,o,s);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Si===null||!Si.has(a))){o=Ki(s,o),o=Ri(e,o,1),e=dh(e,o,1),o=L(),e!==null&&(Ac(e,1,o),Ek(e,o));break}}e=e.return}}function Ui(o,e,s){var a=o.pingCache;a!==null&&a.delete(e),e=L(),o.pingedLanes|=o.suspendedLanes&s,R===o&&(Z&s)===s&&(T$1===4||T$1===3&&(Z&130023424)===Z&&500>B()-gk?Lk(o,0):sk|=s),Ek(o,e)}function Zk(o,e){e===0&&((o.mode&1)===0?e=1:(e=sc,sc<<=1,(sc&130023424)===0&&(sc=4194304)));var s=L();o=Zg(o,e),o!==null&&(Ac(o,e,s),Ek(o,s))}function vj(o){var e=o.memoizedState,s=0;e!==null&&(s=e.retryLane),Zk(o,s)}function ck(o,e){var s=0;switch(o.tag){case 13:var a=o.stateNode,c=o.memoizedState;c!==null&&(s=c.retryLane);break;case 19:a=o.stateNode;break;default:throw Error(p$2(314))}a!==null&&a.delete(e),Zk(o,s)}var Wk;Wk=function(o,e,s){if(o!==null)if(o.memoizedProps!==e.pendingProps||Wf.current)Ug=!0;else{if((o.lanes&s)===0&&(e.flags&128)===0)return Ug=!1,zj(o,e,s);Ug=(o.flags&131072)!==0}else Ug=!1,I$1&&(e.flags&1048576)!==0&&ug(e,ng,e.index);switch(e.lanes=0,e.tag){case 2:var a=e.type;jj(o,e),o=e.pendingProps;var c=Yf(e,H.current);Tg(e,s),c=Xh(null,e,a,o,c,s);var h=bi();return e.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Zf(a)?(h=!0,cg(e)):h=!1,e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,ah(e),c.updater=nh,e.stateNode=c,c._reactInternals=e,rh(e,a,o,s),e=kj(null,e,a,!0,h,s)):(e.tag=0,I$1&&h&&vg(e),Yi(null,e,c,s),e=e.child),e;case 16:a=e.elementType;e:{switch(jj(o,e),o=e.pendingProps,c=a._init,a=c(a._payload),e.type=a,c=e.tag=$k(a),o=Lg(a,o),c){case 0:e=dj(null,e,a,o,s);break e;case 1:e=ij(null,e,a,o,s);break e;case 11:e=Zi(null,e,a,o,s);break e;case 14:e=aj(null,e,a,Lg(a.type,o),s);break e}throw Error(p$2(306,a,""))}return e;case 0:return a=e.type,c=e.pendingProps,c=e.elementType===a?c:Lg(a,c),dj(o,e,a,c,s);case 1:return a=e.type,c=e.pendingProps,c=e.elementType===a?c:Lg(a,c),ij(o,e,a,c,s);case 3:e:{if(lj(e),o===null)throw Error(p$2(387));a=e.pendingProps,h=e.memoizedState,c=h.element,bh(o,e),gh(e,a,null,s);var d=e.memoizedState;if(a=d.element,h.isDehydrated)if(h={element:a,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},e.updateQueue.baseState=h,e.memoizedState=h,e.flags&256){c=Ki(Error(p$2(423)),e),e=mj(o,e,a,s,c);break e}else if(a!==c){c=Ki(Error(p$2(424)),e),e=mj(o,e,a,s,c);break e}else for(yg=Lf(e.stateNode.containerInfo.firstChild),xg=e,I$1=!0,zg=null,s=Ch(e,null,a,s),e.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ig(),a===c){e=$i(o,e,s);break e}Yi(o,e,a,s)}e=e.child}return e;case 5:return Kh(e),o===null&&Eg(e),a=e.type,c=e.pendingProps,h=o!==null?o.memoizedProps:null,d=c.children,Ef(a,c)?d=null:h!==null&&Ef(a,h)&&(e.flags|=32),hj(o,e),Yi(o,e,d,s),e.child;case 6:return o===null&&Eg(e),null;case 13:return pj(o,e,s);case 4:return Ih(e,e.stateNode.containerInfo),a=e.pendingProps,o===null?e.child=Bh(e,null,a,s):Yi(o,e,a,s),e.child;case 11:return a=e.type,c=e.pendingProps,c=e.elementType===a?c:Lg(a,c),Zi(o,e,a,c,s);case 7:return Yi(o,e,e.pendingProps,s),e.child;case 8:return Yi(o,e,e.pendingProps.children,s),e.child;case 12:return Yi(o,e,e.pendingProps.children,s),e.child;case 10:e:{if(a=e.type._context,c=e.pendingProps,h=e.memoizedProps,d=c.value,G(Mg,a._currentValue),a._currentValue=d,h!==null)if(He(h.value,d)){if(h.children===c.children&&!Wf.current){e=$i(o,e,s);break e}}else for(h=e.child,h!==null&&(h.return=e);h!==null;){var g=h.dependencies;if(g!==null){d=h.child;for(var _=g.firstContext;_!==null;){if(_.context===a){if(h.tag===1){_=ch(-1,s&-s),_.tag=2;var b=h.updateQueue;if(b!==null){b=b.shared;var $=b.pending;$===null?_.next=_:(_.next=$.next,$.next=_),b.pending=_}}h.lanes|=s,_=h.alternate,_!==null&&(_.lanes|=s),Sg(h.return,s,e),g.lanes|=s;break}_=_.next}}else if(h.tag===10)d=h.type===e.type?null:h.child;else if(h.tag===18){if(d=h.return,d===null)throw Error(p$2(341));d.lanes|=s,g=d.alternate,g!==null&&(g.lanes|=s),Sg(d,s,e),d=h.sibling}else d=h.child;if(d!==null)d.return=h;else for(d=h;d!==null;){if(d===e){d=null;break}if(h=d.sibling,h!==null){h.return=d.return,d=h;break}d=d.return}h=d}Yi(o,e,c.children,s),e=e.child}return e;case 9:return c=e.type,a=e.pendingProps.children,Tg(e,s),c=Vg(c),a=a(c),e.flags|=1,Yi(o,e,a,s),e.child;case 14:return a=e.type,c=Lg(a,e.pendingProps),c=Lg(a.type,c),aj(o,e,a,c,s);case 15:return cj(o,e,e.type,e.pendingProps,s);case 17:return a=e.type,c=e.pendingProps,c=e.elementType===a?c:Lg(a,c),jj(o,e),e.tag=1,Zf(a)?(o=!0,cg(e)):o=!1,Tg(e,s),ph(e,a,c),rh(e,a,c,s),kj(null,e,a,!0,o,s);case 19:return yj(o,e,s);case 22:return ej(o,e,s)}throw Error(p$2(156,e.tag))};function Gk(o,e){return ac(o,e)}function al(o,e,s,a){this.tag=o,this.key=s,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(o,e,s,a){return new al(o,e,s,a)}function bj(o){return o=o.prototype,!(!o||!o.isReactComponent)}function $k(o){if(typeof o=="function")return bj(o)?1:0;if(o!=null){if(o=o.$$typeof,o===Da)return 11;if(o===Ga)return 14}return 2}function wh(o,e){var s=o.alternate;return s===null?(s=Bg(o.tag,e,o.key,o.mode),s.elementType=o.elementType,s.type=o.type,s.stateNode=o.stateNode,s.alternate=o,o.alternate=s):(s.pendingProps=e,s.type=o.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=o.flags&14680064,s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},s.sibling=o.sibling,s.index=o.index,s.ref=o.ref,s}function yh(o,e,s,a,c,h){var d=2;if(a=o,typeof o=="function")bj(o)&&(d=1);else if(typeof o=="string")d=5;else e:switch(o){case ya:return Ah(s.children,c,h,e);case za:d=8,c|=8;break;case Aa:return o=Bg(12,s,e,c|2),o.elementType=Aa,o.lanes=h,o;case Ea:return o=Bg(13,s,e,c),o.elementType=Ea,o.lanes=h,o;case Fa:return o=Bg(19,s,e,c),o.elementType=Fa,o.lanes=h,o;case Ia:return qj(s,c,h,e);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case Ba:d=10;break e;case Ca:d=9;break e;case Da:d=11;break e;case Ga:d=14;break e;case Ha:d=16,a=null;break e}throw Error(p$2(130,o==null?o:typeof o,""))}return e=Bg(d,s,e,c),e.elementType=o,e.type=a,e.lanes=h,e}function Ah(o,e,s,a){return o=Bg(7,o,a,e),o.lanes=s,o}function qj(o,e,s,a){return o=Bg(22,o,a,e),o.elementType=Ia,o.lanes=s,o.stateNode={isHidden:!1},o}function xh(o,e,s){return o=Bg(6,o,null,e),o.lanes=s,o}function zh(o,e,s){return e=Bg(4,o.children!==null?o.children:[],o.key,e),e.lanes=s,e.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},e}function bl(o,e,s,a,c){this.tag=e,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function cl(o,e,s,a,c,h,d,g,_){return o=new bl(o,e,s,g,_),e===1?(e=1,h===!0&&(e|=8)):e=0,h=Bg(3,null,null,e),o.current=h,h.stateNode=o,h.memoizedState={element:a,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(h),o}function dl(o,e,s){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wa,key:a==null?null:""+a,children:o,containerInfo:e,implementation:s}}function el(o){if(!o)return Vf;o=o._reactInternals;e:{if(Vb(o)!==o||o.tag!==1)throw Error(p$2(170));var e=o;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Zf(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(p$2(171))}if(o.tag===1){var s=o.type;if(Zf(s))return bg(o,s,e)}return e}function fl(o,e,s,a,c,h,d,g,_){return o=cl(s,a,!0,o,c,h,d,g,_),o.context=el(null),s=o.current,a=L(),c=lh(s),h=ch(a,c),h.callback=e!=null?e:null,dh(s,h,c),o.current.lanes=c,Ac(o,c,a),Ek(o,a),o}function gl(o,e,s,a){var c=e.current,h=L(),d=lh(c);return s=el(s),e.context===null?e.context=s:e.pendingContext=s,e=ch(h,d),e.payload={element:o},a=a===void 0?null:a,a!==null&&(e.callback=a),o=dh(c,e,d),o!==null&&(mh(o,c,d,h),eh(o,c,d)),d}function hl(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function il(o,e){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var s=o.retryLane;o.retryLane=s!==0&&s<e?s:e}}function jl(o,e){il(o,e),(o=o.alternate)&&il(o,e)}function kl(){return null}var ll=typeof reportError=="function"?reportError:function(o){console.error(o)};function ml(o){this._internalRoot=o}nl.prototype.render=ml.prototype.render=function(o){var e=this._internalRoot;if(e===null)throw Error(p$2(409));gl(o,e,null,null)};nl.prototype.unmount=ml.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var e=o.containerInfo;Sk(function(){gl(null,o,null,null)}),e[uf]=null}};function nl(o){this._internalRoot=o}nl.prototype.unstable_scheduleHydration=function(o){if(o){var e=Hc();o={blockedOn:null,target:o,priority:e};for(var s=0;s<Qc.length&&e!==0&&e<Qc[s].priority;s++);Qc.splice(s,0,o),s===0&&Vc(o)}};function ol(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function pl(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function ql(){}function rl(o,e,s,a,c){if(c){if(typeof a=="function"){var h=a;a=function(){var b=hl(d);h.call(b)}}var d=fl(e,a,o,0,null,!1,!1,"",ql);return o._reactRootContainer=d,o[uf]=d.current,sf(o.nodeType===8?o.parentNode:o),Sk(),d}for(;c=o.lastChild;)o.removeChild(c);if(typeof a=="function"){var g=a;a=function(){var b=hl(_);g.call(b)}}var _=cl(o,0,!1,null,null,!1,!1,"",ql);return o._reactRootContainer=_,o[uf]=_.current,sf(o.nodeType===8?o.parentNode:o),Sk(function(){gl(e,_,s,a)}),_}function sl(o,e,s,a,c){var h=s._reactRootContainer;if(h){var d=h;if(typeof c=="function"){var g=c;c=function(){var _=hl(d);g.call(_)}}gl(e,d,o,c)}else d=rl(s,e,o,c,a);return hl(d)}Ec=function(o){switch(o.tag){case 3:var e=o.stateNode;if(e.current.memoizedState.isDehydrated){var s=tc(e.pendingLanes);s!==0&&(Cc(e,s|1),Ek(e,B()),(K&6)===0&&(Hj=B()+500,jg()))}break;case 13:Sk(function(){var a=Zg(o,1);if(a!==null){var c=L();mh(a,o,1,c)}}),jl(o,1)}};Fc=function(o){if(o.tag===13){var e=Zg(o,134217728);if(e!==null){var s=L();mh(e,o,134217728,s)}jl(o,134217728)}};Gc=function(o){if(o.tag===13){var e=lh(o),s=Zg(o,e);if(s!==null){var a=L();mh(s,o,e,a)}jl(o,e)}};Hc=function(){return C$1};Ic=function(o,e){var s=C$1;try{return C$1=o,e()}finally{C$1=s}};yb=function(o,e,s){switch(e){case"input":if(bb(o,s),e=s.name,s.type==="radio"&&e!=null){for(s=o;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<s.length;e++){var a=s[e];if(a!==o&&a.form===o.form){var c=Db(a);if(!c)throw Error(p$2(90));Wa(a),bb(a,c)}}}break;case"textarea":ib(o,s);break;case"select":e=s.value,e!=null&&fb(o,!!s.multiple,e,!1)}};Gb=Rk;Hb=Sk;var tl={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Rk]},ul={findFiberByHostInstance:Wc,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},vl={bundleType:ul.bundleType,version:ul.version,rendererPackageName:ul.rendererPackageName,rendererConfig:ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=Zb(o),o===null?null:o.stateNode},findFiberByHostInstance:ul.findFiberByHostInstance||kl,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 wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wl.isDisabled&&wl.supportsFiber)try{kc=wl.inject(vl),lc=wl}catch{}}reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tl;reactDom_production_min.createPortal=function(o,e){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ol(e))throw Error(p$2(200));return dl(o,e,null,s)};reactDom_production_min.createRoot=function(o,e){if(!ol(o))throw Error(p$2(299));var s=!1,a="",c=ll;return e!=null&&(e.unstable_strictMode===!0&&(s=!0),e.identifierPrefix!==void 0&&(a=e.identifierPrefix),e.onRecoverableError!==void 0&&(c=e.onRecoverableError)),e=cl(o,1,!1,null,null,s,!1,a,c),o[uf]=e.current,sf(o.nodeType===8?o.parentNode:o),new ml(e)};reactDom_production_min.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var e=o._reactInternals;if(e===void 0)throw typeof o.render=="function"?Error(p$2(188)):(o=Object.keys(o).join(","),Error(p$2(268,o)));return o=Zb(e),o=o===null?null:o.stateNode,o};reactDom_production_min.flushSync=function(o){return Sk(o)};reactDom_production_min.hydrate=function(o,e,s){if(!pl(e))throw Error(p$2(200));return sl(null,o,e,!0,s)};reactDom_production_min.hydrateRoot=function(o,e,s){if(!ol(o))throw Error(p$2(405));var a=s!=null&&s.hydratedSources||null,c=!1,h="",d=ll;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(d=s.onRecoverableError)),e=fl(e,null,o,1,s!=null?s:null,c,!1,h,d),o[uf]=e.current,sf(o),a)for(o=0;o<a.length;o++)s=a[o],c=s._getVersion,c=c(s._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[s,c]:e.mutableSourceEagerHydrationData.push(s,c);return new nl(e)};reactDom_production_min.render=function(o,e,s){if(!pl(e))throw Error(p$2(200));return sl(null,o,e,!1,s)};reactDom_production_min.unmountComponentAtNode=function(o){if(!pl(o))throw Error(p$2(40));return o._reactRootContainer?(Sk(function(){sl(null,null,o,!1,function(){o._reactRootContainer=null,o[uf]=null})}),!0):!1};reactDom_production_min.unstable_batchedUpdates=Rk;reactDom_production_min.unstable_renderSubtreeIntoContainer=function(o,e,s,a){if(!pl(s))throw Error(p$2(200));if(o==null||o._reactInternals===void 0)throw Error(p$2(38));return sl(o,e,s,!1,a)};reactDom_production_min.version="18.2.0-next-9e3b772b8-20220608";(function(o){function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(s){console.error(s)}}e(),o.exports=reactDom_production_min})(reactDom);var m$1=reactDom.exports;client.createRoot=m$1.createRoot,client.hydrateRoot=m$1.hydrateRoot;const scriptRel="modulepreload",assetsURL=function(o){return"/"+o},seen={},__vitePreload=function(e,s,a){return!s||s.length===0?e():Promise.all(s.map(c=>{if(c=assetsURL(c),c in seen)return;seen[c]=!0;const h=c.endsWith(".css"),d=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":scriptRel,h||(g.as="script",g.crossOrigin=""),g.href=c,document.head.appendChild(g),h)return new Promise((_,b)=>{g.addEventListener("load",_),g.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${c}`)))})})).then(()=>e())};var fraction$1={exports:{}};/**
|
||
* @license Fraction.js v4.2.0 05/03/2022
|
||
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
|
||
*
|
||
* Copyright (c) 2021, Robert Eisele (robert@xarg.org)
|
||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||
**/(function(o,e){(function(s){var a=2e3,c={s:1,n:0,d:1};function h(tt,nt){if(isNaN(tt=parseInt(tt,10)))throw et.InvalidParameter;return tt*nt}function d(tt,nt){if(nt===0)throw et.DivisionByZero;var st=Object.create(et.prototype);st.s=tt<0?-1:1,tt=tt<0?-tt:tt;var rt=_e(tt,nt);return st.n=tt/rt,st.d=nt/rt,st}function g(tt){for(var nt={},st=tt,rt=2,it=4;it<=st;){for(;st%rt===0;)st/=rt,nt[rt]=(nt[rt]||0)+1;it+=1+2*rt++}return st!==tt?st>1&&(nt[st]=(nt[st]||0)+1):nt[tt]=(nt[tt]||0)+1,nt}var _=function(tt,nt){var st=0,rt=1,it=1,at=0,ot=0,ut=0,ct=1,ht=1,lt=0,pt=1,ft=1,gt=1,yt=1e7,mt;if(tt!=null)if(nt!==void 0){if(st=tt,rt=nt,it=st*rt,st%1!==0||rt%1!==0)throw et.NonIntegerParameter}else switch(typeof tt){case"object":{if("d"in tt&&"n"in tt)st=tt.n,rt=tt.d,"s"in tt&&(st*=tt.s);else if(0 in tt)st=tt[0],1 in tt&&(rt=tt[1]);else throw et.InvalidParameter;it=st*rt;break}case"number":{if(tt<0&&(it=tt,tt=-tt),tt%1===0)st=tt;else if(tt>0){for(tt>=1&&(ht=Math.pow(10,Math.floor(1+Math.log(tt)/Math.LN10)),tt/=ht);pt<=yt&><=yt;)if(mt=(lt+ft)/(pt+gt),tt===mt){pt+gt<=yt?(st=lt+ft,rt=pt+gt):gt>pt?(st=ft,rt=gt):(st=lt,rt=pt);break}else tt>mt?(lt+=ft,pt+=gt):(ft+=lt,gt+=pt),pt>yt?(st=ft,rt=gt):(st=lt,rt=pt);st*=ht}else(isNaN(tt)||isNaN(nt))&&(rt=st=NaN);break}case"string":{if(pt=tt.match(/\d+|./g),pt===null)throw et.InvalidParameter;if(pt[lt]==="-"?(it=-1,lt++):pt[lt]==="+"&<++,pt.length===lt+1?ot=h(pt[lt++],it):pt[lt+1]==="."||pt[lt]==="."?(pt[lt]!=="."&&(at=h(pt[lt++],it)),lt++,(lt+1===pt.length||pt[lt+1]==="("&&pt[lt+3]===")"||pt[lt+1]==="'"&&pt[lt+3]==="'")&&(ot=h(pt[lt],it),ct=Math.pow(10,pt[lt].length),lt++),(pt[lt]==="("&&pt[lt+2]===")"||pt[lt]==="'"&&pt[lt+2]==="'")&&(ut=h(pt[lt+1],it),ht=Math.pow(10,pt[lt+1].length)-1,lt+=3)):pt[lt+1]==="/"||pt[lt+1]===":"?(ot=h(pt[lt],it),ct=h(pt[lt+2],1),lt+=3):pt[lt+3]==="/"&&pt[lt+1]===" "&&(at=h(pt[lt],it),ot=h(pt[lt+2],it),ct=h(pt[lt+4],1),lt+=5),pt.length<=lt){rt=ct*ht,it=st=ut+rt*at+ht*ot;break}}default:throw et.InvalidParameter}if(rt===0)throw et.DivisionByZero;c.s=it<0?-1:1,c.n=Math.abs(st),c.d=Math.abs(rt)};function b(tt,nt,st){for(var rt=1;nt>0;tt=tt*tt%st,nt>>=1)nt&1&&(rt=rt*tt%st);return rt}function $(tt,nt){for(;nt%2===0;nt/=2);for(;nt%5===0;nt/=5);if(nt===1)return 0;for(var st=10%nt,rt=1;st!==1;rt++)if(st=st*10%nt,rt>a)return 0;return rt}function j(tt,nt,st){for(var rt=1,it=b(10,st,nt),at=0;at<300;at++){if(rt===it)return at;rt=rt*10%nt,it=it*10%nt}return 0}function _e(tt,nt){if(!tt)return nt;if(!nt)return tt;for(;;){if(tt%=nt,!tt)return nt;if(nt%=tt,!nt)return tt}}function et(tt,nt){if(_(tt,nt),this instanceof et)tt=_e(c.d,c.n),this.s=c.s,this.n=c.n/tt,this.d=c.d/tt;else return d(c.s*c.n,c.d)}et.DivisionByZero=new Error("Division by Zero"),et.InvalidParameter=new Error("Invalid argument"),et.NonIntegerParameter=new Error("Parameters must be integer"),et.prototype={s:1,n:0,d:1,abs:function(){return d(this.n,this.d)},neg:function(){return d(-this.s*this.n,this.d)},add:function(tt,nt){return _(tt,nt),d(this.s*this.n*c.d+c.s*this.d*c.n,this.d*c.d)},sub:function(tt,nt){return _(tt,nt),d(this.s*this.n*c.d-c.s*this.d*c.n,this.d*c.d)},mul:function(tt,nt){return _(tt,nt),d(this.s*c.s*this.n*c.n,this.d*c.d)},div:function(tt,nt){return _(tt,nt),d(this.s*c.s*this.n*c.d,this.d*c.n)},clone:function(){return d(this.s*this.n,this.d)},mod:function(tt,nt){if(isNaN(this.n)||isNaN(this.d))return new et(NaN);if(tt===void 0)return d(this.s*this.n%this.d,1);if(_(tt,nt),c.n===0&&this.d===0)throw et.DivisionByZero;return d(this.s*(c.d*this.n)%(c.n*this.d),c.d*this.d)},gcd:function(tt,nt){return _(tt,nt),d(_e(c.n,this.n)*_e(c.d,this.d),c.d*this.d)},lcm:function(tt,nt){return _(tt,nt),c.n===0&&this.n===0?d(0,1):d(c.n*this.n,_e(c.n,this.n)*_e(c.d,this.d))},ceil:function(tt){return tt=Math.pow(10,tt||0),isNaN(this.n)||isNaN(this.d)?new et(NaN):d(Math.ceil(tt*this.s*this.n/this.d),tt)},floor:function(tt){return tt=Math.pow(10,tt||0),isNaN(this.n)||isNaN(this.d)?new et(NaN):d(Math.floor(tt*this.s*this.n/this.d),tt)},round:function(tt){return tt=Math.pow(10,tt||0),isNaN(this.n)||isNaN(this.d)?new et(NaN):d(Math.round(tt*this.s*this.n/this.d),tt)},inverse:function(){return d(this.s*this.d,this.n)},pow:function(tt,nt){if(_(tt,nt),c.d===1)return c.s<0?d(Math.pow(this.s*this.d,c.n),Math.pow(this.n,c.n)):d(Math.pow(this.s*this.n,c.n),Math.pow(this.d,c.n));if(this.s<0)return null;var st=g(this.n),rt=g(this.d),it=1,at=1;for(var ot in st)if(ot!=="1"){if(ot==="0"){it=0;break}if(st[ot]*=c.n,st[ot]%c.d===0)st[ot]/=c.d;else return null;it*=Math.pow(ot,st[ot])}for(var ot in rt)if(ot!=="1"){if(rt[ot]*=c.n,rt[ot]%c.d===0)rt[ot]/=c.d;else return null;at*=Math.pow(ot,rt[ot])}return c.s<0?d(at,it):d(it,at)},equals:function(tt,nt){return _(tt,nt),this.s*this.n*c.d===c.s*c.n*this.d},compare:function(tt,nt){_(tt,nt);var st=this.s*this.n*c.d-c.s*c.n*this.d;return(0<st)-(st<0)},simplify:function(tt){if(isNaN(this.n)||isNaN(this.d))return this;tt=tt||.001;for(var nt=this.abs(),st=nt.toContinued(),rt=1;rt<st.length;rt++){for(var it=d(st[rt-1],1),at=rt-2;at>=0;at--)it=it.inverse().add(st[at]);if(it.sub(nt).abs().valueOf()<tt)return it.mul(this.s)}return this},divisible:function(tt,nt){return _(tt,nt),!(!(c.n*this.d)||this.n*c.d%(c.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(tt){var nt,st="",rt=this.n,it=this.d;return this.s<0&&(st+="-"),it===1?st+=rt:(tt&&(nt=Math.floor(rt/it))>0&&(st+=nt,st+=" ",rt%=it),st+=rt,st+="/",st+=it),st},toLatex:function(tt){var nt,st="",rt=this.n,it=this.d;return this.s<0&&(st+="-"),it===1?st+=rt:(tt&&(nt=Math.floor(rt/it))>0&&(st+=nt,rt%=it),st+="\\frac{",st+=rt,st+="}{",st+=it,st+="}"),st},toContinued:function(){var tt,nt=this.n,st=this.d,rt=[];if(isNaN(nt)||isNaN(st))return rt;do rt.push(Math.floor(nt/st)),tt=nt%st,nt=st,st=tt;while(nt!==1);return rt},toString:function(tt){var nt=this.n,st=this.d;if(isNaN(nt)||isNaN(st))return"NaN";tt=tt||15;var rt=$(nt,st),it=j(nt,st,rt),at=this.s<0?"-":"";if(at+=nt/st|0,nt%=st,nt*=10,nt&&(at+="."),rt){for(var ot=it;ot--;)at+=nt/st|0,nt%=st,nt*=10;at+="(";for(var ot=rt;ot--;)at+=nt/st|0,nt%=st,nt*=10;at+=")"}else for(var ot=tt;nt&&ot--;)at+=nt/st|0,nt%=st,nt*=10;return at}},Object.defineProperty(et,"__esModule",{value:!0}),et.default=et,et.Fraction=et,o.exports=et})()})(fraction$1);const Fraction=getDefaultExportFromCjs(fraction$1.exports);Fraction.prototype.sam=function(){return this.floor()};Fraction.prototype.nextSam=function(){return this.sam().add(1)};Fraction.prototype.wholeCycle=function(){return new TimeSpan(this.sam(),this.nextSam())};Fraction.prototype.cyclePos=function(){return this.sub(this.sam())};Fraction.prototype.lt=function(o){return this.compare(o)<0};Fraction.prototype.gt=function(o){return this.compare(o)>0};Fraction.prototype.lte=function(o){return this.compare(o)<=0};Fraction.prototype.gte=function(o){return this.compare(o)>=0};Fraction.prototype.eq=function(o){return this.compare(o)==0};Fraction.prototype.max=function(o){return this.gt(o)?this:o};Fraction.prototype.min=function(o){return this.lt(o)?this:o};Fraction.prototype.show=function(){return this.s*this.n+"/"+this.d};Fraction.prototype.or=function(o){return this.eq(0)?o:this};const fraction=o=>(typeof o=="number"&&(o=String(o)),Fraction(o)),gcd=(...o)=>o.reduce((e,s)=>e.gcd(s),fraction(1));fraction._original=Fraction;class TimeSpan{constructor(e,s){this.begin=fraction(e),this.end=fraction(s)}get spanCycles(){const e=[];var s=this.begin;const a=this.end,c=a.sam();for(;a.gt(s);){if(s.sam().equals(c)){e.push(new TimeSpan(s,this.end));break}const h=s.nextSam();e.push(new TimeSpan(s,h)),s=h}return e}get duration(){return this.end.sub(this.begin)}cycleArc(){const e=this.begin.cyclePos(),s=e.add(this.duration);return new TimeSpan(e,s)}withTime(e){return new TimeSpan(e(this.begin),e(this.end))}withEnd(e){return new TimeSpan(this.begin,e(this.end))}withCycle(e){const s=this.begin.sam(),a=s.add(e(this.begin.sub(s))),c=s.add(e(this.end.sub(s)));return new TimeSpan(a,c)}intersection(e){const s=this.begin.max(e.begin),a=this.end.min(e.end);if(!s.gt(a)&&!(s.equals(a)&&(s.equals(this.end)&&this.begin.lt(this.end)||s.equals(e.end)&&e.begin.lt(e.end))))return new TimeSpan(s,a)}intersection_e(e){const s=this.intersection(e);if(s==null)throw"TimeSpans do not intersect";return s}midpoint(){return this.begin.add(this.duration.div(fraction(2)))}equals(e){return this.begin.equals(e.begin)&&this.end.equals(e.end)}show(){return this.begin.show()+" -> "+this.end.show()}}class Hap{constructor(e,s,a,c={},h=!1){this.whole=e,this.part=s,this.value=a,this.context=c,this.stateful=h,h&&console.assert(typeof this.value=="function","Stateful values must be functions")}get duration(){return this.whole.end.sub(this.whole.begin)}wholeOrPart(){return this.whole?this.whole:this.part}withSpan(e){const s=this.whole?e(this.whole):void 0;return new Hap(s,e(this.part),this.value,this.context)}withValue(e){return new Hap(this.whole,this.part,e(this.value),this.context)}hasOnset(){return this.whole!=null&&this.whole.begin.equals(this.part.begin)}resolveState(e){if(this.stateful&&this.hasOnset()){console.log("stateful");const s=this.value,[a,c]=s(e);return[a,new Hap(this.whole,this.part,c,this.context,!1)]}return[e,this]}spanEquals(e){return this.whole==null&&e.whole==null||this.whole.equals(e.whole)}equals(e){return this.spanEquals(e)&&this.part.equals(e.part)&&this.value===e.value}show(){return"("+(this.whole==null?"~":this.whole.show())+", "+this.part.show()+", "+this.value+")"}showWhole(){return`${this.whole==null?"~":this.whole.show()}: ${typeof this.value=="object"?JSON.stringify(this.value):this.value}`}combineContext(e){const s=this;return{...s.context,...e.context,locations:(s.context.locations||[]).concat(e.context.locations||[])}}setContext(e){return new Hap(this.whole,this.part,this.value,e)}}class State{constructor(e,s={}){this.span=e,this.controls=s}setSpan(e){return new State(e,this.controls)}withSpan(e){return this.setSpan(e(this.span))}setControls(e){return new State(this.span,e)}}const isNote$1=o=>/^[a-gA-G][#b]*[0-9]$/.test(o),tokenizeNote=o=>{var c;if(typeof o!="string")return[];const[e,s="",a]=((c=o.match(/^([a-gA-G])([#bs]*)([0-9])?$/))==null?void 0:c.slice(1))||[];return e?[e,s,a?Number(a):void 0]:[]},toMidi=o=>{const[e,s,a]=tokenizeNote(o);if(!e)throw new Error('not a note: "'+o+'"');const c={c:0,d:2,e:4,f:5,g:7,a:9,b:11}[e.toLowerCase()],h=(s==null?void 0:s.split("").reduce((d,g)=>d+{"#":1,b:-1,s:1}[g],0))||0;return(Number(a)+1)*12+c+h},fromMidi=o=>Math.pow(2,(o-69)/12)*440,getFreq=o=>fromMidi(typeof o=="number"?o:toMidi(o)),midi2note=o=>{const e=Math.floor(o/12)-1;return["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"][o%12]+e},mod=(o,e)=>(o%e+e)%e,getPlayableNoteValue=o=>{let{value:e,context:s}=o;if(typeof e=="object"&&!Array.isArray(e)&&(e=e.note||e.n||e.value),typeof e=="number"&&s.type!=="frequency")e=fromMidi(o.value);else if(typeof e=="number"&&s.type==="frequency")e=o.value;else if(typeof e!="string"||!isNote$1(e))throw new Error("not a note: "+JSON.stringify(e));return e},getFrequency=o=>{let{value:e,context:s}=o;if(typeof e=="object")return e.freq?e.freq:getFreq(e.note||e.n||e.value);if(typeof e=="number"&&s.type!=="frequency")e=fromMidi(o.value);else if(typeof e=="string"&&isNote$1(e))e=fromMidi(toMidi(o.value));else if(typeof e!="number")throw new Error("not a note or frequency:"+e);return e},rotate=(o,e)=>o.slice(e).concat(o.slice(0,e)),pipe=(...o)=>o.reduce((e,s)=>(...a)=>e(s(...a)),e=>e),compose=(...o)=>pipe(...o.reverse()),removeUndefineds=o=>o.filter(e=>e!=null),flatten$1=o=>[].concat(...o),id$1=o=>o,constant=(o,e)=>o,listRange=(o,e)=>Array.from({length:e-o+1},(s,a)=>a+o);function curry(o,e){const s=function a(...c){if(c.length>=o.length)return o.apply(this,c);{const h=function(...d){return a.apply(this,c.concat(d))};return e&&e(h,c),h}};return e&&e(s,[]),s}function unionWithObj(o,e,s){const a=Object.keys(o).filter(c=>Object.keys(e).includes(c));return Object.assign({},o,e,Object.fromEntries(a.map(c=>[c,s(o[c],e[c])])))}curry((o,e)=>o*e);curry((o,e)=>e.map(o));function drawLine(o,e=60){let s=0,a=fraction(0),c=[""],h="";for(;c[0].length<e;){const d=o.queryArc(s,s+1),g=d.filter($=>$.hasOnset()).map($=>$.duration),_=gcd(...g),b=_.inverse();c=c.map($=>$+"|"),h+="|";for(let $=0;$<b;$++){const[j,_e]=[a,a.add(_)],et=d.filter(nt=>nt.whole.begin.lte(j)&&nt.whole.end.gte(_e)),tt=et.length-c.length;tt>0&&(c=c.concat(Array(tt).fill(h))),c=c.map((nt,st)=>{const rt=et[st];if(rt){const at=rt.whole.begin.eq(j)?""+rt.value:"-";return nt+at}return nt+"."}),h+=".",a=a.add(_)}s++}return c.join(`
|
||
`)}class Pattern$3{constructor(e){Rt(this,"_Pattern",!0);this.query=e}queryArc(e,s){return this.query(new State(new TimeSpan(e,s)))}_splitQueries(){const e=this,s=a=>flatten$1(a.span.spanCycles.map(c=>e.query(a.setSpan(c))));return new Pattern$3(s)}withQuerySpan(e){return new Pattern$3(s=>this.query(s.withSpan(e)))}withQueryTime(e){return new Pattern$3(s=>this.query(s.withSpan(a=>a.withTime(e))))}withHapSpan(e){return new Pattern$3(s=>this.query(s).map(a=>a.withSpan(e)))}withHapTime(e){return this.withHapSpan(s=>s.withTime(e))}_withHaps(e){return new Pattern$3(s=>e(this.query(s)))}_withHap(e){return this._withHaps(s=>s.map(e))}_setContext(e){return this._withHap(s=>s.setContext(e))}_withContext(e){return this._withHap(s=>s.setContext(e(s.context)))}_stripContext(){return this._withHap(e=>e.setContext({}))}withLocation(e,s){const a={start:{line:e[0],column:e[1],offset:e[2]},end:{line:s[0],column:s[1],offset:s[2]}};return this._withContext(c=>{const h=(c.locations||[]).concat([a]);return{...c,locations:h}})}withMiniLocation(e,s){const a={start:{line:e[0],column:e[1],offset:e[2]},end:{line:s[0],column:s[1],offset:s[2]}};return this._withContext(c=>{let h=c.locations||[];return h=h.map(({start:d,end:g})=>{const _=d.line===1?a.start.column:0;return{start:{...d,line:d.line-1+(a.start.line-1)+1,column:d.column-1+_},end:{...g,line:g.line-1+(a.start.line-1)+1,column:g.column-1+_}}}),{...c,locations:h}})}withValue(e){return new Pattern$3(s=>this.query(s).map(a=>a.withValue(e)))}fmap(e){return this.withValue(e)}_filterHaps(e){return new Pattern$3(s=>this.query(s).filter(e))}_filterValues(e){return new Pattern$3(s=>this.query(s).filter(a=>e(a.value)))}_removeUndefineds(){return this._filterValues(e=>e!=null)}onsetsOnly(){return this._filterHaps(e=>e.hasOnset())}discreteOnly(){return this._filterHaps(e=>e.whole)}_appWhole(e,s){const a=this,c=function(h){const d=a.query(h),g=s.query(h),_=function(b,$){const j=b.part.intersection($.part);if(j!=null)return new Hap(e(b.whole,$.whole),j,b.value($.value),$.combineContext(b))};return flatten$1(d.map(b=>removeUndefineds(g.map($=>_(b,$)))))};return new Pattern$3(c)}appBoth(e){const s=function(a,c){if(!(a==null||c==null))return a.intersection_e(c)};return this._appWhole(s,e)}appLeft(e){const s=this,a=function(c){const h=[];for(const d of s.query(c)){const g=e.query(c.setSpan(d.wholeOrPart()));for(const _ of g){const b=d.whole,$=d.part.intersection(_.part);if($){const j=d.value(_.value),_e=_.combineContext(d),et=new Hap(b,$,j,_e);h.push(et)}}}return h};return new Pattern$3(a)}appRight(e){const s=this,a=function(c){const h=[];for(const d of e.query(c)){const g=s.query(c.setSpan(d.wholeOrPart()));for(const _ of g){const b=d.whole,$=_.part.intersection(d.part);if($){const j=_.value(d.value),_e=d.combineContext(_),et=new Hap(b,$,j,_e);h.push(et)}}}return h};return new Pattern$3(a)}firstCycle(e=!1){var s=this;return e||(s=s._stripContext()),s.query(new State(new TimeSpan(fraction(0),fraction(1))))}get _firstCycleValues(){return this.firstCycle().map(e=>e.value)}get _showFirstCycle(){return this.firstCycle().map(e=>`${e.value}: ${e.whole.begin.toFraction()} - ${e.whole.end.toFraction()}`)}_sortHapsByPart(){return this._withHaps(e=>e.sort((s,a)=>s.part.begin.sub(a.part.begin).or(s.part.end.sub(a.part.end)).or(s.whole.begin.sub(a.whole.begin).or(s.whole.end.sub(a.whole.end)))))}_opIn(e,s){return this.fmap(s).appLeft(reify$1(e))}_opOut(e,s){return this.fmap(s).appRight(reify$1(e))}_opMix(e,s){return this.fmap(s).appBoth(reify$1(e))}_opSqueeze(e,s){const a=reify$1(e);return this.fmap(c=>a.fmap(h=>s(c)(h)))._squeezeJoin()}_opSqueezeOut(e,s){const a=this;return reify$1(e).fmap(h=>a.fmap(d=>s(d)(h)))._squeezeJoin()}_opTrig(e,s){return reify$1(e).fmap(c=>this.fmap(h=>s(h)(c)))._trigJoin()}_opTrigzero(e,s){return reify$1(e).fmap(c=>this.fmap(h=>s(h)(c)))._TrigzeroJoin()}_asNumber(e=!1,s=!1){return this._withHap(a=>{const c=Number(a.value);if(!isNaN(c))return a.withValue(()=>c);const h={e:Math.E,pi:Math.PI}[a.value];if(typeof h<"u")return a.withValue(()=>h);if(isNote$1(a.value))return new Hap(a.whole,a.part,toMidi(a.value),{...a.context,type:"midi"});if(!e){if(s)return a;throw new Error('cannot parse as number: "'+a.value+'"')}})}round(){return this._asNumber().fmap(e=>Math.round(e))}floor(){return this._asNumber().fmap(e=>Math.floor(e))}ceil(){return this._asNumber().fmap(e=>Math.ceil(e))}_toBipolar(){return this.fmap(e=>e*2-1)}_fromBipolar(){return this.fmap(e=>(e+1)/2)}range(e,s){return this.mul(s-e).add(e)}rangex(e,s){return this.range(Math.log(e),Math.log(s)).fmap(Math.exp)}range2(e,s){return this._fromBipolar().range(e,s)}_bindWhole(e,s){const a=this,c=function(h){const d=function(_,b){return new Hap(e(_.whole,b.whole),b.part,b.value,Object.assign({},_.context,b.context,{locations:(_.context.locations||[]).concat(b.context.locations||[])}))},g=function(_){return s(_.value).query(h.setSpan(_.part)).map(b=>d(_,b))};return flatten$1(a.query(h).map(_=>g(_)))};return new Pattern$3(c)}bind(e){const s=function(a,c){if(!(a==null||c==null))return a.intersection_e(c)};return this._bindWhole(s,e)}join(){return this.bind(id$1)}outerBind(e){return this._bindWhole((s,a)=>s,e)}outerJoin(){return this.outerBind(id$1)}innerBind(e){return this._bindWhole((s,a)=>a,e)}innerJoin(){return this.innerBind(id$1)}_trigJoin(e=!1){const s=this;return new Pattern$3(a=>s.discreteOnly().query(a).map(c=>c.value.late(e?c.whole.begin:c.whole.begin.cyclePos()).query(a).map(h=>new Hap(h.whole?h.whole.intersection(c.whole):void 0,h.part.intersection(c.part),h.value).setContext(c.combineContext(h))).filter(h=>h.part)).flat())}_TrigzeroJoin(){return this._trigJoin(!0)}_squeezeJoin(){const e=this;function s(a){const c=e.discreteOnly().query(a);function h(g){const b=g.value._compressSpan(g.wholeOrPart().cycleArc()).query(a.setSpan(g.part));function $(j,_e){let et;if(_e.whole&&j.whole&&(et=_e.whole.intersection(j.whole),!et))return;const tt=_e.part.intersection(j.part);if(!tt)return;const nt=_e.combineContext(j);return new Hap(et,tt,_e.value,nt)}return b.map(j=>$(g,j))}return flatten$1(c.map(h)).filter(g=>g)}return new Pattern$3(s)}_squeezeBind(e){return this.fmap(e)._squeezeJoin()}_apply(e){return e(this)}layer(...e){return stack(...e.map(s=>s(this)))}_patternify(e){const s=this;return function(...c){return c=c.map(d=>isPattern$1(d)?d.fmap(g=>g.value||g):d),sequence(...c).fmap(d=>e.call(s,d)).innerJoin()}}_fastGap(e){const s=function(c){const h=c.begin.sam(),d=h.add(c.begin.sub(h).mul(e).min(1)),g=h.add(c.end.sub(h).mul(e).min(1));return new TimeSpan(d,g)},a=function(c){const h=c.begin.sam(),d=h.add(c.begin.sub(h).div(e).min(1)),g=h.add(c.end.sub(h).div(e).min(1));return new TimeSpan(d,g)};return this.withQuerySpan(s).withHapSpan(a)._splitQueries()}_compress(e,s){return e.gt(s)||e.gt(1)||s.gt(1)||e.lt(0)||s.lt(0)?silence:this._fastGap(fraction(1).div(s.sub(e)))._late(e)}_compressSpan(e){return this._compress(e.begin,e.end)}_fast(e){return this.withQueryTime(a=>a.mul(e)).withHapTime(a=>a.div(e))}_slow(e){return this._fast(fraction(1).div(e))}_inside(e,s){return s(this._slow(e))._fast(e)}_outside(e,s){return s(this._fast(e))._slow(e)}_ply(e){return this.fmap(s=>pure(s)._fast(e))._squeezeJoin()}_chop(e){const a=Array.from({length:e},(h,d)=>d).map(h=>({begin:h/e,end:(h+1)/e})),c=function(h){return sequence(a.map(d=>Object.assign({},h,d)))};return this._squeezeBind(c)}_striate(e){const a=Array.from({length:e},(h,d)=>d).map(h=>({begin:h/e,end:(h+1)/e})),c=slowcat(...a);return this.set(c)._fast(e)}_cpm(e){return this._fast(e/60)}_early(e){return e=fraction(e),this.withQueryTime(s=>s.add(e)).withHapTime(s=>s.sub(e))}_late(e){return e=fraction(e),this._early(fraction(0).sub(e))}_zoom(e,s){s=fraction(s),e=fraction(e);const a=s.sub(e);return this.withQuerySpan(c=>c.withCycle(h=>h.mul(a).add(e))).withHapSpan(c=>c.withCycle(h=>h.sub(e).div(a)))._splitQueries()}_zoomArc(e){return this.zoom(e.begin,e.end)}_linger(e){return e==0?silence:e<0?this._zoom(e.add(1),1)._slow(e):this._zoom(0,e)._slow(e)}_color(e){return this._withContext(s=>({...s,color:e}))}log(){return this._withHap(e=>{var s;return e.setContext({...e.context,logs:(((s=e.context)==null?void 0:s.logs)||[]).concat([e.show()])})})}drawLine(){return console.log(drawLine(this)),this}_segment(e){return this.struct(pure(!0)._fast(e))}invert(){return this.fmap(e=>!e)}inv(){return this.invert()}when(e,s){const a=e._filterValues(id$1),c=e._filterValues(g=>!g),h=a.fmap(g=>_=>_).appRight(s(this)),d=c.fmap(g=>_=>_).appRight(this);return stack(h,d)}off(e,s){return stack(this,s(this.late(e)))}every(e,s){const a=this,c=Array(e-1).fill(a);return c.unshift(s(a)),slowcatPrime(...c)}brak(){return this.when(slowcat(!1,!0),e=>fastcat(e,silence)._late(.25))}rev(){const e=this,s=function(a){const c=a.span,h=c.begin.sam(),d=c.begin.nextSam(),g=function(b){const $=b.withTime(_e=>h.add(d.sub(_e))),j=$.begin;return $.begin=$.end,$.end=j,$};return e.query(a.setSpan(g(c))).map(b=>b.withSpan(g))};return new Pattern$3(s)._splitQueries()}palindrome(){return this.every(2,rev)}juxBy(e,s){e/=2;const a=function(d,g,_){return g in d?d[g]:_},c=this.withValue(d=>Object.assign({},d,{pan:a(d,"pan",.5)-e})),h=this.withValue(d=>Object.assign({},d,{pan:a(d,"pan",.5)+e}));return stack(c,s(h))}_jux(e){return this.juxBy(1,e)}stack(...e){return stack(this,...e)}sequence(...e){return sequence(this,...e)}seq(...e){return sequence(this,...e)}cat(...e){return cat(this,...e)}fastcat(...e){return fastcat(this,...e)}slowcat(...e){return slowcat(this,...e)}superimpose(...e){return this.stack(...e.map(s=>s(this)))}stutWith(e,s,a){return stack(...listRange(0,e-1).map(c=>a(this.late(fraction(s).mul(c)),c)))}stut(e,s,a){return this.stutWith(e,a,(c,h)=>c.velocity(Math.pow(s,h)))}_echoWith(e,s,a){return stack(...listRange(0,e-1).map(c=>a(this.late(fraction(s).mul(c)),c)))}_echo(e,s,a){return this._echoWith(e,s,(c,h)=>c.velocity(Math.pow(a,h)))}iter(e,s=!1){return slowcat(...listRange(0,e-1).map(a=>s?this.late(a/e):this.early(a/e)))}iterBack(e){return this.iter(e,!0)}_chunk(e,s,a=!1){const c=Array(e-1).fill(!1);c.unshift(!0);const h=sequence(...c).iter(e,a);return this.when(h,s)}_chunkBack(e,s){return this._chunk(e,s,!0)}_bypass(e){return e=Boolean(parseInt(e)),e?silence:this}hush(){return silence}_duration(e){return this.withHapSpan(s=>new TimeSpan(s.begin,s.begin.add(e)))}_legato(e){return this.withHapSpan(s=>new TimeSpan(s.begin,s.begin.add(s.end.sub(s.begin).mul(e))))}_velocity(e){return this._withContext(s=>({...s,velocity:(s.velocity||1)*e}))}_loopAt(e,s=1){return this.speed(1/e*s).unit("c").slow(e)}onTrigger(e){return this._withHap(s=>s.setContext({...s.context,onTrigger:e}))}log(e=id$1){return this._withHap(s=>s.setContext({...s.context,onTrigger:(...a)=>{s.context.onTrigger&&s.context.onTrigger(...a),console.log(e(...a))}}))}logValues(e=id$1){return this.log((s,a)=>e(a.value))}}function _composeOp(o,e,s){function a(c){return c instanceof Object&&!(c instanceof Function)}return a(o)||a(e)?(a(o)||(o={value:o}),a(e)||(e={value:e}),unionWithObj(o,e,s)):s(o,e)}(function(){const o=a=>a._asNumber(),s={set:[(a,c)=>c],keep:[(a,c)=>a],keepif:[(a,c)=>c?a:void 0],add:[(a,c)=>a+c,a=>a._asNumber(!1,!0)],sub:[(a,c)=>a-c,o],mul:[(a,c)=>a*c,o],div:[(a,c)=>a/c,o],mod:[mod,o],pow:[Math.pow,o],_and:[(a,c)=>a&c,o],_or:[(a,c)=>a|c,o],_xor:[(a,c)=>a^c,o],_lshift:[(a,c)=>a<<c,o],_rshift:[(a,c)=>a>>c,o],lt:[(a,c)=>a<c],gt:[(a,c)=>a>c],lte:[(a,c)=>a<=c],gte:[(a,c)=>a>=c],eq:[(a,c)=>a==c],eqt:[(a,c)=>a===c],ne:[(a,c)=>a!=c],net:[(a,c)=>a!==c],and:[(a,c)=>a&&c],or:[(a,c)=>a||c],func:[(a,c)=>c(a)]};for(const[a,[c,h]]of Object.entries(s))for(const d of["In","Out","Mix","Squeeze","SqueezeOut","Trig","Trigzero"])Pattern$3.prototype[a+d]=function(...g){var _=this;g=sequence(g),h&&(_=h(_),g=h(g));var b=_["_op"+d](g,$=>j=>_composeOp($,j,c));return a==="keepif"&&(b=b._removeUndefineds()),b},d==="Squeeze"&&(Pattern$3.prototype[a+"SqueezeIn"]=Pattern$3.prototype[a+d]),d==="In"?Pattern$3.prototype[a]=Pattern$3.prototype[a+d]:a==="set"&&(Pattern$3.prototype[d.toLowerCase()]=Pattern$3.prototype[a+d]);Pattern$3.prototype.struct=Pattern$3.prototype.keepifOut,Pattern$3.prototype.structAll=Pattern$3.prototype.keepOut,Pattern$3.prototype.mask=Pattern$3.prototype.keepifIn,Pattern$3.prototype.maskAll=Pattern$3.prototype.keepIn,Pattern$3.prototype.reset=Pattern$3.prototype.keepifTrig,Pattern$3.prototype.resetAll=Pattern$3.prototype.keepTrig,Pattern$3.prototype.restart=Pattern$3.prototype.keepifTrigzero,Pattern$3.prototype.restartAll=Pattern$3.prototype.keepTrigzero})();Pattern$3.prototype.patternified=["apply","chop","color","cpm","duration","early","fast","jux","late","legato","linger","ply","segment","striate","slow","velocity"];Pattern$3.prototype.factories={pure,stack,slowcat,fastcat,cat,timeCat,sequence,seq:seq$2,polymeter,pm,polyrhythm,pr};const silence=new Pattern$3(o=>[]);function pure(o){function e(s){return s.span.spanCycles.map(a=>new Hap(fraction(a.begin).wholeCycle(),a,o))}return new Pattern$3(e)}function isPattern$1(o){const e=o instanceof Pattern$3||(o==null?void 0:o._Pattern);return!o instanceof Pattern$3&&console.warn(`Found Pattern that fails "instanceof Pattern" check.
|
||
This may happen if you are using multiple versions of @strudel.cycles/core.
|
||
Please check by running "npm ls @strudel.cycles/core".`),e}function reify$1(o){return isPattern$1(o)?o:pure(o)}function stack(...o){o=o.map(s=>Array.isArray(s)?sequence(...s):reify$1(s));const e=s=>flatten$1(o.map(a=>a.query(s)));return new Pattern$3(e)}function slowcat(...o){o=o.map(s=>Array.isArray(s)?sequence(...s):reify$1(s));const e=function(s){const a=s.span,c=mod(a.begin.sam(),o.length),h=o[c];if(!h)return[];const d=a.begin.floor().sub(a.begin.div(o.length).floor());return h.withHapTime(g=>g.add(d)).query(s.setSpan(a.withTime(g=>g.sub(d))))};return new Pattern$3(e)._splitQueries()}function slowcatPrime(...o){o=o.map(reify$1);const e=function(s){const a=Math.floor(s.span.begin)%o.length,c=o[a];return(c==null?void 0:c.query(s))||[]};return new Pattern$3(e)._splitQueries()}function fastcat(...o){return slowcat(...o)._fast(o.length)}function cat(...o){return slowcat(...o)}function timeCat(...o){const e=o.map(c=>c[0]).reduce((c,h)=>c.add(h),fraction(0));let s=fraction(0);const a=[];for(const[c,h]of o){const d=s.add(c);a.push(reify$1(h)._compress(s.div(e),d.div(e))),s=d}return stack(...a)}function sequence(...o){return fastcat(...o)}function seq$2(...o){return fastcat(...o)}function _sequenceCount(o){return Array.isArray(o)?o.length==0?[silence,0]:o.length==1?_sequenceCount(o[0]):[fastcat(...o.map(e=>_sequenceCount(e)[0])),o.length]:[reify$1(o),1]}function polymeterSteps(o,...e){const s=e.map(c=>_sequenceCount(c));if(s.length==0)return silence;o==0&&(o=s[0][1]);const a=[];for(const c of s)c[1]==0&&next,o==c[1]?a.push(c[0]):a.push(c[0]._fast(fraction(o).div(fraction(c[1]))));return stack(...a)}function polymeter(...o){return polymeterSteps(0,...o)}function pm(...o){polymeter(...o)}function polyrhythm(...o){const e=o.map(s=>sequence(s));return e.length==0?silence:stack(...e)}function pr(o){polyrhythm(o)}const add$1=curry((o,e)=>e.add(o)),chop=curry((o,e)=>e.chop(o)),chunk=curry((o,e)=>e.chunk(o)),chunkBack=curry((o,e)=>e.chunkBack(o)),div=curry((o,e)=>e.div(o)),early=curry((o,e)=>e.early(o)),echo=curry((o,e,s,a)=>a.echo(o,e,s)),every=curry((o,e,s)=>s.every(o,e)),fast=curry((o,e)=>e.fast(o)),inv=o=>o.inv(),invert=o=>o.invert(),iter=curry((o,e)=>e.iter(o)),iterBack=curry((o,e)=>e.iter(o)),jux=curry((o,e)=>e.jux(o)),juxBy=curry((o,e,s)=>s.juxBy(o,e)),late=curry((o,e)=>e.late(o)),linger=curry((o,e)=>e.linger(o)),mask=curry((o,e)=>e.mask(o)),mul=curry((o,e)=>e.mul(o)),off=curry((o,e,s)=>s.off(o,e)),ply=curry((o,e)=>e.ply(o)),range=curry((o,e,s)=>s.range(o,e)),range2=curry((o,e,s)=>s.range2(o,e)),rev=o=>o.rev(),slow=curry((o,e)=>e.slow(o)),struct=curry((o,e)=>e.struct(o)),sub=curry((o,e)=>e.sub(o)),superimpose=curry((o,e)=>e.superimpose(...o)),set=curry((o,e)=>e.set(o)),when=curry((o,e,s)=>s.when(o,e));Pattern$3.prototype.composable={fast,slow,early,late,superimpose};function makeComposable(o){return Object.entries(Pattern$3.prototype.composable).forEach(([e,s])=>{o[e]=(...a)=>{const c=compose(o,s(...a));return makeComposable(c)}}),o}const patternify2=o=>(e,s,a)=>e.fmap(c=>h=>o.call(a,c,h)).appLeft(s).innerJoin(),patternify3=o=>(e,s,a,c)=>e.fmap(h=>d=>g=>o.call(c,h,d,g)).appLeft(s).appLeft(a).innerJoin(),patternify4=o=>(e,s,a,c,h)=>e.fmap(d=>g=>_=>b=>o.call(h,d,g,_,b)).appLeft(s).appLeft(a).appLeft(c).innerJoin();Pattern$3.prototype.echo=function(...o){return o=o.map(reify$1),patternify3(Pattern$3.prototype._echo)(...o,this)};Pattern$3.prototype.echoWith=function(...o){return o=o.map(reify$1),patternify3(Pattern$3.prototype._echoWith)(...o,this)};Pattern$3.prototype.chunk=function(...o){return o=o.map(reify$1),patternify2(Pattern$3.prototype._chunk)(...o,this)};Pattern$3.prototype.chunkBack=function(...o){return o=o.map(reify$1),patternify2(Pattern$3.prototype._chunkBack)(...o,this)};Pattern$3.prototype.loopAt=function(...o){return o=o.map(reify$1),patternify2(Pattern$3.prototype._loopAt)(...o,this)};Pattern$3.prototype.zoom=function(...o){return o=o.map(reify$1),patternify2(Pattern$3.prototype._zoom)(...o,this)};Pattern$3.prototype.compress=function(...o){return o=o.map(reify$1),patternify2(Pattern$3.prototype._compress)(...o,this)};Pattern$3.prototype.outside=function(...o){return o=o.map(reify$1),patternify2(Pattern$3.prototype._outside)(...o,this)};Pattern$3.prototype.inside=function(...o){return o=o.map(reify$1),patternify2(Pattern$3.prototype._inside)(...o,this)};Pattern$3.prototype.bootstrap=function(){const o=Object.fromEntries(Object.entries(Pattern$3.prototype.composable).map(([e,s])=>(Pattern$3.prototype[e]&&(Pattern$3.prototype[e]=makeComposable(Pattern$3.prototype[e])),[e,curry(s,makeComposable)])));return this.patternified.forEach(e=>{Pattern$3.prototype[e]=function(...s){return this._patternify(Pattern$3.prototype["_"+e])(...s)}}),o};Pattern$3.prototype.define=(o,e,s={})=>{s.composable&&(Pattern$3.prototype.composable[o]=e),s.patternified&&(Pattern$3.prototype.patternified=Pattern$3.prototype.patternified.concat([o])),Pattern$3.prototype.bootstrap()};Pattern$3.prototype.define("hush",o=>o.hush(),{patternified:!1,composable:!0});Pattern$3.prototype.define("bypass",o=>o.bypass(on),{patternified:!0,composable:!0});const controls={},generic_params=[["s","s","sound"],["f","n","The note or sample number to choose for a synth or sampleset"],["f","note","The note or pitch to play a sound or synth with"],["f","accelerate","a pattern of numbers that speed up (or slow down) samples while they play."],["f","gain","a pattern of numbers that specify volume. Values less than 1 make the sound quieter. Values greater than 1 make the sound louder. For the linear equivalent, see @amp@."],["f","amp","like @gain@, but linear."],["f","attack","a pattern of numbers to specify the attack time (in seconds) of an envelope applied to each sample."],["f","decay",""],["f","sustain",""],["f","release","a pattern of numbers to specify the release time (in seconds) of an envelope applied to each sample."],["f","hold","a pattern of numbers to specify the hold time (in seconds) of an envelope applied to each sample. Only takes effect if `attack` and `release` are also specified."],["f","bandf","A pattern of numbers from 0 to 1. Sets the center frequency of the band-pass filter."],["f","bandq","a pattern of anumbers from 0 to 1. Sets the q-factor of the band-pass filter."],["f","begin","a pattern of numbers from 0 to 1. Skips the beginning of each sample, e.g. `0.25` to cut off the first quarter from each sample."],["f","end","the same as `begin`, but cuts the end off samples, shortening them; e.g. `0.75` to cut off the last quarter of each sample."],["f","loop","loops the sample (from `begin` to `end`) the specified number of times."],["f","legato","controls the amount of overlap between two adjacent sounds"],["f","crush","bit crushing, a pattern of numbers from 1 (for drastic reduction in bit-depth) to 16 (for barely no reduction)."],["f","coarse","fake-resampling, a pattern of numbers for lowering the sample rate, i.e. 1 for original 2 for half, 3 for a third and so on."],["i","channel","choose the channel the pattern is sent to in superdirt"],["i","cut","In the style of classic drum-machines, `cut` will stop a playing sample as soon as another samples with in same cutgroup is to be played. An example would be an open hi-hat followed by a closed one, essentially muting the open."],["f","cutoff","a pattern of numbers from 0 to 1. Applies the cutoff frequency of the low-pass filter."],["f","hcutoff","a pattern of numbers from 0 to 1. Applies the cutoff frequency of the high-pass filter. Also has alias @hpf@"],["f","hresonance","a pattern of numbers from 0 to 1. Applies the resonance of the high-pass filter. Has alias @hpq@"],["f","resonance","a pattern of numbers from 0 to 1. Specifies the resonance of the low-pass filter."],["f","djf","DJ filter, below 0.5 is low pass filter, above is high pass filter."],["f","delay","a pattern of numbers from 0 to 1. Sets the level of the delay signal."],["f","delayfeedback","a pattern of numbers from 0 to 1. Sets the amount of delay feedback."],["f","delaytime","a pattern of numbers from 0 to 1. Sets the length of the delay."],["f","lock","A pattern of numbers. Specifies whether delaytime is calculated relative to cps. When set to 1, delaytime is a direct multiple of a cycle."],["f","detune",""],["f","dry","when set to `1` will disable all reverb for this pattern. See `room` and `size` for more information about reverb."],["f","fadeTime","Used when using begin/end or chop/striate and friends, to change the fade out time of the 'grain' envelope."],["f","fadeInTime","As with fadeTime, but controls the fade in time of the grain envelope. Not used if the grain begins at position 0 in the sample."],["f","freq",""],["f","gate",""],["f","leslie",""],["f","lrate",""],["f","lsize",""],["f","degree",""],["f","mtranspose",""],["f","ctranspose",""],["f","harmonic",""],["f","stepsPerOctave",""],["f","octaveR",""],["f","nudge","Nudges events into the future by the specified number of seconds. Negative numbers work up to a point as well (due to internal latency)"],["i","octave",""],["f","offset",""],["i","orbit","a pattern of numbers. An `orbit` is a global parameter context for patterns. Patterns with the same orbit will share hardware output bus offset and global effects, e.g. reverb and delay. The maximum number of orbits is specified in the superdirt startup, numbers higher than maximum will wrap around."],["f","overgain",""],["f","overshape",""],["f","pan","a pattern of numbers between 0 and 1, from left to right (assuming stereo), once round a circle (assuming multichannel)"],["f","panspan","a pattern of numbers between -inf and inf, which controls how much multichannel output is fanned out (negative is backwards ordering)"],["f","pansplay","a pattern of numbers between 0.0 and 1.0, which controls the multichannel spread range (multichannel only)"],["f","panwidth","a pattern of numbers between 0.0 and inf, which controls how much each channel is distributed over neighbours (multichannel only)"],["f","panorient","a pattern of numbers between -1.0 and 1.0, which controls the relative position of the centre pan in a pair of adjacent speakers (multichannel only)"],["f","rate","used in SuperDirt softsynths as a control rate or 'speed'"],["f","slide",""],["f","semitone",""],["f","velocity",""],["f","voice",""],["f","room","a pattern of numbers from 0 to 1. Sets the level of reverb."],["f","size","a pattern of numbers from 0 to 1. Sets the perceptual size (reverb time) of the `room` to be used in reverb."],["f","shape","wave shaping distortion, a pattern of numbers from 0 for no distortion up to 1 for loads of distortion."],["f","speed","a pattern of numbers which changes the speed of sample playback, i.e. a cheap way of changing pitch. Negative values will play the sample backwards!"],["s","unit",'used in conjunction with `speed`, accepts values of "r" (rate, default behavior), "c" (cycles), or "s" (seconds). Using `unit "c"` means `speed` will be interpreted in units of cycles, e.g. `speed "1"` means samples will be stretched to fill a cycle. Using `unit "s"` means the playback speed will be adjusted so that the duration is the number of seconds specified by `speed`.'],["f","squiz",""],["f","stutterdepth",""],["f","stuttertime",""],["f","timescale",""],["f","timescalewin",""],["s","vowel","formant filter to make things sound like vowels, a pattern of either `a`, `e`, `i`, `o` or `u`. Use a rest (`~`) for no effect."],["f","waveloss",""],["f","dur",""],["f","expression",""],["f","sustainpedal",""],["f","tremolodepth","Tremolo Audio DSP effect | params are 'tremolorate' and 'tremolodepth'"],["f","tremolorate","Tremolo Audio DSP effect | params are 'tremolorate' and 'tremolodepth'"],["f","phaserdepth","Phaser Audio DSP effect | params are 'phaserrate' and 'phaserdepth'"],["f","phaserrate","Phaser Audio DSP effect | params are 'phaserrate' and 'phaserdepth'"],["f","fshift","frequency shifter"],["f","fshiftnote","frequency shifter"],["f","fshiftphase","frequency shifter"],["f","triode","tube distortion"],["f","krush","shape/bass enhancer"],["f","kcutoff",""],["f","octer","octaver effect"],["f","octersub","octaver effect"],["f","octersubsub","octaver effect"],["f","ring","ring modulation"],["f","ringf","ring modulation"],["f","ringdf","ring modulation"],["f","distort","noisy fuzzy distortion"],["f","freeze","Spectral freeze"],["f","xsdelay",""],["f","tsdelay",""],["f","real","Spectral conform"],["f","imag",""],["f","enhance","Spectral enhance"],["f","partials",""],["f","comb","Spectral comb"],["f","smear","Spectral smear"],["f","scram","Spectral scramble"],["f","binshift","Spectral binshift"],["f","hbrick","High pass sort of spectral filter"],["f","lbrick","Low pass sort of spectral filter"],["f","midichan",""],["f","control",""],["f","ccn",""],["f","ccv",""],["f","polyTouch",""],["f","midibend",""],["f","miditouch",""],["f","ctlNum",""],["f","frameRate",""],["f","frames",""],["f","hours",""],["s","midicmd",""],["f","minutes",""],["f","progNum",""],["f","seconds",""],["f","songPtr",""],["f","uid",""],["f","val",""],["f","cps",""],["f","clip",""]],_name=(o,...e)=>sequence(...e).withValue(s=>({[o]:s})),_setter=(o,e)=>function(...s){return s.length?this.set(o(...s)):this.fmap(a=>({[e]:a}))};generic_params.forEach(([o,e,s])=>{controls[e]=(...a)=>_name(e,...a),Pattern$3.prototype[e]=_setter(controls[e],e)});controls.createParam=o=>{const e=(...s)=>_name(o,...s);return Pattern$3.prototype[o]=_setter(e,o),(...s)=>_name(o,...s)};controls.createParams=(...o)=>o.reduce((e,s)=>Object.assign(e,{[s]:createParam(s)}),{});var dist$7={},tokenizer={},utils$1={},unicode$2={};Object.defineProperty(unicode$2,"__esModule",{value:!0});unicode$2.whitespaceArray=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];unicode$2.whitespaceBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!0,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1];unicode$2.idStartLargeRegex=/^[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]$/;unicode$2.idStartBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];unicode$2.idContinueLargeRegex=/^[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]$/;unicode$2.idContinueBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];Object.defineProperty(utils$1,"__esModule",{value:!0});utils$1.isStrictModeReservedWord=isStrictModeReservedWord;utils$1.isWhiteSpace=isWhiteSpace;utils$1.isLineTerminator=isLineTerminator;utils$1.isIdentifierStart=isIdentifierStart$1;utils$1.isIdentifierPart=isIdentifierPart$1;utils$1.isDecimalDigit=isDecimalDigit;utils$1.getHexValue=getHexValue;var _unicode$2=unicode$2,strictReservedWords=["null","true","false","implements","interface","package","private","protected","public","static","let","if","in","do","var","for","new","try","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof"];function isStrictModeReservedWord(o){return strictReservedWords.indexOf(o)!==-1}function isWhiteSpace(o){return o<128?_unicode$2.whitespaceBool[o]:o===160||o>5759&&_unicode$2.whitespaceArray.indexOf(o)!==-1}function isLineTerminator(o){return o===10||o===13||o===8232||o===8233}function isIdentifierStart$1(o){return o<128?_unicode$2.idStartBool[o]:_unicode$2.idStartLargeRegex.test(String.fromCodePoint(o))}function isIdentifierPart$1(o){return o<128?_unicode$2.idContinueBool[o]:_unicode$2.idContinueLargeRegex.test(String.fromCodePoint(o))}function isDecimalDigit(o){return o>=48&&o<=57}function getHexValue(o){return o>="0"&&o<="9"?o.charCodeAt(0)-48:o>="a"&&o<="f"?o.charCodeAt(0)-87:o>="A"&&o<="F"?o.charCodeAt(0)-55:-1}var errors={};Object.defineProperty(errors,"__esModule",{value:!0});errors.ErrorMessages={UNEXPECTED_TOKEN:function(e){return"Unexpected token "+JSON.stringify(e)},UNEXPECTED_ILLEGAL_TOKEN:function(e){return"Unexpected "+JSON.stringify(e)},UNEXPECTED_ESCAPED_KEYWORD:"Unexpected escaped keyword",UNEXPECTED_NUMBER:"Unexpected number",UNEXPECTED_STRING:"Unexpected string",UNEXPECTED_IDENTIFIER:"Unexpected identifier",UNEXPECTED_RESERVED_WORD:"Unexpected reserved word",UNEXPECTED_TEMPLATE:"Unexpected template",UNEXPECTED_EOS:"Unexpected end of input",UNEXPECTED_LINE_TERMINATOR:"Unexpected line terminator",UNEXPECTED_COMMA_AFTER_REST:"Unexpected comma after rest",UNEXPECTED_REST_PARAMETERS_INITIALIZATION:"Rest parameter may not have a default initializer",NEWLINE_AFTER_THROW:"Illegal newline after throw",UNTERMINATED_REGEXP:"Invalid regular expression: missing /",INVALID_LAST_REST_PARAMETER:"Rest parameter must be last formal parameter",INVALID_REST_PARAMETERS_INITIALIZATION:"Rest parameter may not have a default initializer",INVALID_REGEXP_FLAGS:"Invalid regular expression flags",INVALID_REGEX:"Invalid regular expression",INVALID_LHS_IN_ASSIGNMENT:"Invalid left-hand side in assignment",INVALID_LHS_IN_BINDING:"Invalid left-hand side in binding",INVALID_LHS_IN_FOR_IN:"Invalid left-hand side in for-in",INVALID_LHS_IN_FOR_OF:"Invalid left-hand side in for-of",INVALID_LHS_IN_FOR_AWAIT:"Invalid left-hand side in for-await",INVALID_UPDATE_OPERAND:"Increment/decrement target must be an identifier or member expression",INVALID_EXPONENTIATION_LHS:"Unary expressions as the left operand of an exponentation expression must be disambiguated with parentheses",MULTIPLE_DEFAULTS_IN_SWITCH:"More than one default clause in switch statement",NO_CATCH_OR_FINALLY:"Missing catch or finally after try",ILLEGAL_RETURN:"Illegal return statement",ILLEGAL_ARROW_FUNCTION_PARAMS:"Illegal arrow function parameter list",INVALID_ASYNC_PARAMS:"Async function parameters must not contain await expressions",INVALID_VAR_INIT_FOR_IN:"Invalid variable declaration in for-in statement",INVALID_VAR_INIT_FOR_OF:"Invalid variable declaration in for-of statement",INVALID_VAR_INIT_FOR_AWAIT:"Invalid variable declaration in for-await statement",UNINITIALIZED_BINDINGPATTERN_IN_FOR_INIT:"Binding pattern appears without initializer in for statement init",ILLEGAL_PROPERTY:"Illegal property initializer",INVALID_ID_BINDING_STRICT_MODE:function(e){return"The identifier "+JSON.stringify(e)+" must not be in binding position in strict mode"},INVALID_ID_IN_LABEL_STRICT_MODE:function(e){return"The identifier "+JSON.stringify(e)+" must not be in label position in strict mode"},INVALID_ID_IN_EXPRESSION_STRICT_MODE:function(e){return"The identifier "+JSON.stringify(e)+" must not be in expression position in strict mode"},INVALID_CALL_TO_SUPER:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',INVALID_DELETE_STRICT_MODE:"Identifier expressions must not be deleted in strict mode",DUPLICATE_BINDING:function(e){return"Duplicate binding "+JSON.stringify(e)},ILLEGAL_ID_IN_LEXICAL_DECLARATION:function(e){return"Lexical declarations must not have a binding named "+JSON.stringify(e)},UNITIALIZED_CONST:"Constant lexical declarations must have an initialiser",ILLEGAL_LABEL_IN_BODY:function(e){return"The body of a "+e+" statement must not be a labeled function declaration"},ILLEGEAL_LABEL_IN_IF:"The consequent of an if statement must not be a labeled function declaration",ILLEGAL_LABEL_IN_ELSE:"The alternate of an if statement must not be a labeled function declaration",ILLEGAL_CONTINUE_WITHOUT_ITERATION_WITH_ID:function(e){return"Continue statement must be nested within an iteration statement with label "+JSON.stringify(e)},ILLEGAL_CONTINUE_WITHOUT_ITERATION:"Continue statement must be nested within an iteration statement",ILLEGAL_BREAK_WITHOUT_ITERATION_OR_SWITCH:"Break statement must be nested within an iteration statement or a switch statement",ILLEGAL_WITH_STRICT_MODE:"Strict mode code must not include a with statement",ILLEGAL_ACCESS_SUPER_MEMBER:"Member access on super must be in a method",ILLEGAL_SUPER_CALL:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',DUPLICATE_LABEL_DECLARATION:function(e){return"Label "+JSON.stringify(e)+" has already been declared"},ILLEGAL_BREAK_WITHIN_LABEL:function(e){return"Break statement must be nested within a statement with label "+JSON.stringify(e)},ILLEGAL_YIELD_EXPRESSIONS:function(e){return e+" parameters must not contain yield expressions"},ILLEGAL_YIELD_IDENTIFIER:'"yield" may not be used as an identifier in this context',ILLEGAL_AWAIT_IDENTIFIER:'"await" may not be used as an identifier in this context',DUPLICATE_CONSTRUCTOR:"Duplicate constructor method in class",ILLEGAL_CONSTRUCTORS:"Constructors cannot be async, generators, getters or setters",ILLEGAL_STATIC_CLASS_NAME:'Static class methods cannot be named "prototype"',NEW_TARGET_ERROR:"new.target must be within function (but not arrow expression) code",DUPLICATE_EXPORT:function(e){return"Duplicate export "+JSON.stringify(e)},UNDECLARED_BINDING:function(e){return"Exported binding "+JSON.stringify(e)+" is not declared"},DUPLICATE_PROPTO_PROP:"Duplicate __proto__ property in object literal not allowed",ILLEGAL_LABEL_FUNC_DECLARATION:"Labeled FunctionDeclarations are disallowed in strict mode",ILLEGAL_FUNC_DECL_IF:"FunctionDeclarations in IfStatements are disallowed in strict mode",ILLEGAL_USE_STRICT:'Functions with non-simple parameter lists may not contain a "use strict" directive',ILLEGAL_EXPORTED_NAME:"Names of variables used in an export specifier from the current module must be identifiers",NO_OCTALS_IN_TEMPLATES:"Template literals may not contain octal escape sequences",NO_AWAIT_IN_ASYNC_PARAMS:'Async arrow parameters may not contain "await"'};Object.defineProperty(tokenizer,"__esModule",{value:!0});tokenizer.JsError=tokenizer.TokenType=tokenizer.TokenClass=void 0;var _slicedToArray=function(){function o(e,s){var a=[],c=!0,h=!1,d=void 0;try{for(var g=e[Symbol.iterator](),_;!(c=(_=g.next()).done)&&(a.push(_.value),!(s&&a.length===s));c=!0);}catch(b){h=!0,d=b}finally{try{!c&&g.return&&g.return()}finally{if(h)throw d}}return a}return function(e,s){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return o(e,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass$e=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_utils$1=utils$1,_errors$2=errors;function _classCallCheck$i(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$8(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits$8(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}var TokenClass=tokenizer.TokenClass={Eof:{name:"<End>"},Ident:{name:"Identifier",isIdentifierName:!0},Keyword:{name:"Keyword",isIdentifierName:!0},NumericLiteral:{name:"Numeric"},TemplateElement:{name:"Template"},Punctuator:{name:"Punctuator"},StringLiteral:{name:"String"},RegularExpression:{name:"RegularExpression"},Illegal:{name:"Illegal"}},TokenType=tokenizer.TokenType={EOS:{klass:TokenClass.Eof,name:"EOS"},LPAREN:{klass:TokenClass.Punctuator,name:"("},RPAREN:{klass:TokenClass.Punctuator,name:")"},LBRACK:{klass:TokenClass.Punctuator,name:"["},RBRACK:{klass:TokenClass.Punctuator,name:"]"},LBRACE:{klass:TokenClass.Punctuator,name:"{"},RBRACE:{klass:TokenClass.Punctuator,name:"}"},COLON:{klass:TokenClass.Punctuator,name:":"},SEMICOLON:{klass:TokenClass.Punctuator,name:";"},PERIOD:{klass:TokenClass.Punctuator,name:"."},ELLIPSIS:{klass:TokenClass.Punctuator,name:"..."},ARROW:{klass:TokenClass.Punctuator,name:"=>"},CONDITIONAL:{klass:TokenClass.Punctuator,name:"?"},INC:{klass:TokenClass.Punctuator,name:"++"},DEC:{klass:TokenClass.Punctuator,name:"--"},ASSIGN:{klass:TokenClass.Punctuator,name:"="},ASSIGN_BIT_OR:{klass:TokenClass.Punctuator,name:"|="},ASSIGN_BIT_XOR:{klass:TokenClass.Punctuator,name:"^="},ASSIGN_BIT_AND:{klass:TokenClass.Punctuator,name:"&="},ASSIGN_SHL:{klass:TokenClass.Punctuator,name:"<<="},ASSIGN_SHR:{klass:TokenClass.Punctuator,name:">>="},ASSIGN_SHR_UNSIGNED:{klass:TokenClass.Punctuator,name:">>>="},ASSIGN_ADD:{klass:TokenClass.Punctuator,name:"+="},ASSIGN_SUB:{klass:TokenClass.Punctuator,name:"-="},ASSIGN_MUL:{klass:TokenClass.Punctuator,name:"*="},ASSIGN_DIV:{klass:TokenClass.Punctuator,name:"/="},ASSIGN_MOD:{klass:TokenClass.Punctuator,name:"%="},ASSIGN_EXP:{klass:TokenClass.Punctuator,name:"**="},COMMA:{klass:TokenClass.Punctuator,name:","},OR:{klass:TokenClass.Punctuator,name:"||"},AND:{klass:TokenClass.Punctuator,name:"&&"},BIT_OR:{klass:TokenClass.Punctuator,name:"|"},BIT_XOR:{klass:TokenClass.Punctuator,name:"^"},BIT_AND:{klass:TokenClass.Punctuator,name:"&"},SHL:{klass:TokenClass.Punctuator,name:"<<"},SHR:{klass:TokenClass.Punctuator,name:">>"},SHR_UNSIGNED:{klass:TokenClass.Punctuator,name:">>>"},ADD:{klass:TokenClass.Punctuator,name:"+"},SUB:{klass:TokenClass.Punctuator,name:"-"},MUL:{klass:TokenClass.Punctuator,name:"*"},DIV:{klass:TokenClass.Punctuator,name:"/"},MOD:{klass:TokenClass.Punctuator,name:"%"},EXP:{klass:TokenClass.Punctuator,name:"**"},EQ:{klass:TokenClass.Punctuator,name:"=="},NE:{klass:TokenClass.Punctuator,name:"!="},EQ_STRICT:{klass:TokenClass.Punctuator,name:"==="},NE_STRICT:{klass:TokenClass.Punctuator,name:"!=="},LT:{klass:TokenClass.Punctuator,name:"<"},GT:{klass:TokenClass.Punctuator,name:">"},LTE:{klass:TokenClass.Punctuator,name:"<="},GTE:{klass:TokenClass.Punctuator,name:">="},INSTANCEOF:{klass:TokenClass.Keyword,name:"instanceof"},IN:{klass:TokenClass.Keyword,name:"in"},NOT:{klass:TokenClass.Punctuator,name:"!"},BIT_NOT:{klass:TokenClass.Punctuator,name:"~"},ASYNC:{klass:TokenClass.Keyword,name:"async"},AWAIT:{klass:TokenClass.Keyword,name:"await"},ENUM:{klass:TokenClass.Keyword,name:"enum"},DELETE:{klass:TokenClass.Keyword,name:"delete"},TYPEOF:{klass:TokenClass.Keyword,name:"typeof"},VOID:{klass:TokenClass.Keyword,name:"void"},BREAK:{klass:TokenClass.Keyword,name:"break"},CASE:{klass:TokenClass.Keyword,name:"case"},CATCH:{klass:TokenClass.Keyword,name:"catch"},CLASS:{klass:TokenClass.Keyword,name:"class"},CONTINUE:{klass:TokenClass.Keyword,name:"continue"},DEBUGGER:{klass:TokenClass.Keyword,name:"debugger"},DEFAULT:{klass:TokenClass.Keyword,name:"default"},DO:{klass:TokenClass.Keyword,name:"do"},ELSE:{klass:TokenClass.Keyword,name:"else"},EXPORT:{klass:TokenClass.Keyword,name:"export"},EXTENDS:{klass:TokenClass.Keyword,name:"extends"},FINALLY:{klass:TokenClass.Keyword,name:"finally"},FOR:{klass:TokenClass.Keyword,name:"for"},FUNCTION:{klass:TokenClass.Keyword,name:"function"},IF:{klass:TokenClass.Keyword,name:"if"},IMPORT:{klass:TokenClass.Keyword,name:"import"},LET:{klass:TokenClass.Keyword,name:"let"},NEW:{klass:TokenClass.Keyword,name:"new"},RETURN:{klass:TokenClass.Keyword,name:"return"},SUPER:{klass:TokenClass.Keyword,name:"super"},SWITCH:{klass:TokenClass.Keyword,name:"switch"},THIS:{klass:TokenClass.Keyword,name:"this"},THROW:{klass:TokenClass.Keyword,name:"throw"},TRY:{klass:TokenClass.Keyword,name:"try"},VAR:{klass:TokenClass.Keyword,name:"var"},WHILE:{klass:TokenClass.Keyword,name:"while"},WITH:{klass:TokenClass.Keyword,name:"with"},NULL:{klass:TokenClass.Keyword,name:"null"},TRUE:{klass:TokenClass.Keyword,name:"true"},FALSE:{klass:TokenClass.Keyword,name:"false"},YIELD:{klass:TokenClass.Keyword,name:"yield"},NUMBER:{klass:TokenClass.NumericLiteral,name:""},STRING:{klass:TokenClass.StringLiteral,name:""},REGEXP:{klass:TokenClass.RegularExpression,name:""},IDENTIFIER:{klass:TokenClass.Ident,name:""},CONST:{klass:TokenClass.Keyword,name:"const"},TEMPLATE:{klass:TokenClass.TemplateElement,name:""},ESCAPED_KEYWORD:{klass:TokenClass.Keyword,name:""},ILLEGAL:{klass:TokenClass.Illegal,name:""}},TT=TokenType,I=TT.ILLEGAL,F=!1,T=!0,ONE_CHAR_PUNCTUATOR=[I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,TT.NOT,I,I,I,TT.MOD,TT.BIT_AND,I,TT.LPAREN,TT.RPAREN,TT.MUL,TT.ADD,TT.COMMA,TT.SUB,TT.PERIOD,TT.DIV,I,I,I,I,I,I,I,I,I,I,TT.COLON,TT.SEMICOLON,TT.LT,TT.ASSIGN,TT.GT,TT.CONDITIONAL,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,TT.LBRACK,I,TT.RBRACK,TT.BIT_XOR,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,TT.LBRACE,TT.BIT_OR,TT.RBRACE,TT.BIT_NOT],PUNCTUATOR_START=[F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,F,F,F,T,T,F,T,T,T,T,T,T,F,T,F,F,F,F,F,F,F,F,F,F,T,T,T,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,F,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T,T,T,F],JsError=tokenizer.JsError=function(o){_inherits$8(e,o);function e(s,a,c,h){_classCallCheck$i(this,e);var d=_possibleConstructorReturn$8(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,h));d.index=s;try{d.line=a,d.column=c}catch{}return d.parseErrorLine=a,d.parseErrorColumn=c,d.description=h,d.message="["+a+":"+c+"]: "+h,d}return e}(Error);function fromCodePoint$1(o){if(o<=65535)return String.fromCharCode(o);var e=String.fromCharCode(Math.floor((o-65536)/1024)+55296),s=String.fromCharCode((o-65536)%1024+56320);return e+s}function decodeUtf16(o,e){return(o-55296)*1024+(e-56320)+65536}var Tokenizer=function(){function o(e){_classCallCheck$i(this,o),this.source=e,this.index=0,this.line=0,this.lineStart=0,this.startIndex=0,this.startLine=0,this.startLineStart=0,this.lastIndex=0,this.lastLine=0,this.lastLineStart=0,this.hasLineTerminatorBeforeNext=!1,this.tokenIndex=0}return _createClass$e(o,[{key:"saveLexerState",value:function(){return{source:this.source,index:this.index,line:this.line,lineStart:this.lineStart,startIndex:this.startIndex,startLine:this.startLine,startLineStart:this.startLineStart,lastIndex:this.lastIndex,lastLine:this.lastLine,lastLineStart:this.lastLineStart,lookahead:this.lookahead,hasLineTerminatorBeforeNext:this.hasLineTerminatorBeforeNext,tokenIndex:this.tokenIndex}}},{key:"restoreLexerState",value:function(s){this.source=s.source,this.index=s.index,this.line=s.line,this.lineStart=s.lineStart,this.startIndex=s.startIndex,this.startLine=s.startLine,this.startLineStart=s.startLineStart,this.lastIndex=s.lastIndex,this.lastLine=s.lastLine,this.lastLineStart=s.lastLineStart,this.lookahead=s.lookahead,this.hasLineTerminatorBeforeNext=s.hasLineTerminatorBeforeNext,this.tokenIndex=s.tokenIndex}},{key:"createILLEGAL",value:function(){return this.startIndex=this.index,this.startLine=this.line,this.startLineStart=this.lineStart,this.index<this.source.length?this.createError(_errors$2.ErrorMessages.UNEXPECTED_ILLEGAL_TOKEN,this.source.charAt(this.index)):this.createError(_errors$2.ErrorMessages.UNEXPECTED_EOS)}},{key:"createUnexpected",value:function(s){switch(s.type.klass){case TokenClass.Eof:return this.createError(_errors$2.ErrorMessages.UNEXPECTED_EOS);case TokenClass.Ident:return this.createError(_errors$2.ErrorMessages.UNEXPECTED_IDENTIFIER);case TokenClass.Keyword:return s.type===TokenType.ESCAPED_KEYWORD?this.createError(_errors$2.ErrorMessages.UNEXPECTED_ESCAPED_KEYWORD):this.createError(_errors$2.ErrorMessages.UNEXPECTED_TOKEN,s.slice.text);case TokenClass.NumericLiteral:return this.createError(_errors$2.ErrorMessages.UNEXPECTED_NUMBER);case TokenClass.TemplateElement:return this.createError(_errors$2.ErrorMessages.UNEXPECTED_TEMPLATE);case TokenClass.Punctuator:return this.createError(_errors$2.ErrorMessages.UNEXPECTED_TOKEN,s.type.name);case TokenClass.StringLiteral:return this.createError(_errors$2.ErrorMessages.UNEXPECTED_STRING)}throw new Error("Unreachable: unexpected token of class "+s.type.klass)}},{key:"createError",value:function(s){var a=void 0;if(typeof s=="function"){for(var c=arguments.length,h=Array(c>1?c-1:0),d=1;d<c;d++)h[d-1]=arguments[d];a=s.apply(void 0,h)}else a=s;return new JsError(this.startIndex,this.startLine+1,this.startIndex-this.startLineStart+1,a)}},{key:"createErrorWithLocation",value:function(s,a){var c=arguments,h=a.replace(/\{(\d+)\}/g,function(d,g){return JSON.stringify(c[+g+2])});return s.slice&&s.slice.startLocation&&(s=s.slice.startLocation),new JsError(s.offset,s.line,s.column+1,h)}},{key:"getKeyword",value:function(s){if(s.length===1||s.length>10)return TokenType.IDENTIFIER;switch(s.length){case 2:switch(s.charAt(0)){case"i":switch(s.charAt(1)){case"f":return TokenType.IF;case"n":return TokenType.IN}break;case"d":if(s.charAt(1)==="o")return TokenType.DO;break}break;case 3:switch(s.charAt(0)){case"v":if(o.cse2(s,"a","r"))return TokenType.VAR;break;case"f":if(o.cse2(s,"o","r"))return TokenType.FOR;break;case"n":if(o.cse2(s,"e","w"))return TokenType.NEW;break;case"t":if(o.cse2(s,"r","y"))return TokenType.TRY;break;case"l":if(o.cse2(s,"e","t"))return TokenType.LET;break}break;case 4:switch(s.charAt(0)){case"t":if(o.cse3(s,"h","i","s"))return TokenType.THIS;if(o.cse3(s,"r","u","e"))return TokenType.TRUE;break;case"n":if(o.cse3(s,"u","l","l"))return TokenType.NULL;break;case"e":if(o.cse3(s,"l","s","e"))return TokenType.ELSE;if(o.cse3(s,"n","u","m"))return TokenType.ENUM;break;case"c":if(o.cse3(s,"a","s","e"))return TokenType.CASE;break;case"v":if(o.cse3(s,"o","i","d"))return TokenType.VOID;break;case"w":if(o.cse3(s,"i","t","h"))return TokenType.WITH;break}break;case 5:switch(s.charAt(0)){case"a":if(o.cse4(s,"s","y","n","c"))return TokenType.ASYNC;if(o.cse4(s,"w","a","i","t"))return TokenType.AWAIT;break;case"w":if(o.cse4(s,"h","i","l","e"))return TokenType.WHILE;break;case"b":if(o.cse4(s,"r","e","a","k"))return TokenType.BREAK;break;case"f":if(o.cse4(s,"a","l","s","e"))return TokenType.FALSE;break;case"c":if(o.cse4(s,"a","t","c","h"))return TokenType.CATCH;if(o.cse4(s,"o","n","s","t"))return TokenType.CONST;if(o.cse4(s,"l","a","s","s"))return TokenType.CLASS;break;case"t":if(o.cse4(s,"h","r","o","w"))return TokenType.THROW;break;case"y":if(o.cse4(s,"i","e","l","d"))return TokenType.YIELD;break;case"s":if(o.cse4(s,"u","p","e","r"))return TokenType.SUPER;break}break;case 6:switch(s.charAt(0)){case"r":if(o.cse5(s,"e","t","u","r","n"))return TokenType.RETURN;break;case"t":if(o.cse5(s,"y","p","e","o","f"))return TokenType.TYPEOF;break;case"d":if(o.cse5(s,"e","l","e","t","e"))return TokenType.DELETE;break;case"s":if(o.cse5(s,"w","i","t","c","h"))return TokenType.SWITCH;break;case"e":if(o.cse5(s,"x","p","o","r","t"))return TokenType.EXPORT;break;case"i":if(o.cse5(s,"m","p","o","r","t"))return TokenType.IMPORT;break}break;case 7:switch(s.charAt(0)){case"d":if(o.cse6(s,"e","f","a","u","l","t"))return TokenType.DEFAULT;break;case"f":if(o.cse6(s,"i","n","a","l","l","y"))return TokenType.FINALLY;break;case"e":if(o.cse6(s,"x","t","e","n","d","s"))return TokenType.EXTENDS;break}break;case 8:switch(s.charAt(0)){case"f":if(o.cse7(s,"u","n","c","t","i","o","n"))return TokenType.FUNCTION;break;case"c":if(o.cse7(s,"o","n","t","i","n","u","e"))return TokenType.CONTINUE;break;case"d":if(o.cse7(s,"e","b","u","g","g","e","r"))return TokenType.DEBUGGER;break}break;case 10:if(s==="instanceof")return TokenType.INSTANCEOF;break}return TokenType.IDENTIFIER}},{key:"skipSingleLineComment",value:function(s){for(this.index+=s;this.index<this.source.length;){var a=this.source.charCodeAt(this.index);if(this.index++,(0,_utils$1.isLineTerminator)(a)){this.hasLineTerminatorBeforeNext=!0,a===13&&this.source.charCodeAt(this.index)===10&&this.index++,this.lineStart=this.index,this.line++;return}}}},{key:"skipMultiLineComment",value:function(){this.index+=2;for(var s=this.source.length,a=!1;this.index<s;){var c=this.source.charCodeAt(this.index);if(c<128)switch(c){case 42:if(this.source.charAt(this.index+1)==="/")return this.index=this.index+2,a;this.index++;break;case 10:a=!0,this.hasLineTerminatorBeforeNext=!0,this.index++,this.lineStart=this.index,this.line++;break;case 13:a=!0,this.hasLineTerminatorBeforeNext=!0,this.source.charAt(this.index+1)===`
|
||
`&&this.index++,this.index++,this.lineStart=this.index,this.line++;break;default:this.index++}else c===8232||c===8233?(a=!0,this.hasLineTerminatorBeforeNext=!0,this.index++,this.lineStart=this.index,this.line++):this.index++}throw this.createILLEGAL()}},{key:"skipComment",value:function(){this.hasLineTerminatorBeforeNext=!1;for(var s=this.index===0,a=this.source.length;this.index<a;){var c=this.source.charCodeAt(this.index);if((0,_utils$1.isWhiteSpace)(c))this.index++;else if((0,_utils$1.isLineTerminator)(c))this.hasLineTerminatorBeforeNext=!0,this.index++,c===13&&this.source.charAt(this.index)===`
|
||
`&&this.index++,this.lineStart=this.index,this.line++,s=!0;else if(c===47){if(this.index+1>=a)break;if(c=this.source.charCodeAt(this.index+1),c===47)this.skipSingleLineComment(2),s=!0;else if(c===42)s=this.skipMultiLineComment()||s;else break}else if(!this.moduleIsTheGoalSymbol&&s&&c===45){if(this.index+2>=a)break;if(this.source.charAt(this.index+1)==="-"&&this.source.charAt(this.index+2)===">")this.skipSingleLineComment(3);else break}else if(!this.moduleIsTheGoalSymbol&&c===60)if(this.source.slice(this.index+1,this.index+4)==="!--")this.skipSingleLineComment(4),s=!0;else break;else break}}},{key:"scanHexEscape2",value:function(){if(this.index+2>this.source.length)return-1;var s=(0,_utils$1.getHexValue)(this.source.charAt(this.index));if(s===-1)return-1;var a=(0,_utils$1.getHexValue)(this.source.charAt(this.index+1));return a===-1?-1:(this.index+=2,s<<4|a)}},{key:"scanUnicode",value:function(){if(this.source.charAt(this.index)==="{"){for(var s=this.index+1,a=0,c=void 0;s<this.source.length;){c=this.source.charAt(s);var h=(0,_utils$1.getHexValue)(c);if(h===-1)break;if(a=a<<4|h,a>1114111)throw this.createILLEGAL();s++}if(c!=="}")throw this.createILLEGAL();if(s===this.index+1)throw++this.index,this.createILLEGAL();return this.index=s+1,a}if(this.index+4>this.source.length)return-1;var d=(0,_utils$1.getHexValue)(this.source.charAt(this.index));if(d===-1)return-1;var g=(0,_utils$1.getHexValue)(this.source.charAt(this.index+1));if(g===-1)return-1;var _=(0,_utils$1.getHexValue)(this.source.charAt(this.index+2));if(_===-1)return-1;var b=(0,_utils$1.getHexValue)(this.source.charAt(this.index+3));return b===-1?-1:(this.index+=4,d<<12|g<<8|_<<4|b)}},{key:"getEscapedIdentifier",value:function(){for(var s="",a=_utils$1.isIdentifierStart;this.index<this.source.length;){var c=this.source.charAt(this.index),h=c.charCodeAt(0),d=this.index;if(++this.index,c==="\\"){if(this.index>=this.source.length)throw this.createILLEGAL();if(this.source.charAt(this.index)!=="u")throw this.createILLEGAL();if(++this.index,h=this.scanUnicode(),h<0)throw this.createILLEGAL();c=fromCodePoint$1(h)}else if(h>=55296&&h<=56319){if(this.index>=this.source.length)throw this.createILLEGAL();var g=this.source.charCodeAt(this.index);if(++this.index,!(g>=56320&&g<=57343))throw this.createILLEGAL();h=decodeUtf16(h,g),c=fromCodePoint$1(h)}if(!a(h)){if(s.length<1)throw this.createILLEGAL();return this.index=d,s}a=_utils$1.isIdentifierPart,s+=c}return s}},{key:"getIdentifier",value:function(){for(var s=this.index,a=this.source.length,c=this.index,h=_utils$1.isIdentifierStart;c<a;){var d=this.source.charAt(c),g=d.charCodeAt(0);if(d==="\\"||g>=55296&&g<=56319)return this.index=s,this.getEscapedIdentifier();if(!h(g))return this.index=c,this.source.slice(s,c);++c,h=_utils$1.isIdentifierPart}return this.index=c,this.source.slice(s,c)}},{key:"scanIdentifier",value:function(){var s=this.getLocation(),a=this.index,c=this.source.charAt(this.index)==="\\"?this.getEscapedIdentifier():this.getIdentifier(),h=this.getSlice(a,s);h.text=c;var d=this.index-a!==c.length,g=this.getKeyword(c);return d&&g!==TokenType.IDENTIFIER&&(g=TokenType.ESCAPED_KEYWORD),{type:g,value:c,slice:h,escaped:d}}},{key:"getLocation",value:function(){return{line:this.startLine+1,column:this.startIndex-this.startLineStart,offset:this.startIndex}}},{key:"getLastTokenEndLocation",value:function(){return{line:this.lastLine+1,column:this.lastIndex-this.lastLineStart,offset:this.lastIndex}}},{key:"getSlice",value:function(s,a){return{text:this.source.slice(s,this.index),start:s,startLocation:a,end:this.index}}},{key:"scanPunctuatorHelper",value:function(){var s=this.source.charAt(this.index);switch(s){case".":{var a=this.source.charAt(this.index+1);if(a!==".")return TokenType.PERIOD;var c=this.source.charAt(this.index+2);return c!=="."?TokenType.PERIOD:TokenType.ELLIPSIS}case"(":return TokenType.LPAREN;case")":case";":case",":return ONE_CHAR_PUNCTUATOR[s.charCodeAt(0)];case"{":return TokenType.LBRACE;case"}":case"[":case"]":case":":case"?":case"~":return ONE_CHAR_PUNCTUATOR[s.charCodeAt(0)];default:if(this.index+1<this.source.length&&this.source.charAt(this.index+1)==="=")switch(s){case"=":return this.index+2<this.source.length&&this.source.charAt(this.index+2)==="="?TokenType.EQ_STRICT:TokenType.EQ;case"!":return this.index+2<this.source.length&&this.source.charAt(this.index+2)==="="?TokenType.NE_STRICT:TokenType.NE;case"|":return TokenType.ASSIGN_BIT_OR;case"+":return TokenType.ASSIGN_ADD;case"-":return TokenType.ASSIGN_SUB;case"*":return TokenType.ASSIGN_MUL;case"<":return TokenType.LTE;case">":return TokenType.GTE;case"/":return TokenType.ASSIGN_DIV;case"%":return TokenType.ASSIGN_MOD;case"^":return TokenType.ASSIGN_BIT_XOR;case"&":return TokenType.ASSIGN_BIT_AND}}if(this.index+1<this.source.length){var h=this.source.charAt(this.index+1);if(s===h){if(this.index+2<this.source.length){var d=this.source.charAt(this.index+2);if(s===">"&&d===">")return this.index+3<this.source.length&&this.source.charAt(this.index+3)==="="?TokenType.ASSIGN_SHR_UNSIGNED:TokenType.SHR_UNSIGNED;if(s==="<"&&d==="=")return TokenType.ASSIGN_SHL;if(s===">"&&d==="=")return TokenType.ASSIGN_SHR;if(s==="*"&&d==="=")return TokenType.ASSIGN_EXP}switch(s){case"*":return TokenType.EXP;case"+":return TokenType.INC;case"-":return TokenType.DEC;case"<":return TokenType.SHL;case">":return TokenType.SHR;case"&":return TokenType.AND;case"|":return TokenType.OR}}else if(s==="="&&h===">")return TokenType.ARROW}return ONE_CHAR_PUNCTUATOR[s.charCodeAt(0)]}},{key:"scanPunctuator",value:function(){var s=this.getLocation(),a=this.index,c=this.scanPunctuatorHelper();return this.index+=c.name.length,{type:c,value:c.name,slice:this.getSlice(a,s)}}},{key:"scanHexLiteral",value:function(s,a){for(var c=this.index;c<this.source.length;){var h=this.source.charAt(c),d=(0,_utils$1.getHexValue)(h);if(d===-1)break;c++}if(this.index===c)throw this.createILLEGAL();if(c<this.source.length&&(0,_utils$1.isIdentifierStart)(this.source.charCodeAt(c)))throw this.createILLEGAL();this.index=c;var g=this.getSlice(s,a);return{type:TokenType.NUMBER,value:parseInt(g.text.substr(2),16),slice:g}}},{key:"scanBinaryLiteral",value:function(s,a){for(var c=this.index-s;this.index<this.source.length;){var h=this.source.charAt(this.index);if(h!=="0"&&h!=="1")break;this.index++}if(this.index-s<=c)throw this.createILLEGAL();if(this.index<this.source.length&&((0,_utils$1.isIdentifierStart)(this.source.charCodeAt(this.index))||(0,_utils$1.isDecimalDigit)(this.source.charCodeAt(this.index))))throw this.createILLEGAL();return{type:TokenType.NUMBER,value:parseInt(this.getSlice(s,a).text.substr(c),2),slice:this.getSlice(s,a),octal:!1,noctal:!1}}},{key:"scanOctalLiteral",value:function(s,a){for(;this.index<this.source.length;){var c=this.source.charAt(this.index);if(c>="0"&&c<="7")this.index++;else{if((0,_utils$1.isIdentifierPart)(c.charCodeAt(0)))throw this.createILLEGAL();break}}if(this.index-s===2)throw this.createILLEGAL();return{type:TokenType.NUMBER,value:parseInt(this.getSlice(s,a).text.substr(2),8),slice:this.getSlice(s,a),octal:!1,noctal:!1}}},{key:"scanLegacyOctalLiteral",value:function(s,a){for(var c=!0;this.index<this.source.length;){var h=this.source.charAt(this.index);if(h>="0"&&h<="7")this.index++;else if(h==="8"||h==="9")c=!1,this.index++;else{if((0,_utils$1.isIdentifierPart)(h.charCodeAt(0)))throw this.createILLEGAL();break}}var d=this.getSlice(s,a);return c?{type:TokenType.NUMBER,slice:d,value:parseInt(d.text.substr(1),8),octal:!0,noctal:!c}:(this.eatDecimalLiteralSuffix(),{type:TokenType.NUMBER,slice:d,value:+d.text,octal:!0,noctal:!c})}},{key:"scanNumericLiteral",value:function(){var s=this.source.charAt(this.index),a=this.getLocation(),c=this.index;if(s==="0")if(this.index++,this.index<this.source.length){if(s=this.source.charAt(this.index),s==="x"||s==="X")return this.index++,this.scanHexLiteral(c,a);if(s==="b"||s==="B")return this.index++,this.scanBinaryLiteral(c,a);if(s==="o"||s==="O")return this.index++,this.scanOctalLiteral(c,a);if(s>="0"&&s<="9")return this.scanLegacyOctalLiteral(c,a)}else{var h=this.getSlice(c,a);return{type:TokenType.NUMBER,value:+h.text,slice:h,octal:!1,noctal:!1}}else if(s!==".")for(s=this.source.charAt(this.index);s>="0"&&s<="9";){if(this.index++,this.index===this.source.length){var d=this.getSlice(c,a);return{type:TokenType.NUMBER,value:+d.text,slice:d,octal:!1,noctal:!1}}s=this.source.charAt(this.index)}if(this.eatDecimalLiteralSuffix(),this.index!==this.source.length&&(0,_utils$1.isIdentifierStart)(this.source.charCodeAt(this.index)))throw this.createILLEGAL();var g=this.getSlice(c,a);return{type:TokenType.NUMBER,value:+g.text,slice:g,octal:!1,noctal:!1}}},{key:"eatDecimalLiteralSuffix",value:function(){var s=this.source.charAt(this.index);if(s==="."){if(this.index++,this.index===this.source.length)return;for(s=this.source.charAt(this.index);s>="0"&&s<="9";){if(this.index++,this.index===this.source.length)return;s=this.source.charAt(this.index)}}if(s==="e"||s==="E"){if(this.index++,this.index===this.source.length)throw this.createILLEGAL();if(s=this.source.charAt(this.index),s==="+"||s==="-"){if(this.index++,this.index===this.source.length)throw this.createILLEGAL();s=this.source.charAt(this.index)}if(s>="0"&&s<="9")for(;s>="0"&&s<="9"&&(this.index++,this.index!==this.source.length);)s=this.source.charAt(this.index);else throw this.createILLEGAL()}}},{key:"scanStringEscape",value:function(s,a){if(this.index++,this.index===this.source.length)throw this.createILLEGAL();var c=this.source.charAt(this.index);if((0,_utils$1.isLineTerminator)(c.charCodeAt(0)))this.index++,c==="\r"&&this.source.charAt(this.index)===`
|
||
`&&this.index++,this.lineStart=this.index,this.line++;else switch(c){case"n":s+=`
|
||
`,this.index++;break;case"r":s+="\r",this.index++;break;case"t":s+=" ",this.index++;break;case"u":case"x":{var h=void 0;if(this.index++,this.index>=this.source.length)throw this.createILLEGAL();if(h=c==="u"?this.scanUnicode():this.scanHexEscape2(),h<0)throw this.createILLEGAL();s+=fromCodePoint$1(h);break}case"b":s+="\b",this.index++;break;case"f":s+="\f",this.index++;break;case"v":s+="\v",this.index++;break;default:if(c>="0"&&c<="7"){var d=this.index,g=1;c>="0"&&c<="3"&&(g=0);for(var _=0;g<3&&c>="0"&&c<="7";){if(this.index++,(g>0||c!=="0")&&(a=this.source.slice(d,this.index)),_*=8,_+=c-"0",g++,this.index===this.source.length)throw this.createILLEGAL();c=this.source.charAt(this.index)}_===0&&g===1&&(c==="8"||c==="9")&&(a=this.source.slice(d,this.index+1)),s+=String.fromCharCode(_)}else{if(c==="8"||c==="9")throw this.createILLEGAL();s+=c,this.index++}}return[s,a]}},{key:"scanStringLiteral",value:function(){var s="",a=this.source.charAt(this.index),c=this.getLocation(),h=this.index;this.index++;for(var d=null;this.index<this.source.length;){var g=this.source.charAt(this.index);if(g===a)return this.index++,{type:TokenType.STRING,slice:this.getSlice(h,c),str:s,octal:d};if(g==="\\"){var _=this.scanStringEscape(s,d),b=_slicedToArray(_,2);s=b[0],d=b[1]}else{if((0,_utils$1.isLineTerminator)(g.charCodeAt(0)))throw this.createILLEGAL();s+=g,this.index++}}throw this.createILLEGAL()}},{key:"scanTemplateElement",value:function(){var s=this.getLocation(),a=this.index;for(this.index++;this.index<this.source.length;){var c=this.source.charCodeAt(this.index);switch(c){case 96:return this.index++,{type:TokenType.TEMPLATE,tail:!0,slice:this.getSlice(a,s)};case 36:{if(this.source.charCodeAt(this.index+1)===123)return this.index+=2,{type:TokenType.TEMPLATE,tail:!1,slice:this.getSlice(a,s)};this.index++;break}case 92:{var h=this.scanStringEscape("",null)[1];if(h!=null)throw this.createError(_errors$2.ErrorMessages.NO_OCTALS_IN_TEMPLATES);break}case 13:{this.line++,this.index++,this.index<this.source.length&&this.source.charAt(this.index)===`
|
||
`&&this.index++,this.lineStart=this.index;break}case 10:case 8232:case 8233:{this.line++,this.index++,this.lineStart=this.index;break}default:this.index++}}throw this.createILLEGAL()}},{key:"scanRegExp",value:function(s){for(var a=this.getLocation(),c=this.index,h=!1,d=!1;this.index<this.source.length;){var g=this.source.charAt(this.index);if(g==="\\"){if(s+=g,this.index++,g=this.source.charAt(this.index),(0,_utils$1.isLineTerminator)(g.charCodeAt(0)))throw this.createError(_errors$2.ErrorMessages.UNTERMINATED_REGEXP);s+=g,this.index++}else{if((0,_utils$1.isLineTerminator)(g.charCodeAt(0)))throw this.createError(_errors$2.ErrorMessages.UNTERMINATED_REGEXP);if(d)g==="]"&&(d=!1);else if(g==="/"){h=!0,s+=g,this.index++;break}else g==="["&&(d=!0);s+=g,this.index++}}if(!h)throw this.createError(_errors$2.ErrorMessages.UNTERMINATED_REGEXP);for(;this.index<this.source.length;){var _=this.source.charAt(this.index);if(_==="\\")throw this.createError(_errors$2.ErrorMessages.INVALID_REGEXP_FLAGS);if(!(0,_utils$1.isIdentifierPart)(_.charCodeAt(0)))break;this.index++,s+=_}return{type:TokenType.REGEXP,value:s,slice:this.getSlice(c,a)}}},{key:"advance",value:function(){var s=this.getLocation();if(this.lastIndex=this.index,this.lastLine=this.line,this.lastLineStart=this.lineStart,this.skipComment(),this.startIndex=this.index,this.startLine=this.line,this.startLineStart=this.lineStart,this.lastIndex===0&&(this.lastIndex=this.index,this.lastLine=this.line,this.lastLineStart=this.lineStart),this.index>=this.source.length)return{type:TokenType.EOS,slice:this.getSlice(this.index,s)};var a=this.source.charCodeAt(this.index);if(a<128){if(PUNCTUATOR_START[a])return this.scanPunctuator();if((0,_utils$1.isIdentifierStart)(a)||a===92)return this.scanIdentifier();if(a===46)return this.index+1<this.source.length&&(0,_utils$1.isDecimalDigit)(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator();if(a===39||a===34)return this.scanStringLiteral();if(a===96)return this.scanTemplateElement();if(a>=48&&a<=57)return this.scanNumericLiteral();throw this.createILLEGAL()}else{if((0,_utils$1.isIdentifierStart)(a)||a>=55296&&a<=56319)return this.scanIdentifier();throw this.createILLEGAL()}}},{key:"eof",value:function(){return this.lookahead.type===TokenType.EOS}},{key:"lex",value:function(){var s=this.lookahead;return this.lookahead=this.advance(),this.tokenIndex++,s}}],[{key:"cse2",value:function(s,a,c){return s.charAt(1)===a&&s.charAt(2)===c}},{key:"cse3",value:function(s,a,c,h){return s.charAt(1)===a&&s.charAt(2)===c&&s.charAt(3)===h}},{key:"cse4",value:function(s,a,c,h,d){return s.charAt(1)===a&&s.charAt(2)===c&&s.charAt(3)===h&&s.charAt(4)===d}},{key:"cse5",value:function(s,a,c,h,d,g){return s.charAt(1)===a&&s.charAt(2)===c&&s.charAt(3)===h&&s.charAt(4)===d&&s.charAt(5)===g}},{key:"cse6",value:function(s,a,c,h,d,g,_){return s.charAt(1)===a&&s.charAt(2)===c&&s.charAt(3)===h&&s.charAt(4)===d&&s.charAt(5)===g&&s.charAt(6)===_}},{key:"cse7",value:function(s,a,c,h,d,g,_,b){return s.charAt(1)===a&&s.charAt(2)===c&&s.charAt(3)===h&&s.charAt(4)===d&&s.charAt(5)===g&&s.charAt(6)===_&&s.charAt(7)===b}}]),o}();tokenizer.default=Tokenizer;var parser$1={},dist$6={},mappings=new Map([["General_Category",new Map([["C","Other"],["Cc","Control"],["cntrl","Control"],["Cf","Format"],["Cn","Unassigned"],["Co","Private_Use"],["Cs","Surrogate"],["L","Letter"],["LC","Cased_Letter"],["Ll","Lowercase_Letter"],["Lm","Modifier_Letter"],["Lo","Other_Letter"],["Lt","Titlecase_Letter"],["Lu","Uppercase_Letter"],["M","Mark"],["Combining_Mark","Mark"],["Mc","Spacing_Mark"],["Me","Enclosing_Mark"],["Mn","Nonspacing_Mark"],["N","Number"],["Nd","Decimal_Number"],["digit","Decimal_Number"],["Nl","Letter_Number"],["No","Other_Number"],["P","Punctuation"],["punct","Punctuation"],["Pc","Connector_Punctuation"],["Pd","Dash_Punctuation"],["Pe","Close_Punctuation"],["Pf","Final_Punctuation"],["Pi","Initial_Punctuation"],["Po","Other_Punctuation"],["Ps","Open_Punctuation"],["S","Symbol"],["Sc","Currency_Symbol"],["Sk","Modifier_Symbol"],["Sm","Math_Symbol"],["So","Other_Symbol"],["Z","Separator"],["Zl","Line_Separator"],["Zp","Paragraph_Separator"],["Zs","Space_Separator"],["Other","Other"],["Control","Control"],["Format","Format"],["Unassigned","Unassigned"],["Private_Use","Private_Use"],["Surrogate","Surrogate"],["Letter","Letter"],["Cased_Letter","Cased_Letter"],["Lowercase_Letter","Lowercase_Letter"],["Modifier_Letter","Modifier_Letter"],["Other_Letter","Other_Letter"],["Titlecase_Letter","Titlecase_Letter"],["Uppercase_Letter","Uppercase_Letter"],["Mark","Mark"],["Spacing_Mark","Spacing_Mark"],["Enclosing_Mark","Enclosing_Mark"],["Nonspacing_Mark","Nonspacing_Mark"],["Number","Number"],["Decimal_Number","Decimal_Number"],["Letter_Number","Letter_Number"],["Other_Number","Other_Number"],["Punctuation","Punctuation"],["Connector_Punctuation","Connector_Punctuation"],["Dash_Punctuation","Dash_Punctuation"],["Close_Punctuation","Close_Punctuation"],["Final_Punctuation","Final_Punctuation"],["Initial_Punctuation","Initial_Punctuation"],["Other_Punctuation","Other_Punctuation"],["Open_Punctuation","Open_Punctuation"],["Symbol","Symbol"],["Currency_Symbol","Currency_Symbol"],["Modifier_Symbol","Modifier_Symbol"],["Math_Symbol","Math_Symbol"],["Other_Symbol","Other_Symbol"],["Separator","Separator"],["Line_Separator","Line_Separator"],["Paragraph_Separator","Paragraph_Separator"],["Space_Separator","Space_Separator"]])],["Script",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","Ahom"],["Arab","Arabic"],["Armi","Imperial_Aramaic"],["Armn","Armenian"],["Avst","Avestan"],["Bali","Balinese"],["Bamu","Bamum"],["Bass","Bassa_Vah"],["Batk","Batak"],["Beng","Bengali"],["Bhks","Bhaiksuki"],["Bopo","Bopomofo"],["Brah","Brahmi"],["Brai","Braille"],["Bugi","Buginese"],["Buhd","Buhid"],["Cakm","Chakma"],["Cans","Canadian_Aboriginal"],["Cari","Carian"],["Cham","Cham"],["Cher","Cherokee"],["Copt","Coptic"],["Qaac","Coptic"],["Cprt","Cypriot"],["Cyrl","Cyrillic"],["Deva","Devanagari"],["Dogr","Dogra"],["Dsrt","Deseret"],["Dupl","Duployan"],["Egyp","Egyptian_Hieroglyphs"],["Elba","Elbasan"],["Ethi","Ethiopic"],["Geor","Georgian"],["Glag","Glagolitic"],["Gong","Gunjala_Gondi"],["Gonm","Masaram_Gondi"],["Goth","Gothic"],["Gran","Grantha"],["Grek","Greek"],["Gujr","Gujarati"],["Guru","Gurmukhi"],["Hang","Hangul"],["Hani","Han"],["Hano","Hanunoo"],["Hatr","Hatran"],["Hebr","Hebrew"],["Hira","Hiragana"],["Hluw","Anatolian_Hieroglyphs"],["Hmng","Pahawh_Hmong"],["Hrkt","Katakana_Or_Hiragana"],["Hung","Old_Hungarian"],["Ital","Old_Italic"],["Java","Javanese"],["Kali","Kayah_Li"],["Kana","Katakana"],["Khar","Kharoshthi"],["Khmr","Khmer"],["Khoj","Khojki"],["Knda","Kannada"],["Kthi","Kaithi"],["Lana","Tai_Tham"],["Laoo","Lao"],["Latn","Latin"],["Lepc","Lepcha"],["Limb","Limbu"],["Lina","Linear_A"],["Linb","Linear_B"],["Lisu","Lisu"],["Lyci","Lycian"],["Lydi","Lydian"],["Mahj","Mahajani"],["Maka","Makasar"],["Mand","Mandaic"],["Mani","Manichaean"],["Marc","Marchen"],["Medf","Medefaidrin"],["Mend","Mende_Kikakui"],["Merc","Meroitic_Cursive"],["Mero","Meroitic_Hieroglyphs"],["Mlym","Malayalam"],["Modi","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["Palm","Palmyrene"],["Pauc","Pau_Cin_Hau"],["Perm","Old_Permic"],["Phag","Phags_Pa"],["Phli","Inscriptional_Pahlavi"],["Phlp","Psalter_Pahlavi"],["Phnx","Phoenician"],["Plrd","Miao"],["Prti","Inscriptional_Parthian"],["Rjng","Rejang"],["Rohg","Hanifi_Rohingya"],["Runr","Runic"],["Samr","Samaritan"],["Sarb","Old_South_Arabian"],["Saur","Saurashtra"],["Sgnw","SignWriting"],["Shaw","Shavian"],["Shrd","Sharada"],["Sidd","Siddham"],["Sind","Khudawadi"],["Sinh","Sinhala"],["Sogd","Sogdian"],["Sogo","Old_Sogdian"],["Sora","Sora_Sompeng"],["Soyo","Soyombo"],["Sund","Sundanese"],["Sylo","Syloti_Nagri"],["Syrc","Syriac"],["Tagb","Tagbanwa"],["Takr","Takri"],["Tale","Tai_Le"],["Talu","New_Tai_Lue"],["Taml","Tamil"],["Tang","Tangut"],["Tavt","Tai_Viet"],["Telu","Telugu"],["Tfng","Tifinagh"],["Tglg","Tagalog"],["Thaa","Thaana"],["Thai","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])],["Script_Extensions",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","Ahom"],["Arab","Arabic"],["Armi","Imperial_Aramaic"],["Armn","Armenian"],["Avst","Avestan"],["Bali","Balinese"],["Bamu","Bamum"],["Bass","Bassa_Vah"],["Batk","Batak"],["Beng","Bengali"],["Bhks","Bhaiksuki"],["Bopo","Bopomofo"],["Brah","Brahmi"],["Brai","Braille"],["Bugi","Buginese"],["Buhd","Buhid"],["Cakm","Chakma"],["Cans","Canadian_Aboriginal"],["Cari","Carian"],["Cham","Cham"],["Cher","Cherokee"],["Copt","Coptic"],["Qaac","Coptic"],["Cprt","Cypriot"],["Cyrl","Cyrillic"],["Deva","Devanagari"],["Dogr","Dogra"],["Dsrt","Deseret"],["Dupl","Duployan"],["Egyp","Egyptian_Hieroglyphs"],["Elba","Elbasan"],["Ethi","Ethiopic"],["Geor","Georgian"],["Glag","Glagolitic"],["Gong","Gunjala_Gondi"],["Gonm","Masaram_Gondi"],["Goth","Gothic"],["Gran","Grantha"],["Grek","Greek"],["Gujr","Gujarati"],["Guru","Gurmukhi"],["Hang","Hangul"],["Hani","Han"],["Hano","Hanunoo"],["Hatr","Hatran"],["Hebr","Hebrew"],["Hira","Hiragana"],["Hluw","Anatolian_Hieroglyphs"],["Hmng","Pahawh_Hmong"],["Hrkt","Katakana_Or_Hiragana"],["Hung","Old_Hungarian"],["Ital","Old_Italic"],["Java","Javanese"],["Kali","Kayah_Li"],["Kana","Katakana"],["Khar","Kharoshthi"],["Khmr","Khmer"],["Khoj","Khojki"],["Knda","Kannada"],["Kthi","Kaithi"],["Lana","Tai_Tham"],["Laoo","Lao"],["Latn","Latin"],["Lepc","Lepcha"],["Limb","Limbu"],["Lina","Linear_A"],["Linb","Linear_B"],["Lisu","Lisu"],["Lyci","Lycian"],["Lydi","Lydian"],["Mahj","Mahajani"],["Maka","Makasar"],["Mand","Mandaic"],["Mani","Manichaean"],["Marc","Marchen"],["Medf","Medefaidrin"],["Mend","Mende_Kikakui"],["Merc","Meroitic_Cursive"],["Mero","Meroitic_Hieroglyphs"],["Mlym","Malayalam"],["Modi","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["Palm","Palmyrene"],["Pauc","Pau_Cin_Hau"],["Perm","Old_Permic"],["Phag","Phags_Pa"],["Phli","Inscriptional_Pahlavi"],["Phlp","Psalter_Pahlavi"],["Phnx","Phoenician"],["Plrd","Miao"],["Prti","Inscriptional_Parthian"],["Rjng","Rejang"],["Rohg","Hanifi_Rohingya"],["Runr","Runic"],["Samr","Samaritan"],["Sarb","Old_South_Arabian"],["Saur","Saurashtra"],["Sgnw","SignWriting"],["Shaw","Shavian"],["Shrd","Sharada"],["Sidd","Siddham"],["Sind","Khudawadi"],["Sinh","Sinhala"],["Sogd","Sogdian"],["Sogo","Old_Sogdian"],["Sora","Sora_Sompeng"],["Soyo","Soyombo"],["Sund","Sundanese"],["Sylo","Syloti_Nagri"],["Syrc","Syriac"],["Tagb","Tagbanwa"],["Takr","Takri"],["Tale","Tai_Le"],["Talu","New_Tai_Lue"],["Taml","Tamil"],["Tang","Tangut"],["Tavt","Tai_Viet"],["Telu","Telugu"],["Tfng","Tifinagh"],["Tglg","Tagalog"],["Thaa","Thaana"],["Thai","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])]]);const propertyToValueAliases=mappings,matchPropertyValue=function(o,e){const s=propertyToValueAliases.get(o);if(!s)throw new Error(`Unknown property \`${o}\`.`);const a=s.get(e);if(a)return a;throw new Error(`Unknown value \`${e}\` for property \`${o}\`.`)};var unicodeMatchPropertyValueEcmascript=matchPropertyValue,unicodeCanonicalPropertyNamesEcmascript=new Set(["General_Category","Script","Script_Extensions","Alphabetic","Any","ASCII","ASCII_Hex_Digit","Assigned","Bidi_Control","Bidi_Mirrored","Case_Ignorable","Cased","Changes_When_Casefolded","Changes_When_Casemapped","Changes_When_Lowercased","Changes_When_NFKC_Casefolded","Changes_When_Titlecased","Changes_When_Uppercased","Dash","Default_Ignorable_Code_Point","Deprecated","Diacritic","Emoji","Emoji_Component","Emoji_Modifier","Emoji_Modifier_Base","Emoji_Presentation","Extended_Pictographic","Extender","Grapheme_Base","Grapheme_Extend","Hex_Digit","ID_Continue","ID_Start","Ideographic","IDS_Binary_Operator","IDS_Trinary_Operator","Join_Control","Logical_Order_Exception","Lowercase","Math","Noncharacter_Code_Point","Pattern_Syntax","Pattern_White_Space","Quotation_Mark","Radical","Regional_Indicator","Sentence_Terminal","Soft_Dotted","Terminal_Punctuation","Unified_Ideograph","Uppercase","Variation_Selector","White_Space","XID_Continue","XID_Start"]),unicodePropertyAliasesEcmascript=new Map([["scx","Script_Extensions"],["sc","Script"],["gc","General_Category"],["AHex","ASCII_Hex_Digit"],["Alpha","Alphabetic"],["Bidi_C","Bidi_Control"],["Bidi_M","Bidi_Mirrored"],["Cased","Cased"],["CI","Case_Ignorable"],["CWCF","Changes_When_Casefolded"],["CWCM","Changes_When_Casemapped"],["CWKCF","Changes_When_NFKC_Casefolded"],["CWL","Changes_When_Lowercased"],["CWT","Changes_When_Titlecased"],["CWU","Changes_When_Uppercased"],["Dash","Dash"],["Dep","Deprecated"],["DI","Default_Ignorable_Code_Point"],["Dia","Diacritic"],["Ext","Extender"],["Gr_Base","Grapheme_Base"],["Gr_Ext","Grapheme_Extend"],["Hex","Hex_Digit"],["IDC","ID_Continue"],["Ideo","Ideographic"],["IDS","ID_Start"],["IDSB","IDS_Binary_Operator"],["IDST","IDS_Trinary_Operator"],["Join_C","Join_Control"],["LOE","Logical_Order_Exception"],["Lower","Lowercase"],["Math","Math"],["NChar","Noncharacter_Code_Point"],["Pat_Syn","Pattern_Syntax"],["Pat_WS","Pattern_White_Space"],["QMark","Quotation_Mark"],["Radical","Radical"],["RI","Regional_Indicator"],["SD","Soft_Dotted"],["STerm","Sentence_Terminal"],["Term","Terminal_Punctuation"],["UIdeo","Unified_Ideograph"],["Upper","Uppercase"],["VS","Variation_Selector"],["WSpace","White_Space"],["space","White_Space"],["XIDC","XID_Continue"],["XIDS","XID_Start"]]);const canonicalProperties=unicodeCanonicalPropertyNamesEcmascript,propertyAliases=unicodePropertyAliasesEcmascript,matchProperty=function(o){if(canonicalProperties.has(o))return o;if(propertyAliases.has(o))return propertyAliases.get(o);throw new Error(`Unknown property: ${o}`)};var unicodeMatchPropertyEcmascript=matchProperty,unicode$1={};Object.defineProperty(unicode$1,"__esModule",{value:!0});unicode$1.whitespaceArray=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];unicode$1.whitespaceBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!0,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1];unicode$1.idStartLargeRegex=/^[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]$/;unicode$1.idStartBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];unicode$1.idContinueLargeRegex=/^[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]$/;unicode$1.idContinueBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];Object.defineProperty(dist$6,"__esModule",{value:!0});var _createClass$d=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_unicodeMatchPropertyValueEcmascript=unicodeMatchPropertyValueEcmascript,_unicodeMatchPropertyValueEcmascript2=_interopRequireDefault$9(_unicodeMatchPropertyValueEcmascript),_mappings=mappings,_mappings2=_interopRequireDefault$9(_mappings),_unicodeMatchPropertyEcmascript=unicodeMatchPropertyEcmascript,_unicodeMatchPropertyEcmascript2=_interopRequireDefault$9(_unicodeMatchPropertyEcmascript),_unicodePropertyAliasesEcmascript=unicodePropertyAliasesEcmascript,_unicodePropertyAliasesEcmascript2=_interopRequireDefault$9(_unicodePropertyAliasesEcmascript),_unicode$1=unicode$1;function _interopRequireDefault$9(o){return o&&o.__esModule?o:{default:o}}function _toConsumableArray$6(o){if(Array.isArray(o)){for(var e=0,s=Array(o.length);e<o.length;e++)s[e]=o[e];return s}else return Array.from(o)}function _classCallCheck$h(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}var catchIsFalse=function(e){try{return!!e()}catch{return!1}},syntaxCharacters="^$\\.*+?()[]{}|".split(""),extendedSyntaxCharacters="^$\\.*+?()[|".split(""),controlEscapeCharacters="fnrtv".split(""),controlEscapeCharacterValues={f:"\f".charCodeAt(0),n:`
|
||
`.charCodeAt(0),r:"\r".charCodeAt(0),t:" ".charCodeAt(0),v:"\v".charCodeAt(0)},controlCharacters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),hexDigits="0123456789abcdefABCDEF".split(""),decimalDigits="0123456789".split(""),octalDigits="01234567".split(""),INVALID_NAMED_BACKREFERENCE_SENTINEL={};function isIdentifierStart(o){return o<128?_unicode$1.idStartBool[o]:_unicode$1.idStartLargeRegex.test(String.fromCodePoint(o))}function isIdentifierPart(o){return o<128?_unicode$1.idContinueBool[o]:_unicode$1.idContinueLargeRegex.test(String.fromCodePoint(o))}var PatternAcceptorState=function(){function o(e,s){_classCallCheck$h(this,o),this.pattern=e,this.unicode=s,this.index=0,this.largestBackreference=0,this.backreferenceNames=[],this.groupingNames=[],this.capturingGroups=0}return _createClass$d(o,[{key:"empty",value:function(){return this.index>=this.pattern.length}},{key:"backreference",value:function(s){s>this.largestBackreference&&(this.largestBackreference=s)}},{key:"nextCodePoint",value:function(){return this.empty()?null:this.unicode?String.fromCodePoint(this.pattern.codePointAt(this.index)):this.pattern.charAt(this.index)}},{key:"skipCodePoint",value:function(){this.index+=this.nextCodePoint().length}},{key:"eat",value:function(s){return this.index+s.length>this.pattern.length||this.pattern.slice(this.index,this.index+s.length)!==s?!1:(this.index+=s.length,!0)}},{key:"eatIdentifierCodePoint",value:function(){var s=void 0,a=this.index,c=void 0;if(this.match("\\u")){if(this.skipCodePoint(),s=acceptUnicodeEscape(this),!s.matched)return this.index=a,null;s=s.value,c=String.fromCodePoint(s)}else{if(c=this.nextCodePoint(),c==null)return this.index=a,null;this.index+=c.length,s=c.codePointAt(0)}return{character:c,characterValue:s}}},{key:"eatIdentifierStart",value:function(){var s=this.index,a=this.eatIdentifierCodePoint();return a===null?(this.index=s,null):a.character==="_"||a.character==="$"||isIdentifierStart(a.characterValue)?a.character:(this.index=s,null)}},{key:"eatIdentifierPart",value:function(){var s=this.index,a=this.eatIdentifierCodePoint();return a===null?(this.index=s,null):a.character==="\u200C"||a.character==="\u200D"||a.character==="$"||isIdentifierPart(a.characterValue)?a.character:(this.index=s,null)}},{key:"eatAny",value:function(){for(var s=arguments.length,a=Array(s),c=0;c<s;c++)a[c]=arguments[c];var h=!0,d=!1,g=void 0;try{for(var _=a[Symbol.iterator](),b;!(h=(b=_.next()).done);h=!0){var $=b.value;if(this.eat($))return $}}catch(j){d=!0,g=j}finally{try{!h&&_.return&&_.return()}finally{if(d)throw g}}return null}},{key:"match",value:function(s){return this.index+s.length<=this.pattern.length&&this.pattern.slice(this.index,this.index+s.length)===s}},{key:"matchAny",value:function(){for(var s=arguments.length,a=Array(s),c=0;c<s;c++)a[c]=arguments[c];var h=!0,d=!1,g=void 0;try{for(var _=a[Symbol.iterator](),b;!(h=(b=_.next()).done);h=!0){var $=b.value;if(this.match($))return!0}}catch(j){d=!0,g=j}finally{try{!h&&_.return&&_.return()}finally{if(d)throw g}}return!1}},{key:"eatNaturalNumber",value:function(){for(var s=this,a=[],c=function(){var d=!0,g=!1,_=void 0;try{for(var b=decimalDigits[Symbol.iterator](),$;!(d=($=b.next()).done);d=!0){var j=$.value;if(s.eat(j))return a.push(j),!0}}catch(_e){g=!0,_=_e}finally{try{!d&&b.return&&b.return()}finally{if(g)throw _}}return!1};c(););return a.length===0?null:a.join("")}}]),o}();dist$6.default=function(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=e.unicode,a=s===void 0?!1:s,c=new PatternAcceptorState(o,a),h=acceptDisjunction(c);if(h.matched){if(c.unicode&&c.largestBackreference>c.capturingGroups)return!1;if(c.groupingNames.length>0||c.unicode){var d=!0,g=!1,_=void 0;try{for(var b=c.backreferenceNames[Symbol.iterator](),$;!(d=($=b.next()).done);d=!0){var j=$.value;if(c.groupingNames.indexOf(j)===-1)return!1}}catch(_e){g=!0,_=_e}finally{try{!d&&b.return&&b.return()}finally{if(g)throw _}}}}return h.matched};var backtrackOnFailure=function(e){return function(s){var a=s.index,c=s.largestBackreference,h=s.capturingGroups,d=e(s);return d.matched||(s.index=a,s.largestBackreference=c,s.capturingGroups=h),d}},acceptUnicodeEscape=backtrackOnFailure(function(o){if(!o.eat("u"))return{matched:!1};if(o.unicode&&o.eat("{")){for(var e=[];!o.eat("}");){var s=o.eatAny.apply(o,_toConsumableArray$6(hexDigits));if(s===null)return{matched:!1};e.push(s)}var a=parseInt(e.join(""),16);return a>1114111?{matched:!1}:{matched:!0,value:a}}var c=[0,0,0,0].map(function(){return o.eatAny.apply(o,_toConsumableArray$6(hexDigits))});if(c.some(function(g){return g===null}))return{matched:!1};var h=parseInt(c.join(""),16);if(o.unicode&&h>=55296&&h<=56319){var d=backtrackOnFailure(function(g){if(!g.eat("\\u"))return{matched:!1};var _=[0,0,0,0].map(function(){return g.eatAny.apply(g,_toConsumableArray$6(hexDigits))});if(_.some(function($){return $===null}))return{matched:!1};var b=parseInt(_.join(""),16);return b<56320||b>=57344?{matched:!1}:{matched:!0,value:65536+((h&1023)<<10)+(b&1023)}})(o);if(d.matched)return d}return{matched:!0,value:h}}),acceptDisjunction=function(e,s){do{if(s!==void 0&&e.eat(s))return{matched:!0};if(e.match("|"))continue;if(!acceptAlternative(e,s).matched)return{matched:!1}}while(e.eat("|"));return{matched:s===void 0||!!e.eat(s)}},acceptAlternative=function(e,s){for(;!e.match("|")&&!e.empty()&&(s===void 0||!e.match(s));)if(!acceptTerm(e).matched)return{matched:!1};return{matched:!0}},anyOf=function(){for(var e=arguments.length,s=Array(e),a=0;a<e;a++)s[a]=arguments[a];return function(c){var h=!0,d=!1,g=void 0;try{for(var _=s[Symbol.iterator](),b;!(h=(b=_.next()).done);h=!0){var $=b.value,j=$(c);if(j.matched)return j}}catch(_e){d=!0,g=_e}finally{try{!h&&_.return&&_.return()}finally{if(d)throw g}}return{matched:!1}}},acceptTerm=function(e){return e.unicode?anyOf(acceptAssertion,acceptQuantified(acceptAtom))(e):anyOf(acceptQuantified(acceptQuantifiableAssertion),acceptAssertion,acceptQuantified(acceptAtom))(e)},acceptLabeledGroup=function(e){return backtrackOnFailure(function(s){return s.eat("(")?e(s)?acceptDisjunction(s,")"):{matched:!1}:{matched:!1}})},acceptQuantifiableAssertion=acceptLabeledGroup(function(o){return!!o.eatAny("?=","?!")}),acceptAssertion=function(e){return e.eatAny("^","$","\\b","\\B")?{matched:!0}:acceptLabeledGroup(function(s){return s.unicode?!!s.eatAny("?=","?!","?<=","?<!"):!!s.eatAny("?<=","?<!")})(e)},acceptDecimal=function(e){return{matched:e.eatNaturalNumber()!==null}},acceptQuantified=function(e){return backtrackOnFailure(function(s){if(!e(s).matched)return{matched:!1};if(s.match("{")){var a=backtrackOnFailure(function(c){c.eat("{");var h=c.eatNaturalNumber();if(h===null)return{matched:!1};if(c.eat(",")&&c.matchAny.apply(c,_toConsumableArray$6(decimalDigits))){var d=c.eatNaturalNumber();if(d===null||parseInt(h)>parseInt(d))return{matched:!1}}return c.eat("}")?(c.eat("?"),{matched:!0}):{matched:!1}})(s);return a.matched?a:{matched:!s.unicode}}else s.eatAny("*","+","?")&&s.eat("?");return{matched:!0}})},acceptCharacterExcept=function(e){return function(s){var a=s.nextCodePoint();return a===null||e.indexOf(a)!==-1?{matched:!1}:(s.skipCodePoint(),{matched:!0})}},acceptPatternCharacter=acceptCharacterExcept(syntaxCharacters),acceptExtendedPatternCharacter=acceptCharacterExcept(extendedSyntaxCharacters),acceptInvalidBracedQuantifier=function(e){return backtrackOnFailure(function(s){return{matched:!!(s.eat("{")&&acceptDecimal(s).matched&&(!s.eat(",")||s.match("}")||acceptDecimal(s).matched)&&s.eat("}"))}})(e)},acceptAtom=function(e){if(e.unicode)return anyOf(acceptPatternCharacter,function(a){return{matched:!!a.eat(".")}},backtrackOnFailure(function(a){return a.eat("\\")?acceptAtomEscape(a):{matched:!1}}),acceptCharacterClass,acceptLabeledGroup(function(a){return a.eat("?:")}),acceptGrouping)(e);var s=anyOf(function(a){return{matched:!!a.eat(".")}},backtrackOnFailure(function(a){return a.eat("\\")?acceptAtomEscape(a):{matched:!1}}),backtrackOnFailure(function(a){return{matched:a.eat("\\")&&a.match("c")}}),acceptCharacterClass,acceptLabeledGroup(function(a){return a.eat("?:")}),acceptGrouping)(e);return!s.matched&&acceptInvalidBracedQuantifier(e).matched?{matched:!1}:s.matched?s:acceptExtendedPatternCharacter(e)},acceptGrouping=backtrackOnFailure(function(o){if(!o.eat("("))return{matched:!1};var e=backtrackOnFailure(function(s){return o.eat("?")?acceptGroupName(s):{matched:!1}})(o);if(!acceptDisjunction(o,")").matched)return{matched:!1};if(e.matched){if(o.groupingNames.indexOf(e.data)!==-1)return{matched:!1};o.groupingNames.push(e.data)}return o.capturingGroups++,{matched:!0}}),acceptDecimalEscape=backtrackOnFailure(function(o){var e=o.eatAny.apply(o,_toConsumableArray$6(decimalDigits));return e===null?{matched:!1}:e==="0"?{matched:!0}:(o.backreference(parseInt(e+(o.eatNaturalNumber()||""))),{matched:!0})}),acceptCharacterClassEscape=function(e){return e.eatAny("d","D","s","S","w","W")?{matched:!0}:e.unicode?backtrackOnFailure(function(s){return!s.eat("p{")&&!s.eat("P{")?{matched:!1}:acceptUnicodePropertyValueExpression(s).matched?{matched:!!s.eat("}")}:{matched:!1}})(e):{matched:!1}},acceptUnicodePropertyName=function(e){for(var s=[],a=void 0;a=e.eatAny.apply(e,_toConsumableArray$6(controlCharacters).concat(["_"]));)s.push(a);return{matched:s.length>0,data:s.join("")}},acceptUnicodePropertyValue=function(e){for(var s=[],a=void 0;a=e.eatAny.apply(e,_toConsumableArray$6(controlCharacters).concat(_toConsumableArray$6(decimalDigits),["_"]));)s.push(a);return{matched:s.length>0,data:s.join("")}},illegalLoneUnicodePropertyNames=["General_Category","Script","Script_Extensions","scx","sc","gc"],generalCategoryValues=_mappings2.default.get("General_Category"),acceptLoneUnicodePropertyNameOrValue=function(e){var s=acceptUnicodePropertyValue(e);return!s.matched||illegalLoneUnicodePropertyNames.includes(s.data)?{matched:!1}:{matched:catchIsFalse(function(){return(0,_unicodeMatchPropertyEcmascript2.default)(s.data)})||generalCategoryValues.get(s.data)!=null}},acceptUnicodePropertyValueExpression=function(e){return anyOf(backtrackOnFailure(function(s){var a=acceptUnicodePropertyName(s);if(!a.matched||!s.eat("="))return{matched:!1};var c=acceptUnicodePropertyValue(s);return c.matched?{matched:catchIsFalse(function(){return(0,_unicodeMatchPropertyValueEcmascript2.default)(_unicodePropertyAliasesEcmascript2.default.get(a.data)||a.data,c.data)})}:{matched:!1}}),backtrackOnFailure(acceptLoneUnicodePropertyNameOrValue))(e)},acceptCharacterEscape=anyOf(function(o){var e=o.eatAny.apply(o,_toConsumableArray$6(controlEscapeCharacters));return e===null?{matched:!1}:{matched:!0,value:controlEscapeCharacterValues[e]}},backtrackOnFailure(function(o){if(!o.eat("c"))return{matched:!1};var e=o.eatAny.apply(o,_toConsumableArray$6(controlCharacters));return e===null?{matched:!1}:{matched:!0,value:e.charCodeAt(0)%32}}),backtrackOnFailure(function(o){return!o.eat("0")||o.eatAny.apply(o,_toConsumableArray$6(decimalDigits))?{matched:!1}:{matched:!0,value:0}}),backtrackOnFailure(function(o){if(!o.eat("x"))return{matched:!1};var e=[0,0].map(function(){return o.eatAny.apply(o,_toConsumableArray$6(hexDigits))});return e.some(function(s){return s===null})?{matched:!1}:{matched:!0,value:parseInt(e.join(""),16)}}),acceptUnicodeEscape,backtrackOnFailure(function(o){if(o.unicode)return{matched:!1};var e=o.eatAny.apply(o,_toConsumableArray$6(octalDigits));if(e===null)return{matched:!1};var s=parseInt(e,8);if(octalDigits.indexOf(o.nextCodePoint())===-1)return{matched:!0,value:s};var a=o.eatAny.apply(o,_toConsumableArray$6(octalDigits)),c=parseInt(a,8);if(s<4){if(octalDigits.indexOf(o.nextCodePoint())===-1)return{matched:!0,value:s<<3|c};var h=o.eatAny.apply(o,_toConsumableArray$6(octalDigits)),d=parseInt(h,8);return{matched:!0,value:s<<6|c<<3|d}}return{matched:!0,value:s<<3|c}}),backtrackOnFailure(function(o){if(!o.unicode)return{matched:!1};var e=o.eatAny.apply(o,_toConsumableArray$6(syntaxCharacters));return e===null?{matched:!1}:{matched:!0,value:e.charCodeAt(0)}}),function(o){return!o.unicode||!o.eat("/")?{matched:!1}:{matched:!0,value:"/".charCodeAt(0)}},backtrackOnFailure(function(o){if(o.unicode)return{matched:!1};var e=o.nextCodePoint();return e!==null&&e!=="c"&&e!=="k"?(o.skipCodePoint(),{matched:!0,value:e.codePointAt(0)}):{matched:!1}})),acceptGroupNameBackreference=backtrackOnFailure(function(o){if(!o.eat("k"))return{matched:!1};var e=acceptGroupName(o);return e.matched?(o.backreferenceNames.push(e.data),{matched:!0}):(o.backreferenceNames.push(INVALID_NAMED_BACKREFERENCE_SENTINEL),{matched:!0})}),acceptGroupName=backtrackOnFailure(function(o){if(!o.eat("<"))return{matched:!1};var e=[],s=o.eatIdentifierStart();if(!s)return{matched:!1};e.push(s);for(var a=void 0;a=o.eatIdentifierPart();)e.push(a);return o.eat(">")?{matched:e.length>0,data:e.join("")}:{matched:!1}}),acceptAtomEscape=anyOf(acceptDecimalEscape,acceptCharacterClassEscape,acceptCharacterEscape,acceptGroupNameBackreference),acceptCharacterClass=backtrackOnFailure(function(o){if(!o.eat("["))return{matched:!1};o.eat("^");var e=anyOf(function(_){return{matched:!!_.eat("b"),value:8}},function(_){return{matched:_.unicode&&!!_.eat("-"),value:"-".charCodeAt(0)}},backtrackOnFailure(function(_){if(_.unicode||!_.eat("c"))return{matched:!1};var b=_.eatAny.apply(_,_toConsumableArray$6(decimalDigits).concat(["_"]));return b===null?{matched:!1}:{matched:!0,value:b.charCodeAt(0)%32}}),acceptCharacterClassEscape,acceptCharacterEscape,function(_){return{matched:!_.unicode&&!!_.eat("k"),value:107}}),s=function(b){var $=b.nextCodePoint();if($==="]"||$==="-"||$===null)return{matched:!1};if($!=="\\")return b.skipCodePoint(),{matched:!0,value:$.codePointAt(0)};b.eat("\\");var j=e(b);return!j.matched&&b.nextCodePoint()==="c"&&!b.unicode?{matched:!0,value:"\\".charCodeAt(0)}:j},a=function(b){return b.eat("-")?{matched:!0,value:"-".charCodeAt(0)}:s(b)},c=function(b,$){var j=function(tt){return tt.value===void 0&&tt.matched};if(b.eat("-")){if(b.match("]"))return{matched:!0};var _e=a(b);return _e.matched?b.unicode&&(j($)||j(_e))?{matched:!1}:!(!b.unicode&&(j($)||j(_e)))&&$.value>_e.value?{matched:!1}:b.match("]")?{matched:!0}:h(b):{matched:!1}}return b.match("]")?{matched:!0}:d(b)},h=function(b){var $=a(b);return $.matched?c(b,$):{matched:!1}},d=function(b){var $=s(b);return $.matched?c(b,$):{matched:!1}};if(o.eat("]"))return{matched:!0};var g=h(o);return g.matched&&o.eat("]"),g}),dist$5={};Object.defineProperty(dist$5,"__esModule",{value:!0});function _classCallCheck$g(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}dist$5.ArrayAssignmentTarget=function o(e){var s=e.elements,a=e.rest;_classCallCheck$g(this,o),this.type="ArrayAssignmentTarget",this.elements=s,this.rest=a};dist$5.ArrayBinding=function o(e){var s=e.elements,a=e.rest;_classCallCheck$g(this,o),this.type="ArrayBinding",this.elements=s,this.rest=a};dist$5.ArrayExpression=function o(e){var s=e.elements;_classCallCheck$g(this,o),this.type="ArrayExpression",this.elements=s};dist$5.ArrowExpression=function o(e){var s=e.isAsync,a=e.params,c=e.body;_classCallCheck$g(this,o),this.type="ArrowExpression",this.isAsync=s,this.params=a,this.body=c};dist$5.AssignmentExpression=function o(e){var s=e.binding,a=e.expression;_classCallCheck$g(this,o),this.type="AssignmentExpression",this.binding=s,this.expression=a};dist$5.AssignmentTargetIdentifier=function o(e){var s=e.name;_classCallCheck$g(this,o),this.type="AssignmentTargetIdentifier",this.name=s};dist$5.AssignmentTargetPropertyIdentifier=function o(e){var s=e.binding,a=e.init;_classCallCheck$g(this,o),this.type="AssignmentTargetPropertyIdentifier",this.binding=s,this.init=a};dist$5.AssignmentTargetPropertyProperty=function o(e){var s=e.name,a=e.binding;_classCallCheck$g(this,o),this.type="AssignmentTargetPropertyProperty",this.name=s,this.binding=a};dist$5.AssignmentTargetWithDefault=function o(e){var s=e.binding,a=e.init;_classCallCheck$g(this,o),this.type="AssignmentTargetWithDefault",this.binding=s,this.init=a};dist$5.AwaitExpression=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="AwaitExpression",this.expression=s};dist$5.BinaryExpression=function o(e){var s=e.left,a=e.operator,c=e.right;_classCallCheck$g(this,o),this.type="BinaryExpression",this.left=s,this.operator=a,this.right=c};dist$5.BindingIdentifier=function o(e){var s=e.name;_classCallCheck$g(this,o),this.type="BindingIdentifier",this.name=s};dist$5.BindingPropertyIdentifier=function o(e){var s=e.binding,a=e.init;_classCallCheck$g(this,o),this.type="BindingPropertyIdentifier",this.binding=s,this.init=a};dist$5.BindingPropertyProperty=function o(e){var s=e.name,a=e.binding;_classCallCheck$g(this,o),this.type="BindingPropertyProperty",this.name=s,this.binding=a};dist$5.BindingWithDefault=function o(e){var s=e.binding,a=e.init;_classCallCheck$g(this,o),this.type="BindingWithDefault",this.binding=s,this.init=a};dist$5.Block=function o(e){var s=e.statements;_classCallCheck$g(this,o),this.type="Block",this.statements=s};dist$5.BlockStatement=function o(e){var s=e.block;_classCallCheck$g(this,o),this.type="BlockStatement",this.block=s};dist$5.BreakStatement=function o(e){var s=e.label;_classCallCheck$g(this,o),this.type="BreakStatement",this.label=s};dist$5.CallExpression=function o(e){var s=e.callee,a=e.arguments;_classCallCheck$g(this,o),this.type="CallExpression",this.callee=s,this.arguments=a};dist$5.CatchClause=function o(e){var s=e.binding,a=e.body;_classCallCheck$g(this,o),this.type="CatchClause",this.binding=s,this.body=a};dist$5.ClassDeclaration=function o(e){var s=e.name,a=e.super,c=e.elements;_classCallCheck$g(this,o),this.type="ClassDeclaration",this.name=s,this.super=a,this.elements=c};dist$5.ClassElement=function o(e){var s=e.isStatic,a=e.method;_classCallCheck$g(this,o),this.type="ClassElement",this.isStatic=s,this.method=a};dist$5.ClassExpression=function o(e){var s=e.name,a=e.super,c=e.elements;_classCallCheck$g(this,o),this.type="ClassExpression",this.name=s,this.super=a,this.elements=c};dist$5.CompoundAssignmentExpression=function o(e){var s=e.binding,a=e.operator,c=e.expression;_classCallCheck$g(this,o),this.type="CompoundAssignmentExpression",this.binding=s,this.operator=a,this.expression=c};dist$5.ComputedMemberAssignmentTarget=function o(e){var s=e.object,a=e.expression;_classCallCheck$g(this,o),this.type="ComputedMemberAssignmentTarget",this.object=s,this.expression=a};dist$5.ComputedMemberExpression=function o(e){var s=e.object,a=e.expression;_classCallCheck$g(this,o),this.type="ComputedMemberExpression",this.object=s,this.expression=a};dist$5.ComputedPropertyName=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="ComputedPropertyName",this.expression=s};dist$5.ConditionalExpression=function o(e){var s=e.test,a=e.consequent,c=e.alternate;_classCallCheck$g(this,o),this.type="ConditionalExpression",this.test=s,this.consequent=a,this.alternate=c};dist$5.ContinueStatement=function o(e){var s=e.label;_classCallCheck$g(this,o),this.type="ContinueStatement",this.label=s};dist$5.DataProperty=function o(e){var s=e.name,a=e.expression;_classCallCheck$g(this,o),this.type="DataProperty",this.name=s,this.expression=a};dist$5.DebuggerStatement=function o(){_classCallCheck$g(this,o),this.type="DebuggerStatement"};dist$5.Directive=function o(e){var s=e.rawValue;_classCallCheck$g(this,o),this.type="Directive",this.rawValue=s};dist$5.DoWhileStatement=function o(e){var s=e.body,a=e.test;_classCallCheck$g(this,o),this.type="DoWhileStatement",this.body=s,this.test=a};dist$5.EmptyStatement=function o(){_classCallCheck$g(this,o),this.type="EmptyStatement"};dist$5.Export=function o(e){var s=e.declaration;_classCallCheck$g(this,o),this.type="Export",this.declaration=s};dist$5.ExportAllFrom=function o(e){var s=e.moduleSpecifier;_classCallCheck$g(this,o),this.type="ExportAllFrom",this.moduleSpecifier=s};dist$5.ExportDefault=function o(e){var s=e.body;_classCallCheck$g(this,o),this.type="ExportDefault",this.body=s};dist$5.ExportFrom=function o(e){var s=e.namedExports,a=e.moduleSpecifier;_classCallCheck$g(this,o),this.type="ExportFrom",this.namedExports=s,this.moduleSpecifier=a};dist$5.ExportFromSpecifier=function o(e){var s=e.name,a=e.exportedName;_classCallCheck$g(this,o),this.type="ExportFromSpecifier",this.name=s,this.exportedName=a};dist$5.ExportLocalSpecifier=function o(e){var s=e.name,a=e.exportedName;_classCallCheck$g(this,o),this.type="ExportLocalSpecifier",this.name=s,this.exportedName=a};dist$5.ExportLocals=function o(e){var s=e.namedExports;_classCallCheck$g(this,o),this.type="ExportLocals",this.namedExports=s};dist$5.ExpressionStatement=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="ExpressionStatement",this.expression=s};dist$5.ForAwaitStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$g(this,o),this.type="ForAwaitStatement",this.left=s,this.right=a,this.body=c};dist$5.ForInStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$g(this,o),this.type="ForInStatement",this.left=s,this.right=a,this.body=c};dist$5.ForOfStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$g(this,o),this.type="ForOfStatement",this.left=s,this.right=a,this.body=c};dist$5.ForStatement=function o(e){var s=e.init,a=e.test,c=e.update,h=e.body;_classCallCheck$g(this,o),this.type="ForStatement",this.init=s,this.test=a,this.update=c,this.body=h};dist$5.FormalParameters=function o(e){var s=e.items,a=e.rest;_classCallCheck$g(this,o),this.type="FormalParameters",this.items=s,this.rest=a};dist$5.FunctionBody=function o(e){var s=e.directives,a=e.statements;_classCallCheck$g(this,o),this.type="FunctionBody",this.directives=s,this.statements=a};dist$5.FunctionDeclaration=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$g(this,o),this.type="FunctionDeclaration",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$5.FunctionExpression=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$g(this,o),this.type="FunctionExpression",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$5.Getter=function o(e){var s=e.name,a=e.body;_classCallCheck$g(this,o),this.type="Getter",this.name=s,this.body=a};dist$5.IdentifierExpression=function o(e){var s=e.name;_classCallCheck$g(this,o),this.type="IdentifierExpression",this.name=s};dist$5.IfStatement=function o(e){var s=e.test,a=e.consequent,c=e.alternate;_classCallCheck$g(this,o),this.type="IfStatement",this.test=s,this.consequent=a,this.alternate=c};dist$5.Import=function o(e){var s=e.defaultBinding,a=e.namedImports,c=e.moduleSpecifier;_classCallCheck$g(this,o),this.type="Import",this.defaultBinding=s,this.namedImports=a,this.moduleSpecifier=c};dist$5.ImportNamespace=function o(e){var s=e.defaultBinding,a=e.namespaceBinding,c=e.moduleSpecifier;_classCallCheck$g(this,o),this.type="ImportNamespace",this.defaultBinding=s,this.namespaceBinding=a,this.moduleSpecifier=c};dist$5.ImportSpecifier=function o(e){var s=e.name,a=e.binding;_classCallCheck$g(this,o),this.type="ImportSpecifier",this.name=s,this.binding=a};dist$5.LabeledStatement=function o(e){var s=e.label,a=e.body;_classCallCheck$g(this,o),this.type="LabeledStatement",this.label=s,this.body=a};dist$5.LiteralBooleanExpression=function o(e){var s=e.value;_classCallCheck$g(this,o),this.type="LiteralBooleanExpression",this.value=s};dist$5.LiteralInfinityExpression=function o(){_classCallCheck$g(this,o),this.type="LiteralInfinityExpression"};dist$5.LiteralNullExpression=function o(){_classCallCheck$g(this,o),this.type="LiteralNullExpression"};dist$5.LiteralNumericExpression=function o(e){var s=e.value;_classCallCheck$g(this,o),this.type="LiteralNumericExpression",this.value=s};dist$5.LiteralRegExpExpression=function o(e){var s=e.pattern,a=e.global,c=e.ignoreCase,h=e.multiLine,d=e.dotAll,g=e.unicode,_=e.sticky;_classCallCheck$g(this,o),this.type="LiteralRegExpExpression",this.pattern=s,this.global=a,this.ignoreCase=c,this.multiLine=h,this.dotAll=d,this.unicode=g,this.sticky=_};dist$5.LiteralStringExpression=function o(e){var s=e.value;_classCallCheck$g(this,o),this.type="LiteralStringExpression",this.value=s};dist$5.Method=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$g(this,o),this.type="Method",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$5.Module=function o(e){var s=e.directives,a=e.items;_classCallCheck$g(this,o),this.type="Module",this.directives=s,this.items=a};dist$5.NewExpression=function o(e){var s=e.callee,a=e.arguments;_classCallCheck$g(this,o),this.type="NewExpression",this.callee=s,this.arguments=a};dist$5.NewTargetExpression=function o(){_classCallCheck$g(this,o),this.type="NewTargetExpression"};dist$5.ObjectAssignmentTarget=function o(e){var s=e.properties,a=e.rest;_classCallCheck$g(this,o),this.type="ObjectAssignmentTarget",this.properties=s,this.rest=a};dist$5.ObjectBinding=function o(e){var s=e.properties,a=e.rest;_classCallCheck$g(this,o),this.type="ObjectBinding",this.properties=s,this.rest=a};dist$5.ObjectExpression=function o(e){var s=e.properties;_classCallCheck$g(this,o),this.type="ObjectExpression",this.properties=s};dist$5.ReturnStatement=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="ReturnStatement",this.expression=s};dist$5.Script=function o(e){var s=e.directives,a=e.statements;_classCallCheck$g(this,o),this.type="Script",this.directives=s,this.statements=a};dist$5.Setter=function o(e){var s=e.name,a=e.param,c=e.body;_classCallCheck$g(this,o),this.type="Setter",this.name=s,this.param=a,this.body=c};dist$5.ShorthandProperty=function o(e){var s=e.name;_classCallCheck$g(this,o),this.type="ShorthandProperty",this.name=s};dist$5.SpreadElement=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="SpreadElement",this.expression=s};dist$5.SpreadProperty=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="SpreadProperty",this.expression=s};dist$5.StaticMemberAssignmentTarget=function o(e){var s=e.object,a=e.property;_classCallCheck$g(this,o),this.type="StaticMemberAssignmentTarget",this.object=s,this.property=a};dist$5.StaticMemberExpression=function o(e){var s=e.object,a=e.property;_classCallCheck$g(this,o),this.type="StaticMemberExpression",this.object=s,this.property=a};dist$5.StaticPropertyName=function o(e){var s=e.value;_classCallCheck$g(this,o),this.type="StaticPropertyName",this.value=s};dist$5.Super=function o(){_classCallCheck$g(this,o),this.type="Super"};dist$5.SwitchCase=function o(e){var s=e.test,a=e.consequent;_classCallCheck$g(this,o),this.type="SwitchCase",this.test=s,this.consequent=a};dist$5.SwitchDefault=function o(e){var s=e.consequent;_classCallCheck$g(this,o),this.type="SwitchDefault",this.consequent=s};dist$5.SwitchStatement=function o(e){var s=e.discriminant,a=e.cases;_classCallCheck$g(this,o),this.type="SwitchStatement",this.discriminant=s,this.cases=a};dist$5.SwitchStatementWithDefault=function o(e){var s=e.discriminant,a=e.preDefaultCases,c=e.defaultCase,h=e.postDefaultCases;_classCallCheck$g(this,o),this.type="SwitchStatementWithDefault",this.discriminant=s,this.preDefaultCases=a,this.defaultCase=c,this.postDefaultCases=h};dist$5.TemplateElement=function o(e){var s=e.rawValue;_classCallCheck$g(this,o),this.type="TemplateElement",this.rawValue=s};dist$5.TemplateExpression=function o(e){var s=e.tag,a=e.elements;_classCallCheck$g(this,o),this.type="TemplateExpression",this.tag=s,this.elements=a};dist$5.ThisExpression=function o(){_classCallCheck$g(this,o),this.type="ThisExpression"};dist$5.ThrowStatement=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="ThrowStatement",this.expression=s};dist$5.TryCatchStatement=function o(e){var s=e.body,a=e.catchClause;_classCallCheck$g(this,o),this.type="TryCatchStatement",this.body=s,this.catchClause=a};dist$5.TryFinallyStatement=function o(e){var s=e.body,a=e.catchClause,c=e.finalizer;_classCallCheck$g(this,o),this.type="TryFinallyStatement",this.body=s,this.catchClause=a,this.finalizer=c};dist$5.UnaryExpression=function o(e){var s=e.operator,a=e.operand;_classCallCheck$g(this,o),this.type="UnaryExpression",this.operator=s,this.operand=a};dist$5.UpdateExpression=function o(e){var s=e.isPrefix,a=e.operator,c=e.operand;_classCallCheck$g(this,o),this.type="UpdateExpression",this.isPrefix=s,this.operator=a,this.operand=c};dist$5.VariableDeclaration=function o(e){var s=e.kind,a=e.declarators;_classCallCheck$g(this,o),this.type="VariableDeclaration",this.kind=s,this.declarators=a};dist$5.VariableDeclarationStatement=function o(e){var s=e.declaration;_classCallCheck$g(this,o),this.type="VariableDeclarationStatement",this.declaration=s};dist$5.VariableDeclarator=function o(e){var s=e.binding,a=e.init;_classCallCheck$g(this,o),this.type="VariableDeclarator",this.binding=s,this.init=a};dist$5.WhileStatement=function o(e){var s=e.test,a=e.body;_classCallCheck$g(this,o),this.type="WhileStatement",this.test=s,this.body=a};dist$5.WithStatement=function o(e){var s=e.object,a=e.body;_classCallCheck$g(this,o),this.type="WithStatement",this.object=s,this.body=a};dist$5.YieldExpression=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="YieldExpression",this.expression=s};dist$5.YieldGeneratorExpression=function o(e){var s=e.expression;_classCallCheck$g(this,o),this.type="YieldGeneratorExpression",this.expression=s};Object.defineProperty(parser$1,"__esModule",{value:!0});parser$1.GenericParser=void 0;var _createClass$c=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_errors$1=errors,_shiftRegexpAcceptor=dist$6,_shiftRegexpAcceptor2=_interopRequireDefault$8(_shiftRegexpAcceptor),_tokenizer=tokenizer,_tokenizer2=_interopRequireDefault$8(_tokenizer),_shiftAst$6=dist$5,AST=_interopRequireWildcard$4(_shiftAst$6);function _interopRequireWildcard$4(o){if(o&&o.__esModule)return o;var e={};if(o!=null)for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e.default=o,e}function _interopRequireDefault$8(o){return o&&o.__esModule?o:{default:o}}function _classCallCheck$f(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$7(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits$7(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}var ARROW_EXPRESSION_PARAMS="CoverParenthesizedExpressionAndArrowParameterList",EXPORT_UNKNOWN_SPECIFIER="ExportNameOfUnknownType",Precedence$1={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Unary:13,Postfix:14,Call:15,New:16,TaggedTemplate:17,Member:18,Primary:19},BinaryPrecedence$1={"||":Precedence$1.LogicalOR,"&&":Precedence$1.LogicalAND,"|":Precedence$1.BitwiseOR,"^":Precedence$1.BitwiseXOR,"&":Precedence$1.BitwiseAND,"==":Precedence$1.Equality,"!=":Precedence$1.Equality,"===":Precedence$1.Equality,"!==":Precedence$1.Equality,"<":Precedence$1.Relational,">":Precedence$1.Relational,"<=":Precedence$1.Relational,">=":Precedence$1.Relational,in:Precedence$1.Relational,instanceof:Precedence$1.Relational,"<<":Precedence$1.BitwiseSHIFT,">>":Precedence$1.BitwiseSHIFT,">>>":Precedence$1.BitwiseSHIFT,"+":Precedence$1.Additive,"-":Precedence$1.Additive,"*":Precedence$1.Multiplicative,"%":Precedence$1.Multiplicative,"/":Precedence$1.Multiplicative};function isValidSimpleAssignmentTarget(o){if(o==null)return!1;switch(o.type){case"IdentifierExpression":case"ComputedMemberExpression":case"StaticMemberExpression":return!0}return!1}function isPrefixOperator(o){switch(o.type){case _tokenizer.TokenType.INC:case _tokenizer.TokenType.DEC:case _tokenizer.TokenType.ADD:case _tokenizer.TokenType.SUB:case _tokenizer.TokenType.BIT_NOT:case _tokenizer.TokenType.NOT:case _tokenizer.TokenType.DELETE:case _tokenizer.TokenType.VOID:case _tokenizer.TokenType.TYPEOF:return!0}return!1}function isUpdateOperator(o){return o.type===_tokenizer.TokenType.INC||o.type===_tokenizer.TokenType.DEC}parser$1.GenericParser=function(o){_inherits$7(e,o);function e(s){_classCallCheck$f(this,e);var a=_possibleConstructorReturn$7(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,s));return a.allowIn=!0,a.inFunctionBody=!1,a.inParameter=!1,a.allowYieldExpression=!1,a.allowAwaitExpression=!1,a.firstAwaitLocation=null,a.module=!1,a.moduleIsTheGoalSymbol=!1,a.strict=!1,a.isBindingElement=!0,a.isAssignmentTarget=!0,a.firstExprError=null,a}return _createClass$c(e,[{key:"match",value:function(a){return this.lookahead.type===a}},{key:"matchIdentifier",value:function(){switch(this.lookahead.type){case _tokenizer.TokenType.IDENTIFIER:case _tokenizer.TokenType.LET:case _tokenizer.TokenType.YIELD:case _tokenizer.TokenType.ASYNC:return!0;case _tokenizer.TokenType.AWAIT:return this.moduleIsTheGoalSymbol?!1:(this.firstAwaitLocation===null&&(this.firstAwaitLocation=this.getLocation()),!0);case _tokenizer.TokenType.ESCAPED_KEYWORD:return this.lookahead.value==="await"&&!this.moduleIsTheGoalSymbol?(this.firstAwaitLocation===null&&(this.firstAwaitLocation=this.getLocation()),!0):this.lookahead.value==="let"||this.lookahead.value==="yield"||this.lookahead.value==="async"}return!1}},{key:"eat",value:function(a){return this.lookahead.type===a?this.lex():null}},{key:"expect",value:function(a){if(this.lookahead.type===a)return this.lex();throw this.createUnexpected(this.lookahead)}},{key:"matchContextualKeyword",value:function(a){return this.lookahead.type===_tokenizer.TokenType.IDENTIFIER&&!this.lookahead.escaped&&this.lookahead.value===a}},{key:"expectContextualKeyword",value:function(a){if(this.lookahead.type===_tokenizer.TokenType.IDENTIFIER&&!this.lookahead.escaped&&this.lookahead.value===a)return this.lex();throw this.createUnexpected(this.lookahead)}},{key:"eatContextualKeyword",value:function(a){return this.lookahead.type===_tokenizer.TokenType.IDENTIFIER&&!this.lookahead.escaped&&this.lookahead.value===a?this.lex():null}},{key:"consumeSemicolon",value:function(){if(!this.eat(_tokenizer.TokenType.SEMICOLON)&&!this.hasLineTerminatorBeforeNext&&!this.eof()&&!this.match(_tokenizer.TokenType.RBRACE))throw this.createUnexpected(this.lookahead)}},{key:"startNode",value:function(a){return a}},{key:"copyNode",value:function(a,c){return c}},{key:"finishNode",value:function(a){return a}},{key:"parseModule",value:function(){this.moduleIsTheGoalSymbol=this.module=this.strict=!0,this.lookahead=this.advance();var a=this.startNode(),c=this.parseBody(),h=c.directives,d=c.statements;if(!this.match(_tokenizer.TokenType.EOS))throw this.createUnexpected(this.lookahead);return this.finishNode(new AST.Module({directives:h,items:d}),a)}},{key:"parseScript",value:function(){this.lookahead=this.advance();var a=this.startNode(),c=this.parseBody(),h=c.directives,d=c.statements;if(!this.match(_tokenizer.TokenType.EOS))throw this.createUnexpected(this.lookahead);return this.finishNode(new AST.Script({directives:h,statements:d}),a)}},{key:"parseFunctionBody",value:function(){var a=this.inFunctionBody,c=this.module,h=this.strict;this.inFunctionBody=!0,this.module=!1;var d=this.startNode();this.expect(_tokenizer.TokenType.LBRACE);var g=new AST.FunctionBody(this.parseBody());return this.expect(_tokenizer.TokenType.RBRACE),g=this.finishNode(g,d),this.inFunctionBody=a,this.module=c,this.strict=h,g}},{key:"parseBody",value:function(){for(var a=[],c=[],h=!0,d=null;!(this.eof()||this.match(_tokenizer.TokenType.RBRACE));){var g=this.lookahead,_=g.slice.text,b=g.type===_tokenizer.TokenType.STRING,$=this.module,j=this.getLocation(),_e=this.startNode(),et=$?this.parseModuleItem():this.parseStatementListItem();if(h)if(b&&et.type==="ExpressionStatement"&&et.expression.type==="LiteralStringExpression"){!d&&g.octal&&(d=this.createErrorWithLocation(j,"Unexpected legacy octal escape sequence: \\"+g.octal));var tt=_.slice(1,-1);tt==="use strict"&&(this.strict=!0),a.push(this.finishNode(new AST.Directive({rawValue:tt}),_e))}else{if(h=!1,d&&this.strict)throw d;c.push(et)}else c.push(et)}if(d&&this.strict)throw d;return{directives:a,statements:c}}},{key:"parseImportSpecifier",value:function(){var a=this.startNode(),c=void 0;if(this.matchIdentifier()){if(c=this.parseIdentifier(),!this.eatContextualKeyword("as"))return this.finishNode(new AST.ImportSpecifier({name:null,binding:this.finishNode(new AST.BindingIdentifier({name:c}),a)}),a)}else this.lookahead.type.klass.isIdentifierName&&(c=this.parseIdentifierName(),this.expectContextualKeyword("as"));return this.finishNode(new AST.ImportSpecifier({name:c,binding:this.parseBindingIdentifier()}),a)}},{key:"parseNameSpaceBinding",value:function(){return this.expect(_tokenizer.TokenType.MUL),this.expectContextualKeyword("as"),this.parseBindingIdentifier()}},{key:"parseNamedImports",value:function(){var a=[];for(this.expect(_tokenizer.TokenType.LBRACE);!this.eat(_tokenizer.TokenType.RBRACE);)if(a.push(this.parseImportSpecifier()),!this.eat(_tokenizer.TokenType.COMMA)){this.expect(_tokenizer.TokenType.RBRACE);break}return a}},{key:"parseFromClause",value:function(){this.expectContextualKeyword("from");var a=this.expect(_tokenizer.TokenType.STRING).str;return a}},{key:"parseImportDeclaration",value:function(){var a=this.startNode(),c=null,h=void 0;if(this.expect(_tokenizer.TokenType.IMPORT),this.match(_tokenizer.TokenType.STRING))return h=this.lex().str,this.consumeSemicolon(),this.finishNode(new AST.Import({defaultBinding:null,namedImports:[],moduleSpecifier:h}),a);if(this.matchIdentifier()&&(c=this.parseBindingIdentifier(),!this.eat(_tokenizer.TokenType.COMMA))){var d=new AST.Import({defaultBinding:c,namedImports:[],moduleSpecifier:this.parseFromClause()});return this.consumeSemicolon(),this.finishNode(d,a)}if(this.match(_tokenizer.TokenType.MUL)){var g=new AST.ImportNamespace({defaultBinding:c,namespaceBinding:this.parseNameSpaceBinding(),moduleSpecifier:this.parseFromClause()});return this.consumeSemicolon(),this.finishNode(g,a)}else if(this.match(_tokenizer.TokenType.LBRACE)){var _=new AST.Import({defaultBinding:c,namedImports:this.parseNamedImports(),moduleSpecifier:this.parseFromClause()});return this.consumeSemicolon(),this.finishNode(_,a)}throw this.createUnexpected(this.lookahead)}},{key:"parseExportSpecifier",value:function(){var a=this.startNode(),c=this.finishNode({type:EXPORT_UNKNOWN_SPECIFIER,isIdentifier:this.matchIdentifier(),value:this.parseIdentifierName()},a);if(this.eatContextualKeyword("as")){var h=this.parseIdentifierName();return this.finishNode({name:c,exportedName:h},a)}return this.finishNode({name:c,exportedName:null},a)}},{key:"parseExportClause",value:function(){this.expect(_tokenizer.TokenType.LBRACE);for(var a=[];!this.eat(_tokenizer.TokenType.RBRACE);)if(a.push(this.parseExportSpecifier()),!this.eat(_tokenizer.TokenType.COMMA)){this.expect(_tokenizer.TokenType.RBRACE);break}return a}},{key:"parseExportDeclaration",value:function(){var a=this,c=this.startNode(),h=void 0;switch(this.expect(_tokenizer.TokenType.EXPORT),this.lookahead.type){case _tokenizer.TokenType.MUL:this.lex(),h=new AST.ExportAllFrom({moduleSpecifier:this.parseFromClause()}),this.consumeSemicolon();break;case _tokenizer.TokenType.LBRACE:{var d=this.parseExportClause(),g=null;this.matchContextualKeyword("from")?(g=this.parseFromClause(),h=new AST.ExportFrom({namedExports:d.map(function(j){return a.copyNode(j,new AST.ExportFromSpecifier({name:j.name.value,exportedName:j.exportedName}))}),moduleSpecifier:g})):(d.forEach(function(j){var _e=j.name;if(!_e.isIdentifier)throw a.createError(_errors$1.ErrorMessages.ILLEGAL_EXPORTED_NAME)}),h=new AST.ExportLocals({namedExports:d.map(function(j){return a.copyNode(j,new AST.ExportLocalSpecifier({name:a.copyNode(j.name,new AST.IdentifierExpression({name:j.name.value})),exportedName:j.exportedName}))})})),this.consumeSemicolon();break}case _tokenizer.TokenType.CLASS:h=new AST.Export({declaration:this.parseClass({isExpr:!1,inDefault:!1})});break;case _tokenizer.TokenType.FUNCTION:h=new AST.Export({declaration:this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!0,isAsync:!1})});break;case _tokenizer.TokenType.ASYNC:{var _=this.startNode();this.lex(),h=new AST.Export({declaration:this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!0,isAsync:!0,startState:_})});break}case _tokenizer.TokenType.DEFAULT:switch(this.lex(),this.lookahead.type){case _tokenizer.TokenType.FUNCTION:h=new AST.ExportDefault({body:this.parseFunction({isExpr:!1,inDefault:!0,allowGenerator:!0,isAsync:!1})});break;case _tokenizer.TokenType.CLASS:h=new AST.ExportDefault({body:this.parseClass({isExpr:!1,inDefault:!0})});break;case _tokenizer.TokenType.ASYNC:{var b=this.startNode(),$=this.saveLexerState();if(this.lex(),!this.hasLineTerminatorBeforeNext&&this.match(_tokenizer.TokenType.FUNCTION)){h=new AST.ExportDefault({body:this.parseFunction({isExpr:!1,inDefault:!0,allowGenerator:!1,isAsync:!0,startState:b})});break}this.restoreLexerState($)}default:h=new AST.ExportDefault({body:this.parseAssignmentExpression()}),this.consumeSemicolon();break}break;case _tokenizer.TokenType.VAR:case _tokenizer.TokenType.LET:case _tokenizer.TokenType.CONST:h=new AST.Export({declaration:this.parseVariableDeclaration(!0)}),this.consumeSemicolon();break;default:throw this.createUnexpected(this.lookahead)}return this.finishNode(h,c)}},{key:"parseModuleItem",value:function(){switch(this.lookahead.type){case _tokenizer.TokenType.IMPORT:return this.parseImportDeclaration();case _tokenizer.TokenType.EXPORT:return this.parseExportDeclaration();default:return this.parseStatementListItem()}}},{key:"lookaheadLexicalDeclaration",value:function(){if(this.match(_tokenizer.TokenType.LET)||this.match(_tokenizer.TokenType.CONST)){var a=this.saveLexerState();if(this.lex(),this.matchIdentifier()||this.match(_tokenizer.TokenType.LBRACE)||this.match(_tokenizer.TokenType.LBRACK))return this.restoreLexerState(a),!0;this.restoreLexerState(a)}return!1}},{key:"parseStatementListItem",value:function(){if(this.eof())throw this.createUnexpected(this.lookahead);switch(this.lookahead.type){case _tokenizer.TokenType.FUNCTION:return this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!0,isAsync:!1});case _tokenizer.TokenType.CLASS:return this.parseClass({isExpr:!1,inDefault:!1});case _tokenizer.TokenType.ASYNC:{var a=this.getLocation(),c=this.saveLexerState();return this.lex(),!this.hasLineTerminatorBeforeNext&&this.match(_tokenizer.TokenType.FUNCTION)?this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!0,isAsync:!0,startState:a}):(this.restoreLexerState(c),this.parseStatement())}default:if(this.lookaheadLexicalDeclaration()){var h=this.startNode();return this.finishNode(this.parseVariableDeclarationStatement(),h)}return this.parseStatement()}}},{key:"parseStatement",value:function(){var a=this.startNode(),c=this.isolateCoverGrammar(this.parseStatementHelper);return this.finishNode(c,a)}},{key:"parseStatementHelper",value:function(){if(this.eof())throw this.createUnexpected(this.lookahead);switch(this.lookahead.type){case _tokenizer.TokenType.SEMICOLON:return this.parseEmptyStatement();case _tokenizer.TokenType.LBRACE:return this.parseBlockStatement();case _tokenizer.TokenType.LPAREN:return this.parseExpressionStatement();case _tokenizer.TokenType.BREAK:return this.parseBreakStatement();case _tokenizer.TokenType.CONTINUE:return this.parseContinueStatement();case _tokenizer.TokenType.DEBUGGER:return this.parseDebuggerStatement();case _tokenizer.TokenType.DO:return this.parseDoWhileStatement();case _tokenizer.TokenType.FOR:return this.parseForStatement();case _tokenizer.TokenType.IF:return this.parseIfStatement();case _tokenizer.TokenType.RETURN:return this.parseReturnStatement();case _tokenizer.TokenType.SWITCH:return this.parseSwitchStatement();case _tokenizer.TokenType.THROW:return this.parseThrowStatement();case _tokenizer.TokenType.TRY:return this.parseTryStatement();case _tokenizer.TokenType.VAR:return this.parseVariableDeclarationStatement();case _tokenizer.TokenType.WHILE:return this.parseWhileStatement();case _tokenizer.TokenType.WITH:return this.parseWithStatement();case _tokenizer.TokenType.FUNCTION:case _tokenizer.TokenType.CLASS:throw this.createUnexpected(this.lookahead);default:{var a=this.saveLexerState();if(this.eat(_tokenizer.TokenType.LET)){if(this.match(_tokenizer.TokenType.LBRACK))throw this.restoreLexerState(a),this.createUnexpected(this.lookahead);this.restoreLexerState(a)}else if(this.eat(_tokenizer.TokenType.ASYNC)){if(!this.hasLineTerminatorBeforeNext&&this.match(_tokenizer.TokenType.FUNCTION))throw this.createUnexpected(this.lookahead);this.restoreLexerState(a)}var c=this.parseExpression();if(c.type==="IdentifierExpression"&&this.eat(_tokenizer.TokenType.COLON)){var h=this.match(_tokenizer.TokenType.FUNCTION)?this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!1,isAsync:!1}):this.parseStatement();return new AST.LabeledStatement({label:c.name,body:h})}return this.consumeSemicolon(),new AST.ExpressionStatement({expression:c})}}}},{key:"parseEmptyStatement",value:function(){return this.lex(),new AST.EmptyStatement}},{key:"parseBlockStatement",value:function(){return new AST.BlockStatement({block:this.parseBlock()})}},{key:"parseExpressionStatement",value:function(){var a=this.parseExpression();return this.consumeSemicolon(),new AST.ExpressionStatement({expression:a})}},{key:"parseBreakStatement",value:function(){if(this.lex(),this.eat(_tokenizer.TokenType.SEMICOLON)||this.hasLineTerminatorBeforeNext)return new AST.BreakStatement({label:null});var a=null;return this.matchIdentifier()&&(a=this.parseIdentifier()),this.consumeSemicolon(),new AST.BreakStatement({label:a})}},{key:"parseContinueStatement",value:function(){if(this.lex(),this.eat(_tokenizer.TokenType.SEMICOLON)||this.hasLineTerminatorBeforeNext)return new AST.ContinueStatement({label:null});var a=null;return this.matchIdentifier()&&(a=this.parseIdentifier()),this.consumeSemicolon(),new AST.ContinueStatement({label:a})}},{key:"parseDebuggerStatement",value:function(){return this.lex(),this.consumeSemicolon(),new AST.DebuggerStatement}},{key:"parseDoWhileStatement",value:function(){this.lex();var a=this.parseStatement();this.expect(_tokenizer.TokenType.WHILE),this.expect(_tokenizer.TokenType.LPAREN);var c=this.parseExpression();return this.expect(_tokenizer.TokenType.RPAREN),this.eat(_tokenizer.TokenType.SEMICOLON),new AST.DoWhileStatement({body:a,test:c})}},{key:"parseForStatement",value:function(){this.lex();var a=this.allowAwaitExpression&&this.eat(_tokenizer.TokenType.AWAIT);this.expect(_tokenizer.TokenType.LPAREN);var c=null,h=null;if(a&&this.match(_tokenizer.TokenType.SEMICOLON))throw this.createUnexpected(this.lookahead);if(this.eat(_tokenizer.TokenType.SEMICOLON))return this.match(_tokenizer.TokenType.SEMICOLON)||(c=this.parseExpression()),this.expect(_tokenizer.TokenType.SEMICOLON),this.match(_tokenizer.TokenType.RPAREN)||(h=this.parseExpression()),new AST.ForStatement({init:null,test:c,update:h,body:this.getIteratorStatementEpilogue()});var d=this.match(_tokenizer.TokenType.LET),g=this.lookaheadLexicalDeclaration(),_=this.startNode();if(this.match(_tokenizer.TokenType.VAR)||g){var b=this.allowIn;this.allowIn=!1;var $=this.parseVariableDeclaration(!1);if(this.allowIn=b,$.declarators.length===1&&(this.match(_tokenizer.TokenType.IN)||this.matchContextualKeyword("of"))){var j=void 0,_e=$.declarators[0];if(this.match(_tokenizer.TokenType.IN)){if(a)throw this.createUnexpected(this.lookahead);if(_e.init!==null&&(this.strict||$.kind!=="var"||_e.binding.type!=="BindingIdentifier"))throw this.createError(_errors$1.ErrorMessages.INVALID_VAR_INIT_FOR_IN);j=AST.ForInStatement,this.lex(),h=this.parseExpression()}else{if(_e.init!==null)throw this.createError(a?_errors$1.ErrorMessages.INVALID_VAR_INIT_FOR_AWAIT:_errors$1.ErrorMessages.INVALID_VAR_INIT_FOR_OF);a?j=AST.ForAwaitStatement:j=AST.ForOfStatement,this.lex(),h=this.parseAssignmentExpression()}var et=this.getIteratorStatementEpilogue();return new j({left:$,right:h,body:et})}else if(a)throw this.createUnexpected(this.lookahead);if(this.expect(_tokenizer.TokenType.SEMICOLON),$.declarators.some(function(it){return it.binding.type!=="BindingIdentifier"&&it.init===null}))throw this.createError(_errors$1.ErrorMessages.UNINITIALIZED_BINDINGPATTERN_IN_FOR_INIT);return this.match(_tokenizer.TokenType.SEMICOLON)||(c=this.parseExpression()),this.expect(_tokenizer.TokenType.SEMICOLON),this.match(_tokenizer.TokenType.RPAREN)||(h=this.parseExpression()),new AST.ForStatement({init:$,test:c,update:h,body:this.getIteratorStatementEpilogue()})}var tt=this.allowIn;this.allowIn=!1;var nt=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget);if(this.allowIn=tt,this.isAssignmentTarget&&nt.type!=="AssignmentExpression"&&(this.match(_tokenizer.TokenType.IN)||this.matchContextualKeyword("of"))){if((nt.type==="ObjectAssignmentTarget"||nt.type==="ArrayAssignmentTarget")&&(this.firstExprError=null),d&&this.matchContextualKeyword("of"))throw this.createError(a?_errors$1.ErrorMessages.INVALID_LHS_IN_FOR_AWAIT:_errors$1.ErrorMessages.INVALID_LHS_IN_FOR_OF);var st=void 0;if(this.match(_tokenizer.TokenType.IN)){if(a)throw this.createUnexpected(this.lookahead);st=AST.ForInStatement,this.lex(),h=this.parseExpression()}else a?st=AST.ForAwaitStatement:st=AST.ForOfStatement,this.lex(),h=this.parseAssignmentExpression();return new st({left:this.transformDestructuring(nt),right:h,body:this.getIteratorStatementEpilogue()})}else if(a)throw this.createError(_errors$1.ErrorMessages.INVALID_LHS_IN_FOR_AWAIT);if(this.firstExprError)throw this.firstExprError;for(;this.eat(_tokenizer.TokenType.COMMA);){var rt=this.parseAssignmentExpression();nt=this.finishNode(new AST.BinaryExpression({left:nt,operator:",",right:rt}),_)}if(this.match(_tokenizer.TokenType.IN))throw this.createError(_errors$1.ErrorMessages.INVALID_LHS_IN_FOR_IN);if(this.matchContextualKeyword("of"))throw this.createError(_errors$1.ErrorMessages.INVALID_LHS_IN_FOR_OF);return this.expect(_tokenizer.TokenType.SEMICOLON),this.match(_tokenizer.TokenType.SEMICOLON)||(c=this.parseExpression()),this.expect(_tokenizer.TokenType.SEMICOLON),this.match(_tokenizer.TokenType.RPAREN)||(h=this.parseExpression()),new AST.ForStatement({init:nt,test:c,update:h,body:this.getIteratorStatementEpilogue()})}},{key:"getIteratorStatementEpilogue",value:function(){this.expect(_tokenizer.TokenType.RPAREN);var a=this.parseStatement();return a}},{key:"parseIfStatementChild",value:function(){return this.match(_tokenizer.TokenType.FUNCTION)?this.parseFunction({isExpr:!1,inDefault:!1,allowGenerator:!1,isAsync:!1}):this.parseStatement()}},{key:"parseIfStatement",value:function(){this.lex(),this.expect(_tokenizer.TokenType.LPAREN);var a=this.parseExpression();this.expect(_tokenizer.TokenType.RPAREN);var c=this.parseIfStatementChild(),h=null;return this.eat(_tokenizer.TokenType.ELSE)&&(h=this.parseIfStatementChild()),new AST.IfStatement({test:a,consequent:c,alternate:h})}},{key:"parseReturnStatement",value:function(){if(!this.inFunctionBody)throw this.createError(_errors$1.ErrorMessages.ILLEGAL_RETURN);if(this.lex(),this.eat(_tokenizer.TokenType.SEMICOLON)||this.hasLineTerminatorBeforeNext)return new AST.ReturnStatement({expression:null});var a=null;return!this.match(_tokenizer.TokenType.RBRACE)&&!this.eof()&&(a=this.parseExpression()),this.consumeSemicolon(),new AST.ReturnStatement({expression:a})}},{key:"parseSwitchStatement",value:function(){this.lex(),this.expect(_tokenizer.TokenType.LPAREN);var a=this.parseExpression();if(this.expect(_tokenizer.TokenType.RPAREN),this.expect(_tokenizer.TokenType.LBRACE),this.eat(_tokenizer.TokenType.RBRACE))return new AST.SwitchStatement({discriminant:a,cases:[]});var c=this.parseSwitchCases();if(this.match(_tokenizer.TokenType.DEFAULT)){var h=this.parseSwitchDefault(),d=this.parseSwitchCases();if(this.match(_tokenizer.TokenType.DEFAULT))throw this.createError(_errors$1.ErrorMessages.MULTIPLE_DEFAULTS_IN_SWITCH);return this.expect(_tokenizer.TokenType.RBRACE),new AST.SwitchStatementWithDefault({discriminant:a,preDefaultCases:c,defaultCase:h,postDefaultCases:d})}return this.expect(_tokenizer.TokenType.RBRACE),new AST.SwitchStatement({discriminant:a,cases:c})}},{key:"parseSwitchCases",value:function(){for(var a=[];!(this.eof()||this.match(_tokenizer.TokenType.RBRACE)||this.match(_tokenizer.TokenType.DEFAULT));)a.push(this.parseSwitchCase());return a}},{key:"parseSwitchCase",value:function(){var a=this.startNode();return this.expect(_tokenizer.TokenType.CASE),this.finishNode(new AST.SwitchCase({test:this.parseExpression(),consequent:this.parseSwitchCaseBody()}),a)}},{key:"parseSwitchDefault",value:function(){var a=this.startNode();return this.expect(_tokenizer.TokenType.DEFAULT),this.finishNode(new AST.SwitchDefault({consequent:this.parseSwitchCaseBody()}),a)}},{key:"parseSwitchCaseBody",value:function(){return this.expect(_tokenizer.TokenType.COLON),this.parseStatementListInSwitchCaseBody()}},{key:"parseStatementListInSwitchCaseBody",value:function(){for(var a=[];!(this.eof()||this.match(_tokenizer.TokenType.RBRACE)||this.match(_tokenizer.TokenType.DEFAULT)||this.match(_tokenizer.TokenType.CASE));)a.push(this.parseStatementListItem());return a}},{key:"parseThrowStatement",value:function(){var a=this.lex();if(this.hasLineTerminatorBeforeNext)throw this.createErrorWithLocation(a,_errors$1.ErrorMessages.NEWLINE_AFTER_THROW);var c=this.parseExpression();return this.consumeSemicolon(),new AST.ThrowStatement({expression:c})}},{key:"parseTryStatement",value:function(){this.lex();var a=this.parseBlock();if(this.match(_tokenizer.TokenType.CATCH)){var c=this.parseCatchClause();if(this.eat(_tokenizer.TokenType.FINALLY)){var h=this.parseBlock();return new AST.TryFinallyStatement({body:a,catchClause:c,finalizer:h})}return new AST.TryCatchStatement({body:a,catchClause:c})}if(this.eat(_tokenizer.TokenType.FINALLY)){var d=this.parseBlock();return new AST.TryFinallyStatement({body:a,catchClause:null,finalizer:d})}throw this.createError(_errors$1.ErrorMessages.NO_CATCH_OR_FINALLY)}},{key:"parseVariableDeclarationStatement",value:function(){var a=this.parseVariableDeclaration(!0);return this.consumeSemicolon(),new AST.VariableDeclarationStatement({declaration:a})}},{key:"parseWhileStatement",value:function(){this.lex(),this.expect(_tokenizer.TokenType.LPAREN);var a=this.parseExpression(),c=this.getIteratorStatementEpilogue();return new AST.WhileStatement({test:a,body:c})}},{key:"parseWithStatement",value:function(){this.lex(),this.expect(_tokenizer.TokenType.LPAREN);var a=this.parseExpression();this.expect(_tokenizer.TokenType.RPAREN);var c=this.parseStatement();return new AST.WithStatement({object:a,body:c})}},{key:"parseCatchClause",value:function(){var a=this.startNode();if(this.lex(),this.expect(_tokenizer.TokenType.LPAREN),this.match(_tokenizer.TokenType.RPAREN)||this.match(_tokenizer.TokenType.LPAREN))throw this.createUnexpected(this.lookahead);var c=this.parseBindingTarget();this.expect(_tokenizer.TokenType.RPAREN);var h=this.parseBlock();return this.finishNode(new AST.CatchClause({binding:c,body:h}),a)}},{key:"parseBlock",value:function(){var a=this.startNode();this.expect(_tokenizer.TokenType.LBRACE);for(var c=[];!this.match(_tokenizer.TokenType.RBRACE);)c.push(this.parseStatementListItem());return this.expect(_tokenizer.TokenType.RBRACE),this.finishNode(new AST.Block({statements:c}),a)}},{key:"parseVariableDeclaration",value:function(a){var c=this.startNode(),h=this.lex(),d=h.type===_tokenizer.TokenType.VAR?"var":h.type===_tokenizer.TokenType.CONST?"const":"let",g=this.parseVariableDeclaratorList(a);return this.finishNode(new AST.VariableDeclaration({kind:d,declarators:g}),c)}},{key:"parseVariableDeclaratorList",value:function(a){var c=[];do c.push(this.parseVariableDeclarator(a));while(this.eat(_tokenizer.TokenType.COMMA));return c}},{key:"parseVariableDeclarator",value:function(a){var c=this.startNode();if(this.match(_tokenizer.TokenType.LPAREN))throw this.createUnexpected(this.lookahead);var h=this.allowIn;this.allowIn=!0;var d=this.parseBindingTarget();this.allowIn=h,a&&d.type!=="BindingIdentifier"&&!this.match(_tokenizer.TokenType.ASSIGN)&&this.expect(_tokenizer.TokenType.ASSIGN);var g=null;return this.eat(_tokenizer.TokenType.ASSIGN)&&(g=this.parseAssignmentExpression()),this.finishNode(new AST.VariableDeclarator({binding:d,init:g}),c)}},{key:"isolateCoverGrammar",value:function(a){var c=this.isBindingElement,h=this.isAssignmentTarget,d=this.firstExprError,g=void 0;if(this.isBindingElement=this.isAssignmentTarget=!0,this.firstExprError=null,g=a.call(this),this.firstExprError!==null)throw this.firstExprError;return this.isBindingElement=c,this.isAssignmentTarget=h,this.firstExprError=d,g}},{key:"inheritCoverGrammar",value:function(a){var c=this.isBindingElement,h=this.isAssignmentTarget,d=this.firstExprError,g=void 0;return this.isBindingElement=this.isAssignmentTarget=!0,this.firstExprError=null,g=a.call(this),this.isBindingElement=this.isBindingElement&&c,this.isAssignmentTarget=this.isAssignmentTarget&&h,this.firstExprError=d||this.firstExprError,g}},{key:"parseExpression",value:function(){var a=this.startNode(),c=this.parseAssignmentExpression();if(this.match(_tokenizer.TokenType.COMMA))for(;!this.eof()&&this.match(_tokenizer.TokenType.COMMA);){this.lex();var h=this.parseAssignmentExpression();c=this.finishNode(new AST.BinaryExpression({left:c,operator:",",right:h}),a)}return c}},{key:"finishArrowParams",value:function(a){var c=a.params,h=c===void 0?null:c,d=a.rest,g=d===void 0?null:d;if(a.type!==ARROW_EXPRESSION_PARAMS)if(a.type==="IdentifierExpression")h=[this.targetToBinding(this.transformDestructuring(a))];else throw this.createUnexpected(this.lookahead);return this.copyNode(a,new AST.FormalParameters({items:h,rest:g}))}},{key:"parseArrowExpressionTail",value:function(a,c,h){this.expect(_tokenizer.TokenType.ARROW);var d=this.allowYieldExpression,g=this.allowAwaitExpression,_=this.firstAwaitLocation;this.allowYieldExpression=!1,this.allowAwaitExpression=c,this.firstAwaitLocation=null;var b=void 0;if(this.match(_tokenizer.TokenType.LBRACE)){var $=this.allowIn;this.allowIn=!0,b=this.parseFunctionBody(),this.allowIn=$}else b=this.parseAssignmentExpression();return this.allowYieldExpression=d,this.allowAwaitExpression=g,this.firstAwaitLocation=_,this.finishNode(new AST.ArrowExpression({isAsync:c,params:a,body:b}),h)}},{key:"parseAssignmentExpression",value:function(){return this.isolateCoverGrammar(this.parseAssignmentExpressionOrTarget)}},{key:"parseAssignmentExpressionOrTarget",value:function(){var a=this.startNode();if(this.allowYieldExpression&&this.match(_tokenizer.TokenType.YIELD))return this.isBindingElement=this.isAssignmentTarget=!1,this.parseYieldExpression();var c=this.parseConditionalExpression();if(!this.hasLineTerminatorBeforeNext&&this.match(_tokenizer.TokenType.ARROW)){this.isBindingElement=this.isAssignmentTarget=!1,this.firstExprError=null;var h=c.type===ARROW_EXPRESSION_PARAMS&&c.isAsync;return this.parseArrowExpressionTail(this.finishArrowParams(c),h,a)}var d=!1,g=this.lookahead;switch(g.type){case _tokenizer.TokenType.ASSIGN_BIT_OR:case _tokenizer.TokenType.ASSIGN_BIT_XOR:case _tokenizer.TokenType.ASSIGN_BIT_AND:case _tokenizer.TokenType.ASSIGN_SHL:case _tokenizer.TokenType.ASSIGN_SHR:case _tokenizer.TokenType.ASSIGN_SHR_UNSIGNED:case _tokenizer.TokenType.ASSIGN_ADD:case _tokenizer.TokenType.ASSIGN_SUB:case _tokenizer.TokenType.ASSIGN_MUL:case _tokenizer.TokenType.ASSIGN_DIV:case _tokenizer.TokenType.ASSIGN_MOD:case _tokenizer.TokenType.ASSIGN_EXP:d=!0;break}if(d){if(!this.isAssignmentTarget||!isValidSimpleAssignmentTarget(c))throw this.createError(_errors$1.ErrorMessages.INVALID_LHS_IN_ASSIGNMENT);c=this.transformDestructuring(c)}else if(g.type===_tokenizer.TokenType.ASSIGN){if(!this.isAssignmentTarget)throw this.createError(_errors$1.ErrorMessages.INVALID_LHS_IN_ASSIGNMENT);c=this.transformDestructuring(c)}else return c;this.lex();var _=this.parseAssignmentExpression();this.firstExprError=null;var b=void 0;return g.type===_tokenizer.TokenType.ASSIGN?b=new AST.AssignmentExpression({binding:c,expression:_}):(b=new AST.CompoundAssignmentExpression({binding:c,operator:g.type.name,expression:_}),this.isBindingElement=this.isAssignmentTarget=!1),this.finishNode(b,a)}},{key:"targetToBinding",value:function(a){var c=this;if(a===null)return null;switch(a.type){case"AssignmentTargetIdentifier":return this.copyNode(a,new AST.BindingIdentifier({name:a.name}));case"ArrayAssignmentTarget":return this.copyNode(a,new AST.ArrayBinding({elements:a.elements.map(function(h){return c.targetToBinding(h)}),rest:this.targetToBinding(a.rest)}));case"ObjectAssignmentTarget":return this.copyNode(a,new AST.ObjectBinding({properties:a.properties.map(function(h){return c.targetToBinding(h)}),rest:this.targetToBinding(a.rest)}));case"AssignmentTargetPropertyIdentifier":return this.copyNode(a,new AST.BindingPropertyIdentifier({binding:this.targetToBinding(a.binding),init:a.init}));case"AssignmentTargetPropertyProperty":return this.copyNode(a,new AST.BindingPropertyProperty({name:a.name,binding:this.targetToBinding(a.binding)}));case"AssignmentTargetWithDefault":return this.copyNode(a,new AST.BindingWithDefault({binding:this.targetToBinding(a.binding),init:a.init}))}throw new Error("Not reached")}},{key:"transformDestructuring",value:function(a){var c=this;switch(a.type){case"DataProperty":return this.copyNode(a,new AST.AssignmentTargetPropertyProperty({name:a.name,binding:this.transformDestructuringWithDefault(a.expression)}));case"ShorthandProperty":return this.copyNode(a,new AST.AssignmentTargetPropertyIdentifier({binding:this.copyNode(a,new AST.AssignmentTargetIdentifier({name:a.name.name})),init:null}));case"ObjectExpression":{var h=a.properties.length>0?a.properties[a.properties.length-1]:void 0;return h!=null&&h.type==="SpreadProperty"?this.copyNode(a,new AST.ObjectAssignmentTarget({properties:a.properties.slice(0,-1).map(function(g){return g&&c.transformDestructuringWithDefault(g)}),rest:this.transformDestructuring(h.expression)})):this.copyNode(a,new AST.ObjectAssignmentTarget({properties:a.properties.map(function(g){return g&&c.transformDestructuringWithDefault(g)}),rest:null}))}case"ArrayExpression":{var d=a.elements[a.elements.length-1];return d!=null&&d.type==="SpreadElement"?this.copyNode(a,new AST.ArrayAssignmentTarget({elements:a.elements.slice(0,-1).map(function(g){return g&&c.transformDestructuringWithDefault(g)}),rest:this.copyNode(d.expression,this.transformDestructuring(d.expression))})):this.copyNode(a,new AST.ArrayAssignmentTarget({elements:a.elements.map(function(g){return g&&c.transformDestructuringWithDefault(g)}),rest:null}))}case"IdentifierExpression":return this.copyNode(a,new AST.AssignmentTargetIdentifier({name:a.name}));case"StaticPropertyName":return this.copyNode(a,new AST.AssignmentTargetIdentifier({name:a.value}));case"ComputedMemberExpression":return this.copyNode(a,new AST.ComputedMemberAssignmentTarget({object:a.object,expression:a.expression}));case"StaticMemberExpression":return this.copyNode(a,new AST.StaticMemberAssignmentTarget({object:a.object,property:a.property}));case"ArrayAssignmentTarget":case"ObjectAssignmentTarget":case"ComputedMemberAssignmentTarget":case"StaticMemberAssignmentTarget":case"AssignmentTargetIdentifier":case"AssignmentTargetPropertyIdentifier":case"AssignmentTargetPropertyProperty":case"AssignmentTargetWithDefault":return a}throw new Error("Not reached")}},{key:"transformDestructuringWithDefault",value:function(a){switch(a.type){case"AssignmentExpression":return this.copyNode(a,new AST.AssignmentTargetWithDefault({binding:this.transformDestructuring(a.binding),init:a.expression}))}return this.transformDestructuring(a)}},{key:"lookaheadAssignmentExpression",value:function(){if(this.matchIdentifier())return!0;switch(this.lookahead.type){case _tokenizer.TokenType.ADD:case _tokenizer.TokenType.ASSIGN_DIV:case _tokenizer.TokenType.BIT_NOT:case _tokenizer.TokenType.CLASS:case _tokenizer.TokenType.DEC:case _tokenizer.TokenType.DELETE:case _tokenizer.TokenType.DIV:case _tokenizer.TokenType.FALSE:case _tokenizer.TokenType.FUNCTION:case _tokenizer.TokenType.INC:case _tokenizer.TokenType.LBRACE:case _tokenizer.TokenType.LBRACK:case _tokenizer.TokenType.LPAREN:case _tokenizer.TokenType.NEW:case _tokenizer.TokenType.NOT:case _tokenizer.TokenType.NULL:case _tokenizer.TokenType.NUMBER:case _tokenizer.TokenType.STRING:case _tokenizer.TokenType.SUB:case _tokenizer.TokenType.SUPER:case _tokenizer.TokenType.THIS:case _tokenizer.TokenType.TRUE:case _tokenizer.TokenType.TYPEOF:case _tokenizer.TokenType.VOID:case _tokenizer.TokenType.TEMPLATE:return!0}return!1}},{key:"parseYieldExpression",value:function(){var a=this.startNode();if(this.lex(),this.hasLineTerminatorBeforeNext)return this.finishNode(new AST.YieldExpression({expression:null}),a);var c=!!this.eat(_tokenizer.TokenType.MUL),h=null;(c||this.lookaheadAssignmentExpression())&&(h=this.parseAssignmentExpression());var d=c?AST.YieldGeneratorExpression:AST.YieldExpression;return this.finishNode(new d({expression:h}),a)}},{key:"parseConditionalExpression",value:function(){var a=this.startNode(),c=this.parseBinaryExpression();if(this.firstExprError)return c;if(this.eat(_tokenizer.TokenType.CONDITIONAL)){this.isBindingElement=this.isAssignmentTarget=!1;var h=this.allowIn;this.allowIn=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);this.allowIn=h,this.expect(_tokenizer.TokenType.COLON);var g=this.isolateCoverGrammar(this.parseAssignmentExpression);return this.finishNode(new AST.ConditionalExpression({test:c,consequent:d,alternate:g}),a)}return c}},{key:"isBinaryOperator",value:function(a){switch(a){case _tokenizer.TokenType.OR:case _tokenizer.TokenType.AND:case _tokenizer.TokenType.BIT_OR:case _tokenizer.TokenType.BIT_XOR:case _tokenizer.TokenType.BIT_AND:case _tokenizer.TokenType.EQ:case _tokenizer.TokenType.NE:case _tokenizer.TokenType.EQ_STRICT:case _tokenizer.TokenType.NE_STRICT:case _tokenizer.TokenType.LT:case _tokenizer.TokenType.GT:case _tokenizer.TokenType.LTE:case _tokenizer.TokenType.GTE:case _tokenizer.TokenType.INSTANCEOF:case _tokenizer.TokenType.SHL:case _tokenizer.TokenType.SHR:case _tokenizer.TokenType.SHR_UNSIGNED:case _tokenizer.TokenType.ADD:case _tokenizer.TokenType.SUB:case _tokenizer.TokenType.MUL:case _tokenizer.TokenType.DIV:case _tokenizer.TokenType.MOD:return!0;case _tokenizer.TokenType.IN:return this.allowIn;default:return!1}}},{key:"parseBinaryExpression",value:function(){var a=this,c=this.startNode(),h=this.parseExponentiationExpression();if(this.firstExprError)return h;var d=this.lookahead.type;if(!this.isBinaryOperator(d))return h;this.isBindingElement=this.isAssignmentTarget=!1,this.lex();var g=[];g.push({startState:c,left:h,operator:d,precedence:BinaryPrecedence$1[d.name]}),c=this.startNode();var _=this.isolateCoverGrammar(this.parseExponentiationExpression);for(d=this.lookahead.type;this.isBinaryOperator(d);){for(var b=BinaryPrecedence$1[d.name];g.length&&b<=g[g.length-1].precedence;){var $=g[g.length-1],j=$.operator;h=$.left,g.pop(),c=$.startState,_=this.finishNode(new AST.BinaryExpression({left:h,operator:j.name,right:_}),c)}this.lex(),g.push({startState:c,left:_,operator:d,precedence:b}),c=this.startNode(),_=this.isolateCoverGrammar(this.parseExponentiationExpression),d=this.lookahead.type}return g.reduceRight(function(_e,et){return a.finishNode(new AST.BinaryExpression({left:et.left,operator:et.operator.name,right:_e}),et.startState)},_)}},{key:"parseExponentiationExpression",value:function(){var a=this.startNode(),c=this.lookahead.type===_tokenizer.TokenType.LPAREN,h=this.parseUnaryExpression();if(this.lookahead.type!==_tokenizer.TokenType.EXP)return h;if(h.type==="UnaryExpression"&&!c)throw this.createError(_errors$1.ErrorMessages.INVALID_EXPONENTIATION_LHS);this.lex(),this.isBindingElement=this.isAssignmentTarget=!1;var d=this.isolateCoverGrammar(this.parseExponentiationExpression);return this.finishNode(new AST.BinaryExpression({left:h,operator:"**",right:d}),a)}},{key:"parseUnaryExpression",value:function(){if(this.lookahead.type.klass!==_tokenizer.TokenClass.Punctuator&&this.lookahead.type.klass!==_tokenizer.TokenClass.Keyword)return this.parseUpdateExpression();var a=this.startNode();if(this.allowAwaitExpression&&this.eat(_tokenizer.TokenType.AWAIT)){this.isBindingElement=this.isAssignmentTarget=!1;var c=this.isolateCoverGrammar(this.parseUnaryExpression);return this.finishNode(new AST.AwaitExpression({expression:c}),a)}var h=this.lookahead;if(!isPrefixOperator(h))return this.parseUpdateExpression();this.lex(),this.isBindingElement=this.isAssignmentTarget=!1;var d=void 0;if(isUpdateOperator(h)){var g=this.getLocation(),_=this.isolateCoverGrammar(this.parseUnaryExpression);if(!isValidSimpleAssignmentTarget(_))throw this.createErrorWithLocation(g,_errors$1.ErrorMessages.INVALID_UPDATE_OPERAND);_=this.transformDestructuring(_),d=new AST.UpdateExpression({isPrefix:!0,operator:h.value,operand:_})}else{var b=this.isolateCoverGrammar(this.parseUnaryExpression);d=new AST.UnaryExpression({operator:h.value,operand:b})}return this.finishNode(d,a)}},{key:"parseUpdateExpression",value:function(){var a=this.getLocation(),c=this.startNode(),h=this.parseLeftHandSideExpression({allowCall:!0});if(this.firstExprError||this.hasLineTerminatorBeforeNext)return h;var d=this.lookahead;if(!isUpdateOperator(d))return h;if(this.lex(),this.isBindingElement=this.isAssignmentTarget=!1,!isValidSimpleAssignmentTarget(h))throw this.createErrorWithLocation(a,_errors$1.ErrorMessages.INVALID_UPDATE_OPERAND);return h=this.transformDestructuring(h),this.finishNode(new AST.UpdateExpression({isPrefix:!1,operator:d.value,operand:h}),c)}},{key:"parseLeftHandSideExpression",value:function(a){var c=this,h=a.allowCall,d=this.startNode(),g=this.allowIn;this.allowIn=!0;var _=void 0,b=this.lookahead;if(this.eat(_tokenizer.TokenType.SUPER))if(this.isBindingElement=!1,this.isAssignmentTarget=!1,_=this.finishNode(new AST.Super,d),this.match(_tokenizer.TokenType.LPAREN))if(h)_=this.finishNode(new AST.CallExpression({callee:_,arguments:this.parseArgumentList().args}),d);else throw this.createUnexpected(b);else if(this.match(_tokenizer.TokenType.LBRACK))_=this.finishNode(new AST.ComputedMemberExpression({object:_,expression:this.parseComputedMember()}),d),this.isAssignmentTarget=!0;else if(this.match(_tokenizer.TokenType.PERIOD))_=this.finishNode(new AST.StaticMemberExpression({object:_,property:this.parseStaticMember()}),d),this.isAssignmentTarget=!0;else throw this.createUnexpected(b);else if(this.match(_tokenizer.TokenType.NEW))this.isBindingElement=this.isAssignmentTarget=!1,_=this.parseNewExpression();else if(this.match(_tokenizer.TokenType.ASYNC)){if(_=this.parsePrimaryExpression(),_.type==="IdentifierExpression"&&h&&!this.hasLineTerminatorBeforeNext){if(this.matchIdentifier()){var $=this.startNode(),j=this.allowAwaitExpression;this.allowAwaitExpression=!0;var _e=this.parseBindingIdentifier();return this.allowAwaitExpression=j,this.ensureArrow(),this.finishNode({type:ARROW_EXPRESSION_PARAMS,params:[_e],rest:null,isAsync:!0},$)}if(this.match(_tokenizer.TokenType.LPAREN)){var et=this.startNode(),tt=this.firstAwaitLocation;this.firstAwaitLocation=null;var nt=this.parseArgumentList(),st=nt.args,rt=nt.locationFollowingFirstSpread;if(this.isBindingElement&&!this.hasLineTerminatorBeforeNext&&this.match(_tokenizer.TokenType.ARROW)){if(rt!==null)throw this.createErrorWithLocation(rt,_errors$1.ErrorMessages.UNEXPECTED_TOKEN(","));if(this.firstAwaitLocation!==null)throw this.createErrorWithLocation(this.firstAwaitLocation,_errors$1.ErrorMessages.NO_AWAIT_IN_ASYNC_PARAMS);var it=null;if(st.length>0&&st[st.length-1].type==="SpreadElement"){if(it=this.targetToBinding(this.transformDestructuringWithDefault(st[st.length-1].expression)),it.init!=null)throw this.createError(_errors$1.ErrorMessages.UNEXPECTED_REST_PARAMETERS_INITIALIZATION);st=st.slice(0,-1)}var at=st.map(function(ot){return c.targetToBinding(c.transformDestructuringWithDefault(ot))});return this.finishNode({type:ARROW_EXPRESSION_PARAMS,params:at,rest:it,isAsync:!0},et)}this.firstAwaitLocation=tt||this.firstAwaitLocation,this.isBindingElement=this.isAssignmentTarget=!1,_=this.finishNode(new AST.CallExpression({callee:_,arguments:st}),d)}}}else if(_=this.parsePrimaryExpression(),this.firstExprError)return _;for(;;)if(h&&this.match(_tokenizer.TokenType.LPAREN))this.isBindingElement=this.isAssignmentTarget=!1,_=this.finishNode(new AST.CallExpression({callee:_,arguments:this.parseArgumentList().args}),d);else if(this.match(_tokenizer.TokenType.LBRACK))this.isBindingElement=!1,this.isAssignmentTarget=!0,_=this.finishNode(new AST.ComputedMemberExpression({object:_,expression:this.parseComputedMember()}),d);else if(this.match(_tokenizer.TokenType.PERIOD))this.isBindingElement=!1,this.isAssignmentTarget=!0,_=this.finishNode(new AST.StaticMemberExpression({object:_,property:this.parseStaticMember()}),d);else if(this.match(_tokenizer.TokenType.TEMPLATE))this.isBindingElement=this.isAssignmentTarget=!1,_=this.finishNode(new AST.TemplateExpression({tag:_,elements:this.parseTemplateElements()}),d);else break;return this.allowIn=g,_}},{key:"parseTemplateElements",value:function(){var a=this.startNode(),c=this.lookahead;if(c.tail)return this.lex(),[this.finishNode(new AST.TemplateElement({rawValue:c.slice.text.slice(1,-1)}),a)];for(var h=[this.finishNode(new AST.TemplateElement({rawValue:this.lex().slice.text.slice(1,-2)}),a)];;){if(h.push(this.parseExpression()),!this.match(_tokenizer.TokenType.RBRACE))throw this.createILLEGAL();if(this.index=this.startIndex,this.line=this.startLine,this.lineStart=this.startLineStart,this.lookahead=this.scanTemplateElement(),a=this.startNode(),c=this.lex(),c.tail)return h.push(this.finishNode(new AST.TemplateElement({rawValue:c.slice.text.slice(1,-1)}),a)),h;h.push(this.finishNode(new AST.TemplateElement({rawValue:c.slice.text.slice(1,-2)}),a))}}},{key:"parseStaticMember",value:function(){if(this.lex(),this.lookahead.type.klass.isIdentifierName)return this.lex().value;throw this.createUnexpected(this.lookahead)}},{key:"parseComputedMember",value:function(){this.lex();var a=this.parseExpression();return this.expect(_tokenizer.TokenType.RBRACK),a}},{key:"parseNewExpression",value:function(){var a=this,c=this.startNode();if(this.lex(),this.eat(_tokenizer.TokenType.PERIOD))return this.expectContextualKeyword("target"),this.finishNode(new AST.NewTargetExpression,c);var h=this.isolateCoverGrammar(function(){return a.parseLeftHandSideExpression({allowCall:!1})});return this.finishNode(new AST.NewExpression({callee:h,arguments:this.match(_tokenizer.TokenType.LPAREN)?this.parseArgumentList().args:[]}),c)}},{key:"parseRegexFlags",value:function(a){for(var c=!1,h=!1,d=!1,g=!1,_=!1,b=!1,$=0;$<a.length;++$){var j=a[$];switch(j){case"g":if(c)throw this.createError("Duplicate regular expression flag 'g'");c=!0;break;case"i":if(h)throw this.createError("Duplicate regular expression flag 'i'");h=!0;break;case"m":if(d)throw this.createError("Duplicate regular expression flag 'm'");d=!0;break;case"u":if(g)throw this.createError("Duplicate regular expression flag 'u'");g=!0;break;case"y":if(_)throw this.createError("Duplicate regular expression flag 'y'");_=!0;break;case"s":if(b)throw this.createError("Duplicate regular expression flag 's'");b=!0;break;default:throw this.createError("Invalid regular expression flag '"+j+"'")}}return{global:c,ignoreCase:h,multiLine:d,unicode:g,sticky:_,dotAll:b}}},{key:"parsePrimaryExpression",value:function(){if(this.match(_tokenizer.TokenType.LPAREN))return this.parseGroupExpression();var a=this.startNode();if(this.eat(_tokenizer.TokenType.ASYNC))return!this.hasLineTerminatorBeforeNext&&this.match(_tokenizer.TokenType.FUNCTION)?(this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(this.parseFunction({isExpr:!0,inDefault:!1,allowGenerator:!0,isAsync:!0}),a)):this.finishNode(new AST.IdentifierExpression({name:"async"}),a);if(this.matchIdentifier())return this.finishNode(new AST.IdentifierExpression({name:this.parseIdentifier()}),a);switch(this.lookahead.type){case _tokenizer.TokenType.STRING:return this.isBindingElement=this.isAssignmentTarget=!1,this.parseStringLiteral();case _tokenizer.TokenType.NUMBER:return this.isBindingElement=this.isAssignmentTarget=!1,this.parseNumericLiteral();case _tokenizer.TokenType.THIS:return this.lex(),this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(new AST.ThisExpression,a);case _tokenizer.TokenType.FUNCTION:return this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(this.parseFunction({isExpr:!0,inDefault:!1,allowGenerator:!0,isAsync:!1}),a);case _tokenizer.TokenType.TRUE:return this.lex(),this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(new AST.LiteralBooleanExpression({value:!0}),a);case _tokenizer.TokenType.FALSE:return this.lex(),this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(new AST.LiteralBooleanExpression({value:!1}),a);case _tokenizer.TokenType.NULL:return this.lex(),this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(new AST.LiteralNullExpression,a);case _tokenizer.TokenType.LBRACK:return this.parseArrayExpression();case _tokenizer.TokenType.LBRACE:return this.parseObjectExpression();case _tokenizer.TokenType.TEMPLATE:return this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(new AST.TemplateExpression({tag:null,elements:this.parseTemplateElements()}),a);case _tokenizer.TokenType.DIV:case _tokenizer.TokenType.ASSIGN_DIV:{this.isBindingElement=this.isAssignmentTarget=!1,this.lookahead=this.scanRegExp(this.match(_tokenizer.TokenType.DIV)?"/":"/=");var c=this.lex(),h=c.value.lastIndexOf("/"),d=c.value.slice(1,h),g=c.value.slice(h+1),_=this.parseRegexFlags(g);if(!(0,_shiftRegexpAcceptor2.default)(d,_))throw this.createError(_errors$1.ErrorMessages.INVALID_REGEX);return _.pattern=d,this.finishNode(new AST.LiteralRegExpExpression(_),a)}case _tokenizer.TokenType.CLASS:return this.isBindingElement=this.isAssignmentTarget=!1,this.parseClass({isExpr:!0,inDefault:!1});default:throw this.createUnexpected(this.lookahead)}}},{key:"parseNumericLiteral",value:function(){var a=this.getLocation(),c=this.startNode(),h=this.lex();if(h.octal&&this.strict)throw h.noctal?this.createErrorWithLocation(a,"Unexpected noctal integer literal"):this.createErrorWithLocation(a,"Unexpected legacy octal integer literal");var d=h.value===1/0?new AST.LiteralInfinityExpression:new AST.LiteralNumericExpression({value:h.value});return this.finishNode(d,c)}},{key:"parseStringLiteral",value:function(){var a=this.getLocation(),c=this.startNode(),h=this.lex();if(h.octal!=null&&this.strict)throw this.createErrorWithLocation(a,"Unexpected legacy octal escape sequence: \\"+h.octal);return this.finishNode(new AST.LiteralStringExpression({value:h.str}),c)}},{key:"parseIdentifierName",value:function(){if(this.lookahead.type.klass.isIdentifierName)return this.lex().value;throw this.createUnexpected(this.lookahead)}},{key:"parseBindingIdentifier",value:function(){var a=this.startNode();return this.finishNode(new AST.BindingIdentifier({name:this.parseIdentifier()}),a)}},{key:"parseIdentifier",value:function(){if(this.lookahead.value==="yield"&&this.allowYieldExpression)throw this.createError(_errors$1.ErrorMessages.ILLEGAL_YIELD_IDENTIFIER);if(this.lookahead.value==="await"&&this.allowAwaitExpression)throw this.createError(_errors$1.ErrorMessages.ILLEGAL_AWAIT_IDENTIFIER);if(this.matchIdentifier())return this.lex().value;throw this.createUnexpected(this.lookahead)}},{key:"parseArgumentList",value:function(){this.lex();var a=this.parseArguments();return this.expect(_tokenizer.TokenType.RPAREN),a}},{key:"parseArguments",value:function(){for(var a=[],c=null;!this.match(_tokenizer.TokenType.RPAREN);){var h=void 0,d=this.startNode();if(this.eat(_tokenizer.TokenType.ELLIPSIS)){if(h=this.finishNode(new AST.SpreadElement({expression:this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget)}),d),c===null){if(a.push(h),this.match(_tokenizer.TokenType.RPAREN))break;c=this.getLocation(),this.expect(_tokenizer.TokenType.COMMA);continue}}else h=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget);if(a.push(h),this.match(_tokenizer.TokenType.RPAREN))break;this.expect(_tokenizer.TokenType.COMMA)}return{args:a,locationFollowingFirstSpread:c}}},{key:"ensureArrow",value:function(){if(this.hasLineTerminatorBeforeNext)throw this.createError(_errors$1.ErrorMessages.UNEXPECTED_LINE_TERMINATOR);this.match(_tokenizer.TokenType.ARROW)||this.expect(_tokenizer.TokenType.ARROW)}},{key:"parseGroupExpression",value:function(){var a=null,c=this.startNode(),h=this.expect(_tokenizer.TokenType.LPAREN),d=this.startNode();if(this.match(_tokenizer.TokenType.RPAREN)){this.lex();var g=this.finishNode({type:ARROW_EXPRESSION_PARAMS,params:[],rest:null,isAsync:!1},c);return this.ensureArrow(),this.isBindingElement=this.isAssignmentTarget=!1,g}else if(this.eat(_tokenizer.TokenType.ELLIPSIS)){if(a=this.parseBindingTarget(),this.match(_tokenizer.TokenType.ASSIGN))throw this.createError(_errors$1.ErrorMessages.INVALID_REST_PARAMETERS_INITIALIZATION);if(this.match(_tokenizer.TokenType.COMMA))throw this.createError(_errors$1.ErrorMessages.INVALID_LAST_REST_PARAMETER);this.expect(_tokenizer.TokenType.RPAREN);var _=this.finishNode({type:ARROW_EXPRESSION_PARAMS,params:[],rest:a,isAsync:!1},c);return this.ensureArrow(),this.isBindingElement=this.isAssignmentTarget=!1,_}for(var b=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget),$=this.isBindingElement?[this.targetToBinding(this.transformDestructuringWithDefault(b))]:null;this.eat(_tokenizer.TokenType.COMMA);){if(this.match(_tokenizer.TokenType.RPAREN)){if(!this.isBindingElement)throw this.createUnexpected(this.lookahead);this.firstExprError=this.firstExprError||this.createUnexpected(this.lookahead),b=null;break}if(this.isAssignmentTarget=!1,this.match(_tokenizer.TokenType.ELLIPSIS)){if(!this.isBindingElement)throw this.createUnexpected(this.lookahead);if(this.lex(),a=this.parseBindingTarget(),this.match(_tokenizer.TokenType.ASSIGN))throw this.createError(_errors$1.ErrorMessages.INVALID_REST_PARAMETERS_INITIALIZATION);if(this.match(_tokenizer.TokenType.COMMA))throw this.createError(_errors$1.ErrorMessages.INVALID_LAST_REST_PARAMETER);break}if(b){var j=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget);this.isBindingElement?$.push(this.targetToBinding(this.transformDestructuringWithDefault(j))):$=null,this.firstExprError?b=null:b=this.finishNode(new AST.BinaryExpression({left:b,operator:",",right:j}),d)}else{var _e=this.parseBindingElement();$.push(_e)}}if(this.expect(_tokenizer.TokenType.RPAREN),!this.hasLineTerminatorBeforeNext&&this.match(_tokenizer.TokenType.ARROW)){if(!this.isBindingElement)throw this.createErrorWithLocation(h,_errors$1.ErrorMessages.ILLEGAL_ARROW_FUNCTION_PARAMS);return this.isBindingElement=!1,this.finishNode({type:ARROW_EXPRESSION_PARAMS,params:$,rest:a,isAsync:!1},c)}return a&&this.ensureArrow(),this.isBindingElement=!1,isValidSimpleAssignmentTarget(b)||(this.isAssignmentTarget=!1),b}},{key:"parseArrayExpression",value:function(){var a=this,c=this.getLocation(),h=this.startNode();this.lex();for(var d=[],g=null;!this.match(_tokenizer.TokenType.RBRACK);)if(this.eat(_tokenizer.TokenType.COMMA))d.push(null);else{var _=this.startNode(),b=void 0;if(this.eat(_tokenizer.TokenType.ELLIPSIS)){if(b=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget),!this.isAssignmentTarget&&this.firstExprError)throw this.firstExprError;if(b.type==="ArrayAssignmentTarget"||b.type==="ObjectAssignmentTarget"){g=b;break}b.type!=="ArrayExpression"&&b.type!=="ObjectExpression"&&!isValidSimpleAssignmentTarget(b)&&(this.isBindingElement=this.isAssignmentTarget=!1),b=this.finishNode(new AST.SpreadElement({expression:b}),_),this.match(_tokenizer.TokenType.RBRACK)||(this.isBindingElement=this.isAssignmentTarget=!1)}else if(b=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget),!this.isAssignmentTarget&&this.firstExprError)throw this.firstExprError;d.push(b),this.match(_tokenizer.TokenType.RBRACK)||this.expect(_tokenizer.TokenType.COMMA)}if(g&&this.match(_tokenizer.TokenType.COMMA))throw this.createErrorWithLocation(c,_errors$1.ErrorMessages.UNEXPECTED_COMMA_AFTER_REST);if(this.expect(_tokenizer.TokenType.RBRACK),g)return this.finishNode(new AST.ArrayAssignmentTarget({elements:d.map(function(j){return j&&a.transformDestructuringWithDefault(j)}),rest:g}),h);if(this.firstExprError){var $=d[d.length-1];return $!=null&&$.type==="SpreadElement"?this.finishNode(new AST.ArrayAssignmentTarget({elements:d.slice(0,-1).map(function(j){return j&&a.transformDestructuringWithDefault(j)}),rest:this.transformDestructuring($.expression)}),h):this.finishNode(new AST.ArrayAssignmentTarget({elements:d.map(function(j){return j&&a.transformDestructuringWithDefault(j)}),rest:null}),h)}return this.finishNode(new AST.ArrayExpression({elements:d}),h)}},{key:"parseObjectExpression",value:function(){var a=this,c=this.startNode();this.lex();for(var h=[];!this.match(_tokenizer.TokenType.RBRACE);){var d=!1;if(this.match(_tokenizer.TokenType.ELLIPSIS)){d=!0;var g=this.parseSpreadPropertyDefinition();h.push(g)}else{var _=this.inheritCoverGrammar(this.parsePropertyDefinition);h.push(_)}this.match(_tokenizer.TokenType.RBRACE)||(this.expect(_tokenizer.TokenType.COMMA),d&&(this.isBindingElement=this.isAssignmentTarget=!1))}if(this.expect(_tokenizer.TokenType.RBRACE),this.firstExprError){if(!this.isAssignmentTarget)throw this.createError(_errors$1.ErrorMessages.INVALID_LHS_IN_BINDING);var b=h[h.length-1];return b!=null&&b.type==="SpreadProperty"?this.finishNode(new AST.ObjectAssignmentTarget({properties:h.slice(0,-1).map(function($){return a.transformDestructuringWithDefault($)}),rest:this.transformDestructuring(b.expression)}),c):this.finishNode(new AST.ObjectAssignmentTarget({properties:h.map(function($){return a.transformDestructuringWithDefault($)}),rest:null}),c)}return this.finishNode(new AST.ObjectExpression({properties:h}),c)}},{key:"parseSpreadPropertyDefinition",value:function(){var a=this.startNode();this.expect(_tokenizer.TokenType.ELLIPSIS);var c=this.parseAssignmentExpression();return isValidSimpleAssignmentTarget(c)?c.type!=="IdentifierExpression"&&(this.isBindingElement=!1):this.isBindingElement=this.isAssignmentTarget=!1,this.finishNode(new AST.SpreadProperty({expression:c}),a)}},{key:"parsePropertyDefinition",value:function(){var a=this.getLocation(),c=this.startNode(),h=this.lookahead,d=this.parseMethodDefinition(),g=d.methodOrKey,_=d.kind;switch(_){case"method":return this.isBindingElement=this.isAssignmentTarget=!1,g;case"identifier":if(h.value==="await"&&this.firstAwaitLocation==null&&(this.firstAwaitLocation=this.getLocation()),this.eat(_tokenizer.TokenType.ASSIGN)){if(this.allowYieldExpression&&h.value==="yield")throw this.createError(_errors$1.ErrorMessages.ILLEGAL_YIELD_IDENTIFIER);if(this.allowAwaitExpression&&h.value==="await")throw this.createError(_errors$1.ErrorMessages.ILLEGAL_AWAIT_IDENTIFIER);var b=this.isolateCoverGrammar(this.parseAssignmentExpression);return this.firstExprError=this.createErrorWithLocation(a,_errors$1.ErrorMessages.ILLEGAL_PROPERTY),this.finishNode(new AST.AssignmentTargetPropertyIdentifier({binding:this.transformDestructuring(g),init:b}),c)}else if(!this.match(_tokenizer.TokenType.COLON)){if(this.allowYieldExpression&&h.value==="yield")throw this.createError(_errors$1.ErrorMessages.ILLEGAL_YIELD_IDENTIFIER);if(this.allowAwaitExpression&&h.value==="await")throw this.createError(_errors$1.ErrorMessages.ILLEGAL_AWAIT_IDENTIFIER);if(h.type===_tokenizer.TokenType.IDENTIFIER||h.value==="let"||h.value==="yield"||h.value==="async"||h.value==="await")return this.finishNode(new AST.ShorthandProperty({name:this.finishNode(new AST.IdentifierExpression({name:g.value}),c)}),c);throw this.createUnexpected(h)}}this.expect(_tokenizer.TokenType.COLON);var $=this.inheritCoverGrammar(this.parseAssignmentExpressionOrTarget);return this.firstExprError?this.finishNode(new AST.AssignmentTargetPropertyProperty({name:g,binding:$}),c):this.finishNode(new AST.DataProperty({name:g,expression:$}),c)}},{key:"parsePropertyName",value:function(){var a=this.lookahead,c=this.startNode();if(this.eof())throw this.createUnexpected(a);switch(a.type){case _tokenizer.TokenType.STRING:return{name:this.finishNode(new AST.StaticPropertyName({value:this.parseStringLiteral().value}),c),binding:null};case _tokenizer.TokenType.NUMBER:{var h=this.parseNumericLiteral();return{name:this.finishNode(new AST.StaticPropertyName({value:""+(h.type==="LiteralInfinityExpression"?1/0:h.value)}),c),binding:null}}case _tokenizer.TokenType.LBRACK:{this.lex();var d=this.parseAssignmentExpression();return this.expect(_tokenizer.TokenType.RBRACK),{name:this.finishNode(new AST.ComputedPropertyName({expression:d}),c),binding:null}}}var g=this.parseIdentifierName();return{name:this.finishNode(new AST.StaticPropertyName({value:g}),c),binding:this.finishNode(new AST.BindingIdentifier({name:g}),c)}}},{key:"lookaheadPropertyName",value:function(){switch(this.lookahead.type){case _tokenizer.TokenType.NUMBER:case _tokenizer.TokenType.STRING:case _tokenizer.TokenType.LBRACK:return!0;default:return this.lookahead.type.klass.isIdentifierName}}},{key:"parseMethodDefinition",value:function(){var a=this.lookahead,c=this.startNode(),h=this.saveLexerState(),d=!!this.eat(_tokenizer.TokenType.ASYNC);d&&this.hasLineTerminatorBeforeNext&&(d=!1,this.restoreLexerState(h));var g=!!this.eat(_tokenizer.TokenType.MUL);d&&!this.lookaheadPropertyName()&&(d=!1,g=!1,this.restoreLexerState(h));var _=this.parsePropertyName(),b=_.name;if(!g&&!d&&a.type===_tokenizer.TokenType.IDENTIFIER&&a.value.length===3){if(a.value==="get"&&this.lookaheadPropertyName()&&!a.escaped){var $=this.parsePropertyName();b=$.name,this.expect(_tokenizer.TokenType.LPAREN),this.expect(_tokenizer.TokenType.RPAREN);var j=this.allowYieldExpression,_e=this.allowAwaitExpression,et=this.firstAwaitLocation;this.allowYieldExpression=!1,this.allowAwaitExpression=!1,this.firstAwaitLocation=null;var tt=this.parseFunctionBody();return this.allowYieldExpression=j,this.allowAwaitExpression=_e,this.firstAwaitLocation=et,{methodOrKey:this.finishNode(new AST.Getter({name:b,body:tt}),c),kind:"method"}}else if(a.value==="set"&&this.lookaheadPropertyName()&&!a.escaped){var nt=this.parsePropertyName();b=nt.name,this.expect(_tokenizer.TokenType.LPAREN);var st=this.allowYieldExpression,rt=this.allowAwaitExpression,it=this.firstAwaitLocation;this.allowYieldExpression=!1,this.allowAwaitExpression=!1,this.firstAwaitLocation=null;var at=this.parseBindingElement();this.expect(_tokenizer.TokenType.RPAREN);var ot=this.parseFunctionBody();return this.allowYieldExpression=st,this.allowAwaitExpression=rt,this.firstAwaitLocation=it,{methodOrKey:this.finishNode(new AST.Setter({name:b,param:at,body:ot}),c),kind:"method"}}}if(d){var ut=this.allowYieldExpression,ct=this.allowAwaitExpression;this.allowYieldExpression=g,this.allowAwaitExpression=!0;var ht=this.parseParams();this.allowYieldExpression=g,this.allowAwaitExpression=!0;var lt=this.parseFunctionBody();return this.allowYieldExpression=ut,this.allowAwaitExpression=ct,{methodOrKey:this.finishNode(new AST.Method({isAsync:d,isGenerator:g,name:b,params:ht,body:lt}),c),kind:"method"}}if(this.match(_tokenizer.TokenType.LPAREN)){var pt=this.allowYieldExpression,ft=this.allowAwaitExpression,gt=this.firstAwaitLocation;this.allowYieldExpression=g,this.allowAwaitExpression=!1,this.firstAwaitLocation=null;var yt=this.parseParams(),mt=this.parseFunctionBody();return this.allowYieldExpression=pt,this.allowAwaitExpression=ft,this.firstAwaitLocation=gt,{methodOrKey:this.finishNode(new AST.Method({isAsync:d,isGenerator:g,name:b,params:yt,body:mt}),c),kind:"method"}}if(g&&this.match(_tokenizer.TokenType.COLON))throw this.createUnexpected(this.lookahead);return{methodOrKey:b,kind:a.type.klass.isIdentifierName?"identifier":"property",escaped:a.escaped}}},{key:"parseClass",value:function(a){var c=this,h=a.isExpr,d=a.inDefault,g=this.startNode();this.lex();var _=null,b=null;if(this.matchIdentifier())_=this.parseBindingIdentifier();else if(!h)if(d)_=new AST.BindingIdentifier({name:"*default*"});else throw this.createUnexpected(this.lookahead);this.eat(_tokenizer.TokenType.EXTENDS)&&(b=this.isolateCoverGrammar(function(){return c.parseLeftHandSideExpression({allowCall:!0})})),this.expect(_tokenizer.TokenType.LBRACE);for(var $=[];!this.eat(_tokenizer.TokenType.RBRACE);)if(!this.eat(_tokenizer.TokenType.SEMICOLON)){var j=!1,_e=this.startNode(),et=this.parseMethodDefinition(),tt=et.methodOrKey,nt=et.kind,st=et.escaped;if(nt==="identifier"&&tt.value==="static"&&!st){j=!0;var rt=this.parseMethodDefinition();tt=rt.methodOrKey,nt=rt.kind}if(nt==="method")$.push(this.finishNode(new AST.ClassElement({isStatic:j,method:tt}),_e));else throw this.createError("Only methods are allowed in classes")}return this.finishNode(new(h?AST.ClassExpression:AST.ClassDeclaration)({name:_,super:b,elements:$}),g)}},{key:"parseFunction",value:function(a){var c=a.isExpr,h=a.inDefault,d=a.allowGenerator,g=a.isAsync,_=a.startState,b=_===void 0?this.startNode():_;this.lex();var $=null,j=d&&!!this.eat(_tokenizer.TokenType.MUL),_e=this.allowYieldExpression,et=this.allowAwaitExpression,tt=this.firstAwaitLocation;if(c&&(this.allowYieldExpression=j,this.allowAwaitExpression=g),!this.match(_tokenizer.TokenType.LPAREN))$=this.parseBindingIdentifier();else if(!c)if(h)$=new AST.BindingIdentifier({name:"*default*"});else throw this.createUnexpected(this.lookahead);this.allowYieldExpression=j,this.allowAwaitExpression=g,this.firstAwaitLocation=null;var nt=this.parseParams(),st=this.parseFunctionBody();return this.allowYieldExpression=_e,this.allowAwaitExpression=et,this.firstAwaitLocation=tt,this.finishNode(new(c?AST.FunctionExpression:AST.FunctionDeclaration)({isAsync:g,isGenerator:j,name:$,params:nt,body:st}),b)}},{key:"parseArrayBinding",value:function(){var a=this.startNode();this.expect(_tokenizer.TokenType.LBRACK);for(var c=[],h=null;!this.match(_tokenizer.TokenType.RBRACK);){var d=void 0;if(this.eat(_tokenizer.TokenType.COMMA))d=null;else{if(this.eat(_tokenizer.TokenType.ELLIPSIS)){h=this.parseBindingTarget();break}else d=this.parseBindingElement();this.match(_tokenizer.TokenType.RBRACK)||this.expect(_tokenizer.TokenType.COMMA)}c.push(d)}return this.expect(_tokenizer.TokenType.RBRACK),this.finishNode(new AST.ArrayBinding({elements:c,rest:h}),a)}},{key:"parseBindingProperty",value:function(){var a=this.startNode(),c=this.matchIdentifier(),h=this.lookahead,d=this.parsePropertyName(),g=d.name,_=d.binding;if(c&&g.type==="StaticPropertyName"&&!this.match(_tokenizer.TokenType.COLON)){if(this.allowYieldExpression&&h.value==="yield")throw this.createError(_errors$1.ErrorMessages.ILLEGAL_YIELD_IDENTIFIER);if(this.allowAwaitExpression&&h.value==="await")throw this.createError(_errors$1.ErrorMessages.ILLEGAL_AWAIT_IDENTIFIER);var b=null;return this.eat(_tokenizer.TokenType.ASSIGN)&&(b=this.parseAssignmentExpression()),this.finishNode(new AST.BindingPropertyIdentifier({binding:_,init:b}),a)}return this.expect(_tokenizer.TokenType.COLON),_=this.parseBindingElement(),this.finishNode(new AST.BindingPropertyProperty({name:g,binding:_}),a)}},{key:"parseObjectBinding",value:function(){var a=this.startNode();this.expect(_tokenizer.TokenType.LBRACE);for(var c=[],h=null;!this.match(_tokenizer.TokenType.RBRACE);){if(this.eat(_tokenizer.TokenType.ELLIPSIS)){h=this.parseBindingIdentifier();break}c.push(this.parseBindingProperty()),this.match(_tokenizer.TokenType.RBRACE)||this.expect(_tokenizer.TokenType.COMMA)}return this.expect(_tokenizer.TokenType.RBRACE),this.finishNode(new AST.ObjectBinding({properties:c,rest:h}),a)}},{key:"parseBindingTarget",value:function(){if(this.matchIdentifier())return this.parseBindingIdentifier();switch(this.lookahead.type){case _tokenizer.TokenType.LBRACK:return this.parseArrayBinding();case _tokenizer.TokenType.LBRACE:return this.parseObjectBinding()}throw this.createUnexpected(this.lookahead)}},{key:"parseBindingElement",value:function(){var a=this.startNode(),c=this.parseBindingTarget();if(this.eat(_tokenizer.TokenType.ASSIGN)){var h=this.parseAssignmentExpression();c=this.finishNode(new AST.BindingWithDefault({binding:c,init:h}),a)}return c}},{key:"parseParam",value:function(){var a=this.inParameter;this.inParameter=!0;var c=this.parseBindingElement();return this.inParameter=a,c}},{key:"parseParams",value:function(){var a=this.startNode();this.expect(_tokenizer.TokenType.LPAREN);for(var c=[],h=null;!this.match(_tokenizer.TokenType.RPAREN);){if(this.eat(_tokenizer.TokenType.ELLIPSIS)){if(h=this.parseBindingTarget(),this.lookahead.type===_tokenizer.TokenType.ASSIGN)throw this.createError(_errors$1.ErrorMessages.UNEXPECTED_REST_PARAMETERS_INITIALIZATION);if(this.match(_tokenizer.TokenType.COMMA))throw this.createError(_errors$1.ErrorMessages.UNEXPECTED_COMMA_AFTER_REST);break}if(c.push(this.parseParam()),this.match(_tokenizer.TokenType.RPAREN))break;this.expect(_tokenizer.TokenType.COMMA)}return this.expect(_tokenizer.TokenType.RPAREN),this.finishNode(new AST.FormalParameters({items:c,rest:h}),a)}}]),e}(_tokenizer2.default);var earlyErrors={},dist$4={},director$2={};Object.defineProperty(director$2,"__esModule",{value:!0});director$2.reduce=reduce;var director$1={ArrayAssignmentTarget:function(e,s){var a=this;return e.reduceArrayAssignmentTarget(s,{elements:s.elements.map(function(c){return c&&a[c.type](e,c)}),rest:s.rest&&this[s.rest.type](e,s.rest)})},ArrayBinding:function(e,s){var a=this;return e.reduceArrayBinding(s,{elements:s.elements.map(function(c){return c&&a[c.type](e,c)}),rest:s.rest&&this[s.rest.type](e,s.rest)})},ArrayExpression:function(e,s){var a=this;return e.reduceArrayExpression(s,{elements:s.elements.map(function(c){return c&&a[c.type](e,c)})})},ArrowExpression:function(e,s){return e.reduceArrowExpression(s,{params:this.FormalParameters(e,s.params),body:this[s.body.type](e,s.body)})},AssignmentExpression:function(e,s){return e.reduceAssignmentExpression(s,{binding:this[s.binding.type](e,s.binding),expression:this[s.expression.type](e,s.expression)})},AssignmentTargetIdentifier:function(e,s){return e.reduceAssignmentTargetIdentifier(s)},AssignmentTargetPropertyIdentifier:function(e,s){return e.reduceAssignmentTargetPropertyIdentifier(s,{binding:this.AssignmentTargetIdentifier(e,s.binding),init:s.init&&this[s.init.type](e,s.init)})},AssignmentTargetPropertyProperty:function(e,s){return e.reduceAssignmentTargetPropertyProperty(s,{name:this[s.name.type](e,s.name),binding:this[s.binding.type](e,s.binding)})},AssignmentTargetWithDefault:function(e,s){return e.reduceAssignmentTargetWithDefault(s,{binding:this[s.binding.type](e,s.binding),init:this[s.init.type](e,s.init)})},AwaitExpression:function(e,s){return e.reduceAwaitExpression(s,{expression:this[s.expression.type](e,s.expression)})},BinaryExpression:function(e,s){return e.reduceBinaryExpression(s,{left:this[s.left.type](e,s.left),right:this[s.right.type](e,s.right)})},BindingIdentifier:function(e,s){return e.reduceBindingIdentifier(s)},BindingPropertyIdentifier:function(e,s){return e.reduceBindingPropertyIdentifier(s,{binding:this.BindingIdentifier(e,s.binding),init:s.init&&this[s.init.type](e,s.init)})},BindingPropertyProperty:function(e,s){return e.reduceBindingPropertyProperty(s,{name:this[s.name.type](e,s.name),binding:this[s.binding.type](e,s.binding)})},BindingWithDefault:function(e,s){return e.reduceBindingWithDefault(s,{binding:this[s.binding.type](e,s.binding),init:this[s.init.type](e,s.init)})},Block:function(e,s){var a=this;return e.reduceBlock(s,{statements:s.statements.map(function(c){return a[c.type](e,c)})})},BlockStatement:function(e,s){return e.reduceBlockStatement(s,{block:this.Block(e,s.block)})},BreakStatement:function(e,s){return e.reduceBreakStatement(s)},CallExpression:function(e,s){var a=this;return e.reduceCallExpression(s,{callee:this[s.callee.type](e,s.callee),arguments:s.arguments.map(function(c){return a[c.type](e,c)})})},CatchClause:function(e,s){return e.reduceCatchClause(s,{binding:this[s.binding.type](e,s.binding),body:this.Block(e,s.body)})},ClassDeclaration:function(e,s){var a=this;return e.reduceClassDeclaration(s,{name:this.BindingIdentifier(e,s.name),super:s.super&&this[s.super.type](e,s.super),elements:s.elements.map(function(c){return a.ClassElement(e,c)})})},ClassElement:function(e,s){return e.reduceClassElement(s,{method:this[s.method.type](e,s.method)})},ClassExpression:function(e,s){var a=this;return e.reduceClassExpression(s,{name:s.name&&this.BindingIdentifier(e,s.name),super:s.super&&this[s.super.type](e,s.super),elements:s.elements.map(function(c){return a.ClassElement(e,c)})})},CompoundAssignmentExpression:function(e,s){return e.reduceCompoundAssignmentExpression(s,{binding:this[s.binding.type](e,s.binding),expression:this[s.expression.type](e,s.expression)})},ComputedMemberAssignmentTarget:function(e,s){return e.reduceComputedMemberAssignmentTarget(s,{object:this[s.object.type](e,s.object),expression:this[s.expression.type](e,s.expression)})},ComputedMemberExpression:function(e,s){return e.reduceComputedMemberExpression(s,{object:this[s.object.type](e,s.object),expression:this[s.expression.type](e,s.expression)})},ComputedPropertyName:function(e,s){return e.reduceComputedPropertyName(s,{expression:this[s.expression.type](e,s.expression)})},ConditionalExpression:function(e,s){return e.reduceConditionalExpression(s,{test:this[s.test.type](e,s.test),consequent:this[s.consequent.type](e,s.consequent),alternate:this[s.alternate.type](e,s.alternate)})},ContinueStatement:function(e,s){return e.reduceContinueStatement(s)},DataProperty:function(e,s){return e.reduceDataProperty(s,{name:this[s.name.type](e,s.name),expression:this[s.expression.type](e,s.expression)})},DebuggerStatement:function(e,s){return e.reduceDebuggerStatement(s)},Directive:function(e,s){return e.reduceDirective(s)},DoWhileStatement:function(e,s){return e.reduceDoWhileStatement(s,{body:this[s.body.type](e,s.body),test:this[s.test.type](e,s.test)})},EmptyStatement:function(e,s){return e.reduceEmptyStatement(s)},Export:function(e,s){return e.reduceExport(s,{declaration:this[s.declaration.type](e,s.declaration)})},ExportAllFrom:function(e,s){return e.reduceExportAllFrom(s)},ExportDefault:function(e,s){return e.reduceExportDefault(s,{body:this[s.body.type](e,s.body)})},ExportFrom:function(e,s){var a=this;return e.reduceExportFrom(s,{namedExports:s.namedExports.map(function(c){return a.ExportFromSpecifier(e,c)})})},ExportFromSpecifier:function(e,s){return e.reduceExportFromSpecifier(s)},ExportLocalSpecifier:function(e,s){return e.reduceExportLocalSpecifier(s,{name:this.IdentifierExpression(e,s.name)})},ExportLocals:function(e,s){var a=this;return e.reduceExportLocals(s,{namedExports:s.namedExports.map(function(c){return a.ExportLocalSpecifier(e,c)})})},ExpressionStatement:function(e,s){return e.reduceExpressionStatement(s,{expression:this[s.expression.type](e,s.expression)})},ForAwaitStatement:function(e,s){return e.reduceForAwaitStatement(s,{left:this[s.left.type](e,s.left),right:this[s.right.type](e,s.right),body:this[s.body.type](e,s.body)})},ForInStatement:function(e,s){return e.reduceForInStatement(s,{left:this[s.left.type](e,s.left),right:this[s.right.type](e,s.right),body:this[s.body.type](e,s.body)})},ForOfStatement:function(e,s){return e.reduceForOfStatement(s,{left:this[s.left.type](e,s.left),right:this[s.right.type](e,s.right),body:this[s.body.type](e,s.body)})},ForStatement:function(e,s){return e.reduceForStatement(s,{init:s.init&&this[s.init.type](e,s.init),test:s.test&&this[s.test.type](e,s.test),update:s.update&&this[s.update.type](e,s.update),body:this[s.body.type](e,s.body)})},FormalParameters:function(e,s){var a=this;return e.reduceFormalParameters(s,{items:s.items.map(function(c){return a[c.type](e,c)}),rest:s.rest&&this[s.rest.type](e,s.rest)})},FunctionBody:function(e,s){var a=this;return e.reduceFunctionBody(s,{directives:s.directives.map(function(c){return a.Directive(e,c)}),statements:s.statements.map(function(c){return a[c.type](e,c)})})},FunctionDeclaration:function(e,s){return e.reduceFunctionDeclaration(s,{name:this.BindingIdentifier(e,s.name),params:this.FormalParameters(e,s.params),body:this.FunctionBody(e,s.body)})},FunctionExpression:function(e,s){return e.reduceFunctionExpression(s,{name:s.name&&this.BindingIdentifier(e,s.name),params:this.FormalParameters(e,s.params),body:this.FunctionBody(e,s.body)})},Getter:function(e,s){return e.reduceGetter(s,{name:this[s.name.type](e,s.name),body:this.FunctionBody(e,s.body)})},IdentifierExpression:function(e,s){return e.reduceIdentifierExpression(s)},IfStatement:function(e,s){return e.reduceIfStatement(s,{test:this[s.test.type](e,s.test),consequent:this[s.consequent.type](e,s.consequent),alternate:s.alternate&&this[s.alternate.type](e,s.alternate)})},Import:function(e,s){var a=this;return e.reduceImport(s,{defaultBinding:s.defaultBinding&&this.BindingIdentifier(e,s.defaultBinding),namedImports:s.namedImports.map(function(c){return a.ImportSpecifier(e,c)})})},ImportNamespace:function(e,s){return e.reduceImportNamespace(s,{defaultBinding:s.defaultBinding&&this.BindingIdentifier(e,s.defaultBinding),namespaceBinding:this.BindingIdentifier(e,s.namespaceBinding)})},ImportSpecifier:function(e,s){return e.reduceImportSpecifier(s,{binding:this.BindingIdentifier(e,s.binding)})},LabeledStatement:function(e,s){return e.reduceLabeledStatement(s,{body:this[s.body.type](e,s.body)})},LiteralBooleanExpression:function(e,s){return e.reduceLiteralBooleanExpression(s)},LiteralInfinityExpression:function(e,s){return e.reduceLiteralInfinityExpression(s)},LiteralNullExpression:function(e,s){return e.reduceLiteralNullExpression(s)},LiteralNumericExpression:function(e,s){return e.reduceLiteralNumericExpression(s)},LiteralRegExpExpression:function(e,s){return e.reduceLiteralRegExpExpression(s)},LiteralStringExpression:function(e,s){return e.reduceLiteralStringExpression(s)},Method:function(e,s){return e.reduceMethod(s,{name:this[s.name.type](e,s.name),params:this.FormalParameters(e,s.params),body:this.FunctionBody(e,s.body)})},Module:function(e,s){var a=this;return e.reduceModule(s,{directives:s.directives.map(function(c){return a.Directive(e,c)}),items:s.items.map(function(c){return a[c.type](e,c)})})},NewExpression:function(e,s){var a=this;return e.reduceNewExpression(s,{callee:this[s.callee.type](e,s.callee),arguments:s.arguments.map(function(c){return a[c.type](e,c)})})},NewTargetExpression:function(e,s){return e.reduceNewTargetExpression(s)},ObjectAssignmentTarget:function(e,s){var a=this;return e.reduceObjectAssignmentTarget(s,{properties:s.properties.map(function(c){return a[c.type](e,c)}),rest:s.rest&&this[s.rest.type](e,s.rest)})},ObjectBinding:function(e,s){var a=this;return e.reduceObjectBinding(s,{properties:s.properties.map(function(c){return a[c.type](e,c)}),rest:s.rest&&this[s.rest.type](e,s.rest)})},ObjectExpression:function(e,s){var a=this;return e.reduceObjectExpression(s,{properties:s.properties.map(function(c){return a[c.type](e,c)})})},ReturnStatement:function(e,s){return e.reduceReturnStatement(s,{expression:s.expression&&this[s.expression.type](e,s.expression)})},Script:function(e,s){var a=this;return e.reduceScript(s,{directives:s.directives.map(function(c){return a.Directive(e,c)}),statements:s.statements.map(function(c){return a[c.type](e,c)})})},Setter:function(e,s){return e.reduceSetter(s,{name:this[s.name.type](e,s.name),param:this[s.param.type](e,s.param),body:this.FunctionBody(e,s.body)})},ShorthandProperty:function(e,s){return e.reduceShorthandProperty(s,{name:this.IdentifierExpression(e,s.name)})},SpreadElement:function(e,s){return e.reduceSpreadElement(s,{expression:this[s.expression.type](e,s.expression)})},SpreadProperty:function(e,s){return e.reduceSpreadProperty(s,{expression:this[s.expression.type](e,s.expression)})},StaticMemberAssignmentTarget:function(e,s){return e.reduceStaticMemberAssignmentTarget(s,{object:this[s.object.type](e,s.object)})},StaticMemberExpression:function(e,s){return e.reduceStaticMemberExpression(s,{object:this[s.object.type](e,s.object)})},StaticPropertyName:function(e,s){return e.reduceStaticPropertyName(s)},Super:function(e,s){return e.reduceSuper(s)},SwitchCase:function(e,s){var a=this;return e.reduceSwitchCase(s,{test:this[s.test.type](e,s.test),consequent:s.consequent.map(function(c){return a[c.type](e,c)})})},SwitchDefault:function(e,s){var a=this;return e.reduceSwitchDefault(s,{consequent:s.consequent.map(function(c){return a[c.type](e,c)})})},SwitchStatement:function(e,s){var a=this;return e.reduceSwitchStatement(s,{discriminant:this[s.discriminant.type](e,s.discriminant),cases:s.cases.map(function(c){return a.SwitchCase(e,c)})})},SwitchStatementWithDefault:function(e,s){var a=this;return e.reduceSwitchStatementWithDefault(s,{discriminant:this[s.discriminant.type](e,s.discriminant),preDefaultCases:s.preDefaultCases.map(function(c){return a.SwitchCase(e,c)}),defaultCase:this.SwitchDefault(e,s.defaultCase),postDefaultCases:s.postDefaultCases.map(function(c){return a.SwitchCase(e,c)})})},TemplateElement:function(e,s){return e.reduceTemplateElement(s)},TemplateExpression:function(e,s){var a=this;return e.reduceTemplateExpression(s,{tag:s.tag&&this[s.tag.type](e,s.tag),elements:s.elements.map(function(c){return a[c.type](e,c)})})},ThisExpression:function(e,s){return e.reduceThisExpression(s)},ThrowStatement:function(e,s){return e.reduceThrowStatement(s,{expression:this[s.expression.type](e,s.expression)})},TryCatchStatement:function(e,s){return e.reduceTryCatchStatement(s,{body:this.Block(e,s.body),catchClause:this.CatchClause(e,s.catchClause)})},TryFinallyStatement:function(e,s){return e.reduceTryFinallyStatement(s,{body:this.Block(e,s.body),catchClause:s.catchClause&&this.CatchClause(e,s.catchClause),finalizer:this.Block(e,s.finalizer)})},UnaryExpression:function(e,s){return e.reduceUnaryExpression(s,{operand:this[s.operand.type](e,s.operand)})},UpdateExpression:function(e,s){return e.reduceUpdateExpression(s,{operand:this[s.operand.type](e,s.operand)})},VariableDeclaration:function(e,s){var a=this;return e.reduceVariableDeclaration(s,{declarators:s.declarators.map(function(c){return a.VariableDeclarator(e,c)})})},VariableDeclarationStatement:function(e,s){return e.reduceVariableDeclarationStatement(s,{declaration:this.VariableDeclaration(e,s.declaration)})},VariableDeclarator:function(e,s){return e.reduceVariableDeclarator(s,{binding:this[s.binding.type](e,s.binding),init:s.init&&this[s.init.type](e,s.init)})},WhileStatement:function(e,s){return e.reduceWhileStatement(s,{test:this[s.test.type](e,s.test),body:this[s.body.type](e,s.body)})},WithStatement:function(e,s){return e.reduceWithStatement(s,{object:this[s.object.type](e,s.object),body:this[s.body.type](e,s.body)})},YieldExpression:function(e,s){return e.reduceYieldExpression(s,{expression:s.expression&&this[s.expression.type](e,s.expression)})},YieldGeneratorExpression:function(e,s){return e.reduceYieldGeneratorExpression(s,{expression:this[s.expression.type](e,s.expression)})}};function reduce(o,e){return director$1[e.type](o,e)}var thunkedDirector={};Object.defineProperty(thunkedDirector,"__esModule",{value:!0});thunkedDirector.thunkedReduce=thunkedReduce;var director={ArrayAssignmentTarget:function(e,s){var a=this;return e.reduceArrayAssignmentTarget(s,{elements:s.elements.map(function(c){return c&&function(){return a[c.type](e,c)}}),rest:s.rest&&function(){return a[s.rest.type](e,s.rest)}})},ArrayBinding:function(e,s){var a=this;return e.reduceArrayBinding(s,{elements:s.elements.map(function(c){return c&&function(){return a[c.type](e,c)}}),rest:s.rest&&function(){return a[s.rest.type](e,s.rest)}})},ArrayExpression:function(e,s){var a=this;return e.reduceArrayExpression(s,{elements:s.elements.map(function(c){return c&&function(){return a[c.type](e,c)}})})},ArrowExpression:function(e,s){var a=this;return e.reduceArrowExpression(s,{params:function(){return a.FormalParameters(e,s.params)},body:function(){return a[s.body.type](e,s.body)}})},AssignmentExpression:function(e,s){var a=this;return e.reduceAssignmentExpression(s,{binding:function(){return a[s.binding.type](e,s.binding)},expression:function(){return a[s.expression.type](e,s.expression)}})},AssignmentTargetIdentifier:function(e,s){return e.reduceAssignmentTargetIdentifier(s)},AssignmentTargetPropertyIdentifier:function(e,s){var a=this;return e.reduceAssignmentTargetPropertyIdentifier(s,{binding:function(){return a.AssignmentTargetIdentifier(e,s.binding)},init:s.init&&function(){return a[s.init.type](e,s.init)}})},AssignmentTargetPropertyProperty:function(e,s){var a=this;return e.reduceAssignmentTargetPropertyProperty(s,{name:function(){return a[s.name.type](e,s.name)},binding:function(){return a[s.binding.type](e,s.binding)}})},AssignmentTargetWithDefault:function(e,s){var a=this;return e.reduceAssignmentTargetWithDefault(s,{binding:function(){return a[s.binding.type](e,s.binding)},init:function(){return a[s.init.type](e,s.init)}})},AwaitExpression:function(e,s){var a=this;return e.reduceAwaitExpression(s,{expression:function(){return a[s.expression.type](e,s.expression)}})},BinaryExpression:function(e,s){var a=this;return e.reduceBinaryExpression(s,{left:function(){return a[s.left.type](e,s.left)},right:function(){return a[s.right.type](e,s.right)}})},BindingIdentifier:function(e,s){return e.reduceBindingIdentifier(s)},BindingPropertyIdentifier:function(e,s){var a=this;return e.reduceBindingPropertyIdentifier(s,{binding:function(){return a.BindingIdentifier(e,s.binding)},init:s.init&&function(){return a[s.init.type](e,s.init)}})},BindingPropertyProperty:function(e,s){var a=this;return e.reduceBindingPropertyProperty(s,{name:function(){return a[s.name.type](e,s.name)},binding:function(){return a[s.binding.type](e,s.binding)}})},BindingWithDefault:function(e,s){var a=this;return e.reduceBindingWithDefault(s,{binding:function(){return a[s.binding.type](e,s.binding)},init:function(){return a[s.init.type](e,s.init)}})},Block:function(e,s){var a=this;return e.reduceBlock(s,{statements:s.statements.map(function(c){return function(){return a[c.type](e,c)}})})},BlockStatement:function(e,s){var a=this;return e.reduceBlockStatement(s,{block:function(){return a.Block(e,s.block)}})},BreakStatement:function(e,s){return e.reduceBreakStatement(s)},CallExpression:function(e,s){var a=this;return e.reduceCallExpression(s,{callee:function(){return a[s.callee.type](e,s.callee)},arguments:s.arguments.map(function(c){return function(){return a[c.type](e,c)}})})},CatchClause:function(e,s){var a=this;return e.reduceCatchClause(s,{binding:function(){return a[s.binding.type](e,s.binding)},body:function(){return a.Block(e,s.body)}})},ClassDeclaration:function(e,s){var a=this;return e.reduceClassDeclaration(s,{name:function(){return a.BindingIdentifier(e,s.name)},super:s.super&&function(){return a[s.super.type](e,s.super)},elements:s.elements.map(function(c){return function(){return a.ClassElement(e,c)}})})},ClassElement:function(e,s){var a=this;return e.reduceClassElement(s,{method:function(){return a[s.method.type](e,s.method)}})},ClassExpression:function(e,s){var a=this;return e.reduceClassExpression(s,{name:s.name&&function(){return a.BindingIdentifier(e,s.name)},super:s.super&&function(){return a[s.super.type](e,s.super)},elements:s.elements.map(function(c){return function(){return a.ClassElement(e,c)}})})},CompoundAssignmentExpression:function(e,s){var a=this;return e.reduceCompoundAssignmentExpression(s,{binding:function(){return a[s.binding.type](e,s.binding)},expression:function(){return a[s.expression.type](e,s.expression)}})},ComputedMemberAssignmentTarget:function(e,s){var a=this;return e.reduceComputedMemberAssignmentTarget(s,{object:function(){return a[s.object.type](e,s.object)},expression:function(){return a[s.expression.type](e,s.expression)}})},ComputedMemberExpression:function(e,s){var a=this;return e.reduceComputedMemberExpression(s,{object:function(){return a[s.object.type](e,s.object)},expression:function(){return a[s.expression.type](e,s.expression)}})},ComputedPropertyName:function(e,s){var a=this;return e.reduceComputedPropertyName(s,{expression:function(){return a[s.expression.type](e,s.expression)}})},ConditionalExpression:function(e,s){var a=this;return e.reduceConditionalExpression(s,{test:function(){return a[s.test.type](e,s.test)},consequent:function(){return a[s.consequent.type](e,s.consequent)},alternate:function(){return a[s.alternate.type](e,s.alternate)}})},ContinueStatement:function(e,s){return e.reduceContinueStatement(s)},DataProperty:function(e,s){var a=this;return e.reduceDataProperty(s,{name:function(){return a[s.name.type](e,s.name)},expression:function(){return a[s.expression.type](e,s.expression)}})},DebuggerStatement:function(e,s){return e.reduceDebuggerStatement(s)},Directive:function(e,s){return e.reduceDirective(s)},DoWhileStatement:function(e,s){var a=this;return e.reduceDoWhileStatement(s,{body:function(){return a[s.body.type](e,s.body)},test:function(){return a[s.test.type](e,s.test)}})},EmptyStatement:function(e,s){return e.reduceEmptyStatement(s)},Export:function(e,s){var a=this;return e.reduceExport(s,{declaration:function(){return a[s.declaration.type](e,s.declaration)}})},ExportAllFrom:function(e,s){return e.reduceExportAllFrom(s)},ExportDefault:function(e,s){var a=this;return e.reduceExportDefault(s,{body:function(){return a[s.body.type](e,s.body)}})},ExportFrom:function(e,s){var a=this;return e.reduceExportFrom(s,{namedExports:s.namedExports.map(function(c){return function(){return a.ExportFromSpecifier(e,c)}})})},ExportFromSpecifier:function(e,s){return e.reduceExportFromSpecifier(s)},ExportLocalSpecifier:function(e,s){var a=this;return e.reduceExportLocalSpecifier(s,{name:function(){return a.IdentifierExpression(e,s.name)}})},ExportLocals:function(e,s){var a=this;return e.reduceExportLocals(s,{namedExports:s.namedExports.map(function(c){return function(){return a.ExportLocalSpecifier(e,c)}})})},ExpressionStatement:function(e,s){var a=this;return e.reduceExpressionStatement(s,{expression:function(){return a[s.expression.type](e,s.expression)}})},ForAwaitStatement:function(e,s){var a=this;return e.reduceForAwaitStatement(s,{left:function(){return a[s.left.type](e,s.left)},right:function(){return a[s.right.type](e,s.right)},body:function(){return a[s.body.type](e,s.body)}})},ForInStatement:function(e,s){var a=this;return e.reduceForInStatement(s,{left:function(){return a[s.left.type](e,s.left)},right:function(){return a[s.right.type](e,s.right)},body:function(){return a[s.body.type](e,s.body)}})},ForOfStatement:function(e,s){var a=this;return e.reduceForOfStatement(s,{left:function(){return a[s.left.type](e,s.left)},right:function(){return a[s.right.type](e,s.right)},body:function(){return a[s.body.type](e,s.body)}})},ForStatement:function(e,s){var a=this;return e.reduceForStatement(s,{init:s.init&&function(){return a[s.init.type](e,s.init)},test:s.test&&function(){return a[s.test.type](e,s.test)},update:s.update&&function(){return a[s.update.type](e,s.update)},body:function(){return a[s.body.type](e,s.body)}})},FormalParameters:function(e,s){var a=this;return e.reduceFormalParameters(s,{items:s.items.map(function(c){return function(){return a[c.type](e,c)}}),rest:s.rest&&function(){return a[s.rest.type](e,s.rest)}})},FunctionBody:function(e,s){var a=this;return e.reduceFunctionBody(s,{directives:s.directives.map(function(c){return function(){return a.Directive(e,c)}}),statements:s.statements.map(function(c){return function(){return a[c.type](e,c)}})})},FunctionDeclaration:function(e,s){var a=this;return e.reduceFunctionDeclaration(s,{name:function(){return a.BindingIdentifier(e,s.name)},params:function(){return a.FormalParameters(e,s.params)},body:function(){return a.FunctionBody(e,s.body)}})},FunctionExpression:function(e,s){var a=this;return e.reduceFunctionExpression(s,{name:s.name&&function(){return a.BindingIdentifier(e,s.name)},params:function(){return a.FormalParameters(e,s.params)},body:function(){return a.FunctionBody(e,s.body)}})},Getter:function(e,s){var a=this;return e.reduceGetter(s,{name:function(){return a[s.name.type](e,s.name)},body:function(){return a.FunctionBody(e,s.body)}})},IdentifierExpression:function(e,s){return e.reduceIdentifierExpression(s)},IfStatement:function(e,s){var a=this;return e.reduceIfStatement(s,{test:function(){return a[s.test.type](e,s.test)},consequent:function(){return a[s.consequent.type](e,s.consequent)},alternate:s.alternate&&function(){return a[s.alternate.type](e,s.alternate)}})},Import:function(e,s){var a=this;return e.reduceImport(s,{defaultBinding:s.defaultBinding&&function(){return a.BindingIdentifier(e,s.defaultBinding)},namedImports:s.namedImports.map(function(c){return function(){return a.ImportSpecifier(e,c)}})})},ImportNamespace:function(e,s){var a=this;return e.reduceImportNamespace(s,{defaultBinding:s.defaultBinding&&function(){return a.BindingIdentifier(e,s.defaultBinding)},namespaceBinding:function(){return a.BindingIdentifier(e,s.namespaceBinding)}})},ImportSpecifier:function(e,s){var a=this;return e.reduceImportSpecifier(s,{binding:function(){return a.BindingIdentifier(e,s.binding)}})},LabeledStatement:function(e,s){var a=this;return e.reduceLabeledStatement(s,{body:function(){return a[s.body.type](e,s.body)}})},LiteralBooleanExpression:function(e,s){return e.reduceLiteralBooleanExpression(s)},LiteralInfinityExpression:function(e,s){return e.reduceLiteralInfinityExpression(s)},LiteralNullExpression:function(e,s){return e.reduceLiteralNullExpression(s)},LiteralNumericExpression:function(e,s){return e.reduceLiteralNumericExpression(s)},LiteralRegExpExpression:function(e,s){return e.reduceLiteralRegExpExpression(s)},LiteralStringExpression:function(e,s){return e.reduceLiteralStringExpression(s)},Method:function(e,s){var a=this;return e.reduceMethod(s,{name:function(){return a[s.name.type](e,s.name)},params:function(){return a.FormalParameters(e,s.params)},body:function(){return a.FunctionBody(e,s.body)}})},Module:function(e,s){var a=this;return e.reduceModule(s,{directives:s.directives.map(function(c){return function(){return a.Directive(e,c)}}),items:s.items.map(function(c){return function(){return a[c.type](e,c)}})})},NewExpression:function(e,s){var a=this;return e.reduceNewExpression(s,{callee:function(){return a[s.callee.type](e,s.callee)},arguments:s.arguments.map(function(c){return function(){return a[c.type](e,c)}})})},NewTargetExpression:function(e,s){return e.reduceNewTargetExpression(s)},ObjectAssignmentTarget:function(e,s){var a=this;return e.reduceObjectAssignmentTarget(s,{properties:s.properties.map(function(c){return function(){return a[c.type](e,c)}}),rest:s.rest&&function(){return a[s.rest.type](e,s.rest)}})},ObjectBinding:function(e,s){var a=this;return e.reduceObjectBinding(s,{properties:s.properties.map(function(c){return function(){return a[c.type](e,c)}}),rest:s.rest&&function(){return a[s.rest.type](e,s.rest)}})},ObjectExpression:function(e,s){var a=this;return e.reduceObjectExpression(s,{properties:s.properties.map(function(c){return function(){return a[c.type](e,c)}})})},ReturnStatement:function(e,s){var a=this;return e.reduceReturnStatement(s,{expression:s.expression&&function(){return a[s.expression.type](e,s.expression)}})},Script:function(e,s){var a=this;return e.reduceScript(s,{directives:s.directives.map(function(c){return function(){return a.Directive(e,c)}}),statements:s.statements.map(function(c){return function(){return a[c.type](e,c)}})})},Setter:function(e,s){var a=this;return e.reduceSetter(s,{name:function(){return a[s.name.type](e,s.name)},param:function(){return a[s.param.type](e,s.param)},body:function(){return a.FunctionBody(e,s.body)}})},ShorthandProperty:function(e,s){var a=this;return e.reduceShorthandProperty(s,{name:function(){return a.IdentifierExpression(e,s.name)}})},SpreadElement:function(e,s){var a=this;return e.reduceSpreadElement(s,{expression:function(){return a[s.expression.type](e,s.expression)}})},SpreadProperty:function(e,s){var a=this;return e.reduceSpreadProperty(s,{expression:function(){return a[s.expression.type](e,s.expression)}})},StaticMemberAssignmentTarget:function(e,s){var a=this;return e.reduceStaticMemberAssignmentTarget(s,{object:function(){return a[s.object.type](e,s.object)}})},StaticMemberExpression:function(e,s){var a=this;return e.reduceStaticMemberExpression(s,{object:function(){return a[s.object.type](e,s.object)}})},StaticPropertyName:function(e,s){return e.reduceStaticPropertyName(s)},Super:function(e,s){return e.reduceSuper(s)},SwitchCase:function(e,s){var a=this;return e.reduceSwitchCase(s,{test:function(){return a[s.test.type](e,s.test)},consequent:s.consequent.map(function(c){return function(){return a[c.type](e,c)}})})},SwitchDefault:function(e,s){var a=this;return e.reduceSwitchDefault(s,{consequent:s.consequent.map(function(c){return function(){return a[c.type](e,c)}})})},SwitchStatement:function(e,s){var a=this;return e.reduceSwitchStatement(s,{discriminant:function(){return a[s.discriminant.type](e,s.discriminant)},cases:s.cases.map(function(c){return function(){return a.SwitchCase(e,c)}})})},SwitchStatementWithDefault:function(e,s){var a=this;return e.reduceSwitchStatementWithDefault(s,{discriminant:function(){return a[s.discriminant.type](e,s.discriminant)},preDefaultCases:s.preDefaultCases.map(function(c){return function(){return a.SwitchCase(e,c)}}),defaultCase:function(){return a.SwitchDefault(e,s.defaultCase)},postDefaultCases:s.postDefaultCases.map(function(c){return function(){return a.SwitchCase(e,c)}})})},TemplateElement:function(e,s){return e.reduceTemplateElement(s)},TemplateExpression:function(e,s){var a=this;return e.reduceTemplateExpression(s,{tag:s.tag&&function(){return a[s.tag.type](e,s.tag)},elements:s.elements.map(function(c){return function(){return a[c.type](e,c)}})})},ThisExpression:function(e,s){return e.reduceThisExpression(s)},ThrowStatement:function(e,s){var a=this;return e.reduceThrowStatement(s,{expression:function(){return a[s.expression.type](e,s.expression)}})},TryCatchStatement:function(e,s){var a=this;return e.reduceTryCatchStatement(s,{body:function(){return a.Block(e,s.body)},catchClause:function(){return a.CatchClause(e,s.catchClause)}})},TryFinallyStatement:function(e,s){var a=this;return e.reduceTryFinallyStatement(s,{body:function(){return a.Block(e,s.body)},catchClause:s.catchClause&&function(){return a.CatchClause(e,s.catchClause)},finalizer:function(){return a.Block(e,s.finalizer)}})},UnaryExpression:function(e,s){var a=this;return e.reduceUnaryExpression(s,{operand:function(){return a[s.operand.type](e,s.operand)}})},UpdateExpression:function(e,s){var a=this;return e.reduceUpdateExpression(s,{operand:function(){return a[s.operand.type](e,s.operand)}})},VariableDeclaration:function(e,s){var a=this;return e.reduceVariableDeclaration(s,{declarators:s.declarators.map(function(c){return function(){return a.VariableDeclarator(e,c)}})})},VariableDeclarationStatement:function(e,s){var a=this;return e.reduceVariableDeclarationStatement(s,{declaration:function(){return a.VariableDeclaration(e,s.declaration)}})},VariableDeclarator:function(e,s){var a=this;return e.reduceVariableDeclarator(s,{binding:function(){return a[s.binding.type](e,s.binding)},init:s.init&&function(){return a[s.init.type](e,s.init)}})},WhileStatement:function(e,s){var a=this;return e.reduceWhileStatement(s,{test:function(){return a[s.test.type](e,s.test)},body:function(){return a[s.body.type](e,s.body)}})},WithStatement:function(e,s){var a=this;return e.reduceWithStatement(s,{object:function(){return a[s.object.type](e,s.object)},body:function(){return a[s.body.type](e,s.body)}})},YieldExpression:function(e,s){var a=this;return e.reduceYieldExpression(s,{expression:s.expression&&function(){return a[s.expression.type](e,s.expression)}})},YieldGeneratorExpression:function(e,s){var a=this;return e.reduceYieldGeneratorExpression(s,{expression:function(){return a[s.expression.type](e,s.expression)}})}};function thunkedReduce(o,e){return director[e.type](o,e)}var thunkify$1={};Object.defineProperty(thunkify$1,"__esModule",{value:!0});thunkify$1.default=thunkify;function thunkify(o){return{reduceArrayAssignmentTarget:function(s,a){var c=a.elements,h=a.rest;return o.reduceArrayAssignmentTarget(s,{elements:c.map(function(d){return d==null?null:d()}),rest:h==null?null:h()})},reduceArrayBinding:function(s,a){var c=a.elements,h=a.rest;return o.reduceArrayBinding(s,{elements:c.map(function(d){return d==null?null:d()}),rest:h==null?null:h()})},reduceArrayExpression:function(s,a){var c=a.elements;return o.reduceArrayExpression(s,{elements:c.map(function(h){return h==null?null:h()})})},reduceArrowExpression:function(s,a){var c=a.params,h=a.body;return o.reduceArrowExpression(s,{params:c(),body:h()})},reduceAssignmentExpression:function(s,a){var c=a.binding,h=a.expression;return o.reduceAssignmentExpression(s,{binding:c(),expression:h()})},reduceAssignmentTargetIdentifier:function(s){return o.reduceAssignmentTargetIdentifier(s)},reduceAssignmentTargetPropertyIdentifier:function(s,a){var c=a.binding,h=a.init;return o.reduceAssignmentTargetPropertyIdentifier(s,{binding:c(),init:h==null?null:h()})},reduceAssignmentTargetPropertyProperty:function(s,a){var c=a.name,h=a.binding;return o.reduceAssignmentTargetPropertyProperty(s,{name:c(),binding:h()})},reduceAssignmentTargetWithDefault:function(s,a){var c=a.binding,h=a.init;return o.reduceAssignmentTargetWithDefault(s,{binding:c(),init:h()})},reduceAwaitExpression:function(s,a){var c=a.expression;return o.reduceAwaitExpression(s,{expression:c()})},reduceBinaryExpression:function(s,a){var c=a.left,h=a.right;return o.reduceBinaryExpression(s,{left:c(),right:h()})},reduceBindingIdentifier:function(s){return o.reduceBindingIdentifier(s)},reduceBindingPropertyIdentifier:function(s,a){var c=a.binding,h=a.init;return o.reduceBindingPropertyIdentifier(s,{binding:c(),init:h==null?null:h()})},reduceBindingPropertyProperty:function(s,a){var c=a.name,h=a.binding;return o.reduceBindingPropertyProperty(s,{name:c(),binding:h()})},reduceBindingWithDefault:function(s,a){var c=a.binding,h=a.init;return o.reduceBindingWithDefault(s,{binding:c(),init:h()})},reduceBlock:function(s,a){var c=a.statements;return o.reduceBlock(s,{statements:c.map(function(h){return h()})})},reduceBlockStatement:function(s,a){var c=a.block;return o.reduceBlockStatement(s,{block:c()})},reduceBreakStatement:function(s){return o.reduceBreakStatement(s)},reduceCallExpression:function(s,a){var c=a.callee,h=a.arguments;return o.reduceCallExpression(s,{callee:c(),arguments:h.map(function(d){return d()})})},reduceCatchClause:function(s,a){var c=a.binding,h=a.body;return o.reduceCatchClause(s,{binding:c(),body:h()})},reduceClassDeclaration:function(s,a){var c=a.name,h=a.super,d=a.elements;return o.reduceClassDeclaration(s,{name:c(),super:h==null?null:h(),elements:d.map(function(g){return g()})})},reduceClassElement:function(s,a){var c=a.method;return o.reduceClassElement(s,{method:c()})},reduceClassExpression:function(s,a){var c=a.name,h=a.super,d=a.elements;return o.reduceClassExpression(s,{name:c==null?null:c(),super:h==null?null:h(),elements:d.map(function(g){return g()})})},reduceCompoundAssignmentExpression:function(s,a){var c=a.binding,h=a.expression;return o.reduceCompoundAssignmentExpression(s,{binding:c(),expression:h()})},reduceComputedMemberAssignmentTarget:function(s,a){var c=a.object,h=a.expression;return o.reduceComputedMemberAssignmentTarget(s,{object:c(),expression:h()})},reduceComputedMemberExpression:function(s,a){var c=a.object,h=a.expression;return o.reduceComputedMemberExpression(s,{object:c(),expression:h()})},reduceComputedPropertyName:function(s,a){var c=a.expression;return o.reduceComputedPropertyName(s,{expression:c()})},reduceConditionalExpression:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return o.reduceConditionalExpression(s,{test:c(),consequent:h(),alternate:d()})},reduceContinueStatement:function(s){return o.reduceContinueStatement(s)},reduceDataProperty:function(s,a){var c=a.name,h=a.expression;return o.reduceDataProperty(s,{name:c(),expression:h()})},reduceDebuggerStatement:function(s){return o.reduceDebuggerStatement(s)},reduceDirective:function(s){return o.reduceDirective(s)},reduceDoWhileStatement:function(s,a){var c=a.body,h=a.test;return o.reduceDoWhileStatement(s,{body:c(),test:h()})},reduceEmptyStatement:function(s){return o.reduceEmptyStatement(s)},reduceExport:function(s,a){var c=a.declaration;return o.reduceExport(s,{declaration:c()})},reduceExportAllFrom:function(s){return o.reduceExportAllFrom(s)},reduceExportDefault:function(s,a){var c=a.body;return o.reduceExportDefault(s,{body:c()})},reduceExportFrom:function(s,a){var c=a.namedExports;return o.reduceExportFrom(s,{namedExports:c.map(function(h){return h()})})},reduceExportFromSpecifier:function(s){return o.reduceExportFromSpecifier(s)},reduceExportLocalSpecifier:function(s,a){var c=a.name;return o.reduceExportLocalSpecifier(s,{name:c()})},reduceExportLocals:function(s,a){var c=a.namedExports;return o.reduceExportLocals(s,{namedExports:c.map(function(h){return h()})})},reduceExpressionStatement:function(s,a){var c=a.expression;return o.reduceExpressionStatement(s,{expression:c()})},reduceForAwaitStatement:function(s,a){var c=a.left,h=a.right,d=a.body;return o.reduceForAwaitStatement(s,{left:c(),right:h(),body:d()})},reduceForInStatement:function(s,a){var c=a.left,h=a.right,d=a.body;return o.reduceForInStatement(s,{left:c(),right:h(),body:d()})},reduceForOfStatement:function(s,a){var c=a.left,h=a.right,d=a.body;return o.reduceForOfStatement(s,{left:c(),right:h(),body:d()})},reduceForStatement:function(s,a){var c=a.init,h=a.test,d=a.update,g=a.body;return o.reduceForStatement(s,{init:c==null?null:c(),test:h==null?null:h(),update:d==null?null:d(),body:g()})},reduceFormalParameters:function(s,a){var c=a.items,h=a.rest;return o.reduceFormalParameters(s,{items:c.map(function(d){return d()}),rest:h==null?null:h()})},reduceFunctionBody:function(s,a){var c=a.directives,h=a.statements;return o.reduceFunctionBody(s,{directives:c.map(function(d){return d()}),statements:h.map(function(d){return d()})})},reduceFunctionDeclaration:function(s,a){var c=a.name,h=a.params,d=a.body;return o.reduceFunctionDeclaration(s,{name:c(),params:h(),body:d()})},reduceFunctionExpression:function(s,a){var c=a.name,h=a.params,d=a.body;return o.reduceFunctionExpression(s,{name:c==null?null:c(),params:h(),body:d()})},reduceGetter:function(s,a){var c=a.name,h=a.body;return o.reduceGetter(s,{name:c(),body:h()})},reduceIdentifierExpression:function(s){return o.reduceIdentifierExpression(s)},reduceIfStatement:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return o.reduceIfStatement(s,{test:c(),consequent:h(),alternate:d==null?null:d()})},reduceImport:function(s,a){var c=a.defaultBinding,h=a.namedImports;return o.reduceImport(s,{defaultBinding:c==null?null:c(),namedImports:h.map(function(d){return d()})})},reduceImportNamespace:function(s,a){var c=a.defaultBinding,h=a.namespaceBinding;return o.reduceImportNamespace(s,{defaultBinding:c==null?null:c(),namespaceBinding:h()})},reduceImportSpecifier:function(s,a){var c=a.binding;return o.reduceImportSpecifier(s,{binding:c()})},reduceLabeledStatement:function(s,a){var c=a.body;return o.reduceLabeledStatement(s,{body:c()})},reduceLiteralBooleanExpression:function(s){return o.reduceLiteralBooleanExpression(s)},reduceLiteralInfinityExpression:function(s){return o.reduceLiteralInfinityExpression(s)},reduceLiteralNullExpression:function(s){return o.reduceLiteralNullExpression(s)},reduceLiteralNumericExpression:function(s){return o.reduceLiteralNumericExpression(s)},reduceLiteralRegExpExpression:function(s){return o.reduceLiteralRegExpExpression(s)},reduceLiteralStringExpression:function(s){return o.reduceLiteralStringExpression(s)},reduceMethod:function(s,a){var c=a.name,h=a.params,d=a.body;return o.reduceMethod(s,{name:c(),params:h(),body:d()})},reduceModule:function(s,a){var c=a.directives,h=a.items;return o.reduceModule(s,{directives:c.map(function(d){return d()}),items:h.map(function(d){return d()})})},reduceNewExpression:function(s,a){var c=a.callee,h=a.arguments;return o.reduceNewExpression(s,{callee:c(),arguments:h.map(function(d){return d()})})},reduceNewTargetExpression:function(s){return o.reduceNewTargetExpression(s)},reduceObjectAssignmentTarget:function(s,a){var c=a.properties,h=a.rest;return o.reduceObjectAssignmentTarget(s,{properties:c.map(function(d){return d()}),rest:h==null?null:h()})},reduceObjectBinding:function(s,a){var c=a.properties,h=a.rest;return o.reduceObjectBinding(s,{properties:c.map(function(d){return d()}),rest:h==null?null:h()})},reduceObjectExpression:function(s,a){var c=a.properties;return o.reduceObjectExpression(s,{properties:c.map(function(h){return h()})})},reduceReturnStatement:function(s,a){var c=a.expression;return o.reduceReturnStatement(s,{expression:c==null?null:c()})},reduceScript:function(s,a){var c=a.directives,h=a.statements;return o.reduceScript(s,{directives:c.map(function(d){return d()}),statements:h.map(function(d){return d()})})},reduceSetter:function(s,a){var c=a.name,h=a.param,d=a.body;return o.reduceSetter(s,{name:c(),param:h(),body:d()})},reduceShorthandProperty:function(s,a){var c=a.name;return o.reduceShorthandProperty(s,{name:c()})},reduceSpreadElement:function(s,a){var c=a.expression;return o.reduceSpreadElement(s,{expression:c()})},reduceSpreadProperty:function(s,a){var c=a.expression;return o.reduceSpreadProperty(s,{expression:c()})},reduceStaticMemberAssignmentTarget:function(s,a){var c=a.object;return o.reduceStaticMemberAssignmentTarget(s,{object:c()})},reduceStaticMemberExpression:function(s,a){var c=a.object;return o.reduceStaticMemberExpression(s,{object:c()})},reduceStaticPropertyName:function(s){return o.reduceStaticPropertyName(s)},reduceSuper:function(s){return o.reduceSuper(s)},reduceSwitchCase:function(s,a){var c=a.test,h=a.consequent;return o.reduceSwitchCase(s,{test:c(),consequent:h.map(function(d){return d()})})},reduceSwitchDefault:function(s,a){var c=a.consequent;return o.reduceSwitchDefault(s,{consequent:c.map(function(h){return h()})})},reduceSwitchStatement:function(s,a){var c=a.discriminant,h=a.cases;return o.reduceSwitchStatement(s,{discriminant:c(),cases:h.map(function(d){return d()})})},reduceSwitchStatementWithDefault:function(s,a){var c=a.discriminant,h=a.preDefaultCases,d=a.defaultCase,g=a.postDefaultCases;return o.reduceSwitchStatementWithDefault(s,{discriminant:c(),preDefaultCases:h.map(function(_){return _()}),defaultCase:d(),postDefaultCases:g.map(function(_){return _()})})},reduceTemplateElement:function(s){return o.reduceTemplateElement(s)},reduceTemplateExpression:function(s,a){var c=a.tag,h=a.elements;return o.reduceTemplateExpression(s,{tag:c==null?null:c(),elements:h.map(function(d){return d()})})},reduceThisExpression:function(s){return o.reduceThisExpression(s)},reduceThrowStatement:function(s,a){var c=a.expression;return o.reduceThrowStatement(s,{expression:c()})},reduceTryCatchStatement:function(s,a){var c=a.body,h=a.catchClause;return o.reduceTryCatchStatement(s,{body:c(),catchClause:h()})},reduceTryFinallyStatement:function(s,a){var c=a.body,h=a.catchClause,d=a.finalizer;return o.reduceTryFinallyStatement(s,{body:c(),catchClause:h==null?null:h(),finalizer:d()})},reduceUnaryExpression:function(s,a){var c=a.operand;return o.reduceUnaryExpression(s,{operand:c()})},reduceUpdateExpression:function(s,a){var c=a.operand;return o.reduceUpdateExpression(s,{operand:c()})},reduceVariableDeclaration:function(s,a){var c=a.declarators;return o.reduceVariableDeclaration(s,{declarators:c.map(function(h){return h()})})},reduceVariableDeclarationStatement:function(s,a){var c=a.declaration;return o.reduceVariableDeclarationStatement(s,{declaration:c()})},reduceVariableDeclarator:function(s,a){var c=a.binding,h=a.init;return o.reduceVariableDeclarator(s,{binding:c(),init:h==null?null:h()})},reduceWhileStatement:function(s,a){var c=a.test,h=a.body;return o.reduceWhileStatement(s,{test:c(),body:h()})},reduceWithStatement:function(s,a){var c=a.object,h=a.body;return o.reduceWithStatement(s,{object:c(),body:h()})},reduceYieldExpression:function(s,a){var c=a.expression;return o.reduceYieldExpression(s,{expression:c==null?null:c()})},reduceYieldGeneratorExpression:function(s,a){var c=a.expression;return o.reduceYieldGeneratorExpression(s,{expression:c()})}}}var thunkifyClass$1={};Object.defineProperty(thunkifyClass$1,"__esModule",{value:!0});var _createClass$b=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_get$3=function o(e,s,a){e===null&&(e=Function.prototype);var c=Object.getOwnPropertyDescriptor(e,s);if(c===void 0){var h=Object.getPrototypeOf(e);return h===null?void 0:o(h,s,a)}else{if("value"in c)return c.value;var d=c.get;return d===void 0?void 0:d.call(a)}};thunkifyClass$1.default=thunkifyClass;function _classCallCheck$e(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$6(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits$6(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}function thunkifyClass(o){return function(e){_inherits$6(s,e);function s(){return _classCallCheck$e(this,s),_possibleConstructorReturn$6(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return _createClass$b(s,[{key:"reduceArrayAssignmentTarget",value:function(c,h){var d=h.elements,g=h.rest;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceArrayAssignmentTarget",this).call(this,c,{elements:d.map(function(_){return _==null?null:_()}),rest:g==null?null:g()})}},{key:"reduceArrayBinding",value:function(c,h){var d=h.elements,g=h.rest;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceArrayBinding",this).call(this,c,{elements:d.map(function(_){return _==null?null:_()}),rest:g==null?null:g()})}},{key:"reduceArrayExpression",value:function(c,h){var d=h.elements;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceArrayExpression",this).call(this,c,{elements:d.map(function(g){return g==null?null:g()})})}},{key:"reduceArrowExpression",value:function(c,h){var d=h.params,g=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceArrowExpression",this).call(this,c,{params:d(),body:g()})}},{key:"reduceAssignmentExpression",value:function(c,h){var d=h.binding,g=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceAssignmentExpression",this).call(this,c,{binding:d(),expression:g()})}},{key:"reduceAssignmentTargetIdentifier",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceAssignmentTargetIdentifier",this).call(this,c)}},{key:"reduceAssignmentTargetPropertyIdentifier",value:function(c,h){var d=h.binding,g=h.init;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceAssignmentTargetPropertyIdentifier",this).call(this,c,{binding:d(),init:g==null?null:g()})}},{key:"reduceAssignmentTargetPropertyProperty",value:function(c,h){var d=h.name,g=h.binding;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceAssignmentTargetPropertyProperty",this).call(this,c,{name:d(),binding:g()})}},{key:"reduceAssignmentTargetWithDefault",value:function(c,h){var d=h.binding,g=h.init;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceAssignmentTargetWithDefault",this).call(this,c,{binding:d(),init:g()})}},{key:"reduceAwaitExpression",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceAwaitExpression",this).call(this,c,{expression:d()})}},{key:"reduceBinaryExpression",value:function(c,h){var d=h.left,g=h.right;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceBinaryExpression",this).call(this,c,{left:d(),right:g()})}},{key:"reduceBindingIdentifier",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceBindingIdentifier",this).call(this,c)}},{key:"reduceBindingPropertyIdentifier",value:function(c,h){var d=h.binding,g=h.init;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceBindingPropertyIdentifier",this).call(this,c,{binding:d(),init:g==null?null:g()})}},{key:"reduceBindingPropertyProperty",value:function(c,h){var d=h.name,g=h.binding;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceBindingPropertyProperty",this).call(this,c,{name:d(),binding:g()})}},{key:"reduceBindingWithDefault",value:function(c,h){var d=h.binding,g=h.init;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceBindingWithDefault",this).call(this,c,{binding:d(),init:g()})}},{key:"reduceBlock",value:function(c,h){var d=h.statements;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceBlock",this).call(this,c,{statements:d.map(function(g){return g()})})}},{key:"reduceBlockStatement",value:function(c,h){var d=h.block;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceBlockStatement",this).call(this,c,{block:d()})}},{key:"reduceBreakStatement",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceBreakStatement",this).call(this,c)}},{key:"reduceCallExpression",value:function(c,h){var d=h.callee,g=h.arguments;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceCallExpression",this).call(this,c,{callee:d(),arguments:g.map(function(_){return _()})})}},{key:"reduceCatchClause",value:function(c,h){var d=h.binding,g=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceCatchClause",this).call(this,c,{binding:d(),body:g()})}},{key:"reduceClassDeclaration",value:function(c,h){var d=h.name,g=h.super,_=h.elements;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceClassDeclaration",this).call(this,c,{name:d(),super:g==null?null:g(),elements:_.map(function(b){return b()})})}},{key:"reduceClassElement",value:function(c,h){var d=h.method;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceClassElement",this).call(this,c,{method:d()})}},{key:"reduceClassExpression",value:function(c,h){var d=h.name,g=h.super,_=h.elements;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceClassExpression",this).call(this,c,{name:d==null?null:d(),super:g==null?null:g(),elements:_.map(function(b){return b()})})}},{key:"reduceCompoundAssignmentExpression",value:function(c,h){var d=h.binding,g=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceCompoundAssignmentExpression",this).call(this,c,{binding:d(),expression:g()})}},{key:"reduceComputedMemberAssignmentTarget",value:function(c,h){var d=h.object,g=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceComputedMemberAssignmentTarget",this).call(this,c,{object:d(),expression:g()})}},{key:"reduceComputedMemberExpression",value:function(c,h){var d=h.object,g=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceComputedMemberExpression",this).call(this,c,{object:d(),expression:g()})}},{key:"reduceComputedPropertyName",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceComputedPropertyName",this).call(this,c,{expression:d()})}},{key:"reduceConditionalExpression",value:function(c,h){var d=h.test,g=h.consequent,_=h.alternate;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceConditionalExpression",this).call(this,c,{test:d(),consequent:g(),alternate:_()})}},{key:"reduceContinueStatement",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceContinueStatement",this).call(this,c)}},{key:"reduceDataProperty",value:function(c,h){var d=h.name,g=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceDataProperty",this).call(this,c,{name:d(),expression:g()})}},{key:"reduceDebuggerStatement",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceDebuggerStatement",this).call(this,c)}},{key:"reduceDirective",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceDirective",this).call(this,c)}},{key:"reduceDoWhileStatement",value:function(c,h){var d=h.body,g=h.test;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceDoWhileStatement",this).call(this,c,{body:d(),test:g()})}},{key:"reduceEmptyStatement",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceEmptyStatement",this).call(this,c)}},{key:"reduceExport",value:function(c,h){var d=h.declaration;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceExport",this).call(this,c,{declaration:d()})}},{key:"reduceExportAllFrom",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceExportAllFrom",this).call(this,c)}},{key:"reduceExportDefault",value:function(c,h){var d=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceExportDefault",this).call(this,c,{body:d()})}},{key:"reduceExportFrom",value:function(c,h){var d=h.namedExports;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceExportFrom",this).call(this,c,{namedExports:d.map(function(g){return g()})})}},{key:"reduceExportFromSpecifier",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceExportFromSpecifier",this).call(this,c)}},{key:"reduceExportLocalSpecifier",value:function(c,h){var d=h.name;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceExportLocalSpecifier",this).call(this,c,{name:d()})}},{key:"reduceExportLocals",value:function(c,h){var d=h.namedExports;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceExportLocals",this).call(this,c,{namedExports:d.map(function(g){return g()})})}},{key:"reduceExpressionStatement",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceExpressionStatement",this).call(this,c,{expression:d()})}},{key:"reduceForAwaitStatement",value:function(c,h){var d=h.left,g=h.right,_=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceForAwaitStatement",this).call(this,c,{left:d(),right:g(),body:_()})}},{key:"reduceForInStatement",value:function(c,h){var d=h.left,g=h.right,_=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceForInStatement",this).call(this,c,{left:d(),right:g(),body:_()})}},{key:"reduceForOfStatement",value:function(c,h){var d=h.left,g=h.right,_=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceForOfStatement",this).call(this,c,{left:d(),right:g(),body:_()})}},{key:"reduceForStatement",value:function(c,h){var d=h.init,g=h.test,_=h.update,b=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceForStatement",this).call(this,c,{init:d==null?null:d(),test:g==null?null:g(),update:_==null?null:_(),body:b()})}},{key:"reduceFormalParameters",value:function(c,h){var d=h.items,g=h.rest;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceFormalParameters",this).call(this,c,{items:d.map(function(_){return _()}),rest:g==null?null:g()})}},{key:"reduceFunctionBody",value:function(c,h){var d=h.directives,g=h.statements;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceFunctionBody",this).call(this,c,{directives:d.map(function(_){return _()}),statements:g.map(function(_){return _()})})}},{key:"reduceFunctionDeclaration",value:function(c,h){var d=h.name,g=h.params,_=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceFunctionDeclaration",this).call(this,c,{name:d(),params:g(),body:_()})}},{key:"reduceFunctionExpression",value:function(c,h){var d=h.name,g=h.params,_=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceFunctionExpression",this).call(this,c,{name:d==null?null:d(),params:g(),body:_()})}},{key:"reduceGetter",value:function(c,h){var d=h.name,g=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceGetter",this).call(this,c,{name:d(),body:g()})}},{key:"reduceIdentifierExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceIdentifierExpression",this).call(this,c)}},{key:"reduceIfStatement",value:function(c,h){var d=h.test,g=h.consequent,_=h.alternate;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceIfStatement",this).call(this,c,{test:d(),consequent:g(),alternate:_==null?null:_()})}},{key:"reduceImport",value:function(c,h){var d=h.defaultBinding,g=h.namedImports;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceImport",this).call(this,c,{defaultBinding:d==null?null:d(),namedImports:g.map(function(_){return _()})})}},{key:"reduceImportNamespace",value:function(c,h){var d=h.defaultBinding,g=h.namespaceBinding;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceImportNamespace",this).call(this,c,{defaultBinding:d==null?null:d(),namespaceBinding:g()})}},{key:"reduceImportSpecifier",value:function(c,h){var d=h.binding;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceImportSpecifier",this).call(this,c,{binding:d()})}},{key:"reduceLabeledStatement",value:function(c,h){var d=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceLabeledStatement",this).call(this,c,{body:d()})}},{key:"reduceLiteralBooleanExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceLiteralBooleanExpression",this).call(this,c)}},{key:"reduceLiteralInfinityExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceLiteralInfinityExpression",this).call(this,c)}},{key:"reduceLiteralNullExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceLiteralNullExpression",this).call(this,c)}},{key:"reduceLiteralNumericExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceLiteralNumericExpression",this).call(this,c)}},{key:"reduceLiteralRegExpExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceLiteralRegExpExpression",this).call(this,c)}},{key:"reduceLiteralStringExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceLiteralStringExpression",this).call(this,c)}},{key:"reduceMethod",value:function(c,h){var d=h.name,g=h.params,_=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceMethod",this).call(this,c,{name:d(),params:g(),body:_()})}},{key:"reduceModule",value:function(c,h){var d=h.directives,g=h.items;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceModule",this).call(this,c,{directives:d.map(function(_){return _()}),items:g.map(function(_){return _()})})}},{key:"reduceNewExpression",value:function(c,h){var d=h.callee,g=h.arguments;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceNewExpression",this).call(this,c,{callee:d(),arguments:g.map(function(_){return _()})})}},{key:"reduceNewTargetExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceNewTargetExpression",this).call(this,c)}},{key:"reduceObjectAssignmentTarget",value:function(c,h){var d=h.properties,g=h.rest;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceObjectAssignmentTarget",this).call(this,c,{properties:d.map(function(_){return _()}),rest:g==null?null:g()})}},{key:"reduceObjectBinding",value:function(c,h){var d=h.properties,g=h.rest;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceObjectBinding",this).call(this,c,{properties:d.map(function(_){return _()}),rest:g==null?null:g()})}},{key:"reduceObjectExpression",value:function(c,h){var d=h.properties;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceObjectExpression",this).call(this,c,{properties:d.map(function(g){return g()})})}},{key:"reduceReturnStatement",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceReturnStatement",this).call(this,c,{expression:d==null?null:d()})}},{key:"reduceScript",value:function(c,h){var d=h.directives,g=h.statements;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceScript",this).call(this,c,{directives:d.map(function(_){return _()}),statements:g.map(function(_){return _()})})}},{key:"reduceSetter",value:function(c,h){var d=h.name,g=h.param,_=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceSetter",this).call(this,c,{name:d(),param:g(),body:_()})}},{key:"reduceShorthandProperty",value:function(c,h){var d=h.name;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceShorthandProperty",this).call(this,c,{name:d()})}},{key:"reduceSpreadElement",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceSpreadElement",this).call(this,c,{expression:d()})}},{key:"reduceSpreadProperty",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceSpreadProperty",this).call(this,c,{expression:d()})}},{key:"reduceStaticMemberAssignmentTarget",value:function(c,h){var d=h.object;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceStaticMemberAssignmentTarget",this).call(this,c,{object:d()})}},{key:"reduceStaticMemberExpression",value:function(c,h){var d=h.object;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceStaticMemberExpression",this).call(this,c,{object:d()})}},{key:"reduceStaticPropertyName",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceStaticPropertyName",this).call(this,c)}},{key:"reduceSuper",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceSuper",this).call(this,c)}},{key:"reduceSwitchCase",value:function(c,h){var d=h.test,g=h.consequent;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceSwitchCase",this).call(this,c,{test:d(),consequent:g.map(function(_){return _()})})}},{key:"reduceSwitchDefault",value:function(c,h){var d=h.consequent;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceSwitchDefault",this).call(this,c,{consequent:d.map(function(g){return g()})})}},{key:"reduceSwitchStatement",value:function(c,h){var d=h.discriminant,g=h.cases;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceSwitchStatement",this).call(this,c,{discriminant:d(),cases:g.map(function(_){return _()})})}},{key:"reduceSwitchStatementWithDefault",value:function(c,h){var d=h.discriminant,g=h.preDefaultCases,_=h.defaultCase,b=h.postDefaultCases;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceSwitchStatementWithDefault",this).call(this,c,{discriminant:d(),preDefaultCases:g.map(function($){return $()}),defaultCase:_(),postDefaultCases:b.map(function($){return $()})})}},{key:"reduceTemplateElement",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceTemplateElement",this).call(this,c)}},{key:"reduceTemplateExpression",value:function(c,h){var d=h.tag,g=h.elements;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceTemplateExpression",this).call(this,c,{tag:d==null?null:d(),elements:g.map(function(_){return _()})})}},{key:"reduceThisExpression",value:function(c){return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceThisExpression",this).call(this,c)}},{key:"reduceThrowStatement",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceThrowStatement",this).call(this,c,{expression:d()})}},{key:"reduceTryCatchStatement",value:function(c,h){var d=h.body,g=h.catchClause;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceTryCatchStatement",this).call(this,c,{body:d(),catchClause:g()})}},{key:"reduceTryFinallyStatement",value:function(c,h){var d=h.body,g=h.catchClause,_=h.finalizer;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceTryFinallyStatement",this).call(this,c,{body:d(),catchClause:g==null?null:g(),finalizer:_()})}},{key:"reduceUnaryExpression",value:function(c,h){var d=h.operand;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceUnaryExpression",this).call(this,c,{operand:d()})}},{key:"reduceUpdateExpression",value:function(c,h){var d=h.operand;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceUpdateExpression",this).call(this,c,{operand:d()})}},{key:"reduceVariableDeclaration",value:function(c,h){var d=h.declarators;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceVariableDeclaration",this).call(this,c,{declarators:d.map(function(g){return g()})})}},{key:"reduceVariableDeclarationStatement",value:function(c,h){var d=h.declaration;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceVariableDeclarationStatement",this).call(this,c,{declaration:d()})}},{key:"reduceVariableDeclarator",value:function(c,h){var d=h.binding,g=h.init;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceVariableDeclarator",this).call(this,c,{binding:d(),init:g==null?null:g()})}},{key:"reduceWhileStatement",value:function(c,h){var d=h.test,g=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceWhileStatement",this).call(this,c,{test:d(),body:g()})}},{key:"reduceWithStatement",value:function(c,h){var d=h.object,g=h.body;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceWithStatement",this).call(this,c,{object:d(),body:g()})}},{key:"reduceYieldExpression",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceYieldExpression",this).call(this,c,{expression:d==null?null:d()})}},{key:"reduceYieldGeneratorExpression",value:function(c,h){var d=h.expression;return _get$3(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"reduceYieldGeneratorExpression",this).call(this,c,{expression:d()})}}]),s}(o)}var memoize$1={},dist$3={};Object.defineProperty(dist$3,"__esModule",{value:!0});function _classCallCheck$d(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}dist$3.ArrayAssignmentTarget=function o(e){var s=e.elements,a=e.rest;_classCallCheck$d(this,o),this.type="ArrayAssignmentTarget",this.elements=s,this.rest=a};dist$3.ArrayBinding=function o(e){var s=e.elements,a=e.rest;_classCallCheck$d(this,o),this.type="ArrayBinding",this.elements=s,this.rest=a};dist$3.ArrayExpression=function o(e){var s=e.elements;_classCallCheck$d(this,o),this.type="ArrayExpression",this.elements=s};dist$3.ArrowExpression=function o(e){var s=e.isAsync,a=e.params,c=e.body;_classCallCheck$d(this,o),this.type="ArrowExpression",this.isAsync=s,this.params=a,this.body=c};dist$3.AssignmentExpression=function o(e){var s=e.binding,a=e.expression;_classCallCheck$d(this,o),this.type="AssignmentExpression",this.binding=s,this.expression=a};dist$3.AssignmentTargetIdentifier=function o(e){var s=e.name;_classCallCheck$d(this,o),this.type="AssignmentTargetIdentifier",this.name=s};dist$3.AssignmentTargetPropertyIdentifier=function o(e){var s=e.binding,a=e.init;_classCallCheck$d(this,o),this.type="AssignmentTargetPropertyIdentifier",this.binding=s,this.init=a};dist$3.AssignmentTargetPropertyProperty=function o(e){var s=e.name,a=e.binding;_classCallCheck$d(this,o),this.type="AssignmentTargetPropertyProperty",this.name=s,this.binding=a};dist$3.AssignmentTargetWithDefault=function o(e){var s=e.binding,a=e.init;_classCallCheck$d(this,o),this.type="AssignmentTargetWithDefault",this.binding=s,this.init=a};dist$3.AwaitExpression=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="AwaitExpression",this.expression=s};dist$3.BinaryExpression=function o(e){var s=e.left,a=e.operator,c=e.right;_classCallCheck$d(this,o),this.type="BinaryExpression",this.left=s,this.operator=a,this.right=c};dist$3.BindingIdentifier=function o(e){var s=e.name;_classCallCheck$d(this,o),this.type="BindingIdentifier",this.name=s};dist$3.BindingPropertyIdentifier=function o(e){var s=e.binding,a=e.init;_classCallCheck$d(this,o),this.type="BindingPropertyIdentifier",this.binding=s,this.init=a};dist$3.BindingPropertyProperty=function o(e){var s=e.name,a=e.binding;_classCallCheck$d(this,o),this.type="BindingPropertyProperty",this.name=s,this.binding=a};dist$3.BindingWithDefault=function o(e){var s=e.binding,a=e.init;_classCallCheck$d(this,o),this.type="BindingWithDefault",this.binding=s,this.init=a};dist$3.Block=function o(e){var s=e.statements;_classCallCheck$d(this,o),this.type="Block",this.statements=s};dist$3.BlockStatement=function o(e){var s=e.block;_classCallCheck$d(this,o),this.type="BlockStatement",this.block=s};dist$3.BreakStatement=function o(e){var s=e.label;_classCallCheck$d(this,o),this.type="BreakStatement",this.label=s};dist$3.CallExpression=function o(e){var s=e.callee,a=e.arguments;_classCallCheck$d(this,o),this.type="CallExpression",this.callee=s,this.arguments=a};dist$3.CatchClause=function o(e){var s=e.binding,a=e.body;_classCallCheck$d(this,o),this.type="CatchClause",this.binding=s,this.body=a};dist$3.ClassDeclaration=function o(e){var s=e.name,a=e.super,c=e.elements;_classCallCheck$d(this,o),this.type="ClassDeclaration",this.name=s,this.super=a,this.elements=c};dist$3.ClassElement=function o(e){var s=e.isStatic,a=e.method;_classCallCheck$d(this,o),this.type="ClassElement",this.isStatic=s,this.method=a};dist$3.ClassExpression=function o(e){var s=e.name,a=e.super,c=e.elements;_classCallCheck$d(this,o),this.type="ClassExpression",this.name=s,this.super=a,this.elements=c};dist$3.CompoundAssignmentExpression=function o(e){var s=e.binding,a=e.operator,c=e.expression;_classCallCheck$d(this,o),this.type="CompoundAssignmentExpression",this.binding=s,this.operator=a,this.expression=c};dist$3.ComputedMemberAssignmentTarget=function o(e){var s=e.object,a=e.expression;_classCallCheck$d(this,o),this.type="ComputedMemberAssignmentTarget",this.object=s,this.expression=a};dist$3.ComputedMemberExpression=function o(e){var s=e.object,a=e.expression;_classCallCheck$d(this,o),this.type="ComputedMemberExpression",this.object=s,this.expression=a};dist$3.ComputedPropertyName=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="ComputedPropertyName",this.expression=s};dist$3.ConditionalExpression=function o(e){var s=e.test,a=e.consequent,c=e.alternate;_classCallCheck$d(this,o),this.type="ConditionalExpression",this.test=s,this.consequent=a,this.alternate=c};dist$3.ContinueStatement=function o(e){var s=e.label;_classCallCheck$d(this,o),this.type="ContinueStatement",this.label=s};dist$3.DataProperty=function o(e){var s=e.name,a=e.expression;_classCallCheck$d(this,o),this.type="DataProperty",this.name=s,this.expression=a};dist$3.DebuggerStatement=function o(){_classCallCheck$d(this,o),this.type="DebuggerStatement"};dist$3.Directive=function o(e){var s=e.rawValue;_classCallCheck$d(this,o),this.type="Directive",this.rawValue=s};dist$3.DoWhileStatement=function o(e){var s=e.body,a=e.test;_classCallCheck$d(this,o),this.type="DoWhileStatement",this.body=s,this.test=a};dist$3.EmptyStatement=function o(){_classCallCheck$d(this,o),this.type="EmptyStatement"};dist$3.Export=function o(e){var s=e.declaration;_classCallCheck$d(this,o),this.type="Export",this.declaration=s};dist$3.ExportAllFrom=function o(e){var s=e.moduleSpecifier;_classCallCheck$d(this,o),this.type="ExportAllFrom",this.moduleSpecifier=s};dist$3.ExportDefault=function o(e){var s=e.body;_classCallCheck$d(this,o),this.type="ExportDefault",this.body=s};dist$3.ExportFrom=function o(e){var s=e.namedExports,a=e.moduleSpecifier;_classCallCheck$d(this,o),this.type="ExportFrom",this.namedExports=s,this.moduleSpecifier=a};dist$3.ExportFromSpecifier=function o(e){var s=e.name,a=e.exportedName;_classCallCheck$d(this,o),this.type="ExportFromSpecifier",this.name=s,this.exportedName=a};dist$3.ExportLocalSpecifier=function o(e){var s=e.name,a=e.exportedName;_classCallCheck$d(this,o),this.type="ExportLocalSpecifier",this.name=s,this.exportedName=a};dist$3.ExportLocals=function o(e){var s=e.namedExports;_classCallCheck$d(this,o),this.type="ExportLocals",this.namedExports=s};dist$3.ExpressionStatement=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="ExpressionStatement",this.expression=s};dist$3.ForAwaitStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$d(this,o),this.type="ForAwaitStatement",this.left=s,this.right=a,this.body=c};dist$3.ForInStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$d(this,o),this.type="ForInStatement",this.left=s,this.right=a,this.body=c};dist$3.ForOfStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$d(this,o),this.type="ForOfStatement",this.left=s,this.right=a,this.body=c};dist$3.ForStatement=function o(e){var s=e.init,a=e.test,c=e.update,h=e.body;_classCallCheck$d(this,o),this.type="ForStatement",this.init=s,this.test=a,this.update=c,this.body=h};dist$3.FormalParameters=function o(e){var s=e.items,a=e.rest;_classCallCheck$d(this,o),this.type="FormalParameters",this.items=s,this.rest=a};dist$3.FunctionBody=function o(e){var s=e.directives,a=e.statements;_classCallCheck$d(this,o),this.type="FunctionBody",this.directives=s,this.statements=a};dist$3.FunctionDeclaration=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$d(this,o),this.type="FunctionDeclaration",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$3.FunctionExpression=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$d(this,o),this.type="FunctionExpression",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$3.Getter=function o(e){var s=e.name,a=e.body;_classCallCheck$d(this,o),this.type="Getter",this.name=s,this.body=a};dist$3.IdentifierExpression=function o(e){var s=e.name;_classCallCheck$d(this,o),this.type="IdentifierExpression",this.name=s};dist$3.IfStatement=function o(e){var s=e.test,a=e.consequent,c=e.alternate;_classCallCheck$d(this,o),this.type="IfStatement",this.test=s,this.consequent=a,this.alternate=c};dist$3.Import=function o(e){var s=e.defaultBinding,a=e.namedImports,c=e.moduleSpecifier;_classCallCheck$d(this,o),this.type="Import",this.defaultBinding=s,this.namedImports=a,this.moduleSpecifier=c};dist$3.ImportNamespace=function o(e){var s=e.defaultBinding,a=e.namespaceBinding,c=e.moduleSpecifier;_classCallCheck$d(this,o),this.type="ImportNamespace",this.defaultBinding=s,this.namespaceBinding=a,this.moduleSpecifier=c};dist$3.ImportSpecifier=function o(e){var s=e.name,a=e.binding;_classCallCheck$d(this,o),this.type="ImportSpecifier",this.name=s,this.binding=a};dist$3.LabeledStatement=function o(e){var s=e.label,a=e.body;_classCallCheck$d(this,o),this.type="LabeledStatement",this.label=s,this.body=a};dist$3.LiteralBooleanExpression=function o(e){var s=e.value;_classCallCheck$d(this,o),this.type="LiteralBooleanExpression",this.value=s};dist$3.LiteralInfinityExpression=function o(){_classCallCheck$d(this,o),this.type="LiteralInfinityExpression"};dist$3.LiteralNullExpression=function o(){_classCallCheck$d(this,o),this.type="LiteralNullExpression"};dist$3.LiteralNumericExpression=function o(e){var s=e.value;_classCallCheck$d(this,o),this.type="LiteralNumericExpression",this.value=s};dist$3.LiteralRegExpExpression=function o(e){var s=e.pattern,a=e.global,c=e.ignoreCase,h=e.multiLine,d=e.dotAll,g=e.unicode,_=e.sticky;_classCallCheck$d(this,o),this.type="LiteralRegExpExpression",this.pattern=s,this.global=a,this.ignoreCase=c,this.multiLine=h,this.dotAll=d,this.unicode=g,this.sticky=_};dist$3.LiteralStringExpression=function o(e){var s=e.value;_classCallCheck$d(this,o),this.type="LiteralStringExpression",this.value=s};dist$3.Method=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$d(this,o),this.type="Method",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$3.Module=function o(e){var s=e.directives,a=e.items;_classCallCheck$d(this,o),this.type="Module",this.directives=s,this.items=a};dist$3.NewExpression=function o(e){var s=e.callee,a=e.arguments;_classCallCheck$d(this,o),this.type="NewExpression",this.callee=s,this.arguments=a};dist$3.NewTargetExpression=function o(){_classCallCheck$d(this,o),this.type="NewTargetExpression"};dist$3.ObjectAssignmentTarget=function o(e){var s=e.properties,a=e.rest;_classCallCheck$d(this,o),this.type="ObjectAssignmentTarget",this.properties=s,this.rest=a};dist$3.ObjectBinding=function o(e){var s=e.properties,a=e.rest;_classCallCheck$d(this,o),this.type="ObjectBinding",this.properties=s,this.rest=a};dist$3.ObjectExpression=function o(e){var s=e.properties;_classCallCheck$d(this,o),this.type="ObjectExpression",this.properties=s};dist$3.ReturnStatement=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="ReturnStatement",this.expression=s};dist$3.Script=function o(e){var s=e.directives,a=e.statements;_classCallCheck$d(this,o),this.type="Script",this.directives=s,this.statements=a};dist$3.Setter=function o(e){var s=e.name,a=e.param,c=e.body;_classCallCheck$d(this,o),this.type="Setter",this.name=s,this.param=a,this.body=c};dist$3.ShorthandProperty=function o(e){var s=e.name;_classCallCheck$d(this,o),this.type="ShorthandProperty",this.name=s};dist$3.SpreadElement=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="SpreadElement",this.expression=s};dist$3.SpreadProperty=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="SpreadProperty",this.expression=s};dist$3.StaticMemberAssignmentTarget=function o(e){var s=e.object,a=e.property;_classCallCheck$d(this,o),this.type="StaticMemberAssignmentTarget",this.object=s,this.property=a};dist$3.StaticMemberExpression=function o(e){var s=e.object,a=e.property;_classCallCheck$d(this,o),this.type="StaticMemberExpression",this.object=s,this.property=a};dist$3.StaticPropertyName=function o(e){var s=e.value;_classCallCheck$d(this,o),this.type="StaticPropertyName",this.value=s};dist$3.Super=function o(){_classCallCheck$d(this,o),this.type="Super"};dist$3.SwitchCase=function o(e){var s=e.test,a=e.consequent;_classCallCheck$d(this,o),this.type="SwitchCase",this.test=s,this.consequent=a};dist$3.SwitchDefault=function o(e){var s=e.consequent;_classCallCheck$d(this,o),this.type="SwitchDefault",this.consequent=s};dist$3.SwitchStatement=function o(e){var s=e.discriminant,a=e.cases;_classCallCheck$d(this,o),this.type="SwitchStatement",this.discriminant=s,this.cases=a};dist$3.SwitchStatementWithDefault=function o(e){var s=e.discriminant,a=e.preDefaultCases,c=e.defaultCase,h=e.postDefaultCases;_classCallCheck$d(this,o),this.type="SwitchStatementWithDefault",this.discriminant=s,this.preDefaultCases=a,this.defaultCase=c,this.postDefaultCases=h};dist$3.TemplateElement=function o(e){var s=e.rawValue;_classCallCheck$d(this,o),this.type="TemplateElement",this.rawValue=s};dist$3.TemplateExpression=function o(e){var s=e.tag,a=e.elements;_classCallCheck$d(this,o),this.type="TemplateExpression",this.tag=s,this.elements=a};dist$3.ThisExpression=function o(){_classCallCheck$d(this,o),this.type="ThisExpression"};dist$3.ThrowStatement=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="ThrowStatement",this.expression=s};dist$3.TryCatchStatement=function o(e){var s=e.body,a=e.catchClause;_classCallCheck$d(this,o),this.type="TryCatchStatement",this.body=s,this.catchClause=a};dist$3.TryFinallyStatement=function o(e){var s=e.body,a=e.catchClause,c=e.finalizer;_classCallCheck$d(this,o),this.type="TryFinallyStatement",this.body=s,this.catchClause=a,this.finalizer=c};dist$3.UnaryExpression=function o(e){var s=e.operator,a=e.operand;_classCallCheck$d(this,o),this.type="UnaryExpression",this.operator=s,this.operand=a};dist$3.UpdateExpression=function o(e){var s=e.isPrefix,a=e.operator,c=e.operand;_classCallCheck$d(this,o),this.type="UpdateExpression",this.isPrefix=s,this.operator=a,this.operand=c};dist$3.VariableDeclaration=function o(e){var s=e.kind,a=e.declarators;_classCallCheck$d(this,o),this.type="VariableDeclaration",this.kind=s,this.declarators=a};dist$3.VariableDeclarationStatement=function o(e){var s=e.declaration;_classCallCheck$d(this,o),this.type="VariableDeclarationStatement",this.declaration=s};dist$3.VariableDeclarator=function o(e){var s=e.binding,a=e.init;_classCallCheck$d(this,o),this.type="VariableDeclarator",this.binding=s,this.init=a};dist$3.WhileStatement=function o(e){var s=e.test,a=e.body;_classCallCheck$d(this,o),this.type="WhileStatement",this.test=s,this.body=a};dist$3.WithStatement=function o(e){var s=e.object,a=e.body;_classCallCheck$d(this,o),this.type="WithStatement",this.object=s,this.body=a};dist$3.YieldExpression=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="YieldExpression",this.expression=s};dist$3.YieldGeneratorExpression=function o(e){var s=e.expression;_classCallCheck$d(this,o),this.type="YieldGeneratorExpression",this.expression=s};Object.defineProperty(memoize$1,"__esModule",{value:!0});memoize$1.default=memoize;var _shiftAst$5=dist$3;_interopRequireWildcard$3(_shiftAst$5);function _interopRequireWildcard$3(o){if(o&&o.__esModule)return o;var e={};if(o!=null)for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e.default=o,e}function memoize(o){var e=new WeakMap;return{reduceArrayAssignmentTarget:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceArrayAssignmentTarget(a,c);return e.set(a,h),h},reduceArrayBinding:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceArrayBinding(a,c);return e.set(a,h),h},reduceArrayExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceArrayExpression(a,c);return e.set(a,h),h},reduceArrowExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceArrowExpression(a,c);return e.set(a,h),h},reduceAssignmentExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceAssignmentExpression(a,c);return e.set(a,h),h},reduceAssignmentTargetIdentifier:function(a){if(e.has(a))return e.get(a);var c=o.reduceAssignmentTargetIdentifier(a);return e.set(a,c),c},reduceAssignmentTargetPropertyIdentifier:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceAssignmentTargetPropertyIdentifier(a,c);return e.set(a,h),h},reduceAssignmentTargetPropertyProperty:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceAssignmentTargetPropertyProperty(a,c);return e.set(a,h),h},reduceAssignmentTargetWithDefault:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceAssignmentTargetWithDefault(a,c);return e.set(a,h),h},reduceAwaitExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceAwaitExpression(a,c);return e.set(a,h),h},reduceBinaryExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceBinaryExpression(a,c);return e.set(a,h),h},reduceBindingIdentifier:function(a){if(e.has(a))return e.get(a);var c=o.reduceBindingIdentifier(a);return e.set(a,c),c},reduceBindingPropertyIdentifier:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceBindingPropertyIdentifier(a,c);return e.set(a,h),h},reduceBindingPropertyProperty:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceBindingPropertyProperty(a,c);return e.set(a,h),h},reduceBindingWithDefault:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceBindingWithDefault(a,c);return e.set(a,h),h},reduceBlock:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceBlock(a,c);return e.set(a,h),h},reduceBlockStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceBlockStatement(a,c);return e.set(a,h),h},reduceBreakStatement:function(a){if(e.has(a))return e.get(a);var c=o.reduceBreakStatement(a);return e.set(a,c),c},reduceCallExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceCallExpression(a,c);return e.set(a,h),h},reduceCatchClause:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceCatchClause(a,c);return e.set(a,h),h},reduceClassDeclaration:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceClassDeclaration(a,c);return e.set(a,h),h},reduceClassElement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceClassElement(a,c);return e.set(a,h),h},reduceClassExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceClassExpression(a,c);return e.set(a,h),h},reduceCompoundAssignmentExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceCompoundAssignmentExpression(a,c);return e.set(a,h),h},reduceComputedMemberAssignmentTarget:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceComputedMemberAssignmentTarget(a,c);return e.set(a,h),h},reduceComputedMemberExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceComputedMemberExpression(a,c);return e.set(a,h),h},reduceComputedPropertyName:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceComputedPropertyName(a,c);return e.set(a,h),h},reduceConditionalExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceConditionalExpression(a,c);return e.set(a,h),h},reduceContinueStatement:function(a){if(e.has(a))return e.get(a);var c=o.reduceContinueStatement(a);return e.set(a,c),c},reduceDataProperty:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceDataProperty(a,c);return e.set(a,h),h},reduceDebuggerStatement:function(a){if(e.has(a))return e.get(a);var c=o.reduceDebuggerStatement(a);return e.set(a,c),c},reduceDirective:function(a){if(e.has(a))return e.get(a);var c=o.reduceDirective(a);return e.set(a,c),c},reduceDoWhileStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceDoWhileStatement(a,c);return e.set(a,h),h},reduceEmptyStatement:function(a){if(e.has(a))return e.get(a);var c=o.reduceEmptyStatement(a);return e.set(a,c),c},reduceExport:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceExport(a,c);return e.set(a,h),h},reduceExportAllFrom:function(a){if(e.has(a))return e.get(a);var c=o.reduceExportAllFrom(a);return e.set(a,c),c},reduceExportDefault:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceExportDefault(a,c);return e.set(a,h),h},reduceExportFrom:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceExportFrom(a,c);return e.set(a,h),h},reduceExportFromSpecifier:function(a){if(e.has(a))return e.get(a);var c=o.reduceExportFromSpecifier(a);return e.set(a,c),c},reduceExportLocalSpecifier:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceExportLocalSpecifier(a,c);return e.set(a,h),h},reduceExportLocals:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceExportLocals(a,c);return e.set(a,h),h},reduceExpressionStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceExpressionStatement(a,c);return e.set(a,h),h},reduceForAwaitStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceForAwaitStatement(a,c);return e.set(a,h),h},reduceForInStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceForInStatement(a,c);return e.set(a,h),h},reduceForOfStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceForOfStatement(a,c);return e.set(a,h),h},reduceForStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceForStatement(a,c);return e.set(a,h),h},reduceFormalParameters:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceFormalParameters(a,c);return e.set(a,h),h},reduceFunctionBody:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceFunctionBody(a,c);return e.set(a,h),h},reduceFunctionDeclaration:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceFunctionDeclaration(a,c);return e.set(a,h),h},reduceFunctionExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceFunctionExpression(a,c);return e.set(a,h),h},reduceGetter:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceGetter(a,c);return e.set(a,h),h},reduceIdentifierExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceIdentifierExpression(a);return e.set(a,c),c},reduceIfStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceIfStatement(a,c);return e.set(a,h),h},reduceImport:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceImport(a,c);return e.set(a,h),h},reduceImportNamespace:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceImportNamespace(a,c);return e.set(a,h),h},reduceImportSpecifier:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceImportSpecifier(a,c);return e.set(a,h),h},reduceLabeledStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceLabeledStatement(a,c);return e.set(a,h),h},reduceLiteralBooleanExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceLiteralBooleanExpression(a);return e.set(a,c),c},reduceLiteralInfinityExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceLiteralInfinityExpression(a);return e.set(a,c),c},reduceLiteralNullExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceLiteralNullExpression(a);return e.set(a,c),c},reduceLiteralNumericExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceLiteralNumericExpression(a);return e.set(a,c),c},reduceLiteralRegExpExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceLiteralRegExpExpression(a);return e.set(a,c),c},reduceLiteralStringExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceLiteralStringExpression(a);return e.set(a,c),c},reduceMethod:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceMethod(a,c);return e.set(a,h),h},reduceModule:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceModule(a,c);return e.set(a,h),h},reduceNewExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceNewExpression(a,c);return e.set(a,h),h},reduceNewTargetExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceNewTargetExpression(a);return e.set(a,c),c},reduceObjectAssignmentTarget:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceObjectAssignmentTarget(a,c);return e.set(a,h),h},reduceObjectBinding:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceObjectBinding(a,c);return e.set(a,h),h},reduceObjectExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceObjectExpression(a,c);return e.set(a,h),h},reduceReturnStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceReturnStatement(a,c);return e.set(a,h),h},reduceScript:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceScript(a,c);return e.set(a,h),h},reduceSetter:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceSetter(a,c);return e.set(a,h),h},reduceShorthandProperty:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceShorthandProperty(a,c);return e.set(a,h),h},reduceSpreadElement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceSpreadElement(a,c);return e.set(a,h),h},reduceSpreadProperty:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceSpreadProperty(a,c);return e.set(a,h),h},reduceStaticMemberAssignmentTarget:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceStaticMemberAssignmentTarget(a,c);return e.set(a,h),h},reduceStaticMemberExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceStaticMemberExpression(a,c);return e.set(a,h),h},reduceStaticPropertyName:function(a){if(e.has(a))return e.get(a);var c=o.reduceStaticPropertyName(a);return e.set(a,c),c},reduceSuper:function(a){if(e.has(a))return e.get(a);var c=o.reduceSuper(a);return e.set(a,c),c},reduceSwitchCase:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceSwitchCase(a,c);return e.set(a,h),h},reduceSwitchDefault:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceSwitchDefault(a,c);return e.set(a,h),h},reduceSwitchStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceSwitchStatement(a,c);return e.set(a,h),h},reduceSwitchStatementWithDefault:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceSwitchStatementWithDefault(a,c);return e.set(a,h),h},reduceTemplateElement:function(a){if(e.has(a))return e.get(a);var c=o.reduceTemplateElement(a);return e.set(a,c),c},reduceTemplateExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceTemplateExpression(a,c);return e.set(a,h),h},reduceThisExpression:function(a){if(e.has(a))return e.get(a);var c=o.reduceThisExpression(a);return e.set(a,c),c},reduceThrowStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceThrowStatement(a,c);return e.set(a,h),h},reduceTryCatchStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceTryCatchStatement(a,c);return e.set(a,h),h},reduceTryFinallyStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceTryFinallyStatement(a,c);return e.set(a,h),h},reduceUnaryExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceUnaryExpression(a,c);return e.set(a,h),h},reduceUpdateExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceUpdateExpression(a,c);return e.set(a,h),h},reduceVariableDeclaration:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceVariableDeclaration(a,c);return e.set(a,h),h},reduceVariableDeclarationStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceVariableDeclarationStatement(a,c);return e.set(a,h),h},reduceVariableDeclarator:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceVariableDeclarator(a,c);return e.set(a,h),h},reduceWhileStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceWhileStatement(a,c);return e.set(a,h),h},reduceWithStatement:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceWithStatement(a,c);return e.set(a,h),h},reduceYieldExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceYieldExpression(a,c);return e.set(a,h),h},reduceYieldGeneratorExpression:function(a,c){if(e.has(a))return e.get(a);var h=o.reduceYieldGeneratorExpression(a,c);return e.set(a,h),h}}}var cloneReducer={};Object.defineProperty(cloneReducer,"__esModule",{value:!0});var _createClass$a=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_shiftAst$4=dist$3,Shift$1=_interopRequireWildcard$2(_shiftAst$4);function _interopRequireWildcard$2(o){if(o&&o.__esModule)return o;var e={};if(o!=null)for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e.default=o,e}function _classCallCheck$c(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}var CloneReducer=function(){function o(){_classCallCheck$c(this,o)}return _createClass$a(o,[{key:"reduceArrayAssignmentTarget",value:function(s,a){var c=a.elements,h=a.rest;return new Shift$1.ArrayAssignmentTarget({elements:c,rest:h})}},{key:"reduceArrayBinding",value:function(s,a){var c=a.elements,h=a.rest;return new Shift$1.ArrayBinding({elements:c,rest:h})}},{key:"reduceArrayExpression",value:function(s,a){var c=a.elements;return new Shift$1.ArrayExpression({elements:c})}},{key:"reduceArrowExpression",value:function(s,a){var c=a.params,h=a.body;return new Shift$1.ArrowExpression({isAsync:s.isAsync,params:c,body:h})}},{key:"reduceAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression;return new Shift$1.AssignmentExpression({binding:c,expression:h})}},{key:"reduceAssignmentTargetIdentifier",value:function(s){return new Shift$1.AssignmentTargetIdentifier({name:s.name})}},{key:"reduceAssignmentTargetPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return new Shift$1.AssignmentTargetPropertyIdentifier({binding:c,init:h})}},{key:"reduceAssignmentTargetPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return new Shift$1.AssignmentTargetPropertyProperty({name:c,binding:h})}},{key:"reduceAssignmentTargetWithDefault",value:function(s,a){var c=a.binding,h=a.init;return new Shift$1.AssignmentTargetWithDefault({binding:c,init:h})}},{key:"reduceAwaitExpression",value:function(s,a){var c=a.expression;return new Shift$1.AwaitExpression({expression:c})}},{key:"reduceBinaryExpression",value:function(s,a){var c=a.left,h=a.right;return new Shift$1.BinaryExpression({left:c,operator:s.operator,right:h})}},{key:"reduceBindingIdentifier",value:function(s){return new Shift$1.BindingIdentifier({name:s.name})}},{key:"reduceBindingPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return new Shift$1.BindingPropertyIdentifier({binding:c,init:h})}},{key:"reduceBindingPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return new Shift$1.BindingPropertyProperty({name:c,binding:h})}},{key:"reduceBindingWithDefault",value:function(s,a){var c=a.binding,h=a.init;return new Shift$1.BindingWithDefault({binding:c,init:h})}},{key:"reduceBlock",value:function(s,a){var c=a.statements;return new Shift$1.Block({statements:c})}},{key:"reduceBlockStatement",value:function(s,a){var c=a.block;return new Shift$1.BlockStatement({block:c})}},{key:"reduceBreakStatement",value:function(s){return new Shift$1.BreakStatement({label:s.label})}},{key:"reduceCallExpression",value:function(s,a){var c=a.callee,h=a.arguments;return new Shift$1.CallExpression({callee:c,arguments:h})}},{key:"reduceCatchClause",value:function(s,a){var c=a.binding,h=a.body;return new Shift$1.CatchClause({binding:c,body:h})}},{key:"reduceClassDeclaration",value:function(s,a){var c=a.name,h=a.super,d=a.elements;return new Shift$1.ClassDeclaration({name:c,super:h,elements:d})}},{key:"reduceClassElement",value:function(s,a){var c=a.method;return new Shift$1.ClassElement({isStatic:s.isStatic,method:c})}},{key:"reduceClassExpression",value:function(s,a){var c=a.name,h=a.super,d=a.elements;return new Shift$1.ClassExpression({name:c,super:h,elements:d})}},{key:"reduceCompoundAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression;return new Shift$1.CompoundAssignmentExpression({binding:c,operator:s.operator,expression:h})}},{key:"reduceComputedMemberAssignmentTarget",value:function(s,a){var c=a.object,h=a.expression;return new Shift$1.ComputedMemberAssignmentTarget({object:c,expression:h})}},{key:"reduceComputedMemberExpression",value:function(s,a){var c=a.object,h=a.expression;return new Shift$1.ComputedMemberExpression({object:c,expression:h})}},{key:"reduceComputedPropertyName",value:function(s,a){var c=a.expression;return new Shift$1.ComputedPropertyName({expression:c})}},{key:"reduceConditionalExpression",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return new Shift$1.ConditionalExpression({test:c,consequent:h,alternate:d})}},{key:"reduceContinueStatement",value:function(s){return new Shift$1.ContinueStatement({label:s.label})}},{key:"reduceDataProperty",value:function(s,a){var c=a.name,h=a.expression;return new Shift$1.DataProperty({name:c,expression:h})}},{key:"reduceDebuggerStatement",value:function(s){return new Shift$1.DebuggerStatement}},{key:"reduceDirective",value:function(s){return new Shift$1.Directive({rawValue:s.rawValue})}},{key:"reduceDoWhileStatement",value:function(s,a){var c=a.body,h=a.test;return new Shift$1.DoWhileStatement({body:c,test:h})}},{key:"reduceEmptyStatement",value:function(s){return new Shift$1.EmptyStatement}},{key:"reduceExport",value:function(s,a){var c=a.declaration;return new Shift$1.Export({declaration:c})}},{key:"reduceExportAllFrom",value:function(s){return new Shift$1.ExportAllFrom({moduleSpecifier:s.moduleSpecifier})}},{key:"reduceExportDefault",value:function(s,a){var c=a.body;return new Shift$1.ExportDefault({body:c})}},{key:"reduceExportFrom",value:function(s,a){var c=a.namedExports;return new Shift$1.ExportFrom({namedExports:c,moduleSpecifier:s.moduleSpecifier})}},{key:"reduceExportFromSpecifier",value:function(s){return new Shift$1.ExportFromSpecifier({name:s.name,exportedName:s.exportedName})}},{key:"reduceExportLocalSpecifier",value:function(s,a){var c=a.name;return new Shift$1.ExportLocalSpecifier({name:c,exportedName:s.exportedName})}},{key:"reduceExportLocals",value:function(s,a){var c=a.namedExports;return new Shift$1.ExportLocals({namedExports:c})}},{key:"reduceExpressionStatement",value:function(s,a){var c=a.expression;return new Shift$1.ExpressionStatement({expression:c})}},{key:"reduceForAwaitStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return new Shift$1.ForAwaitStatement({left:c,right:h,body:d})}},{key:"reduceForInStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return new Shift$1.ForInStatement({left:c,right:h,body:d})}},{key:"reduceForOfStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return new Shift$1.ForOfStatement({left:c,right:h,body:d})}},{key:"reduceForStatement",value:function(s,a){var c=a.init,h=a.test,d=a.update,g=a.body;return new Shift$1.ForStatement({init:c,test:h,update:d,body:g})}},{key:"reduceFormalParameters",value:function(s,a){var c=a.items,h=a.rest;return new Shift$1.FormalParameters({items:c,rest:h})}},{key:"reduceFunctionBody",value:function(s,a){var c=a.directives,h=a.statements;return new Shift$1.FunctionBody({directives:c,statements:h})}},{key:"reduceFunctionDeclaration",value:function(s,a){var c=a.name,h=a.params,d=a.body;return new Shift$1.FunctionDeclaration({isAsync:s.isAsync,isGenerator:s.isGenerator,name:c,params:h,body:d})}},{key:"reduceFunctionExpression",value:function(s,a){var c=a.name,h=a.params,d=a.body;return new Shift$1.FunctionExpression({isAsync:s.isAsync,isGenerator:s.isGenerator,name:c,params:h,body:d})}},{key:"reduceGetter",value:function(s,a){var c=a.name,h=a.body;return new Shift$1.Getter({name:c,body:h})}},{key:"reduceIdentifierExpression",value:function(s){return new Shift$1.IdentifierExpression({name:s.name})}},{key:"reduceIfStatement",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return new Shift$1.IfStatement({test:c,consequent:h,alternate:d})}},{key:"reduceImport",value:function(s,a){var c=a.defaultBinding,h=a.namedImports;return new Shift$1.Import({defaultBinding:c,namedImports:h,moduleSpecifier:s.moduleSpecifier})}},{key:"reduceImportNamespace",value:function(s,a){var c=a.defaultBinding,h=a.namespaceBinding;return new Shift$1.ImportNamespace({defaultBinding:c,namespaceBinding:h,moduleSpecifier:s.moduleSpecifier})}},{key:"reduceImportSpecifier",value:function(s,a){var c=a.binding;return new Shift$1.ImportSpecifier({name:s.name,binding:c})}},{key:"reduceLabeledStatement",value:function(s,a){var c=a.body;return new Shift$1.LabeledStatement({label:s.label,body:c})}},{key:"reduceLiteralBooleanExpression",value:function(s){return new Shift$1.LiteralBooleanExpression({value:s.value})}},{key:"reduceLiteralInfinityExpression",value:function(s){return new Shift$1.LiteralInfinityExpression}},{key:"reduceLiteralNullExpression",value:function(s){return new Shift$1.LiteralNullExpression}},{key:"reduceLiteralNumericExpression",value:function(s){return new Shift$1.LiteralNumericExpression({value:s.value})}},{key:"reduceLiteralRegExpExpression",value:function(s){return new Shift$1.LiteralRegExpExpression({pattern:s.pattern,global:s.global,ignoreCase:s.ignoreCase,multiLine:s.multiLine,dotAll:s.dotAll,unicode:s.unicode,sticky:s.sticky})}},{key:"reduceLiteralStringExpression",value:function(s){return new Shift$1.LiteralStringExpression({value:s.value})}},{key:"reduceMethod",value:function(s,a){var c=a.name,h=a.params,d=a.body;return new Shift$1.Method({isAsync:s.isAsync,isGenerator:s.isGenerator,name:c,params:h,body:d})}},{key:"reduceModule",value:function(s,a){var c=a.directives,h=a.items;return new Shift$1.Module({directives:c,items:h})}},{key:"reduceNewExpression",value:function(s,a){var c=a.callee,h=a.arguments;return new Shift$1.NewExpression({callee:c,arguments:h})}},{key:"reduceNewTargetExpression",value:function(s){return new Shift$1.NewTargetExpression}},{key:"reduceObjectAssignmentTarget",value:function(s,a){var c=a.properties,h=a.rest;return new Shift$1.ObjectAssignmentTarget({properties:c,rest:h})}},{key:"reduceObjectBinding",value:function(s,a){var c=a.properties,h=a.rest;return new Shift$1.ObjectBinding({properties:c,rest:h})}},{key:"reduceObjectExpression",value:function(s,a){var c=a.properties;return new Shift$1.ObjectExpression({properties:c})}},{key:"reduceReturnStatement",value:function(s,a){var c=a.expression;return new Shift$1.ReturnStatement({expression:c})}},{key:"reduceScript",value:function(s,a){var c=a.directives,h=a.statements;return new Shift$1.Script({directives:c,statements:h})}},{key:"reduceSetter",value:function(s,a){var c=a.name,h=a.param,d=a.body;return new Shift$1.Setter({name:c,param:h,body:d})}},{key:"reduceShorthandProperty",value:function(s,a){var c=a.name;return new Shift$1.ShorthandProperty({name:c})}},{key:"reduceSpreadElement",value:function(s,a){var c=a.expression;return new Shift$1.SpreadElement({expression:c})}},{key:"reduceSpreadProperty",value:function(s,a){var c=a.expression;return new Shift$1.SpreadProperty({expression:c})}},{key:"reduceStaticMemberAssignmentTarget",value:function(s,a){var c=a.object;return new Shift$1.StaticMemberAssignmentTarget({object:c,property:s.property})}},{key:"reduceStaticMemberExpression",value:function(s,a){var c=a.object;return new Shift$1.StaticMemberExpression({object:c,property:s.property})}},{key:"reduceStaticPropertyName",value:function(s){return new Shift$1.StaticPropertyName({value:s.value})}},{key:"reduceSuper",value:function(s){return new Shift$1.Super}},{key:"reduceSwitchCase",value:function(s,a){var c=a.test,h=a.consequent;return new Shift$1.SwitchCase({test:c,consequent:h})}},{key:"reduceSwitchDefault",value:function(s,a){var c=a.consequent;return new Shift$1.SwitchDefault({consequent:c})}},{key:"reduceSwitchStatement",value:function(s,a){var c=a.discriminant,h=a.cases;return new Shift$1.SwitchStatement({discriminant:c,cases:h})}},{key:"reduceSwitchStatementWithDefault",value:function(s,a){var c=a.discriminant,h=a.preDefaultCases,d=a.defaultCase,g=a.postDefaultCases;return new Shift$1.SwitchStatementWithDefault({discriminant:c,preDefaultCases:h,defaultCase:d,postDefaultCases:g})}},{key:"reduceTemplateElement",value:function(s){return new Shift$1.TemplateElement({rawValue:s.rawValue})}},{key:"reduceTemplateExpression",value:function(s,a){var c=a.tag,h=a.elements;return new Shift$1.TemplateExpression({tag:c,elements:h})}},{key:"reduceThisExpression",value:function(s){return new Shift$1.ThisExpression}},{key:"reduceThrowStatement",value:function(s,a){var c=a.expression;return new Shift$1.ThrowStatement({expression:c})}},{key:"reduceTryCatchStatement",value:function(s,a){var c=a.body,h=a.catchClause;return new Shift$1.TryCatchStatement({body:c,catchClause:h})}},{key:"reduceTryFinallyStatement",value:function(s,a){var c=a.body,h=a.catchClause,d=a.finalizer;return new Shift$1.TryFinallyStatement({body:c,catchClause:h,finalizer:d})}},{key:"reduceUnaryExpression",value:function(s,a){var c=a.operand;return new Shift$1.UnaryExpression({operator:s.operator,operand:c})}},{key:"reduceUpdateExpression",value:function(s,a){var c=a.operand;return new Shift$1.UpdateExpression({isPrefix:s.isPrefix,operator:s.operator,operand:c})}},{key:"reduceVariableDeclaration",value:function(s,a){var c=a.declarators;return new Shift$1.VariableDeclaration({kind:s.kind,declarators:c})}},{key:"reduceVariableDeclarationStatement",value:function(s,a){var c=a.declaration;return new Shift$1.VariableDeclarationStatement({declaration:c})}},{key:"reduceVariableDeclarator",value:function(s,a){var c=a.binding,h=a.init;return new Shift$1.VariableDeclarator({binding:c,init:h})}},{key:"reduceWhileStatement",value:function(s,a){var c=a.test,h=a.body;return new Shift$1.WhileStatement({test:c,body:h})}},{key:"reduceWithStatement",value:function(s,a){var c=a.object,h=a.body;return new Shift$1.WithStatement({object:c,body:h})}},{key:"reduceYieldExpression",value:function(s,a){var c=a.expression;return new Shift$1.YieldExpression({expression:c})}},{key:"reduceYieldGeneratorExpression",value:function(s,a){var c=a.expression;return new Shift$1.YieldGeneratorExpression({expression:c})}}]),o}();cloneReducer.default=CloneReducer;var lazyCloneReducer={};Object.defineProperty(lazyCloneReducer,"__esModule",{value:!0});var _createClass$9=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_shiftAst$3=dist$3,Shift=_interopRequireWildcard$1(_shiftAst$3);function _interopRequireWildcard$1(o){if(o&&o.__esModule)return o;var e={};if(o!=null)for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e.default=o,e}function _classCallCheck$b(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}var LazyCloneReducer=function(){function o(){_classCallCheck$b(this,o)}return _createClass$9(o,[{key:"reduceArrayAssignmentTarget",value:function(s,a){var c=a.elements,h=a.rest;return s.elements.length===c.length&&s.elements.every(function(d,g){return d===c[g]})&&s.rest===h?s:new Shift.ArrayAssignmentTarget({elements:c,rest:h})}},{key:"reduceArrayBinding",value:function(s,a){var c=a.elements,h=a.rest;return s.elements.length===c.length&&s.elements.every(function(d,g){return d===c[g]})&&s.rest===h?s:new Shift.ArrayBinding({elements:c,rest:h})}},{key:"reduceArrayExpression",value:function(s,a){var c=a.elements;return s.elements.length===c.length&&s.elements.every(function(h,d){return h===c[d]})?s:new Shift.ArrayExpression({elements:c})}},{key:"reduceArrowExpression",value:function(s,a){var c=a.params,h=a.body;return s.params===c&&s.body===h?s:new Shift.ArrowExpression({isAsync:s.isAsync,params:c,body:h})}},{key:"reduceAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression;return s.binding===c&&s.expression===h?s:new Shift.AssignmentExpression({binding:c,expression:h})}},{key:"reduceAssignmentTargetIdentifier",value:function(s){return s}},{key:"reduceAssignmentTargetPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return s.binding===c&&s.init===h?s:new Shift.AssignmentTargetPropertyIdentifier({binding:c,init:h})}},{key:"reduceAssignmentTargetPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return s.name===c&&s.binding===h?s:new Shift.AssignmentTargetPropertyProperty({name:c,binding:h})}},{key:"reduceAssignmentTargetWithDefault",value:function(s,a){var c=a.binding,h=a.init;return s.binding===c&&s.init===h?s:new Shift.AssignmentTargetWithDefault({binding:c,init:h})}},{key:"reduceAwaitExpression",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.AwaitExpression({expression:c})}},{key:"reduceBinaryExpression",value:function(s,a){var c=a.left,h=a.right;return s.left===c&&s.right===h?s:new Shift.BinaryExpression({left:c,operator:s.operator,right:h})}},{key:"reduceBindingIdentifier",value:function(s){return s}},{key:"reduceBindingPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return s.binding===c&&s.init===h?s:new Shift.BindingPropertyIdentifier({binding:c,init:h})}},{key:"reduceBindingPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return s.name===c&&s.binding===h?s:new Shift.BindingPropertyProperty({name:c,binding:h})}},{key:"reduceBindingWithDefault",value:function(s,a){var c=a.binding,h=a.init;return s.binding===c&&s.init===h?s:new Shift.BindingWithDefault({binding:c,init:h})}},{key:"reduceBlock",value:function(s,a){var c=a.statements;return s.statements.length===c.length&&s.statements.every(function(h,d){return h===c[d]})?s:new Shift.Block({statements:c})}},{key:"reduceBlockStatement",value:function(s,a){var c=a.block;return s.block===c?s:new Shift.BlockStatement({block:c})}},{key:"reduceBreakStatement",value:function(s){return s}},{key:"reduceCallExpression",value:function(s,a){var c=a.callee,h=a.arguments;return s.callee===c&&s.arguments.length===h.length&&s.arguments.every(function(d,g){return d===h[g]})?s:new Shift.CallExpression({callee:c,arguments:h})}},{key:"reduceCatchClause",value:function(s,a){var c=a.binding,h=a.body;return s.binding===c&&s.body===h?s:new Shift.CatchClause({binding:c,body:h})}},{key:"reduceClassDeclaration",value:function(s,a){var c=a.name,h=a.super,d=a.elements;return s.name===c&&s.super===h&&s.elements.length===d.length&&s.elements.every(function(g,_){return g===d[_]})?s:new Shift.ClassDeclaration({name:c,super:h,elements:d})}},{key:"reduceClassElement",value:function(s,a){var c=a.method;return s.method===c?s:new Shift.ClassElement({isStatic:s.isStatic,method:c})}},{key:"reduceClassExpression",value:function(s,a){var c=a.name,h=a.super,d=a.elements;return s.name===c&&s.super===h&&s.elements.length===d.length&&s.elements.every(function(g,_){return g===d[_]})?s:new Shift.ClassExpression({name:c,super:h,elements:d})}},{key:"reduceCompoundAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression;return s.binding===c&&s.expression===h?s:new Shift.CompoundAssignmentExpression({binding:c,operator:s.operator,expression:h})}},{key:"reduceComputedMemberAssignmentTarget",value:function(s,a){var c=a.object,h=a.expression;return s.object===c&&s.expression===h?s:new Shift.ComputedMemberAssignmentTarget({object:c,expression:h})}},{key:"reduceComputedMemberExpression",value:function(s,a){var c=a.object,h=a.expression;return s.object===c&&s.expression===h?s:new Shift.ComputedMemberExpression({object:c,expression:h})}},{key:"reduceComputedPropertyName",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.ComputedPropertyName({expression:c})}},{key:"reduceConditionalExpression",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return s.test===c&&s.consequent===h&&s.alternate===d?s:new Shift.ConditionalExpression({test:c,consequent:h,alternate:d})}},{key:"reduceContinueStatement",value:function(s){return s}},{key:"reduceDataProperty",value:function(s,a){var c=a.name,h=a.expression;return s.name===c&&s.expression===h?s:new Shift.DataProperty({name:c,expression:h})}},{key:"reduceDebuggerStatement",value:function(s){return s}},{key:"reduceDirective",value:function(s){return s}},{key:"reduceDoWhileStatement",value:function(s,a){var c=a.body,h=a.test;return s.body===c&&s.test===h?s:new Shift.DoWhileStatement({body:c,test:h})}},{key:"reduceEmptyStatement",value:function(s){return s}},{key:"reduceExport",value:function(s,a){var c=a.declaration;return s.declaration===c?s:new Shift.Export({declaration:c})}},{key:"reduceExportAllFrom",value:function(s){return s}},{key:"reduceExportDefault",value:function(s,a){var c=a.body;return s.body===c?s:new Shift.ExportDefault({body:c})}},{key:"reduceExportFrom",value:function(s,a){var c=a.namedExports;return s.namedExports.length===c.length&&s.namedExports.every(function(h,d){return h===c[d]})?s:new Shift.ExportFrom({namedExports:c,moduleSpecifier:s.moduleSpecifier})}},{key:"reduceExportFromSpecifier",value:function(s){return s}},{key:"reduceExportLocalSpecifier",value:function(s,a){var c=a.name;return s.name===c?s:new Shift.ExportLocalSpecifier({name:c,exportedName:s.exportedName})}},{key:"reduceExportLocals",value:function(s,a){var c=a.namedExports;return s.namedExports.length===c.length&&s.namedExports.every(function(h,d){return h===c[d]})?s:new Shift.ExportLocals({namedExports:c})}},{key:"reduceExpressionStatement",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.ExpressionStatement({expression:c})}},{key:"reduceForAwaitStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return s.left===c&&s.right===h&&s.body===d?s:new Shift.ForAwaitStatement({left:c,right:h,body:d})}},{key:"reduceForInStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return s.left===c&&s.right===h&&s.body===d?s:new Shift.ForInStatement({left:c,right:h,body:d})}},{key:"reduceForOfStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return s.left===c&&s.right===h&&s.body===d?s:new Shift.ForOfStatement({left:c,right:h,body:d})}},{key:"reduceForStatement",value:function(s,a){var c=a.init,h=a.test,d=a.update,g=a.body;return s.init===c&&s.test===h&&s.update===d&&s.body===g?s:new Shift.ForStatement({init:c,test:h,update:d,body:g})}},{key:"reduceFormalParameters",value:function(s,a){var c=a.items,h=a.rest;return s.items.length===c.length&&s.items.every(function(d,g){return d===c[g]})&&s.rest===h?s:new Shift.FormalParameters({items:c,rest:h})}},{key:"reduceFunctionBody",value:function(s,a){var c=a.directives,h=a.statements;return s.directives.length===c.length&&s.directives.every(function(d,g){return d===c[g]})&&s.statements.length===h.length&&s.statements.every(function(d,g){return d===h[g]})?s:new Shift.FunctionBody({directives:c,statements:h})}},{key:"reduceFunctionDeclaration",value:function(s,a){var c=a.name,h=a.params,d=a.body;return s.name===c&&s.params===h&&s.body===d?s:new Shift.FunctionDeclaration({isAsync:s.isAsync,isGenerator:s.isGenerator,name:c,params:h,body:d})}},{key:"reduceFunctionExpression",value:function(s,a){var c=a.name,h=a.params,d=a.body;return s.name===c&&s.params===h&&s.body===d?s:new Shift.FunctionExpression({isAsync:s.isAsync,isGenerator:s.isGenerator,name:c,params:h,body:d})}},{key:"reduceGetter",value:function(s,a){var c=a.name,h=a.body;return s.name===c&&s.body===h?s:new Shift.Getter({name:c,body:h})}},{key:"reduceIdentifierExpression",value:function(s){return s}},{key:"reduceIfStatement",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return s.test===c&&s.consequent===h&&s.alternate===d?s:new Shift.IfStatement({test:c,consequent:h,alternate:d})}},{key:"reduceImport",value:function(s,a){var c=a.defaultBinding,h=a.namedImports;return s.defaultBinding===c&&s.namedImports.length===h.length&&s.namedImports.every(function(d,g){return d===h[g]})?s:new Shift.Import({defaultBinding:c,namedImports:h,moduleSpecifier:s.moduleSpecifier})}},{key:"reduceImportNamespace",value:function(s,a){var c=a.defaultBinding,h=a.namespaceBinding;return s.defaultBinding===c&&s.namespaceBinding===h?s:new Shift.ImportNamespace({defaultBinding:c,namespaceBinding:h,moduleSpecifier:s.moduleSpecifier})}},{key:"reduceImportSpecifier",value:function(s,a){var c=a.binding;return s.binding===c?s:new Shift.ImportSpecifier({name:s.name,binding:c})}},{key:"reduceLabeledStatement",value:function(s,a){var c=a.body;return s.body===c?s:new Shift.LabeledStatement({label:s.label,body:c})}},{key:"reduceLiteralBooleanExpression",value:function(s){return s}},{key:"reduceLiteralInfinityExpression",value:function(s){return s}},{key:"reduceLiteralNullExpression",value:function(s){return s}},{key:"reduceLiteralNumericExpression",value:function(s){return s}},{key:"reduceLiteralRegExpExpression",value:function(s){return s}},{key:"reduceLiteralStringExpression",value:function(s){return s}},{key:"reduceMethod",value:function(s,a){var c=a.name,h=a.params,d=a.body;return s.name===c&&s.params===h&&s.body===d?s:new Shift.Method({isAsync:s.isAsync,isGenerator:s.isGenerator,name:c,params:h,body:d})}},{key:"reduceModule",value:function(s,a){var c=a.directives,h=a.items;return s.directives.length===c.length&&s.directives.every(function(d,g){return d===c[g]})&&s.items.length===h.length&&s.items.every(function(d,g){return d===h[g]})?s:new Shift.Module({directives:c,items:h})}},{key:"reduceNewExpression",value:function(s,a){var c=a.callee,h=a.arguments;return s.callee===c&&s.arguments.length===h.length&&s.arguments.every(function(d,g){return d===h[g]})?s:new Shift.NewExpression({callee:c,arguments:h})}},{key:"reduceNewTargetExpression",value:function(s){return s}},{key:"reduceObjectAssignmentTarget",value:function(s,a){var c=a.properties,h=a.rest;return s.properties.length===c.length&&s.properties.every(function(d,g){return d===c[g]})&&s.rest===h?s:new Shift.ObjectAssignmentTarget({properties:c,rest:h})}},{key:"reduceObjectBinding",value:function(s,a){var c=a.properties,h=a.rest;return s.properties.length===c.length&&s.properties.every(function(d,g){return d===c[g]})&&s.rest===h?s:new Shift.ObjectBinding({properties:c,rest:h})}},{key:"reduceObjectExpression",value:function(s,a){var c=a.properties;return s.properties.length===c.length&&s.properties.every(function(h,d){return h===c[d]})?s:new Shift.ObjectExpression({properties:c})}},{key:"reduceReturnStatement",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.ReturnStatement({expression:c})}},{key:"reduceScript",value:function(s,a){var c=a.directives,h=a.statements;return s.directives.length===c.length&&s.directives.every(function(d,g){return d===c[g]})&&s.statements.length===h.length&&s.statements.every(function(d,g){return d===h[g]})?s:new Shift.Script({directives:c,statements:h})}},{key:"reduceSetter",value:function(s,a){var c=a.name,h=a.param,d=a.body;return s.name===c&&s.param===h&&s.body===d?s:new Shift.Setter({name:c,param:h,body:d})}},{key:"reduceShorthandProperty",value:function(s,a){var c=a.name;return s.name===c?s:new Shift.ShorthandProperty({name:c})}},{key:"reduceSpreadElement",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.SpreadElement({expression:c})}},{key:"reduceSpreadProperty",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.SpreadProperty({expression:c})}},{key:"reduceStaticMemberAssignmentTarget",value:function(s,a){var c=a.object;return s.object===c?s:new Shift.StaticMemberAssignmentTarget({object:c,property:s.property})}},{key:"reduceStaticMemberExpression",value:function(s,a){var c=a.object;return s.object===c?s:new Shift.StaticMemberExpression({object:c,property:s.property})}},{key:"reduceStaticPropertyName",value:function(s){return s}},{key:"reduceSuper",value:function(s){return s}},{key:"reduceSwitchCase",value:function(s,a){var c=a.test,h=a.consequent;return s.test===c&&s.consequent.length===h.length&&s.consequent.every(function(d,g){return d===h[g]})?s:new Shift.SwitchCase({test:c,consequent:h})}},{key:"reduceSwitchDefault",value:function(s,a){var c=a.consequent;return s.consequent.length===c.length&&s.consequent.every(function(h,d){return h===c[d]})?s:new Shift.SwitchDefault({consequent:c})}},{key:"reduceSwitchStatement",value:function(s,a){var c=a.discriminant,h=a.cases;return s.discriminant===c&&s.cases.length===h.length&&s.cases.every(function(d,g){return d===h[g]})?s:new Shift.SwitchStatement({discriminant:c,cases:h})}},{key:"reduceSwitchStatementWithDefault",value:function(s,a){var c=a.discriminant,h=a.preDefaultCases,d=a.defaultCase,g=a.postDefaultCases;return s.discriminant===c&&s.preDefaultCases.length===h.length&&s.preDefaultCases.every(function(_,b){return _===h[b]})&&s.defaultCase===d&&s.postDefaultCases.length===g.length&&s.postDefaultCases.every(function(_,b){return _===g[b]})?s:new Shift.SwitchStatementWithDefault({discriminant:c,preDefaultCases:h,defaultCase:d,postDefaultCases:g})}},{key:"reduceTemplateElement",value:function(s){return s}},{key:"reduceTemplateExpression",value:function(s,a){var c=a.tag,h=a.elements;return s.tag===c&&s.elements.length===h.length&&s.elements.every(function(d,g){return d===h[g]})?s:new Shift.TemplateExpression({tag:c,elements:h})}},{key:"reduceThisExpression",value:function(s){return s}},{key:"reduceThrowStatement",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.ThrowStatement({expression:c})}},{key:"reduceTryCatchStatement",value:function(s,a){var c=a.body,h=a.catchClause;return s.body===c&&s.catchClause===h?s:new Shift.TryCatchStatement({body:c,catchClause:h})}},{key:"reduceTryFinallyStatement",value:function(s,a){var c=a.body,h=a.catchClause,d=a.finalizer;return s.body===c&&s.catchClause===h&&s.finalizer===d?s:new Shift.TryFinallyStatement({body:c,catchClause:h,finalizer:d})}},{key:"reduceUnaryExpression",value:function(s,a){var c=a.operand;return s.operand===c?s:new Shift.UnaryExpression({operator:s.operator,operand:c})}},{key:"reduceUpdateExpression",value:function(s,a){var c=a.operand;return s.operand===c?s:new Shift.UpdateExpression({isPrefix:s.isPrefix,operator:s.operator,operand:c})}},{key:"reduceVariableDeclaration",value:function(s,a){var c=a.declarators;return s.declarators.length===c.length&&s.declarators.every(function(h,d){return h===c[d]})?s:new Shift.VariableDeclaration({kind:s.kind,declarators:c})}},{key:"reduceVariableDeclarationStatement",value:function(s,a){var c=a.declaration;return s.declaration===c?s:new Shift.VariableDeclarationStatement({declaration:c})}},{key:"reduceVariableDeclarator",value:function(s,a){var c=a.binding,h=a.init;return s.binding===c&&s.init===h?s:new Shift.VariableDeclarator({binding:c,init:h})}},{key:"reduceWhileStatement",value:function(s,a){var c=a.test,h=a.body;return s.test===c&&s.body===h?s:new Shift.WhileStatement({test:c,body:h})}},{key:"reduceWithStatement",value:function(s,a){var c=a.object,h=a.body;return s.object===c&&s.body===h?s:new Shift.WithStatement({object:c,body:h})}},{key:"reduceYieldExpression",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.YieldExpression({expression:c})}},{key:"reduceYieldGeneratorExpression",value:function(s,a){var c=a.expression;return s.expression===c?s:new Shift.YieldGeneratorExpression({expression:c})}}]),o}();lazyCloneReducer.default=LazyCloneReducer;var monoidalReducer={};Object.defineProperty(monoidalReducer,"__esModule",{value:!0});var _createClass$8=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_shiftAst$2=dist$3;_interopRequireDefault$7(_shiftAst$2);function _interopRequireDefault$7(o){return o&&o.__esModule?o:{default:o}}function _toConsumableArray$5(o){if(Array.isArray(o)){for(var e=0,s=Array(o.length);e<o.length;e++)s[e]=o[e];return s}else return Array.from(o)}function _classCallCheck$a(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}var MonoidalReducer$1=function(){function o(e){_classCallCheck$a(this,o);var s=e.empty();this.identity=s;var a=void 0;if(e.prototype&&typeof e.prototype.concat=="function")a=Function.prototype.call.bind(e.prototype.concat);else if(typeof e.concat=="function")a=e.concat;else throw new TypeError("Monoid must provide a `concat` method");this.append=function(){for(var c=arguments.length,h=Array(c),d=0;d<c;d++)h[d]=arguments[d];return h.reduce(a,s)}}return _createClass$8(o,[{key:"reduceArrayAssignmentTarget",value:function(s,a){var c=a.elements,h=a.rest;return this.append.apply(this,_toConsumableArray$5(c.filter(function(d){return d!=null})).concat([h==null?this.identity:h]))}},{key:"reduceArrayBinding",value:function(s,a){var c=a.elements,h=a.rest;return this.append.apply(this,_toConsumableArray$5(c.filter(function(d){return d!=null})).concat([h==null?this.identity:h]))}},{key:"reduceArrayExpression",value:function(s,a){var c=a.elements;return this.append.apply(this,_toConsumableArray$5(c.filter(function(h){return h!=null})))}},{key:"reduceArrowExpression",value:function(s,a){var c=a.params,h=a.body;return this.append(c,h)}},{key:"reduceAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression;return this.append(c,h)}},{key:"reduceAssignmentTargetIdentifier",value:function(s){return this.identity}},{key:"reduceAssignmentTargetPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return this.append(c,h==null?this.identity:h)}},{key:"reduceAssignmentTargetPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return this.append(c,h)}},{key:"reduceAssignmentTargetWithDefault",value:function(s,a){var c=a.binding,h=a.init;return this.append(c,h)}},{key:"reduceAwaitExpression",value:function(s,a){var c=a.expression;return c}},{key:"reduceBinaryExpression",value:function(s,a){var c=a.left,h=a.right;return this.append(c,h)}},{key:"reduceBindingIdentifier",value:function(s){return this.identity}},{key:"reduceBindingPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return this.append(c,h==null?this.identity:h)}},{key:"reduceBindingPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return this.append(c,h)}},{key:"reduceBindingWithDefault",value:function(s,a){var c=a.binding,h=a.init;return this.append(c,h)}},{key:"reduceBlock",value:function(s,a){var c=a.statements;return this.append.apply(this,_toConsumableArray$5(c))}},{key:"reduceBlockStatement",value:function(s,a){var c=a.block;return c}},{key:"reduceBreakStatement",value:function(s){return this.identity}},{key:"reduceCallExpression",value:function(s,a){var c=a.callee,h=a.arguments;return this.append.apply(this,[c].concat(_toConsumableArray$5(h)))}},{key:"reduceCatchClause",value:function(s,a){var c=a.binding,h=a.body;return this.append(c,h)}},{key:"reduceClassDeclaration",value:function(s,a){var c=a.name,h=a.super,d=a.elements;return this.append.apply(this,[c,h==null?this.identity:h].concat(_toConsumableArray$5(d)))}},{key:"reduceClassElement",value:function(s,a){var c=a.method;return c}},{key:"reduceClassExpression",value:function(s,a){var c=a.name,h=a.super,d=a.elements;return this.append.apply(this,[c==null?this.identity:c,h==null?this.identity:h].concat(_toConsumableArray$5(d)))}},{key:"reduceCompoundAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression;return this.append(c,h)}},{key:"reduceComputedMemberAssignmentTarget",value:function(s,a){var c=a.object,h=a.expression;return this.append(c,h)}},{key:"reduceComputedMemberExpression",value:function(s,a){var c=a.object,h=a.expression;return this.append(c,h)}},{key:"reduceComputedPropertyName",value:function(s,a){var c=a.expression;return c}},{key:"reduceConditionalExpression",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return this.append(c,h,d)}},{key:"reduceContinueStatement",value:function(s){return this.identity}},{key:"reduceDataProperty",value:function(s,a){var c=a.name,h=a.expression;return this.append(c,h)}},{key:"reduceDebuggerStatement",value:function(s){return this.identity}},{key:"reduceDirective",value:function(s){return this.identity}},{key:"reduceDoWhileStatement",value:function(s,a){var c=a.body,h=a.test;return this.append(c,h)}},{key:"reduceEmptyStatement",value:function(s){return this.identity}},{key:"reduceExport",value:function(s,a){var c=a.declaration;return c}},{key:"reduceExportAllFrom",value:function(s){return this.identity}},{key:"reduceExportDefault",value:function(s,a){var c=a.body;return c}},{key:"reduceExportFrom",value:function(s,a){var c=a.namedExports;return this.append.apply(this,_toConsumableArray$5(c))}},{key:"reduceExportFromSpecifier",value:function(s){return this.identity}},{key:"reduceExportLocalSpecifier",value:function(s,a){var c=a.name;return c}},{key:"reduceExportLocals",value:function(s,a){var c=a.namedExports;return this.append.apply(this,_toConsumableArray$5(c))}},{key:"reduceExpressionStatement",value:function(s,a){var c=a.expression;return c}},{key:"reduceForAwaitStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return this.append(c,h,d)}},{key:"reduceForInStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return this.append(c,h,d)}},{key:"reduceForOfStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return this.append(c,h,d)}},{key:"reduceForStatement",value:function(s,a){var c=a.init,h=a.test,d=a.update,g=a.body;return this.append(c==null?this.identity:c,h==null?this.identity:h,d==null?this.identity:d,g)}},{key:"reduceFormalParameters",value:function(s,a){var c=a.items,h=a.rest;return this.append.apply(this,_toConsumableArray$5(c).concat([h==null?this.identity:h]))}},{key:"reduceFunctionBody",value:function(s,a){var c=a.directives,h=a.statements;return this.append.apply(this,_toConsumableArray$5(c).concat(_toConsumableArray$5(h)))}},{key:"reduceFunctionDeclaration",value:function(s,a){var c=a.name,h=a.params,d=a.body;return this.append(c,h,d)}},{key:"reduceFunctionExpression",value:function(s,a){var c=a.name,h=a.params,d=a.body;return this.append(c==null?this.identity:c,h,d)}},{key:"reduceGetter",value:function(s,a){var c=a.name,h=a.body;return this.append(c,h)}},{key:"reduceIdentifierExpression",value:function(s){return this.identity}},{key:"reduceIfStatement",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return this.append(c,h,d==null?this.identity:d)}},{key:"reduceImport",value:function(s,a){var c=a.defaultBinding,h=a.namedImports;return this.append.apply(this,[c==null?this.identity:c].concat(_toConsumableArray$5(h)))}},{key:"reduceImportNamespace",value:function(s,a){var c=a.defaultBinding,h=a.namespaceBinding;return this.append(c==null?this.identity:c,h)}},{key:"reduceImportSpecifier",value:function(s,a){var c=a.binding;return c}},{key:"reduceLabeledStatement",value:function(s,a){var c=a.body;return c}},{key:"reduceLiteralBooleanExpression",value:function(s){return this.identity}},{key:"reduceLiteralInfinityExpression",value:function(s){return this.identity}},{key:"reduceLiteralNullExpression",value:function(s){return this.identity}},{key:"reduceLiteralNumericExpression",value:function(s){return this.identity}},{key:"reduceLiteralRegExpExpression",value:function(s){return this.identity}},{key:"reduceLiteralStringExpression",value:function(s){return this.identity}},{key:"reduceMethod",value:function(s,a){var c=a.name,h=a.params,d=a.body;return this.append(c,h,d)}},{key:"reduceModule",value:function(s,a){var c=a.directives,h=a.items;return this.append.apply(this,_toConsumableArray$5(c).concat(_toConsumableArray$5(h)))}},{key:"reduceNewExpression",value:function(s,a){var c=a.callee,h=a.arguments;return this.append.apply(this,[c].concat(_toConsumableArray$5(h)))}},{key:"reduceNewTargetExpression",value:function(s){return this.identity}},{key:"reduceObjectAssignmentTarget",value:function(s,a){var c=a.properties,h=a.rest;return this.append.apply(this,_toConsumableArray$5(c).concat([h==null?this.identity:h]))}},{key:"reduceObjectBinding",value:function(s,a){var c=a.properties,h=a.rest;return this.append.apply(this,_toConsumableArray$5(c).concat([h==null?this.identity:h]))}},{key:"reduceObjectExpression",value:function(s,a){var c=a.properties;return this.append.apply(this,_toConsumableArray$5(c))}},{key:"reduceReturnStatement",value:function(s,a){var c=a.expression;return c==null?this.identity:c}},{key:"reduceScript",value:function(s,a){var c=a.directives,h=a.statements;return this.append.apply(this,_toConsumableArray$5(c).concat(_toConsumableArray$5(h)))}},{key:"reduceSetter",value:function(s,a){var c=a.name,h=a.param,d=a.body;return this.append(c,h,d)}},{key:"reduceShorthandProperty",value:function(s,a){var c=a.name;return c}},{key:"reduceSpreadElement",value:function(s,a){var c=a.expression;return c}},{key:"reduceSpreadProperty",value:function(s,a){var c=a.expression;return c}},{key:"reduceStaticMemberAssignmentTarget",value:function(s,a){var c=a.object;return c}},{key:"reduceStaticMemberExpression",value:function(s,a){var c=a.object;return c}},{key:"reduceStaticPropertyName",value:function(s){return this.identity}},{key:"reduceSuper",value:function(s){return this.identity}},{key:"reduceSwitchCase",value:function(s,a){var c=a.test,h=a.consequent;return this.append.apply(this,[c].concat(_toConsumableArray$5(h)))}},{key:"reduceSwitchDefault",value:function(s,a){var c=a.consequent;return this.append.apply(this,_toConsumableArray$5(c))}},{key:"reduceSwitchStatement",value:function(s,a){var c=a.discriminant,h=a.cases;return this.append.apply(this,[c].concat(_toConsumableArray$5(h)))}},{key:"reduceSwitchStatementWithDefault",value:function(s,a){var c=a.discriminant,h=a.preDefaultCases,d=a.defaultCase,g=a.postDefaultCases;return this.append.apply(this,[c].concat(_toConsumableArray$5(h),[d],_toConsumableArray$5(g)))}},{key:"reduceTemplateElement",value:function(s){return this.identity}},{key:"reduceTemplateExpression",value:function(s,a){var c=a.tag,h=a.elements;return this.append.apply(this,[c==null?this.identity:c].concat(_toConsumableArray$5(h)))}},{key:"reduceThisExpression",value:function(s){return this.identity}},{key:"reduceThrowStatement",value:function(s,a){var c=a.expression;return c}},{key:"reduceTryCatchStatement",value:function(s,a){var c=a.body,h=a.catchClause;return this.append(c,h)}},{key:"reduceTryFinallyStatement",value:function(s,a){var c=a.body,h=a.catchClause,d=a.finalizer;return this.append(c,h==null?this.identity:h,d)}},{key:"reduceUnaryExpression",value:function(s,a){var c=a.operand;return c}},{key:"reduceUpdateExpression",value:function(s,a){var c=a.operand;return c}},{key:"reduceVariableDeclaration",value:function(s,a){var c=a.declarators;return this.append.apply(this,_toConsumableArray$5(c))}},{key:"reduceVariableDeclarationStatement",value:function(s,a){var c=a.declaration;return c}},{key:"reduceVariableDeclarator",value:function(s,a){var c=a.binding,h=a.init;return this.append(c,h==null?this.identity:h)}},{key:"reduceWhileStatement",value:function(s,a){var c=a.test,h=a.body;return this.append(c,h)}},{key:"reduceWithStatement",value:function(s,a){var c=a.object,h=a.body;return this.append(c,h)}},{key:"reduceYieldExpression",value:function(s,a){var c=a.expression;return c==null?this.identity:c}},{key:"reduceYieldGeneratorExpression",value:function(s,a){var c=a.expression;return c}}]),o}();monoidalReducer.default=MonoidalReducer$1;var thunkedMonoidalReducer={};Object.defineProperty(thunkedMonoidalReducer,"__esModule",{value:!0});var _createClass$7=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_shiftAst$1=dist$3;_interopRequireDefault$6(_shiftAst$1);function _interopRequireDefault$6(o){return o&&o.__esModule?o:{default:o}}function _toConsumableArray$4(o){if(Array.isArray(o)){for(var e=0,s=Array(o.length);e<o.length;e++)s[e]=o[e];return s}else return Array.from(o)}function _classCallCheck$9(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}var MonoidalReducer=function(){function o(e){_classCallCheck$9(this,o);var s=e.empty();this.identity=s;var a=void 0;if(e.prototype&&typeof e.prototype.concatThunk=="function")a=Function.prototype.call.bind(e.prototype.concatThunk);else if(typeof e.concatThunk=="function")a=e.concatThunk;else{var c=void 0;if(e.prototype&&typeof e.prototype.concat=="function")c=Function.prototype.call.bind(e.prototype.concat);else if(typeof e.concat=="function")c=e.concat;else throw new TypeError("Monoid must provide a `concatThunk` or `concat` method");if(typeof e.isAbsorbing=="function"){var h=e.isAbsorbing;a=function(g,_){return h(g)?g:c(g,_())}}else a=function(g,_){return c(g,_())}}this.append=function(){for(var d=arguments.length,g=Array(d),_=0;_<d;_++)g[_]=arguments[_];return g.reduce(a,s)}}return _createClass$7(o,[{key:"reduceArrayAssignmentTarget",value:function(s,a){var c=this,h=a.elements,d=a.rest;return this.append.apply(this,_toConsumableArray$4(h.filter(function(g){return g!=null})).concat([d==null?function(){return c.identity}:d]))}},{key:"reduceArrayBinding",value:function(s,a){var c=this,h=a.elements,d=a.rest;return this.append.apply(this,_toConsumableArray$4(h.filter(function(g){return g!=null})).concat([d==null?function(){return c.identity}:d]))}},{key:"reduceArrayExpression",value:function(s,a){var c=a.elements;return this.append.apply(this,_toConsumableArray$4(c.filter(function(h){return h!=null})))}},{key:"reduceArrowExpression",value:function(s,a){var c=a.params,h=a.body;return this.append(c,h)}},{key:"reduceAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression;return this.append(c,h)}},{key:"reduceAssignmentTargetIdentifier",value:function(s){return this.identity}},{key:"reduceAssignmentTargetPropertyIdentifier",value:function(s,a){var c=this,h=a.binding,d=a.init;return this.append(h,d==null?function(){return c.identity}:d)}},{key:"reduceAssignmentTargetPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return this.append(c,h)}},{key:"reduceAssignmentTargetWithDefault",value:function(s,a){var c=a.binding,h=a.init;return this.append(c,h)}},{key:"reduceAwaitExpression",value:function(s,a){var c=a.expression;return c()}},{key:"reduceBinaryExpression",value:function(s,a){var c=a.left,h=a.right;return this.append(c,h)}},{key:"reduceBindingIdentifier",value:function(s){return this.identity}},{key:"reduceBindingPropertyIdentifier",value:function(s,a){var c=this,h=a.binding,d=a.init;return this.append(h,d==null?function(){return c.identity}:d)}},{key:"reduceBindingPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return this.append(c,h)}},{key:"reduceBindingWithDefault",value:function(s,a){var c=a.binding,h=a.init;return this.append(c,h)}},{key:"reduceBlock",value:function(s,a){var c=a.statements;return this.append.apply(this,_toConsumableArray$4(c))}},{key:"reduceBlockStatement",value:function(s,a){var c=a.block;return c()}},{key:"reduceBreakStatement",value:function(s){return this.identity}},{key:"reduceCallExpression",value:function(s,a){var c=a.callee,h=a.arguments;return this.append.apply(this,[c].concat(_toConsumableArray$4(h)))}},{key:"reduceCatchClause",value:function(s,a){var c=a.binding,h=a.body;return this.append(c,h)}},{key:"reduceClassDeclaration",value:function(s,a){var c=this,h=a.name,d=a.super,g=a.elements;return this.append.apply(this,[h,d==null?function(){return c.identity}:d].concat(_toConsumableArray$4(g)))}},{key:"reduceClassElement",value:function(s,a){var c=a.method;return c()}},{key:"reduceClassExpression",value:function(s,a){var c=this,h=a.name,d=a.super,g=a.elements;return this.append.apply(this,[h==null?function(){return c.identity}:h,d==null?function(){return c.identity}:d].concat(_toConsumableArray$4(g)))}},{key:"reduceCompoundAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression;return this.append(c,h)}},{key:"reduceComputedMemberAssignmentTarget",value:function(s,a){var c=a.object,h=a.expression;return this.append(c,h)}},{key:"reduceComputedMemberExpression",value:function(s,a){var c=a.object,h=a.expression;return this.append(c,h)}},{key:"reduceComputedPropertyName",value:function(s,a){var c=a.expression;return c()}},{key:"reduceConditionalExpression",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return this.append(c,h,d)}},{key:"reduceContinueStatement",value:function(s){return this.identity}},{key:"reduceDataProperty",value:function(s,a){var c=a.name,h=a.expression;return this.append(c,h)}},{key:"reduceDebuggerStatement",value:function(s){return this.identity}},{key:"reduceDirective",value:function(s){return this.identity}},{key:"reduceDoWhileStatement",value:function(s,a){var c=a.body,h=a.test;return this.append(c,h)}},{key:"reduceEmptyStatement",value:function(s){return this.identity}},{key:"reduceExport",value:function(s,a){var c=a.declaration;return c()}},{key:"reduceExportAllFrom",value:function(s){return this.identity}},{key:"reduceExportDefault",value:function(s,a){var c=a.body;return c()}},{key:"reduceExportFrom",value:function(s,a){var c=a.namedExports;return this.append.apply(this,_toConsumableArray$4(c))}},{key:"reduceExportFromSpecifier",value:function(s){return this.identity}},{key:"reduceExportLocalSpecifier",value:function(s,a){var c=a.name;return c()}},{key:"reduceExportLocals",value:function(s,a){var c=a.namedExports;return this.append.apply(this,_toConsumableArray$4(c))}},{key:"reduceExpressionStatement",value:function(s,a){var c=a.expression;return c()}},{key:"reduceForAwaitStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return this.append(c,h,d)}},{key:"reduceForInStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return this.append(c,h,d)}},{key:"reduceForOfStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return this.append(c,h,d)}},{key:"reduceForStatement",value:function(s,a){var c=this,h=a.init,d=a.test,g=a.update,_=a.body;return this.append(h==null?function(){return c.identity}:h,d==null?function(){return c.identity}:d,g==null?function(){return c.identity}:g,_)}},{key:"reduceFormalParameters",value:function(s,a){var c=this,h=a.items,d=a.rest;return this.append.apply(this,_toConsumableArray$4(h).concat([d==null?function(){return c.identity}:d]))}},{key:"reduceFunctionBody",value:function(s,a){var c=a.directives,h=a.statements;return this.append.apply(this,_toConsumableArray$4(c).concat(_toConsumableArray$4(h)))}},{key:"reduceFunctionDeclaration",value:function(s,a){var c=a.name,h=a.params,d=a.body;return this.append(c,h,d)}},{key:"reduceFunctionExpression",value:function(s,a){var c=this,h=a.name,d=a.params,g=a.body;return this.append(h==null?function(){return c.identity}:h,d,g)}},{key:"reduceGetter",value:function(s,a){var c=a.name,h=a.body;return this.append(c,h)}},{key:"reduceIdentifierExpression",value:function(s){return this.identity}},{key:"reduceIfStatement",value:function(s,a){var c=this,h=a.test,d=a.consequent,g=a.alternate;return this.append(h,d,g==null?function(){return c.identity}:g)}},{key:"reduceImport",value:function(s,a){var c=this,h=a.defaultBinding,d=a.namedImports;return this.append.apply(this,[h==null?function(){return c.identity}:h].concat(_toConsumableArray$4(d)))}},{key:"reduceImportNamespace",value:function(s,a){var c=this,h=a.defaultBinding,d=a.namespaceBinding;return this.append(h==null?function(){return c.identity}:h,d)}},{key:"reduceImportSpecifier",value:function(s,a){var c=a.binding;return c()}},{key:"reduceLabeledStatement",value:function(s,a){var c=a.body;return c()}},{key:"reduceLiteralBooleanExpression",value:function(s){return this.identity}},{key:"reduceLiteralInfinityExpression",value:function(s){return this.identity}},{key:"reduceLiteralNullExpression",value:function(s){return this.identity}},{key:"reduceLiteralNumericExpression",value:function(s){return this.identity}},{key:"reduceLiteralRegExpExpression",value:function(s){return this.identity}},{key:"reduceLiteralStringExpression",value:function(s){return this.identity}},{key:"reduceMethod",value:function(s,a){var c=a.name,h=a.params,d=a.body;return this.append(c,h,d)}},{key:"reduceModule",value:function(s,a){var c=a.directives,h=a.items;return this.append.apply(this,_toConsumableArray$4(c).concat(_toConsumableArray$4(h)))}},{key:"reduceNewExpression",value:function(s,a){var c=a.callee,h=a.arguments;return this.append.apply(this,[c].concat(_toConsumableArray$4(h)))}},{key:"reduceNewTargetExpression",value:function(s){return this.identity}},{key:"reduceObjectAssignmentTarget",value:function(s,a){var c=this,h=a.properties,d=a.rest;return this.append.apply(this,_toConsumableArray$4(h).concat([d==null?function(){return c.identity}:d]))}},{key:"reduceObjectBinding",value:function(s,a){var c=this,h=a.properties,d=a.rest;return this.append.apply(this,_toConsumableArray$4(h).concat([d==null?function(){return c.identity}:d]))}},{key:"reduceObjectExpression",value:function(s,a){var c=a.properties;return this.append.apply(this,_toConsumableArray$4(c))}},{key:"reduceReturnStatement",value:function(s,a){var c=a.expression;return c==null?this.identity:c()}},{key:"reduceScript",value:function(s,a){var c=a.directives,h=a.statements;return this.append.apply(this,_toConsumableArray$4(c).concat(_toConsumableArray$4(h)))}},{key:"reduceSetter",value:function(s,a){var c=a.name,h=a.param,d=a.body;return this.append(c,h,d)}},{key:"reduceShorthandProperty",value:function(s,a){var c=a.name;return c()}},{key:"reduceSpreadElement",value:function(s,a){var c=a.expression;return c()}},{key:"reduceSpreadProperty",value:function(s,a){var c=a.expression;return c()}},{key:"reduceStaticMemberAssignmentTarget",value:function(s,a){var c=a.object;return c()}},{key:"reduceStaticMemberExpression",value:function(s,a){var c=a.object;return c()}},{key:"reduceStaticPropertyName",value:function(s){return this.identity}},{key:"reduceSuper",value:function(s){return this.identity}},{key:"reduceSwitchCase",value:function(s,a){var c=a.test,h=a.consequent;return this.append.apply(this,[c].concat(_toConsumableArray$4(h)))}},{key:"reduceSwitchDefault",value:function(s,a){var c=a.consequent;return this.append.apply(this,_toConsumableArray$4(c))}},{key:"reduceSwitchStatement",value:function(s,a){var c=a.discriminant,h=a.cases;return this.append.apply(this,[c].concat(_toConsumableArray$4(h)))}},{key:"reduceSwitchStatementWithDefault",value:function(s,a){var c=a.discriminant,h=a.preDefaultCases,d=a.defaultCase,g=a.postDefaultCases;return this.append.apply(this,[c].concat(_toConsumableArray$4(h),[d],_toConsumableArray$4(g)))}},{key:"reduceTemplateElement",value:function(s){return this.identity}},{key:"reduceTemplateExpression",value:function(s,a){var c=this,h=a.tag,d=a.elements;return this.append.apply(this,[h==null?function(){return c.identity}:h].concat(_toConsumableArray$4(d)))}},{key:"reduceThisExpression",value:function(s){return this.identity}},{key:"reduceThrowStatement",value:function(s,a){var c=a.expression;return c()}},{key:"reduceTryCatchStatement",value:function(s,a){var c=a.body,h=a.catchClause;return this.append(c,h)}},{key:"reduceTryFinallyStatement",value:function(s,a){var c=this,h=a.body,d=a.catchClause,g=a.finalizer;return this.append(h,d==null?function(){return c.identity}:d,g)}},{key:"reduceUnaryExpression",value:function(s,a){var c=a.operand;return c()}},{key:"reduceUpdateExpression",value:function(s,a){var c=a.operand;return c()}},{key:"reduceVariableDeclaration",value:function(s,a){var c=a.declarators;return this.append.apply(this,_toConsumableArray$4(c))}},{key:"reduceVariableDeclarationStatement",value:function(s,a){var c=a.declaration;return c()}},{key:"reduceVariableDeclarator",value:function(s,a){var c=this,h=a.binding,d=a.init;return this.append(h,d==null?function(){return c.identity}:d)}},{key:"reduceWhileStatement",value:function(s,a){var c=a.test,h=a.body;return this.append(c,h)}},{key:"reduceWithStatement",value:function(s,a){var c=a.object,h=a.body;return this.append(c,h)}},{key:"reduceYieldExpression",value:function(s,a){var c=a.expression;return c==null?this.identity:c()}},{key:"reduceYieldGeneratorExpression",value:function(s,a){var c=a.expression;return c()}}]),o}();thunkedMonoidalReducer.default=MonoidalReducer;var adapt={};Object.defineProperty(adapt,"__esModule",{value:!0});var _get$2=function o(e,s,a){e===null&&(e=Function.prototype);var c=Object.getOwnPropertyDescriptor(e,s);if(c===void 0){var h=Object.getPrototypeOf(e);return h===null?void 0:o(h,s,a)}else{if("value"in c)return c.value;var d=c.get;return d===void 0?void 0:d.call(a)}},_shiftAst=dist$3;_interopRequireWildcard(_shiftAst);function _interopRequireWildcard(o){if(o&&o.__esModule)return o;var e={};if(o!=null)for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e.default=o,e}adapt.default=function(o,e){var s;return s={__proto__:e,reduceArrayAssignmentTarget:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceArrayAssignmentTarget",this).call(this,c,h),c)},reduceArrayBinding:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceArrayBinding",this).call(this,c,h),c)},reduceArrayExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceArrayExpression",this).call(this,c,h),c)},reduceArrowExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceArrowExpression",this).call(this,c,h),c)},reduceAssignmentExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceAssignmentExpression",this).call(this,c,h),c)},reduceAssignmentTargetIdentifier:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceAssignmentTargetIdentifier",this).call(this,c,h),c)},reduceAssignmentTargetPropertyIdentifier:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceAssignmentTargetPropertyIdentifier",this).call(this,c,h),c)},reduceAssignmentTargetPropertyProperty:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceAssignmentTargetPropertyProperty",this).call(this,c,h),c)},reduceAssignmentTargetWithDefault:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceAssignmentTargetWithDefault",this).call(this,c,h),c)},reduceAwaitExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceAwaitExpression",this).call(this,c,h),c)},reduceBinaryExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceBinaryExpression",this).call(this,c,h),c)},reduceBindingIdentifier:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceBindingIdentifier",this).call(this,c,h),c)},reduceBindingPropertyIdentifier:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceBindingPropertyIdentifier",this).call(this,c,h),c)},reduceBindingPropertyProperty:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceBindingPropertyProperty",this).call(this,c,h),c)},reduceBindingWithDefault:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceBindingWithDefault",this).call(this,c,h),c)},reduceBlock:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceBlock",this).call(this,c,h),c)},reduceBlockStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceBlockStatement",this).call(this,c,h),c)},reduceBreakStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceBreakStatement",this).call(this,c,h),c)},reduceCallExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceCallExpression",this).call(this,c,h),c)},reduceCatchClause:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceCatchClause",this).call(this,c,h),c)},reduceClassDeclaration:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceClassDeclaration",this).call(this,c,h),c)},reduceClassElement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceClassElement",this).call(this,c,h),c)},reduceClassExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceClassExpression",this).call(this,c,h),c)},reduceCompoundAssignmentExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceCompoundAssignmentExpression",this).call(this,c,h),c)},reduceComputedMemberAssignmentTarget:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceComputedMemberAssignmentTarget",this).call(this,c,h),c)},reduceComputedMemberExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceComputedMemberExpression",this).call(this,c,h),c)},reduceComputedPropertyName:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceComputedPropertyName",this).call(this,c,h),c)},reduceConditionalExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceConditionalExpression",this).call(this,c,h),c)},reduceContinueStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceContinueStatement",this).call(this,c,h),c)},reduceDataProperty:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceDataProperty",this).call(this,c,h),c)},reduceDebuggerStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceDebuggerStatement",this).call(this,c,h),c)},reduceDirective:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceDirective",this).call(this,c,h),c)},reduceDoWhileStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceDoWhileStatement",this).call(this,c,h),c)},reduceEmptyStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceEmptyStatement",this).call(this,c,h),c)},reduceExport:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceExport",this).call(this,c,h),c)},reduceExportAllFrom:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceExportAllFrom",this).call(this,c,h),c)},reduceExportDefault:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceExportDefault",this).call(this,c,h),c)},reduceExportFrom:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceExportFrom",this).call(this,c,h),c)},reduceExportFromSpecifier:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceExportFromSpecifier",this).call(this,c,h),c)},reduceExportLocalSpecifier:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceExportLocalSpecifier",this).call(this,c,h),c)},reduceExportLocals:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceExportLocals",this).call(this,c,h),c)},reduceExpressionStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceExpressionStatement",this).call(this,c,h),c)},reduceForAwaitStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceForAwaitStatement",this).call(this,c,h),c)},reduceForInStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceForInStatement",this).call(this,c,h),c)},reduceForOfStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceForOfStatement",this).call(this,c,h),c)},reduceForStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceForStatement",this).call(this,c,h),c)},reduceFormalParameters:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceFormalParameters",this).call(this,c,h),c)},reduceFunctionBody:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceFunctionBody",this).call(this,c,h),c)},reduceFunctionDeclaration:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceFunctionDeclaration",this).call(this,c,h),c)},reduceFunctionExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceFunctionExpression",this).call(this,c,h),c)},reduceGetter:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceGetter",this).call(this,c,h),c)},reduceIdentifierExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceIdentifierExpression",this).call(this,c,h),c)},reduceIfStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceIfStatement",this).call(this,c,h),c)},reduceImport:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceImport",this).call(this,c,h),c)},reduceImportNamespace:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceImportNamespace",this).call(this,c,h),c)},reduceImportSpecifier:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceImportSpecifier",this).call(this,c,h),c)},reduceLabeledStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceLabeledStatement",this).call(this,c,h),c)},reduceLiteralBooleanExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceLiteralBooleanExpression",this).call(this,c,h),c)},reduceLiteralInfinityExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceLiteralInfinityExpression",this).call(this,c,h),c)},reduceLiteralNullExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceLiteralNullExpression",this).call(this,c,h),c)},reduceLiteralNumericExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceLiteralNumericExpression",this).call(this,c,h),c)},reduceLiteralRegExpExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceLiteralRegExpExpression",this).call(this,c,h),c)},reduceLiteralStringExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceLiteralStringExpression",this).call(this,c,h),c)},reduceMethod:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceMethod",this).call(this,c,h),c)},reduceModule:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceModule",this).call(this,c,h),c)},reduceNewExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceNewExpression",this).call(this,c,h),c)},reduceNewTargetExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceNewTargetExpression",this).call(this,c,h),c)},reduceObjectAssignmentTarget:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceObjectAssignmentTarget",this).call(this,c,h),c)},reduceObjectBinding:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceObjectBinding",this).call(this,c,h),c)},reduceObjectExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceObjectExpression",this).call(this,c,h),c)},reduceReturnStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceReturnStatement",this).call(this,c,h),c)},reduceScript:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceScript",this).call(this,c,h),c)},reduceSetter:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceSetter",this).call(this,c,h),c)},reduceShorthandProperty:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceShorthandProperty",this).call(this,c,h),c)},reduceSpreadElement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceSpreadElement",this).call(this,c,h),c)},reduceSpreadProperty:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceSpreadProperty",this).call(this,c,h),c)},reduceStaticMemberAssignmentTarget:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceStaticMemberAssignmentTarget",this).call(this,c,h),c)},reduceStaticMemberExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceStaticMemberExpression",this).call(this,c,h),c)},reduceStaticPropertyName:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceStaticPropertyName",this).call(this,c,h),c)},reduceSuper:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceSuper",this).call(this,c,h),c)},reduceSwitchCase:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceSwitchCase",this).call(this,c,h),c)},reduceSwitchDefault:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceSwitchDefault",this).call(this,c,h),c)},reduceSwitchStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceSwitchStatement",this).call(this,c,h),c)},reduceSwitchStatementWithDefault:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceSwitchStatementWithDefault",this).call(this,c,h),c)},reduceTemplateElement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceTemplateElement",this).call(this,c,h),c)},reduceTemplateExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceTemplateExpression",this).call(this,c,h),c)},reduceThisExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceThisExpression",this).call(this,c,h),c)},reduceThrowStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceThrowStatement",this).call(this,c,h),c)},reduceTryCatchStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceTryCatchStatement",this).call(this,c,h),c)},reduceTryFinallyStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceTryFinallyStatement",this).call(this,c,h),c)},reduceUnaryExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceUnaryExpression",this).call(this,c,h),c)},reduceUpdateExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceUpdateExpression",this).call(this,c,h),c)},reduceVariableDeclaration:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceVariableDeclaration",this).call(this,c,h),c)},reduceVariableDeclarationStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceVariableDeclarationStatement",this).call(this,c,h),c)},reduceVariableDeclarator:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceVariableDeclarator",this).call(this,c,h),c)},reduceWhileStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceWhileStatement",this).call(this,c,h),c)},reduceWithStatement:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceWithStatement",this).call(this,c,h),c)},reduceYieldExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceYieldExpression",this).call(this,c,h),c)},reduceYieldGeneratorExpression:function(c,h){return o(_get$2(s.__proto__||Object.getPrototypeOf(s),"reduceYieldGeneratorExpression",this).call(this,c,h),c)}}};var reducers={};Object.defineProperty(reducers,"__esModule",{value:!0});reducers.ThunkedOrReducer=reducers.OrReducer=reducers.ThunkedAndReducer=reducers.AndReducer=reducers.ThunkedConcatReducer=reducers.ConcatReducer=reducers.ThunkedPlusReducer=reducers.PlusReducer=void 0;var _monoidalReducer=monoidalReducer,_monoidalReducer2=_interopRequireDefault$5(_monoidalReducer),_thunkedMonoidalReducer=thunkedMonoidalReducer,_thunkedMonoidalReducer2=_interopRequireDefault$5(_thunkedMonoidalReducer);function _interopRequireDefault$5(o){return o&&o.__esModule?o:{default:o}}function _classCallCheck$8(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$5(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits$5(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}var PlusMonoid={empty:function(){return 0},concat:function(e,s){return e+s}},ConcatMonoid={empty:function(){return[]},concat:function(e,s){return e.concat(s)}},AndMonoid={empty:function(){return!0},concat:function(e,s){return e&&s},concatThunk:function(e,s){return e&&s()}},OrMonoid={empty:function(){return!1},concat:function(e,s){return e||s},concatThunk:function(e,s){return e||s()}};reducers.PlusReducer=function(o){_inherits$5(e,o);function e(){return _classCallCheck$8(this,e),_possibleConstructorReturn$5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,PlusMonoid))}return e}(_monoidalReducer2.default);reducers.ThunkedPlusReducer=function(o){_inherits$5(e,o);function e(){return _classCallCheck$8(this,e),_possibleConstructorReturn$5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,PlusMonoid))}return e}(_thunkedMonoidalReducer2.default);reducers.ConcatReducer=function(o){_inherits$5(e,o);function e(){return _classCallCheck$8(this,e),_possibleConstructorReturn$5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,ConcatMonoid))}return e}(_monoidalReducer2.default);reducers.ThunkedConcatReducer=function(o){_inherits$5(e,o);function e(){return _classCallCheck$8(this,e),_possibleConstructorReturn$5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,ConcatMonoid))}return e}(_thunkedMonoidalReducer2.default);reducers.AndReducer=function(o){_inherits$5(e,o);function e(){return _classCallCheck$8(this,e),_possibleConstructorReturn$5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,AndMonoid))}return e}(_monoidalReducer2.default);reducers.ThunkedAndReducer=function(o){_inherits$5(e,o);function e(){return _classCallCheck$8(this,e),_possibleConstructorReturn$5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,AndMonoid))}return e}(_thunkedMonoidalReducer2.default);reducers.OrReducer=function(o){_inherits$5(e,o);function e(){return _classCallCheck$8(this,e),_possibleConstructorReturn$5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,OrMonoid))}return e}(_monoidalReducer2.default);reducers.ThunkedOrReducer=function(o){_inherits$5(e,o);function e(){return _classCallCheck$8(this,e),_possibleConstructorReturn$5(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,OrMonoid))}return e}(_thunkedMonoidalReducer2.default);(function(o){Object.defineProperty(o,"__esModule",{value:!0});var e=director$2;Object.defineProperty(o,"reduce",{enumerable:!0,get:function(){return e.reduce}}),Object.defineProperty(o,"default",{enumerable:!0,get:function(){return e.reduce}});var s=thunkedDirector;Object.defineProperty(o,"thunkedReduce",{enumerable:!0,get:function(){return s.thunkedReduce}});var a=thunkify$1;Object.defineProperty(o,"thunkify",{enumerable:!0,get:function(){return _e(a).default}});var c=thunkifyClass$1;Object.defineProperty(o,"thunkifyClass",{enumerable:!0,get:function(){return _e(c).default}});var h=memoize$1;Object.defineProperty(o,"memoize",{enumerable:!0,get:function(){return _e(h).default}});var d=cloneReducer;Object.defineProperty(o,"CloneReducer",{enumerable:!0,get:function(){return _e(d).default}});var g=lazyCloneReducer;Object.defineProperty(o,"LazyCloneReducer",{enumerable:!0,get:function(){return _e(g).default}});var _=monoidalReducer;Object.defineProperty(o,"MonoidalReducer",{enumerable:!0,get:function(){return _e(_).default}});var b=thunkedMonoidalReducer;Object.defineProperty(o,"ThunkedMonoidalReducer",{enumerable:!0,get:function(){return _e(b).default}});var $=adapt;Object.defineProperty(o,"adapt",{enumerable:!0,get:function(){return _e($).default}});var j=reducers;Object.defineProperty(o,"PlusReducer",{enumerable:!0,get:function(){return j.PlusReducer}}),Object.defineProperty(o,"ThunkedPlusReducer",{enumerable:!0,get:function(){return j.ThunkedPlusReducer}}),Object.defineProperty(o,"ConcatReducer",{enumerable:!0,get:function(){return j.ConcatReducer}}),Object.defineProperty(o,"ThunkedConcatReducer",{enumerable:!0,get:function(){return j.ThunkedConcatReducer}}),Object.defineProperty(o,"AndReducer",{enumerable:!0,get:function(){return j.AndReducer}}),Object.defineProperty(o,"ThunkedAndReducer",{enumerable:!0,get:function(){return j.ThunkedAndReducer}}),Object.defineProperty(o,"OrReducer",{enumerable:!0,get:function(){return j.OrReducer}}),Object.defineProperty(o,"ThunkedOrReducer",{enumerable:!0,get:function(){return j.ThunkedOrReducer}});function _e(et){return et&&et.__esModule?et:{default:et}}})(dist$4);var earlyErrorState={},multimap={exports:{}};(function(o,e){function s(c,h){for(var d=c.keys(),g;!(g=d.next()).done;)h(c.get(g.value),g.value,c)}var a=function(){var c;typeof Map<"u"&&(c=Map,Map.prototype.keys||(Map.prototype.keys=function(){var _=[];return this.forEach(function(b,$){_.push($)}),_}));function h(_){var b=this;b._map=c,h.Map&&(b._map=h.Map),b._=b._map?new b._map:{},_&&_.forEach(function($){b.set($[0],$[1])})}h.prototype.get=function(_){return this._map?this._.get(_):this._[_]},h.prototype.set=function(_,b){var $=Array.prototype.slice.call(arguments);_=$.shift();var j=this.get(_);return j||(j=[],this._map?this._.set(_,j):this._[_]=j),Array.prototype.push.apply(j,$),this},h.prototype.delete=function(_,b){if(!this.has(_))return!1;if(arguments.length==1)return this._map?this._.delete(_):delete this._[_],!0;var $=this.get(_),j=$.indexOf(b);return j!=-1?($.splice(j,1),!0):!1},h.prototype.has=function(_,b){var $=this._map?this._.has(_):this._.hasOwnProperty(_);if(arguments.length==1||!$)return $;var j=this.get(_)||[];return j.indexOf(b)!=-1},h.prototype.keys=function(){return this._map?g(this._.keys()):g(Object.keys(this._))},h.prototype.values=function(){var _=[];return this.forEachEntry(function(b){Array.prototype.push.apply(_,b)}),g(_)},h.prototype.forEachEntry=function(_){s(this,_)},h.prototype.forEach=function(_){var b=this;b.forEachEntry(function($,j){$.forEach(function(_e){_(_e,j,b)})})},h.prototype.clear=function(){this._map?this._.clear():this._={}},Object.defineProperty(h.prototype,"size",{configurable:!1,enumerable:!0,get:function(){var _=0;return s(this,function(b){_+=b.length}),_}}),Object.defineProperty(h.prototype,"count",{configurable:!1,enumerable:!0,get:function(){return this._.size}});var d;try{d=new Function("iterator","makeIterator","var keysArray = []; for(var key of iterator){keysArray.push(key);} return makeIterator(keysArray).next;")}catch{}function g(_){if(Array.isArray(_)){var b=0;return{next:function(){return b<_.length?{value:_[b++],done:!1}:{done:!0}}}}return!_.next&&d&&(_.next=d(_,g)),_}return h}();o&&o.exports&&(o.exports=a)})(multimap);Object.defineProperty(earlyErrorState,"__esModule",{value:!0});earlyErrorState.EarlyError=earlyErrorState.EarlyErrorState=void 0;var _createClass$6=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_multimap=multimap.exports,_multimap2=_interopRequireDefault$4(_multimap);function _interopRequireDefault$4(o){return o&&o.__esModule?o:{default:o}}function _possibleConstructorReturn$4(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits$4(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}function _classCallCheck$7(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function addEach(o){for(var e=arguments.length,s=Array(e>1?e-1:0),a=1;a<e;a++)s[a-1]=arguments[a];return s.forEach(function(c){c.forEachEntry(function(h,d){o.set.apply(o,[d].concat(h))})}),o}var identity=void 0,EarlyErrorState=earlyErrorState.EarlyErrorState=function(){function o(){_classCallCheck$7(this,o),this.errors=[],this.strictErrors=[],this.usedLabelNames=[],this.freeBreakStatements=[],this.freeContinueStatements=[],this.freeLabeledBreakStatements=[],this.freeLabeledContinueStatements=[],this.newTargetExpressions=[],this.boundNames=new _multimap2.default,this.lexicallyDeclaredNames=new _multimap2.default,this.functionDeclarationNames=new _multimap2.default,this.varDeclaredNames=new _multimap2.default,this.forOfVarDeclaredNames=[],this.exportedNames=new _multimap2.default,this.exportedBindings=new _multimap2.default,this.superCallExpressions=[],this.superCallExpressionsInConstructorMethod=[],this.superPropertyExpressions=[],this.yieldExpressions=[],this.awaitExpressions=[]}return _createClass$6(o,[{key:"addFreeBreakStatement",value:function(s){return this.freeBreakStatements.push(s),this}},{key:"addFreeLabeledBreakStatement",value:function(s){return this.freeLabeledBreakStatements.push(s),this}},{key:"clearFreeBreakStatements",value:function(){return this.freeBreakStatements=[],this}},{key:"addFreeContinueStatement",value:function(s){return this.freeContinueStatements.push(s),this}},{key:"addFreeLabeledContinueStatement",value:function(s){return this.freeLabeledContinueStatements.push(s),this}},{key:"clearFreeContinueStatements",value:function(){return this.freeContinueStatements=[],this}},{key:"enforceFreeBreakStatementErrors",value:function(s){return[].push.apply(this.errors,this.freeBreakStatements.map(s)),this.freeBreakStatements=[],this}},{key:"enforceFreeLabeledBreakStatementErrors",value:function(s){return[].push.apply(this.errors,this.freeLabeledBreakStatements.map(s)),this.freeLabeledBreakStatements=[],this}},{key:"enforceFreeContinueStatementErrors",value:function(s){return[].push.apply(this.errors,this.freeContinueStatements.map(s)),this.freeContinueStatements=[],this}},{key:"enforceFreeLabeledContinueStatementErrors",value:function(s){return[].push.apply(this.errors,this.freeLabeledContinueStatements.map(s)),this.freeLabeledContinueStatements=[],this}},{key:"observeIterationLabel",value:function(s){return this.usedLabelNames.push(s),this.freeLabeledBreakStatements=this.freeLabeledBreakStatements.filter(function(a){return a.label!==s}),this.freeLabeledContinueStatements=this.freeLabeledContinueStatements.filter(function(a){return a.label!==s}),this}},{key:"observeNonIterationLabel",value:function(s){return this.usedLabelNames.push(s),this.freeLabeledBreakStatements=this.freeLabeledBreakStatements.filter(function(a){return a.label!==s}),this}},{key:"clearUsedLabelNames",value:function(){return this.usedLabelNames=[],this}},{key:"observeSuperCallExpression",value:function(s){return this.superCallExpressions.push(s),this}},{key:"observeConstructorMethod",value:function(){return this.superCallExpressionsInConstructorMethod=this.superCallExpressions,this.superCallExpressions=[],this}},{key:"clearSuperCallExpressionsInConstructorMethod",value:function(){return this.superCallExpressionsInConstructorMethod=[],this}},{key:"enforceSuperCallExpressions",value:function(s){return[].push.apply(this.errors,this.superCallExpressions.map(s)),[].push.apply(this.errors,this.superCallExpressionsInConstructorMethod.map(s)),this.superCallExpressions=[],this.superCallExpressionsInConstructorMethod=[],this}},{key:"enforceSuperCallExpressionsInConstructorMethod",value:function(s){return[].push.apply(this.errors,this.superCallExpressionsInConstructorMethod.map(s)),this.superCallExpressionsInConstructorMethod=[],this}},{key:"observeSuperPropertyExpression",value:function(s){return this.superPropertyExpressions.push(s),this}},{key:"clearSuperPropertyExpressions",value:function(){return this.superPropertyExpressions=[],this}},{key:"enforceSuperPropertyExpressions",value:function(s){return[].push.apply(this.errors,this.superPropertyExpressions.map(s)),this.superPropertyExpressions=[],this}},{key:"observeNewTargetExpression",value:function(s){return this.newTargetExpressions.push(s),this}},{key:"clearNewTargetExpressions",value:function(){return this.newTargetExpressions=[],this}},{key:"bindName",value:function(s,a){return this.boundNames.set(s,a),this}},{key:"clearBoundNames",value:function(){return this.boundNames=new _multimap2.default,this}},{key:"observeLexicalDeclaration",value:function(){return addEach(this.lexicallyDeclaredNames,this.boundNames),this.boundNames=new _multimap2.default,this}},{key:"observeLexicalBoundary",value:function(){return this.previousLexicallyDeclaredNames=this.lexicallyDeclaredNames,this.lexicallyDeclaredNames=new _multimap2.default,this.functionDeclarationNames=new _multimap2.default,this}},{key:"enforceDuplicateLexicallyDeclaredNames",value:function(s){var a=this;return this.lexicallyDeclaredNames.forEachEntry(function(c){c.length>1&&c.slice(1).forEach(function(h){a.addError(s(h))})}),this}},{key:"enforceConflictingLexicallyDeclaredNames",value:function(s,a){var c=this;return this.lexicallyDeclaredNames.forEachEntry(function(h,d){s.has(d)&&h.forEach(function(g){c.addError(a(g))})}),this}},{key:"observeFunctionDeclaration",value:function(){return this.observeVarBoundary(),addEach(this.functionDeclarationNames,this.boundNames),this.boundNames=new _multimap2.default,this}},{key:"functionDeclarationNamesAreLexical",value:function(){return addEach(this.lexicallyDeclaredNames,this.functionDeclarationNames),this.functionDeclarationNames=new _multimap2.default,this}},{key:"observeVarDeclaration",value:function(){return addEach(this.varDeclaredNames,this.boundNames),this.boundNames=new _multimap2.default,this}},{key:"recordForOfVars",value:function(){var s=this;return this.varDeclaredNames.forEach(function(a){s.forOfVarDeclaredNames.push(a)}),this}},{key:"observeVarBoundary",value:function(){return this.lexicallyDeclaredNames=new _multimap2.default,this.functionDeclarationNames=new _multimap2.default,this.varDeclaredNames=new _multimap2.default,this.forOfVarDeclaredNames=[],this}},{key:"exportName",value:function(s,a){return this.exportedNames.set(s,a),this}},{key:"exportDeclaredNames",value:function(){return addEach(this.exportedNames,this.lexicallyDeclaredNames,this.varDeclaredNames),addEach(this.exportedBindings,this.lexicallyDeclaredNames,this.varDeclaredNames),this}},{key:"exportBinding",value:function(s,a){return this.exportedBindings.set(s,a),this}},{key:"clearExportedBindings",value:function(){return this.exportedBindings=new _multimap2.default,this}},{key:"observeYieldExpression",value:function(s){return this.yieldExpressions.push(s),this}},{key:"clearYieldExpressions",value:function(){return this.yieldExpressions=[],this}},{key:"observeAwaitExpression",value:function(s){return this.awaitExpressions.push(s),this}},{key:"clearAwaitExpressions",value:function(){return this.awaitExpressions=[],this}},{key:"addError",value:function(s){return this.errors.push(s),this}},{key:"addStrictError",value:function(s){return this.strictErrors.push(s),this}},{key:"enforceStrictErrors",value:function(){return[].push.apply(this.errors,this.strictErrors),this.strictErrors=[],this}},{key:"concat",value:function(s){return this===identity?s:s===identity?this:([].push.apply(this.errors,s.errors),[].push.apply(this.strictErrors,s.strictErrors),[].push.apply(this.usedLabelNames,s.usedLabelNames),[].push.apply(this.freeBreakStatements,s.freeBreakStatements),[].push.apply(this.freeContinueStatements,s.freeContinueStatements),[].push.apply(this.freeLabeledBreakStatements,s.freeLabeledBreakStatements),[].push.apply(this.freeLabeledContinueStatements,s.freeLabeledContinueStatements),[].push.apply(this.newTargetExpressions,s.newTargetExpressions),addEach(this.boundNames,s.boundNames),addEach(this.lexicallyDeclaredNames,s.lexicallyDeclaredNames),addEach(this.functionDeclarationNames,s.functionDeclarationNames),addEach(this.varDeclaredNames,s.varDeclaredNames),[].push.apply(this.forOfVarDeclaredNames,s.forOfVarDeclaredNames),addEach(this.exportedNames,s.exportedNames),addEach(this.exportedBindings,s.exportedBindings),[].push.apply(this.superCallExpressions,s.superCallExpressions),[].push.apply(this.superCallExpressionsInConstructorMethod,s.superCallExpressionsInConstructorMethod),[].push.apply(this.superPropertyExpressions,s.superPropertyExpressions),[].push.apply(this.yieldExpressions,s.yieldExpressions),[].push.apply(this.awaitExpressions,s.awaitExpressions),this)}}],[{key:"empty",value:function(){return identity}}]),o}();identity=new EarlyErrorState;Object.getOwnPropertyNames(EarlyErrorState.prototype).forEach(function(o){o!=="constructor"&&Object.defineProperty(identity,o,{value:function(){return EarlyErrorState.prototype[o].apply(new EarlyErrorState,arguments)},enumerable:!1,writable:!0,configurable:!0})});earlyErrorState.EarlyError=function(o){_inherits$4(e,o);function e(s,a){_classCallCheck$7(this,e);var c=_possibleConstructorReturn$4(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a));return c.node=s,c.message=a,c}return e}(Error);Object.defineProperty(earlyErrors,"__esModule",{value:!0});earlyErrors.EarlyErrorChecker=void 0;var _createClass$5=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_get$1=function o(e,s,a){e===null&&(e=Function.prototype);var c=Object.getOwnPropertyDescriptor(e,s);if(c===void 0){var h=Object.getPrototypeOf(e);return h===null?void 0:o(h,s,a)}else{if("value"in c)return c.value;var d=c.get;return d===void 0?void 0:d.call(a)}},_shiftReducer$1=dist$4,_shiftReducer2=_interopRequireDefault$3(_shiftReducer$1),_utils=utils$1,_errors=errors,_earlyErrorState=earlyErrorState;function _interopRequireDefault$3(o){return o&&o.__esModule?o:{default:o}}function _toConsumableArray$3(o){if(Array.isArray(o)){for(var e=0,s=Array(o.length);e<o.length;e++)s[e]=o[e];return s}else return Array.from(o)}function _classCallCheck$6(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$3(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits$3(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}function isStrictFunctionBody(o){var e=o.directives;return e.some(function(s){return s.rawValue==="use strict"})}function isLabelledFunction(o){return o.type==="LabeledStatement"&&(o.body.type==="FunctionDeclaration"||isLabelledFunction(o.body))}function isIterationStatement(o){switch(o.type){case"LabeledStatement":return isIterationStatement(o.body);case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function isSpecialMethod(o){if(o.name.type!=="StaticPropertyName"||o.name.value!=="constructor")return!1;switch(o.type){case"Getter":case"Setter":return!0;case"Method":return o.isGenerator||o.isAsync}throw new Error("not reached")}function enforceDuplicateConstructorMethods(o,e){var s=o.elements.filter(function(a){return!a.isStatic&&a.method.type==="Method"&&!a.method.isGenerator&&a.method.name.type==="StaticPropertyName"&&a.method.name.value==="constructor"});return s.length>1&&s.slice(1).forEach(function(a){e=e.addError(new _earlyErrorState.EarlyError(a,"Duplicate constructor method in class"))}),e}var SUPERCALL_ERROR=function(e){return new _earlyErrorState.EarlyError(e,_errors.ErrorMessages.ILLEGAL_SUPER_CALL)},SUPERPROPERTY_ERROR=function(e){return new _earlyErrorState.EarlyError(e,"Member access on super must be in a method")},DUPLICATE_BINDING=function(e){return new _earlyErrorState.EarlyError(e,"Duplicate binding "+JSON.stringify(e.name))},FREE_CONTINUE=function(e){return new _earlyErrorState.EarlyError(e,"Continue statement must be nested within an iteration statement")},UNBOUND_CONTINUE=function(e){return new _earlyErrorState.EarlyError(e,"Continue statement must be nested within an iteration statement with label "+JSON.stringify(e.label))},FREE_BREAK=function(e){return new _earlyErrorState.EarlyError(e,"Break statement must be nested within an iteration statement or a switch statement")},UNBOUND_BREAK=function(e){return new _earlyErrorState.EarlyError(e,"Break statement must be nested within a statement with label "+JSON.stringify(e.label))};earlyErrors.EarlyErrorChecker=function(o){_inherits$3(e,o);function e(){return _classCallCheck$6(this,e),_possibleConstructorReturn$3(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,_earlyErrorState.EarlyErrorState))}return _createClass$5(e,[{key:"reduceAssignmentExpression",value:function(){return _get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceAssignmentExpression",this).apply(this,arguments).clearBoundNames()}},{key:"reduceAssignmentTargetIdentifier",value:function(a){var c=this.identity;return(a.name==="eval"||a.name==="arguments"||(0,_utils.isStrictModeReservedWord)(a.name))&&(c=c.addStrictError(new _earlyErrorState.EarlyError(a,"The identifier "+JSON.stringify(a.name)+" must not be in binding position in strict mode"))),c}},{key:"reduceArrowExpression",value:function(a,c){var h=c.params,d=c.body,g=a.params.rest==null&&a.params.items.every(function(b){return b.type==="BindingIdentifier"});h=h.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),a.body.type==="FunctionBody"&&(d=d.enforceConflictingLexicallyDeclaredNames(h.lexicallyDeclaredNames,DUPLICATE_BINDING),isStrictFunctionBody(a.body)&&(h=h.enforceStrictErrors(),d=d.enforceStrictErrors())),h.yieldExpressions.forEach(function(b){h=h.addError(new _earlyErrorState.EarlyError(b,"Arrow parameters must not contain yield expressions"))}),h.awaitExpressions.forEach(function(b){h=h.addError(new _earlyErrorState.EarlyError(b,"Arrow parameters must not contain await expressions"))});var _=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceArrowExpression",this).call(this,a,{params:h,body:d});return!g&&a.body.type==="FunctionBody"&&isStrictFunctionBody(a.body)&&(_=_.addError(new _earlyErrorState.EarlyError(a,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),_=_.clearYieldExpressions(),_=_.clearAwaitExpressions(),_=_.observeVarBoundary(),_}},{key:"reduceAwaitExpression",value:function(a,c){var h=c.expression;return h.observeAwaitExpression(a)}},{key:"reduceBindingIdentifier",value:function(a){var c=this.identity;return(a.name==="eval"||a.name==="arguments"||(0,_utils.isStrictModeReservedWord)(a.name))&&(c=c.addStrictError(new _earlyErrorState.EarlyError(a,"The identifier "+JSON.stringify(a.name)+" must not be in binding position in strict mode"))),c=c.bindName(a.name,a),c}},{key:"reduceBlock",value:function(){var a=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceBlock",this).apply(this,arguments);return a=a.functionDeclarationNamesAreLexical(),a=a.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),a=a.enforceConflictingLexicallyDeclaredNames(a.varDeclaredNames,DUPLICATE_BINDING),a=a.observeLexicalBoundary(),a}},{key:"reduceBreakStatement",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceBreakStatement",this).apply(this,arguments);return c=a.label==null?c.addFreeBreakStatement(a):c.addFreeLabeledBreakStatement(a),c}},{key:"reduceCallExpression",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceCallExpression",this).apply(this,arguments);return a.callee.type==="Super"&&(c=c.observeSuperCallExpression(a)),c}},{key:"reduceCatchClause",value:function(a,c){var h=c.binding,d=c.body;h=h.observeLexicalDeclaration(),h=h.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),h=h.enforceConflictingLexicallyDeclaredNames(d.previousLexicallyDeclaredNames,DUPLICATE_BINDING),h.lexicallyDeclaredNames.forEachEntry(function(_,b){d.varDeclaredNames.has(b)&&d.varDeclaredNames.get(b).forEach(function($){d.forOfVarDeclaredNames.indexOf($)>=0&&(h=h.addError(DUPLICATE_BINDING($)))})});var g=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceCatchClause",this).call(this,a,{binding:h,body:d});return g=g.observeLexicalBoundary(),g}},{key:"reduceClassDeclaration",value:function(a,c){var h=c.name,d=c.super,g=c.elements,_=h.enforceStrictErrors(),b=this.append.apply(this,_toConsumableArray$3(g));return b=b.enforceStrictErrors(),a.super!=null&&(d=d.enforceStrictErrors(),_=this.append(_,d),b=b.clearSuperCallExpressionsInConstructorMethod()),_=this.append(_,b),_=enforceDuplicateConstructorMethods(a,_),_=_.observeLexicalDeclaration(),_}},{key:"reduceClassElement",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceClassElement",this).apply(this,arguments);return!a.isStatic&&isSpecialMethod(a.method)&&(c=c.addError(new _earlyErrorState.EarlyError(a,_errors.ErrorMessages.ILLEGAL_CONSTRUCTORS))),a.isStatic&&a.method.name.type==="StaticPropertyName"&&a.method.name.value==="prototype"&&(c=c.addError(new _earlyErrorState.EarlyError(a,'Static class methods cannot be named "prototype"'))),c}},{key:"reduceClassExpression",value:function(a,c){var h=c.name,d=c.super,g=c.elements,_=a.name==null?this.identity:h.enforceStrictErrors(),b=this.append.apply(this,_toConsumableArray$3(g));return b=b.enforceStrictErrors(),a.super!=null&&(d=d.enforceStrictErrors(),_=this.append(_,d),b=b.clearSuperCallExpressionsInConstructorMethod()),_=this.append(_,b),_=enforceDuplicateConstructorMethods(a,_),_=_.clearBoundNames(),_}},{key:"reduceCompoundAssignmentExpression",value:function(){return _get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceCompoundAssignmentExpression",this).apply(this,arguments).clearBoundNames()}},{key:"reduceComputedMemberExpression",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceComputedMemberExpression",this).apply(this,arguments);return a.object.type==="Super"&&(c=c.observeSuperPropertyExpression(a)),c}},{key:"reduceContinueStatement",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceContinueStatement",this).apply(this,arguments);return c=a.label==null?c.addFreeContinueStatement(a):c.addFreeLabeledContinueStatement(a),c}},{key:"reduceDoWhileStatement",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceDoWhileStatement",this).apply(this,arguments);return isLabelledFunction(a.body)&&(c=c.addError(new _earlyErrorState.EarlyError(a.body,"The body of a do-while statement must not be a labeled function declaration"))),c=c.clearFreeContinueStatements(),c=c.clearFreeBreakStatements(),c}},{key:"reduceExport",value:function(){var a=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceExport",this).apply(this,arguments);return a=a.functionDeclarationNamesAreLexical(),a=a.exportDeclaredNames(),a}},{key:"reduceExportFrom",value:function(){var a=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceExportFrom",this).apply(this,arguments);return a=a.clearExportedBindings(),a}},{key:"reduceExportFromSpecifier",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceExportFromSpecifier",this).apply(this,arguments);return c=c.exportName(a.exportedName||a.name,a),c=c.exportBinding(a.name,a),c}},{key:"reduceExportLocalSpecifier",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceExportLocalSpecifier",this).apply(this,arguments);return c=c.exportName(a.exportedName||a.name.name,a),c=c.exportBinding(a.name.name,a),c}},{key:"reduceExportDefault",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceExportDefault",this).apply(this,arguments);return c=c.functionDeclarationNamesAreLexical(),c=c.exportName("default",a),c}},{key:"reduceFormalParameters",value:function(){var a=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceFormalParameters",this).apply(this,arguments);return a=a.observeLexicalDeclaration(),a}},{key:"reduceForStatement",value:function(a,c){var h=c.init,d=c.test,g=c.update,_=c.body;h!=null&&(h=h.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),h=h.enforceConflictingLexicallyDeclaredNames(_.varDeclaredNames,DUPLICATE_BINDING));var b=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceForStatement",this).call(this,a,{init:h,test:d,update:g,body:_});return a.init!=null&&a.init.type==="VariableDeclaration"&&a.init.kind==="const"&&a.init.declarators.forEach(function($){$.init==null&&(b=b.addError(new _earlyErrorState.EarlyError($,"Constant lexical declarations must have an initialiser")))}),isLabelledFunction(a.body)&&(b=b.addError(new _earlyErrorState.EarlyError(a.body,"The body of a for statement must not be a labeled function declaration"))),b=b.clearFreeContinueStatements(),b=b.clearFreeBreakStatements(),b=b.observeLexicalBoundary(),b}},{key:"reduceForInStatement",value:function(a,c){var h=c.left,d=c.right,g=c.body;h=h.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),h=h.enforceConflictingLexicallyDeclaredNames(g.varDeclaredNames,DUPLICATE_BINDING);var _=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceForInStatement",this).call(this,a,{left:h,right:d,body:g});return isLabelledFunction(a.body)&&(_=_.addError(new _earlyErrorState.EarlyError(a.body,"The body of a for-in statement must not be a labeled function declaration"))),_=_.clearFreeContinueStatements(),_=_.clearFreeBreakStatements(),_=_.observeLexicalBoundary(),_}},{key:"reduceForOfStatement",value:function(a,c){var h=c.left,d=c.right,g=c.body;h=h.recordForOfVars(),h=h.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),h=h.enforceConflictingLexicallyDeclaredNames(g.varDeclaredNames,DUPLICATE_BINDING);var _=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceForOfStatement",this).call(this,a,{left:h,right:d,body:g});return isLabelledFunction(a.body)&&(_=_.addError(new _earlyErrorState.EarlyError(a.body,"The body of a for-of statement must not be a labeled function declaration"))),_=_.clearFreeContinueStatements(),_=_.clearFreeBreakStatements(),_=_.observeLexicalBoundary(),_}},{key:"reduceForAwaitStatement",value:function(a,c){var h=c.left,d=c.right,g=c.body;h=h.recordForOfVars(),h=h.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),h=h.enforceConflictingLexicallyDeclaredNames(g.varDeclaredNames,DUPLICATE_BINDING);var _=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceForOfStatement",this).call(this,a,{left:h,right:d,body:g});return isLabelledFunction(a.body)&&(_=_.addError(new _earlyErrorState.EarlyError(a.body,"The body of a for-await statement must not be a labeled function declaration"))),_=_.clearFreeContinueStatements(),_=_.clearFreeBreakStatements(),_=_.observeLexicalBoundary(),_}},{key:"reduceFunctionBody",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceFunctionBody",this).apply(this,arguments);return c=c.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),c=c.enforceConflictingLexicallyDeclaredNames(c.varDeclaredNames,DUPLICATE_BINDING),c=c.enforceFreeContinueStatementErrors(FREE_CONTINUE),c=c.enforceFreeLabeledContinueStatementErrors(UNBOUND_CONTINUE),c=c.enforceFreeBreakStatementErrors(FREE_BREAK),c=c.enforceFreeLabeledBreakStatementErrors(UNBOUND_BREAK),c=c.clearUsedLabelNames(),c=c.clearYieldExpressions(),c=c.clearAwaitExpressions(),isStrictFunctionBody(a)&&(c=c.enforceStrictErrors()),c}},{key:"reduceFunctionDeclaration",value:function(a,c){var h=c.name,d=c.params,g=c.body,_=a.params.rest==null&&a.params.items.every(function(j){return j.type==="BindingIdentifier"}),b=!_||a.isGenerator?"addError":"addStrictError";d.lexicallyDeclaredNames.forEachEntry(function(j){j.length>1&&j.slice(1).forEach(function(_e){d=d[b](DUPLICATE_BINDING(_e))})}),g=g.enforceConflictingLexicallyDeclaredNames(d.lexicallyDeclaredNames,DUPLICATE_BINDING),g=g.enforceSuperCallExpressions(SUPERCALL_ERROR),g=g.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),d=d.enforceSuperCallExpressions(SUPERCALL_ERROR),d=d.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),a.isGenerator&&d.yieldExpressions.forEach(function(j){d=d.addError(new _earlyErrorState.EarlyError(j,"Generator parameters must not contain yield expressions"))}),a.isAsync&&d.awaitExpressions.forEach(function(j){d=d.addError(new _earlyErrorState.EarlyError(j,"Async function parameters must not contain await expressions"))}),d=d.clearNewTargetExpressions(),g=g.clearNewTargetExpressions(),isStrictFunctionBody(a.body)&&(d=d.enforceStrictErrors(),g=g.enforceStrictErrors());var $=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceFunctionDeclaration",this).call(this,a,{name:h,params:d,body:g});return!_&&isStrictFunctionBody(a.body)&&($=$.addError(new _earlyErrorState.EarlyError(a,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),$=$.clearYieldExpressions(),$=$.clearAwaitExpressions(),$=$.observeFunctionDeclaration(),$}},{key:"reduceFunctionExpression",value:function(a,c){var h=c.name,d=c.params,g=c.body,_=a.params.rest==null&&a.params.items.every(function(j){return j.type==="BindingIdentifier"}),b=!_||a.isGenerator?"addError":"addStrictError";d.lexicallyDeclaredNames.forEachEntry(function(j,_e){j.length>1&&j.slice(1).forEach(function(et){d=d[b](new _earlyErrorState.EarlyError(et,"Duplicate binding "+JSON.stringify(_e)))})}),g=g.enforceConflictingLexicallyDeclaredNames(d.lexicallyDeclaredNames,DUPLICATE_BINDING),g=g.enforceSuperCallExpressions(SUPERCALL_ERROR),g=g.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),d=d.enforceSuperCallExpressions(SUPERCALL_ERROR),d=d.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),a.isGenerator&&d.yieldExpressions.forEach(function(j){d=d.addError(new _earlyErrorState.EarlyError(j,"Generator parameters must not contain yield expressions"))}),a.isAsync&&d.awaitExpressions.forEach(function(j){d=d.addError(new _earlyErrorState.EarlyError(j,"Async function parameters must not contain await expressions"))}),d=d.clearNewTargetExpressions(),g=g.clearNewTargetExpressions(),isStrictFunctionBody(a.body)&&(d=d.enforceStrictErrors(),g=g.enforceStrictErrors());var $=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceFunctionExpression",this).call(this,a,{name:h,params:d,body:g});return!_&&isStrictFunctionBody(a.body)&&($=$.addError(new _earlyErrorState.EarlyError(a,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),$=$.clearBoundNames(),$=$.clearYieldExpressions(),$=$.clearAwaitExpressions(),$=$.observeVarBoundary(),$}},{key:"reduceGetter",value:function(a,c){var h=c.name,d=c.body;d=d.enforceSuperCallExpressions(SUPERCALL_ERROR),d=d.clearSuperPropertyExpressions(),d=d.clearNewTargetExpressions(),isStrictFunctionBody(a.body)&&(d=d.enforceStrictErrors());var g=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceGetter",this).call(this,a,{name:h,body:d});return g=g.observeVarBoundary(),g}},{key:"reduceIdentifierExpression",value:function(a){var c=this.identity;return(0,_utils.isStrictModeReservedWord)(a.name)&&(c=c.addStrictError(new _earlyErrorState.EarlyError(a,"The identifier "+JSON.stringify(a.name)+" must not be in expression position in strict mode"))),c}},{key:"reduceIfStatement",value:function(a,c){var h=c.test,d=c.consequent,g=c.alternate;return isLabelledFunction(a.consequent)&&(d=d.addError(new _earlyErrorState.EarlyError(a.consequent,"The consequent of an if statement must not be a labeled function declaration"))),a.alternate!=null&&isLabelledFunction(a.alternate)&&(g=g.addError(new _earlyErrorState.EarlyError(a.alternate,"The alternate of an if statement must not be a labeled function declaration"))),a.consequent.type==="FunctionDeclaration"&&(d=d.addStrictError(new _earlyErrorState.EarlyError(a.consequent,"FunctionDeclarations in IfStatements are disallowed in strict mode")),d=d.observeLexicalBoundary()),a.alternate!=null&&a.alternate.type==="FunctionDeclaration"&&(g=g.addStrictError(new _earlyErrorState.EarlyError(a.alternate,"FunctionDeclarations in IfStatements are disallowed in strict mode")),g=g.observeLexicalBoundary()),_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceIfStatement",this).call(this,a,{test:h,consequent:d,alternate:g})}},{key:"reduceImport",value:function(){var a=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceImport",this).apply(this,arguments);return a=a.observeLexicalDeclaration(),a}},{key:"reduceImportNamespace",value:function(){var a=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceImportNamespace",this).apply(this,arguments);return a=a.observeLexicalDeclaration(),a}},{key:"reduceLabeledStatement",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceLabeledStatement",this).apply(this,arguments);return(a.label==="yield"||(0,_utils.isStrictModeReservedWord)(a.label))&&(c=c.addStrictError(new _earlyErrorState.EarlyError(a,"The identifier "+JSON.stringify(a.label)+" must not be in label position in strict mode"))),c.usedLabelNames.indexOf(a.label)>=0&&(c=c.addError(new _earlyErrorState.EarlyError(a,"Label "+JSON.stringify(a.label)+" has already been declared"))),a.body.type==="FunctionDeclaration"&&(c=c.addStrictError(new _earlyErrorState.EarlyError(a,"Labeled FunctionDeclarations are disallowed in strict mode"))),c=isIterationStatement(a.body)?c.observeIterationLabel(a.label):c.observeNonIterationLabel(a.label),c}},{key:"reduceLiteralRegExpExpression",value:function(){var a=this.identity;return a}},{key:"reduceMethod",value:function(a,c){var h=c.name,d=c.params,g=c.body,_=a.params.rest==null&&a.params.items.every(function($){return $.type==="BindingIdentifier"});d=d.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),g=g.enforceConflictingLexicallyDeclaredNames(d.lexicallyDeclaredNames,DUPLICATE_BINDING),a.name.type==="StaticPropertyName"&&a.name.value==="constructor"?(g=g.observeConstructorMethod(),d=d.observeConstructorMethod()):(g=g.enforceSuperCallExpressions(SUPERCALL_ERROR),d=d.enforceSuperCallExpressions(SUPERCALL_ERROR)),a.isGenerator&&d.yieldExpressions.forEach(function($){d=d.addError(new _earlyErrorState.EarlyError($,"Generator parameters must not contain yield expressions"))}),a.isAsync&&d.awaitExpressions.forEach(function($){d=d.addError(new _earlyErrorState.EarlyError($,"Async function parameters must not contain await expressions"))}),g=g.clearSuperPropertyExpressions(),d=d.clearSuperPropertyExpressions(),d=d.clearNewTargetExpressions(),g=g.clearNewTargetExpressions(),isStrictFunctionBody(a.body)&&(d=d.enforceStrictErrors(),g=g.enforceStrictErrors());var b=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceMethod",this).call(this,a,{name:h,params:d,body:g});return!_&&isStrictFunctionBody(a.body)&&(b=b.addError(new _earlyErrorState.EarlyError(a,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),b=b.clearYieldExpressions(),b=b.clearAwaitExpressions(),b=b.observeVarBoundary(),b}},{key:"reduceModule",value:function(){var a=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceModule",this).apply(this,arguments);return a=a.functionDeclarationNamesAreLexical(),a=a.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),a=a.enforceConflictingLexicallyDeclaredNames(a.varDeclaredNames,DUPLICATE_BINDING),a.exportedNames.forEachEntry(function(c,h){c.length>1&&c.slice(1).forEach(function(d){a=a.addError(new _earlyErrorState.EarlyError(d,"Duplicate export "+JSON.stringify(h)))})}),a.exportedBindings.forEachEntry(function(c,h){!a.lexicallyDeclaredNames.has(h)&&!a.varDeclaredNames.has(h)&&c.forEach(function(d){a=a.addError(new _earlyErrorState.EarlyError(d,"Exported binding "+JSON.stringify(h)+" is not declared"))})}),a.newTargetExpressions.forEach(function(c){a=a.addError(new _earlyErrorState.EarlyError(c,"new.target must be within function (but not arrow expression) code"))}),a=a.enforceFreeContinueStatementErrors(FREE_CONTINUE),a=a.enforceFreeLabeledContinueStatementErrors(UNBOUND_CONTINUE),a=a.enforceFreeBreakStatementErrors(FREE_BREAK),a=a.enforceFreeLabeledBreakStatementErrors(UNBOUND_BREAK),a=a.enforceSuperCallExpressions(SUPERCALL_ERROR),a=a.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),a=a.enforceStrictErrors(),a}},{key:"reduceNewTargetExpression",value:function(a){return this.identity.observeNewTargetExpression(a)}},{key:"reduceObjectExpression",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceObjectExpression",this).apply(this,arguments);c=c.enforceSuperCallExpressionsInConstructorMethod(SUPERCALL_ERROR);var h=a.properties.filter(function(d){return d.type==="DataProperty"&&d.name.type==="StaticPropertyName"&&d.name.value==="__proto__"});return h.slice(1).forEach(function(d){c=c.addError(new _earlyErrorState.EarlyError(d,"Duplicate __proto__ property in object literal not allowed"))}),c}},{key:"reduceUpdateExpression",value:function(){var a=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceUpdateExpression",this).apply(this,arguments);return a=a.clearBoundNames(),a}},{key:"reduceUnaryExpression",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceUnaryExpression",this).apply(this,arguments);return a.operator==="delete"&&a.operand.type==="IdentifierExpression"&&(c=c.addStrictError(new _earlyErrorState.EarlyError(a,"Identifier expressions must not be deleted in strict mode"))),c}},{key:"reduceScript",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceScript",this).apply(this,arguments);return c=c.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),c=c.enforceConflictingLexicallyDeclaredNames(c.varDeclaredNames,DUPLICATE_BINDING),c.newTargetExpressions.forEach(function(h){c=c.addError(new _earlyErrorState.EarlyError(h,"new.target must be within function (but not arrow expression) code"))}),c=c.enforceFreeContinueStatementErrors(FREE_CONTINUE),c=c.enforceFreeLabeledContinueStatementErrors(UNBOUND_CONTINUE),c=c.enforceFreeBreakStatementErrors(FREE_BREAK),c=c.enforceFreeLabeledBreakStatementErrors(UNBOUND_BREAK),c=c.enforceSuperCallExpressions(SUPERCALL_ERROR),c=c.enforceSuperPropertyExpressions(SUPERPROPERTY_ERROR),isStrictFunctionBody(a)&&(c=c.enforceStrictErrors()),c}},{key:"reduceSetter",value:function(a,c){var h=c.name,d=c.param,g=c.body,_=a.param.type==="BindingIdentifier";d=d.observeLexicalDeclaration(),d=d.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),g=g.enforceConflictingLexicallyDeclaredNames(d.lexicallyDeclaredNames,DUPLICATE_BINDING),d=d.enforceSuperCallExpressions(SUPERCALL_ERROR),g=g.enforceSuperCallExpressions(SUPERCALL_ERROR),d=d.clearSuperPropertyExpressions(),g=g.clearSuperPropertyExpressions(),d=d.clearNewTargetExpressions(),g=g.clearNewTargetExpressions(),isStrictFunctionBody(a.body)&&(d=d.enforceStrictErrors(),g=g.enforceStrictErrors());var b=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceSetter",this).call(this,a,{name:h,param:d,body:g});return!_&&isStrictFunctionBody(a.body)&&(b=b.addError(new _earlyErrorState.EarlyError(a,'Functions with non-simple parameter lists may not contain a "use strict" directive'))),b=b.observeVarBoundary(),b}},{key:"reduceStaticMemberExpression",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceStaticMemberExpression",this).apply(this,arguments);return a.object.type==="Super"&&(c=c.observeSuperPropertyExpression(a)),c}},{key:"reduceSwitchStatement",value:function(a,c){var h=c.discriminant,d=c.cases,g=this.append.apply(this,_toConsumableArray$3(d));g=g.functionDeclarationNamesAreLexical(),g=g.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),g=g.enforceConflictingLexicallyDeclaredNames(g.varDeclaredNames,DUPLICATE_BINDING),g=g.observeLexicalBoundary();var _=this.append(h,g);return _=_.clearFreeBreakStatements(),_}},{key:"reduceSwitchStatementWithDefault",value:function(a,c){var h=c.discriminant,d=c.preDefaultCases,g=c.defaultCase,_=c.postDefaultCases,b=this.append.apply(this,[g].concat(_toConsumableArray$3(d),_toConsumableArray$3(_)));b=b.functionDeclarationNamesAreLexical(),b=b.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING),b=b.enforceConflictingLexicallyDeclaredNames(b.varDeclaredNames,DUPLICATE_BINDING),b=b.observeLexicalBoundary();var $=this.append(h,b);return $=$.clearFreeBreakStatements(),$}},{key:"reduceVariableDeclaration",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceVariableDeclaration",this).apply(this,arguments);switch(a.kind){case"const":case"let":{c=c.observeLexicalDeclaration(),c.lexicallyDeclaredNames.has("let")&&c.lexicallyDeclaredNames.get("let").forEach(function(h){c=c.addError(new _earlyErrorState.EarlyError(h,'Lexical declarations must not have a binding named "let"'))});break}case"var":c=c.observeVarDeclaration();break}return c}},{key:"reduceVariableDeclarationStatement",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceVariableDeclarationStatement",this).apply(this,arguments);return a.declaration.kind==="const"&&a.declaration.declarators.forEach(function(h){h.init==null&&(c=c.addError(new _earlyErrorState.EarlyError(h,"Constant lexical declarations must have an initialiser")))}),c}},{key:"reduceWhileStatement",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceWhileStatement",this).apply(this,arguments);return isLabelledFunction(a.body)&&(c=c.addError(new _earlyErrorState.EarlyError(a.body,"The body of a while statement must not be a labeled function declaration"))),c=c.clearFreeContinueStatements().clearFreeBreakStatements(),c}},{key:"reduceWithStatement",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceWithStatement",this).apply(this,arguments);return isLabelledFunction(a.body)&&(c=c.addError(new _earlyErrorState.EarlyError(a.body,"The body of a with statement must not be a labeled function declaration"))),c=c.addStrictError(new _earlyErrorState.EarlyError(a,"Strict mode code must not include a with statement")),c}},{key:"reduceYieldExpression",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceYieldExpression",this).apply(this,arguments);return c=c.observeYieldExpression(a),c}},{key:"reduceYieldGeneratorExpression",value:function(a){var c=_get$1(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"reduceYieldGeneratorExpression",this).apply(this,arguments);return c=c.observeYieldExpression(a),c}}],[{key:"check",value:function(a){return(0,_shiftReducer2.default)(new e,a).errors}}]),e}(_shiftReducer$1.MonoidalReducer);(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.TokenType=o.TokenClass=o.Tokenizer=o.ParserWithLocation=o.GenericParser=o.EarlyErrorChecker=o.parseScriptWithLocation=o.parseModuleWithLocation=o.parseScript=o.parseModule=void 0;var e=function(){function nt(st,rt){for(var it=0;it<rt.length;it++){var at=rt[it];at.enumerable=at.enumerable||!1,at.configurable=!0,"value"in at&&(at.writable=!0),Object.defineProperty(st,at.key,at)}}return function(st,rt,it){return rt&&nt(st.prototype,rt),it&&nt(st,it),st}}(),s=function nt(st,rt,it){st===null&&(st=Function.prototype);var at=Object.getOwnPropertyDescriptor(st,rt);if(at===void 0){var ot=Object.getPrototypeOf(st);return ot===null?void 0:nt(ot,rt,it)}else{if("value"in at)return at.value;var ut=at.get;return ut===void 0?void 0:ut.call(it)}},a=tokenizer;Object.defineProperty(o,"Tokenizer",{enumerable:!0,get:function(){return g(a).default}}),Object.defineProperty(o,"TokenClass",{enumerable:!0,get:function(){return a.TokenClass}}),Object.defineProperty(o,"TokenType",{enumerable:!0,get:function(){return a.TokenType}});var c=parser$1,h=earlyErrors,d=utils$1;function g(nt){return nt&&nt.__esModule?nt:{default:nt}}function _(nt,st){if(!(nt instanceof st))throw new TypeError("Cannot call a class as a function")}function b(nt,st){if(!nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return st&&(typeof st=="object"||typeof st=="function")?st:nt}function $(nt,st){if(typeof st!="function"&&st!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof st);nt.prototype=Object.create(st&&st.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),st&&(Object.setPrototypeOf?Object.setPrototypeOf(nt,st):nt.__proto__=st)}var j=function(nt){$(st,nt);function st(rt){_(this,st);var it=b(this,(st.__proto__||Object.getPrototypeOf(st)).call(this,rt));return it.locations=new WeakMap,it.comments=[],it}return e(st,[{key:"startNode",value:function(){return this.getLocation()}},{key:"finishNode",value:function(it,at){if(it.type==="Script"||it.type==="Module")return this.locations.set(it,{start:{line:1,column:0,offset:0},end:this.getLocation()}),it;if(it.type==="TemplateExpression")for(var ot=0;ot<it.elements.length;ot+=2){var ut=ot<it.elements.length-1?2:1,ct=it.elements[ot],ht=this.locations.get(ct);this.locations.set(ct,{start:{line:ht.start.line,column:ht.start.column+1,offset:ht.start.offset+1},end:{line:ht.end.line,column:ht.end.column-ut,offset:ht.end.offset-ut}})}return this.locations.set(it,{start:at,end:this.getLastTokenEndLocation()}),it}},{key:"copyNode",value:function(it,at){return this.locations.set(at,this.locations.get(it)),at}},{key:"skipSingleLineComment",value:function(it){var at={line:this.line+1,column:this.index-this.lineStart,offset:this.index},ot=this.source[this.index],ut=ot==="/"?"SingleLine":ot==="<"?"HTMLOpen":"HTMLClose";s(st.prototype.__proto__||Object.getPrototypeOf(st.prototype),"skipSingleLineComment",this).call(this,it);var ct={line:this.line+1,column:this.index-this.lineStart,offset:this.index},ht=this.source[this.index-2]==="\r"?2:(0,d.isLineTerminator)(this.source.charCodeAt(this.index-1))?1:0,lt=this.source.substring(at.offset+it,ct.offset-ht);this.comments.push({text:lt,type:ut,start:at,end:ct})}},{key:"skipMultiLineComment",value:function(){var it={line:this.line+1,column:this.index-this.lineStart,offset:this.index},at="MultiLine",ot=s(st.prototype.__proto__||Object.getPrototypeOf(st.prototype),"skipMultiLineComment",this).call(this),ut={line:this.line+1,column:this.index-this.lineStart,offset:this.index},ct=this.source.substring(it.offset+2,ut.offset-2);return this.comments.push({text:ct,type:at,start:it,end:ut}),ot}}]),st}(c.GenericParser);function _e(nt){return function(rt){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},at=it.earlyErrors,ot=at===void 0?!0:at,ut=new c.GenericParser(rt),ct=ut[nt]();if(ot){var ht=h.EarlyErrorChecker.check(ct);if(ht.length>0)throw new a.JsError(0,1,0,ht[0].message)}return ct}}function et(nt){return function(rt){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},at=it.earlyErrors,ot=at===void 0?!0:at,ut=new j(rt),ct=ut[nt]();if(ot){var ht=h.EarlyErrorChecker.check(ct);if(ht.length>0){var lt=ht[0],pt=lt.node,ft=lt.message,gt=ut.locations.get(pt).start,yt=gt.offset,mt=gt.line,Et=gt.column;throw new a.JsError(yt,mt,Et,ft)}}return{tree:ct,locations:ut.locations,comments:ut.comments}}}o.parseModule=_e("parseModule");var tt=o.parseScript=_e("parseScript");o.parseModuleWithLocation=et("parseModule"),o.parseScriptWithLocation=et("parseScript"),o.default=tt,o.EarlyErrorChecker=h.EarlyErrorChecker,o.GenericParser=c.GenericParser,o.ParserWithLocation=j})(dist$7);var dist$2={};Object.defineProperty(dist$2,"__esModule",{value:!0});var _default=dist$2.default=function(){var o={},e={typeName:"Boolean"},s={typeName:"Number"},a={typeName:"String"};function c(Ut){return{typeName:"Maybe",argument:Ut}}function h(Ut){return{typeName:"List",argument:Ut}}function d(Ut){return{typeName:"Const",argument:Ut}}function g(){return{typeName:"Union",arguments:[].slice.call(arguments,0)}}var _={typeName:"Enum",values:["ArrayAssignmentTarget","ArrayBinding","ArrayExpression","ArrowExpression","AssignmentExpression","AssignmentTargetIdentifier","AssignmentTargetPropertyIdentifier","AssignmentTargetPropertyProperty","AssignmentTargetWithDefault","AwaitExpression","BinaryExpression","BindingIdentifier","BindingPropertyIdentifier","BindingPropertyProperty","BindingWithDefault","Block","BlockStatement","BreakStatement","CallExpression","CatchClause","ClassDeclaration","ClassElement","ClassExpression","CompoundAssignmentExpression","ComputedMemberAssignmentTarget","ComputedMemberExpression","ComputedPropertyName","ConditionalExpression","ContinueStatement","DataProperty","DebuggerStatement","Directive","DoWhileStatement","EmptyStatement","Export","ExportAllFrom","ExportDefault","ExportFrom","ExportFromSpecifier","ExportLocalSpecifier","ExportLocals","ExpressionStatement","ForAwaitStatement","ForInStatement","ForOfStatement","ForStatement","FormalParameters","FunctionBody","FunctionDeclaration","FunctionExpression","Getter","IdentifierExpression","IfStatement","Import","ImportNamespace","ImportSpecifier","LabeledStatement","LiteralBooleanExpression","LiteralInfinityExpression","LiteralNullExpression","LiteralNumericExpression","LiteralRegExpExpression","LiteralStringExpression","Method","Module","NewExpression","NewTargetExpression","ObjectAssignmentTarget","ObjectBinding","ObjectExpression","ReturnStatement","Script","Setter","ShorthandProperty","SpreadElement","SpreadProperty","StaticMemberAssignmentTarget","StaticMemberExpression","StaticPropertyName","Super","SwitchCase","SwitchDefault","SwitchStatement","SwitchStatementWithDefault","TemplateElement","TemplateExpression","ThisExpression","ThrowStatement","TryCatchStatement","TryFinallyStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarationStatement","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","YieldGeneratorExpression"]},b={typeName:"Enum",values:["==","!=","===","!==","<","<=",">",">=","in","instanceof","<<",">>",">>>","+","-","*","/","%","**",",","||","&&","|","^","&"]},$={typeName:"Enum",values:["+=","-=","*=","/=","%=","**=","<<=",">>=",">>>=","|=","^=","&="]},j={typeName:"Enum",values:["+","-","!","~","typeof","void","delete"]},_e={typeName:"Enum",values:["++","--"]},et={typeName:"Enum",values:["var","let","const"]},tt=o.ArrayAssignmentTarget={},nt=o.ArrayBinding={},st=o.ArrayExpression={},rt=o.ArrowExpression={},it=o.AssignmentExpression={},at=o.AssignmentTargetIdentifier={},ot=o.AssignmentTargetPropertyIdentifier={},ut=o.AssignmentTargetPropertyProperty={},ct=o.AssignmentTargetWithDefault={},ht=o.AwaitExpression={},lt=o.BinaryExpression={},pt=o.BindingIdentifier={},ft=o.BindingPropertyIdentifier={},gt=o.BindingPropertyProperty={},yt=o.BindingWithDefault={},mt=o.Block={},Et=o.BlockStatement={},Ot=o.BreakStatement={},St=o.CallExpression={},At=o.CatchClause={},dt=o.ClassDeclaration={},Dt=o.ClassElement={},Ct=o.ClassExpression={},xt=o.CompoundAssignmentExpression={},Tt=o.ComputedMemberAssignmentTarget={},kt=o.ComputedMemberExpression={},_t=o.ComputedPropertyName={},Bt=o.ConditionalExpression={},Ft=o.ContinueStatement={},Lt=o.DataProperty={},tr=o.DebuggerStatement={},Wt=o.Directive={},rr=o.DoWhileStatement={},nr=o.EmptyStatement={},ir=o.Export={},sr=o.ExportAllFrom={},ar=o.ExportDefault={},or=o.ExportFrom={},Xt=o.ExportFromSpecifier={},Ht=o.ExportLocalSpecifier={},ur=o.ExportLocals={},lr=o.ExpressionStatement={},cr=o.ForAwaitStatement={},hr=o.ForInStatement={},fr=o.ForOfStatement={},dr=o.ForStatement={},Qt=o.FormalParameters={},It=o.FunctionBody={},zt=o.FunctionDeclaration={},Zt=o.FunctionExpression={},mr=o.Getter={},Gt=o.IdentifierExpression={},gr=o.IfStatement={},yr=o.Import={},Er=o.ImportNamespace={},Yt=o.ImportSpecifier={},Dr=o.LabeledStatement={},Or=o.LiteralBooleanExpression={},Cr=o.LiteralInfinityExpression={},Sr=o.LiteralNullExpression={},Ar=o.LiteralNumericExpression={},vr=o.LiteralRegExpExpression={},xr=o.LiteralStringExpression={},Tr=o.Method={},kr=o.Module={},_r=o.NewExpression={},br=o.NewTargetExpression={},Pt=o.ObjectAssignmentTarget={},wt=o.ObjectBinding={},Fr=o.ObjectExpression={},Br=o.ReturnStatement={},wr=o.Script={},Pr=o.Setter={},$r=o.ShorthandProperty={},Vt=o.SpreadElement={},Rr=o.SpreadProperty={},Ir=o.StaticMemberAssignmentTarget={},Nr=o.StaticMemberExpression={},Lr=o.StaticPropertyName={},Mt=o.Super={},qt=o.SwitchCase={},Kt=o.SwitchDefault={},Mr=o.SwitchStatement={},Qr=o.SwitchStatementWithDefault={},Jt=o.TemplateElement={},jr=o.TemplateExpression={},Wr=o.ThisExpression={},zr=o.ThrowStatement={},Gr=o.TryCatchStatement={},Vr=o.TryFinallyStatement={},qr=o.UnaryExpression={},Ur=o.UpdateExpression={},Nt=o.VariableDeclaration={},Xr=o.VariableDeclarationStatement={},er=o.VariableDeclarator={},Hr=o.WhileStatement={},Zr=o.WithStatement={},Yr=o.YieldExpression={},Kr=o.YieldGeneratorExpression={},an=g(kt,Nr),Jr=g(ot,ut);g(dt,Ct);var en=g(ir,sr,ar,or,ur),jt=g(_t,Lr);g(zt,Zt);var tn=g(yr,Er),un=g(rr,cr,hr,fr,dr,Hr),$t=g(Tt,Ir),rn=g(ft,gt),nn=g(mr,Tr,Pr),ln=g(kr,wr),cn=g(at,pt,Gt),hn=g(Lt,nn),vt=g(st,rt,it,ht,lt,St,Ct,xt,Bt,Zt,Gt,Or,Cr,Sr,Ar,vr,xr,an,_r,br,Fr,jr,Wr,qr,Ur,Yr,Kr),bt=g(Et,Ot,dt,Ft,tr,nr,lr,zt,gr,un,Dr,Br,Mr,Qr,zr,Gr,Vr,Xr,Zr),sn=g(hn,$r,Rr);return g(tt,nt,Jr,ct,rn,yt,mt,At,Dt,Wt,en,Xt,Ht,vt,Qt,It,tn,Yt,$t,Pt,wt,sn,ln,jt,Vt,bt,Mt,qt,Kt,Jt,Nt,er,cn),tt.typeName="ArrayAssignmentTarget",tt.fields=[{name:"type",type:d(_),value:"ArrayAssignmentTarget"},{name:"elements",type:h(c(g(ct,g(g(tt,Pt),g(at,$t)))))},{name:"rest",type:c(g(g(tt,Pt),g(at,$t)))}],nt.typeName="ArrayBinding",nt.fields=[{name:"type",type:d(_),value:"ArrayBinding"},{name:"elements",type:h(c(g(yt,g(pt,g(nt,wt)))))},{name:"rest",type:c(g(pt,g(nt,wt)))}],st.typeName="ArrayExpression",st.fields=[{name:"type",type:d(_),value:"ArrayExpression"},{name:"elements",type:h(c(g(vt,Vt)))}],rt.typeName="ArrowExpression",rt.fields=[{name:"type",type:d(_),value:"ArrowExpression"},{name:"isAsync",type:e},{name:"params",type:Qt},{name:"body",type:g(vt,It)}],it.typeName="AssignmentExpression",it.fields=[{name:"type",type:d(_),value:"AssignmentExpression"},{name:"binding",type:g(g(tt,Pt),g(at,$t))},{name:"expression",type:vt}],at.typeName="AssignmentTargetIdentifier",at.fields=[{name:"type",type:d(_),value:"AssignmentTargetIdentifier"},{name:"name",type:a}],ot.typeName="AssignmentTargetPropertyIdentifier",ot.fields=[{name:"type",type:d(_),value:"AssignmentTargetPropertyIdentifier"},{name:"binding",type:at},{name:"init",type:c(vt)}],ut.typeName="AssignmentTargetPropertyProperty",ut.fields=[{name:"type",type:d(_),value:"AssignmentTargetPropertyProperty"},{name:"name",type:jt},{name:"binding",type:g(ct,g(g(tt,Pt),g(at,$t)))}],ct.typeName="AssignmentTargetWithDefault",ct.fields=[{name:"type",type:d(_),value:"AssignmentTargetWithDefault"},{name:"binding",type:g(g(tt,Pt),g(at,$t))},{name:"init",type:vt}],ht.typeName="AwaitExpression",ht.fields=[{name:"type",type:d(_),value:"AwaitExpression"},{name:"expression",type:vt}],lt.typeName="BinaryExpression",lt.fields=[{name:"type",type:d(_),value:"BinaryExpression"},{name:"left",type:vt},{name:"operator",type:b},{name:"right",type:vt}],pt.typeName="BindingIdentifier",pt.fields=[{name:"type",type:d(_),value:"BindingIdentifier"},{name:"name",type:a}],ft.typeName="BindingPropertyIdentifier",ft.fields=[{name:"type",type:d(_),value:"BindingPropertyIdentifier"},{name:"binding",type:pt},{name:"init",type:c(vt)}],gt.typeName="BindingPropertyProperty",gt.fields=[{name:"type",type:d(_),value:"BindingPropertyProperty"},{name:"name",type:jt},{name:"binding",type:g(yt,g(pt,g(nt,wt)))}],yt.typeName="BindingWithDefault",yt.fields=[{name:"type",type:d(_),value:"BindingWithDefault"},{name:"binding",type:g(pt,g(nt,wt))},{name:"init",type:vt}],mt.typeName="Block",mt.fields=[{name:"type",type:d(_),value:"Block"},{name:"statements",type:h(bt)}],Et.typeName="BlockStatement",Et.fields=[{name:"type",type:d(_),value:"BlockStatement"},{name:"block",type:mt}],Ot.typeName="BreakStatement",Ot.fields=[{name:"type",type:d(_),value:"BreakStatement"},{name:"label",type:c(a)}],St.typeName="CallExpression",St.fields=[{name:"type",type:d(_),value:"CallExpression"},{name:"callee",type:g(vt,Mt)},{name:"arguments",type:h(g(vt,Vt))}],At.typeName="CatchClause",At.fields=[{name:"type",type:d(_),value:"CatchClause"},{name:"binding",type:g(pt,g(nt,wt))},{name:"body",type:mt}],dt.typeName="ClassDeclaration",dt.fields=[{name:"type",type:d(_),value:"ClassDeclaration"},{name:"name",type:pt},{name:"super",type:c(vt)},{name:"elements",type:h(Dt)}],Dt.typeName="ClassElement",Dt.fields=[{name:"type",type:d(_),value:"ClassElement"},{name:"isStatic",type:e},{name:"method",type:nn}],Ct.typeName="ClassExpression",Ct.fields=[{name:"type",type:d(_),value:"ClassExpression"},{name:"name",type:c(pt)},{name:"super",type:c(vt)},{name:"elements",type:h(Dt)}],xt.typeName="CompoundAssignmentExpression",xt.fields=[{name:"type",type:d(_),value:"CompoundAssignmentExpression"},{name:"binding",type:g(at,$t)},{name:"operator",type:$},{name:"expression",type:vt}],Tt.typeName="ComputedMemberAssignmentTarget",Tt.fields=[{name:"type",type:d(_),value:"ComputedMemberAssignmentTarget"},{name:"object",type:g(vt,Mt)},{name:"expression",type:vt}],kt.typeName="ComputedMemberExpression",kt.fields=[{name:"type",type:d(_),value:"ComputedMemberExpression"},{name:"object",type:g(vt,Mt)},{name:"expression",type:vt}],_t.typeName="ComputedPropertyName",_t.fields=[{name:"type",type:d(_),value:"ComputedPropertyName"},{name:"expression",type:vt}],Bt.typeName="ConditionalExpression",Bt.fields=[{name:"type",type:d(_),value:"ConditionalExpression"},{name:"test",type:vt},{name:"consequent",type:vt},{name:"alternate",type:vt}],Ft.typeName="ContinueStatement",Ft.fields=[{name:"type",type:d(_),value:"ContinueStatement"},{name:"label",type:c(a)}],Lt.typeName="DataProperty",Lt.fields=[{name:"type",type:d(_),value:"DataProperty"},{name:"name",type:jt},{name:"expression",type:vt}],tr.typeName="DebuggerStatement",tr.fields=[{name:"type",type:d(_),value:"DebuggerStatement"}],Wt.typeName="Directive",Wt.fields=[{name:"type",type:d(_),value:"Directive"},{name:"rawValue",type:a}],rr.typeName="DoWhileStatement",rr.fields=[{name:"type",type:d(_),value:"DoWhileStatement"},{name:"body",type:bt},{name:"test",type:vt}],nr.typeName="EmptyStatement",nr.fields=[{name:"type",type:d(_),value:"EmptyStatement"}],ir.typeName="Export",ir.fields=[{name:"type",type:d(_),value:"Export"},{name:"declaration",type:g(dt,zt,Nt)}],sr.typeName="ExportAllFrom",sr.fields=[{name:"type",type:d(_),value:"ExportAllFrom"},{name:"moduleSpecifier",type:a}],ar.typeName="ExportDefault",ar.fields=[{name:"type",type:d(_),value:"ExportDefault"},{name:"body",type:g(dt,vt,zt)}],or.typeName="ExportFrom",or.fields=[{name:"type",type:d(_),value:"ExportFrom"},{name:"namedExports",type:h(Xt)},{name:"moduleSpecifier",type:a}],Xt.typeName="ExportFromSpecifier",Xt.fields=[{name:"type",type:d(_),value:"ExportFromSpecifier"},{name:"name",type:a},{name:"exportedName",type:c(a)}],Ht.typeName="ExportLocalSpecifier",Ht.fields=[{name:"type",type:d(_),value:"ExportLocalSpecifier"},{name:"name",type:Gt},{name:"exportedName",type:c(a)}],ur.typeName="ExportLocals",ur.fields=[{name:"type",type:d(_),value:"ExportLocals"},{name:"namedExports",type:h(Ht)}],lr.typeName="ExpressionStatement",lr.fields=[{name:"type",type:d(_),value:"ExpressionStatement"},{name:"expression",type:vt}],cr.typeName="ForAwaitStatement",cr.fields=[{name:"type",type:d(_),value:"ForAwaitStatement"},{name:"left",type:g(g(g(tt,Pt),g(at,$t)),Nt)},{name:"right",type:vt},{name:"body",type:bt}],hr.typeName="ForInStatement",hr.fields=[{name:"type",type:d(_),value:"ForInStatement"},{name:"left",type:g(g(g(tt,Pt),g(at,$t)),Nt)},{name:"right",type:vt},{name:"body",type:bt}],fr.typeName="ForOfStatement",fr.fields=[{name:"type",type:d(_),value:"ForOfStatement"},{name:"left",type:g(g(g(tt,Pt),g(at,$t)),Nt)},{name:"right",type:vt},{name:"body",type:bt}],dr.typeName="ForStatement",dr.fields=[{name:"type",type:d(_),value:"ForStatement"},{name:"init",type:c(g(vt,Nt))},{name:"test",type:c(vt)},{name:"update",type:c(vt)},{name:"body",type:bt}],Qt.typeName="FormalParameters",Qt.fields=[{name:"type",type:d(_),value:"FormalParameters"},{name:"items",type:h(g(yt,g(pt,g(nt,wt))))},{name:"rest",type:c(g(pt,g(nt,wt)))}],It.typeName="FunctionBody",It.fields=[{name:"type",type:d(_),value:"FunctionBody"},{name:"directives",type:h(Wt)},{name:"statements",type:h(bt)}],zt.typeName="FunctionDeclaration",zt.fields=[{name:"type",type:d(_),value:"FunctionDeclaration"},{name:"isAsync",type:e},{name:"isGenerator",type:e},{name:"name",type:pt},{name:"params",type:Qt},{name:"body",type:It}],Zt.typeName="FunctionExpression",Zt.fields=[{name:"type",type:d(_),value:"FunctionExpression"},{name:"isAsync",type:e},{name:"isGenerator",type:e},{name:"name",type:c(pt)},{name:"params",type:Qt},{name:"body",type:It}],mr.typeName="Getter",mr.fields=[{name:"type",type:d(_),value:"Getter"},{name:"name",type:jt},{name:"body",type:It}],Gt.typeName="IdentifierExpression",Gt.fields=[{name:"type",type:d(_),value:"IdentifierExpression"},{name:"name",type:a}],gr.typeName="IfStatement",gr.fields=[{name:"type",type:d(_),value:"IfStatement"},{name:"test",type:vt},{name:"consequent",type:bt},{name:"alternate",type:c(bt)}],yr.typeName="Import",yr.fields=[{name:"type",type:d(_),value:"Import"},{name:"defaultBinding",type:c(pt)},{name:"namedImports",type:h(Yt)},{name:"moduleSpecifier",type:a}],Er.typeName="ImportNamespace",Er.fields=[{name:"type",type:d(_),value:"ImportNamespace"},{name:"defaultBinding",type:c(pt)},{name:"namespaceBinding",type:pt},{name:"moduleSpecifier",type:a}],Yt.typeName="ImportSpecifier",Yt.fields=[{name:"type",type:d(_),value:"ImportSpecifier"},{name:"name",type:c(a)},{name:"binding",type:pt}],Dr.typeName="LabeledStatement",Dr.fields=[{name:"type",type:d(_),value:"LabeledStatement"},{name:"label",type:a},{name:"body",type:bt}],Or.typeName="LiteralBooleanExpression",Or.fields=[{name:"type",type:d(_),value:"LiteralBooleanExpression"},{name:"value",type:e}],Cr.typeName="LiteralInfinityExpression",Cr.fields=[{name:"type",type:d(_),value:"LiteralInfinityExpression"}],Sr.typeName="LiteralNullExpression",Sr.fields=[{name:"type",type:d(_),value:"LiteralNullExpression"}],Ar.typeName="LiteralNumericExpression",Ar.fields=[{name:"type",type:d(_),value:"LiteralNumericExpression"},{name:"value",type:s}],vr.typeName="LiteralRegExpExpression",vr.fields=[{name:"type",type:d(_),value:"LiteralRegExpExpression"},{name:"pattern",type:a},{name:"global",type:e},{name:"ignoreCase",type:e},{name:"multiLine",type:e},{name:"dotAll",type:e},{name:"unicode",type:e},{name:"sticky",type:e}],xr.typeName="LiteralStringExpression",xr.fields=[{name:"type",type:d(_),value:"LiteralStringExpression"},{name:"value",type:a}],Tr.typeName="Method",Tr.fields=[{name:"type",type:d(_),value:"Method"},{name:"isAsync",type:e},{name:"isGenerator",type:e},{name:"name",type:jt},{name:"params",type:Qt},{name:"body",type:It}],kr.typeName="Module",kr.fields=[{name:"type",type:d(_),value:"Module"},{name:"directives",type:h(Wt)},{name:"items",type:h(g(en,tn,bt))}],_r.typeName="NewExpression",_r.fields=[{name:"type",type:d(_),value:"NewExpression"},{name:"callee",type:vt},{name:"arguments",type:h(g(vt,Vt))}],br.typeName="NewTargetExpression",br.fields=[{name:"type",type:d(_),value:"NewTargetExpression"}],Pt.typeName="ObjectAssignmentTarget",Pt.fields=[{name:"type",type:d(_),value:"ObjectAssignmentTarget"},{name:"properties",type:h(Jr)},{name:"rest",type:c(g(g(tt,Pt),g(at,$t)))}],wt.typeName="ObjectBinding",wt.fields=[{name:"type",type:d(_),value:"ObjectBinding"},{name:"properties",type:h(rn)},{name:"rest",type:c(g(pt,g(nt,wt)))}],Fr.typeName="ObjectExpression",Fr.fields=[{name:"type",type:d(_),value:"ObjectExpression"},{name:"properties",type:h(sn)}],Br.typeName="ReturnStatement",Br.fields=[{name:"type",type:d(_),value:"ReturnStatement"},{name:"expression",type:c(vt)}],wr.typeName="Script",wr.fields=[{name:"type",type:d(_),value:"Script"},{name:"directives",type:h(Wt)},{name:"statements",type:h(bt)}],Pr.typeName="Setter",Pr.fields=[{name:"type",type:d(_),value:"Setter"},{name:"name",type:jt},{name:"param",type:g(yt,g(pt,g(nt,wt)))},{name:"body",type:It}],$r.typeName="ShorthandProperty",$r.fields=[{name:"type",type:d(_),value:"ShorthandProperty"},{name:"name",type:Gt}],Vt.typeName="SpreadElement",Vt.fields=[{name:"type",type:d(_),value:"SpreadElement"},{name:"expression",type:vt}],Rr.typeName="SpreadProperty",Rr.fields=[{name:"type",type:d(_),value:"SpreadProperty"},{name:"expression",type:vt}],Ir.typeName="StaticMemberAssignmentTarget",Ir.fields=[{name:"type",type:d(_),value:"StaticMemberAssignmentTarget"},{name:"object",type:g(vt,Mt)},{name:"property",type:a}],Nr.typeName="StaticMemberExpression",Nr.fields=[{name:"type",type:d(_),value:"StaticMemberExpression"},{name:"object",type:g(vt,Mt)},{name:"property",type:a}],Lr.typeName="StaticPropertyName",Lr.fields=[{name:"type",type:d(_),value:"StaticPropertyName"},{name:"value",type:a}],Mt.typeName="Super",Mt.fields=[{name:"type",type:d(_),value:"Super"}],qt.typeName="SwitchCase",qt.fields=[{name:"type",type:d(_),value:"SwitchCase"},{name:"test",type:vt},{name:"consequent",type:h(bt)}],Kt.typeName="SwitchDefault",Kt.fields=[{name:"type",type:d(_),value:"SwitchDefault"},{name:"consequent",type:h(bt)}],Mr.typeName="SwitchStatement",Mr.fields=[{name:"type",type:d(_),value:"SwitchStatement"},{name:"discriminant",type:vt},{name:"cases",type:h(qt)}],Qr.typeName="SwitchStatementWithDefault",Qr.fields=[{name:"type",type:d(_),value:"SwitchStatementWithDefault"},{name:"discriminant",type:vt},{name:"preDefaultCases",type:h(qt)},{name:"defaultCase",type:Kt},{name:"postDefaultCases",type:h(qt)}],Jt.typeName="TemplateElement",Jt.fields=[{name:"type",type:d(_),value:"TemplateElement"},{name:"rawValue",type:a}],jr.typeName="TemplateExpression",jr.fields=[{name:"type",type:d(_),value:"TemplateExpression"},{name:"tag",type:c(vt)},{name:"elements",type:h(g(vt,Jt))}],Wr.typeName="ThisExpression",Wr.fields=[{name:"type",type:d(_),value:"ThisExpression"}],zr.typeName="ThrowStatement",zr.fields=[{name:"type",type:d(_),value:"ThrowStatement"},{name:"expression",type:vt}],Gr.typeName="TryCatchStatement",Gr.fields=[{name:"type",type:d(_),value:"TryCatchStatement"},{name:"body",type:mt},{name:"catchClause",type:At}],Vr.typeName="TryFinallyStatement",Vr.fields=[{name:"type",type:d(_),value:"TryFinallyStatement"},{name:"body",type:mt},{name:"catchClause",type:c(At)},{name:"finalizer",type:mt}],qr.typeName="UnaryExpression",qr.fields=[{name:"type",type:d(_),value:"UnaryExpression"},{name:"operator",type:j},{name:"operand",type:vt}],Ur.typeName="UpdateExpression",Ur.fields=[{name:"type",type:d(_),value:"UpdateExpression"},{name:"isPrefix",type:e},{name:"operator",type:_e},{name:"operand",type:g(at,$t)}],Nt.typeName="VariableDeclaration",Nt.fields=[{name:"type",type:d(_),value:"VariableDeclaration"},{name:"kind",type:et},{name:"declarators",type:h(er)}],Xr.typeName="VariableDeclarationStatement",Xr.fields=[{name:"type",type:d(_),value:"VariableDeclarationStatement"},{name:"declaration",type:Nt}],er.typeName="VariableDeclarator",er.fields=[{name:"type",type:d(_),value:"VariableDeclarator"},{name:"binding",type:g(pt,g(nt,wt))},{name:"init",type:c(vt)}],Hr.typeName="WhileStatement",Hr.fields=[{name:"type",type:d(_),value:"WhileStatement"},{name:"test",type:vt},{name:"body",type:bt}],Zr.typeName="WithStatement",Zr.fields=[{name:"type",type:d(_),value:"WithStatement"},{name:"object",type:vt},{name:"body",type:bt}],Yr.typeName="YieldExpression",Yr.fields=[{name:"type",type:d(_),value:"YieldExpression"},{name:"expression",type:c(vt)}],Kr.typeName="YieldGeneratorExpression",Kr.fields=[{name:"type",type:d(_),value:"YieldGeneratorExpression"},{name:"expression",type:vt}],o}(),estraverse$1={};(function(o){(function e(s){var a,c,h,d,g,_;function b(ut){var ct={},ht,lt;for(ht in ut)ut.hasOwnProperty(ht)&&(lt=ut[ht],typeof lt=="object"&<!==null?ct[ht]=b(lt):ct[ht]=lt);return ct}function $(ut,ct){var ht,lt,pt,ft;for(lt=ut.length,pt=0;lt;)ht=lt>>>1,ft=pt+ht,ct(ut[ft])?lt=ht:(pt=ft+1,lt-=ht+1);return pt}a={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},h={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},d={},g={},_={},c={Break:d,Skip:g,Remove:_};function j(ut,ct){this.parent=ut,this.key=ct}j.prototype.replace=function(ct){this.parent[this.key]=ct},j.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function _e(ut,ct,ht,lt){this.node=ut,this.path=ct,this.wrap=ht,this.ref=lt}function et(){}et.prototype.path=function(){var ct,ht,lt,pt,ft,gt;function yt(mt,Et){if(Array.isArray(Et))for(lt=0,pt=Et.length;lt<pt;++lt)mt.push(Et[lt]);else mt.push(Et)}if(!this.__current.path)return null;for(ft=[],ct=2,ht=this.__leavelist.length;ct<ht;++ct)gt=this.__leavelist[ct],yt(ft,gt.path);return yt(ft,this.__current.path),ft},et.prototype.type=function(){var ut=this.current();return ut.type||this.__current.wrap},et.prototype.parents=function(){var ct,ht,lt;for(lt=[],ct=1,ht=this.__leavelist.length;ct<ht;++ct)lt.push(this.__leavelist[ct].node);return lt},et.prototype.current=function(){return this.__current.node},et.prototype.__execute=function(ct,ht){var lt,pt;return pt=void 0,lt=this.__current,this.__current=ht,this.__state=null,ct&&(pt=ct.call(this,ht.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=lt,pt},et.prototype.notify=function(ct){this.__state=ct},et.prototype.skip=function(){this.notify(g)},et.prototype.break=function(){this.notify(d)},et.prototype.remove=function(){this.notify(_)},et.prototype.__initialize=function(ut,ct){this.visitor=ct,this.root=ut,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,ct.fallback==="iteration"?this.__fallback=Object.keys:typeof ct.fallback=="function"&&(this.__fallback=ct.fallback),this.__keys=h,ct.keys&&(this.__keys=Object.assign(Object.create(this.__keys),ct.keys))};function tt(ut){return ut==null?!1:typeof ut=="object"&&typeof ut.type=="string"}function nt(ut,ct){return(ut===a.ObjectExpression||ut===a.ObjectPattern)&&ct==="properties"}function st(ut,ct){for(var ht=ut.length-1;ht>=0;--ht)if(ut[ht].node===ct)return!0;return!1}et.prototype.traverse=function(ct,ht){var lt,pt,ft,gt,yt,mt,Et,Ot,St,At,dt,Dt;for(this.__initialize(ct,ht),Dt={},lt=this.__worklist,pt=this.__leavelist,lt.push(new _e(ct,null,null,null)),pt.push(new _e(null,null,null,null));lt.length;){if(ft=lt.pop(),ft===Dt){if(ft=pt.pop(),mt=this.__execute(ht.leave,ft),this.__state===d||mt===d)return;continue}if(ft.node){if(mt=this.__execute(ht.enter,ft),this.__state===d||mt===d)return;if(lt.push(Dt),pt.push(ft),this.__state===g||mt===g)continue;if(gt=ft.node,yt=gt.type||ft.wrap,At=this.__keys[yt],!At)if(this.__fallback)At=this.__fallback(gt);else throw new Error("Unknown node type "+yt+".");for(Ot=At.length;(Ot-=1)>=0;)if(Et=At[Ot],dt=gt[Et],!!dt){if(Array.isArray(dt)){for(St=dt.length;(St-=1)>=0;)if(!!dt[St]&&!st(pt,dt[St])){if(nt(yt,At[Ot]))ft=new _e(dt[St],[Et,St],"Property",null);else if(tt(dt[St]))ft=new _e(dt[St],[Et,St],null,null);else continue;lt.push(ft)}}else if(tt(dt)){if(st(pt,dt))continue;lt.push(new _e(dt,Et,null,null))}}}}},et.prototype.replace=function(ct,ht){var lt,pt,ft,gt,yt,mt,Et,Ot,St,At,dt,Dt,Ct;function xt(Tt){var kt,_t,Bt,Ft;if(Tt.ref.remove()){for(_t=Tt.ref.key,Ft=Tt.ref.parent,kt=lt.length;kt--;)if(Bt=lt[kt],Bt.ref&&Bt.ref.parent===Ft){if(Bt.ref.key<_t)break;--Bt.ref.key}}}for(this.__initialize(ct,ht),dt={},lt=this.__worklist,pt=this.__leavelist,Dt={root:ct},mt=new _e(ct,null,null,new j(Dt,"root")),lt.push(mt),pt.push(mt);lt.length;){if(mt=lt.pop(),mt===dt){if(mt=pt.pop(),yt=this.__execute(ht.leave,mt),yt!==void 0&&yt!==d&&yt!==g&&yt!==_&&mt.ref.replace(yt),(this.__state===_||yt===_)&&xt(mt),this.__state===d||yt===d)return Dt.root;continue}if(yt=this.__execute(ht.enter,mt),yt!==void 0&&yt!==d&&yt!==g&&yt!==_&&(mt.ref.replace(yt),mt.node=yt),(this.__state===_||yt===_)&&(xt(mt),mt.node=null),this.__state===d||yt===d)return Dt.root;if(ft=mt.node,!!ft&&(lt.push(dt),pt.push(mt),!(this.__state===g||yt===g))){if(gt=ft.type||mt.wrap,St=this.__keys[gt],!St)if(this.__fallback)St=this.__fallback(ft);else throw new Error("Unknown node type "+gt+".");for(Et=St.length;(Et-=1)>=0;)if(Ct=St[Et],At=ft[Ct],!!At)if(Array.isArray(At)){for(Ot=At.length;(Ot-=1)>=0;)if(!!At[Ot]){if(nt(gt,St[Et]))mt=new _e(At[Ot],[Ct,Ot],"Property",new j(At,Ot));else if(tt(At[Ot]))mt=new _e(At[Ot],[Ct,Ot],null,new j(At,Ot));else continue;lt.push(mt)}}else tt(At)&<.push(new _e(At,Ct,null,new j(ft,Ct)))}}return Dt.root};function rt(ut,ct){var ht=new et;return ht.traverse(ut,ct)}function it(ut,ct){var ht=new et;return ht.replace(ut,ct)}function at(ut,ct){var ht;return ht=$(ct,function(pt){return pt.range[0]>ut.range[0]}),ut.extendedRange=[ut.range[0],ut.range[1]],ht!==ct.length&&(ut.extendedRange[1]=ct[ht].range[0]),ht-=1,ht>=0&&(ut.extendedRange[0]=ct[ht].range[1]),ut}function ot(ut,ct,ht){var lt=[],pt,ft,gt,yt;if(!ut.range)throw new Error("attachComments needs range information");if(!ht.length){if(ct.length){for(gt=0,ft=ct.length;gt<ft;gt+=1)pt=b(ct[gt]),pt.extendedRange=[0,ut.range[0]],lt.push(pt);ut.leadingComments=lt}return ut}for(gt=0,ft=ct.length;gt<ft;gt+=1)lt.push(at(b(ct[gt]),ht));return yt=0,rt(ut,{enter:function(mt){for(var Et;yt<lt.length&&(Et=lt[yt],!(Et.extendedRange[1]>mt.range[0]));)Et.extendedRange[1]===mt.range[0]?(mt.leadingComments||(mt.leadingComments=[]),mt.leadingComments.push(Et),lt.splice(yt,1)):yt+=1;if(yt===lt.length)return c.Break;if(lt[yt].extendedRange[0]>mt.range[1])return c.Skip}}),yt=0,rt(ut,{leave:function(mt){for(var Et;yt<lt.length&&(Et=lt[yt],!(mt.range[1]<Et.extendedRange[0]));)mt.range[1]===Et.extendedRange[0]?(mt.trailingComments||(mt.trailingComments=[]),mt.trailingComments.push(Et),lt.splice(yt,1)):yt+=1;if(yt===lt.length)return c.Break;if(lt[yt].extendedRange[0]>mt.range[1])return c.Skip}}),ut}return s.Syntax=a,s.traverse=rt,s.replace=it,s.attachComments=ot,s.VisitorKeys=h,s.VisitorOption=c,s.Controller=et,s.cloneEnvironment=function(){return e({})},s})(o)})(estraverse$1);const Spec=_default.default||_default,estraverse=estraverse$1.cloneEnvironment();Object.keys(estraverse.Syntax).filter(o=>o!=="Property").forEach(o=>{delete estraverse.Syntax[o],delete estraverse.VisitorKeys[o]});Object.assign(estraverse.Syntax,Object.keys(Spec).reduce((o,e)=>(o[e]=e,o),{}));Object.assign(estraverse.VisitorKeys,Object.keys(Spec).reduce((o,e)=>(o[e]=Spec[e].fields.map(s=>s.name),o),{}));var dist$1={},StaticMemberExpression_1,ReturnStatement_1,LiteralStringExpression_1,LiteralNumericExpression_1,IdentifierExpression_1,CallExpression_1,ArrayExpression_1;Object.defineProperty(dist$1,"__esModule",{value:!0});function _classCallCheck$5(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}dist$1.ArrayAssignmentTarget=function o(e){var s=e.elements,a=e.rest;_classCallCheck$5(this,o),this.type="ArrayAssignmentTarget",this.elements=s,this.rest=a};dist$1.ArrayBinding=function o(e){var s=e.elements,a=e.rest;_classCallCheck$5(this,o),this.type="ArrayBinding",this.elements=s,this.rest=a};ArrayExpression_1=dist$1.ArrayExpression=function o(e){var s=e.elements;_classCallCheck$5(this,o),this.type="ArrayExpression",this.elements=s};dist$1.ArrowExpression=function o(e){var s=e.isAsync,a=e.params,c=e.body;_classCallCheck$5(this,o),this.type="ArrowExpression",this.isAsync=s,this.params=a,this.body=c};dist$1.AssignmentExpression=function o(e){var s=e.binding,a=e.expression;_classCallCheck$5(this,o),this.type="AssignmentExpression",this.binding=s,this.expression=a};dist$1.AssignmentTargetIdentifier=function o(e){var s=e.name;_classCallCheck$5(this,o),this.type="AssignmentTargetIdentifier",this.name=s};dist$1.AssignmentTargetPropertyIdentifier=function o(e){var s=e.binding,a=e.init;_classCallCheck$5(this,o),this.type="AssignmentTargetPropertyIdentifier",this.binding=s,this.init=a};dist$1.AssignmentTargetPropertyProperty=function o(e){var s=e.name,a=e.binding;_classCallCheck$5(this,o),this.type="AssignmentTargetPropertyProperty",this.name=s,this.binding=a};dist$1.AssignmentTargetWithDefault=function o(e){var s=e.binding,a=e.init;_classCallCheck$5(this,o),this.type="AssignmentTargetWithDefault",this.binding=s,this.init=a};dist$1.AwaitExpression=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="AwaitExpression",this.expression=s};dist$1.BinaryExpression=function o(e){var s=e.left,a=e.operator,c=e.right;_classCallCheck$5(this,o),this.type="BinaryExpression",this.left=s,this.operator=a,this.right=c};dist$1.BindingIdentifier=function o(e){var s=e.name;_classCallCheck$5(this,o),this.type="BindingIdentifier",this.name=s};dist$1.BindingPropertyIdentifier=function o(e){var s=e.binding,a=e.init;_classCallCheck$5(this,o),this.type="BindingPropertyIdentifier",this.binding=s,this.init=a};dist$1.BindingPropertyProperty=function o(e){var s=e.name,a=e.binding;_classCallCheck$5(this,o),this.type="BindingPropertyProperty",this.name=s,this.binding=a};dist$1.BindingWithDefault=function o(e){var s=e.binding,a=e.init;_classCallCheck$5(this,o),this.type="BindingWithDefault",this.binding=s,this.init=a};dist$1.Block=function o(e){var s=e.statements;_classCallCheck$5(this,o),this.type="Block",this.statements=s};dist$1.BlockStatement=function o(e){var s=e.block;_classCallCheck$5(this,o),this.type="BlockStatement",this.block=s};dist$1.BreakStatement=function o(e){var s=e.label;_classCallCheck$5(this,o),this.type="BreakStatement",this.label=s};CallExpression_1=dist$1.CallExpression=function o(e){var s=e.callee,a=e.arguments;_classCallCheck$5(this,o),this.type="CallExpression",this.callee=s,this.arguments=a};dist$1.CatchClause=function o(e){var s=e.binding,a=e.body;_classCallCheck$5(this,o),this.type="CatchClause",this.binding=s,this.body=a};dist$1.ClassDeclaration=function o(e){var s=e.name,a=e.super,c=e.elements;_classCallCheck$5(this,o),this.type="ClassDeclaration",this.name=s,this.super=a,this.elements=c};dist$1.ClassElement=function o(e){var s=e.isStatic,a=e.method;_classCallCheck$5(this,o),this.type="ClassElement",this.isStatic=s,this.method=a};dist$1.ClassExpression=function o(e){var s=e.name,a=e.super,c=e.elements;_classCallCheck$5(this,o),this.type="ClassExpression",this.name=s,this.super=a,this.elements=c};dist$1.CompoundAssignmentExpression=function o(e){var s=e.binding,a=e.operator,c=e.expression;_classCallCheck$5(this,o),this.type="CompoundAssignmentExpression",this.binding=s,this.operator=a,this.expression=c};dist$1.ComputedMemberAssignmentTarget=function o(e){var s=e.object,a=e.expression;_classCallCheck$5(this,o),this.type="ComputedMemberAssignmentTarget",this.object=s,this.expression=a};dist$1.ComputedMemberExpression=function o(e){var s=e.object,a=e.expression;_classCallCheck$5(this,o),this.type="ComputedMemberExpression",this.object=s,this.expression=a};dist$1.ComputedPropertyName=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="ComputedPropertyName",this.expression=s};dist$1.ConditionalExpression=function o(e){var s=e.test,a=e.consequent,c=e.alternate;_classCallCheck$5(this,o),this.type="ConditionalExpression",this.test=s,this.consequent=a,this.alternate=c};dist$1.ContinueStatement=function o(e){var s=e.label;_classCallCheck$5(this,o),this.type="ContinueStatement",this.label=s};dist$1.DataProperty=function o(e){var s=e.name,a=e.expression;_classCallCheck$5(this,o),this.type="DataProperty",this.name=s,this.expression=a};dist$1.DebuggerStatement=function o(){_classCallCheck$5(this,o),this.type="DebuggerStatement"};dist$1.Directive=function o(e){var s=e.rawValue;_classCallCheck$5(this,o),this.type="Directive",this.rawValue=s};dist$1.DoWhileStatement=function o(e){var s=e.body,a=e.test;_classCallCheck$5(this,o),this.type="DoWhileStatement",this.body=s,this.test=a};dist$1.EmptyStatement=function o(){_classCallCheck$5(this,o),this.type="EmptyStatement"};dist$1.Export=function o(e){var s=e.declaration;_classCallCheck$5(this,o),this.type="Export",this.declaration=s};dist$1.ExportAllFrom=function o(e){var s=e.moduleSpecifier;_classCallCheck$5(this,o),this.type="ExportAllFrom",this.moduleSpecifier=s};dist$1.ExportDefault=function o(e){var s=e.body;_classCallCheck$5(this,o),this.type="ExportDefault",this.body=s};dist$1.ExportFrom=function o(e){var s=e.namedExports,a=e.moduleSpecifier;_classCallCheck$5(this,o),this.type="ExportFrom",this.namedExports=s,this.moduleSpecifier=a};dist$1.ExportFromSpecifier=function o(e){var s=e.name,a=e.exportedName;_classCallCheck$5(this,o),this.type="ExportFromSpecifier",this.name=s,this.exportedName=a};dist$1.ExportLocalSpecifier=function o(e){var s=e.name,a=e.exportedName;_classCallCheck$5(this,o),this.type="ExportLocalSpecifier",this.name=s,this.exportedName=a};dist$1.ExportLocals=function o(e){var s=e.namedExports;_classCallCheck$5(this,o),this.type="ExportLocals",this.namedExports=s};dist$1.ExpressionStatement=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="ExpressionStatement",this.expression=s};dist$1.ForAwaitStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$5(this,o),this.type="ForAwaitStatement",this.left=s,this.right=a,this.body=c};dist$1.ForInStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$5(this,o),this.type="ForInStatement",this.left=s,this.right=a,this.body=c};dist$1.ForOfStatement=function o(e){var s=e.left,a=e.right,c=e.body;_classCallCheck$5(this,o),this.type="ForOfStatement",this.left=s,this.right=a,this.body=c};dist$1.ForStatement=function o(e){var s=e.init,a=e.test,c=e.update,h=e.body;_classCallCheck$5(this,o),this.type="ForStatement",this.init=s,this.test=a,this.update=c,this.body=h};dist$1.FormalParameters=function o(e){var s=e.items,a=e.rest;_classCallCheck$5(this,o),this.type="FormalParameters",this.items=s,this.rest=a};dist$1.FunctionBody=function o(e){var s=e.directives,a=e.statements;_classCallCheck$5(this,o),this.type="FunctionBody",this.directives=s,this.statements=a};dist$1.FunctionDeclaration=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$5(this,o),this.type="FunctionDeclaration",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$1.FunctionExpression=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$5(this,o),this.type="FunctionExpression",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$1.Getter=function o(e){var s=e.name,a=e.body;_classCallCheck$5(this,o),this.type="Getter",this.name=s,this.body=a};IdentifierExpression_1=dist$1.IdentifierExpression=function o(e){var s=e.name;_classCallCheck$5(this,o),this.type="IdentifierExpression",this.name=s};dist$1.IfStatement=function o(e){var s=e.test,a=e.consequent,c=e.alternate;_classCallCheck$5(this,o),this.type="IfStatement",this.test=s,this.consequent=a,this.alternate=c};dist$1.Import=function o(e){var s=e.defaultBinding,a=e.namedImports,c=e.moduleSpecifier;_classCallCheck$5(this,o),this.type="Import",this.defaultBinding=s,this.namedImports=a,this.moduleSpecifier=c};dist$1.ImportNamespace=function o(e){var s=e.defaultBinding,a=e.namespaceBinding,c=e.moduleSpecifier;_classCallCheck$5(this,o),this.type="ImportNamespace",this.defaultBinding=s,this.namespaceBinding=a,this.moduleSpecifier=c};dist$1.ImportSpecifier=function o(e){var s=e.name,a=e.binding;_classCallCheck$5(this,o),this.type="ImportSpecifier",this.name=s,this.binding=a};dist$1.LabeledStatement=function o(e){var s=e.label,a=e.body;_classCallCheck$5(this,o),this.type="LabeledStatement",this.label=s,this.body=a};dist$1.LiteralBooleanExpression=function o(e){var s=e.value;_classCallCheck$5(this,o),this.type="LiteralBooleanExpression",this.value=s};dist$1.LiteralInfinityExpression=function o(){_classCallCheck$5(this,o),this.type="LiteralInfinityExpression"};dist$1.LiteralNullExpression=function o(){_classCallCheck$5(this,o),this.type="LiteralNullExpression"};LiteralNumericExpression_1=dist$1.LiteralNumericExpression=function o(e){var s=e.value;_classCallCheck$5(this,o),this.type="LiteralNumericExpression",this.value=s};dist$1.LiteralRegExpExpression=function o(e){var s=e.pattern,a=e.global,c=e.ignoreCase,h=e.multiLine,d=e.dotAll,g=e.unicode,_=e.sticky;_classCallCheck$5(this,o),this.type="LiteralRegExpExpression",this.pattern=s,this.global=a,this.ignoreCase=c,this.multiLine=h,this.dotAll=d,this.unicode=g,this.sticky=_};LiteralStringExpression_1=dist$1.LiteralStringExpression=function o(e){var s=e.value;_classCallCheck$5(this,o),this.type="LiteralStringExpression",this.value=s};dist$1.Method=function o(e){var s=e.isAsync,a=e.isGenerator,c=e.name,h=e.params,d=e.body;_classCallCheck$5(this,o),this.type="Method",this.isAsync=s,this.isGenerator=a,this.name=c,this.params=h,this.body=d};dist$1.Module=function o(e){var s=e.directives,a=e.items;_classCallCheck$5(this,o),this.type="Module",this.directives=s,this.items=a};dist$1.NewExpression=function o(e){var s=e.callee,a=e.arguments;_classCallCheck$5(this,o),this.type="NewExpression",this.callee=s,this.arguments=a};dist$1.NewTargetExpression=function o(){_classCallCheck$5(this,o),this.type="NewTargetExpression"};dist$1.ObjectAssignmentTarget=function o(e){var s=e.properties,a=e.rest;_classCallCheck$5(this,o),this.type="ObjectAssignmentTarget",this.properties=s,this.rest=a};dist$1.ObjectBinding=function o(e){var s=e.properties,a=e.rest;_classCallCheck$5(this,o),this.type="ObjectBinding",this.properties=s,this.rest=a};dist$1.ObjectExpression=function o(e){var s=e.properties;_classCallCheck$5(this,o),this.type="ObjectExpression",this.properties=s};ReturnStatement_1=dist$1.ReturnStatement=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="ReturnStatement",this.expression=s};dist$1.Script=function o(e){var s=e.directives,a=e.statements;_classCallCheck$5(this,o),this.type="Script",this.directives=s,this.statements=a};dist$1.Setter=function o(e){var s=e.name,a=e.param,c=e.body;_classCallCheck$5(this,o),this.type="Setter",this.name=s,this.param=a,this.body=c};dist$1.ShorthandProperty=function o(e){var s=e.name;_classCallCheck$5(this,o),this.type="ShorthandProperty",this.name=s};dist$1.SpreadElement=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="SpreadElement",this.expression=s};dist$1.SpreadProperty=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="SpreadProperty",this.expression=s};dist$1.StaticMemberAssignmentTarget=function o(e){var s=e.object,a=e.property;_classCallCheck$5(this,o),this.type="StaticMemberAssignmentTarget",this.object=s,this.property=a};StaticMemberExpression_1=dist$1.StaticMemberExpression=function o(e){var s=e.object,a=e.property;_classCallCheck$5(this,o),this.type="StaticMemberExpression",this.object=s,this.property=a};dist$1.StaticPropertyName=function o(e){var s=e.value;_classCallCheck$5(this,o),this.type="StaticPropertyName",this.value=s};dist$1.Super=function o(){_classCallCheck$5(this,o),this.type="Super"};dist$1.SwitchCase=function o(e){var s=e.test,a=e.consequent;_classCallCheck$5(this,o),this.type="SwitchCase",this.test=s,this.consequent=a};dist$1.SwitchDefault=function o(e){var s=e.consequent;_classCallCheck$5(this,o),this.type="SwitchDefault",this.consequent=s};dist$1.SwitchStatement=function o(e){var s=e.discriminant,a=e.cases;_classCallCheck$5(this,o),this.type="SwitchStatement",this.discriminant=s,this.cases=a};dist$1.SwitchStatementWithDefault=function o(e){var s=e.discriminant,a=e.preDefaultCases,c=e.defaultCase,h=e.postDefaultCases;_classCallCheck$5(this,o),this.type="SwitchStatementWithDefault",this.discriminant=s,this.preDefaultCases=a,this.defaultCase=c,this.postDefaultCases=h};dist$1.TemplateElement=function o(e){var s=e.rawValue;_classCallCheck$5(this,o),this.type="TemplateElement",this.rawValue=s};dist$1.TemplateExpression=function o(e){var s=e.tag,a=e.elements;_classCallCheck$5(this,o),this.type="TemplateExpression",this.tag=s,this.elements=a};dist$1.ThisExpression=function o(){_classCallCheck$5(this,o),this.type="ThisExpression"};dist$1.ThrowStatement=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="ThrowStatement",this.expression=s};dist$1.TryCatchStatement=function o(e){var s=e.body,a=e.catchClause;_classCallCheck$5(this,o),this.type="TryCatchStatement",this.body=s,this.catchClause=a};dist$1.TryFinallyStatement=function o(e){var s=e.body,a=e.catchClause,c=e.finalizer;_classCallCheck$5(this,o),this.type="TryFinallyStatement",this.body=s,this.catchClause=a,this.finalizer=c};dist$1.UnaryExpression=function o(e){var s=e.operator,a=e.operand;_classCallCheck$5(this,o),this.type="UnaryExpression",this.operator=s,this.operand=a};dist$1.UpdateExpression=function o(e){var s=e.isPrefix,a=e.operator,c=e.operand;_classCallCheck$5(this,o),this.type="UpdateExpression",this.isPrefix=s,this.operator=a,this.operand=c};dist$1.VariableDeclaration=function o(e){var s=e.kind,a=e.declarators;_classCallCheck$5(this,o),this.type="VariableDeclaration",this.kind=s,this.declarators=a};dist$1.VariableDeclarationStatement=function o(e){var s=e.declaration;_classCallCheck$5(this,o),this.type="VariableDeclarationStatement",this.declaration=s};dist$1.VariableDeclarator=function o(e){var s=e.binding,a=e.init;_classCallCheck$5(this,o),this.type="VariableDeclarator",this.binding=s,this.init=a};dist$1.WhileStatement=function o(e){var s=e.test,a=e.body;_classCallCheck$5(this,o),this.type="WhileStatement",this.test=s,this.body=a};dist$1.WithStatement=function o(e){var s=e.object,a=e.body;_classCallCheck$5(this,o),this.type="WithStatement",this.object=s,this.body=a};dist$1.YieldExpression=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="YieldExpression",this.expression=s};dist$1.YieldGeneratorExpression=function o(e){var s=e.expression;_classCallCheck$5(this,o),this.type="YieldGeneratorExpression",this.expression=s};var dist={},minimalCodegen={};/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function shouldUseNative(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var e={},s=0;s<10;s++)e["_"+String.fromCharCode(s)]=s;var a=Object.getOwnPropertyNames(e).map(function(h){return e[h]});if(a.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var objectAssign=shouldUseNative()?Object.assign:function(o,e){for(var s,a=toObject(o),c,h=1;h<arguments.length;h++){s=Object(arguments[h]);for(var d in s)hasOwnProperty.call(s,d)&&(a[d]=s[d]);if(getOwnPropertySymbols){c=getOwnPropertySymbols(s);for(var g=0;g<c.length;g++)propIsEnumerable.call(s,c[g])&&(a[c[g]]=s[c[g]])}}return a},utils={},ast={exports:{}};(function(){function o(d){if(d==null)return!1;switch(d.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function e(d){if(d==null)return!1;switch(d.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function s(d){if(d==null)return!1;switch(d.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function a(d){return s(d)||d!=null&&d.type==="FunctionDeclaration"}function c(d){switch(d.type){case"IfStatement":return d.alternate!=null?d.alternate:d.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return d.body}return null}function h(d){var g;if(d.type!=="IfStatement"||d.alternate==null)return!1;g=d.consequent;do{if(g.type==="IfStatement"&&g.alternate==null)return!0;g=c(g)}while(g);return!1}ast.exports={isExpression:o,isStatement:s,isIterationStatement:e,isSourceElement:a,isProblematicIfStatement:h,trailingStatement:c}})();var code$1={exports:{}};(function(){var o,e,s,a,c,h;e={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},o={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function d(st){return 48<=st&&st<=57}function g(st){return 48<=st&&st<=57||97<=st&&st<=102||65<=st&&st<=70}function _(st){return st>=48&&st<=55}s=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function b(st){return st===32||st===9||st===11||st===12||st===160||st>=5760&&s.indexOf(st)>=0}function $(st){return st===10||st===13||st===8232||st===8233}function j(st){if(st<=65535)return String.fromCharCode(st);var rt=String.fromCharCode(Math.floor((st-65536)/1024)+55296),it=String.fromCharCode((st-65536)%1024+56320);return rt+it}for(a=new Array(128),h=0;h<128;++h)a[h]=h>=97&&h<=122||h>=65&&h<=90||h===36||h===95;for(c=new Array(128),h=0;h<128;++h)c[h]=h>=97&&h<=122||h>=65&&h<=90||h>=48&&h<=57||h===36||h===95;function _e(st){return st<128?a[st]:e.NonAsciiIdentifierStart.test(j(st))}function et(st){return st<128?c[st]:e.NonAsciiIdentifierPart.test(j(st))}function tt(st){return st<128?a[st]:o.NonAsciiIdentifierStart.test(j(st))}function nt(st){return st<128?c[st]:o.NonAsciiIdentifierPart.test(j(st))}code$1.exports={isDecimalDigit:d,isHexDigit:g,isOctalDigit:_,isWhiteSpace:b,isLineTerminator:$,isIdentifierStartES5:_e,isIdentifierPartES5:et,isIdentifierStartES6:tt,isIdentifierPartES6:nt}})();var keyword$1={exports:{}};(function(){var o=code$1.exports;function e(_e){switch(_e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function s(_e,et){return!et&&_e==="yield"?!1:a(_e,et)}function a(_e,et){if(et&&e(_e))return!0;switch(_e.length){case 2:return _e==="if"||_e==="in"||_e==="do";case 3:return _e==="var"||_e==="for"||_e==="new"||_e==="try";case 4:return _e==="this"||_e==="else"||_e==="case"||_e==="void"||_e==="with"||_e==="enum";case 5:return _e==="while"||_e==="break"||_e==="catch"||_e==="throw"||_e==="const"||_e==="yield"||_e==="class"||_e==="super";case 6:return _e==="return"||_e==="typeof"||_e==="delete"||_e==="switch"||_e==="export"||_e==="import";case 7:return _e==="default"||_e==="finally"||_e==="extends";case 8:return _e==="function"||_e==="continue"||_e==="debugger";case 10:return _e==="instanceof";default:return!1}}function c(_e,et){return _e==="null"||_e==="true"||_e==="false"||s(_e,et)}function h(_e,et){return _e==="null"||_e==="true"||_e==="false"||a(_e,et)}function d(_e){return _e==="eval"||_e==="arguments"}function g(_e){var et,tt,nt;if(_e.length===0||(nt=_e.charCodeAt(0),!o.isIdentifierStartES5(nt)))return!1;for(et=1,tt=_e.length;et<tt;++et)if(nt=_e.charCodeAt(et),!o.isIdentifierPartES5(nt))return!1;return!0}function _(_e,et){return(_e-55296)*1024+(et-56320)+65536}function b(_e){var et,tt,nt,st,rt;if(_e.length===0)return!1;for(rt=o.isIdentifierStartES6,et=0,tt=_e.length;et<tt;++et){if(nt=_e.charCodeAt(et),55296<=nt&&nt<=56319){if(++et,et>=tt||(st=_e.charCodeAt(et),!(56320<=st&&st<=57343)))return!1;nt=_(nt,st)}if(!rt(nt))return!1;rt=o.isIdentifierPartES6}return!0}function $(_e,et){return g(_e)&&!c(_e,et)}function j(_e,et){return b(_e)&&!h(_e,et)}keyword$1.exports={isKeywordES5:s,isKeywordES6:a,isReservedWordES5:c,isReservedWordES6:h,isRestrictedWord:d,isIdentifierNameES5:g,isIdentifierNameES6:b,isIdentifierES5:$,isIdentifierES6:j}})();(function(){utils.ast=ast.exports,utils.code=code$1.exports,utils.keyword=keyword$1.exports})();var coderep={};Object.defineProperty(coderep,"__esModule",{value:!0});var _createClass$4=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}();coderep.getPrecedence=getPrecedence;coderep.escapeStringLiteral=escapeStringLiteral;function _possibleConstructorReturn$2(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits$2(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}function _classCallCheck$4(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}var Precedence={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Exponential:13,Prefix:14,Postfix:15,New:16,Call:17,TaggedTemplate:18,Member:19,Primary:20};coderep.Precedence=Precedence;var BinaryPrecedence={",":Precedence.Sequence,"||":Precedence.LogicalOR,"&&":Precedence.LogicalAND,"|":Precedence.BitwiseOR,"^":Precedence.BitwiseXOR,"&":Precedence.BitwiseAND,"==":Precedence.Equality,"!=":Precedence.Equality,"===":Precedence.Equality,"!==":Precedence.Equality,"<":Precedence.Relational,">":Precedence.Relational,"<=":Precedence.Relational,">=":Precedence.Relational,in:Precedence.Relational,instanceof:Precedence.Relational,"<<":Precedence.BitwiseSHIFT,">>":Precedence.BitwiseSHIFT,">>>":Precedence.BitwiseSHIFT,"+":Precedence.Additive,"-":Precedence.Additive,"*":Precedence.Multiplicative,"%":Precedence.Multiplicative,"/":Precedence.Multiplicative,"**":Precedence.Exponential};function getPrecedence(o){switch(o.type){case"ArrayExpression":case"FunctionExpression":case"ClassExpression":case"IdentifierExpression":case"AssignmentTargetIdentifier":case"NewTargetExpression":case"Super":case"LiteralBooleanExpression":case"LiteralNullExpression":case"LiteralNumericExpression":case"LiteralInfinityExpression":case"LiteralRegExpExpression":case"LiteralStringExpression":case"ObjectExpression":case"ThisExpression":case"SpreadElement":case"FunctionBody":return Precedence.Primary;case"ArrowExpression":case"AssignmentExpression":case"CompoundAssignmentExpression":case"YieldExpression":case"YieldGeneratorExpression":return Precedence.Assignment;case"ConditionalExpression":return Precedence.Conditional;case"ComputedMemberExpression":case"StaticMemberExpression":case"ComputedMemberAssignmentTarget":case"StaticMemberAssignmentTarget":switch(o.object.type){case"CallExpression":case"ComputedMemberExpression":case"StaticMemberExpression":case"TemplateExpression":return getPrecedence(o.object);default:return Precedence.Member}case"TemplateExpression":if(o.tag==null)return Precedence.Member;switch(o.tag.type){case"CallExpression":case"ComputedMemberExpression":case"StaticMemberExpression":case"TemplateExpression":return getPrecedence(o.tag);default:return Precedence.Member}case"BinaryExpression":return BinaryPrecedence[o.operator];case"CallExpression":return Precedence.Call;case"NewExpression":return o.arguments.length===0?Precedence.New:Precedence.Member;case"UpdateExpression":return o.isPrefix?Precedence.Prefix:Precedence.Postfix;case"AwaitExpression":case"UnaryExpression":return Precedence.Prefix;default:throw new Error("unreachable: "+o.type)}}function escapeStringLiteral(o){for(var e="",s=0,a=0,c=0,h=o.length;c<h;++c){var d=o[c];d==='"'?++a:d==="'"&&++s}var g=a>s?"'":'"';e+=g;for(var _=0;_<o.length;_++){var b=o.charAt(_);switch(b){case g:e+="\\"+g;break;case`
|
||
`:e+="\\n";break;case"\r":e+="\\r";break;case"\\":e+="\\\\";break;case"\u2028":e+="\\u2028";break;case"\u2029":e+="\\u2029";break;default:e+=b;break}}return e+=g,e}var CodeRep=coderep.CodeRep=function(){function o(){_classCallCheck$4(this,o),this.containsIn=!1,this.containsGroup=!1,this.startsWithCurly=!1,this.startsWithFunctionOrClass=!1,this.startsWithLet=!1,this.startsWithLetSquareBracket=!1,this.endsWithMissingElse=!1}return _createClass$4(o,[{key:"forEach",value:function(s){s(this)}}]),o}();coderep.Empty=function(o){_inherits$2(e,o);function e(){return _classCallCheck$4(this,e),_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))}return _createClass$4(e,[{key:"emit",value:function(){}}]),e}(CodeRep);var Token=coderep.Token=function(o){_inherits$2(e,o);function e(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;_classCallCheck$4(this,e);var c=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return c.token=s,c.isRegExp=a,c}return _createClass$4(e,[{key:"emit",value:function(a){a.put(this.token,this.isRegExp)}}]),e}(CodeRep);coderep.RawToken=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.token=s,a}return _createClass$4(e,[{key:"emit",value:function(a){a.putRaw(this.token)}}]),e}(CodeRep);coderep.NumberCodeRep=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.number=s,a}return _createClass$4(e,[{key:"emit",value:function(a){a.putNumber(this.number)}}]),e}(CodeRep);coderep.Paren=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.expr=s,a}return _createClass$4(e,[{key:"emit",value:function(a){a.put("("),this.expr.emit(a,!1),a.put(")")}},{key:"forEach",value:function(a){a(this),this.expr.forEach(a)}}]),e}(CodeRep);coderep.Bracket=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.expr=s,a}return _createClass$4(e,[{key:"emit",value:function(a){a.put("["),this.expr.emit(a,!1),a.put("]")}},{key:"forEach",value:function(a){a(this),this.expr.forEach(a)}}]),e}(CodeRep);coderep.Brace=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.expr=s,a}return _createClass$4(e,[{key:"emit",value:function(a){a.put("{"),this.expr.emit(a,!1),a.put("}")}},{key:"forEach",value:function(a){a(this),this.expr.forEach(a)}}]),e}(CodeRep);coderep.NoIn=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.expr=s,a}return _createClass$4(e,[{key:"emit",value:function(a){this.expr.emit(a,!0)}},{key:"forEach",value:function(a){a(this),this.expr.forEach(a)}}]),e}(CodeRep);coderep.ContainsIn=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.expr=s,a}return _createClass$4(e,[{key:"emit",value:function(a,c){c?(a.put("("),this.expr.emit(a,!1),a.put(")")):this.expr.emit(a,!1)}},{key:"forEach",value:function(a){a(this),this.expr.forEach(a)}}]),e}(CodeRep);coderep.Seq=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.children=s,a}return _createClass$4(e,[{key:"emit",value:function(a,c){this.children.forEach(function(h){return h.emit(a,c)})}},{key:"forEach",value:function(a){a(this),this.children.forEach(function(c){return c.forEach(a)})}}]),e}(CodeRep);coderep.Semi=function(o){_inherits$2(e,o);function e(){return _classCallCheck$4(this,e),_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,";"))}return e}(Token);coderep.CommaSep=function(o){_inherits$2(e,o);function e(s){_classCallCheck$4(this,e);var a=_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.children=s,a}return _createClass$4(e,[{key:"emit",value:function(a,c){var h=!0;this.children.forEach(function(d){h?h=!1:a.put(","),d.emit(a,c)})}},{key:"forEach",value:function(a){a(this),this.children.forEach(function(c){return c.forEach(a)})}}]),e}(CodeRep);coderep.SemiOp=function(o){_inherits$2(e,o);function e(){return _classCallCheck$4(this,e),_possibleConstructorReturn$2(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))}return _createClass$4(e,[{key:"emit",value:function(a){a.putOptionalSemi()}}]),e}(CodeRep);Object.defineProperty(minimalCodegen,"__esModule",{value:!0});var _createClass$3=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_objectAssign$1=objectAssign,_objectAssign2$1=_interopRequireDefault$2(_objectAssign$1),_esutils$1=utils,_coderep$1=coderep;function _interopRequireDefault$2(o){return o&&o.__esModule?o:{default:o}}function _toConsumableArray$2(o){if(Array.isArray(o)){for(var e=0,s=Array(o.length);e<o.length;e++)s[e]=o[e];return s}else return Array.from(o)}function _classCallCheck$3(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function p$1(o,e,s){return(0,_coderep$1.getPrecedence)(o)<e?paren(s):s}function t$1(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new _coderep$1.Token(o,e)}function paren(o){return new _coderep$1.Paren(o)}function brace(o){return new _coderep$1.Brace(o)}function bracket$1(o){return new _coderep$1.Bracket(o)}function noIn$1(o){return new _coderep$1.NoIn(o)}function markContainsIn$1(o){return o.containsIn?new _coderep$1.ContainsIn(o):o}function seq$1(){for(var o=arguments.length,e=Array(o),s=0;s<o;s++)e[s]=arguments[s];return new _coderep$1.Seq(e)}function semi(){return new _coderep$1.Semi}function semiOp(){return new _coderep$1.SemiOp}function empty$2(){return new _coderep$1.Empty}function commaSep(o){return new _coderep$1.CommaSep(o)}function getAssignmentExpr(o){return o?o.containsGroup?paren(o):o:empty$2()}var MinimalCodeGen=function(){function o(){_classCallCheck$3(this,o)}return _createClass$3(o,[{key:"parenToAvoidBeingDirective",value:function(s,a){return s&&s.type==="ExpressionStatement"&&s.expression.type==="LiteralStringExpression"?seq$1(paren(a.children[0]),semiOp()):a}},{key:"regenerateArrowParams",value:function(s,a){return s.rest==null&&s.items.length===1&&s.items[0].type==="BindingIdentifier"?this.reduceBindingIdentifier(s.items[0]):a}},{key:"reduceArrayExpression",value:function(s,a){var c=a.elements;if(c.length===0)return bracket$1(empty$2());var h=commaSep(c.map(getAssignmentExpr));return c.length>0&&c[c.length-1]==null&&(h=seq$1(h,t$1(","))),bracket$1(h)}},{key:"reduceAwaitExpression",value:function(s,a){var c=a.expression;return seq$1(t$1("await"),p$1(s.expression,(0,_coderep$1.getPrecedence)(s),c))}},{key:"reduceSpreadElement",value:function(s,a){var c=a.expression;return seq$1(t$1("..."),p$1(s.expression,_coderep$1.Precedence.Assignment,c))}},{key:"reduceSpreadProperty",value:function(s,a){var c=a.expression;return seq$1(t$1("..."),getAssignmentExpr(c))}},{key:"reduceAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression,d=c,g=h,_=h.containsIn,b=c.startsWithCurly,$=c.startsWithLetSquareBracket,j=c.startsWithFunctionOrClass;return(0,_coderep$1.getPrecedence)(s.expression)<(0,_coderep$1.getPrecedence)(s)&&(g=paren(g),_=!1),(0,_objectAssign2$1.default)(seq$1(d,t$1("="),g),{containsIn:_,startsWithCurly:b,startsWithLetSquareBracket:$,startsWithFunctionOrClass:j})}},{key:"reduceAssignmentTargetIdentifier",value:function(s){var a=t$1(s.name);return s.name==="let"&&(a.startsWithLet=!0),a}},{key:"reduceAssignmentTargetWithDefault",value:function(s,a){var c=a.binding,h=a.init;return seq$1(c,t$1("="),p$1(s.init,_coderep$1.Precedence.Assignment,h))}},{key:"reduceCompoundAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression,d=c,g=h,_=h.containsIn,b=c.startsWithCurly,$=c.startsWithLetSquareBracket,j=c.startsWithFunctionOrClass;return(0,_coderep$1.getPrecedence)(s.expression)<(0,_coderep$1.getPrecedence)(s)&&(g=paren(g),_=!1),(0,_objectAssign2$1.default)(seq$1(d,t$1(s.operator),g),{containsIn:_,startsWithCurly:b,startsWithLetSquareBracket:$,startsWithFunctionOrClass:j})}},{key:"reduceBinaryExpression",value:function(s,a){var c=a.left,h=a.right,d=c,g=c.startsWithCurly,_=c.startsWithLetSquareBracket,b=c.startsWithFunctionOrClass,$=c.containsIn,j=s.operator==="**";((0,_coderep$1.getPrecedence)(s.left)<(0,_coderep$1.getPrecedence)(s)||j&&((0,_coderep$1.getPrecedence)(s.left)===(0,_coderep$1.getPrecedence)(s)||s.left.type==="UnaryExpression"))&&(d=paren(d),g=!1,_=!1,b=!1,$=!1);var _e=h,et=h.containsIn;return((0,_coderep$1.getPrecedence)(s.right)<(0,_coderep$1.getPrecedence)(s)||!j&&(0,_coderep$1.getPrecedence)(s.right)===(0,_coderep$1.getPrecedence)(s))&&(_e=paren(_e),et=!1),(0,_objectAssign2$1.default)(seq$1(d,t$1(s.operator),_e),{containsIn:$||et||s.operator==="in",containsGroup:s.operator===",",startsWithCurly:g,startsWithLetSquareBracket:_,startsWithFunctionOrClass:b})}},{key:"reduceBindingWithDefault",value:function(s,a){var c=a.binding,h=a.init;return seq$1(c,t$1("="),p$1(s.init,_coderep$1.Precedence.Assignment,h))}},{key:"reduceBindingIdentifier",value:function(s){var a=t$1(s.name);return s.name==="let"&&(a.startsWithLet=!0),a}},{key:"reduceArrayAssignmentTarget",value:function(s,a){var c=a.elements,h=a.rest,d=void 0;return c.length===0?d=h==null?empty$2():seq$1(t$1("..."),h):(c=c.concat(h==null?[]:[seq$1(t$1("..."),h)]),d=commaSep(c.map(getAssignmentExpr)),c.length>0&&c[c.length-1]==null&&(d=seq$1(d,t$1(",")))),bracket$1(d)}},{key:"reduceArrayBinding",value:function(s,a){var c=a.elements,h=a.rest,d=void 0;return c.length===0?d=h==null?empty$2():seq$1(t$1("..."),h):(c=c.concat(h==null?[]:[seq$1(t$1("..."),h)]),d=commaSep(c.map(getAssignmentExpr)),c.length>0&&c[c.length-1]==null&&(d=seq$1(d,t$1(",")))),bracket$1(d)}},{key:"reduceObjectAssignmentTarget",value:function(s,a){var c=a.properties,h=a.rest,d=commaSep(c);c.length===0?d=h==null?empty$2():seq$1(t$1("..."),h):d=h==null?d:seq$1(d,t$1(","),t$1("..."),h);var g=brace(d);return g.startsWithCurly=!0,g}},{key:"reduceObjectBinding",value:function(s,a){var c=a.properties,h=a.rest,d=commaSep(c);c.length===0?d=h==null?empty$2():seq$1(t$1("..."),h):d=h==null?d:seq$1(d,t$1(","),t$1("..."),h);var g=brace(d);return g.startsWithCurly=!0,g}},{key:"reduceAssignmentTargetPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return s.init==null?c:seq$1(c,t$1("="),p$1(s.init,_coderep$1.Precedence.Assignment,h))}},{key:"reduceAssignmentTargetPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return seq$1(c,t$1(":"),h)}},{key:"reduceBindingPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return s.init==null?c:seq$1(c,t$1("="),p$1(s.init,_coderep$1.Precedence.Assignment,h))}},{key:"reduceBindingPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return seq$1(c,t$1(":"),h)}},{key:"reduceBlock",value:function(s,a){var c=a.statements;return brace(seq$1.apply(void 0,_toConsumableArray$2(c)))}},{key:"reduceBlockStatement",value:function(s,a){var c=a.block;return c}},{key:"reduceBreakStatement",value:function(s){return seq$1(t$1("break"),s.label?t$1(s.label):empty$2(),semiOp())}},{key:"reduceCallExpression",value:function(s,a){var c=a.callee,h=a.arguments,d=h.map(function(g,_){return p$1(s.arguments[_],_coderep$1.Precedence.Assignment,g)});return(0,_objectAssign2$1.default)(seq$1(p$1(s.callee,(0,_coderep$1.getPrecedence)(s),c),paren(commaSep(d))),{startsWithCurly:c.startsWithCurly,startsWithLet:c.startsWithLet,startsWithLetSquareBracket:c.startsWithLetSquareBracket,startsWithFunctionOrClass:c.startsWithFunctionOrClass})}},{key:"reduceCatchClause",value:function(s,a){var c=a.binding,h=a.body;return seq$1(t$1("catch"),paren(c),h)}},{key:"reduceClassDeclaration",value:function(s,a){var c=a.name,h=a.super,d=a.elements,g=seq$1(t$1("class"),s.name.name==="*default*"?empty$2():c);return h!=null&&(g=seq$1(g,t$1("extends"),p$1(s.super,_coderep$1.Precedence.New,h))),g=seq$1.apply(void 0,[g,t$1("{")].concat(_toConsumableArray$2(d),[t$1("}")])),g}},{key:"reduceClassExpression",value:function(s,a){var c=a.name,h=a.super,d=a.elements,g=t$1("class");return c!=null&&(g=seq$1(g,c)),h!=null&&(g=seq$1(g,t$1("extends"),p$1(s.super,_coderep$1.Precedence.New,h))),g=seq$1.apply(void 0,[g,t$1("{")].concat(_toConsumableArray$2(d),[t$1("}")])),g.startsWithFunctionOrClass=!0,g}},{key:"reduceClassElement",value:function(s,a){var c=a.method;return s.isStatic?seq$1(t$1("static"),c):c}},{key:"reduceComputedMemberAssignmentTarget",value:function(s,a){var c=a.object,h=a.expression,d=c.startsWithLetSquareBracket||s.object.type==="IdentifierExpression"&&s.object.name==="let";return(0,_objectAssign2$1.default)(seq$1(p$1(s.object,(0,_coderep$1.getPrecedence)(s),c),bracket$1(h)),{startsWithLet:c.startsWithLet,startsWithLetSquareBracket:d,startsWithCurly:c.startsWithCurly,startsWithFunctionOrClass:c.startsWithFunctionOrClass})}},{key:"reduceComputedMemberExpression",value:function(s,a){var c=a.object,h=a.expression,d=c.startsWithLetSquareBracket||s.object.type==="IdentifierExpression"&&s.object.name==="let";return(0,_objectAssign2$1.default)(seq$1(p$1(s.object,(0,_coderep$1.getPrecedence)(s),c),bracket$1(h)),{startsWithLet:c.startsWithLet,startsWithLetSquareBracket:d,startsWithCurly:c.startsWithCurly,startsWithFunctionOrClass:c.startsWithFunctionOrClass})}},{key:"reduceComputedPropertyName",value:function(s,a){var c=a.expression;return bracket$1(p$1(s.expression,_coderep$1.Precedence.Assignment,c))}},{key:"reduceConditionalExpression",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate,g=c.containsIn||d.containsIn,_=c.startsWithCurly,b=c.startsWithLetSquareBracket,$=c.startsWithFunctionOrClass;return(0,_objectAssign2$1.default)(seq$1(p$1(s.test,_coderep$1.Precedence.LogicalOR,c),t$1("?"),p$1(s.consequent,_coderep$1.Precedence.Assignment,h),t$1(":"),p$1(s.alternate,_coderep$1.Precedence.Assignment,d)),{containsIn:g,startsWithCurly:_,startsWithLetSquareBracket:b,startsWithFunctionOrClass:$})}},{key:"reduceContinueStatement",value:function(s){return seq$1(t$1("continue"),s.label?t$1(s.label):empty$2(),semiOp())}},{key:"reduceDataProperty",value:function(s,a){var c=a.name,h=a.expression;return seq$1(c,t$1(":"),getAssignmentExpr(h))}},{key:"reduceDebuggerStatement",value:function(){return seq$1(t$1("debugger"),semiOp())}},{key:"reduceDoWhileStatement",value:function(s,a){var c=a.body,h=a.test;return seq$1(t$1("do"),c,t$1("while"),paren(h),semiOp())}},{key:"reduceEmptyStatement",value:function(){return semi()}},{key:"reduceExpressionStatement",value:function(s,a){var c=a.expression,h=c.startsWithCurly||c.startsWithLetSquareBracket||c.startsWithFunctionOrClass;return seq$1(h?paren(c):c,semiOp())}},{key:"reduceForInStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return c=s.left.type==="VariableDeclaration"?noIn$1(markContainsIn$1(c)):c,(0,_objectAssign2$1.default)(seq$1(t$1("for"),paren(seq$1(c.startsWithLet?paren(c):c,t$1("in"),h)),d),{endsWithMissingElse:d.endsWithMissingElse})}},{key:"reduceForOfStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return c=s.left.type==="VariableDeclaration"?noIn$1(markContainsIn$1(c)):c,(0,_objectAssign2$1.default)(seq$1(t$1("for"),paren(seq$1(c.startsWithLet?paren(c):c,t$1("of"),p$1(s.right,_coderep$1.Precedence.Assignment,h))),d),{endsWithMissingElse:d.endsWithMissingElse})}},{key:"reduceForStatement",value:function(s,a){var c=a.init,h=a.test,d=a.update,g=a.body;return c&&(c.startsWithLetSquareBracket&&(c=paren(c)),c=noIn$1(markContainsIn$1(c))),(0,_objectAssign2$1.default)(seq$1(t$1("for"),paren(seq$1(c||empty$2(),semi(),h||empty$2(),semi(),d||empty$2())),g),{endsWithMissingElse:g.endsWithMissingElse})}},{key:"reduceForAwaitStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return c=s.left.type==="VariableDeclaration"?noIn$1(markContainsIn$1(c)):c,(0,_objectAssign2$1.default)(seq$1(t$1("for"),t$1("await"),paren(seq$1(c.startsWithLet?paren(c):c,t$1("of"),p$1(s.right,_coderep$1.Precedence.Assignment,h))),d),{endsWithMissingElse:d.endsWithMissingElse})}},{key:"reduceFunctionBody",value:function(s,a){var c=a.directives,h=a.statements;return h.length&&(h[0]=this.parenToAvoidBeingDirective(s.statements[0],h[0])),brace(seq$1.apply(void 0,_toConsumableArray$2(c).concat(_toConsumableArray$2(h))))}},{key:"reduceFunctionDeclaration",value:function(s,a){var c=a.name,h=a.params,d=a.body;return seq$1(s.isAsync?t$1("async"):empty$2(),t$1("function"),s.isGenerator?t$1("*"):empty$2(),s.name.name==="*default*"?empty$2():c,h,d)}},{key:"reduceFunctionExpression",value:function(s,a){var c=a.name,h=a.params,d=a.body,g=seq$1(s.isAsync?t$1("async"):empty$2(),t$1("function"),s.isGenerator?t$1("*"):empty$2(),c||empty$2(),h,d);return g.startsWithFunctionOrClass=!0,g}},{key:"reduceFormalParameters",value:function(s,a){var c=a.items,h=a.rest;return paren(commaSep(c.concat(h==null?[]:[seq$1(t$1("..."),h)])))}},{key:"reduceArrowExpression",value:function(s,a){var c=a.params,h=a.body;c=this.regenerateArrowParams(s.params,c);var d=!1;return s.body.type!=="FunctionBody"&&(h.startsWithCurly?h=paren(h):h.containsIn&&(d=!0)),(0,_objectAssign2$1.default)(seq$1(s.isAsync?t$1("async"):empty$2(),c,t$1("=>"),p$1(s.body,_coderep$1.Precedence.Assignment,h)),{containsIn:d})}},{key:"reduceGetter",value:function(s,a){var c=a.name,h=a.body;return seq$1(t$1("get"),c,paren(empty$2()),h)}},{key:"reduceIdentifierExpression",value:function(s){var a=t$1(s.name);return s.name==="let"&&(a.startsWithLet=!0),a}},{key:"reduceIfStatement",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return d&&h.endsWithMissingElse&&(h=brace(h)),(0,_objectAssign2$1.default)(seq$1(t$1("if"),paren(c),h,d?seq$1(t$1("else"),d):empty$2()),{endsWithMissingElse:d?d.endsWithMissingElse:!0})}},{key:"reduceImport",value:function(s,a){var c=a.defaultBinding,h=a.namedImports,d=[];return c!=null&&d.push(c),h.length>0&&d.push(brace(commaSep(h))),d.length===0?seq$1(t$1("import"),t$1((0,_coderep$1.escapeStringLiteral)(s.moduleSpecifier)),semiOp()):seq$1(t$1("import"),commaSep(d),t$1("from"),t$1((0,_coderep$1.escapeStringLiteral)(s.moduleSpecifier)),semiOp())}},{key:"reduceImportNamespace",value:function(s,a){var c=a.defaultBinding,h=a.namespaceBinding;return seq$1(t$1("import"),c==null?empty$2():seq$1(c,t$1(",")),t$1("*"),t$1("as"),h,t$1("from"),t$1((0,_coderep$1.escapeStringLiteral)(s.moduleSpecifier)),semiOp())}},{key:"reduceImportSpecifier",value:function(s,a){var c=a.binding;return s.name==null?c:seq$1(t$1(s.name),t$1("as"),c)}},{key:"reduceExportAllFrom",value:function(s){return seq$1(t$1("export"),t$1("*"),t$1("from"),t$1((0,_coderep$1.escapeStringLiteral)(s.moduleSpecifier)),semiOp())}},{key:"reduceExportFrom",value:function(s,a){var c=a.namedExports;return seq$1(t$1("export"),brace(commaSep(c)),t$1("from"),t$1((0,_coderep$1.escapeStringLiteral)(s.moduleSpecifier)),semiOp())}},{key:"reduceExportLocals",value:function(s,a){var c=a.namedExports;return seq$1(t$1("export"),brace(commaSep(c)),semiOp())}},{key:"reduceExport",value:function(s,a){var c=a.declaration;switch(s.declaration.type){case"FunctionDeclaration":case"ClassDeclaration":break;default:c=seq$1(c,semiOp())}return seq$1(t$1("export"),c)}},{key:"reduceExportDefault",value:function(s,a){var c=a.body;switch(c=c.startsWithFunctionOrClass?paren(c):c,s.body.type){case"FunctionDeclaration":case"ClassDeclaration":return seq$1(t$1("export default"),c);default:return seq$1(t$1("export default"),p$1(s.body,_coderep$1.Precedence.Assignment,c),semiOp())}}},{key:"reduceExportFromSpecifier",value:function(s){return s.exportedName==null?t$1(s.name):seq$1(t$1(s.name),t$1("as"),t$1(s.exportedName))}},{key:"reduceExportLocalSpecifier",value:function(s,a){var c=a.name;return s.exportedName==null?c:seq$1(c,t$1("as"),t$1(s.exportedName))}},{key:"reduceLabeledStatement",value:function(s,a){var c=a.body;return(0,_objectAssign2$1.default)(seq$1(t$1(s.label+":"),c),{endsWithMissingElse:c.endsWithMissingElse})}},{key:"reduceLiteralBooleanExpression",value:function(s){return t$1(s.value.toString())}},{key:"reduceLiteralNullExpression",value:function(){return t$1("null")}},{key:"reduceLiteralInfinityExpression",value:function(){return t$1("2e308")}},{key:"reduceLiteralNumericExpression",value:function(s){return new _coderep$1.NumberCodeRep(s.value)}},{key:"reduceLiteralRegExpExpression",value:function(s){return t$1("/"+s.pattern+"/"+(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiLine?"m":"")+(s.dotAll?"s":"")+(s.unicode?"u":"")+(s.sticky?"y":""),!0)}},{key:"reduceLiteralStringExpression",value:function(s){return t$1((0,_coderep$1.escapeStringLiteral)(s.value))}},{key:"reduceMethod",value:function(s,a){var c=a.name,h=a.params,d=a.body;return seq$1(s.isAsync?t$1("async"):empty$2(),s.isGenerator?t$1("*"):empty$2(),c,h,d)}},{key:"reduceModule",value:function(s,a){var c=a.directives,h=a.items;return h.length&&(h[0]=this.parenToAvoidBeingDirective(s.items[0],h[0])),seq$1.apply(void 0,_toConsumableArray$2(c).concat(_toConsumableArray$2(h)))}},{key:"reduceNewExpression",value:function(s,a){var c=a.callee,h=a.arguments,d=h.map(function(_,b){return p$1(s.arguments[b],_coderep$1.Precedence.Assignment,_)}),g=(0,_coderep$1.getPrecedence)(s.callee)===_coderep$1.Precedence.Call?paren(c):p$1(s.callee,(0,_coderep$1.getPrecedence)(s),c);return seq$1(t$1("new"),g,h.length===0?empty$2():paren(commaSep(d)))}},{key:"reduceNewTargetExpression",value:function(){return t$1("new.target")}},{key:"reduceObjectExpression",value:function(s,a){var c=a.properties,h=brace(commaSep(c));return h.startsWithCurly=!0,h}},{key:"reduceUpdateExpression",value:function(s,a){var c=a.operand;return s.isPrefix?this.reduceUnaryExpression.apply(this,arguments):(0,_objectAssign2$1.default)(seq$1(p$1(s.operand,_coderep$1.Precedence.New,c),t$1(s.operator)),{startsWithCurly:c.startsWithCurly,startsWithLetSquareBracket:c.startsWithLetSquareBracket,startsWithFunctionOrClass:c.startsWithFunctionOrClass})}},{key:"reduceUnaryExpression",value:function(s,a){var c=a.operand;return seq$1(t$1(s.operator),p$1(s.operand,(0,_coderep$1.getPrecedence)(s),c))}},{key:"reduceReturnStatement",value:function(s,a){var c=a.expression;return seq$1(t$1("return"),c||empty$2(),semiOp())}},{key:"reduceScript",value:function(s,a){var c=a.directives,h=a.statements;return h.length&&(h[0]=this.parenToAvoidBeingDirective(s.statements[0],h[0])),seq$1.apply(void 0,_toConsumableArray$2(c).concat(_toConsumableArray$2(h)))}},{key:"reduceSetter",value:function(s,a){var c=a.name,h=a.param,d=a.body;return seq$1(t$1("set"),c,paren(h),d)}},{key:"reduceShorthandProperty",value:function(s,a){var c=a.name;return c}},{key:"reduceStaticMemberAssignmentTarget",value:function(s,a){var c=a.object,h=seq$1(p$1(s.object,(0,_coderep$1.getPrecedence)(s),c),t$1("."),t$1(s.property));return h.startsWithLet=c.startsWithLet,h.startsWithCurly=c.startsWithCurly,h.startsWithLetSquareBracket=c.startsWithLetSquareBracket,h.startsWithFunctionOrClass=c.startsWithFunctionOrClass,h}},{key:"reduceStaticMemberExpression",value:function(s,a){var c=a.object,h=seq$1(p$1(s.object,(0,_coderep$1.getPrecedence)(s),c),t$1("."),t$1(s.property));return h.startsWithLet=c.startsWithLet,h.startsWithCurly=c.startsWithCurly,h.startsWithLetSquareBracket=c.startsWithLetSquareBracket,h.startsWithFunctionOrClass=c.startsWithFunctionOrClass,h}},{key:"reduceStaticPropertyName",value:function(s){if(_esutils$1.keyword.isIdentifierNameES6(s.value))return t$1(s.value);var a=parseFloat(s.value);return a>=0&&a.toString()===s.value?new _coderep$1.NumberCodeRep(a):t$1((0,_coderep$1.escapeStringLiteral)(s.value))}},{key:"reduceSuper",value:function(){return t$1("super")}},{key:"reduceSwitchCase",value:function(s,a){var c=a.test,h=a.consequent;return seq$1(t$1("case"),c,t$1(":"),seq$1.apply(void 0,_toConsumableArray$2(h)))}},{key:"reduceSwitchDefault",value:function(s,a){var c=a.consequent;return seq$1(t$1("default:"),seq$1.apply(void 0,_toConsumableArray$2(c)))}},{key:"reduceSwitchStatement",value:function(s,a){var c=a.discriminant,h=a.cases;return seq$1(t$1("switch"),paren(c),brace(seq$1.apply(void 0,_toConsumableArray$2(h))))}},{key:"reduceSwitchStatementWithDefault",value:function(s,a){var c=a.discriminant,h=a.preDefaultCases,d=a.defaultCase,g=a.postDefaultCases;return seq$1(t$1("switch"),paren(c),brace(seq$1.apply(void 0,_toConsumableArray$2(h).concat([d],_toConsumableArray$2(g)))))}},{key:"reduceTemplateExpression",value:function(s,a){var c=a.tag,h=a.elements,d=s.tag==null?empty$2():p$1(s.tag,(0,_coderep$1.getPrecedence)(s),c);d=seq$1(d,t$1("`"));for(var g=0,_=s.elements.length;g<_;++g)s.elements[g].type==="TemplateElement"?d=seq$1(d,g>0?t$1("}"):empty$2(),h[g],g<_-1?t$1("${"):empty$2()):d=seq$1(d,h[g]);return d=seq$1(d,t$1("`")),s.tag!=null&&(d.startsWithCurly=c.startsWithCurly,d.startsWithLet=c.startsWithLet,d.startsWithLetSquareBracket=c.startsWithLetSquareBracket,d.startsWithFunctionOrClass=c.startsWithFunctionOrClass),d}},{key:"reduceTemplateElement",value:function(s){return new _coderep$1.RawToken(s.rawValue)}},{key:"reduceThisExpression",value:function(){return t$1("this")}},{key:"reduceThrowStatement",value:function(s,a){var c=a.expression;return seq$1(t$1("throw"),c,semiOp())}},{key:"reduceTryCatchStatement",value:function(s,a){var c=a.body,h=a.catchClause;return seq$1(t$1("try"),c,h)}},{key:"reduceTryFinallyStatement",value:function(s,a){var c=a.body,h=a.catchClause,d=a.finalizer;return seq$1(t$1("try"),c,h||empty$2(),t$1("finally"),d)}},{key:"reduceYieldExpression",value:function(s,a){var c=a.expression;return s.expression==null?t$1("yield"):(0,_objectAssign2$1.default)(seq$1(t$1("yield"),p$1(s.expression,(0,_coderep$1.getPrecedence)(s),c)),{containsIn:c.containsIn})}},{key:"reduceYieldGeneratorExpression",value:function(s,a){var c=a.expression;return(0,_objectAssign2$1.default)(seq$1(t$1("yield"),t$1("*"),p$1(s.expression,(0,_coderep$1.getPrecedence)(s),c)),{containsIn:c.containsIn})}},{key:"reduceDirective",value:function(s){var a=s.rawValue.match(/(^|[^\\])(\\\\)*"/)?"'":'"';return seq$1(t$1(a+s.rawValue+a),semiOp())}},{key:"reduceVariableDeclaration",value:function(s,a){var c=a.declarators;return seq$1(t$1(s.kind),commaSep(c))}},{key:"reduceVariableDeclarationStatement",value:function(s,a){var c=a.declaration;return seq$1(c,semiOp())}},{key:"reduceVariableDeclarator",value:function(s,a){var c=a.binding,h=a.init,d=h&&h.containsIn&&!h.containsGroup;return h&&(h.containsGroup?h=paren(h):h=markContainsIn$1(h)),(0,_objectAssign2$1.default)(h==null?c:seq$1(c,t$1("="),h),{containsIn:d})}},{key:"reduceWhileStatement",value:function(s,a){var c=a.test,h=a.body;return(0,_objectAssign2$1.default)(seq$1(t$1("while"),paren(c),h),{endsWithMissingElse:h.endsWithMissingElse})}},{key:"reduceWithStatement",value:function(s,a){var c=a.object,h=a.body;return(0,_objectAssign2$1.default)(seq$1(t$1("with"),paren(c),h),{endsWithMissingElse:h.endsWithMissingElse})}}]),o}();minimalCodegen.default=MinimalCodeGen;var formattedCodegen={};Object.defineProperty(formattedCodegen,"__esModule",{value:!0});formattedCodegen.FormattedCodeGen=formattedCodegen.ExtensibleCodeGen=formattedCodegen.Sep=void 0;var _createClass$2=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_objectAssign=objectAssign,_objectAssign2=_interopRequireDefault$1(_objectAssign),_esutils=utils,_coderep=coderep;function _interopRequireDefault$1(o){return o&&o.__esModule?o:{default:o}}function _toConsumableArray$1(o){if(Array.isArray(o)){for(var e=0,s=Array(o.length);e<o.length;e++)s[e]=o[e];return s}else return Array.from(o)}function _classCallCheck$2(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$1(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits$1(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}var INDENT=" ",Linebreak=function(o){_inherits$1(e,o);function e(){_classCallCheck$2(this,e);var s=_possibleConstructorReturn$1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s.indentation=0,s}return _createClass$2(e,[{key:"emit",value:function(a){a.put(`
|
||
`);for(var c=0;c<this.indentation;++c)a.put(INDENT)}}]),e}(_coderep.CodeRep);function empty$1(){return new _coderep.Empty}function noIn(o){return new _coderep.NoIn(o)}function markContainsIn(o){return o.containsIn?new _coderep.ContainsIn(o):o}function seq(){for(var o=arguments.length,e=Array(o),s=0;s<o;s++)e[s]=arguments[s];return new _coderep.Seq(e)}function isEmpty(o){return o instanceof _coderep.Empty||o instanceof Linebreak||o instanceof _coderep.Seq&&o.children.every(isEmpty)}var Sep={},separatorNames=["ARRAY_EMPTY","ARRAY_BEFORE_COMMA","ARRAY_AFTER_COMMA","SPREAD","AWAIT","AFTER_FORAWAIT_AWAIT","BEFORE_DEFAULT_EQUALS","AFTER_DEFAULT_EQUALS","REST","OBJECT_BEFORE_COMMA","OBJECT_AFTER_COMMA","BEFORE_PROP","AFTER_PROP","BEFORE_JUMP_LABEL","ARGS_BEFORE_COMMA","ARGS_AFTER_COMMA","CALL","BEFORE_CATCH_BINDING","AFTER_CATCH_BINDING","BEFORE_CLASS_NAME","BEFORE_EXTENDS","AFTER_EXTENDS","BEFORE_CLASS_DECLARATION_ELEMENTS","BEFORE_CLASS_EXPRESSION_ELEMENTS","AFTER_STATIC","BEFORE_CLASS_ELEMENT","AFTER_CLASS_ELEMENT","BEFORE_TERNARY_QUESTION","AFTER_TERNARY_QUESTION","BEFORE_TERNARY_COLON","AFTER_TERNARY_COLON","COMPUTED_MEMBER_EXPRESSION","COMPUTED_MEMBER_ASSIGNMENT_TARGET","AFTER_DO","BEFORE_DOWHILE_WHILE","AFTER_DOWHILE_WHILE","AFTER_FORIN_FOR","BEFORE_FORIN_IN","AFTER_FORIN_FOR","BEFORE_FORIN_BODY","AFTER_FOROF_FOR","BEFORE_FOROF_OF","AFTER_FOROF_FOR","BEFORE_FOROF_BODY","AFTER_FOR_FOR","BEFORE_FOR_INIT","AFTER_FOR_INIT","EMPTY_FOR_INIT","BEFORE_FOR_TEST","AFTER_FOR_TEST","EMPTY_FOR_TEST","BEFORE_FOR_UPDATE","AFTER_FOR_UPDATE","EMPTY_FOR_UPDATE","BEFORE_FOR_BODY","BEFORE_GENERATOR_STAR","AFTER_GENERATOR_STAR","BEFORE_FUNCTION_PARAMS","BEFORE_FUNCTION_DECLARATION_BODY","BEFORE_FUNCTION_EXPRESSION_BODY","AFTER_FUNCTION_DIRECTIVES","BEFORE_ARROW","AFTER_ARROW","AFTER_GET","BEFORE_GET_PARAMS","BEFORE_GET_BODY","AFTER_IF","AFTER_IF_TEST","BEFORE_ELSE","AFTER_ELSE","PARAMETER_BEFORE_COMMA","PARAMETER_AFTER_COMMA","NAMED_IMPORT_BEFORE_COMMA","NAMED_IMPORT_AFTER_COMMA","IMPORT_BEFORE_COMMA","IMPORT_AFTER_COMMA","BEFORE_IMPORT_BINDINGS","BEFORE_IMPORT_MODULE","AFTER_IMPORT_BINDINGS","AFTER_FROM","BEFORE_IMPORT_NAMESPACE","BEFORE_IMPORT_STAR","AFTER_IMPORT_STAR","AFTER_IMPORT_AS","AFTER_NAMESPACE_BINDING","BEFORE_IMPORT_AS","AFTER_IMPORT_AS","EXPORTS_BEFORE_COMMA","EXPORTS_AFTER_COMMA","BEFORE_EXPORT_STAR","AFTER_EXPORT_STAR","BEFORE_EXPORT_BINDINGS","AFTER_EXPORT_FROM_BINDINGS","AFTER_EXPORT_LOCAL_BINDINGS","AFTER_EXPORT","EXPORT_DEFAULT","AFTER_EXPORT_DEFAULT","BEFORE_EXPORT_AS","AFTER_EXPORT_AS","BEFORE_LABEL_COLON","AFTER_LABEL_COLON","AFTER_METHOD_GENERATOR_STAR","AFTER_METHOD_ASYNC","AFTER_METHOD_NAME","BEFORE_METHOD_BODY","AFTER_MODULE_DIRECTIVES","AFTER_NEW","BEFORE_NEW_ARGS","EMPTY_NEW_CALL","NEW_TARGET_BEFORE_DOT","NEW_TARGET_AFTER_DOT","RETURN","AFTER_SET","BEFORE_SET_PARAMS","BEFORE_SET_BODY","AFTER_SCRIPT_DIRECTIVES","BEFORE_STATIC_MEMBER_DOT","AFTER_STATIC_MEMBER_DOT","BEFORE_STATIC_MEMBER_ASSIGNMENT_TARGET_DOT","AFTER_STATIC_MEMBER_ASSIGNMENT_TARGET_DOT","BEFORE_CASE_TEST","AFTER_CASE_TEST","BEFORE_CASE_BODY","AFTER_CASE_BODY","DEFAULT","AFTER_DEFAULT_BODY","BEFORE_SWITCH_DISCRIM","BEFORE_SWITCH_BODY","TEMPLATE_TAG","BEFORE_TEMPLATE_EXPRESSION","AFTER_TEMPLATE_EXPRESSION","THROW","AFTER_TRY","BEFORE_CATCH","BEFORE_FINALLY","AFTER_FINALLY","VARIABLE_DECLARATION","YIELD","BEFORE_YIELD_STAR","AFTER_YIELD_STAR","DECLARATORS_BEFORE_COMMA","DECLARATORS_AFTER_COMMA","BEFORE_INIT_EQUALS","AFTER_INIT_EQUALS","AFTER_WHILE","BEFORE_WHILE_BODY","AFTER_WITH","BEFORE_WITH_BODY","PAREN_AVOIDING_DIRECTIVE_BEFORE","PAREN_AVOIDING_DIRECTIVE_AFTER","PRECEDENCE_BEFORE","PRECEDENCE_AFTER","EXPRESSION_PAREN_BEFORE","EXPRESSION_PAREN_AFTER","CALL_PAREN_BEFORE","CALL_PAREN_AFTER","CALL_PAREN_EMPTY","CATCH_PAREN_BEFORE","CATCH_PAREN_AFTER","DO_WHILE_TEST_PAREN_BEFORE","DO_WHILE_TEST_PAREN_AFTER","EXPRESSION_STATEMENT_PAREN_BEFORE","EXPRESSION_STATEMENT_PAREN_AFTER","FOR_LET_PAREN_BEFORE","FOR_LET_PAREN_AFTER","FOR_IN_LET_PAREN_BEFORE","FOR_IN_LET_PAREN_AFTER","FOR_IN_PAREN_BEFORE","FOR_IN_PAREN_AFTER","FOR_OF_LET_PAREN_BEFORE","FOR_OF_LET_PAREN_AFTER","FOR_OF_PAREN_BEFORE","FOR_OF_PAREN_AFTER","PARAMETERS_PAREN_BEFORE","PARAMETERS_PAREN_AFTER","PARAMETERS_PAREN_EMPTY","ARROW_PARAMETERS_PAREN_BEFORE","ARROW_PARAMETERS_PAREN_AFTER","ARROW_PARAMETERS_PAREN_EMPTY","ARROW_BODY_PAREN_BEFORE","ARROW_BODY_PAREN_AFTER","BEFORE_ARROW_ASYNC_PARAMS","GETTER_PARAMS","IF_PAREN_BEFORE","IF_PAREN_AFTER","EXPORT_PAREN_BEFORE","EXPORT_PAREN_AFTER","NEW_CALLEE_PAREN_BEFORE","NEW_CALLEE_PAREN_AFTER","NEW_PAREN_BEFORE","NEW_PAREN_AFTER","NEW_PAREN_EMPTY","SETTER_PARAM_BEFORE","SETTER_PARAM_AFTER","SWITCH_DISCRIM_PAREN_BEFORE","SWITCH_DISCRIM_PAREN_AFTER","WHILE_TEST_PAREN_BEFORE","WHILE_TEST_PAREN_AFTER","WITH_PAREN_BEFORE","WITH_PAREN_AFTER","OBJECT_BRACE_INITIAL","OBJECT_BRACE_FINAL","OBJECT_EMPTY","BLOCK_BRACE_INITIAL","BLOCK_BRACE_FINAL","BLOCK_EMPTY","CLASS_BRACE_INITIAL","CLASS_BRACE_FINAL","CLASS_EMPTY","CLASS_EXPRESSION_BRACE_INITIAL","CLASS_EXPRESSION_BRACE_FINAL","CLASS_EXPRESSION_BRACE_EMPTY","FUNCTION_BRACE_INITIAL","FUNCTION_BRACE_FINAL","FUNCTION_EMPTY","FUNCTION_EXPRESSION_BRACE_INITIAL","FUNCTION_EXPRESSION_BRACE_FINAL","FUNCTION_EXPRESSION_EMPTY","ARROW_BRACE_INITIAL","ARROW_BRACE_FINAL","ARROW_BRACE_EMPTY","GET_BRACE_INTIAL","GET_BRACE_FINAL","GET_BRACE_EMPTY","MISSING_ELSE_INTIIAL","MISSING_ELSE_FINAL","MISSING_ELSE_EMPTY","IMPORT_BRACE_INTIAL","IMPORT_BRACE_FINAL","IMPORT_BRACE_EMPTY","EXPORT_BRACE_INITIAL","EXPORT_BRACE_FINAL","EXPORT_BRACE_EMPTY","METHOD_BRACE_INTIAL","METHOD_BRACE_FINAL","METHOD_BRACE_EMPTY","SET_BRACE_INTIIAL","SET_BRACE_FINAL","SET_BRACE_EMPTY","SWITCH_BRACE_INTIAL","SWITCH_BRACE_FINAL","SWITCH_BRACE_EMPTY","ARRAY_INITIAL","ARRAY_FINAL","COMPUTED_MEMBER_BRACKET_INTIAL","COMPUTED_MEMBER_BRACKET_FINAL","COMPUTED_MEMBER_ASSIGNMENT_TARGET_BRACKET_INTIAL","COMPUTED_MEMBER_ASSIGNMENT_TARGET_BRACKET_FINAL","COMPUTED_PROPERTY_BRACKET_INTIAL","COMPUTED_PROPERTY_BRACKET_FINAL"];for(var i$1=0;i$1<separatorNames.length;++i$1)Sep[separatorNames[i$1]]={type:separatorNames[i$1]};Sep.BEFORE_ASSIGN_OP=function(o){return{type:"BEFORE_ASSIGN_OP",op:o}};Sep.AFTER_ASSIGN_OP=function(o){return{type:"AFTER_ASSIGN_OP",op:o}};Sep.BEFORE_BINOP=function(o){return{type:"BEFORE_BINOP",op:o}};Sep.AFTER_BINOP=function(o){return{type:"AFTER_BINOP",op:o}};Sep.BEFORE_POSTFIX=function(o){return{type:"BEFORE_POSTFIX",op:o}};Sep.UNARY=function(o){return{type:"UNARY",op:o}};Sep.AFTER_STATEMENT=function(o){return{type:"AFTER_STATEMENT",node:o}};Sep.BEFORE_FUNCTION_NAME=function(o){return{type:"BEFORE_FUNCTION_NAME",node:o}};formattedCodegen.Sep=Sep;var ExtensibleCodeGen=formattedCodegen.ExtensibleCodeGen=function(){function o(){_classCallCheck$2(this,o)}return _createClass$2(o,[{key:"parenToAvoidBeingDirective",value:function(s,a){return s&&s.type==="ExpressionStatement"&&s.expression.type==="LiteralStringExpression"?seq(this.paren(a.children[0],Sep.PAREN_AVOIDING_DIRECTIVE_BEFORE,Sep.PAREN_AVOIDING_DIRECTIVE_AFTER),this.semiOp()):a}},{key:"t",value:function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new _coderep.Token(s,a)}},{key:"p",value:function(s,a,c){return(0,_coderep.getPrecedence)(s)<a?this.paren(c,Sep.PRECEDENCE_BEFORE,Sep.PRECEDENCE_AFTER):c}},{key:"getAssignmentExpr",value:function(s){return s?s.containsGroup?this.paren(s,Sep.EXPRESSION_PAREN_BEFORE,Sep.EXPRESSION_PAREN_AFTER):s:empty$1()}},{key:"paren",value:function(s,a,c,h){return isEmpty(s)?new _coderep.Paren(this.sep(h)):new _coderep.Paren(seq(a?this.sep(a):empty$1(),s,c?this.sep(c):empty$1()))}},{key:"brace",value:function(s,a,c,h,d){return isEmpty(s)?new _coderep.Brace(this.sep(d)):new _coderep.Brace(seq(this.sep(c),s,this.sep(h)))}},{key:"bracket",value:function(s,a,c,h){return isEmpty(s)?new _coderep.Bracket(this.sep(h)):new _coderep.Bracket(seq(this.sep(a),s,this.sep(c)))}},{key:"commaSep",value:function(s,a,c){var h=this,d=!0;return s=s.map(function(g){return d?(d=!1,g):seq(h.sep(a),h.t(","),h.sep(c),g)}),seq.apply(void 0,_toConsumableArray$1(s))}},{key:"semiOp",value:function(){return new _coderep.SemiOp}},{key:"sep",value:function(){return empty$1()}},{key:"reduceArrayExpression",value:function(s,a){var c=this,h=a.elements;if(h.length===0)return this.bracket(empty$1(),null,null,Sep.ARRAY_EMPTY);var d=this.commaSep(h.map(function(g){return c.getAssignmentExpr(g)}),Sep.ARRAY_BEFORE_COMMA,Sep.ARRAY_AFTER_COMMA);return h.length>0&&h[h.length-1]==null&&(d=seq(d,this.sep(Sep.ARRAY_BEFORE_COMMA),this.t(","),this.sep(Sep.ARRAY_AFTER_COMMA))),this.bracket(d,Sep.ARRAY_INITIAL,Sep.ARRAY_FINAL)}},{key:"reduceAwaitExpression",value:function(s,a){var c=a.expression;return seq(this.t("await"),this.sep(Sep.AWAIT),this.p(s.expression,(0,_coderep.getPrecedence)(s),c))}},{key:"reduceSpreadElement",value:function(s,a){var c=a.expression;return seq(this.t("..."),this.sep(Sep.SPREAD),this.p(s.expression,_coderep.Precedence.Assignment,c))}},{key:"reduceSpreadProperty",value:function(s,a){var c=a.expression;return seq(this.t("..."),this.sep(Sep.SPREAD),this.getAssignmentExpr(c))}},{key:"reduceAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression,d=c,g=h,_=h.containsIn,b=c.startsWithCurly,$=c.startsWithLetSquareBracket,j=c.startsWithFunctionOrClass;return(0,_coderep.getPrecedence)(s.expression)<(0,_coderep.getPrecedence)(s)&&(g=this.paren(g,Sep.EXPRESSION_PAREN_BEFORE,Sep.EXPRESSION_PAREN_AFTER),_=!1),(0,_objectAssign2.default)(seq(d,this.sep(Sep.BEFORE_ASSIGN_OP("=")),this.t("="),this.sep(Sep.AFTER_ASSIGN_OP("=")),g),{containsIn:_,startsWithCurly:b,startsWithLetSquareBracket:$,startsWithFunctionOrClass:j})}},{key:"reduceAssignmentTargetIdentifier",value:function(s){var a=this.t(s.name);return s.name==="let"&&(a.startsWithLet=!0),a}},{key:"reduceAssignmentTargetWithDefault",value:function(s,a){var c=a.binding,h=a.init;return seq(c,this.sep(Sep.BEFORE_DEFAULT_EQUALS),this.t("="),this.sep(Sep.AFTER_DEFAULT_EQUALS),this.p(s.init,_coderep.Precedence.Assignment,h))}},{key:"reduceCompoundAssignmentExpression",value:function(s,a){var c=a.binding,h=a.expression,d=c,g=h,_=h.containsIn,b=c.startsWithCurly,$=c.startsWithLetSquareBracket,j=c.startsWithFunctionOrClass;return(0,_coderep.getPrecedence)(s.expression)<(0,_coderep.getPrecedence)(s)&&(g=this.paren(g,Sep.EXPRESSION_PAREN_BEFORE,Sep.EXPRESSION_PAREN_AFTER),_=!1),(0,_objectAssign2.default)(seq(d,this.sep(Sep.BEFORE_ASSIGN_OP(s.operator)),this.t(s.operator),this.sep(Sep.AFTER_ASSIGN_OP(s.operator)),g),{containsIn:_,startsWithCurly:b,startsWithLetSquareBracket:$,startsWithFunctionOrClass:j})}},{key:"reduceBinaryExpression",value:function(s,a){var c=a.left,h=a.right,d=c,g=c.startsWithCurly,_=c.startsWithLetSquareBracket,b=c.startsWithFunctionOrClass,$=c.containsIn,j=s.operator==="**";((0,_coderep.getPrecedence)(s.left)<(0,_coderep.getPrecedence)(s)||j&&((0,_coderep.getPrecedence)(s.left)===(0,_coderep.getPrecedence)(s)||s.left.type==="UnaryExpression"))&&(d=this.paren(d,Sep.EXPRESSION_PAREN_BEFORE,Sep.EXPRESSION_PAREN_AFTER),g=!1,_=!1,b=!1,$=!1);var _e=h,et=h.containsIn;return((0,_coderep.getPrecedence)(s.right)<(0,_coderep.getPrecedence)(s)||!j&&(0,_coderep.getPrecedence)(s.right)===(0,_coderep.getPrecedence)(s))&&(_e=this.paren(_e,Sep.EXPRESSION_PAREN_BEFORE,Sep.EXPRESSION_PAREN_AFTER),et=!1),(0,_objectAssign2.default)(seq(d,this.sep(Sep.BEFORE_BINOP(s.operator)),this.t(s.operator),this.sep(Sep.AFTER_BINOP(s.operator)),_e),{containsIn:$||et||s.operator==="in",containsGroup:s.operator===",",startsWithCurly:g,startsWithLetSquareBracket:_,startsWithFunctionOrClass:b})}},{key:"reduceBindingWithDefault",value:function(s,a){var c=a.binding,h=a.init;return seq(c,this.sep(Sep.BEFORE_DEFAULT_EQUALS),this.t("="),this.sep(Sep.AFTER_DEFAULT_EQUALS),this.p(s.init,_coderep.Precedence.Assignment,h))}},{key:"reduceBindingIdentifier",value:function(s){var a=this.t(s.name);return s.name==="let"&&(a.startsWithLet=!0),a}},{key:"reduceArrayAssignmentTarget",value:function(s,a){var c=this,h=a.elements,d=a.rest,g=void 0;return h.length===0?g=d==null?empty$1():seq(this.t("..."),this.sep(Sep.REST),d):(h=h.concat(d==null?[]:[seq(this.t("..."),this.sep(Sep.REST),d)]),g=this.commaSep(h.map(function(_){return c.getAssignmentExpr(_)}),Sep.ARRAY_BEFORE_COMMA,Sep.ARRAY_AFTER_COMMA),h.length>0&&h[h.length-1]==null&&(g=seq(g,this.sep(Sep.ARRAY_BEFORE_COMMA),this.t(","),this.sep(Sep.ARRAY_AFTER_COMMA)))),this.bracket(g,Sep.ARRAY_INITIAL,Sep.ARRAY_FINAL,Sep.ARRAY_EMPTY)}},{key:"reduceArrayBinding",value:function(s,a){var c=this,h=a.elements,d=a.rest,g=void 0;return h.length===0?g=d==null?empty$1():seq(this.t("..."),this.sep(Sep.REST),d):(h=h.concat(d==null?[]:[seq(this.t("..."),this.sep(Sep.REST),d)]),g=this.commaSep(h.map(function(_){return c.getAssignmentExpr(_)}),Sep.ARRAY_BEFORE_COMMA,Sep.ARRAY_AFTER_COMMA),h.length>0&&h[h.length-1]==null&&(g=seq(g,this.sep(Sep.ARRAY_BEFORE_COMMA),this.t(","),this.sep(Sep.ARRAY_AFTER_COMMA)))),this.bracket(g,Sep.ARRAY_INITIAL,Sep.ARRAY_FINAL,Sep.ARRAY_EMPTY)}},{key:"reduceObjectAssignmentTarget",value:function(s,a){var c=a.properties,h=a.rest,d=void 0;c.length===0?d=h==null?empty$1():seq(this.t("..."),this.sep(Sep.REST),h):(d=this.commaSep(c,Sep.OBJECT_BEFORE_COMMA,Sep.OBJECT_AFTER_COMMA),d=h==null?d:this.commaSep([d,seq(this.t("..."),this.sep(Sep.REST),h)],Sep.OBJECT_BEFORE_COMMA,Sep.OBJECT_AFTER_COMMA));var g=this.brace(d,s,Sep.OBJECT_BRACE_INITIAL,Sep.OBJECT_BRACE_FINAL,Sep.OBJECT_EMPTY);return g.startsWithCurly=!0,g}},{key:"reduceObjectBinding",value:function(s,a){var c=a.properties,h=a.rest,d=void 0;c.length===0?d=h==null?empty$1():seq(this.t("..."),this.sep(Sep.REST),h):(d=this.commaSep(c,Sep.OBJECT_BEFORE_COMMA,Sep.OBJECT_AFTER_COMMA),d=h==null?d:this.commaSep([d,seq(this.t("..."),this.sep(Sep.REST),h)],Sep.OBJECT_BEFORE_COMMA,Sep.OBJECT_AFTER_COMMA));var g=this.brace(d,s,Sep.OBJECT_BRACE_INITIAL,Sep.OBJECT_BRACE_FINAL,Sep.OBJECT_EMPTY);return g.startsWithCurly=!0,g}},{key:"reduceAssignmentTargetPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return s.init==null?c:seq(c,this.sep(Sep.BEFORE_DEFAULT_EQUALS),this.t("="),this.sep(Sep.AFTER_DEFAULT_EQUALS),this.p(s.init,_coderep.Precedence.Assignment,h))}},{key:"reduceAssignmentTargetPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return seq(c,this.sep(Sep.BEFORE_PROP),this.t(":"),this.sep(Sep.AFTER_PROP),h)}},{key:"reduceBindingPropertyIdentifier",value:function(s,a){var c=a.binding,h=a.init;return s.init==null?c:seq(c,this.sep(Sep.BEFORE_DEFAULT_EQUALS),this.t("="),this.sep(Sep.AFTER_DEFAULT_EQUALS),this.p(s.init,_coderep.Precedence.Assignment,h))}},{key:"reduceBindingPropertyProperty",value:function(s,a){var c=a.name,h=a.binding;return seq(c,this.sep(Sep.BEFORE_PROP),this.t(":"),this.sep(Sep.AFTER_PROP),h)}},{key:"reduceBlock",value:function(s,a){var c=a.statements;return this.brace(seq.apply(void 0,_toConsumableArray$1(c)),s,Sep.BLOCK_BRACE_INITIAL,Sep.BLOCK_BRACE_FINAL,Sep.BLOCK_EMPTY)}},{key:"reduceBlockStatement",value:function(s,a){var c=a.block;return seq(c,this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceBreakStatement",value:function(s){return seq(this.t("break"),s.label?seq(this.sep(Sep.BEFORE_JUMP_LABEL),this.t(s.label)):empty$1(),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceCallExpression",value:function(s,a){var c=this,h=a.callee,d=a.arguments,g=d.map(function(_,b){return c.p(s.arguments[b],_coderep.Precedence.Assignment,_)});return(0,_objectAssign2.default)(seq(this.p(s.callee,(0,_coderep.getPrecedence)(s),h),this.sep(Sep.CALL),this.paren(this.commaSep(g,Sep.ARGS_BEFORE_COMMA,Sep.ARGS_AFTER_COMMA),Sep.CALL_PAREN_BEFORE,Sep.CALL_PAREN_AFTER,Sep.CALL_PAREN_EMPTY)),{startsWithCurly:h.startsWithCurly,startsWithLet:h.startsWithLet,startsWithLetSquareBracket:h.startsWithLetSquareBracket,startsWithFunctionOrClass:h.startsWithFunctionOrClass})}},{key:"reduceCatchClause",value:function(s,a){var c=a.binding,h=a.body;return seq(this.t("catch"),this.sep(Sep.BEFORE_CATCH_BINDING),this.paren(c,Sep.CATCH_PAREN_BEFORE,Sep.CATCH_PAREN_AFTER),this.sep(Sep.AFTER_CATCH_BINDING),h)}},{key:"reduceClassDeclaration",value:function(s,a){var c=a.name,h=a.super,d=a.elements,g=seq(this.t("class"),s.name.name==="*default*"?empty$1():seq(this.sep(Sep.BEFORE_CLASS_NAME),c));return h!=null&&(g=seq(g,this.sep(Sep.BEFORE_EXTENDS),this.t("extends"),this.sep(Sep.AFTER_EXTENDS),this.p(s.super,_coderep.Precedence.New,h))),g=seq(g,this.sep(Sep.BEFORE_CLASS_DECLARATION_ELEMENTS),this.brace(seq.apply(void 0,_toConsumableArray$1(d)),s,Sep.CLASS_BRACE_INITIAL,Sep.CLASS_BRACE_FINAL,Sep.CLASS_EMPTY),this.sep(Sep.AFTER_STATEMENT(s))),g}},{key:"reduceClassExpression",value:function(s,a){var c=a.name,h=a.super,d=a.elements,g=this.t("class");return c!=null&&(g=seq(g,this.sep(Sep.BEFORE_CLASS_NAME),c)),h!=null&&(g=seq(g,this.sep(Sep.BEFORE_EXTENDS),this.t("extends"),this.sep(Sep.AFTER_EXTENDS),this.p(s.super,_coderep.Precedence.New,h))),g=seq(g,this.sep(Sep.BEFORE_CLASS_EXPRESSION_ELEMENTS),this.brace(seq.apply(void 0,_toConsumableArray$1(d)),s,Sep.CLASS_EXPRESSION_BRACE_INITIAL,Sep.CLASS_EXPRESSION_BRACE_FINAL,Sep.CLASS_EXPRESSION_BRACE_EMPTY)),g.startsWithFunctionOrClass=!0,g}},{key:"reduceClassElement",value:function(s,a){var c=a.method;return c=seq(this.sep(Sep.BEFORE_CLASS_ELEMENT),c,this.sep(Sep.AFTER_CLASS_ELEMENT)),s.isStatic?seq(this.t("static"),this.sep(Sep.AFTER_STATIC),c):c}},{key:"reduceComputedMemberAssignmentTarget",value:function(s,a){var c=a.object,h=a.expression,d=c.startsWithLetSquareBracket||s.object.type==="IdentifierExpression"&&s.object.name==="let";return(0,_objectAssign2.default)(seq(this.p(s.object,(0,_coderep.getPrecedence)(s),c),this.sep(Sep.COMPUTED_MEMBER_ASSIGNMENT_TARGET),this.bracket(h,Sep.COMPUTED_MEMBER_ASSIGNMENT_TARGET_BRACKET_INTIAL,Sep.COMPUTED_MEMBER_ASSIGNMENT_TARGET_BRACKET_FINAL)),{startsWithLet:c.startsWithLet,startsWithLetSquareBracket:d,startsWithCurly:c.startsWithCurly,startsWithFunctionOrClass:c.startsWithFunctionOrClass})}},{key:"reduceComputedMemberExpression",value:function(s,a){var c=a.object,h=a.expression,d=c.startsWithLetSquareBracket||s.object.type==="IdentifierExpression"&&s.object.name==="let";return(0,_objectAssign2.default)(seq(this.p(s.object,(0,_coderep.getPrecedence)(s),c),this.sep(Sep.COMPUTED_MEMBER_EXPRESSION),this.bracket(h,Sep.COMPUTED_MEMBER_BRACKET_INTIAL,Sep.COMPUTED_MEMBER_BRACKET_FINAL)),{startsWithLet:c.startsWithLet,startsWithLetSquareBracket:d,startsWithCurly:c.startsWithCurly,startsWithFunctionOrClass:c.startsWithFunctionOrClass})}},{key:"reduceComputedPropertyName",value:function(s,a){var c=a.expression;return this.bracket(this.p(s.expression,_coderep.Precedence.Assignment,c),Sep.COMPUTED_PROPERTY_BRACKET_INTIAL,Sep.COMPUTED_PROPERTY_BRACKET_FINAL)}},{key:"reduceConditionalExpression",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate,g=c.containsIn||d.containsIn,_=c.startsWithCurly,b=c.startsWithLetSquareBracket,$=c.startsWithFunctionOrClass;return(0,_objectAssign2.default)(seq(this.p(s.test,_coderep.Precedence.LogicalOR,c),this.sep(Sep.BEFORE_TERNARY_QUESTION),this.t("?"),this.sep(Sep.AFTER_TERNARY_QUESTION),this.p(s.consequent,_coderep.Precedence.Assignment,h),this.sep(Sep.BEFORE_TERNARY_COLON),this.t(":"),this.sep(Sep.AFTER_TERNARY_COLON),this.p(s.alternate,_coderep.Precedence.Assignment,d)),{containsIn:g,startsWithCurly:_,startsWithLetSquareBracket:b,startsWithFunctionOrClass:$})}},{key:"reduceContinueStatement",value:function(s){return seq(this.t("continue"),s.label?seq(this.sep(Sep.BEFORE_JUMP_LABEL),this.t(s.label)):empty$1(),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceDataProperty",value:function(s,a){var c=a.name,h=a.expression;return seq(c,this.sep(Sep.BEFORE_PROP),this.t(":"),this.sep(Sep.AFTER_PROP),this.getAssignmentExpr(h))}},{key:"reduceDebuggerStatement",value:function(s){return seq(this.t("debugger"),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceDoWhileStatement",value:function(s,a){var c=a.body,h=a.test;return seq(this.t("do"),this.sep(Sep.AFTER_DO),c,this.sep(Sep.BEFORE_DOWHILE_WHILE),this.t("while"),this.sep(Sep.AFTER_DOWHILE_WHILE),this.paren(h,Sep.DO_WHILE_TEST_PAREN_BEFORE,Sep.DO_WHILE_TEST_PAREN_AFTER),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceEmptyStatement",value:function(s){return seq(this.t(";"),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceExpressionStatement",value:function(s,a){var c=a.expression,h=c.startsWithCurly||c.startsWithLetSquareBracket||c.startsWithFunctionOrClass;return seq(h?this.paren(c,Sep.EXPRESSION_STATEMENT_PAREN_BEFORE,Sep.EXPRESSION_STATEMENT_PAREN_AFTER):c,this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceForInStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return c=s.left.type==="VariableDeclaration"?noIn(markContainsIn(c)):c,(0,_objectAssign2.default)(seq(this.t("for"),this.sep(Sep.AFTER_FORIN_FOR),this.paren(seq(c.startsWithLet?this.paren(c,Sep.FOR_IN_LET_PAREN_BEFORE,Sep.FOR_IN_LET_PAREN_AFTER):c,this.sep(Sep.BEFORE_FORIN_IN),this.t("in"),this.sep(Sep.AFTER_FORIN_FOR),h),Sep.FOR_IN_PAREN_BEFORE,Sep.FOR_IN_PAREN_AFTER),this.sep(Sep.BEFORE_FORIN_BODY),d,this.sep(Sep.AFTER_STATEMENT(s))),{endsWithMissingElse:d.endsWithMissingElse})}},{key:"reduceForOfStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return c=s.left.type==="VariableDeclaration"?noIn(markContainsIn(c)):c,(0,_objectAssign2.default)(seq(this.t("for"),this.sep(Sep.AFTER_FOROF_FOR),this.paren(seq(c.startsWithLet?this.paren(c,Sep.FOR_OF_LET_PAREN_BEFORE,Sep.FOR_OF_LET_PAREN_AFTER):c,this.sep(Sep.BEFORE_FOROF_OF),this.t("of"),this.sep(Sep.AFTER_FOROF_FOR),this.p(s.right,_coderep.Precedence.Assignment,h)),Sep.FOR_OF_PAREN_BEFORE,Sep.FOR_OF_PAREN_AFTER),this.sep(Sep.BEFORE_FOROF_BODY),d,this.sep(Sep.AFTER_STATEMENT(s))),{endsWithMissingElse:d.endsWithMissingElse})}},{key:"reduceForStatement",value:function(s,a){var c=a.init,h=a.test,d=a.update,g=a.body;return c&&(c.startsWithLetSquareBracket&&(c=this.paren(c,Sep.FOR_LET_PAREN_BEFORE,Sep.FOR_LET_PAREN_AFTER)),c=noIn(markContainsIn(c))),(0,_objectAssign2.default)(seq(this.t("for"),this.sep(Sep.AFTER_FOR_FOR),this.paren(seq(c?seq(this.sep(Sep.BEFORE_FOR_INIT),c,this.sep(Sep.AFTER_FOR_INIT)):this.sep(Sep.EMPTY_FOR_INIT),this.t(";"),h?seq(this.sep(Sep.BEFORE_FOR_TEST),h,this.sep(Sep.AFTER_FOR_TEST)):this.sep(Sep.EMPTY_FOR_TEST),this.t(";"),d?seq(this.sep(Sep.BEFORE_FOR_UPDATE),d,this.sep(Sep.AFTER_FOR_UPDATE)):this.sep(Sep.EMPTY_FOR_UPDATE))),this.sep(Sep.BEFORE_FOR_BODY),g,this.sep(Sep.AFTER_STATEMENT(s))),{endsWithMissingElse:g.endsWithMissingElse})}},{key:"reduceForAwaitStatement",value:function(s,a){var c=a.left,h=a.right,d=a.body;return c=s.left.type==="VariableDeclaration"?noIn(markContainsIn(c)):c,(0,_objectAssign2.default)(seq(this.t("for"),this.sep(Sep.AFTER_FOROF_FOR),this.t("await"),this.sep(Sep.AFTER_FORAWAIT_AWAIT),this.paren(seq(c.startsWithLet?this.paren(c,Sep.FOR_OF_LET_PAREN_BEFORE,Sep.FOR_OF_LET_PAREN_AFTER):c,this.sep(Sep.BEFORE_FOROF_OF),this.t("of"),this.sep(Sep.AFTER_FOROF_FOR),this.p(s.right,_coderep.Precedence.Assignment,h)),Sep.FOR_OF_PAREN_BEFORE,Sep.FOR_OF_PAREN_AFTER),this.sep(Sep.BEFORE_FOROF_BODY),d,this.sep(Sep.AFTER_STATEMENT(s))),{endsWithMissingElse:d.endsWithMissingElse})}},{key:"reduceFunctionBody",value:function(s,a){var c=a.directives,h=a.statements;return h.length&&(h[0]=this.parenToAvoidBeingDirective(s.statements[0],h[0])),seq.apply(void 0,_toConsumableArray$1(c).concat([c.length?this.sep(Sep.AFTER_FUNCTION_DIRECTIVES):empty$1()],_toConsumableArray$1(h)))}},{key:"reduceFunctionDeclaration",value:function(s,a){var c=a.name,h=a.params,d=a.body;return seq(s.isAsync?this.t("async"):empty$1(),this.t("function"),s.isGenerator?seq(this.sep(Sep.BEFORE_GENERATOR_STAR),this.t("*"),this.sep(Sep.AFTER_GENERATOR_STAR)):empty$1(),this.sep(Sep.BEFORE_FUNCTION_NAME(s)),s.name.name==="*default*"?empty$1():c,this.sep(Sep.BEFORE_FUNCTION_PARAMS),this.paren(h,Sep.PARAMETERS_PAREN_BEFORE,Sep.PARAMETERS_PAREN_AFTER,Sep.PARAMETERS_PAREN_EMPTY),this.sep(Sep.BEFORE_FUNCTION_DECLARATION_BODY),this.brace(d,s,Sep.FUNCTION_BRACE_INITIAL,Sep.FUNCTION_BRACE_FINAL,Sep.FUNCTION_EMPTY),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceFunctionExpression",value:function(s,a){var c=a.name,h=a.params,d=a.body,g=seq(s.isAsync?this.t("async"):empty$1(),this.t("function"),s.isGenerator?seq(this.sep(Sep.BEFORE_GENERATOR_STAR),this.t("*"),this.sep(Sep.AFTER_GENERATOR_STAR)):empty$1(),this.sep(Sep.BEFORE_FUNCTION_NAME(s)),c||empty$1(),this.sep(Sep.BEFORE_FUNCTION_PARAMS),this.paren(h,Sep.PARAMETERS_PAREN_BEFORE,Sep.PARAMETERS_PAREN_AFTER,Sep.PARAMETERS_PAREN_EMPTY),this.sep(Sep.BEFORE_FUNCTION_EXPRESSION_BODY),this.brace(d,s,Sep.FUNCTION_EXPRESSION_BRACE_INITIAL,Sep.FUNCTION_EXPRESSION_BRACE_FINAL,Sep.FUNCTION_EXPRESSION_EMPTY));return g.startsWithFunctionOrClass=!0,g}},{key:"reduceFormalParameters",value:function(s,a){var c=a.items,h=a.rest;return this.commaSep(c.concat(h==null?[]:[seq(this.t("..."),this.sep(Sep.REST),h)]),Sep.PARAMETER_BEFORE_COMMA,Sep.PARAMETER_AFTER_COMMA)}},{key:"reduceArrowExpression",value:function(s,a){var c=a.params,h=a.body;(s.params.rest!=null||s.params.items.length!==1||s.params.items[0].type!=="BindingIdentifier")&&(c=this.paren(c,Sep.ARROW_PARAMETERS_PAREN_BEFORE,Sep.ARROW_PARAMETERS_PAREN_AFTER,Sep.ARROW_PARAMETERS_PAREN_EMPTY));var d=!1;return s.body.type==="FunctionBody"?h=this.brace(h,s,Sep.ARROW_BRACE_INITIAL,Sep.ARROW_BRACE_FINAL,Sep.ARROW_BRACE_EMPTY):h.startsWithCurly?h=this.paren(h,Sep.ARROW_BODY_PAREN_BEFORE,Sep.ARROW_BODY_PAREN_AFTER):h.containsIn&&(d=!0),(0,_objectAssign2.default)(seq(s.isAsync?seq(this.t("async"),this.sep(Sep.BEFORE_ARROW_ASYNC_PARAMS)):empty$1(),c,this.sep(Sep.BEFORE_ARROW),this.t("=>"),this.sep(Sep.AFTER_ARROW),this.p(s.body,_coderep.Precedence.Assignment,h)),{containsIn:d})}},{key:"reduceGetter",value:function(s,a){var c=a.name,h=a.body;return seq(this.t("get"),this.sep(Sep.AFTER_GET),c,this.sep(Sep.BEFORE_GET_PARAMS),this.paren(empty$1(),null,null,Sep.GETTER_PARAMS),this.sep(Sep.BEFORE_GET_BODY),this.brace(h,s,Sep.GET_BRACE_INTIAL,Sep.GET_BRACE_FINAL,Sep.GET_BRACE_EMPTY))}},{key:"reduceIdentifierExpression",value:function(s){var a=this.t(s.name);return s.name==="let"&&(a.startsWithLet=!0),a}},{key:"reduceIfStatement",value:function(s,a){var c=a.test,h=a.consequent,d=a.alternate;return d&&h.endsWithMissingElse&&(h=this.brace(h,s,Sep.MISSING_ELSE_INTIIAL,Sep.MISSING_ELSE_FINAL,Sep.MISSING_ELSE_EMPTY)),(0,_objectAssign2.default)(seq(this.t("if"),this.sep(Sep.AFTER_IF),this.paren(c,Sep.IF_PAREN_BEFORE,Sep.IF_PAREN_AFTER),this.sep(Sep.AFTER_IF_TEST),h,d?seq(this.sep(Sep.BEFORE_ELSE),this.t("else"),this.sep(Sep.AFTER_ELSE),d):empty$1(),this.sep(Sep.AFTER_STATEMENT(s))),{endsWithMissingElse:d?d.endsWithMissingElse:!0})}},{key:"reduceImport",value:function(s,a){var c=a.defaultBinding,h=a.namedImports,d=[];return c!=null&&d.push(c),h.length>0&&d.push(this.brace(this.commaSep(h,Sep.NAMED_IMPORT_BEFORE_COMMA,Sep.NAMED_IMPORT_AFTER_COMMA),s,Sep.IMPORT_BRACE_INTIAL,Sep.IMPORT_BRACE_FINAL,Sep.IMPORT_BRACE_EMPTY)),d.length===0?seq(this.t("import"),this.sep(Sep.BEFORE_IMPORT_MODULE),this.t((0,_coderep.escapeStringLiteral)(s.moduleSpecifier)),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s))):seq(this.t("import"),this.sep(Sep.BEFORE_IMPORT_BINDINGS),this.commaSep(d,Sep.IMPORT_BEFORE_COMMA,Sep.IMPORT_AFTER_COMMA),this.sep(Sep.AFTER_IMPORT_BINDINGS),this.t("from"),this.sep(Sep.AFTER_FROM),this.t((0,_coderep.escapeStringLiteral)(s.moduleSpecifier)),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceImportNamespace",value:function(s,a){var c=a.defaultBinding,h=a.namespaceBinding;return seq(this.t("import"),this.sep(Sep.BEFORE_IMPORT_NAMESPACE),c==null?empty$1():seq(c,this.sep(Sep.IMPORT_BEFORE_COMMA),this.t(","),this.sep(Sep.IMPORT_AFTER_COMMA)),this.sep(Sep.BEFORE_IMPORT_STAR),this.t("*"),this.sep(Sep.AFTER_IMPORT_STAR),this.t("as"),this.sep(Sep.AFTER_IMPORT_AS),h,this.sep(Sep.AFTER_NAMESPACE_BINDING),this.t("from"),this.sep(Sep.AFTER_FROM),this.t((0,_coderep.escapeStringLiteral)(s.moduleSpecifier)),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceImportSpecifier",value:function(s,a){var c=a.binding;return s.name==null?c:seq(this.t(s.name),this.sep(Sep.BEFORE_IMPORT_AS),this.t("as"),this.sep(Sep.AFTER_IMPORT_AS),c)}},{key:"reduceExportAllFrom",value:function(s){return seq(this.t("export"),this.sep(Sep.BEFORE_EXPORT_STAR),this.t("*"),this.sep(Sep.AFTER_EXPORT_STAR),this.t("from"),this.sep(Sep.AFTER_FROM),this.t((0,_coderep.escapeStringLiteral)(s.moduleSpecifier)),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceExportFrom",value:function(s,a){var c=a.namedExports;return seq(this.t("export"),this.sep(Sep.BEFORE_EXPORT_BINDINGS),this.brace(this.commaSep(c,Sep.EXPORTS_BEFORE_COMMA,Sep.EXPORTS_AFTER_COMMA),s,Sep.EXPORT_BRACE_INITIAL,Sep.EXPORT_BRACE_FINAL,Sep.EXPORT_BRACE_EMPTY),this.sep(Sep.AFTER_EXPORT_FROM_BINDINGS),this.t("from"),this.sep(Sep.AFTER_FROM),this.t((0,_coderep.escapeStringLiteral)(s.moduleSpecifier)),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceExportLocals",value:function(s,a){var c=a.namedExports;return seq(this.t("export"),this.sep(Sep.BEFORE_EXPORT_BINDINGS),this.brace(this.commaSep(c,Sep.EXPORTS_BEFORE_COMMA,Sep.EXPORTS_AFTER_COMMA),s,Sep.EXPORT_BRACE_INITIAL,Sep.EXPORT_BRACE_FINAL,Sep.EXPORT_BRACE_EMPTY),this.sep(Sep.AFTER_EXPORT_LOCAL_BINDINGS),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceExport",value:function(s,a){var c=a.declaration;switch(s.declaration.type){case"FunctionDeclaration":case"ClassDeclaration":break;default:c=seq(c,this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}return seq(this.t("export"),this.sep(Sep.AFTER_EXPORT),c)}},{key:"reduceExportDefault",value:function(s,a){var c=a.body;switch(c=c.startsWithFunctionOrClass?this.paren(c,Sep.EXPORT_PAREN_BEFORE,Sep.EXPORT_PAREN_AFTER):c,s.body.type){case"FunctionDeclaration":case"ClassDeclaration":return seq(this.t("export"),this.sep(Sep.EXPORT_DEFAULT),this.t("default"),this.sep(Sep.AFTER_EXPORT_DEFAULT),c);default:return seq(this.t("export"),this.sep(Sep.EXPORT_DEFAULT),this.t("default"),this.sep(Sep.AFTER_EXPORT_DEFAULT),this.p(s.body,_coderep.Precedence.Assignment,c),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}}},{key:"reduceExportFromSpecifier",value:function(s){return s.exportedName==null?this.t(s.name):seq(this.t(s.name),this.sep(Sep.BEFORE_EXPORT_AS),this.t("as"),this.sep(Sep.AFTER_EXPORT_AS),this.t(s.exportedName))}},{key:"reduceExportLocalSpecifier",value:function(s,a){var c=a.name;return s.exportedName==null?c:seq(c,this.sep(Sep.BEFORE_EXPORT_AS),this.t("as"),this.sep(Sep.AFTER_EXPORT_AS),this.t(s.exportedName))}},{key:"reduceLabeledStatement",value:function(s,a){var c=a.body;return(0,_objectAssign2.default)(seq(this.t(s.label),this.sep(Sep.BEFORE_LABEL_COLON),this.t(":"),this.sep(Sep.AFTER_LABEL_COLON),c),{endsWithMissingElse:c.endsWithMissingElse})}},{key:"reduceLiteralBooleanExpression",value:function(s){return this.t(s.value.toString())}},{key:"reduceLiteralNullExpression",value:function(){return this.t("null")}},{key:"reduceLiteralInfinityExpression",value:function(){return this.t("2e308")}},{key:"reduceLiteralNumericExpression",value:function(s){return new _coderep.NumberCodeRep(s.value)}},{key:"reduceLiteralRegExpExpression",value:function(s){return this.t("/"+s.pattern+"/"+(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiLine?"m":"")+(s.dotAll?"s":"")+(s.unicode?"u":"")+(s.sticky?"y":""),!0)}},{key:"reduceLiteralStringExpression",value:function(s){return this.t((0,_coderep.escapeStringLiteral)(s.value))}},{key:"reduceMethod",value:function(s,a){var c=a.name,h=a.params,d=a.body;return seq(s.isAsync?seq(this.t("async"),this.sep(Sep.AFTER_METHOD_ASYNC)):empty$1(),s.isGenerator?seq(this.t("*"),this.sep(Sep.AFTER_METHOD_GENERATOR_STAR)):empty$1(),c,this.sep(Sep.AFTER_METHOD_NAME),this.paren(h,Sep.PARAMETERS_PAREN_BEFORE,Sep.PARAMETERS_PAREN_AFTER,Sep.PARAMETERS_PAREN_EMPTY),this.sep(Sep.BEFORE_METHOD_BODY),this.brace(d,s,Sep.METHOD_BRACE_INTIAL,Sep.METHOD_BRACE_FINAL,Sep.METHOD_BRACE_EMPTY))}},{key:"reduceModule",value:function(s,a){var c=a.directives,h=a.items;return h.length&&(h[0]=this.parenToAvoidBeingDirective(s.items[0],h[0])),seq.apply(void 0,_toConsumableArray$1(c).concat([c.length?this.sep(Sep.AFTER_MODULE_DIRECTIVES):empty$1()],_toConsumableArray$1(h)))}},{key:"reduceNewExpression",value:function(s,a){var c=this,h=a.callee,d=a.arguments,g=d.map(function(b,$){return c.p(s.arguments[$],_coderep.Precedence.Assignment,b)}),_=(0,_coderep.getPrecedence)(s.callee)===_coderep.Precedence.Call?this.paren(h,Sep.NEW_CALLEE_PAREN_BEFORE,Sep.NEW_CALLEE_PAREN_AFTER):this.p(s.callee,(0,_coderep.getPrecedence)(s),h);return seq(this.t("new"),this.sep(Sep.AFTER_NEW),_,d.length===0?this.sep(Sep.EMPTY_NEW_CALL):seq(this.sep(Sep.BEFORE_NEW_ARGS),this.paren(this.commaSep(g,Sep.ARGS_BEFORE_COMMA,Sep.ARGS_AFTER_COMMA),Sep.NEW_PAREN_BEFORE,Sep.NEW_PAREN_AFTER,Sep.NEW_PAREN_EMPTY)))}},{key:"reduceNewTargetExpression",value:function(){return seq(this.t("new"),this.sep(Sep.NEW_TARGET_BEFORE_DOT),this.t("."),this.sep(Sep.NEW_TARGET_AFTER_DOT),this.t("target"))}},{key:"reduceObjectExpression",value:function(s,a){var c=a.properties,h=this.brace(this.commaSep(c,Sep.OBJECT_BEFORE_COMMA,Sep.OBJECT_AFTER_COMMA),s,Sep.OBJECT_BRACE_INITIAL,Sep.OBJECT_BRACE_FINAL,Sep.OBJECT_EMPTY);return h.startsWithCurly=!0,h}},{key:"reduceUpdateExpression",value:function(s,a){var c=a.operand;return s.isPrefix?this.reduceUnaryExpression.apply(this,arguments):(0,_objectAssign2.default)(seq(this.p(s.operand,_coderep.Precedence.New,c),this.sep(Sep.BEFORE_POSTFIX(s.operator)),this.t(s.operator)),{startsWithCurly:c.startsWithCurly,startsWithLetSquareBracket:c.startsWithLetSquareBracket,startsWithFunctionOrClass:c.startsWithFunctionOrClass})}},{key:"reduceUnaryExpression",value:function(s,a){var c=a.operand;return seq(this.t(s.operator),this.sep(Sep.UNARY(s.operator)),this.p(s.operand,(0,_coderep.getPrecedence)(s),c))}},{key:"reduceReturnStatement",value:function(s,a){var c=a.expression;return seq(this.t("return"),c?seq(this.sep(Sep.RETURN),c):empty$1(),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceScript",value:function(s,a){var c=a.directives,h=a.statements;return h.length&&(h[0]=this.parenToAvoidBeingDirective(s.statements[0],h[0])),seq.apply(void 0,_toConsumableArray$1(c).concat([c.length?this.sep(Sep.AFTER_SCRIPT_DIRECTIVES):empty$1()],_toConsumableArray$1(h)))}},{key:"reduceSetter",value:function(s,a){var c=a.name,h=a.param,d=a.body;return seq(this.t("set"),this.sep(Sep.AFTER_SET),c,this.sep(Sep.BEFORE_SET_PARAMS),this.paren(h,Sep.SETTER_PARAM_BEFORE,Sep.SETTER_PARAM_AFTER),this.sep(Sep.BEFORE_SET_BODY),this.brace(d,s,Sep.SET_BRACE_INTIIAL,Sep.SET_BRACE_FINAL,Sep.SET_BRACE_EMPTY))}},{key:"reduceShorthandProperty",value:function(s,a){var c=a.name;return c}},{key:"reduceStaticMemberAssignmentTarget",value:function(s,a){var c=a.object,h=seq(this.p(s.object,(0,_coderep.getPrecedence)(s),c),this.sep(Sep.BEFORE_STATIC_MEMBER_ASSIGNMENT_TARGET_DOT),this.t("."),this.sep(Sep.AFTER_STATIC_MEMBER_ASSIGNMENT_TARGET_DOT),this.t(s.property));return h.startsWithLet=c.startsWithLet,h.startsWithCurly=c.startsWithCurly,h.startsWithLetSquareBracket=c.startsWithLetSquareBracket,h.startsWithFunctionOrClass=c.startsWithFunctionOrClass,h}},{key:"reduceStaticMemberExpression",value:function(s,a){var c=a.object,h=seq(this.p(s.object,(0,_coderep.getPrecedence)(s),c),this.sep(Sep.BEFORE_STATIC_MEMBER_DOT),this.t("."),this.sep(Sep.AFTER_STATIC_MEMBER_DOT),this.t(s.property));return h.startsWithLet=c.startsWithLet,h.startsWithCurly=c.startsWithCurly,h.startsWithLetSquareBracket=c.startsWithLetSquareBracket,h.startsWithFunctionOrClass=c.startsWithFunctionOrClass,h}},{key:"reduceStaticPropertyName",value:function(s){if(_esutils.keyword.isIdentifierNameES6(s.value))return this.t(s.value);var a=parseFloat(s.value);return a>=0&&a.toString()===s.value?new _coderep.NumberCodeRep(a):this.t((0,_coderep.escapeStringLiteral)(s.value))}},{key:"reduceSuper",value:function(){return this.t("super")}},{key:"reduceSwitchCase",value:function(s,a){var c=a.test,h=a.consequent;return seq(this.t("case"),this.sep(Sep.BEFORE_CASE_TEST),c,this.sep(Sep.AFTER_CASE_TEST),this.t(":"),this.sep(Sep.BEFORE_CASE_BODY),seq.apply(void 0,_toConsumableArray$1(h)),this.sep(Sep.AFTER_CASE_BODY))}},{key:"reduceSwitchDefault",value:function(s,a){var c=a.consequent;return seq(this.t("default"),this.sep(Sep.DEFAULT),this.t(":"),this.sep(Sep.BEFORE_CASE_BODY),seq.apply(void 0,_toConsumableArray$1(c)),this.sep(Sep.AFTER_DEFAULT_BODY))}},{key:"reduceSwitchStatement",value:function(s,a){var c=a.discriminant,h=a.cases;return seq(this.t("switch"),this.sep(Sep.BEFORE_SWITCH_DISCRIM),this.paren(c,Sep.SWITCH_DISCRIM_PAREN_BEFORE,Sep.SWITCH_DISCRIM_PAREN_AFTER),this.sep(Sep.BEFORE_SWITCH_BODY),this.brace(seq.apply(void 0,_toConsumableArray$1(h)),s,Sep.SWITCH_BRACE_INTIAL,Sep.SWITCH_BRACE_FINAL,Sep.SWITCH_BRACE_EMPTY),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceSwitchStatementWithDefault",value:function(s,a){var c=a.discriminant,h=a.preDefaultCases,d=a.defaultCase,g=a.postDefaultCases;return seq(this.t("switch"),this.sep(Sep.BEFORE_SWITCH_DISCRIM),this.paren(c,Sep.SWITCH_DISCRIM_PAREN_BEFORE,Sep.SWITCH_DISCRIM_PAREN_AFTER),this.sep(Sep.BEFORE_SWITCH_BODY),this.brace(seq.apply(void 0,_toConsumableArray$1(h).concat([d],_toConsumableArray$1(g))),s,Sep.SWITCH_BRACE_INTIAL,Sep.SWITCH_BRACE_FINAL,Sep.SWITCH_BRACE_EMPTY),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceTemplateExpression",value:function(s,a){var c=a.tag,h=a.elements,d=s.tag==null?empty$1():seq(this.p(s.tag,(0,_coderep.getPrecedence)(s),c),this.sep(Sep.TEMPLATE_TAG));d=seq(d,this.t("`"));for(var g=0,_=s.elements.length;g<_;++g)if(s.elements[g].type==="TemplateElement"){var b="";g>0&&(b+="}"),b+=s.elements[g].rawValue,g<_-1&&(b+="${"),d=seq(d,this.t(b))}else d=seq(d,this.sep(Sep.BEFORE_TEMPLATE_EXPRESSION),h[g],this.sep(Sep.AFTER_TEMPLATE_EXPRESSION));return d=seq(d,this.t("`")),s.tag!=null&&(d.startsWithCurly=c.startsWithCurly,d.startsWithLet=c.startsWithLet,d.startsWithLetSquareBracket=c.startsWithLetSquareBracket,d.startsWithFunctionOrClass=c.startsWithFunctionOrClass),d}},{key:"reduceTemplateElement",value:function(s){return this.t(s.rawValue)}},{key:"reduceThisExpression",value:function(){return this.t("this")}},{key:"reduceThrowStatement",value:function(s,a){var c=a.expression;return seq(this.t("throw"),this.sep(Sep.THROW),c,this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceTryCatchStatement",value:function(s,a){var c=a.body,h=a.catchClause;return seq(this.t("try"),this.sep(Sep.AFTER_TRY),c,this.sep(Sep.BEFORE_CATCH),h,this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceTryFinallyStatement",value:function(s,a){var c=a.body,h=a.catchClause,d=a.finalizer;return seq(this.t("try"),this.sep(Sep.AFTER_TRY),c,h?seq(this.sep(Sep.BEFORE_CATCH),h):empty$1(),this.sep(Sep.BEFORE_FINALLY),this.t("finally"),this.sep(Sep.AFTER_FINALLY),d,this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceYieldExpression",value:function(s,a){var c=a.expression;return s.expression==null?this.t("yield"):(0,_objectAssign2.default)(seq(this.t("yield"),this.sep(Sep.YIELD),this.p(s.expression,(0,_coderep.getPrecedence)(s),c)),{containsIn:c.containsIn})}},{key:"reduceYieldGeneratorExpression",value:function(s,a){var c=a.expression;return(0,_objectAssign2.default)(seq(this.t("yield"),this.sep(Sep.BEFORE_YIELD_STAR),this.t("*"),this.sep(Sep.AFTER_YIELD_STAR),this.p(s.expression,(0,_coderep.getPrecedence)(s),c)),{containsIn:c.containsIn})}},{key:"reduceDirective",value:function(s){var a=s.rawValue.match(/(^|[^\\])(\\\\)*"/)?"'":'"';return seq(this.t(a+s.rawValue+a),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceVariableDeclaration",value:function(s,a){var c=a.declarators;return seq(this.t(s.kind),this.sep(Sep.VARIABLE_DECLARATION),this.commaSep(c,Sep.DECLARATORS_BEFORE_COMMA,Sep.DECLARATORS_AFTER_COMMA))}},{key:"reduceVariableDeclarationStatement",value:function(s,a){var c=a.declaration;return seq(c,this.semiOp(),this.sep(Sep.AFTER_STATEMENT(s)))}},{key:"reduceVariableDeclarator",value:function(s,a){var c=a.binding,h=a.init,d=h&&h.containsIn&&!h.containsGroup;return h&&(h.containsGroup?h=this.paren(h,Sep.EXPRESSION_PAREN_BEFORE,Sep.EXPRESSION_PAREN_AFTER):h=markContainsIn(h)),(0,_objectAssign2.default)(h==null?c:seq(c,this.sep(Sep.BEFORE_INIT_EQUALS),this.t("="),this.sep(Sep.AFTER_INIT_EQUALS),h),{containsIn:d})}},{key:"reduceWhileStatement",value:function(s,a){var c=a.test,h=a.body;return(0,_objectAssign2.default)(seq(this.t("while"),this.sep(Sep.AFTER_WHILE),this.paren(c,Sep.WHILE_TEST_PAREN_BEFORE,Sep.WHILE_TEST_PAREN_AFTER),this.sep(Sep.BEFORE_WHILE_BODY),h,this.sep(Sep.AFTER_STATEMENT(s))),{endsWithMissingElse:h.endsWithMissingElse})}},{key:"reduceWithStatement",value:function(s,a){var c=a.object,h=a.body;return(0,_objectAssign2.default)(seq(this.t("with"),this.sep(Sep.AFTER_WITH),this.paren(c,Sep.WITH_PAREN_BEFORE,Sep.WITH_PAREN_AFTER),this.sep(Sep.BEFORE_WITH_BODY),h,this.sep(Sep.AFTER_STATEMENT(s))),{endsWithMissingElse:h.endsWithMissingElse})}}]),o}();function withoutTrailingLinebreak(o){if(o&&o instanceof _coderep.Seq){for(var e=o.children[o.children.length-1];e instanceof _coderep.Empty;)o.children.pop(),e=o.children[o.children.length-1];e instanceof _coderep.Seq?withoutTrailingLinebreak(e):e instanceof Linebreak&&o.children.pop()}return o}function indent(o,e){var s=void 0;function a(c){c instanceof Linebreak&&(s=c,++c.indentation)}return o.forEach(a),e||--s.indentation,o}formattedCodegen.FormattedCodeGen=function(o){_inherits$1(e,o);function e(){return _classCallCheck$2(this,e),_possibleConstructorReturn$1(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _createClass$2(e,[{key:"parenToAvoidBeingDirective",value:function(a,c){return a&&a.type==="ExpressionStatement"&&a.expression.type==="LiteralStringExpression"?seq(this.paren(c.children[0],Sep.PAREN_AVOIDING_DIRECTIVE_BEFORE,Sep.PAREN_AVOIDING_DIRECTIVE_AFTER),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(a))):c}},{key:"brace",value:function(a,c){if(isEmpty(a))return this.t("{}");switch(c.type){case"ObjectAssignmentTarget":case"ObjectBinding":case"Import":case"ExportFrom":case"ExportLocals":case"ObjectExpression":return new _coderep.Brace(a)}return a=seq(new Linebreak,a),indent(a,!1),new _coderep.Brace(a)}},{key:"reduceDoWhileStatement",value:function(a,c){var h=c.body,d=c.test;return seq(this.t("do"),this.sep(Sep.AFTER_DO),withoutTrailingLinebreak(h),this.sep(Sep.BEFORE_DOWHILE_WHILE),this.t("while"),this.sep(Sep.AFTER_DOWHILE_WHILE),this.paren(d,Sep.DO_WHILE_TEST_PAREN_BEFORE,Sep.DO_WHILE_TEST_PAREN_AFTER),this.semiOp(),this.sep(Sep.AFTER_STATEMENT(a)))}},{key:"reduceIfStatement",value:function(a,c){var h=c.test,d=c.consequent,g=c.alternate;return g&&d.endsWithMissingElse&&(d=this.brace(d,a)),(0,_objectAssign2.default)(seq(this.t("if"),this.sep(Sep.AFTER_IF),this.paren(h,Sep.IF_PAREN_BEFORE,Sep.IF_PAREN_AFTER),this.sep(Sep.AFTER_IF_TEST),withoutTrailingLinebreak(d),g?seq(this.sep(Sep.BEFORE_ELSE),this.t("else"),this.sep(Sep.AFTER_ELSE),withoutTrailingLinebreak(g)):empty$1(),this.sep(Sep.AFTER_STATEMENT(a))),{endsWithMissingElse:g?g.endsWithMissingElse:!0})}},{key:"reduceSwitchCase",value:function(a,c){var h=c.test,d=c.consequent;return d=indent(withoutTrailingLinebreak(seq.apply(void 0,[this.sep(Sep.BEFORE_CASE_BODY)].concat(_toConsumableArray$1(d)))),!0),seq(this.t("case"),this.sep(Sep.BEFORE_CASE_TEST),h,this.sep(Sep.AFTER_CASE_TEST),this.t(":"),d,this.sep(Sep.AFTER_CASE_BODY))}},{key:"reduceSwitchDefault",value:function(a,c){var h=c.consequent;return h=indent(withoutTrailingLinebreak(seq.apply(void 0,[this.sep(Sep.BEFORE_CASE_BODY)].concat(_toConsumableArray$1(h)))),!0),seq(this.t("default"),this.sep(Sep.DEFAULT),this.t(":"),h,this.sep(Sep.AFTER_DEFAULT_BODY))}},{key:"sep",value:function(a){switch(a.type){case"AWAIT":case"AFTER_FORAWAIT_AWAIT":case"ARRAY_AFTER_COMMA":case"OBJECT_AFTER_COMMA":case"ARGS_AFTER_COMMA":case"PARAMETER_AFTER_COMMA":case"DECLARATORS_AFTER_COMMA":case"NAMED_IMPORT_AFTER_COMMA":case"IMPORT_AFTER_COMMA":case"BEFORE_DEFAULT_EQUALS":case"AFTER_DEFAULT_EQUALS":case"AFTER_PROP":case"BEFORE_JUMP_LABEL":case"BEFORE_CATCH_BINDING":case"AFTER_CATCH_BINDING":case"BEFORE_CLASS_NAME":case"BEFORE_EXTENDS":case"AFTER_EXTENDS":case"BEFORE_CLASS_DECLARATION_ELEMENTS":case"BEFORE_CLASS_EXPRESSION_ELEMENTS":case"AFTER_STATIC":case"BEFORE_TERNARY_QUESTION":case"AFTER_TERNARY_QUESTION":case"BEFORE_TERNARY_COLON":case"AFTER_TERNARY_COLON":case"AFTER_DO":case"BEFORE_DOWHILE_WHILE":case"AFTER_DOWHILE_WHILE":case"AFTER_FORIN_FOR":case"BEFORE_FORIN_IN":case"BEFORE_FORIN_BODY":case"BEFORE_FOROF_OF":case"AFTER_FOROF_FOR":case"BEFORE_FOROF_BODY":case"AFTER_FOR_FOR":case"BEFORE_FOR_TEST":case"BEFORE_FOR_UPDATE":case"BEFORE_FOR_BODY":case"BEFORE_FUNCTION_DECLARATION_BODY":case"BEFORE_FUNCTION_EXPRESSION_BODY":case"BEFORE_ARROW":case"AFTER_ARROW":case"BEFORE_ARROW_ASYNC_PARAMS":case"AFTER_GET":case"BEFORE_GET_BODY":case"AFTER_IF":case"AFTER_IF_TEST":case"BEFORE_ELSE":case"AFTER_ELSE":case"BEFORE_IMPORT_BINDINGS":case"BEFORE_IMPORT_MODULE":case"AFTER_IMPORT_BINDINGS":case"AFTER_FROM":case"BEFORE_IMPORT_NAMESPACE":case"BEFORE_IMPORT_STAR":case"AFTER_IMPORT_STAR":case"AFTER_NAMESPACE_BINDING":case"BEFORE_IMPORT_AS":case"AFTER_IMPORT_AS":case"EXPORTS_AFTER_COMMA":case"BEFORE_EXPORT_STAR":case"AFTER_EXPORT_STAR":case"BEFORE_EXPORT_BINDINGS":case"AFTER_EXPORT_FROM_BINDINGS":case"AFTER_EXPORT":case"AFTER_EXPORT_DEFAULT":case"BEFORE_EXPORT_AS":case"AFTER_EXPORT_AS":case"AFTER_LABEL_COLON":case"AFTER_METHOD_ASYNC":case"BEFORE_METHOD_BODY":case"AFTER_NEW":case"RETURN":case"AFTER_SET":case"BEFORE_SET_BODY":case"BEFORE_SET_PARAMS":case"BEFORE_CASE_TEST":case"BEFORE_SWITCH_DISCRIM":case"BEFORE_SWITCH_BODY":case"THROW":case"AFTER_TRY":case"BEFORE_CATCH":case"BEFORE_FINALLY":case"AFTER_FINALLY":case"VARIABLE_DECLARATION":case"YIELD":case"AFTER_YIELD_STAR":case"BEFORE_INIT_EQUALS":case"AFTER_INIT_EQUALS":case"AFTER_WHILE":case"BEFORE_WHILE_BODY":case"AFTER_WITH":case"BEFORE_WITH_BODY":case"BEFORE_FUNCTION_NAME":case"AFTER_BINOP":case"BEFORE_ASSIGN_OP":case"AFTER_ASSIGN_OP":return this.t(" ");case"AFTER_STATEMENT":switch(a.node.type){case"ForInStatement":case"ForOfStatement":case"ForStatement":case"WhileStatement":case"WithStatement":return empty$1();default:return new Linebreak}case"AFTER_CLASS_ELEMENT":case"BEFORE_CASE_BODY":case"AFTER_CASE_BODY":case"AFTER_DEFAULT_BODY":return new Linebreak;case"BEFORE_BINOP":return a.op===","?empty$1():this.t(" ");case"UNARY":return a.op==="delete"||a.op==="void"||a.op==="typeof"?this.t(" "):empty$1();default:return empty$1()}}}]),e}(ExtensibleCodeGen);var withLocation={},tokenStream={},unicode={};Object.defineProperty(unicode,"__esModule",{value:!0});unicode.whitespaceArray=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];unicode.whitespaceBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!0,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1];unicode.idStartLargeRegex=/^[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]$/;unicode.idStartBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];unicode.idContinueLargeRegex=/^[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]$/;unicode.idContinueBool=[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1];Object.defineProperty(tokenStream,"__esModule",{value:!0});tokenStream.TokenStream=void 0;var _createClass$1=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}();tokenStream.needsDoubleDot=needsDoubleDot;var _unicode=unicode;function _toConsumableArray(o){if(Array.isArray(o)){for(var e=0,s=Array(o.length);e<o.length;e++)s[e]=o[e];return s}else return Array.from(o)}function _classCallCheck$1(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function isIdentifierPartES6(o){var e=o.charCodeAt(0);return e<128?_unicode.idContinueBool[e]:_unicode.idContinueLargeRegex.test(o)}function needsDoubleDot(o){return o.indexOf(".")<0&&o.indexOf("e")<0&&o.indexOf("x")<0}function renderNumber(o){var e=void 0;return o>=1e3&&o%10===0?(e=o.toString(10),/[eE]/.test(e)?e.replace(/[eE]\+/,"e"):o.toString(10).replace(/0{3,}$/,function(s){return"e"+s.length})):o%1===0?o>1e15&&o<1e20?"0x"+o.toString(16).toUpperCase():o.toString(10).replace(/[eE]\+/,"e"):o.toString(10).replace(/^0\./,".").replace(/[eE]\+/,"e")}tokenStream.TokenStream=function(){function o(){_classCallCheck$1(this,o),this.result="",this.lastNumber=null,this.lastCodePoint=null,this.lastTokenStr="",this.optionalSemi=!1,this.previousWasRegExp=!1,this.partialHtmlComment=!1}return _createClass$1(o,[{key:"putNumber",value:function(s){var a=renderNumber(s);this.put(a),this.lastNumber=a}},{key:"putOptionalSemi",value:function(){this.optionalSemi=!0}},{key:"putRaw",value:function(s){this.result+=s,this.lastTokenStr=s}},{key:"put",value:function(s,a){if(this.optionalSemi&&(this.optionalSemi=!1,s!=="}"&&(this.result+=";",this.lastCodePoint=";",this.previousWasRegExp=!1)),this.lastNumber!==null&&s.length===1&&s==="."){this.result+=needsDoubleDot(this.lastNumber)?"..":".",this.lastNumber=null,this.lastCodePoint=".";return}var c=[].concat(_toConsumableArray(s)).length;if(c>0){this.lastNumber=null;var h=String.fromCodePoint(s.codePointAt(0)),d=this.lastCodePoint;this.lastCodePoint=String.fromCodePoint(s.codePointAt(c-1));var g=this.previousWasRegExp;this.previousWasRegExp=a,d&&((d==="+"||d==="-")&&d===h||isIdentifierPartES6(d)&&isIdentifierPartES6(h)||d==="/"&&h==="/"||g&&h==="i"||this.partialHtmlComment&&s.startsWith("--"))&&(this.result+=" ")}this.partialHtmlComment=this.lastTokenStr.endsWith("<")&&s==="!",this.result+=s,this.lastTokenStr=s}}]),o}();Object.defineProperty(withLocation,"__esModule",{value:!0});var _createClass=function(){function o(e,s){for(var a=0;a<s.length;a++){var c=s[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}return function(e,s,a){return s&&o(e.prototype,s),a&&o(e,a),e}}(),_get=function o(e,s,a){e===null&&(e=Function.prototype);var c=Object.getOwnPropertyDescriptor(e,s);if(c===void 0){var h=Object.getPrototypeOf(e);return h===null?void 0:o(h,s,a)}else{if("value"in c)return c.value;var d=c.get;return d===void 0?void 0:d.call(a)}};withLocation.default=codeGenWithLocation;var _shiftReducer=dist$4,_tokenStream=tokenStream,_minimalCodegen=minimalCodegen,_minimalCodegen2=_interopRequireDefault(_minimalCodegen);function _interopRequireDefault(o){return o&&o.__esModule?o:{default:o}}function _classCallCheck(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o}function _inherits(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)}function mightHaveSemi(o){return/(Import)|(Export)|(Statement)|(Directive)|(SwitchCase)|(SwitchDefault)/.test(o)}var TokenStreamWithLocation=function(o){_inherits(e,o);function e(){_classCallCheck(this,e);var s=_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s.line=1,s.column=0,s.startingNodes=[],s.finishingStatements=[],s.lastNumberNode=null,s.locations=new WeakMap,s}return _createClass(e,[{key:"putRaw",value:function(a){var c=this.result.length;_get(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"putRaw",this).call(this,a),this.startNodes(a,c)}},{key:"put",value:function(a,c){if(this.optionalSemi&&a!=="}"){var h=!0,d=!1,g=void 0;try{for(var _=this.finishingStatements[Symbol.iterator](),b;!(h=(b=_.next()).done);h=!0){var $=b.value;++$.end.column,++$.end.offset}}catch(et){d=!0,g=et}finally{try{!h&&_.return&&_.return()}finally{if(d)throw g}}}if(this.finishingStatements=[],this.lastNumber!==null&&a==="."&&(0,_tokenStream.needsDoubleDot)(this.lastNumber)){var j=this.locations.get(this.lastNumberNode).end;++j.column,++j.offset}this.lastNumberNode=null;var _e=this.result.length;_get(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"put",this).call(this,a,c),this.startNodes(a,_e)}},{key:"startNodes",value:function(a,c){for(var h=/\r\n?|[\n\u2028\u2029]/g,d=!1,g=void 0,_=this.line,b=this.column;g=h.exec(a);)++this.line,this.column=a.length-g.index-g[0].length,d=!0;d||(this.column+=this.result.length-c,b=this.column-a.length);var $=!0,j=!1,_e=void 0;try{for(var et=this.startingNodes[Symbol.iterator](),tt;!($=(tt=et.next()).done);$=!0){var nt=tt.value;this.locations.set(nt,{start:{line:_,column:b,offset:this.result.length-a.length},end:null})}}catch(st){j=!0,_e=st}finally{try{!$&&et.return&&et.return()}finally{if(j)throw _e}}this.startingNodes=[]}},{key:"startEmit",value:function(a){this.startingNodes.push(a)}},{key:"finishEmit",value:function(a){this.locations.get(a).end={line:this.line,column:this.column,offset:this.result.length},mightHaveSemi(a.type)&&this.finishingStatements.push(this.locations.get(a))}}]),e}(_tokenStream.TokenStream);function addLocation(o,e){var s=o.emit.bind(o);return e.type==="Script"||e.type==="Module"?o.emit=function(a){for(var c=arguments.length,h=Array(c>1?c-1:0),d=1;d<c;d++)h[d-1]=arguments[d];a.locations.set(e,{start:{line:1,column:0,offset:0},end:null}),s.apply(void 0,[a].concat(h)),a.locations.get(e).end={line:a.line,column:a.column,offset:a.result.length}}:e.type==="LiteralNumericExpression"?o.emit=function(a){for(var c=arguments.length,h=Array(c>1?c-1:0),d=1;d<c;d++)h[d-1]=arguments[d];a.startEmit(e),s.apply(void 0,[a].concat(h)),a.finishEmit(e),a.lastNumberNode=e}:o.emit=function(a){for(var c=arguments.length,h=Array(c>1?c-1:0),d=1;d<c;d++)h[d-1]=arguments[d];a.startEmit(e),s.apply(void 0,[a].concat(h)),a.finishEmit(e)},o}function addLocationToReducer(o){var e=(0,_shiftReducer.adapt)(addLocation,o),s=e.regenerateArrowParams.bind(e);e.regenerateArrowParams=function(c,h){var d=s(c,h);return d!==h&&addLocation(d,c),d};var a=e.parenToAvoidBeingDirective.bind(e);return e.parenToAvoidBeingDirective=function(c,h){var d=a(c,h);return d!==h&&addLocation(d,c),d},e}function codeGenWithLocation(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new _minimalCodegen2.default,s=new TokenStreamWithLocation,a=(0,_shiftReducer.reduce)(addLocationToReducer(e),o);return a.emit(s),{source:s.result,locations:s.locations}}(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.codeGenWithLocation=o.SemiOp=o.CommaSep=o.Semi=o.Seq=o.ContainsIn=o.NoIn=o.Brace=o.Bracket=o.Paren=o.NumberCodeRep=o.Token=o.Empty=o.CodeRep=o.escapeStringLiteral=o.getPrecedence=o.Precedence=o.Sep=o.FormattedCodeGen=o.ExtensibleCodeGen=o.MinimalCodeGen=void 0,o.default=$;var e=minimalCodegen;Object.defineProperty(o,"MinimalCodeGen",{enumerable:!0,get:function(){return b(e).default}});var s=formattedCodegen;Object.defineProperty(o,"ExtensibleCodeGen",{enumerable:!0,get:function(){return s.ExtensibleCodeGen}}),Object.defineProperty(o,"FormattedCodeGen",{enumerable:!0,get:function(){return s.FormattedCodeGen}}),Object.defineProperty(o,"Sep",{enumerable:!0,get:function(){return s.Sep}});var a=coderep;Object.defineProperty(o,"Precedence",{enumerable:!0,get:function(){return a.Precedence}}),Object.defineProperty(o,"getPrecedence",{enumerable:!0,get:function(){return a.getPrecedence}}),Object.defineProperty(o,"escapeStringLiteral",{enumerable:!0,get:function(){return a.escapeStringLiteral}}),Object.defineProperty(o,"CodeRep",{enumerable:!0,get:function(){return a.CodeRep}}),Object.defineProperty(o,"Empty",{enumerable:!0,get:function(){return a.Empty}}),Object.defineProperty(o,"Token",{enumerable:!0,get:function(){return a.Token}}),Object.defineProperty(o,"NumberCodeRep",{enumerable:!0,get:function(){return a.NumberCodeRep}}),Object.defineProperty(o,"Paren",{enumerable:!0,get:function(){return a.Paren}}),Object.defineProperty(o,"Bracket",{enumerable:!0,get:function(){return a.Bracket}}),Object.defineProperty(o,"Brace",{enumerable:!0,get:function(){return a.Brace}}),Object.defineProperty(o,"NoIn",{enumerable:!0,get:function(){return a.NoIn}}),Object.defineProperty(o,"ContainsIn",{enumerable:!0,get:function(){return a.ContainsIn}}),Object.defineProperty(o,"Seq",{enumerable:!0,get:function(){return a.Seq}}),Object.defineProperty(o,"Semi",{enumerable:!0,get:function(){return a.Semi}}),Object.defineProperty(o,"CommaSep",{enumerable:!0,get:function(){return a.CommaSep}}),Object.defineProperty(o,"SemiOp",{enumerable:!0,get:function(){return a.SemiOp}});var c=withLocation;Object.defineProperty(o,"codeGenWithLocation",{enumerable:!0,get:function(){return b(c).default}});var h=dist$4,d=b(h),g=tokenStream,_=b(e);function b(j){return j&&j.__esModule?j:{default:j}}function $(j){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new _.default,et=new g.TokenStream,tt=(0,d.default)(_e,j);return tt.emit(et),et.result}})(dist);const shiftCodegen=getDefaultExportFromCjs(dist);function bjorklund(o,e){for(var s=[],a=[],c=[e],h=o-e,d=0,g=function(_){if(_==-1)s.push(0);else if(_==-2)s.push(1);else{for(var b=0;b<a[_];b++)g(_-1);c[_]&&g(_-2)}};c[d]>1;)a.push(Math.floor(h/c[d])),c.push(h%c[d]),h=c[d],d++;return a.push(h),g(d),s.reverse()}var bjork=function(o,e){return o>e?bjorklund(o,e):bjorklund(e,o)};const euclid=(o,e,s=0)=>{const a=bjork(e,o);return s?rotate(a,-s):a};Pattern$3.prototype.euclid=function(o,e,s=0){return this.struct(euclid(o,e,s))};Pattern$3.prototype.euclidLegato=function(o,e,s=0){const a=euclid(o,e,s),c=a.indexOf(1),h=rotate(a,c).join("").split("1").slice(1).map(d=>[d.length+1,!0]);return this.struct(timeCat(...h)).late(fraction(c).div(e))};function steady(o){return new Pattern$3(e=>[new Hap(void 0,e.span,o)])}const signal=o=>{const e=s=>[new Hap(void 0,s.span,o(s.span.midpoint()))];return new Pattern$3(e)},isaw=signal(o=>1-o%1),isaw2=isaw._toBipolar(),saw=signal(o=>o%1),saw2=saw._toBipolar(),sine2=signal(o=>Math.sin(Math.PI*2*o)),sine=sine2._fromBipolar(),cosine=sine._early(fraction(1).div(4)),cosine2=sine2._early(fraction(1).div(4)),square=signal(o=>Math.floor(o*2%2)),square2=square._toBipolar(),tri=fastcat(isaw,saw),tri2=fastcat(isaw2,saw2),time=signal(id$1),xorwise=o=>{const e=o<<13^o,s=e>>17^e;return s<<5^s},_frac=o=>o-Math.trunc(o),timeToIntSeed=o=>xorwise(Math.trunc(_frac(o/300)*536870912)),intSeedToRand=o=>o%536870912/536870912,timeToRand=o=>Math.abs(intSeedToRand(timeToIntSeed(o))),rand=signal(timeToRand),rand2=rand._toBipolar(),_brandBy=o=>rand.fmap(e=>e<o),brandBy=o=>reify$1(o).fmap(_brandBy).innerJoin(),brand=_brandBy(.5),_irand=o=>rand.fmap(e=>Math.trunc(e*o)),irand=o=>reify$1(o).fmap(_irand).innerJoin(),__chooseWith=(o,e)=>(e=e.map(reify$1),e.length==0?silence:o.range(0,e.length).fmap(s=>e[Math.floor(s)])),chooseWith=(o,e)=>__chooseWith(o,e).outerJoin(),chooseInWith=(o,e)=>__chooseWith(o,e).innerJoin(),choose=(...o)=>chooseWith(rand,o);Pattern$3.prototype.choose=function(...o){return chooseWith(this,o)};Pattern$3.prototype.choose2=function(...o){return chooseWith(this._fromBipolar(),o)};const chooseCycles=(...o)=>chooseInWith(rand.segment(1),o),randcat=chooseCycles,_wchooseWith=function(o,...e){const s=e.map(g=>reify$1(g[0])),a=[];let c=0;for(const g of e)c+=g[1],a.push(c);const h=c,d=function(g){const _=g*h;return s[a.findIndex(b=>b>_,a)]};return o.fmap(d)},wchooseWith=(...o)=>_wchooseWith(...o).outerJoin(),wchoose=(...o)=>wchooseWith(rand,...o),wchooseCycles=(...o)=>_wchooseWith(rand,...o).innerJoin(),perlinWith=o=>{const e=o.fmap(Math.floor),s=o.fmap(h=>Math.floor(h)+1),a=h=>6*h**5-15*h**4+10*h**3,c=h=>d=>g=>d+a(h)*(g-d);return o.sub(e).fmap(c).appBoth(e.fmap(timeToRand)).appBoth(s.fmap(timeToRand))},perlin=perlinWith(time);Pattern$3.prototype._degradeByWith=function(o,e){return this.fmap(s=>a=>s).appLeft(o._filterValues(s=>s>e))};Pattern$3.prototype._degradeBy=function(o){return this._degradeByWith(rand,o)};Pattern$3.prototype.degrade=function(){return this._degradeBy(.5)};Pattern$3.prototype._undegradeBy=function(o){return this._degradeByWith(rand.fmap(e=>1-e),o)};Pattern$3.prototype.undegrade=function(){return this._undegradeBy(.5)};Pattern$3.prototype._sometimesBy=function(o,e){return stack(this._degradeBy(o),e(this._undegradeBy(1-o)))};Pattern$3.prototype.sometimesBy=function(o,e){const s=this;return reify$1(o).fmap(a=>s._sometimesBy(a,e)).innerJoin()};Pattern$3.prototype._sometimesByPre=function(o,e){return stack(this._degradeBy(o),e(this).undegradeBy(1-o))};Pattern$3.prototype.sometimesByPre=function(o,e){const s=this;return reify$1(o).fmap(a=>s._sometimesByPre(a,e)).innerJoin()};Pattern$3.prototype.sometimes=function(o){return this._sometimesBy(.5,o)};Pattern$3.prototype.sometimesPre=function(o){return this._sometimesByPre(.5,o)};Pattern$3.prototype._someCyclesBy=function(o,e){return stack(this._degradeByWith(rand._segment(1),o),e(this._degradeByWith(rand.fmap(s=>1-s)._segment(1),1-o)))};Pattern$3.prototype.someCyclesBy=function(o,e){const s=this;return reify$1(o).fmap(a=>s._someCyclesBy(a,e)).innerJoin()};Pattern$3.prototype.someCycles=function(o){return this._someCyclesBy(.5,o)};Pattern$3.prototype.often=function(o){return this.sometimesBy(.75,o)};Pattern$3.prototype.rarely=function(o){return this.sometimesBy(.25,o)};Pattern$3.prototype.almostNever=function(o){return this.sometimesBy(.1,o)};Pattern$3.prototype.almostAlways=function(o){return this.sometimesBy(.9,o)};Pattern$3.prototype.never=function(o){return this};Pattern$3.prototype.always=function(o){return o(this)};Pattern$3.prototype.patternified.push("degradeBy","undegradeBy");let synth;try{synth=window==null?void 0:window.speechSynthesis}catch{console.warn("cannot use window: not in browser?")}let allVoices=synth==null?void 0:synth.getVoices();function speak(o,e,s){synth.cancel();const a=new SpeechSynthesisUtterance(o);a.lang=e,allVoices=synth.getVoices();const c=allVoices.filter(h=>h.lang.includes(e));typeof s=="number"?a.voice=c[s%c.length]:typeof s=="string"&&(a.voice=c.find(h=>h.name===h)),speechSynthesis.speak(a)}Pattern$3.prototype._speak=function(o,e){return this._withHap(s=>{const a=(c,h)=>{speak(h.value,o,e)};return s.setContext({...s.context,onTrigger:a})})};Pattern$3.prototype.speak=function(o,e){return patternify2(Pattern$3.prototype._speak)(reify(o),reify(e),this)};const stringifyFunction=o=>"("+o+")();",urlifyFunction=o=>URL.createObjectURL(new Blob([stringifyFunction(o)],{type:"text/javascript"})),createWorker=o=>new Worker(urlifyFunction(o));class ClockWorker{constructor(e,s){Rt(this,"worker");Rt(this,"interval",1/20);Rt(this,"tick",0);this.interval=s||this.interval,this.worker=createWorker(()=>{let a,c=null;const h=()=>{c&&(clearInterval(c),c=null)},d=()=>{if(h(),!a)throw new Error("no interval set! call worker.postMessage({interval}) before starting.");postMessage("tick"),c=setInterval(()=>postMessage("tick"),a*1e3)};self.onmessage=function(g){g.data=="start"?d():g.data.interval?(a=g.data.interval,c&&d()):g.data=="stop"&&h()}}),this.setInterval(this.interval),this.worker.onmessage=a=>{a.data==="tick"&&e(this.tick++,this.interval)}}start(){this.worker.postMessage("start")}stop(){this.worker.postMessage("stop"),this.tick=0}setInterval(e){this.worker.postMessage({interval:e})}}class Scheduler{constructor({interval:e,onTrigger:s,onError:a,latency:c=.2,getTime:h}){Rt(this,"worker");Rt(this,"pattern");Rt(this,"started",!1);Rt(this,"phase",0);Rt(this,"cps",1);Rt(this,"getTime");Rt(this,"lastTime");this.worker=new ClockWorker((d,g)=>{try{const _=h();if(!this.lastTime){this.lastTime=_;return}const b=_-this.lastTime;this.lastTime=_;const $=this.phase,j=this.phase+b*this.cps;this.phase=j,this.pattern.queryArc($,j).forEach(et=>{var it,at;if(typeof((it=et.value)==null?void 0:it.cps)=="number"&&this.setCps((at=et.value)==null?void 0:at.cps),!et.part.begin.equals(et.whole.begin))return;const tt=_+(et.whole.begin-$)/this.cps-b+g+c,nt=et.duration/this.cps,st=h(),rt=tt-st;if(tt<st){console.warn(`deadline ${rt.toFixed(2)} is below zero! latency ${c}s, interval ${g}s`);return}s==null||s(et,rt,nt)})}catch(_){console.warn("scheduler error",_),a==null||a(_)}},e)}start(){if(!this.pattern)throw new Error("Scheduler: no pattern set! call .setPattern first.");this.worker.start(),this.started=!0}pause(){this.worker.stop(),delete this.lastTime,this.started=!1}stop(){this.phase=0,delete this.lastTime,this.worker.stop(),this.started=!1}setPattern(e){this.pattern=e}setCps(e=1){this.cps=e}log(e,s,a){const c=a.filter(h=>h.hasOnset());console.log(`${e.toFixed(4)} - ${s.toFixed(4)} ${Array(c.length).fill("I").join("")}`)}}const gist=(route,cache=!0)=>fetch(`https://gist.githubusercontent.com/${route}?cachebust=${cache?"":Date.now()}`).then(o=>o.text()).then(code=>eval(code));console.log("%c // \u{1F300} @strudel.cycles/core loaded \u{1F300}","background-color: black;color:white;padding:4px;border-radius:15px");globalThis._strudelLoaded&&console.warn(`@strudel.cycles/core was loaded more than once...
|
||
This might happen when you have multiple versions of strudel installed.
|
||
Please check with "npm ls @strudel.cycles/core".`);globalThis._strudelLoaded=!0;const strudel=Object.freeze(Object.defineProperty({__proto__:null,Fraction:fraction,gist,Hap,Pattern:Pattern$3,silence,pure,isPattern:isPattern$1,reify:reify$1,stack,slowcat,slowcatPrime,fastcat,cat,timeCat,sequence,seq:seq$2,polymeterSteps,polymeter,pm,polyrhythm,pr,add:add$1,chop,chunk,chunkBack,div,early,echo,every,fast,inv,invert,iter,iterBack,jux,juxBy,late,linger,mask,mul,off,ply,range,range2,rev,slow,struct,sub,superimpose,set,when,makeComposable,patternify2,patternify3,patternify4,steady,signal,isaw,isaw2,saw,saw2,sine2,sine,cosine,cosine2,square,square2,tri,tri2,time,rand,rand2,_brandBy,brandBy,brand,_irand,irand,__chooseWith,chooseWith,chooseInWith,choose,chooseCycles,randcat,wchoose,wchooseCycles,perlinWith,perlin,State,TimeSpan,isNote:isNote$1,tokenizeNote,toMidi,fromMidi,getFreq,midi2note,mod,getPlayableNoteValue,getFrequency,rotate,pipe,compose,removeUndefineds,flatten:flatten$1,id:id$1,constant,listRange,curry,ClockWorker,Scheduler},Symbol.toStringTag,{value:"Module"})),{replace}=estraverse,codegen=shiftCodegen.default||shiftCodegen,{Pattern:Pattern$2}=strudel,isNote=o=>/^[a-gC-G][bs]?[0-9]$/.test(o),shapeshifter=o=>{const{code:e,addReturn:s}=wrapAsync(o),a=dist$7.parseScriptWithLocation(disguiseImports(e)),c=[],h=[],d=replace(a.tree,{enter(_,b){var et,tt,nt;if(h.push(b),h.some(st=>c.includes(st)))return _;if(isBackTickString(_))return minifyWithLocation(_,_,a.locations,c);if(((et=_.directives)==null?void 0:et.length)===1&&!((tt=_.statements)!=null&&tt.length)){const st=new LiteralStringExpression_1({value:_.directives[0].rawValue}),rt=minifyWithLocation(st,_.directives[0],a.locations,c);return{..._,directives:[],statements:[rt]}}if(isStringWithDoubleQuotes(_,a.locations,e))return minifyWithLocation(_,_,a.locations,c);const j={"*":"fast","/":"slow","&":"stack","&&":"append"};if(_.type==="BinaryExpression"&&j[_.operator]&&["LiteralNumericExpression","LiteralStringExpression","IdentifierExpression"].includes((nt=_.right)==null?void 0:nt.type)&&canBeOverloaded(_.left)){let st=_.left;return _.left.type==="IdentifierExpression"&&(st=wrapFunction("reify",_.left)),new CallExpression_1({callee:new StaticMemberExpression_1({property:j[_.operator],object:wrapFunction("reify",st)}),arguments:[_.right]})}const _e=isPatternArg(h)||hasModifierCall(b);if(_.type==="CallExpression"&&_.callee.name==="pure"){const st=_.arguments[0];return reifyWithLocation(st,_.arguments[0],a.locations,c)}if(_.type==="IdentifierExpression"){if(isNote(_.name)){const st=_.name[1]==="s"?_.name.replace("s","#"):_.name;return _e?reifyWithLocation(new LiteralStringExpression_1({value:st}),_,a.locations,c):new LiteralStringExpression_1({value:st})}if(_.name==="r")return new IdentifierExpression_1({name:"silence"})}return["LiteralStringExpression"].includes(_.type)&&_e?reifyWithLocation(_,_,a.locations,c):addMiniNotationLocations(_,a.locations,c)},leave(){h.pop()}});return s(d),undisguiseImports(codegen(d))};function disguiseImports(o){return o.replaceAll("import","_mport")}function undisguiseImports(o){return o.replaceAll("_mport","import")}function wrapAsync(o){return o=`(async () => {
|
||
${o}
|
||
})()`,{code:o,addReturn:s=>{const a=s.statements[0].expression.callee.body;a.statements=a.statements.slice(0,-1).concat([new ReturnStatement_1({expression:a.statements.slice(-1)[0]})])}}}function addMiniNotationLocations(o,e,s){const a=["mini","m"];if(o.type==="CallExpression"&&a.includes(o.callee.name)){if(o.arguments.length>1)return console.warn("multi arg mini locations not supported yet..."),o;const c=o.arguments[0];return minifyWithLocation(c,c,e,s)}return o.type==="StaticMemberExpression"&&a.includes(o.property)?minifyWithLocation(o.object,o,e,s):o}function wrapFunction(o,...e){return new CallExpression_1({callee:new IdentifierExpression_1({name:o}),arguments:e})}function isBackTickString(o){return o.type==="TemplateExpression"&&o.elements.length===1}function isStringWithDoubleQuotes(o,e,s){if(o.type!=="LiteralStringExpression")return!1;const a=e.get(o);return s.slice(a.start.offset,a.end.offset)[0]==='"'}function isPatternArg(o){if(!o.length)return!1;const e=o.slice(0,-1),s=o[o.length-1];return isPatternFactory(s)?!0:(s==null?void 0:s.type)==="ArrayExpression"?isPatternArg(e):!1}function hasModifierCall(o){return(o==null?void 0:o.type)==="StaticMemberExpression"&&Object.keys(Pattern$2.prototype.composable).includes(o.property)}const factories=Object.keys(Pattern$2.prototype.factories).concat(["mini"]);function isPatternFactory(o){return(o==null?void 0:o.type)==="CallExpression"&&factories.includes(o.callee.name)}function canBeOverloaded(o){return o.type==="IdentifierExpression"&&isNote(o.name)||isPatternFactory(o)}function reifyWithLocation(o,e,s,a){const c=getLocationArguments(e,s),h=new CallExpression_1({callee:new StaticMemberExpression_1({object:wrapFunction("reify",o),property:"withLocation"}),arguments:c});return a.push(h),h}function minifyWithLocation(o,e,s,a){const c=getLocationArguments(e,s),h=wrapFunction("mini",o),d=new CallExpression_1({callee:new StaticMemberExpression_1({object:h,property:"withMiniLocation"}),arguments:c});return a.push(d),d}function getLocationArguments(o,e){const s=e.get(o),a=-1;return[new ArrayExpression_1({elements:[new LiteralNumericExpression_1({value:s.start.line+a}),new LiteralNumericExpression_1({value:s.start.column}),new LiteralNumericExpression_1({value:s.start.offset})]}),new ArrayExpression_1({elements:[new LiteralNumericExpression_1({value:s.end.line+a}),new LiteralNumericExpression_1({value:s.end.column}),new LiteralNumericExpression_1({value:s.end.offset})]})]}const{isPattern,Pattern:Pattern$1}=strudel;let scoped=!1;const evalScope=async(...o)=>{scoped&&console.warn("@strudel.cycles/eval evalScope was called more than once."),scoped=!0;const e=await Promise.allSettled(o),s=e.filter(a=>a.status==="fulfilled").map(a=>a.value);e.forEach((a,c)=>{a.status==="rejected"&&console.warn(`evalScope: module with index ${c} could not be loaded:`,a.reason)}),Object.assign(globalThis,...s,Pattern$1.prototype.bootstrap())};function safeEval(o){return Function('"use strict";return ('+o+")")()}const evaluate=async o=>{scoped||await evalScope();const e=shapeshifter(o);let s=await safeEval(e);if(!isPattern(s)){console.log("evaluated",s);const a=`got "${typeof s}" instead of pattern`;throw new Error(a+(typeof s=="function"?", did you forget to call a function?":"."))}return{mode:"javascript",pattern:s}},bufferCache={},loadCache={},getCachedBuffer=o=>bufferCache[o],loadBuffer=(o,e)=>(loadCache[o]||(loadCache[o]=fetch(o).then(s=>s.arrayBuffer()).then(async s=>{const a=await e.decodeAudioData(s);return bufferCache[o]=a,a})),loadCache[o]),getLoadedBuffer=o=>bufferCache[o],githubCache={};let sampleCache={current:void 0};const loadGithubSamples=async(o,e)=>{const s="loadGithubSamples "+o,a=localStorage.getItem(s);if(a&&(console.log("[sampler]: loaded sample list from localstorage",o),githubCache[o]=JSON.parse(a)),githubCache[o])return sampleCache.current=githubCache[o],githubCache[o];console.log("[sampler]: fetching sample list from github",o);try{const[c,h,...d]=o.split("/"),g=`https://api.github.com/repos/${c}/${h}/contents`,_=await fetch(`${g}/${d.join("/")}`).then(b=>b.json());githubCache[o]=(await Promise.all(_.map(async({name:b,path:$})=>({name:b,content:await fetch(`${g}/${$}`).then(j=>j.json()).catch(j=>{console.error("could not load path",j)})})))).filter(({content:b})=>!!b).reduce((b,{name:$,content:j})=>({...b,[(e==null?void 0:e($))||$]:j.map(({download_url:_e})=>_e)}),{})}catch(c){console.error("[sampler]: failed to fetch sample list from github",c);return}return sampleCache.current=githubCache[o],localStorage.setItem(s,JSON.stringify(sampleCache.current)),console.log("[sampler]: loaded samples:",sampleCache.current),githubCache[o]},samples=(o,e=o._base||"")=>{sampleCache.current={...sampleCache.current,...Object.fromEntries(Object.entries(o).map(([s,a])=>{if(typeof a=="string"&&(a=[a]),typeof a!="object")throw new Error("wrong sample map format for "+s);e=a._base||e;const c=h=>(e+h).replace("github:","https://raw.githubusercontent.com/");return Array.isArray(a)?[s,a.map(c)]:[s,Object.fromEntries(Object.entries(a).map(([h,d])=>[h,(typeof d=="string"?[d]:d).map(c)]))]}))}},resetLoadedSamples=()=>{sampleCache.current=void 0},getLoadedSamples$1=()=>sampleCache.current,{Pattern}=strudel;let audioContext;const getAudioContext=()=>(audioContext||(audioContext=new AudioContext),audioContext);let destination;const getDestination=()=>{const o=getAudioContext();return destination||(destination=o.createGain(),destination.connect(o.destination)),destination},panic=()=>{getDestination().gain.linearRampToValueAtTime(0,getAudioContext().currentTime+.01),destination=null},getFilter=(o,e,s)=>{const a=getAudioContext().createBiquadFilter();return a.type=o,a.frequency.value=e,a.Q.value=s,a},getADSR=(o,e,s,a,c,h,d)=>{const g=getAudioContext().createGain();return g.gain.setValueAtTime(0,h),g.gain.linearRampToValueAtTime(c,h+o),g.gain.linearRampToValueAtTime(s*c,h+o+e),g.gain.setValueAtTime(s*c,d),g.gain.linearRampToValueAtTime(0,d+a),g},getOscillator=({s:o,freq:e,t:s,duration:a,release:c})=>{const h=getAudioContext().createOscillator();return h.type=o||"triangle",h.frequency.value=Number(e),h.start(s),h.stop(s+a+c),h},getSoundfontKey=o=>{var a,c,h,d;if(!globalThis.soundfontList)return!1;if((c=(a=globalThis.soundfontList)==null?void 0:a.instruments)!=null&&c.includes(o))return o;const e=(d=(h=globalThis.soundfontList)==null?void 0:h.instrumentNames)==null?void 0:d.indexOf(o),s=e<10?`00${e}`:e<100?`0${e}`:e;if(e!==-1)return globalThis.soundfontList.instruments.find(g=>g.startsWith(s))},getSampleBufferSource=async(o,e,s)=>{let a=0;s&&(a=toMidi(s)-36);const c=getAudioContext(),h=getLoadedSamples();if(!h)throw new Error("no samples loaded");const d=h==null?void 0:h[o];if(!d)throw new Error(`sample not found: "${o}", try one of ${Object.keys(h).join(", ")}`);if(typeof d!="object")throw new Error("wrong format for sample bank:",o);let g;if(Array.isArray(d))g=d[e%d.length];else{if(!s)throw new Error("no note(...) set for sound",o);const j=et=>toMidi(et)-toMidi(s),_e=Object.keys(d).filter(et=>!et.startsWith("_")).reduce((et,tt,nt)=>!et||Math.abs(j(tt))<Math.abs(j(et))?tt:et,null);a=-j(_e),g=d[_e][e%d[_e].length]}const _=await loadBuffer(g,c),b=c.createBufferSource();b.buffer=_;const $=1*Math.pow(2,a/12);return b.playbackRate.value=$,b},splitSN=(o,e)=>{if(!o.includes(":"))return[o,e];let[s,a]=o.split(":");return isNaN(Number(a))?[o,e]:[s,a]},webaudioOutput=async(o,e,s)=>{try{const a=getAudioContext();if(typeof o.value!="object")throw new Error(`hap.value ${o.value} is not supported by webaudio output. Hint: append .note() or .s() to the end`);const c=a.currentTime+e;let{freq:h,s:d,sf:g,clip:_=0,n:b=0,note:$,gain:j=1,cutoff:_e,resonance:et=1,hcutoff:tt,hresonance:nt=1,bandf:st,bandq:rt=1,pan:it,attack:at=.001,decay:ot=.05,sustain:ut=.5,release:ct=.001,speed:ht=1,begin:lt=0,end:pt=1}=o.value;const{velocity:ft=1}=o.context;j*=ft;const gt=[];if(typeof d=="string"&&([d,b]=splitSN(d,b)),typeof $=="string"&&([$,b]=splitSN($,b)),!d||["sine","square","triangle","sawtooth"].includes(d)){b=$||b,typeof b=="string"&&(b=toMidi(b)),!h&&typeof b=="number"&&(h=fromMidi(b));const mt=getOscillator({t:c,s:d,freq:h,duration:s,release:ct});gt.push(mt);const Et=a.createGain();Et.gain.value=.3,gt.push(Et);const Ot=getADSR(at,ot,ut,ct,1,c,c+s);gt.push(Ot)}else{if(ht===0)return;if(!d){console.warn("no sample specified");return}const mt=getSoundfontKey(d);let Et;try{mt?Et=await globalThis.getFontBufferSource(mt,$||b,a):Et=await getSampleBufferSource(d,b,$)}catch(At){console.warn(At);return}if(a.currentTime>c){console.warn("sample still loading:",d,b);return}if(!Et){console.warn("no buffer source");return}Et.playbackRate.value=Math.abs(ht)*Et.playbackRate.value;let Ot=mt||_?s:Et.buffer.duration;const St=lt*Ot;if(Ot=(pt-lt)*Ot/Math.abs(ht),mt||_?Et.start(c,St):Et.start(c,St,Ot),gt.push(Et),mt||_){const At=a.createGain(),dt=.1;At.gain.value=.6,At.gain.setValueAtTime(At.gain.value,c+Ot),At.gain.linearRampToValueAtTime(0,c+Ot+dt),gt.push(At),Et.stop(c+Ot+dt)}else Et.stop(c+Ot)}const yt=a.createGain();if(yt.gain.value=j,gt.push(yt),_e!==void 0&>.push(getFilter("lowpass",_e,et)),tt!==void 0&>.push(getFilter("highpass",tt,nt)),st!==void 0&>.push(getFilter("bandpass",st,rt)),it!==void 0){const mt=a.createStereoPanner();mt.pan.value=2*it-1,gt.push(mt)}gt.push(getDestination()),gt.slice(1).reduce((mt,Et)=>mt.connect(Et),gt[0])}catch(a){console.warn(".out error:",a)}};Pattern.prototype.out=function(){return this.onTrigger((o,e,s,a)=>webaudioOutput(e,o-s,e.duration/a))};function _extends(){return _extends=Object.assign?Object.assign.bind():function(o){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=s[a])}return o},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(o,e){if(o==null)return{};var s={},a=Object.keys(o),c,h;for(h=0;h<a.length;h++)c=a[h],!(e.indexOf(c)>=0)&&(s[c]=o[c]);return s}class Text{constructor(){}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,s,a){let c=[];return this.decompose(0,e,c,2),a.length&&a.decompose(0,a.length,c,3),this.decompose(s,this.length,c,1),TextNode.from(c,this.length-(s-e)+a.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,s=this.length){let a=[];return this.decompose(e,s,a,0),TextNode.from(a,s-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let s=this.scanIdentical(e,1),a=this.length-this.scanIdentical(e,-1),c=new RawTextCursor(this),h=new RawTextCursor(e);for(let d=s,g=s;;){if(c.next(d),h.next(d),d=0,c.lineBreak!=h.lineBreak||c.done!=h.done||c.value!=h.value)return!1;if(g+=c.value.length,c.done||g>=a)return!0}}iter(e=1){return new RawTextCursor(this,e)}iterRange(e,s=this.length){return new PartialTextCursor(this,e,s)}iterLines(e,s){let a;if(e==null)a=this.iter();else{s==null&&(s=this.lines+1);let c=this.line(e).from;a=this.iterRange(c,Math.max(c,s==this.lines+1?this.length:s<=1?0:this.line(s-1).to))}return new LineCursor(a)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Text.empty:e.length<=32?new TextLeaf(e):TextNode.from(TextLeaf.split(e,[]))}}class TextLeaf extends Text{constructor(e,s=textLength(e)){super(),this.text=e,this.length=s}get lines(){return this.text.length}get children(){return null}lineInner(e,s,a,c){for(let h=0;;h++){let d=this.text[h],g=c+d.length;if((s?a:g)>=e)return new Line(c,g,a,d);c=g+1,a++}}decompose(e,s,a,c){let h=e<=0&&s>=this.length?this:new TextLeaf(sliceText(this.text,e,s),Math.min(s,this.length)-Math.max(0,e));if(c&1){let d=a.pop(),g=appendText(h.text,d.text.slice(),0,h.length);if(g.length<=32)a.push(new TextLeaf(g,d.length+h.length));else{let _=g.length>>1;a.push(new TextLeaf(g.slice(0,_)),new TextLeaf(g.slice(_)))}}else a.push(h)}replace(e,s,a){if(!(a instanceof TextLeaf))return super.replace(e,s,a);let c=appendText(this.text,appendText(a.text,sliceText(this.text,0,e)),s),h=this.length+a.length-(s-e);return c.length<=32?new TextLeaf(c,h):TextNode.from(TextLeaf.split(c,[]),h)}sliceString(e,s=this.length,a=`
|
||
`){let c="";for(let h=0,d=0;h<=s&&d<this.text.length;d++){let g=this.text[d],_=h+g.length;h>e&&d&&(c+=a),e<_&&s>h&&(c+=g.slice(Math.max(0,e-h),s-h)),h=_+1}return c}flatten(e){for(let s of this.text)e.push(s)}scanIdentical(){return 0}static split(e,s){let a=[],c=-1;for(let h of e)a.push(h),c+=h.length+1,a.length==32&&(s.push(new TextLeaf(a,c)),a=[],c=-1);return c>-1&&s.push(new TextLeaf(a,c)),s}}class TextNode extends Text{constructor(e,s){super(),this.children=e,this.length=s,this.lines=0;for(let a of e)this.lines+=a.lines}lineInner(e,s,a,c){for(let h=0;;h++){let d=this.children[h],g=c+d.length,_=a+d.lines-1;if((s?_:g)>=e)return d.lineInner(e,s,a,c);c=g+1,a=_+1}}decompose(e,s,a,c){for(let h=0,d=0;d<=s&&h<this.children.length;h++){let g=this.children[h],_=d+g.length;if(e<=_&&s>=d){let b=c&((d<=e?1:0)|(_>=s?2:0));d>=e&&_<=s&&!b?a.push(g):g.decompose(e-d,s-d,a,b)}d=_+1}}replace(e,s,a){if(a.lines<this.lines)for(let c=0,h=0;c<this.children.length;c++){let d=this.children[c],g=h+d.length;if(e>=h&&s<=g){let _=d.replace(e-h,s-h,a),b=this.lines-d.lines+_.lines;if(_.lines<b>>5-1&&_.lines>b>>5+1){let $=this.children.slice();return $[c]=_,new TextNode($,this.length-(s-e)+a.length)}return super.replace(h,g,_)}h=g+1}return super.replace(e,s,a)}sliceString(e,s=this.length,a=`
|
||
`){let c="";for(let h=0,d=0;h<this.children.length&&d<=s;h++){let g=this.children[h],_=d+g.length;d>e&&h&&(c+=a),e<_&&s>d&&(c+=g.sliceString(e-d,s-d,a)),d=_+1}return c}flatten(e){for(let s of this.children)s.flatten(e)}scanIdentical(e,s){if(!(e instanceof TextNode))return 0;let a=0,[c,h,d,g]=s>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;c+=s,h+=s){if(c==d||h==g)return a;let _=this.children[c],b=e.children[h];if(_!=b)return a+_.scanIdentical(b,s);a+=_.length+1}}static from(e,s=e.reduce((a,c)=>a+c.length+1,-1)){let a=0;for(let et of e)a+=et.lines;if(a<32){let et=[];for(let tt of e)tt.flatten(et);return new TextLeaf(et,s)}let c=Math.max(32,a>>5),h=c<<1,d=c>>1,g=[],_=0,b=-1,$=[];function j(et){let tt;if(et.lines>h&&et instanceof TextNode)for(let nt of et.children)j(nt);else et.lines>d&&(_>d||!_)?(_e(),g.push(et)):et instanceof TextLeaf&&_&&(tt=$[$.length-1])instanceof TextLeaf&&et.lines+tt.lines<=32?(_+=et.lines,b+=et.length+1,$[$.length-1]=new TextLeaf(tt.text.concat(et.text),tt.length+1+et.length)):(_+et.lines>c&&_e(),_+=et.lines,b+=et.length+1,$.push(et))}function _e(){_!=0&&(g.push($.length==1?$[0]:TextNode.from($,b)),b=-1,_=$.length=0)}for(let et of e)j(et);return _e(),g.length==1?g[0]:new TextNode(g,s)}}Text.empty=new TextLeaf([""],0);function textLength(o){let e=-1;for(let s of o)e+=s.length+1;return e}function appendText(o,e,s=0,a=1e9){for(let c=0,h=0,d=!0;h<o.length&&c<=a;h++){let g=o[h],_=c+g.length;_>=s&&(_>a&&(g=g.slice(0,a-c)),c<s&&(g=g.slice(s-c)),d?(e[e.length-1]+=g,d=!1):e.push(g)),c=_+1}return e}function sliceText(o,e,s){return appendText(o,[""],e,s)}class RawTextCursor{constructor(e,s=1){this.dir=s,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[s>0?1:(e instanceof TextLeaf?e.text.length:e.children.length)<<1]}nextInner(e,s){for(this.done=this.lineBreak=!1;;){let a=this.nodes.length-1,c=this.nodes[a],h=this.offsets[a],d=h>>1,g=c instanceof TextLeaf?c.text.length:c.children.length;if(d==(s>0?g:0)){if(a==0)return this.done=!0,this.value="",this;s>0&&this.offsets[a-1]++,this.nodes.pop(),this.offsets.pop()}else if((h&1)==(s>0?0:1)){if(this.offsets[a]+=s,e==0)return this.lineBreak=!0,this.value=`
|
||
`,this;e--}else if(c instanceof TextLeaf){let _=c.text[d+(s<0?-1:0)];if(this.offsets[a]+=s,_.length>Math.max(0,e))return this.value=e==0?_:s>0?_.slice(e):_.slice(0,_.length-e),this;e-=_.length}else{let _=c.children[d+(s<0?-1:0)];e>_.length?(e-=_.length,this.offsets[a]+=s):(s<0&&this.offsets[a]--,this.nodes.push(_),this.offsets.push(s>0?1:(_ instanceof TextLeaf?_.text.length:_.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class PartialTextCursor{constructor(e,s,a){this.value="",this.done=!1,this.cursor=new RawTextCursor(e,s>a?-1:1),this.pos=s>a?e.length:0,this.from=Math.min(s,a),this.to=Math.max(s,a)}nextInner(e,s){if(s<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,s<0?this.pos-this.to:this.from-this.pos);let a=s<0?this.pos-this.from:this.to-this.pos;e>a&&(e=a),a-=e;let{value:c}=this.cursor.next(e);return this.pos+=(c.length+e)*s,this.value=c.length<=a?c:s<0?c.slice(c.length-a):c.slice(0,a),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 LineCursor{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:s,lineBreak:a,value:c}=this.inner.next(e);return s?(this.done=!0,this.value=""):a?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=c,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Text.prototype[Symbol.iterator]=function(){return this.iter()},RawTextCursor.prototype[Symbol.iterator]=PartialTextCursor.prototype[Symbol.iterator]=LineCursor.prototype[Symbol.iterator]=function(){return this});class Line{constructor(e,s,a,c){this.from=e,this.to=s,this.number=a,this.text=c}get length(){return this.to-this.from}}let extend="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(o=>o?parseInt(o,36):1);for(let o=1;o<extend.length;o++)extend[o]+=extend[o-1];function isExtendingChar(o){for(let e=1;e<extend.length;e+=2)if(extend[e]>o)return extend[e-1]<=o;return!1}function isRegionalIndicator(o){return o>=127462&&o<=127487}const ZWJ=8205;function findClusterBreak(o,e,s=!0,a=!0){return(s?nextClusterBreak:prevClusterBreak)(o,e,a)}function nextClusterBreak(o,e,s){if(e==o.length)return e;e&&surrogateLow(o.charCodeAt(e))&&surrogateHigh(o.charCodeAt(e-1))&&e--;let a=codePointAt(o,e);for(e+=codePointSize(a);e<o.length;){let c=codePointAt(o,e);if(a==ZWJ||c==ZWJ||s&&isExtendingChar(c))e+=codePointSize(c),a=c;else if(isRegionalIndicator(c)){let h=0,d=e-2;for(;d>=0&&isRegionalIndicator(codePointAt(o,d));)h++,d-=2;if(h%2==0)break;e+=2}else break}return e}function prevClusterBreak(o,e,s){for(;e>0;){let a=nextClusterBreak(o,e-2,s);if(a<e)return a;e--}return 0}function surrogateLow(o){return o>=56320&&o<57344}function surrogateHigh(o){return o>=55296&&o<56320}function codePointAt(o,e){let s=o.charCodeAt(e);if(!surrogateHigh(s)||e+1==o.length)return s;let a=o.charCodeAt(e+1);return surrogateLow(a)?(s-55296<<10)+(a-56320)+65536:s}function fromCodePoint(o){return o<=65535?String.fromCharCode(o):(o-=65536,String.fromCharCode((o>>10)+55296,(o&1023)+56320))}function codePointSize(o){return o<65536?1:2}const DefaultSplit=/\r\n?|\n/;var MapMode=function(o){return o[o.Simple=0]="Simple",o[o.TrackDel=1]="TrackDel",o[o.TrackBefore=2]="TrackBefore",o[o.TrackAfter=3]="TrackAfter",o}(MapMode||(MapMode={}));class ChangeDesc{constructor(e){this.sections=e}get length(){let e=0;for(let s=0;s<this.sections.length;s+=2)e+=this.sections[s];return e}get newLength(){let e=0;for(let s=0;s<this.sections.length;s+=2){let a=this.sections[s+1];e+=a<0?this.sections[s]:a}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let s=0,a=0,c=0;s<this.sections.length;){let h=this.sections[s++],d=this.sections[s++];d<0?(e(a,c,h),c+=h):c+=d,a+=h}}iterChangedRanges(e,s=!1){iterChanges(this,e,s)}get invertedDesc(){let e=[];for(let s=0;s<this.sections.length;){let a=this.sections[s++],c=this.sections[s++];c<0?e.push(a,c):e.push(c,a)}return new ChangeDesc(e)}composeDesc(e){return this.empty?e:e.empty?this:composeSets(this,e)}mapDesc(e,s=!1){return e.empty?this:mapSet(this,e,s)}mapPos(e,s=-1,a=MapMode.Simple){let c=0,h=0;for(let d=0;d<this.sections.length;){let g=this.sections[d++],_=this.sections[d++],b=c+g;if(_<0){if(b>e)return h+(e-c);h+=g}else{if(a!=MapMode.Simple&&b>=e&&(a==MapMode.TrackDel&&c<e&&b>e||a==MapMode.TrackBefore&&c<e||a==MapMode.TrackAfter&&b>e))return null;if(b>e||b==e&&s<0&&!g)return e==c||s<0?h:h+_;h+=_}c=b}if(e>c)throw new RangeError(`Position ${e} is out of range for changeset of length ${c}`);return h}touchesRange(e,s=e){for(let a=0,c=0;a<this.sections.length&&c<=s;){let h=this.sections[a++],d=this.sections[a++],g=c+h;if(d>=0&&c<=s&&g>=e)return c<e&&g>s?"cover":!0;c=g}return!1}toString(){let e="";for(let s=0;s<this.sections.length;){let a=this.sections[s++],c=this.sections[s++];e+=(e?" ":"")+a+(c>=0?":"+c:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(s=>typeof s!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ChangeDesc(e)}static create(e){return new ChangeDesc(e)}}class ChangeSet extends ChangeDesc{constructor(e,s){super(e),this.inserted=s}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return iterChanges(this,(s,a,c,h,d)=>e=e.replace(c,c+(a-s),d),!1),e}mapDesc(e,s=!1){return mapSet(this,e,s,!0)}invert(e){let s=this.sections.slice(),a=[];for(let c=0,h=0;c<s.length;c+=2){let d=s[c],g=s[c+1];if(g>=0){s[c]=g,s[c+1]=d;let _=c>>1;for(;a.length<_;)a.push(Text.empty);a.push(d?e.slice(h,h+d):Text.empty)}h+=d}return new ChangeSet(s,a)}compose(e){return this.empty?e:e.empty?this:composeSets(this,e,!0)}map(e,s=!1){return e.empty?this:mapSet(this,e,s,!0)}iterChanges(e,s=!1){iterChanges(this,e,s)}get desc(){return ChangeDesc.create(this.sections)}filter(e){let s=[],a=[],c=[],h=new SectionIter(this);e:for(let d=0,g=0;;){let _=d==e.length?1e9:e[d++];for(;g<_||g==_&&h.len==0;){if(h.done)break e;let $=Math.min(h.len,_-g);addSection(c,$,-1);let j=h.ins==-1?-1:h.off==0?h.ins:0;addSection(s,$,j),j>0&&addInsert(a,s,h.text),h.forward($),g+=$}let b=e[d++];for(;g<b;){if(h.done)break e;let $=Math.min(h.len,b-g);addSection(s,$,-1),addSection(c,$,h.ins==-1?-1:h.off==0?h.ins:0),h.forward($),g+=$}}return{changes:new ChangeSet(s,a),filtered:ChangeDesc.create(c)}}toJSON(){let e=[];for(let s=0;s<this.sections.length;s+=2){let a=this.sections[s],c=this.sections[s+1];c<0?e.push(a):c==0?e.push([a]):e.push([a].concat(this.inserted[s>>1].toJSON()))}return e}static of(e,s,a){let c=[],h=[],d=0,g=null;function _($=!1){if(!$&&!c.length)return;d<s&&addSection(c,s-d,-1);let j=new ChangeSet(c,h);g=g?g.compose(j.map(g)):j,c=[],h=[],d=0}function b($){if(Array.isArray($))for(let j of $)b(j);else if($ instanceof ChangeSet){if($.length!=s)throw new RangeError(`Mismatched change set length (got ${$.length}, expected ${s})`);_(),g=g?g.compose($.map(g)):$}else{let{from:j,to:_e=j,insert:et}=$;if(j>_e||j<0||_e>s)throw new RangeError(`Invalid change range ${j} to ${_e} (in doc of length ${s})`);let tt=et?typeof et=="string"?Text.of(et.split(a||DefaultSplit)):et:Text.empty,nt=tt.length;if(j==_e&&nt==0)return;j<d&&_(),j>d&&addSection(c,j-d,-1),addSection(c,_e-j,nt),addInsert(h,c,tt),d=_e}}return b(e),_(!g),g}static empty(e){return new ChangeSet(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let s=[],a=[];for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="number")s.push(h,-1);else{if(!Array.isArray(h)||typeof h[0]!="number"||h.some((d,g)=>g&&typeof d!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(h.length==1)s.push(h[0],0);else{for(;a.length<c;)a.push(Text.empty);a[c]=Text.of(h.slice(1)),s.push(h[0],a[c].length)}}}return new ChangeSet(s,a)}static createSet(e,s){return new ChangeSet(e,s)}}function addSection(o,e,s,a=!1){if(e==0&&s<=0)return;let c=o.length-2;c>=0&&s<=0&&s==o[c+1]?o[c]+=e:e==0&&o[c]==0?o[c+1]+=s:a?(o[c]+=e,o[c+1]+=s):o.push(e,s)}function addInsert(o,e,s){if(s.length==0)return;let a=e.length-2>>1;if(a<o.length)o[o.length-1]=o[o.length-1].append(s);else{for(;o.length<a;)o.push(Text.empty);o.push(s)}}function iterChanges(o,e,s){let a=o.inserted;for(let c=0,h=0,d=0;d<o.sections.length;){let g=o.sections[d++],_=o.sections[d++];if(_<0)c+=g,h+=g;else{let b=c,$=h,j=Text.empty;for(;b+=g,$+=_,_&&a&&(j=j.append(a[d-2>>1])),!(s||d==o.sections.length||o.sections[d+1]<0);)g=o.sections[d++],_=o.sections[d++];e(c,b,h,$,j),c=b,h=$}}}function mapSet(o,e,s,a=!1){let c=[],h=a?[]:null,d=new SectionIter(o),g=new SectionIter(e);for(let _=-1;;)if(d.ins==-1&&g.ins==-1){let b=Math.min(d.len,g.len);addSection(c,b,-1),d.forward(b),g.forward(b)}else if(g.ins>=0&&(d.ins<0||_==d.i||d.off==0&&(g.len<d.len||g.len==d.len&&!s))){let b=g.len;for(addSection(c,g.ins,-1);b;){let $=Math.min(d.len,b);d.ins>=0&&_<d.i&&d.len<=$&&(addSection(c,0,d.ins),h&&addInsert(h,c,d.text),_=d.i),d.forward($),b-=$}g.next()}else if(d.ins>=0){let b=0,$=d.len;for(;$;)if(g.ins==-1){let j=Math.min($,g.len);b+=j,$-=j,g.forward(j)}else if(g.ins==0&&g.len<$)$-=g.len,g.next();else break;addSection(c,b,_<d.i?d.ins:0),h&&_<d.i&&addInsert(h,c,d.text),_=d.i,d.forward(d.len-$)}else{if(d.done&&g.done)return h?ChangeSet.createSet(c,h):ChangeDesc.create(c);throw new Error("Mismatched change set lengths")}}function composeSets(o,e,s=!1){let a=[],c=s?[]:null,h=new SectionIter(o),d=new SectionIter(e);for(let g=!1;;){if(h.done&&d.done)return c?ChangeSet.createSet(a,c):ChangeDesc.create(a);if(h.ins==0)addSection(a,h.len,0,g),h.next();else if(d.len==0&&!d.done)addSection(a,0,d.ins,g),c&&addInsert(c,a,d.text),d.next();else{if(h.done||d.done)throw new Error("Mismatched change set lengths");{let _=Math.min(h.len2,d.len),b=a.length;if(h.ins==-1){let $=d.ins==-1?-1:d.off?0:d.ins;addSection(a,_,$,g),c&&$&&addInsert(c,a,d.text)}else d.ins==-1?(addSection(a,h.off?0:h.len,_,g),c&&addInsert(c,a,h.textBit(_))):(addSection(a,h.off?0:h.len,d.off?0:d.ins,g),c&&!d.off&&addInsert(c,a,d.text));g=(h.ins>_||d.ins>=0&&d.len>_)&&(g||a.length>b),h.forward2(_),d.forward(_)}}}}class SectionIter{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,s=this.i-2>>1;return s>=e.length?Text.empty:e[s]}textBit(e){let{inserted:s}=this.set,a=this.i-2>>1;return a>=s.length&&!e?Text.empty:s[a].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 SelectionRange{constructor(e,s,a){this.from=e,this.to=s,this.flags=a}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,s=-1){let a,c;return this.empty?a=c=e.mapPos(this.from,s):(a=e.mapPos(this.from,1),c=e.mapPos(this.to,-1)),a==this.from&&c==this.to?this:new SelectionRange(a,c,this.flags)}extend(e,s=e){if(e<=this.anchor&&s>=this.anchor)return EditorSelection.range(e,s);let a=Math.abs(e-this.anchor)>Math.abs(s-this.anchor)?e:s;return EditorSelection.range(this.anchor,a)}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 EditorSelection.range(e.anchor,e.head)}static create(e,s,a){return new SelectionRange(e,s,a)}}class EditorSelection{constructor(e,s){this.ranges=e,this.mainIndex=s}map(e,s=-1){return e.empty?this:EditorSelection.create(this.ranges.map(a=>a.map(e,s)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let s=0;s<this.ranges.length;s++)if(!this.ranges[s].eq(e.ranges[s]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new EditorSelection([this.main],0)}addRange(e,s=!0){return EditorSelection.create([e].concat(this.ranges),s?0:this.mainIndex+1)}replaceRange(e,s=this.mainIndex){let a=this.ranges.slice();return a[s]=e,EditorSelection.create(a,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 EditorSelection(e.ranges.map(s=>SelectionRange.fromJSON(s)),e.main)}static single(e,s=e){return new EditorSelection([EditorSelection.range(e,s)],0)}static create(e,s=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let a=0,c=0;c<e.length;c++){let h=e[c];if(h.empty?h.from<=a:h.from<a)return EditorSelection.normalized(e.slice(),s);a=h.to}return new EditorSelection(e,s)}static cursor(e,s=0,a,c){return SelectionRange.create(e,e,(s==0?0:s<0?4:8)|(a==null?3:Math.min(2,a))|(c!=null?c:33554431)<<5)}static range(e,s,a){let c=(a!=null?a:33554431)<<5;return s<e?SelectionRange.create(s,e,16|c|8):SelectionRange.create(e,s,c|(s>e?4:0))}static normalized(e,s=0){let a=e[s];e.sort((c,h)=>c.from-h.from),s=e.indexOf(a);for(let c=1;c<e.length;c++){let h=e[c],d=e[c-1];if(h.empty?h.from<=d.to:h.from<d.to){let g=d.from,_=Math.max(h.to,d.to);c<=s&&s--,e.splice(--c,2,h.anchor>h.head?EditorSelection.range(_,g):EditorSelection.range(g,_))}}return new EditorSelection(e,s)}}function checkSelection(o,e){for(let s of o.ranges)if(s.to>e)throw new RangeError("Selection points outside of document")}let nextID=0;class Facet{constructor(e,s,a,c,h){this.combine=e,this.compareInput=s,this.compare=a,this.isStatic=c,this.id=nextID++,this.default=e([]),this.extensions=typeof h=="function"?h(this):h}static define(e={}){return new Facet(e.combine||(s=>s),e.compareInput||((s,a)=>s===a),e.compare||(e.combine?(s,a)=>s===a:sameArray$1),!!e.static,e.enables)}of(e){return new FacetProvider([],this,0,e)}compute(e,s){if(this.isStatic)throw new Error("Can't compute a static facet");return new FacetProvider(e,this,1,s)}computeN(e,s){if(this.isStatic)throw new Error("Can't compute a static facet");return new FacetProvider(e,this,2,s)}from(e,s){return s||(s=a=>a),this.compute([e],a=>s(a.field(e)))}}function sameArray$1(o,e){return o==e||o.length==e.length&&o.every((s,a)=>s===e[a])}class FacetProvider{constructor(e,s,a,c){this.dependencies=e,this.facet=s,this.type=a,this.value=c,this.id=nextID++}dynamicSlot(e){var s;let a=this.value,c=this.facet.compareInput,h=this.id,d=e[h]>>1,g=this.type==2,_=!1,b=!1,$=[];for(let j of this.dependencies)j=="doc"?_=!0:j=="selection"?b=!0:(((s=e[j.id])!==null&&s!==void 0?s:1)&1)==0&&$.push(e[j.id]);return{create(j){return j.values[d]=a(j),1},update(j,_e){if(_&&_e.docChanged||b&&(_e.docChanged||_e.selection)||ensureAll(j,$)){let et=a(j);if(g?!compareArray(et,j.values[d],c):!c(et,j.values[d]))return j.values[d]=et,1}return 0},reconfigure:(j,_e)=>{let et=a(j),tt=_e.config.address[h];if(tt!=null){let nt=getAddr(_e,tt);if(this.dependencies.every(st=>st instanceof Facet?_e.facet(st)===j.facet(st):st instanceof StateField?_e.field(st,!1)==j.field(st,!1):!0)||(g?compareArray(et,nt,c):c(et,nt)))return j.values[d]=nt,0}return j.values[d]=et,1}}}}function compareArray(o,e,s){if(o.length!=e.length)return!1;for(let a=0;a<o.length;a++)if(!s(o[a],e[a]))return!1;return!0}function ensureAll(o,e){let s=!1;for(let a of e)ensureAddr(o,a)&1&&(s=!0);return s}function dynamicFacetSlot(o,e,s){let a=s.map(_=>o[_.id]),c=s.map(_=>_.type),h=a.filter(_=>!(_&1)),d=o[e.id]>>1;function g(_){let b=[];for(let $=0;$<a.length;$++){let j=getAddr(_,a[$]);if(c[$]==2)for(let _e of j)b.push(_e);else b.push(j)}return e.combine(b)}return{create(_){for(let b of a)ensureAddr(_,b);return _.values[d]=g(_),1},update(_,b){if(!ensureAll(_,h))return 0;let $=g(_);return e.compare($,_.values[d])?0:(_.values[d]=$,1)},reconfigure(_,b){let $=ensureAll(_,a),j=b.config.facets[e.id],_e=b.facet(e);if(j&&!$&&sameArray$1(s,j))return _.values[d]=_e,0;let et=g(_);return e.compare(et,_e)?(_.values[d]=_e,0):(_.values[d]=et,1)}}}const initField=Facet.define({static:!0});class StateField{constructor(e,s,a,c,h){this.id=e,this.createF=s,this.updateF=a,this.compareF=c,this.spec=h,this.provides=void 0}static define(e){let s=new StateField(nextID++,e.create,e.update,e.compare||((a,c)=>a===c),e);return e.provide&&(s.provides=e.provide(s)),s}create(e){let s=e.facet(initField).find(a=>a.field==this);return((s==null?void 0:s.create)||this.createF)(e)}slot(e){let s=e[this.id]>>1;return{create:a=>(a.values[s]=this.create(a),1),update:(a,c)=>{let h=a.values[s],d=this.updateF(h,c);return this.compareF(h,d)?0:(a.values[s]=d,1)},reconfigure:(a,c)=>c.config.address[this.id]!=null?(a.values[s]=c.field(this),0):(a.values[s]=this.create(a),1)}}init(e){return[this,initField.of({field:this,create:e})]}get extension(){return this}}const Prec_={lowest:4,low:3,default:2,high:1,highest:0};function prec(o){return e=>new PrecExtension(e,o)}const Prec={highest:prec(Prec_.highest),high:prec(Prec_.high),default:prec(Prec_.default),low:prec(Prec_.low),lowest:prec(Prec_.lowest)};class PrecExtension{constructor(e,s){this.inner=e,this.prec=s}}class Compartment{of(e){return new CompartmentInstance(this,e)}reconfigure(e){return Compartment.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class CompartmentInstance{constructor(e,s){this.compartment=e,this.inner=s}}class Configuration{constructor(e,s,a,c,h,d){for(this.base=e,this.compartments=s,this.dynamicSlots=a,this.address=c,this.staticValues=h,this.facets=d,this.statusTemplate=[];this.statusTemplate.length<a.length;)this.statusTemplate.push(0)}staticFacet(e){let s=this.address[e.id];return s==null?e.default:this.staticValues[s>>1]}static resolve(e,s,a){let c=[],h=Object.create(null),d=new Map;for(let _e of flatten(e,s,d))_e instanceof StateField?c.push(_e):(h[_e.facet.id]||(h[_e.facet.id]=[])).push(_e);let g=Object.create(null),_=[],b=[];for(let _e of c)g[_e.id]=b.length<<1,b.push(et=>_e.slot(et));let $=a==null?void 0:a.config.facets;for(let _e in h){let et=h[_e],tt=et[0].facet,nt=$&&$[_e]||[];if(et.every(st=>st.type==0))if(g[tt.id]=_.length<<1|1,sameArray$1(nt,et))_.push(a.facet(tt));else{let st=tt.combine(et.map(rt=>rt.value));_.push(a&&tt.compare(st,a.facet(tt))?a.facet(tt):st)}else{for(let st of et)st.type==0?(g[st.id]=_.length<<1|1,_.push(st.value)):(g[st.id]=b.length<<1,b.push(rt=>st.dynamicSlot(rt)));g[tt.id]=b.length<<1,b.push(st=>dynamicFacetSlot(st,tt,et))}}let j=b.map(_e=>_e(g));return new Configuration(e,d,j,g,_,h)}}function flatten(o,e,s){let a=[[],[],[],[],[]],c=new Map;function h(d,g){let _=c.get(d);if(_!=null){if(_<=g)return;let b=a[_].indexOf(d);b>-1&&a[_].splice(b,1),d instanceof CompartmentInstance&&s.delete(d.compartment)}if(c.set(d,g),Array.isArray(d))for(let b of d)h(b,g);else if(d instanceof CompartmentInstance){if(s.has(d.compartment))throw new RangeError("Duplicate use of compartment in extensions");let b=e.get(d.compartment)||d.inner;s.set(d.compartment,b),h(b,g)}else if(d instanceof PrecExtension)h(d.inner,d.prec);else if(d instanceof StateField)a[g].push(d),d.provides&&h(d.provides,g);else if(d instanceof FacetProvider)a[g].push(d),d.facet.extensions&&h(d.facet.extensions,Prec_.default);else{let b=d.extension;if(!b)throw new Error(`Unrecognized extension value in extension set (${d}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);h(b,g)}}return h(o,Prec_.default),a.reduce((d,g)=>d.concat(g))}function ensureAddr(o,e){if(e&1)return 2;let s=e>>1,a=o.status[s];if(a==4)throw new Error("Cyclic dependency between fields and/or facets");if(a&2)return a;o.status[s]=4;let c=o.computeSlot(o,o.config.dynamicSlots[s]);return o.status[s]=2|c}function getAddr(o,e){return e&1?o.config.staticValues[e>>1]:o.values[e>>1]}const languageData=Facet.define(),allowMultipleSelections=Facet.define({combine:o=>o.some(e=>e),static:!0}),lineSeparator=Facet.define({combine:o=>o.length?o[0]:void 0,static:!0}),changeFilter=Facet.define(),transactionFilter=Facet.define(),transactionExtender=Facet.define(),readOnly=Facet.define({combine:o=>o.length?o[0]:!1});class Annotation{constructor(e,s){this.type=e,this.value=s}static define(){return new AnnotationType}}class AnnotationType{of(e){return new Annotation(this,e)}}class StateEffectType{constructor(e){this.map=e}of(e){return new StateEffect(this,e)}}class StateEffect{constructor(e,s){this.type=e,this.value=s}map(e){let s=this.type.map(this.value,e);return s===void 0?void 0:s==this.value?this:new StateEffect(this.type,s)}is(e){return this.type==e}static define(e={}){return new StateEffectType(e.map||(s=>s))}static mapEffects(e,s){if(!e.length)return e;let a=[];for(let c of e){let h=c.map(s);h&&a.push(h)}return a}}StateEffect.reconfigure=StateEffect.define();StateEffect.appendConfig=StateEffect.define();class Transaction{constructor(e,s,a,c,h,d){this.startState=e,this.changes=s,this.selection=a,this.effects=c,this.annotations=h,this.scrollIntoView=d,this._doc=null,this._state=null,a&&checkSelection(a,s.newLength),h.some(g=>g.type==Transaction.time)||(this.annotations=h.concat(Transaction.time.of(Date.now())))}static create(e,s,a,c,h,d){return new Transaction(e,s,a,c,h,d)}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 s of this.annotations)if(s.type==e)return s.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let s=this.annotation(Transaction.userEvent);return!!(s&&(s==e||s.length>e.length&&s.slice(0,e.length)==e&&s[e.length]=="."))}}Transaction.time=Annotation.define();Transaction.userEvent=Annotation.define();Transaction.addToHistory=Annotation.define();Transaction.remote=Annotation.define();function joinRanges(o,e){let s=[];for(let a=0,c=0;;){let h,d;if(a<o.length&&(c==e.length||e[c]>=o[a]))h=o[a++],d=o[a++];else if(c<e.length)h=e[c++],d=e[c++];else return s;!s.length||s[s.length-1]<h?s.push(h,d):s[s.length-1]<d&&(s[s.length-1]=d)}}function mergeTransaction(o,e,s){var a;let c,h,d;return s?(c=e.changes,h=ChangeSet.empty(e.changes.length),d=o.changes.compose(e.changes)):(c=e.changes.map(o.changes),h=o.changes.mapDesc(e.changes,!0),d=o.changes.compose(c)),{changes:d,selection:e.selection?e.selection.map(h):(a=o.selection)===null||a===void 0?void 0:a.map(c),effects:StateEffect.mapEffects(o.effects,c).concat(StateEffect.mapEffects(e.effects,h)),annotations:o.annotations.length?o.annotations.concat(e.annotations):e.annotations,scrollIntoView:o.scrollIntoView||e.scrollIntoView}}function resolveTransactionInner(o,e,s){let a=e.selection,c=asArray$1(e.annotations);return e.userEvent&&(c=c.concat(Transaction.userEvent.of(e.userEvent))),{changes:e.changes instanceof ChangeSet?e.changes:ChangeSet.of(e.changes||[],s,o.facet(lineSeparator)),selection:a&&(a instanceof EditorSelection?a:EditorSelection.single(a.anchor,a.head)),effects:asArray$1(e.effects),annotations:c,scrollIntoView:!!e.scrollIntoView}}function resolveTransaction(o,e,s){let a=resolveTransactionInner(o,e.length?e[0]:{},o.doc.length);e.length&&e[0].filter===!1&&(s=!1);for(let h=1;h<e.length;h++){e[h].filter===!1&&(s=!1);let d=!!e[h].sequential;a=mergeTransaction(a,resolveTransactionInner(o,e[h],d?a.changes.newLength:o.doc.length),d)}let c=Transaction.create(o,a.changes,a.selection,a.effects,a.annotations,a.scrollIntoView);return extendTransaction(s?filterTransaction(c):c)}function filterTransaction(o){let e=o.startState,s=!0;for(let c of e.facet(changeFilter)){let h=c(o);if(h===!1){s=!1;break}Array.isArray(h)&&(s=s===!0?h:joinRanges(s,h))}if(s!==!0){let c,h;if(s===!1)h=o.changes.invertedDesc,c=ChangeSet.empty(e.doc.length);else{let d=o.changes.filter(s);c=d.changes,h=d.filtered.mapDesc(d.changes).invertedDesc}o=Transaction.create(e,c,o.selection&&o.selection.map(h),StateEffect.mapEffects(o.effects,h),o.annotations,o.scrollIntoView)}let a=e.facet(transactionFilter);for(let c=a.length-1;c>=0;c--){let h=a[c](o);h instanceof Transaction?o=h:Array.isArray(h)&&h.length==1&&h[0]instanceof Transaction?o=h[0]:o=resolveTransaction(e,asArray$1(h),!1)}return o}function extendTransaction(o){let e=o.startState,s=e.facet(transactionExtender),a=o;for(let c=s.length-1;c>=0;c--){let h=s[c](o);h&&Object.keys(h).length&&(a=mergeTransaction(o,resolveTransactionInner(e,h,o.changes.newLength),!0))}return a==o?o:Transaction.create(e,o.changes,o.selection,a.effects,a.annotations,a.scrollIntoView)}const none$2=[];function asArray$1(o){return o==null?none$2:Array.isArray(o)?o:[o]}var CharCategory=function(o){return o[o.Word=0]="Word",o[o.Space=1]="Space",o[o.Other=2]="Other",o}(CharCategory||(CharCategory={}));const nonASCIISingleCaseWordChar=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wordChar;try{wordChar=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(o){}function hasWordChar(o){if(wordChar)return wordChar.test(o);for(let e=0;e<o.length;e++){let s=o[e];if(/\w/.test(s)||s>"\x80"&&(s.toUpperCase()!=s.toLowerCase()||nonASCIISingleCaseWordChar.test(s)))return!0}return!1}function makeCategorizer(o){return e=>{if(!/\S/.test(e))return CharCategory.Space;if(hasWordChar(e))return CharCategory.Word;for(let s=0;s<o.length;s++)if(e.indexOf(o[s])>-1)return CharCategory.Word;return CharCategory.Other}}class EditorState{constructor(e,s,a,c,h,d){this.config=e,this.doc=s,this.selection=a,this.values=c,this.status=e.statusTemplate.slice(),this.computeSlot=h,d&&(d._state=this);for(let g=0;g<this.config.dynamicSlots.length;g++)ensureAddr(this,g<<1);this.computeSlot=null}field(e,s=!0){let a=this.config.address[e.id];if(a==null){if(s)throw new RangeError("Field is not present in this state");return}return ensureAddr(this,a),getAddr(this,a)}update(...e){return resolveTransaction(this,e,!0)}applyTransaction(e){let s=this.config,{base:a,compartments:c}=s;for(let d of e.effects)d.is(Compartment.reconfigure)?(s&&(c=new Map,s.compartments.forEach((g,_)=>c.set(_,g)),s=null),c.set(d.value.compartment,d.value.extension)):d.is(StateEffect.reconfigure)?(s=null,a=d.value):d.is(StateEffect.appendConfig)&&(s=null,a=asArray$1(a).concat(d.value));let h;s?h=e.startState.values.slice():(s=Configuration.resolve(a,c,this),h=new EditorState(s,this.doc,this.selection,s.dynamicSlots.map(()=>null),(g,_)=>_.reconfigure(g,this),null).values),new EditorState(s,e.newDoc,e.newSelection,h,(d,g)=>g.update(d,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(s=>({changes:{from:s.from,to:s.to,insert:e},range:EditorSelection.cursor(s.from+e.length)}))}changeByRange(e){let s=this.selection,a=e(s.ranges[0]),c=this.changes(a.changes),h=[a.range],d=asArray$1(a.effects);for(let g=1;g<s.ranges.length;g++){let _=e(s.ranges[g]),b=this.changes(_.changes),$=b.map(c);for(let _e=0;_e<g;_e++)h[_e]=h[_e].map($);let j=c.mapDesc(b,!0);h.push(_.range.map(j)),c=c.compose($),d=StateEffect.mapEffects(d,$).concat(StateEffect.mapEffects(asArray$1(_.effects),j))}return{changes:c,selection:EditorSelection.create(h,s.mainIndex),effects:d}}changes(e=[]){return e instanceof ChangeSet?e:ChangeSet.of(e,this.doc.length,this.facet(EditorState.lineSeparator))}toText(e){return Text.of(e.split(this.facet(EditorState.lineSeparator)||DefaultSplit))}sliceDoc(e=0,s=this.doc.length){return this.doc.sliceString(e,s,this.lineBreak)}facet(e){let s=this.config.address[e.id];return s==null?e.default:(ensureAddr(this,s),getAddr(this,s))}toJSON(e){let s={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let a in e){let c=e[a];c instanceof StateField&&this.config.address[c.id]!=null&&(s[a]=c.spec.toJSON(this.field(e[a]),this))}return s}static fromJSON(e,s={},a){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let c=[];if(a){for(let h in a)if(Object.prototype.hasOwnProperty.call(e,h)){let d=a[h],g=e[h];c.push(d.init(_=>d.spec.fromJSON(g,_)))}}return EditorState.create({doc:e.doc,selection:EditorSelection.fromJSON(e.selection),extensions:s.extensions?c.concat([s.extensions]):c})}static create(e={}){let s=Configuration.resolve(e.extensions||[],new Map),a=e.doc instanceof Text?e.doc:Text.of((e.doc||"").split(s.staticFacet(EditorState.lineSeparator)||DefaultSplit)),c=e.selection?e.selection instanceof EditorSelection?e.selection:EditorSelection.single(e.selection.anchor,e.selection.head):EditorSelection.single(0);return checkSelection(c,a.length),s.staticFacet(allowMultipleSelections)||(c=c.asSingle()),new EditorState(s,a,c,s.dynamicSlots.map(()=>null),(h,d)=>d.create(h),null)}get tabSize(){return this.facet(EditorState.tabSize)}get lineBreak(){return this.facet(EditorState.lineSeparator)||`
|
||
`}get readOnly(){return this.facet(readOnly)}phrase(e,...s){for(let a of this.facet(EditorState.phrases))if(Object.prototype.hasOwnProperty.call(a,e)){e=a[e];break}return s.length&&(e=e.replace(/\$(\$|\d*)/g,(a,c)=>{if(c=="$")return"$";let h=+(c||1);return!h||h>s.length?a:s[h-1]})),e}languageDataAt(e,s,a=-1){let c=[];for(let h of this.facet(languageData))for(let d of h(this,s,a))Object.prototype.hasOwnProperty.call(d,e)&&c.push(d[e]);return c}charCategorizer(e){return makeCategorizer(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:s,from:a,length:c}=this.doc.lineAt(e),h=this.charCategorizer(e),d=e-a,g=e-a;for(;d>0;){let _=findClusterBreak(s,d,!1);if(h(s.slice(_,d))!=CharCategory.Word)break;d=_}for(;g<c;){let _=findClusterBreak(s,g);if(h(s.slice(g,_))!=CharCategory.Word)break;g=_}return d==g?null:EditorSelection.range(d+a,g+a)}}EditorState.allowMultipleSelections=allowMultipleSelections;EditorState.tabSize=Facet.define({combine:o=>o.length?o[0]:4});EditorState.lineSeparator=lineSeparator;EditorState.readOnly=readOnly;EditorState.phrases=Facet.define({compare(o,e){let s=Object.keys(o),a=Object.keys(e);return s.length==a.length&&s.every(c=>o[c]==e[c])}});EditorState.languageData=languageData;EditorState.changeFilter=changeFilter;EditorState.transactionFilter=transactionFilter;EditorState.transactionExtender=transactionExtender;Compartment.reconfigure=StateEffect.define();function combineConfig(o,e,s={}){let a={};for(let c of o)for(let h of Object.keys(c)){let d=c[h],g=a[h];if(g===void 0)a[h]=d;else if(!(g===d||d===void 0))if(Object.hasOwnProperty.call(s,h))a[h]=s[h](g,d);else throw new Error("Config merge conflict for field "+h)}for(let c in e)a[c]===void 0&&(a[c]=e[c]);return a}class RangeValue{eq(e){return this==e}range(e,s=e){return Range$1.create(e,s,this)}}RangeValue.prototype.startSide=RangeValue.prototype.endSide=0;RangeValue.prototype.point=!1;RangeValue.prototype.mapMode=MapMode.TrackDel;class Range$1{constructor(e,s,a){this.from=e,this.to=s,this.value=a}static create(e,s,a){return new Range$1(e,s,a)}}function cmpRange(o,e){return o.from-e.from||o.value.startSide-e.value.startSide}class Chunk{constructor(e,s,a,c){this.from=e,this.to=s,this.value=a,this.maxPoint=c}get length(){return this.to[this.to.length-1]}findIndex(e,s,a,c=0){let h=a?this.to:this.from;for(let d=c,g=h.length;;){if(d==g)return d;let _=d+g>>1,b=h[_]-e||(a?this.value[_].endSide:this.value[_].startSide)-s;if(_==d)return b>=0?d:g;b>=0?g=_:d=_+1}}between(e,s,a,c){for(let h=this.findIndex(s,-1e9,!0),d=this.findIndex(a,1e9,!1,h);h<d;h++)if(c(this.from[h]+e,this.to[h]+e,this.value[h])===!1)return!1}map(e,s){let a=[],c=[],h=[],d=-1,g=-1;for(let _=0;_<this.value.length;_++){let b=this.value[_],$=this.from[_]+e,j=this.to[_]+e,_e,et;if($==j){let tt=s.mapPos($,b.startSide,b.mapMode);if(tt==null||(_e=et=tt,b.startSide!=b.endSide&&(et=s.mapPos($,b.endSide),et<_e)))continue}else if(_e=s.mapPos($,b.startSide),et=s.mapPos(j,b.endSide),_e>et||_e==et&&b.startSide>0&&b.endSide<=0)continue;(et-_e||b.endSide-b.startSide)<0||(d<0&&(d=_e),b.point&&(g=Math.max(g,et-_e)),a.push(b),c.push(_e-d),h.push(et-d))}return{mapped:a.length?new Chunk(c,h,a,g):null,pos:d}}}class RangeSet{constructor(e,s,a,c){this.chunkPos=e,this.chunk=s,this.nextLayer=a,this.maxPoint=c}static create(e,s,a,c){return new RangeSet(e,s,a,c)}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 s of this.chunk)e+=s.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:s=[],sort:a=!1,filterFrom:c=0,filterTo:h=this.length}=e,d=e.filter;if(s.length==0&&!d)return this;if(a&&(s=s.slice().sort(cmpRange)),this.isEmpty)return s.length?RangeSet.of(s):this;let g=new LayerCursor(this,null,-1).goto(0),_=0,b=[],$=new RangeSetBuilder;for(;g.value||_<s.length;)if(_<s.length&&(g.from-s[_].from||g.startSide-s[_].value.startSide)>=0){let j=s[_++];$.addInner(j.from,j.to,j.value)||b.push(j)}else g.rangeIndex==1&&g.chunkIndex<this.chunk.length&&(_==s.length||this.chunkEnd(g.chunkIndex)<s[_].from)&&(!d||c>this.chunkEnd(g.chunkIndex)||h<this.chunkPos[g.chunkIndex])&&$.addChunk(this.chunkPos[g.chunkIndex],this.chunk[g.chunkIndex])?g.nextChunk():((!d||c>g.to||h<g.from||d(g.from,g.to,g.value))&&($.addInner(g.from,g.to,g.value)||b.push(Range$1.create(g.from,g.to,g.value))),g.next());return $.finishInner(this.nextLayer.isEmpty&&!b.length?RangeSet.empty:this.nextLayer.update({add:b,filter:d,filterFrom:c,filterTo:h}))}map(e){if(e.empty||this.isEmpty)return this;let s=[],a=[],c=-1;for(let d=0;d<this.chunk.length;d++){let g=this.chunkPos[d],_=this.chunk[d],b=e.touchesRange(g,g+_.length);if(b===!1)c=Math.max(c,_.maxPoint),s.push(_),a.push(e.mapPos(g));else if(b===!0){let{mapped:$,pos:j}=_.map(g,e);$&&(c=Math.max(c,$.maxPoint),s.push($),a.push(j))}}let h=this.nextLayer.map(e);return s.length==0?h:new RangeSet(a,s,h||RangeSet.empty,c)}between(e,s,a){if(!this.isEmpty){for(let c=0;c<this.chunk.length;c++){let h=this.chunkPos[c],d=this.chunk[c];if(s>=h&&e<=h+d.length&&d.between(h,e-h,s-h,a)===!1)return}this.nextLayer.between(e,s,a)}}iter(e=0){return HeapCursor.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,s=0){return HeapCursor.from(e).goto(s)}static compare(e,s,a,c,h=-1){let d=e.filter(j=>j.maxPoint>0||!j.isEmpty&&j.maxPoint>=h),g=s.filter(j=>j.maxPoint>0||!j.isEmpty&&j.maxPoint>=h),_=findSharedChunks(d,g,a),b=new SpanCursor(d,_,h),$=new SpanCursor(g,_,h);a.iterGaps((j,_e,et)=>compare(b,j,$,_e,et,c)),a.empty&&a.length==0&&compare(b,0,$,0,0,c)}static eq(e,s,a=0,c){c==null&&(c=1e9);let h=e.filter($=>!$.isEmpty&&s.indexOf($)<0),d=s.filter($=>!$.isEmpty&&e.indexOf($)<0);if(h.length!=d.length)return!1;if(!h.length)return!0;let g=findSharedChunks(h,d),_=new SpanCursor(h,g,0).goto(a),b=new SpanCursor(d,g,0).goto(a);for(;;){if(_.to!=b.to||!sameValues(_.active,b.active)||_.point&&(!b.point||!_.point.eq(b.point)))return!1;if(_.to>c)return!0;_.next(),b.next()}}static spans(e,s,a,c,h=-1){let d=new SpanCursor(e,null,h).goto(s),g=s,_=d.openStart;for(;;){let b=Math.min(d.to,a);if(d.point?(c.point(g,b,d.point,d.activeForPoint(d.to),_,d.pointRank),_=d.openEnd(b)+(d.to>b?1:0)):b>g&&(c.span(g,b,d.active,_),_=d.openEnd(b)),d.to>a)break;g=d.to,d.next()}return _}static of(e,s=!1){let a=new RangeSetBuilder;for(let c of e instanceof Range$1?[e]:s?lazySort(e):e)a.add(c.from,c.to,c.value);return a.finish()}}RangeSet.empty=new RangeSet([],[],null,-1);function lazySort(o){if(o.length>1)for(let e=o[0],s=1;s<o.length;s++){let a=o[s];if(cmpRange(e,a)>0)return o.slice().sort(cmpRange);e=a}return o}RangeSet.empty.nextLayer=RangeSet.empty;class RangeSetBuilder{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}finishChunk(e){this.chunks.push(new Chunk(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=[])}add(e,s,a){this.addInner(e,s,a)||(this.nextLayer||(this.nextLayer=new RangeSetBuilder)).add(e,s,a)}addInner(e,s,a){let c=e-this.lastTo||a.startSide-this.last.endSide;if(c<=0&&(e-this.lastFrom||a.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return c<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(s-this.chunkStart),this.last=a,this.lastFrom=e,this.lastTo=s,this.value.push(a),a.point&&(this.maxPoint=Math.max(this.maxPoint,s-e)),!0)}addChunk(e,s){if((e-this.lastTo||s.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,s.maxPoint),this.chunks.push(s),this.chunkPos.push(e);let a=s.value.length-1;return this.last=s.value[a],this.lastFrom=s.from[a]+e,this.lastTo=s.to[a]+e,!0}finish(){return this.finishInner(RangeSet.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let s=RangeSet.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,s}}function findSharedChunks(o,e,s){let a=new Map;for(let h of o)for(let d=0;d<h.chunk.length;d++)h.chunk[d].maxPoint<=0&&a.set(h.chunk[d],h.chunkPos[d]);let c=new Set;for(let h of e)for(let d=0;d<h.chunk.length;d++){let g=a.get(h.chunk[d]);g!=null&&(s?s.mapPos(g):g)==h.chunkPos[d]&&!(s!=null&&s.touchesRange(g,g+h.chunk[d].length))&&c.add(h.chunk[d])}return c}class LayerCursor{constructor(e,s,a,c=0){this.layer=e,this.skip=s,this.minPoint=a,this.rank=c}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,s=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,s,!1),this}gotoInner(e,s,a){for(;this.chunkIndex<this.layer.chunk.length;){let c=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(c)||this.layer.chunkEnd(this.chunkIndex)<e||c.maxPoint<this.minPoint))break;this.chunkIndex++,a=!1}if(this.chunkIndex<this.layer.chunk.length){let c=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],s,!0);(!a||this.rangeIndex<c)&&this.setRangeIndex(c)}this.next()}forward(e,s){(this.to-e||this.endSide-s)<0&&this.gotoInner(e,s,!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],s=this.layer.chunk[this.chunkIndex],a=e+s.from[this.rangeIndex];if(this.from=a,this.to=e+s.to[this.rangeIndex],this.value=s.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 HeapCursor{constructor(e){this.heap=e}static from(e,s=null,a=-1){let c=[];for(let h=0;h<e.length;h++)for(let d=e[h];!d.isEmpty;d=d.nextLayer)d.maxPoint>=a&&c.push(new LayerCursor(d,s,a,h));return c.length==1?c[0]:new HeapCursor(c)}get startSide(){return this.value?this.value.startSide:0}goto(e,s=-1e9){for(let a of this.heap)a.goto(e,s);for(let a=this.heap.length>>1;a>=0;a--)heapBubble(this.heap,a);return this.next(),this}forward(e,s){for(let a of this.heap)a.forward(e,s);for(let a=this.heap.length>>1;a>=0;a--)heapBubble(this.heap,a);(this.to-e||this.value.endSide-s)<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(),heapBubble(this.heap,0)}}}function heapBubble(o,e){for(let s=o[e];;){let a=(e<<1)+1;if(a>=o.length)break;let c=o[a];if(a+1<o.length&&c.compare(o[a+1])>=0&&(c=o[a+1],a++),s.compare(c)<0)break;o[a]=s,o[e]=c,e=a}}class SpanCursor{constructor(e,s,a){this.minPoint=a,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=HeapCursor.from(e,s,a)}goto(e,s=-1e9){return this.cursor.goto(e,s),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=s,this.openStart=-1,this.next(),this}forward(e,s){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-s)<0;)this.removeActive(this.minActive);this.cursor.forward(e,s)}removeActive(e){remove(this.active,e),remove(this.activeTo,e),remove(this.activeRank,e),this.minActive=findMinIndex(this.active,this.activeTo)}addActive(e){let s=0,{value:a,to:c,rank:h}=this.cursor;for(;s<this.activeRank.length&&this.activeRank[s]<=h;)s++;insert(this.active,s,a),insert(this.activeTo,s,c),insert(this.activeRank,s,h),e&&insert(e,s,this.cursor.from),this.minActive=findMinIndex(this.active,this.activeTo)}next(){let e=this.to,s=this.point;this.point=null;let a=this.openStart<0?[]:null,c=0;for(;;){let h=this.minActive;if(h>-1&&(this.activeTo[h]-this.cursor.from||this.active[h].endSide-this.cursor.startSide)<0){if(this.activeTo[h]>e){this.to=this.activeTo[h],this.endSide=this.active[h].endSide;break}this.removeActive(h),a&&remove(a,h)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let d=this.cursor.value;if(!d.point)this.addActive(a),this.cursor.from<e&&this.cursor.to>e&&c++,this.cursor.next();else if(s&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=d,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=d.endSide,this.cursor.from<e&&(c=1),this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(a){let h=0;for(;h<a.length&&a[h]<e;)h++;this.openStart=h+c}}activeForPoint(e){if(!this.active.length)return this.active;let s=[];for(let a=this.active.length-1;a>=0&&!(this.activeRank[a]<this.pointRank);a--)(this.activeTo[a]>e||this.activeTo[a]==e&&this.active[a].endSide>=this.point.endSide)&&s.push(this.active[a]);return s.reverse()}openEnd(e){let s=0;for(let a=this.activeTo.length-1;a>=0&&this.activeTo[a]>e;a--)s++;return s}}function compare(o,e,s,a,c,h){o.goto(e),s.goto(a);let d=a+c,g=a,_=a-e;for(;;){let b=o.to+_-s.to||o.endSide-s.endSide,$=b<0?o.to+_:s.to,j=Math.min($,d);if(o.point||s.point?o.point&&s.point&&(o.point==s.point||o.point.eq(s.point))&&sameValues(o.activeForPoint(o.to+_),s.activeForPoint(s.to))||h.comparePoint(g,j,o.point,s.point):j>g&&!sameValues(o.active,s.active)&&h.compareRange(g,j,o.active,s.active),$>d)break;g=$,b<=0&&o.next(),b>=0&&s.next()}}function sameValues(o,e){if(o.length!=e.length)return!1;for(let s=0;s<o.length;s++)if(o[s]!=e[s]&&!o[s].eq(e[s]))return!1;return!0}function remove(o,e){for(let s=e,a=o.length-1;s<a;s++)o[s]=o[s+1];o.pop()}function insert(o,e,s){for(let a=o.length-1;a>=e;a--)o[a+1]=o[a];o[e]=s}function findMinIndex(o,e){let s=-1,a=1e9;for(let c=0;c<e.length;c++)(e[c]-a||o[c].endSide-o[s].endSide)<0&&(s=c,a=e[c]);return s}function countColumn(o,e,s=o.length){let a=0;for(let c=0;c<s;)o.charCodeAt(c)==9?(a+=e-a%e,c++):(a++,c=findClusterBreak(o,c));return a}function findColumn(o,e,s,a){for(let c=0,h=0;;){if(h>=e)return c;if(c==o.length)break;h+=o.charCodeAt(c)==9?s-h%s:1,c=findClusterBreak(o,c)}return a===!0?-1:o.length}const C="\u037C",COUNT=typeof Symbol>"u"?"__"+C:Symbol.for(C),SET=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),top=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class StyleModule{constructor(e,s){this.rules=[];let{finish:a}=s||{};function c(d){return/^@/.test(d)?[d]:d.split(/,\s*/)}function h(d,g,_,b){let $=[],j=/^@(\w+)\b/.exec(d[0]),_e=j&&j[1]=="keyframes";if(j&&g==null)return _.push(d[0]+";");for(let et in g){let tt=g[et];if(/&/.test(et))h(et.split(/,\s*/).map(nt=>d.map(st=>nt.replace(/&/,st))).reduce((nt,st)=>nt.concat(st)),tt,_);else if(tt&&typeof tt=="object"){if(!j)throw new RangeError("The value of a property ("+et+") should be a primitive value.");h(c(et),tt,$,_e)}else tt!=null&&$.push(et.replace(/_.*/,"").replace(/[A-Z]/g,nt=>"-"+nt.toLowerCase())+": "+tt+";")}($.length||_e)&&_.push((a&&!j&&!b?d.map(a):d).join(", ")+" {"+$.join(" ")+"}")}for(let d in e)h(c(d),e[d],this.rules)}getRules(){return this.rules.join(`
|
||
`)}static newName(){let e=top[COUNT]||1;return top[COUNT]=e+1,C+e.toString(36)}static mount(e,s){(e[SET]||new StyleSet(e)).mount(Array.isArray(s)?s:[s])}}let adoptedSet=null;class StyleSet{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(adoptedSet)return e.adoptedStyleSheets=[adoptedSet.sheet].concat(e.adoptedStyleSheets),e[SET]=adoptedSet;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),adoptedSet=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let s=e.head||e;s.insertBefore(this.styleTag,s.firstChild)}this.modules=[],e[SET]=this}mount(e){let s=this.sheet,a=0,c=0;for(let h=0;h<e.length;h++){let d=e[h],g=this.modules.indexOf(d);if(g<c&&g>-1&&(this.modules.splice(g,1),c--,g=-1),g==-1){if(this.modules.splice(c++,0,d),s)for(let _=0;_<d.rules.length;_++)s.insertRule(d.rules[_],a++)}else{for(;c<g;)a+=this.modules[c++].rules.length;a+=d.rules.length,c++}}if(!s){let h="";for(let d=0;d<this.modules.length;d++)h+=this.modules[d].getRules()+`
|
||
`;this.styleTag.textContent=h}}}var base={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:"'",229:"q"},shift={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},chrome$1=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),safari$1=typeof navigator<"u"&&/Apple Computer/.test(navigator.vendor),gecko$1=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),mac=typeof navigator<"u"&&/Mac/.test(navigator.platform),ie$1=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),brokenModifierNames=chrome$1&&(mac||+chrome$1[1]<57)||gecko$1&&mac;for(var i=0;i<10;i++)base[48+i]=base[96+i]=String(i);for(var i=1;i<=24;i++)base[i+111]="F"+i;for(var i=65;i<=90;i++)base[i]=String.fromCharCode(i+32),shift[i]=String.fromCharCode(i);for(var code in base)shift.hasOwnProperty(code)||(shift[code]=base[code]);function keyName(o){var e=brokenModifierNames&&(o.ctrlKey||o.altKey||o.metaKey)||(safari$1||ie$1)&&o.shiftKey&&o.key&&o.key.length==1,s=!e&&o.key||(o.shiftKey?shift:base)[o.keyCode]||o.key||"Unidentified";return s=="Esc"&&(s="Escape"),s=="Del"&&(s="Delete"),s=="Left"&&(s="ArrowLeft"),s=="Up"&&(s="ArrowUp"),s=="Right"&&(s="ArrowRight"),s=="Down"&&(s="ArrowDown"),s}function getSelection(o){let e;return o.nodeType==11?e=o.getSelection?o:o.ownerDocument:e=o,e.getSelection()}function contains(o,e){return e?o==e||o.contains(e.nodeType!=1?e.parentNode:e):!1}function deepActiveElement(){let o=document.activeElement;for(;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}function hasSelection(o,e){if(!e.anchorNode)return!1;try{return contains(o,e.anchorNode)}catch{return!1}}function clientRectsFor(o){return o.nodeType==3?textRange(o,0,o.nodeValue.length).getClientRects():o.nodeType==1?o.getClientRects():[]}function isEquivalentPosition(o,e,s,a){return s?scanFor(o,e,s,a,-1)||scanFor(o,e,s,a,1):!1}function domIndex(o){for(var e=0;;e++)if(o=o.previousSibling,!o)return e}function scanFor(o,e,s,a,c){for(;;){if(o==s&&e==a)return!0;if(e==(c<0?0:maxOffset(o))){if(o.nodeName=="DIV")return!1;let h=o.parentNode;if(!h||h.nodeType!=1)return!1;e=domIndex(o)+(c<0?0:1),o=h}else if(o.nodeType==1){if(o=o.childNodes[e+(c<0?-1:0)],o.nodeType==1&&o.contentEditable=="false")return!1;e=c<0?maxOffset(o):0}else return!1}}function maxOffset(o){return o.nodeType==3?o.nodeValue.length:o.childNodes.length}const Rect0={left:0,right:0,top:0,bottom:0};function flattenRect(o,e){let s=e?o.left:o.right;return{left:s,right:s,top:o.top,bottom:o.bottom}}function windowRect(o){return{left:0,right:o.innerWidth,top:0,bottom:o.innerHeight}}function scrollRectIntoView(o,e,s,a,c,h,d,g){let _=o.ownerDocument,b=_.defaultView;for(let $=o;$;)if($.nodeType==1){let j,_e=$==_.body;if(_e)j=windowRect(b);else{if($.scrollHeight<=$.clientHeight&&$.scrollWidth<=$.clientWidth){$=$.parentNode;continue}let nt=$.getBoundingClientRect();j={left:nt.left,right:nt.left+$.clientWidth,top:nt.top,bottom:nt.top+$.clientHeight}}let et=0,tt=0;if(c=="nearest")e.top<j.top?(tt=-(j.top-e.top+d),s>0&&e.bottom>j.bottom+tt&&(tt=e.bottom-j.bottom+tt+d)):e.bottom>j.bottom&&(tt=e.bottom-j.bottom+d,s<0&&e.top-tt<j.top&&(tt=-(j.top+tt-e.top+d)));else{let nt=e.bottom-e.top,st=j.bottom-j.top;tt=(c=="center"&&nt<=st?e.top+nt/2-st/2:c=="start"||c=="center"&&s<0?e.top-d:e.bottom-st+d)-j.top}if(a=="nearest"?e.left<j.left?(et=-(j.left-e.left+h),s>0&&e.right>j.right+et&&(et=e.right-j.right+et+h)):e.right>j.right&&(et=e.right-j.right+h,s<0&&e.left<j.left+et&&(et=-(j.left+et-e.left+h))):et=(a=="center"?e.left+(e.right-e.left)/2-(j.right-j.left)/2:a=="start"==g?e.left-h:e.right-(j.right-j.left)+h)-j.left,et||tt)if(_e)b.scrollBy(et,tt);else{if(tt){let nt=$.scrollTop;$.scrollTop+=tt,tt=$.scrollTop-nt}if(et){let nt=$.scrollLeft;$.scrollLeft+=et,et=$.scrollLeft-nt}e={left:e.left-et,top:e.top-tt,right:e.right-et,bottom:e.bottom-tt}}if(_e)break;$=$.assignedSlot||$.parentNode,a=c="nearest"}else if($.nodeType==11)$=$.host;else break}class DOMSelectionState{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,s,a,c){this.anchorNode=e,this.anchorOffset=s,this.focusNode=a,this.focusOffset=c}}let preventScrollSupported=null;function focusPreventScroll(o){if(o.setActive)return o.setActive();if(preventScrollSupported)return o.focus(preventScrollSupported);let e=[];for(let s=o;s&&(e.push(s,s.scrollTop,s.scrollLeft),s!=s.ownerDocument);s=s.parentNode);if(o.focus(preventScrollSupported==null?{get preventScroll(){return preventScrollSupported={preventScroll:!0},!0}}:void 0),!preventScrollSupported){preventScrollSupported=!1;for(let s=0;s<e.length;){let a=e[s++],c=e[s++],h=e[s++];a.scrollTop!=c&&(a.scrollTop=c),a.scrollLeft!=h&&(a.scrollLeft=h)}}}let scratchRange;function textRange(o,e,s=e){let a=scratchRange||(scratchRange=document.createRange());return a.setEnd(o,s),a.setStart(o,e),a}function dispatchKey(o,e,s){let a={key:e,code:e,keyCode:s,which:s,cancelable:!0},c=new KeyboardEvent("keydown",a);c.synthetic=!0,o.dispatchEvent(c);let h=new KeyboardEvent("keyup",a);return h.synthetic=!0,o.dispatchEvent(h),c.defaultPrevented||h.defaultPrevented}function getRoot(o){for(;o;){if(o&&(o.nodeType==9||o.nodeType==11&&o.host))return o;o=o.assignedSlot||o.parentNode}return null}function clearAttributes(o){for(;o.attributes.length;)o.removeAttributeNode(o.attributes[0])}function atElementStart(o,e){let s=e.focusNode,a=e.focusOffset;if(!s||e.anchorNode!=s||e.anchorOffset!=a)return!1;for(;;)if(a){if(s.nodeType!=1)return!1;let c=s.childNodes[a-1];c.contentEditable=="false"?a--:(s=c,a=maxOffset(s))}else{if(s==o)return!0;a=domIndex(s),s=s.parentNode}}class DOMPos{constructor(e,s,a=!0){this.node=e,this.offset=s,this.precise=a}static before(e,s){return new DOMPos(e.parentNode,domIndex(e),s)}static after(e,s){return new DOMPos(e.parentNode,domIndex(e)+1,s)}}const noChildren=[];class ContentView{constructor(){this.parent=null,this.dom=null,this.dirty=2}get editorView(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let s=this.posAtStart;for(let a of this.children){if(a==e)return s;s+=a.length+a.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}coordsAt(e,s){return null}sync(e){if(this.dirty&2){let s=this.dom,a=null,c;for(let h of this.children){if(h.dirty){if(!h.dom&&(c=a?a.nextSibling:s.firstChild)){let d=ContentView.get(c);(!d||!d.parent&&d.constructor==h.constructor)&&h.reuseDOM(c)}h.sync(e),h.dirty=0}if(c=a?a.nextSibling:s.firstChild,e&&!e.written&&e.node==s&&c!=h.dom&&(e.written=!0),h.dom.parentNode==s)for(;c&&c!=h.dom;)c=rm$1(c);else s.insertBefore(h.dom,c);a=h.dom}for(c=a?a.nextSibling:s.firstChild,c&&e&&e.node==s&&(e.written=!0);c;)c=rm$1(c)}else if(this.dirty&1)for(let s of this.children)s.dirty&&(s.sync(e),s.dirty=0)}reuseDOM(e){}localPosFromDOM(e,s){let a;if(e==this.dom)a=this.dom.childNodes[s];else{let c=maxOffset(e)==0?0:s==0?-1:1;for(;;){let h=e.parentNode;if(h==this.dom)break;c==0&&h.firstChild!=h.lastChild&&(e==h.firstChild?c=-1:c=1),e=h}c<0?a=e:a=e.nextSibling}if(a==this.dom.firstChild)return 0;for(;a&&!ContentView.get(a);)a=a.nextSibling;if(!a)return this.length;for(let c=0,h=0;;c++){let d=this.children[c];if(d.dom==a)return h;h+=d.length+d.breakAfter}}domBoundsAround(e,s,a=0){let c=-1,h=-1,d=-1,g=-1;for(let _=0,b=a,$=a;_<this.children.length;_++){let j=this.children[_],_e=b+j.length;if(b<e&&_e>s)return j.domBoundsAround(e,s,b);if(_e>=e&&c==-1&&(c=_,h=b),b>s&&j.dom.parentNode==this.dom){d=_,g=$;break}$=_e,b=_e+j.breakAfter}return{from:h,to:g<0?a+this.length:g,startDOM:(c?this.children[c-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:d<this.children.length&&d>=0?this.children[d].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let s=this.parent;s;s=s.parent){if(e&&(s.dirty|=2),s.dirty&1)return;s.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 s=e.parent;if(!s)return e;e=s}}replaceChildren(e,s,a=noChildren){this.markDirty();for(let c=e;c<s;c++){let h=this.children[c];h.parent==this&&h.destroy()}this.children.splice(e,s-e,...a);for(let c=0;c<a.length;c++)a[c].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new ChildCursor(this.children,e,this.children.length)}childPos(e,s=1){return this.childCursor().findPos(e,s)}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}merge(e,s,a,c,h,d){return!1}become(e){return!1}getSide(){return 0}destroy(){this.parent=null}}ContentView.prototype.breakAfter=0;function rm$1(o){let e=o.nextSibling;return o.parentNode.removeChild(o),e}class ChildCursor{constructor(e,s,a){this.children=e,this.pos=s,this.i=a,this.off=0}findPos(e,s=1){for(;;){if(e>this.pos||e==this.pos&&(s>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let a=this.children[--this.i];this.pos-=a.length+a.breakAfter}}}function replaceRange(o,e,s,a,c,h,d,g,_){let{children:b}=o,$=b.length?b[e]:null,j=h.length?h[h.length-1]:null,_e=j?j.breakAfter:d;if(!(e==a&&$&&!d&&!_e&&h.length<2&&$.merge(s,c,h.length?j:null,s==0,g,_))){if(a<b.length){let et=b[a];et&&c<et.length?(e==a&&(et=et.split(c),c=0),!_e&&j&&et.merge(0,c,j,!0,0,_)?h[h.length-1]=et:(c&&et.merge(0,c,null,!1,0,_),h.push(et))):et!=null&&et.breakAfter&&(j?j.breakAfter=1:d=1),a++}for($&&($.breakAfter=d,s>0&&(!d&&h.length&&$.merge(s,$.length,h[0],!1,g,0)?$.breakAfter=h.shift().breakAfter:(s<$.length||$.children.length&&$.children[$.children.length-1].length==0)&&$.merge(s,$.length,null,!1,g,0),e++));e<a&&h.length;)if(b[a-1].become(h[h.length-1]))a--,h.pop(),_=h.length?0:g;else if(b[e].become(h[0]))e++,h.shift(),g=h.length?0:_;else break;!h.length&&e&&a<b.length&&!b[e-1].breakAfter&&b[a].merge(0,0,b[e-1],!1,g,_)&&e--,(e<a||h.length)&&o.replaceChildren(e,a,h)}}function mergeChildrenInto(o,e,s,a,c,h){let d=o.childCursor(),{i:g,off:_}=d.findPos(s,1),{i:b,off:$}=d.findPos(e,-1),j=e-s;for(let _e of a)j+=_e.length;o.length+=j,replaceRange(o,b,$,g,_,a,0,c,h)}let nav=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},doc=typeof document<"u"?document:{documentElement:{style:{}}};const ie_edge=/Edge\/(\d+)/.exec(nav.userAgent),ie_upto10=/MSIE \d/.test(nav.userAgent),ie_11up=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nav.userAgent),ie=!!(ie_upto10||ie_11up||ie_edge),gecko=!ie&&/gecko\/(\d+)/i.test(nav.userAgent),chrome=!ie&&/Chrome\/(\d+)/.exec(nav.userAgent),webkit="webkitFontSmoothing"in doc.documentElement.style,safari=!ie&&/Apple Computer/.test(nav.vendor),ios=safari&&(/Mobile\/\w+/.test(nav.userAgent)||nav.maxTouchPoints>2);var browser={mac:ios||/Mac/.test(nav.platform),windows:/Win/.test(nav.platform),linux:/Linux|X11/.test(nav.platform),ie,ie_version:ie_upto10?doc.documentMode||6:ie_11up?+ie_11up[1]:ie_edge?+ie_edge[1]:0,gecko,gecko_version:gecko?+(/Firefox\/(\d+)/.exec(nav.userAgent)||[0,0])[1]:0,chrome:!!chrome,chrome_version:chrome?+chrome[1]:0,ios,android:/Android\b/.test(nav.userAgent),webkit,safari,webkit_version:webkit?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:doc.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const MaxJoinLen=256;class TextView extends ContentView{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,s,a){return a&&(!(a instanceof TextView)||this.length-(s-e)+a.length>MaxJoinLen)?!1:(this.text=this.text.slice(0,e)+(a?a.text:"")+this.text.slice(s),this.markDirty(),!0)}split(e){let s=new TextView(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),s}localPosFromDOM(e,s){return e==this.dom?s:s?this.text.length:0}domAtPos(e){return new DOMPos(this.dom,e)}domBoundsAround(e,s,a){return{from:a,to:a+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,s){return textCoords(this.dom,e,s)}}class MarkView extends ContentView{constructor(e,s=[],a=0){super(),this.mark=e,this.children=s,this.length=a;for(let c of s)c.setParent(this)}setAttrs(e){if(clearAttributes(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let s in this.mark.attrs)e.setAttribute(s,this.mark.attrs[s]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e)}merge(e,s,a,c,h,d){return a&&(!(a instanceof MarkView&&a.mark.eq(this.mark))||e&&h<=0||s<this.length&&d<=0)?!1:(mergeChildrenInto(this,e,s,a?a.children:[],h-1,d-1),this.markDirty(),!0)}split(e){let s=[],a=0,c=-1,h=0;for(let g of this.children){let _=a+g.length;_>e&&s.push(a<e?g.split(e-a):g),c<0&&a>=e&&(c=h),a=_,h++}let d=this.length-e;return this.length=e,c>-1&&(this.children.length=c,this.markDirty()),new MarkView(this.mark,s,d)}domAtPos(e){return inlineDOMAtPos(this.dom,this.children,e)}coordsAt(e,s){return coordsInChildren(this,e,s)}}function textCoords(o,e,s){let a=o.nodeValue.length;e>a&&(e=a);let c=e,h=e,d=0;e==0&&s<0||e==a&&s>=0?browser.chrome||browser.gecko||(e?(c--,d=1):h<a&&(h++,d=-1)):s<0?c--:h<a&&h++;let g=textRange(o,c,h).getClientRects();if(!g.length)return Rect0;let _=g[(d?d<0:s>=0)?0:g.length-1];return browser.safari&&!d&&_.width==0&&(_=Array.prototype.find.call(g,b=>b.width)||_),d?flattenRect(_,d<0):_||null}class WidgetView extends ContentView{constructor(e,s,a){super(),this.widget=e,this.length=s,this.side=a,this.prevWidget=null}static create(e,s,a){return new(e.customView||WidgetView)(e,s,a)}split(e){let s=WidgetView.create(this.widget,this.length-e,this.side);return this.length-=e,s}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,s,a,c,h,d){return a&&(!(a instanceof WidgetView)||!this.widget.compare(a.widget)||e>0&&h<=0||s<this.length&&d<=0)?!1:(this.length=e+(a?a.length:0)+(this.length-s),!0)}become(e){return e.length==this.length&&e instanceof WidgetView&&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 Text.empty;let e=this;for(;e.parent;)e=e.parent;let s=e.editorView,a=s&&s.state.doc,c=this.posAtStart;return a?a.slice(c,c+this.length):Text.empty}domAtPos(e){return e==0?DOMPos.before(this.dom):DOMPos.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,s){let a=this.dom.getClientRects(),c=null;if(!a.length)return Rect0;for(let h=e>0?a.length-1:0;c=a[h],!(e>0?h==0:h==a.length-1||c.top<c.bottom);h+=e>0?-1:1);return e==0&&s>0||e==this.length&&s<=0?c:flattenRect(c,e==0)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class CompositionView extends WidgetView{domAtPos(e){let{topView:s,text:a}=this.widget;return s?scanCompositionTree(e,0,s,a,(c,h)=>c.domAtPos(h),c=>new DOMPos(a,Math.min(c,a.nodeValue.length))):new DOMPos(a,Math.min(e,a.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,s){let{topView:a,text:c}=this.widget;return a?posFromDOMInCompositionTree(e,s,a,c):Math.min(s,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,s){let{topView:a,text:c}=this.widget;return a?scanCompositionTree(e,s,a,c,(h,d,g)=>h.coordsAt(d,g),(h,d)=>textCoords(c,h,d)):textCoords(c,e,s)}destroy(){var e;super.destroy(),(e=this.widget.topView)===null||e===void 0||e.destroy()}get isEditable(){return!0}}function scanCompositionTree(o,e,s,a,c,h){if(s instanceof MarkView){for(let d of s.children){let g=contains(d.dom,a),_=g?a.nodeValue.length:d.length;if(o<_||o==_&&d.getSide()<=0)return g?scanCompositionTree(o,e,d,a,c,h):c(d,o,e);o-=_}return c(s,s.length,-1)}else return s.dom==a?h(o,e):c(s,o,e)}function posFromDOMInCompositionTree(o,e,s,a){if(s instanceof MarkView)for(let c of s.children){let h=0,d=contains(c.dom,a);if(contains(c.dom,o))return h+(d?posFromDOMInCompositionTree(o,e,c,a):c.localPosFromDOM(o,e));h+=d?a.nodeValue.length:c.length}else if(s.dom==a)return Math.min(e,a.nodeValue.length);return s.localPosFromDOM(o,e)}class WidgetBufferView extends ContentView{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof WidgetBufferView&&e.side==this.side}split(){return new WidgetBufferView(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 DOMPos.before(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){let s=this.dom.getBoundingClientRect(),a=inlineSiblingRect(this,this.side>0?-1:1);return a&&a.top<s.bottom&&a.bottom>s.top?{left:s.left,right:s.right,top:a.top,bottom:a.bottom}:s}get overrideDOMText(){return Text.empty}}TextView.prototype.children=WidgetView.prototype.children=WidgetBufferView.prototype.children=noChildren;function inlineSiblingRect(o,e){let s=o.parent,a=s?s.children.indexOf(o):-1;for(;s&&a>=0;)if(e<0?a>0:a<s.children.length){let c=s.children[a+e];if(c instanceof TextView){let h=c.coordsAt(e<0?c.length:0,e);if(h)return h}a+=e}else if(s instanceof MarkView&&s.parent)a=s.parent.children.indexOf(s)+(e<0?0:1),s=s.parent;else{let c=s.dom.lastChild;if(c&&c.nodeName=="BR")return c.getClientRects()[0];break}}function inlineDOMAtPos(o,e,s){let a=0;for(let c=0;a<e.length;a++){let h=e[a],d=c+h.length;if(!(d==c&&h.getSide()<=0)){if(s>c&&s<d&&h.dom.parentNode==o)return h.domAtPos(s-c);if(s<=c)break;c=d}}for(;a>0;a--){let c=e[a-1].dom;if(c.parentNode==o)return DOMPos.after(c)}return new DOMPos(o,0)}function joinInlineInto(o,e,s){let a,{children:c}=o;s>0&&e instanceof MarkView&&c.length&&(a=c[c.length-1])instanceof MarkView&&a.mark.eq(e.mark)?joinInlineInto(a,e.children[0],s-1):(c.push(e),e.setParent(o)),o.length+=e.length}function coordsInChildren(o,e,s){for(let h=0,d=0;d<o.children.length;d++){let g=o.children[d],_=h+g.length,b;if((s<=0||_==o.length||g.getSide()>0?_>=e:_>e)&&(e<_||d+1==o.children.length||(b=o.children[d+1]).length||b.getSide()>0)){let $=0;if(_==h){if(g.getSide()<=0)continue;$=s=-g.getSide()}let j=g.coordsAt(Math.max(0,e-h),s);return $&&j?flattenRect(j,s<0):j}h=_}let a=o.dom.lastChild;if(!a)return o.dom.getBoundingClientRect();let c=clientRectsFor(a);return c[c.length-1]||null}function combineAttrs(o,e){for(let s in o)s=="class"&&e.class?e.class+=" "+o.class:s=="style"&&e.style?e.style+=";"+o.style:e[s]=o[s];return e}function attrsEq(o,e){if(o==e)return!0;if(!o||!e)return!1;let s=Object.keys(o),a=Object.keys(e);if(s.length!=a.length)return!1;for(let c of s)if(a.indexOf(c)==-1||o[c]!==e[c])return!1;return!0}function updateAttrs(o,e,s){let a=null;if(e)for(let c in e)s&&c in s||o.removeAttribute(a=c);if(s)for(let c in s)e&&e[c]==s[c]||o.setAttribute(a=c,s[c]);return!!a}class WidgetType{eq(e){return!1}updateDOM(e){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 BlockType=function(o){return o[o.Text=0]="Text",o[o.WidgetBefore=1]="WidgetBefore",o[o.WidgetAfter=2]="WidgetAfter",o[o.WidgetRange=3]="WidgetRange",o}(BlockType||(BlockType={}));class Decoration extends RangeValue{constructor(e,s,a,c){super(),this.startSide=e,this.endSide=s,this.widget=a,this.spec=c}get heightRelevant(){return!1}static mark(e){return new MarkDecoration(e)}static widget(e){let s=e.side||0,a=!!e.block;return s+=a?s>0?3e8:-4e8:s>0?1e8:-1e8,new PointDecoration(e,s,s,a,e.widget||null,!1)}static replace(e){let s=!!e.block,a,c;if(e.isBlockGap)a=-5e8,c=4e8;else{let{start:h,end:d}=getInclusive(e,s);a=(h?s?-3e8:-1:5e8)-1,c=(d?s?2e8:1:-6e8)+1}return new PointDecoration(e,a,c,s,e.widget||null,!0)}static line(e){return new LineDecoration(e)}static set(e,s=!1){return RangeSet.of(e,s)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Decoration.none=RangeSet.empty;class MarkDecoration extends Decoration{constructor(e){let{start:s,end:a}=getInclusive(e);super(s?-1:5e8,a?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 MarkDecoration&&this.tagName==e.tagName&&this.class==e.class&&attrsEq(this.attrs,e.attrs)}range(e,s=e){if(e>=s)throw new RangeError("Mark decorations may not be empty");return super.range(e,s)}}MarkDecoration.prototype.point=!1;class LineDecoration extends Decoration{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof LineDecoration&&attrsEq(this.spec.attributes,e.spec.attributes)}range(e,s=e){if(s!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,s)}}LineDecoration.prototype.mapMode=MapMode.TrackBefore;LineDecoration.prototype.point=!0;class PointDecoration extends Decoration{constructor(e,s,a,c,h,d){super(s,a,h,e),this.block=c,this.isReplace=d,this.mapMode=c?s<=0?MapMode.TrackBefore:MapMode.TrackAfter:MapMode.TrackDel}get type(){return this.startSide<this.endSide?BlockType.WidgetRange:this.startSide<=0?BlockType.WidgetBefore:BlockType.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(e){return e instanceof PointDecoration&&widgetsEq(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,s=e){if(this.isReplace&&(e>s||e==s&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&s!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,s)}}PointDecoration.prototype.point=!0;function getInclusive(o,e=!1){let{inclusiveStart:s,inclusiveEnd:a}=o;return s==null&&(s=o.inclusive),a==null&&(a=o.inclusive),{start:s!=null?s:e,end:a!=null?a:e}}function widgetsEq(o,e){return o==e||!!(o&&e&&o.compare(e))}function addRange(o,e,s,a=0){let c=s.length-1;c>=0&&s[c]+a>=o?s[c]=Math.max(s[c],e):s.push(o,e)}class LineView extends ContentView{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,s,a,c,h,d){if(a){if(!(a instanceof LineView))return!1;this.dom||a.transferDOM(this)}return c&&this.setDeco(a?a.attrs:null),mergeChildrenInto(this,e,s,a?a.children:[],h,d),!0}split(e){let s=new LineView;if(s.breakAfter=this.breakAfter,this.length==0)return s;let{i:a,off:c}=this.childPos(e);c&&(s.append(this.children[a].split(c),0),this.children[a].merge(c,this.children[a].length,null,!1,0,0),a++);for(let h=a;h<this.children.length;h++)s.append(this.children[h],0);for(;a>0&&this.children[a-1].length==0;)this.children[--a].destroy();return this.children.length=a,this.markDirty(),this.length=e,s}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){attrsEq(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,s){joinInlineInto(this,e,s)}addLineDeco(e){let s=e.spec.attributes,a=e.spec.class;s&&(this.attrs=combineAttrs(s,this.attrs||{})),a&&(this.attrs=combineAttrs({class:a},this.attrs||{}))}domAtPos(e){return inlineDOMAtPos(this.dom,this.children,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.dirty|=6)}sync(e){var s;this.dom?this.dirty&4&&(clearAttributes(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&&(updateAttrs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e);let a=this.dom.lastChild;for(;a&&ContentView.get(a)instanceof MarkView;)a=a.lastChild;if(!a||!this.length||a.nodeName!="BR"&&((s=ContentView.get(a))===null||s===void 0?void 0:s.isEditable)==!1&&(!browser.ios||!this.children.some(c=>c instanceof TextView))){let c=document.createElement("BR");c.cmIgnore=!0,this.dom.appendChild(c)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0;for(let s of this.children){if(!(s instanceof TextView)||/[^ -~]/.test(s.text))return null;let a=clientRectsFor(s.dom);if(a.length!=1)return null;e+=a[0].width}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length}:null}coordsAt(e,s){return coordsInChildren(this,e,s)}become(e){return!1}get type(){return BlockType.Text}static find(e,s){for(let a=0,c=0;a<e.children.length;a++){let h=e.children[a],d=c+h.length;if(d>=s){if(h instanceof LineView)return h;if(d>s)break}c=d+h.breakAfter}return null}}class BlockWidgetView extends ContentView{constructor(e,s,a){super(),this.widget=e,this.length=s,this.type=a,this.breakAfter=0,this.prevWidget=null}merge(e,s,a,c,h,d){return a&&(!(a instanceof BlockWidgetView)||!this.widget.compare(a.widget)||e>0&&h<=0||s<this.length&&d<=0)?!1:(this.length=e+(a?a.length:0)+(this.length-s),!0)}domAtPos(e){return e==0?DOMPos.before(this.dom):DOMPos.after(this.dom,e==this.length)}split(e){let s=this.length-e;this.length=e;let a=new BlockWidgetView(this.widget,s,this.type);return a.breakAfter=this.breakAfter,a}get children(){return noChildren}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Text.empty}domBoundsAround(){return null}become(e){return e instanceof BlockWidgetView&&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)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ContentBuilder{constructor(e,s,a,c){this.doc=e,this.pos=s,this.end=a,this.disallowBlockEffectsFor=c,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=s}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 BlockWidgetView&&e.type==BlockType.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new LineView),this.atCursorPos=!0),this.curLine}flushBuffer(e){this.pendingBuffer&&(this.curLine.append(wrapMarks(new WidgetBufferView(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer([]),this.curLine=null,this.content.push(e)}finish(e){e?this.pendingBuffer=0:this.flushBuffer([]),this.posCovered()||this.getLine()}buildText(e,s,a){for(;e>0;){if(this.textOff==this.text.length){let{value:h,lineBreak:d,done:g}=this.cursor.next(this.skip);if(this.skip=0,g)throw new Error("Ran out of text content when drawing inline views");if(d){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,e--;continue}else this.text=h,this.textOff=0}let c=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(s.slice(0,a)),this.getLine().append(wrapMarks(new TextView(this.text.slice(this.textOff,this.textOff+c)),s),a),this.atCursorPos=!0,this.textOff+=c,e-=c,a=0}}span(e,s,a,c){this.buildText(s-e,a,c),this.pos=s,this.openStart<0&&(this.openStart=c)}point(e,s,a,c,h,d){if(this.disallowBlockEffectsFor[d]&&a instanceof PointDecoration){if(a.block)throw new RangeError("Block decorations may not be specified via plugins");if(s>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let g=s-e;if(a instanceof PointDecoration)if(a.block){let{type:_}=a;_==BlockType.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new BlockWidgetView(a.widget||new NullWidget("div"),g,_))}else{let _=WidgetView.create(a.widget||new NullWidget("span"),g,a.startSide),b=this.atCursorPos&&!_.isEditable&&h<=c.length&&(e<s||a.startSide>0),$=!_.isEditable&&(e<s||a.startSide<=0),j=this.getLine();this.pendingBuffer==2&&!b&&(this.pendingBuffer=0),this.flushBuffer(c),b&&(j.append(wrapMarks(new WidgetBufferView(1),c),h),h=c.length+Math.max(0,h-c.length)),j.append(wrapMarks(_,c),h),this.atCursorPos=$,this.pendingBuffer=$?e<s?1:2:0}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(a);g&&(this.textOff+g<=this.text.length?this.textOff+=g:(this.skip+=g-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=s),this.openStart<0&&(this.openStart=h)}static build(e,s,a,c,h){let d=new ContentBuilder(e,s,a,h);return d.openEnd=RangeSet.spans(c,s,a,d),d.openStart<0&&(d.openStart=d.openEnd),d.finish(d.openEnd),d}}function wrapMarks(o,e){for(let s of e)o=new MarkView(s,[o],o.length);return o}class NullWidget extends WidgetType{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 clickAddsSelectionRange=Facet.define(),dragMovesSelection$1=Facet.define(),mouseSelectionStyle=Facet.define(),exceptionSink=Facet.define(),updateListener=Facet.define(),inputHandler$1=Facet.define(),perLineTextDirection=Facet.define({combine:o=>o.some(e=>e)});class ScrollTarget{constructor(e,s="nearest",a="nearest",c=5,h=5){this.range=e,this.y=s,this.x=a,this.yMargin=c,this.xMargin=h}map(e){return e.empty?this:new ScrollTarget(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const scrollIntoView$1=StateEffect.define({map:(o,e)=>o.map(e)});function logException(o,e,s){let a=o.facet(exceptionSink);a.length?a[0](e):window.onerror?window.onerror(String(e),s,void 0,void 0,e):s?console.error(s+":",e):console.error(e)}const editable=Facet.define({combine:o=>o.length?o[0]:!0});let nextPluginID=0;const viewPlugin=Facet.define();class ViewPlugin{constructor(e,s,a,c){this.id=e,this.create=s,this.domEventHandlers=a,this.extension=c(this)}static define(e,s){const{eventHandlers:a,provide:c,decorations:h}=s||{};return new ViewPlugin(nextPluginID++,e,a,d=>{let g=[viewPlugin.of(d)];return h&&g.push(decorations.of(_=>{let b=_.plugin(d);return b?h(b):Decoration.none})),c&&g.push(c(d)),g})}static fromClass(e,s){return ViewPlugin.define(a=>new e(a),s)}}class PluginInstance{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let s=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(s)}catch(a){if(logException(s.state,a,"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(s){logException(e.state,s,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var s;if(!((s=this.value)===null||s===void 0)&&s.destroy)try{this.value.destroy()}catch(a){logException(e.state,a,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const editorAttributes=Facet.define(),contentAttributes=Facet.define(),decorations=Facet.define(),atomicRanges=Facet.define(),scrollMargins=Facet.define(),styleModule=Facet.define();class ChangedRange{constructor(e,s,a,c){this.fromA=e,this.toA=s,this.fromB=a,this.toB=c}join(e){return new ChangedRange(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 s=e.length,a=this;for(;s>0;s--){let c=e[s-1];if(!(c.fromA>a.toA)){if(c.toA<a.fromA)break;a=a.join(c),e.splice(s-1,1)}}return e.splice(s,0,a),e}static extendWithRanges(e,s){if(s.length==0)return e;let a=[];for(let c=0,h=0,d=0,g=0;;c++){let _=c==e.length?null:e[c],b=d-g,$=_?_.fromB:1e9;for(;h<s.length&&s[h]<$;){let j=s[h],_e=s[h+1],et=Math.max(g,j),tt=Math.min($,_e);if(et<=tt&&new ChangedRange(et+b,tt+b,et,tt).addToSet(a),_e>$)break;h+=2}if(!_)return a;new ChangedRange(_.fromA,_.toA,_.fromB,_.toB).addToSet(a),d=_.toA,g=_.toB}}}class ViewUpdate{constructor(e,s,a){this.view=e,this.state=s,this.transactions=a,this.flags=0,this.startState=e.state,this.changes=ChangeSet.empty(this.startState.doc.length);for(let d of a)this.changes=this.changes.compose(d.changes);let c=[];this.changes.iterChangedRanges((d,g,_,b)=>c.push(new ChangedRange(d,g,_,b))),this.changedRanges=c;let h=e.hasFocus;h!=e.inputState.notifiedFocused&&(e.inputState.notifiedFocused=h,this.flags|=1)}static create(e,s,a){return new ViewUpdate(e,s,a)}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 Direction=function(o){return o[o.LTR=0]="LTR",o[o.RTL=1]="RTL",o}(Direction||(Direction={}));const LTR=Direction.LTR,RTL=Direction.RTL;function dec(o){let e=[];for(let s=0;s<o.length;s++)e.push(1<<+o[s]);return e}const LowTypes=dec("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),ArabicTypes=dec("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Brackets=Object.create(null),BracketStack=[];for(let o of["()","[]","{}"]){let e=o.charCodeAt(0),s=o.charCodeAt(1);Brackets[e]=s,Brackets[s]=-e}function charType(o){return o<=247?LowTypes[o]:1424<=o&&o<=1524?2:1536<=o&&o<=1785?ArabicTypes[o-1536]:1774<=o&&o<=2220?4:8192<=o&&o<=8203||o==8204?256:1}const BidiRE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;class BidiSpan{constructor(e,s,a){this.from=e,this.to=s,this.level=a}get dir(){return this.level%2?RTL:LTR}side(e,s){return this.dir==s==e?this.to:this.from}static find(e,s,a,c){let h=-1;for(let d=0;d<e.length;d++){let g=e[d];if(g.from<=s&&g.to>=s){if(g.level==a)return d;(h<0||(c!=0?c<0?g.from<s:g.to>s:e[h].level>g.level))&&(h=d)}}if(h<0)throw new RangeError("Index out of range");return h}}const types=[];function computeOrder(o,e){let s=o.length,a=e==LTR?1:2,c=e==LTR?2:1;if(!o||a==1&&!BidiRE.test(o))return trivialOrder(s);for(let d=0,g=a,_=a;d<s;d++){let b=charType(o.charCodeAt(d));b==512?b=g:b==8&&_==4&&(b=16),types[d]=b==4?2:b,b&7&&(_=b),g=b}for(let d=0,g=a,_=a;d<s;d++){let b=types[d];if(b==128)d<s-1&&g==types[d+1]&&g&24?b=types[d]=g:types[d]=256;else if(b==64){let $=d+1;for(;$<s&&types[$]==64;)$++;let j=d&&g==8||$<s&&types[$]==8?_==1?1:8:256;for(let _e=d;_e<$;_e++)types[_e]=j;d=$-1}else b==8&&_==1&&(types[d]=1);g=b,b&7&&(_=b)}for(let d=0,g=0,_=0,b,$,j;d<s;d++)if($=Brackets[b=o.charCodeAt(d)])if($<0){for(let _e=g-3;_e>=0;_e-=3)if(BracketStack[_e+1]==-$){let et=BracketStack[_e+2],tt=et&2?a:et&4?et&1?c:a:0;tt&&(types[d]=types[BracketStack[_e]]=tt),g=_e;break}}else{if(BracketStack.length==189)break;BracketStack[g++]=d,BracketStack[g++]=b,BracketStack[g++]=_}else if((j=types[d])==2||j==1){let _e=j==a;_=_e?0:1;for(let et=g-3;et>=0;et-=3){let tt=BracketStack[et+2];if(tt&2)break;if(_e)BracketStack[et+2]|=2;else{if(tt&4)break;BracketStack[et+2]|=4}}}for(let d=0;d<s;d++)if(types[d]==256){let g=d+1;for(;g<s&&types[g]==256;)g++;let _=(d?types[d-1]:a)==1,b=(g<s?types[g]:a)==1,$=_==b?_?1:2:a;for(let j=d;j<g;j++)types[j]=$;d=g-1}let h=[];if(a==1)for(let d=0;d<s;){let g=d,_=types[d++]!=1;for(;d<s&&_==(types[d]!=1);)d++;if(_)for(let b=d;b>g;){let $=b,j=types[--b]!=2;for(;b>g&&j==(types[b-1]!=2);)b--;h.push(new BidiSpan(b,$,j?2:1))}else h.push(new BidiSpan(g,d,0))}else for(let d=0;d<s;){let g=d,_=types[d++]==2;for(;d<s&&_==(types[d]==2);)d++;h.push(new BidiSpan(g,d,_?1:2))}return h}function trivialOrder(o){return[new BidiSpan(0,o,0)]}let movedOver="";function moveVisually(o,e,s,a,c){var h;let d=a.head-o.from,g=-1;if(d==0){if(!c||!o.length)return null;e[0].level!=s&&(d=e[0].side(!1,s),g=0)}else if(d==o.length){if(c)return null;let _e=e[e.length-1];_e.level!=s&&(d=_e.side(!0,s),g=e.length-1)}g<0&&(g=BidiSpan.find(e,d,(h=a.bidiLevel)!==null&&h!==void 0?h:-1,a.assoc));let _=e[g];d==_.side(c,s)&&(_=e[g+=c?1:-1],d=_.side(!c,s));let b=c==(_.dir==s),$=findClusterBreak(o.text,d,b);if(movedOver=o.text.slice(Math.min(d,$),Math.max(d,$)),$!=_.side(c,s))return EditorSelection.cursor($+o.from,b?-1:1,_.level);let j=g==(c?e.length-1:0)?null:e[g+(c?1:-1)];return!j&&_.level!=s?EditorSelection.cursor(c?o.to:o.from,c?-1:1,s):j&&j.level<_.level?EditorSelection.cursor(j.side(!c,s)+o.from,c?1:-1,j.level):EditorSelection.cursor($+o.from,c?-1:1,_.level)}const LineBreakPlaceholder="\uFFFF";class DOMReader{constructor(e,s){this.points=e,this.text="",this.lineSeparator=s.facet(EditorState.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=LineBreakPlaceholder}readRange(e,s){if(!e)return this;let a=e.parentNode;for(let c=e;;){this.findPointBefore(a,c),this.readNode(c);let h=c.nextSibling;if(h==s)break;let d=ContentView.get(c),g=ContentView.get(h);(d&&g?d.breakAfter:(d?d.breakAfter:isBlockElement(c))||isBlockElement(h)&&(c.nodeName!="BR"||c.cmIgnore))&&this.lineBreak(),c=h}return this.findPointBefore(a,s),this}readTextNode(e){let s=e.nodeValue;for(let a of this.points)a.node==e&&(a.pos=this.text.length+Math.min(a.offset,s.length));for(let a=0,c=this.lineSeparator?null:/\r\n?|\n/g;;){let h=-1,d=1,g;if(this.lineSeparator?(h=s.indexOf(this.lineSeparator,a),d=this.lineSeparator.length):(g=c.exec(s))&&(h=g.index,d=g[0].length),this.append(s.slice(a,h<0?s.length:h)),h<0)break;if(this.lineBreak(),d>1)for(let _ of this.points)_.node==e&&_.pos>this.text.length&&(_.pos-=d-1);a=h+d}}readNode(e){if(e.cmIgnore)return;let s=ContentView.get(e),a=s&&s.overrideDOMText;if(a!=null){this.findPointInside(e,a.length);for(let c=a.iter();!c.next().done;)c.lineBreak?this.lineBreak():this.append(c.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,s){for(let a of this.points)a.node==e&&e.childNodes[a.offset]==s&&(a.pos=this.text.length)}findPointInside(e,s){for(let a of this.points)(e.nodeType==3?a.node==e:e.contains(a.node))&&(a.pos=this.text.length+Math.min(s,a.offset))}}function isBlockElement(o){return o.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(o.nodeName)}class DOMPoint{constructor(e,s){this.node=e,this.offset=s,this.pos=-1}}class DocView extends ContentView{constructor(e){super(),this.view=e,this.compositionDeco=Decoration.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 LineView],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ChangedRange(0,0,0,e.state.doc.length)],0)}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(e){let s=e.changedRanges;this.minWidth>0&&s.length&&(s.every(({fromA:d,toA:g})=>g<this.minWidthFrom||d>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=Decoration.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=computeCompositionDeco(this.view,e.changes)),(browser.ie||browser.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,c=this.updateDeco(),h=findChangedDeco(a,c,e.changes);return s=ChangedRange.extendWithRanges(s,h),this.dirty==0&&s.length==0?!1:(this.updateInner(s,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,s){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,s);let{observer:a}=this.view;a.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let h=browser.chrome||browser.ios?{node:a.selectionRange.focusNode,written:!1}:void 0;this.sync(h),this.dirty=0,h&&(h.written||a.selectionRange.focusNode!=h.node)&&(this.forceSelection=!0),this.dom.style.height=""});let c=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let h of this.children)h instanceof BlockWidgetView&&h.widget instanceof BlockGapWidget&&c.push(h.dom);a.updateGaps(c)}updateChildren(e,s){let a=this.childCursor(s);for(let c=e.length-1;;c--){let h=c>=0?e[c]:null;if(!h)break;let{fromA:d,toA:g,fromB:_,toB:b}=h,{content:$,breakAtStart:j,openStart:_e,openEnd:et}=ContentBuilder.build(this.view.state.doc,_,b,this.decorations,this.dynamicDecorationMap),{i:tt,off:nt}=a.findPos(g,1),{i:st,off:rt}=a.findPos(d,-1);replaceRange(this,st,rt,tt,nt,$,j,_e,et)}}updateSelection(e=!1,s=!1){if((e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange(),!(s||this.mayControlSelection())||browser.ios&&this.view.inputState.rapidCompositionStart)return;let a=this.forceSelection;this.forceSelection=!1;let c=this.view.state.selection.main,h=this.domAtPos(c.anchor),d=c.empty?h:this.domAtPos(c.head);if(browser.gecko&&c.empty&&betweenUneditable(h)){let _=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(_,h.node.childNodes[h.offset]||null)),h=d=new DOMPos(_,0),a=!0}let g=this.view.observer.selectionRange;(a||!g.focusNode||!isEquivalentPosition(h.node,h.offset,g.anchorNode,g.anchorOffset)||!isEquivalentPosition(d.node,d.offset,g.focusNode,g.focusOffset))&&(this.view.observer.ignore(()=>{browser.android&&browser.chrome&&this.dom.contains(g.focusNode)&&inUneditable(g.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let _=getSelection(this.view.root);if(_)if(c.empty){if(browser.gecko){let b=nextToUneditable(h.node,h.offset);if(b&&b!=3){let $=nearbyTextNode(h.node,h.offset,b==1?1:-1);$&&(h=new DOMPos($,b==1?0:$.nodeValue.length))}}_.collapse(h.node,h.offset),c.bidiLevel!=null&&g.cursorBidiLevel!=null&&(g.cursorBidiLevel=c.bidiLevel)}else if(_.extend)_.collapse(h.node,h.offset),_.extend(d.node,d.offset);else{let b=document.createRange();c.anchor>c.head&&([h,d]=[d,h]),b.setEnd(d.node,d.offset),b.setStart(h.node,h.offset),_.removeAllRanges(),_.addRange(b)}}),this.view.observer.setSelectionRange(h,d)),this.impreciseAnchor=h.precise?null:new DOMPos(g.anchorNode,g.anchorOffset),this.impreciseHead=d.precise?null:new DOMPos(g.focusNode,g.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let e=this.view.state.selection.main,s=getSelection(this.view.root);if(!s||!e.empty||!e.assoc||!s.modify)return;let a=LineView.find(this,e.head);if(!a)return;let c=a.posAtStart;if(e.head==c||e.head==c+a.length)return;let h=this.coordsAt(e.head,-1),d=this.coordsAt(e.head,1);if(!h||!d||h.bottom>d.top)return;let g=this.domAtPos(e.head+e.assoc);s.collapse(g.node,g.offset),s.modify("move",e.assoc<0?"forward":"backward","lineboundary")}mayControlSelection(){let e=this.view.root.activeElement;return e==this.dom||hasSelection(this.dom,this.view.observer.selectionRange)&&!(e&&this.dom.contains(e))}nearest(e){for(let s=e;s;){let a=ContentView.get(s);if(a&&a.rootView==this)return a;s=s.parentNode}return null}posFromDOM(e,s){let a=this.nearest(e);if(!a)throw new RangeError("Trying to find position for a DOM position outside of the document");return a.localPosFromDOM(e,s)+a.posAtStart}domAtPos(e){let{i:s,off:a}=this.childCursor().findPos(e,-1);for(;s<this.children.length-1;){let c=this.children[s];if(a<c.length||c instanceof LineView)break;s++,a=0}return this.children[s].domAtPos(a)}coordsAt(e,s){for(let a=this.length,c=this.children.length-1;;c--){let h=this.children[c],d=a-h.breakAfter-h.length;if(e>d||e==d&&h.type!=BlockType.WidgetBefore&&h.type!=BlockType.WidgetAfter&&(!c||s==2||this.children[c-1].breakAfter||this.children[c-1].type==BlockType.WidgetBefore&&s>-2))return h.coordsAt(e-d,s);a=d}}measureVisibleLineHeights(e){let s=[],{from:a,to:c}=e,h=this.view.contentDOM.clientWidth,d=h>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,g=-1,_=this.view.textDirection==Direction.LTR;for(let b=0,$=0;$<this.children.length;$++){let j=this.children[$],_e=b+j.length;if(_e>c)break;if(b>=a){let et=j.dom.getBoundingClientRect();if(s.push(et.height),d){let tt=j.dom.lastChild,nt=tt?clientRectsFor(tt):[];if(nt.length){let st=nt[nt.length-1],rt=_?st.right-et.left:et.right-st.left;rt>g&&(g=rt,this.minWidth=h,this.minWidthFrom=b,this.minWidthTo=_e)}}}b=_e+j.breakAfter}return s}textDirectionAt(e){let{i:s}=this.childPos(e,1);return getComputedStyle(this.children[s].dom).direction=="rtl"?Direction.RTL:Direction.LTR}measureTextSize(){for(let c of this.children)if(c instanceof LineView){let h=c.measureTextSize();if(h)return h}let e=document.createElement("div"),s,a;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 c=clientRectsFor(e.firstChild)[0];s=e.getBoundingClientRect().height,a=c?c.width/27:7,e.remove()}),{lineHeight:s,charWidth:a}}childCursor(e=this.length){let s=this.children.length;return s&&(e-=this.children[--s].length),new ChildCursor(this.children,e,s)}computeBlockGapDeco(){let e=[],s=this.view.viewState;for(let a=0,c=0;;c++){let h=c==s.viewports.length?null:s.viewports[c],d=h?h.from-1:this.length;if(d>a){let g=s.lineBlockAt(d).bottom-s.lineBlockAt(a).top;e.push(Decoration.replace({widget:new BlockGapWidget(g),block:!0,inclusive:!0,isBlockGap:!0}).range(a,d))}if(!h)break;a=h.to+1}return Decoration.set(e)}updateDeco(){let e=this.view.state.facet(decorations).map((s,a)=>(this.dynamicDecorationMap[a]=typeof s=="function")?s(this.view):s);for(let s=e.length;s<e.length+3;s++)this.dynamicDecorationMap[s]=!1;return this.decorations=[...e,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){let{range:s}=e,a=this.coordsAt(s.head,s.empty?s.assoc:s.head>s.anchor?-1:1),c;if(!a)return;!s.empty&&(c=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,c.left),top:Math.min(a.top,c.top),right:Math.max(a.right,c.right),bottom:Math.max(a.bottom,c.bottom)});let h=0,d=0,g=0,_=0;for(let $ of this.view.state.facet(scrollMargins).map(j=>j(this.view)))if($){let{left:j,right:_e,top:et,bottom:tt}=$;j!=null&&(h=Math.max(h,j)),_e!=null&&(d=Math.max(d,_e)),et!=null&&(g=Math.max(g,et)),tt!=null&&(_=Math.max(_,tt))}let b={left:a.left-h,top:a.top-g,right:a.right+d,bottom:a.bottom+_};scrollRectIntoView(this.view.scrollDOM,b,s.head<s.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==Direction.LTR)}}function betweenUneditable(o){return o.node.nodeType==1&&o.node.firstChild&&(o.offset==0||o.node.childNodes[o.offset-1].contentEditable=="false")&&(o.offset==o.node.childNodes.length||o.node.childNodes[o.offset].contentEditable=="false")}class BlockGapWidget extends WidgetType{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 compositionSurroundingNode(o){let e=o.observer.selectionRange,s=e.focusNode&&nearbyTextNode(e.focusNode,e.focusOffset,0);if(!s)return null;let a=o.docView.nearest(s);if(!a)return null;if(a instanceof LineView){let c=s;for(;c.parentNode!=a.dom;)c=c.parentNode;let h=c.previousSibling;for(;h&&!ContentView.get(h);)h=h.previousSibling;let d=h?ContentView.get(h).posAtEnd:a.posAtStart;return{from:d,to:d,node:c,text:s}}else{for(;;){let{parent:h}=a;if(!h)return null;if(h instanceof LineView)break;a=h}let c=a.posAtStart;return{from:c,to:c+a.length,node:a.dom,text:s}}}function computeCompositionDeco(o,e){let s=compositionSurroundingNode(o);if(!s)return Decoration.none;let{from:a,to:c,node:h,text:d}=s,g=e.mapPos(a,1),_=Math.max(g,e.mapPos(c,-1)),{state:b}=o,$=h.nodeType==3?h.nodeValue:new DOMReader([],b).readRange(h.firstChild,null).text;if(_-g<$.length)if(b.doc.sliceString(g,Math.min(b.doc.length,g+$.length),LineBreakPlaceholder)==$)_=g+$.length;else if(b.doc.sliceString(Math.max(0,_-$.length),_,LineBreakPlaceholder)==$)g=_-$.length;else return Decoration.none;else if(b.doc.sliceString(g,_,LineBreakPlaceholder)!=$)return Decoration.none;let j=ContentView.get(h);return j instanceof CompositionView?j=j.widget.topView:j&&(j.parent=null),Decoration.set(Decoration.replace({widget:new CompositionWidget(h,d,j),inclusive:!0}).range(g,_))}class CompositionWidget extends WidgetType{constructor(e,s,a){super(),this.top=e,this.text=s,this.topView=a}eq(e){return this.top==e.top&&this.text==e.text}toDOM(){return this.top}ignoreEvent(){return!1}get customView(){return CompositionView}}function nearbyTextNode(o,e,s){for(;;){if(o.nodeType==3)return o;if(o.nodeType==1&&e>0&&s<=0)o=o.childNodes[e-1],e=maxOffset(o);else if(o.nodeType==1&&e<o.childNodes.length&&s>=0)o=o.childNodes[e],e=0;else return null}}function nextToUneditable(o,e){return o.nodeType!=1?0:(e&&o.childNodes[e-1].contentEditable=="false"?1:0)|(e<o.childNodes.length&&o.childNodes[e].contentEditable=="false"?2:0)}class DecorationComparator$1{constructor(){this.changes=[]}compareRange(e,s){addRange(e,s,this.changes)}comparePoint(e,s){addRange(e,s,this.changes)}}function findChangedDeco(o,e,s){let a=new DecorationComparator$1;return RangeSet.compare(o,e,s,a),a.changes}function inUneditable(o,e){for(let s=o;s&&s!=e;s=s.assignedSlot||s.parentNode)if(s.nodeType==1&&s.contentEditable=="false")return!0;return!1}function groupAt(o,e,s=1){let a=o.charCategorizer(e),c=o.doc.lineAt(e),h=e-c.from;if(c.length==0)return EditorSelection.cursor(e);h==0?s=1:h==c.length&&(s=-1);let d=h,g=h;s<0?d=findClusterBreak(c.text,h,!1):g=findClusterBreak(c.text,h);let _=a(c.text.slice(d,g));for(;d>0;){let b=findClusterBreak(c.text,d,!1);if(a(c.text.slice(b,d))!=_)break;d=b}for(;g<c.length;){let b=findClusterBreak(c.text,g);if(a(c.text.slice(g,b))!=_)break;g=b}return EditorSelection.range(d+c.from,g+c.from)}function getdx(o,e){return e.left>o?e.left-o:Math.max(0,o-e.right)}function getdy(o,e){return e.top>o?e.top-o:Math.max(0,o-e.bottom)}function yOverlap(o,e){return o.top<e.bottom-1&&o.bottom>e.top+1}function upTop(o,e){return e<o.top?{top:e,left:o.left,right:o.right,bottom:o.bottom}:o}function upBot(o,e){return e>o.bottom?{top:o.top,left:o.left,right:o.right,bottom:e}:o}function domPosAtCoords(o,e,s){let a,c,h,d,g=!1,_,b,$,j;for(let tt=o.firstChild;tt;tt=tt.nextSibling){let nt=clientRectsFor(tt);for(let st=0;st<nt.length;st++){let rt=nt[st];c&&yOverlap(c,rt)&&(rt=upTop(upBot(rt,c.bottom),c.top));let it=getdx(e,rt),at=getdy(s,rt);if(it==0&&at==0)return tt.nodeType==3?domPosInText(tt,e,s):domPosAtCoords(tt,e,s);(!a||d>at||d==at&&h>it)&&(a=tt,c=rt,h=it,d=at,g=!it||(it>0?st<nt.length-1:st>0)),it==0?s>rt.bottom&&(!$||$.bottom<rt.bottom)?(_=tt,$=rt):s<rt.top&&(!j||j.top>rt.top)&&(b=tt,j=rt):$&&yOverlap($,rt)?$=upBot($,rt.bottom):j&&yOverlap(j,rt)&&(j=upTop(j,rt.top))}}if($&&$.bottom>=s?(a=_,c=$):j&&j.top<=s&&(a=b,c=j),!a)return{node:o,offset:0};let _e=Math.max(c.left,Math.min(c.right,e));if(a.nodeType==3)return domPosInText(a,_e,s);if(g&&a.contentEditable!="false")return domPosAtCoords(a,_e,s);let et=Array.prototype.indexOf.call(o.childNodes,a)+(e>=(c.left+c.right)/2?1:0);return{node:o,offset:et}}function domPosInText(o,e,s){let a=o.nodeValue.length,c=-1,h=1e9,d=0;for(let g=0;g<a;g++){let _=textRange(o,g,g+1).getClientRects();for(let b=0;b<_.length;b++){let $=_[b];if($.top==$.bottom)continue;d||(d=e-$.left);let j=($.top>s?$.top-s:s-$.bottom)-1;if($.left-1<=e&&$.right+1>=e&&j<h){let _e=e>=($.left+$.right)/2,et=_e;if((browser.chrome||browser.gecko)&&textRange(o,g).getBoundingClientRect().left==$.right&&(et=!_e),j<=0)return{node:o,offset:g+(et?1:0)};c=g+(et?1:0),h=j}}}return{node:o,offset:c>-1?c:d>0?o.nodeValue.length:0}}function posAtCoords(o,{x:e,y:s},a,c=-1){var h;let d=o.contentDOM.getBoundingClientRect(),g=d.top+o.viewState.paddingTop,_,{docHeight:b}=o.viewState,$=s-g;if($<0)return 0;if($>b)return o.state.doc.length;for(let rt=o.defaultLineHeight/2,it=!1;_=o.elementAtHeight($),_.type!=BlockType.Text;)for(;$=c>0?_.bottom+rt:_.top-rt,!($>=0&&$<=b);){if(it)return a?null:0;it=!0,c=-c}s=g+$;let j=_.from;if(j<o.viewport.from)return o.viewport.from==0?0:a?null:posAtCoordsImprecise(o,d,_,e,s);if(j>o.viewport.to)return o.viewport.to==o.state.doc.length?o.state.doc.length:a?null:posAtCoordsImprecise(o,d,_,e,s);let _e=o.dom.ownerDocument,et=o.root.elementFromPoint?o.root:_e,tt=et.elementFromPoint(e,s);tt&&!o.contentDOM.contains(tt)&&(tt=null),tt||(e=Math.max(d.left+1,Math.min(d.right-1,e)),tt=et.elementFromPoint(e,s),tt&&!o.contentDOM.contains(tt)&&(tt=null));let nt,st=-1;if(tt&&((h=o.docView.nearest(tt))===null||h===void 0?void 0:h.isEditable)!=!1){if(_e.caretPositionFromPoint){let rt=_e.caretPositionFromPoint(e,s);rt&&({offsetNode:nt,offset:st}=rt)}else if(_e.caretRangeFromPoint){let rt=_e.caretRangeFromPoint(e,s);rt&&({startContainer:nt,startOffset:st}=rt,(!o.contentDOM.contains(nt)||browser.safari&&isSuspiciousSafariCaretResult(nt,st,e)||browser.chrome&&isSuspiciousChromeCaretResult(nt,st,e))&&(nt=void 0))}}if(!nt||!o.docView.dom.contains(nt)){let rt=LineView.find(o.docView,j);if(!rt)return $>_.top+_.height/2?_.to:_.from;({node:nt,offset:st}=domPosAtCoords(rt.dom,e,s))}return o.docView.posFromDOM(nt,st)}function posAtCoordsImprecise(o,e,s,a,c){let h=Math.round((a-e.left)*o.defaultCharacterWidth);o.lineWrapping&&s.height>o.defaultLineHeight*1.5&&(h+=Math.floor((c-s.top)/o.defaultLineHeight)*o.viewState.heightOracle.lineLength);let d=o.state.sliceDoc(s.from,s.to);return s.from+findColumn(d,h,o.state.tabSize)}function isSuspiciousSafariCaretResult(o,e,s){let a;if(o.nodeType!=3||e!=(a=o.nodeValue.length))return!1;for(let c=o.nextSibling;c;c=c.nextSibling)if(c.nodeType!=1||c.nodeName!="BR")return!1;return textRange(o,a-1,a).getBoundingClientRect().left>s}function isSuspiciousChromeCaretResult(o,e,s){if(e!=0)return!1;for(let c=o;;){let h=c.parentNode;if(!h||h.nodeType!=1||h.firstChild!=c)return!1;if(h.classList.contains("cm-line"))break;c=h}let a=o.nodeType==1?o.getBoundingClientRect():textRange(o,0,Math.max(o.nodeValue.length,1)).getBoundingClientRect();return s-a.left>5}function moveToLineBoundary(o,e,s,a){let c=o.state.doc.lineAt(e.head),h=!a||!o.lineWrapping?null:o.coordsAtPos(e.assoc<0&&e.head>c.from?e.head-1:e.head);if(h){let _=o.dom.getBoundingClientRect(),b=o.textDirectionAt(c.from),$=o.posAtCoords({x:s==(b==Direction.LTR)?_.right-1:_.left+1,y:(h.top+h.bottom)/2});if($!=null)return EditorSelection.cursor($,s?-1:1)}let d=LineView.find(o.docView,e.head),g=d?s?d.posAtEnd:d.posAtStart:s?c.to:c.from;return EditorSelection.cursor(g,s?-1:1)}function moveByChar(o,e,s,a){let c=o.state.doc.lineAt(e.head),h=o.bidiSpans(c),d=o.textDirectionAt(c.from);for(let g=e,_=null;;){let b=moveVisually(c,h,d,g,s),$=movedOver;if(!b){if(c.number==(s?o.state.doc.lines:1))return g;$=`
|
||
`,c=o.state.doc.line(c.number+(s?1:-1)),h=o.bidiSpans(c),b=EditorSelection.cursor(s?c.from:c.to)}if(_){if(!_($))return g}else{if(!a)return b;_=a($)}g=b}}function byGroup(o,e,s){let a=o.state.charCategorizer(e),c=a(s);return h=>{let d=a(h);return c==CharCategory.Space&&(c=d),c==d}}function moveVertically(o,e,s,a){let c=e.head,h=s?1:-1;if(c==(s?o.state.doc.length:0))return EditorSelection.cursor(c,e.assoc);let d=e.goalColumn,g,_=o.contentDOM.getBoundingClientRect(),b=o.coordsAtPos(c),$=o.documentTop;if(b)d==null&&(d=b.left-_.left),g=h<0?b.top:b.bottom;else{let et=o.viewState.lineBlockAt(c);d==null&&(d=Math.min(_.right-_.left,o.defaultCharacterWidth*(c-et.from))),g=(h<0?et.top:et.bottom)+$}let j=_.left+d,_e=a!=null?a:o.defaultLineHeight>>1;for(let et=0;;et+=10){let tt=g+(_e+et)*h,nt=posAtCoords(o,{x:j,y:tt},!1,h);if(tt<_.top||tt>_.bottom||(h<0?nt<c:nt>c))return EditorSelection.cursor(nt,e.assoc,void 0,d)}}function skipAtoms(o,e,s){let a=o.state.facet(atomicRanges).map(c=>c(o));for(;;){let c=!1;for(let h of a)h.between(s.from-1,s.from+1,(d,g,_)=>{s.from>d&&s.from<g&&(s=e.from>s.from?EditorSelection.cursor(d,1):EditorSelection.cursor(g,-1),c=!0)});if(!c)return s}}class InputState{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.rapidCompositionStart=!1,this.mouseSelection=null;for(let s in handlers){let a=handlers[s];e.contentDOM.addEventListener(s,c=>{!eventBelongsToEditor(e,c)||this.ignoreDuringComposition(c)||s=="keydown"&&this.keydown(e,c)||(this.mustFlushObserver(c)&&e.observer.forceFlush(),this.runCustomHandlers(s,e,c)?c.preventDefault():a(e,c))},handlerOptions[s]),this.registeredEvents.push(s)}browser.chrome&&browser.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,browser.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,s){var a;let c;this.customHandlers=[];for(let h of s)if(c=(a=h.update(e).spec)===null||a===void 0?void 0:a.domEventHandlers){this.customHandlers.push({plugin:h.value,handlers:c});for(let d in c)this.registeredEvents.indexOf(d)<0&&d!="scroll"&&(this.registeredEvents.push(d),e.contentDOM.addEventListener(d,g=>{!eventBelongsToEditor(e,g)||this.runCustomHandlers(d,e,g)&&g.preventDefault()}))}}runCustomHandlers(e,s,a){for(let c of this.customHandlers){let h=c.handlers[e];if(h)try{if(h.call(c.plugin,a,s)||a.defaultPrevented)return!0}catch(d){logException(s.state,d)}}return!1}runScrollHandlers(e,s){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let a of this.customHandlers){let c=a.handlers.scroll;if(c)try{c.call(a.plugin,s,e)}catch(h){logException(e.state,h)}}}keydown(e,s){if(this.lastKeyCode=s.keyCode,this.lastKeyTime=Date.now(),s.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(browser.android&&browser.chrome&&!s.synthetic&&(s.keyCode==13||s.keyCode==8))return e.observer.delayAndroidKey(s.key,s.keyCode),!0;let a;return browser.ios&&(a=PendingKeys.find(c=>c.keyCode==s.keyCode))&&!(s.ctrlKey||s.altKey||s.metaKey)&&!s.synthetic?(this.pendingIOSKey=a,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let s=this.pendingIOSKey;return s?(this.pendingIOSKey=void 0,dispatchKey(e.contentDOM,s.key,s.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:browser.safari&&!browser.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229||e.type=="compositionend"&&!browser.ios}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 PendingKeys=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],modifierCodes=[16,17,18,20,91,92,224,225];class MouseSelection{constructor(e,s,a,c){this.view=e,this.style=a,this.mustSelect=c,this.lastEvent=s;let h=e.contentDOM.ownerDocument;h.addEventListener("mousemove",this.move=this.move.bind(this)),h.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=s.shiftKey,this.multiple=e.state.facet(EditorState.allowMultipleSelections)&&addsSelectionRange(e,s),this.dragMove=dragMovesSelection(e,s),this.dragging=isInPrimarySelection(e,s)&&getClickType(s)==1?null:!1,this.dragging===!1&&(s.preventDefault(),this.select(s))}move(e){if(e.buttons==0)return this.destroy();this.dragging===!1&&this.select(this.lastEvent=e)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}select(e){let s=this.style.get(e,this.extend,this.multiple);(this.mustSelect||!s.eq(this.view.state.selection)||s.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:s,userEvent:"select.pointer",scrollIntoView:!0}),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 addsSelectionRange(o,e){let s=o.state.facet(clickAddsSelectionRange);return s.length?s[0](e):browser.mac?e.metaKey:e.ctrlKey}function dragMovesSelection(o,e){let s=o.state.facet(dragMovesSelection$1);return s.length?s[0](e):browser.mac?!e.altKey:!e.ctrlKey}function isInPrimarySelection(o,e){let{main:s}=o.state.selection;if(s.empty)return!1;let a=getSelection(o.root);if(!a||a.rangeCount==0)return!0;let c=a.getRangeAt(0).getClientRects();for(let h=0;h<c.length;h++){let d=c[h];if(d.left<=e.clientX&&d.right>=e.clientX&&d.top<=e.clientY&&d.bottom>=e.clientY)return!0}return!1}function eventBelongsToEditor(o,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let s=e.target,a;s!=o.contentDOM;s=s.parentNode)if(!s||s.nodeType==11||(a=ContentView.get(s))&&a.ignoreEvent(e))return!1;return!0}const handlers=Object.create(null),handlerOptions=Object.create(null),brokenClipboardAPI=browser.ie&&browser.ie_version<15||browser.ios&&browser.webkit_version<604;function capturePaste(o){let e=o.dom.parentNode;if(!e)return;let s=e.appendChild(document.createElement("textarea"));s.style.cssText="position: fixed; left: -10000px; top: 10px",s.focus(),setTimeout(()=>{o.focus(),s.remove(),doPaste(o,s.value)},50)}function doPaste(o,e){let{state:s}=o,a,c=1,h=s.toText(e),d=h.lines==s.selection.ranges.length;if(lastLinewiseCopy!=null&&s.selection.ranges.every(_=>_.empty)&&lastLinewiseCopy==h.toString()){let _=-1;a=s.changeByRange(b=>{let $=s.doc.lineAt(b.from);if($.from==_)return{range:b};_=$.from;let j=s.toText((d?h.line(c++).text:e)+s.lineBreak);return{changes:{from:$.from,insert:j},range:EditorSelection.cursor(b.from+j.length)}})}else d?a=s.changeByRange(_=>{let b=h.line(c++);return{changes:{from:_.from,to:_.to,insert:b.text},range:EditorSelection.cursor(_.from+b.length)}}):a=s.replaceSelection(h);o.dispatch(a,{userEvent:"input.paste",scrollIntoView:!0})}handlers.keydown=(o,e)=>{o.inputState.setSelectionOrigin("select"),e.keyCode==27?o.inputState.lastEscPress=Date.now():modifierCodes.indexOf(e.keyCode)<0&&(o.inputState.lastEscPress=0)};handlers.touchstart=(o,e)=>{o.inputState.lastTouchTime=Date.now(),o.inputState.setSelectionOrigin("select.pointer")};handlers.touchmove=o=>{o.inputState.setSelectionOrigin("select.pointer")};handlerOptions.touchstart=handlerOptions.touchmove={passive:!0};handlers.mousedown=(o,e)=>{if(o.observer.flush(),o.inputState.lastTouchTime>Date.now()-2e3&&getClickType(e)==1)return;let s=null;for(let a of o.state.facet(mouseSelectionStyle))if(s=a(o,e),s)break;if(!s&&e.button==0&&(s=basicMouseSelection(o,e)),s){let a=o.root.activeElement!=o.contentDOM;a&&o.observer.ignore(()=>focusPreventScroll(o.contentDOM)),o.inputState.startMouseSelection(new MouseSelection(o,e,s,a))}};function rangeForClick(o,e,s,a){if(a==1)return EditorSelection.cursor(e,s);if(a==2)return groupAt(o.state,e,s);{let c=LineView.find(o.docView,e),h=o.state.doc.lineAt(c?c.posAtEnd:e),d=c?c.posAtStart:h.from,g=c?c.posAtEnd:h.to;return g<o.state.doc.length&&g==h.to&&g++,EditorSelection.range(d,g)}}let insideY=(o,e)=>o>=e.top&&o<=e.bottom,inside=(o,e,s)=>insideY(e,s)&&o>=s.left&&o<=s.right;function findPositionSide(o,e,s,a){let c=LineView.find(o.docView,e);if(!c)return 1;let h=e-c.posAtStart;if(h==0)return 1;if(h==c.length)return-1;let d=c.coordsAt(h,-1);if(d&&inside(s,a,d))return-1;let g=c.coordsAt(h,1);return g&&inside(s,a,g)?1:d&&insideY(a,d)?-1:1}function queryPos(o,e){let s=o.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:s,bias:findPositionSide(o,s,e.clientX,e.clientY)}}const BadMouseDetail=browser.ie&&browser.ie_version<=11;let lastMouseDown=null,lastMouseDownCount=0,lastMouseDownTime=0;function getClickType(o){if(!BadMouseDetail)return o.detail;let e=lastMouseDown,s=lastMouseDownTime;return lastMouseDown=o,lastMouseDownTime=Date.now(),lastMouseDownCount=!e||s>Date.now()-400&&Math.abs(e.clientX-o.clientX)<2&&Math.abs(e.clientY-o.clientY)<2?(lastMouseDownCount+1)%3:1}function basicMouseSelection(o,e){let s=queryPos(o,e),a=getClickType(e),c=o.state.selection,h=s,d=e;return{update(g){g.docChanged&&(s&&(s.pos=g.changes.mapPos(s.pos)),c=c.map(g.changes),d=null)},get(g,_,b){let $;if(d&&g.clientX==d.clientX&&g.clientY==d.clientY?$=h:($=h=queryPos(o,g),d=g),!$||!s)return c;let j=rangeForClick(o,$.pos,$.bias,a);if(s.pos!=$.pos&&!_){let _e=rangeForClick(o,s.pos,s.bias,a),et=Math.min(_e.from,j.from),tt=Math.max(_e.to,j.to);j=et<j.from?EditorSelection.range(et,tt):EditorSelection.range(tt,et)}return _?c.replaceRange(c.main.extend(j.from,j.to)):b&&c.ranges.length>1&&c.ranges.some(_e=>_e.eq(j))?removeRange(c,j):b?c.addRange(j):EditorSelection.create([j])}}}function removeRange(o,e){for(let s=0;;s++)if(o.ranges[s].eq(e))return EditorSelection.create(o.ranges.slice(0,s).concat(o.ranges.slice(s+1)),o.mainIndex==s?0:o.mainIndex-(o.mainIndex>s?1:0))}handlers.dragstart=(o,e)=>{let{selection:{main:s}}=o.state,{mouseSelection:a}=o.inputState;a&&(a.dragging=s),e.dataTransfer&&(e.dataTransfer.setData("Text",o.state.sliceDoc(s.from,s.to)),e.dataTransfer.effectAllowed="copyMove")};function dropText(o,e,s,a){if(!s)return;let c=o.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:h}=o.inputState,d=a&&h&&h.dragging&&h.dragMove?{from:h.dragging.from,to:h.dragging.to}:null,g={from:c,insert:s},_=o.state.changes(d?[d,g]:g);o.focus(),o.dispatch({changes:_,selection:{anchor:_.mapPos(c,-1),head:_.mapPos(c,1)},userEvent:d?"move.drop":"input.drop"})}handlers.drop=(o,e)=>{if(!e.dataTransfer)return;if(o.state.readOnly)return e.preventDefault();let s=e.dataTransfer.files;if(s&&s.length){e.preventDefault();let a=Array(s.length),c=0,h=()=>{++c==s.length&&dropText(o,e,a.filter(d=>d!=null).join(o.state.lineBreak),!1)};for(let d=0;d<s.length;d++){let g=new FileReader;g.onerror=h,g.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(g.result)||(a[d]=g.result),h()},g.readAsText(s[d])}}else dropText(o,e,e.dataTransfer.getData("Text"),!0)};handlers.paste=(o,e)=>{if(o.state.readOnly)return e.preventDefault();o.observer.flush();let s=brokenClipboardAPI?null:e.clipboardData;s?(doPaste(o,s.getData("text/plain")),e.preventDefault()):capturePaste(o)};function captureCopy(o,e){let s=o.dom.parentNode;if(!s)return;let a=s.appendChild(document.createElement("textarea"));a.style.cssText="position: fixed; left: -10000px; top: 10px",a.value=e,a.focus(),a.selectionEnd=e.length,a.selectionStart=0,setTimeout(()=>{a.remove(),o.focus()},50)}function copiedRange(o){let e=[],s=[],a=!1;for(let c of o.selection.ranges)c.empty||(e.push(o.sliceDoc(c.from,c.to)),s.push(c));if(!e.length){let c=-1;for(let{from:h}of o.selection.ranges){let d=o.doc.lineAt(h);d.number>c&&(e.push(d.text),s.push({from:d.from,to:Math.min(o.doc.length,d.to+1)})),c=d.number}a=!0}return{text:e.join(o.lineBreak),ranges:s,linewise:a}}let lastLinewiseCopy=null;handlers.copy=handlers.cut=(o,e)=>{let{text:s,ranges:a,linewise:c}=copiedRange(o.state);if(!s&&!c)return;lastLinewiseCopy=c?s:null;let h=brokenClipboardAPI?null:e.clipboardData;h?(e.preventDefault(),h.clearData(),h.setData("text/plain",s)):captureCopy(o,s),e.type=="cut"&&!o.state.readOnly&&o.dispatch({changes:a,scrollIntoView:!0,userEvent:"delete.cut"})};function updateForFocusChange(o){setTimeout(()=>{o.hasFocus!=o.inputState.notifiedFocused&&o.update([])},10)}handlers.focus=o=>{o.inputState.lastFocusTime=Date.now(),!o.scrollDOM.scrollTop&&(o.inputState.lastScrollTop||o.inputState.lastScrollLeft)&&(o.scrollDOM.scrollTop=o.inputState.lastScrollTop,o.scrollDOM.scrollLeft=o.inputState.lastScrollLeft),updateForFocusChange(o)};handlers.blur=o=>{o.observer.clearSelectionRange(),updateForFocusChange(o)};function forceClearComposition(o,e){if(o.docView.compositionDeco.size){o.inputState.rapidCompositionStart=e;try{o.update([])}finally{o.inputState.rapidCompositionStart=!1}}}handlers.compositionstart=handlers.compositionupdate=o=>{o.inputState.compositionFirstChange==null&&(o.inputState.compositionFirstChange=!0),o.inputState.composing<0&&(o.inputState.composing=0,o.docView.compositionDeco.size&&(o.observer.flush(),forceClearComposition(o,!0)))};handlers.compositionend=o=>{o.inputState.composing=-1,o.inputState.compositionEndedAt=Date.now(),o.inputState.compositionFirstChange=null,setTimeout(()=>{o.inputState.composing<0&&forceClearComposition(o,!1)},50)};handlers.contextmenu=o=>{o.inputState.lastContextMenu=Date.now()};handlers.beforeinput=(o,e)=>{var s;let a;if(browser.chrome&&browser.android&&(a=PendingKeys.find(c=>c.inputType==e.inputType))&&(o.observer.delayAndroidKey(a.key,a.keyCode),a.key=="Backspace"||a.key=="Delete")){let c=((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0;setTimeout(()=>{var h;(((h=window.visualViewport)===null||h===void 0?void 0:h.height)||0)>c+10&&o.hasFocus&&(o.contentDOM.blur(),o.focus())},100)}};const wrappingWhiteSpace=["pre-wrap","normal","pre-line","break-spaces"];class HeightOracle{constructor(){this.doc=Text.empty,this.lineWrapping=!1,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(e,s){let a=this.doc.lineAt(s).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(a+=Math.ceil((s-e-a*this.lineLength*.5)/this.lineLength)),this.lineHeight*a}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 wrappingWhiteSpace.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let s=!1;for(let a=0;a<e.length;a++){let c=e[a];c<0?a++:this.heightSamples[Math.floor(c*10)]||(s=!0,this.heightSamples[Math.floor(c*10)]=!0)}return s}refresh(e,s,a,c,h){let d=wrappingWhiteSpace.indexOf(e)>-1,g=Math.round(s)!=Math.round(this.lineHeight)||this.lineWrapping!=d;if(this.lineWrapping=d,this.lineHeight=s,this.charWidth=a,this.lineLength=c,g){this.heightSamples={};for(let _=0;_<h.length;_++){let b=h[_];b<0?_++:this.heightSamples[Math.floor(b*10)]=!0}}return g}}class MeasuredHeights{constructor(e,s){this.from=e,this.heights=s,this.index=0}get more(){return this.index<this.heights.length}}class BlockInfo{constructor(e,s,a,c,h){this.from=e,this.length=s,this.top=a,this.height=c,this.type=h}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(e){let s=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(e.type)?e.type:[e]);return new BlockInfo(this.from,this.length+e.length,this.top,this.height+e.height,s)}}var QueryType$1=function(o){return o[o.ByPos=0]="ByPos",o[o.ByHeight=1]="ByHeight",o[o.ByPosNoHeight=2]="ByPosNoHeight",o}(QueryType$1||(QueryType$1={}));const Epsilon=.001;class HeightMap{constructor(e,s,a=2){this.length=e,this.height=s,this.flags=a}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,s){this.height!=s&&(Math.abs(this.height-s)>Epsilon&&(e.heightChanged=!0),this.height=s)}replace(e,s,a){return HeightMap.of(a)}decomposeLeft(e,s){s.push(this)}decomposeRight(e,s){s.push(this)}applyChanges(e,s,a,c){let h=this;for(let d=c.length-1;d>=0;d--){let{fromA:g,toA:_,fromB:b,toB:$}=c[d],j=h.lineAt(g,QueryType$1.ByPosNoHeight,s,0,0),_e=j.to>=_?j:h.lineAt(_,QueryType$1.ByPosNoHeight,s,0,0);for($+=_e.to-_,_=_e.to;d>0&&j.from<=c[d-1].toA;)g=c[d-1].fromA,b=c[d-1].fromB,d--,g<j.from&&(j=h.lineAt(g,QueryType$1.ByPosNoHeight,s,0,0));b+=j.from-g,g=j.from;let et=NodeBuilder.build(a,e,b,$);h=h.replace(g,_,et)}return h.updateHeight(a,0)}static empty(){return new HeightMapText(0,0)}static of(e){if(e.length==1)return e[0];let s=0,a=e.length,c=0,h=0;for(;;)if(s==a)if(c>h*2){let g=e[s-1];g.break?e.splice(--s,1,g.left,null,g.right):e.splice(--s,1,g.left,g.right),a+=1+g.break,c-=g.size}else if(h>c*2){let g=e[a];g.break?e.splice(a,1,g.left,null,g.right):e.splice(a,1,g.left,g.right),a+=2+g.break,h-=g.size}else break;else if(c<h){let g=e[s++];g&&(c+=g.size)}else{let g=e[--a];g&&(h+=g.size)}let d=0;return e[s-1]==null?(d=1,s--):e[s]==null&&(d=1,a++),new HeightMapBranch(HeightMap.of(e.slice(0,s)),d,HeightMap.of(e.slice(a)))}}HeightMap.prototype.size=1;class HeightMapBlock extends HeightMap{constructor(e,s,a){super(e,s),this.type=a}blockAt(e,s,a,c){return new BlockInfo(c,this.length,a,this.height,this.type)}lineAt(e,s,a,c,h){return this.blockAt(0,a,c,h)}forEachLine(e,s,a,c,h,d){e<=h+this.length&&s>=h&&d(this.blockAt(0,a,c,h))}updateHeight(e,s=0,a=!1,c){return c&&c.from<=s&&c.more&&this.setHeight(e,c.heights[c.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class HeightMapText extends HeightMapBlock{constructor(e,s){super(e,s,BlockType.Text),this.collapsed=0,this.widgetHeight=0}replace(e,s,a){let c=a[0];return a.length==1&&(c instanceof HeightMapText||c instanceof HeightMapGap&&c.flags&4)&&Math.abs(this.length-c.length)<10?(c instanceof HeightMapGap?c=new HeightMapText(c.length,this.height):c.height=this.height,this.outdated||(c.outdated=!1),c):HeightMap.of(a)}updateHeight(e,s=0,a=!1,c){return c&&c.from<=s&&c.more?this.setHeight(e,c.heights[c.index++]):(a||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 HeightMapGap extends HeightMap{constructor(e){super(e,0)}lines(e,s){let a=e.lineAt(s).number,c=e.lineAt(s+this.length).number;return{firstLine:a,lastLine:c,lineHeight:this.height/(c-a+1)}}blockAt(e,s,a,c){let{firstLine:h,lastLine:d,lineHeight:g}=this.lines(s,c),_=Math.max(0,Math.min(d-h,Math.floor((e-a)/g))),{from:b,length:$}=s.line(h+_);return new BlockInfo(b,$,a+g*_,g,BlockType.Text)}lineAt(e,s,a,c,h){if(s==QueryType$1.ByHeight)return this.blockAt(e,a,c,h);if(s==QueryType$1.ByPosNoHeight){let{from:j,to:_e}=a.lineAt(e);return new BlockInfo(j,_e-j,0,0,BlockType.Text)}let{firstLine:d,lineHeight:g}=this.lines(a,h),{from:_,length:b,number:$}=a.lineAt(e);return new BlockInfo(_,b,c+g*($-d),g,BlockType.Text)}forEachLine(e,s,a,c,h,d){let{firstLine:g,lineHeight:_}=this.lines(a,h);for(let b=Math.max(e,h),$=Math.min(h+this.length,s);b<=$;){let j=a.lineAt(b);b==e&&(c+=_*(j.number-g)),d(new BlockInfo(j.from,j.length,c,_,BlockType.Text)),c+=_,b=j.to+1}}replace(e,s,a){let c=this.length-s;if(c>0){let h=a[a.length-1];h instanceof HeightMapGap?a[a.length-1]=new HeightMapGap(h.length+c):a.push(null,new HeightMapGap(c-1))}if(e>0){let h=a[0];h instanceof HeightMapGap?a[0]=new HeightMapGap(e+h.length):a.unshift(new HeightMapGap(e-1),null)}return HeightMap.of(a)}decomposeLeft(e,s){s.push(new HeightMapGap(e-1),null)}decomposeRight(e,s){s.push(null,new HeightMapGap(this.length-e-1))}updateHeight(e,s=0,a=!1,c){let h=s+this.length;if(c&&c.from<=s+this.length&&c.more){let d=[],g=Math.max(s,c.from),_=-1,b=e.heightChanged;for(c.from>s&&d.push(new HeightMapGap(c.from-s-1).updateHeight(e,s));g<=h&&c.more;){let j=e.doc.lineAt(g).length;d.length&&d.push(null);let _e=c.heights[c.index++];_==-1?_=_e:Math.abs(_e-_)>=Epsilon&&(_=-2);let et=new HeightMapText(j,_e);et.outdated=!1,d.push(et),g+=j+1}g<=h&&d.push(null,new HeightMapGap(h-g).updateHeight(e,g));let $=HeightMap.of(d);return e.heightChanged=b||_<0||Math.abs($.height-this.height)>=Epsilon||Math.abs(_-this.lines(e.doc,s).lineHeight)>=Epsilon,$}else(a||this.outdated)&&(this.setHeight(e,e.heightForGap(s,s+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class HeightMapBranch extends HeightMap{constructor(e,s,a){super(e.length+s+a.length,e.height+a.height,s|(e.outdated||a.outdated?2:0)),this.left=e,this.right=a,this.size=e.size+a.size}get break(){return this.flags&1}blockAt(e,s,a,c){let h=a+this.left.height;return e<h?this.left.blockAt(e,s,a,c):this.right.blockAt(e,s,h,c+this.left.length+this.break)}lineAt(e,s,a,c,h){let d=c+this.left.height,g=h+this.left.length+this.break,_=s==QueryType$1.ByHeight?e<d:e<g,b=_?this.left.lineAt(e,s,a,c,h):this.right.lineAt(e,s,a,d,g);if(this.break||(_?b.to<g:b.from>g))return b;let $=s==QueryType$1.ByPosNoHeight?QueryType$1.ByPosNoHeight:QueryType$1.ByPos;return _?b.join(this.right.lineAt(g,$,a,d,g)):this.left.lineAt(g,$,a,c,h).join(b)}forEachLine(e,s,a,c,h,d){let g=c+this.left.height,_=h+this.left.length+this.break;if(this.break)e<_&&this.left.forEachLine(e,s,a,c,h,d),s>=_&&this.right.forEachLine(e,s,a,g,_,d);else{let b=this.lineAt(_,QueryType$1.ByPos,a,c,h);e<b.from&&this.left.forEachLine(e,b.from-1,a,c,h,d),b.to>=e&&b.from<=s&&d(b),s>b.to&&this.right.forEachLine(b.to+1,s,a,g,_,d)}}replace(e,s,a){let c=this.left.length+this.break;if(s<c)return this.balanced(this.left.replace(e,s,a),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-c,s-c,a));let h=[];e>0&&this.decomposeLeft(e,h);let d=h.length;for(let g of a)h.push(g);if(e>0&&mergeGaps(h,d-1),s<this.length){let g=h.length;this.decomposeRight(s,h),mergeGaps(h,g)}return HeightMap.of(h)}decomposeLeft(e,s){let a=this.left.length;if(e<=a)return this.left.decomposeLeft(e,s);s.push(this.left),this.break&&(a++,e>=a&&s.push(null)),e>a&&this.right.decomposeLeft(e-a,s)}decomposeRight(e,s){let a=this.left.length,c=a+this.break;if(e>=c)return this.right.decomposeRight(e-c,s);e<a&&this.left.decomposeRight(e,s),this.break&&e<c&&s.push(null),s.push(this.right)}balanced(e,s){return e.size>2*s.size||s.size>2*e.size?HeightMap.of(this.break?[e,null,s]:[e,s]):(this.left=e,this.right=s,this.height=e.height+s.height,this.outdated=e.outdated||s.outdated,this.size=e.size+s.size,this.length=e.length+this.break+s.length,this)}updateHeight(e,s=0,a=!1,c){let{left:h,right:d}=this,g=s+h.length+this.break,_=null;return c&&c.from<=s+h.length&&c.more?_=h=h.updateHeight(e,s,a,c):h.updateHeight(e,s,a),c&&c.from<=g+d.length&&c.more?_=d=d.updateHeight(e,g,a,c):d.updateHeight(e,g,a),_?this.balanced(h,d):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function mergeGaps(o,e){let s,a;o[e]==null&&(s=o[e-1])instanceof HeightMapGap&&(a=o[e+1])instanceof HeightMapGap&&o.splice(e-1,3,new HeightMapGap(s.length+1+a.length))}const relevantWidgetHeight=5;class NodeBuilder{constructor(e,s){this.pos=e,this.oracle=s,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,s){if(this.lineStart>-1){let a=Math.min(s,this.lineEnd),c=this.nodes[this.nodes.length-1];c instanceof HeightMapText?c.length+=a-this.pos:(a>this.pos||!this.isCovered)&&this.nodes.push(new HeightMapText(a-this.pos,-1)),this.writtenTo=a,s>a&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=s}point(e,s,a){if(e<s||a.heightRelevant){let c=a.widget?a.widget.estimatedHeight:0;c<0&&(c=this.oracle.lineHeight);let h=s-e;a.block?this.addBlock(new HeightMapBlock(h,c,a.type)):(h||c>=relevantWidgetHeight)&&this.addLineDeco(c,h)}else s>e&&this.span(e,s);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:s}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=s,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 HeightMapText(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,s){let a=new HeightMapGap(s-e);return this.oracle.doc.lineAt(e).to==s&&(a.flags|=4),a}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof HeightMapText)return e;let s=new HeightMapText(0,-1);return this.nodes.push(s),s}addBlock(e){this.enterLine(),e.type==BlockType.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=BlockType.WidgetBefore&&(this.covering=e)}addLineDeco(e,s){let a=this.ensureLine();a.length+=s,a.collapsed+=s,a.widgetHeight=Math.max(a.widgetHeight,e),this.writtenTo=this.pos=this.pos+s}finish(e){let s=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(s instanceof HeightMapText)&&!this.isCovered?this.nodes.push(new HeightMapText(0,-1)):(this.writtenTo<this.pos||s==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let a=e;for(let c of this.nodes)c instanceof HeightMapText&&c.updateHeight(this.oracle,a),a+=c?c.length:1;return this.nodes}static build(e,s,a,c){let h=new NodeBuilder(a,e);return RangeSet.spans(s,a,c,h,0),h.finish(a)}}function heightRelevantDecoChanges(o,e,s){let a=new DecorationComparator;return RangeSet.compare(o,e,s,a,0),a.changes}class DecorationComparator{constructor(){this.changes=[]}compareRange(){}comparePoint(e,s,a,c){(e<s||a&&a.heightRelevant||c&&c.heightRelevant)&&addRange(e,s,this.changes,5)}}function visiblePixelRange(o,e){let s=o.getBoundingClientRect(),a=Math.max(0,s.left),c=Math.min(innerWidth,s.right),h=Math.max(0,s.top),d=Math.min(innerHeight,s.bottom),g=o.ownerDocument.body;for(let _=o.parentNode;_&&_!=g;)if(_.nodeType==1){let b=_,$=window.getComputedStyle(b);if((b.scrollHeight>b.clientHeight||b.scrollWidth>b.clientWidth)&&$.overflow!="visible"){let j=b.getBoundingClientRect();a=Math.max(a,j.left),c=Math.min(c,j.right),h=Math.max(h,j.top),d=_==o.parentNode?j.bottom:Math.min(d,j.bottom)}_=$.position=="absolute"||$.position=="fixed"?b.offsetParent:b.parentNode}else if(_.nodeType==11)_=_.host;else break;return{left:a-s.left,right:Math.max(a,c)-s.left,top:h-(s.top+e),bottom:Math.max(h,d)-(s.top+e)}}function fullPixelRange(o,e){let s=o.getBoundingClientRect();return{left:0,right:s.right-s.left,top:e,bottom:s.bottom-(s.top+e)}}class LineGap{constructor(e,s,a){this.from=e,this.to=s,this.size=a}static same(e,s){if(e.length!=s.length)return!1;for(let a=0;a<e.length;a++){let c=e[a],h=s[a];if(c.from!=h.from||c.to!=h.to||c.size!=h.size)return!1}return!0}draw(e){return Decoration.replace({widget:new LineGapWidget(this.size,e)}).range(this.from,this.to)}}class LineGapWidget extends WidgetType{constructor(e,s){super(),this.size=e,this.vertical=s}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 ViewState{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.heightOracle=new HeightOracle,this.scaler=IdScaler,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Direction.RTL,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1,this.stateDeco=e.facet(decorations).filter(s=>typeof s!="function"),this.heightMap=HeightMap.empty().applyChanges(this.stateDeco,Text.empty,this.heightOracle.setDoc(e.doc),[new ChangedRange(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Decoration.set(this.lineGaps.map(s=>s.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:s}=this.state.selection;for(let a=0;a<=1;a++){let c=a?s.head:s.anchor;if(!e.some(({from:h,to:d})=>c>=h&&c<=d)){let{from:h,to:d}=this.lineBlockAt(c);e.push(new Viewport(h,d))}}this.viewports=e.sort((a,c)=>a.from-c.from),this.scaler=this.heightMap.height<=7e6?IdScaler:new BigScaler(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:scaleBlock(e,this.scaler))})}update(e,s=null){this.state=e.state;let a=this.stateDeco;this.stateDeco=this.state.facet(decorations).filter(b=>typeof b!="function");let c=e.changedRanges,h=ChangedRange.extendWithRanges(c,heightRelevantDecoChanges(a,this.stateDeco,e?e.changes:ChangeSet.empty(this.state.doc.length))),d=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),h),this.heightMap.height!=d&&(e.flags|=2);let g=h.length?this.mapViewport(this.viewport,e.changes):this.viewport;(s&&(s.range.head<g.from||s.range.head>g.to)||!this.viewportIsAppropriate(g))&&(g=this.getViewport(0,s));let _=!e.changes.empty||e.flags&2||g.from!=this.viewport.from||g.to!=this.viewport.to;this.viewport=g,this.updateForViewport(),_&&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(),s&&(this.scrollTarget=s),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}measure(e){let s=e.contentDOM,a=window.getComputedStyle(s),c=this.heightOracle,h=a.whiteSpace;this.defaultTextDirection=a.direction=="rtl"?Direction.RTL:Direction.LTR;let d=this.heightOracle.mustRefreshForWrapping(h),g=d||this.mustMeasureContent||this.contentDOMHeight!=s.clientHeight;this.contentDOMHeight=s.clientHeight,this.mustMeasureContent=!1;let _=0,b=0,$=parseInt(a.paddingTop)||0,j=parseInt(a.paddingBottom)||0;(this.paddingTop!=$||this.paddingBottom!=j)&&(this.paddingTop=$,this.paddingBottom=j,_|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(c.lineWrapping&&(g=!0),this.editorWidth=e.scrollDOM.clientWidth,_|=8);let _e=(this.printing?fullPixelRange:visiblePixelRange)(s,this.paddingTop),et=_e.top-this.pixelViewport.top,tt=_e.bottom-this.pixelViewport.bottom;this.pixelViewport=_e;let nt=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(nt!=this.inView&&(this.inView=nt,nt&&(g=!0)),!this.inView)return 0;let st=s.clientWidth;if((this.contentDOMWidth!=st||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=st,this.editorHeight=e.scrollDOM.clientHeight,_|=8),g){let it=e.docView.measureVisibleLineHeights(this.viewport);if(c.mustRefreshForHeights(it)&&(d=!0),d||c.lineWrapping&&Math.abs(st-this.contentDOMWidth)>c.charWidth){let{lineHeight:at,charWidth:ot}=e.docView.measureTextSize();d=c.refresh(h,at,ot,st/ot,it),d&&(e.docView.minWidth=0,_|=8)}et>0&&tt>0?b=Math.max(et,tt):et<0&&tt<0&&(b=Math.min(et,tt)),c.heightChanged=!1;for(let at of this.viewports){let ot=at.from==this.viewport.from?it:e.docView.measureVisibleLineHeights(at);this.heightMap=this.heightMap.updateHeight(c,0,d,new MeasuredHeights(at.from,ot))}c.heightChanged&&(_|=2)}let rt=!this.viewportIsAppropriate(this.viewport,b)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return rt&&(this.viewport=this.getViewport(b,this.scrollTarget)),this.updateForViewport(),(_&2||rt)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(d?[]:this.lineGaps)),_|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),_}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,s){let a=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),c=this.heightMap,h=this.state.doc,{visibleTop:d,visibleBottom:g}=this,_=new Viewport(c.lineAt(d-a*1e3,QueryType$1.ByHeight,h,0,0).from,c.lineAt(g+(1-a)*1e3,QueryType$1.ByHeight,h,0,0).to);if(s){let{head:b}=s.range;if(b<_.from||b>_.to){let $=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),j=c.lineAt(b,QueryType$1.ByPos,h,0,0),_e;s.y=="center"?_e=(j.top+j.bottom)/2-$/2:s.y=="start"||s.y=="nearest"&&b<_.from?_e=j.top:_e=j.bottom-$,_=new Viewport(c.lineAt(_e-1e3/2,QueryType$1.ByHeight,h,0,0).from,c.lineAt(_e+$+1e3/2,QueryType$1.ByHeight,h,0,0).to)}}return _}mapViewport(e,s){let a=s.mapPos(e.from,-1),c=s.mapPos(e.to,1);return new Viewport(this.heightMap.lineAt(a,QueryType$1.ByPos,this.state.doc,0,0).from,this.heightMap.lineAt(c,QueryType$1.ByPos,this.state.doc,0,0).to)}viewportIsAppropriate({from:e,to:s},a=0){if(!this.inView)return!0;let{top:c}=this.heightMap.lineAt(e,QueryType$1.ByPos,this.state.doc,0,0),{bottom:h}=this.heightMap.lineAt(s,QueryType$1.ByPos,this.state.doc,0,0),{visibleTop:d,visibleBottom:g}=this;return(e==0||c<=d-Math.max(10,Math.min(-a,250)))&&(s==this.state.doc.length||h>=g+Math.max(10,Math.min(a,250)))&&c>d-2*1e3&&h<g+2*1e3}mapLineGaps(e,s){if(!e.length||s.empty)return e;let a=[];for(let c of e)s.touchesRange(c.from,c.to)||a.push(new LineGap(s.mapPos(c.from),s.mapPos(c.to),c.size));return a}ensureLineGaps(e){let s=[];if(this.defaultTextDirection!=Direction.LTR)return s;for(let a of this.viewportLines){if(a.length<4e3)continue;let c=lineStructure(a.from,a.to,this.stateDeco);if(c.total<4e3)continue;let h,d;if(this.heightOracle.lineWrapping){let b=2e3/this.heightOracle.lineLength*this.heightOracle.lineHeight;h=findPosition(c,(this.visibleTop-a.top-b)/a.height),d=findPosition(c,(this.visibleBottom-a.top+b)/a.height)}else{let b=c.total*this.heightOracle.charWidth,$=2e3*this.heightOracle.charWidth;h=findPosition(c,(this.pixelViewport.left-$)/b),d=findPosition(c,(this.pixelViewport.right+$)/b)}let g=[];h>a.from&&g.push({from:a.from,to:h}),d<a.to&&g.push({from:d,to:a.to});let _=this.state.selection.main;_.from>=a.from&&_.from<=a.to&&cutRange(g,_.from-10,_.from+10),!_.empty&&_.to>=a.from&&_.to<=a.to&&cutRange(g,_.to-10,_.to+10);for(let{from:b,to:$}of g)$-b>1e3&&s.push(find(e,j=>j.from>=a.from&&j.to<=a.to&&Math.abs(j.from-b)<1e3&&Math.abs(j.to-$)<1e3)||new LineGap(b,$,this.gapSize(a,b,$,c)))}return s}gapSize(e,s,a,c){let h=findFraction(c,a)-findFraction(c,s);return this.heightOracle.lineWrapping?e.height*h:c.total*this.heightOracle.charWidth*h}updateLineGaps(e){LineGap.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Decoration.set(e.map(s=>s.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let s=[];RangeSet.spans(e,this.viewport.from,this.viewport.to,{span(c,h){s.push({from:c,to:h})},point(){}},20);let a=s.length!=this.visibleRanges.length||this.visibleRanges.some((c,h)=>c.from!=s[h].from||c.to!=s[h].to);return this.visibleRanges=s,a?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(s=>s.from<=e&&s.to>=e)||scaleBlock(this.heightMap.lineAt(e,QueryType$1.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(e){return scaleBlock(this.heightMap.lineAt(this.scaler.fromDOM(e),QueryType$1.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(e){return scaleBlock(this.heightMap.blockAt(this.scaler.fromDOM(e),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Viewport{constructor(e,s){this.from=e,this.to=s}}function lineStructure(o,e,s){let a=[],c=o,h=0;return RangeSet.spans(s,o,e,{span(){},point(d,g){d>c&&(a.push({from:c,to:d}),h+=d-c),c=g}},20),c<e&&(a.push({from:c,to:e}),h+=e-c),{total:h,ranges:a}}function findPosition({total:o,ranges:e},s){if(s<=0)return e[0].from;if(s>=1)return e[e.length-1].to;let a=Math.floor(o*s);for(let c=0;;c++){let{from:h,to:d}=e[c],g=d-h;if(a<=g)return h+a;a-=g}}function findFraction(o,e){let s=0;for(let{from:a,to:c}of o.ranges){if(e<=c){s+=e-a;break}s+=c-a}return s/o.total}function cutRange(o,e,s){for(let a=0;a<o.length;a++){let c=o[a];if(c.from<s&&c.to>e){let h=[];c.from<e&&h.push({from:c.from,to:e}),c.to>s&&h.push({from:s,to:c.to}),o.splice(a,1,...h),a+=h.length-1}}}function find(o,e){for(let s of o)if(e(s))return s}const IdScaler={toDOM(o){return o},fromDOM(o){return o},scale:1};class BigScaler{constructor(e,s,a){let c=0,h=0,d=0;this.viewports=a.map(({from:g,to:_})=>{let b=s.lineAt(g,QueryType$1.ByPos,e,0,0).top,$=s.lineAt(_,QueryType$1.ByPos,e,0,0).bottom;return c+=$-b,{from:g,to:_,top:b,bottom:$,domTop:0,domBottom:0}}),this.scale=(7e6-c)/(s.height-c);for(let g of this.viewports)g.domTop=d+(g.top-h)*this.scale,d=g.domBottom=g.domTop+(g.bottom-g.top),h=g.bottom}toDOM(e){for(let s=0,a=0,c=0;;s++){let h=s<this.viewports.length?this.viewports[s]:null;if(!h||e<h.top)return c+(e-a)*this.scale;if(e<=h.bottom)return h.domTop+(e-h.top);a=h.bottom,c=h.domBottom}}fromDOM(e){for(let s=0,a=0,c=0;;s++){let h=s<this.viewports.length?this.viewports[s]:null;if(!h||e<h.domTop)return a+(e-c)/this.scale;if(e<=h.domBottom)return h.top+(e-h.domTop);a=h.bottom,c=h.domBottom}}}function scaleBlock(o,e){if(e.scale==1)return o;let s=e.toDOM(o.top),a=e.toDOM(o.bottom);return new BlockInfo(o.from,o.length,s,a-s,Array.isArray(o.type)?o.type.map(c=>scaleBlock(c,e)):o.type)}const theme=Facet.define({combine:o=>o.join(" ")}),darkTheme=Facet.define({combine:o=>o.indexOf(!0)>-1}),baseThemeID=StyleModule.newName(),baseLightID=StyleModule.newName(),baseDarkID=StyleModule.newName(),lightDarkIDs={"&light":"."+baseLightID,"&dark":"."+baseDarkID};function buildTheme(o,e,s){return new StyleModule(e,{finish(a){return/&/.test(a)?a.replace(/&\w*/,c=>{if(c=="&")return o;if(!s||!s[c])throw new RangeError(`Unsupported selector: ${c}`);return s[c]}):o+" "+a}})}const baseTheme$1$3=buildTheme("."+baseThemeID,{"&.cm-editor":{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,minHeight:"100%",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 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{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":{zIndex:100,contain:"size style",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":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&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-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"}},lightDarkIDs),observeOptions={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},useCharData=browser.ie&&browser.ie_version<=11;class DOMObserver{constructor(e,s,a){this.view=e,this.onChange=s,this.onScrollChanged=a,this.active=!1,this.selectionRange=new DOMSelectionState,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(c=>{for(let h of c)this.queue.push(h);(browser.ie&&browser.ie_version<=11||browser.ios&&e.composing)&&c.some(h=>h.type=="childList"&&h.removedNodes.length||h.type=="characterData"&&h.oldValue.length>h.target.nodeValue.length)?this.flushSoon():this.flush()}),useCharData&&(this.onCharData=c=>{this.queue.push({target:c.target,type:"characterData",oldValue:c.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.resize=new ResizeObserver(()=>{this.view.docView.lastUpdate<Date.now()-75&&this.onResize()}),this.resize.observe(e.scrollDOM)),this.win=e.dom.ownerDocument.defaultView,this.addWindowListeners(this.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(c=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),c.length>0&&c[c.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(c=>{c.length>0&&c[c.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}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((s,a)=>s!=e[a]))){this.gapIntersection.disconnect();for(let s of e)this.gapIntersection.observe(s);this.gaps=e}}onSelectionChange(e){if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:s}=this,a=this.selectionRange;if(s.state.facet(editable)?s.root.activeElement!=this.dom:!hasSelection(s.dom,a))return;let c=a.anchorNode&&s.docView.nearest(a.anchorNode);c&&c.ignoreEvent(e)||((browser.ie&&browser.ie_version<=11||browser.android&&browser.chrome)&&!s.state.selection.main.empty&&a.focusNode&&isEquivalentPosition(a.focusNode,a.focusOffset,a.anchorNode,a.anchorOffset)?this.flushSoon():this.flush(!1))}readSelectionRange(){let{view:e}=this,s=browser.safari&&e.root.nodeType==11&&deepActiveElement()==this.dom&&safariSelectionRangeHack(this.view)||getSelection(e.root);if(!s||this.selectionRange.eq(s))return!1;let a=hasSelection(this.dom,s);return a&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&atElementStart(this.dom,s)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(s),a&&(this.selectionChanged=!0),!0)}setSelectionRange(e,s){this.selectionRange.set(e.node,e.offset,s.node,s.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,s=null;for(let a=this.dom;a;)if(a.nodeType==1)!s&&e<this.scrollTargets.length&&this.scrollTargets[e]==a?e++:s||(s=this.scrollTargets.slice(0,e)),s&&s.push(a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;if(e<this.scrollTargets.length&&!s&&(s=this.scrollTargets.slice(0,e)),s){for(let a of this.scrollTargets)a.removeEventListener("scroll",this.onScroll);for(let a of this.scrollTargets=s)a.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,observeOptions),useCharData&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){!this.active||(this.active=!1,this.observer.disconnect(),useCharData&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,s){this.delayedAndroidKey||requestAnimationFrame(()=>{let a=this.delayedAndroidKey;this.delayedAndroidKey=null,this.delayedFlush=-1,this.flush()||dispatchKey(this.dom,a.key,a.keyCode)}),(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:s})}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=window.setTimeout(()=>{this.delayedFlush=-1,this.flush()},20))}forceFlush(){this.delayedFlush>=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1),this.flush()}processRecords(){let e=this.queue;for(let h of this.observer.takeRecords())e.push(h);e.length&&(this.queue=[]);let s=-1,a=-1,c=!1;for(let h of e){let d=this.readMutation(h);!d||(d.typeOver&&(c=!0),s==-1?{from:s,to:a}=d:(s=Math.min(d.from,s),a=Math.max(d.to,a)))}return{from:s,to:a,typeOver:c}}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return;e&&this.readSelectionRange();let{from:s,to:a,typeOver:c}=this.processRecords(),h=this.selectionChanged&&hasSelection(this.dom,this.selectionRange);if(s<0&&!h)return;this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let d=this.view.state,g=this.onChange(s,a,c);return this.view.state==d&&this.view.update([]),g}readMutation(e){let s=this.view.docView.nearest(e.target);if(!s||s.ignoreMutation(e))return null;if(s.markDirty(e.type=="attributes"),e.type=="attributes"&&(s.dirty|=4),e.type=="childList"){let a=findChild(s,e.previousSibling||e.target.previousSibling,-1),c=findChild(s,e.nextSibling||e.target.nextSibling,1);return{from:a?s.posAfter(a):s.posAtStart,to:c?s.posBefore(c):s.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:s.posAtStart,to:s.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,s,a;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(s=this.gapIntersection)===null||s===void 0||s.disconnect(),(a=this.resize)===null||a===void 0||a.disconnect();for(let c of this.scrollTargets)c.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}function findChild(o,e,s){for(;e;){let a=ContentView.get(e);if(a&&a.parent==o)return a;let c=e.parentNode;e=c!=o.dom?c:s>0?e.nextSibling:e.previousSibling}return null}function safariSelectionRangeHack(o){let e=null;function s(_){_.preventDefault(),_.stopImmediatePropagation(),e=_.getTargetRanges()[0]}if(o.contentDOM.addEventListener("beforeinput",s,!0),document.execCommand("indent"),o.contentDOM.removeEventListener("beforeinput",s,!0),!e)return null;let a=e.startContainer,c=e.startOffset,h=e.endContainer,d=e.endOffset,g=o.docView.domAtPos(o.state.selection.main.anchor);return isEquivalentPosition(g.node,g.offset,h,d)&&([a,c,h,d]=[h,d,a,c]),{anchorNode:a,anchorOffset:c,focusNode:h,focusOffset:d}}function applyDOMChange(o,e,s,a){let c,h,d=o.state.selection.main;if(e>-1){let g=o.docView.domBoundsAround(e,s,0);if(!g||o.state.readOnly)return!1;let{from:_,to:b}=g,$=o.docView.impreciseHead||o.docView.impreciseAnchor?[]:selectionPoints(o),j=new DOMReader($,o.state);j.readRange(g.startDOM,g.endDOM);let _e=d.from,et=null;(o.inputState.lastKeyCode===8&&o.inputState.lastKeyTime>Date.now()-100||browser.android&&j.text.length<b-_)&&(_e=d.to,et="end");let tt=findDiff(o.state.doc.sliceString(_,b,LineBreakPlaceholder),j.text,_e-_,et);tt&&(browser.chrome&&o.inputState.lastKeyCode==13&&tt.toB==tt.from+2&&j.text.slice(tt.from,tt.toB)==LineBreakPlaceholder+LineBreakPlaceholder&&tt.toB--,c={from:_+tt.from,to:_+tt.toA,insert:Text.of(j.text.slice(tt.from,tt.toB).split(LineBreakPlaceholder))}),h=selectionFromPoints($,_)}else if(o.hasFocus||!o.state.facet(editable)){let g=o.observer.selectionRange,{impreciseHead:_,impreciseAnchor:b}=o.docView,$=_&&_.node==g.focusNode&&_.offset==g.focusOffset||!contains(o.contentDOM,g.focusNode)?o.state.selection.main.head:o.docView.posFromDOM(g.focusNode,g.focusOffset),j=b&&b.node==g.anchorNode&&b.offset==g.anchorOffset||!contains(o.contentDOM,g.anchorNode)?o.state.selection.main.anchor:o.docView.posFromDOM(g.anchorNode,g.anchorOffset);($!=d.head||j!=d.anchor)&&(h=EditorSelection.single(j,$))}if(!c&&!h)return!1;if(!c&&a&&!d.empty&&h&&h.main.empty?c={from:d.from,to:d.to,insert:o.state.doc.slice(d.from,d.to)}:c&&c.from>=d.from&&c.to<=d.to&&(c.from!=d.from||c.to!=d.to)&&d.to-d.from-(c.to-c.from)<=4?c={from:d.from,to:d.to,insert:o.state.doc.slice(d.from,c.from).append(c.insert).append(o.state.doc.slice(c.to,d.to))}:(browser.mac||browser.android)&&c&&c.from==c.to&&c.from==d.head-1&&c.insert.toString()=="."&&(c={from:d.from,to:d.to,insert:Text.of([" "])}),c){let g=o.state;if(browser.ios&&o.inputState.flushIOSKey(o)||browser.android&&(c.from==d.from&&c.to==d.to&&c.insert.length==1&&c.insert.lines==2&&dispatchKey(o.contentDOM,"Enter",13)||c.from==d.from-1&&c.to==d.to&&c.insert.length==0&&dispatchKey(o.contentDOM,"Backspace",8)||c.from==d.from&&c.to==d.to+1&&c.insert.length==0&&dispatchKey(o.contentDOM,"Delete",46)))return!0;let _=c.insert.toString();if(o.state.facet(inputHandler$1).some(j=>j(o,c.from,c.to,_)))return!0;o.inputState.composing>=0&&o.inputState.composing++;let b;if(c.from>=d.from&&c.to<=d.to&&c.to-c.from>=(d.to-d.from)/3&&(!h||h.main.empty&&h.main.from==c.from+c.insert.length)&&o.inputState.composing<0){let j=d.from<c.from?g.sliceDoc(d.from,c.from):"",_e=d.to>c.to?g.sliceDoc(c.to,d.to):"";b=g.replaceSelection(o.state.toText(j+c.insert.sliceString(0,void 0,o.state.lineBreak)+_e))}else{let j=g.changes(c),_e=h&&!g.selection.main.eq(h.main)&&h.main.to<=j.newLength?h.main:void 0;if(g.selection.ranges.length>1&&o.inputState.composing>=0&&c.to<=d.to&&c.to>=d.to-10){let et=o.state.sliceDoc(c.from,c.to),tt=compositionSurroundingNode(o)||o.state.doc.lineAt(d.head),nt=d.to-c.to,st=d.to-d.from;b=g.changeByRange(rt=>{if(rt.from==d.from&&rt.to==d.to)return{changes:j,range:_e||rt.map(j)};let it=rt.to-nt,at=it-et.length;if(rt.to-rt.from!=st||o.state.sliceDoc(at,it)!=et||tt&&rt.to>=tt.from&&rt.from<=tt.to)return{range:rt};let ot=g.changes({from:at,to:it,insert:c.insert}),ut=rt.to-d.to;return{changes:ot,range:_e?EditorSelection.range(Math.max(0,_e.anchor+ut),Math.max(0,_e.head+ut)):rt.map(ot)}})}else b={changes:j,selection:_e&&g.selection.replaceRange(_e)}}let $="input.type";return o.composing&&($+=".compose",o.inputState.compositionFirstChange&&($+=".start",o.inputState.compositionFirstChange=!1)),o.dispatch(b,{scrollIntoView:!0,userEvent:$}),!0}else if(h&&!h.main.eq(d)){let g=!1,_="select";return o.inputState.lastSelectionTime>Date.now()-50&&(o.inputState.lastSelectionOrigin=="select"&&(g=!0),_=o.inputState.lastSelectionOrigin),o.dispatch({selection:h,scrollIntoView:g,userEvent:_}),!0}else return!1}function findDiff(o,e,s,a){let c=Math.min(o.length,e.length),h=0;for(;h<c&&o.charCodeAt(h)==e.charCodeAt(h);)h++;if(h==c&&o.length==e.length)return null;let d=o.length,g=e.length;for(;d>0&&g>0&&o.charCodeAt(d-1)==e.charCodeAt(g-1);)d--,g--;if(a=="end"){let _=Math.max(0,h-Math.min(d,g));s-=d+_-h}return d<h&&o.length<e.length?(h-=s<=h&&s>=d?h-s:0,g=h+(g-d),d=h):g<h&&(h-=s<=h&&s>=g?h-s:0,d=h+(d-g),g=h),{from:h,toA:d,toB:g}}function selectionPoints(o){let e=[];if(o.root.activeElement!=o.contentDOM)return e;let{anchorNode:s,anchorOffset:a,focusNode:c,focusOffset:h}=o.observer.selectionRange;return s&&(e.push(new DOMPoint(s,a)),(c!=s||h!=a)&&e.push(new DOMPoint(c,h))),e}function selectionFromPoints(o,e){if(o.length==0)return null;let s=o[0].pos,a=o.length==2?o[1].pos:s;return s>-1&&a>-1?EditorSelection.single(s+e,a+e):null}class EditorView{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: absolute; 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||(s=>this.update([s])),this.dispatch=this.dispatch.bind(this),this._root=e.root||getRoot(e.parent)||document,this.viewState=new ViewState(e.state||EditorState.create(e)),this.plugins=this.state.facet(viewPlugin).map(s=>new PluginInstance(s));for(let s of this.plugins)s.update(this);this.observer=new DOMObserver(this,(s,a,c)=>applyDOMChange(this,s,a,c),s=>{this.inputState.runScrollHandlers(this,s),this.observer.intersecting&&this.measure()}),this.inputState=new InputState(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new DocView(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}dispatch(...e){this._dispatch(e.length==1&&e[0]instanceof Transaction?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 s=!1,a=!1,c,h=this.state;for(let g of e){if(g.startState!=h)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");h=g.state}if(this.destroyed){this.viewState.state=h;return}if(this.observer.clear(),h.facet(EditorState.phrases)!=this.state.facet(EditorState.phrases))return this.setState(h);c=ViewUpdate.create(this,h,e);let d=this.viewState.scrollTarget;try{this.updateState=2;for(let g of e){if(d&&(d=d.map(g.changes)),g.scrollIntoView){let{main:_}=g.state.selection;d=new ScrollTarget(_.empty?_:EditorSelection.cursor(_.head,_.head>_.anchor?-1:1))}for(let _ of g.effects)_.is(scrollIntoView$1)&&(d=_.value)}this.viewState.update(c,d),this.bidiCache=CachedOrder.update(this.bidiCache,c.changes),c.empty||(this.updatePlugins(c),this.inputState.update(c)),s=this.docView.update(c),this.state.facet(styleModule)!=this.styleModules&&this.mountStyles(),a=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(s,e.some(g=>g.isUserEvent("select.pointer")))}finally{this.updateState=0}if(c.startState.facet(theme)!=c.state.facet(theme)&&(this.viewState.mustMeasureContent=!0),(s||a||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!c.empty)for(let g of this.state.facet(updateListener))g(c)}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 s=this.hasFocus;try{for(let a of this.plugins)a.destroy(this);this.viewState=new ViewState(e),this.plugins=e.facet(viewPlugin).map(a=>new PluginInstance(a)),this.pluginMap.clear();for(let a of this.plugins)a.update(this);this.docView=new DocView(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}s&&this.focus(),this.requestMeasure()}updatePlugins(e){let s=e.startState.facet(viewPlugin),a=e.state.facet(viewPlugin);if(s!=a){let c=[];for(let h of a){let d=s.indexOf(h);if(d<0)c.push(new PluginInstance(h));else{let g=this.plugins[d];g.mustUpdate=e,c.push(g)}}for(let h of this.plugins)h.mustUpdate!=e&&h.destroy(this);this.plugins=c,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let c of this.plugins)c.mustUpdate=e;for(let c=0;c<this.plugins.length;c++)this.plugins[c].update(this)}measure(e=!0){if(this.destroyed)return;this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let s=null,{scrollHeight:a,scrollTop:c,clientHeight:h}=this.scrollDOM,d=c>a-h-4?a:c;try{for(let g=0;;g++){this.updateState=1;let _=this.viewport,b=this.viewState.lineBlockAtHeight(d),$=this.viewState.measure(this);if(!$&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(g>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let j=[];$&4||([this.measureRequests,j]=[j,this.measureRequests]);let _e=j.map(st=>{try{return st.read(this)}catch(rt){return logException(this.state,rt),BadMeasure}}),et=ViewUpdate.create(this,this.state,[]),tt=!1,nt=!1;et.flags|=$,s?s.flags|=$:s=et,this.updateState=2,et.empty||(this.updatePlugins(et),this.inputState.update(et),this.updateAttrs(),tt=this.docView.update(et));for(let st=0;st<j.length;st++)if(_e[st]!=BadMeasure)try{let rt=j[st];rt.write&&rt.write(_e[st],this)}catch(rt){logException(this.state,rt)}if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,nt=!0;else{let st=this.viewState.lineBlockAt(b.from).top-b.top;(st>1||st<-1)&&(this.scrollDOM.scrollTop+=st,nt=!0)}if(tt&&this.docView.updateSelection(!0),this.viewport.from==_.from&&this.viewport.to==_.to&&!nt&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(s&&!s.empty)for(let g of this.state.facet(updateListener))g(s)}get themeClasses(){return baseThemeID+" "+(this.state.facet(darkTheme)?baseDarkID:baseLightID)+" "+this.state.facet(theme)}updateAttrs(){let e=attrsFromFacet(this,editorAttributes,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),s={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(editable)?"true":"false",class:"cm-content",style:`${browser.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(s["aria-readonly"]="true"),attrsFromFacet(this,contentAttributes,s);let a=this.observer.ignore(()=>{let c=updateAttrs(this.contentDOM,this.contentAttrs,s),h=updateAttrs(this.dom,this.editorAttrs,e);return c||h});return this.editorAttrs=e,this.contentAttrs=s,a}showAnnouncements(e){let s=!0;for(let a of e)for(let c of a.effects)if(c.is(EditorView.announce)){s&&(this.announceDOM.textContent=""),s=!1;let h=this.announceDOM.appendChild(document.createElement("div"));h.textContent=c.value}}mountStyles(){this.styleModules=this.state.facet(styleModule),StyleModule.mount(this.root,this.styleModules.concat(baseTheme$1$3).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=requestAnimationFrame(()=>this.measure())),e){if(e.key!=null){for(let s=0;s<this.measureRequests.length;s++)if(this.measureRequests[s].key===e.key){this.measureRequests[s]=e;return}}this.measureRequests.push(e)}}plugin(e){let s=this.pluginMap.get(e);return(s===void 0||s&&s.spec!=e)&&this.pluginMap.set(e,s=this.plugins.find(a=>a.spec==e)||null),s&&s.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,s,a){return skipAtoms(this,e,moveByChar(this,e,s,a))}moveByGroup(e,s){return skipAtoms(this,e,moveByChar(this,e,s,a=>byGroup(this,e.head,a)))}moveToLineBoundary(e,s,a=!0){return moveToLineBoundary(this,e,s,a)}moveVertically(e,s,a){return skipAtoms(this,e,moveVertically(this,e,s,a))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,s=0){return this.docView.posFromDOM(e,s)}posAtCoords(e,s=!0){return this.readMeasured(),posAtCoords(this,e,s)}coordsAtPos(e,s=1){this.readMeasured();let a=this.docView.coordsAt(e,s);if(!a||a.left==a.right)return a;let c=this.state.doc.lineAt(e),h=this.bidiSpans(c),d=h[BidiSpan.find(h,e-c.from,-1,s)];return flattenRect(a,d.dir==Direction.LTR==s>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(perLineTextDirection)||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>MaxBidiLine)return trivialOrder(e.length);let s=this.textDirectionAt(e.from);for(let c of this.bidiCache)if(c.from==e.from&&c.dir==s)return c.order;let a=computeOrder(e.text,s);return this.bidiCache.push(new CachedOrder(e.from,e.to,s,a)),a}get hasFocus(){var e;return(document.hasFocus()||browser.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{focusPreventScroll(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView),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,s={}){return scrollIntoView$1.of(new ScrollTarget(typeof e=="number"?EditorSelection.cursor(e):e,s.y,s.x,s.yMargin,s.xMargin))}static domEventHandlers(e){return ViewPlugin.define(()=>({}),{eventHandlers:e})}static theme(e,s){let a=StyleModule.newName(),c=[theme.of(a),styleModule.of(buildTheme(`.${a}`,e))];return s&&s.dark&&c.push(darkTheme.of(!0)),c}static baseTheme(e){return Prec.lowest(styleModule.of(buildTheme("."+baseThemeID,e,lightDarkIDs)))}static findFromDOM(e){var s;let a=e.querySelector(".cm-content"),c=a&&ContentView.get(a)||ContentView.get(e);return((s=c==null?void 0:c.rootView)===null||s===void 0?void 0:s.view)||null}}EditorView.styleModule=styleModule;EditorView.inputHandler=inputHandler$1;EditorView.perLineTextDirection=perLineTextDirection;EditorView.exceptionSink=exceptionSink;EditorView.updateListener=updateListener;EditorView.editable=editable;EditorView.mouseSelectionStyle=mouseSelectionStyle;EditorView.dragMovesSelection=dragMovesSelection$1;EditorView.clickAddsSelectionRange=clickAddsSelectionRange;EditorView.decorations=decorations;EditorView.atomicRanges=atomicRanges;EditorView.scrollMargins=scrollMargins;EditorView.darkTheme=darkTheme;EditorView.contentAttributes=contentAttributes;EditorView.editorAttributes=editorAttributes;EditorView.lineWrapping=EditorView.contentAttributes.of({class:"cm-lineWrapping"});EditorView.announce=StateEffect.define();const MaxBidiLine=4096,BadMeasure={};class CachedOrder{constructor(e,s,a,c){this.from=e,this.to=s,this.dir=a,this.order=c}static update(e,s){if(s.empty)return e;let a=[],c=e.length?e[e.length-1].dir:Direction.LTR;for(let h=Math.max(0,e.length-10);h<e.length;h++){let d=e[h];d.dir==c&&!s.touchesRange(d.from,d.to)&&a.push(new CachedOrder(s.mapPos(d.from,1),s.mapPos(d.to,-1),d.dir,d.order))}return a}}function attrsFromFacet(o,e,s){for(let a=o.state.facet(e),c=a.length-1;c>=0;c--){let h=a[c],d=typeof h=="function"?h(o):h;d&&combineAttrs(d,s)}return s}const currentPlatform=browser.mac?"mac":browser.windows?"win":browser.linux?"linux":"key";function normalizeKeyName(o,e){const s=o.split(/-(?!$)/);let a=s[s.length-1];a=="Space"&&(a=" ");let c,h,d,g;for(let _=0;_<s.length-1;++_){const b=s[_];if(/^(cmd|meta|m)$/i.test(b))g=!0;else if(/^a(lt)?$/i.test(b))c=!0;else if(/^(c|ctrl|control)$/i.test(b))h=!0;else if(/^s(hift)?$/i.test(b))d=!0;else if(/^mod$/i.test(b))e=="mac"?g=!0:h=!0;else throw new Error("Unrecognized modifier name: "+b)}return c&&(a="Alt-"+a),h&&(a="Ctrl-"+a),g&&(a="Meta-"+a),d&&(a="Shift-"+a),a}function modifiers(o,e,s){return e.altKey&&(o="Alt-"+o),e.ctrlKey&&(o="Ctrl-"+o),e.metaKey&&(o="Meta-"+o),s!==!1&&e.shiftKey&&(o="Shift-"+o),o}const handleKeyEvents=Prec.default(EditorView.domEventHandlers({keydown(o,e){return runHandlers(getKeymap(e.state),o,e,"editor")}})),keymap=Facet.define({enables:handleKeyEvents}),Keymaps=new WeakMap;function getKeymap(o){let e=o.facet(keymap),s=Keymaps.get(e);return s||Keymaps.set(e,s=buildKeymap(e.reduce((a,c)=>a.concat(c),[]))),s}function runScopeHandlers(o,e,s){return runHandlers(getKeymap(o.state),e,o,s)}let storedPrefix=null;const PrefixTimeout=4e3;function buildKeymap(o,e=currentPlatform){let s=Object.create(null),a=Object.create(null),c=(d,g)=>{let _=a[d];if(_==null)a[d]=g;else if(_!=g)throw new Error("Key binding "+d+" is used both as a regular binding and as a multi-stroke prefix")},h=(d,g,_,b)=>{let $=s[d]||(s[d]=Object.create(null)),j=g.split(/ (?!$)/).map(tt=>normalizeKeyName(tt,e));for(let tt=1;tt<j.length;tt++){let nt=j.slice(0,tt).join(" ");c(nt,!0),$[nt]||($[nt]={preventDefault:!0,commands:[st=>{let rt=storedPrefix={view:st,prefix:nt,scope:d};return setTimeout(()=>{storedPrefix==rt&&(storedPrefix=null)},PrefixTimeout),!0}]})}let _e=j.join(" ");c(_e,!1);let et=$[_e]||($[_e]={preventDefault:!1,commands:[]});et.commands.push(_),b&&(et.preventDefault=!0)};for(let d of o){let g=d[e]||d.key;if(!!g)for(let _ of d.scope?d.scope.split(" "):["editor"])h(_,g,d.run,d.preventDefault),d.shift&&h(_,"Shift-"+g,d.shift,d.preventDefault)}return s}function runHandlers(o,e,s,a){let c=keyName(e),h=codePointAt(c,0),d=codePointSize(h)==c.length&&c!=" ",g="",_=!1;storedPrefix&&storedPrefix.view==s&&storedPrefix.scope==a&&(g=storedPrefix.prefix+" ",(_=modifierCodes.indexOf(e.keyCode)<0)&&(storedPrefix=null));let b=_e=>{if(_e){for(let et of _e.commands)if(et(s))return!0;_e.preventDefault&&(_=!0)}return!1},$=o[a],j;if($){if(b($[g+modifiers(c,e,!d)]))return!0;if(d&&(e.shiftKey||e.altKey||e.metaKey||h>127)&&(j=base[e.keyCode])&&j!=c){if(b($[g+modifiers(j,e,!0)]))return!0;if(e.shiftKey&&shift[e.keyCode]!=j&&b($[g+modifiers(shift[e.keyCode],e,!1)]))return!0}else if(d&&e.shiftKey&&b($[g+modifiers(c,e,!0)]))return!0}return _}const CanHidePrimary=!browser.ios,selectionConfig=Facet.define({combine(o){return combineConfig(o,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,s)=>Math.min(e,s),drawRangeCursor:(e,s)=>e||s})}});function drawSelection(o={}){return[selectionConfig.of(o),drawSelectionPlugin,hideNativeSelection]}class Piece{constructor(e,s,a,c,h){this.left=e,this.top=s,this.width=a,this.height=c,this.className=h}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width>=0&&(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}}const drawSelectionPlugin=ViewPlugin.fromClass(class{constructor(o){this.view=o,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=o.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=o.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),o.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){this.cursorLayer.style.animationDuration=this.view.state.facet(selectionConfig).cursorBlinkRate+"ms"}update(o){let e=o.startState.facet(selectionConfig)!=o.state.facet(selectionConfig);(e||o.selectionSet||o.geometryChanged||o.viewportChanged)&&this.view.requestMeasure(this.measureReq),o.transactions.some(s=>s.scrollIntoView)&&(this.cursorLayer.style.animationName=this.cursorLayer.style.animationName=="cm-blink"?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}readPos(){let{state:o}=this.view,e=o.facet(selectionConfig),s=o.selection.ranges.map(c=>c.empty?[]:measureRange(this.view,c)).reduce((c,h)=>c.concat(h)),a=[];for(let c of o.selection.ranges){let h=c==o.selection.main;if(c.empty?!h||CanHidePrimary:e.drawRangeCursor){let d=measureCursor(this.view,c,h);d&&a.push(d)}}return{rangePieces:s,cursors:a}}drawSel({rangePieces:o,cursors:e}){if(o.length!=this.rangePieces.length||o.some((s,a)=>!s.eq(this.rangePieces[a]))){this.selectionLayer.textContent="";for(let s of o)this.selectionLayer.appendChild(s.draw());this.rangePieces=o}if(e.length!=this.cursors.length||e.some((s,a)=>!s.eq(this.cursors[a]))){let s=this.cursorLayer.children;if(s.length!==e.length){this.cursorLayer.textContent="";for(const a of e)this.cursorLayer.appendChild(a.draw())}else e.forEach((a,c)=>a.adjust(s[c]));this.cursors=e}}destroy(){this.selectionLayer.remove(),this.cursorLayer.remove()}}),themeSpec={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};CanHidePrimary&&(themeSpec[".cm-line"].caretColor="transparent !important");const hideNativeSelection=Prec.highest(EditorView.theme(themeSpec));function getBase(o){let e=o.scrollDOM.getBoundingClientRect();return{left:(o.textDirection==Direction.LTR?e.left:e.right-o.scrollDOM.clientWidth)-o.scrollDOM.scrollLeft,top:e.top-o.scrollDOM.scrollTop}}function wrappedLine(o,e,s){let a=EditorSelection.cursor(e);return{from:Math.max(s.from,o.moveToLineBoundary(a,!1,!0).from),to:Math.min(s.to,o.moveToLineBoundary(a,!0,!0).from),type:BlockType.Text}}function blockAt(o,e){let s=o.lineBlockAt(e);if(Array.isArray(s.type)){for(let a of s.type)if(a.to>e||a.to==e&&(a.to==s.to||a.type==BlockType.Text))return a}return s}function measureRange(o,e){if(e.to<=o.viewport.from||e.from>=o.viewport.to)return[];let s=Math.max(e.from,o.viewport.from),a=Math.min(e.to,o.viewport.to),c=o.textDirection==Direction.LTR,h=o.contentDOM,d=h.getBoundingClientRect(),g=getBase(o),_=window.getComputedStyle(h.firstChild),b=d.left+parseInt(_.paddingLeft)+Math.min(0,parseInt(_.textIndent)),$=d.right-parseInt(_.paddingRight),j=blockAt(o,s),_e=blockAt(o,a),et=j.type==BlockType.Text?j:null,tt=_e.type==BlockType.Text?_e:null;if(o.lineWrapping&&(et&&(et=wrappedLine(o,s,et)),tt&&(tt=wrappedLine(o,a,tt))),et&&tt&&et.from==tt.from)return st(rt(e.from,e.to,et));{let at=et?rt(e.from,null,et):it(j,!1),ot=tt?rt(null,e.to,tt):it(_e,!0),ut=[];return(et||j).to<(tt||_e).from-1?ut.push(nt(b,at.bottom,$,ot.top)):at.bottom<ot.top&&o.elementAtHeight((at.bottom+ot.top)/2).type==BlockType.Text&&(at.bottom=ot.top=(at.bottom+ot.top)/2),st(at).concat(ut).concat(st(ot))}function nt(at,ot,ut,ct){return new Piece(at-g.left,ot-g.top-.01,ut-at,ct-ot+.01,"cm-selectionBackground")}function st({top:at,bottom:ot,horizontal:ut}){let ct=[];for(let ht=0;ht<ut.length;ht+=2)ct.push(nt(ut[ht],at,ut[ht+1],ot));return ct}function rt(at,ot,ut){let ct=1e9,ht=-1e9,lt=[];function pt(yt,mt,Et,Ot,St){let At=o.coordsAtPos(yt,yt==ut.to?-2:2),dt=o.coordsAtPos(Et,Et==ut.from?2:-2);ct=Math.min(At.top,dt.top,ct),ht=Math.max(At.bottom,dt.bottom,ht),St==Direction.LTR?lt.push(c&&mt?b:At.left,c&&Ot?$:dt.right):lt.push(!c&&Ot?b:dt.left,!c&&mt?$:At.right)}let ft=at!=null?at:ut.from,gt=ot!=null?ot:ut.to;for(let yt of o.visibleRanges)if(yt.to>ft&&yt.from<gt)for(let mt=Math.max(yt.from,ft),Et=Math.min(yt.to,gt);;){let Ot=o.state.doc.lineAt(mt);for(let St of o.bidiSpans(Ot)){let At=St.from+Ot.from,dt=St.to+Ot.from;if(At>=Et)break;dt>mt&&pt(Math.max(At,mt),at==null&&At<=ft,Math.min(dt,Et),ot==null&&dt>=gt,St.dir)}if(mt=Ot.to+1,mt>=Et)break}return lt.length==0&&pt(ft,at==null,gt,ot==null,o.textDirection),{top:ct,bottom:ht,horizontal:lt}}function it(at,ot){let ut=d.top+(ot?at.top:at.bottom);return{top:ut,bottom:ut,horizontal:[]}}}function measureCursor(o,e,s){let a=o.coordsAtPos(e.head,e.assoc||1);if(!a)return null;let c=getBase(o);return new Piece(a.left-c.left,a.top-c.top,-1,a.bottom-a.top,s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}const setDropCursorPos=StateEffect.define({map(o,e){return o==null?null:e.mapPos(o)}}),dropCursorPos=StateField.define({create(){return null},update(o,e){return o!=null&&(o=e.changes.mapPos(o)),e.effects.reduce((s,a)=>a.is(setDropCursorPos)?a.value:s,o)}}),drawDropCursor=ViewPlugin.fromClass(class{constructor(o){this.view=o,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(o){var e;let s=o.state.field(dropCursorPos);s==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"),(o.startState.field(dropCursorPos)!=s||o.docChanged||o.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let o=this.view.state.field(dropCursorPos),e=o!=null&&this.view.coordsAtPos(o);if(!e)return null;let s=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-s.left+this.view.scrollDOM.scrollLeft,top:e.top-s.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(o){this.cursor&&(o?(this.cursor.style.left=o.left+"px",this.cursor.style.top=o.top+"px",this.cursor.style.height=o.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(o){this.view.state.field(dropCursorPos)!=o&&this.view.dispatch({effects:setDropCursorPos.of(o)})}},{eventHandlers:{dragover(o){this.setDropPos(this.view.posAtCoords({x:o.clientX,y:o.clientY}))},dragleave(o){(o.target==this.view.contentDOM||!this.view.contentDOM.contains(o.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function dropCursor(){return[dropCursorPos,drawDropCursor]}function iterMatches(o,e,s,a,c){e.lastIndex=0;for(let h=o.iterRange(s,a),d=s,g;!h.next().done;d+=h.value.length)if(!h.lineBreak)for(;g=e.exec(h.value);)c(d+g.index,g)}function matchRanges(o,e){let s=o.visibleRanges;if(s.length==1&&s[0].from==o.viewport.from&&s[0].to==o.viewport.to)return s;let a=[];for(let{from:c,to:h}of s)c=Math.max(o.state.doc.lineAt(c).from,c-e),h=Math.min(o.state.doc.lineAt(h).to,h+e),a.length&&a[a.length-1].to>=c?a[a.length-1].to=h:a.push({from:c,to:h});return a}class MatchDecorator{constructor(e){const{regexp:s,decoration:a,decorate:c,boundary:h,maxLength:d=1e3}=e;if(!s.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=s,c)this.addMatch=(g,_,b,$)=>c($,b,b+g[0].length,g,_);else if(a){let g=typeof a=="function"?a:()=>a;this.addMatch=(_,b,$,j)=>j($,$+_[0].length,g(_,b,$))}else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=h,this.maxLength=d}createDeco(e){let s=new RangeSetBuilder,a=s.add.bind(s);for(let{from:c,to:h}of matchRanges(e,this.maxLength))iterMatches(e.state.doc,this.regexp,c,h,(d,g)=>this.addMatch(g,e,d,a));return s.finish()}updateDeco(e,s){let a=1e9,c=-1;return e.docChanged&&e.changes.iterChanges((h,d,g,_)=>{_>e.view.viewport.from&&g<e.view.viewport.to&&(a=Math.min(g,a),c=Math.max(_,c))}),e.viewportChanged||c-a>1e3?this.createDeco(e.view):c>-1?this.updateRange(e.view,s.map(e.changes),a,c):s}updateRange(e,s,a,c){for(let h of e.visibleRanges){let d=Math.max(h.from,a),g=Math.min(h.to,c);if(g>d){let _=e.state.doc.lineAt(d),b=_.to<g?e.state.doc.lineAt(g):_,$=Math.max(h.from,_.from),j=Math.min(h.to,b.to);if(this.boundary){for(;d>_.from;d--)if(this.boundary.test(_.text[d-1-_.from])){$=d;break}for(;g<b.to;g++)if(this.boundary.test(b.text[g-b.from])){j=g;break}}let _e=[],et,tt=(nt,st,rt)=>_e.push(rt.range(nt,st));if(_==b)for(this.regexp.lastIndex=$-_.from;(et=this.regexp.exec(_.text))&&et.index<j-_.from;)this.addMatch(et,e,et.index+_.from,tt);else iterMatches(e.state.doc,this.regexp,$,j,(nt,st)=>this.addMatch(st,e,nt,tt));s=s.update({filterFrom:$,filterTo:j,filter:(nt,st)=>nt<$||st>j,add:_e})}}return s}}const UnicodeRegexpSupport=/x/.unicode!=null?"gu":"g",Specials=new RegExp(`[\0-\b
|
||
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,UnicodeRegexpSupport),Names={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 _supportsTabSize=null;function supportsTabSize(){var o;if(_supportsTabSize==null&&typeof document<"u"&&document.body){let e=document.body.style;_supportsTabSize=((o=e.tabSize)!==null&&o!==void 0?o:e.MozTabSize)!=null}return _supportsTabSize||!1}const specialCharConfig=Facet.define({combine(o){let e=combineConfig(o,{render:null,specialChars:Specials,addSpecialChars:null});return(e.replaceTabs=!supportsTabSize())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,UnicodeRegexpSupport)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,UnicodeRegexpSupport)),e}});function highlightSpecialChars(o={}){return[specialCharConfig.of(o),specialCharPlugin()]}let _plugin=null;function specialCharPlugin(){return _plugin||(_plugin=ViewPlugin.fromClass(class{constructor(o){this.view=o,this.decorations=Decoration.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(o.state.facet(specialCharConfig)),this.decorations=this.decorator.createDeco(o)}makeDecorator(o){return new MatchDecorator({regexp:o.specialChars,decoration:(e,s,a)=>{let{doc:c}=s.state,h=codePointAt(e[0],0);if(h==9){let d=c.lineAt(a),g=s.state.tabSize,_=countColumn(d.text,g,a-d.from);return Decoration.replace({widget:new TabWidget((g-_%g)*this.view.defaultCharacterWidth)})}return this.decorationCache[h]||(this.decorationCache[h]=Decoration.replace({widget:new SpecialCharWidget(o,h)}))},boundary:o.replaceTabs?void 0:/[^]/})}update(o){let e=o.state.facet(specialCharConfig);o.startState.facet(specialCharConfig)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(o.view)):this.decorations=this.decorator.updateDeco(o,this.decorations)}},{decorations:o=>o.decorations}))}const DefaultPlaceholder="\u2022";function placeholder$1(o){return o>=32?DefaultPlaceholder:o==10?"\u2424":String.fromCharCode(9216+o)}class SpecialCharWidget extends WidgetType{constructor(e,s){super(),this.options=e,this.code=s}eq(e){return e.code==this.code}toDOM(e){let s=placeholder$1(this.code),a=e.state.phrase("Control character")+" "+(Names[this.code]||"0x"+this.code.toString(16)),c=this.options.render&&this.options.render(this.code,a,s);if(c)return c;let h=document.createElement("span");return h.textContent=s,h.title=a,h.setAttribute("aria-label",a),h.className="cm-specialChar",h}ignoreEvent(){return!1}}class TabWidget extends WidgetType{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 highlightActiveLine(){return activeLineHighlighter}const lineDeco=Decoration.line({class:"cm-activeLine"}),activeLineHighlighter=ViewPlugin.fromClass(class{constructor(o){this.decorations=this.getDeco(o)}update(o){(o.docChanged||o.selectionSet)&&(this.decorations=this.getDeco(o.view))}getDeco(o){let e=-1,s=[];for(let a of o.state.selection.ranges){if(!a.empty)return Decoration.none;let c=o.lineBlockAt(a.head);c.from>e&&(s.push(lineDeco.range(c.from)),e=c.from)}return Decoration.set(s)}},{decorations:o=>o.decorations});class Placeholder extends WidgetType{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}function placeholder(o){return ViewPlugin.fromClass(class{constructor(e){this.view=e,this.placeholder=Decoration.set([Decoration.widget({widget:new Placeholder(o),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?Decoration.none:this.placeholder}},{decorations:e=>e.decorations})}const MaxOff=2e3;function rectangleFor(o,e,s){let a=Math.min(e.line,s.line),c=Math.max(e.line,s.line),h=[];if(e.off>MaxOff||s.off>MaxOff||e.col<0||s.col<0){let d=Math.min(e.off,s.off),g=Math.max(e.off,s.off);for(let _=a;_<=c;_++){let b=o.doc.line(_);b.length<=g&&h.push(EditorSelection.range(b.from+d,b.to+g))}}else{let d=Math.min(e.col,s.col),g=Math.max(e.col,s.col);for(let _=a;_<=c;_++){let b=o.doc.line(_),$=findColumn(b.text,d,o.tabSize,!0);if($>-1){let j=findColumn(b.text,g,o.tabSize);h.push(EditorSelection.range(b.from+$,b.from+j))}}}return h}function absoluteColumn(o,e){let s=o.coordsAtPos(o.viewport.from);return s?Math.round(Math.abs((s.left-e)/o.defaultCharacterWidth)):-1}function getPos(o,e){let s=o.posAtCoords({x:e.clientX,y:e.clientY},!1),a=o.state.doc.lineAt(s),c=s-a.from,h=c>MaxOff?-1:c==a.length?absoluteColumn(o,e.clientX):countColumn(a.text,o.state.tabSize,s-a.from);return{line:a.number,col:h,off:c}}function rectangleSelectionStyle(o,e){let s=getPos(o,e),a=o.state.selection;return s?{update(c){if(c.docChanged){let h=c.changes.mapPos(c.startState.doc.line(s.line).from),d=c.state.doc.lineAt(h);s={line:d.number,col:s.col,off:Math.min(s.off,d.length)},a=a.map(c.changes)}},get(c,h,d){let g=getPos(o,c);if(!g)return a;let _=rectangleFor(o.state,s,g);return _.length?d?EditorSelection.create(_.concat(a.ranges)):EditorSelection.create(_):a}}:null}function rectangularSelection(o){let e=(o==null?void 0:o.eventFilter)||(s=>s.altKey&&s.button==0);return EditorView.mouseSelectionStyle.of((s,a)=>e(a)?rectangleSelectionStyle(s,a):null)}const keys={Alt:[18,o=>o.altKey],Control:[17,o=>o.ctrlKey],Shift:[16,o=>o.shiftKey],Meta:[91,o=>o.metaKey]},showCrosshair={style:"cursor: crosshair"};function crosshairCursor(o={}){let[e,s]=keys[o.key||"Alt"],a=ViewPlugin.fromClass(class{constructor(c){this.view=c,this.isDown=!1}set(c){this.isDown!=c&&(this.isDown=c,this.view.update([]))}},{eventHandlers:{keydown(c){this.set(c.keyCode==e||s(c))},keyup(c){(c.keyCode==e||!s(c))&&this.set(!1)}}});return[a,EditorView.contentAttributes.of(c=>{var h;return!((h=c.plugin(a))===null||h===void 0)&&h.isDown?showCrosshair:null})]}const Outside="-10000px";class TooltipViewManager{constructor(e,s,a){this.facet=s,this.createTooltipView=a,this.input=e.state.facet(s),this.tooltips=this.input.filter(c=>c),this.tooltipViews=this.tooltips.map(a)}update(e){let s=e.state.facet(this.facet),a=s.filter(h=>h);if(s===this.input){for(let h of this.tooltipViews)h.update&&h.update(e);return!1}let c=[];for(let h=0;h<a.length;h++){let d=a[h],g=-1;if(!!d){for(let _=0;_<this.tooltips.length;_++){let b=this.tooltips[_];b&&b.create==d.create&&(g=_)}if(g<0)c[h]=this.createTooltipView(d);else{let _=c[h]=this.tooltipViews[g];_.update&&_.update(e)}}}for(let h of this.tooltipViews)c.indexOf(h)<0&&h.dom.remove();return this.input=s,this.tooltips=a,this.tooltipViews=c,!0}}function windowSpace(){return{top:0,left:0,bottom:innerHeight,right:innerWidth}}const tooltipConfig=Facet.define({combine:o=>{var e,s,a;return{position:browser.ios?"absolute":((e=o.find(c=>c.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((s=o.find(c=>c.parent))===null||s===void 0?void 0:s.parent)||null,tooltipSpace:((a=o.find(c=>c.tooltipSpace))===null||a===void 0?void 0:a.tooltipSpace)||windowSpace}}}),tooltipPlugin=ViewPlugin.fromClass(class{constructor(o){var e;this.view=o,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let s=o.state.facet(tooltipConfig);this.position=s.position,this.parent=s.parent,this.classes=o.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new TooltipViewManager(o,showTooltip,a=>this.createTooltip(a)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(a=>{Date.now()>this.lastTransaction-50&&a.length>0&&a[a.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),(e=o.dom.ownerDocument.defaultView)===null||e===void 0||e.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 o of this.manager.tooltipViews)this.intersectionObserver.observe(o.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(o){o.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(o);e&&this.observeIntersection();let s=e||o.geometryChanged,a=o.state.facet(tooltipConfig);if(a.position!=this.position){this.position=a.position;for(let c of this.manager.tooltipViews)c.dom.style.position=this.position;s=!0}if(a.parent!=this.parent){this.parent&&this.container.remove(),this.parent=a.parent,this.createContainer();for(let c of this.manager.tooltipViews)this.container.appendChild(c.dom);s=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);s&&this.maybeMeasure()}createTooltip(o){let e=o.create(this.view);if(e.dom.classList.add("cm-tooltip"),o.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",e.dom.appendChild(s)}return e.dom.style.position=this.position,e.dom.style.top=Outside,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var o,e;(o=this.view.dom.ownerDocument.defaultView)===null||o===void 0||o.removeEventListener("resize",this.measureSoon);for(let{dom:s}of this.manager.tooltipViews)s.remove();(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let o=this.view.dom.getBoundingClientRect();return{editor:o,parent:this.parent?this.container.getBoundingClientRect():o,pos:this.manager.tooltips.map((e,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(tooltipConfig).tooltipSpace(this.view)}}writeMeasure(o){let{editor:e,space:s}=o,a=[];for(let c=0;c<this.manager.tooltips.length;c++){let h=this.manager.tooltips[c],d=this.manager.tooltipViews[c],{dom:g}=d,_=o.pos[c],b=o.size[c];if(!_||_.bottom<=Math.max(e.top,s.top)||_.top>=Math.min(e.bottom,s.bottom)||_.right<Math.max(e.left,s.left)-.1||_.left>Math.min(e.right,s.right)+.1){g.style.top=Outside;continue}let $=h.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,j=$?7:0,_e=b.right-b.left,et=b.bottom-b.top,tt=d.offset||noOffset,nt=this.view.textDirection==Direction.LTR,st=b.width>s.right-s.left?nt?s.left:s.right-b.width:nt?Math.min(_.left-($?14:0)+tt.x,s.right-_e):Math.max(s.left,_.left-_e+($?14:0)-tt.x),rt=!!h.above;!h.strictSide&&(rt?_.top-(b.bottom-b.top)-tt.y<s.top:_.bottom+(b.bottom-b.top)+tt.y>s.bottom)&&rt==s.bottom-_.bottom>_.top-s.top&&(rt=!rt);let it=rt?_.top-et-j-tt.y:_.bottom+j+tt.y,at=st+_e;if(d.overlap!==!0)for(let ot of a)ot.left<at&&ot.right>st&&ot.top<it+et&&ot.bottom>it&&(it=rt?ot.top-et-2-j:ot.bottom+j+2);this.position=="absolute"?(g.style.top=it-o.parent.top+"px",g.style.left=st-o.parent.left+"px"):(g.style.top=it+"px",g.style.left=st+"px"),$&&($.style.left=`${_.left+(nt?tt.x:-tt.x)-(st+14-7)}px`),d.overlap!==!0&&a.push({left:st,top:it,right:at,bottom:it+et}),g.classList.toggle("cm-tooltip-above",rt),g.classList.toggle("cm-tooltip-below",!rt),d.positioned&&d.positioned()}}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 o of this.manager.tooltipViews)o.dom.style.top=Outside}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),baseTheme$4=EditorView.baseTheme({".cm-tooltip":{zIndex:100},"&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:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),noOffset={x:0,y:0},showTooltip=Facet.define({enables:[tooltipPlugin,baseTheme$4]}),showHoverTooltip=Facet.define();class HoverTooltipHost{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new TooltipViewManager(e,showHoverTooltip,s=>this.createHostedView(s))}static create(e){return new HoverTooltipHost(e)}createHostedView(e){let s=e.create(this.view);return s.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(s.dom),this.mounted&&s.mount&&s.mount(this.view),s}mount(e){for(let s of this.manager.tooltipViews)s.mount&&s.mount(e);this.mounted=!0}positioned(){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned()}update(e){this.manager.update(e)}}const showHoverTooltipHost=showTooltip.compute([showHoverTooltip],o=>{let e=o.facet(showHoverTooltip).filter(s=>s);return e.length===0?null:{pos:Math.min(...e.map(s=>s.pos)),end:Math.max(...e.filter(s=>s.end!=null).map(s=>s.end)),create:HoverTooltipHost.create,above:e[0].above,arrow:e.some(s=>s.arrow)}});class HoverPlugin{constructor(e,s,a,c,h){this.view=e,this.source=s,this.field=a,this.setHover=c,this.hoverTime=h,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,s=this.view.contentDOM.contains(e.target)?this.view.posAtCoords(e):null;if(s==null)return;let a=this.view.coordsAtPos(s);if(a==null||e.y<a.top||e.y>a.bottom||e.x<a.left-this.view.defaultCharacterWidth||e.x>a.right+this.view.defaultCharacterWidth)return;let c=this.view.bidiSpans(this.view.state.doc.lineAt(s)).find(g=>g.from<=s&&g.to>=s),h=c&&c.dir==Direction.RTL?-1:1,d=this.source(this.view,s,e.x<a.left?-h:h);if(d!=null&&d.then){let g=this.pending={pos:s};d.then(_=>{this.pending==g&&(this.pending=null,_&&this.view.dispatch({effects:this.setHover.of(_)}))},_=>logException(this.view.state,_,"hover tooltip"))}else d&&this.view.dispatch({effects:this.setHover.of(d)})}mousemove(e){var s;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 a=this.active;if(a&&!isInTooltip(this.lastMove.target)||this.pending){let{pos:c}=a||this.pending,h=(s=a==null?void 0:a.end)!==null&&s!==void 0?s:c;(c==h?this.view.posAtCoords(this.lastMove)!=c:!isOverRange(this.view,c,h,e.clientX,e.clientY,6))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&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 isInTooltip(o){for(let e=o;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function isOverRange(o,e,s,a,c,h){let d=document.createRange(),g=o.domAtPos(e),_=o.domAtPos(s);d.setEnd(_.node,_.offset),d.setStart(g.node,g.offset);let b=d.getClientRects();d.detach();for(let $=0;$<b.length;$++){let j=b[$];if(Math.max(j.top-c,c-j.bottom,j.left-a,a-j.right)<=h)return!0}return!1}function hoverTooltip(o,e={}){let s=StateEffect.define(),a=StateField.define({create(){return null},update(c,h){if(c&&(e.hideOnChange&&(h.docChanged||h.selection)||e.hideOn&&e.hideOn(h,c)))return null;if(c&&h.docChanged){let d=h.changes.mapPos(c.pos,-1,MapMode.TrackDel);if(d==null)return null;let g=Object.assign(Object.create(null),c);g.pos=d,c.end!=null&&(g.end=h.changes.mapPos(c.end)),c=g}for(let d of h.effects)d.is(s)&&(c=d.value),d.is(closeHoverTooltipEffect)&&(c=null);return c},provide:c=>showHoverTooltip.from(c)});return[a,ViewPlugin.define(c=>new HoverPlugin(c,o,a,s,e.hoverTime||300)),showHoverTooltipHost]}function getTooltip(o,e){let s=o.plugin(tooltipPlugin);if(!s)return null;let a=s.manager.tooltips.indexOf(e);return a<0?null:s.manager.tooltipViews[a]}const closeHoverTooltipEffect=StateEffect.define(),panelConfig=Facet.define({combine(o){let e,s;for(let a of o)e=e||a.topContainer,s=s||a.bottomContainer;return{topContainer:e,bottomContainer:s}}});function getPanel(o,e){let s=o.plugin(panelPlugin),a=s?s.specs.indexOf(e):-1;return a>-1?s.panels[a]:null}const panelPlugin=ViewPlugin.fromClass(class{constructor(o){this.input=o.state.facet(showPanel),this.specs=this.input.filter(s=>s),this.panels=this.specs.map(s=>s(o));let e=o.state.facet(panelConfig);this.top=new PanelGroup(o,!0,e.topContainer),this.bottom=new PanelGroup(o,!1,e.bottomContainer),this.top.sync(this.panels.filter(s=>s.top)),this.bottom.sync(this.panels.filter(s=>!s.top));for(let s of this.panels)s.dom.classList.add("cm-panel"),s.mount&&s.mount()}update(o){let e=o.state.facet(panelConfig);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new PanelGroup(o.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new PanelGroup(o.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let s=o.state.facet(showPanel);if(s!=this.input){let a=s.filter(_=>_),c=[],h=[],d=[],g=[];for(let _ of a){let b=this.specs.indexOf(_),$;b<0?($=_(o.view),g.push($)):($=this.panels[b],$.update&&$.update(o)),c.push($),($.top?h:d).push($)}this.specs=a,this.panels=c,this.top.sync(h),this.bottom.sync(d);for(let _ of g)_.dom.classList.add("cm-panel"),_.mount&&_.mount()}else for(let a of this.panels)a.update&&a.update(o)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:o=>EditorView.scrollMargins.of(e=>{let s=e.plugin(o);return s&&{top:s.top.scrollMargin(),bottom:s.bottom.scrollMargin()}})});class PanelGroup{constructor(e,s,a){this.view=e,this.top=s,this.container=a,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let s of this.panels)s.destroy&&e.indexOf(s)<0&&s.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 s=this.container||this.view.dom;s.insertBefore(this.dom,this.top?s.firstChild:null)}let e=this.dom.firstChild;for(let s of this.panels)if(s.dom.parentNode==this.dom){for(;e!=s.dom;)e=rm(e);e=e.nextSibling}else this.dom.insertBefore(s.dom,e);for(;e;)e=rm(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 rm(o){let e=o.nextSibling;return o.remove(),e}const showPanel=Facet.define({enables:panelPlugin});class GutterMarker extends RangeValue{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}GutterMarker.prototype.elementClass="";GutterMarker.prototype.toDOM=void 0;GutterMarker.prototype.mapMode=MapMode.TrackBefore;GutterMarker.prototype.startSide=GutterMarker.prototype.endSide=-1;GutterMarker.prototype.point=!0;const gutterLineClass=Facet.define(),defaults$1={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>RangeSet.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},activeGutters=Facet.define();function gutter(o){return[gutters(),activeGutters.of(Object.assign(Object.assign({},defaults$1),o))]}const unfixGutters=Facet.define({combine:o=>o.some(e=>e)});function gutters(o){let e=[gutterView];return o&&o.fixed===!1&&e.push(unfixGutters.of(!0)),e}const gutterView=ViewPlugin.fromClass(class{constructor(o){this.view=o,this.prevViewport=o.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=o.state.facet(activeGutters).map(e=>new SingleGutterView(o,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!o.state.facet(unfixGutters),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),o.scrollDOM.insertBefore(this.dom,o.contentDOM)}update(o){if(this.updateGutters(o)){let e=this.prevViewport,s=o.view.viewport,a=Math.min(e.to,s.to)-Math.max(e.from,s.from);this.syncGutters(a<(s.to-s.from)*.8)}o.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(unfixGutters)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=o.view.viewport}syncGutters(o){let e=this.dom.nextSibling;o&&this.dom.remove();let s=RangeSet.iter(this.view.state.facet(gutterLineClass),this.view.viewport.from),a=[],c=this.gutters.map(h=>new UpdateContext(h,this.view.viewport,-this.view.documentPadding.top));for(let h of this.view.viewportLineBlocks){let d;if(Array.isArray(h.type)){for(let g of h.type)if(g.type==BlockType.Text){d=g;break}}else d=h.type==BlockType.Text?h:void 0;if(!!d){a.length&&(a=[]),advanceCursor(s,a,h.from);for(let g of c)g.line(this.view,d,a)}}for(let h of c)h.finish();o&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(o){let e=o.startState.facet(activeGutters),s=o.state.facet(activeGutters),a=o.docChanged||o.heightChanged||o.viewportChanged||!RangeSet.eq(o.startState.facet(gutterLineClass),o.state.facet(gutterLineClass),o.view.viewport.from,o.view.viewport.to);if(e==s)for(let c of this.gutters)c.update(o)&&(a=!0);else{a=!0;let c=[];for(let h of s){let d=e.indexOf(h);d<0?c.push(new SingleGutterView(this.view,h)):(this.gutters[d].update(o),c.push(this.gutters[d]))}for(let h of this.gutters)h.dom.remove(),c.indexOf(h)<0&&h.destroy();for(let h of c)this.dom.appendChild(h.dom);this.gutters=c}return a}destroy(){for(let o of this.gutters)o.destroy();this.dom.remove()}},{provide:o=>EditorView.scrollMargins.of(e=>{let s=e.plugin(o);return!s||s.gutters.length==0||!s.fixed?null:e.textDirection==Direction.LTR?{left:s.dom.offsetWidth}:{right:s.dom.offsetWidth}})});function asArray(o){return Array.isArray(o)?o:[o]}function advanceCursor(o,e,s){for(;o.value&&o.from<=s;)o.from==s&&e.push(o.value),o.next()}class UpdateContext{constructor(e,s,a){this.gutter=e,this.height=a,this.localMarkers=[],this.i=0,this.cursor=RangeSet.iter(e.markers,s.from)}line(e,s,a){this.localMarkers.length&&(this.localMarkers=[]),advanceCursor(this.cursor,this.localMarkers,s.from);let c=a.length?this.localMarkers.concat(a):this.localMarkers,h=this.gutter.config.lineMarker(e,s,c);h&&c.unshift(h);let d=this.gutter;if(c.length==0&&!d.config.renderEmptyElements)return;let g=s.top-this.height;if(this.i==d.elements.length){let _=new GutterElement(e,s.height,g,c);d.elements.push(_),d.dom.appendChild(_.dom)}else d.elements[this.i].update(e,s.height,g,c);this.height=s.bottom,this.i++}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let s=e.elements.pop();e.dom.removeChild(s.dom),s.destroy()}}}class SingleGutterView{constructor(e,s){this.view=e,this.config=s,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let a in s.domEventHandlers)this.dom.addEventListener(a,c=>{let h=e.lineBlockAtHeight(c.clientY-e.documentTop);s.domEventHandlers[a](e,h,c)&&c.preventDefault()});this.markers=asArray(s.markers(e)),s.initialSpacer&&(this.spacer=new GutterElement(e,0,0,[s.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let s=this.markers;if(this.markers=asArray(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let c=this.config.updateSpacer(this.spacer.markers[0],e);c!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[c])}let a=e.view.viewport;return!RangeSet.eq(this.markers,s,a.from,a.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class GutterElement{constructor(e,s,a,c){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,s,a,c)}update(e,s,a,c){this.height!=s&&(this.dom.style.height=(this.height=s)+"px"),this.above!=a&&(this.dom.style.marginTop=(this.above=a)?a+"px":""),sameMarkers(this.markers,c)||this.setMarkers(e,c)}setMarkers(e,s){let a="cm-gutterElement",c=this.dom.firstChild;for(let h=0,d=0;;){let g=d,_=h<s.length?s[h++]:null,b=!1;if(_){let $=_.elementClass;$&&(a+=" "+$);for(let j=d;j<this.markers.length;j++)if(this.markers[j].compare(_)){g=j,b=!0;break}}else g=this.markers.length;for(;d<g;){let $=this.markers[d++];if($.toDOM){$.destroy(c);let j=c.nextSibling;c.remove(),c=j}}if(!_)break;_.toDOM&&(b?c=c.nextSibling:this.dom.insertBefore(_.toDOM(e),c)),b&&d++}this.dom.className=a,this.markers=s}destroy(){this.setMarkers(null,[])}}function sameMarkers(o,e){if(o.length!=e.length)return!1;for(let s=0;s<o.length;s++)if(!o[s].compare(e[s]))return!1;return!0}const lineNumberMarkers=Facet.define(),lineNumberConfig=Facet.define({combine(o){return combineConfig(o,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,s){let a=Object.assign({},e);for(let c in s){let h=a[c],d=s[c];a[c]=h?(g,_,b)=>h(g,_,b)||d(g,_,b):d}return a}})}});class NumberMarker extends GutterMarker{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function formatNumber(o,e){return o.state.facet(lineNumberConfig).formatNumber(e,o.state)}const lineNumberGutter=activeGutters.compute([lineNumberConfig],o=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(lineNumberMarkers)},lineMarker(e,s,a){return a.some(c=>c.toDOM)?null:new NumberMarker(formatNumber(e,e.state.doc.lineAt(s.from).number))},lineMarkerChange:e=>e.startState.facet(lineNumberConfig)!=e.state.facet(lineNumberConfig),initialSpacer(e){return new NumberMarker(formatNumber(e,maxLineNumber(e.state.doc.lines)))},updateSpacer(e,s){let a=formatNumber(s.view,maxLineNumber(s.view.state.doc.lines));return a==e.number?e:new NumberMarker(a)},domEventHandlers:o.facet(lineNumberConfig).domEventHandlers}));function lineNumbers(o={}){return[lineNumberConfig.of(o),gutters(),lineNumberGutter]}function maxLineNumber(o){let e=9;for(;e<o;)e=e*10+9;return e}const activeLineGutterMarker=new class extends GutterMarker{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},activeLineGutterHighlighter=gutterLineClass.compute(["selection"],o=>{let e=[],s=-1;for(let a of o.selection.ranges)if(a.empty){let c=o.doc.lineAt(a.head).from;c>s&&(s=c,e.push(activeLineGutterMarker.range(c)))}return RangeSet.of(e)});function highlightActiveLineGutter(){return activeLineGutterHighlighter}const DefaultBufferLength=1024;let nextPropID=0;class Range{constructor(e,s){this.from=e,this.to=s}}class NodeProp{constructor(e={}){this.id=nextPropID++,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=NodeType.match(e)),s=>{let a=e(s);return a===void 0?null:[this,a]}}}NodeProp.closedBy=new NodeProp({deserialize:o=>o.split(" ")});NodeProp.openedBy=new NodeProp({deserialize:o=>o.split(" ")});NodeProp.group=new NodeProp({deserialize:o=>o.split(" ")});NodeProp.contextHash=new NodeProp({perNode:!0});NodeProp.lookAhead=new NodeProp({perNode:!0});NodeProp.mounted=new NodeProp({perNode:!0});const noProps=Object.create(null);class NodeType{constructor(e,s,a,c=0){this.name=e,this.props=s,this.id=a,this.flags=c}static define(e){let s=e.props&&e.props.length?Object.create(null):noProps,a=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),c=new NodeType(e.name||"",s,e.id,a);if(e.props){for(let h of e.props)if(Array.isArray(h)||(h=h(c)),h){if(h[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");s[h[0].id]=h[1]}}return c}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 s=this.prop(NodeProp.group);return s?s.indexOf(e)>-1:!1}return this.id==e}static match(e){let s=Object.create(null);for(let a in e)for(let c of a.split(" "))s[c]=e[a];return a=>{for(let c=a.prop(NodeProp.group),h=-1;h<(c?c.length:0);h++){let d=s[h<0?a.name:c[h]];if(d)return d}}}}NodeType.none=new NodeType("",Object.create(null),0,8);class NodeSet{constructor(e){this.types=e;for(let s=0;s<e.length;s++)if(e[s].id!=s)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let s=[];for(let a of this.types){let c=null;for(let h of e){let d=h(a);d&&(c||(c=Object.assign({},a.props)),c[d[0].id]=d[1])}s.push(c?new NodeType(a.name,c,a.id,a.flags):a)}return new NodeSet(s)}}const CachedNode=new WeakMap,CachedInnerNode=new WeakMap;var IterMode;(function(o){o[o.ExcludeBuffers=1]="ExcludeBuffers",o[o.IncludeAnonymous=2]="IncludeAnonymous",o[o.IgnoreMounts=4]="IgnoreMounts",o[o.IgnoreOverlays=8]="IgnoreOverlays"})(IterMode||(IterMode={}));class Tree{constructor(e,s,a,c,h){if(this.type=e,this.children=s,this.positions=a,this.length=c,this.props=null,h&&h.length){this.props=Object.create(null);for(let[d,g]of h)this.props[typeof d=="number"?d:d.id]=g}}toString(){let e=this.prop(NodeProp.mounted);if(e&&!e.overlay)return e.tree.toString();let s="";for(let a of this.children){let c=a.toString();c&&(s&&(s+=","),s+=c)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(s.length?"("+s+")":""):s}cursor(e=0){return new TreeCursor(this.topNode,e)}cursorAt(e,s=0,a=0){let c=CachedNode.get(this)||this.topNode,h=new TreeCursor(c);return h.moveTo(e,s),CachedNode.set(this,h._tree),h}get topNode(){return new TreeNode(this,0,0,null)}resolve(e,s=0){let a=resolveNode(CachedNode.get(this)||this.topNode,e,s,!1);return CachedNode.set(this,a),a}resolveInner(e,s=0){let a=resolveNode(CachedInnerNode.get(this)||this.topNode,e,s,!0);return CachedInnerNode.set(this,a),a}iterate(e){let{enter:s,leave:a,from:c=0,to:h=this.length}=e;for(let d=this.cursor((e.mode||0)|IterMode.IncludeAnonymous);;){let g=!1;if(d.from<=h&&d.to>=c&&(d.type.isAnonymous||s(d)!==!1)){if(d.firstChild())continue;g=!0}for(;g&&a&&!d.type.isAnonymous&&a(d),!d.nextSibling();){if(!d.parent())return;g=!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 s in this.props)e.push([+s,this.props[s]]);return e}balance(e={}){return this.children.length<=8?this:balanceRange(NodeType.none,this.children,this.positions,0,this.children.length,0,this.length,(s,a,c)=>new Tree(this.type,s,a,c,this.propValues),e.makeTree||((s,a,c)=>new Tree(NodeType.none,s,a,c)))}static build(e){return buildTree(e)}}Tree.empty=new Tree(NodeType.none,[],[],0);class FlatBufferCursor{constructor(e,s){this.buffer=e,this.index=s}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 FlatBufferCursor(this.buffer,this.index)}}class TreeBuffer{constructor(e,s,a){this.buffer=e,this.length=s,this.set=a}get type(){return NodeType.none}toString(){let e=[];for(let s=0;s<this.buffer.length;)e.push(this.childString(s)),s=this.buffer[s+3];return e.join(",")}childString(e){let s=this.buffer[e],a=this.buffer[e+3],c=this.set.types[s],h=c.name;if(/\W/.test(h)&&!c.isError&&(h=JSON.stringify(h)),e+=4,a==e)return h;let d=[];for(;e<a;)d.push(this.childString(e)),e=this.buffer[e+3];return h+"("+d.join(",")+")"}findChild(e,s,a,c,h){let{buffer:d}=this,g=-1;for(let _=e;_!=s&&!(checkSide(h,c,d[_+1],d[_+2])&&(g=_,a>0));_=d[_+3]);return g}slice(e,s,a,c){let h=this.buffer,d=new Uint16Array(s-e);for(let g=e,_=0;g<s;)d[_++]=h[g++],d[_++]=h[g++]-a,d[_++]=h[g++]-a,d[_++]=h[g++]-e;return new TreeBuffer(d,c-a,this.set)}}function checkSide(o,e,s,a){switch(o){case-2:return s<e;case-1:return a>=e&&s<e;case 0:return s<e&&a>e;case 1:return s<=e&&a>e;case 2:return a>e;case 4:return!0}}function enterUnfinishedNodesBefore(o,e){let s=o.childBefore(e);for(;s;){let a=s.lastChild;if(!a||a.to!=s.to)break;a.type.isError&&a.from==a.to?(o=s,s=a.prevSibling):s=a}return o}function resolveNode(o,e,s,a){for(var c;o.from==o.to||(s<1?o.from>=e:o.from>e)||(s>-1?o.to<=e:o.to<e);){let d=!a&&o instanceof TreeNode&&o.index<0?null:o.parent;if(!d)return o;o=d}let h=a?0:IterMode.IgnoreOverlays;if(a)for(let d=o,g=d.parent;g;d=g,g=d.parent)d instanceof TreeNode&&d.index<0&&((c=g.enter(e,s,h))===null||c===void 0?void 0:c.from)!=d.from&&(o=g);for(;;){let d=o.enter(e,s,h);if(!d)return o;o=d}}class TreeNode{constructor(e,s,a,c){this._tree=e,this.from=s,this.index=a,this._parent=c}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,s,a,c,h=0){for(let d=this;;){for(let{children:g,positions:_}=d._tree,b=s>0?g.length:-1;e!=b;e+=s){let $=g[e],j=_[e]+d.from;if(!!checkSide(c,a,j,j+$.length)){if($ instanceof TreeBuffer){if(h&IterMode.ExcludeBuffers)continue;let _e=$.findChild(0,$.buffer.length,s,a-j,c);if(_e>-1)return new BufferNode(new BufferContext(d,$,e,j),null,_e)}else if(h&IterMode.IncludeAnonymous||!$.type.isAnonymous||hasChild($)){let _e;if(!(h&IterMode.IgnoreMounts)&&$.props&&(_e=$.prop(NodeProp.mounted))&&!_e.overlay)return new TreeNode(_e.tree,j,e,d);let et=new TreeNode($,j,e,d);return h&IterMode.IncludeAnonymous||!et.type.isAnonymous?et:et.nextChild(s<0?$.children.length-1:0,s,a,c)}}}if(h&IterMode.IncludeAnonymous||!d.type.isAnonymous||(d.index>=0?e=d.index+s:e=s<0?-1:d._parent._tree.children.length,d=d._parent,!d))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,s,a=0){let c;if(!(a&IterMode.IgnoreOverlays)&&(c=this._tree.prop(NodeProp.mounted))&&c.overlay){let h=e-this.from;for(let{from:d,to:g}of c.overlay)if((s>0?d<=h:d<h)&&(s<0?g>=h:g>h))return new TreeNode(c.tree,c.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,s,a)}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 TreeCursor(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,s=0){return resolveNode(this,e,s,!1)}resolveInner(e,s=0){return resolveNode(this,e,s,!0)}enterUnfinishedNodesBefore(e){return enterUnfinishedNodesBefore(this,e)}getChild(e,s=null,a=null){let c=getChildren(this,e,s,a);return c.length?c[0]:null}getChildren(e,s=null,a=null){return getChildren(this,e,s,a)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return matchNodeContext(this,e)}}function getChildren(o,e,s,a){let c=o.cursor(),h=[];if(!c.firstChild())return h;if(s!=null){for(;!c.type.is(s);)if(!c.nextSibling())return h}for(;;){if(a!=null&&c.type.is(a))return h;if(c.type.is(e)&&h.push(c.node),!c.nextSibling())return a==null?h:[]}}function matchNodeContext(o,e,s=e.length-1){for(let a=o.parent;s>=0;a=a.parent){if(!a)return!1;if(!a.type.isAnonymous){if(e[s]&&e[s]!=a.name)return!1;s--}}return!0}class BufferContext{constructor(e,s,a,c){this.parent=e,this.buffer=s,this.index=a,this.start=c}}class BufferNode{constructor(e,s,a){this.context=e,this._parent=s,this.index=a,this.type=e.buffer.set.types[e.buffer.buffer[a]]}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]}child(e,s,a){let{buffer:c}=this.context,h=c.findChild(this.index+4,c.buffer[this.index+3],e,s-this.context.start,a);return h<0?null:new BufferNode(this.context,this,h)}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,s,a=0){if(a&IterMode.ExcludeBuffers)return null;let{buffer:c}=this.context,h=c.findChild(this.index+4,c.buffer[this.index+3],s>0?1:-1,e-this.context.start,s);return h<0?null:new BufferNode(this.context,this,h)}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,s=e.buffer[this.index+3];return s<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new BufferNode(this.context,this._parent,s):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,s=this._parent?this._parent.index+4:0;return this.index==s?this.externalSibling(-1):new BufferNode(this.context,this._parent,e.findChild(s,this.index,-1,0,4))}cursor(e=0){return new TreeCursor(this,e)}get tree(){return null}toTree(){let e=[],s=[],{buffer:a}=this.context,c=this.index+4,h=a.buffer[this.index+3];if(h>c){let d=a.buffer[this.index+1],g=a.buffer[this.index+2];e.push(a.slice(c,h,d,g)),s.push(0)}return new Tree(this.type,e,s,this.to-this.from)}resolve(e,s=0){return resolveNode(this,e,s,!1)}resolveInner(e,s=0){return resolveNode(this,e,s,!0)}enterUnfinishedNodesBefore(e){return enterUnfinishedNodesBefore(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,s=null,a=null){let c=getChildren(this,e,s,a);return c.length?c[0]:null}getChildren(e,s=null,a=null){return getChildren(this,e,s,a)}get node(){return this}matchContext(e){return matchNodeContext(this,e)}}class TreeCursor{constructor(e,s=0){if(this.mode=s,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof TreeNode)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let a=e._parent;a;a=a._parent)this.stack.unshift(a.index);this.bufferNode=e,this.yieldBuf(e.index)}}get name(){return this.type.name}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,s){this.index=e;let{start:a,buffer:c}=this.buffer;return this.type=s||c.set.types[c.buffer[e]],this.from=a+c.buffer[e+1],this.to=a+c.buffer[e+2],!0}yield(e){return e?e instanceof TreeNode?(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,s,a){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,s,a,this.mode));let{buffer:c}=this.buffer,h=c.findChild(this.index+4,c.buffer[this.index+3],e,s-this.buffer.start,a);return h<0?!1:(this.stack.push(this.index),this.yieldBuf(h))}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,s,a=this.mode){return this.buffer?a&IterMode.ExcludeBuffers?!1:this.enterChild(1,e,s):this.yield(this._tree.enter(e,s,a))}parent(){if(!this.buffer)return this.yieldNode(this.mode&IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&IterMode.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:s}=this.buffer,a=this.stack.length-1;if(e<0){let c=a<0?0:this.stack[a]+4;if(this.index!=c)return this.yieldBuf(s.findChild(c,this.index,-1,0,4))}else{let c=s.buffer[this.index+3];if(c<(a<0?s.buffer.length:s.buffer[this.stack[a]+3]))return this.yieldBuf(c)}return a<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 s,a,{buffer:c}=this;if(c){if(e>0){if(this.index<c.buffer.buffer.length)return!1}else for(let h=0;h<this.index;h++)if(c.buffer.buffer[h+3]<this.index)return!1;({index:s,parent:a}=c)}else({index:s,_parent:a}=this._tree);for(;a;{index:s,_parent:a}=a)if(s>-1)for(let h=s+e,d=e<0?-1:a._tree.children.length;h!=d;h+=e){let g=a._tree.children[h];if(this.mode&IterMode.IncludeAnonymous||g instanceof TreeBuffer||!g.type.isAnonymous||hasChild(g))return!1}return!0}move(e,s){if(s&&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,s=0){for(;(this.from==this.to||(s<1?this.from>=e:this.from>e)||(s>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,s););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,s=null,a=0;if(e&&e.context==this.buffer){e:for(let c=this.index,h=this.stack.length;h>=0;){for(let d=e;d;d=d._parent)if(d.index==c){if(c==this.index)return d;s=d,a=h+1;break e}c=this.stack[--h]}}for(let c=a;c<this.stack.length;c++)s=new BufferNode(this.buffer,s,this.stack[c]);return this.bufferNode=new BufferNode(this.buffer,s,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,s){for(let a=0;;){let c=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){a++;continue}this.type.isAnonymous||(c=!0)}for(;c&&s&&s(this),c=this.type.isAnonymous,!this.nextSibling();){if(!a)return;this.parent(),a--,c=!0}}}matchContext(e){if(!this.buffer)return matchNodeContext(this.node,e);let{buffer:s}=this.buffer,{types:a}=s.set;for(let c=e.length-1,h=this.stack.length-1;c>=0;h--){if(h<0)return matchNodeContext(this.node,e,c);let d=a[s.buffer[this.stack[h]]];if(!d.isAnonymous){if(e[c]&&e[c]!=d.name)return!1;c--}}return!0}}function hasChild(o){return o.children.some(e=>e instanceof TreeBuffer||!e.type.isAnonymous||hasChild(e))}function buildTree(o){var e;let{buffer:s,nodeSet:a,maxBufferLength:c=DefaultBufferLength,reused:h=[],minRepeatType:d=a.types.length}=o,g=Array.isArray(s)?new FlatBufferCursor(s,s.length):s,_=a.types,b=0,$=0;function j(ot,ut,ct,ht,lt){let{id:pt,start:ft,end:gt,size:yt}=g,mt=$;for(;yt<0;)if(g.next(),yt==-1){let dt=h[pt];ct.push(dt),ht.push(ft-ot);return}else if(yt==-3){b=pt;return}else if(yt==-4){$=pt;return}else throw new RangeError(`Unrecognized record size: ${yt}`);let Et=_[pt],Ot,St,At=ft-ot;if(gt-ft<=c&&(St=nt(g.pos-ut,lt))){let dt=new Uint16Array(St.size-St.skip),Dt=g.pos-St.size,Ct=dt.length;for(;g.pos>Dt;)Ct=st(St.start,dt,Ct);Ot=new TreeBuffer(dt,gt-St.start,a),At=St.start-ot}else{let dt=g.pos-yt;g.next();let Dt=[],Ct=[],xt=pt>=d?pt:-1,Tt=0,kt=gt;for(;g.pos>dt;)xt>=0&&g.id==xt&&g.size>=0?(g.end<=kt-c&&(et(Dt,Ct,ft,Tt,g.end,kt,xt,mt),Tt=Dt.length,kt=g.end),g.next()):j(ft,dt,Dt,Ct,xt);if(xt>=0&&Tt>0&&Tt<Dt.length&&et(Dt,Ct,ft,Tt,ft,kt,xt,mt),Dt.reverse(),Ct.reverse(),xt>-1&&Tt>0){let _t=_e(Et);Ot=balanceRange(Et,Dt,Ct,0,Dt.length,0,gt-ft,_t,_t)}else Ot=tt(Et,Dt,Ct,gt-ft,mt-gt)}ct.push(Ot),ht.push(At)}function _e(ot){return(ut,ct,ht)=>{let lt=0,pt=ut.length-1,ft,gt;if(pt>=0&&(ft=ut[pt])instanceof Tree){if(!pt&&ft.type==ot&&ft.length==ht)return ft;(gt=ft.prop(NodeProp.lookAhead))&&(lt=ct[pt]+ft.length+gt)}return tt(ot,ut,ct,ht,lt)}}function et(ot,ut,ct,ht,lt,pt,ft,gt){let yt=[],mt=[];for(;ot.length>ht;)yt.push(ot.pop()),mt.push(ut.pop()+ct-lt);ot.push(tt(a.types[ft],yt,mt,pt-lt,gt-pt)),ut.push(lt-ct)}function tt(ot,ut,ct,ht,lt=0,pt){if(b){let ft=[NodeProp.contextHash,b];pt=pt?[ft].concat(pt):[ft]}if(lt>25){let ft=[NodeProp.lookAhead,lt];pt=pt?[ft].concat(pt):[ft]}return new Tree(ot,ut,ct,ht,pt)}function nt(ot,ut){let ct=g.fork(),ht=0,lt=0,pt=0,ft=ct.end-c,gt={size:0,start:0,skip:0};e:for(let yt=ct.pos-ot;ct.pos>yt;){let mt=ct.size;if(ct.id==ut&&mt>=0){gt.size=ht,gt.start=lt,gt.skip=pt,pt+=4,ht+=4,ct.next();continue}let Et=ct.pos-mt;if(mt<0||Et<yt||ct.start<ft)break;let Ot=ct.id>=d?4:0,St=ct.start;for(ct.next();ct.pos>Et;){if(ct.size<0)if(ct.size==-3)Ot+=4;else break e;else ct.id>=d&&(Ot+=4);ct.next()}lt=St,ht+=mt,pt+=Ot}return(ut<0||ht==ot)&&(gt.size=ht,gt.start=lt,gt.skip=pt),gt.size>4?gt:void 0}function st(ot,ut,ct){let{id:ht,start:lt,end:pt,size:ft}=g;if(g.next(),ft>=0&&ht<d){let gt=ct;if(ft>4){let yt=g.pos-(ft-4);for(;g.pos>yt;)ct=st(ot,ut,ct)}ut[--ct]=gt,ut[--ct]=pt-ot,ut[--ct]=lt-ot,ut[--ct]=ht}else ft==-3?b=ht:ft==-4&&($=ht);return ct}let rt=[],it=[];for(;g.pos>0;)j(o.start||0,o.bufferStart||0,rt,it,-1);let at=(e=o.length)!==null&&e!==void 0?e:rt.length?it[0]+rt[0].length:0;return new Tree(_[o.topID],rt.reverse(),it.reverse(),at)}const nodeSizeCache=new WeakMap;function nodeSize(o,e){if(!o.isAnonymous||e instanceof TreeBuffer||e.type!=o)return 1;let s=nodeSizeCache.get(e);if(s==null){s=1;for(let a of e.children){if(a.type!=o||!(a instanceof Tree)){s=1;break}s+=nodeSize(o,a)}nodeSizeCache.set(e,s)}return s}function balanceRange(o,e,s,a,c,h,d,g,_){let b=0;for(let tt=a;tt<c;tt++)b+=nodeSize(o,e[tt]);let $=Math.ceil(b*1.5/8),j=[],_e=[];function et(tt,nt,st,rt,it){for(let at=st;at<rt;){let ot=at,ut=nt[at],ct=nodeSize(o,tt[at]);for(at++;at<rt;at++){let ht=nodeSize(o,tt[at]);if(ct+ht>=$)break;ct+=ht}if(at==ot+1){if(ct>$){let ht=tt[ot];et(ht.children,ht.positions,0,ht.children.length,nt[ot]+it);continue}j.push(tt[ot])}else{let ht=nt[at-1]+tt[at-1].length-ut;j.push(balanceRange(o,tt,nt,ot,at,ut,ht,null,_))}_e.push(ut+it-h)}}return et(e,s,a,c,0),(g||_)(j,_e,d)}class NodeWeakMap{constructor(){this.map=new WeakMap}setBuffer(e,s,a){let c=this.map.get(e);c||this.map.set(e,c=new Map),c.set(s,a)}getBuffer(e,s){let a=this.map.get(e);return a&&a.get(s)}set(e,s){e instanceof BufferNode?this.setBuffer(e.context.buffer,e.index,s):e instanceof TreeNode&&this.map.set(e.tree,s)}get(e){return e instanceof BufferNode?this.getBuffer(e.context.buffer,e.index):e instanceof TreeNode?this.map.get(e.tree):void 0}cursorSet(e,s){e.buffer?this.setBuffer(e.buffer.buffer,e.index,s):this.map.set(e.tree,s)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class TreeFragment{constructor(e,s,a,c,h=!1,d=!1){this.from=e,this.to=s,this.tree=a,this.offset=c,this.open=(h?1:0)|(d?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,s=[],a=!1){let c=[new TreeFragment(0,e.length,e,0,!1,a)];for(let h of s)h.to>e.length&&c.push(h);return c}static applyChanges(e,s,a=128){if(!s.length)return e;let c=[],h=1,d=e.length?e[0]:null;for(let g=0,_=0,b=0;;g++){let $=g<s.length?s[g]:null,j=$?$.fromA:1e9;if(j-_>=a)for(;d&&d.from<j;){let _e=d;if(_>=_e.from||j<=_e.to||b){let et=Math.max(_e.from,_)-b,tt=Math.min(_e.to,j)-b;_e=et>=tt?null:new TreeFragment(et,tt,_e.tree,_e.offset+b,g>0,!!$)}if(_e&&c.push(_e),d.to>j)break;d=h<e.length?e[h++]:null}if(!$)break;_=$.toA,b=$.toA-$.toB}return c}}class Parser{startParse(e,s,a){return typeof e=="string"&&(e=new StringInput(e)),a=a?a.length?a.map(c=>new Range(c.from,c.to)):[new Range(0,0)]:[new Range(0,e.length)],this.createParse(e,s||[],a)}parse(e,s,a){let c=this.startParse(e,s,a);for(;;){let h=c.advance();if(h)return h}}}class StringInput{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,s){return this.string.slice(e,s)}}new NodeProp({perNode:!0});let nextTagID=0;class Tag{constructor(e,s,a){this.set=e,this.base=s,this.modified=a,this.id=nextTagID++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let s=new Tag([],null,[]);if(s.set.push(s),e)for(let a of e.set)s.set.push(a);return s}static defineModifier(){let e=new Modifier;return s=>s.modified.indexOf(e)>-1?s:Modifier.get(s.base||s,s.modified.concat(e).sort((a,c)=>a.id-c.id))}}let nextModifierID=0;class Modifier{constructor(){this.instances=[],this.id=nextModifierID++}static get(e,s){if(!s.length)return e;let a=s[0].instances.find(g=>g.base==e&&sameArray(s,g.modified));if(a)return a;let c=[],h=new Tag(c,e,s);for(let g of s)g.instances.push(h);let d=permute(s);for(let g of e.set)for(let _ of d)c.push(Modifier.get(g,_));return h}}function sameArray(o,e){return o.length==e.length&&o.every((s,a)=>s==e[a])}function permute(o){let e=[o];for(let s=0;s<o.length;s++)for(let a of permute(o.slice(0,s).concat(o.slice(s+1))))e.push(a);return e}function styleTags(o){let e=Object.create(null);for(let s in o){let a=o[s];Array.isArray(a)||(a=[a]);for(let c of s.split(" "))if(c){let h=[],d=2,g=c;for(let j=0;;){if(g=="..."&&j>0&&j+3==c.length){d=1;break}let _e=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(g);if(!_e)throw new RangeError("Invalid path: "+c);if(h.push(_e[0]=="*"?"":_e[0][0]=='"'?JSON.parse(_e[0]):_e[0]),j+=_e[0].length,j==c.length)break;let et=c[j++];if(j==c.length&&et=="!"){d=0;break}if(et!="/")throw new RangeError("Invalid path: "+c);g=c.slice(j)}let _=h.length-1,b=h[_];if(!b)throw new RangeError("Invalid path: "+c);let $=new Rule(a,d,_>0?h.slice(0,_):null);e[b]=$.sort(e[b])}}return ruleNodeProp.add(e)}const ruleNodeProp=new NodeProp;class Rule{constructor(e,s,a,c){this.tags=e,this.mode=s,this.context=a,this.next=c}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}}function tagHighlighter(o,e){let s=Object.create(null);for(let h of o)if(!Array.isArray(h.tag))s[h.tag.id]=h.class;else for(let d of h.tag)s[d.id]=h.class;let{scope:a,all:c=null}=e||{};return{style:h=>{let d=c;for(let g of h)for(let _ of g.set){let b=s[_.id];if(b){d=d?d+" "+b:b;break}}return d},scope:a}}function highlightTags(o,e){let s=null;for(let a of o){let c=a.style(e);c&&(s=s?s+" "+c:c)}return s}function highlightTree(o,e,s,a=0,c=o.length){let h=new HighlightBuilder(a,Array.isArray(e)?e:[e],s);h.highlightRange(o.cursor(),a,c,"",h.highlighters),h.flush(c)}class HighlightBuilder{constructor(e,s,a){this.at=e,this.highlighters=s,this.span=a,this.class=""}startSpan(e,s){s!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=s)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,s,a,c,h){let{type:d,from:g,to:_}=e;if(g>=a||_<=s)return;d.isTop&&(h=this.highlighters.filter(et=>!et.scope||et.scope(d)));let b=c,$=d.prop(ruleNodeProp),j=!1;for(;$;){if(!$.context||e.matchContext($.context)){let et=highlightTags(h,$.tags);et&&(b&&(b+=" "),b+=et,$.mode==1?c+=(c?" ":"")+et:$.mode==0&&(j=!0));break}$=$.next}if(this.startSpan(e.from,b),j)return;let _e=e.tree&&e.tree.prop(NodeProp.mounted);if(_e&&_e.overlay){let et=e.node.enter(_e.overlay[0].from+g,1),tt=this.highlighters.filter(st=>!st.scope||st.scope(_e.tree.type)),nt=e.firstChild();for(let st=0,rt=g;;st++){let it=st<_e.overlay.length?_e.overlay[st]:null,at=it?it.from+g:_,ot=Math.max(s,rt),ut=Math.min(a,at);if(ot<ut&&nt)for(;e.from<ut&&(this.highlightRange(e,ot,ut,c,h),this.startSpan(Math.min(a,e.to),b),!(e.to>=at||!e.nextSibling())););if(!it||at>a)break;rt=it.to+g,rt>s&&(this.highlightRange(et.cursor(),Math.max(s,it.from+g),Math.min(a,rt),c,tt),this.startSpan(rt,b))}nt&&e.parent()}else if(e.firstChild()){do if(!(e.to<=s)){if(e.from>=a)break;this.highlightRange(e,s,a,c,h),this.startSpan(Math.min(a,e.to),b)}while(e.nextSibling());e.parent()}}}const t=Tag.define,comment=t(),name=t(),typeName=t(name),propertyName=t(name),literal=t(),string=t(literal),number=t(literal),content=t(),heading=t(content),keyword=t(),operator=t(),punctuation=t(),bracket=t(punctuation),meta=t(),tags={comment,lineComment:t(comment),blockComment:t(comment),docComment:t(comment),name,variableName:t(name),typeName,tagName:t(typeName),propertyName,attributeName:t(propertyName),className:t(name),labelName:t(name),namespace:t(name),macroName:t(name),literal,string,docString:t(string),character:t(string),attributeValue:t(string),number,integer:t(number),float:t(number),bool:t(literal),regexp:t(literal),escape:t(literal),color:t(literal),url:t(literal),keyword,self:t(keyword),null:t(keyword),atom:t(keyword),unit:t(keyword),modifier:t(keyword),operatorKeyword:t(keyword),controlKeyword:t(keyword),definitionKeyword:t(keyword),moduleKeyword:t(keyword),operator,derefOperator:t(operator),arithmeticOperator:t(operator),logicOperator:t(operator),bitwiseOperator:t(operator),compareOperator:t(operator),updateOperator:t(operator),definitionOperator:t(operator),typeOperator:t(operator),controlOperator:t(operator),punctuation,separator:t(punctuation),bracket,angleBracket:t(bracket),squareBracket:t(bracket),paren:t(bracket),brace:t(bracket),content,heading,heading1:t(heading),heading2:t(heading),heading3:t(heading),heading4:t(heading),heading5:t(heading),heading6:t(heading),contentSeparator:t(content),list:t(content),quote:t(content),emphasis:t(content),strong:t(content),link:t(content),monospace:t(content),strikethrough:t(content),inserted:t(),deleted:t(),changed:t(),invalid:t(),meta,documentMeta:t(meta),annotation:t(meta),processingInstruction:t(meta),definition:Tag.defineModifier(),constant:Tag.defineModifier(),function:Tag.defineModifier(),standard:Tag.defineModifier(),local:Tag.defineModifier(),special:Tag.defineModifier()};tagHighlighter([{tag:tags.link,class:"tok-link"},{tag:tags.heading,class:"tok-heading"},{tag:tags.emphasis,class:"tok-emphasis"},{tag:tags.strong,class:"tok-strong"},{tag:tags.keyword,class:"tok-keyword"},{tag:tags.atom,class:"tok-atom"},{tag:tags.bool,class:"tok-bool"},{tag:tags.url,class:"tok-url"},{tag:tags.labelName,class:"tok-labelName"},{tag:tags.inserted,class:"tok-inserted"},{tag:tags.deleted,class:"tok-deleted"},{tag:tags.literal,class:"tok-literal"},{tag:tags.string,class:"tok-string"},{tag:tags.number,class:"tok-number"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],class:"tok-string2"},{tag:tags.variableName,class:"tok-variableName"},{tag:tags.local(tags.variableName),class:"tok-variableName tok-local"},{tag:tags.definition(tags.variableName),class:"tok-variableName tok-definition"},{tag:tags.special(tags.variableName),class:"tok-variableName2"},{tag:tags.definition(tags.propertyName),class:"tok-propertyName tok-definition"},{tag:tags.typeName,class:"tok-typeName"},{tag:tags.namespace,class:"tok-namespace"},{tag:tags.className,class:"tok-className"},{tag:tags.macroName,class:"tok-macroName"},{tag:tags.propertyName,class:"tok-propertyName"},{tag:tags.operator,class:"tok-operator"},{tag:tags.comment,class:"tok-comment"},{tag:tags.meta,class:"tok-meta"},{tag:tags.invalid,class:"tok-invalid"},{tag:tags.punctuation,class:"tok-punctuation"}]);var _a;const languageDataProp=new NodeProp;function defineLanguageFacet(o){return Facet.define({combine:o?e=>e.concat(o):void 0})}class Language{constructor(e,s,a=[]){this.data=e,EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(EditorState.prototype,"tree",{get(){return syntaxTree(this)}}),this.parser=s,this.extension=[language.of(this),EditorState.languageData.of((c,h,d)=>c.facet(languageDataFacetAt(c,h,d)))].concat(a)}isActiveAt(e,s,a=-1){return languageDataFacetAt(e,s,a)==this.data}findRegions(e){let s=e.facet(language);if((s==null?void 0:s.data)==this.data)return[{from:0,to:e.doc.length}];if(!s||!s.allowsNesting)return[];let a=[],c=(h,d)=>{if(h.prop(languageDataProp)==this.data){a.push({from:d,to:d+h.length});return}let g=h.prop(NodeProp.mounted);if(g){if(g.tree.prop(languageDataProp)==this.data){if(g.overlay)for(let _ of g.overlay)a.push({from:_.from+d,to:_.to+d});else a.push({from:d,to:d+h.length});return}else if(g.overlay){let _=a.length;if(c(g.tree,g.overlay[0].from+d),a.length>_)return}}for(let _=0;_<h.children.length;_++){let b=h.children[_];b instanceof Tree&&c(b,h.positions[_]+d)}};return c(syntaxTree(e),0),a}get allowsNesting(){return!0}}Language.setState=StateEffect.define();function languageDataFacetAt(o,e,s){let a=o.facet(language);if(!a)return null;let c=a.data;if(a.allowsNesting)for(let h=syntaxTree(o).topNode;h;h=h.enter(e,s,IterMode.ExcludeBuffers))c=h.type.prop(languageDataProp)||c;return c}class LRLanguage extends Language{constructor(e,s){super(e,s),this.parser=s}static define(e){let s=defineLanguageFacet(e.languageData);return new LRLanguage(s,e.parser.configure({props:[languageDataProp.add(a=>a.isTop?s:void 0)]}))}configure(e){return new LRLanguage(this.data,this.parser.configure(e))}get allowsNesting(){return this.parser.hasWrappers()}}function syntaxTree(o){let e=o.field(Language.state,!1);return e?e.tree:Tree.empty}class DocInput{constructor(e,s=e.length){this.doc=e,this.length=s,this.cursorPos=0,this.string="",this.cursor=e.iter()}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,s){let a=this.cursorPos-this.string.length;return e<a||s>=this.cursorPos?this.doc.sliceString(e,s):this.string.slice(e-a,s-a)}}let currentContext=null;class ParseContext{constructor(e,s,a=[],c,h,d,g,_){this.parser=e,this.state=s,this.fragments=a,this.tree=c,this.treeLen=h,this.viewport=d,this.skipped=g,this.scheduleOn=_,this.parse=null,this.tempSkipped=[]}static create(e,s,a){return new ParseContext(e,s,[],Tree.empty,0,a,[],null)}startParse(){return this.parser.startParse(new DocInput(this.state.doc),this.fragments)}work(e,s){return s!=null&&s>=this.state.doc.length&&(s=void 0),this.tree!=Tree.empty&&this.isDone(s!=null?s:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var a;if(typeof e=="number"){let c=Date.now()+e;e=()=>Date.now()>c}for(this.parse||(this.parse=this.startParse()),s!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>s)&&s<this.state.doc.length&&this.parse.stopAt(s);;){let c=this.parse.advance();if(c)if(this.fragments=this.withoutTempSkipped(TreeFragment.addTree(c,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(a=this.parse.stoppedAt)!==null&&a!==void 0?a:this.state.doc.length,this.tree=c,this.parse=null,this.treeLen<(s!=null?s:this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,s;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(s=this.parse.advance()););}),this.treeLen=e,this.tree=s,this.fragments=this.withoutTempSkipped(TreeFragment.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let s=currentContext;currentContext=this;try{return e()}finally{currentContext=s}}withoutTempSkipped(e){for(let s;s=this.tempSkipped.pop();)e=cutFragments(e,s.from,s.to);return e}changes(e,s){let{fragments:a,tree:c,treeLen:h,viewport:d,skipped:g}=this;if(this.takeTree(),!e.empty){let _=[];if(e.iterChangedRanges((b,$,j,_e)=>_.push({fromA:b,toA:$,fromB:j,toB:_e})),a=TreeFragment.applyChanges(a,_),c=Tree.empty,h=0,d={from:e.mapPos(d.from,-1),to:e.mapPos(d.to,1)},this.skipped.length){g=[];for(let b of this.skipped){let $=e.mapPos(b.from,1),j=e.mapPos(b.to,-1);$<j&&g.push({from:$,to:j})}}}return new ParseContext(this.parser,s,a,c,h,d,g,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let s=this.skipped.length;for(let a=0;a<this.skipped.length;a++){let{from:c,to:h}=this.skipped[a];c<e.to&&h>e.from&&(this.fragments=cutFragments(this.fragments,c,h),this.skipped.splice(a--,1))}return this.skipped.length>=s?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,s){this.skipped.push({from:e,to:s})}static getSkippingParser(e){return new class extends Parser{createParse(s,a,c){let h=c[0].from,d=c[c.length-1].to;return{parsedPos:h,advance(){let _=currentContext;if(_){for(let b of c)_.tempSkipped.push(b);e&&(_.scheduleOn=_.scheduleOn?Promise.all([_.scheduleOn,e]):e)}return this.parsedPos=d,new Tree(NodeType.none,[],[],d-h)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let s=this.fragments;return this.treeLen>=e&&s.length&&s[0].from==0&&s[0].to>=e}static get(){return currentContext}}function cutFragments(o,e,s){return TreeFragment.applyChanges(o,[{fromA:e,toA:s,fromB:e,toB:s}])}class LanguageState{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let s=this.context.changes(e.changes,e.state),a=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),s.viewport.to);return s.work(20,a)||s.takeTree(),new LanguageState(s)}static init(e){let s=Math.min(3e3,e.doc.length),a=ParseContext.create(e.facet(language).parser,e,{from:0,to:s});return a.work(20,s)||a.takeTree(),new LanguageState(a)}}Language.state=StateField.define({create:LanguageState.init,update(o,e){for(let s of e.effects)if(s.is(Language.setState))return s.value;return e.startState.facet(language)!=e.state.facet(language)?LanguageState.init(e.state):o.apply(e)}});let requestIdle=o=>{let e=setTimeout(()=>o(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(requestIdle=o=>{let e=-1,s=setTimeout(()=>{e=requestIdleCallback(o,{timeout:500-100})},100);return()=>e<0?clearTimeout(s):cancelIdleCallback(e)});const isInputPending=typeof navigator<"u"&&((_a=navigator.scheduling)===null||_a===void 0?void 0:_a.isInputPending)?()=>navigator.scheduling.isInputPending():null,parseWorker=ViewPlugin.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 s=this.view.state.field(Language.state).context;(s.updateViewport(e.view.viewport)||this.view.viewport.to>s.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(s)}scheduleWork(){if(this.working)return;let{state:e}=this.view,s=e.field(Language.state);(s.tree!=s.context.tree||!s.context.isDone(e.doc.length))&&(this.working=requestIdle(this.work))}work(e){this.working=null;let s=Date.now();if(this.chunkEnd<s&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=s+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:a,viewport:{to:c}}=this.view,h=a.field(Language.state);if(h.tree==h.context.tree&&h.context.isDone(c+1e5))return;let d=Date.now()+Math.min(this.chunkBudget,100,e&&!isInputPending?Math.max(25,e.timeRemaining()-5):1e9),g=h.context.treeLen<c&&a.doc.length>c+1e3,_=h.context.work(()=>isInputPending&&isInputPending()||Date.now()>d,c+(g?0:1e5));this.chunkBudget-=Date.now()-s,(_||this.chunkBudget<=0)&&(h.context.takeTree(),this.view.dispatch({effects:Language.setState.of(new LanguageState(h.context))})),this.chunkBudget>0&&!(_&&!g)&&this.scheduleWork(),this.checkAsyncSchedule(h.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(s=>logException(this.view.state,s)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),language=Facet.define({combine(o){return o.length?o[0]:null},enables:[Language.state,parseWorker]});class LanguageSupport{constructor(e,s=[]){this.language=e,this.support=s,this.extension=[e,s]}}const indentService=Facet.define(),indentUnit=Facet.define({combine:o=>{if(!o.length)return" ";if(!/^(?: +|\t+)$/.test(o[0]))throw new Error("Invalid indent unit: "+JSON.stringify(o[0]));return o[0]}});function getIndentUnit(o){let e=o.facet(indentUnit);return e.charCodeAt(0)==9?o.tabSize*e.length:e.length}function indentString(o,e){let s="",a=o.tabSize;if(o.facet(indentUnit).charCodeAt(0)==9)for(;e>=a;)s+=" ",e-=a;for(let c=0;c<e;c++)s+=" ";return s}function getIndentation(o,e){o instanceof EditorState&&(o=new IndentContext(o));for(let a of o.state.facet(indentService)){let c=a(o,e);if(c!=null)return c}let s=syntaxTree(o.state);return s?syntaxIndentation(o,s,e):null}class IndentContext{constructor(e,s={}){this.state=e,this.options=s,this.unit=getIndentUnit(e)}lineAt(e,s=1){let a=this.state.doc.lineAt(e),{simulateBreak:c,simulateDoubleBreak:h}=this.options;return c!=null&&c>=a.from&&c<=a.to?h&&c==e?{text:"",from:e}:(s<0?c<e:c<=e)?{text:a.text.slice(c-a.from),from:c}:{text:a.text.slice(0,c-a.from),from:a.from}:a}textAfterPos(e,s=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:a,from:c}=this.lineAt(e,s);return a.slice(e-c,Math.min(a.length,e+100-c))}column(e,s=1){let{text:a,from:c}=this.lineAt(e,s),h=this.countColumn(a,e-c),d=this.options.overrideIndentation?this.options.overrideIndentation(c):-1;return d>-1&&(h+=d-this.countColumn(a,a.search(/\S|$/))),h}countColumn(e,s=e.length){return countColumn(e,this.state.tabSize,s)}lineIndent(e,s=1){let{text:a,from:c}=this.lineAt(e,s),h=this.options.overrideIndentation;if(h){let d=h(c);if(d>-1)return d}return this.countColumn(a,a.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const indentNodeProp=new NodeProp;function syntaxIndentation(o,e,s){return indentFrom(e.resolveInner(s).enterUnfinishedNodesBefore(s),s,o)}function ignoreClosed(o){return o.pos==o.options.simulateBreak&&o.options.simulateDoubleBreak}function indentStrategy(o){let e=o.type.prop(indentNodeProp);if(e)return e;let s=o.firstChild,a;if(s&&(a=s.type.prop(NodeProp.closedBy))){let c=o.lastChild,h=c&&a.indexOf(c.name)>-1;return d=>delimitedStrategy(d,!0,1,void 0,h&&!ignoreClosed(d)?c.from:void 0)}return o.parent==null?topIndent:null}function indentFrom(o,e,s){for(;o;o=o.parent){let a=indentStrategy(o);if(a)return a(TreeIndentContext.create(s,e,o))}return null}function topIndent(){return 0}class TreeIndentContext extends IndentContext{constructor(e,s,a){super(e.state,e.options),this.base=e,this.pos=s,this.node=a}static create(e,s,a){return new TreeIndentContext(e,s,a)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let s=this.node.resolve(e.from);for(;s.parent&&s.parent.from==s.from;)s=s.parent;if(isParent(s,this.node))break;e=this.state.doc.lineAt(s.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?indentFrom(e,this.pos,this.base):0}}function isParent(o,e){for(let s=e;s;s=s.parent)if(o==s)return!0;return!1}function bracketedAligned(o){let e=o.node,s=e.childAfter(e.from),a=e.lastChild;if(!s)return null;let c=o.options.simulateBreak,h=o.state.doc.lineAt(s.from),d=c==null||c<=h.from?h.to:Math.min(h.to,c);for(let g=s.to;;){let _=e.childAfter(g);if(!_||_==a)return null;if(!_.type.isSkipped)return _.from<d?s:null;g=_.to}}function delimitedIndent({closing:o,align:e=!0,units:s=1}){return a=>delimitedStrategy(a,e,s,o)}function delimitedStrategy(o,e,s,a,c){let h=o.textAfter,d=h.match(/^\s*/)[0].length,g=a&&h.slice(d,d+a.length)==a||c==o.pos+d,_=e?bracketedAligned(o):null;return _?g?o.column(_.from):o.column(_.to):o.baseIndent+(g?0:o.unit*s)}const flatIndent=o=>o.baseIndent;function continuedIndent({except:o,units:e=1}={}){return s=>{let a=o&&o.test(s.textAfter);return s.baseIndent+(a?0:e*s.unit)}}const DontIndentBeyond=200;function indentOnInput(){return EditorState.transactionFilter.of(o=>{if(!o.docChanged||!o.isUserEvent("input.type")&&!o.isUserEvent("input.complete"))return o;let e=o.startState.languageDataAt("indentOnInput",o.startState.selection.main.head);if(!e.length)return o;let s=o.newDoc,{head:a}=o.newSelection.main,c=s.lineAt(a);if(a>c.from+DontIndentBeyond)return o;let h=s.sliceString(c.from,a);if(!e.some(b=>b.test(h)))return o;let{state:d}=o,g=-1,_=[];for(let{head:b}of d.selection.ranges){let $=d.doc.lineAt(b);if($.from==g)continue;g=$.from;let j=getIndentation(d,$.from);if(j==null)continue;let _e=/^\s*/.exec($.text)[0],et=indentString(d,j);_e!=et&&_.push({from:$.from,to:$.from+_e.length,insert:et})}return _.length?[o,{changes:_,sequential:!0}]:o})}const foldService=Facet.define(),foldNodeProp=new NodeProp;function foldInside(o){let e=o.firstChild,s=o.lastChild;return e&&e.to<s.from?{from:e.to,to:s.type.isError?o.to:s.from}:null}function syntaxFolding(o,e,s){let a=syntaxTree(o);if(a.length<s)return null;let c=a.resolveInner(s),h=null;for(let d=c;d;d=d.parent){if(d.to<=s||d.from>s)continue;if(h&&d.from<e)break;let g=d.type.prop(foldNodeProp);if(g&&(d.to<a.length-50||a.length==o.doc.length||!isUnfinished(d))){let _=g(d,o);_&&_.from<=s&&_.from>=e&&_.to>s&&(h=_)}}return h}function isUnfinished(o){let e=o.lastChild;return e&&e.to==o.to&&e.type.isError}function foldable(o,e,s){for(let a of o.facet(foldService)){let c=a(o,e,s);if(c)return c}return syntaxFolding(o,e,s)}function mapRange(o,e){let s=e.mapPos(o.from,1),a=e.mapPos(o.to,-1);return s>=a?void 0:{from:s,to:a}}const foldEffect=StateEffect.define({map:mapRange}),unfoldEffect=StateEffect.define({map:mapRange});function selectedLines(o){let e=[];for(let{head:s}of o.state.selection.ranges)e.some(a=>a.from<=s&&a.to>=s)||e.push(o.lineBlockAt(s));return e}const foldState=StateField.define({create(){return Decoration.none},update(o,e){o=o.map(e.changes);for(let s of e.effects)s.is(foldEffect)&&!foldExists(o,s.value.from,s.value.to)?o=o.update({add:[foldWidget.range(s.value.from,s.value.to)]}):s.is(unfoldEffect)&&(o=o.update({filter:(a,c)=>s.value.from!=a||s.value.to!=c,filterFrom:s.value.from,filterTo:s.value.to}));if(e.selection){let s=!1,{head:a}=e.selection.main;o.between(a,a,(c,h)=>{c<a&&h>a&&(s=!0)}),s&&(o=o.update({filterFrom:a,filterTo:a,filter:(c,h)=>h<=a||c>=a}))}return o},provide:o=>EditorView.decorations.from(o),toJSON(o,e){let s=[];return o.between(0,e.doc.length,(a,c)=>{s.push(a,c)}),s},fromJSON(o){if(!Array.isArray(o)||o.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let s=0;s<o.length;){let a=o[s++],c=o[s++];if(typeof a!="number"||typeof c!="number")throw new RangeError("Invalid JSON for fold state");e.push(foldWidget.range(a,c))}return Decoration.set(e,!0)}});function findFold(o,e,s){var a;let c=null;return(a=o.field(foldState,!1))===null||a===void 0||a.between(e,s,(h,d)=>{(!c||c.from>h)&&(c={from:h,to:d})}),c}function foldExists(o,e,s){let a=!1;return o.between(e,e,(c,h)=>{c==e&&h==s&&(a=!0)}),a}function maybeEnable(o,e){return o.field(foldState,!1)?e:e.concat(StateEffect.appendConfig.of(codeFolding()))}const foldCode=o=>{for(let e of selectedLines(o)){let s=foldable(o.state,e.from,e.to);if(s)return o.dispatch({effects:maybeEnable(o.state,[foldEffect.of(s),announceFold(o,s)])}),!0}return!1},unfoldCode=o=>{if(!o.state.field(foldState,!1))return!1;let e=[];for(let s of selectedLines(o)){let a=findFold(o.state,s.from,s.to);a&&e.push(unfoldEffect.of(a),announceFold(o,a,!1))}return e.length&&o.dispatch({effects:e}),e.length>0};function announceFold(o,e,s=!0){let a=o.state.doc.lineAt(e.from).number,c=o.state.doc.lineAt(e.to).number;return EditorView.announce.of(`${o.state.phrase(s?"Folded lines":"Unfolded lines")} ${a} ${o.state.phrase("to")} ${c}.`)}const foldAll=o=>{let{state:e}=o,s=[];for(let a=0;a<e.doc.length;){let c=o.lineBlockAt(a),h=foldable(e,c.from,c.to);h&&s.push(foldEffect.of(h)),a=(h?o.lineBlockAt(h.to):c).to+1}return s.length&&o.dispatch({effects:maybeEnable(o.state,s)}),!!s.length},unfoldAll=o=>{let e=o.state.field(foldState,!1);if(!e||!e.size)return!1;let s=[];return e.between(0,o.state.doc.length,(a,c)=>{s.push(unfoldEffect.of({from:a,to:c}))}),o.dispatch({effects:s}),!0},foldKeymap=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:foldCode},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:unfoldCode},{key:"Ctrl-Alt-[",run:foldAll},{key:"Ctrl-Alt-]",run:unfoldAll}],defaultConfig={placeholderDOM:null,placeholderText:"\u2026"},foldConfig=Facet.define({combine(o){return combineConfig(o,defaultConfig)}});function codeFolding(o){let e=[foldState,baseTheme$1$2];return o&&e.push(foldConfig.of(o)),e}const foldWidget=Decoration.replace({widget:new class extends WidgetType{toDOM(o){let{state:e}=o,s=e.facet(foldConfig),a=h=>{let d=o.lineBlockAt(o.posAtDOM(h.target)),g=findFold(o.state,d.from,d.to);g&&o.dispatch({effects:unfoldEffect.of(g)}),h.preventDefault()};if(s.placeholderDOM)return s.placeholderDOM(o,a);let c=document.createElement("span");return c.textContent=s.placeholderText,c.setAttribute("aria-label",e.phrase("folded code")),c.title=e.phrase("unfold"),c.className="cm-foldPlaceholder",c.onclick=a,c}}}),foldGutterDefaults={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class FoldMarker extends GutterMarker{constructor(e,s){super(),this.config=e,this.open=s}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let s=document.createElement("span");return s.textContent=this.open?this.config.openText:this.config.closedText,s.title=e.state.phrase(this.open?"Fold line":"Unfold line"),s}}function foldGutter(o={}){let e=Object.assign(Object.assign({},foldGutterDefaults),o),s=new FoldMarker(e,!0),a=new FoldMarker(e,!1),c=ViewPlugin.fromClass(class{constructor(d){this.from=d.viewport.from,this.markers=this.buildMarkers(d)}update(d){(d.docChanged||d.viewportChanged||d.startState.facet(language)!=d.state.facet(language)||d.startState.field(foldState,!1)!=d.state.field(foldState,!1)||syntaxTree(d.startState)!=syntaxTree(d.state)||e.foldingChanged(d))&&(this.markers=this.buildMarkers(d.view))}buildMarkers(d){let g=new RangeSetBuilder;for(let _ of d.viewportLineBlocks){let b=findFold(d.state,_.from,_.to)?a:foldable(d.state,_.from,_.to)?s:null;b&&g.add(_.from,_.from,b)}return g.finish()}}),{domEventHandlers:h}=e;return[c,gutter({class:"cm-foldGutter",markers(d){var g;return((g=d.plugin(c))===null||g===void 0?void 0:g.markers)||RangeSet.empty},initialSpacer(){return new FoldMarker(e,!1)},domEventHandlers:Object.assign(Object.assign({},h),{click:(d,g,_)=>{if(h.click&&h.click(d,g,_))return!0;let b=findFold(d.state,g.from,g.to);if(b)return d.dispatch({effects:unfoldEffect.of(b)}),!0;let $=foldable(d.state,g.from,g.to);return $?(d.dispatch({effects:foldEffect.of($)}),!0):!1}})}),codeFolding()]}const baseTheme$1$2=EditorView.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 HighlightStyle{constructor(e,s){let a;function c(g){let _=StyleModule.newName();return(a||(a=Object.create(null)))["."+_]=g,_}const h=typeof s.all=="string"?s.all:s.all?c(s.all):void 0,d=s.scope;this.scope=d instanceof Language?g=>g.prop(languageDataProp)==d.data:d?g=>g==d:void 0,this.style=tagHighlighter(e.map(g=>({tag:g.tag,class:g.class||c(Object.assign({},g,{tag:null}))})),{all:h}).style,this.module=a?new StyleModule(a):null,this.themeType=s.themeType}static define(e,s){return new HighlightStyle(e,s||{})}}const highlighterFacet=Facet.define(),fallbackHighlighter=Facet.define({combine(o){return o.length?[o[0]]:null}});function getHighlighters(o){let e=o.facet(highlighterFacet);return e.length?e:o.facet(fallbackHighlighter)}function syntaxHighlighting(o,e){let s=[treeHighlighter],a;return o instanceof HighlightStyle&&(o.module&&s.push(EditorView.styleModule.of(o.module)),a=o.themeType),e!=null&&e.fallback?s.push(fallbackHighlighter.of(o)):a?s.push(highlighterFacet.computeN([EditorView.darkTheme],c=>c.facet(EditorView.darkTheme)==(a=="dark")?[o]:[])):s.push(highlighterFacet.of(o)),s}class TreeHighlighter{constructor(e){this.markCache=Object.create(null),this.tree=syntaxTree(e.state),this.decorations=this.buildDeco(e,getHighlighters(e.state))}update(e){let s=syntaxTree(e.state),a=getHighlighters(e.state),c=a!=getHighlighters(e.startState);s.length<e.view.viewport.to&&!c&&s.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(s!=this.tree||e.viewportChanged||c)&&(this.tree=s,this.decorations=this.buildDeco(e.view,a))}buildDeco(e,s){if(!s||!this.tree.length)return Decoration.none;let a=new RangeSetBuilder;for(let{from:c,to:h}of e.visibleRanges)highlightTree(this.tree,s,(d,g,_)=>{a.add(d,g,this.markCache[_]||(this.markCache[_]=Decoration.mark({class:_})))},c,h);return a.finish()}}const treeHighlighter=Prec.high(ViewPlugin.fromClass(TreeHighlighter,{decorations:o=>o.decorations})),defaultHighlightStyle=HighlightStyle.define([{tag:tags.meta,color:"#7a757a"},{tag:tags.link,textDecoration:"underline"},{tag:tags.heading,textDecoration:"underline",fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strong,fontWeight:"bold"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.keyword,color:"#708"},{tag:[tags.atom,tags.bool,tags.url,tags.contentSeparator,tags.labelName],color:"#219"},{tag:[tags.literal,tags.inserted],color:"#164"},{tag:[tags.string,tags.deleted],color:"#a11"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],color:"#e40"},{tag:tags.definition(tags.variableName),color:"#00f"},{tag:tags.local(tags.variableName),color:"#30a"},{tag:[tags.typeName,tags.namespace],color:"#085"},{tag:tags.className,color:"#167"},{tag:[tags.special(tags.variableName),tags.macroName],color:"#256"},{tag:tags.definition(tags.propertyName),color:"#00c"},{tag:tags.comment,color:"#940"},{tag:tags.invalid,color:"#f00"}]),baseTheme$3=EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),DefaultScanDist=1e4,DefaultBrackets="()[]{}",bracketMatchingConfig=Facet.define({combine(o){return combineConfig(o,{afterCursor:!0,brackets:DefaultBrackets,maxScanDistance:DefaultScanDist,renderMatch:defaultRenderMatch})}}),matchingMark=Decoration.mark({class:"cm-matchingBracket"}),nonmatchingMark=Decoration.mark({class:"cm-nonmatchingBracket"});function defaultRenderMatch(o){let e=[],s=o.matched?matchingMark:nonmatchingMark;return e.push(s.range(o.start.from,o.start.to)),o.end&&e.push(s.range(o.end.from,o.end.to)),e}const bracketMatchingState=StateField.define({create(){return Decoration.none},update(o,e){if(!e.docChanged&&!e.selection)return o;let s=[],a=e.state.facet(bracketMatchingConfig);for(let c of e.state.selection.ranges){if(!c.empty)continue;let h=matchBrackets(e.state,c.head,-1,a)||c.head>0&&matchBrackets(e.state,c.head-1,1,a)||a.afterCursor&&(matchBrackets(e.state,c.head,1,a)||c.head<e.state.doc.length&&matchBrackets(e.state,c.head+1,-1,a));h&&(s=s.concat(a.renderMatch(h,e.state)))}return Decoration.set(s,!0)},provide:o=>EditorView.decorations.from(o)}),bracketMatchingUnique=[bracketMatchingState,baseTheme$3];function bracketMatching(o={}){return[bracketMatchingConfig.of(o),bracketMatchingUnique]}function matchingNodes(o,e,s){let a=o.prop(e<0?NodeProp.openedBy:NodeProp.closedBy);if(a)return a;if(o.name.length==1){let c=s.indexOf(o.name);if(c>-1&&c%2==(e<0?1:0))return[s[c+e]]}return null}function matchBrackets(o,e,s,a={}){let c=a.maxScanDistance||DefaultScanDist,h=a.brackets||DefaultBrackets,d=syntaxTree(o),g=d.resolveInner(e,s);for(let _=g;_;_=_.parent){let b=matchingNodes(_.type,s,h);if(b&&_.from<_.to)return matchMarkedBrackets(o,e,s,_,b,h)}return matchPlainBrackets(o,e,s,d,g.type,c,h)}function matchMarkedBrackets(o,e,s,a,c,h){let d=a.parent,g={from:a.from,to:a.to},_=0,b=d==null?void 0:d.cursor();if(b&&(s<0?b.childBefore(a.from):b.childAfter(a.to)))do if(s<0?b.to<=a.from:b.from>=a.to){if(_==0&&c.indexOf(b.type.name)>-1&&b.from<b.to)return{start:g,end:{from:b.from,to:b.to},matched:!0};if(matchingNodes(b.type,s,h))_++;else if(matchingNodes(b.type,-s,h)){if(_==0)return{start:g,end:b.from==b.to?void 0:{from:b.from,to:b.to},matched:!1};_--}}while(s<0?b.prevSibling():b.nextSibling());return{start:g,matched:!1}}function matchPlainBrackets(o,e,s,a,c,h,d){let g=s<0?o.sliceDoc(e-1,e):o.sliceDoc(e,e+1),_=d.indexOf(g);if(_<0||_%2==0!=s>0)return null;let b={from:s<0?e-1:e,to:s>0?e+1:e},$=o.doc.iterRange(e,s>0?o.doc.length:0),j=0;for(let _e=0;!$.next().done&&_e<=h;){let et=$.value;s<0&&(_e+=et.length);let tt=e+_e*s;for(let nt=s>0?0:et.length-1,st=s>0?et.length:-1;nt!=st;nt+=s){let rt=d.indexOf(et[nt]);if(!(rt<0||a.resolveInner(tt+nt,1).type!=c))if(rt%2==0==s>0)j++;else{if(j==1)return{start:b,end:{from:tt+nt,to:tt+nt+1},matched:rt>>1==_>>1};j--}}s>0&&(_e+=et.length)}return $.done?{start:b,matched:!1}:null}const noTokens=Object.create(null),typeArray=[NodeType.none],warned=[],defaultTable=Object.create(null);for(let[o,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"]])defaultTable[o]=createTokenType(noTokens,e);function warnForPart(o,e){warned.indexOf(o)>-1||(warned.push(o),console.warn(e))}function createTokenType(o,e){let s=null;for(let h of e.split(".")){let d=o[h]||tags[h];d?typeof d=="function"?s?s=d(s):warnForPart(h,`Modifier ${h} used at start of tag`):s?warnForPart(h,`Tag ${h} used as modifier`):s=d:warnForPart(h,`Unknown highlighting tag ${h}`)}if(!s)return 0;let a=e.replace(/ /g,"_"),c=NodeType.define({id:typeArray.length,name:a,props:[styleTags({[a]:s})]});return typeArray.push(c),c.id}const toggleComment=o=>{let e=getConfig(o.state);return e.line?toggleLineComment(o):e.block?toggleBlockCommentByLine(o):!1};function command(o,e){return({state:s,dispatch:a})=>{if(s.readOnly)return!1;let c=o(e,s);return c?(a(s.update(c)),!0):!1}}const toggleLineComment=command(changeLineComment,0),toggleBlockComment=command(changeBlockComment,0),toggleBlockCommentByLine=command((o,e)=>changeBlockComment(o,e,selectedLineRanges(e)),0);function getConfig(o,e=o.selection.main.head){let s=o.languageDataAt("commentTokens",e);return s.length?s[0]:{}}const SearchMargin=50;function findBlockComment(o,{open:e,close:s},a,c){let h=o.sliceDoc(a-SearchMargin,a),d=o.sliceDoc(c,c+SearchMargin),g=/\s*$/.exec(h)[0].length,_=/^\s*/.exec(d)[0].length,b=h.length-g;if(h.slice(b-e.length,b)==e&&d.slice(_,_+s.length)==s)return{open:{pos:a-g,margin:g&&1},close:{pos:c+_,margin:_&&1}};let $,j;c-a<=2*SearchMargin?$=j=o.sliceDoc(a,c):($=o.sliceDoc(a,a+SearchMargin),j=o.sliceDoc(c-SearchMargin,c));let _e=/^\s*/.exec($)[0].length,et=/\s*$/.exec(j)[0].length,tt=j.length-et-s.length;return $.slice(_e,_e+e.length)==e&&j.slice(tt,tt+s.length)==s?{open:{pos:a+_e+e.length,margin:/\s/.test($.charAt(_e+e.length))?1:0},close:{pos:c-et-s.length,margin:/\s/.test(j.charAt(tt-1))?1:0}}:null}function selectedLineRanges(o){let e=[];for(let s of o.selection.ranges){let a=o.doc.lineAt(s.from),c=s.to<=a.to?a:o.doc.lineAt(s.to),h=e.length-1;h>=0&&e[h].to>a.from?e[h].to=c.to:e.push({from:a.from,to:c.to})}return e}function changeBlockComment(o,e,s=e.selection.ranges){let a=s.map(h=>getConfig(e,h.from).block);if(!a.every(h=>h))return null;let c=s.map((h,d)=>findBlockComment(e,a[d],h.from,h.to));if(o!=2&&!c.every(h=>h))return{changes:e.changes(s.map((h,d)=>c[d]?[]:[{from:h.from,insert:a[d].open+" "},{from:h.to,insert:" "+a[d].close}]))};if(o!=1&&c.some(h=>h)){let h=[];for(let d=0,g;d<c.length;d++)if(g=c[d]){let _=a[d],{open:b,close:$}=g;h.push({from:b.pos-_.open.length,to:b.pos+b.margin},{from:$.pos-$.margin,to:$.pos+_.close.length})}return{changes:h}}return null}function changeLineComment(o,e,s=e.selection.ranges){let a=[],c=-1;for(let{from:h,to:d}of s){let g=a.length,_=1e9;for(let b=h;b<=d;){let $=e.doc.lineAt(b);if($.from>c&&(h==d||d>$.from)){c=$.from;let j=getConfig(e,b).line;if(!j)continue;let _e=/^\s*/.exec($.text)[0].length,et=_e==$.length,tt=$.text.slice(_e,_e+j.length)==j?_e:-1;_e<$.text.length&&_e<_&&(_=_e),a.push({line:$,comment:tt,token:j,indent:_e,empty:et,single:!1})}b=$.to+1}if(_<1e9)for(let b=g;b<a.length;b++)a[b].indent<a[b].line.text.length&&(a[b].indent=_);a.length==g+1&&(a[g].single=!0)}if(o!=2&&a.some(h=>h.comment<0&&(!h.empty||h.single))){let h=[];for(let{line:g,token:_,indent:b,empty:$,single:j}of a)(j||!$)&&h.push({from:g.from+b,insert:_+" "});let d=e.changes(h);return{changes:d,selection:e.selection.map(d,1)}}else if(o!=1&&a.some(h=>h.comment>=0)){let h=[];for(let{line:d,comment:g,token:_}of a)if(g>=0){let b=d.from+g,$=b+_.length;d.text[$-d.from]==" "&&$++,h.push({from:b,to:$})}return{changes:h}}return null}const fromHistory=Annotation.define(),isolateHistory=Annotation.define(),invertedEffects=Facet.define(),historyConfig=Facet.define({combine(o){return combineConfig(o,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}});function changeEnd(o){let e=0;return o.iterChangedRanges((s,a)=>e=a),e}const historyField_=StateField.define({create(){return HistoryState.empty},update(o,e){let s=e.state.facet(historyConfig),a=e.annotation(fromHistory);if(a){let _=e.docChanged?EditorSelection.single(changeEnd(e.changes)):void 0,b=HistEvent.fromTransaction(e,_),$=a.side,j=$==0?o.undone:o.done;return b?j=updateBranch(j,j.length,s.minDepth,b):j=addSelection(j,e.startState.selection),new HistoryState($==0?a.rest:j,$==0?j:a.rest)}let c=e.annotation(isolateHistory);if((c=="full"||c=="before")&&(o=o.isolate()),e.annotation(Transaction.addToHistory)===!1)return e.changes.empty?o:o.addMapping(e.changes.desc);let h=HistEvent.fromTransaction(e),d=e.annotation(Transaction.time),g=e.annotation(Transaction.userEvent);return h?o=o.addChanges(h,d,g,s.newGroupDelay,s.minDepth):e.selection&&(o=o.addSelection(e.startState.selection,d,g,s.newGroupDelay)),(c=="full"||c=="after")&&(o=o.isolate()),o},toJSON(o){return{done:o.done.map(e=>e.toJSON()),undone:o.undone.map(e=>e.toJSON())}},fromJSON(o){return new HistoryState(o.done.map(HistEvent.fromJSON),o.undone.map(HistEvent.fromJSON))}});function history(o={}){return[historyField_,historyConfig.of(o),EditorView.domEventHandlers({beforeinput(e,s){let a=e.inputType=="historyUndo"?undo:e.inputType=="historyRedo"?redo:null;return a?(e.preventDefault(),a(s)):!1}})]}function cmd(o,e){return function({state:s,dispatch:a}){if(!e&&s.readOnly)return!1;let c=s.field(historyField_,!1);if(!c)return!1;let h=c.pop(o,s,e);return h?(a(h),!0):!1}}const undo=cmd(0,!1),redo=cmd(1,!1),undoSelection=cmd(0,!0),redoSelection=cmd(1,!0);class HistEvent{constructor(e,s,a,c,h){this.changes=e,this.effects=s,this.mapped=a,this.startSelection=c,this.selectionsAfter=h}setSelAfter(e){return new HistEvent(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,s,a;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(s=this.mapped)===null||s===void 0?void 0:s.toJSON(),startSelection:(a=this.startSelection)===null||a===void 0?void 0:a.toJSON(),selectionsAfter:this.selectionsAfter.map(c=>c.toJSON())}}static fromJSON(e){return new HistEvent(e.changes&&ChangeSet.fromJSON(e.changes),[],e.mapped&&ChangeDesc.fromJSON(e.mapped),e.startSelection&&EditorSelection.fromJSON(e.startSelection),e.selectionsAfter.map(EditorSelection.fromJSON))}static fromTransaction(e,s){let a=none$1;for(let c of e.startState.facet(invertedEffects)){let h=c(e);h.length&&(a=a.concat(h))}return!a.length&&e.changes.empty?null:new HistEvent(e.changes.invert(e.startState.doc),a,void 0,s||e.startState.selection,none$1)}static selection(e){return new HistEvent(void 0,none$1,void 0,void 0,e)}}function updateBranch(o,e,s,a){let c=e+1>s+20?e-s-1:0,h=o.slice(c,e);return h.push(a),h}function isAdjacent(o,e){let s=[],a=!1;return o.iterChangedRanges((c,h)=>s.push(c,h)),e.iterChangedRanges((c,h,d,g)=>{for(let _=0;_<s.length;){let b=s[_++],$=s[_++];g>=b&&d<=$&&(a=!0)}}),a}function eqSelectionShape(o,e){return o.ranges.length==e.ranges.length&&o.ranges.filter((s,a)=>s.empty!=e.ranges[a].empty).length===0}function conc(o,e){return o.length?e.length?o.concat(e):o:e}const none$1=[],MaxSelectionsPerEvent=200;function addSelection(o,e){if(o.length){let s=o[o.length-1],a=s.selectionsAfter.slice(Math.max(0,s.selectionsAfter.length-MaxSelectionsPerEvent));return a.length&&a[a.length-1].eq(e)?o:(a.push(e),updateBranch(o,o.length-1,1e9,s.setSelAfter(a)))}else return[HistEvent.selection([e])]}function popSelection(o){let e=o[o.length-1],s=o.slice();return s[o.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),s}function addMappingToBranch(o,e){if(!o.length)return o;let s=o.length,a=none$1;for(;s;){let c=mapEvent(o[s-1],e,a);if(c.changes&&!c.changes.empty||c.effects.length){let h=o.slice(0,s);return h[s-1]=c,h}else e=c.mapped,s--,a=c.selectionsAfter}return a.length?[HistEvent.selection(a)]:none$1}function mapEvent(o,e,s){let a=conc(o.selectionsAfter.length?o.selectionsAfter.map(g=>g.map(e)):none$1,s);if(!o.changes)return HistEvent.selection(a);let c=o.changes.map(e),h=e.mapDesc(o.changes,!0),d=o.mapped?o.mapped.composeDesc(h):h;return new HistEvent(c,StateEffect.mapEffects(o.effects,e),d,o.startSelection.map(h),a)}const joinableUserEvent=/^(input\.type|delete)($|\.)/;class HistoryState{constructor(e,s,a=0,c=void 0){this.done=e,this.undone=s,this.prevTime=a,this.prevUserEvent=c}isolate(){return this.prevTime?new HistoryState(this.done,this.undone):this}addChanges(e,s,a,c,h){let d=this.done,g=d[d.length-1];return g&&g.changes&&!g.changes.empty&&e.changes&&(!a||joinableUserEvent.test(a))&&(!g.selectionsAfter.length&&s-this.prevTime<c&&isAdjacent(g.changes,e.changes)||a=="input.type.compose")?d=updateBranch(d,d.length-1,h,new HistEvent(e.changes.compose(g.changes),conc(e.effects,g.effects),g.mapped,g.startSelection,none$1)):d=updateBranch(d,d.length,h,e),new HistoryState(d,none$1,s,a)}addSelection(e,s,a,c){let h=this.done.length?this.done[this.done.length-1].selectionsAfter:none$1;return h.length>0&&s-this.prevTime<c&&a==this.prevUserEvent&&a&&/^select($|\.)/.test(a)&&eqSelectionShape(h[h.length-1],e)?this:new HistoryState(addSelection(this.done,e),this.undone,s,a)}addMapping(e){return new HistoryState(addMappingToBranch(this.done,e),addMappingToBranch(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,s,a){let c=e==0?this.done:this.undone;if(c.length==0)return null;let h=c[c.length-1];if(a&&h.selectionsAfter.length)return s.update({selection:h.selectionsAfter[h.selectionsAfter.length-1],annotations:fromHistory.of({side:e,rest:popSelection(c)}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(h.changes){let d=c.length==1?none$1:c.slice(0,c.length-1);return h.mapped&&(d=addMappingToBranch(d,h.mapped)),s.update({changes:h.changes,selection:h.startSelection,effects:h.effects,annotations:fromHistory.of({side:e,rest:d}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}HistoryState.empty=new HistoryState(none$1,none$1);const historyKeymap=[{key:"Mod-z",run:undo,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:redo,preventDefault:!0},{linux:"Ctrl-Shift-z",run:redo,preventDefault:!0},{key:"Mod-u",run:undoSelection,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:redoSelection,preventDefault:!0}];function updateSel(o,e){return EditorSelection.create(o.ranges.map(e),o.mainIndex)}function setSel(o,e){return o.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function moveSel({state:o,dispatch:e},s){let a=updateSel(o.selection,s);return a.eq(o.selection)?!1:(e(setSel(o,a)),!0)}function rangeEnd(o,e){return EditorSelection.cursor(e?o.to:o.from)}function cursorByChar(o,e){return moveSel(o,s=>s.empty?o.moveByChar(s,e):rangeEnd(s,e))}function ltrAtCursor(o){return o.textDirectionAt(o.state.selection.main.head)==Direction.LTR}const cursorCharLeft=o=>cursorByChar(o,!ltrAtCursor(o)),cursorCharRight=o=>cursorByChar(o,ltrAtCursor(o));function cursorByGroup(o,e){return moveSel(o,s=>s.empty?o.moveByGroup(s,e):rangeEnd(s,e))}const cursorGroupLeft=o=>cursorByGroup(o,!ltrAtCursor(o)),cursorGroupRight=o=>cursorByGroup(o,ltrAtCursor(o));function interestingNode(o,e,s){if(e.type.prop(s))return!0;let a=e.to-e.from;return a&&(a>2||/[^\s,.;:]/.test(o.sliceDoc(e.from,e.to)))||e.firstChild}function moveBySyntax(o,e,s){let a=syntaxTree(o).resolveInner(e.head),c=s?NodeProp.closedBy:NodeProp.openedBy;for(let _=e.head;;){let b=s?a.childAfter(_):a.childBefore(_);if(!b)break;interestingNode(o,b,c)?a=b:_=s?b.to:b.from}let h=a.type.prop(c),d,g;return h&&(d=s?matchBrackets(o,a.from,1):matchBrackets(o,a.to,-1))&&d.matched?g=s?d.end.to:d.end.from:g=s?a.to:a.from,EditorSelection.cursor(g,s?-1:1)}const cursorSyntaxLeft=o=>moveSel(o,e=>moveBySyntax(o.state,e,!ltrAtCursor(o))),cursorSyntaxRight=o=>moveSel(o,e=>moveBySyntax(o.state,e,ltrAtCursor(o)));function cursorByLine(o,e){return moveSel(o,s=>{if(!s.empty)return rangeEnd(s,e);let a=o.moveVertically(s,e);return a.head!=s.head?a:o.moveToLineBoundary(s,e)})}const cursorLineUp=o=>cursorByLine(o,!1),cursorLineDown=o=>cursorByLine(o,!0);function pageHeight(o){return Math.max(o.defaultLineHeight,Math.min(o.dom.clientHeight,innerHeight)-5)}function cursorByPage(o,e){let{state:s}=o,a=updateSel(s.selection,g=>g.empty?o.moveVertically(g,e,pageHeight(o)):rangeEnd(g,e));if(a.eq(s.selection))return!1;let c=o.coordsAtPos(s.selection.main.head),h=o.scrollDOM.getBoundingClientRect(),d;return c&&c.top>h.top&&c.bottom<h.bottom&&c.top-h.top<=o.scrollDOM.scrollHeight-o.scrollDOM.scrollTop-o.scrollDOM.clientHeight&&(d=EditorView.scrollIntoView(a.main.head,{y:"start",yMargin:c.top-h.top})),o.dispatch(setSel(s,a),{effects:d}),!0}const cursorPageUp=o=>cursorByPage(o,!1),cursorPageDown=o=>cursorByPage(o,!0);function moveByLineBoundary(o,e,s){let a=o.lineBlockAt(e.head),c=o.moveToLineBoundary(e,s);if(c.head==e.head&&c.head!=(s?a.to:a.from)&&(c=o.moveToLineBoundary(e,s,!1)),!s&&c.head==a.from&&a.length){let h=/^\s*/.exec(o.state.sliceDoc(a.from,Math.min(a.from+100,a.to)))[0].length;h&&e.head!=a.from+h&&(c=EditorSelection.cursor(a.from+h))}return c}const cursorLineBoundaryForward=o=>moveSel(o,e=>moveByLineBoundary(o,e,!0)),cursorLineBoundaryBackward=o=>moveSel(o,e=>moveByLineBoundary(o,e,!1)),cursorLineStart=o=>moveSel(o,e=>EditorSelection.cursor(o.lineBlockAt(e.head).from,1)),cursorLineEnd=o=>moveSel(o,e=>EditorSelection.cursor(o.lineBlockAt(e.head).to,-1));function toMatchingBracket(o,e,s){let a=!1,c=updateSel(o.selection,h=>{let d=matchBrackets(o,h.head,-1)||matchBrackets(o,h.head,1)||h.head>0&&matchBrackets(o,h.head-1,1)||h.head<o.doc.length&&matchBrackets(o,h.head+1,-1);if(!d||!d.end)return h;a=!0;let g=d.start.from==h.head?d.end.to:d.end.from;return s?EditorSelection.range(h.anchor,g):EditorSelection.cursor(g)});return a?(e(setSel(o,c)),!0):!1}const cursorMatchingBracket=({state:o,dispatch:e})=>toMatchingBracket(o,e,!1);function extendSel(o,e){let s=updateSel(o.state.selection,a=>{let c=e(a);return EditorSelection.range(a.anchor,c.head,c.goalColumn)});return s.eq(o.state.selection)?!1:(o.dispatch(setSel(o.state,s)),!0)}function selectByChar(o,e){return extendSel(o,s=>o.moveByChar(s,e))}const selectCharLeft=o=>selectByChar(o,!ltrAtCursor(o)),selectCharRight=o=>selectByChar(o,ltrAtCursor(o));function selectByGroup(o,e){return extendSel(o,s=>o.moveByGroup(s,e))}const selectGroupLeft=o=>selectByGroup(o,!ltrAtCursor(o)),selectGroupRight=o=>selectByGroup(o,ltrAtCursor(o)),selectSyntaxLeft=o=>extendSel(o,e=>moveBySyntax(o.state,e,!ltrAtCursor(o))),selectSyntaxRight=o=>extendSel(o,e=>moveBySyntax(o.state,e,ltrAtCursor(o)));function selectByLine(o,e){return extendSel(o,s=>o.moveVertically(s,e))}const selectLineUp=o=>selectByLine(o,!1),selectLineDown=o=>selectByLine(o,!0);function selectByPage(o,e){return extendSel(o,s=>o.moveVertically(s,e,pageHeight(o)))}const selectPageUp=o=>selectByPage(o,!1),selectPageDown=o=>selectByPage(o,!0),selectLineBoundaryForward=o=>extendSel(o,e=>moveByLineBoundary(o,e,!0)),selectLineBoundaryBackward=o=>extendSel(o,e=>moveByLineBoundary(o,e,!1)),selectLineStart=o=>extendSel(o,e=>EditorSelection.cursor(o.lineBlockAt(e.head).from)),selectLineEnd=o=>extendSel(o,e=>EditorSelection.cursor(o.lineBlockAt(e.head).to)),cursorDocStart=({state:o,dispatch:e})=>(e(setSel(o,{anchor:0})),!0),cursorDocEnd=({state:o,dispatch:e})=>(e(setSel(o,{anchor:o.doc.length})),!0),selectDocStart=({state:o,dispatch:e})=>(e(setSel(o,{anchor:o.selection.main.anchor,head:0})),!0),selectDocEnd=({state:o,dispatch:e})=>(e(setSel(o,{anchor:o.selection.main.anchor,head:o.doc.length})),!0),selectAll=({state:o,dispatch:e})=>(e(o.update({selection:{anchor:0,head:o.doc.length},userEvent:"select"})),!0),selectLine=({state:o,dispatch:e})=>{let s=selectedLineBlocks(o).map(({from:a,to:c})=>EditorSelection.range(a,Math.min(c+1,o.doc.length)));return e(o.update({selection:EditorSelection.create(s),userEvent:"select"})),!0},selectParentSyntax=({state:o,dispatch:e})=>{let s=updateSel(o.selection,a=>{var c;let h=syntaxTree(o).resolveInner(a.head,1);for(;!(h.from<a.from&&h.to>=a.to||h.to>a.to&&h.from<=a.from||!(!((c=h.parent)===null||c===void 0)&&c.parent));)h=h.parent;return EditorSelection.range(h.to,h.from)});return e(setSel(o,s)),!0},simplifySelection=({state:o,dispatch:e})=>{let s=o.selection,a=null;return s.ranges.length>1?a=EditorSelection.create([s.main]):s.main.empty||(a=EditorSelection.create([EditorSelection.cursor(s.main.head)])),a?(e(setSel(o,a)),!0):!1};function deleteBy({state:o,dispatch:e},s){if(o.readOnly)return!1;let a="delete.selection",c=o.changeByRange(h=>{let{from:d,to:g}=h;if(d==g){let _=s(d);_<d?a="delete.backward":_>d&&(a="delete.forward"),d=Math.min(d,_),g=Math.max(g,_)}return d==g?{range:h}:{changes:{from:d,to:g},range:EditorSelection.cursor(d)}});return c.changes.empty?!1:(e(o.update(c,{scrollIntoView:!0,userEvent:a,effects:a=="delete.selection"?EditorView.announce.of(o.phrase("Selection deleted")):void 0})),!0)}function skipAtomic(o,e,s){if(o instanceof EditorView)for(let a of o.state.facet(EditorView.atomicRanges).map(c=>c(o)))a.between(e,e,(c,h)=>{c<e&&h>e&&(e=s?h:c)});return e}const deleteByChar=(o,e)=>deleteBy(o,s=>{let{state:a}=o,c=a.doc.lineAt(s),h,d;if(!e&&s>c.from&&s<c.from+200&&!/[^ \t]/.test(h=c.text.slice(0,s-c.from))){if(h[h.length-1]==" ")return s-1;let g=countColumn(h,a.tabSize),_=g%getIndentUnit(a)||getIndentUnit(a);for(let b=0;b<_&&h[h.length-1-b]==" ";b++)s--;d=s}else d=findClusterBreak(c.text,s-c.from,e,e)+c.from,d==s&&c.number!=(e?a.doc.lines:1)&&(d+=e?1:-1);return skipAtomic(o,d,e)}),deleteCharBackward=o=>deleteByChar(o,!1),deleteCharForward=o=>deleteByChar(o,!0),deleteByGroup=(o,e)=>deleteBy(o,s=>{let a=s,{state:c}=o,h=c.doc.lineAt(a),d=c.charCategorizer(a);for(let g=null;;){if(a==(e?h.to:h.from)){a==s&&h.number!=(e?c.doc.lines:1)&&(a+=e?1:-1);break}let _=findClusterBreak(h.text,a-h.from,e)+h.from,b=h.text.slice(Math.min(a,_)-h.from,Math.max(a,_)-h.from),$=d(b);if(g!=null&&$!=g)break;(b!=" "||a!=s)&&(g=$),a=_}return skipAtomic(o,a,e)}),deleteGroupBackward=o=>deleteByGroup(o,!1),deleteGroupForward=o=>deleteByGroup(o,!0),deleteToLineEnd=o=>deleteBy(o,e=>{let s=o.lineBlockAt(e).to;return skipAtomic(o,e<s?s:Math.min(o.state.doc.length,e+1),!0)}),deleteToLineStart=o=>deleteBy(o,e=>{let s=o.lineBlockAt(e).from;return skipAtomic(o,e>s?s:Math.max(0,e-1),!1)}),splitLine=({state:o,dispatch:e})=>{if(o.readOnly)return!1;let s=o.changeByRange(a=>({changes:{from:a.from,to:a.to,insert:Text.of(["",""])},range:EditorSelection.cursor(a.from)}));return e(o.update(s,{scrollIntoView:!0,userEvent:"input"})),!0},transposeChars=({state:o,dispatch:e})=>{if(o.readOnly)return!1;let s=o.changeByRange(a=>{if(!a.empty||a.from==0||a.from==o.doc.length)return{range:a};let c=a.from,h=o.doc.lineAt(c),d=c==h.from?c-1:findClusterBreak(h.text,c-h.from,!1)+h.from,g=c==h.to?c+1:findClusterBreak(h.text,c-h.from,!0)+h.from;return{changes:{from:d,to:g,insert:o.doc.slice(c,g).append(o.doc.slice(d,c))},range:EditorSelection.cursor(g)}});return s.changes.empty?!1:(e(o.update(s,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function selectedLineBlocks(o){let e=[],s=-1;for(let a of o.selection.ranges){let c=o.doc.lineAt(a.from),h=o.doc.lineAt(a.to);if(!a.empty&&a.to==h.from&&(h=o.doc.lineAt(a.to-1)),s>=c.number){let d=e[e.length-1];d.to=h.to,d.ranges.push(a)}else e.push({from:c.from,to:h.to,ranges:[a]});s=h.number+1}return e}function moveLine(o,e,s){if(o.readOnly)return!1;let a=[],c=[];for(let h of selectedLineBlocks(o)){if(s?h.to==o.doc.length:h.from==0)continue;let d=o.doc.lineAt(s?h.to+1:h.from-1),g=d.length+1;if(s){a.push({from:h.to,to:d.to},{from:h.from,insert:d.text+o.lineBreak});for(let _ of h.ranges)c.push(EditorSelection.range(Math.min(o.doc.length,_.anchor+g),Math.min(o.doc.length,_.head+g)))}else{a.push({from:d.from,to:h.from},{from:h.to,insert:o.lineBreak+d.text});for(let _ of h.ranges)c.push(EditorSelection.range(_.anchor-g,_.head-g))}}return a.length?(e(o.update({changes:a,scrollIntoView:!0,selection:EditorSelection.create(c,o.selection.mainIndex),userEvent:"move.line"})),!0):!1}const moveLineUp=({state:o,dispatch:e})=>moveLine(o,e,!1),moveLineDown=({state:o,dispatch:e})=>moveLine(o,e,!0);function copyLine(o,e,s){if(o.readOnly)return!1;let a=[];for(let c of selectedLineBlocks(o))s?a.push({from:c.from,insert:o.doc.slice(c.from,c.to)+o.lineBreak}):a.push({from:c.to,insert:o.lineBreak+o.doc.slice(c.from,c.to)});return e(o.update({changes:a,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const copyLineUp=({state:o,dispatch:e})=>copyLine(o,e,!1),copyLineDown=({state:o,dispatch:e})=>copyLine(o,e,!0),deleteLine=o=>{if(o.state.readOnly)return!1;let{state:e}=o,s=e.changes(selectedLineBlocks(e).map(({from:c,to:h})=>(c>0?c--:h<e.doc.length&&h++,{from:c,to:h}))),a=updateSel(e.selection,c=>o.moveVertically(c,!0)).map(s);return o.dispatch({changes:s,selection:a,scrollIntoView:!0,userEvent:"delete.line"}),!0};function isBetweenBrackets(o,e){if(/\(\)|\[\]|\{\}/.test(o.sliceDoc(e-1,e+1)))return{from:e,to:e};let s=syntaxTree(o).resolveInner(e),a=s.childBefore(e),c=s.childAfter(e),h;return a&&c&&a.to<=e&&c.from>=e&&(h=a.type.prop(NodeProp.closedBy))&&h.indexOf(c.name)>-1&&o.doc.lineAt(a.to).from==o.doc.lineAt(c.from).from?{from:a.to,to:c.from}:null}const insertNewlineAndIndent=newlineAndIndent(!1),insertBlankLine=newlineAndIndent(!0);function newlineAndIndent(o){return({state:e,dispatch:s})=>{if(e.readOnly)return!1;let a=e.changeByRange(c=>{let{from:h,to:d}=c,g=e.doc.lineAt(h),_=!o&&h==d&&isBetweenBrackets(e,h);o&&(h=d=(d<=g.to?g:e.doc.lineAt(d)).to);let b=new IndentContext(e,{simulateBreak:h,simulateDoubleBreak:!!_}),$=getIndentation(b,h);for($==null&&($=/^\s*/.exec(e.doc.lineAt(h).text)[0].length);d<g.to&&/\s/.test(g.text[d-g.from]);)d++;_?{from:h,to:d}=_:h>g.from&&h<g.from+100&&!/\S/.test(g.text.slice(0,h))&&(h=g.from);let j=["",indentString(e,$)];return _&&j.push(indentString(e,b.lineIndent(g.from,-1))),{changes:{from:h,to:d,insert:Text.of(j)},range:EditorSelection.cursor(h+1+j[1].length)}});return s(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0}}function changeBySelectedLine(o,e){let s=-1;return o.changeByRange(a=>{let c=[];for(let d=a.from;d<=a.to;){let g=o.doc.lineAt(d);g.number>s&&(a.empty||a.to>g.from)&&(e(g,c,a),s=g.number),d=g.to+1}let h=o.changes(c);return{changes:c,range:EditorSelection.range(h.mapPos(a.anchor,1),h.mapPos(a.head,1))}})}const indentSelection=({state:o,dispatch:e})=>{if(o.readOnly)return!1;let s=Object.create(null),a=new IndentContext(o,{overrideIndentation:h=>{let d=s[h];return d==null?-1:d}}),c=changeBySelectedLine(o,(h,d,g)=>{let _=getIndentation(a,h.from);if(_==null)return;/\S/.test(h.text)||(_=0);let b=/^\s*/.exec(h.text)[0],$=indentString(o,_);(b!=$||g.from<h.from+b.length)&&(s[h.from]=_,d.push({from:h.from,to:h.from+b.length,insert:$}))});return c.changes.empty||e(o.update(c,{userEvent:"indent"})),!0},indentMore=({state:o,dispatch:e})=>o.readOnly?!1:(e(o.update(changeBySelectedLine(o,(s,a)=>{a.push({from:s.from,insert:o.facet(indentUnit)})}),{userEvent:"input.indent"})),!0),indentLess=({state:o,dispatch:e})=>o.readOnly?!1:(e(o.update(changeBySelectedLine(o,(s,a)=>{let c=/^\s*/.exec(s.text)[0];if(!c)return;let h=countColumn(c,o.tabSize),d=0,g=indentString(o,Math.max(0,h-getIndentUnit(o)));for(;d<c.length&&d<g.length&&c.charCodeAt(d)==g.charCodeAt(d);)d++;a.push({from:s.from+d,to:s.from+c.length,insert:g.slice(d)})}),{userEvent:"delete.dedent"})),!0),emacsStyleKeymap=[{key:"Ctrl-b",run:cursorCharLeft,shift:selectCharLeft,preventDefault:!0},{key:"Ctrl-f",run:cursorCharRight,shift:selectCharRight},{key:"Ctrl-p",run:cursorLineUp,shift:selectLineUp},{key:"Ctrl-n",run:cursorLineDown,shift:selectLineDown},{key:"Ctrl-a",run:cursorLineStart,shift:selectLineStart},{key:"Ctrl-e",run:cursorLineEnd,shift:selectLineEnd},{key:"Ctrl-d",run:deleteCharForward},{key:"Ctrl-h",run:deleteCharBackward},{key:"Ctrl-k",run:deleteToLineEnd},{key:"Ctrl-Alt-h",run:deleteGroupBackward},{key:"Ctrl-o",run:splitLine},{key:"Ctrl-t",run:transposeChars},{key:"Ctrl-v",run:cursorPageDown}],standardKeymap=[{key:"ArrowLeft",run:cursorCharLeft,shift:selectCharLeft,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:cursorGroupLeft,shift:selectGroupLeft},{mac:"Cmd-ArrowLeft",run:cursorLineBoundaryBackward,shift:selectLineBoundaryBackward},{key:"ArrowRight",run:cursorCharRight,shift:selectCharRight,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:cursorGroupRight,shift:selectGroupRight},{mac:"Cmd-ArrowRight",run:cursorLineBoundaryForward,shift:selectLineBoundaryForward},{key:"ArrowUp",run:cursorLineUp,shift:selectLineUp,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cursorDocStart,shift:selectDocStart},{mac:"Ctrl-ArrowUp",run:cursorPageUp,shift:selectPageUp},{key:"ArrowDown",run:cursorLineDown,shift:selectLineDown,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cursorDocEnd,shift:selectDocEnd},{mac:"Ctrl-ArrowDown",run:cursorPageDown,shift:selectPageDown},{key:"PageUp",run:cursorPageUp,shift:selectPageUp},{key:"PageDown",run:cursorPageDown,shift:selectPageDown},{key:"Home",run:cursorLineBoundaryBackward,shift:selectLineBoundaryBackward,preventDefault:!0},{key:"Mod-Home",run:cursorDocStart,shift:selectDocStart},{key:"End",run:cursorLineBoundaryForward,shift:selectLineBoundaryForward,preventDefault:!0},{key:"Mod-End",run:cursorDocEnd,shift:selectDocEnd},{key:"Enter",run:insertNewlineAndIndent},{key:"Mod-a",run:selectAll},{key:"Backspace",run:deleteCharBackward,shift:deleteCharBackward},{key:"Delete",run:deleteCharForward},{key:"Mod-Backspace",mac:"Alt-Backspace",run:deleteGroupBackward},{key:"Mod-Delete",mac:"Alt-Delete",run:deleteGroupForward},{mac:"Mod-Backspace",run:deleteToLineStart},{mac:"Mod-Delete",run:deleteToLineEnd}].concat(emacsStyleKeymap.map(o=>({mac:o.key,run:o.run,shift:o.shift}))),defaultKeymap=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:cursorSyntaxLeft,shift:selectSyntaxLeft},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:cursorSyntaxRight,shift:selectSyntaxRight},{key:"Alt-ArrowUp",run:moveLineUp},{key:"Shift-Alt-ArrowUp",run:copyLineUp},{key:"Alt-ArrowDown",run:moveLineDown},{key:"Shift-Alt-ArrowDown",run:copyLineDown},{key:"Escape",run:simplifySelection},{key:"Mod-Enter",run:insertBlankLine},{key:"Alt-l",mac:"Ctrl-l",run:selectLine},{key:"Mod-i",run:selectParentSyntax,preventDefault:!0},{key:"Mod-[",run:indentLess},{key:"Mod-]",run:indentMore},{key:"Mod-Alt-\\",run:indentSelection},{key:"Shift-Mod-k",run:deleteLine},{key:"Shift-Mod-\\",run:cursorMatchingBracket},{key:"Mod-/",run:toggleComment},{key:"Alt-A",run:toggleBlockComment}].concat(standardKeymap),indentWithTab={key:"Tab",run:indentMore,shift:indentLess};function crelt(){var o=arguments[0];typeof o=="string"&&(o=document.createElement(o));var e=1,s=arguments[1];if(s&&typeof s=="object"&&s.nodeType==null&&!Array.isArray(s)){for(var a in s)if(Object.prototype.hasOwnProperty.call(s,a)){var c=s[a];typeof c=="string"?o.setAttribute(a,c):c!=null&&(o[a]=c)}e++}for(;e<arguments.length;e++)add(o,arguments[e]);return o}function add(o,e){if(typeof e=="string")o.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)o.appendChild(e);else if(Array.isArray(e))for(var s=0;s<e.length;s++)add(o,e[s]);else throw new RangeError("Unsupported child node: "+e)}const basicNormalize=typeof String.prototype.normalize=="function"?o=>o.normalize("NFKD"):o=>o;class SearchCursor{constructor(e,s,a=0,c=e.length,h){this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(a,c),this.bufferStart=a,this.normalize=h?d=>h(basicNormalize(d)):basicNormalize,this.query=this.normalize(s)}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 codePointAt(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 s=fromCodePoint(e),a=this.bufferStart+this.bufferPos;this.bufferPos+=codePointSize(e);let c=this.normalize(s);for(let h=0,d=a;;h++){let g=c.charCodeAt(h),_=this.match(g,d);if(_)return this.value=_,this;if(h==c.length-1)break;d==a&&h<s.length&&s.charCodeAt(h)==g&&d++}}}match(e,s){let a=null;for(let c=0;c<this.matches.length;c+=2){let h=this.matches[c],d=!1;this.query.charCodeAt(h)==e&&(h==this.query.length-1?a={from:this.matches[c+1],to:s+1}:(this.matches[c]++,d=!0)),d||(this.matches.splice(c,2),c-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:s,to:s+1}:this.matches.push(1,s)),a}}typeof Symbol<"u"&&(SearchCursor.prototype[Symbol.iterator]=function(){return this});const empty={from:-1,to:-1,match:/.*/.exec("")},baseFlags="gm"+(/x/.unicode==null?"":"u");class RegExpCursor{constructor(e,s,a,c=0,h=e.length){if(this.to=h,this.curLine="",this.done=!1,this.value=empty,/\\[sWDnr]|\n|\r|\[\^/.test(s))return new MultilineRegExpCursor(e,s,a,c,h);this.re=new RegExp(s,baseFlags+(a!=null&&a.ignoreCase?"i":"")),this.iter=e.iter();let d=e.lineAt(c);this.curLineStart=d.from,this.matchPos=c,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 s=this.matchPos<=this.to&&this.re.exec(this.curLine);if(s){let a=this.curLineStart+s.index,c=a+s[0].length;if(this.matchPos=c+(a==c?1:0),a==this.curLine.length&&this.nextLine(),a<c||a>this.value.to)return this.value={from:a,to:c,match:s},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 flattened=new WeakMap;class FlattenedDoc{constructor(e,s){this.from=e,this.text=s}get to(){return this.from+this.text.length}static get(e,s,a){let c=flattened.get(e);if(!c||c.from>=a||c.to<=s){let g=new FlattenedDoc(s,e.sliceString(s,a));return flattened.set(e,g),g}if(c.from==s&&c.to==a)return c;let{text:h,from:d}=c;return d>s&&(h=e.sliceString(s,d)+h,d=s),c.to<a&&(h+=e.sliceString(c.to,a)),flattened.set(e,new FlattenedDoc(d,h)),new FlattenedDoc(s,h.slice(s-d,a-d))}}class MultilineRegExpCursor{constructor(e,s,a,c,h){this.text=e,this.to=h,this.done=!1,this.value=empty,this.matchPos=c,this.re=new RegExp(s,baseFlags+(a!=null&&a.ignoreCase?"i":"")),this.flat=FlattenedDoc.get(e,c,this.chunkEnd(c+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,s=this.re.exec(this.flat.text);if(s&&!s[0]&&s.index==e&&(this.re.lastIndex=e+1,s=this.re.exec(this.flat.text)),s&&this.flat.to<this.to&&s.index+s[0].length>this.flat.text.length-10&&(s=null),s){let a=this.flat.from+s.index,c=a+s[0].length;return this.value={from:a,to:c,match:s},this.matchPos=c+(a==c?1:0),this}else{if(this.flat.to==this.to)return this.done=!0,this;this.flat=FlattenedDoc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}}typeof Symbol<"u"&&(RegExpCursor.prototype[Symbol.iterator]=MultilineRegExpCursor.prototype[Symbol.iterator]=function(){return this});function validRegExp(o){try{return new RegExp(o,baseFlags),!0}catch{return!1}}function createLineDialog(o){let e=crelt("input",{class:"cm-textfield",name:"line"}),s=crelt("form",{class:"cm-gotoLine",onkeydown:c=>{c.keyCode==27?(c.preventDefault(),o.dispatch({effects:dialogEffect.of(!1)}),o.focus()):c.keyCode==13&&(c.preventDefault(),a())},onsubmit:c=>{c.preventDefault(),a()}},crelt("label",o.state.phrase("Go to line"),": ",e)," ",crelt("button",{class:"cm-button",type:"submit"},o.state.phrase("go")));function a(){let c=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!c)return;let{state:h}=o,d=h.doc.lineAt(h.selection.main.head),[,g,_,b,$]=c,j=b?+b.slice(1):0,_e=_?+_:d.number;if(_&&$){let tt=_e/100;g&&(tt=tt*(g=="-"?-1:1)+d.number/h.doc.lines),_e=Math.round(h.doc.lines*tt)}else _&&g&&(_e=_e*(g=="-"?-1:1)+d.number);let et=h.doc.line(Math.max(1,Math.min(h.doc.lines,_e)));o.dispatch({effects:dialogEffect.of(!1),selection:EditorSelection.cursor(et.from+Math.max(0,Math.min(j,et.length))),scrollIntoView:!0}),o.focus()}return{dom:s}}const dialogEffect=StateEffect.define(),dialogField=StateField.define({create(){return!0},update(o,e){for(let s of e.effects)s.is(dialogEffect)&&(o=s.value);return o},provide:o=>showPanel.from(o,e=>e?createLineDialog:null)}),gotoLine=o=>{let e=getPanel(o,createLineDialog);if(!e){let s=[dialogEffect.of(!0)];o.state.field(dialogField,!1)==null&&s.push(StateEffect.appendConfig.of([dialogField,baseTheme$1$1])),o.dispatch({effects:s}),e=getPanel(o,createLineDialog)}return e&&e.dom.querySelector("input").focus(),!0},baseTheme$1$1=EditorView.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),defaultHighlightOptions={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},highlightConfig=Facet.define({combine(o){return combineConfig(o,defaultHighlightOptions,{highlightWordAroundCursor:(e,s)=>e||s,minSelectionLength:Math.min,maxMatches:Math.min})}});function highlightSelectionMatches(o){let e=[defaultTheme,matchHighlighter];return o&&e.push(highlightConfig.of(o)),e}const matchDeco=Decoration.mark({class:"cm-selectionMatch"}),mainMatchDeco=Decoration.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function insideWordBoundaries(o,e,s,a){return(s==0||o(e.sliceDoc(s-1,s))!=CharCategory.Word)&&(a==e.doc.length||o(e.sliceDoc(a,a+1))!=CharCategory.Word)}function insideWord(o,e,s,a){return o(e.sliceDoc(s,s+1))==CharCategory.Word&&o(e.sliceDoc(a-1,a))==CharCategory.Word}const matchHighlighter=ViewPlugin.fromClass(class{constructor(o){this.decorations=this.getDeco(o)}update(o){(o.selectionSet||o.docChanged||o.viewportChanged)&&(this.decorations=this.getDeco(o.view))}getDeco(o){let e=o.state.facet(highlightConfig),{state:s}=o,a=s.selection;if(a.ranges.length>1)return Decoration.none;let c=a.main,h,d=null;if(c.empty){if(!e.highlightWordAroundCursor)return Decoration.none;let _=s.wordAt(c.head);if(!_)return Decoration.none;d=s.charCategorizer(c.head),h=s.sliceDoc(_.from,_.to)}else{let _=c.to-c.from;if(_<e.minSelectionLength||_>200)return Decoration.none;if(e.wholeWords){if(h=s.sliceDoc(c.from,c.to),d=s.charCategorizer(c.head),!(insideWordBoundaries(d,s,c.from,c.to)&&insideWord(d,s,c.from,c.to)))return Decoration.none}else if(h=s.sliceDoc(c.from,c.to).trim(),!h)return Decoration.none}let g=[];for(let _ of o.visibleRanges){let b=new SearchCursor(s.doc,h,_.from,_.to);for(;!b.next().done;){let{from:$,to:j}=b.value;if((!d||insideWordBoundaries(d,s,$,j))&&(c.empty&&$<=c.from&&j>=c.to?g.push(mainMatchDeco.range($,j)):($>=c.to||j<=c.from)&&g.push(matchDeco.range($,j)),g.length>e.maxMatches))return Decoration.none}}return Decoration.set(g)}},{decorations:o=>o.decorations}),defaultTheme=EditorView.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),selectWord=({state:o,dispatch:e})=>{let{selection:s}=o,a=EditorSelection.create(s.ranges.map(c=>o.wordAt(c.head)||EditorSelection.cursor(c.head)),s.mainIndex);return a.eq(s)?!1:(e(o.update({selection:a})),!0)};function findNextOccurrence(o,e){let{main:s,ranges:a}=o.selection,c=o.wordAt(s.head),h=c&&c.from==s.from&&c.to==s.to;for(let d=!1,g=new SearchCursor(o.doc,e,a[a.length-1].to);;)if(g.next(),g.done){if(d)return null;g=new SearchCursor(o.doc,e,0,Math.max(0,a[a.length-1].from-1)),d=!0}else{if(d&&a.some(_=>_.from==g.value.from))continue;if(h){let _=o.wordAt(g.value.from);if(!_||_.from!=g.value.from||_.to!=g.value.to)continue}return g.value}}const selectNextOccurrence=({state:o,dispatch:e})=>{let{ranges:s}=o.selection;if(s.some(h=>h.from===h.to))return selectWord({state:o,dispatch:e});let a=o.sliceDoc(s[0].from,s[0].to);if(o.selection.ranges.some(h=>o.sliceDoc(h.from,h.to)!=a))return!1;let c=findNextOccurrence(o,a);return c?(e(o.update({selection:o.selection.addRange(EditorSelection.range(c.from,c.to),!1),effects:EditorView.scrollIntoView(c.to)})),!0):!1},searchConfigFacet=Facet.define({combine(o){var e;return{top:o.reduce((s,a)=>s!=null?s:a.top,void 0)||!1,caseSensitive:o.reduce((s,a)=>s!=null?s:a.caseSensitive,void 0)||!1,createPanel:((e=o.find(s=>s.createPanel))===null||e===void 0?void 0:e.createPanel)||(s=>new SearchPanel(s))}}});class SearchQuery{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||validRegExp(this.search)),this.unquoted=e.literal?this.search:this.search.replace(/\\([nrt\\])/g,(s,a)=>a=="n"?`
|
||
`:a=="r"?"\r":a=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp}create(){return this.regexp?new RegExpQuery(this):new StringQuery(this)}getCursor(e,s=0,a=e.length){return this.regexp?regexpCursor(this,e,s,a):stringCursor(this,e,s,a)}}class QueryType{constructor(e){this.spec=e}}function stringCursor(o,e,s,a){return new SearchCursor(e,o.unquoted,s,a,o.caseSensitive?void 0:c=>c.toLowerCase())}class StringQuery extends QueryType{constructor(e){super(e)}nextMatch(e,s,a){let c=stringCursor(this.spec,e,a,e.length).nextOverlapping();return c.done&&(c=stringCursor(this.spec,e,0,s).nextOverlapping()),c.done?null:c.value}prevMatchInRange(e,s,a){for(let c=a;;){let h=Math.max(s,c-1e4-this.spec.unquoted.length),d=stringCursor(this.spec,e,h,c),g=null;for(;!d.nextOverlapping().done;)g=d.value;if(g)return g;if(h==s)return null;c-=1e4}}prevMatch(e,s,a){return this.prevMatchInRange(e,0,s)||this.prevMatchInRange(e,a,e.length)}getReplacement(e){return this.spec.replace}matchAll(e,s){let a=stringCursor(this.spec,e,0,e.length),c=[];for(;!a.next().done;){if(c.length>=s)return null;c.push(a.value)}return c}highlight(e,s,a,c){let h=stringCursor(this.spec,e,Math.max(0,s-this.spec.unquoted.length),Math.min(a+this.spec.unquoted.length,e.length));for(;!h.next().done;)c(h.value.from,h.value.to)}}function regexpCursor(o,e,s,a){return new RegExpCursor(e,o.search,o.caseSensitive?void 0:{ignoreCase:!0},s,a)}class RegExpQuery extends QueryType{nextMatch(e,s,a){let c=regexpCursor(this.spec,e,a,e.length).next();return c.done&&(c=regexpCursor(this.spec,e,0,s).next()),c.done?null:c.value}prevMatchInRange(e,s,a){for(let c=1;;c++){let h=Math.max(s,a-c*1e4),d=regexpCursor(this.spec,e,h,a),g=null;for(;!d.next().done;)g=d.value;if(g&&(h==s||g.from>h+10))return g;if(h==s)return null}}prevMatch(e,s,a){return this.prevMatchInRange(e,0,s)||this.prevMatchInRange(e,a,e.length)}getReplacement(e){return this.spec.replace.replace(/\$([$&\d+])/g,(s,a)=>a=="$"?"$":a=="&"?e.match[0]:a!="0"&&+a<e.match.length?e.match[a]:s)}matchAll(e,s){let a=regexpCursor(this.spec,e,0,e.length),c=[];for(;!a.next().done;){if(c.length>=s)return null;c.push(a.value)}return c}highlight(e,s,a,c){let h=regexpCursor(this.spec,e,Math.max(0,s-250),Math.min(a+250,e.length));for(;!h.next().done;)c(h.value.from,h.value.to)}}const setSearchQuery=StateEffect.define(),togglePanel$1=StateEffect.define(),searchState=StateField.define({create(o){return new SearchState(defaultQuery(o).create(),null)},update(o,e){for(let s of e.effects)s.is(setSearchQuery)?o=new SearchState(s.value.create(),o.panel):s.is(togglePanel$1)&&(o=new SearchState(o.query,s.value?createSearchPanel:null));return o},provide:o=>showPanel.from(o,e=>e.panel)});class SearchState{constructor(e,s){this.query=e,this.panel=s}}const matchMark=Decoration.mark({class:"cm-searchMatch"}),selectedMatchMark=Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),searchHighlighter=ViewPlugin.fromClass(class{constructor(o){this.view=o,this.decorations=this.highlight(o.state.field(searchState))}update(o){let e=o.state.field(searchState);(e!=o.startState.field(searchState)||o.docChanged||o.selectionSet||o.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:o,panel:e}){if(!e||!o.spec.valid)return Decoration.none;let{view:s}=this,a=new RangeSetBuilder;for(let c=0,h=s.visibleRanges,d=h.length;c<d;c++){let{from:g,to:_}=h[c];for(;c<d-1&&_>h[c+1].from-2*250;)_=h[++c].to;o.highlight(s.state.doc,g,_,(b,$)=>{let j=s.state.selection.ranges.some(_e=>_e.from==b&&_e.to==$);a.add(b,$,j?selectedMatchMark:matchMark)})}return a.finish()}},{decorations:o=>o.decorations});function searchCommand(o){return e=>{let s=e.state.field(searchState,!1);return s&&s.query.spec.valid?o(e,s):openSearchPanel(e)}}const findNext=searchCommand((o,{query:e})=>{let{to:s}=o.state.selection.main,a=e.nextMatch(o.state.doc,s,s);return a?(o.dispatch({selection:{anchor:a.from,head:a.to},scrollIntoView:!0,effects:announceMatch(o,a),userEvent:"select.search"}),!0):!1}),findPrevious=searchCommand((o,{query:e})=>{let{state:s}=o,{from:a}=s.selection.main,c=e.prevMatch(s.doc,a,a);return c?(o.dispatch({selection:{anchor:c.from,head:c.to},scrollIntoView:!0,effects:announceMatch(o,c),userEvent:"select.search"}),!0):!1}),selectMatches=searchCommand((o,{query:e})=>{let s=e.matchAll(o.state.doc,1e3);return!s||!s.length?!1:(o.dispatch({selection:EditorSelection.create(s.map(a=>EditorSelection.range(a.from,a.to))),userEvent:"select.search.matches"}),!0)}),selectSelectionMatches=({state:o,dispatch:e})=>{let s=o.selection;if(s.ranges.length>1||s.main.empty)return!1;let{from:a,to:c}=s.main,h=[],d=0;for(let g=new SearchCursor(o.doc,o.sliceDoc(a,c));!g.next().done;){if(h.length>1e3)return!1;g.value.from==a&&(d=h.length),h.push(EditorSelection.range(g.value.from,g.value.to))}return e(o.update({selection:EditorSelection.create(h,d),userEvent:"select.search.matches"})),!0},replaceNext=searchCommand((o,{query:e})=>{let{state:s}=o,{from:a,to:c}=s.selection.main;if(s.readOnly)return!1;let h=e.nextMatch(s.doc,a,a);if(!h)return!1;let d=[],g,_,b=[];if(h.from==a&&h.to==c&&(_=s.toText(e.getReplacement(h)),d.push({from:h.from,to:h.to,insert:_}),h=e.nextMatch(s.doc,h.from,h.to),b.push(EditorView.announce.of(s.phrase("replaced match on line $",s.doc.lineAt(a).number)+"."))),h){let $=d.length==0||d[0].from>=h.to?0:h.to-h.from-_.length;g={anchor:h.from-$,head:h.to-$},b.push(announceMatch(o,h))}return o.dispatch({changes:d,selection:g,scrollIntoView:!!g,effects:b,userEvent:"input.replace"}),!0}),replaceAll=searchCommand((o,{query:e})=>{if(o.state.readOnly)return!1;let s=e.matchAll(o.state.doc,1e9).map(c=>{let{from:h,to:d}=c;return{from:h,to:d,insert:e.getReplacement(c)}});if(!s.length)return!1;let a=o.state.phrase("replaced $ matches",s.length)+".";return o.dispatch({changes:s,effects:EditorView.announce.of(a),userEvent:"input.replace.all"}),!0});function createSearchPanel(o){return o.state.facet(searchConfigFacet).createPanel(o)}function defaultQuery(o,e){var s;let a=o.selection.main,c=a.empty||a.to>a.from+100?"":o.sliceDoc(a.from,a.to),h=(s=e==null?void 0:e.caseSensitive)!==null&&s!==void 0?s:o.facet(searchConfigFacet).caseSensitive;return e&&!c?e:new SearchQuery({search:c.replace(/\n/g,"\\n"),caseSensitive:h})}const openSearchPanel=o=>{let e=o.state.field(searchState,!1);if(e&&e.panel){let s=getPanel(o,createSearchPanel);if(!s)return!1;let a=s.dom.querySelector("[main-field]");if(a&&a!=o.root.activeElement){let c=defaultQuery(o.state,e.query.spec);c.valid&&o.dispatch({effects:setSearchQuery.of(c)}),a.focus(),a.select()}}else o.dispatch({effects:[togglePanel$1.of(!0),e?setSearchQuery.of(defaultQuery(o.state,e.query.spec)):StateEffect.appendConfig.of(searchExtensions)]});return!0},closeSearchPanel=o=>{let e=o.state.field(searchState,!1);if(!e||!e.panel)return!1;let s=getPanel(o,createSearchPanel);return s&&s.dom.contains(o.root.activeElement)&&o.focus(),o.dispatch({effects:togglePanel$1.of(!1)}),!0},searchKeymap=[{key:"Mod-f",run:openSearchPanel,scope:"editor search-panel"},{key:"F3",run:findNext,shift:findPrevious,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:findNext,shift:findPrevious,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:closeSearchPanel,scope:"editor search-panel"},{key:"Mod-Shift-l",run:selectSelectionMatches},{key:"Alt-g",run:gotoLine},{key:"Mod-d",run:selectNextOccurrence,preventDefault:!0}];class SearchPanel{constructor(e){this.view=e;let s=this.query=e.state.field(searchState).query.spec;this.commit=this.commit.bind(this),this.searchField=crelt("input",{value:s.search,placeholder:phrase(e,"Find"),"aria-label":phrase(e,"Find"),class:"cm-textfield",name:"search","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=crelt("input",{value:s.replace,placeholder:phrase(e,"Replace"),"aria-label":phrase(e,"Replace"),class:"cm-textfield",name:"replace",onchange:this.commit,onkeyup:this.commit}),this.caseField=crelt("input",{type:"checkbox",name:"case",checked:s.caseSensitive,onchange:this.commit}),this.reField=crelt("input",{type:"checkbox",name:"re",checked:s.regexp,onchange:this.commit});function a(c,h,d){return crelt("button",{class:"cm-button",name:c,onclick:h,type:"button"},d)}this.dom=crelt("div",{onkeydown:c=>this.keydown(c),class:"cm-search"},[this.searchField,a("next",()=>findNext(e),[phrase(e,"next")]),a("prev",()=>findPrevious(e),[phrase(e,"previous")]),a("select",()=>selectMatches(e),[phrase(e,"all")]),crelt("label",null,[this.caseField,phrase(e,"match case")]),crelt("label",null,[this.reField,phrase(e,"regexp")]),...e.state.readOnly?[]:[crelt("br"),this.replaceField,a("replace",()=>replaceNext(e),[phrase(e,"replace")]),a("replaceAll",()=>replaceAll(e),[phrase(e,"replace all")]),crelt("button",{name:"close",onclick:()=>closeSearchPanel(e),"aria-label":phrase(e,"close"),type:"button"},["\xD7"])]])}commit(){let e=new SearchQuery({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:setSearchQuery.of(e)}))}keydown(e){runScopeHandlers(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?findPrevious:findNext)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),replaceNext(this.view))}update(e){for(let s of e.transactions)for(let a of s.effects)a.is(setSearchQuery)&&!a.value.eq(this.query)&&this.setQuery(a.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}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(searchConfigFacet).top}}function phrase(o,e){return o.state.phrase(e)}const AnnounceMargin=30,Break=/[\s\.,:;?!]/;function announceMatch(o,{from:e,to:s}){let a=o.state.doc.lineAt(e),c=o.state.doc.lineAt(s).to,h=Math.max(a.from,e-AnnounceMargin),d=Math.min(c,s+AnnounceMargin),g=o.state.sliceDoc(h,d);if(h!=a.from){for(let _=0;_<AnnounceMargin;_++)if(!Break.test(g[_+1])&&Break.test(g[_])){g=g.slice(_);break}}if(d!=c){for(let _=g.length-1;_>g.length-AnnounceMargin;_--)if(!Break.test(g[_-1])&&Break.test(g[_])){g=g.slice(0,_);break}}return EditorView.announce.of(`${o.state.phrase("current match")}. ${g} ${o.state.phrase("on line")} ${a.number}.`)}const baseTheme$2=EditorView.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"}}),searchExtensions=[searchState,Prec.lowest(searchHighlighter),baseTheme$2];class CompletionContext{constructor(e,s,a){this.state=e,this.pos=s,this.explicit=a,this.abortListeners=[]}tokenBefore(e){let s=syntaxTree(this.state).resolveInner(this.pos,-1);for(;s&&e.indexOf(s.name)<0;)s=s.parent;return s?{from:s.from,to:this.pos,text:this.state.sliceDoc(s.from,this.pos),type:s.type}:null}matchBefore(e){let s=this.state.doc.lineAt(this.pos),a=Math.max(s.from,this.pos-250),c=s.text.slice(a-s.from,this.pos-s.from),h=c.search(ensureAnchor(e,!1));return h<0?null:{from:a+h,to:this.pos,text:c.slice(h)}}get aborted(){return this.abortListeners==null}addEventListener(e,s){e=="abort"&&this.abortListeners&&this.abortListeners.push(s)}}function toSet(o){let e=Object.keys(o).join(""),s=/\w/.test(e);return s&&(e=e.replace(/\w/g,"")),`[${s?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function prefixMatch(o){let e=Object.create(null),s=Object.create(null);for(let{label:c}of o){e[c[0]]=!0;for(let h=1;h<c.length;h++)s[c[h]]=!0}let a=toSet(e)+toSet(s)+"*$";return[new RegExp("^"+a),new RegExp(a)]}function completeFromList(o){let e=o.map(c=>typeof c=="string"?{label:c}:c),[s,a]=e.every(c=>/^\w+$/.test(c.label))?[/\w*$/,/\w+$/]:prefixMatch(e);return c=>{let h=c.matchBefore(a);return h||c.explicit?{from:h?h.from:c.pos,options:e,validFor:s}:null}}function ifNotIn(o,e){return s=>{for(let a=syntaxTree(s.state).resolveInner(s.pos,-1);a;a=a.parent)if(o.indexOf(a.name)>-1)return null;return e(s)}}class Option{constructor(e,s,a){this.completion=e,this.source=s,this.match=a}}function cur(o){return o.selection.main.head}function ensureAnchor(o,e){var s;let{source:a}=o,c=e&&a[0]!="^",h=a[a.length-1]!="$";return!c&&!h?o:new RegExp(`${c?"^":""}(?:${a})${h?"$":""}`,(s=o.flags)!==null&&s!==void 0?s:o.ignoreCase?"i":"")}function insertCompletionText(o,e,s,a){return Object.assign(Object.assign({},o.changeByRange(c=>{if(c==o.selection.main)return{changes:{from:s,to:a,insert:e},range:EditorSelection.cursor(s+e.length)};let h=a-s;return!c.empty||h&&o.sliceDoc(c.from-h,c.from)!=o.sliceDoc(s,a)?{range:c}:{changes:{from:c.from-h,to:c.from,insert:e},range:EditorSelection.cursor(c.from-h+e.length)}})),{userEvent:"input.complete"})}function applyCompletion(o,e){const s=e.completion.apply||e.completion.label;let a=e.source;typeof s=="string"?o.dispatch(insertCompletionText(o.state,s,a.from,a.to)):s(o,e.completion,a.from,a.to)}const SourceCache=new WeakMap;function asSource(o){if(!Array.isArray(o))return o;let e=SourceCache.get(o);return e||SourceCache.set(o,e=completeFromList(o)),e}class FuzzyMatcher{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let s=0;s<e.length;){let a=codePointAt(e,s),c=codePointSize(a);this.chars.push(a);let h=e.slice(s,s+c),d=h.toUpperCase();this.folded.push(codePointAt(d==h?h.toLowerCase():d,0)),s+=c}this.astral=e.length!=this.chars.length}match(e){if(this.pattern.length==0)return[0];if(e.length<this.pattern.length)return null;let{chars:s,folded:a,any:c,precise:h,byWord:d}=this;if(s.length==1){let it=codePointAt(e,0);return it==s[0]?[0,0,codePointSize(it)]:it==a[0]?[-200,0,codePointSize(it)]:null}let g=e.indexOf(this.pattern);if(g==0)return[0,0,this.pattern.length];let _=s.length,b=0;if(g<0){for(let it=0,at=Math.min(e.length,200);it<at&&b<_;){let ot=codePointAt(e,it);(ot==s[b]||ot==a[b])&&(c[b++]=it),it+=codePointSize(ot)}if(b<_)return null}let $=0,j=0,_e=!1,et=0,tt=-1,nt=-1,st=/[a-z]/.test(e),rt=!0;for(let it=0,at=Math.min(e.length,200),ot=0;it<at&&j<_;){let ut=codePointAt(e,it);g<0&&($<_&&ut==s[$]&&(h[$++]=it),et<_&&(ut==s[et]||ut==a[et]?(et==0&&(tt=it),nt=it+1,et++):et=0));let ct,ht=ut<255?ut>=48&&ut<=57||ut>=97&&ut<=122?2:ut>=65&&ut<=90?1:0:(ct=fromCodePoint(ut))!=ct.toLowerCase()?1:ct!=ct.toUpperCase()?2:0;(!it||ht==1&&st||ot==0&&ht!=0)&&(s[j]==ut||a[j]==ut&&(_e=!0)?d[j++]=it:d.length&&(rt=!1)),ot=ht,it+=codePointSize(ut)}return j==_&&d[0]==0&&rt?this.result(-100+(_e?-200:0),d,e):et==_&&tt==0?[-200-e.length,0,nt]:g>-1?[-700-e.length,g,g+this.pattern.length]:et==_?[-200+-700-e.length,tt,nt]:j==_?this.result(-100+(_e?-200:0)+-700+(rt?0:-1100),d,e):s.length==2?null:this.result((c[0]?-700:0)+-200+-1100,c,e)}result(e,s,a){let c=[e-a.length],h=1;for(let d of s){let g=d+(this.astral?codePointSize(codePointAt(a,d)):1);h>1&&c[h-1]==d?c[h-1]=g:(c[h++]=d,c[h++]=g)}return c}}const completionConfig=Facet.define({combine(o){return combineConfig(o,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,s)=>e.label.localeCompare(s.label)},{defaultKeymap:(e,s)=>e&&s,closeOnBlur:(e,s)=>e&&s,icons:(e,s)=>e&&s,optionClass:(e,s)=>a=>joinClass(e(a),s(a)),addToOptions:(e,s)=>e.concat(s)})}});function joinClass(o,e){return o?e?o+" "+e:o:e}function optionContent(o){let e=o.addToOptions.slice();return o.icons&&e.push({render(s){let a=document.createElement("div");return a.classList.add("cm-completionIcon"),s.type&&a.classList.add(...s.type.split(/\s+/g).map(c=>"cm-completionIcon-"+c)),a.setAttribute("aria-hidden","true"),a},position:20}),e.push({render(s,a,c){let h=document.createElement("span");h.className="cm-completionLabel";let{label:d}=s,g=0;for(let _=1;_<c.length;){let b=c[_++],$=c[_++];b>g&&h.appendChild(document.createTextNode(d.slice(g,b)));let j=h.appendChild(document.createElement("span"));j.appendChild(document.createTextNode(d.slice(b,$))),j.className="cm-completionMatchedText",g=$}return g<d.length&&h.appendChild(document.createTextNode(d.slice(g))),h},position:50},{render(s){if(!s.detail)return null;let a=document.createElement("span");return a.className="cm-completionDetail",a.textContent=s.detail,a},position:80}),e.sort((s,a)=>s.position-a.position).map(s=>s.render)}function rangeAroundSelected(o,e,s){if(o<=s)return{from:0,to:o};if(e<0&&(e=0),e<=o>>1){let c=Math.floor(e/s);return{from:c*s,to:(c+1)*s}}let a=Math.floor((o-e)/s);return{from:o-(a+1)*s,to:o-a*s}}class CompletionTooltip{constructor(e,s){this.view=e,this.stateField=s,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:g=>this.positionInfo(g),key:this};let a=e.state.field(s),{options:c,selected:h}=a.open,d=e.state.facet(completionConfig);this.optionContent=optionContent(d),this.optionClass=d.optionClass,this.range=rangeAroundSelected(c.length,h,d.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",g=>{for(let _=g.target,b;_&&_!=this.dom;_=_.parentNode)if(_.nodeName=="LI"&&(b=/-(\d+)$/.exec(_.id))&&+b[1]<c.length){applyCompletion(e,c[+b[1]]),g.preventDefault();return}}),this.list=this.dom.appendChild(this.createListBox(c,a.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(e){e.state.field(this.stateField)!=e.startState.field(this.stateField)&&this.updateSel()}positioned(){this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),s=e.open;if((s.selected<this.range.from||s.selected>=this.range.to)&&(this.range=rangeAroundSelected(s.options.length,s.selected,this.view.state.facet(completionConfig).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(s.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(s.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:a}=s.options[s.selected],{info:c}=a;if(!c)return;let h=typeof c=="string"?document.createTextNode(c):c(a);if(!h)return;"then"in h?h.then(d=>{d&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(d)}).catch(d=>logException(this.view.state,d,"completion info")):this.addInfoPane(h)}}addInfoPane(e){let s=this.info=document.createElement("div");s.className="cm-tooltip cm-completionInfo",s.appendChild(e),this.dom.appendChild(s),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let s=null;for(let a=this.list.firstChild,c=this.range.from;a;a=a.nextSibling,c++)c==e?a.hasAttribute("aria-selected")||(a.setAttribute("aria-selected","true"),s=a):a.hasAttribute("aria-selected")&&a.removeAttribute("aria-selected");return s&&scrollIntoView(this.list,s),s}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let s=this.dom.getBoundingClientRect(),a=this.info.getBoundingClientRect(),c=e.getBoundingClientRect();if(c.top>Math.min(innerHeight,s.bottom)-10||c.bottom<Math.max(0,s.top)+10)return null;let h=Math.max(0,Math.min(c.top,innerHeight-a.height))-s.top,d=this.view.textDirection==Direction.RTL,g=s.left,_=innerWidth-s.right;return d&&g<Math.min(a.width,_)?d=!1:!d&&_<Math.min(a.width,g)&&(d=!0),{top:h,left:d}}positionInfo(e){this.info&&(this.info.style.top=(e?e.top:-1e6)+"px",e&&(this.info.classList.toggle("cm-completionInfo-left",e.left),this.info.classList.toggle("cm-completionInfo-right",!e.left)))}createListBox(e,s,a){const c=document.createElement("ul");c.id=s,c.setAttribute("role","listbox"),c.setAttribute("aria-expanded","true"),c.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let h=a.from;h<a.to;h++){let{completion:d,match:g}=e[h];const _=c.appendChild(document.createElement("li"));_.id=s+"-"+h,_.setAttribute("role","option");let b=this.optionClass(d);b&&(_.className=b);for(let $ of this.optionContent){let j=$(d,this.view.state,g);j&&_.appendChild(j)}}return a.from&&c.classList.add("cm-completionListIncompleteTop"),a.to<e.length&&c.classList.add("cm-completionListIncompleteBottom"),c}}function completionTooltip(o){return e=>new CompletionTooltip(e,o)}function scrollIntoView(o,e){let s=o.getBoundingClientRect(),a=e.getBoundingClientRect();a.top<s.top?o.scrollTop-=s.top-a.top:a.bottom>s.bottom&&(o.scrollTop+=a.bottom-s.bottom)}function score(o){return(o.boost||0)*100+(o.apply?10:0)+(o.info?5:0)+(o.type?1:0)}function sortOptions(o,e){let s=[],a=0;for(let g of o)if(g.hasResult())if(g.result.filter===!1){let _=g.result.getMatch;for(let b of g.result.options){let $=[1e9-a++];if(_)for(let j of _(b))$.push(j);s.push(new Option(b,g,$))}}else{let _=new FuzzyMatcher(e.sliceDoc(g.from,g.to)),b;for(let $ of g.result.options)(b=_.match($.label))&&($.boost!=null&&(b[0]+=$.boost),s.push(new Option($,g,b)))}let c=[],h=null,d=e.facet(completionConfig).compareCompletions;for(let g of s.sort((_,b)=>b.match[0]-_.match[0]||d(_.completion,b.completion)))!h||h.label!=g.completion.label||h.detail!=g.completion.detail||h.type!=null&&g.completion.type!=null&&h.type!=g.completion.type||h.apply!=g.completion.apply?c.push(g):score(g.completion)>score(h)&&(c[c.length-1]=g),h=g.completion;return c}class CompletionDialog{constructor(e,s,a,c,h){this.options=e,this.attrs=s,this.tooltip=a,this.timestamp=c,this.selected=h}setSelected(e,s){return e==this.selected||e>=this.options.length?this:new CompletionDialog(this.options,makeAttrs(s,e),this.tooltip,this.timestamp,e)}static build(e,s,a,c,h){let d=sortOptions(e,s);if(!d.length)return null;let g=s.facet(completionConfig).selectOnOpen?0:-1;if(c&&c.selected!=g&&c.selected!=-1){let _=c.options[c.selected].completion;for(let b=0;b<d.length;b++)if(d[b].completion==_){g=b;break}}return new CompletionDialog(d,makeAttrs(a,g),{pos:e.reduce((_,b)=>b.hasResult()?Math.min(_,b.from):_,1e8),create:completionTooltip(completionState),above:h.aboveCursor},c?c.timestamp:Date.now(),g)}map(e){return new CompletionDialog(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}class CompletionState{constructor(e,s,a){this.active=e,this.id=s,this.open=a}static start(){return new CompletionState(none,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:s}=e,a=s.facet(completionConfig),h=(a.override||s.languageDataAt("autocomplete",cur(s)).map(asSource)).map(g=>(this.active.find(b=>b.source==g)||new ActiveSource(g,this.active.some(b=>b.state!=0)?1:0)).update(e,a));h.length==this.active.length&&h.every((g,_)=>g==this.active[_])&&(h=this.active);let d=e.selection||h.some(g=>g.hasResult()&&e.changes.touchesRange(g.from,g.to))||!sameResults(h,this.active)?CompletionDialog.build(h,s,this.id,this.open,a):this.open&&e.docChanged?this.open.map(e.changes):this.open;!d&&h.every(g=>g.state!=1)&&h.some(g=>g.hasResult())&&(h=h.map(g=>g.hasResult()?new ActiveSource(g.source,0):g));for(let g of e.effects)g.is(setSelectedEffect)&&(d=d&&d.setSelected(g.value,this.id));return h==this.active&&d==this.open?this:new CompletionState(h,this.id,d)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:baseAttrs}}function sameResults(o,e){if(o==e)return!0;for(let s=0,a=0;;){for(;s<o.length&&!o[s].hasResult;)s++;for(;a<e.length&&!e[a].hasResult;)a++;let c=s==o.length,h=a==e.length;if(c||h)return c==h;if(o[s++].result!=e[a++].result)return!1}}const baseAttrs={"aria-autocomplete":"list"};function makeAttrs(o,e){let s={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":o};return e>-1&&(s["aria-activedescendant"]=o+"-"+e),s}const none=[];function getUserEvent(o){return o.isUserEvent("input.type")?"input":o.isUserEvent("delete.backward")?"delete":null}class ActiveSource{constructor(e,s,a=-1){this.source=e,this.state=s,this.explicitPos=a}hasResult(){return!1}update(e,s){let a=getUserEvent(e),c=this;a?c=c.handleUserEvent(e,a,s):e.docChanged?c=c.handleChange(e):e.selection&&c.state!=0&&(c=new ActiveSource(c.source,0));for(let h of e.effects)if(h.is(startCompletionEffect))c=new ActiveSource(c.source,1,h.value?cur(e.state):-1);else if(h.is(closeCompletionEffect))c=new ActiveSource(c.source,0);else if(h.is(setActiveEffect))for(let d of h.value)d.source==c.source&&(c=d);return c}handleUserEvent(e,s,a){return s=="delete"||!a.activateOnTyping?this.map(e.changes):new ActiveSource(this.source,1)}handleChange(e){return e.changes.touchesRange(cur(e.startState))?new ActiveSource(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ActiveSource(this.source,this.state,e.mapPos(this.explicitPos))}}class ActiveResult extends ActiveSource{constructor(e,s,a,c,h){super(e,2,s),this.result=a,this.from=c,this.to=h}hasResult(){return!0}handleUserEvent(e,s,a){var c;let h=e.changes.mapPos(this.from),d=e.changes.mapPos(this.to,1),g=cur(e.state);if((this.explicitPos<0?g<=h:g<this.from)||g>d||s=="delete"&&cur(e.startState)==this.from)return new ActiveSource(this.source,s=="input"&&a.activateOnTyping?1:0);let _=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),b;return checkValid(this.result.validFor,e.state,h,d)?new ActiveResult(this.source,_,this.result,h,d):this.result.update&&(b=this.result.update(this.result,h,d,new CompletionContext(e.state,g,_>=0)))?new ActiveResult(this.source,_,b,b.from,(c=b.to)!==null&&c!==void 0?c:cur(e.state)):new ActiveSource(this.source,1,_)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new ActiveSource(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new ActiveResult(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function checkValid(o,e,s,a){if(!o)return!1;let c=e.sliceDoc(s,a);return typeof o=="function"?o(c,s,a,e):ensureAnchor(o,!0).test(c)}const startCompletionEffect=StateEffect.define(),closeCompletionEffect=StateEffect.define(),setActiveEffect=StateEffect.define({map(o,e){return o.map(s=>s.map(e))}}),setSelectedEffect=StateEffect.define(),completionState=StateField.define({create(){return CompletionState.start()},update(o,e){return o.update(e)},provide:o=>[showTooltip.from(o,e=>e.tooltip),EditorView.contentAttributes.from(o,e=>e.attrs)]}),CompletionInteractMargin=75;function moveCompletionSelection(o,e="option"){return s=>{let a=s.state.field(completionState,!1);if(!a||!a.open||Date.now()-a.open.timestamp<CompletionInteractMargin)return!1;let c=1,h;e=="page"&&(h=getTooltip(s,a.open.tooltip))&&(c=Math.max(2,Math.floor(h.dom.offsetHeight/h.dom.querySelector("li").offsetHeight)-1));let{length:d}=a.open.options,g=a.open.selected>-1?a.open.selected+c*(o?1:-1):o?0:d-1;return g<0?g=e=="page"?0:d-1:g>=d&&(g=e=="page"?d-1:0),s.dispatch({effects:setSelectedEffect.of(g)}),!0}}const acceptCompletion=o=>{let e=o.state.field(completionState,!1);return o.state.readOnly||!e||!e.open||Date.now()-e.open.timestamp<CompletionInteractMargin||e.open.selected<0?!1:(applyCompletion(o,e.open.options[e.open.selected]),!0)},startCompletion=o=>o.state.field(completionState,!1)?(o.dispatch({effects:startCompletionEffect.of(!0)}),!0):!1,closeCompletion=o=>{let e=o.state.field(completionState,!1);return!e||!e.active.some(s=>s.state!=0)?!1:(o.dispatch({effects:closeCompletionEffect.of(null)}),!0)};class RunningQuery{constructor(e,s){this.active=e,this.context=s,this.time=Date.now(),this.updates=[],this.done=void 0}}const DebounceTime=50,MaxUpdateCount=50,MinAbortTime=1e3,completionPlugin=ViewPlugin.fromClass(class{constructor(o){this.view=o,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of o.state.field(completionState).active)e.state==1&&this.startQuery(e)}update(o){let e=o.state.field(completionState);if(!o.selectionSet&&!o.docChanged&&o.startState.field(completionState)==e)return;let s=o.transactions.some(a=>(a.selection||a.docChanged)&&!getUserEvent(a));for(let a=0;a<this.running.length;a++){let c=this.running[a];if(s||c.updates.length+o.transactions.length>MaxUpdateCount&&Date.now()-c.time>MinAbortTime){for(let h of c.context.abortListeners)try{h()}catch(d){logException(this.view.state,d)}c.context.abortListeners=null,this.running.splice(a--,1)}else c.updates.push(...o.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(a=>a.state==1&&!this.running.some(c=>c.active.source==a.source))?setTimeout(()=>this.startUpdate(),DebounceTime):-1,this.composing!=0)for(let a of o.transactions)getUserEvent(a)=="input"?this.composing=2:this.composing==2&&a.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:o}=this.view,e=o.field(completionState);for(let s of e.active)s.state==1&&!this.running.some(a=>a.active.source==s.source)&&this.startQuery(s)}startQuery(o){let{state:e}=this.view,s=cur(e),a=new CompletionContext(e,s,o.explicitPos==s),c=new RunningQuery(o,a);this.running.push(c),Promise.resolve(o.source(a)).then(h=>{c.context.aborted||(c.done=h||null,this.scheduleAccept())},h=>{this.view.dispatch({effects:closeCompletionEffect.of(null)}),logException(this.view.state,h)})}scheduleAccept(){this.running.every(o=>o.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),DebounceTime))}accept(){var o;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],s=this.view.state.facet(completionConfig);for(let a=0;a<this.running.length;a++){let c=this.running[a];if(c.done===void 0)continue;if(this.running.splice(a--,1),c.done){let d=new ActiveResult(c.active.source,c.active.explicitPos,c.done,c.done.from,(o=c.done.to)!==null&&o!==void 0?o:cur(c.updates.length?c.updates[0].startState:this.view.state));for(let g of c.updates)d=d.update(g,s);if(d.hasResult()){e.push(d);continue}}let h=this.view.state.field(completionState).active.find(d=>d.source==c.active.source);if(h&&h.state==1)if(c.done==null){let d=new ActiveSource(c.active.source,0);for(let g of c.updates)d=d.update(g,s);d.state!=1&&e.push(d)}else this.startQuery(h)}e.length&&this.view.dispatch({effects:setActiveEffect.of(e)})}},{eventHandlers:{blur(){let o=this.view.state.field(completionState,!1);o&&o.tooltip&&this.view.state.facet(completionConfig).closeOnBlur&&this.view.dispatch({effects:closeCompletionEffect.of(null)})},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:startCompletionEffect.of(!1)}),20),this.composing=0}}}),baseTheme$1=EditorView.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",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",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"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FieldPos{constructor(e,s,a,c){this.field=e,this.line=s,this.from=a,this.to=c}}class FieldRange{constructor(e,s,a){this.field=e,this.from=s,this.to=a}map(e){let s=e.mapPos(this.from,-1,MapMode.TrackDel),a=e.mapPos(this.to,1,MapMode.TrackDel);return s==null||a==null?null:new FieldRange(this.field,s,a)}}class Snippet{constructor(e,s){this.lines=e,this.fieldPositions=s}instantiate(e,s){let a=[],c=[s],h=e.doc.lineAt(s),d=/^\s*/.exec(h.text)[0];for(let _ of this.lines){if(a.length){let b=d,$=/^\t*/.exec(_)[0].length;for(let j=0;j<$;j++)b+=e.facet(indentUnit);c.push(s+b.length-$),_=b+_.slice($)}a.push(_),s+=_.length+1}let g=this.fieldPositions.map(_=>new FieldRange(_.field,c[_.line]+_.from,c[_.line]+_.to));return{text:a,ranges:g}}static parse(e){let s=[],a=[],c=[],h;for(let d of e.split(/\r\n?|\n/)){for(;h=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(d);){let g=h[1]?+h[1]:null,_=h[2]||h[3]||"",b=-1;for(let $=0;$<s.length;$++)(g!=null?s[$].seq==g:_?s[$].name==_:!1)&&(b=$);if(b<0){let $=0;for(;$<s.length&&(g==null||s[$].seq!=null&&s[$].seq<g);)$++;s.splice($,0,{seq:g,name:_}),b=$;for(let j of c)j.field>=b&&j.field++}c.push(new FieldPos(b,a.length,h.index,h.index+_.length)),d=d.slice(0,h.index)+_+d.slice(h.index+h[0].length)}for(let g;g=/([$#])\\{/.exec(d);){d=d.slice(0,g.index)+g[1]+"{"+d.slice(g.index+g[0].length);for(let _ of c)_.line==a.length&&_.from>g.index&&(_.from--,_.to--)}a.push(d)}return new Snippet(a,c)}}let fieldMarker=Decoration.widget({widget:new class extends WidgetType{toDOM(){let o=document.createElement("span");return o.className="cm-snippetFieldPosition",o}ignoreEvent(){return!1}}}),fieldRange=Decoration.mark({class:"cm-snippetField"});class ActiveSnippet{constructor(e,s){this.ranges=e,this.active=s,this.deco=Decoration.set(e.map(a=>(a.from==a.to?fieldMarker:fieldRange).range(a.from,a.to)))}map(e){let s=[];for(let a of this.ranges){let c=a.map(e);if(!c)return null;s.push(c)}return new ActiveSnippet(s,this.active)}selectionInsideField(e){return e.ranges.every(s=>this.ranges.some(a=>a.field==this.active&&a.from<=s.from&&a.to>=s.to))}}const setActive=StateEffect.define({map(o,e){return o&&o.map(e)}}),moveToField=StateEffect.define(),snippetState=StateField.define({create(){return null},update(o,e){for(let s of e.effects){if(s.is(setActive))return s.value;if(s.is(moveToField)&&o)return new ActiveSnippet(o.ranges,s.value)}return o&&e.docChanged&&(o=o.map(e.changes)),o&&e.selection&&!o.selectionInsideField(e.selection)&&(o=null),o},provide:o=>EditorView.decorations.from(o,e=>e?e.deco:Decoration.none)});function fieldSelection(o,e){return EditorSelection.create(o.filter(s=>s.field==e).map(s=>EditorSelection.range(s.from,s.to)))}function snippet(o){let e=Snippet.parse(o);return(s,a,c,h)=>{let{text:d,ranges:g}=e.instantiate(s.state,c),_={changes:{from:c,to:h,insert:Text.of(d)},scrollIntoView:!0};if(g.length&&(_.selection=fieldSelection(g,0)),g.length>1){let b=new ActiveSnippet(g,0),$=_.effects=[setActive.of(b)];s.state.field(snippetState,!1)===void 0&&$.push(StateEffect.appendConfig.of([snippetState,addSnippetKeymap,snippetPointerHandler,baseTheme$1]))}s.dispatch(s.state.update(_))}}function moveField(o){return({state:e,dispatch:s})=>{let a=e.field(snippetState,!1);if(!a||o<0&&a.active==0)return!1;let c=a.active+o,h=o>0&&!a.ranges.some(d=>d.field==c+o);return s(e.update({selection:fieldSelection(a.ranges,c),effects:setActive.of(h?null:new ActiveSnippet(a.ranges,c))})),!0}}const clearSnippet=({state:o,dispatch:e})=>o.field(snippetState,!1)?(e(o.update({effects:setActive.of(null)})),!0):!1,nextSnippetField=moveField(1),prevSnippetField=moveField(-1),defaultSnippetKeymap=[{key:"Tab",run:nextSnippetField,shift:prevSnippetField},{key:"Escape",run:clearSnippet}],snippetKeymap=Facet.define({combine(o){return o.length?o[0]:defaultSnippetKeymap}}),addSnippetKeymap=Prec.highest(keymap.compute([snippetKeymap],o=>o.facet(snippetKeymap)));function snippetCompletion(o,e){return Object.assign(Object.assign({},e),{apply:snippet(o)})}const snippetPointerHandler=EditorView.domEventHandlers({mousedown(o,e){let s=e.state.field(snippetState,!1),a;if(!s||(a=e.posAtCoords({x:o.clientX,y:o.clientY}))==null)return!1;let c=s.ranges.find(h=>h.from<=a&&h.to>=a);return!c||c.field==s.active?!1:(e.dispatch({selection:fieldSelection(s.ranges,c.field),effects:setActive.of(s.ranges.some(h=>h.field>c.field)?new ActiveSnippet(s.ranges,c.field):null)}),!0)}}),defaults={brackets:["(","[","{","'",'"'],before:")]}:;>"},closeBracketEffect=StateEffect.define({map(o,e){let s=e.mapPos(o,-1,MapMode.TrackAfter);return s==null?void 0:s}}),skipBracketEffect=StateEffect.define({map(o,e){return e.mapPos(o)}}),closedBracket=new class extends RangeValue{};closedBracket.startSide=1;closedBracket.endSide=-1;const bracketState=StateField.define({create(){return RangeSet.empty},update(o,e){if(e.selection){let s=e.state.doc.lineAt(e.selection.main.head).from,a=e.startState.doc.lineAt(e.startState.selection.main.head).from;s!=e.changes.mapPos(a,-1)&&(o=RangeSet.empty)}o=o.map(e.changes);for(let s of e.effects)s.is(closeBracketEffect)?o=o.update({add:[closedBracket.range(s.value,s.value+1)]}):s.is(skipBracketEffect)&&(o=o.update({filter:a=>a!=s.value}));return o}});function closeBrackets(){return[inputHandler,bracketState]}const definedClosing="()[]{}<>";function closing(o){for(let e=0;e<definedClosing.length;e+=2)if(definedClosing.charCodeAt(e)==o)return definedClosing.charAt(e+1);return fromCodePoint(o<128?o:o+1)}function config(o,e){return o.languageDataAt("closeBrackets",e)[0]||defaults}const android$1=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),inputHandler=EditorView.inputHandler.of((o,e,s,a)=>{if((android$1?o.composing:o.compositionStarted)||o.state.readOnly)return!1;let c=o.state.selection.main;if(a.length>2||a.length==2&&codePointSize(codePointAt(a,0))==1||e!=c.from||s!=c.to)return!1;let h=insertBracket(o.state,a);return h?(o.dispatch(h),!0):!1}),deleteBracketPair=({state:o,dispatch:e})=>{if(o.readOnly)return!1;let a=config(o,o.selection.main.head).brackets||defaults.brackets,c=null,h=o.changeByRange(d=>{if(d.empty){let g=prevChar(o.doc,d.head);for(let _ of a)if(_==g&&nextChar(o.doc,d.head)==closing(codePointAt(_,0)))return{changes:{from:d.head-_.length,to:d.head+_.length},range:EditorSelection.cursor(d.head-_.length),userEvent:"delete.backward"}}return{range:c=d}});return c||e(o.update(h,{scrollIntoView:!0})),!c},closeBracketsKeymap=[{key:"Backspace",run:deleteBracketPair}];function insertBracket(o,e){let s=config(o,o.selection.main.head),a=s.brackets||defaults.brackets;for(let c of a){let h=closing(codePointAt(c,0));if(e==c)return h==c?handleSame(o,c,a.indexOf(c+c+c)>-1):handleOpen(o,c,h,s.before||defaults.before);if(e==h&&closedBracketAt(o,o.selection.main.from))return handleClose(o,c,h)}return null}function closedBracketAt(o,e){let s=!1;return o.field(bracketState).between(0,o.doc.length,a=>{a==e&&(s=!0)}),s}function nextChar(o,e){let s=o.sliceString(e,e+2);return s.slice(0,codePointSize(codePointAt(s,0)))}function prevChar(o,e){let s=o.sliceString(e-2,e);return codePointSize(codePointAt(s,0))==s.length?s:s.slice(1)}function handleOpen(o,e,s,a){let c=null,h=o.changeByRange(d=>{if(!d.empty)return{changes:[{insert:e,from:d.from},{insert:s,from:d.to}],effects:closeBracketEffect.of(d.to+e.length),range:EditorSelection.range(d.anchor+e.length,d.head+e.length)};let g=nextChar(o.doc,d.head);return!g||/\s/.test(g)||a.indexOf(g)>-1?{changes:{insert:e+s,from:d.head},effects:closeBracketEffect.of(d.head+e.length),range:EditorSelection.cursor(d.head+e.length)}:{range:c=d}});return c?null:o.update(h,{scrollIntoView:!0,userEvent:"input.type"})}function handleClose(o,e,s){let a=null,c=o.selection.ranges.map(h=>h.empty&&nextChar(o.doc,h.head)==s?EditorSelection.cursor(h.head+s.length):a=h);return a?null:o.update({selection:EditorSelection.create(c,o.selection.mainIndex),scrollIntoView:!0,effects:o.selection.ranges.map(({from:h})=>skipBracketEffect.of(h))})}function handleSame(o,e,s){let a=null,c=o.changeByRange(h=>{if(!h.empty)return{changes:[{insert:e,from:h.from},{insert:e,from:h.to}],effects:closeBracketEffect.of(h.to+e.length),range:EditorSelection.range(h.anchor+e.length,h.head+e.length)};let d=h.head,g=nextChar(o.doc,d);if(g==e){if(nodeStart(o,d))return{changes:{insert:e+e,from:d},effects:closeBracketEffect.of(d+e.length),range:EditorSelection.cursor(d+e.length)};if(closedBracketAt(o,d)){let _=s&&o.sliceDoc(d,d+e.length*3)==e+e+e;return{range:EditorSelection.cursor(d+e.length*(_?3:1)),effects:skipBracketEffect.of(d)}}}else{if(s&&o.sliceDoc(d-2*e.length,d)==e+e&&nodeStart(o,d-2*e.length))return{changes:{insert:e+e+e+e,from:d},effects:closeBracketEffect.of(d+e.length),range:EditorSelection.cursor(d+e.length)};if(o.charCategorizer(d)(g)!=CharCategory.Word){let _=o.sliceDoc(d-1,d);if(_!=e&&o.charCategorizer(d)(_)!=CharCategory.Word&&!probablyInString(o,d,e))return{changes:{insert:e+e,from:d},effects:closeBracketEffect.of(d+e.length),range:EditorSelection.cursor(d+e.length)}}}return{range:a=h}});return a?null:o.update(c,{scrollIntoView:!0,userEvent:"input.type"})}function nodeStart(o,e){let s=syntaxTree(o).resolveInner(e+1);return s.parent&&s.from==e}function probablyInString(o,e,s){let a=syntaxTree(o).resolveInner(e,-1);for(let c=0;c<5;c++){if(o.sliceDoc(a.from,a.from+s.length)==s){let d=a.firstChild;for(;d&&d.from==a.from&&d.to-d.from>s.length;){if(o.sliceDoc(d.to-s.length,d.to)==s)return!1;d=d.firstChild}return!0}let h=a.to==e&&a.parent;if(!h)break;a=h}return!1}function autocompletion(o={}){return[completionState,completionConfig.of(o),completionPlugin,completionKeymapExt,baseTheme$1]}const completionKeymap=[{key:"Ctrl-Space",run:startCompletion},{key:"Escape",run:closeCompletion},{key:"ArrowDown",run:moveCompletionSelection(!0)},{key:"ArrowUp",run:moveCompletionSelection(!1)},{key:"PageDown",run:moveCompletionSelection(!0,"page")},{key:"PageUp",run:moveCompletionSelection(!1,"page")},{key:"Enter",run:acceptCompletion}],completionKeymapExt=Prec.highest(keymap.computeN([completionConfig],o=>o.facet(completionConfig).defaultKeymap?[completionKeymap]:[]));class SelectedDiagnostic{constructor(e,s,a){this.from=e,this.to=s,this.diagnostic=a}}class LintState{constructor(e,s,a){this.diagnostics=e,this.panel=s,this.selected=a}static init(e,s,a){let c=e,h=a.facet(lintConfig).markerFilter;h&&(c=h(c));let d=Decoration.set(c.map(g=>g.from==g.to||g.from==g.to-1&&a.doc.lineAt(g.from).to==g.from?Decoration.widget({widget:new DiagnosticWidget(g),diagnostic:g}).range(g.from):Decoration.mark({attributes:{class:"cm-lintRange cm-lintRange-"+g.severity},diagnostic:g}).range(g.from,g.to)),!0);return new LintState(d,s,findDiagnostic(d))}}function findDiagnostic(o,e=null,s=0){let a=null;return o.between(s,1e9,(c,h,{spec:d})=>{if(!(e&&d.diagnostic!=e))return a=new SelectedDiagnostic(c,h,d.diagnostic),!1}),a}function hideTooltip(o,e){return!!(o.effects.some(s=>s.is(setDiagnosticsEffect))||o.changes.touchesRange(e.pos))}function maybeEnableLint(o,e){return o.field(lintState,!1)?e:e.concat(StateEffect.appendConfig.of([lintState,EditorView.decorations.compute([lintState],s=>{let{selected:a,panel:c}=s.field(lintState);return!a||!c||a.from==a.to?Decoration.none:Decoration.set([activeMark.range(a.from,a.to)])}),hoverTooltip(lintTooltip,{hideOn:hideTooltip}),baseTheme]))}function setDiagnostics(o,e){return{effects:maybeEnableLint(o,[setDiagnosticsEffect.of(e)])}}const setDiagnosticsEffect=StateEffect.define(),togglePanel=StateEffect.define(),movePanelSelection=StateEffect.define(),lintState=StateField.define({create(){return new LintState(Decoration.none,null,null)},update(o,e){if(e.docChanged){let s=o.diagnostics.map(e.changes),a=null;if(o.selected){let c=e.changes.mapPos(o.selected.from,1);a=findDiagnostic(s,o.selected.diagnostic,c)||findDiagnostic(s,null,c)}o=new LintState(s,o.panel,a)}for(let s of e.effects)s.is(setDiagnosticsEffect)?o=LintState.init(s.value,o.panel,e.state):s.is(togglePanel)?o=new LintState(o.diagnostics,s.value?LintPanel.open:null,o.selected):s.is(movePanelSelection)&&(o=new LintState(o.diagnostics,o.panel,s.value));return o},provide:o=>[showPanel.from(o,e=>e.panel),EditorView.decorations.from(o,e=>e.diagnostics)]}),activeMark=Decoration.mark({class:"cm-lintRange cm-lintRange-active"});function lintTooltip(o,e,s){let{diagnostics:a}=o.state.field(lintState),c=[],h=2e8,d=0;a.between(e-(s<0?1:0),e+(s>0?1:0),(_,b,{spec:$})=>{e>=_&&e<=b&&(_==b||(e>_||s>0)&&(e<b||s<0))&&(c.push($.diagnostic),h=Math.min(_,h),d=Math.max(b,d))});let g=o.state.facet(lintConfig).tooltipFilter;return g&&(c=g(c)),c.length?{pos:h,end:d,above:o.state.doc.lineAt(h).to<d,create(){return{dom:diagnosticsTooltip(o,c)}}}:null}function diagnosticsTooltip(o,e){return crelt("ul",{class:"cm-tooltip-lint"},e.map(s=>renderDiagnostic(o,s,!1)))}const openLintPanel=o=>{let e=o.state.field(lintState,!1);(!e||!e.panel)&&o.dispatch({effects:maybeEnableLint(o.state,[togglePanel.of(!0)])});let s=getPanel(o,LintPanel.open);return s&&s.dom.querySelector(".cm-panel-lint ul").focus(),!0},closeLintPanel=o=>{let e=o.state.field(lintState,!1);return!e||!e.panel?!1:(o.dispatch({effects:togglePanel.of(!1)}),!0)},nextDiagnostic=o=>{let e=o.state.field(lintState,!1);if(!e)return!1;let s=o.state.selection.main,a=e.diagnostics.iter(s.to+1);return!a.value&&(a=e.diagnostics.iter(0),!a.value||a.from==s.from&&a.to==s.to)?!1:(o.dispatch({selection:{anchor:a.from,head:a.to},scrollIntoView:!0}),!0)},lintKeymap=[{key:"Mod-Shift-m",run:openLintPanel},{key:"F8",run:nextDiagnostic}],lintPlugin=ViewPlugin.fromClass(class{constructor(o){this.view=o,this.timeout=-1,this.set=!0;let{delay:e}=o.state.facet(lintConfig);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let o=Date.now();if(o<this.lintTime-10)setTimeout(this.run,this.lintTime-o);else{this.set=!1;let{state:e}=this.view,{sources:s}=e.facet(lintConfig);Promise.all(s.map(a=>Promise.resolve(a(this.view)))).then(a=>{let c=a.reduce((h,d)=>h.concat(d));this.view.state.doc==e.doc&&this.view.dispatch(setDiagnostics(this.view.state,c))},a=>{logException(this.view.state,a)})}}update(o){let e=o.state.facet(lintConfig);(o.docChanged||e!=o.startState.facet(lintConfig))&&(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)}}),lintConfig=Facet.define({combine(o){return Object.assign({sources:o.map(e=>e.source)},combineConfig(o.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null}))},enables:lintPlugin});function assignKeys(o){let e=[];if(o)e:for(let{name:s}of o){for(let a=0;a<s.length;a++){let c=s[a];if(/[a-zA-Z]/.test(c)&&!e.some(h=>h.toLowerCase()==c.toLowerCase())){e.push(c);continue e}}e.push("")}return e}function renderDiagnostic(o,e,s){var a;let c=s?assignKeys(e.actions):[];return crelt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},crelt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(a=e.actions)===null||a===void 0?void 0:a.map((h,d)=>{let g=j=>{j.preventDefault();let _e=findDiagnostic(o.state.field(lintState).diagnostics,e);_e&&h.apply(o,_e.from,_e.to)},{name:_}=h,b=c[d]?_.indexOf(c[d]):-1,$=b<0?_:[_.slice(0,b),crelt("u",_.slice(b,b+1)),_.slice(b+1)];return crelt("button",{type:"button",class:"cm-diagnosticAction",onclick:g,onmousedown:g,"aria-label":` Action: ${_}${b<0?"":` (access key "${c[d]})"`}.`},$)}),e.source&&crelt("div",{class:"cm-diagnosticSource"},e.source))}class DiagnosticWidget extends WidgetType{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return crelt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class PanelItem{constructor(e,s){this.diagnostic=s,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=renderDiagnostic(e,s,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class LintPanel{constructor(e){this.view=e,this.items=[];let s=c=>{if(c.keyCode==27)closeLintPanel(this.view),this.view.focus();else if(c.keyCode==38||c.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(c.keyCode==40||c.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(c.keyCode==36)this.moveSelection(0);else if(c.keyCode==35)this.moveSelection(this.items.length-1);else if(c.keyCode==13)this.view.focus();else if(c.keyCode>=65&&c.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:h}=this.items[this.selectedIndex],d=assignKeys(h.actions);for(let g=0;g<d.length;g++)if(d[g].toUpperCase().charCodeAt(0)==c.keyCode){let _=findDiagnostic(this.view.state.field(lintState).diagnostics,h);_&&h.actions[g].apply(e,_.from,_.to)}}else return;c.preventDefault()},a=c=>{for(let h=0;h<this.items.length;h++)this.items[h].dom.contains(c.target)&&this.moveSelection(h)};this.list=crelt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:s,onclick:a}),this.dom=crelt("div",{class:"cm-panel-lint"},this.list,crelt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>closeLintPanel(this.view)},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(lintState).selected;if(!e)return-1;for(let s=0;s<this.items.length;s++)if(this.items[s].diagnostic==e.diagnostic)return s;return-1}update(){let{diagnostics:e,selected:s}=this.view.state.field(lintState),a=0,c=!1,h=null;for(e.between(0,this.view.state.doc.length,(d,g,{spec:_})=>{let b=-1,$;for(let j=a;j<this.items.length;j++)if(this.items[j].diagnostic==_.diagnostic){b=j;break}b<0?($=new PanelItem(this.view,_.diagnostic),this.items.splice(a,0,$),c=!0):($=this.items[b],b>a&&(this.items.splice(a,b-a),c=!0)),s&&$.diagnostic==s.diagnostic?$.dom.hasAttribute("aria-selected")||($.dom.setAttribute("aria-selected","true"),h=$):$.dom.hasAttribute("aria-selected")&&$.dom.removeAttribute("aria-selected"),a++});a<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)c=!0,this.items.pop();this.items.length==0&&(this.items.push(new PanelItem(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),c=!0),h?(this.list.setAttribute("aria-activedescendant",h.id),this.view.requestMeasure({key:this,read:()=>({sel:h.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:d,panel:g})=>{d.top<g.top?this.list.scrollTop-=g.top-d.top:d.bottom>g.bottom&&(this.list.scrollTop+=d.bottom-g.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),c&&this.sync()}sync(){let e=this.list.firstChild;function s(){let a=e;e=a.nextSibling,a.remove()}for(let a of this.items)if(a.dom.parentNode==this.list){for(;e!=a.dom;)s();e=a.dom.nextSibling}else this.list.insertBefore(a.dom,e);for(;e;)s()}moveSelection(e){if(this.selectedIndex<0)return;let s=this.view.state.field(lintState),a=findDiagnostic(s.diagnostics,this.items[e].diagnostic);!a||this.view.dispatch({selection:{anchor:a.from,head:a.to},scrollIntoView:!0,effects:movePanelSelection.of(a)})}static open(e){return new LintPanel(e)}}function svg(o,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(o)}</svg>')`}function underline(o){return svg(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${o}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const baseTheme=EditorView.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"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:underline("#d11")},".cm-lintRange-warning":{backgroundImage:underline("orange")},".cm-lintRange-info":{backgroundImage:underline("#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}}});var basicSetup=function o(e){e===void 0&&(e={});var s=[];e.closeBracketsKeymap!==!1&&(s=s.concat(closeBracketsKeymap)),e.defaultKeymap!==!1&&(s=s.concat(defaultKeymap)),e.searchKeymap!==!1&&(s=s.concat(searchKeymap)),e.historyKeymap!==!1&&(s=s.concat(historyKeymap)),e.foldKeymap!==!1&&(s=s.concat(foldKeymap)),e.completionKeymap!==!1&&(s=s.concat(completionKeymap)),e.lintKeymap!==!1&&(s=s.concat(lintKeymap));var a=[];return e.lineNumbers!==!1&&a.push(lineNumbers()),e.highlightActiveLineGutter!==!1&&a.push(highlightActiveLineGutter()),e.highlightSpecialChars!==!1&&a.push(highlightSpecialChars()),e.history!==!1&&a.push(history()),e.foldGutter!==!1&&a.push(foldGutter()),e.drawSelection!==!1&&a.push(drawSelection()),e.dropCursor!==!1&&a.push(dropCursor()),e.allowMultipleSelections!==!1&&a.push(EditorState.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&a.push(indentOnInput()),e.syntaxHighlighting!==!1&&a.push(syntaxHighlighting(defaultHighlightStyle,{fallback:!0})),e.bracketMatching!==!1&&a.push(bracketMatching()),e.closeBrackets!==!1&&a.push(closeBrackets()),e.autocompletion!==!1&&a.push(autocompletion()),e.rectangularSelection!==!1&&a.push(rectangularSelection()),e.crosshairCursor!==!1&&a.push(crosshairCursor()),e.highlightActiveLine!==!1&&a.push(highlightActiveLine()),e.highlightSelectionMatches!==!1&&a.push(highlightSelectionMatches()),a.concat([keymap.of(s.flat())]).filter(Boolean)};const chalky="#e5c07b",coral="#e06c75",cyan="#56b6c2",invalid="#ffffff",ivory="#abb2bf",stone="#7d8799",malibu="#61afef",sage="#98c379",whiskey="#d19a66",violet="#c678dd",darkBackground="#21252b",highlightBackground="#2c313a",background="#282c34",tooltipBackground="#353a42",selection="#3E4451",cursor="#528bff",oneDarkTheme=EditorView.theme({"&":{color:ivory,backgroundColor:background},".cm-content":{caretColor:cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:cursor},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:selection},".cm-panels":{backgroundColor:darkBackground,color:ivory},".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:highlightBackground},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847",outline:"1px solid #515a6b"},".cm-gutters":{backgroundColor:background,color:stone,border:"none"},".cm-activeLineGutter":{backgroundColor:highlightBackground},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:tooltipBackground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:tooltipBackground,borderBottomColor:tooltipBackground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:highlightBackground,color:ivory}}},{dark:!0}),oneDarkHighlightStyle=HighlightStyle.define([{tag:tags.keyword,color:violet},{tag:[tags.name,tags.deleted,tags.character,tags.propertyName,tags.macroName],color:coral},{tag:[tags.function(tags.variableName),tags.labelName],color:malibu},{tag:[tags.color,tags.constant(tags.name),tags.standard(tags.name)],color:whiskey},{tag:[tags.definition(tags.name),tags.separator],color:ivory},{tag:[tags.typeName,tags.className,tags.number,tags.changed,tags.annotation,tags.modifier,tags.self,tags.namespace],color:chalky},{tag:[tags.operator,tags.operatorKeyword,tags.url,tags.escape,tags.regexp,tags.link,tags.special(tags.string)],color:cyan},{tag:[tags.meta,tags.comment],color:stone},{tag:tags.strong,fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.link,color:stone,textDecoration:"underline"},{tag:tags.heading,fontWeight:"bold",color:coral},{tag:[tags.atom,tags.bool,tags.special(tags.variableName)],color:whiskey},{tag:[tags.processingInstruction,tags.string,tags.inserted],color:sage},{tag:tags.invalid,color:invalid}]),oneDark=[oneDarkTheme,syntaxHighlighting(oneDarkHighlightStyle)];var getStatistics=o=>({line:o.state.doc.lineAt(o.state.selection.main.from),lineCount:o.state.doc.lines,lineBreak:o.state.lineBreak,length:o.state.doc.length,readOnly:o.state.readOnly,tabSize:o.state.tabSize,selection:o.state.selection,selectionAsSingle:o.state.selection.asSingle().main,ranges:o.state.selection.ranges,selectionCode:o.state.sliceDoc(o.state.selection.main.from,o.state.selection.main.to),selections:o.state.selection.ranges.map(e=>o.state.sliceDoc(e.from,e.to)),selectedText:o.state.selection.ranges.some(e=>!e.empty)});function useCodeMirror(o){var{value:e,selection:s,onChange:a,onStatistics:c,onCreateEditor:h,onUpdate:d,extensions:g=[],autoFocus:_,theme:b="light",height:$="",minHeight:j="",maxHeight:_e="",placeholder:et="",width:tt="",minWidth:nt="",maxWidth:st="",editable:rt=!0,readOnly:it=!1,indentWithTab:at=!0,basicSetup:ot=!0,root:ut}=o,[ct,ht]=react.exports.useState(),[lt,pt]=react.exports.useState(),[ft,gt]=react.exports.useState(),yt=EditorView.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),mt=EditorView.theme({"&":{height:$,minHeight:j,maxHeight:_e,width:tt,minWidth:nt,maxWidth:st}}),Et=EditorView.updateListener.of(St=>{if(St.docChanged&&typeof a=="function"){var At=St.state.doc,dt=At.toString();a(dt,St)}c&&c(getStatistics(St))}),Ot=[Et,mt];switch(at&&Ot.unshift(keymap.of([indentWithTab])),ot&&(typeof ot=="boolean"?Ot.unshift(basicSetup()):Ot.unshift(basicSetup(ot))),et&&Ot.unshift(placeholder(et)),b){case"light":Ot.push(yt);break;case"dark":Ot.push(oneDark);break;default:Ot.push(b);break}return rt===!1&&Ot.push(EditorView.editable.of(!1)),it&&Ot.push(EditorState.readOnly.of(!0)),d&&typeof d=="function"&&Ot.push(EditorView.updateListener.of(d)),Ot=Ot.concat(g),react.exports.useEffect(()=>{if(ct&&!ft){var St=EditorState.create({doc:e,selection:s,extensions:Ot});if(gt(St),!lt){var At=new EditorView({state:St,parent:ct,root:ut});pt(At),h&&h(At,St)}}return()=>{lt&&(gt(void 0),pt(void 0))}},[ct,ft]),react.exports.useEffect(()=>ht(o.container),[o.container]),react.exports.useEffect(()=>()=>{lt&&(lt.destroy(),pt(void 0))},[lt]),react.exports.useEffect(()=>{_&<&<.focus()},[_,lt]),react.exports.useEffect(()=>{lt&<.dispatch({effects:StateEffect.reconfigure.of(Ot)})},[b,g,$,j,_e,tt,nt,st,et,rt,it,at,ot,a,d]),react.exports.useEffect(()=>{var St=lt?lt.state.doc.toString():"";lt&&e!==St&<.dispatch({changes:{from:0,to:St.length,insert:e||""}})},[e,lt]),{state:ft,setState:gt,view:lt,setView:pt,container:ct,setContainer:ht}}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var f=react.exports,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(o,e,s){var a,c={},h=null,d=null;s!==void 0&&(h=""+s),e.key!==void 0&&(h=""+e.key),e.ref!==void 0&&(d=e.ref);for(a in e)m.call(e,a)&&!p.hasOwnProperty(a)&&(c[a]=e[a]);if(o&&o.defaultProps)for(a in e=o.defaultProps,e)c[a]===void 0&&(c[a]=e[a]);return{$$typeof:k,type:o,key:h,ref:d,props:c,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;(function(o){o.exports=reactJsxRuntime_production_min})(jsxRuntime);const Fragment=jsxRuntime.exports.Fragment,jsx=jsxRuntime.exports.jsx,jsxs=jsxRuntime.exports.jsxs;var _excluded=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root"],ReactCodeMirror=react.exports.forwardRef((o,e)=>{var{className:s,value:a="",selection:c,extensions:h=[],onChange:d,onStatistics:g,onCreateEditor:_,onUpdate:b,autoFocus:$,theme:j="light",height:_e,minHeight:et,maxHeight:tt,width:nt,minWidth:st,maxWidth:rt,basicSetup:it,placeholder:at,indentWithTab:ot,editable:ut,readOnly:ct,root:ht}=o,lt=_objectWithoutPropertiesLoose(o,_excluded),pt=react.exports.useRef(null),{state:ft,view:gt,container:yt,setContainer:mt}=useCodeMirror({container:pt.current,root:ht,value:a,autoFocus:$,theme:j,height:_e,minHeight:et,maxHeight:tt,width:nt,minWidth:st,maxWidth:rt,basicSetup:it,placeholder:at,indentWithTab:ot,editable:ut,readOnly:ct,selection:c,onChange:d,onStatistics:g,onCreateEditor:_,onUpdate:b,extensions:h});if(react.exports.useImperativeHandle(e,()=>({editor:pt.current,state:ft,view:gt}),[pt,yt,ft,gt]),typeof a!="string")throw new Error("value must be typeof string but got "+typeof a);var Et=typeof j=="string"?"cm-theme-"+j:"cm-theme";return jsx("div",_extends({ref:pt,className:""+Et+(s?" "+s:"")},lt))});ReactCodeMirror.displayName="CodeMirror";class Stack{constructor(e,s,a,c,h,d,g,_,b,$=0,j){this.p=e,this.stack=s,this.state=a,this.reducePos=c,this.pos=h,this.score=d,this.buffer=g,this.bufferBase=_,this.curContext=b,this.lookAhead=$,this.parent=j}toString(){return`[${this.stack.filter((e,s)=>s%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,s,a=0){let c=e.parser.context;return new Stack(e,[],s,a,a,0,[],0,c?new StackContext(c,c.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,s){this.stack.push(this.state,s,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let s=e>>19,a=e&65535,{parser:c}=this.p,h=c.dynamicPrecedence(a);if(h&&(this.score+=h),s==0){this.pushState(c.getGoto(this.state,a,!0),this.reducePos),a<c.minRepeatTerm&&this.storeNode(a,this.reducePos,this.reducePos,4,!0),this.reduceContext(a,this.reducePos);return}let d=this.stack.length-(s-1)*3-(e&262144?6:0),g=this.stack[d-2],_=this.stack[d-1],b=this.bufferBase+this.buffer.length-_;if(a<c.minRepeatTerm||e&131072){let $=c.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(a,g,$,b+4,!0)}if(e&262144)this.state=this.stack[d];else{let $=this.stack[d-3];this.state=c.getGoto($,a,!0)}for(;this.stack.length>d;)this.stack.pop();this.reduceContext(a,g)}storeNode(e,s,a,c=4,h=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let d=this,g=this.buffer.length;if(g==0&&d.parent&&(g=d.bufferBase-d.parent.bufferBase,d=d.parent),g>0&&d.buffer[g-4]==0&&d.buffer[g-1]>-1){if(s==a)return;if(d.buffer[g-2]>=s){d.buffer[g-2]=a;return}}}if(!h||this.pos==a)this.buffer.push(e,s,a,c);else{let d=this.buffer.length;if(d>0&&this.buffer[d-4]!=0)for(;d>0&&this.buffer[d-2]>a;)this.buffer[d]=this.buffer[d-4],this.buffer[d+1]=this.buffer[d-3],this.buffer[d+2]=this.buffer[d-2],this.buffer[d+3]=this.buffer[d-1],d-=4,c>4&&(c-=4);this.buffer[d]=e,this.buffer[d+1]=s,this.buffer[d+2]=a,this.buffer[d+3]=c}}shift(e,s,a){let c=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let h=e,{parser:d}=this.p;(a>this.pos||s<=d.maxNode)&&(this.pos=a,d.stateFlag(h,1)||(this.reducePos=a)),this.pushState(h,c),this.shiftContext(s,c),s<=d.maxNode&&this.buffer.push(s,c,a,4)}else this.pos=a,this.shiftContext(s,c),s<=this.p.parser.maxNode&&this.buffer.push(s,c,a,4)}apply(e,s,a){e&65536?this.reduce(e):this.shift(e,s,a)}useNode(e,s){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=e)&&(this.p.reused.push(e),a++);let c=this.pos;this.reducePos=this.pos=c+e.length,this.pushState(s,c),this.buffer.push(a,c,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,s=e.buffer.length;for(;s>0&&e.buffer[s-2]>e.reducePos;)s-=4;let a=e.buffer.slice(s),c=e.bufferBase+s;for(;e&&c==e.bufferBase;)e=e.parent;return new Stack(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,c,this.curContext,this.lookAhead,e)}recoverByDelete(e,s){let a=e<=this.p.parser.maxNode;a&&this.storeNode(e,this.pos,s,4),this.storeNode(0,this.pos,s,a?8:4),this.pos=this.reducePos=s,this.score-=190}canShift(e){for(let s=new SimulatedStack(this);;){let a=this.p.parser.stateSlot(s.state,4)||this.p.parser.hasAction(s.state,e);if((a&65536)==0)return!0;if(a==0)return!1;s.reduce(a)}}recoverByInsert(e){if(this.stack.length>=300)return[];let s=this.p.parser.nextStates(this.state);if(s.length>4<<1||this.stack.length>=120){let c=[];for(let h=0,d;h<s.length;h+=2)(d=s[h+1])!=this.state&&this.p.parser.hasAction(d,e)&&c.push(s[h],d);if(this.stack.length<120)for(let h=0;c.length<4<<1&&h<s.length;h+=2){let d=s[h+1];c.some((g,_)=>_&1&&g==d)||c.push(s[h],d)}s=c}let a=[];for(let c=0;c<s.length&&a.length<4;c+=2){let h=s[c+1];if(h==this.state)continue;let d=this.split();d.pushState(h,this.pos),d.storeNode(0,d.pos,d.pos,4,!0),d.shiftContext(s[c],this.pos),d.score-=200,a.push(d)}return a}forceReduce(){let e=this.p.parser.stateSlot(this.state,5);if((e&65536)==0)return!1;let{parser:s}=this.p;if(!s.validAction(this.state,e)){let a=e>>19,c=e&65535,h=this.stack.length-a*3;if(h<0||s.getGoto(this.stack[h],c,!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 s=0;s<this.stack.length;s+=3)if(this.stack[s]!=e.stack[s])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,s){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(s)))}reduceContext(e,s){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(s)))}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 s=new StackContext(this.curContext.tracker,e);s.hash!=this.curContext.hash&&this.emitContext(),this.curContext=s}}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 StackContext{constructor(e,s){this.tracker=e,this.context=s,this.hash=e.strict?e.hash(s):0}}var Recover;(function(o){o[o.Insert=200]="Insert",o[o.Delete=190]="Delete",o[o.Reduce=100]="Reduce",o[o.MaxNext=4]="MaxNext",o[o.MaxInsertStackDepth=300]="MaxInsertStackDepth",o[o.DampenInsertStackDepth=120]="DampenInsertStackDepth"})(Recover||(Recover={}));class SimulatedStack{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let s=e&65535,a=e>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let c=this.start.p.parser.getGoto(this.stack[this.base-3],s,!0);this.state=c}}class StackBufferCursor{constructor(e,s,a){this.stack=e,this.pos=s,this.index=a,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,s=e.bufferBase+e.buffer.length){return new StackBufferCursor(e,s,s-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 StackBufferCursor(this.stack,this.pos,this.index)}}class CachedToken{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const nullToken=new CachedToken;class InputStream{constructor(e,s){this.input=e,this.ranges=s,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=nullToken,this.rangeIndex=0,this.pos=this.chunkPos=s[0].from,this.range=s[0],this.end=s[s.length-1].to,this.readNext()}resolveOffset(e,s){let a=this.range,c=this.rangeIndex,h=this.pos+e;for(;h<a.from;){if(!c)return null;let d=this.ranges[--c];h-=a.from-d.to,a=d}for(;s<0?h>a.to:h>=a.to;){if(c==this.ranges.length-1)return null;let d=this.ranges[++c];h+=d.from-a.to,a=d}return h}peek(e){let s=this.chunkOff+e,a,c;if(s>=0&&s<this.chunk.length)a=this.pos+e,c=this.chunk.charCodeAt(s);else{let h=this.resolveOffset(e,1);if(h==null)return-1;if(a=h,a>=this.chunk2Pos&&a<this.chunk2Pos+this.chunk2.length)c=this.chunk2.charCodeAt(a-this.chunk2Pos);else{let d=this.rangeIndex,g=this.range;for(;g.to<=a;)g=this.ranges[++d];this.chunk2=this.input.chunk(this.chunk2Pos=a),a+this.chunk2.length>g.to&&(this.chunk2=this.chunk2.slice(0,g.to-a)),c=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),c}acceptToken(e,s=0){let a=s?this.resolveOffset(s,-1):this.pos;if(a==null||a<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=a}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:s}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=s,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),s=this.pos+e.length;this.chunk=s>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,s){if(s?(this.token=s,s.start=e,s.lookAhead=e+1,s.value=s.extended=-1):this.token=nullToken,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,s){if(e>=this.chunkPos&&s<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,s-this.chunkPos);if(e>=this.chunk2Pos&&s<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,s-this.chunk2Pos);if(e>=this.range.from&&s<=this.range.to)return this.input.read(e,s);let a="";for(let c of this.ranges){if(c.from>=s)break;c.to>e&&(a+=this.input.read(Math.max(c.from,e),Math.min(c.to,s)))}return a}}class TokenGroup{constructor(e,s){this.data=e,this.id=s}token(e,s){readToken(this.data,e,s,this.id)}}TokenGroup.prototype.contextual=TokenGroup.prototype.fallback=TokenGroup.prototype.extend=!1;class ExternalTokenizer{constructor(e,s={}){this.token=e,this.contextual=!!s.contextual,this.fallback=!!s.fallback,this.extend=!!s.extend}}function readToken(o,e,s,a){let c=0,h=1<<a,{parser:d}=s.p,{dialect:g}=d;e:for(;(h&o[c])!=0;){let _=o[c+1];for(let _e=c+3;_e<_;_e+=2)if((o[_e+1]&h)>0){let et=o[_e];if(g.allows(et)&&(e.token.value==-1||e.token.value==et||d.overrides(et,e.token.value))){e.acceptToken(et);break}}let b=e.next,$=0,j=o[c+2];if(e.next<0&&j>$&&o[_+j*3-3]==65535){c=o[_+j*3-1];continue e}for(;$<j;){let _e=$+j>>1,et=_+_e+(_e<<1),tt=o[et],nt=o[et+1];if(b<tt)j=_e;else if(b>=nt)$=_e+1;else{c=o[et+2],e.advance();continue e}}break}}function decodeArray(o,e=Uint16Array){if(typeof o!="string")return o;let s=null;for(let a=0,c=0;a<o.length;){let h=0;for(;;){let d=o.charCodeAt(a++),g=!1;if(d==126){h=65535;break}d>=92&&d--,d>=34&&d--;let _=d-32;if(_>=46&&(_-=46,g=!0),h+=_,g)break;h*=46}s?s[c++]=h:s=new e(h)}return s}const verbose=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let stackIDs=null;var Safety;(function(o){o[o.Margin=25]="Margin"})(Safety||(Safety={}));function cutAt(o,e,s){let a=o.cursor(IterMode.IncludeAnonymous);for(a.moveTo(e);;)if(!(s<0?a.childBefore(e):a.childAfter(e)))for(;;){if((s<0?a.to<e:a.from>e)&&!a.type.isError)return s<0?Math.max(0,Math.min(a.to-1,e-25)):Math.min(o.length,Math.max(a.from+1,e+25));if(s<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return s<0?0:o.length}}class FragmentCursor{constructor(e,s){this.fragments=e,this.nodeSet=s,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?cutAt(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?cutAt(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 s=this.trees.length-1;if(s<0)return this.nextFragment(),null;let a=this.trees[s],c=this.index[s];if(c==a.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=a.children[c],d=this.start[s]+a.positions[c];if(d>e)return this.nextStart=d,null;if(h instanceof Tree){if(d==e){if(d<this.safeFrom)return null;let g=d+h.length;if(g<=this.safeTo){let _=h.prop(NodeProp.lookAhead);if(!_||g+_<this.fragment.to)return h}}this.index[s]++,d+h.length>=Math.max(this.safeFrom,e)&&(this.trees.push(h),this.start.push(d),this.index.push(0))}else this.index[s]++,this.nextStart=d+h.length}}}class TokenCache{constructor(e,s){this.stream=s,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(a=>new CachedToken)}getActions(e){let s=0,a=null,{parser:c}=e.p,{tokenizers:h}=c,d=c.stateSlot(e.state,3),g=e.curContext?e.curContext.hash:0,_=0;for(let b=0;b<h.length;b++){if((1<<b&d)==0)continue;let $=h[b],j=this.tokens[b];if(!(a&&!$.fallback)&&(($.contextual||j.start!=e.pos||j.mask!=d||j.context!=g)&&(this.updateCachedToken(j,$,e),j.mask=d,j.context=g),j.lookAhead>j.end+25&&(_=Math.max(j.lookAhead,_)),j.value!=0)){let _e=s;if(j.extended>-1&&(s=this.addActions(e,j.extended,j.end,s)),s=this.addActions(e,j.value,j.end,s),!$.extend&&(a=j,s>_e))break}}for(;this.actions.length>s;)this.actions.pop();return _&&e.setLookAhead(_),!a&&e.pos==this.stream.end&&(a=new CachedToken,a.value=e.p.parser.eofTerm,a.start=a.end=e.pos,s=this.addActions(e,a.value,a.end,s)),this.mainToken=a,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let s=new CachedToken,{pos:a,p:c}=e;return s.start=a,s.end=Math.min(a+1,c.stream.end),s.value=a==c.stream.end?c.parser.eofTerm:0,s}updateCachedToken(e,s,a){if(s.token(this.stream.reset(a.pos,e),a),e.value>-1){let{parser:c}=a.p;for(let h=0;h<c.specialized.length;h++)if(c.specialized[h]==e.value){let d=c.specializers[h](this.stream.read(e.start,e.end),a);if(d>=0&&a.p.parser.dialect.allows(d>>1)){(d&1)==0?e.value=d>>1:e.extended=d>>1;break}}}else e.value=0,e.end=Math.min(a.p.stream.end,a.pos+1)}putAction(e,s,a,c){for(let h=0;h<c;h+=3)if(this.actions[h]==e)return c;return this.actions[c++]=e,this.actions[c++]=s,this.actions[c++]=a,c}addActions(e,s,a,c){let{state:h}=e,{parser:d}=e.p,{data:g}=d;for(let _=0;_<2;_++)for(let b=d.stateSlot(h,_?2:1);;b+=3){if(g[b]==65535)if(g[b+1]==1)b=pair(g,b+2);else{c==0&&g[b+1]==2&&(c=this.putAction(pair(g,b+2),s,a,c));break}g[b]==s&&(c=this.putAction(pair(g,b+1),s,a,c))}return c}}var Rec;(function(o){o[o.Distance=5]="Distance",o[o.MaxRemainingPerStep=3]="MaxRemainingPerStep",o[o.MinBufferLengthPrune=500]="MinBufferLengthPrune",o[o.ForceReduceLimit=10]="ForceReduceLimit",o[o.CutDepth=15e3]="CutDepth",o[o.CutTo=9e3]="CutTo"})(Rec||(Rec={}));class Parse{constructor(e,s,a,c){this.parser=e,this.input=s,this.ranges=c,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.stream=new InputStream(s,c),this.tokens=new TokenCache(e,this.stream),this.topTerm=e.top[1];let{from:h}=c[0];this.stacks=[Stack.start(this,e.top[0],h)],this.fragments=a.length&&this.stream.end-h>e.bufferLength*4?new FragmentCursor(a,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,s=this.minStackPos,a=this.stacks=[],c,h;for(let d=0;d<e.length;d++){let g=e[d];for(;;){if(this.tokens.mainToken=null,g.pos>s)a.push(g);else{if(this.advanceStack(g,a,e))continue;{c||(c=[],h=[]),c.push(g);let _=this.tokens.getMainToken(g);h.push(_.value,_.end)}}break}}if(!a.length){let d=c&&findFinished(c);if(d)return this.stackToTree(d);if(this.parser.strict)throw verbose&&c&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+s);this.recovering||(this.recovering=5)}if(this.recovering&&c){let d=this.stoppedAt!=null&&c[0].pos>this.stoppedAt?c[0]:this.runRecovery(c,h,a);if(d)return this.stackToTree(d.forceAll())}if(this.recovering){let d=this.recovering==1?1:this.recovering*3;if(a.length>d)for(a.sort((g,_)=>_.score-g.score);a.length>d;)a.pop();a.some(g=>g.reducePos>s)&&this.recovering--}else if(a.length>1){e:for(let d=0;d<a.length-1;d++){let g=a[d];for(let _=d+1;_<a.length;_++){let b=a[_];if(g.sameState(b)||g.buffer.length>500&&b.buffer.length>500)if((g.score-b.score||g.buffer.length-b.buffer.length)>0)a.splice(_--,1);else{a.splice(d--,1);continue e}}}}this.minStackPos=a[0].pos;for(let d=1;d<a.length;d++)a[d].pos<this.minStackPos&&(this.minStackPos=a[d].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,s,a){let c=e.pos,{parser:h}=this,d=verbose?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&c>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let b=e.curContext&&e.curContext.tracker.strict,$=b?e.curContext.hash:0;for(let j=this.fragments.nodeAt(c);j;){let _e=this.parser.nodeSet.types[j.type.id]==j.type?h.getGoto(e.state,j.type.id):-1;if(_e>-1&&j.length&&(!b||(j.prop(NodeProp.contextHash)||0)==$))return e.useNode(j,_e),verbose&&console.log(d+this.stackID(e)+` (via reuse of ${h.getName(j.type.id)})`),!0;if(!(j instanceof Tree)||j.children.length==0||j.positions[0]>0)break;let et=j.children[0];if(et instanceof Tree&&j.positions[0]==0)j=et;else break}}let g=h.stateSlot(e.state,4);if(g>0)return e.reduce(g),verbose&&console.log(d+this.stackID(e)+` (via always-reduce ${h.getName(g&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let _=this.tokens.getActions(e);for(let b=0;b<_.length;){let $=_[b++],j=_[b++],_e=_[b++],et=b==_.length||!a,tt=et?e:e.split();if(tt.apply($,j,_e),verbose&&console.log(d+this.stackID(tt)+` (via ${($&65536)==0?"shift":`reduce of ${h.getName($&65535)}`} for ${h.getName(j)} @ ${c}${tt==e?"":", split"})`),et)return!0;tt.pos>c?s.push(tt):a.push(tt)}return!1}advanceFully(e,s){let a=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>a)return pushStackDedup(e,s),!0}}runRecovery(e,s,a){let c=null,h=!1;for(let d=0;d<e.length;d++){let g=e[d],_=s[d<<1],b=s[(d<<1)+1],$=verbose?this.stackID(g)+" -> ":"";if(g.deadEnd&&(h||(h=!0,g.restart(),verbose&&console.log($+this.stackID(g)+" (restarted)"),this.advanceFully(g,a))))continue;let j=g.split(),_e=$;for(let et=0;j.forceReduce()&&et<10&&(verbose&&console.log(_e+this.stackID(j)+" (via force-reduce)"),!this.advanceFully(j,a));et++)verbose&&(_e=this.stackID(j)+" -> ");for(let et of g.recoverByInsert(_))verbose&&console.log($+this.stackID(et)+" (via recover-insert)"),this.advanceFully(et,a);this.stream.end>g.pos?(b==g.pos&&(b++,_=0),g.recoverByDelete(_,b),verbose&&console.log($+this.stackID(g)+` (via recover-delete ${this.parser.getName(_)})`),pushStackDedup(g,a)):(!c||c.score<g.score)&&(c=g)}return c}stackToTree(e){return e.close(),Tree.build({buffer:StackBufferCursor.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 s=(stackIDs||(stackIDs=new WeakMap)).get(e);return s||stackIDs.set(e,s=String.fromCodePoint(this.nextStackID++)),s+e}}function pushStackDedup(o,e){for(let s=0;s<e.length;s++){let a=e[s];if(a.pos==o.pos&&a.sameState(o)){e[s].score<o.score&&(e[s]=o);return}}e.push(o)}class Dialect{constructor(e,s,a){this.source=e,this.flags=s,this.disabled=a}allows(e){return!this.disabled||this.disabled[e]==0}}const id=o=>o;class ContextTracker{constructor(e){this.start=e.start,this.shift=e.shift||id,this.reduce=e.reduce||id,this.reuse=e.reuse||id,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class LRParser extends Parser{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (${14})`);let s=e.nodeNames.split(" ");this.minRepeatTerm=s.length;for(let g=0;g<e.repeatNodeCount;g++)s.push("");let a=Object.keys(e.topRules).map(g=>e.topRules[g][1]),c=[];for(let g=0;g<s.length;g++)c.push([]);function h(g,_,b){c[g].push([_,_.deserialize(String(b))])}if(e.nodeProps)for(let g of e.nodeProps){let _=g[0];typeof _=="string"&&(_=NodeProp[_]);for(let b=1;b<g.length;){let $=g[b++];if($>=0)h($,_,g[b++]);else{let j=g[b+-$];for(let _e=-$;_e>0;_e--)h(g[b++],_,j);b++}}}this.nodeSet=new NodeSet(s.map((g,_)=>NodeType.define({name:_>=this.minRepeatTerm?void 0:g,id:_,props:c[_],top:a.indexOf(_)>-1,error:_==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(_)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=DefaultBufferLength;let d=decodeArray(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let g=0;g<this.specializerSpecs.length;g++)this.specialized[g]=this.specializerSpecs[g].term;this.specializers=this.specializerSpecs.map(getSpecializer),this.states=decodeArray(e.states,Uint32Array),this.data=decodeArray(e.stateData),this.goto=decodeArray(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(g=>typeof g=="number"?new TokenGroup(d,g):g),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,s,a){let c=new Parse(this,e,s,a);for(let h of this.wrappers)c=h(c,e,s,a);return c}getGoto(e,s,a=!1){let c=this.goto;if(s>=c[0])return-1;for(let h=c[s+1];;){let d=c[h++],g=d&1,_=c[h++];if(g&&a)return _;for(let b=h+(d>>1);h<b;h++)if(c[h]==e)return _;if(g)return-1}}hasAction(e,s){let a=this.data;for(let c=0;c<2;c++)for(let h=this.stateSlot(e,c?2:1),d;;h+=3){if((d=a[h])==65535)if(a[h+1]==1)d=a[h=pair(a,h+2)];else{if(a[h+1]==2)return pair(a,h+2);break}if(d==s||d==0)return pair(a,h+1)}return 0}stateSlot(e,s){return this.states[e*6+s]}stateFlag(e,s){return(this.stateSlot(e,0)&s)>0}validAction(e,s){if(s==this.stateSlot(e,4))return!0;for(let a=this.stateSlot(e,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=pair(this.data,a+2);else return!1;if(s==pair(this.data,a+1))return!0}}nextStates(e){let s=[];for(let a=this.stateSlot(e,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=pair(this.data,a+2);else break;if((this.data[a+2]&1)==0){let c=this.data[a+1];s.some((h,d)=>d&1&&h==c)||s.push(this.data[a],c)}}return s}overrides(e,s){let a=findOffset(this.data,this.tokenPrecTable,s);return a<0||findOffset(this.data,this.tokenPrecTable,e)<a}configure(e){let s=Object.assign(Object.create(LRParser.prototype),this);if(e.props&&(s.nodeSet=this.nodeSet.extend(...e.props)),e.top){let a=this.topRules[e.top];if(!a)throw new RangeError(`Invalid top rule name ${e.top}`);s.top=a}return e.tokenizers&&(s.tokenizers=this.tokenizers.map(a=>{let c=e.tokenizers.find(h=>h.from==a);return c?c.to:a})),e.specializers&&(s.specializers=this.specializers.slice(),s.specializerSpecs=this.specializerSpecs.map((a,c)=>{let h=e.specializers.find(g=>g.from==a.external);if(!h)return a;let d=Object.assign(Object.assign({},a),{external:h.to});return s.specializers[c]=getSpecializer(d),d})),e.contextTracker&&(s.context=e.contextTracker),e.dialect&&(s.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(s.strict=e.strict),e.wrap&&(s.wrappers=s.wrappers.concat(e.wrap)),e.bufferLength!=null&&(s.bufferLength=e.bufferLength),s}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 s=this.dynamicPrecedences;return s==null?0:s[e]||0}parseDialect(e){let s=Object.keys(this.dialects),a=s.map(()=>!1);if(e)for(let h of e.split(" ")){let d=s.indexOf(h);d>=0&&(a[d]=!0)}let c=null;for(let h=0;h<s.length;h++)if(!a[h])for(let d=this.dialects[s[h]],g;(g=this.data[d++])!=65535;)(c||(c=new Uint8Array(this.maxTerm+1)))[g]=1;return new Dialect(e,a,c)}static deserialize(e){return new LRParser(e)}}function pair(o,e){return o[e]|o[e+1]<<16}function findOffset(o,e,s){for(let a=e,c;(c=o[a])!=65535;a++)if(c==s)return a-e;return-1}function findFinished(o){let e=null;for(let s of o){let a=s.p.stoppedAt;(s.pos==s.p.stream.end||a!=null&&s.pos>a)&&s.p.parser.stateFlag(s.state,2)&&(!e||e.score<s.score)&&(e=s)}return e}function getSpecializer(o){if(o.external){let e=o.extend?1:0;return(s,a)=>o.external(s,a)<<1|e}return o.get}const TSExtends=1,noSemi=281,incdec=2,incdecPrefix=3,templateContent=282,InterpolationStart=4,templateEnd=283,insertSemi=284,spaces=286,newline=287,LineComment=5,BlockComment=6,Dialect_ts=1,space=[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],braceR=125,braceL=123,semicolon=59,slash=47,star=42,plus=43,minus=45,dollar=36,backtick=96,backslash=92,trackNewline=new ContextTracker({start:!1,shift(o,e){return e==LineComment||e==BlockComment||e==spaces?o:e==newline},strict:!1}),insertSemicolon=new ExternalTokenizer((o,e)=>{let{next:s}=o;(s==braceR||s==-1||e.context)&&e.canShift(insertSemi)&&o.acceptToken(insertSemi)},{contextual:!0,fallback:!0}),noSemicolon=new ExternalTokenizer((o,e)=>{let{next:s}=o,a;space.indexOf(s)>-1||s==slash&&((a=o.peek(1))==slash||a==star)||s!=braceR&&s!=semicolon&&s!=-1&&!e.context&&e.canShift(noSemi)&&o.acceptToken(noSemi)},{contextual:!0}),incdecToken=new ExternalTokenizer((o,e)=>{let{next:s}=o;if((s==plus||s==minus)&&(o.advance(),s==o.next)){o.advance();let a=!e.context&&e.canShift(incdec);o.acceptToken(a?incdec:incdecPrefix)}},{contextual:!0}),template=new ExternalTokenizer(o=>{for(let e=!1,s=0;;s++){let{next:a}=o;if(a<0){s&&o.acceptToken(templateContent);break}else if(a==backtick){s?o.acceptToken(templateContent):o.acceptToken(templateEnd,1);break}else if(a==braceL&&e){s==1?o.acceptToken(InterpolationStart,1):o.acceptToken(templateContent,-1);break}else if(a==10&&s){o.advance(),o.acceptToken(templateContent);break}else a==backslash&&o.advance();e=a==dollar,o.advance()}}),tsExtends=new ExternalTokenizer((o,e)=>{if(!(o.next!=101||!e.dialectEnabled(Dialect_ts))){o.advance();for(let s=0;s<6;s++){if(o.next!="xtends".charCodeAt(s))return;o.advance()}o.next>=57&&o.next<=65||o.next>=48&&o.next<=90||o.next==95||o.next>=97&&o.next<=122||o.next>160||o.acceptToken(TSExtends)}}),jsHighlight=styleTags({"get set async static":tags.modifier,"for while do if else switch try catch finally return throw break continue default case":tags.controlKeyword,"in of await yield void typeof delete instanceof":tags.operatorKeyword,"let var const function class extends":tags.definitionKeyword,"import export from":tags.moduleKeyword,"with debugger as new":tags.keyword,TemplateString:tags.special(tags.string),super:tags.atom,BooleanLiteral:tags.bool,this:tags.self,null:tags.null,Star:tags.modifier,VariableName:tags.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":tags.function(tags.variableName),VariableDefinition:tags.definition(tags.variableName),Label:tags.labelName,PropertyName:tags.propertyName,PrivatePropertyName:tags.special(tags.propertyName),"CallExpression/MemberExpression/PropertyName":tags.function(tags.propertyName),"FunctionDeclaration/VariableDefinition":tags.function(tags.definition(tags.variableName)),"ClassDeclaration/VariableDefinition":tags.definition(tags.className),PropertyDefinition:tags.definition(tags.propertyName),PrivatePropertyDefinition:tags.definition(tags.special(tags.propertyName)),UpdateOp:tags.updateOperator,LineComment:tags.lineComment,BlockComment:tags.blockComment,Number:tags.number,String:tags.string,ArithOp:tags.arithmeticOperator,LogicOp:tags.logicOperator,BitOp:tags.bitwiseOperator,CompareOp:tags.compareOperator,RegExp:tags.regexp,Equals:tags.definitionOperator,Arrow:tags.function(tags.punctuation),": Spread":tags.punctuation,"( )":tags.paren,"[ ]":tags.squareBracket,"{ }":tags.brace,"InterpolationStart InterpolationEnd":tags.special(tags.brace),".":tags.derefOperator,", ;":tags.separator,TypeName:tags.typeName,TypeDefinition:tags.definition(tags.typeName),"type enum interface implements namespace module declare":tags.definitionKeyword,"abstract global Privacy readonly override":tags.modifier,"is keyof unique infer":tags.operatorKeyword,JSXAttributeValue:tags.attributeValue,JSXText:tags.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":tags.angleBracket,"JSXIdentifier JSXNameSpacedName":tags.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":tags.attributeName}),spec_identifier={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:48,true:56,false:56,void:66,typeof:70,null:86,super:88,new:122,await:139,yield:141,delete:142,class:152,extends:154,public:197,private:197,protected:197,readonly:199,instanceof:220,in:222,const:224,import:256,keyof:307,unique:311,infer:317,is:351,abstract:371,implements:373,type:375,let:378,var:380,interface:387,enum:391,namespace:397,module:399,declare:403,global:407,for:428,of:437,while:440,with:444,do:448,if:452,else:454,switch:458,case:464,try:470,catch:474,finally:478,return:482,throw:486,break:490,continue:494,debugger:498},spec_word={__proto__:null,async:109,get:111,set:113,public:161,private:161,protected:161,static:163,abstract:165,override:167,readonly:173,new:355},spec_LessThan={__proto__:null,"<":129},parser=LRParser.deserialize({version:14,states:"$8SO`QdOOO'QQ(C|O'#ChO'XOWO'#DVO)dQdO'#D]O)tQdO'#DhO){QdO'#DrO-xQdO'#DxOOQO'#E]'#E]O.]Q`O'#E[O.bQ`O'#E[OOQ(C['#Ef'#EfO0aQ(C|O'#ItO2wQ(C|O'#IuO3eQ`O'#EzO3jQ!bO'#FaOOQ(C['#FS'#FSO3rO#tO'#FSO4QQ&jO'#FhO5bQ`O'#FgOOQ(C['#Iu'#IuOOQ(CW'#It'#ItOOQS'#J^'#J^O5gQ`O'#HpO5lQ(ChO'#HqOOQS'#Ih'#IhOOQS'#Hr'#HrQ`QdOOO){QdO'#DjO5tQ`O'#G[O5yQ&jO'#CmO6XQ`O'#EZO6dQ`O'#EgO6iQ,UO'#FRO7TQ`O'#G[O7YQ`O'#G`O7eQ`O'#G`O7sQ`O'#GcO7sQ`O'#GdO7sQ`O'#GfO5tQ`O'#GiO8dQ`O'#GlO9rQ`O'#CdO:SQ`O'#GyO:[Q`O'#HPO:[Q`O'#HRO`QdO'#HTO:[Q`O'#HVO:[Q`O'#HYO:aQ`O'#H`O:fQ(CjO'#HfO){QdO'#HhO:qQ(CjO'#HjO:|Q(CjO'#HlO5lQ(ChO'#HnO){QdO'#DWOOOW'#Ht'#HtO;XOWO,59qOOQ(C[,59q,59qO=jQtO'#ChO=tQdO'#HuO>XQ`O'#IvO@WQtO'#IvO'dQdO'#IvO@_Q`O,59wO@uQ7[O'#DbOAnQ`O'#E]OA{Q`O'#JROBWQ`O'#JQOBWQ`O'#JQOB`Q`O,5:yOBeQ`O'#JPOBlQaO'#DyO5yQ&jO'#EZOBzQ`O'#EZOCVQpO'#FROOQ(C[,5:S,5:SOC_QdO,5:SOE]Q(C|O,5:^OEyQ`O,5:dOFdQ(ChO'#JOO7YQ`O'#I}OFkQ`O'#I}OFsQ`O,5:xOFxQ`O'#I}OGWQdO,5:vOIWQ&jO'#EWOJeQ`O,5:vOKwQ&jO'#DlOLOQdO'#DqOLYQ7[O,5;PO){QdO,5;POOQS'#Er'#ErOOQS'#Et'#EtO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;ROOQS'#Ex'#ExOLbQdO,5;cOOQ(C[,5;h,5;hOOQ(C[,5;i,5;iONbQ`O,5;iOOQ(C[,5;j,5;jO){QdO'#IPONgQ(ChO,5<TO! RQ&jO,5;RO){QdO,5;fO! kQ!bO'#JVO! YQ!bO'#JVO! rQ!bO'#JVO!!TQ!bO,5;qOOOO,5;{,5;{O!!cQdO'#FcOOOO'#IO'#IOO3rO#tO,5;nO!!jQ!bO'#FeOOQ(C[,5;n,5;nO!#WQ,VO'#CrOOQ(C]'#Cu'#CuO!#kQ`O'#CuO!#pOWO'#CyO!$^Q,VO,5<QO!$eQ`O,5<SO!%tQ&jO'#FrO!&RQ`O'#FsO!&WQ`O'#FsO!&]Q&jO'#FwO!'[Q7[O'#F{O!'}Q,VO'#IqOOQ(C]'#Iq'#IqO!(XQaO'#IpO!(gQ`O'#IoO!(oQ`O'#CqOOQ(C]'#Cs'#CsOOQ(C]'#C|'#C|O!(wQ`O'#DOOJjQ&jO'#FjOJjQ&jO'#FlO!(|Q`O'#FnO!)RQ`O'#FoO!&WQ`O'#FuOJjQ&jO'#FzO!)WQ`O'#E^O!)oQ`O,5<RO`QdO,5>[OOQS'#Ik'#IkOOQS,5>],5>]OOQS-E;p-E;pO!+kQ(C|O,5:UOOQ(CX'#Cp'#CpO!,[Q&kO,5<vOOQO'#Cf'#CfO!,mQ(ChO'#IlO5bQ`O'#IlO:aQ`O,59XO!-OQ!bO,59XO!-WQ&jO,59XO5yQ&jO,59XO!-cQ`O,5:vO!-kQ`O'#GxO!-yQ`O'#JbO){QdO,5;kO!.RQ7[O,5;mO!.WQ`O,5=cO!.]Q`O,5=cO!.bQ`O,5=cO5lQ(ChO,5=cO5tQ`O,5<vO!.pQ`O'#E_O!/UQ7[O'#E`OOQ(CW'#JP'#JPO!/gQ(ChO'#J_O5lQ(ChO,5<zO7sQ`O,5=QOOQP'#Cr'#CrO!/rQ!bO,5<}O!/zQ!cO,5=OO!0VQ`O,5=QO!0[QpO,5=TO:aQ`O'#GnO5tQ`O'#GpO!0dQ`O'#GpO5yQ&jO'#GsO!0iQ`O'#GsOOQS,5=W,5=WO!0nQ`O'#GtO!0vQ`O'#CmO!0{Q`O,59OO!1VQ`O,59OO!3XQdO,59OOOQS,59O,59OO!3fQ(ChO,59OO){QdO,59OO!3qQdO'#G{OOQS'#G|'#G|OOQS'#G}'#G}O`QdO,5=eO!4RQ`O,5=eO){QdO'#DxO`QdO,5=kO`QdO,5=mO!4WQ`O,5=oO`QdO,5=qO!4]Q`O,5=tO!4bQdO,5=zOOQS,5>Q,5>QO){QdO,5>QO5lQ(ChO,5>SOOQS,5>U,5>UO!8cQ`O,5>UOOQS,5>W,5>WO!8cQ`O,5>WOOQS,5>Y,5>YO!8hQpO,59rOOOW-E;r-E;rOOQ(C[1G/]1G/]O!8mQtO,5>aO'dQdO,5>aOOQO,5>f,5>fO!8wQdO'#HuOOQO-E;s-E;sO!9UQ`O,5?bO!9^QtO,5?bO!9eQ`O,5?lOOQ(C[1G/c1G/cO!9mQ!bO'#DTOOQO'#Ix'#IxO){QdO'#IxO!:[Q!bO'#IxO!:yQ!bO'#DcO!;[Q7[O'#DcO!=gQdO'#DcO!=nQ`O'#IwO!=vQ`O,59|O!={Q`O'#EaO!>ZQ`O'#JSO!>cQ`O,5:zO!>yQ7[O'#DcO){QdO,5?mO!?TQ`O'#HzOOQO-E;x-E;xO!9eQ`O,5?lOOQ(CW1G0e1G0eO!@aQ7[O'#D|OOQ(C[,5:e,5:eO){QdO,5:eOIWQ&jO,5:eO!@hQaO,5:eO:aQ`O,5:uO!-OQ!bO,5:uO!-WQ&jO,5:uO5yQ&jO,5:uOOQ(C[1G/n1G/nOOQ(C[1G0O1G0OOOQ(CW'#EV'#EVO){QdO,5?jO!@sQ(ChO,5?jO!AUQ(ChO,5?jO!A]Q`O,5?iO!AeQ`O'#H|O!A]Q`O,5?iOOQ(CW1G0d1G0dO7YQ`O,5?iOOQ(C[1G0b1G0bO!BPQ(C|O1G0bO!CRQ(CyO,5:rOOQ(C]'#Fq'#FqO!CoQ(C}O'#IqOGWQdO1G0bO!EqQ,VO'#IyO!E{Q`O,5:WO!FQQtO'#IzO){QdO'#IzO!F[Q`O,5:]OOQ(C]'#DT'#DTOOQ(C[1G0k1G0kO!FaQ`O1G0kO!HrQ(C|O1G0mO!HyQ(C|O1G0mO!K^Q(C|O1G0mO!KeQ(C|O1G0mO!MlQ(C|O1G0mO!NPQ(C|O1G0mO#!pQ(C|O1G0mO#!wQ(C|O1G0mO#%[Q(C|O1G0mO#%cQ(C|O1G0mO#'WQ(C|O1G0mO#*QQMlO'#ChO#+{QMlO1G0}O#-vQMlO'#IuOOQ(C[1G1T1G1TO#.ZQ(C|O,5>kOOQ(CW-E;}-E;}O#.zQ(C}O1G0mOOQ(C[1G0m1G0mO#1PQ(C|O1G1QO#1pQ!bO,5;sO#1uQ!bO,5;tO#1zQ!bO'#F[O#2`Q`O'#FZOOQO'#JW'#JWOOQO'#H}'#H}O#2eQ!bO1G1]OOQ(C[1G1]1G1]OOOO1G1f1G1fO#2sQMlO'#ItO#2}Q`O,5;}OLbQdO,5;}OOOO-E;|-E;|OOQ(C[1G1Y1G1YOOQ(C[,5<P,5<PO#3SQ!bO,5<POOQ(C],59a,59aOIWQ&jO'#C{OOOW'#Hs'#HsO#3XOWO,59eOOQ(C],59e,59eO){QdO1G1lO!)RQ`O'#IRO#3dQ`O,5<eOOQ(C],5<b,5<bOOQO'#GV'#GVOJjQ&jO,5<pOOQO'#GX'#GXOJjQ&jO,5<rOIWQ&jO,5<tOOQO1G1n1G1nO#3oQqO'#CpO#4SQqO,5<^O#4ZQ`O'#JZO5tQ`O'#JZO#4iQ`O,5<`OJjQ&jO,5<_O#4nQ`O'#FtO#4yQ`O,5<_O#5OQqO'#FqO#5]QqO'#J[O#5gQ`O'#J[OIWQ&jO'#J[O#5lQ`O,5<cOOQ(CW'#Dg'#DgO#5qQ!bO'#F|O!'VQ7[O'#F|O!'VQ7[O'#GOO#6SQ`O'#GPO!&WQ`O'#GSO#6XQ(ChO'#ITO#6dQ7[O,5<gOOQ(C],5<g,5<gO#6kQ7[O'#F|O#6yQ7[O'#F}O#7RQ7[O'#F}OOQ(C],5<u,5<uOJjQ&jO,5?[OJjQ&jO,5?[O#7WQ`O'#IUO#7cQ`O,5?ZO#7kQ`O,59]OOQ(C]'#Ch'#ChO#8[Q,VO,59jOOQ(C],59j,59jO#8}Q,VO,5<UO#9pQ,VO,5<WO#9zQ`O,5<YOOQ(C],5<Z,5<ZO#:PQ`O,5<aO#:UQ,VO,5<fOGWQdO1G1mO#:fQ`O1G1mOOQS1G3v1G3vOOQ(C[1G/p1G/pONbQ`O1G/pOOQS1G2b1G2bOIWQ&jO1G2bO){QdO1G2bOIWQ&jO1G2bO#:kQaO1G2bO#<QQ&jO'#EWOOQ(CW,5?W,5?WO#<[Q(ChO,5?WOOQS1G.s1G.sO:aQ`O1G.sO!-OQ!bO1G.sO!-WQ&jO1G.sO#<mQ`O1G0bO#<rQ`O'#ChO#<}Q`O'#JcO#=VQ`O,5=dO#=[Q`O'#JcO#=aQ`O'#JcO#=iQ`O'#I^O#=wQ`O,5?|O#>PQtO1G1VOOQ(C[1G1X1G1XO5tQ`O1G2}O#>WQ`O1G2}O#>]Q`O1G2}O#>bQ`O1G2}OOQS1G2}1G2}O#>gQ&kO1G2bO7YQ`O'#JQO7YQ`O'#EaO7YQ`O'#IWO#>xQ(ChO,5?yOOQS1G2f1G2fO!0VQ`O1G2lOIWQ&jO1G2iO#?TQ`O1G2iOOQS1G2j1G2jOIWQ&jO1G2jO#?YQaO1G2jO#?bQ7[O'#GhOOQS1G2l1G2lO!'VQ7[O'#IYO!0[QpO1G2oOOQS1G2o1G2oOOQS,5=Y,5=YO#?jQ&kO,5=[O5tQ`O,5=[O#6SQ`O,5=_O5bQ`O,5=_O!-OQ!bO,5=_O!-WQ&jO,5=_O5yQ&jO,5=_O#?{Q`O'#JaO#@WQ`O,5=`OOQS1G.j1G.jO#@]Q(ChO1G.jO#@hQ`O1G.jO#@mQ`O1G.jO5lQ(ChO1G.jO#@uQtO,5@OO#APQ`O,5@OO#A[QdO,5=gO#AcQ`O,5=gO7YQ`O,5@OOOQS1G3P1G3PO`QdO1G3POOQS1G3V1G3VOOQS1G3X1G3XO:[Q`O1G3ZO#AhQdO1G3]O#EcQdO'#H[OOQS1G3`1G3`O#EpQ`O'#HbO:aQ`O'#HdOOQS1G3f1G3fO#ExQdO1G3fO5lQ(ChO1G3lOOQS1G3n1G3nOOQ(CW'#Fx'#FxO5lQ(ChO1G3pO5lQ(ChO1G3rOOOW1G/^1G/^O#IvQpO,5<TO#JOQtO1G3{OOQO1G4Q1G4QO){QdO,5>aO#JYQ`O1G4|O#JbQ`O1G5WO#JjQ`O,5?dOLbQdO,5:{O7YQ`O,5:{O:aQ`O,59}OLbQdO,59}O!-OQ!bO,59}O#JoQMlO,59}OOQO,5:{,5:{O#JyQ7[O'#HvO#KaQ`O,5?cOOQ(C[1G/h1G/hO#KiQ7[O'#H{O#K}Q`O,5?nOOQ(CW1G0f1G0fO!;[Q7[O,59}O#LVQtO1G5XO7YQ`O,5>fOOQ(CW'#ES'#ESO#LaQ(DjO'#ETO!@XQ7[O'#D}OOQO'#Hy'#HyO#L{Q7[O,5:hOOQ(C[,5:h,5:hO#MSQ7[O'#D}O#MeQ7[O'#D}O#MlQ7[O'#EYO#MoQ7[O'#ETO#M|Q7[O'#ETO!@XQ7[O'#ETO#NaQ`O1G0PO#NfQqO1G0POOQ(C[1G0P1G0PO){QdO1G0POIWQ&jO1G0POOQ(C[1G0a1G0aO:aQ`O1G0aO!-OQ!bO1G0aO!-WQ&jO1G0aO#NmQ(C|O1G5UO){QdO1G5UO#N}Q(ChO1G5UO$ `Q`O1G5TO7YQ`O,5>hOOQO,5>h,5>hO$ hQ`O,5>hOOQO-E;z-E;zO$ `Q`O1G5TO$ vQ(C}O,59jO$#xQ(C}O,5<UO$%}Q(C}O,5<WO$(SQ(C}O,5<fOOQ(C[7+%|7+%|O$*_Q(C|O7+%|O$+OQ&jO'#HwO$+YQ`O,5?eOOQ(C]1G/r1G/rO$+bQdO'#HxO$+oQ`O,5?fO$+wQtO,5?fOOQ(C[1G/w1G/wOOQ(C[7+&V7+&VO$,RQMlO,5:^O){QdO7+&iO$,]QMlO,5:UOOQO1G1_1G1_OOQO1G1`1G1`O$,jQ!LQO,5;vOLbQdO,5;uOOQO-E;{-E;{OOQ(C[7+&w7+&wOOOO7+'Q7+'QOOOO1G1i1G1iO$,uQ`O1G1iOOQ(C[1G1k1G1kO$,zQqO,59gOOOW-E;q-E;qOOQ(C]1G/P1G/PO$-RQ(C|O7+'WOOQ(C],5>m,5>mO$-rQ`O,5>mOOQ(C]1G2P1G2PP$-wQ`O'#IRPOQ(C]-E<P-E<PO$.hQ,VO1G2[O$/ZQ,VO1G2^O$/eQqO1G2`OOQ(C]1G1x1G1xO$/lQ`O'#IQO$/zQ`O,5?uO$/zQ`O,5?uO$0SQ`O,5?uO$0_Q`O,5?uOOQO1G1z1G1zO$0mQ,VO1G1yOJjQ&jO1G1yO$0}Q&jO'#ISO$1_Q`O,5?vOIWQ&jO,5?vO$1gQqO,5?vOOQ(C]1G1}1G1}OOQ(CW,5<h,5<hOOQ(CW,5<i,5<iO$1qQ`O,5<iO#5}Q`O,5<iO!-OQ!bO,5<hO$1vQ`O,5<jOOQ(CW,5<k,5<kO$1qQ`O,5<nOOQO,5>o,5>oOOQO-E<R-E<ROOQ(C]1G2R1G2RO!'VQ7[O,5<hO$2OQ`O,5<iO!'VQ7[O,5<jO!'VQ7[O,5<iO$2ZQ,VO1G4vO$2eQ,VO1G4vOOQO,5>p,5>pOOQO-E<S-E<SOOQP1G.w1G.wO!.RQ7[O,59lO){QdO,59lO$2rQ`O1G1tOJjQ&jO1G1{O$2wQ(C|O7+'XOOQ(C[7+'X7+'XOGWQdO7+'XOOQ(C[7+%[7+%[O$3hQqO'#J]O#NaQ`O7+'|O$3rQ`O7+'|O$3zQqO7+'|OOQS7+'|7+'|OIWQ&jO7+'|O){QdO7+'|OIWQ&jO7+'|O$4UQ(CyO'#ChO$4iQ(CyO,5<lO$5ZQ`O,5<lOOQ(CW1G4r1G4rOOQS7+$_7+$_O:aQ`O7+$_O!-OQ!bO7+$_OGWQdO7+%|O$5`Q`O'#I]O$5qQ`O,5?}OOQO1G3O1G3OO5tQ`O,5?}O$5qQ`O,5?}O$5yQ`O,5?}OOQO,5>x,5>xOOQO-E<[-E<[OOQ(C[7+&q7+&qO$6OQ`O7+(iO5lQ(ChO7+(iO5tQ`O7+(iO$6TQ`O7+(iO$6YQaO7+'|OOQ(CW,5>r,5>rOOQ(CW-E<U-E<UOOQS7+(W7+(WO$6hQ(CyO7+(TOIWQ&jO7+(TO$6rQqO7+(UOOQS7+(U7+(UOIWQ&jO7+(UO$6yQ`O'#J`O$7UQ`O,5=SOOQO,5>t,5>tOOQO-E<W-E<WOOQS7+(Z7+(ZO$8OQ7[O'#GqOOQS1G2v1G2vOIWQ&jO1G2vO){QdO1G2vOIWQ&jO1G2vO$8VQaO1G2vO$8eQ&kO1G2vO5lQ(ChO1G2yO#6SQ`O1G2yO5bQ`O1G2yO!-OQ!bO1G2yO!-WQ&jO1G2yO$8vQ`O'#I[O$9RQ`O,5?{O$9ZQ7[O,5?{OOQ(CW1G2z1G2zOOQS7+$U7+$UO$9cQ`O7+$UO5lQ(ChO7+$UO$9hQ`O7+$UO){QdO1G5jO){QdO1G5kO$9mQdO1G3RO$9tQ`O1G3RO$9yQdO1G3RO$:QQ(ChO1G5jOOQS7+(k7+(kO5lQ(ChO7+(uO`QdO7+(wOOQS'#Jf'#JfOOQS'#I_'#I_O$:[QdO,5=vOOQS,5=v,5=vO){QdO'#H]O$:iQ`O'#H_OOQS,5=|,5=|O7YQ`O,5=|OOQS,5>O,5>OOOQS7+)Q7+)QOOQS7+)W7+)WOOQS7+)[7+)[OOQS7+)^7+)^OOQO1G5O1G5OO$:nQMlO1G0gO$:xQ`O1G0gOOQO1G/i1G/iO$;TQMlO1G/iO:aQ`O1G/iOLbQdO'#DcOOQO,5>b,5>bOOQO-E;t-E;tOOQO,5>g,5>gOOQO-E;y-E;yO!-OQ!bO1G/iO:aQ`O,5:iOOQO,5:o,5:oO){QdO,5:oO$;_Q(ChO,5:oO$;jQ(ChO,5:oO!-OQ!bO,5:iOOQO-E;w-E;wOOQ(C[1G0S1G0SO!@XQ7[O,5:iO$;xQ7[O,5:iO$<ZQ(DjO,5:oO$<uQ7[O,5:iO!@XQ7[O,5:oOOQO,5:t,5:tO$<|Q7[O,5:oO$=ZQ(ChO,5:oOOQ(C[7+%k7+%kO#NaQ`O7+%kO#NfQqO7+%kOOQ(C[7+%{7+%{O:aQ`O7+%{O!-OQ!bO7+%{O$=oQ(C|O7+*pO){QdO7+*pOOQO1G4S1G4SO7YQ`O1G4SO$>PQ`O7+*oO$>XQ(C}O1G2[O$@^Q(C}O1G2^O$BcQ(C}O1G1yO$DnQ,VO,5>cOOQO-E;u-E;uO$DxQtO,5>dO){QdO,5>dOOQO-E;v-E;vO$ESQ`O1G5QO$E[QMlO1G0bO$GcQMlO1G0mO$GjQMlO1G0mO$IkQMlO1G0mO$IrQMlO1G0mO$KgQMlO1G0mO$KzQMlO1G0mO$NXQMlO1G0mO$N`QMlO1G0mO%!aQMlO1G0mO%!hQMlO1G0mO%$]QMlO1G0mO%$pQ(C|O<<JTO%%rQMmO1G0mO%'|QMmO'#IqO%)iQMlO1G1QOLbQdO'#F^OOQO'#JX'#JXOOQO1G1b1G1bO%)vQ`O1G1aO%){QMlO,5>kOOOO7+'T7+'TOOOW1G/R1G/ROOQ(C]1G4X1G4XOJjQ&jO7+'zO%*VQ`O,5>lO5tQ`O,5>lOOQO-E<O-E<OO%*eQ`O1G5aO%*eQ`O1G5aO%*mQ`O1G5aO%*xQ,VO7+'eO%+YQqO,5>nO%+dQ`O,5>nOIWQ&jO,5>nOOQO-E<Q-E<QO%+iQqO1G5bO%+sQ`O1G5bOOQ(CW1G2T1G2TO$1qQ`O1G2TOOQ(CW1G2S1G2SO%+{Q`O1G2UOIWQ&jO1G2UOOQ(CW1G2Y1G2YO!-OQ!bO1G2SO#5}Q`O1G2TO%,QQ`O1G2UO%,YQ`O1G2TOJjQ&jO7+*bOOQ(C]1G/W1G/WO%,eQ`O1G/WOOQ(C]7+'`7+'`O%,jQ,VO7+'gO%,zQ(C|O<<JsOOQ(C[<<Js<<JsOIWQ&jO'#IVO%-kQ`O,5?wOOQS<<Kh<<KhOIWQ&jO<<KhO#NaQ`O<<KhO%-sQ`O<<KhO%-{QqO<<KhOIWQ&jO1G2WOOQS<<Gy<<GyO:aQ`O<<GyO%.VQ(C|O<<IhOOQ(C[<<Ih<<IhOOQO,5>w,5>wO%.vQ`O,5>wO%.{Q`O,5>wOOQO-E<Z-E<ZO%/TQ`O1G5iO%/TQ`O1G5iO5tQ`O1G5iO%/]Q`O<<LTOOQS<<LT<<LTO%/bQ`O<<LTO5lQ(ChO<<LTO){QdO<<KhOIWQ&jO<<KhOOQS<<Ko<<KoO$6hQ(CyO<<KoOOQS<<Kp<<KpO$6rQqO<<KpO%/gQ7[O'#IXO%/rQ`O,5?zOLbQdO,5?zOOQS1G2n1G2nO#LaQ(DjO'#ETO!@XQ7[O'#GrOOQO'#IZ'#IZO%/zQ7[O,5=]OOQS,5=],5=]O%0RQ7[O'#ETO%0^Q7[O'#ETO%0uQ7[O'#ETO%1PQ7[O'#GrO%1bQ`O7+(bO%1gQ`O7+(bO%1oQqO7+(bOOQS7+(b7+(bOIWQ&jO7+(bO){QdO7+(bOIWQ&jO7+(bO%1yQaO7+(bOOQS7+(e7+(eO5lQ(ChO7+(eO#6SQ`O7+(eO5bQ`O7+(eO!-OQ!bO7+(eO%2XQ`O,5>vOOQO-E<Y-E<YOOQO'#Gu'#GuO%2dQ`O1G5gO5lQ(ChO<<GpOOQS<<Gp<<GpO%2lQ`O<<GpO%2qQ`O7++UO%2vQ`O7++VOOQS7+(m7+(mO%2{Q`O7+(mO%3QQdO7+(mO%3XQ`O7+(mO){QdO7++UO){QdO7++VOOQS<<La<<LaOOQS<<Lc<<LcOOQS-E<]-E<]OOQS1G3b1G3bO%3^Q`O,5=wOOQS,5=y,5=yO%3cQ`O1G3hOLbQdO7+&ROOQO7+%T7+%TO%3hQMlO1G5XO:aQ`O7+%TOOQO1G0T1G0TO%3rQ(C|O1G0ZOOQO1G0Z1G0ZO){QdO1G0ZO%3|Q(ChO1G0ZO:aQ`O1G0TO!-OQ!bO1G0TO!@XQ7[O1G0TO%4XQ(ChO1G0ZO%4gQ7[O1G0TO%4xQ(ChO1G0ZO%5^Q(DjO1G0ZO%5hQ7[O1G0TO!@XQ7[O1G0ZOOQ(C[<<IV<<IVOOQ(C[<<Ig<<IgO:aQ`O<<IgO%5oQ(C|O<<N[OOQO7+)n7+)nO%6PQ(C}O7+'eO%8[Q(C}O7+'gO%:gQtO1G4OO%:qQMlO7+%|O%;gQMmO,59jO%=hQMmO,5<UO%?lQMmO,5<WO%A[QMmO,5<fO%B}QMlO7+'WO%C[QMlO7+'XO%CiQ`O,5;xOOQO7+&{7+&{O%CnQ,VO<<KfOOQO1G4W1G4WO%CuQ`O1G4WO%DQQ`O1G4WO%D`Q`O7+*{O%D`Q`O7+*{OIWQ&jO1G4YO%DhQqO1G4YO%DrQ`O7+*|OOQ(CW7+'o7+'oO$1qQ`O7+'pO%DzQqO7+'pOOQ(CW7+'n7+'nO$1qQ`O7+'oO%ERQ`O7+'pOIWQ&jO7+'pO#5}Q`O7+'oO%EWQ,VO<<M|OOQ(C]7+$r7+$rO%EbQqO,5>qOOQO-E<T-E<TO#NaQ`OANASOOQSANASANASOIWQ&jOANASO%ElQ(CyO7+'rOOQSAN=eAN=eO5tQ`O1G4cOOQO1G4c1G4cO%E|Q`O1G4cO%FRQ`O7++TO%FRQ`O7++TO5lQ(ChOANAoO%FZQ`OANAoOOQSANAoANAoO%F`Q`OANASO%FhQqOANASOOQSANAZANAZOOQSANA[ANA[O%FrQ`O,5>sOOQO-E<V-E<VO%F}QMlO1G5fO#6SQ`O,5=^O5bQ`O,5=^O!-OQ!bO,5=^OOQO-E<X-E<XOOQS1G2w1G2wO$<ZQ(DjO,5:oO!@XQ7[O,5=^O%GXQ7[O,5=^O%GjQ7[O,5:oOOQS<<K|<<K|OIWQ&jO<<K|O%1bQ`O<<K|O%GtQ`O<<K|O%G|QqO<<K|O){QdO<<K|OIWQ&jO<<K|OOQS<<LP<<LPO5lQ(ChO<<LPO#6SQ`O<<LPO5bQ`O<<LPO%HWQ7[O1G4bO%H`Q`O7++ROOQSAN=[AN=[O5lQ(ChOAN=[OOQS<<Np<<NpOOQS<<Nq<<NqOOQS<<LX<<LXO%HhQ`O<<LXO%HmQdO<<LXO%HtQ`O<<NpO%HyQ`O<<NqOOQS1G3c1G3cO:aQ`O7+)SO%IOQMlO<<ImOOQO<<Ho<<HoOOQO7+%u7+%uO%3rQ(C|O7+%uO){QdO7+%uOOQO7+%o7+%oO:aQ`O7+%oO!-OQ!bO7+%oO%IYQ(ChO7+%uO!@XQ7[O7+%oO%IeQ(ChO7+%uO%IsQ7[O7+%oO%JUQ(ChO7+%uOOQ(C[AN?RAN?RO%JjQMlO<<JTO%JwQMmO1G1yO%MOQMmO1G2[O& SQMmO1G2^O&!rQMlO<<JsO&#PQMlO<<IhOOQO1G1d1G1dOJjQ&jOANAQOOQO7+)r7+)rO&#^Q`O7+)rO&#iQ`O<<NgO&#qQqO7+)tOOQ(CW<<K[<<K[O$1qQ`O<<K[OOQ(CW<<KZ<<KZO&#{QqO<<K[O$1qQ`O<<KZOOQSG26nG26nO#NaQ`OG26nOOQO7+)}7+)}O5tQ`O7+)}O&$SQ`O<<NoOOQSG27ZG27ZO5lQ(ChOG27ZOIWQ&jOG26nOLbQdO1G4_O&$[Q`O7++QO5lQ(ChO1G2xO#6SQ`O1G2xO5bQ`O1G2xO!-OQ!bO1G2xO!@XQ7[O1G2xO%5^Q(DjO1G0ZO&$dQ7[O1G2xO%1bQ`OANAhOOQSANAhANAhOIWQ&jOANAhO&$uQ`OANAhO&$}QqOANAhOOQSANAkANAkO5lQ(ChOANAkO#6SQ`OANAkOOQO'#Gv'#GvOOQO7+)|7+)|OOQSG22vG22vOOQSANAsANAsO&%XQ`OANAsOOQSAND[AND[OOQSAND]AND]OOQS<<Ln<<LnOOQO<<Ia<<IaO%3rQ(C|O<<IaOOQO<<IZ<<IZO:aQ`O<<IZO){QdO<<IaO!-OQ!bO<<IZO&%^Q(ChO<<IaO!@XQ7[O<<IZO&%iQ(ChO<<IaO&%wQMmO7+'eO&'jQMmO7+'gO&)]Q,VOG26lOOQO<<M^<<M^OOQ(CWAN@vAN@vO$1qQ`OAN@vOOQ(CWAN@uAN@uOOQSLD,YLD,YOOQO<<Mi<<MiOOQSLD,uLD,uO#NaQ`OLD,YO&)mQMlO7+)yOOQO7+(d7+(dO5lQ(ChO7+(dO#6SQ`O7+(dO5bQ`O7+(dO!-OQ!bO7+(dO!@XQ7[O7+(dOOQSG27SG27SO%1bQ`OG27SOIWQ&jOG27SOOQSG27VG27VO5lQ(ChOG27VOOQSG27_G27_OOQOAN>{AN>{OOQOAN>uAN>uO%3rQ(C|OAN>{O:aQ`OAN>uO){QdOAN>{O!-OQ!bOAN>uO&)wQ(ChOAN>{O&*SQ(C}OG26lOOQ(CWG26bG26bOOQS!$( t!$( tOOQO<<LO<<LOO5lQ(ChO<<LOO#6SQ`O<<LOO5bQ`O<<LOO!-OQ!bO<<LOOOQSLD,nLD,nO%1bQ`OLD,nOOQSLD,qLD,qOOQOG24gG24gOOQOG24aG24aO%3rQ(C|OG24gO:aQ`OG24aO){QdOG24gO&,pQ!LRO,5:rO&-gQ$ITO'#IqOOQOANAjANAjO5lQ(ChOANAjO#6SQ`OANAjO5bQ`OANAjOOQS!$(!Y!$(!YOOQOLD*RLD*ROOQOLD){LD){O%3rQ(C|OLD*RO&.ZQMmOG26lO&/|Q!LRO,59jO&0pQ!LRO,5<UO&1dQ!LRO,5<WO&2WQ!LRO,5<fOOQOG27UG27UO5lQ(ChOG27UO#6SQ`OG27UOOQO!$'Mm!$'MmO&2}Q!LRO1G2[O&3qQ!LRO1G2^O&4eQ!LRO1G1yOOQOLD,pLD,pO5lQ(ChOLD,pO&5[Q!LRO7+'eO&6RQ!LRO7+'gOOQO!$(![!$(![O&6xQ!LROG26lOLbQdO'#DrO&7oQtO'#ItOLbQdO'#DjO&7vQ(C|O'#ChO&8aQtO'#ChO&8qQdO,5:vO&:qQ&jO'#EWOLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO,5;ROLbQdO'#IPO&<OQ`O,5<TO&=eQ&jO,5;ROLbQdO,5;fO!(wQ`O'#DOO!(wQ`O'#DOO!(wQ`O'#DOOIWQ&jO'#FjO&:qQ&jO'#FjO&<WQ&jO'#FjOIWQ&jO'#FlO&:qQ&jO'#FlO&<WQ&jO'#FlOIWQ&jO'#FzO&:qQ&jO'#FzO&<WQ&jO'#FzOLbQdO,5?mO&8qQdO1G0bO&=lQMlO'#ChOLbQdO1G1lOIWQ&jO,5<pO&:qQ&jO,5<pO&<WQ&jO,5<pOIWQ&jO,5<rO&:qQ&jO,5<rO&<WQ&jO,5<rOIWQ&jO,5<_O&:qQ&jO,5<_O&<WQ&jO,5<_O&8qQdO1G1mOLbQdO7+&iOIWQ&jO1G1yO&:qQ&jO1G1yO&<WQ&jO1G1yOIWQ&jO1G1{O&:qQ&jO1G1{O&<WQ&jO1G1{O&8qQdO7+'XO&8qQdO7+%|O&=vQ`O7+'pOIWQ&jOANAQO&:qQ&jOANAQO&<WQ&jOANAQO&=vQ`O<<K[O&=vQ`OAN@vO&={Q`O'#E[O&>QQ`O'#E[O&>YQ`O'#EzO&>_Q`O'#EgO&>dQ`O'#JRO&>oQ`O'#JPO&>zQ`O,5:vO&?PQ,VO,5<QO&?WQ`O'#FsO&?]Q`O'#FsO&?bQ`O'#FsO&?gQ`O,5<RO&?oQ`O,5:vO&?wQMlO1G0}O&@OQ`O,5<_O&@TQ`O,5<_O&@YQ`O,5<_O&@_Q`O,5<aO&@dQ`O,5<aO&@iQ`O,5<aO&@nQ`O1G1mO&@sQ`O1G0bO&@xQ`O1G2UO&@}Q,VO<<KfO&AUQ,VO<<KfO&A]Q,VO<<KfO&AdQqO7+'pO&AkQ`O7+'pO&ApQqO<<K[O4QQ&jO'#FhO5bQ`O'#FgOBzQ`O'#EZOLbQdO,5;cO!&WQ`O'#FsO!&WQ`O'#FsO!&WQ`O'#FsO!&WQ`O'#FuO!&WQ`O'#FuO!&WQ`O'#FuO&AwQ`O,5<jOJjQ&jO7+'zOJjQ&jO7+'zOJjQ&jO7+'zOIWQ&jO1G2UO&BPQ`O1G2UOIWQ&jO7+'pO!'VQ7[O'#GOO$/eQqO1G2`O$/eQqO1G2`O$/eQqO1G2`O!'VQ7[O,5<jOIWQ&jO,5<tOIWQ&jO,5<tOIWQ&jO,5<t",stateData:"&B}~O'YOS'ZOSTOSUOS~OQTORTOXyO]cO_hObnOcmOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!TSO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!nlO#dsO#tpO#x^O%PqO%RtO%TrO%UrO%XuO%ZvO%^wO%_wO%axO%nzO%t{O%v|O%x}O%z!OO%}!PO&T!QO&Z!RO&]!SO&_!TO&a!UO&c!VO']PO'fQO'oYO'|aO~OQ[XZ[X_[Xj[Xu[Xv[Xx[X!R[X!a[X!b[X!d[X!j[X!{[X#WdX#[[X#][X#^[X#_[X#`[X#a[X#b[X#c[X#e[X#g[X#i[X#j[X#o[X'W[X'f[X'p[X'w[X'x[X~O!]$lX~P$zOS!WO'U!XO'V!ZO~OQTORTO]cOb!kOc!jOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!T!bO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!n!iO#t!lO#x^O']![O'fQO'oYO'|aO~O!Q!`O!R!]O!O'jP!O'tP~P'dO!S!mO~P`OQTORTO]cOb!kOc!jOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!T!bO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!n!iO#t!lO#x^O']9aO'fQO'oYO'|aO~OQTORTO]cOb!kOc!jOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!T!bO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!n!iO#t!lO#x^O'fQO'oYO'|aO~O!Q!rO#U!uO#V!rO']9bO!c'qP~P+{O#W!vO~O!]!wO#W!vO~OQ#^OZ#dOj#ROu!{Ov!{Ox!|O!R#bO!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO#i#YO#j#ZO'fQO'p#[O'w!}O'x#OO~O_'hX'W'hX!c'hX!O'hX!T'hX%Q'hX!]'hX~P.jO!{#eO#o#eOQ'iXZ'iX_'iXj'iXu'iXv'iXx'iX!R'iX!a'iX!b'iX!d'iX!j'iX#['iX#]'iX#^'iX#_'iX#`'iX#a'iX#b'iX#e'iX#g'iX#i'iX#j'iX'f'iX'p'iX'w'iX'x'iX~O#c'iX'W'iX!O'iX!c'iXn'iX!T'iX%Q'iX!]'iX~P0zO!{#eO~O#z#fO$R#jO~O!T#kO#x^O$U#lO$W#nO~O]#qOh$QOj#rOk#qOl#qOq$ROs$SOx#yO!T#zO!_$XO!d#vO#V$YO#t$VO$_$TO$a$UO$d$WO']#pO'b$PO'f#sO'a'cP~O!d$ZO~O!]$]O~O_$^O'W$^O~O']$bO~O!d$ZO']$bO'^$dO'b$PO~Oc$jO!d$ZO']$bO~O#c#TO~O]$sOu$oO!T$lO!d$nO%R$rO']$bO'^$dO^(UP~O!n$tO~Ox$uO!T$vO']$bO~Ox$uO!T$vO%Z$zO']$bO~O']${O~O#dsO%RtO%TrO%UrO%XuO%ZvO%^wO%_wO~Ob%UOc%TO!n%RO%P%SO%c%QO~P7xOb%XOcmO!T%WO!nlO#dsO%PqO%TrO%UrO%XuO%ZvO%^wO%_wO%axO~O`%[O!{%_O%R%YO'^$dO~P8wO!d%`O!g%dO~O!d%eO~O!TSO~O_$^O'T%mO'W$^O~O_$^O'T%pO'W$^O~O_$^O'T%rO'W$^O~OS!WO'U!XO'V%vO~OQ[XZ[Xj[Xu[Xv[Xx[X!R[X!RdX!a[X!b[X!d[X!j[X!{[X!{dX#WdX#[[X#][X#^[X#_[X#`[X#a[X#b[X#c[X#e[X#g[X#i[X#j[X#o[X'f[X'p[X'w[X'x[X~O!O[X!OdX~P;dO!Q%xO!O&iX!O&nX!R&iX!R&nX~P'dO!R%zO!O'jX~OQ#^OZ#dOj#ROu!{Ov!{Ox!|O!R%zO!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO#i#YO#j#ZO'fQO'p#[O'w!}O'x#OO~O!O'jX~P>aO!O&PO~Ox&SO!W&^O!X&VO!Y&VO'^$dO~O]&TOk&TO!Q&WO'g&QO!S'kP!S'vP~P@dO!O'sX!R'sX!]'sX!c'sX'p'sX~O!{'sX#W#PX!S'sX~PA]O!{&_O!O'uX!R'uX~O!R&`O!O'tX~O!O&cO~O!{#eO~PA]OP&gO!T&dO!o&fO']$bO~Oc&lO!d$ZO']$bO~Ou$oO!d$nO~O!S&mO~P`Ou!{Ov!{Ox!|O!b!yO!d!zO'fQOQ!faZ!faj!fa!R!fa!a!fa!j!fa#[!fa#]!fa#^!fa#_!fa#`!fa#a!fa#b!fa#c!fa#e!fa#g!fa#i!fa#j!fa'p!fa'w!fa'x!fa~O_!fa'W!fa!O!fa!c!fan!fa!T!fa%Q!fa!]!fa~PCfO!c&nO~O!]!wO!{&pO'p&oO!R'rX_'rX'W'rX~O!c'rX~PFOO!R&tO!c'qX~O!c&vO~Ox$uO!T$vO#V&wO']$bO~OQTORTO]cOb!kOc!jOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!TSO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!n!iO#t!lO#x^O']9aO'fQO'oYO'|aO~O]#qOh$QOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO']&{O'b$PO'f#sO~O#W&}O~O]#qOh$QOj#rOk#qOl#qOq$ROs$SOx#yO!T#zO!_$XO!d#vO#V$YO#t$VO$_$TO$a$UO$d$WO']&{O'b$PO'f#sO~O'a'mP~PJjO!Q'RO!c'nP~P){O'g'TO'oYO~OQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!T!bO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O']'cO'fQO'oYO'|;^O~O!d!zO~O!R#bO_$]a'W$]a!c$]a!O$]a!T$]a%Q$]a!]$]a~O#d'jO~PIWO!]'lO!T'yX#w'yX#z'yX$R'yX~Ou'mO~P! YOu'mO!T'yX#w'yX#z'yX$R'yX~O!T'oO#w'sO#z'nO$R'tO~O!Q'wO~PLbO#z#fO$R'zO~OP$eXu$eXx$eX!b$eX'w$eX'x$eX~OPfX!RfX!{fX'afX'a$eX~P!!rOk'|O~OS'}O'U(OO'V(QO~OP(ZOu(SOx(TO'w(VO'x(XO~O'a(RO~P!#{O'a([O~O]#qOh$QOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO'b$PO'f#sO~O!Q(`O'](]O!c'}P~P!$jO#W(bO~O!d(cO~O!Q(hO'](eO!O(OP~P!$jOj(uOx(mO!W(sO!X(lO!Y(lO!d(cO!x(tO$w(oO'^$dO'g(jO~O!S(rO~P!&jO!b!yOP'eXu'eXx'eX'w'eX'x'eX!R'eX!{'eX~O'a'eX#m'eX~P!'cOP(xO!{(wO!R'dX'a'dX~O!R(yO'a'cX~O']${O'a'cP~O'](|O~O!d)RO~O']&{O~Ox$uO!Q!rO!T$vO#U!uO#V!rO']$bO!c'qP~O!]!wO#W)VO~OQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO#i#YO#j#ZO'fQO'p#[O'w!}O'x#OO~O_!^a!R!^a'W!^a!O!^a!c!^an!^a!T!^a%Q!^a!]!^a~P!)wOP)_O!T&dO!o)^O%Q)]O'b$PO~O!])aO!T'`X_'`X!R'`X'W'`X~O!d$ZO'b$PO~O!d$ZO']$bO'b$PO~O!]!wO#W&}O~O])lO%R)mO'])iO!S(VP~O!R)nO^(UX~O'g'TO~OZ)rO~O^)sO~O!T$lO']$bO'^$dO^(UP~Ox$uO!Q)xO!R&`O!T$vO']$bO!O'tP~O]&ZOk&ZO!Q)yO'g'TO!S'vP~O!R)zO_(RX'W(RX~O!{*OO'b$PO~OP*RO!T#zO'b$PO~O!T*TO~Ou*VO!TSO~O!n*[O~Oc*aO~O'](|O!S(TP~Oc$jO~O%RtO']${O~P8wOZ*gO^*fO~OQTORTO]cObnOcmOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!nlO#x^O%PqO'fQO'oYO'|aO~O!T!bO#t!lO']9aO~P!1_O^*fO_$^O'W$^O~O_*kO#d*mO%T*mO%U*mO~P){O!d%`O~O%t*rO~O!T*tO~O&V*vO&X*wOQ&SaR&SaX&Sa]&Sa_&Sab&Sac&Sah&Saj&Sak&Sal&Saq&Sas&Sax&Sa{&Sa|&Sa}&Sa!T&Sa!_&Sa!d&Sa!g&Sa!h&Sa!i&Sa!j&Sa!k&Sa!n&Sa#d&Sa#t&Sa#x&Sa%P&Sa%R&Sa%T&Sa%U&Sa%X&Sa%Z&Sa%^&Sa%_&Sa%a&Sa%n&Sa%t&Sa%v&Sa%x&Sa%z&Sa%}&Sa&T&Sa&Z&Sa&]&Sa&_&Sa&a&Sa&c&Sa'S&Sa']&Sa'f&Sa'o&Sa'|&Sa!S&Sa%{&Sa`&Sa&Q&Sa~O']*|O~On+PO~O!O&ia!R&ia~P!)wO!Q+TO!O&iX!R&iX~P){O!R%zO!O'ja~O!O'ja~P>aO!R&`O!O'ta~O!RwX!R!ZX!SwX!S!ZX!]wX!]!ZX!d!ZX!{wX'b!ZX~O!]+YO!{+XO!R#TX!R'lX!S#TX!S'lX!]'lX!d'lX'b'lX~O!]+[O!d$ZO'b$PO!R!VX!S!VX~O]&ROk&ROx&SO'g(jO~OQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!T!bO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O'fQO'oYO'|;^O~O']:SO~P!;jO!R+`O!S'kX~O!S+bO~O!]+YO!{+XO!R#TX!S#TX~O!R+cO!S'vX~O!S+eO~O]&ROk&ROx&SO'^$dO'g(jO~O!X+fO!Y+fO~P!>hOx$uO!Q+hO!T$vO']$bO!O&nX!R&nX~O_+lO!W+oO!X+kO!Y+kO!r+sO!s+qO!t+rO!u+pO!x+tO'^$dO'g(jO'o+iO~O!S+nO~P!?iOP+yO!T&dO!o+xO~O!{,PO!R'ra!c'ra_'ra'W'ra~O!]!wO~P!@sO!R&tO!c'qa~Ox$uO!Q,SO!T$vO#U,UO#V,SO']$bO!R&pX!c&pX~O_#Oi!R#Oi'W#Oi!O#Oi!c#Oin#Oi!T#Oi%Q#Oi!]#Oi~P!)wOP;tOu(SOx(TO'w(VO'x(XO~O#W!za!R!za!c!za!{!za!T!za_!za'W!za!O!za~P!BpO#W'eXQ'eXZ'eX_'eXj'eXv'eX!a'eX!d'eX!j'eX#['eX#]'eX#^'eX#_'eX#`'eX#a'eX#b'eX#c'eX#e'eX#g'eX#i'eX#j'eX'W'eX'f'eX'p'eX!c'eX!O'eX!T'eXn'eX%Q'eX!]'eX~P!'cO!R,_O'a'mX~P!#{O'a,aO~O!R,bO!c'nX~P!)wO!c,eO~O!O,fO~OQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O'fQOZ#Zi_#Zij#Zi!R#Zi!a#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O#[#Zi~P!FfO#[#PO~P!FfOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO'fQOZ#Zi_#Zi!R#Zi!a#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~Oj#Zi~P!IQOj#RO~P!IQOQ#^Oj#ROu!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO'fQO_#Zi!R#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~OZ#Zi!a#Zi#a#Zi#b#Zi#c#Zi~P!KlOZ#dO!a#TO#a#TO#b#TO#c#TO~P!KlOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO'fQO_#Zi!R#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O'w#Zi~P!NdO'w!}O~P!NdOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO'fQO'w!}O_#Zi!R#Zi#i#Zi#j#Zi'W#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O'x#Zi~P##OO'x#OO~P##OOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO#i#YO'fQO'w!}O'x#OO~O_#Zi!R#Zi#j#Zi'W#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~P#%jOQ[XZ[Xj[Xu[Xv[Xx[X!a[X!b[X!d[X!j[X!{[X#WdX#[[X#][X#^[X#_[X#`[X#a[X#b[X#c[X#e[X#g[X#i[X#j[X#o[X'f[X'p[X'w[X'x[X!R[X!S[X~O#m[X~P#'}OQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO#i9nO#j9oO'fQO'p#[O'w!}O'x#OO~O#m,hO~P#*XOQ'iXZ'iXj'iXu'iXv'iXx'iX!a'iX!b'iX!d'iX!j'iX#['iX#]'iX#^'iX#_'iX#`'iX#a'iX#b'iX#e'iX#g'iX#i'iX#j'iX'f'iX'p'iX'w'iX'x'iX!R'iX~O!{9sO#o9sO#c'iX#m'iX!S'iX~P#,SO_&sa!R&sa'W&sa!c&san&sa!O&sa!T&sa%Q&sa!]&sa~P!)wOQ#ZiZ#Zi_#Zij#Ziv#Zi!R#Zi!a#Zi!b#Zi!d#Zi!j#Zi#[#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'f#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~P!BpO_#ni!R#ni'W#ni!O#ni!c#nin#ni!T#ni%Q#ni!]#ni~P!)wO#z,jO~O#z,kO~O!]'lO!{,lO!T$OX#w$OX#z$OX$R$OX~O!Q,mO~O!T'oO#w,oO#z'nO$R,pO~O!R9pO!S'hX~P#*XO!S,qO~O$R,sO~OS'}O'U(OO'V,vO~O],yOk,yO!O,zO~O!RdX!]dX!cdX!c$eX'pdX~P!!rO!c-QO~P!BpO!R-RO!]!wO'p&oO!c'}X~O!c-WO~O!Q(`O']$bO!c'}P~O#W-YO~O!O$eX!R$eX!]$lX~P!!rO!R-ZO!O(OX~P!BpO!]-]O~O!O-_O~Oj-cO!]!wO!d$ZO'b$PO'p&oO~O!])aO~O_$^O!R-hO'W$^O~O!S-jO~P!&jO!X-kO!Y-kO'^$dO'g(jO~Ox-mO'g(jO~O!x-nO~O']${O!R&xX'a&xX~O!R(yO'a'ca~O'a-sO~Ou-tOv-tOx-uOPra'wra'xra!Rra!{ra~O'ara#mra~P#7pOu(SOx(TOP$^a'w$^a'x$^a!R$^a!{$^a~O'a$^a#m$^a~P#8fOu(SOx(TOP$`a'w$`a'x$`a!R$`a!{$`a~O'a$`a#m$`a~P#9XO]-vO~O#W-wO~O'a$na!R$na!{$na#m$na~P!#{O#W-zO~OP.TO!T&dO!o.SO%Q.RO~O]#qOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO'b$PO'f#sO~Oh.VO'].UO~P#:yO!])aO!T'`a_'`a!R'`a'W'`a~O#W.]O~OZ[X!RdX!SdX~O!R.^O!S(VX~O!S.`O~OZ.aO~O].cO'])iO~O!T$lO']$bO^'QX!R'QX~O!R)nO^(Ua~O!c.fO~P!)wO].hO~OZ.iO~O^.jO~OP.TO!T&dO!o.SO%Q.RO'b$PO~O!R)zO_(Ra'W(Ra~O!{.pO~OP.sO!T#zO~O'g'TO!S(SP~OP.}O!T.yO!o.|O%Q.{O'b$PO~OZ/XO!R/VO!S(TX~O!S/YO~O^/[O_$^O'W$^O~O]/]O~O]/^O'](|O~O#c/_O%r/`O~P0zO!{#eO#c/_O%r/`O~O_/aO~P){O_/cO~O%{/gOQ%yiR%yiX%yi]%yi_%yib%yic%yih%yij%yik%yil%yiq%yis%yix%yi{%yi|%yi}%yi!T%yi!_%yi!d%yi!g%yi!h%yi!i%yi!j%yi!k%yi!n%yi#d%yi#t%yi#x%yi%P%yi%R%yi%T%yi%U%yi%X%yi%Z%yi%^%yi%_%yi%a%yi%n%yi%t%yi%v%yi%x%yi%z%yi%}%yi&T%yi&Z%yi&]%yi&_%yi&a%yi&c%yi'S%yi']%yi'f%yi'o%yi'|%yi!S%yi`%yi&Q%yi~O`/mO!S/kO&Q/lO~P`O!TSO!d/oO~O&X*wOQ&SiR&SiX&Si]&Si_&Sib&Sic&Sih&Sij&Sik&Sil&Siq&Sis&Six&Si{&Si|&Si}&Si!T&Si!_&Si!d&Si!g&Si!h&Si!i&Si!j&Si!k&Si!n&Si#d&Si#t&Si#x&Si%P&Si%R&Si%T&Si%U&Si%X&Si%Z&Si%^&Si%_&Si%a&Si%n&Si%t&Si%v&Si%x&Si%z&Si%}&Si&T&Si&Z&Si&]&Si&_&Si&a&Si&c&Si'S&Si']&Si'f&Si'o&Si'|&Si!S&Si%{&Si`&Si&Q&Si~O!R#bOn$]a~O!O&ii!R&ii~P!)wO!R%zO!O'ji~O!R&`O!O'ti~O!O/uO~O!R!Va!S!Va~P#*XO]&ROk&RO!Q/{O'g(jO!R&jX!S&jX~P@dO!R+`O!S'ka~O]&ZOk&ZO!Q)yO'g'TO!R&oX!S&oX~O!R+cO!S'va~O!O'ui!R'ui~P!)wO_$^O!]!wO!d$ZO!j0VO!{0TO'W$^O'b$PO'p&oO~O!S0YO~P!?iO!X0ZO!Y0ZO'^$dO'g(jO'o+iO~O!W0[O~P#MSO!TSO!W0[O!u0^O!x0_O~P#MSO!W0[O!s0aO!t0aO!u0^O!x0_O~P#MSO!T&dO~O!T&dO~P!BpO!R'ri!c'ri_'ri'W'ri~P!)wO!{0jO!R'ri!c'ri_'ri'W'ri~O!R&tO!c'qi~Ox$uO!T$vO#V0lO']$bO~O#WraQraZra_rajra!ara!bra!dra!jra#[ra#]ra#^ra#_ra#`ra#ara#bra#cra#era#gra#ira#jra'Wra'fra'pra!cra!Ora!Tranra%Qra!]ra~P#7pO#W$^aQ$^aZ$^a_$^aj$^av$^a!a$^a!b$^a!d$^a!j$^a#[$^a#]$^a#^$^a#_$^a#`$^a#a$^a#b$^a#c$^a#e$^a#g$^a#i$^a#j$^a'W$^a'f$^a'p$^a!c$^a!O$^a!T$^an$^a%Q$^a!]$^a~P#8fO#W$`aQ$`aZ$`a_$`aj$`av$`a!a$`a!b$`a!d$`a!j$`a#[$`a#]$`a#^$`a#_$`a#`$`a#a$`a#b$`a#c$`a#e$`a#g$`a#i$`a#j$`a'W$`a'f$`a'p$`a!c$`a!O$`a!T$`an$`a%Q$`a!]$`a~P#9XO#W$naQ$naZ$na_$naj$nav$na!R$na!a$na!b$na!d$na!j$na#[$na#]$na#^$na#_$na#`$na#a$na#b$na#c$na#e$na#g$na#i$na#j$na'W$na'f$na'p$na!c$na!O$na!T$na!{$nan$na%Q$na!]$na~P!BpO_#Oq!R#Oq'W#Oq!O#Oq!c#Oqn#Oq!T#Oq%Q#Oq!]#Oq~P!)wO!R&kX'a&kX~PJjO!R,_O'a'ma~O!Q0tO!R&lX!c&lX~P){O!R,bO!c'na~O!R,bO!c'na~P!)wO#m!fa!S!fa~PCfO#m!^a!R!^a!S!^a~P#*XO!T1XO#x^O$P1YO~O!S1^O~On1_O~P!BpO_$Yq!R$Yq'W$Yq!O$Yq!c$Yqn$Yq!T$Yq%Q$Yq!]$Yq~P!)wO!O1`O~O],yOk,yO~Ou(SOx(TO'x(XOP$xi'w$xi!R$xi!{$xi~O'a$xi#m$xi~P$.POu(SOx(TOP$zi'w$zi'x$zi!R$zi!{$zi~O'a$zi#m$zi~P$.rO'p#[O~P!BpO!Q1cO']$bO!R&tX!c&tX~O!R-RO!c'}a~O!R-RO!]!wO!c'}a~O!R-RO!]!wO'p&oO!c'}a~O'a$gi!R$gi!{$gi#m$gi~P!#{O!Q1kO'](eO!O&vX!R&vX~P!$jO!R-ZO!O(Oa~O!R-ZO!O(Oa~P!BpO!]!wO~O!]!wO#c1sO~Oj1vO!]!wO'p&oO~O!R'di'a'di~P!#{O!{1yO!R'di'a'di~P!#{O!c1|O~O_$Zq!R$Zq'W$Zq!O$Zq!c$Zqn$Zq!T$Zq%Q$Zq!]$Zq~P!)wO!R2QO!T(PX~P!BpO!T&dO%Q2TO~O!T&dO%Q2TO~P!BpO!T$eX$u[X_$eX!R$eX'W$eX~P!!rO$u2XOPgXugXxgX!TgX'wgX'xgX_gX!RgX'WgX~O$u2XO~O]2_O%R2`O'])iO!R'PX!S'PX~O!R.^O!S(Va~OZ2dO~O^2eO~O]2hO~OP2jO!T&dO!o2iO%Q2TO~O_$^O'W$^O~P!BpO!T#zO~P!BpO!R2oO!{2qO!S(SX~O!S2rO~Ox;oO!W2{O!X2tO!Y2tO!r2zO!s2yO!t2yO!x2xO'^$dO'g(jO'o+iO~O!S2wO~P$7ZOP3SO!T.yO!o3RO%Q3QO~OP3SO!T.yO!o3RO%Q3QO'b$PO~O'](|O!R'OX!S'OX~O!R/VO!S(Ta~O]3^O'g3]O~O]3_O~O^3aO~O!c3dO~P){O_3fO~O_3fO~P){O#c3hO%r3iO~PFOO`/mO!S3mO&Q/lO~P`O!]3oO~O!R#Ti!S#Ti~P#*XO!{3qO!R#Ti!S#Ti~O!R!Vi!S!Vi~P#*XO_$^O!{3xO'W$^O~O_$^O!]!wO!{3xO'W$^O~O!X3|O!Y3|O'^$dO'g(jO'o+iO~O_$^O!]!wO!d$ZO!j3}O!{3xO'W$^O'b$PO'p&oO~O!W4OO~P$;xO!W4OO!u4RO!x4SO~P$;xO_$^O!]!wO!j3}O!{3xO'W$^O'p&oO~O!R'rq!c'rq_'rq'W'rq~P!)wO!R&tO!c'qq~O#W$xiQ$xiZ$xi_$xij$xiv$xi!a$xi!b$xi!d$xi!j$xi#[$xi#]$xi#^$xi#_$xi#`$xi#a$xi#b$xi#c$xi#e$xi#g$xi#i$xi#j$xi'W$xi'f$xi'p$xi!c$xi!O$xi!T$xin$xi%Q$xi!]$xi~P$.PO#W$ziQ$ziZ$zi_$zij$ziv$zi!a$zi!b$zi!d$zi!j$zi#[$zi#]$zi#^$zi#_$zi#`$zi#a$zi#b$zi#c$zi#e$zi#g$zi#i$zi#j$zi'W$zi'f$zi'p$zi!c$zi!O$zi!T$zin$zi%Q$zi!]$zi~P$.rO#W$giQ$giZ$gi_$gij$giv$gi!R$gi!a$gi!b$gi!d$gi!j$gi#[$gi#]$gi#^$gi#_$gi#`$gi#a$gi#b$gi#c$gi#e$gi#g$gi#i$gi#j$gi'W$gi'f$gi'p$gi!c$gi!O$gi!T$gi!{$gin$gi%Q$gi!]$gi~P!BpO!R&ka'a&ka~P!#{O!R&la!c&la~P!)wO!R,bO!c'ni~O#m#Oi!R#Oi!S#Oi~P#*XOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O'fQOZ#Zij#Zi!a#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~O#[#Zi~P$EiO#[9eO~P$EiOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO'fQOZ#Zi!a#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~Oj#Zi~P$GqOj9gO~P$GqOQ#^Oj9gOu!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO'fQO#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~OZ#Zi!a#Zi#a#Zi#b#Zi#c#Zi~P$IyOZ9rO!a9iO#a9iO#b9iO#c9iO~P$IyOQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO'fQO#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'x#Zi!R#Zi!S#Zi~O'w#Zi~P$L_O'w!}O~P$L_OQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO'fQO'w!}O#i#Zi#j#Zi#m#Zi'p#Zi!R#Zi!S#Zi~O'x#Zi~P$NgO'x#OO~P$NgOQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO#i9nO'fQO'w!}O'x#OO~O#j#Zi#m#Zi'p#Zi!R#Zi!S#Zi~P%!oO_#ky!R#ky'W#ky!O#ky!c#kyn#ky!T#ky%Q#ky!]#ky~P!)wOP;vOu(SOx(TO'w(VO'x(XO~OQ#ZiZ#Zij#Ziv#Zi!a#Zi!b#Zi!d#Zi!j#Zi#[#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'f#Zi'p#Zi!R#Zi!S#Zi~P%%aO!b!yOP'eXu'eXx'eX'w'eX'x'eX!S'eX~OQ'eXZ'eXj'eXv'eX!a'eX!d'eX!j'eX#['eX#]'eX#^'eX#_'eX#`'eX#a'eX#b'eX#c'eX#e'eX#g'eX#i'eX#j'eX#m'eX'f'eX'p'eX!R'eX~P%'eO#m#ni!R#ni!S#ni~P#*XO!S4eO~O!R&sa!S&sa~P#*XO!]!wO'p&oO!R&ta!c&ta~O!R-RO!c'}i~O!R-RO!]!wO!c'}i~O'a$gq!R$gq!{$gq#m$gq~P!#{O!O&va!R&va~P!BpO!]4lO~O!R-ZO!O(Oi~P!BpO!R-ZO!O(Oi~O!O4pO~O!]!wO#c4uO~Oj4vO!]!wO'p&oO~O!O4xO~O'a$iq!R$iq!{$iq#m$iq~P!#{O_$Zy!R$Zy'W$Zy!O$Zy!c$Zyn$Zy!T$Zy%Q$Zy!]$Zy~P!)wO!R2QO!T(Pa~O!T&dO%Q4}O~O!T&dO%Q4}O~P!BpO_#Oy!R#Oy'W#Oy!O#Oy!c#Oyn#Oy!T#Oy%Q#Oy!]#Oy~P!)wOZ5QO~O]5SO'])iO~O!R.^O!S(Vi~O]5VO~O^5WO~O'g'TO!R&{X!S&{X~O!R2oO!S(Sa~O!S5eO~P$7ZOx;sO'g(jO'o+iO~O!W5hO!X5gO!Y5gO!x0_O'^$dO'g(jO'o+iO~O!s5iO!t5iO~P%0^O!X5gO!Y5gO'^$dO'g(jO'o+iO~O!T.yO~O!T.yO%Q5kO~O!T.yO%Q5kO~P!BpOP5pO!T.yO!o5oO%Q5kO~OZ5uO!R'Oa!S'Oa~O!R/VO!S(Ti~O]5xO~O!c5yO~O!c5zO~O!c5{O~O!c5{O~P){O_5}O~O!]6QO~O!c6RO~O!R'ui!S'ui~P#*XO_$^O'W$^O~P!)wO_$^O!{6WO'W$^O~O_$^O!]!wO!{6WO'W$^O~O!X6]O!Y6]O'^$dO'g(jO'o+iO~O_$^O!]!wO!j6^O!{6WO'W$^O'p&oO~O!d$ZO'b$PO~P%4xO!W6_O~P%4gO!R'ry!c'ry_'ry'W'ry~P!)wO#W$gqQ$gqZ$gq_$gqj$gqv$gq!R$gq!a$gq!b$gq!d$gq!j$gq#[$gq#]$gq#^$gq#_$gq#`$gq#a$gq#b$gq#c$gq#e$gq#g$gq#i$gq#j$gq'W$gq'f$gq'p$gq!c$gq!O$gq!T$gq!{$gqn$gq%Q$gq!]$gq~P!BpO#W$iqQ$iqZ$iq_$iqj$iqv$iq!R$iq!a$iq!b$iq!d$iq!j$iq#[$iq#]$iq#^$iq#_$iq#`$iq#a$iq#b$iq#c$iq#e$iq#g$iq#i$iq#j$iq'W$iq'f$iq'p$iq!c$iq!O$iq!T$iq!{$iqn$iq%Q$iq!]$iq~P!BpO!R&li!c&li~P!)wO#m#Oq!R#Oq!S#Oq~P#*XOu-tOv-tOx-uOPra'wra'xra!Sra~OQraZrajra!ara!bra!dra!jra#[ra#]ra#^ra#_ra#`ra#ara#bra#cra#era#gra#ira#jra#mra'fra'pra!Rra~P%;OOu(SOx(TOP$^a'w$^a'x$^a!S$^a~OQ$^aZ$^aj$^av$^a!a$^a!b$^a!d$^a!j$^a#[$^a#]$^a#^$^a#_$^a#`$^a#a$^a#b$^a#c$^a#e$^a#g$^a#i$^a#j$^a#m$^a'f$^a'p$^a!R$^a~P%=SOu(SOx(TOP$`a'w$`a'x$`a!S$`a~OQ$`aZ$`aj$`av$`a!a$`a!b$`a!d$`a!j$`a#[$`a#]$`a#^$`a#_$`a#`$`a#a$`a#b$`a#c$`a#e$`a#g$`a#i$`a#j$`a#m$`a'f$`a'p$`a!R$`a~P%?WOQ$naZ$naj$nav$na!a$na!b$na!d$na!j$na#[$na#]$na#^$na#_$na#`$na#a$na#b$na#c$na#e$na#g$na#i$na#j$na#m$na'f$na'p$na!R$na!S$na~P%%aO#m$Yq!R$Yq!S$Yq~P#*XO#m$Zq!R$Zq!S$Zq~P#*XO!S6hO~O#m6iO~P!#{O!]!wO!R&ti!c&ti~O!]!wO'p&oO!R&ti!c&ti~O!R-RO!c'}q~O!O&vi!R&vi~P!BpO!R-ZO!O(Oq~O!O6oO~P!BpO!O6oO~O!R'dy'a'dy~P!#{O!R&ya!T&ya~P!BpO!T$tq_$tq!R$tq'W$tq~P!BpOZ6vO~O!R.^O!S(Vq~O]6yO~O!T&dO%Q6zO~O!T&dO%Q6zO~P!BpO!{6{O!R&{a!S&{a~O!R2oO!S(Si~P#*XO!X7RO!Y7RO'^$dO'g(jO'o+iO~O!W7TO!x4SO~P%GXO!T.yO%Q7WO~O!T.yO%Q7WO~P!BpO]7_O'g7^O~O!R/VO!S(Tq~O!c7aO~O!c7aO~P){O!c7cO~O!c7dO~O!R#Ty!S#Ty~P#*XO_$^O!{7jO'W$^O~O_$^O!]!wO!{7jO'W$^O~O!X7mO!Y7mO'^$dO'g(jO'o+iO~O_$^O!]!wO!j7nO!{7jO'W$^O'p&oO~O#m#ky!R#ky!S#ky~P#*XOQ$giZ$gij$giv$gi!a$gi!b$gi!d$gi!j$gi#[$gi#]$gi#^$gi#_$gi#`$gi#a$gi#b$gi#c$gi#e$gi#g$gi#i$gi#j$gi#m$gi'f$gi'p$gi!R$gi!S$gi~P%%aOu(SOx(TO'x(XOP$xi'w$xi!S$xi~OQ$xiZ$xij$xiv$xi!a$xi!b$xi!d$xi!j$xi#[$xi#]$xi#^$xi#_$xi#`$xi#a$xi#b$xi#c$xi#e$xi#g$xi#i$xi#j$xi#m$xi'f$xi'p$xi!R$xi~P%LjOu(SOx(TOP$zi'w$zi'x$zi!S$zi~OQ$ziZ$zij$ziv$zi!a$zi!b$zi!d$zi!j$zi#[$zi#]$zi#^$zi#_$zi#`$zi#a$zi#b$zi#c$zi#e$zi#g$zi#i$zi#j$zi#m$zi'f$zi'p$zi!R$zi~P%NnO#m$Zy!R$Zy!S$Zy~P#*XO#m#Oy!R#Oy!S#Oy~P#*XO!]!wO!R&tq!c&tq~O!R-RO!c'}y~O!O&vq!R&vq~P!BpO!O7tO~P!BpO!R.^O!S(Vy~O!R2oO!S(Sq~O!X8QO!Y8QO'^$dO'g(jO'o+iO~O!T.yO%Q8TO~O!T.yO%Q8TO~P!BpO!c8WO~O_$^O!{8]O'W$^O~O_$^O!]!wO!{8]O'W$^O~OQ$gqZ$gqj$gqv$gq!a$gq!b$gq!d$gq!j$gq#[$gq#]$gq#^$gq#_$gq#`$gq#a$gq#b$gq#c$gq#e$gq#g$gq#i$gq#j$gq#m$gq'f$gq'p$gq!R$gq!S$gq~P%%aOQ$iqZ$iqj$iqv$iq!a$iq!b$iq!d$iq!j$iq#[$iq#]$iq#^$iq#_$iq#`$iq#a$iq#b$iq#c$iq#e$iq#g$iq#i$iq#j$iq#m$iq'f$iq'p$iq!R$iq!S$iq~P%%aO'a$|!Z!R$|!Z!{$|!Z#m$|!Z~P!#{O!R&{q!S&{q~P#*XO_$^O!{8oO'W$^O~O#W$|!ZQ$|!ZZ$|!Z_$|!Zj$|!Zv$|!Z!R$|!Z!a$|!Z!b$|!Z!d$|!Z!j$|!Z#[$|!Z#]$|!Z#^$|!Z#_$|!Z#`$|!Z#a$|!Z#b$|!Z#c$|!Z#e$|!Z#g$|!Z#i$|!Z#j$|!Z'W$|!Z'f$|!Z'p$|!Z!c$|!Z!O$|!Z!T$|!Z!{$|!Zn$|!Z%Q$|!Z!]$|!Z~P!BpOP;uOu(SOx(TO'w(VO'x(XO~O!S!za!W!za!X!za!Y!za!r!za!s!za!t!za!x!za'^!za'g!za'o!za~P&,_O!W'eX!X'eX!Y'eX!r'eX!s'eX!t'eX!x'eX'^'eX'g'eX'o'eX~P%'eOQ$|!ZZ$|!Zj$|!Zv$|!Z!a$|!Z!b$|!Z!d$|!Z!j$|!Z#[$|!Z#]$|!Z#^$|!Z#_$|!Z#`$|!Z#a$|!Z#b$|!Z#c$|!Z#e$|!Z#g$|!Z#i$|!Z#j$|!Z#m$|!Z'f$|!Z'p$|!Z!R$|!Z!S$|!Z~P%%aO!Wra!Xra!Yra!rra!sra!tra!xra'^ra'gra'ora~P%;OO!W$^a!X$^a!Y$^a!r$^a!s$^a!t$^a!x$^a'^$^a'g$^a'o$^a~P%=SO!W$`a!X$`a!Y$`a!r$`a!s$`a!t$`a!x$`a'^$`a'g$`a'o$`a~P%?WO!S$na!W$na!X$na!Y$na!r$na!s$na!t$na!x$na'^$na'g$na'o$na~P&,_O!W$xi!X$xi!Y$xi!r$xi!s$xi!t$xi!x$xi'^$xi'g$xi'o$xi~P%LjO!W$zi!X$zi!Y$zi!r$zi!s$zi!t$zi!x$zi'^$zi'g$zi'o$zi~P%NnO!S$gi!W$gi!X$gi!Y$gi!r$gi!s$gi!t$gi!x$gi'^$gi'g$gi'o$gi~P&,_O!S$gq!W$gq!X$gq!Y$gq!r$gq!s$gq!t$gq!x$gq'^$gq'g$gq'o$gq~P&,_O!S$iq!W$iq!X$iq!Y$iq!r$iq!s$iq!t$iq!x$iq'^$iq'g$iq'o$iq~P&,_O!S$|!Z!W$|!Z!X$|!Z!Y$|!Z!r$|!Z!s$|!Z!t$|!Z!x$|!Z'^$|!Z'g$|!Z'o$|!Z~P&,_On'hX~P.jOn[X!O[X!c[X%r[X!T[X%Q[X!][X~P$zO!]dX!c[X!cdX'pdX~P;dOQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!TSO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O']'cO'fQO'oYO'|;^O~O]#qOh$QOj#rOk#qOl#qOq$ROs9uOx#yO!T#zO!_;fO!d#vO#V:OO#t$VO$_9xO$a9{O$d$WO']&{O'b$PO'f#sO~O!R9pO!S$]a~O]#qOh$QOj#rOk#qOl#qOq$ROs9vOx#yO!T#zO!_;gO!d#vO#V:PO#t$VO$_9yO$a9|O$d$WO']&{O'b$PO'f#sO~O#d'jO~P&<WO!S[X!SdX~P;dO!]9dO~O#W9cO~O!]!wO#W9cO~O!{9sO~O#c9iO~O!{:QO!R'uX!S'uX~O!{9sO!R'sX!S'sX~O#W:RO~O'a:TO~P!#{O#W:[O~O#W:]O~O#W:^O~O!]!wO#W:_O~O!]!wO#W:RO~O#m:`O~P#*XO#W:aO~O#W:bO~O#W:cO~O#W:dO~O#W:eO~O#W:fO~O#W:gO~O#W:hO~O!O:iO~O#m:jO~P!#{O#m:kO~P!#{O#m:lO~P!#{O!O:mO~P!BpO!O:mO~O!O:nO~P!BpO!]!wO#c;lO~O!]!wO#c;nO~O#x~!b!r!t!u#U#V'|$_$a$d$u%P%Q%R%X%Z%^%_%a%c~UT#x'|#]}'Y'Z#z'Y']'g~",goto:"#Kk(ZPPPPPPPP([P(lP*`PPPP-zPP.a3s7o8SP8SPPP8SP:U8SP8SP:YPP:`P:t?VPPPP?ZPPPP?ZA{PPPBRDdP?ZPFwPPPPHp?ZPPPPPJi?ZPPMjNgPPPPNk!!TP!!]!#^PNg?Z?Z!&n!)i!.[!.[!1kPPP!1r!4h?ZPPPPPPPPPP!7_P!8pPP?Z!9}P?ZP?Z?Z?Z?ZP?Z!;dPP!>]P!AQ!AY!A^!A^P!>YP!Ab!AbP!DVP!DZ?Z?Z!Da!GT8SP8SP8S8SP!HW8S8S!Jf8S!M_8S# g8S8S#!T#$c#$c#$g#$c#$oP#$cP8S#%k8S#'X8S8S-zPPP#(yPP#)c#)cP#)cP#)x#)cPP#*OP#)uP#)u#*b!!X#)u#+P#+V#+Y([#+]([P#+d#+d#+dP([P([P([P([PP([P#+j#+mP#+m([P#+qP#+tP([P([P([P([P([P([([#+z#,U#,[#,b#,p#,v#,|#-W#-^#-m#-s#.R#.X#._#.m#/S#0z#1Y#1`#1f#1l#1r#1|#2S#2Y#2d#2v#2|PPPPPPPP#3SPP#3v#7OPP#8f#8m#8uPP#>a#@t#Fp#Fs#Fv#GR#GUPP#GX#G]#Gz#Hq#Hu#IZPP#I_#Ie#IiP#Il#Ip#Is#Jc#Jy#KO#KR#KU#K[#K_#Kc#KgmhOSj}!n$]%c%f%g%i*o*t/g/jQ$imQ$ppQ%ZyS&V!b+`Q&k!jS(l#z(qQ)g$jQ)t$rQ*`%TQ+f&^S+k&d+mQ+}&lQ-k(sQ/U*aY0Z+o+p+q+r+sS2t.y2vU3|0[0^0aU5g2y2z2{S6]4O4RS7R5h5iQ7m6_R8Q7T$p[ORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!j'e#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ(}$SQ)l$lQ*b%WQ*i%`Q,X9tQ.W)aQ.c)mQ/^*gQ2_.^Q3Z/VQ4^9vQ5S2`R8{9upeOSjy}!n$]%Y%c%f%g%i*o*t/g/jR*d%[&WVOSTjkn}!S!W!k!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%z&S&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;`;a[!cRU!]!`%x&WQ$clQ$hmS$mp$rv$wrs!r!u$Z$u&`&t&w)x)y)z*m+Y+h,S,U/o0lQ%PwQ&h!iQ&j!jS(_#v(cS)f$i$jQ)j$lQ)w$tQ*Z%RQ*_%TS+|&k&lQ-V(`Q.[)gQ.b)mQ.d)nQ.g)rQ/P*[S/T*`*aQ0h+}Q1b-RQ2^.^Q2b.aQ2g.iQ3Y/UQ4i1cQ5R2`Q5U2dQ6u5QR7w6vx#xa!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k!Y$fm!j$h$i$j&U&j&k&l(k)f)g+]+j+|+}-d.[0Q0W0]0h1u3{4Q6Z7k8^Q)`$cQ*P$|Q*S$}Q*^%TQ.k)wQ/O*ZU/S*_*`*aQ3T/PS3X/T/UQ5b2sQ5t3YS7P5c5fS8O7Q7SQ8f8PQ8u8g#[;b!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd;c9d9x9{:O:V:Y:]:b:e:ke;d9r9y9|:P:W:Z:^:c:f:lW#}a$P(y;^S$|t%YQ$}uQ%OvR)}$z%P#|a!w!y#d#v#y$T$U$Y&g'}(W(Y(Z(b(h(w(x)])_)a*O*R+y,_-Y-Z-]-w.R.T.p.s.{.}1a1k1s1y2Q2T2X2j3Q3S4l4u4}5k5p6i6z7W8T9d9r9w9x9y9z9{9|9}:O:P:U:V:W:X:Y:Z:[:]:^:a:b:c:d:e:f:j:k:l;^;i;j;k;l;n;t;u;vT(O#s(PX)O$S9t9u9vU&Z!b$v+cQ'U!{Q)q$oQ.t*TQ1z-tR5^2o&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a$]#aZ!_!o$a%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,i,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|T!XQ!Y&_cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ&X!bR/|+`Y&R!b&V&^+`+fS(k#z(qS+j&d+mS-d(l(sQ-e(mQ-l(tQ.v*VU0W+k+o+pU0]+q+r+sS0b+t2xQ1u-kQ1w-mQ1x-nS2s.y2vU3{0Z0[0^Q4P0_Q4Q0aS5c2t2{S5f2y2zU6Z3|4O4RQ6`4SS7Q5g5hQ7S5iS7k6]6_S8P7R7TQ8^7mQ8g8QQ;h;oR;m;slhOSj}!n$]%c%f%g%i*o*t/g/jQ%k!QS&x!v9cQ)d$gQ*X%PQ*Y%QQ+z&iS,]&}:RS-y)V:_Q.Y)eQ.x*WQ/n*vQ/p*wQ/x+ZQ0`+qQ0f+{S2P-z:gQ2Y.ZS2].]:hQ3r/zQ3u0RQ4U0gQ5P2ZQ6T3tQ6X3zQ6a4VQ7e6RQ7h6YQ8Y7iQ8l8[R8x8n$W#`Z!_!o%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|W(v#{&|1V8qT)Z$a,i$W#_Z!_!o%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|Q'f#`S)Y$a,iR-{)Z&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ%f{Q%g|Q%i!OQ%j!PR/f*rQ&e!iQ)[$cQ+w&hS.Q)`)wS0c+u+vW2S-}.O.P.kS4T0d0eU4|2U2V2WU6s4{5Y5ZQ7v6tR8b7yT+l&d+mS+j&d+mU0W+k+o+pU0]+q+r+sS0b+t2xS2s.y2vU3{0Z0[0^Q4P0_Q4Q0aS5c2t2{S5f2y2zU6Z3|4O4RQ6`4SS7Q5g5hQ7S5iS7k6]6_S8P7R7TQ8^7mR8g8QS+l&d+mT2u.y2vS&r!q/dQ-U(_Q-b(kS0V+j2sQ1g-VS1p-c-lU3}0]0b5fQ4h1bS4s1v1xU6^4P4Q7SQ6k4iQ6r4vR7n6`Q!xXS&q!q/dQ)W$[Q)b$eQ)h$kQ,Q&rQ-T(_Q-a(kQ-f(nQ.X)cQ/Q*]S0U+j2sS1f-U-VS1o-b-lQ1r-eQ1t-gQ3V/RW3y0V0]0b5fQ4g1bQ4k1gS4o1p1xQ4t1wQ5r3WW6[3}4P4Q7SS6j4h4iS6n4p:iQ6p4sQ6}5aQ7[5sS7l6^6`Q7r6kS7s6o:mQ7u6rQ7|7OQ8V7]Q8_7nS8a7t:nQ8d7}Q8s8eQ9Q8tQ9X9RQ:u:pQ;T:zQ;U:{Q;V;hR;[;m$rWORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oS!xn!k!j:o#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR:u;`$rXORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oQ$[b!Y$em!j$h$i$j&U&j&k&l(k)f)g+]+j+|+}-d.[0Q0W0]0h1u3{4Q6Z7k8^S$kn!kQ)c$fQ*]%TW/R*^*_*`*aU3W/S/T/UQ5a2sS5s3X3YU7O5b5c5fQ7]5tU7}7P7Q7SS8e8O8PS8t8f8gQ9R8u!j:p#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ:z;_R:{;`$f]OSTjk}!S!W!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oY!hRU!]!`%xv$wrs!r!u$Z$u&`&t&w)x)y)z*m+Y+h,S,U/o0lQ*j%`!h:q#]#k'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR:t&WS&[!b$vR0O+c$p[ORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!j'e#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR*i%`$roORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oQ'U!{!k:r#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a!h#VZ!_$a%w%}&y'Q'_'`'a'b'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_!R9k'd'u+^,i/v/y0w1P1Q1R1S1W1]3s4]4b4c5`6S6b6f6g7z:|!d#XZ!_$a%w%}&y'Q'a'b'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_}9m'd'u+^,i/v/y0w1R1S1W1]3s4]4b4c5`6S6b6f6g7z:|!`#]Z!_$a%w%}&y'Q'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_Q1a-Px;a'd'u+^,i/v/y0w1W1]3s4]4b4c5`6S6b6f6g7z:|Q;i;pQ;j;qR;k;r&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aS#l`#mR1Y,l&e_ORSTU`jk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k#m$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,l,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aS#g^#nT'n#i'rT#h^#nT'p#i'r&e`ORSTU`jk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k#m$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,l,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aT#l`#mQ#o`R'y#m$rbORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!k;_#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a#RdOSUj}!S!W!n!|#k$]%[%_%`%c%e%f%g%i%m&S&f'w)^*k*o*t+x,m-u.S.|/_/`/a/c/g/j/l1X2i3R3f3h3i5o5}x#{a!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k#[&|!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vQ)S$WQ,x(Sd1V9r9y9|:P:W:Z:^:c:f:le8q9d9x9{:O:V:Y:]:b:e:kx#wa!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;kQ(d#xS(n#z(qQ)T$XQ-g(o#[:w!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd:x9d9x9{:O:V:Y:]:b:e:kd:y9r9y9|:P:W:Z:^:c:f:lQ:};bQ;O;cQ;P;dQ;Q;eQ;R;fR;S;gx#{a!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k#[&|!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd1V9r9y9|:P:W:Z:^:c:f:le8q9d9x9{:O:V:Y:]:b:e:klfOSj}!n$]%c%f%g%i*o*t/g/jQ(g#yQ*}%pQ+O%rR1j-Z%O#|a!w!y#d#v#y$T$U$Y&g'}(W(Y(Z(b(h(w(x)])_)a*O*R+y,_-Y-Z-]-w.R.T.p.s.{.}1a1k1s1y2Q2T2X2j3Q3S4l4u4}5k5p6i6z7W8T9d9r9w9x9y9z9{9|9}:O:P:U:V:W:X:Y:Z:[:]:^:a:b:c:d:e:f:j:k:l;^;i;j;k;l;n;t;u;vQ*Q$}Q.r*SQ2m.qR5]2nT(p#z(qS(p#z(qT2u.y2vQ)b$eQ-f(nQ.X)cQ/Q*]Q3V/RQ5r3WQ6}5aQ7[5sQ7|7OQ8V7]Q8d7}Q8s8eQ9Q8tR9X9Rp(W#t'O)U-X-o-p0q1h1}4f4w7q:v;W;X;Y!n:U&z'i(^(f+v,[,t-P-^-|.P.o.q0e0p1i1m2W2l2n3O4Y4Z4m4q4y5O5Z5n6m6q7Y8`;Z;];p;q;r[:V8p9O9V9Y9Z9]]:W1U4a6c7o7p8zr(Y#t'O)U,}-X-o-p0q1h1}4f4w7q:v;W;X;Y!p:X&z'i(^(f+v,[,t-P-^-|.P.o.q0e0n0p1i1m2W2l2n3O4Y4Z4m4q4y5O5Z5n6m6q7Y8`;Z;];p;q;r^:Y8p9O9T9V9Y9Z9]_:Z1U4a6c6d7o7p8zpeOSjy}!n$]%Y%c%f%g%i*o*t/g/jQ%VxR*k%`peOSjy}!n$]%Y%c%f%g%i*o*t/g/jR%VxQ*U%OR.n)}qeOSjy}!n$]%Y%c%f%g%i*o*t/g/jQ.z*ZS3P/O/PW5j2|2}3O3TU7V5l5m5nU8R7U7X7YQ8h8SR8v8iQ%^yR*e%YR3^/XR7_5uS$mp$rR.d)nQ%czR*o%dR*u%jT/h*t/jR*y%kQ*x%kR/q*yQjOQ!nST$`j!nQ(P#sR,u(PQ!YQR%u!YQ!^RU%{!^%|+UQ%|!_R+U%}Q+a&XR/}+aQ,`'OR0r,`Q,c'QS0u,c0vR0v,dQ+m&dR0X+mS!eR$uU&a!e&b+VQ&b!fR+V&OQ+d&[R0P+dQ&u!sQ,R&sU,V&u,R0mR0m,WQ'r#iR,n'rQ#m`R'x#mQ#cZU'h#c+Q9qQ+Q9_R9q'uQ-S(_W1d-S1e4j6lU1e-T-U-VS4j1f1gR6l4k$k(U#t&z'O'i(^(f)P)Q)U+v,Y,Z,[,t,}-O-P-X-^-o-p-|.P.o.q0e0n0o0p0q1U1h1i1m1}2W2l2n3O4Y4Z4_4`4a4f4m4q4w4y5O5Z5n6c6d6e6m6q7Y7o7p7q8`8p8z8|8}9O9T9U9V9Y9Z9]:v;W;X;Y;Z;];p;q;rQ-[(fU1l-[1n4nQ1n-^R4n1mQ(q#zR-i(qQ(z$OR-r(zQ2R-|R4z2RQ){$xR.m){Q2p.tS5_2p6|R6|5`Q*W%PR.w*WQ2v.yR5d2vQ/W*bS3[/W5vR5v3^Q._)jW2a._2c5T6wQ2c.bQ5T2bR6w5UQ)o$mR.e)oQ/j*tR3l/jWiOSj!nQ%h}Q)X$]Q*n%cQ*p%fQ*q%gQ*s%iQ/e*oS/h*t/jR3k/gQ$_gQ%l!RQ%o!TQ%q!UQ%s!VQ)v$sQ)|$yQ*d%^Q*{%nQ-h(pS/Z*e*hQ/r*zQ/s*}Q/t+OS0S+j2sQ2f.hQ2k.oQ3U/QQ3`/]Q3j/fY3w0U0V0]0b5fQ5X2hQ5[2lQ5q3VQ5w3_[6U3v3y3}4P4Q7SQ6x5VQ7Z5rQ7`5xW7f6V6[6^6`Q7x6yQ7{6}Q8U7[U8X7g7l7nQ8c7|Q8j8VS8k8Z8_Q8r8dQ8w8mQ9P8sQ9S8yQ9W9QR9[9XQ$gmQ&i!jU)e$h$i$jQ+Z&UU+{&j&k&lQ-`(kS.Z)f)gQ/z+]Q0R+jS0g+|+}Q1q-dQ2Z.[Q3t0QS3z0W0]Q4V0hQ4r1uS6Y3{4QQ7i6ZQ8[7kR8n8^S#ua;^R({$PU$Oa$P;^R-q(yQ#taS&z!w)aQ'O!yQ'i#dQ(^#vQ(f#yQ)P$TQ)Q$UQ)U$YQ+v&gQ,Y9wQ,Z9zQ,[9}Q,t'}Q,}(WQ-O(YQ-P(ZQ-X(bQ-^(hQ-o(wQ-p(xd-|)].R.{2T3Q4}5k6z7W8TQ.P)_Q.o*OQ.q*RQ0e+yQ0n:UQ0o:XQ0p:[Q0q,_Q1U9rQ1h-YQ1i-ZQ1m-]Q1}-wQ2W.TQ2l.pQ2n.sQ3O.}Q4Y:aQ4Z:dQ4_9yQ4`9|Q4a:PQ4f1aQ4m1kQ4q1sQ4w1yQ4y2QQ5O2XQ5Z2jQ5n3SQ6c:^Q6d:WQ6e:ZQ6m4lQ6q4uQ7Y5pQ7o:cQ7p:fQ7q6iQ8`:jQ8p9dQ8z:lQ8|9xQ8}9{Q9O:OQ9T:VQ9U:YQ9V:]Q9Y:bQ9Z:eQ9]:kQ:v;^Q;W;iQ;X;jQ;Y;kQ;Z;lQ;];nQ;p;tQ;q;uR;r;vlgOSj}!n$]%c%f%g%i*o*t/g/jS!pU%eQ%n!SQ%t!WQ'V!|Q'v#kS*h%[%_Q*l%`Q*z%mQ+W&SQ+u&fQ,r'wQ.O)^Q/b*kQ0d+xQ1[,mQ1{-uQ2V.SQ2}.|Q3b/_Q3c/`Q3e/aQ3g/cQ3n/lQ4d1XQ5Y2iQ5m3RQ5|3fQ6O3hQ6P3iQ7X5oR7b5}!vZOSUj}!S!n!|$]%[%_%`%c%e%f%g%i%m&S&f)^*k*o*t+x-u.S.|/_/`/a/c/g/j/l2i3R3f3h3i5o5}Q!_RQ!oTQ$akS%w!]%zQ%}!`Q&y!vQ'Q!zQ'W#PQ'X#QQ'Y#RQ'Z#SQ'[#TQ']#UQ'^#VQ'_#WQ'`#XQ'a#YQ'b#ZQ'd#]Q'g#bQ'k#eW'u#k'w,m1XQ)p$nS+R%x+TS+^&W/{Q+g&_Q,O&pQ,^&}Q,d'RQ,g9^Q,i9`Q,w(RQ-x)VQ/v+XQ/y+[Q0i,PQ0s,bQ0w9cQ0x9eQ0y9fQ0z9gQ0{9hQ0|9iQ0}9jQ1O9kQ1P9lQ1Q9mQ1R9nQ1S9oQ1T,hQ1W9sQ1]9pQ2O-zQ2[.]Q3s:QQ3v0TQ4W0jQ4[0tQ4]:RQ4b:TQ4c:_Q5`2qQ6S3qQ6V3xQ6b:`Q6f:gQ6g:hQ7g6WQ7z6{Q8Z7jQ8m8]Q8y8oQ9_!WR:|;aR!aRR&Y!bS&U!b+`S+]&V&^R0Q+fR'P!yR'S!zT!tU$ZS!sU$ZU$xrs*mS&s!r!uQ,T&tQ,W&wQ.l)zS0k,S,UR4X0l`!dR!]!`$u%x&`)x+hh!qUrs!r!u$Z&t&w)z,S,U0lQ/d*mQ/w+YQ3p/oT:s&W)yT!gR$uS!fR$uS%y!]&`S&O!`)xS+S%x+hT+_&W)yT&]!b$vQ#i^R'{#nT'q#i'rR1Z,lT(a#v(cR(i#yQ-})]Q2U.RQ2|.{Q4{2TQ5l3QQ6t4}Q7U5kQ7y6zQ8S7WR8i8TlhOSj}!n$]%c%f%g%i*o*t/g/jQ%]yR*d%YV$yrs*mR.u*TR*c%WQ$qpR)u$rR)k$lT%az%dT%bz%dT/i*t/j",nodeNames:"\u26A0 extends ArithOp ArithOp InterpolationStart LineComment BlockComment Script ExportDeclaration export Star as VariableName String from ; default FunctionDeclaration async function VariableDefinition TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation null super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag 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 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",maxTerm:332,context:trackNewline,nodeProps:[["closedBy",4,"InterpolationEnd",40,"]",51,"}",66,")",132,"JSXSelfCloseEndTag JSXEndTag",146,"JSXEndTag"],["group",-26,8,15,17,58,184,188,191,192,194,197,200,211,213,219,221,223,225,228,234,240,242,244,246,248,250,251,"Statement",-30,12,13,24,27,28,41,43,44,45,47,52,60,68,74,75,91,92,101,103,119,122,124,125,126,127,129,130,148,149,151,"Expression",-22,23,25,29,32,34,152,154,156,157,159,160,161,163,164,165,167,168,169,178,180,182,183,"Type",-3,79,85,90,"ClassItem"],["openedBy",30,"InterpolationStart",46,"[",50,"{",65,"(",131,"JSXStartTag",141,"JSXStartTag JSXStartCloseTag"]],propSources:[jsHighlight],skippedNodes:[0,5,6],repeatNodeCount:28,tokenData:"!C}~R!`OX%TXY%cYZ'RZ[%c[]%T]^'R^p%Tpq%cqr'crs(kst0htu2`uv4pvw5ewx6cxy<yyz=Zz{=k{|>k|}?O}!O>k!O!P?`!P!QCl!Q!R!0[!R![!1q![!]!7s!]!^!8V!^!_!8g!_!`!9d!`!a!:[!a!b!<R!b!c%T!c!}2`!}#O!=d#O#P%T#P#Q!=t#Q#R!>U#R#S2`#S#T!>i#T#o2`#o#p!>y#p#q!?O#q#r!?f#r#s!?x#s$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$I|2`$I|$I}!Bq$I}$JO!Bq$JO$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`W%YR$UWO!^%T!_#o%T#p~%T7Z%jg$UW'Y7ROX%TXY%cYZ%TZ[%c[p%Tpq%cq!^%T!_#o%T#p$f%T$f$g%c$g#BY%T#BY#BZ%c#BZ$IS%T$IS$I_%c$I_$JT%T$JT$JU%c$JU$KV%T$KV$KW%c$KW&FU%T&FU&FV%c&FV?HT%T?HT?HU%c?HU~%T7Z'YR$UW'Z7RO!^%T!_#o%T#p~%T$T'jS$UW!j#{O!^%T!_!`'v!`#o%T#p~%T$O'}S#e#v$UWO!^%T!_!`(Z!`#o%T#p~%T$O(bR#e#v$UWO!^%T!_#o%T#p~%T)X(rZ$UW]#eOY(kYZ)eZr(krs*rs!^(k!^!_+U!_#O(k#O#P-b#P#o(k#o#p+U#p~(k&r)jV$UWOr)ers*Ps!^)e!^!_*a!_#o)e#o#p*a#p~)e&r*WR$P&j$UWO!^%T!_#o%T#p~%T&j*dROr*ars*ms~*a&j*rO$P&j)X*{R$P&j$UW]#eO!^%T!_#o%T#p~%T)P+ZV]#eOY+UYZ*aZr+Urs+ps#O+U#O#P+w#P~+U)P+wO$P&j]#e)P+zROr+Urs,Ts~+U)P,[U$P&j]#eOY,nZr,nrs-Vs#O,n#O#P-[#P~,n#e,sU]#eOY,nZr,nrs-Vs#O,n#O#P-[#P~,n#e-[O]#e#e-_PO~,n)X-gV$UWOr(krs-|s!^(k!^!_+U!_#o(k#o#p+U#p~(k)X.VZ$P&j$UW]#eOY.xYZ%TZr.xrs/rs!^.x!^!_,n!_#O.x#O#P0S#P#o.x#o#p,n#p~.x#m/PZ$UW]#eOY.xYZ%TZr.xrs/rs!^.x!^!_,n!_#O.x#O#P0S#P#o.x#o#p,n#p~.x#m/yR$UW]#eO!^%T!_#o%T#p~%T#m0XT$UWO!^.x!^!_,n!_#o.x#o#p,n#p~.x3]0mZ$UWOt%Ttu1`u!^%T!_!c%T!c!}1`!}#R%T#R#S1`#S#T%T#T#o1`#p$g%T$g~1`3]1g]$UW'o3TOt%Ttu1`u!Q%T!Q![1`![!^%T!_!c%T!c!}1`!}#R%T#R#S1`#S#T%T#T#o1`#p$g%T$g~1`7Z2k_$UW#zS']$y'g3SOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`[3q_$UW#zSOt%Ttu3ju}%T}!O3j!O!Q%T!Q![3j![!^%T!_!c%T!c!}3j!}#R%T#R#S3j#S#T%T#T#o3j#p$g%T$g~3j$O4wS#^#v$UWO!^%T!_!`5T!`#o%T#p~%T$O5[R$UW#o#vO!^%T!_#o%T#p~%T5b5lU'x5Y$UWOv%Tvw6Ow!^%T!_!`5T!`#o%T#p~%T$O6VS$UW#i#vO!^%T!_!`5T!`#o%T#p~%T)X6jZ$UW]#eOY6cYZ7]Zw6cwx*rx!^6c!^!_8T!_#O6c#O#P:T#P#o6c#o#p8T#p~6c&r7bV$UWOw7]wx*Px!^7]!^!_7w!_#o7]#o#p7w#p~7]&j7zROw7wwx*mx~7w)P8YV]#eOY8TYZ7wZw8Twx+px#O8T#O#P8o#P~8T)P8rROw8Twx8{x~8T)P9SU$P&j]#eOY9fZw9fwx-Vx#O9f#O#P9}#P~9f#e9kU]#eOY9fZw9fwx-Vx#O9f#O#P9}#P~9f#e:QPO~9f)X:YV$UWOw6cwx:ox!^6c!^!_8T!_#o6c#o#p8T#p~6c)X:xZ$P&j$UW]#eOY;kYZ%TZw;kwx/rx!^;k!^!_9f!_#O;k#O#P<e#P#o;k#o#p9f#p~;k#m;rZ$UW]#eOY;kYZ%TZw;kwx/rx!^;k!^!_9f!_#O;k#O#P<e#P#o;k#o#p9f#p~;k#m<jT$UWO!^;k!^!_9f!_#o;k#o#p9f#p~;k&i=QR!d&a$UWO!^%T!_#o%T#p~%Tk=bR!cc$UWO!^%T!_#o%T#p~%T7V=tU'^4V#_#v$UWOz%Tz{>W{!^%T!_!`5T!`#o%T#p~%T$O>_S#[#v$UWO!^%T!_!`5T!`#o%T#p~%T%w>rSj%o$UWO!^%T!_!`5T!`#o%T#p~%T&i?VR!R&a$UWO!^%T!_#o%T#p~%T7Z?gVu5^$UWO!O%T!O!P?|!P!Q%T!Q![@r![!^%T!_#o%T#p~%T!{@RT$UWO!O%T!O!P@b!P!^%T!_#o%T#p~%T!{@iR!Q!s$UWO!^%T!_#o%T#p~%T!{@yZ$UWk!sO!Q%T!Q![@r![!^%T!_!g%T!g!hAl!h#R%T#R#S@r#S#X%T#X#YAl#Y#o%T#p~%T!{AqZ$UWO{%T{|Bd|}%T}!OBd!O!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T!{BiV$UWO!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T!{CVV$UWk!sO!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T7ZCs`$UW#]#vOYDuYZ%TZzDuz{Jl{!PDu!P!Q!-e!Q!^Du!^!_Fx!_!`!.^!`!a!/]!a!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~DuXD|[$UW}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~DuXEy_$UW}PO!^%T!_#Z%T#Z#[Er#[#]%T#]#^Er#^#a%T#a#bEr#b#g%T#g#hEr#h#i%T#i#jEr#j#m%T#m#nEr#n#o%T#p~%TPF}V}POYFxZ!PFx!P!QGd!Q!}Fx!}#OG{#O#PHh#P~FxPGiU}P#Z#[Gd#]#^Gd#a#bGd#g#hGd#i#jGd#m#nGdPHOTOYG{Z#OG{#O#PH_#P#QFx#Q~G{PHbQOYG{Z~G{PHkQOYFxZ~FxXHvY$UWOYHqYZ%TZ!^Hq!^!_G{!_#OHq#O#PIf#P#QDu#Q#oHq#o#pG{#p~HqXIkV$UWOYHqYZ%TZ!^Hq!^!_G{!_#oHq#o#pG{#p~HqXJVV$UWOYDuYZ%TZ!^Du!^!_Fx!_#oDu#o#pFx#p~Du7ZJs^$UW}POYJlYZKoZzJlz{NQ{!PJl!P!Q!,R!Q!^Jl!^!_!!]!_!}Jl!}#O!'|#O#P!+a#P#oJl#o#p!!]#p~Jl7ZKtV$UWOzKoz{LZ{!^Ko!^!_M]!_#oKo#o#pM]#p~Ko7ZL`X$UWOzKoz{LZ{!PKo!P!QL{!Q!^Ko!^!_M]!_#oKo#o#pM]#p~Ko7ZMSR$UWU7RO!^%T!_#o%T#p~%T7RM`ROzM]z{Mi{~M]7RMlTOzM]z{Mi{!PM]!P!QM{!Q~M]7RNQOU7R7ZNX^$UW}POYJlYZKoZzJlz{NQ{!PJl!P!Q! T!Q!^Jl!^!_!!]!_!}Jl!}#O!'|#O#P!+a#P#oJl#o#p!!]#p~Jl7Z! ^_$UWU7R}PO!^%T!_#Z%T#Z#[Er#[#]%T#]#^Er#^#a%T#a#bEr#b#g%T#g#hEr#h#i%T#i#jEr#j#m%T#m#nEr#n#o%T#p~%T7R!!bY}POY!!]YZM]Zz!!]z{!#Q{!P!!]!P!Q!&x!Q!}!!]!}#O!$`#O#P!&f#P~!!]7R!#VY}POY!!]YZM]Zz!!]z{!#Q{!P!!]!P!Q!#u!Q!}!!]!}#O!$`#O#P!&f#P~!!]7R!#|UU7R}P#Z#[Gd#]#^Gd#a#bGd#g#hGd#i#jGd#m#nGd7R!$cWOY!$`YZM]Zz!$`z{!${{#O!$`#O#P!&S#P#Q!!]#Q~!$`7R!%OYOY!$`YZM]Zz!$`z{!${{!P!$`!P!Q!%n!Q#O!$`#O#P!&S#P#Q!!]#Q~!$`7R!%sTU7ROYG{Z#OG{#O#PH_#P#QFx#Q~G{7R!&VTOY!$`YZM]Zz!$`z{!${{~!$`7R!&iTOY!!]YZM]Zz!!]z{!#Q{~!!]7R!&}_}POzM]z{Mi{#ZM]#Z#[!&x#[#]M]#]#^!&x#^#aM]#a#b!&x#b#gM]#g#h!&x#h#iM]#i#j!&x#j#mM]#m#n!&x#n~M]7Z!(R[$UWOY!'|YZKoZz!'|z{!(w{!^!'|!^!_!$`!_#O!'|#O#P!*o#P#QJl#Q#o!'|#o#p!$`#p~!'|7Z!(|^$UWOY!'|YZKoZz!'|z{!(w{!P!'|!P!Q!)x!Q!^!'|!^!_!$`!_#O!'|#O#P!*o#P#QJl#Q#o!'|#o#p!$`#p~!'|7Z!*PY$UWU7ROYHqYZ%TZ!^Hq!^!_G{!_#OHq#O#PIf#P#QDu#Q#oHq#o#pG{#p~Hq7Z!*tX$UWOY!'|YZKoZz!'|z{!(w{!^!'|!^!_!$`!_#o!'|#o#p!$`#p~!'|7Z!+fX$UWOYJlYZKoZzJlz{NQ{!^Jl!^!_!!]!_#oJl#o#p!!]#p~Jl7Z!,Yc$UW}POzKoz{LZ{!^Ko!^!_M]!_#ZKo#Z#[!,R#[#]Ko#]#^!,R#^#aKo#a#b!,R#b#gKo#g#h!,R#h#iKo#i#j!,R#j#mKo#m#n!,R#n#oKo#o#pM]#p~Ko7Z!-lV$UWT7ROY!-eYZ%TZ!^!-e!^!_!.R!_#o!-e#o#p!.R#p~!-e7R!.WQT7ROY!.RZ~!.R$P!.g[$UW#o#v}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~Du]!/f[#wS$UW}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~Du!{!0cd$UWk!sO!O%T!O!P@r!P!Q%T!Q![!1q![!^%T!_!g%T!g!hAl!h#R%T#R#S!1q#S#U%T#U#V!3X#V#X%T#X#YAl#Y#b%T#b#c!2w#c#d!4m#d#l%T#l#m!5{#m#o%T#p~%T!{!1x_$UWk!sO!O%T!O!P@r!P!Q%T!Q![!1q![!^%T!_!g%T!g!hAl!h#R%T#R#S!1q#S#X%T#X#YAl#Y#b%T#b#c!2w#c#o%T#p~%T!{!3OR$UWk!sO!^%T!_#o%T#p~%T!{!3^W$UWO!Q%T!Q!R!3v!R!S!3v!S!^%T!_#R%T#R#S!3v#S#o%T#p~%T!{!3}Y$UWk!sO!Q%T!Q!R!3v!R!S!3v!S!^%T!_#R%T#R#S!3v#S#b%T#b#c!2w#c#o%T#p~%T!{!4rV$UWO!Q%T!Q!Y!5X!Y!^%T!_#R%T#R#S!5X#S#o%T#p~%T!{!5`X$UWk!sO!Q%T!Q!Y!5X!Y!^%T!_#R%T#R#S!5X#S#b%T#b#c!2w#c#o%T#p~%T!{!6QZ$UWO!Q%T!Q![!6s![!^%T!_!c%T!c!i!6s!i#R%T#R#S!6s#S#T%T#T#Z!6s#Z#o%T#p~%T!{!6z]$UWk!sO!Q%T!Q![!6s![!^%T!_!c%T!c!i!6s!i#R%T#R#S!6s#S#T%T#T#Z!6s#Z#b%T#b#c!2w#c#o%T#p~%T$u!7|R!]V$UW#m$fO!^%T!_#o%T#p~%T!q!8^R_!i$UWO!^%T!_#o%T#p~%T5w!8rR'bd!a/n#x&s'|P!P!Q!8{!^!_!9Q!_!`!9_W!9QO$WW#v!9VP#`#v!_!`!9Y#v!9_O#o#v#v!9dO#a#v$u!9kT!{$m$UWO!^%T!_!`'v!`!a!9z!a#o%T#p~%T$P!:RR#W#w$UWO!^%T!_#o%T#p~%T%V!:gT'a!R#a#v$RS$UWO!^%T!_!`!:v!`!a!;W!a#o%T#p~%T$O!:}R#a#v$UWO!^%T!_#o%T#p~%T$O!;_T#`#v$UWO!^%T!_!`5T!`!a!;n!a#o%T#p~%T$O!;uS#`#v$UWO!^%T!_!`5T!`#o%T#p~%T*a!<YV'p#{$UWO!O%T!O!P!<o!P!^%T!_!a%T!a!b!=P!b#o%T#p~%T*[!<vRv*S$UWO!^%T!_#o%T#p~%T$O!=WS$UW#j#vO!^%T!_!`5T!`#o%T#p~%T7V!=kRx6}$UWO!^%T!_#o%T#p~%Tk!={R!Oc$UWO!^%T!_#o%T#p~%T$O!>]S#g#v$UWO!^%T!_!`5T!`#o%T#p~%T$a!>pR$UW'f$XO!^%T!_#o%T#p~%T~!?OO!T~5b!?VT'w5Y$UWO!^%T!_!`5T!`#o%T#p#q!=P#q~%T6X!?oR!S5}nQ$UWO!^%T!_#o%T#p~%TX!@PR!kP$UWO!^%T!_#o%T#p~%T7Z!@gr$UW'Y7R#zS']$y'g3SOX%TXY%cYZ%TZ[%c[p%Tpq%cqt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`7Z!CO_$UW'Z7R#zS']$y'g3SOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`",tokenizers:[tsExtends,noSemicolon,incdecToken,template,0,1,2,3,4,5,6,7,8,9,insertSemicolon],topRules:{Script:[0,7]},dialects:{jsx:12107,ts:12109},dynamicPrecedences:{149:1,176:1},specialized:[{term:289,get:o=>spec_identifier[o]||-1},{term:299,get:o=>spec_word[o]||-1},{term:63,get:o=>spec_LessThan[o]||-1}],tokenPrec:12130}),snippets=[snippetCompletion("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),snippetCompletion("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),snippetCompletion("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),snippetCompletion("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),snippetCompletion("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),snippetCompletion(`try {
|
||
\${}
|
||
} catch (\${error}) {
|
||
\${}
|
||
}`,{label:"try",detail:"/ catch block",type:"keyword"}),snippetCompletion("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),snippetCompletion(`if (\${}) {
|
||
\${}
|
||
} else {
|
||
\${}
|
||
}`,{label:"if",detail:"/ else block",type:"keyword"}),snippetCompletion(`class \${name} {
|
||
constructor(\${params}) {
|
||
\${}
|
||
}
|
||
}`,{label:"class",detail:"definition",type:"keyword"}),snippetCompletion('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),snippetCompletion('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],cache=new NodeWeakMap,ScopeNodes=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function defID(o){return(e,s)=>{let a=e.node.getChild("VariableDefinition");return a&&s(a,o),!0}}const functionContext=["FunctionDeclaration"],gatherCompletions={FunctionDeclaration:defID("function"),ClassDeclaration:defID("class"),ClassExpression:()=>!0,EnumDeclaration:defID("constant"),TypeAliasDeclaration:defID("type"),NamespaceDeclaration:defID("namespace"),VariableDefinition(o,e){o.matchContext(functionContext)||e(o,"variable")},TypeDefinition(o,e){e(o,"type")},__proto__:null};function getScope(o,e){let s=cache.get(e);if(s)return s;let a=[],c=!0;function h(d,g){let _=o.sliceString(d.from,d.to);a.push({label:_,type:g})}return e.cursor(IterMode.IncludeAnonymous).iterate(d=>{if(c)c=!1;else if(d.name){let g=gatherCompletions[d.name];if(g&&g(d,h)||ScopeNodes.has(d.name))return!1}else if(d.to-d.from>8192){for(let g of getScope(o,d.node))a.push(g);return!1}}),cache.set(e,a),a}const Identifier=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,dontComplete=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function localCompletionSource(o){let e=syntaxTree(o.state).resolveInner(o.pos,-1);if(dontComplete.indexOf(e.name)>-1)return null;let s=e.to-e.from<20&&Identifier.test(o.state.sliceDoc(e.from,e.to));if(!s&&!o.explicit)return null;let a=[];for(let c=e;c;c=c.parent)ScopeNodes.has(c.name)&&(a=a.concat(getScope(o.state.doc,c)));return{options:a,from:s?e.from:o.pos,validFor:Identifier}}const javascriptLanguage=LRLanguage.define({parser:parser.configure({props:[indentNodeProp.add({IfStatement:continuedIndent({except:/^\s*({|else\b)/}),TryStatement:continuedIndent({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:flatIndent,SwitchBody:o=>{let e=o.textAfter,s=/^\s*\}/.test(e),a=/^\s*(case|default)\b/.test(e);return o.baseIndent+(s?0:a?1:2)*o.unit},Block:delimitedIndent({closing:"}"}),ArrowFunction:o=>o.baseIndent+o.unit,"TemplateString BlockComment":()=>null,"Statement Property":continuedIndent({except:/^{/}),JSXElement(o){let e=/^\s*<\//.test(o.textAfter);return o.lineIndent(o.node.from)+(e?0:o.unit)},JSXEscape(o){let e=/\s*\}/.test(o.textAfter);return o.lineIndent(o.node.from)+(e?0:o.unit)},"JSXOpenTag JSXSelfClosingTag"(o){return o.column(o.node.from)+o.unit}}),foldNodeProp.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":foldInside,BlockComment(o){return{from:o.from+2,to:o.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),typescriptLanguage=javascriptLanguage.configure({dialect:"ts"}),jsxLanguage=javascriptLanguage.configure({dialect:"jsx"}),tsxLanguage=javascriptLanguage.configure({dialect:"jsx ts"}),keywords="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(o=>({label:o,type:"keyword"}));function javascript(o={}){let e=o.jsx?o.typescript?tsxLanguage:jsxLanguage:o.typescript?typescriptLanguage:javascriptLanguage;return new LanguageSupport(e,[javascriptLanguage.data.of({autocomplete:ifNotIn(dontComplete,completeFromList(snippets.concat(keywords)))}),javascriptLanguage.data.of({autocomplete:localCompletionSource}),o.jsx?autoCloseTags:[]])}function elementName(o,e,s=o.length){if(!e)return"";let a=e.getChild("JSXIdentifier");return a?o.sliceString(a.from,Math.min(a.to,s)):""}const android=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),autoCloseTags=EditorView.inputHandler.of((o,e,s,a)=>{if((android?o.composing:o.compositionStarted)||o.state.readOnly||e!=s||a!=">"&&a!="/"||!javascriptLanguage.isActiveAt(o.state,e,-1))return!1;let{state:c}=o,h=c.changeByRange(d=>{var g,_,b;let{head:$}=d,j=syntaxTree(c).resolveInner($,-1),_e;if(j.name=="JSXStartTag"&&(j=j.parent),a==">"&&j.name=="JSXFragmentTag")return{range:EditorSelection.cursor($+1),changes:{from:$,insert:"><>"}};if(a==">"&&j.name=="JSXIdentifier"){if(((_=(g=j.parent)===null||g===void 0?void 0:g.lastChild)===null||_===void 0?void 0:_.name)!="JSXEndTag"&&(_e=elementName(c.doc,j.parent,$)))return{range:EditorSelection.cursor($+1),changes:{from:$,insert:`></${_e}>`}}}else if(a=="/"&&j.name=="JSXFragmentTag"){let et=j.parent,tt=et==null?void 0:et.parent;if(et.from==$-1&&((b=tt.lastChild)===null||b===void 0?void 0:b.name)!="JSXEndTag"&&(_e=elementName(c.doc,tt==null?void 0:tt.firstChild,$))){let nt=`/${_e}>`;return{range:EditorSelection.cursor($+nt.length),changes:{from:$,insert:nt}}}}return{range:d}});return h.changes.empty?!1:(o.dispatch(h,{userEvent:"input.type",scrollIntoView:!0}),!0)});var createTheme=o=>{var{theme:e,settings:s,styles:a}=o,c={"&":{backgroundColor:s.background,color:s.foreground},".cm-gutters":{}};s.gutterBackground&&(c[".cm-gutters"].backgroundColor=s.gutterBackground),s.gutterForeground&&(c[".cm-gutters"].color=s.gutterForeground),s.gutterBorder&&(c[".cm-gutters"].borderRightColor=s.gutterBorder),s.caret&&(c[".cm-content"]={caretColor:s.caret},c[".cm-cursor, .cm-dropCursor"]={borderLeftColor:s.caret}),s.lineHighlight&&(c[".cm-activeLine"]={backgroundColor:s.lineHighlight},c[".cm-activeLineGutter"]={backgroundColor:s.lineHighlight}),s.selection&&(c["&.cm-focused .cm-selectionBackground .cm-selectionBackground, & .cm-selectionLayer .cm-selectionBackground, ::selection"]={backgroundColor:s.selection}),s.selectionMatch&&(c["& .cm-selectionMatch"]={backgroundColor:s.selectionMatch});var h=EditorView.theme(c,{dark:e==="dark"}),d=HighlightStyle.define(a),g=[h,syntaxHighlighting(d)];return g};const strudelTheme=createTheme({theme:"dark",settings:{background:"#222",foreground:"#75baff",caret:"#ffcc00",selection:"rgba(128, 203, 196, 0.5)",selectionMatch:"#036dd626",lineHighlight:"#8a91991a",gutterBackground:"transparent",gutterForeground:"#676e95"},styles:[{tag:tags.keyword,color:"#c792ea"},{tag:tags.operator,color:"#89ddff"},{tag:tags.special(tags.variableName),color:"#eeffff"},{tag:tags.typeName,color:"#f07178"},{tag:tags.atom,color:"#f78c6c"},{tag:tags.number,color:"#ff5370"},{tag:tags.definition(tags.variableName),color:"#82aaff"},{tag:tags.string,color:"#c3e88d"},{tag:tags.special(tags.string),color:"#f07178"},{tag:tags.comment,color:"#7d8799"},{tag:tags.variableName,color:"#f07178"},{tag:tags.tagName,color:"#ff5370"},{tag:tags.bracket,color:"#a2a1a4"},{tag:tags.meta,color:"#ffcb6b"},{tag:tags.attributeName,color:"#c792ea"},{tag:tags.propertyName,color:"#c792ea"},{tag:tags.className,color:"#decb6b"},{tag:tags.invalid,color:"#ffffff"}]}),style$1="",setFlash=StateEffect.define(),flashField=StateField.define({create(){return Decoration.none},update(o,e){try{for(let s of e.effects)if(s.is(setFlash))if(s.value){const a=Decoration.mark({attributes:{style:"background-color: #FFCA2880"}});o=Decoration.set([a.range(0,e.newDoc.length)])}else o=Decoration.set([]);return o}catch(s){return console.warn("flash error",s),o}},provide:o=>EditorView.decorations.from(o)}),flash=o=>{o.dispatch({effects:setFlash.of(!0)}),setTimeout(()=>{o.dispatch({effects:setFlash.of(!1)})},200)},setHighlights=StateEffect.define(),highlightField=StateField.define({create(){return Decoration.none},update(o,e){try{for(let s of e.effects)if(s.is(setHighlights)){const a=s.value.map(c=>(c.context.locations||[]).map(({start:h,end:d})=>{const g=c.context.color||"#FFCA28";let _=e.newDoc.line(h.line).from+h.column,b=e.newDoc.line(d.line).from+d.column;const $=e.newDoc.length;return _>$||b>$?void 0:Decoration.mark({attributes:{style:`outline: 1.5px solid ${g};`}}).range(_,b)})).flat().filter(Boolean)||[];o=Decoration.set(a,!0)}return o}catch{return Decoration.set([])}},provide:o=>EditorView.decorations.from(o)}),extensions=[javascript(),strudelTheme,highlightField,flashField];function CodeMirror({value:o,onChange:e,onViewChanged:s,onSelectionChange:a,options:c,editorDidMount:h}){const d=react.exports.useCallback(b=>{e==null||e(b)},[e]),g=react.exports.useCallback(b=>{s==null||s(b)},[s]),_=react.exports.useCallback(b=>{b.selectionSet&&a&&(a==null||a(b.state.selection))},[a]);return jsx(Fragment,{children:jsx(ReactCodeMirror,{value:o,onChange:d,onCreateEditor:g,onUpdate:_,extensions})})}const useKeydown=o=>react.exports.useLayoutEffect(()=>(window.addEventListener("keydown",o,!0),()=>window.removeEventListener("keydown",o,!0)),[o]);function useStrudel({defaultOutput:o,interval:e,getTime:s,code:a,evalOnMount:c=!1}){const[h,d]=react.exports.useState(),[g,_]=react.exports.useState(),[b,$]=react.exports.useState(a),[j,_e]=react.exports.useState(),et=a!==b,tt=react.exports.useMemo(()=>new Scheduler({interval:e,onTrigger:o,onError:d,getTime:s}),[o,e]),nt=react.exports.useCallback(async()=>{if(!a){console.log("no code..");return}try{const{pattern:rt}=await evaluate(a);$(a),tt==null||tt.setPattern(rt),_e(rt),_()}catch(rt){_(rt),console.warn("eval error",rt)}},[a,tt]),st=react.exports.useRef();return react.exports.useEffect(()=>{!st.current&&c&&(st.current=!0,nt())},[nt,c]),{schedulerError:h,scheduler:tt,evalError:g,evaluate:nt,activeCode:b,isDirty:et,pattern:j}}function useHighlighting({view:o,pattern:e,active:s,getTime:a}){const c=react.exports.useRef([]),h=react.exports.useRef();react.exports.useEffect(()=>{if(o)if(e&&s){let g=function(){try{const _=a(),$=[Math.max(h.current||_,_-1/10),_+1/60];h.current=_+1/60,c.current=c.current.filter(_e=>_e.whole.end>_);const j=e.queryArc(...$).filter(_e=>_e.hasOnset());c.current=c.current.concat(j),o.dispatch({effects:setHighlights.of(c.current)})}catch{o.dispatch({effects:setHighlights.of([])})}d=requestAnimationFrame(g)},d=requestAnimationFrame(g);return()=>{cancelAnimationFrame(d)}}else c.current=[],o.dispatch({effects:setHighlights.of([])})},[e,s,o])}const style="";evalScope(controls,__vitePreload(()=>Promise.resolve().then(()=>strudel),void 0),__vitePreload(()=>import("./index.fbde1114.js"),[]),__vitePreload(()=>import("./index.bb9bb2c4.js"),[]),__vitePreload(()=>import("./index.5b4bbb94.js"),[]),__vitePreload(()=>import("./index.e7ac54e9.js"),[]),__vitePreload(()=>import("./osc.c09823d8.js"),[]),__vitePreload(()=>import("./index.0dabc914.js"),[]),__vitePreload(()=>import("./serial.b42b098c.js"),[]),__vitePreload(()=>import("./index.cc0b04cf.js"),[]));const defaultTune=`samples({
|
||
bd: ['bd/BT0AADA.wav','bd/BT0AAD0.wav','bd/BT0A0DA.wav','bd/BT0A0D3.wav','bd/BT0A0D0.wav','bd/BT0A0A7.wav'],
|
||
sd: ['sd/rytm-01-classic.wav','sd/rytm-00-hard.wav'],
|
||
hh: ['hh27/000_hh27closedhh.wav','hh/000_hh3closedhh.wav'],
|
||
}, 'github:tidalcycles/Dirt-Samples/master/');
|
||
stack(
|
||
s("bd,[~ <sd!3 sd(3,4,2)>],hh(3,4)") // drums
|
||
.speed(perlin.range(.7,.9)) // random sample speed variation
|
||
//.hush()
|
||
,"<a1 b1*2 a1(3,8) e2>" // bassline
|
||
.off(1/8,x=>x.add(12).degradeBy(.5)) // random octave jumps
|
||
.add(perlin.range(0,.5)) // random pitch variation
|
||
.superimpose(add(.05)) // add second, slightly detuned voice
|
||
.n() // wrap in "n"
|
||
.decay(.15).sustain(0) // make each note of equal length
|
||
.s('sawtooth') // waveform
|
||
.gain(.4) // turn down
|
||
.cutoff(sine.slow(7).range(300,5000)) // automate cutoff
|
||
//.hush()
|
||
,"<Am7!3 <Em7 E7b13 Em7 Ebm7b5>>".voicings() // chords
|
||
.superimpose(x=>x.add(.04)) // add second, slightly detuned voice
|
||
.add(perlin.range(0,.5)) // random pitch variation
|
||
.n() // wrap in "n"
|
||
.s('square') // waveform
|
||
.gain(.16) // turn down
|
||
.cutoff(500) // fixed cutoff
|
||
.attack(1) // slowly fade in
|
||
//.hush()
|
||
,"a4 c5 <e6 a6>".struct("x(5,8)")
|
||
.superimpose(x=>x.add(.04)) // add second, slightly detuned voice
|
||
.add(perlin.range(0,.5)) // random pitch variation
|
||
.n() // wrap in "n"
|
||
.decay(.1).sustain(0) // make notes short
|
||
.s('triangle') // waveform
|
||
.degradeBy(perlin.range(0,.5)) // randomly controlled random removal :)
|
||
.echoWith(4,.125,(x,n)=>x.gain(.15*1/(n+1))) // echo notes
|
||
//.hush()
|
||
)
|
||
.fast(2/3)`,ctx=getAudioContext(),getTime=()=>ctx.currentTime;function App(){const[o,e]=react.exports.useState(defaultTune),[s,a]=react.exports.useState(),{scheduler:c,evaluate:h,schedulerError:d,evalError:g,isDirty:_,activeCode:b,pattern:$}=useStrudel({code:o,defaultOutput:webaudioOutput,getTime});useHighlighting({view:s,pattern:$,active:!(b!=null&&b.includes("strudel disable-highlighting")),getTime:()=>c.phase});const j=g||d;return useKeydown(react.exports.useCallback(async _e=>{(_e.ctrlKey||_e.altKey)&&(_e.code==="Enter"?(_e.preventDefault(),flash(s),await h(),_e.shiftKey&&(panic(),c.stop(),c.start()),c.started||c.start()):_e.code==="Period"&&(c.pause(),panic(),_e.preventDefault()))},[c,h,s])),jsxs("div",{children:[jsxs("nav",{className:"z-[12] w-full flex justify-center absolute bottom-0",children:[jsxs("div",{className:"bg-slate-500 space-x-2 px-2 rounded-t-md",children:[jsx("button",{onClick:async()=>{await h(),await getAudioContext().resume(),c.start()},children:"start"}),jsx("button",{onClick:()=>c.stop(),children:"stop"}),_&&jsx("button",{onClick:()=>h(),children:"eval"})]}),j&&jsxs("p",{children:["error ",j.message]})]}),jsx(CodeMirror,{value:o,onChange:e,onViewChanged:a})]})}client.createRoot(document.getElementById("root")).render(jsx(React.StrictMode,{children:jsx(App,{})}));export{Hap as H,Pattern$3 as P,getDefaultExportFromCjs as a,chooseInWith as b,commonjsGlobal as c,rand as d,strudel as e,getAudioContext as f,getAugmentedNamespace as g,getDestination as h,getCachedBuffer as i,getLoadedBuffer as j,loadGithubSamples as k,loadBuffer as l,mod as m,samples as n,resetLoadedSamples as o,panic as p,getLoadedSamples$1 as q,reify$1 as r,stack as s,webaudioOutput as w};
|