PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.20
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.20
1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 All 164 releases
← All changes | assets/js/template-editor.js +9 -9 1.10.9 → 1.10.20 View file →
@@ -1,15 +1,15 @@
1 -(function(e,t,n,r){var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule||!l.call(e,`default`)?a(n,`default`,{value:e,enumerable:!0}):n,e));t=f(t),n=f(n),r=f(r);var p=e=>typeof e==`string`,m=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},h=e=>e==null?``:String(e),g=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},_=/###/g,v=e=>e&&e.includes(`###`)?e.replace(_,`.`):e,y=e=>!e||p(e),b=(e,t,n)=>{let r=p(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(y(e))return{};let t=v(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return y(e)?{}:{obj:e,k:v(r[i])}},x=(e,t,n)=>{let{obj:r,k:i}=b(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=b(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=b(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},S=(e,t,n,r)=>{let{obj:i,k:a}=b(e,t,Object);i[a]=i[a]||[],i[a].push(n)},C=(e,t)=>{let{obj:n,k:r}=b(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},w=(e,t,n)=>{let r=C(e,n);return r===void 0?C(t,n):r},T=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?p(e[r])||e[r]instanceof String||p(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):T(e[r],t[r],n):e[r]=t[r]);return e},E=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),D={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},O=e=>p(e)?e.replace(/[&<>"'\/]/g,e=>D[e]):e,k=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},A=[` `,`,`,`?`,`!`,`;`],ee=new k(20),te=(e,t,n)=>{t||=``,n||=``;let r=A.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=ee.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},ne=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},re=e=>e?.replace(/_/g,`-`),ie={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},ae=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||ie,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>p(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),p(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},oe=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},se=class extends oe{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):p(n)&&i?o.push(...n.split(i)):o.push(n)));let s=C(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!p(n)?s:ne(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),x(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(p(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=C(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?T(s,n,i):s={...s,...n},x(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},ce={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},le=Symbol(`i18next/PATH_KEY`);function ue(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===le?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function de(e,t){let{[le]:n}=e(ue()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var fe=e=>!p(e)&&typeof e!=`boolean`&&typeof e!=`number`,pe=class e extends oe{constructor(e,t={}){super(),g([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=ae.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=fe(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!te(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:p(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:p(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=de(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?de(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let m=this.resolve(t,i),h=m?.res,g=m?.usedKey||s,_=m?.exactUsedKey||s,v=[`[object Number]`,`[object Function]`,`[object RegExp]`],y=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!p(i.count),S=e.hasDefaultValue(i),C=x?this.pluralResolver.getSuffix(d,i.count,i):``,w=i.ordinal&&x?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,T=x&&!i.ordinal&&i.count===0,E=T&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${C}`]||i[`defaultValue${w}`]||i.defaultValue,D=h;b&&!h&&S&&(D=E);let O=fe(D),k=Object.prototype.toString.apply(D);if(b&&D&&O&&!v.includes(k)&&!(p(y)&&Array.isArray(D))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,D,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(m.res=e,m.usedParams=this.getUsedParamsDetails(i),m):e}if(o){let e=Array.isArray(D),t=e?[]:{},n=e?_:g;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let r=`${n}${o}${e}`;t[e]=S&&!h?this.translate(r,{...i,defaultValue:fe(E)?E[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=D[e])}h=t}}else if(b&&p(y)&&Array.isArray(h))h=h.join(y),h&&=this.extendTranslation(h,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(h)&&S&&(e=!0,h=E),this.isValidLookup(h)||(n=!0,h=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:h,c=S&&E!==h&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,x&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?E:h),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=S&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);T&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||E)})}):n(e,s,E))}h=this.extendTranslation(h,t,i,m,r),n&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?h:void 0,i))}return a?(m.res=h,m.usedParams=this.getUsedParamsDetails(i),m):h}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=p(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!p(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=p(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=ce.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return p(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?de(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!p(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(p(t.context)||typeof t.context==`number`)&&t.context!==``,m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!p(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},me=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ae.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=re(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=re(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(p(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),p(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||p(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=p(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return p(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):p(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},he={zero:0,one:1,two:2,few:3,many:4,other:5},ge={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},_e=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ae.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=re(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),ge;if(!e.match(/-|_/))return ge;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>he[e]-he[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},ve=(e,t,n,r=`.`,i=!0)=>{let a=w(e,t,n);return!a&&i&&p(n)&&(a=ne(e,n,r),a===void 0&&(a=ne(t,n,r))),a},ye=e=>e.replace(/\$/g,`$$$$`),be=class{constructor(e={}){this.logger=ae.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?O:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?E(i):a||`{{`,this.suffix=o?E(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?E(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?E(l):``,this.nestingPrefix=d?E(d):f||E(`$t(`),this.nestingSuffix=p?E(p):m||E(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=ve(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ve(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0){if(typeof l==`function`){let t=l(e,i,r);a=p(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!p(a)&&!this.useRawValueToEscape&&(a=h(a));let s=t.safeValue(a);if(e=e.replace(i[0],ye(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${E(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!p(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!p(i))return i;p(i)||(i=h(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],ye(h(i))),this.regexp.lastIndex=0}return e}},xe=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Se=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(re(r),i),t[o]=s),s(n)}},Ce=e=>(t,n,r)=>e(re(n),r)(t),we=class{constructor(e={}){this.logger=ae.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Se:Ce;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Se(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=xe(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Te=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Ee=class extends oe{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=ae.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{S(n.loaded,[i],a),Te(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();p(e)&&(e=this.languageUtils.toResolveHierarchy(e)),p(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},De=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),p(e[1])&&(t.defaultValue=e[1]),p(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Oe=e=>(p(e.ns)&&(e.ns=[e.ns]),p(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),p(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),ke=()=>{},Ae=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},je=class e extends oe{constructor(e={},t){if(super(),this.options=Oe(e),this.services={},this.logger=ae,this.modules={external:[]},Ae(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(p(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=De();this.options={...n,...this.options,...Oe(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?ae.init(r(this.modules.logger),this.options):ae.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:we;let t=new me(this.options);this.store=new se(this.options.resources,this.options);let n=this.services;n.logger=ae,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new _e(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new be(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Ee(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new pe(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=ke,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=m(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ke){let n=t,r=p(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=m();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=ke,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&ce.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=m();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=p(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(p(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=de(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=de(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=de(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return p(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=m();return this.options.ns?(p(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=m();p(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new me(De());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=ke){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new se(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...De().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new be(n)}return a.translator=new pe(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();je.createInstance,je.dir,je.init,je.loadResources,je.reloadResources,je.use,je.changeLanguage,je.getFixedT,je.t,je.exists,je.setDefaultNamespace,je.hasLoadedNamespace,je.loadNamespaces,je.loadLanguages;function Me(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Ne(e){"@babel/helpers - typeof";return Ne=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ne(e)}function Pe(e,t){if(Ne(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ne(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Fe(e){var t=Pe(e,`string`);return Ne(t)==`symbol`?t:t+``}function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Fe(r.key),r)}}function Le(e,t,n){return t&&Ie(e.prototype,t),n&&Ie(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Re=[],ze=Re.forEach,Be=Re.slice,Ve=[`__proto__`,`constructor`,`prototype`];function He(e){return ze.call(Be.call(arguments,1),function(t){if(t)for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Ve.indexOf(i)>-1||e[i]===void 0&&(e[i]=t[i])}}),e}function Ue(e){return e?typeof e==`function`?new e:e:null}function We(){return{handleEmptyResourcesAsFailed:!0,cacheHitMode:`none`,retryOnFailure:!1}}function Ge(e,t,n,r){var i=e.read.bind(e);if(i.length===2){try{var a=i(t,n);a&&typeof a.then==`function`?a.then(function(e){return r(null,e)}).catch(r):r(null,a)}catch(e){r(e)}return}i(t,n,r)}var Ke=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Me(this,e),this.backends=[],this.type=`backend`,this.allOptions=r,this.init(t,n)}return Le(e,[{key:`init`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=He(n,this.options||{},We()),this.allOptions=r,this.options.backends&&this.options.backends.length>1&&(this.allOptions.saveMissing||this.allOptions.updateMissing)&&this.services&&this.services.logger&&this.services.logger.warn(`i18next-chained-backend: Using multiple backends in combination with saveMissing/updateMissing is not recommended, as it may trigger based on stale data.`),this.options.backends&&this.options.backends.forEach(function(n,i){t.backends[i]=t.backends[i]||Ue(n),t.backends[i].init(e,t.options.backendOptions&&t.options.backendOptions[i]||{},r)}),this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:`read`,value:function(e,t,n){var r=this,i=this.backends.length,a=function(s){if(s>=i)return n(Error(`non of the backend loaded data`),r.options.retryOnFailure);var c=s===i-1,l=r.options.handleEmptyResourcesAsFailed&&!c?0:-1,u=r.backends[s];u.read?Ge(u,e,t,function(i,c,d){if(!i&&c&&Object.keys(c).length>l){if(n(null,c,s),o(s-1,c),u.save&&r.options.cacheHitMode&&[`refresh`,`refreshAndUpdateStore`].indexOf(r.options.cacheHitMode)>-1){if(d&&r.options.refreshExpirationTime&&d+r.options.refreshExpirationTime>Date.now())return;var f=r.backends[s+1];f&&f.read&&Ge(f,e,t,function(n,i){n||i&&(Object.keys(i).length<=l||(o(s,i),r.options.cacheHitMode===`refreshAndUpdateStore`&&r.services&&r.services.resourceStore&&r.services.resourceStore.addResourceBundle(e,t,i)))})}}else a(s+1)}):a(s+1)},o=function(n,i){if(!(n<0)){var a=r.backends[n];a.save&&a.save(e,t,i),o(n-1,i)}};a(0)}},{key:`create`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){},a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backends.forEach(function(o){if(o.create){var s=o.create.bind(o);if(s.length<6){try{var c=s.length===5?s(e,t,n,r,a):s(e,t,n,r);c&&typeof c.then==`function`?c.then(function(e){return i(null,e)}).catch(i):i(null,c)}catch(e){i(e)}return}s(e,t,n,r,i,a)}})}},{key:`reload`,value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,i=t.logger,a=n.language;if(!(a&&a.toLowerCase()===`cimode`)){var o=[],s=function(e){r.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};s(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,`read`,null,null,function(r,a){r&&i.warn(`loading namespace ${e} for language ${t} failed`,r),!r&&a&&i.log(`loaded namespace ${e} for language ${t}`,a),n.loaded(`${t}|${e}`,r,a)})})})}}}])}();Ke.type=`backend`;var qe=[];qe.forEach,qe.slice;var Je=[`__proto__`,`constructor`,`prototype`];function Ye(e){return!(typeof e!=`string`||e.length===0||e.length>128||Je.indexOf(e)>-1||e.indexOf(`..`)>-1||e.indexOf(`\\`)>-1||/[?#%:\s]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function Xe(e){return!(!Ye(e)||e.indexOf(`/`)>-1||e.indexOf(`@`)>-1)}function Ze(e){return!(!Ye(e)||e.indexOf(`//`)>-1)}var Qe={lng:Xe,ns:Ze};function $e(e){return typeof e==`string`?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e}function et(e){if(typeof e!=`string`||e.length===0)return e;try{let t=new URL(e);return t.username||t.password?(t.username=``,t.password=``,t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,`$1`)}}function tt(){return typeof XMLHttpRequest==`function`||typeof XMLHttpRequest==`object`}function nt(e){return!!e&&typeof e.then==`function`}function rt(e){return nt(e)?e:Promise.resolve(e)}var it=/\{\{(.+?)\}\}/g;function at(e,t){let n=!1,r=e.replace(it,(e,r)=>{let i=r.trim();if(Je.indexOf(i)>-1)return e;let a=t[i];if(a==null)return e;let o=Qe[i]||Xe,s=String(a).split(`+`);for(let t of s)if(!o(t))return n=!0,e;return s.join(`+`)});return n?null:r}var ot=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof window<`u`?window:void 0,st;typeof fetch==`function`?st=fetch:ot&&typeof ot.fetch==`function`&&(st=ot.fetch);var ct=tt()&&ot?ot.XMLHttpRequest:void 0,lt=typeof ActiveXObject==`function`&&ot?ot.ActiveXObject:void 0,ut=[`__proto__`,`constructor`,`prototype`],dt=(e,t)=>{if(t&&typeof t==`object`){let n=``;for(let e of Object.keys(t))ut.indexOf(e)>-1||(n+=`&`+encodeURIComponent(e)+`=`+encodeURIComponent(t[e]));if(!n)return e;e=e+(e.indexOf(`?`)===-1?`?`:`&`)+n.slice(1)}return e},ft=(e,t,n,r)=>{let i=e=>{if(!e.ok)return n(e.statusText||`Error`,{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(r){let a=r(e,t);if(a instanceof Promise){a.then(i).catch(n);return}}typeof fetch==`function`?fetch(e,t).then(i).catch(n):st(e,t).then(i).catch(n)},pt=(e,t,n,r)=>{e.queryStringParams&&(t=dt(t,e.queryStringParams));let i={...typeof e.customHeaders==`function`?e.customHeaders():e.customHeaders};typeof window>`u`&&typeof global<`u`&&global.process!==void 0&&global.process.versions&&global.process.versions.node&&(i[`User-Agent`]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),n&&(i[`Content-Type`]=`application/json`);let a=typeof e.requestOptions==`function`?e.requestOptions(n):e.requestOptions,o={method:n?`POST`:`GET`,body:n?e.stringify(n):void 0,headers:i,...e._omitFetchOptions?{}:a},s=typeof e.alternateFetch==`function`&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{ft(t,o,r,s)}catch(n){if(!a||Object.keys(a).length===0||!n.message||n.message.indexOf(`not implemented`)<0)return r(n);try{Object.keys(a).forEach(e=>{delete o[e]}),ft(t,o,r,s),e._omitFetchOptions=!0}catch(e){r(e)}}},mt=(e,t,n,r)=>{n&&typeof n==`object`&&(n=dt(``,n).slice(1)),e.queryStringParams&&(t=dt(t,e.queryStringParams));try{let i=ct?new ct:new lt(`MSXML2.XMLHTTP.3.0`);i.open(n?`POST`:`GET`,t,1),e.crossDomain||i.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader(`Content-Type`,`application/x-www-form-urlencoded`),i.overrideMimeType&&i.overrideMimeType(`application/json`);let a=e.customHeaders;if(a=typeof a==`function`?a():a,a)for(let e of Object.keys(a))ut.indexOf(e)>-1||i.setRequestHeader(e,a[e]);i.onreadystatechange=()=>{i.readyState>3&&r(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(e){console&&console.log(e)}},ht=(e,t,n,r)=>{if(typeof n==`function`&&(r=n,n=void 0),r||=(()=>{}),st&&t.indexOf(`file:`)!==0)return pt(e,t,n,r);if(tt()||typeof ActiveXObject==`function`)return mt(e,t,n,r);r(Error(`No fetch and no xhr implementation found!`))},gt=()=>({loadPath:`/locales/{{lng}}/{{ns}}.json`,addPath:`/locales/add/{{lng}}/{{ns}}`,parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||``}),parseLoadPayload:(e,t)=>void 0,request:ht,reloadInterval:typeof window<`u`?!1:36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:`cors`,credentials:`same-origin`,cache:`default`}}),_t=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type=`backend`,this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={...gt(),...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);typeof e==`object`&&typeof e.unref==`function`&&e.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,i){let a=this.options.loadPath;typeof this.options.loadPath==`function`&&(a=this.options.loadPath(e,n)),a=rt(a),a.then(a=>{if(!a)return i(null,{});let o=at(a,{lng:e.join(`+`),ns:n.join(`+`)});if(o==null){let t=e.map($e).join(`, `),r=n.map($e).join(`, `);return i(Error(`i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[`+t+`] namespaces=[`+r+`]`),!1)}this.loadUrl(o,i,t,r)})}loadUrl(e,t,n,r){let i=typeof n==`string`?[n]:n,a=typeof r==`string`?[r]:r,o=this.options.parseLoadPayload(i,a),s=$e(et(e));this.options.request(this.options,e,o,(e,i)=>{if(i&&(i.status>=500&&i.status<600||!i.status))return t(`failed loading `+s+`; status code: `+i.status,!0);if(i&&i.status>=400&&i.status<500)return t(`failed loading `+s+`; status code: `+i.status,!1);if(!i&&e&&e.message){let n=e.message.toLowerCase();if([`failed`,`fetch`,`network`,`load`].find(e=>n.indexOf(e)>-1))return t(`failed loading `+s+`: `+$e(e.message),!0)}if(e)return t(e,!1);let a,o;try{a=typeof i.data==`string`?this.options.parse(i.data,n,r):i.data}catch{o=`failed parsing `+s+` to json`}if(o)return t(o,!1);t(null,a)})}create(e,t,n,r,i){if(!this.options.addPath)return;typeof e==`string`&&(e=[e]);let a=this.options.parsePayload(t,n,r),o=0,s=[],c=[];e.forEach(n=>{let r=this.options.addPath;typeof this.options.addPath==`function`&&(r=this.options.addPath(n,t));let l=at(r,{lng:n,ns:t});if(l==null){o+=1,i&&o===e.length&&i(s,c);return}this.options.request(this.options,l,a,(t,n)=>{o+=1,s.push(t),c.push(n),o===e.length&&typeof i==`function`&&i(s,c)})})}reload(){let{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&r.toLowerCase()===`cimode`)return;let i=[],a=e=>{t.toResolveHierarchy(e).forEach(e=>{i.indexOf(e)<0&&i.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(e=>a(e)),i.forEach(t=>{this.allOptions.ns.forEach(r=>{e.read(t,r,`read`,null,null,(i,a)=>{i&&n.warn(`loading namespace ${r} for language ${t} failed`,i),!i&&a&&n.log(`loaded namespace ${r} for language ${t}`,a),e.loaded(`${t}|${r}`,i,a)})})})}};_t.type=`backend`;function vt(e,t,n){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yt(Object(n),!0).forEach(function(t){vt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xt=function(){function e(t){Me(this,e),this.store=t.store}return Le(e,[{key:`setItem`,value:function(e,t){if(this.store)try{this.store.setItem(e,t)}catch{}}},{key:`getItem`,value:function(e,t){if(this.store)try{return this.store.getItem(e,t)}catch{}}}])}();function St(){var e=null;try{e=window.localStorage}catch(e){typeof window<`u`&&console.log(`Failed to load local storage.`,e)}return{prefix:`i18next_res_`,expirationTime:6048e5,defaultVersion:void 0,getVersion:void 0,versions:{},store:e}}var Ct=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Me(this,e),this.init(t,n),this.type=`backend`}return Le(e,[{key:`init`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.services=e,this.options=bt(bt(bt({},St()),this.options),t),this.storage=new xt(this.options)}},{key:`read`,value:function(e,t,n){var r=Date.now();if(!this.storage.store)return n(null,null);var i=this.storage.getItem(`${this.options.prefix}${e}-${t}`);if(i)try{i=JSON.parse(i)}catch{i=null}if(i&&Ne(i)===`object`){var a=this.getVersion(e,t);if(i.i18nStamp&&i.i18nStamp+this.options.expirationTime>r&&a===i.i18nVersion){var o=i.i18nStamp;return delete i.i18nVersion,delete i.i18nStamp,n(null,i,o)}}return n(null,null)}},{key:`save`,value:function(e,t,n){if(this.storage.store){var r=bt(bt({},n),{},{i18nStamp:Date.now()}),i=this.getVersion(e,t);i&&(r.i18nVersion=i),this.storage.setItem(`${this.options.prefix}${e}-${t}`,JSON.stringify(r))}}},{key:`getVersion`,value:function(e,t){var n=this.options,r=n.getVersion,i=n.versions,a=n.defaultVersion,o=Object.prototype.hasOwnProperty.call(i,e)?i[e]:void 0;return r?.(e,t)||o||a}}])}();Ct.type=`backend`;var wt={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},Tt=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function Et(e){let t={type:`tag`,name:``,voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(wt[n[1]]||e.charAt(e.length-2)===`/`)&&(t.voidElement=!0),t.name.startsWith(`!--`))){let t=e.indexOf(`-->`);return{type:`comment`,comment:t===-1?``:e.slice(4,t)}}let r=new RegExp(Tt),i=null;for(;i=r.exec(e),i!==null;)if(i[0].trim()){if(i[1]){let e=i[1].trim(),n=[e,null],a=e.indexOf(`=`);a>-1&&(n=[e.slice(0,a),e.slice(a+1)]),t.attrs[n[0]]=n[1],r.lastIndex--}else i[2]&&(t.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1))}return t}var Dt=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Ot=/<\/?([^\s]+?)[/\s>]/,kt=/^\s*$/,At=/^(script|style)$/i,jt=`\0`,Mt=Object.create(null);function Nt(e){e.forEach(function(e){if(e.type===`text`){e.content=e.content.split(jt).join(`<`);return}if(e.type===`comment`){e.comment=e.comment.split(jt).join(`<`);return}for(let t in e.attrs){let n=e.attrs[t];typeof n==`string`&&n.indexOf(jt)>-1&&(e.attrs[t]=n.split(jt).join(`<`))}e.children.length&&Nt(e.children)})}function Pt(e,t){let n=t&&t.components||Mt,r=t&&t.allowedTags,i=!1;if(r){let t=typeof r==`function`?r:function(e){return r.indexOf(e)>-1},n=``,a=0;Dt.lastIndex=0;let o;for(;o=Dt.exec(e);){let r=o[0];n+=e.slice(a,o.index);let s=r.match(Ot);r.startsWith(`<!--`)||s&&t(s[1])?(n+=r,a=o.index+r.length):(i=!0,n+=jt,a=o.index+1,Dt.lastIndex=a)}e=n+e.slice(a)}let a=[],o=[],s,c=-1,l=!1,u=0,d;if(e.indexOf(`<`)!==0){let t=e.indexOf(`<`);a.push({type:`text`,content:t===-1?e:e.substring(0,t)})}let f=[],p;for(;p=Dt.exec(e);)f.push(p);return f.forEach(function(e,t){let n=e[0];if(!n||n.startsWith(`<!--`))return;let r=0,i=0,a=-1,o=null;for(let e=0;e<n.length;e++){let t=n.charAt(e);o?t===o&&(o=null):t===`"`||t===`'`?o=t:t===`<`?(r++,r===2&&(a=e)):t===`>`&&i++}let s=a>-1&&/[a-zA-Z0-9\-!/]/.test(n.charAt(a+1));if(r>i&&s){let e=n.substring(0,a),r=n.substring(e.length);f[t][0]=r,f[t].index+=e.length}}),f.forEach(function(t,r){let i=t[0];if(!i)return;let p=t.index;if(p<u)return;if(l){if(i!==`</`+s.name+`>`)return;l=!1}let m=i.charAt(1)!==`/`,h=i.startsWith(`<!--`),g=p+i.length,_=e.charAt(g),v=f[r+1],y;if(_===`<`&&v){let t=e.substring(g,v.index);y=t.split(`<`).length>t.split(`>`).length}let b;if(h){let t=Et(i);if(c<0)return a.push(t),a;b=o[c],b.children.push(t);let n=e.slice(g,v?v.index:void 0);return n.length>0&&b.children.push({type:`text`,content:n}),a}if(m){c++,s=Et(i),s.type===`tag`&&n[s.name]&&(s.type=`component`,l=!0);let t=!1;if(!l&&!s.voidElement&&At.test(s.name)){t=!0,d||=e.toLowerCase();let n=d.indexOf(`</`+s.name.toLowerCase()+`>`,g),r=n===-1?e.length:n,i=e.slice(g,r);i&&s.children.push({type:`text`,content:i}),u=r}!s.voidElement&&!l&&!t&&_&&_!==`<`&&s.children.push({type:`text`,content:e.slice(g,v?v.index:void 0)}),c===0&&a.push(s),b=o[c-1],b&&b.children.push(s),o[c]=s}if((!m||s.voidElement)&&(c>-1&&(s.voidElement||s.name===i.slice(2,-1))&&(c--,s=c===-1?a:o[c]),!l&&(_!==`<`||y)&&_)){b=c===-1?a:o[c].children;let t=v?v.index:-1,n=e.slice(g,t===-1?void 0:t);kt.test(n)&&(n=` `),(t>-1&&c+b.length>=0||n!==` `)&&b.push({type:`text`,content:n})}}),i&&Nt(a),a}function Ft(e){let t=[];for(let n in e)e[n]===null?t.push(n):t.push(n+`="`+String(e[n]).replace(/"/g,`&quot;`)+`"`);return t.length?` `+t.join(` `):``}function It(e,t){switch(t.type){case`text`:return e+t.content;case`tag`:{let n=t.voidElement&&t.name.toLowerCase()!==`!doctype`?`/>`:`>`;return e+=`<`+t.name+(t.attrs?Ft(t.attrs):``)+n,t.voidElement?e:e+t.children.reduce(It,``)+`</`+t.name+`>`}case`comment`:return e+=`<!--`+t.comment+`-->`,e}}function Lt(e){return e.reduce(function(e,t){return e+It(``,t)},``)}var Rt={parse:Pt,stringify:Lt},zt=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);Ht(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Bt={},Vt=(e,t,n,r)=>{Ht(n)&&Bt[n]||(Ht(n)&&(Bt[n]=new Date),zt(e,t,n,r))},Ht=e=>typeof e==`string`,Ut=e=>typeof e==`object`&&!!e,Wt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Gt={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Kt=e=>Gt[e],qt=e=>e.replace(Wt,Kt),Jt={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:qt,transDefaultProps:void 0},Yt=(e={})=>{Jt={...Jt,...e}},Xt=()=>Jt,Zt,Qt=e=>{Zt=e},$t=()=>Zt,en=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},tn=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?rn(t):t},nn=e=>Array.isArray(e)&&e.every(t.isValidElement),rn=e=>Array.isArray(e)?e:[e],an=(e,t)=>{let n={...t};return n.props={...t.props,...e.props},n},on=e=>{let n={};if(!e)return n;let r=e=>{rn(e).forEach(e=>{Ht(e)||(en(e)?r(tn(e)):Ut(e)&&!(0,t.isValidElement)(e)&&Object.assign(n,e))})};return r(e),n},sn=(e,n,r,i)=>{if(!e)return``;let a=``,o=rn(e),s=n?.transSupportBasicHtmlNodes?n.transKeepBasicHtmlNodesFor??[]:[];return o.forEach((e,o)=>{if(Ht(e)){a+=`${e}`;return}if((0,t.isValidElement)(e)){let{props:t,type:c}=e,l=Object.keys(t).length,u=s.indexOf(c)>-1,d=t.children;if(!d&&u&&!l){a+=`<${c}/>`;return}if(!d&&(!u||l)||t.i18nIsDynamicList){a+=`<${o}></${o}>`;return}if(u&&l<=1){let e=Ht(d)?d:sn(d,n,r,i);a+=`<${c}>${e}</${c}>`;return}let f=sn(d,n,r,i);a+=`<${o}>${f}</${o}>`;return}if(e===null){zt(r,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:i});return}if(Ut(e)){let{format:t,...n}=e,o=Object.keys(n);if(o.length===1){let e=t?`${o[0]}, ${t}`:o[0];a+=`{{${e}}}`;return}zt(r,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:i,child:e});return}zt(r,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:i,child:e})}),a},cn=(e,n,r,i,a,o,s)=>{if(r===``)return[];let c=a.transKeepBasicHtmlNodesFor||[],l=r&&new RegExp(c.map(e=>`<${e}`).join(`|`)).test(r);if(!e&&!n&&!l&&!s)return[r];let u=n??{},d=e=>{rn(e).forEach(e=>{Ht(e)||(en(e)?d(tn(e)):Ut(e)&&!(0,t.isValidElement)(e)&&Object.assign(u,e))})};d(e);let f=Object.keys(u),p=Rt.parse(`<0>${r}</0>`,{allowedTags:e=>/^\d+$/.test(e)||c.indexOf(e)>-1||f.indexOf(e)>-1}),m={...u,...o},h=(e,t,n)=>{let r=tn(e),i=_(r,t.children,n);return nn(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},g=(e,n,r,i,a)=>{e.dummy?(e.children=n,r.push((0,t.cloneElement)(e,{key:i},a?void 0:n))):r.push(...t.Children.map([e],e=>{if(e.type===t.Fragment||e.props?.i18nIsDynamicList!==void 0){let r={key:i};return e&&e.props&&Object.keys(e.props).forEach(t=>{t!==`children`&&t!==`i18nIsDynamicList`&&(r[t]=e.props[t])}),(0,t.createElement)(e.type,r,a?null:n)}let r={key:i};return e&&e.props&&Object.keys(e.props).forEach(t=>{t!==`ref`&&t!==`children`&&(r[t]=e.props[t])}),(0,t.cloneElement)(e,r,a?null:n)}))},_=(e,r,o)=>{let u=rn(e),d=rn(r),f={};return d.reduce((e,r,d)=>{let p=r.children?.[0]?.content&&i.services.interpolator.interpolate(r.children[0].content,m,i.language);if(r.type===`tag`){let v=u[parseInt(r.name,10)];!v&&n&&(v=n[r.name]),o.length===1&&!v&&(v=o[0][r.name]),v||={};let y={...r.attrs};s&&Object.keys(y).forEach(e=>{let t=y[e];Ht(t)&&(y[e]=qt(t))});let b=Object.keys(y).length===0?v:an({props:y},v),x=(0,t.isValidElement)(b),S=x&&en(r,!0)&&!r.voidElement,C=l&&Ut(b)&&b.dummy&&!x,w=Ut(n)&&Object.hasOwnProperty.call(n,r.name);if(Ht(b)){let t=i.services.interpolator.interpolate(b,m,i.language);e.push(t)}else if(en(b)||S){let t=h(b,r,o);g(b,t,e,d)}else if(C){let t=_(u,r.children,o);g(b,t,e,d)}else if(Number.isNaN(parseFloat(r.name))){if(w){let t=h(b,r,o);g(b,t,e,d,r.voidElement)}else if(a.transSupportBasicHtmlNodes&&c.indexOf(r.name)>-1){if(r.voidElement)e.push((0,t.createElement)(r.name,{key:`${r.name}-${d}`}));else{let n=f[r.name]||0;f[r.name]=n+1;let i,a=0;for(let e=0;e<u.length;e+=1){let o=u[e];if((0,t.isValidElement)(o)&&o.type===r.name){if(a===n){i=o;break}a+=1}}let s=i?rn(tn(i)):u,c=_(s,r.children,o);e.push((0,t.createElement)(r.name,{key:`${r.name}-${d}`},c))}}else if(r.voidElement)e.push(`<${r.name} />`);else{let t=_(u,r.children,o);e.push(`<${r.name}>${t}</${r.name}>`)}}else if(Ut(b)&&!x){let t=r.children[0]?p:null;t&&e.push(t)}else g(b,p,e,d,r.children.length!==1||!p)}else if(r.type===`text`){let n=a.transWrapTextNodes,o=typeof a.unescape==`function`?a.unescape:Xt().unescape,c=s?o(i.services.interpolator.interpolate(r.content,m,i.language)):i.services.interpolator.interpolate(r.content,m,i.language);n?e.push((0,t.createElement)(n,{key:`${r.name}-${d}`},c)):e.push(c)}return e},[])};return tn(_([{dummy:!0,children:e||[]}],p,rn(e||[]))[0])},ln=(e,n,r)=>{let i=e.key||n,a=(0,t.cloneElement)(e,{key:i});if(!a.props||!a.props.children||r.indexOf(`${n}/>`)<0&&r.indexOf(`${n} />`)<0)return a;function o(){return(0,t.createElement)(t.Fragment,null,a)}return(0,t.createElement)(o,{key:i})},un=(e,t)=>e.map((e,n)=>ln(e,n,t)),dn=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:ln(e[r],r,t)})}),n},fn=(e,t,n,r)=>e?Array.isArray(e)?un(e,t):Ut(e)?dn(e,t):(Vt(n,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:r}),null):null,pn=e=>!Ut(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function mn({children:e,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:l,ns:u,i18n:d,t:f,shouldUnescape:p,...m}){let h=d||$t();if(!h)return Vt(h,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`,{i18nKey:i}),e;let g=f||h.t.bind(h)||(e=>e),_={...Xt(),...h.options?.react},v=u||g.ns||h.options?.defaultNS;v=Ht(v)?[v]:v||[`translation`];let{transDefaultProps:y}=_,b=y?.tOptions?{...y.tOptions,...o}:o,x=p??y?.shouldUnescape,S=y?.values?{...y.values,...s}:s,C=y?.components?{...y.components,...l}:l,w=sn(e,_,h,i),T=c||b?.defaultValue||w||_.transEmptyNodeValue||(typeof i==`function`?de(i):i),{hashTransKey:E}=_,D=i||(E?E(w||T):w||T);s=h.options?.interpolation?.defaultVariables?S&&Object.keys(S).length>0?{...S,...h.options.interpolation.defaultVariables}:{...h.options.interpolation.defaultVariables}:S;let O=on(e);O&&typeof O.count==`number`&&n===void 0&&(n=O.count);let k=s||n!==void 0&&!h.options?.interpolation?.alwaysFormat||!e?b.interpolation:{interpolation:{...b.interpolation,prefix:`#$?`,suffix:`?$#`}},A={...b,context:a||b.context,count:n,...s,...k,defaultValue:T,ns:v},ee=D?g(D,A):T;ee===D&&T&&(ee=T);let te=fn(C,ee,h,i),ne=te||e,re=null;pn(te)&&(re=te,ne=e);let ie=cn(ne,re,ee,h,_,A,x),ae=r??_.defaultTransParent;return ae?(0,t.createElement)(ae,m,ie):ie}var hn={type:`3rdParty`,init(e){Yt(e.options.react),Qt(e)}},gn=(0,t.createContext)();function _n({children:e,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:l,ns:u,i18n:d,t:f,shouldUnescape:p,...m}){let{i18n:h,defaultNS:g}=(0,t.useContext)(gn)||{},_=d||h||$t(),v=f||_?.t.bind(_);return mn({children:e,count:n,parent:r,i18nKey:i,context:a,tOptions:o,values:s,defaults:c,components:l,ns:u||v?.ns||g||_?.options?.defaultNS,i18n:_,t:f,shouldUnescape:p,...m})}var vn={af:{name:`Afrikaans`,nativeName:`Afrikaans`,code:`af`,locale:`af`},ak:{name:`Akan`,nativeName:`Akan`,code:`ak`,locale:`ak`},sq:{name:`Albanian`,nativeName:`Shqip`,code:`sq`,locale:`sq`},arq:{name:`Algerian Arabic`,nativeName:`الدارجة الجزايرية`,code:`arq`,locale:`ar_DZ`},am:{name:`Amharic`,nativeName:`አማርኛ`,code:`am`,locale:`am`},ar:{name:`Arabic`,nativeName:`العربية`,code:`ar`,locale:`ar`},hy:{name:`Armenian`,nativeName:`Հայերեն`,code:`hy`,locale:`hy`},frp:{name:`Arpitan`,nativeName:`Arpitan`,code:`frp`,locale:`frp`},as:{name:`Assamese`,nativeName:`অসমীয়া`,code:`as`,locale:`as`},az:{name:`Azerbaijani`,nativeName:`Azərbaycan dili`,code:`az`,locale:`az`},ba:{name:`Bashkir`,nativeName:`башҡорт теле`,code:`ba`,locale:`ba`},eu:{name:`Basque`,nativeName:`Euskara`,code:`eu`,locale:`eu`},be:{name:`Belarusian`,nativeName:`Беларуская мова`,code:`be`,locale:`be`,alternatives:[`bel`]},bn:{name:`Bengali`,nativeName:`বাংলা`,code:`bn`,locale:`bn_BD`},bs:{name:`Bosnian`,nativeName:`Bosanski`,code:`bs`,locale:`bs_BA`},br:{name:`Breton`,nativeName:`Brezhoneg`,code:`br`,locale:`br`,alternatives:[`bre`]},bg:{name:`Bulgarian`,nativeName:`Български`,code:`bg`,locale:`bg_BG`},ca:{name:`Catalan`,nativeName:`Català`,code:`ca`,locale:`ca_ES`},ceb:{name:`Cebuano`,nativeName:`Cebuano`,code:`ceb`,locale:`ceb`},"zh-cn":{name:`Chinese (China)`,nativeName:`简体中文`,code:`zh-cn`,locale:`zh_CN`},"zh-hk":{name:`Chinese (Hong Kong)`,nativeName:`繁體中文(香港)`,code:`zh-hk`,locale:`zh_HK`},"zh-tw":{name:`Chinese (Taiwan)`,nativeName:`繁體中文(台灣)`,code:`zh-tw`,locale:`zh_TW`},co:{name:`Corsican`,nativeName:`Corsu`,code:`co`,locale:`co`},hr:{name:`Croatian`,nativeName:`Hrvatski`,code:`hr`,locale:`hr`},cs:{name:`Czech`,nativeName:`Čeština`,code:`cs`,locale:`cs_CZ`},da:{name:`Danish`,nativeName:`Dansk`,code:`da`,locale:`da_DK`},dv:{name:`Divehi`,nativeName:`ދިވެހި`,code:`dv`,locale:`dv`},nl:{name:`Dutch`,nativeName:`Nederlands`,code:`nl`,locale:`nl_NL`},"nl-be":{name:`Dutch (Belgium)`,nativeName:`Nederlands (België)`,code:`nl-be`,locale:`nl_BE`},"en-au":{name:`English (Australia)`,nativeName:`English (Australia)`,code:`en-au`,locale:`en_AU`},"en-ca":{name:`English (Canada)`,nativeName:`English (Canada)`,code:`en-ca`,locale:`en_CA`},"en-nz":{name:`English (New Zealand)`,nativeName:`English (New Zealand)`,code:`en-nz`,locale:`en_NZ`},"en-za":{name:`English (South Africa)`,nativeName:`English (South Africa)`,code:`en-za`,locale:`en_ZA`},"en-gb":{name:`English (UK)`,nativeName:`English (UK)`,code:`en-gb`,locale:`en_GB`},en:{name:`English (US)`,nativeName:`English (US)`,code:`en`,locale:`en_US`},eo:{name:`Esperanto`,nativeName:`Esperanto`,code:`eo`,locale:`eo`},et:{name:`Estonian`,nativeName:`Eesti`,code:`et`,locale:`et`},fo:{name:`Faroese`,nativeName:`Føroyskt`,code:`fo`,locale:`fo`},fi:{name:`Finnish`,nativeName:`Suomi`,code:`fi`,locale:`fi`},"fr-be":{name:`French (Belgium)`,nativeName:`Français (Belgique)`,code:`fr-be`,locale:`fr_BE`},"fr-ca":{name:`French (Canada)`,nativeName:`Français (Canada)`,code:`fr-ca`,locale:`fr_CA`},fr:{name:`French`,nativeName:`Français`,code:`fr`,locale:`fr_FR`},fy:{name:`Frisian`,nativeName:`Frysk`,code:`fy`,locale:`fy`},fur:{name:`Friulian`,nativeName:`Friulian`,code:`fur`,locale:`fur`},ff:{name:`Fulah`,nativeName:`Pulaar`,code:`ff`,locale:`ff`,alternatives:[`fuc`]},gl:{name:`Galician`,nativeName:`Galego`,code:`gl`,locale:`gl_ES`},ka:{name:`Georgian`,nativeName:`ქართული`,code:`ka`,locale:`ka_GE`},de:{name:`German`,nativeName:`Deutsch`,code:`de`,locale:`de_DE`},"de-ch":{name:`German (Switzerland)`,nativeName:`Deutsch (Schweiz)`,code:`de-ch`,locale:`de_CH`},el:{name:`Greek`,nativeName:`Ελληνικά`,code:`el`,locale:`el`},kl:{name:`Greenlandic`,nativeName:`Kalaallisut`,code:`kl`,locale:`kl`,alternatives:[`kal`]},gu:{name:`Gujarati`,nativeName:`ગુજરાતી`,code:`gu`,locale:`gu`},haw:{name:`Hawaiian`,nativeName:`ʻŌlelo Hawaiʻi`,code:`haw`,locale:`haw`},he:{name:`Hebrew`,nativeName:`עברית`,code:`he`,locale:`he_IL`},hi:{name:`Hindi`,nativeName:`हिन्दी`,code:`hi`,locale:`hi_IN`},hu:{name:`Hungarian`,nativeName:`Magyar`,code:`hu`,locale:`hu_HU`},is:{name:`Icelandic`,nativeName:`Íslenska`,code:`is`,locale:`is_IS`},ido:{name:`Ido`,nativeName:`Ido`,code:`ido`,locale:`ido`},id:{name:`Indonesian`,nativeName:`Bahasa Indonesia`,code:`id`,locale:`id_ID`},ga:{name:`Irish`,nativeName:`Gaeilge`,code:`ga`,locale:`ga`},it:{name:`Italian`,nativeName:`Italiano`,code:`it`,locale:`it_IT`},ja:{name:`Japanese`,nativeName:`日本語`,code:`ja`,locale:`ja`},jv:{name:`Javanese`,nativeName:`Basa Jawa`,code:`jv`,locale:`jv`},kab:{name:`Kabyle`,nativeName:`Taqbaylit`,code:`kab`,locale:`kab`},kn:{name:`Kannada`,nativeName:`ಕನ್ನಡ`,code:`kn`,locale:`kn`},kk:{name:`Kazakh`,nativeName:`Қазақ тілі`,code:`kk`,locale:`kk`},km:{name:`Khmer`,nativeName:`ភាសាខ្មែរ`,code:`km`,locale:`km`},rw:{name:`Kinyarwanda`,nativeName:`Ikinyarwanda`,code:`rw`,locale:`rw`,alternatives:[`kin`]},ky:{name:`Kirghiz`,nativeName:`кыргыз тили`,code:`ky`,locale:`ky`},ko:{name:`Korean`,nativeName:`한국어`,code:`ko`,locale:`ko_KR`},ckb:{name:`Kurdish (Sorani)`,nativeName:`کوردی`,code:`ckb`,locale:`ckb`},lo:{name:`Lao`,nativeName:`ພາສາລາວ`,code:`lo`,locale:`lo`},lv:{name:`Latvian`,nativeName:`Latviešu valoda`,code:`lv`,locale:`lv`},li:{name:`Limburgish`,nativeName:`Limburgs`,code:`li`,locale:`li`},ln:{name:`Lingala`,nativeName:`Ngala`,code:`ln`,locale:`ln`,alternatives:[`lin`]},lt:{name:`Lithuanian`,nativeName:`Lietuvių kalba`,code:`lt`,locale:`lt_LT`},lb:{name:`Luxembourgish`,nativeName:`Lëtzebuergesch`,code:`lb`,locale:`lb`},mk:{name:`Macedonian`,nativeName:`Македонски јазик`,code:`mk`,locale:`mk_MK`},mg:{name:`Malagasy`,nativeName:`Malagasy`,code:`mg`,locale:`mg`},ms:{name:`Malay`,nativeName:`Bahasa Melayu`,code:`ms`,locale:`ms_MY`},ml:{name:`Malayalam`,nativeName:`മലയാളം`,code:`ml`,locale:`ml_IN`},mi:{name:`Maori`,nativeName:`Te Reo Māori`,code:`mi`,locale:`mi`,alternatives:[`mri`]},mr:{name:`Marathi`,nativeName:`मराठी`,code:`mr`,locale:`mr`},mn:{name:`Mongolian`,nativeName:`Монгол`,code:`mn`,locale:`mn`},me:{name:`Montenegrin`,nativeName:`Crnogorski`,code:`me`,locale:`crn`},ary:{name:`Moroccan Arabic`,nativeName:`العربية المغربية`,code:`ary`,locale:`ary`},my:{name:`Myanmar (Burmese)`,nativeName:`ဗမာစာ`,code:`my`,locale:`my_MM`},ne:{name:`Nepali`,nativeName:`नेपाली`,code:`ne`,locale:`ne_NP`},nb:{name:`Norwegian Bokmål`,nativeName:`Norsk bokmål`,code:`nb`,locale:`nb_NO`},nn:{name:`Norwegian Nynorsk`,nativeName:`Norsk nynorsk`,code:`nn`,locale:`nn_NO`},oc:{name:`Occitan`,nativeName:`Occitan`,code:`oc`,locale:`oc`,alternatives:[`oci`]},ps:{name:`Pashto`,nativeName:`پښتو`,code:`ps`,locale:`ps`},fa:{name:`Persian`,nativeName:`فارسی`,code:`fa`,locale:`fa_IR`},"fa-af":{name:`Persian (Afghanistan)`,nativeName:`فارسی (افغانستان)`,code:`fa-af`,locale:`fa_AF`},pl:{name:`Polish`,nativeName:`Polski`,code:`pl`,locale:`pl_PL`},"pt-br":{name:`Portuguese (Brazil)`,nativeName:`Português do Brasil`,code:`pt-br`,locale:`pt_BR`},pt:{name:`Portuguese (Portugal)`,nativeName:`Português`,code:`pt`,locale:`pt_PT`},pa:{name:`Punjabi`,nativeName:`ਪੰਜਾਬੀ`,code:`pa`,locale:`pa_IN`},ro:{name:`Romanian`,nativeName:`Română`,code:`ro`,locale:`ro_RO`},rm:{name:`Romansh`,nativeName:`Rumantsch`,code:`rm`,locale:`rm`,alternatives:[`roh`]},ru:{name:`Russian`,nativeName:`Русский`,code:`ru`,locale:`ru_RU`},rue:{name:`Rusyn`,nativeName:`Русиньскый`,code:`rue`,locale:`rue`},sah:{name:`Sakha`,nativeName:`Сахалыы`,code:`sah`,locale:`sah`},sa:{name:`Sanskrit`,nativeName:`संस्कृत`,code:`sa`,locale:`sa_IN`},sc:{name:`Sardinian`,nativeName:`Sardu`,code:`sc`,locale:`sc`,alternatives:[`srd`]},gd:{name:`Scottish Gaelic`,nativeName:`Gàidhlig`,code:`gd`,locale:`gd`},sr:{name:`Serbian`,nativeName:`Српски`,code:`sr`,locale:`sr_RS`},szl:{name:`Silesian`,nativeName:`Ślōnskŏ gŏdka`,code:`szl`,locale:`szl`},sd:{name:`Sindhi`,nativeName:`سنڌي`,code:`sd`,locale:`sd`,alternatives:[`snd`]},si:{name:`Sinhala`,nativeName:`සිංහල`,code:`si`,locale:`si_LK`},sk:{name:`Slovak`,nativeName:`Slovenčina`,code:`sk`,locale:`sk_SK`},sl:{name:`Slovenian`,nativeName:`Slovenščina`,code:`sl`,locale:`sl_SI`},so:{name:`Somali`,nativeName:`Afsoomaali`,code:`so`,locale:`so`},"es-ar":{name:`Spanish (Argentina)`,nativeName:`Español de Argentina`,code:`es-ar`,locale:`es_AR`},"es-cl":{name:`Spanish (Chile)`,nativeName:`Español de Chile`,code:`es-cl`,locale:`es_CL`},"es-co":{name:`Spanish (Colombia)`,nativeName:`Español de Colombia`,code:`es-co`,locale:`es_CO`},"es-mx":{name:`Spanish (Mexico)`,nativeName:`Español de México`,code:`es-mx`,locale:`es_MX`},"es-pe":{name:`Spanish (Peru)`,nativeName:`Español de Perú`,code:`es-pe`,locale:`es_PE`},"es-pr":{name:`Spanish (Puerto Rico)`,nativeName:`Español de Puerto Rico`,code:`es-pr`,locale:`es_PR`},es:{name:`Spanish (Spain)`,nativeName:`Español`,code:`es`,locale:`es_ES`},"es-ve":{name:`Spanish (Venezuela)`,nativeName:`Español de Venezuela`,code:`es-ve`,locale:`es_VE`},su:{name:`Sundanese`,nativeName:`Basa Sunda`,code:`su`,locale:`su`},sw:{name:`Swahili`,nativeName:`Kiswahili`,code:`sw`,locale:`sw`},sv:{name:`Swedish`,nativeName:`Svenska`,code:`sv`,locale:`sv_SE`},gsw:{name:`Swiss German`,native:`Schwyzerdütsch`,code:`gsw`,locale:`gsw`},tl:{name:`Tagalog`,nativeName:`Tagalog`,code:`tl`,locale:`tl`},tg:{name:`Tajik`,nativeName:`Тоҷикӣ`,code:`tg`,locale:`tg`},tzm:{name:`Tamazight (Central Atlas)`,nativeName:`ⵜⴰⵎⴰⵣⵉⵖⵜ`,code:`tzm`,locale:`tzm`},ta:{name:`Tamil`,nativeName:`தமிழ்`,code:`ta`,locale:`ta_IN`},"ta-lk":{name:`Tamil (Sri Lanka)`,nativeName:`தமிழ்`,code:`ta-lk`,locale:`ta_LK`},tt:{name:`Tatar`,nativeName:`Татар теле`,code:`tt`,locale:`tt`},te:{name:`Telugu`,nativeName:`తెలుగు`,code:`te`,locale:`te`},th:{name:`Thai`,nativeName:`ไทย`,code:`th`,locale:`th`},bo:{name:`Tibetan`,nativeName:`བོད་སྐད`,code:`bo`,locale:`bo`},ti:{name:`Tigrinya`,nativeName:`ትግርኛ`,code:`ti`,locale:`ti`,alternatives:[`tir`]},tr:{name:`Turkish`,nativeName:`Türkçe`,code:`tr`,locale:`tr_TR`},tk:{name:`Turkmen`,nativeName:`Türkmençe`,code:`tk`,locale:`tk`,alternatives:[`tuk`]},twd:{name:`Tweants`,nativeName:`Twents`,code:`twd`,locale:`twd`},uk:{name:`Ukrainian`,nativeName:`Українська`,code:`uk`,locale:`uk`},ur:{name:`Urdu`,nativeName:`اردو`,code:`ur`,locale:`ur`},uz:{name:`Uzbek`,nativeName:`O‘zbekcha`,code:`uz`,locale:`uz`},vi:{name:`Vietnamese`,nativeName:`Tiếng Việt`,code:`vi`,locale:`vi`},wa:{name:`Walloon`,nativeName:`Walon`,code:`wa`,locale:`wa`},cy:{name:`Welsh`,nativeName:`Cymraeg`,code:`cy`,locale:`cy`},yo:{name:`Yoruba`,nativeName:`Yorùbá`,code:`yo`,locale:`yo`,alternatives:[`yor`]}};function yn(){let e=document.documentElement.getAttribute(`lang`)||`en`;return(vn[e.toLowerCase()]||vn[e.split(`-`)[0]]||vn.en)?.locale||`en_US`}function bn(){return window.wcpos?.translationVersion||`0.1.0`}function xn({namespace:e,project:n,resources:r}){let i=je.createInstance(),a=yn(),o=bn(),s={lng:a,fallbackLng:`en`,ns:[e],defaultNS:e,keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1,prefix:`{`,suffix:`}`},backend:{backends:[Ct,_t],backendOptions:[{prefix:`wcpos_i18n_`,expirationTime:6048e5,defaultVersion:o},{loadPath:(e,t)=>`https://cdn.jsdelivr.net/gh/wcpos/translations@${o}/translations/js/${e[0]}/${n}/${t[0]}.json`}]}};return r&&(s.resources=r,s.partialBundledLanguages=!0),{i18n:i,i18nPromise:i.use(Ke).use(hn).init(s).then(()=>i),t:i.t.bind(i),Trans:n=>(0,t.createElement)(_n,{...n,i18n:i,ns:e})}}var{i18n:Sn,i18nPromise:Cn,t:j,Trans:wn}=xn({namespace:`wp-admin-template-editor`,project:`woocommerce-pos`,resources:{en:{"wp-admin-template-editor":{"editor.info_thermal":`Receipt Printer template ({size} paper) — Sends output directly to a thermal printer like Epson or Star. Renders on the device without needing a server connection.`,"editor.info_legacy_php":`Browser template (Legacy PHP) — Prints using your browser's print dialog. Requires a server connection to generate the receipt.`,"editor.info_browser":`Browser template — Prints using your browser's print dialog. Renders on the device without needing a server connection.`,"editor.fields":`Fields`,"editor.resize_fields":`Resize fields panel`,"editor.preview":`Preview`,"editor.thermal_preview":`Thermal Preview`,"editor.template_preview":`Template preview`,"editor.thermal_template_preview":`Thermal template preview`,"editor.zoom_in":`Zoom in`,"editor.zoom_out":`Zoom out`,"editor.no_orders":`No POS orders found. Create an order in the POS to preview templates.`,"editor.php_save_notice":`This preview shows your last saved version with your latest POS order — save the template to refresh it.`,"editor.sample_data":`Sample Data`,"editor.order":`Order`,"editor.no_pos_orders":`No POS orders found`,"editor.loading_data":`Loading…`,"editor.search_fields_placeholder":`Search fields...`,"editor.search_fields_label":`Search fields`,"editor.clear_search":`Clear search`,"editor.no_field_matches":`No fields match "{query}".`,"editor.insert":`Insert`,"editor.insert_loop_block":`Insert loop block`,"editor.loop":`loop`,"editor.field_type_list":`list`,"editor.toolbar.undo":`Undo`,"editor.toolbar.redo":`Redo`,"editor.toolbar.find":`Find`,"editor.toolbar.wrap":`Word wrap`,"editor.toolbar.format":`Format`,"editor.toolbar.fold_all":`Fold all`,"editor.toolbar.unfold_all":`Unfold all`,"editor.status.line_col":`Ln {line}, Col {col}`,"editor.status.lines":`{count} lines`,"editor.status.engine_html":`HTML & Mustache`,"editor.status.engine_thermal":`Thermal`,"editor.status.engine_php":`Legacy PHP`,"editor.elements":`Elements`,"element.barcode":`Barcode`,"element.qr_code":`QR Code`,"element.line_single":`Line (single)`,"element.line_double":`Line (double)`,"element.row_columns":`Row / Columns`,"element.feed":`Feed (blank lines)`,"element.cut":`Cut`,"element.image":`Image`,"editor.preview_failed":`Preview failed. Save the template and try again.`}}}}),Tn=u((e=>{var t=globalThis.React,n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),M=u(((e,t)=>{t.exports=Tn()}))();function En(e){return j(e===`thermal`?`editor.status.engine_thermal`:e===`legacy-php`?`editor.status.engine_php`:`editor.status.engine_html`)}function Dn({engine:e,line:t,col:n,lineCount:r}){return(0,M.jsxs)(`div`,{className:`wcpos:flex wcpos:items-center wcpos:gap-3 wcpos:px-3 wcpos:py-1.5 wcpos:border-t wcpos:border-gray-200 wcpos:bg-gray-50 wcpos:text-xs wcpos:text-gray-600 wcpos:font-mono wcpos:tabular-nums`,children:[(0,M.jsx)(`span`,{children:En(e)}),(0,M.jsx)(`span`,{className:`wcpos:text-gray-300`,"aria-hidden":`true`,children:`·`}),(0,M.jsx)(`span`,{children:j(`editor.status.line_col`,{line:t,col:n})}),(0,M.jsx)(`span`,{className:`wcpos:text-gray-300`,"aria-hidden":`true`,children:`·`}),(0,M.jsx)(`span`,{children:j(`editor.status.lines`,{count:r})})]})}var On=[],kn=[];(()=>{let e=`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,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2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?kn:On).push(n+=e[t])})();function An(e){if(e<768)return!1;for(let t=0,n=On.length;;){let r=t+n>>1;if(e<On[r])n=r;else if(e>=kn[r])t=r+1;else return!0;if(t==n)return!1}}function jn(e){return e>=127462&&e<=127487}var Mn=8205;function Nn(e,t,n=!0,r=!0){return(n?Pn:Fn)(e,t,r)}function Pn(e,t,n){if(t==e.length)return t;t&&Ln(e.charCodeAt(t))&&Rn(e.charCodeAt(t-1))&&t--;let r=In(e,t);for(t+=zn(r);t<e.length;){let i=In(e,t);if(r==Mn||i==Mn||n&&An(i))t+=zn(i),r=i;else if(jn(i)){let n=0,r=t-2;for(;r>=0&&jn(In(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function Fn(e,t,n){for(;t>1;){let r=Pn(e,t-2,n);if(r<t)return r;t--}return 0}function In(e,t){let n=e.charCodeAt(t);if(!Rn(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Ln(r)?(n-55296<<10)+(r-56320)+65536:n}function Ln(e){return e>=56320&&e<57344}function Rn(e){return e>=55296&&e<56320}function zn(e){return e<65536?1:2}var Bn=class e{lineAt(e){if(e<0||e>this.length)throw 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 RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Xn(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Hn.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Xn(this,e,t);let n=[];return this.decompose(e,t,n,0),Hn.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Kn(this),i=new Kn(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new Kn(this,e)}iterRange(e,t=this.length){return new qn(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Jn(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new Vn(t):Hn.from(Vn.split(t,[]))}},Vn=class e extends Bn{constructor(e,t=Un(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new Yn(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(Gn(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=Wn(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=Xn(this,t,n);let i=Wn(this.text,Wn(r.text,Gn(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):Hn.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
1 +(function(e,t,n,r){var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule||!l.call(e,`default`)?a(n,`default`,{value:e,enumerable:!0}):n,e));t=f(t),n=f(n),r=f(r);var p=e=>typeof e==`string`,m=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},h=e=>e==null?``:String(e),g=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},_=/###/g,v=e=>e&&e.includes(`###`)?e.replace(_,`.`):e,y=e=>!e||p(e),b=(e,t,n)=>{let r=p(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(y(e))return{};let t=v(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return y(e)?{}:{obj:e,k:v(r[i])}},x=(e,t,n)=>{let{obj:r,k:i}=b(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=b(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=b(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},S=(e,t,n,r)=>{let{obj:i,k:a}=b(e,t,Object);i[a]=i[a]||[],i[a].push(n)},C=(e,t)=>{let{obj:n,k:r}=b(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},w=(e,t,n)=>{let r=C(e,n);return r===void 0?C(t,n):r},T=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?p(e[r])||e[r]instanceof String||p(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):T(e[r],t[r],n):e[r]=t[r]);return e},E=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),D={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},O=e=>p(e)?e.replace(/[&<>"'\/]/g,e=>D[e]):e,k=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},A=[` `,`,`,`?`,`!`,`;`],ee=new k(20),te=(e,t,n)=>{t||=``,n||=``;let r=A.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=ee.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},ne=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},re=e=>e?.replace(/_/g,`-`),ie={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},ae=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||ie,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>p(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),p(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},oe=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},se=class extends oe{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):p(n)&&i?o.push(...n.split(i)):o.push(n)));let s=C(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!p(n)?s:ne(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),x(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(p(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=C(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?T(s,n,i):s={...s,...n},x(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},ce={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},le=Symbol(`i18next/PATH_KEY`);function ue(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===le?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function de(e,t){let{[le]:n}=e(ue()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var fe=e=>!p(e)&&typeof e!=`boolean`&&typeof e!=`number`,pe=class e extends oe{constructor(e,t={}){super(),g([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=ae.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=fe(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!te(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:p(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:p(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=de(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?de(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let m=this.resolve(t,i),h=m?.res,g=m?.usedKey||s,_=m?.exactUsedKey||s,v=[`[object Number]`,`[object Function]`,`[object RegExp]`],y=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!p(i.count),S=e.hasDefaultValue(i),C=x?this.pluralResolver.getSuffix(d,i.count,i):``,w=i.ordinal&&x?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,T=x&&!i.ordinal&&i.count===0,E=T&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${C}`]||i[`defaultValue${w}`]||i.defaultValue,D=h;b&&!h&&S&&(D=E);let O=fe(D),k=Object.prototype.toString.apply(D);if(b&&D&&O&&!v.includes(k)&&!(p(y)&&Array.isArray(D))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,D,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(m.res=e,m.usedParams=this.getUsedParamsDetails(i),m):e}if(o){let e=Array.isArray(D),t=e?[]:{},n=e?_:g;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let r=`${n}${o}${e}`;t[e]=S&&!h?this.translate(r,{...i,defaultValue:fe(E)?E[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=D[e])}h=t}}else if(b&&p(y)&&Array.isArray(h))h=h.join(y),h&&=this.extendTranslation(h,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(h)&&S&&(e=!0,h=E),this.isValidLookup(h)||(n=!0,h=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:h,c=S&&E!==h&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,x&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?E:h),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=S&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);T&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||E)})}):n(e,s,E))}h=this.extendTranslation(h,t,i,m,r),n&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?h:void 0,i))}return a?(m.res=h,m.usedParams=this.getUsedParamsDetails(i),m):h}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=p(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!p(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=p(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=ce.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return p(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?de(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!p(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(p(t.context)||typeof t.context==`number`)&&t.context!==``,m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!p(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},me=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ae.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=re(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=re(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(p(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),p(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||p(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=p(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return p(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):p(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},he={zero:0,one:1,two:2,few:3,many:4,other:5},ge={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},_e=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ae.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=re(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),ge;if(!e.match(/-|_/))return ge;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>he[e]-he[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},ve=(e,t,n,r=`.`,i=!0)=>{let a=w(e,t,n);return!a&&i&&p(n)&&(a=ne(e,n,r),a===void 0&&(a=ne(t,n,r))),a},ye=e=>e.replace(/\$/g,`$$$$`),be=class{constructor(e={}){this.logger=ae.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?O:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?E(i):a||`{{`,this.suffix=o?E(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?E(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?E(l):``,this.nestingPrefix=d?E(d):f||E(`$t(`),this.nestingSuffix=p?E(p):m||E(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=ve(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ve(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0){if(typeof l==`function`){let t=l(e,i,r);a=p(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!p(a)&&!this.useRawValueToEscape&&(a=h(a));let s=t.safeValue(a);if(e=e.replace(i[0],ye(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${E(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!p(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!p(i))return i;p(i)||(i=h(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],ye(h(i))),this.regexp.lastIndex=0}return e}},xe=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Se=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(re(r),i),t[o]=s),s(n)}},Ce=e=>(t,n,r)=>e(re(n),r)(t),we=class{constructor(e={}){this.logger=ae.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Se:Ce;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Se(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=xe(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Te=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Ee=class extends oe{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=ae.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{S(n.loaded,[i],a),Te(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();p(e)&&(e=this.languageUtils.toResolveHierarchy(e)),p(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},De=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),p(e[1])&&(t.defaultValue=e[1]),p(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Oe=e=>(p(e.ns)&&(e.ns=[e.ns]),p(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),p(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),ke=()=>{},Ae=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},je=class e extends oe{constructor(e={},t){if(super(),this.options=Oe(e),this.services={},this.logger=ae,this.modules={external:[]},Ae(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(p(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=De();this.options={...n,...this.options,...Oe(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?ae.init(r(this.modules.logger),this.options):ae.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:we;let t=new me(this.options);this.store=new se(this.options.resources,this.options);let n=this.services;n.logger=ae,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new _e(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new be(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Ee(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new pe(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=ke,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=m(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ke){let n=t,r=p(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=m();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=ke,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&ce.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=m();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=p(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(p(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=de(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=de(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=de(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return p(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=m();return this.options.ns?(p(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=m();p(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new me(De());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=ke){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new se(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...De().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new be(n)}return a.translator=new pe(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();je.createInstance,je.dir,je.init,je.loadResources,je.reloadResources,je.use,je.changeLanguage,je.getFixedT,je.t,je.exists,je.setDefaultNamespace,je.hasLoadedNamespace,je.loadNamespaces,je.loadLanguages;function Me(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Ne(e){"@babel/helpers - typeof";return Ne=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ne(e)}function Pe(e,t){if(Ne(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ne(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Fe(e){var t=Pe(e,`string`);return Ne(t)==`symbol`?t:t+``}function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Fe(r.key),r)}}function Le(e,t,n){return t&&Ie(e.prototype,t),n&&Ie(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Re=[],ze=Re.forEach,Be=Re.slice,Ve=[`__proto__`,`constructor`,`prototype`];function He(e){return ze.call(Be.call(arguments,1),function(t){if(t)for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Ve.indexOf(i)>-1||e[i]===void 0&&(e[i]=t[i])}}),e}function Ue(e){return e?typeof e==`function`?new e:e:null}function We(){return{handleEmptyResourcesAsFailed:!0,cacheHitMode:`none`,retryOnFailure:!1}}function Ge(e,t,n,r){var i=e.read.bind(e);if(i.length===2){try{var a=i(t,n);a&&typeof a.then==`function`?a.then(function(e){return r(null,e)}).catch(r):r(null,a)}catch(e){r(e)}return}i(t,n,r)}var Ke=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Me(this,e),this.backends=[],this.type=`backend`,this.allOptions=r,this.init(t,n)}return Le(e,[{key:`init`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=He(n,this.options||{},We()),this.allOptions=r,this.options.backends&&this.options.backends.length>1&&(this.allOptions.saveMissing||this.allOptions.updateMissing)&&this.services&&this.services.logger&&this.services.logger.warn(`i18next-chained-backend: Using multiple backends in combination with saveMissing/updateMissing is not recommended, as it may trigger based on stale data.`),this.options.backends&&this.options.backends.forEach(function(n,i){t.backends[i]=t.backends[i]||Ue(n),t.backends[i].init(e,t.options.backendOptions&&t.options.backendOptions[i]||{},r)}),this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:`read`,value:function(e,t,n){var r=this,i=this.backends.length,a=function(s){if(s>=i)return n(Error(`non of the backend loaded data`),r.options.retryOnFailure);var c=s===i-1,l=r.options.handleEmptyResourcesAsFailed&&!c?0:-1,u=r.backends[s];u.read?Ge(u,e,t,function(i,c,d){if(!i&&c&&Object.keys(c).length>l){if(n(null,c,s),o(s-1,c),u.save&&r.options.cacheHitMode&&[`refresh`,`refreshAndUpdateStore`].indexOf(r.options.cacheHitMode)>-1){if(d&&r.options.refreshExpirationTime&&d+r.options.refreshExpirationTime>Date.now())return;var f=r.backends[s+1];f&&f.read&&Ge(f,e,t,function(n,i){n||i&&(Object.keys(i).length<=l||(o(s,i),r.options.cacheHitMode===`refreshAndUpdateStore`&&r.services&&r.services.resourceStore&&r.services.resourceStore.addResourceBundle(e,t,i)))})}}else a(s+1)}):a(s+1)},o=function(n,i){if(!(n<0)){var a=r.backends[n];a.save&&a.save(e,t,i),o(n-1,i)}};a(0)}},{key:`create`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){},a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backends.forEach(function(o){if(o.create){var s=o.create.bind(o);if(s.length<6){try{var c=s.length===5?s(e,t,n,r,a):s(e,t,n,r);c&&typeof c.then==`function`?c.then(function(e){return i(null,e)}).catch(i):i(null,c)}catch(e){i(e)}return}s(e,t,n,r,i,a)}})}},{key:`reload`,value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,i=t.logger,a=n.language;if(!(a&&a.toLowerCase()===`cimode`)){var o=[],s=function(e){r.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};s(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,`read`,null,null,function(r,a){r&&i.warn(`loading namespace ${e} for language ${t} failed`,r),!r&&a&&i.log(`loaded namespace ${e} for language ${t}`,a),n.loaded(`${t}|${e}`,r,a)})})})}}}])}();Ke.type=`backend`;var qe=[];qe.forEach,qe.slice;var Je=[`__proto__`,`constructor`,`prototype`];function Ye(e){return!(typeof e!=`string`||e.length===0||e.length>128||Je.indexOf(e)>-1||e.indexOf(`..`)>-1||e.indexOf(`\\`)>-1||/[?#%:\s]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function Xe(e){return!(!Ye(e)||e.indexOf(`/`)>-1||e.indexOf(`@`)>-1)}function Ze(e){return!(!Ye(e)||e.indexOf(`//`)>-1)}var Qe={lng:Xe,ns:Ze};function $e(e){return typeof e==`string`?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e}function et(e){if(typeof e!=`string`||e.length===0)return e;try{let t=new URL(e);return t.username||t.password?(t.username=``,t.password=``,t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,`$1`)}}function tt(){return typeof XMLHttpRequest==`function`||typeof XMLHttpRequest==`object`}function nt(e){return!!e&&typeof e.then==`function`}function rt(e){return nt(e)?e:Promise.resolve(e)}var it=/\{\{(.+?)\}\}/g;function at(e,t){let n=!1,r=e.replace(it,(e,r)=>{let i=r.trim();if(Je.indexOf(i)>-1)return e;let a=t[i];if(a==null)return e;let o=Qe[i]||Xe,s=String(a).split(`+`);for(let t of s)if(!o(t))return n=!0,e;return s.join(`+`)});return n?null:r}var ot=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof window<`u`?window:void 0,st;typeof fetch==`function`?st=fetch:ot&&typeof ot.fetch==`function`&&(st=ot.fetch);var ct=tt()&&ot?ot.XMLHttpRequest:void 0,lt=typeof ActiveXObject==`function`&&ot?ot.ActiveXObject:void 0,ut=[`__proto__`,`constructor`,`prototype`],dt=(e,t)=>{if(t&&typeof t==`object`){let n=``;for(let e of Object.keys(t))ut.indexOf(e)>-1||(n+=`&`+encodeURIComponent(e)+`=`+encodeURIComponent(t[e]));if(!n)return e;e=e+(e.indexOf(`?`)===-1?`?`:`&`)+n.slice(1)}return e},ft=(e,t,n,r)=>{let i=e=>{if(!e.ok)return n(e.statusText||`Error`,{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(r){let a=r(e,t);if(a instanceof Promise){a.then(i).catch(n);return}}typeof fetch==`function`?fetch(e,t).then(i).catch(n):st(e,t).then(i).catch(n)},pt=(e,t,n,r)=>{e.queryStringParams&&(t=dt(t,e.queryStringParams));let i={...typeof e.customHeaders==`function`?e.customHeaders():e.customHeaders};typeof window>`u`&&typeof global<`u`&&global.process!==void 0&&global.process.versions&&global.process.versions.node&&(i[`User-Agent`]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),n&&(i[`Content-Type`]=`application/json`);let a=typeof e.requestOptions==`function`?e.requestOptions(n):e.requestOptions,o={method:n?`POST`:`GET`,body:n?e.stringify(n):void 0,headers:i,...e._omitFetchOptions?{}:a},s=typeof e.alternateFetch==`function`&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{ft(t,o,r,s)}catch(n){if(!a||Object.keys(a).length===0||!n.message||n.message.indexOf(`not implemented`)<0)return r(n);try{Object.keys(a).forEach(e=>{delete o[e]}),ft(t,o,r,s),e._omitFetchOptions=!0}catch(e){r(e)}}},mt=(e,t,n,r)=>{n&&typeof n==`object`&&(n=dt(``,n).slice(1)),e.queryStringParams&&(t=dt(t,e.queryStringParams));try{let i=ct?new ct:new lt(`MSXML2.XMLHTTP.3.0`);i.open(n?`POST`:`GET`,t,1),e.crossDomain||i.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader(`Content-Type`,`application/x-www-form-urlencoded`),i.overrideMimeType&&i.overrideMimeType(`application/json`);let a=e.customHeaders;if(a=typeof a==`function`?a():a,a)for(let e of Object.keys(a))ut.indexOf(e)>-1||i.setRequestHeader(e,a[e]);i.onreadystatechange=()=>{i.readyState>3&&r(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(e){console&&console.log(e)}},ht=(e,t,n,r)=>{if(typeof n==`function`&&(r=n,n=void 0),r||=(()=>{}),st&&t.indexOf(`file:`)!==0)return pt(e,t,n,r);if(tt()||typeof ActiveXObject==`function`)return mt(e,t,n,r);r(Error(`No fetch and no xhr implementation found!`))},gt=()=>({loadPath:`/locales/{{lng}}/{{ns}}.json`,addPath:`/locales/add/{{lng}}/{{ns}}`,parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||``}),parseLoadPayload:(e,t)=>void 0,request:ht,reloadInterval:typeof window<`u`?!1:36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:`cors`,credentials:`same-origin`,cache:`default`}}),_t=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type=`backend`,this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={...gt(),...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);typeof e==`object`&&typeof e.unref==`function`&&e.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,i){let a=this.options.loadPath;typeof this.options.loadPath==`function`&&(a=this.options.loadPath(e,n)),a=rt(a),a.then(a=>{if(!a)return i(null,{});let o=at(a,{lng:e.join(`+`),ns:n.join(`+`)});if(o==null){let t=e.map($e).join(`, `),r=n.map($e).join(`, `);return i(Error(`i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[`+t+`] namespaces=[`+r+`]`),!1)}this.loadUrl(o,i,t,r)})}loadUrl(e,t,n,r){let i=typeof n==`string`?[n]:n,a=typeof r==`string`?[r]:r,o=this.options.parseLoadPayload(i,a),s=$e(et(e));this.options.request(this.options,e,o,(e,i)=>{if(i&&(i.status>=500&&i.status<600||!i.status))return t(`failed loading `+s+`; status code: `+i.status,!0);if(i&&i.status>=400&&i.status<500)return t(`failed loading `+s+`; status code: `+i.status,!1);if(!i&&e&&e.message){let n=e.message.toLowerCase();if([`failed`,`fetch`,`network`,`load`].find(e=>n.indexOf(e)>-1))return t(`failed loading `+s+`: `+$e(e.message),!0)}if(e)return t(e,!1);let a,o;try{a=typeof i.data==`string`?this.options.parse(i.data,n,r):i.data}catch{o=`failed parsing `+s+` to json`}if(o)return t(o,!1);t(null,a)})}create(e,t,n,r,i){if(!this.options.addPath)return;typeof e==`string`&&(e=[e]);let a=this.options.parsePayload(t,n,r),o=0,s=[],c=[];e.forEach(n=>{let r=this.options.addPath;typeof this.options.addPath==`function`&&(r=this.options.addPath(n,t));let l=at(r,{lng:n,ns:t});if(l==null){o+=1,i&&o===e.length&&i(s,c);return}this.options.request(this.options,l,a,(t,n)=>{o+=1,s.push(t),c.push(n),o===e.length&&typeof i==`function`&&i(s,c)})})}reload(){let{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&r.toLowerCase()===`cimode`)return;let i=[],a=e=>{t.toResolveHierarchy(e).forEach(e=>{i.indexOf(e)<0&&i.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(e=>a(e)),i.forEach(t=>{this.allOptions.ns.forEach(r=>{e.read(t,r,`read`,null,null,(i,a)=>{i&&n.warn(`loading namespace ${r} for language ${t} failed`,i),!i&&a&&n.log(`loaded namespace ${r} for language ${t}`,a),e.loaded(`${t}|${r}`,i,a)})})})}};_t.type=`backend`;function vt(e,t,n){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yt(Object(n),!0).forEach(function(t){vt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xt=function(){function e(t){Me(this,e),this.store=t.store}return Le(e,[{key:`setItem`,value:function(e,t){if(this.store)try{this.store.setItem(e,t)}catch{}}},{key:`getItem`,value:function(e,t){if(this.store)try{return this.store.getItem(e,t)}catch{}}}])}();function St(){var e=null;try{e=window.localStorage}catch(e){typeof window<`u`&&console.log(`Failed to load local storage.`,e)}return{prefix:`i18next_res_`,expirationTime:6048e5,defaultVersion:void 0,getVersion:void 0,versions:{},store:e}}var Ct=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Me(this,e),this.init(t,n),this.type=`backend`}return Le(e,[{key:`init`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.services=e,this.options=bt(bt(bt({},St()),this.options),t),this.storage=new xt(this.options)}},{key:`read`,value:function(e,t,n){var r=Date.now();if(!this.storage.store)return n(null,null);var i=this.storage.getItem(`${this.options.prefix}${e}-${t}`);if(i)try{i=JSON.parse(i)}catch{i=null}if(i&&Ne(i)===`object`){var a=this.getVersion(e,t);if(i.i18nStamp&&i.i18nStamp+this.options.expirationTime>r&&a===i.i18nVersion){var o=i.i18nStamp;return delete i.i18nVersion,delete i.i18nStamp,n(null,i,o)}}return n(null,null)}},{key:`save`,value:function(e,t,n){if(this.storage.store){var r=bt(bt({},n),{},{i18nStamp:Date.now()}),i=this.getVersion(e,t);i&&(r.i18nVersion=i),this.storage.setItem(`${this.options.prefix}${e}-${t}`,JSON.stringify(r))}}},{key:`getVersion`,value:function(e,t){var n=this.options,r=n.getVersion,i=n.versions,a=n.defaultVersion,o=Object.prototype.hasOwnProperty.call(i,e)?i[e]:void 0;return r?.(e,t)||o||a}}])}();Ct.type=`backend`;var wt={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},Tt=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function Et(e){let t={type:`tag`,name:``,voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(wt[n[1]]||e.charAt(e.length-2)===`/`)&&(t.voidElement=!0),t.name.startsWith(`!--`))){let t=e.indexOf(`-->`);return{type:`comment`,comment:t===-1?``:e.slice(4,t)}}let r=new RegExp(Tt),i=null;for(;i=r.exec(e),i!==null;)if(i[0].trim()){if(i[1]){let e=i[1].trim(),n=[e,null],a=e.indexOf(`=`);a>-1&&(n=[e.slice(0,a),e.slice(a+1)]),t.attrs[n[0]]=n[1],r.lastIndex--}else i[2]&&(t.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1))}return t}var Dt=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Ot=/<\/?([^\s]+?)[/\s>]/,kt=/^\s*$/,At=/^(script|style)$/i,jt=`\0`,Mt=Object.create(null);function Nt(e){e.forEach(function(e){if(e.type===`text`){e.content=e.content.split(jt).join(`<`);return}if(e.type===`comment`){e.comment=e.comment.split(jt).join(`<`);return}for(let t in e.attrs){let n=e.attrs[t];typeof n==`string`&&n.indexOf(jt)>-1&&(e.attrs[t]=n.split(jt).join(`<`))}e.children.length&&Nt(e.children)})}function Pt(e,t){let n=t&&t.components||Mt,r=t&&t.allowedTags,i=!1;if(r){let t=typeof r==`function`?r:function(e){return r.indexOf(e)>-1},n=``,a=0;Dt.lastIndex=0;let o;for(;o=Dt.exec(e);){let r=o[0];n+=e.slice(a,o.index);let s=r.match(Ot);r.startsWith(`<!--`)||s&&t(s[1])?(n+=r,a=o.index+r.length):(i=!0,n+=jt,a=o.index+1,Dt.lastIndex=a)}e=n+e.slice(a)}let a=[],o=[],s,c=-1,l=!1,u=0,d;if(e.indexOf(`<`)!==0){let t=e.indexOf(`<`);a.push({type:`text`,content:t===-1?e:e.substring(0,t)})}let f=[],p;for(;p=Dt.exec(e);)f.push(p);return f.forEach(function(e,t){let n=e[0];if(!n||n.startsWith(`<!--`))return;let r=0,i=0,a=-1,o=null;for(let e=0;e<n.length;e++){let t=n.charAt(e);o?t===o&&(o=null):t===`"`||t===`'`?o=t:t===`<`?(r++,r===2&&(a=e)):t===`>`&&i++}let s=a>-1&&/[a-zA-Z0-9\-!/]/.test(n.charAt(a+1));if(r>i&&s){let e=n.substring(0,a),r=n.substring(e.length);f[t][0]=r,f[t].index+=e.length}}),f.forEach(function(t,r){let i=t[0];if(!i)return;let p=t.index;if(p<u)return;if(l){if(i!==`</`+s.name+`>`)return;l=!1}let m=i.charAt(1)!==`/`,h=i.startsWith(`<!--`),g=p+i.length,_=e.charAt(g),v=f[r+1],y;if(_===`<`&&v){let t=e.substring(g,v.index);y=t.split(`<`).length>t.split(`>`).length}let b;if(h){let t=Et(i);if(c<0)return a.push(t),a;b=o[c],b.children.push(t);let n=e.slice(g,v?v.index:void 0);return n.length>0&&b.children.push({type:`text`,content:n}),a}if(m){c++,s=Et(i),s.type===`tag`&&n[s.name]&&(s.type=`component`,l=!0);let t=!1;if(!l&&!s.voidElement&&At.test(s.name)){t=!0,d||=e.toLowerCase();let n=d.indexOf(`</`+s.name.toLowerCase()+`>`,g),r=n===-1?e.length:n,i=e.slice(g,r);i&&s.children.push({type:`text`,content:i}),u=r}!s.voidElement&&!l&&!t&&_&&_!==`<`&&s.children.push({type:`text`,content:e.slice(g,v?v.index:void 0)}),c===0&&a.push(s),b=o[c-1],b&&b.children.push(s),o[c]=s}if((!m||s.voidElement)&&(c>-1&&(s.voidElement||s.name===i.slice(2,-1))&&(c--,s=c===-1?a:o[c]),!l&&(_!==`<`||y)&&_)){b=c===-1?a:o[c].children;let t=v?v.index:-1,n=e.slice(g,t===-1?void 0:t);kt.test(n)&&(n=` `),(t>-1&&c+b.length>=0||n!==` `)&&b.push({type:`text`,content:n})}}),i&&Nt(a),a}function Ft(e){let t=[];for(let n in e)e[n]===null?t.push(n):t.push(n+`="`+String(e[n]).replace(/"/g,`&quot;`)+`"`);return t.length?` `+t.join(` `):``}function It(e,t){switch(t.type){case`text`:return e+t.content;case`tag`:{let n=t.voidElement&&t.name.toLowerCase()!==`!doctype`?`/>`:`>`;return e+=`<`+t.name+(t.attrs?Ft(t.attrs):``)+n,t.voidElement?e:e+t.children.reduce(It,``)+`</`+t.name+`>`}case`comment`:return e+=`<!--`+t.comment+`-->`,e}}function Lt(e){return e.reduce(function(e,t){return e+It(``,t)},``)}var Rt={parse:Pt,stringify:Lt},zt=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);Ht(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Bt={},Vt=(e,t,n,r)=>{Ht(n)&&Bt[n]||(Ht(n)&&(Bt[n]=new Date),zt(e,t,n,r))},Ht=e=>typeof e==`string`,Ut=e=>typeof e==`object`&&!!e,Wt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Gt={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Kt=e=>Gt[e],qt=e=>e.replace(Wt,Kt),Jt={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:qt,transDefaultProps:void 0},Yt=(e={})=>{Jt={...Jt,...e}},Xt=()=>Jt,Zt,Qt=e=>{Zt=e},$t=()=>Zt,en=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},tn=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?rn(t):t},nn=e=>rn(e).every(t.isValidElement),rn=e=>Array.isArray(e)?e:[e],an=(e,t)=>{let n={...t};return n.props={...t.props,...e.props},n},on=e=>{let n={};if(!e)return n;let r=e=>{rn(e).forEach(e=>{Ht(e)||(en(e)?r(tn(e)):Ut(e)&&!(0,t.isValidElement)(e)&&Object.assign(n,e))})};return r(e),n},sn=(e,n,r,i)=>{if(!e)return``;let a=``,o=rn(e),s=n?.transSupportBasicHtmlNodes?n.transKeepBasicHtmlNodesFor??[]:[];return o.forEach((e,o)=>{if(Ht(e)){a+=`${e}`;return}if((0,t.isValidElement)(e)){let{props:t,type:c}=e,l=Object.keys(t).length,u=s.indexOf(c)>-1,d=t.children;if(!d&&u&&!l){a+=`<${c}/>`;return}if(!d&&(!u||l)||t.i18nIsDynamicList){a+=`<${o}></${o}>`;return}if(u&&l<=1){let e=Ht(d)?d:sn(d,n,r,i);a+=`<${c}>${e}</${c}>`;return}let f=sn(d,n,r,i);a+=`<${o}>${f}</${o}>`;return}if(e===null){zt(r,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:i});return}if(Ut(e)){let{format:t,...n}=e,o=Object.keys(n);if(o.length===1){let e=t?`${o[0]}, ${t}`:o[0];a+=`{{${e}}}`;return}zt(r,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:i,child:e});return}zt(r,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:i,child:e})}),a},cn=(e,n,r,i,a,o,s)=>{if(r===``)return[];let c=a.transKeepBasicHtmlNodesFor||[],l=r&&new RegExp(c.map(e=>`<${e}`).join(`|`)).test(r);if(!e&&!n&&!l&&!s)return[r];let u=n??{},d=e=>{rn(e).forEach(e=>{Ht(e)||(en(e)?d(tn(e)):Ut(e)&&!(0,t.isValidElement)(e)&&Object.assign(u,e))})};d(e);let f=Object.keys(u),p=Rt.parse(`<0>${r}</0>`,{allowedTags:e=>/^\d+$/.test(e)||c.indexOf(e)>-1||f.indexOf(e)>-1}),m={...u,...o},h=(e,t,n)=>{let r=tn(e),i=_(r,t.children,n);return nn(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},g=(e,n,r,i,a)=>{e.dummy?(e.children=n,r.push((0,t.cloneElement)(e,{key:i},a?void 0:n))):r.push(...t.Children.map([e],e=>{if(e.type===t.Fragment||e.props?.i18nIsDynamicList!==void 0){let r={key:i};return e&&e.props&&Object.keys(e.props).forEach(t=>{t!==`children`&&t!==`i18nIsDynamicList`&&(r[t]=e.props[t])}),(0,t.createElement)(e.type,r,a?null:n)}let r={key:i};return e&&e.props&&Object.keys(e.props).forEach(t=>{t!==`ref`&&t!==`children`&&(r[t]=e.props[t])}),(0,t.cloneElement)(e,r,a?null:n)}))},_=(e,r,o)=>{let u=rn(e),d=rn(r),f={};return d.reduce((e,r,d)=>{let p=r.children?.[0]?.content&&i.services.interpolator.interpolate(r.children[0].content,m,i.language);if(r.type===`tag`){let v=u[parseInt(r.name,10)];!v&&n&&(v=n[r.name]),o.length===1&&!v&&(v=o[0][r.name]),v||={};let y={...r.attrs};s&&Object.keys(y).forEach(e=>{let t=y[e];Ht(t)&&(y[e]=qt(t))});let b=Object.keys(y).length===0?v:an({props:y},v),x=(0,t.isValidElement)(b),S=x&&en(r,!0)&&!r.voidElement,C=l&&Ut(b)&&b.dummy&&!x,w=Ut(n)&&Object.hasOwnProperty.call(n,r.name);if(Ht(b)){let t=i.services.interpolator.interpolate(b,m,i.language);e.push(t)}else if(en(b)||S){let t=h(b,r,o);g(b,t,e,d)}else if(C){let t=_(u,r.children,o);g(b,t,e,d)}else if(Number.isNaN(parseFloat(r.name))){if(w){let t=h(b,r,o);g(b,t,e,d,r.voidElement)}else if(a.transSupportBasicHtmlNodes&&c.indexOf(r.name)>-1){if(r.voidElement)e.push((0,t.createElement)(r.name,{key:`${r.name}-${d}`}));else{let n=f[r.name]||0;f[r.name]=n+1;let i,a=0;for(let e=0;e<u.length;e+=1){let o=u[e];if((0,t.isValidElement)(o)&&o.type===r.name){if(a===n){i=o;break}a+=1}}let s=i?rn(tn(i)):u,c=_(s,r.children,o);e.push((0,t.createElement)(r.name,{key:`${r.name}-${d}`},c))}}else if(r.voidElement)e.push(`<${r.name} />`);else{let t=_(u,r.children,o);e.push(`<${r.name}>${t}</${r.name}>`)}}else if(Ut(b)&&!x){let t=r.children[0]?p:null;t&&e.push(t)}else g(b,p,e,d,r.children.length!==1||!p)}else if(r.type===`text`){let n=a.transWrapTextNodes,o=typeof a.unescape==`function`?a.unescape:Xt().unescape,c=s?o(i.services.interpolator.interpolate(r.content,m,i.language)):i.services.interpolator.interpolate(r.content,m,i.language);n?e.push((0,t.createElement)(n,{key:`${r.name}-${d}`},c)):e.push(c)}return e},[])};return tn(_([{dummy:!0,children:e||[]}],p,rn(e||[]))[0])},ln=(e,n,r)=>{let i=e.key||n,a=(0,t.cloneElement)(e,{key:i});if(!a.props||!a.props.children||r.indexOf(`${n}/>`)<0&&r.indexOf(`${n} />`)<0)return a;function o(){return(0,t.createElement)(t.Fragment,null,a)}return(0,t.createElement)(o,{key:i})},un=(e,t)=>e.map((e,n)=>ln(e,n,t)),dn=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:ln(e[r],r,t)})}),n},fn=(e,t,n,r)=>e?Array.isArray(e)?un(e,t):Ut(e)?dn(e,t):(Vt(n,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:r}),null):null,pn=e=>!Ut(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function mn({children:e,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:l,ns:u,i18n:d,t:f,shouldUnescape:p,...m}){let h=d||$t();if(!h)return Vt(h,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`,{i18nKey:i}),e;let g=f||h.t.bind(h)||(e=>e),_={...Xt(),...h.options?.react},v=u||g.ns||h.options?.defaultNS;v=Ht(v)?[v]:v||[`translation`];let{transDefaultProps:y}=_,b=y?.tOptions?{...y.tOptions,...o}:o,x=p??y?.shouldUnescape,S=y?.values?{...y.values,...s}:s,C=y?.components?{...y.components,...l}:l,w=sn(e,_,h,i),T=c||b?.defaultValue||w||_.transEmptyNodeValue||(typeof i==`function`?de(i):i),{hashTransKey:E}=_,D=i||(E?E(w||T):w||T);s=h.options?.interpolation?.defaultVariables?S&&Object.keys(S).length>0?{...S,...h.options.interpolation.defaultVariables}:{...h.options.interpolation.defaultVariables}:S;let O=on(e);O&&typeof O.count==`number`&&n===void 0&&(n=O.count);let k=s||n!==void 0&&!h.options?.interpolation?.alwaysFormat||!e?b.interpolation:{interpolation:{...b.interpolation,prefix:`#$?`,suffix:`?$#`}},A={...b,context:a||b.context,count:n,...s,...k,defaultValue:T,ns:v},ee=D?g(D,A):T;ee===D&&T&&(ee=T);let te=fn(C,ee,h,i),ne=te||e,re=null;pn(te)&&(re=te,ne=e);let ie=cn(ne,re,ee,h,_,A,x),ae=r??_.defaultTransParent;return ae?(0,t.createElement)(ae,m,ie):ie}var hn={type:`3rdParty`,init(e){Yt(e.options.react),Qt(e)}},gn=(0,t.createContext)();function _n({children:e,count:n,parent:r,i18nKey:i,context:a,tOptions:o={},values:s,defaults:c,components:l,ns:u,i18n:d,t:f,shouldUnescape:p,...m}){let{i18n:h,defaultNS:g}=(0,t.useContext)(gn)||{},_=d||h||$t(),v=f||_?.t.bind(_);return mn({children:e,count:n,parent:r,i18nKey:i,context:a,tOptions:o,values:s,defaults:c,components:l,ns:u||v?.ns||g||_?.options?.defaultNS,i18n:_,t:f,shouldUnescape:p,...m})}var vn={af:{name:`Afrikaans`,nativeName:`Afrikaans`,code:`af`,locale:`af`},ak:{name:`Akan`,nativeName:`Akan`,code:`ak`,locale:`ak`},sq:{name:`Albanian`,nativeName:`Shqip`,code:`sq`,locale:`sq`},arq:{name:`Algerian Arabic`,nativeName:`الدارجة الجزايرية`,code:`arq`,locale:`ar_DZ`},am:{name:`Amharic`,nativeName:`አማርኛ`,code:`am`,locale:`am`},ar:{name:`Arabic`,nativeName:`العربية`,code:`ar`,locale:`ar`},hy:{name:`Armenian`,nativeName:`Հայերեն`,code:`hy`,locale:`hy`},frp:{name:`Arpitan`,nativeName:`Arpitan`,code:`frp`,locale:`frp`},as:{name:`Assamese`,nativeName:`অসমীয়া`,code:`as`,locale:`as`},az:{name:`Azerbaijani`,nativeName:`Azərbaycan dili`,code:`az`,locale:`az`},ba:{name:`Bashkir`,nativeName:`башҡорт теле`,code:`ba`,locale:`ba`},eu:{name:`Basque`,nativeName:`Euskara`,code:`eu`,locale:`eu`},be:{name:`Belarusian`,nativeName:`Беларуская мова`,code:`be`,locale:`be`,alternatives:[`bel`]},bn:{name:`Bengali`,nativeName:`বাংলা`,code:`bn`,locale:`bn_BD`},bs:{name:`Bosnian`,nativeName:`Bosanski`,code:`bs`,locale:`bs_BA`},br:{name:`Breton`,nativeName:`Brezhoneg`,code:`br`,locale:`br`,alternatives:[`bre`]},bg:{name:`Bulgarian`,nativeName:`Български`,code:`bg`,locale:`bg_BG`},ca:{name:`Catalan`,nativeName:`Català`,code:`ca`,locale:`ca_ES`},ceb:{name:`Cebuano`,nativeName:`Cebuano`,code:`ceb`,locale:`ceb`},"zh-cn":{name:`Chinese (China)`,nativeName:`简体中文`,code:`zh-cn`,locale:`zh_CN`},"zh-hk":{name:`Chinese (Hong Kong)`,nativeName:`繁體中文(香港)`,code:`zh-hk`,locale:`zh_HK`},"zh-tw":{name:`Chinese (Taiwan)`,nativeName:`繁體中文(台灣)`,code:`zh-tw`,locale:`zh_TW`},co:{name:`Corsican`,nativeName:`Corsu`,code:`co`,locale:`co`},hr:{name:`Croatian`,nativeName:`Hrvatski`,code:`hr`,locale:`hr`},cs:{name:`Czech`,nativeName:`Čeština`,code:`cs`,locale:`cs_CZ`},da:{name:`Danish`,nativeName:`Dansk`,code:`da`,locale:`da_DK`},dv:{name:`Divehi`,nativeName:`ދިވެހި`,code:`dv`,locale:`dv`},nl:{name:`Dutch`,nativeName:`Nederlands`,code:`nl`,locale:`nl_NL`},"nl-be":{name:`Dutch (Belgium)`,nativeName:`Nederlands (België)`,code:`nl-be`,locale:`nl_BE`},"en-au":{name:`English (Australia)`,nativeName:`English (Australia)`,code:`en-au`,locale:`en_AU`},"en-ca":{name:`English (Canada)`,nativeName:`English (Canada)`,code:`en-ca`,locale:`en_CA`},"en-nz":{name:`English (New Zealand)`,nativeName:`English (New Zealand)`,code:`en-nz`,locale:`en_NZ`},"en-za":{name:`English (South Africa)`,nativeName:`English (South Africa)`,code:`en-za`,locale:`en_ZA`},"en-gb":{name:`English (UK)`,nativeName:`English (UK)`,code:`en-gb`,locale:`en_GB`},en:{name:`English (US)`,nativeName:`English (US)`,code:`en`,locale:`en_US`},eo:{name:`Esperanto`,nativeName:`Esperanto`,code:`eo`,locale:`eo`},et:{name:`Estonian`,nativeName:`Eesti`,code:`et`,locale:`et`},fo:{name:`Faroese`,nativeName:`Føroyskt`,code:`fo`,locale:`fo`},fi:{name:`Finnish`,nativeName:`Suomi`,code:`fi`,locale:`fi`},"fr-be":{name:`French (Belgium)`,nativeName:`Français (Belgique)`,code:`fr-be`,locale:`fr_BE`},"fr-ca":{name:`French (Canada)`,nativeName:`Français (Canada)`,code:`fr-ca`,locale:`fr_CA`},fr:{name:`French`,nativeName:`Français`,code:`fr`,locale:`fr_FR`},fy:{name:`Frisian`,nativeName:`Frysk`,code:`fy`,locale:`fy`},fur:{name:`Friulian`,nativeName:`Friulian`,code:`fur`,locale:`fur`},ff:{name:`Fulah`,nativeName:`Pulaar`,code:`ff`,locale:`ff`,alternatives:[`fuc`]},gl:{name:`Galician`,nativeName:`Galego`,code:`gl`,locale:`gl_ES`},ka:{name:`Georgian`,nativeName:`ქართული`,code:`ka`,locale:`ka_GE`},de:{name:`German`,nativeName:`Deutsch`,code:`de`,locale:`de_DE`},"de-ch":{name:`German (Switzerland)`,nativeName:`Deutsch (Schweiz)`,code:`de-ch`,locale:`de_CH`},el:{name:`Greek`,nativeName:`Ελληνικά`,code:`el`,locale:`el`},kl:{name:`Greenlandic`,nativeName:`Kalaallisut`,code:`kl`,locale:`kl`,alternatives:[`kal`]},gu:{name:`Gujarati`,nativeName:`ગુજરાતી`,code:`gu`,locale:`gu`},haw:{name:`Hawaiian`,nativeName:`ʻŌlelo Hawaiʻi`,code:`haw`,locale:`haw`},he:{name:`Hebrew`,nativeName:`עברית`,code:`he`,locale:`he_IL`},hi:{name:`Hindi`,nativeName:`हिन्दी`,code:`hi`,locale:`hi_IN`},hu:{name:`Hungarian`,nativeName:`Magyar`,code:`hu`,locale:`hu_HU`},is:{name:`Icelandic`,nativeName:`Íslenska`,code:`is`,locale:`is_IS`},ido:{name:`Ido`,nativeName:`Ido`,code:`ido`,locale:`ido`},id:{name:`Indonesian`,nativeName:`Bahasa Indonesia`,code:`id`,locale:`id_ID`},ga:{name:`Irish`,nativeName:`Gaeilge`,code:`ga`,locale:`ga`},it:{name:`Italian`,nativeName:`Italiano`,code:`it`,locale:`it_IT`},ja:{name:`Japanese`,nativeName:`日本語`,code:`ja`,locale:`ja`},jv:{name:`Javanese`,nativeName:`Basa Jawa`,code:`jv`,locale:`jv`},kab:{name:`Kabyle`,nativeName:`Taqbaylit`,code:`kab`,locale:`kab`},kn:{name:`Kannada`,nativeName:`ಕನ್ನಡ`,code:`kn`,locale:`kn`},kk:{name:`Kazakh`,nativeName:`Қазақ тілі`,code:`kk`,locale:`kk`},km:{name:`Khmer`,nativeName:`ភាសាខ្មែរ`,code:`km`,locale:`km`},rw:{name:`Kinyarwanda`,nativeName:`Ikinyarwanda`,code:`rw`,locale:`rw`,alternatives:[`kin`]},ky:{name:`Kirghiz`,nativeName:`кыргыз тили`,code:`ky`,locale:`ky`},ko:{name:`Korean`,nativeName:`한국어`,code:`ko`,locale:`ko_KR`},ckb:{name:`Kurdish (Sorani)`,nativeName:`کوردی`,code:`ckb`,locale:`ckb`},lo:{name:`Lao`,nativeName:`ພາສາລາວ`,code:`lo`,locale:`lo`},lv:{name:`Latvian`,nativeName:`Latviešu valoda`,code:`lv`,locale:`lv`},li:{name:`Limburgish`,nativeName:`Limburgs`,code:`li`,locale:`li`},ln:{name:`Lingala`,nativeName:`Ngala`,code:`ln`,locale:`ln`,alternatives:[`lin`]},lt:{name:`Lithuanian`,nativeName:`Lietuvių kalba`,code:`lt`,locale:`lt_LT`},lb:{name:`Luxembourgish`,nativeName:`Lëtzebuergesch`,code:`lb`,locale:`lb`},mk:{name:`Macedonian`,nativeName:`Македонски јазик`,code:`mk`,locale:`mk_MK`},mg:{name:`Malagasy`,nativeName:`Malagasy`,code:`mg`,locale:`mg`},ms:{name:`Malay`,nativeName:`Bahasa Melayu`,code:`ms`,locale:`ms_MY`},ml:{name:`Malayalam`,nativeName:`മലയാളം`,code:`ml`,locale:`ml_IN`},mi:{name:`Maori`,nativeName:`Te Reo Māori`,code:`mi`,locale:`mi`,alternatives:[`mri`]},mr:{name:`Marathi`,nativeName:`मराठी`,code:`mr`,locale:`mr`},mn:{name:`Mongolian`,nativeName:`Монгол`,code:`mn`,locale:`mn`},me:{name:`Montenegrin`,nativeName:`Crnogorski`,code:`me`,locale:`crn`},ary:{name:`Moroccan Arabic`,nativeName:`العربية المغربية`,code:`ary`,locale:`ary`},my:{name:`Myanmar (Burmese)`,nativeName:`ဗမာစာ`,code:`my`,locale:`my_MM`},ne:{name:`Nepali`,nativeName:`नेपाली`,code:`ne`,locale:`ne_NP`},nb:{name:`Norwegian Bokmål`,nativeName:`Norsk bokmål`,code:`nb`,locale:`nb_NO`},nn:{name:`Norwegian Nynorsk`,nativeName:`Norsk nynorsk`,code:`nn`,locale:`nn_NO`},oc:{name:`Occitan`,nativeName:`Occitan`,code:`oc`,locale:`oc`,alternatives:[`oci`]},ps:{name:`Pashto`,nativeName:`پښتو`,code:`ps`,locale:`ps`},fa:{name:`Persian`,nativeName:`فارسی`,code:`fa`,locale:`fa_IR`},"fa-af":{name:`Persian (Afghanistan)`,nativeName:`فارسی (افغانستان)`,code:`fa-af`,locale:`fa_AF`},pl:{name:`Polish`,nativeName:`Polski`,code:`pl`,locale:`pl_PL`},"pt-br":{name:`Portuguese (Brazil)`,nativeName:`Português do Brasil`,code:`pt-br`,locale:`pt_BR`},pt:{name:`Portuguese (Portugal)`,nativeName:`Português`,code:`pt`,locale:`pt_PT`},pa:{name:`Punjabi`,nativeName:`ਪੰਜਾਬੀ`,code:`pa`,locale:`pa_IN`},ro:{name:`Romanian`,nativeName:`Română`,code:`ro`,locale:`ro_RO`},rm:{name:`Romansh`,nativeName:`Rumantsch`,code:`rm`,locale:`rm`,alternatives:[`roh`]},ru:{name:`Russian`,nativeName:`Русский`,code:`ru`,locale:`ru_RU`},rue:{name:`Rusyn`,nativeName:`Русиньскый`,code:`rue`,locale:`rue`},sah:{name:`Sakha`,nativeName:`Сахалыы`,code:`sah`,locale:`sah`},sa:{name:`Sanskrit`,nativeName:`संस्कृत`,code:`sa`,locale:`sa_IN`},sc:{name:`Sardinian`,nativeName:`Sardu`,code:`sc`,locale:`sc`,alternatives:[`srd`]},gd:{name:`Scottish Gaelic`,nativeName:`Gàidhlig`,code:`gd`,locale:`gd`},sr:{name:`Serbian`,nativeName:`Српски`,code:`sr`,locale:`sr_RS`},szl:{name:`Silesian`,nativeName:`Ślōnskŏ gŏdka`,code:`szl`,locale:`szl`},sd:{name:`Sindhi`,nativeName:`سنڌي`,code:`sd`,locale:`sd`,alternatives:[`snd`]},si:{name:`Sinhala`,nativeName:`සිංහල`,code:`si`,locale:`si_LK`},sk:{name:`Slovak`,nativeName:`Slovenčina`,code:`sk`,locale:`sk_SK`},sl:{name:`Slovenian`,nativeName:`Slovenščina`,code:`sl`,locale:`sl_SI`},so:{name:`Somali`,nativeName:`Afsoomaali`,code:`so`,locale:`so`},"es-ar":{name:`Spanish (Argentina)`,nativeName:`Español de Argentina`,code:`es-ar`,locale:`es_AR`},"es-cl":{name:`Spanish (Chile)`,nativeName:`Español de Chile`,code:`es-cl`,locale:`es_CL`},"es-co":{name:`Spanish (Colombia)`,nativeName:`Español de Colombia`,code:`es-co`,locale:`es_CO`},"es-mx":{name:`Spanish (Mexico)`,nativeName:`Español de México`,code:`es-mx`,locale:`es_MX`},"es-pe":{name:`Spanish (Peru)`,nativeName:`Español de Perú`,code:`es-pe`,locale:`es_PE`},"es-pr":{name:`Spanish (Puerto Rico)`,nativeName:`Español de Puerto Rico`,code:`es-pr`,locale:`es_PR`},es:{name:`Spanish (Spain)`,nativeName:`Español`,code:`es`,locale:`es_ES`},"es-ve":{name:`Spanish (Venezuela)`,nativeName:`Español de Venezuela`,code:`es-ve`,locale:`es_VE`},su:{name:`Sundanese`,nativeName:`Basa Sunda`,code:`su`,locale:`su`},sw:{name:`Swahili`,nativeName:`Kiswahili`,code:`sw`,locale:`sw`},sv:{name:`Swedish`,nativeName:`Svenska`,code:`sv`,locale:`sv_SE`},gsw:{name:`Swiss German`,native:`Schwyzerdütsch`,code:`gsw`,locale:`gsw`},tl:{name:`Tagalog`,nativeName:`Tagalog`,code:`tl`,locale:`tl`},tg:{name:`Tajik`,nativeName:`Тоҷикӣ`,code:`tg`,locale:`tg`},tzm:{name:`Tamazight (Central Atlas)`,nativeName:`ⵜⴰⵎⴰⵣⵉⵖⵜ`,code:`tzm`,locale:`tzm`},ta:{name:`Tamil`,nativeName:`தமிழ்`,code:`ta`,locale:`ta_IN`},"ta-lk":{name:`Tamil (Sri Lanka)`,nativeName:`தமிழ்`,code:`ta-lk`,locale:`ta_LK`},tt:{name:`Tatar`,nativeName:`Татар теле`,code:`tt`,locale:`tt`},te:{name:`Telugu`,nativeName:`తెలుగు`,code:`te`,locale:`te`},th:{name:`Thai`,nativeName:`ไทย`,code:`th`,locale:`th`},bo:{name:`Tibetan`,nativeName:`བོད་སྐད`,code:`bo`,locale:`bo`},ti:{name:`Tigrinya`,nativeName:`ትግርኛ`,code:`ti`,locale:`ti`,alternatives:[`tir`]},tr:{name:`Turkish`,nativeName:`Türkçe`,code:`tr`,locale:`tr_TR`},tk:{name:`Turkmen`,nativeName:`Türkmençe`,code:`tk`,locale:`tk`,alternatives:[`tuk`]},twd:{name:`Tweants`,nativeName:`Twents`,code:`twd`,locale:`twd`},uk:{name:`Ukrainian`,nativeName:`Українська`,code:`uk`,locale:`uk`},ur:{name:`Urdu`,nativeName:`اردو`,code:`ur`,locale:`ur`},uz:{name:`Uzbek`,nativeName:`O‘zbekcha`,code:`uz`,locale:`uz`},vi:{name:`Vietnamese`,nativeName:`Tiếng Việt`,code:`vi`,locale:`vi`},wa:{name:`Walloon`,nativeName:`Walon`,code:`wa`,locale:`wa`},cy:{name:`Welsh`,nativeName:`Cymraeg`,code:`cy`,locale:`cy`},yo:{name:`Yoruba`,nativeName:`Yorùbá`,code:`yo`,locale:`yo`,alternatives:[`yor`]}};function yn(){let e=document.documentElement.getAttribute(`lang`)||`en`;return(vn[e.toLowerCase()]||vn[e.split(`-`)[0]]||vn.en)?.locale||`en_US`}function bn(){return window.wcpos?.translationVersion||`0.1.0`}function xn({namespace:e,project:n,resources:r}){let i=je.createInstance(),a=yn(),o=bn(),s={lng:a,fallbackLng:`en`,ns:[e],defaultNS:e,keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1,prefix:`{`,suffix:`}`},backend:{backends:[Ct,_t],backendOptions:[{prefix:`wcpos_i18n_`,expirationTime:6048e5,defaultVersion:o},{loadPath:(e,t)=>`https://cdn.jsdelivr.net/gh/wcpos/translations@${o}/translations/js/${e[0]}/${n}/${t[0]}.json`}]}};return r&&(s.resources=r,s.partialBundledLanguages=!0),{i18n:i,i18nPromise:i.use(Ke).use(hn).init(s).then(()=>i),t:i.t.bind(i),Trans:n=>(0,t.createElement)(_n,{...n,i18n:i,ns:e})}}var{i18n:Sn,i18nPromise:Cn,t:j,Trans:wn}=xn({namespace:`wp-admin-template-editor`,project:`woocommerce-pos`,resources:{en:{"wp-admin-template-editor":{"editor.info_thermal":`Receipt Printer template ({size} paper) — Sends output directly to a thermal printer like Epson or Star. Renders on the device without needing a server connection.`,"editor.info_legacy_php":`Browser template (Legacy PHP) — Prints using your browser's print dialog. Requires a server connection to generate the receipt.`,"editor.info_browser":`Browser template — Prints using your browser's print dialog. Renders on the device without needing a server connection.`,"editor.fields":`Fields`,"editor.resize_fields":`Resize fields panel`,"editor.preview":`Preview`,"editor.thermal_preview":`Thermal Preview`,"editor.template_preview":`Template preview`,"editor.thermal_template_preview":`Thermal template preview`,"editor.zoom_in":`Zoom in`,"editor.zoom_out":`Zoom out`,"editor.no_orders":`No POS orders found. Create an order in the POS to preview templates.`,"editor.php_save_notice":`This preview shows your last saved version with your latest POS order — save the template to refresh it.`,"editor.sample_data":`Sample Data`,"editor.order":`Order`,"editor.no_pos_orders":`No POS orders found`,"editor.loading_data":`Loading…`,"editor.search_fields_placeholder":`Search fields...`,"editor.search_fields_label":`Search fields`,"editor.clear_search":`Clear search`,"editor.no_field_matches":`No fields match "{query}".`,"editor.insert":`Insert`,"editor.insert_loop_block":`Insert loop block`,"editor.loop":`loop`,"editor.field_type_list":`list`,"editor.toolbar.undo":`Undo`,"editor.toolbar.redo":`Redo`,"editor.toolbar.find":`Find`,"editor.toolbar.wrap":`Word wrap`,"editor.toolbar.format":`Format`,"editor.toolbar.fold_all":`Fold all`,"editor.toolbar.unfold_all":`Unfold all`,"editor.status.line_col":`Ln {line}, Col {col}`,"editor.status.lines":`{count} lines`,"editor.status.engine_html":`HTML & Mustache`,"editor.status.engine_thermal":`Thermal`,"editor.status.engine_php":`Legacy PHP`,"editor.elements":`Elements`,"element.barcode":`Barcode`,"element.qr_code":`QR Code`,"element.line_single":`Line (single)`,"element.line_double":`Line (double)`,"element.row_columns":`Row / Columns`,"element.feed":`Feed (blank lines)`,"element.cut":`Cut`,"element.image":`Image`,"editor.preview_failed":`Preview failed. Save the template and try again.`}}}}),Tn=u((e=>{var t=globalThis.React,n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),M=u(((e,t)=>{t.exports=Tn()}))();function En(e){return j(e===`thermal`?`editor.status.engine_thermal`:e===`legacy-php`?`editor.status.engine_php`:`editor.status.engine_html`)}function Dn({engine:e,line:t,col:n,lineCount:r}){return(0,M.jsxs)(`div`,{className:`wcpos:flex wcpos:items-center wcpos:gap-3 wcpos:px-3 wcpos:py-1.5 wcpos:border-t wcpos:border-gray-200 wcpos:bg-gray-50 wcpos:text-xs wcpos:text-gray-600 wcpos:font-mono wcpos:tabular-nums`,children:[(0,M.jsx)(`span`,{children:En(e)}),(0,M.jsx)(`span`,{className:`wcpos:text-gray-300`,"aria-hidden":`true`,children:`·`}),(0,M.jsx)(`span`,{children:j(`editor.status.line_col`,{line:t,col:n})}),(0,M.jsx)(`span`,{className:`wcpos:text-gray-300`,"aria-hidden":`true`,children:`·`}),(0,M.jsx)(`span`,{children:j(`editor.status.lines`,{count:r})})]})}var On=[],kn=[];(()=>{let e=`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,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,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;){let r=t+n>>1;if(e<On[r])n=r;else if(e>=kn[r])t=r+1;else return!0;if(t==n)return!1}}function jn(e){return e>=127462&&e<=127487}var Mn=8205;function Nn(e,t,n=!0,r=!0){return(n?Pn:Fn)(e,t,r)}function Pn(e,t,n){if(t==e.length)return t;t&&Ln(e.charCodeAt(t))&&Rn(e.charCodeAt(t-1))&&t--;let r=In(e,t);for(t+=zn(r);t<e.length;){let i=In(e,t);if(r==Mn||i==Mn||n&&An(i))t+=zn(i),r=i;else if(jn(i)){let n=0,r=t-2;for(;r>=0&&jn(In(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function Fn(e,t,n){for(;t>1;){let r=Pn(e,t-2,n);if(r<t)return r;t--}return 0}function In(e,t){let n=e.charCodeAt(t);if(!Rn(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Ln(r)?(n-55296<<10)+(r-56320)+65536:n}function Ln(e){return e>=56320&&e<57344}function Rn(e){return e>=55296&&e<56320}function zn(e){return e<65536?1:2}var Bn=class e{lineAt(e){if(e<0||e>this.length)throw 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 RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Xn(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Hn.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Xn(this,e,t);let n=[];return this.decompose(e,t,n,0),Hn.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Kn(this),i=new Kn(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new Kn(this,e)}iterRange(e,t=this.length){return new qn(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Jn(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new Vn(t):Hn.from(Vn.split(t,[]))}},Vn=class e extends Bn{constructor(e,t=Un(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new Yn(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(Gn(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=Wn(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=Xn(this,t,n);let i=Wn(this.text,Wn(r.text,Gn(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):Hn.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
2 2 `){[e,t]=Xn(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},Hn=class e extends Bn{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=Xn(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
3 3 `){[e,t]=Xn(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new Vn(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof Vn&&c&&(n=u[u.length-1])instanceof Vn&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new Vn(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};Bn.empty=new Vn([``],0);function Un(e){let t=-1;for(let n of e)t+=n.length+1;return t}function Wn(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function Gn(e,t,n){return Wn(e,[``],t,n)}var Kn=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof Vn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof Vn?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
4 -`,this;e--}else if(r instanceof Vn){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Vn?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},qn=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new Kn(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),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!=``}},Jn=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(Bn.prototype[Symbol.iterator]=function(){return this.iter()},Kn.prototype[Symbol.iterator]=qn.prototype[Symbol.iterator]=Jn.prototype[Symbol.iterator]=function(){return this});var Yn=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function Xn(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function Zn(e,t,n=!0,r=!0){return Nn(e,t,n,r)}function Qn(e){return e>=56320&&e<57344}function $n(e){return e>=55296&&e<56320}function er(e,t){let n=e.charCodeAt(t);if(!$n(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Qn(r)?(n-55296<<10)+(r-56320)+65536:n}function tr(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function nr(e){return e<65536?1:2}var rr=/\r\n?|\n/,ir=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(ir||={}),ar=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){lr(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:dr(this,e)}mapDesc(e,t=!1){return e.empty?this:ur(this,e,t)}mapPos(e,t=-1,n=ir.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=ir.Simple&&c>=e&&(n==ir.TrackDel&&r<e&&c>e||n==ir.TrackBefore&&r<e||n==ir.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},or=class e extends ar{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return lr(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return ur(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(Bn.empty);r.push(a?t.slice(i,i+a):Bn.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:dr(this,e,!0)}map(e,t=!1){return e.empty?this:ur(this,e,t,!0)}iterChanges(e,t=!1){lr(this,e,t)}get desc(){return ar.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new fr(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);sr(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;sr(n,e,t),t>0&&cr(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);sr(n,e,-1),sr(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:ar.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&sr(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?Bn.of(l.split(r||rr)):l:Bn.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&sr(i,e-o,-1),sr(i,s-e,d),cr(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(Bn.empty);r[e]=Bn.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function sr(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function cr(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Bn.empty);e.push(n)}}function lr(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=Bn.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function ur(e,t,n,r=!1){let i=[],a=r?[]:null,o=new fr(e),s=new fr(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);sr(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(sr(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(sr(i,0,o.ins),a&&cr(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;sr(i,t,e<o.i?o.ins:0),a&&e<o.i&&cr(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?or.createSet(i,a):ar.create(i);else throw Error(`Mismatched change set lengths`)}function dr(e,t,n=!1){let r=[],i=n?[]:null,a=new fr(e),o=new fr(t);for(let e=!1;;)if(a.done&&o.done)return i?or.createSet(r,i):ar.create(r);else if(a.ins==0)sr(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)sr(r,0,o.ins,e),i&&cr(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;sr(r,t,n,e),i&&n&&cr(i,r,o.text)}else o.ins==-1?(sr(r,a.off?0:a.len,t,e),i&&cr(i,r,a.textBit(t))):(sr(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&cr(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var fr=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Bn.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Bn.empty:t[n].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)}},pr=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return N.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return N.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return N.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},N=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>pr.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return pr.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?pr.create(t,e,a|32,n):pr.create(e,t,a,n)}static undirectionalRange(e,t){return pr.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function mr(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var hr=0,P=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=hr++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:gr),!!t.static,t.enables)}of(e){return new _r([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new _r(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new _r(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function gr(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var _r=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=hr++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||yr(e,c)){let r=t(e);if(a?!vr(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Mr(o,c);if(this.dependencies.every(t=>t instanceof P?o.facet(t)===e.facet(t):t instanceof Sr?o.field(t,!1)==e.field(t,!1):!0)||(a?vr(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function vr(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function yr(e,t){let n=!1;for(let r of t)jr(e,r)&1&&(n=!0);return n}function br(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=Mr(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)jr(e,t);return e.values[o]=s(e),1},update(e,n){if(!yr(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=yr(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&gr(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var xr=P.define({static:!0}),Sr=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(hr++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(xr).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(xr),i=n.facet(xr),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,xr.of({field:this,create:e})]}get extension(){return this}},Cr={lowest:4,low:3,default:2,high:1,highest:0};function wr(e){return t=>new Er(t,e)}var Tr={highest:wr(Cr.highest),high:wr(Cr.high),default:wr(Cr.default),low:wr(Cr.low),lowest:wr(Cr.lowest)},Er=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},Dr=class e{of(e){return new Or(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Or=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},kr=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of Ar(t,n,o))e instanceof Sr?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,gr(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>br(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function Ar(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Or&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Or){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof Er)a(e.inner,e.prec);else if(e instanceof Sr)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof _r)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,Cr.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,Cr.default),r.reduce((e,t)=>e.concat(t))}function jr(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Mr(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var Nr=P.define(),Pr=P.define({combine:e=>e.some(e=>e),static:!0}),Fr=P.define({combine:e=>e.length?e[0]:void 0,static:!0}),Ir=P.define(),Lr=P.define(),Rr=P.define(),zr=P.define({combine:e=>e.length?e[0]:!1}),Br=class{constructor(e,t){this.type=e,this.value=t}static define(){return new Vr}},Vr=class{of(e){return new Br(this,e)}},Hr=class{constructor(e){this.map=e}of(e){return new Ur(this,e)}},Ur=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Hr(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};Ur.reconfigure=Ur.define(),Ur.appendConfig=Ur.define();var Wr=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&mr(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};Wr.time=Br.define(),Wr.userEvent=Br.define(),Wr.addToHistory=Br.define(),Wr.remote=Br.define();function Gr(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function Kr(e,t,n){let r,i,a;return n?(r=t.changes,i=or.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:Ur.mapEffects(e.effects,r).concat(Ur.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function qr(e,t,n){let r=t.selection,i=Qr(t.annotations);return t.userEvent&&(i=i.concat(Wr.userEvent.of(t.userEvent))),{changes:t.changes instanceof or?t.changes:or.of(t.changes||[],n,e.facet(Fr)),selection:r&&(r instanceof N?r:N.single(r.anchor,r.head)),effects:Qr(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function Jr(e,t,n){let r=qr(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=Kr(r,qr(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=Wr.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Xr(n?Yr(i):i)}function Yr(e){let t=e.startState,n=!0;for(let r of t.facet(Ir)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:Gr(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=or.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=Wr.create(t,r,e.selection&&e.selection.map(i),Ur.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Lr);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof Wr?i:Array.isArray(i)&&i.length==1&&i[0]instanceof Wr?i[0]:Jr(t,Qr(i),!1)}return e}function Xr(e){let t=e.startState,n=t.facet(Rr),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=Kr(r,qr(t,a,e.changes.newLength),!0))}return r==e?e:Wr.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var Zr=[];function Qr(e){return e==null?Zr:Array.isArray(e)?e:[e]}var $r=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})($r||={}),ei=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ti;try{ti=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function ni(e){if(ti)return ti.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>`€`&&(n.toUpperCase()!=n.toLowerCase()||ei.test(n)))return!0}return!1}function ri(e){return t=>{if(!/\S/.test(t))return $r.Space;if(ni(t))return $r.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return $r.Word;return $r.Other}}var ii=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)jr(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return jr(this,n),Mr(this,n)}update(...e){return Jr(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Dr.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(Ur.reconfigure)?(n=null,r=e.value):e.is(Ur.appendConfig)&&(n=null,r=Qr(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=kr.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Pr)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:N.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=Qr(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=Ur.mapEffects(a,c).concat(Ur.mapEffects(Qr(o.effects),l))}return{changes:r,selection:N.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof or?t:or.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return Bn.of(t.split(this.facet(e.lineSeparator)||rr))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(jr(this,t),Mr(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof Sr&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:N.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=kr.resolve(t.extensions||[],new Map),r=t.doc instanceof Bn?t.doc:Bn.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||rr)),i=t.selection?t.selection instanceof N?t.selection:N.single(t.selection.anchor,t.selection.head):N.single(0);return mr(i,r.length),n.staticFacet(Pr)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
5 -`}get readOnly(){return this.facet(zr)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Nr))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return ri(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=Zn(t,a,!1);if(i(t.slice(e,a))!=$r.Word)break;a=e}for(;o<r;){let e=Zn(t,o);if(i(t.slice(o,e))!=$r.Word)break;o=e}return a==o?null:N.range(a+n,o+n)}};ii.allowMultipleSelections=Pr,ii.tabSize=P.define({combine:e=>e.length?e[0]:4}),ii.lineSeparator=Fr,ii.readOnly=zr,ii.phrases=P.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),ii.languageData=Nr,ii.changeFilter=Ir,ii.transactionFilter=Lr,ii.transactionExtender=Rr,Dr.reconfigure=Ur.define();function ai(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(a!==i&&i!==void 0){if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var oi=class{eq(e){return this==e}range(e,t=e){return ci.create(e,t,this)}};oi.prototype.startSide=oi.prototype.endSide=0,oi.prototype.point=!1,oi.prototype.mapMode=ir.TrackDel;function si(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var ci=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function li(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var ui=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return fi(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n,r,i,a){let o=[],s=[],c=[],l=-1,u=-1;iter:for(let e=0;e<this.value.length;e++){let d=this.value[e],f=this.from[e]+t,p=this.to[e]+t,m,h;if(f==p){let e=n.mapPos(f,d.startSide,d.mapMode);if(e==null||(m=h=e,d.startSide!=d.endSide&&(h=n.mapPos(f,d.endSide),h<m)))continue}else if(m=n.mapPos(f,d.startSide),h=n.mapPos(p,d.endSide),m>h||m==h&&d.startSide>0&&d.endSide<=0)continue;if(!((h-m||d.endSide-d.startSide)<0)){if(l<0&&(l=m),d.point&&(u=Math.max(u,h-m)),(m-r||d.startSide-i)>=0)o.push(d),s.push(m-l),c.push(h-l),r=h,i=d.endSide;else{if(m==h)for(let e=o.length;e>0;e--){if((m-(c[e-1]+l)||d.startSide-o[e-1].endSide)>=0){o.splice(e,0,d),s.splice(e,0,m-l),c.splice(e,0,h-l);continue iter}if((m-(s[e-1]+l)||d.endSide-o[e-1].startSide)>0)break}a(m,h,d)}}}return{mapped:o.length?new e(s,c,o,u):null,pos:l}}},di=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(li)),this.isEmpty)return n.length?e.of(n):this;let s=new gi(this,null,-1).goto(0),c=0,l=[],u=new mi;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value,!1)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value,!1)||l.push(ci.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1,a,o=(e,t,n)=>{a||=new mi,a.addRange(e,t,n,!1)};for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],s=this.chunk[e],c=t.touchesRange(a,a+s.length);if(c===!1)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(c===!0){let[e,c]=n.length?[fi(r)+fi(n).length,fi(fi(n).value).endSide]:[-1,-1],{mapped:l,pos:u}=s.map(a,t,e,c,o);l&&(i=Math.max(i,l.maxPoint),n.push(l),r.push(u))}}let s=this.nextLayer.map(t);return a&&(s=a.finishInner(s)),n.length==0?s:new e(r,n,s||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return _i.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return _i.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=hi(a,o,n),c=new yi(a,s,i),l=new yi(o,s,i);n.iterGaps((e,t,n)=>bi(c,e,l,t,n,r)),n.empty&&n.length==0&&bi(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=1e9-1;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=hi(i,a),s=new yi(i,o,0).goto(n),c=new yi(a,o,0).goto(n);for(;;){if(s.to!=c.to||!xi(s.active,c.active)||s.point&&(!c.point||!si(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new yi(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new mi;for(let r of e instanceof ci?[e]:t?pi(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=fi(t);for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};di.empty=new di([],[],null,-1);function fi(e){return e[e.length-1]}function pi(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(li(t,r)>0)return e.slice().sort(li);t=r}return e}di.empty.nextLayer=di.empty;var mi=class e{finishChunk(e){this.chunks.push(new ui(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(t,n,r,i){this.addInner(t,n,r,i)||(this.nextLayer||=new e).addRange(t,n,r,i)}addInner(e,t,n,r){let i=e-this.lastTo||n.startSide-this.last.endSide;if(r&&i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(di.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=di.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function hi(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var gi=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},_i=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new gi(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)vi(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)vi(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),vi(this.heap,0)}}};function vi(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var yi=class{constructor(e,t,n){this.minPoint=n,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=_i.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Si(this.active,e),Si(this.activeTo,e),Si(this.activeRank,e),this.minActive=wi(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;Ci(this.active,t,n),Ci(this.activeTo,t,r),Ci(this.activeRank,t,i),e&&Ci(e,t,this.cursor.from),this.minActive=wi(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&Si(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function bi(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&si(e.point,n.point)&&xi(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&a.boundChange(s),d>s&&!xi(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function xi(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!si(e[n],t[n]))return!1;return!0}function Si(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function Ci(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function wi(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Ti(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=Zn(e,i));return r}function Ei(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=Zn(e,r)}return r===!0?-1:e.length}for(var Di=`ͼ`,Oi=typeof Symbol>`u`?`__ͼ`:Symbol.for(Di),ki=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),Ai=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},ji=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
6 -`)}static newName(){let e=Ai[Oi]||1;return Ai[Oi]=e+1,Di+e.toString(36)}static mount(e,t,n){let r=e[ki],i=n&&n.nonce;r?i&&r.setNonce(i):r=new Ni(e,i),r.mount(Array.isArray(t)?t:[t],e)}},Mi=new Map,Ni=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=Mi.get(n);if(t)return e[ki]=t;this.sheet=new r.CSSStyleSheet,Mi.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[ki]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
7 -`;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},Pi={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:`'`},Fi={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},Ii=typeof navigator<`u`&&/Mac/.test(navigator.platform),Li=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ri=0;Ri<10;Ri++)Pi[48+Ri]=Pi[96+Ri]=String(Ri);for(var Ri=1;Ri<=24;Ri++)Pi[Ri+111]=`F`+Ri;for(var Ri=65;Ri<=90;Ri++)Pi[Ri]=String.fromCharCode(Ri+32),Fi[Ri]=String.fromCharCode(Ri);for(var zi in Pi)Fi.hasOwnProperty(zi)||(Fi[zi]=Pi[zi]);function Bi(e){var t=!(Ii&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Li&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?Fi:Pi)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}function Vi(){var e=arguments[0];typeof e==`string`&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n==`object`&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i==`string`?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t<arguments.length;t++)Hi(e,arguments[t]);return e}function Hi(e,t){if(typeof t==`string`)e.appendChild(document.createTextNode(t));else if(t!=null){if(t.nodeType!=null)e.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)Hi(e,t[n]);else throw RangeError(`Unsupported child node: `+t)}}var Ui=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},Wi=typeof document<`u`?document:{documentElement:{style:{}}},Gi=/Edge\/(\d+)/.exec(Ui.userAgent),Ki=/MSIE \d/.test(Ui.userAgent),qi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ui.userAgent),Ji=!!(Ki||qi||Gi),Yi=!Ji&&/gecko\/(\d+)/i.test(Ui.userAgent),Xi=!Ji&&/Chrome\/(\d+)/.exec(Ui.userAgent),Zi=`webkitFontSmoothing`in Wi.documentElement.style,Qi=!Ji&&/Apple Computer/.test(Ui.vendor),$i=Qi&&(/Mobile\/\w+/.test(Ui.userAgent)||Ui.maxTouchPoints>2),F={mac:$i||/Mac/.test(Ui.platform),windows:/Win/.test(Ui.platform),linux:/Linux|X11/.test(Ui.platform),ie:Ji,ie_version:Ki?Wi.documentMode||6:qi?+qi[1]:Gi?+Gi[1]:0,gecko:Yi,gecko_version:Yi?+(/Firefox\/(\d+)/.exec(Ui.userAgent)||[0,0])[1]:0,chrome:!!Xi,chrome_version:Xi?+Xi[1]:0,ios:$i,android:/Android\b/.test(Ui.userAgent),webkit:Zi,webkit_version:Zi?+(/\bAppleWebKit\/(\d+)/.exec(Ui.userAgent)||[0,0])[1]:0,safari:Qi,safari_version:Qi?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Ui.userAgent)||[0,0])[1]:0,tabSize:Wi.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function ea(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var ta=Object.create(null);function na(e,t,n){if(e==t)return!0;e||=ta,t||=ta;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function ra(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function ia(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function aa(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var oa=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},sa=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(sa||={}),ca=class extends oi{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new la(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new da(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=fa(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new da(e,n,r,t,e.widget||null,!0)}static line(e){return new ua(e)}static set(e,t=!1){return di.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};ca.none=di.empty;var la=class e extends ca{constructor(e){let{start:t,end:n}=fa(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?ea(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||ta}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&na(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};la.prototype.point=!1;var ua=class e extends ca{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&na(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};ua.prototype.mapMode=ir.TrackBefore,ua.prototype.point=!0;var da=class e extends ca{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?ir.TrackBefore:ir.TrackAfter:ir.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?sa.WidgetBefore:sa.WidgetAfter:sa.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&pa(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};da.prototype.point=!0;function fa(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function pa(e,t){return e==t||!!(e&&t&&e.compare(t))}function ma(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var ha=class e extends oi{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&na(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||ta,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return di.of(e,t)}};ha.prototype.startSide=ha.prototype.endSide=-1;function ga(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function _a(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function va(e,t){if(!t.anchorNode)return!1;try{return _a(e,t.anchorNode)}catch{return!1}}function ya(e){return e.nodeType==3?Ia(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function ba(e,t,n,r){return n?Ca(e,t,n,r,-1)||Ca(e,t,n,r,1):!1}function xa(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function Sa(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function Ca(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:wa(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=xa(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?wa(e):0}else return!1}}function wa(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ta(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function Ea(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Da(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Oa(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=Ea(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=Da(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top+o?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left+a?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right-a&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g){if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function ka(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var Aa=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?wa(t):0),n,Math.min(e.focusOffset,n?wa(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}};function ja(e){let t=[];for(let n=e;n;n=n.nodeType==11?n.host:n.parentNode)n.nodeType==1&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function Ma(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}var Na=null;F.safari&&F.safari_version>=26&&(Na=!1);function Pa(e){if(e.setActive)return e.setActive();if(Na)return e.focus(Na);let t=ja(e);e.focus(Na==null?{get preventScroll(){return Na={preventScroll:!0},!0}}:void 0),Na||(Na=!1,Ma(t))}var Fa;function Ia(e,t,n=t){let r=Fa||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function La(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function Ra(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function za(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,wa(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=wa(n))}else if(n==e)return!0;else r=xa(n),n=n.parentNode}function Ba(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function Va(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=wa(n)}else if(n.parentNode&&!Sa(n))r=xa(n),n=n.parentNode;else return null}function Ha(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Sa(n))r=xa(n)+1,n=n.parentNode;else return null}var Ua=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,xa(t),n)}static after(t,n){return new e(t.parentNode,xa(t)+1,n)}},Wa=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(Wa||={}),Ga=Wa.LTR,Ka=Wa.RTL;function qa(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var Ja=qa(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),Ya=qa(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),Xa=Object.create(null),Za=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Xa[t]=n,Xa[n]=-t}function Qa(e){return e<=247?Ja[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?Ya[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var $a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,eo=class{get dir(){return this.level%2?Ka:Ga}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function to(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!to(r.inner,i.inner))return!1}return!0}var no=[];function ro(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=Qa(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),no[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=no[e];if(i==128)e<s-1&&t==no[e+1]&&t&24?i=no[e]=t:no[e]=256;else if(i==64){let i=e+1;for(;i<s&&no[i]==64;)i++;let a=e&&t==8||i<n&&no[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)no[t]=a;e=i-1}else i==8&&r==1&&(no[e]=1);t=i,i&7&&(r=i)}}}function io(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=Xa[n=e.charCodeAt(t)]){if(r<0){for(let e=s-3;e>=0;e-=3)if(Za[e+1]==-r){let n=Za[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(no[t]=no[Za[e]]=r),s=e;break}}else if(Za.length==189)break;else Za[s++]=t,Za[s++]=n,Za[s++]=c}else if((o=no[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=Za[t+2];if(n&2)break;if(e)Za[t+2]|=2;else{if(n&4)break;Za[t+2]|=4}}}}}function ao(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=no[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(no[o]==256)o++;else break;let l=a==1,u=l==((o<t?no[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),no[--t]=u;c=o}else a=o,c++}}}function oo(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=no[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(no[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new eo(c,m.from,f)),so(e,m.direction==Ga==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?no[p]!=s:no[p]==s))break;else p++;d?oo(e,c,p,r+1,i,d,o):c<p&&o.push(new eo(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=no[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(no[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new eo(m.to,c,f)),so(e,m.direction==Ga==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?no[p-1]!=s:no[p-1]==s))break;else p--;d?oo(e,p,c,r+1,i,d,o):p<c&&o.push(new eo(p,c,f)),c=p}}function so(e,t,n,r,i,a,o){let s=t%2?2:1;ro(e,i,a,r,s),io(e,i,a,r,s),ao(i,a,r,s),oo(e,i,a,t,n,r,o)}function co(e,t,n){if(!e)return[new eo(0,0,+(t==Ka))];if(t==Ga&&!n.length&&!$a.test(e))return lo(e.length);if(n.length)for(;e.length>no.length;)no[no.length]=256;let r=[],i=t==Ga?0:1;return so(e,i,i,n,0,e.length,r),r}function lo(e){return[new eo(0,e,0)]}var uo=``;function fo(e,t,n,r,i){let a=r.head-e.from,o=eo.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=Zn(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),uo=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!i<s.level?N.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level):N.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function po(e,t,n){for(let r=t;r<n;r++){let t=Qa(e.charCodeAt(r));if(t==1)return Ga;if(t==2||t==4)return Ka}return Ga}var mo=P.define(),ho=P.define(),go=P.define(),_o=P.define(),vo=P.define(),yo=P.define(),bo=P.define(),xo=P.define(),So=P.define(),Co=P.define({combine:e=>e.some(e=>e)}),wo=P.define({combine:e=>e.some(e=>e)}),To=P.define(),Eo=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(N.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Do=Ur.define({map:(e,t)=>e.map(t)}),Oo=Ur.define();function ko(e,t,n){let r=e.facet(_o);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var Ao=P.define({combine:e=>!e.length||e[0]}),jo=0,Mo=P.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),No=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(Mo.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Mo.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(jo++,t,r,i,e=>{let t=[];return o&&t.push(Lo.of(t=>{let n=t.plugin(e);return n?o(n):ca.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},Po=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){ko(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(ko(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){ko(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},Fo=P.define(),Io=P.define(),Lo=P.define(),Ro=P.define(),zo=P.define(),Bo=P.define(),Vo=P.define();function Ho(e,t){let n=e.state.facet(Vo);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return di.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=po(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var Uo=P.define();function Wo(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(Uo)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var Go=P.define(),Ko=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},qo=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=or.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new Ko(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Jo=[],Yo=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Jo}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&ra(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=xa(this.dom),r=this.length?e>0:t>0;return new Ua(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Qo)return e;return null}static get(e){return e.cmTile}},Xo=class extends Yo{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=Zo(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=Zo(r);this.length=a}};function Zo(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var Qo=class extends Xo{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=Yo.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof $o)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},$o=class e extends Xo{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},es=class e extends Xo{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0&&!(a.flags&32)||n&&ns(a,d)))&&(f>c||d.flags&32&&t<=1)?(a=d,o=c-u):(u<c||d.flags&16&&!d.isHidden&&t>=-1)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):ts(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new Ua(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new Ua(e.dom,0);e==n.tile&&(a=!0)}}return new Ua(this.dom,0)}};function ts(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=ya(t);return n[n.length-1]||null}function ns(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var rs=class e extends Xo{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},is=class e extends Yo{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?F.chrome||F.gecko||(e?(i--,o=1):a<r&&(a++,o=-1)):t<0?i--:a<r&&a++;let s=Ia(this.dom,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:t>=0)?0:s.length-1];return F.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:Ta(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},as=class e extends Yo{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return Ta(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return Ta(n,!r)}}get overrideDOMText(){if(!this.length)return Bn.empty;let{root:e}=this;if(!e)return Bn.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},os=class extends Yo{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Bn.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:Ta(r,t>0==n)}},ss=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){let t=r.length;if(i<t&&e){let a=Math.min(e,t-i);n&&n.skip(r,i,i+a),e-=a,i+=a}if(i==t)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(!e)break}else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},cs=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},ls=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new is(a.dom,a.text+e);t.parent=i}else i.append(r||is.of(e,this.cache.find(is)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?ys(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof rs&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(ys(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=Yo.get(n.dom);e&&e.setDOM(ys(n.dom))}let e=rs.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=Yo.get(e.text);i&&this.cache.reused.set(i,2);let a=new is(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=gs;let n=es.start(e,t||this.cache.find(es)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof rs&&a.mark.eq(i))n=a,t--;else{let e=rs.of(i,this.cache.find(rs,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!ms(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(F.ios&&ms(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(xs,0,32)||new as(xs.toDOM(),0,xs,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new cs(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof $o&&n.wrapper.eq(t.wrapper))e=n;else{let n=$o.of(t.wrapper,this.cache.find($o,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(os,void 0,1);return n&&(n.flags=t),n||new os(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},us=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},ds=[as,es,is,rs,os,$o,Qo];for(let e=0;e<ds.length;e++)ds[e].bucket=e;var fs=class{constructor(e){this.view=e,this.buckets=ds.map(()=>[]),this.index=ds.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e<i.length;e++){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new as(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},ps=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new fs(e),this.text=new us(e.state.doc),this.builder=new ls(this.cache,new Qo(e,e.contentDOM),di.iter(n)),this.cache.reused.set(t,2),this.old=new ss(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=vs(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget()){if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?as.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof os)this.cache.add(e);else if(e instanceof rs)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof rs&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof rs&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=di.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof da){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?bs.block:bs.inline),c=hs(a),l=this.cache.findWidget(i,t-e,c)||as.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=_s(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i<t;){let s=this.text.next(Math.min(512,t-i));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(s,a,i==e?o:a.length),i+=s.length),n=null}i=a.length}});i>-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=Yo.get(r);if(r==this.view.contentDOM)break;e instanceof rs?t.push(e):e?.isLine()?n=e:e instanceof $o||(r.nodeName==`DIV`&&!n&&r!=this.view.contentDOM?n=new es(r,gs):n||t.push(rs.of(new la({tagName:r.nodeName.toLowerCase(),attributes:aa(r)}),r)))}return{line:n,marks:t}}};function ms(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function hs(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var gs={class:`cm-line`};function _s(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&ea(n,e),r&&(e.class+=` `+r),e)}function vs(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof rs&&t.push(r.mark)}return t}function ys(e){let t=Yo.get(e);return t&&t.setDOM(e.cloneNode()),e}var bs=class extends oa{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};bs.inline=new bs(`span`),bs.block=new bs(`div`);var xs=new class extends oa{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},Ss=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=ca.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Qo(e,e.contentDOM),this.updateInner([new Ko(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!Ns(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?Es(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new Ko(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(F.ie||F.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=ks(i,this.decorations,e.changes);o.length&&(t=Ko.extendWithRanges(t,o));let s=js(a,this.blockWrappers,e.changes);return s.length&&(t=Ko.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new ps(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&Yo.get(t.text)&&r.cache.reused.set(Yo.get(t.text),2),this.tile=r.run(e,t),Cs(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=F.chrome||F.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof Ps&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(Oo)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Ao)||n.tabIndex>-1)&&va(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),F.gecko&&s.empty&&!this.hasComposition&&ws(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new Ua(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!ba(c.node,c.offset,u.anchorNode,u.anchorOffset)||!ba(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{F.android&&F.chrome&&n.contains(u.focusNode)&&Ms(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=ga(this.view.root);if(e){if(s.empty){if(F.gecko){let e=Ds(c.node,c.offset);if(e&&e!=3){let t=(e==1?Va:Ha)(c.node,c.offset);t&&(c=new Ua(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new Ua(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new Ua(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&ba(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=ga(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=wa(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!Yo.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof Ps?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=Zn(e.text,t);if(n==t)return null;let r=Ia(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==Wa.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof $o)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?ya(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?Wa.RTL:Wa.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=ya(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=ya(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(ca.replace({widget:new Ps(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return ca.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Lo).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(zo).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(di.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Ro).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(To))try{if(t(this.view,e.range,e))return!0}catch(e){ko(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=Wo(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(Oa(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==Wa.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=ja(e.dom);e.dom.scrollIntoView({block:`nearest`}),Ma(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Cs(this.tile)}};function Cs(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)Cs(n,t)}}function ws(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function Ts(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=Va(n.focusNode,n.focusOffset),i=Ha(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=Yo.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=Yo.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function Es(e,t,n){let r=Ts(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new Ko(c.mapPos(a),c.mapPos(o),a,o),text:i}}function Ds(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var Os=class{constructor(){this.changes=[]}compareRange(e,t){ma(e,t,this.changes)}comparePoint(e,t){ma(e,t,this.changes)}boundChange(e){ma(e,e,this.changes)}};function ks(e,t,n){let r=new Os;return di.compare(e,t,n,r),r.changes}var As=class{constructor(){this.changes=[]}compareRange(e,t){ma(e,t,this.changes)}comparePoint(){}boundChange(e){ma(e,e,this.changes)}};function js(e,t,n){let r=new As;return di.compare(e,t,n,r),r.changes}function Ms(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function Ns(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var Ps=class extends oa{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function Fs(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return N.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=Zn(i.text,a,!1):s=Zn(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=Zn(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=Zn(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return N.undirectionalRange(o+i.from,s+i.from)}function Is(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+Ei(o,a,e.state.tabSize)}function Ls(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==sa.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function Rs(e,t,n,r){let i=Ls(e,t.head,t.assoc||-1),a=!r||i.type!=sa.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==Wa.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return N.cursor(o,n?-1:1)}return N.cursor(n?i.to:i.from,n?-1:1)}function zs(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=fo(i,a,o,s,n),l=uo;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
8 -`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function Bs(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==$r.Space&&(i=t),i==t}}function Vs(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return N.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=Ks(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return N.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return N.cursor(i.pos,i.assoc,void 0,o)}}function Hs(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function Us(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=Hs(e,i.from,0);t!=i.from&&(a=N.cursor(t,-1))}else{let t=Hs(e,i.from,-1),n=Hs(e,i.to,1);(t!=i.from||n!=i.to)&&(a=i.undirectional?N.undirectionalRange(i.from,i.to):N.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?N.create(n,t.mainIndex):t}function Ws(e,t,n){let r=Hs(e.state.facet(Bo).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:N.cursor(r,r<n.from?1:-1)}var Gs=class{constructor(e,t){this.pos=e,this.assoc=t}};function Ks(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new Gs(0,1);if(c>e.viewState.docHeight)return new Gs(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==sa.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==sa.Text){let t=Is(e,i,l,o,s);return new Gs(t,t==l.from?1:-1)}}if(l.type!=sa.Text)return c<(l.top+l.bottom)/2?new Gs(l.from,1):new Gs(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new qs(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var qs=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[eo.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[eo.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,i=e.length-1,a=new Set,o=this.bidiIn(e[0],e[i]),s,c,l=-1,u=1e9,d;search:for(;r<i;){let n=i-r,f=r+i>>1;adjust:if(a.has(f)){for(let e=1;e<n;e++){let t=f+e;if(t>=i&&(t-=n),!a.has(t)){f=t;break adjust}}break search}a.add(f);let p=t(f),m=0;if(p)for(let e=0;e<p.length;e++){let t=p[e];if(!(t.width==0&&p.length>1)){if(t.bottom<this.y)(!s||s.bottom<t.bottom)&&(s=t),m=1;else if(t.top>this.y)(!c||c.top>t.top)&&(c=t),m=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,n=Math.abs(e);n<u&&(l=f,u=n,d=t),e&&(m=e<0==(this.baseDir==Wa.LTR)?-1:1)}}}m==-1&&(!o||this.baseDirAt(e[f],1))?i=f:m==1&&(!o||this.baseDirAt(e[f+1],-1))&&(r=f+1)}if(!d){if(!c&&!s)return{i:0,after:!1};let n=s&&(!c||this.y-s.bottom<c.top-this.y)?s:c;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:r}=d;if(s&&s.bottom>(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==Wa.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=Zn(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return Ia(e.dom,i,a).getClientRects()});return r.after?new Gs(n[r.i+1],-1):new Gs(n[r.i],1)}scanTile(e,t){if(!e.length)return new Gs(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:Ia(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Gs(n[r.i+1],-1):new Gs(a,1)}},Js=`￿`,Ys=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(ii.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Js}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=Yo.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=Yo.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:Sa(r))||Sa(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!Zs(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=Yo.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Xs(e,n.node,n.offset)?t:0))}};function Xs(e,t,n){for(;;){if(!t||n<wa(t))return!1;if(t==e)return!0;n=xa(t)+1,t=t.parentNode}}function Zs(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=Yo.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var Qs=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},$s=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=ec(e.docView.tile,t,n,0))){let t=i||a?[]:ac(e),n=new Ys(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=oc(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!_a(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!_a(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((F.ios||F.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(N.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=N.create([N.cursor(n,r)])}else this.newSel=N.single(r,n)}}};function ec(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return ec(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function tc(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||F.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,Js),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:Bn.of(t.text.slice(a.from-e,u).split(Js))}:(d=ic(l,t.text,s-e,c))&&(F.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==`￿￿`&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:Bn.of(t.text.slice(d.from,d.toB).split(Js))})}else r&&(!e.hasFocus&&i.facet(Ao)||sc(r,a))&&(r=null);if(!n&&!r)return!1;if((F.mac||F.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=N.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Bn.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:F.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
9 - `&&e.lineWrapping&&(r&&=N.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:Bn.of([` `])}),n)return nc(e,n,r,o);if(r&&!sc(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=Us(i.facet(Bo).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function nc(e,t,n,r=-1){if(F.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(F.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&La(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&La(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&La(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=rc(e,t,n);return e.state.facet(yo).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function rc(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=Hs(i.facet(Bo).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:N.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&Ts(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?N.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function ic(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function ac(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new Qs(n,r)),(i!=n||a!=r)&&t.push(new Qs(i,a))),t}function oc(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?N.single(n+t,r+t):null}function sc(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var cc=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,F.safari&&e.contentDOM.addEventListener(`input`,()=>null),F.gecko&&Gc(e.contentDOM.ownerDocument)}handleEvent(e){Sc(this.view,e)&&!this.ignoreDuringComposition(e)&&(e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e))))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=dc(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&mc.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),F.android&&F.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(F.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(fc.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||pc.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return t.shiftKey&&F.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&lc(this.view.win)&&(t.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t},setTimeout(()=>this.flushIOSKey(),50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||this.view.observer.pendingRecords().length||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,La(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:F.safari&&!F.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function lc(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function uc(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){ko(n.state,e)}}}function dc(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(uc(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(uc(t.value,r))}}for(let e in Cc)n(e).handlers.push(Cc[e]);for(let e in wc)n(e).observers.push(wc[e]);return t}var fc=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],pc=`dthko`,mc=[16,17,18,20,91,92,224,225],hc=6;function gc(e){return Math.max(0,e)*.7+8}function _c(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var vc=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=ka(e.contentDOM),this.atoms=e.state.facet(Bo).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ii.allowMultipleSelections)&&yc(e,t),this.dragging=xc(e,t)&&Pc(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&_c(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=Wo(this.view);e.clientX-s.left<=r+hc?t=-gc(r-e.clientX):e.clientX+s.right>=a-hc&&(t=gc(e.clientX-a)),e.clientY-s.top<=i+hc?n=-gc(i-e.clientY):e.clientY+s.bottom>=o-hc&&(n=gc(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=Us(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function yc(e,t){let n=e.state.facet(mo);return n.length?n[0](t):F.mac?t.metaKey:t.ctrlKey}function bc(e,t){let n=e.state.facet(ho);return n.length?n[0](t):F.mac?!t.altKey:!t.ctrlKey}function xc(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=ga(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function Sc(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Yo.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var Cc=Object.create(null),wc=Object.create(null),Tc=F.ie&&F.ie_version<15||F.ios&&F.webkit_version<604;function Ec(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),Oc(e,n.value)},50)}function Dc(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function Oc(e,t){t=Dc(e.state,xo,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(Bc!=null&&n.selection.ranges.every(e=>e.empty)&&Bc==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:N.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:N.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}wc.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,F.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},wc.wheel=wc.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},Cc.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),wc.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},wc.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},wc.touchend=(e,t)=>{e.inputState.touchActive=!1},Cc.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(go))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=Fc(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new vc(e,t,n,r)),r&&e.observer.ignore(()=>{Pa(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function kc(e,t,n,r){if(r==1)return N.cursor(t,n);if(r==2)return Fs(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,N.undirectionalRange(a,o)}}var Ac=F.ie&&F.ie_version<=11,jc=null,Mc=0,Nc=0;function Pc(e){if(!Ac)return e.detail;let t=jc,n=Nc;return jc=e,Nc=Date.now(),Mc=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Mc+1)%3:1}function Fc(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=Pc(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=kc(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=kc(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?N.range(i,a,l.assoc):N.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=Ic(i,s.pos))?c:o?i.addRange(l):N.create([l])}}}function Ic(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return N.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}Cc.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=N.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,Dc(e.state,So,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},Cc.dragend=e=>(e.inputState.draggedContent=null,!1);function Lc(e,t,n,r){if(n=Dc(e.state,xo,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&bc(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}Cc.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&Lc(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData(`Text`);if(n)return Lc(e,t,n,!0),!0}return!1},Cc.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Tc?null:t.clipboardData;return n?(Oc(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(Ec(e),!1)};function Rc(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function zc(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:Dc(e,So,t.join(e.lineBreak)),ranges:n,linewise:r}}var Bc=null;Cc.copy=Cc.cut=(e,t)=>{if(!va(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=zc(e.state);if(!n&&!i)return!1;Bc=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=Tc?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(Rc(e,n),!1)};var Vc=Br.define();function Hc(e,t){let n=[];for(let r of e.facet(bo)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:Vc.of(!0)}):null}function Uc(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Hc(e.state,t);n?e.dispatch(n):e.update([])}},10)}wc.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Uc(e)},wc.blur=e=>{e.observer.clearSelectionRange(),Uc(e)},wc.compositionstart=wc.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},wc.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,F.chrome&&F.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},wc.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Cc.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return nc(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(F.chrome&&F.android&&(n=fc.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return F.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),F.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>wc.compositionend(e,t),20),!1};var Wc=new Set;function Gc(e){Wc.has(e)||(Wc.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var Kc=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],qc=!1;function Jc(){qc=!1}var Yc=class{constructor(e){this.lineWrapping=e,this.doc=Bn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Kc.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=Kc.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},Xc=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},Zc=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?sa.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof da?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},Qc=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(Qc||={}),$c=.001,el=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>$c&&(qc=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,Qc.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,Qc.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,Qc.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=ll.build(n.setDoc(a),e,l,u);i=tl(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new il(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r){if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break}else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=0;return t[n-1]==null?(o=1,n--):t[n]??(o=1,r++),new ol(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function tl(e,t){return e==t?e:(e.constructor!=t.constructor&&(qc=!0),t)}el.prototype.size=1;var nl=ca.replace({}),rl=class extends el{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new Zc(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new Zc(r,0,n,this.spaceAbove,nl):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,Qc.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},il=class e extends rl{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new Zc(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof al&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof al?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):el.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},al=class e extends el{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new Zc(a.from,a.length,l,c,0)}{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new Zc(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==Qc.ByHeight)return this.blockAt(e,n,r,i);if(t==Qc.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new Zc(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new Zc(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new Zc(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return el.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=$c&&(s=-2);let c=new il(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=el.of(r);return(s<0||Math.abs(c.height-this.height)>=$c||Math.abs(s-this.heightMetrics(t,n).perLine)>=$c)&&(qc=!0),tl(this,c)}return(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}},ol=class extends el{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==Qc.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==Qc.ByPosNoHeight?Qc.ByPosNoHeight:Qc.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,Qc.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&sl(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),sl(i,e)}return el.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?el.of(this.break?[e,null,t]:[e,t]):(this.left=tl(this.left,e),this.right=tl(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function sl(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof al&&(r=e[t+1])instanceof al&&e.splice(t-1,3,new al(n.length+1+r.length))}var cl=5,ll=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof il?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new il(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new rl(a,r,n)):(a||i||r>=cl)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new il(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new al(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof il)return e;let t=new il(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof il)&&!this.isCovered?this.nodes.push(new il(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof il&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return di.spans(n,r,i,a,0),a.finish(r)}};function ul(e,t,n){let r=new dl;return di.compare(e,t,n,r,0),r.changes}var dl=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&ma(e,t,this.changes,5)}};function fl(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function pl(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function ml(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var hl=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return ca.replace({widget:new gl(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},gl=class extends oa{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},_l=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Cl,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Wa.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(Io).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new Yc(n),this.stateDeco=wl(t),this.heightMap=el.empty().applyChanges(this.stateDeco,Bn.empty,this.heightOracle.setDoc(t.doc),[new Ko(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ca.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new vl(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Cl:new Tl(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(El(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=wl(this.state);let r=e.changedRanges,i=Ko.extendWithRanges(r,ul(n,this.stateDeco,e?e.changes:or.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Jc(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||qc)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(wo)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?Wa.RTL:Wa.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=Da(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=ka(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=Ba(this.scrollParent||e.win);let m=(this.printing?ml:fl)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!pl(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),Jc();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?el.empty().applyChanges(this.stateDeco,Bn.empty,this.heightOracle,[new Ko(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new Xc(n.from,i))}qc&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new vl(r.lineAt(a-n*1e3,Qc.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,Qc.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,Qc.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new vl(r.lineAt(o-500,Qc.ByHeight,i,0,0).from,r.lineAt(o+n+500,Qc.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new vl(this.heightMap.lineAt(n,Qc.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Qc.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Qc.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,Qc.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2e3&&i<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new hl(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=Wa.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=Sl(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(N.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new hl(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=sa.Text)return;let i=yl(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=xl(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=bl(i,n),l=bl(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=xl(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=bl(i,f),l=bl(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=xl(r,n)-xl(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){hl.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ca.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];di.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||El(this.heightMap.lineAt(e,Qc.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||El(this.heightMap.lineAt(this.scaler.fromDOM(e),Qc.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return El(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},vl=class{constructor(e,t){this.from=e,this.to=t}};function yl(e,t,n){let r=[],i=e,a=0;return di.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function bl({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function xl(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function Sl(e,t){for(let n of e)if(t(n))return n}var Cl={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function wl(e){let t=e.facet(Lo).filter(e=>typeof e!=`function`),n=e.facet(zo).filter(e=>typeof e!=`function`);return n.length&&t.push(di.join(n)),t}var Tl=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,Qc.ByPos,e,0,0).top,o=t.lineAt(i,Qc.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function El(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new Zc(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>El(e,t)):e._content)}var Dl=P.define({combine:e=>e.join(` `)}),Ol=P.define({combine:e=>e.indexOf(!0)>-1}),kl=ji.newName(),Al=ji.newName(),jl=ji.newName(),Ml={"&light":`.`+Al,"&dark":`.`+jl};function Nl(e,t,n){return new ji(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var Pl=Nl(`.`+kl,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},".cm-panels-top":{top:`0`},".cm-panels-bottom":{bottom:`0`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{background:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat`,backgroundSize:`.4em`,backgroundPosition:`calc(min(50%, 0px)) center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},Ml),Fl={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Il=F.ie&&F.ie_version<=11,Ll=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Aa,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(F.ie&&F.ie_version<=11||F.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&F.android&&e.constructor.EDIT_CONTEXT!==!1&&!(F.chrome&&F.chrome_version<126)&&(this.editContext=new Vl(e),e.state.facet(Ao)&&(e.contentDOM.editContext=this.editContext.editContext)),Il&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type!=`change`&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Ao)?n.root.activeElement!=this.dom:!va(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(F.ie&&F.ie_version<=11||F.android&&F.chrome)&&!n.state.selection.main.empty&&r.focusNode&&ba(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=ga(e.root);if(!t)return!1;let n=F.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Bl(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=va(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&za(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.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,Fl),Il&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Il&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&La(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&va(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new $s(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=tc(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!sc(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=Rl(t,e.previousSibling||e.target.previousSibling,-1),r=Rl(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return e.type==`characterData`?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ao)!=e.state.facet(Ao)&&(e.view.contentDOM.editContext=e.state.facet(Ao)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function Rl(e,t,n){for(;t;){let r=Yo.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function zl(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return ba(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Bl(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return zl(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?zl(e,n):null}var Vl=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=ic(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=N.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));sc(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:Bn.of(n.text.slice(l.from,l.toB).split(`
10 -`))};if((F.mac||F.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:Bn.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);nc(e,u,N.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(ca.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:Oo.of(ca.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=ga(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to){if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}r=null,this.revertPending(e.state)}if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},I=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Ra(e.parent)||document,this.viewState=new _l(this,e.state||ii.create(e)),e.scrollTo&&e.scrollTo.is(Do)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Mo).map(e=>new Po(e));for(let e of this.plugins)e.update(this);this.observer=new Ll(this),this.inputState=new cc(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Ss(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Wr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(Vc))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=Hc(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(ii.phrases)!=this.state.facet(ii.phrases))return this.setState(a);i=qo.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new Eo(t.empty?t:N.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(Do)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Wl.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Go)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(Dl)!=i.state.facet(Dl)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(vo))try{e(i)}catch(e){ko(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!tc(this,u)&&l.force&&La(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new _l(this,e),this.plugins=e.facet(Mo).map(e=>new Po(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Ss(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Mo),n=e.state.facet(Mo);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new Po(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){ko(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a,scaleY:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0){if(Ba(n||this.win))i=-1,a=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}o=this.viewState.scaleY}this.updateState=1;let s=this.viewState.measure();if(!s&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let c=[];s&4||([this.measureRequests,c]=[c,this.measureRequests]);let l=c.map(e=>{try{return e.read(this)}catch(e){return ko(this.state,e),Ul}}),u=qo.create(this,this.state,[]),d=!1;u.flags|=s,t?t.flags|=s:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let e=0;e<c.length;e++)if(l[e]!=Ul)try{let t=c[e];t.write&&t.write(l[e],this)}catch(e){ko(this.state,e)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)/this.viewState.scaleY-a/o;if((e>1||e<-1)&&!(F.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(vo))e(t)}get themeClasses(){return kl+` `+(this.state.facet(Ol)?jl:Al)+` `+this.state.facet(Dl)}updateAttrs(){let e=Gl(this,Fo,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(Ao)?`true`:`false`,class:`cm-content`,style:`${F.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),Gl(this,Io,t);let n=this.observer.ignore(()=>{let n=ia(this.contentDOM,this.contentAttrs,t),r=ia(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Go);let t=this.state.facet(e.cspNonce);ji.mount(this.root,this.styleModules.concat(Pl).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Ws(this,e,zs(this,e,t,n))}moveByGroup(e,t){return Ws(this,e,zs(this,e,t,t=>Bs(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return N.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return Rs(this,e,t,n)}moveVertically(e,t,n){return Ws(this,e,Vs(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Ks(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Ks(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[eo.find(r,e-n.from,-1,t)];return this.docView.coordsAt(e,t,i.dir==Wa.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Co)||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>Hl)return lo(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||to(r.isolates,n=Ho(this,e))))return r.order;n||=Ho(this,e);let r=co(e.text,t,n);return this.bidiCache.push(new Wl(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||F.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Pa(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Do.of(new Eo(typeof e==`number`?N.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Do.of(new Eo(N.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return No.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return No.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=ji.newName(),r=[Dl.of(n),Go.of(Nl(`.${n}`,e))];return t&&t.dark&&r.push(Ol.of(!0)),r}static baseTheme(e){return Tr.lowest(Go.of(Nl(`.`+kl,e,Ml)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&Yo.get(t)||Yo.get(e))?.root?.view||null}};I.styleModule=Go,I.inputHandler=yo,I.clipboardInputFilter=xo,I.clipboardOutputFilter=So,I.scrollHandler=To,I.focusChangeEffect=bo,I.perLineTextDirection=Co,I.exceptionSink=_o,I.updateListener=vo,I.editable=Ao,I.mouseSelectionStyle=go,I.dragMovesSelection=ho,I.clickAddsSelectionRange=mo,I.decorations=Lo,I.blockWrappers=Ro,I.outerDecorations=zo,I.atomicRanges=Bo,I.bidiIsolatedRanges=Vo,I.cursorScrollMargin=P.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),I.scrollMargins=Uo,I.darkTheme=Ol,I.cspNonce=P.define({combine:e=>e.length?e[0]:``}),I.contentAttributes=Io,I.editorAttributes=Fo,I.lineWrapping=I.contentAttributes.of({class:`cm-lineWrapping`}),I.announce=Ur.define();var Hl=4096,Ul={},Wl=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:Wa.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function Gl(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&ea(a,n)}return n}var Kl=F.mac?`mac`:F.windows?`win`:F.linux?`linux`:`key`;function ql(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function Jl(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var Yl=Tr.default(I.domEventHandlers({keydown(e,t){return iu(Ql(t.state),e,t,`editor`)}})),Xl=P.define({enables:Yl}),Zl=new WeakMap;function Ql(e){let t=e.facet(Xl),n=Zl.get(t);return n||Zl.set(t,n=nu(t.reduce((e,t)=>e.concat(t),[]))),n}function $l(e,t,n){return iu(Ql(e.state),t,e,n)}var eu=null,tu=4e3;function nu(e,t=Kl){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>ql(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=eu={view:t,prefix:n,scope:e};return setTimeout(()=>{eu==r&&(eu=null)},tu),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,ru))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var ru=null;function iu(e,t,n,r){ru=t;let i=Bi(t),a=nr(er(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;eu&&eu.view==n&&eu.scope==r&&(o=eu.prefix+` `,mc.indexOf(t.keyCode)<0&&(c=!0,eu=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+Jl(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(F.windows&&t.ctrlKey&&t.altKey)&&!(F.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=Pi[t.keyCode])&&p!=i?(d(f[o+Jl(p,t,!0)])||t.shiftKey&&(m=Fi[t.keyCode])!=i&&m!=p&&d(f[o+Jl(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+Jl(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),ru=null,s}F.gecko&&F.gecko_version;function au(e,t,n,r,i){t.lastIndex=0;for(let a=e.iterRange(n,r),o=n,s;!a.next().done;o+=a.value.length)if(!a.lineBreak)for(;s=t.exec(a.value);)i(o+s.index,s)}function ou(e,t){let n=e.visibleRanges;if(n.length==1&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:a}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),a=Math.min(e.state.doc.lineAt(a).to,a+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=a:r.push({from:i,to:a});return r}var su=class{constructor(e){let{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:a=1e3}=e;if(!t.global)throw RangeError(`The regular expression given to MatchDecorator should have its 'g' flag set`);if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if(typeof n==`function`)this.addMatch=(e,t,r,i)=>{let a=n(e,t,r);a&&i(r,r+e[0].length,a)};else if(n)this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n);else throw RangeError(`Either 'decorate' or 'decoration' should be provided to MatchDecorator`);this.boundary=i,this.maxLength=a}createDeco(e){let t=new mi,n=t.add.bind(t);for(let{from:t,to:r}of ou(e,this.maxLength))au(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((t,i,a,o)=>{o>=e.view.viewport.from&&a<=e.view.viewport.to&&(n=Math.min(a,n),r=Math.max(o,r))}),e.viewportMoved||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let a=Math.max(i.from,n),o=Math.min(i.to,r);if(o>=a){let n=e.state.doc.lineAt(a),r=n.to<o?e.state.doc.lineAt(o):n,s=Math.max(i.from,n.from),c=Math.min(i.to,r.to);if(this.boundary){for(;a>n.from;a--)if(this.boundary.test(n.text[a-1-n.from])){s=a;break}for(;o<r.to;o++)if(this.boundary.test(r.text[o-r.from])){c=o;break}}let l=[],u,d=(e,t,n)=>l.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=s-n.from;(u=this.regexp.exec(n.text))&&u.index<c-n.from;)this.addMatch(u,e,u.index+n.from,d);else au(e.state.doc,this.regexp,s,c,(t,n)=>this.addMatch(n,e,t,d));t=t.update({filterFrom:s,filterTo:c,filter:(e,t)=>e<s||t>c,add:l})}}return t}};/x/.unicode;function cu(){return uu}var lu=ca.line({class:`cm-activeLine`}),uu=No.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(lu.range(i.from)),t=i.from)}return ca.set(n)}},{decorations:e=>e.decorations}),du=P.define({combine(e){let t,n;for(let r of e)t||=r.topContainer,n||=r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function fu(e,t){let n=e.plugin(pu),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var pu=No.fromClass(class{constructor(e){this.input=e.state.facet(gu),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(du);this.top=new mu(e,!0,t.topContainer),this.bottom=new mu(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add(`cm-panel`),e.mount&&e.mount()}update(e){let t=e.state.facet(du);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new mu(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new mu(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(gu);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],a=[],o=[];for(let n of t){let t=this.specs.indexOf(n),s;t<0?(s=n(e.view),o.push(s)):(s=this.panels[t],s.update&&s.update(e)),r.push(s),(s.top?i:a).push(s)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(a);for(let e of o)e.dom.classList.add(`cm-panel`),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>I.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})}),mu=class{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes=``,this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&=(this.dom.remove(),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`;let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=hu(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=hu(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 hu(e){let t=e.nextSibling;return e.remove(),t}var gu=P.define({enables:pu});function _u(e,t){let n,r=new Promise(e=>n=e),i=e=>Su(e,t,n);e.state.field(yu,!1)?e.dispatch({effects:bu.of(i)}):e.dispatch({effects:Ur.appendConfig.of(yu.init(()=>[i]))});let a=xu.of(i);return{close:a,result:r.then(t=>((e.win.queueMicrotask||(t=>e.win.setTimeout(t,10)))(()=>{e.state.field(yu).indexOf(i)>-1&&e.dispatch({effects:a})}),t))}}function vu(e,t){let n=e.state.field(yu,!1)||[];for(let r of n){let n=fu(e,r);if(n&&n.dom.classList.contains(t))return n}return null}var yu=Sr.define({create(){return[]},update(e,t){for(let n of t.effects)n.is(bu)?e=[n.value].concat(e):n.is(xu)&&(e=e.filter(e=>e!=n.value));return e},provide:e=>gu.computeN([e],t=>t.field(e))}),bu=Ur.define(),xu=Ur.define();function Su(e,t,n){let r=t.content?t.content(e,()=>o(null)):null;if(!r){if(r=Vi(`form`),t.input){let e=Vi(`input`,t.input);/^(text|password|number|email|tel|url)$/.test(e.type)&&e.classList.add(`cm-textfield`),e.name||=`input`,r.appendChild(Vi(`label`,(t.label||``)+`: `,e))}else r.appendChild(document.createTextNode(t.label||``));r.appendChild(document.createTextNode(` `)),r.appendChild(Vi(`button`,{class:`cm-button`,type:`submit`},t.submitLabel||`OK`))}let i=r.nodeName==`FORM`?[r]:r.querySelectorAll(`form`);for(let e=0;e<i.length;e++){let t=i[e];t.addEventListener(`keydown`,e=>{e.keyCode==27?(e.preventDefault(),o(null)):e.keyCode==13&&(e.preventDefault(),o(t))}),t.addEventListener(`submit`,e=>{e.preventDefault(),o(t)})}let a=Vi(`div`,r,Vi(`button`,{onclick:()=>o(null),"aria-label":e.state.phrase(`close`),class:`cm-dialog-close`,type:`button`},[`×`]));t.class&&(a.className=t.class),a.classList.add(`cm-dialog`);function o(t){a.contains(a.ownerDocument.activeElement)&&e.focus(),n(t)}return{dom:a,top:t.top,mount:()=>{if(t.focus){let e;e=typeof t.focus==`string`?r.querySelector(t.focus):r.querySelector(`input`)||r.querySelector(`button`),e&&`select`in e?e.select():e&&`focus`in e&&e.focus()}}}}var Cu=class extends oi{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};Cu.prototype.elementClass=``,Cu.prototype.toDOM=void 0,Cu.prototype.mapMode=ir.TrackBefore,Cu.prototype.startSide=Cu.prototype.endSide=-1,Cu.prototype.point=!0;var wu=P.define(),Tu=P.define(),Eu={class:``,renderEmptyElements:!1,elementStyle:``,markers:()=>di.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:`before`},Du=P.define();function Ou(e){return[Au(),Du.of({...Eu,...e})]}var ku=P.define({combine:e=>e.some(e=>e)});function Au(e){let t=[ju];return e&&e.fixed===!1&&t.push(ku.of(!0)),t}var ju=No.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(Du).map(t=>new Fu(e,t)),this.fixed=!e.state.facet(ku);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(ku)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=di.iter(this.view.state.facet(wu),this.view.viewport.from),r=[],i=this.gutters.map(e=>new Pu(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==sa.Text&&t){Nu(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==sa.Text){Nu(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(Du),n=e.state.facet(Du),r=e.docChanged||e.heightChanged||e.viewportChanged||!di.eq(e.startState.facet(wu),e.state.facet(wu),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new Fu(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>I.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==Wa.LTR?{left:r,right:i}:{right:r,left:i}})});function Mu(e){return Array.isArray(e)?e:[e]}function Nu(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var Pu=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=di.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new Iu(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];Nu(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;(r.length!=0||a.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(Tu)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Fu=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=Mu(t.markers(e)),t.initialSpacer&&(this.spacer=new Iu(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=Mu(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!di.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},Iu=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),Lu(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function Lu(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var Ru=P.define(),zu=P.define(),Bu=P.define({combine(e){return ai(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),Vu=class extends Cu{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function Hu(e,t){return e.state.facet(Bu).formatNumber(t,e.state)}var Uu=Du.compute([Bu],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(Ru)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new Vu(Hu(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(zu)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(Bu)!=e.state.facet(Bu),initialSpacer(e){return new Vu(Hu(e,Gu(e.state.doc.lines)))},updateSpacer(e,t){let n=Hu(t.view,Gu(t.view.state.doc.lines));return n==e.number?e:new Vu(n)},domEventHandlers:e.facet(Bu).domEventHandlers,side:`before`}));function Wu(e={}){return[Bu.of(e),Au(),Uu]}function Gu(e){let t=9;for(;t<e;)t=t*10+9;return t}var Ku=new class extends Cu{constructor(){super(...arguments),this.elementClass=`cm-activeLineGutter`}},qu=wu.compute([`selection`],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(Ku.range(i)))}return di.of(t)});function Ju(){return qu}var Yu=1024,Xu=0,Zu=class{constructor(e,t){this.from=e,this.to=t}},Qu=class{constructor(e={}){this.id=Xu++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=td.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};Qu.closedBy=new Qu({deserialize:e=>e.split(` `)}),Qu.openedBy=new Qu({deserialize:e=>e.split(` `)}),Qu.group=new Qu({deserialize:e=>e.split(` `)}),Qu.isolate=new Qu({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),Qu.contextHash=new Qu({perNode:!0}),Qu.lookAhead=new Qu({perNode:!0}),Qu.mounted=new Qu({perNode:!0});var $u=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[Qu.mounted.id]}},ed=Object.create(null),td=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):ed,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(Qu.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(Qu.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};td.none=new td(``,Object.create(null),0,8);var nd=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new td(e.name,r,e.id,e.flags):e)}return new e(n)}},rd=new WeakMap,id=new WeakMap,ad;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(ad||={});var od=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=$u.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new bd(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new bd(rd.get(this)||this.topNode);return r.moveTo(e,t),rd.set(this,r._tree),r}get topNode(){return new fd(this,0,0,null)}resolve(e,t=0){let n=ud(rd.get(this)||this.topNode,e,t,!1);return rd.set(this,n),n}resolveInner(e,t=0){let n=ud(id.get(this)||this.topNode,e,t,!0);return id.set(this,n),n}resolveStack(e,t=0){return yd(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&ad.IncludeAnonymous)>0;for(let e=this.cursor(a|ad.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:Td(td.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(td.none,t,n,r)))}static build(e){return Sd(e)}};od.empty=new od(td.none,[],[],0);var sd=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},cd=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return td.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(ld(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function ld(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function ud(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof fd&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:ad.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof fd&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var dd=class{cursor(e=0){return new bd(this,e)}getChild(e,t=null,n=null){let r=pd(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return pd(this,e,t,n)}resolve(e,t=0){return ud(this,e,t,!1)}resolveInner(e,t=0){return ud(this,e,t,!0)}matchContext(e){return md(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},fd=class e extends dd{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&ad.EnterBracketed&&l instanceof od&&(d=$u.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||ld(i,r,u,u+l.length)){if(l instanceof cd){if(a&ad.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new gd(new hd(o,l,t,u),null,e)}else if(a&ad.IncludeAnonymous||!l.type.isAnonymous||xd(l)){let s;if(!(a&ad.IgnoreMounts)&&(s=$u.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&ad.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&ad.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&ad.IgnoreOverlays)&&(i=$u.get(this._tree))&&i.overlay){let a=t-this.from,o=r&ad.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function pd(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function md(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var hd=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},gd=class e extends dd{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&ad.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}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:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new od(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function _d(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof fd&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new vd(i,n)}var vd=class{constructor(e,t){this.heads=e,this.node=t}get next(){return _d(this.heads)}};function yd(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof fd?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=$u.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new fd(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(ud(o,t,n,!1))}}return i?_d(i):r}var bd=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~ad.EnterBracketed,e instanceof fd)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof fd?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&ad.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ad.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ad.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&ad.IncludeAnonymous||e instanceof cd||!e.type.isAnonymous||xd(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new gd(this.buffer,t,this.stack[e]);return this.bufferNode=new gd(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return md(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return md(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function xd(e){return e.children.some(e=>e instanceof cd||!e.type.isAnonymous||xd(e))}function Sd(e){let{buffer:t,nodeSet:n,maxBufferLength:r=Yu,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new sd(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0){if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}if(w==-3){c=x;return}if(w==-4){l=x;return}throw RangeError(`Unrecognized record size: ${w}`)}let D=s[x],O,k,A=S-e;if(C-S<=r&&(k=h(o.pos-t,y))){let t=new Uint16Array(k.size-k.skip),r=o.pos-k.size,i=t.length;for(;o.pos>r;)i=g(k.start,t,i);O=new cd(t,C-k.start,n),A=k.start-e}else{let e=o.pos-w;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=C;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,T,E),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s<t.length&&p(t,n,S,s,S,c,i,T,E),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(D,E);O=Td(D,t,n,0,t.length,0,C-S,e,e)}else O=m(D,t,n,C-S,T-C,E)}_.push(O),v.push(A)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new cd(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof od){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(Qu.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[Qu.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[Qu.lookAhead,i];o=o?[e].concat(o):[e]}return new od(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new od(s[e.topID],_.reverse(),v.reverse(),y)}var Cd=new WeakMap;function wd(e,t){if(!e.isAnonymous||t instanceof cd||t.type!=e)return 1;let n=Cd.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof od)){n=1;break}n+=wd(e,r)}Cd.set(t,n)}return n}function Td(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=wd(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=wd(e,t[s]);for(s++;s<i;s++){let n=wd(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(Td(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var Ed=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof gd?this.setBuffer(e.context.buffer,e.index,t):e instanceof fd&&this.map.set(e.tree,t)}get(e){return e instanceof gd?this.getBuffer(e.context.buffer,e.index):e instanceof fd?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},Dd=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},Od=class{startParse(e,t,n){return typeof e==`string`&&(e=new kd(e)),n=n?n.length?n.map(e=>new Zu(e.from,e.to)):[new Zu(0,0)]:[new Zu(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},kd=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function Ad(e){return(t,n,r,i)=>new Fd(t,e,n,r,i)}var jd=class{constructor(e,t,n,r,i,a){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=a}};function Md(e){if(!e.length||e.some(e=>e.from>=e.to))throw RangeError(`Invalid inner parse ranges given: `+JSON.stringify(e))}var Nd=class{constructor(e,t,n,r,i,a,o,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=a,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}},Pd=new Qu({perNode:!0}),Fd=class{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),this.stoppedAt!=null)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return this.stoppedAt!=null&&(e=new od(e.type,e.children,e.positions,e.length,e.propValues.concat([[Pd,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Qu.mounted.id]=new $u(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new Bd(this.fragments),t=null,n=null,r=new bd(new fd(this.baseTree,this.ranges[0].from,0,null),ad.IncludeAnonymous|ad.IgnoreMounts);scan:for(let i,a;;){let o=!0,s;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)o=!1;else if(e.hasNode(r)){if(t){let e=t.mounts.find(e=>e.frag.from<=r.from&&e.frag.to>=r.to&&e.mount.overlay);if(e)for(let n of e.mount.overlay){let i=n.from+e.pos,a=n.to+e.pos;i>=r.from&&a<=r.to&&!t.ranges.some(e=>e.from<a&&e.to>i)&&t.ranges.push({from:i,to:a})}}o=!1}else if(n&&(a=Id(n.ranges,r.from,r.to)))o=a!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||(Rd(r),t&&t.depth++,n&&n.depth++);let a=e.findMounts(r.from,i.parser);if(typeof i.overlay==`function`)t=new Nd(i.parser,i.overlay,a,this.inner.length,r.from,!!i.bracketed,r.tree,t);else{let e=Vd(this.ranges,i.overlay||(r.from<r.to?[new Zu(r.from,r.to)]:[]));e.length&&Md(e),(e.length||!i.overlay)&&this.inner.push(new jd(i.parser,e.length?i.parser.startParse(this.input,Ud(a,e),e):i.parser.startParse(``),i.overlay?i.overlay.map(e=>new Zu(e.from-r.from,e.to-r.from)):null,!!i.bracketed,r.tree,e.length?e[0].from:r.from)),i.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):o=!1}}else if(t&&(s=t.predicate(r))&&(s===!0&&(s=new Zu(r.from,r.to)),s.from<s.to)){let e=t.ranges.length-1;e>=0&&t.ranges[e].to==s.from?t.ranges[e]={from:t.ranges[e].from,to:s.to}:t.ranges.push(s)}if(o&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break scan;if(t&&!--t.depth){let e=Vd(this.ranges,t.ranges);e.length&&(Md(e),this.inner.splice(t.index,0,new jd(t.parser,t.parser.startParse(this.input,Ud(t.mounts,e),e),t.ranges.map(e=>new Zu(e.from-t.start,e.to-t.start)),t.bracketed,t.target,e[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function Id(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function Ld(e,t,n,r,i,a){if(t<n){let o=e.buffer[t+1];r.push(e.slice(t,n,o)),i.push(o-a)}}function Rd(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,a=i.children.indexOf(r),o=i.children[a],s=o.buffer,c=[a];function l(e,r,i,a,u,d){let f=n[d],p=[],m=[];Ld(o,e,f,p,m,a);let h=s[f+1],g=s[f+2];c.push(p.length);let _=d?l(f+4,s[f+3],o.set.types[s[f]],h,g-h,d-1):t.toTree();return p.push(_),m.push(h-a),Ld(o,s[f+3],r,p,m,a),new od(i,p,m,u)}i.children[a]=l(0,s.length,td.none,0,o.length,n.length-1);for(let t of c){let n=e.tree.children[t],r=e.tree.positions[t];e.yield(new fd(n,r+e.from,t,e._tree))}}var zd=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(ad.IncludeAnonymous|ad.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)if(!(t.to>=e&&t.enter(n,1,ad.IgnoreOverlays|ad.ExcludeBuffers))){if(t.to<=e)t.next(!1)||(this.done=!0);else break}}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof od)t=t.children[0];else break}return!1}},Bd=class{constructor(e){if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let t=this.curFrag=e[0];this.curTo=t.tree.prop(Pd)??t.to,this.inner=new zd(t.tree,-t.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=e.tree.prop(Pd)??e.to,this.inner=new zd(e.tree,-e.offset)}}findMounts(e,t){let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let r=e.tree?.prop(Qu.mounted);if(r&&r.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let i=this.fragments[t];if(i.from>=e.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:e.from-i.offset,mount:r})}}}return n}};function Vd(e,t){let n=null,r=t;for(let i=1,a=0;i<e.length;i++){let o=e[i-1].to,s=e[i].from;for(;a<r.length;a++){let e=r[a];if(e.from>=s)break;e.to<=o||(n||(r=n=t.slice()),e.from<o?(n[a]=new Zu(e.from,o),e.to>s&&n.splice(a+1,0,new Zu(s,e.to))):e.to>s?n[a--]=new Zu(s,e.to):n.splice(a--,1))}}return r}function Hd(e,t,n,r){let i=0,a=0,o=!1,s=!1,c=-1e9,l=[];for(;;){let u=i==e.length?1e9:o?e[i].to:e[i].from,d=a==t.length?1e9:s?t[a].to:t[a].from;if(o!=s){let e=Math.max(c,n),t=Math.min(u,d,r);e<t&&l.push(new Zu(e,t))}if(c=Math.min(u,d),c==1e9)break;u==c&&(o?(o=!1,i++):o=!0),d==c&&(s?(s=!1,a++):s=!0)}return l}function Ud(e,t){let n=[];for(let{pos:r,mount:i,frag:a}of e){let e=r+(i.overlay?i.overlay[0].from:0),o=e+i.tree.length,s=Math.max(a.from,e),c=Math.min(a.to,o);if(i.overlay){let o=Hd(t,i.overlay.map(e=>new Zu(e.from+r,e.to+r)),s,c);for(let t=0,r=s;;t++){let s=t==o.length,l=s?c:o[t].from;if(l>r&&n.push(new Dd(r,l,i.tree,-e,a.from>=r||a.openStart,a.to<=l||a.openEnd)),s)break;r=o[t].to}}else n.push(new Dd(s,c,i.tree,-e,a.from>=e||a.openStart,a.to<=o||a.openEnd))}return n}var Wd=0,Gd=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=Wd++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new qd(e);return e=>e.modified.indexOf(t)>-1?e:qd.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},Kd=0,qd=class e{constructor(e){this.name=e,this.instances=[],this.id=Kd++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&Jd(n,e.modified));if(r)return r;let i=[],a=new Gd(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=Yd(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function Jd(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function Yd(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function Xd(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new Qd(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return Zd.add(t)}var Zd=new Qu({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new Qd(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),Qd=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};Qd.empty=new Qd([],2,null);function $d(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}var L=Gd.define,ef=L(),tf=L(),nf=L(tf),rf=L(tf),af=L(),of=L(af),sf=L(af),cf=L(),lf=L(cf),uf=L(),df=L(),ff=L(),pf=L(ff),mf=L(),R={comment:ef,lineComment:L(ef),blockComment:L(ef),docComment:L(ef),name:tf,variableName:L(tf),typeName:nf,tagName:L(nf),propertyName:rf,attributeName:L(rf),className:L(tf),labelName:L(tf),namespace:L(tf),macroName:L(tf),literal:af,string:of,docString:L(of),character:L(of),attributeValue:L(of),number:sf,integer:L(sf),float:L(sf),bool:L(af),regexp:L(af),escape:L(af),color:L(af),url:L(af),keyword:uf,self:L(uf),null:L(uf),atom:L(uf),unit:L(uf),modifier:L(uf),operatorKeyword:L(uf),controlKeyword:L(uf),definitionKeyword:L(uf),moduleKeyword:L(uf),operator:df,derefOperator:L(df),arithmeticOperator:L(df),logicOperator:L(df),bitwiseOperator:L(df),compareOperator:L(df),updateOperator:L(df),definitionOperator:L(df),typeOperator:L(df),controlOperator:L(df),punctuation:ff,separator:L(ff),bracket:pf,angleBracket:L(pf),squareBracket:L(pf),paren:L(pf),brace:L(pf),content:cf,heading:lf,heading1:L(lf),heading2:L(lf),heading3:L(lf),heading4:L(lf),heading5:L(lf),heading6:L(lf),contentSeparator:L(cf),list:L(cf),quote:L(cf),emphasis:L(cf),strong:L(cf),link:L(cf),monospace:L(cf),strikethrough:L(cf),inserted:L(),deleted:L(),changed:L(),invalid:L(),meta:mf,documentMeta:L(mf),annotation:L(mf),processingInstruction:L(mf),definition:Gd.defineModifier(`definition`),constant:Gd.defineModifier(`constant`),function:Gd.defineModifier(`function`),standard:Gd.defineModifier(`standard`),local:Gd.defineModifier(`local`),special:Gd.defineModifier(`special`)};for(let e in R){let t=R[e];t instanceof Gd&&(t.name=e)}$d([{tag:R.link,class:`tok-link`},{tag:R.heading,class:`tok-heading`},{tag:R.emphasis,class:`tok-emphasis`},{tag:R.strong,class:`tok-strong`},{tag:R.keyword,class:`tok-keyword`},{tag:R.atom,class:`tok-atom`},{tag:R.bool,class:`tok-bool`},{tag:R.url,class:`tok-url`},{tag:R.labelName,class:`tok-labelName`},{tag:R.inserted,class:`tok-inserted`},{tag:R.deleted,class:`tok-deleted`},{tag:R.literal,class:`tok-literal`},{tag:R.string,class:`tok-string`},{tag:R.number,class:`tok-number`},{tag:[R.regexp,R.escape,R.special(R.string)],class:`tok-string2`},{tag:R.variableName,class:`tok-variableName`},{tag:R.local(R.variableName),class:`tok-variableName tok-local`},{tag:R.definition(R.variableName),class:`tok-variableName tok-definition`},{tag:R.special(R.variableName),class:`tok-variableName2`},{tag:R.definition(R.propertyName),class:`tok-propertyName tok-definition`},{tag:R.typeName,class:`tok-typeName`},{tag:R.namespace,class:`tok-namespace`},{tag:R.className,class:`tok-className`},{tag:R.macroName,class:`tok-macroName`},{tag:R.propertyName,class:`tok-propertyName`},{tag:R.operator,class:`tok-operator`},{tag:R.comment,class:`tok-comment`},{tag:R.meta,class:`tok-meta`},{tag:R.invalid,class:`tok-invalid`},{tag:R.punctuation,class:`tok-punctuation`}]);var hf=new Qu;function gf(e){return P.define({combine:e?t=>t.concat(e):void 0})}var _f=new Qu,vf=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,ii.prototype.hasOwnProperty(`tree`)||Object.defineProperty(ii.prototype,"tree",{get(){return xf(this)}}),this.parser=t,this.extension=[Mf.of(this),ii.languageData.of((e,t,n)=>{let r=yf(e,t,n),i=r.type.prop(hf);if(!i)return[];let a=e.facet(i),o=r.type.prop(_f);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return yf(e,t,n).type.prop(hf)==this.data}findRegions(e){let t=e.facet(Mf);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(hf)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(Qu.mounted);if(i){if(i.tree.prop(hf)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof od&&r(i,e.positions[n]+t)}};return r(xf(e),0),n}get allowsNesting(){return!0}};vf.setState=Ur.define();function yf(e,t,n){let r=e.facet(Mf),i=xf(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,ad.ExcludeBuffers|ad.EnterBracketed))e.type.isTop&&(i=e);return i}var bf=class e extends vf{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=gf(t.languageData);return new e(n,t.parser.configure({props:[hf.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function xf(e){let t=e.field(vf.state,!1);return t?t.tree:od.empty}function Sf(e,t,n=50){let r=e.field(vf.state,!1)?.context;if(!r)return null;let i=r.viewport;r.updateViewport({from:0,to:t});let a=r.isDone(t)||r.work(n,t)?r.tree:null;return r.updateViewport(i),a}function Cf(e,t=e.viewport.to,n=100){let r=Sf(e.state,t,n);return r!=xf(e.state)&&e.dispatch({}),!!r}var wf=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},Tf=null,Ef=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],od.empty,0,r,[],null)}startParse(){return this.parser.startParse(new wf(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=od.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(Dd.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Dd.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Tf;Tf=this;try{return e()}finally{Tf=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Df(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=Dd.applyChanges(r,e),i=od.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=Df(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Od{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=Tf;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new od(td.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Tf}};function Df(e,t,n){return Dd.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var Of=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=Ef.create(t.facet(Mf).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};vf.state=Sr.define({create:Of.init,update(e,t){for(let e of t.effects)if(e.is(vf.setState))return e.value;return t.startState.facet(Mf)==t.state.facet(Mf)?e.apply(t):Of.init(t.state)}});var kf=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(kf=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var Af=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,jf=No.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(vf.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(vf.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=kf(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(vf.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Af?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>Af&&Af()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:vf.setState.of(new Of(i.context))})),this.chunkBudget>0&&(!s||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>ko(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Mf=P.define({combine(e){return e.length?e[0]:null},enables:e=>[vf.state,jf,I.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),Nf=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},Pf=P.define(),Ff=P.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function If(e){let t=e.facet(Ff);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function Lf(e,t){let n=``,r=e.tabSize,i=e.facet(Ff)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function Rf(e,t){e instanceof ii&&(e=new zf(e));for(let n of e.state.facet(Pf)){let r=n(e,t);if(r!==void 0)return r}let n=xf(e.state);return n.length>=t?Vf(e,n,t):null}var zf=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=If(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Ti(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},Bf=new Qu;function Vf(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return Hf(r,e,n)}function Hf(e,t,n){for(let r=e;r;r=r.next){let e=Wf(r.node);if(e)return e(Kf.create(t,n,r))}return 0}function Uf(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Wf(e){let t=e.type.prop(Bf);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(Qu.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>Xf(e,!0,1,void 0,n&&!Uf(e)?t.from:void 0)}return e.parent==null?Gf:null}function Gf(){return 0}var Kf=class e extends zf{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(qf(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Hf(this.context.next,this.base,this.pos)}};function qf(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function Jf(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function Yf({closing:e,align:t=!0,units:n=1}){return r=>Xf(r,t,n,e)}function Xf(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?Jf(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}var Zf=e=>e.baseIndent;function Qf({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var $f=P.define(),ep=new Qu;function tp(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function np(e,t,n){let r=xf(e);if(r.length<n)return null;let i=r.resolveStack(n,1),a=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(a&&i.from<t)break;let s=i.type.prop(ep);if(s&&(i.to<r.length-50||r.length==e.doc.length||!rp(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(a=r)}}return a}function rp(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function ip(e,t,n){for(let r of e.facet($f)){let i=r(e,t,n);if(i)return i}return np(e,t,n)}function ap(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var op=Ur.define({map:ap}),sp=Ur.define({map:ap});function cp(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}var lp=Sr.define({create(){return ca.none},update(e,t){t.isUserEvent(`delete`)&&t.changes.iterChangedRanges((t,n)=>e=up(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(op)&&!pp(e,r.value.from,r.value.to)?n.push(r.value):r.is(sp)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(Sp),i=n.map(e=>(r?ca.replace({widget:new Ep(r(t.state,e))}):Tp).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=up(e,t.selection.main.head)),e},provide:e=>I.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError(`Invalid JSON for fold state`);let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid JSON for fold state`);t.push(Tp.range(r,i))}return ca.set(t,!0)}});function up(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function dp(e){return e.field(lp,!1)||di.empty}function fp(e,t,n){var r;let i=null;return(r=e.field(lp,!1))==null||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function pp(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function mp(e,t){return e.field(lp,!1)?t:t.concat(Ur.appendConfig.of(Cp()))}var hp=e=>{for(let t of cp(e)){let n=ip(e.state,t.from,t.to);if(n)return e.dispatch({effects:mp(e.state,[op.of(n),_p(e,n)])}),!0}return!1},gp=e=>{if(!e.state.field(lp,!1))return!1;let t=[];for(let n of cp(e)){let r=fp(e.state,n.from,n.to);r&&t.push(sp.of(r),_p(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function _p(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return I.announce.of(`${e.state.phrase(n?`Folded lines`:`Unfolded lines`)} ${r} ${e.state.phrase(`to`)} ${i}.`)}var vp=e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),a=ip(t,i.from,i.to);a&&n.push(op.of(a)),r=(a?e.lineBlockAt(a.to):i).to+1}return n.length&&e.dispatch({effects:mp(e.state,n)}),!!n.length},yp=e=>{let t=e.state.field(lp,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(sp.of({from:e,to:t}))}),e.dispatch({effects:n}),!0},bp=[{key:`Ctrl-Shift-[`,mac:`Cmd-Alt-[`,run:hp},{key:`Ctrl-Shift-]`,mac:`Cmd-Alt-]`,run:gp},{key:`Ctrl-Alt-[`,run:vp},{key:`Ctrl-Alt-]`,run:yp}],xp={placeholderDOM:null,preparePlaceholder:null,placeholderText:`…`},Sp=P.define({combine(e){return ai(e,xp)}});function Cp(e){let t=[lp,Ap];return e&&t.push(Sp.of(e)),t}function wp(e,t){let{state:n}=e,r=n.facet(Sp),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=fp(e.state,n.from,n.to);r&&e.dispatch({effects:sp.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let a=document.createElement(`span`);return a.textContent=r.placeholderText,a.setAttribute(`aria-label`,n.phrase(`folded code`)),a.title=n.phrase(`unfold`),a.className=`cm-foldPlaceholder`,a.onclick=i,a}var Tp=ca.replace({widget:new class extends oa{toDOM(e){return wp(e,null)}}}),Ep=class extends oa{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return wp(e,this.value)}},Dp={openText:`⌄`,closedText:`›`,markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},Op=class extends Cu{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement(`span`);return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?`Fold line`:`Unfold line`),t}};function kp(e={}){let t={...Dp,...e},n=new Op(t,!0),r=new Op(t,!1),i=No.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(Mf)!=e.state.facet(Mf)||e.startState.field(lp,!1)!=e.state.field(lp,!1)||xf(e.startState)!=xf(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new mi;for(let i of e.viewportLineBlocks){let a=fp(e.state,i.from,i.to)?r:ip(e.state,i.from,i.to)?n:null;a&&t.add(i.from,i.from,a)}return t.finish()}}),{domEventHandlers:a}=t;return[i,Ou({class:`cm-foldGutter`,markers(e){return e.plugin(i)?.markers||di.empty},initialSpacer(){return new Op(t,!1)},domEventHandlers:{...a,click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=fp(e.state,t.from,t.to);if(r)return e.dispatch({effects:sp.of(r)}),!0;let i=ip(e.state,t.from,t.to);return i?(e.dispatch({effects:op.of(i)}),!0):!1}}}),Cp()]}var Ap=I.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`}});R.meta,R.link,R.heading,R.emphasis,R.strong,R.strikethrough,R.keyword,R.atom,R.bool,R.url,R.contentSeparator,R.labelName,R.literal,R.inserted,R.string,R.deleted,R.regexp,R.escape,R.string,R.variableName,R.variableName,R.typeName,R.namespace,R.className,R.variableName,R.macroName,R.propertyName,R.comment,R.invalid;var jp=I.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:`#328c8252`},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bb555544`}}),Mp=1e4,Np=`()[]{}`,Pp=P.define({combine(e){return ai(e,{afterCursor:!0,brackets:Np,maxScanDistance:Mp,renderMatch:Lp})}}),Fp=ca.mark({class:`cm-matchingBracket`}),Ip=ca.mark({class:`cm-nonmatchingBracket`});function Lp(e){let t=[],n=e.matched?Fp:Ip;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function Rp(e){let t=[],n=e.facet(Pp);for(let r of e.selection.ranges){if(!r.empty)continue;let i=Wp(e,r.head,-1,n)||r.head>0&&Wp(e,r.head-1,1,n)||n.afterCursor&&(Wp(e,r.head,1,n)||r.head<e.doc.length&&Wp(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return ca.set(t,!0)}var zp=[No.fromClass(class{constructor(e){this.paused=!1,this.decorations=Rp(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=Rp(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),jp];function Bp(e={}){return[Pp.of(e),zp]}var Vp=new Qu;function Hp(e,t,n){let r=e.prop(t<0?Qu.openedBy:Qu.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function Up(e){let t=e.type.prop(Vp);return t?t(e.node):e}function Wp(e,t,n,r={}){let i=r.maxScanDistance||Mp,a=r.brackets||Np,o=xf(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=Hp(r.type,n,a);if(i&&r.from<r.to){let o=Up(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return Gp(e,t,n,r,o,i,a)}}return Kp(e,t,n,o,s.type,i,a)}function Gp(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=Up(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(Hp(u.type,n,o))l++;else if(Hp(u.type,-n,o)){if(l==0){let e=Up(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function Kp(e,t,n,r,i,a,o){if(n<0?!t:t==e.doc.length)return null;let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i)){if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var qp=Object.create(null),Jp=[td.none],Yp=[],Xp=Object.create(null),Zp=Object.create(null);for(let[e,t]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`]])Zp[e]=$p(qp,t);function Qp(e,t){Yp.indexOf(e)>-1||(Yp.push(e),console.warn(t))}function $p(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||R[n];r?typeof r==`function`?t.length?t=t.map(r):Qp(n,`Modifier ${n} used at start of tag`):t.length?Qp(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:Qp(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=Xp[i];if(a)return a.id;let o=Xp[i]=td.define({id:Jp.length,name:r,props:[Xd({[r]:n})]});return Jp.push(o),o.id}Wa.RTL,Wa.LTR;var em=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=am(e.state,n.from);return r.line?nm(e):r.block?im(e):!1};function tm(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var nm=tm(um,0),rm=tm(lm,0),im=tm((e,t)=>lm(e,t,cm(t)),0);function am(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var om=50;function sm(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-om,r),o=e.sliceDoc(i,i+om),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+om),d=e.sliceDoc(i-om,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function cm(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function lm(e,t,n=t.selection.ranges){let r=n.map(e=>am(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>sm(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function um(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=am(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var dm=Br.define(),fm=Br.define(),pm=P.define(),mm=P.define({combine(e){return ai(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),hm=Sr.define({create(){return Pm.empty},update(e,t){let n=t.state.facet(mm),r=t.annotation(dm);if(r){let i=Sm.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?Cm(o,o.length,n.minDepth,i):km(o,t.startState.selection),new Pm(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(fm);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(Wr.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=Sm.fromTransaction(t),o=t.annotation(Wr.time),s=t.annotation(Wr.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new Pm(e.done.map(Sm.fromJSON),e.undone.map(Sm.fromJSON))}});function gm(e={}){return[hm,mm.of(e),I.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?vm:e.inputType==`historyRedo`?ym:null;return n?(e.preventDefault(),n(t)):!1}})]}function _m(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(hm,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var vm=_m(0,!1),ym=_m(1,!1),bm=_m(0,!0),xm=_m(1,!0),Sm=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&or.fromJSON(t.changes),[],t.mapped&&ar.fromJSON(t.mapped),t.startSelection&&N.fromJSON(t.startSelection),t.selectionsAfter.map(N.fromJSON))}static fromTransaction(t,n){let r=Dm;for(let e of t.startState.facet(pm)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Dm)}static selection(t){return new e(void 0,Dm,void 0,void 0,t)}};function Cm(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function wm(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function Tm(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function Em(e,t){return e.length?t.length?e.concat(t):e:t}var Dm=[],Om=200;function km(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Om));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Cm(e,e.length-1,1e9,n.setSelAfter(r)))}return[Sm.selection([t])]}function Am(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function jm(e,t){if(!e.length)return e;let n=e.length,r=Dm;for(;n;){let i=Mm(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Sm.selection(r)]:Dm}function Mm(e,t,n){let r=Em(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):Dm,n);if(!e.changes)return Sm.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new Sm(i,Ur.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Nm=/^(input\.type|delete)($|\.)/,Pm=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Nm.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,wm(s.changes,t.changes))||r==`input.type.compose`)?Cm(o,o.length-1,i.minDepth,new Sm(t.changes.compose(s.changes),Em(Ur.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,Dm)):Cm(o,o.length,i.minDepth,t),new e(o,Dm,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:Dm;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Tm(a[a.length-1],t)?this:new e(km(this.done,t),this.undone,n,r)}addMapping(t){return new e(jm(this.done,t),jm(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:dm.of({side:e,rest:Am(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?Dm:r.slice(0,r.length-1);return i.mapped&&(n=jm(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:dm.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};Pm.empty=new Pm(Dm,Dm);var Fm=[{key:`Mod-z`,run:vm,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:ym,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:ym,preventDefault:!0},{key:`Mod-u`,run:bm,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:xm,preventDefault:!0}];function Im(e,t){return N.create(e.ranges.map(t),e.mainIndex)}function Lm(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function Rm({state:e,dispatch:t},n){let r=Im(e.selection,n);return!r.eq(e.selection,!0)&&(t(Lm(e,r)),!0)}function zm(e,t){return N.cursor(t?e.to:e.from)}function Bm(e,t){return Rm(e,n=>n.empty?e.moveByChar(n,t):zm(n,t))}function Vm(e){return e.textDirectionAt(e.state.selection.main.head)==Wa.LTR}var Hm=e=>Bm(e,!Vm(e)),Um=e=>Bm(e,Vm(e));function Wm(e,t){return Rm(e,n=>n.empty?e.moveByGroup(n,t):zm(n,t))}var Gm=e=>Wm(e,!Vm(e)),Km=e=>Wm(e,Vm(e));typeof Intl<`u`&&Intl.Segmenter;function qm(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Jm(e,t,n){let r=xf(e).resolveInner(t.head),i=n?Qu.closedBy:Qu.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;qm(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?Wp(e,r.from,1):Wp(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,N.cursor(s,n?-1:1)}var Ym=e=>Rm(e,t=>Jm(e.state,t,!Vm(e))),Xm=e=>Rm(e,t=>Jm(e.state,t,Vm(e)));function Zm(e,t){return Rm(e,n=>{if(!n.empty)return zm(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var Qm=e=>Zm(e,!1),$m=e=>Zm(e,!0);function eh(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(I.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function th(e,t){let n=eh(e),{state:r}=e,i=Im(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):zm(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=I.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(Lm(r,i),{effects:a}),!0}var nh=e=>th(e,!1),rh=e=>th(e,!0);function ih(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=N.cursor(r.from+n))}return i}var ah=e=>Rm(e,t=>ih(e,t,!0)),oh=e=>Rm(e,t=>ih(e,t,!1)),sh=e=>Rm(e,t=>ih(e,t,!Vm(e))),ch=e=>Rm(e,t=>ih(e,t,Vm(e))),lh=e=>Rm(e,t=>N.cursor(e.lineBlockAt(t.head).from,1)),uh=e=>Rm(e,t=>N.cursor(e.lineBlockAt(t.head).to,-1));function dh(e,t,n){let r=!1,i=Im(e.selection,t=>{let i=Wp(e,t.head,-1)||Wp(e,t.head,1)||t.head>0&&Wp(e,t.head-1,1)||t.head<e.doc.length&&Wp(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?N.range(t.anchor,a):N.cursor(a)});return r?(t(Lm(e,i)),!0):!1}var fh=({state:e,dispatch:t})=>dh(e,t,!1);function ph(e,t,n){let r=Im(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=N.range(e.head,e.anchor));let r=n(e);return N.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(Lm(e.state,r)),!0)}function mh(e,t){return ph(e,t,n=>e.moveByChar(n,t))}var hh=e=>mh(e,!Vm(e)),gh=e=>mh(e,Vm(e));function _h(e,t){return ph(e,t,n=>e.moveByGroup(n,t))}var vh=e=>_h(e,!Vm(e)),yh=e=>_h(e,Vm(e)),bh=e=>{let t=!Vm(e);return ph(e,t,n=>Jm(e.state,n,t))},xh=e=>{let t=Vm(e);return ph(e,t,n=>Jm(e.state,n,t))};function Sh(e,t){return ph(e,t,n=>e.moveVertically(n,t))}var Ch=e=>Sh(e,!1),wh=e=>Sh(e,!0);function Th(e,t){return ph(e,t,n=>e.moveVertically(n,t,eh(e).height))}var Eh=e=>Th(e,!1),Dh=e=>Th(e,!0),Oh=e=>ph(e,!0,t=>ih(e,t,!0)),kh=e=>ph(e,!1,t=>ih(e,t,!1)),Ah=e=>{let t=!Vm(e);return ph(e,t,n=>ih(e,n,t))},jh=e=>{let t=Vm(e);return ph(e,t,n=>ih(e,n,t))},Mh=e=>ph(e,!1,t=>N.cursor(e.lineBlockAt(t.head).from)),Nh=e=>ph(e,!0,t=>N.cursor(e.lineBlockAt(t.head).to)),Ph=({state:e,dispatch:t})=>(t(Lm(e,{anchor:0})),!0),Fh=({state:e,dispatch:t})=>(t(Lm(e,{anchor:e.doc.length})),!0),Ih=({state:e,dispatch:t})=>(t(Lm(e,{anchor:e.selection.main.anchor,head:0})),!0),Lh=({state:e,dispatch:t})=>(t(Lm(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),Rh=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),zh=({state:e,dispatch:t})=>{let n=ig(e).map(({from:t,to:n})=>N.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:N.create(n),userEvent:`select`})),!0},Bh=({state:e,dispatch:t})=>{let n=Im(e.selection,t=>{let n=xf(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return N.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(Lm(e,n)),!0)};function Vh(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(Lm(n,N.create(i,i.length-1))),!0)}var Hh=e=>Vh(e,!1),Uh=e=>Vh(e,!0),Wh=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=N.create([n.main]):n.main.empty||(r=N.create([N.cursor(n.main.head)])),r?(t(Lm(e,r)),!0):!1};function Gh(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=Kh(e,o,!1)):o>i&&(n=`delete.forward`,o=Kh(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=Kh(e,i,!1),a=Kh(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:N.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?I.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function Kh(e,t,n){if(e instanceof I)for(let r of e.state.facet(I.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var qh=(e,t,n)=>Gh(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=Ti(s,a.tabSize)%If(a)||If(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=Zn(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=Zn(o.text,c-o.from,!1,!1)+o.from);return c}),Jh=e=>qh(e,!1,!0),Yh=e=>qh(e,!0,!1),Xh=(e,t)=>Gh(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=Zn(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),Zh=e=>Xh(e,!1),Qh=e=>Xh(e,!0),$h=e=>Gh(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),eg=e=>Gh(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),tg=e=>Gh(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),ng=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:Bn.of([``,``])},range:N.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},rg=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:Zn(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:Zn(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:N.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function ig(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function ag(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of ig(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(N.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(N.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:N.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var og=({state:e,dispatch:t})=>ag(e,t,!1),sg=({state:e,dispatch:t})=>ag(e,t,!0);function cg(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of ig(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var lg=({state:e,dispatch:t})=>cg(e,t,!1),ug=({state:e,dispatch:t})=>cg(e,t,!0),dg=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(ig(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=Im(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function fg(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=xf(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(Qu.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var pg=hg(!1),mg=hg(!0);function hg(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&fg(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new zf(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=Rf(s,r);for(c??=Ti(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,Lf(t,c)];return o&&l.push(Lf(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:Bn.of(l)},range:N.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function gg(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:N.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var _g=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new zf(e,{overrideIndentation:e=>n[e]??-1}),i=gg(e,(t,i,a)=>{let o=Rf(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=Lf(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},vg=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(gg(e,(t,n)=>{n.push({from:t.from,insert:e.facet(Ff)})}),{userEvent:`input.indent`})),!0),yg=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(gg(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Ti(r,e.tabSize),a=0,o=Lf(e,Math.max(0,i-If(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),bg=e=>(e.setTabFocusMode(),!0),xg=[{key:`Ctrl-b`,run:Hm,shift:hh,preventDefault:!0},{key:`Ctrl-f`,run:Um,shift:gh},{key:`Ctrl-p`,run:Qm,shift:Ch},{key:`Ctrl-n`,run:$m,shift:wh},{key:`Ctrl-a`,run:lh,shift:Mh},{key:`Ctrl-e`,run:uh,shift:Nh},{key:`Ctrl-d`,run:Yh},{key:`Ctrl-h`,run:Jh},{key:`Ctrl-k`,run:$h},{key:`Ctrl-Alt-h`,run:Zh},{key:`Ctrl-o`,run:ng},{key:`Ctrl-t`,run:rg},{key:`Ctrl-v`,run:rh}],Sg=[{key:`ArrowLeft`,run:Hm,shift:hh,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:Gm,shift:vh,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:sh,shift:Ah,preventDefault:!0},{key:`ArrowRight`,run:Um,shift:gh,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:Km,shift:yh,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:ch,shift:jh,preventDefault:!0},{key:`ArrowUp`,run:Qm,shift:Ch,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:Ph,shift:Ih},{mac:`Ctrl-ArrowUp`,run:nh,shift:Eh},{key:`ArrowDown`,run:$m,shift:wh,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:Fh,shift:Lh},{mac:`Ctrl-ArrowDown`,run:rh,shift:Dh},{key:`PageUp`,run:nh,shift:Eh},{key:`PageDown`,run:rh,shift:Dh},{key:`Home`,run:oh,shift:kh,preventDefault:!0},{key:`Mod-Home`,run:Ph,shift:Ih},{key:`End`,run:ah,shift:Oh,preventDefault:!0},{key:`Mod-End`,run:Fh,shift:Lh},{key:`Enter`,run:pg,shift:pg},{key:`Mod-a`,run:Rh},{key:`Backspace`,run:Jh,shift:Jh,preventDefault:!0},{key:`Delete`,run:Yh,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:Zh,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:Qh,preventDefault:!0},{mac:`Mod-Backspace`,run:eg,preventDefault:!0},{mac:`Mod-Delete`,run:tg,preventDefault:!0}].concat(xg.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),Cg=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:Ym,shift:bh},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:Xm,shift:xh},{key:`Alt-ArrowUp`,run:og},{key:`Shift-Alt-ArrowUp`,run:lg},{key:`Alt-ArrowDown`,run:sg},{key:`Shift-Alt-ArrowDown`,run:ug},{key:`Mod-Alt-ArrowUp`,run:Hh},{key:`Mod-Alt-ArrowDown`,run:Uh},{key:`Escape`,run:Wh},{key:`Mod-Enter`,run:mg},{key:`Alt-l`,mac:`Ctrl-l`,run:zh},{key:`Mod-i`,run:Bh,preventDefault:!0},{key:`Mod-[`,run:yg},{key:`Mod-]`,run:vg},{key:`Mod-Alt-\\`,run:_g},{key:`Shift-Mod-k`,run:dg},{key:`Shift-Mod-\\`,run:fh},{key:`Mod-/`,run:em},{key:`Alt-A`,mac:`Ctrl-A`,run:rm},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:bg}].concat(Sg),wg=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,Tg=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(wg(e)):wg,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return er(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=tr(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=nr(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&e<t.length&&t.charCodeAt(e)==n?i++:a=!1}}}match(e,t,n,r,i){let a=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],o=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?a={from:n.from,to:r,precise:i&&n.precise}:(n.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<`u`&&(Tg.prototype[Symbol.iterator]=function(){return this});var Eg={from:-1,to:-1,match:/.*/.exec(``),precise:!0},Dg=`gm`+(/x/.unicode==null?``:`u`),Og=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=Eg,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new jg(e,t,n,r,i);this.re=new RegExp(t,Dg+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=Ng(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Ng(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},kg=new WeakMap,Ag=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=kg.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return kg.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),kg.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},jg=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Eg,this.matchPos=Ng(e,r),this.re=new RegExp(t,Dg+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=Ag.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=Ng(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ag.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Og.prototype[Symbol.iterator]=jg.prototype[Symbol.iterator]=function(){return this});function Mg(e){try{return new RegExp(e,Dg),!0}catch{return!1}}function Ng(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var Pg=e=>{let t=vu(e,`cm-goto-line`);if(t){let e=t.dom.querySelector(`input[type=text]`);return e&&e.select(),!0}let{state:n}=e,r=String(n.doc.lineAt(e.state.selection.main.head).number),{close:i,result:a}=_u(e,{class:`cm-goto-line`,label:n.phrase(`Go to line`),input:{type:`text`,name:`line`,value:r},focus:!0,submitLabel:n.phrase(`go`)});return a.then(t=>{let r=t&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);if(!r){e.dispatch({effects:i});return}let a=n.doc.lineAt(n.selection.main.head),[,o,s,c,l]=r,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/n.doc.lines),d=Math.round(n.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=n.doc.line(Math.max(1,Math.min(n.doc.lines,d))),p=N.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[i,I.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},Fg={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ig=P.define({combine(e){return ai(e,Fg,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Lg(e){let t=[Ug,Hg];return e&&t.push(Ig.of(e)),t}var Rg=ca.mark({class:`cm-selectionMatch`}),zg=ca.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function Bg(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=$r.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=$r.Word)}function Vg(e,t,n,r){return e(t.sliceDoc(n,n+1))==$r.Word&&e(t.sliceDoc(r-1,r))==$r.Word}var Hg=No.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Ig),{state:n}=e,r=n.selection;if(r.ranges.length>1)return ca.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return ca.none;let e=n.wordAt(i.head);if(!e)return ca.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return ca.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(Bg(o,n,i.from,i.to)&&Vg(o,n,i.from,i.to)))return ca.none}else if(a=n.sliceDoc(i.from,i.to),!a)return ca.none}let s=[];for(let r of e.visibleRanges){let e=new Tg(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||Bg(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(zg.range(r,a)):(r>=i.to||a<=i.from)&&s.push(Rg.range(r,a)),s.length>t.maxMatches))return ca.none}}return ca.set(s)}},{decorations:e=>e.decorations}),Ug=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),Wg=({state:e,dispatch:t})=>{let{selection:n}=e,r=N.create(n.ranges.map(t=>e.wordAt(t.head)||N.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function Gg(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Tg(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new Tg(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Kg=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return Wg({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=Gg(e,r);return i?(t(e.update({selection:e.selection.addRange(N.range(i.from,i.to),!1),effects:I.scrollIntoView(i.to)})),!0):!1},qg=P.define({combine(e){return ai(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new D_(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),Jg=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||Mg(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
11 -`:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new a_(this):new $g(this)}getCursor(e,t=0,n){let r=e.doc?e:ii.create({doc:e});return n??=r.doc.length,this.regexp?t_(this,r,t,n):Zg(this,r,t,n)}},Yg=class{constructor(e){this.spec=e}};function Xg(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function Zg(e,t,n,r){let i;return e.wholeWord&&(i=Qg(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=Xg(e.test,t,i)),new Tg(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function Qg(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(n_(i,n-a))!=$r.Word||t(r_(i,n-a))!=$r.Word)&&(t(r_(i,r-a))!=$r.Word||t(n_(i,r-a))!=$r.Word))}var $g=class extends Yg{constructor(e){super(e)}nextMatch(e,t,n){let r=Zg(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Zg(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=Zg(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Zg(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Zg(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function e_(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function t_(e,t,n,r){let i;return e.wholeWord&&(i=i_(t.charCategorizer(t.selection.main.head))),e.test&&(i=e_(e.test,t,i)),new Og(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function n_(e,t){return e.slice(Zn(e,t,!1),t)}function r_(e,t){return e.slice(t,Zn(e,t))}function i_(e){return(t,n,r)=>!r[0].length||(e(n_(r.input,r.index))!=$r.Word||e(r_(r.input,r.index))!=$r.Word)&&(e(r_(r.input,r.index+r[0].length))!=$r.Word||e(n_(r.input,r.index+r[0].length))!=$r.Word)}var a_=class extends Yg{nextMatch(e,t,n){let r=t_(this.spec,e,n,e.doc.length).next();return r.done&&(r=t_(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=t_(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=t_(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=t_(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},o_=Ur.define(),s_=Ur.define(),c_=Sr.define({create(e){return new l_(x_(e).create(),null)},update(e,t){for(let n of t.effects)n.is(o_)?e=new l_(n.value.create(),e.panel):n.is(s_)&&(e=new l_(e.query,n.value?b_:null));return e},provide:e=>gu.from(e,e=>e.panel)}),l_=class{constructor(e,t){this.query=e,this.panel=t}},u_=ca.mark({class:`cm-searchMatch`}),d_=ca.mark({class:`cm-searchMatch cm-searchMatch-selected`}),f_=No.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(c_))}update(e){let t=e.state.field(c_);(t!=e.startState.field(c_)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return ca.none;let{view:n}=this,r=new mi;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?d_:u_)})}return r.finish()}},{decorations:e=>e.decorations});function p_(e){return t=>{let n=t.state.field(c_,!1);return n&&n.query.spec.valid?e(t,n):w_(t)}}var m_=p_((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=N.single(r.from,r.to),a=e.state.facet(qg);return e.dispatch({selection:i,effects:[j_(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),C_(e),!0}),h_=p_((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=N.single(i.from,i.to),o=e.state.facet(qg);return e.dispatch({selection:a,effects:[j_(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),C_(e),!0}),g_=p_((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:N.create(n.map(e=>N.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),__=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new Tg(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(N.range(t.value.from,t.value.to))}return t(e.update({selection:N.create(a,o),userEvent:`select.search.matches`})),!0},v_=p_((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(I.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=N.single(o.from,o.to).map(d),u.push(j_(e,o)),u.push(n.facet(qg).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),y_=p_((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:I.announce.of(r),userEvent:`input.replace.all`}),!0});function b_(e){return e.state.facet(qg).createPanel(e)}function x_(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(qg);return new Jg({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function S_(e){let t=fu(e,b_);return t&&t.dom.querySelector(`[main-field]`)}function C_(e){let t=S_(e);t&&t==e.root.activeElement&&t.select()}var w_=e=>{let t=e.state.field(c_,!1);if(t&&t.panel){let n=S_(e);if(n&&n!=e.root.activeElement){let r=x_(e.state,t.query.spec);r.valid&&e.dispatch({effects:o_.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[s_.of(!0),t?o_.of(x_(e.state,t.query.spec)):Ur.appendConfig.of(N_)]});return!0},T_=e=>{let t=e.state.field(c_,!1);if(!t||!t.panel)return!1;let n=fu(e,b_);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:s_.of(!1)}),!0},E_=[{key:`Mod-f`,run:w_,scope:`editor search-panel`},{key:`F3`,run:m_,shift:h_,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:m_,shift:h_,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:T_,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:__},{key:`Mod-Alt-g`,run:Pg},{key:`Mod-d`,run:Kg,preventDefault:!0}],D_=class{constructor(e){this.view=e;let t=this.query=e.state.field(c_).query.spec;this.commit=this.commit.bind(this),this.searchField=Vi(`input`,{value:t.search,placeholder:O_(e,`Find`),"aria-label":O_(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=Vi(`input`,{value:t.replace,placeholder:O_(e,`Replace`),"aria-label":O_(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=Vi(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=Vi(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=Vi(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return Vi(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=Vi(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>m_(e),[O_(e,`next`)]),n(`prev`,()=>h_(e),[O_(e,`previous`)]),n(`select`,()=>g_(e),[O_(e,`all`)]),Vi(`label`,null,[this.caseField,O_(e,`match case`)]),Vi(`label`,null,[this.reField,O_(e,`regexp`)]),Vi(`label`,null,[this.wordField,O_(e,`by word`)]),...e.state.readOnly?[]:[Vi(`br`),this.replaceField,n(`replace`,()=>v_(e),[O_(e,`replace`)]),n(`replaceAll`,()=>y_(e),[O_(e,`replace all`)])],Vi(`button`,{name:`close`,onclick:()=>T_(e),"aria-label":O_(e,`close`),type:`button`},[`×`])])}commit(){let e=new Jg({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:o_.of(e)}))}keydown(e){$l(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?h_:m_)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),v_(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(o_)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(qg).top}};function O_(e,t){return e.state.phrase(t)}var k_=30,A_=/[\s\.,:;?!]/;function j_(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-k_),o=Math.min(i,n+k_),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<k_;e++)if(!A_.test(s[e+1])&&A_.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-k_;e--)if(!A_.test(s[e-1])&&A_.test(s[e])){s=s.slice(0,e);break}}return I.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var M_=I.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`}}),N_=[c_,Tr.low(f_),M_],P_=f(u(((e,t)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()}))()),F_={primary:`wcpos:bg-wp-admin-theme-color wcpos:text-white wcpos:hover:bg-wp-admin-theme-color-darker-10 wcpos:focus:ring-wp-admin-theme-color`,secondary:`wcpos:bg-white wcpos:text-gray-700 wcpos:border wcpos:border-gray-300 wcpos:hover:bg-gray-50 wcpos:focus:ring-wp-admin-theme-color`,destructive:`wcpos:bg-red-600 wcpos:text-white wcpos:hover:bg-red-700 wcpos:focus:ring-red-500`,outline:`wcpos:bg-transparent wcpos:text-wp-admin-theme-color wcpos:border wcpos:border-wp-admin-theme-color wcpos:hover:bg-wp-admin-theme-color-lightest wcpos:focus:ring-wp-admin-theme-color`,ghost:`wcpos:bg-transparent wcpos:text-gray-700 wcpos:hover:bg-gray-100 wcpos:focus:ring-wp-admin-theme-color`,"ghost-destructive":`wcpos:bg-transparent wcpos:text-red-600 wcpos:hover:bg-red-50 wcpos:focus:ring-red-500`,text:`wcpos:bg-transparent wcpos:text-wp-admin-theme-color wcpos:hover:underline wcpos:focus:ring-wp-admin-theme-color`};function I_(e){return e===`danger`?`destructive`:e}function L_({variant:e=`secondary`,loading:t=!1,disabled:n,className:r,children:i,type:a=`button`,...o}){let s=n||t,c=I_(e);return(0,M.jsxs)(`button`,{type:a,disabled:s,className:(0,P_.default)(`wcpos:inline-flex wcpos:items-center wcpos:justify-center wcpos:rounded-md wcpos:text-sm wcpos:font-medium wcpos:transition-colors wcpos:duration-150`,`wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-offset-2`,c===`text`?`wcpos:px-0 wcpos:py-0`:`wcpos:px-3 wcpos:py-1.5`,F_[c],s?`wcpos:opacity-50 wcpos:cursor-not-allowed`:`wcpos:cursor-pointer`,r),...o,children:[t&&(0,M.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,className:`wcpos:mr-2 wcpos:h-4 wcpos:w-4 wcpos:animate-spin`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,M.jsx)(`circle`,{className:`wcpos:opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,M.jsx)(`path`,{className:`wcpos:opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),i]})}var R_=t.forwardRef(({error:e,className:t,type:n=`text`,...r},i)=>(0,M.jsx)(`input`,{ref:i,type:n,"aria-invalid":e||void 0,className:(0,P_.default)(`wcpos:block wcpos:w-full wcpos:rounded-md wcpos:border wcpos:px-2.5 wcpos:py-1.5 wcpos:text-sm wcpos:shadow-xs`,`wcpos:transition-colors wcpos:duration-150`,`wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-offset-0`,e?`wcpos:border-red-300 wcpos:focus:border-red-500 wcpos:focus:ring-red-500`:`wcpos:border-gray-300 wcpos:focus:border-wp-admin-theme-color wcpos:focus:ring-wp-admin-theme-color`,r.disabled&&`wcpos:bg-gray-50 wcpos:text-gray-500 wcpos:cursor-not-allowed`,t),...r}));R_.displayName=`TextInput`;var z_=t.forwardRef(({error:e,className:t,...n},r)=>(0,M.jsx)(`textarea`,{ref:r,"aria-invalid":e||void 0,className:(0,P_.default)(`wcpos:block wcpos:w-full wcpos:rounded-md wcpos:border wcpos:px-2.5 wcpos:py-1.5 wcpos:text-sm wcpos:shadow-xs`,`wcpos:transition-colors wcpos:duration-150`,`wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-offset-0`,e?`wcpos:border-red-300 wcpos:focus:border-red-500 wcpos:focus:ring-red-500`:`wcpos:border-gray-300 wcpos:focus:border-wp-admin-theme-color wcpos:focus:ring-wp-admin-theme-color`,n.disabled&&`wcpos:bg-gray-50 wcpos:text-gray-500 wcpos:cursor-not-allowed`,t),...n}));z_.displayName=`TextArea`;function B_({value:e,options:t,onChange:n,placeholder:r,disabled:i,className:a,inline:o,...s}){return(0,M.jsxs)(`select`,{value:String(e),onChange:e=>{let r=t.find(t=>String(t.value)===e.target.value);r&&n(r)},disabled:i,className:(0,P_.default)(o?`wcpos:inline-block`:`wcpos:block wcpos:w-full`,`wcpos:rounded-md wcpos:border wcpos:border-gray-300 wcpos:bg-white wcpos:px-2.5 wcpos:py-1.5 wcpos:text-sm wcpos:shadow-xs`,`wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-wp-admin-theme-color wcpos:focus:border-wp-admin-theme-color`,i&&`wcpos:bg-gray-50 wcpos:text-gray-500 wcpos:cursor-not-allowed`,a),...s,children:[r&&(0,M.jsx)(`option`,{value:``,disabled:!0,children:r}),t.map(e=>(0,M.jsx)(`option`,{value:String(e.value),disabled:!!e.disabled,children:e.label},String(e.value)))]})}var V_=`wcpos:flex wcpos:w-full wcpos:items-center wcpos:justify-between wcpos:gap-2 wcpos:rounded-md wcpos:border wcpos:border-gray-300 wcpos:bg-white wcpos:px-2.5 wcpos:py-1.5 wcpos:text-left wcpos:text-sm wcpos:shadow-xs wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-wp-admin-theme-color wcpos:focus:border-wp-admin-theme-color`,H_=`wcpos:bg-gray-50 wcpos:text-gray-500 wcpos:cursor-not-allowed`;function U_(e){return e.toLowerCase()}function W_({countries:e,value:r,onChange:i,placeholder:a,searchPlaceholder:o,noResultsLabel:s,clearable:c=!1,clearLabel:l,disabled:u,className:d,id:f,"aria-label":p}){let m=t.useRef(null),h=t.useRef(null),g=t.useRef(null),_=t.useRef(null),[v,y]=t.useState(!1),[b,x]=t.useState(``),[S,C]=t.useState(0),[w,T]=t.useState({top:0,left:0,width:0}),E=t.useId(),D=t.useMemo(()=>Object.entries(e).map(([e,t])=>({value:e,label:t})).sort((e,t)=>e.label.localeCompare(t.label)),[e]),O=t.useMemo(()=>{let e=U_(b.trim());return e?D.filter(t=>U_(t.label).includes(e)||U_(t.value).includes(e)):D},[D,b]),k=t.useMemo(()=>c?[{value:``,label:l??`—`,isClear:!0},...O]:O,[c,l,O]),A=r?e[r]:``,ee=t.useCallback(()=>{if(!m.current)return;let e=m.current.getBoundingClientRect();T({top:e.bottom+4,left:e.left,width:e.width})},[]),te=t.useCallback(()=>{y(!1),x(``)},[]),ne=t.useCallback(()=>{if(u)return;y(!0);let e=r?Math.max(0,k.findIndex(e=>!e.isClear&&e.value===r)):+!!c;C(Math.min(e,Math.max(0,k.length-1)))},[c,u,k,r]),re=t.useCallback(e=>{i(e),te(),m.current?.focus()},[te,i]);t.useLayoutEffect(()=>{if(!v)return;ee();let e=requestAnimationFrame(()=>g.current?.focus());return()=>cancelAnimationFrame(e)},[v,ee]),t.useEffect(()=>{if(!v)return;let e=e=>{let t=e.target;m.current?.contains(t)||h.current?.contains(t)||te()};return document.addEventListener(`mousedown`,e),window.addEventListener(`scroll`,ee,!0),window.addEventListener(`resize`,ee),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`scroll`,ee,!0),window.removeEventListener(`resize`,ee)}},[v,te,ee]),t.useEffect(()=>{v&&C(e=>k.length===0?0:e>=k.length?k.length-1:e)},[v,k]),t.useEffect(()=>{v&&_.current&&_.current.querySelector(`[data-index="${S}"]`)?.scrollIntoView?.({block:`nearest`})},[v,S]);let ie=e=>{u||(e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),ne())},ae=e=>{switch(e.key){case`ArrowDown`:e.preventDefault(),C(e=>k.length===0?0:(e+1)%k.length);break;case`ArrowUp`:e.preventDefault(),C(e=>k.length===0?0:(e-1+k.length)%k.length);break;case`Home`:e.preventDefault(),C(0);break;case`End`:e.preventDefault(),C(Math.max(0,k.length-1));break;case`Enter`:e.preventDefault(),k[S]&&re(k[S].value);break;case`Escape`:e.preventDefault(),te(),m.current?.focus();break;case`Tab`:te()}},oe=k.length>0?`${E}-option-${S}`:void 0;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`button`,{ref:m,id:f,type:`button`,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":v,"aria-controls":v?E:void 0,"aria-label":p,disabled:u,onClick:()=>v?te():ne(),onKeyDown:ie,className:(0,P_.default)(V_,u&&H_,d),children:[(0,M.jsx)(`span`,{className:(0,P_.default)(`wcpos:truncate`,!A&&`wcpos:text-gray-500`),children:A||a||``}),(0,M.jsx)(`svg`,{"aria-hidden":`true`,className:`wcpos:h-4 wcpos:w-4 wcpos:text-gray-400 wcpos:shrink-0`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 011.08 1.04l-4.24 4.38a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z`,clipRule:`evenodd`})})]}),v&&n.createPortal((0,M.jsxs)(`div`,{ref:h,className:`wcpos:fixed wcpos:z-[99999] wcpos:rounded-md wcpos:border wcpos:border-gray-200 wcpos:bg-white wcpos:shadow-lg`,style:{top:w.top,left:w.left,width:w.width},children:[(0,M.jsx)(`div`,{className:`wcpos:p-2 wcpos:border-b wcpos:border-gray-100`,children:(0,M.jsx)(`input`,{ref:g,type:`text`,role:`searchbox`,"aria-autocomplete":`list`,"aria-controls":E,"aria-activedescendant":oe,value:b,onChange:e=>x(e.target.value),onKeyDown:ae,placeholder:o,className:`wcpos:block wcpos:w-full wcpos:rounded wcpos:border wcpos:border-gray-300 wcpos:bg-white wcpos:px-2 wcpos:py-1 wcpos:text-sm wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-wp-admin-theme-color wcpos:focus:border-wp-admin-theme-color`})}),(0,M.jsxs)(`ul`,{ref:_,id:E,role:`listbox`,"aria-label":p,className:`wcpos:m-0 wcpos:max-h-60 wcpos:list-none wcpos:overflow-auto wcpos:p-1`,children:[k.map((e,t)=>{let n=t===S,i=e.isClear?r===``:e.value===r;return(0,M.jsx)(`li`,{id:`${E}-option-${t}`,"data-index":t,role:`option`,"aria-selected":i,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>C(t),onClick:()=>re(e.value),className:(0,P_.default)(`wcpos:flex wcpos:cursor-pointer wcpos:items-center wcpos:gap-2 wcpos:rounded wcpos:px-2 wcpos:py-1 wcpos:text-sm`,e.isClear?`wcpos:text-gray-500`:`wcpos:justify-between wcpos:text-gray-700`,n&&`wcpos:bg-gray-100`,i&&(e.isClear?`wcpos:font-medium wcpos:text-gray-700`:`wcpos:font-medium`)),children:e.isClear?(0,M.jsx)(`span`,{className:`wcpos:truncate`,children:e.label}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`wcpos:truncate`,children:e.label}),(0,M.jsx)(`span`,{className:`wcpos:text-xs wcpos:text-gray-400`,children:e.value})]})},e.isClear?`__clear__`:e.value)}),O.length===0&&(0,M.jsx)(`li`,{role:`presentation`,className:`wcpos:px-2 wcpos:py-2 wcpos:text-sm wcpos:text-gray-500`,children:s??`No results`})]})]}),document.body)]})}function G_({text:e,children:r,className:i}){let a=t.useRef(null),[o,s]=t.useState(!1),[c,l]=t.useState({top:0,left:0}),u=t.useId(),d=t.useCallback(()=>{if(!a.current)return;let e=a.current.getBoundingClientRect();l({top:e.top-4,left:e.left+e.width/2})},[]),f=t.useCallback(()=>{d(),s(!0)},[d]),p=t.useCallback(()=>s(!1),[]);return t.useEffect(()=>{if(o)return window.addEventListener(`scroll`,d,!0),window.addEventListener(`resize`,d),()=>{window.removeEventListener(`scroll`,d,!0),window.removeEventListener(`resize`,d)}},[o,d]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{ref:a,className:(0,P_.default)(`wcpos:inline-flex`,i),onMouseEnter:f,onMouseLeave:p,onFocus:f,onBlur:p,"aria-describedby":o?u:void 0,tabIndex:0,children:r}),o&&n.createPortal((0,M.jsx)(`span`,{id:u,role:`tooltip`,className:`wcpos:fixed wcpos:z-[99999] wcpos:whitespace-nowrap wcpos:rounded wcpos:bg-gray-900 wcpos:px-2 wcpos:py-1 wcpos:text-xs wcpos:text-white wcpos:shadow-lg wcpos:pointer-events-none wcpos:-translate-x-1/2 wcpos:-translate-y-full`,style:{top:c.top,left:c.left},children:e}),document.body)]})}t.createContext(null);var K_={neutral:`wcpos:bg-gray-100 wcpos:text-gray-700`,info:`wcpos:bg-blue-50 wcpos:text-blue-700`,success:`wcpos:bg-green-50 wcpos:text-green-700`,warning:`wcpos:bg-amber-50 wcpos:text-amber-700`,error:`wcpos:bg-red-50 wcpos:text-red-700`,critical:`wcpos:bg-red-100 wcpos:text-red-800`,debug:`wcpos:bg-gray-100 wcpos:text-gray-600`,brand:`wcpos:bg-wp-admin-theme-color wcpos:text-white wcpos:uppercase wcpos:font-semibold wcpos:tracking-wide`},q_={sm:`wcpos:text-xs wcpos:px-2 wcpos:py-0.5`,xs:`wcpos:text-[10px] wcpos:px-1.5 wcpos:py-0.5`},J_={pill:`wcpos:rounded-full`,round:`wcpos:rounded-full wcpos:min-w-5 wcpos:justify-center`};function Y_({variant:e=`neutral`,shape:t=`pill`,size:n=`sm`,icon:r,className:i,children:a,...o}){return(0,M.jsxs)(`span`,{className:(0,P_.default)(`wcpos:inline-flex wcpos:items-center wcpos:gap-1 wcpos:font-medium wcpos:leading-none wcpos:shrink-0`,K_[e],q_[n],J_[t],i),...o,children:[r,a]})}t.createContext(null);function X_({className:e,tableClassName:t,children:n,...r}){return(0,M.jsx)(`div`,{className:(0,P_.default)(`wcpos:overflow-x-auto wcpos:rounded-md wcpos:border wcpos:border-gray-200`,e),...r,children:(0,M.jsx)(`table`,{className:(0,P_.default)(`wcpos:w-full wcpos:text-sm`,t),children:n})})}function Z_({className:e,children:t,...n}){return(0,M.jsx)(`thead`,{className:e,...n,children:t})}function Q_({className:e,children:t,...n}){return(0,M.jsx)(`tbody`,{className:e,...n,children:t})}var $_=t.forwardRef(function({className:e,children:t,...n},r){return(0,M.jsx)(`tr`,{ref:r,className:(0,P_.default)(`wcpos:bg-gray-50 wcpos:text-left wcpos:text-xs wcpos:uppercase wcpos:tracking-wide wcpos:text-gray-500`,e),...n,children:t})}),ev=t.forwardRef(function({className:e,children:t,...n},r){return(0,M.jsx)(`tr`,{ref:r,className:(0,P_.default)(`wcpos:border-t wcpos:border-gray-100`,e),...n,children:t})}),tv=t.forwardRef(function({className:e,children:t,...n},r){return(0,M.jsx)(`th`,{ref:r,className:(0,P_.default)(`wcpos:px-3 wcpos:py-2 wcpos:font-medium`,e),...n,children:t})}),nv=t.forwardRef(function({className:e,children:t,...n},r){return(0,M.jsx)(`td`,{ref:r,className:(0,P_.default)(`wcpos:px-3 wcpos:py-2 wcpos:align-middle`,e),...n,children:t})});X_.Header=Z_,X_.HeaderRow=$_,X_.Body=Q_,X_.Row=ev,X_.Head=tv,X_.Cell=nv;var rv=[{value:`eu_vat`,label:`EU VAT`},{value:`gb_vat`,label:`GB VAT`},{value:`au_abn`,label:`AU ABN`},{value:`br_cpf`,label:`BR CPF`},{value:`br_cnpj`,label:`BR CNPJ`},{value:`in_gst`,label:`IN GSTIN`},{value:`it_cf`,label:`IT Codice Fiscale`},{value:`it_piva`,label:`IT Partita IVA`},{value:`es_nif`,label:`ES NIF`},{value:`ar_cuit`,label:`AR CUIT`},{value:`sa_vat`,label:`SA VAT`},{value:`ca_gst_hst`,label:`CA GST/HST`},{value:`us_ein`,label:`US EIN`},{value:`de_ust_id`,label:`DE USt-IdNr.`},{value:`de_steuernummer`,label:`DE Steuernummer`},{value:`de_hrb`,label:`DE HRB`},{value:`nl_kvk`,label:`NL KVK`},{value:`fr_siret`,label:`FR SIRET`},{value:`fr_siren`,label:`FR SIREN`},{value:`gb_company`,label:`GB Company number`},{value:`ch_uid`,label:`CH UID`},{value:`other`,label:`Other`}],iv={eu_vat:`DE123456789`,gb_vat:`GB123456789`,au_abn:`12345678901`,br_cpf:`123.456.789-09`,br_cnpj:`12.345.678/0001-95`,in_gst:`22AAAAA0000A1Z5`,it_cf:`RSSMRA80A01H501U`,it_piva:`12345678901`,es_nif:`B12345674`,ar_cuit:`20-12345678-3`,sa_vat:`300123456700003`,ca_gst_hst:`123456789RT0001`,us_ein:`12-3456789`,de_ust_id:`DE123456789`,de_steuernummer:`12/345/67890`,de_hrb:`HRB 12345`,nl_kvk:`12345678`,fr_siret:`12345678901234`,fr_siren:`123456789`,gb_company:`12345678`,ch_uid:`CHE-123.456.789`},av={AR:`ar_cuit`,AU:`au_abn`,BR:`br_cnpj`,CA:`ca_gst_hst`,CH:`ch_uid`,DE:`de_ust_id`,ES:`es_nif`,FR:`fr_siret`,GB:`gb_vat`,IN:`in_gst`,IT:`it_piva`,NL:`nl_kvk`,SA:`sa_vat`,US:`us_ein`},ov={ar_cuit:`AR`,au_abn:`AU`,br_cpf:`BR`,br_cnpj:`BR`,ca_gst_hst:`CA`,ch_uid:`CH`,de_hrb:`DE`,de_steuernummer:`DE`,de_ust_id:`DE`,es_nif:`ES`,fr_siren:`FR`,fr_siret:`FR`,gb_company:`GB`,gb_vat:`GB`,in_gst:`IN`,it_cf:`IT`,it_piva:`IT`,nl_kvk:`NL`,sa_vat:`SA`,us_ein:`US`},sv=new Set(`AT.BE.BG.CY.CZ.DE.DK.EE.ES.FI.FR.GR.HR.HU.IE.IT.LT.LU.LV.MT.NL.PL.PT.RO.SE.SI.SK`.split(`.`));function cv(e){if(!e)return`other`;let t=e.toUpperCase();return av[t]?av[t]:sv.has(t)?`eu_vat`:`other`}function lv(e,t){if(e===`eu_vat`){let e=t?.toUpperCase();if(e&&sv.has(e))return e;let n=window?.wcpos?.settings?.storeCountry?.toUpperCase();return n&&sv.has(n)?n:void 0}return ov[e]}function uv(e,t){return iv[e]??t}var dv=e=>{let t={type:e.type||`other`,value:e.value||``};return e.country&&(t.country=e.country),e.label&&(t.label=e.label),t},fv=(e,t)=>{if(typeof t.country==`string`&&t.country)return{...t,type:cv(t.country)};if(typeof t.type==`string`){let n=lv(t.type,e.country);if(n)return{...t,country:n};if(t.type===`eu_vat`)return{...t,country:void 0}}return t},pv=0,mv=()=>`tax-id-row-${++pv}`;function hv({taxId:e,labels:n,onChangeField:r,onRemove:i}){let[a,o]=t.useState(e.value),[s,c]=t.useState(e.label??``),l=window?.wcpos?.settings?.countries??{};return t.useEffect(()=>{o(e.value)},[e.value]),t.useEffect(()=>{c(e.label??``)},[e.label]),(0,M.jsxs)(ev,{children:[(0,M.jsx)(nv,{children:(0,M.jsx)(B_,{"aria-label":n.type,value:e.type,options:rv,onChange:({value:e})=>r({type:String(e)})})}),(0,M.jsx)(nv,{children:(0,M.jsx)(R_,{"aria-label":n.value,placeholder:uv(e.type,n.value),value:a,onChange:e=>o(e.target.value),onBlur:()=>{let t=a.trim();t!==e.value&&r({value:t})}})}),(0,M.jsx)(nv,{children:(0,M.jsx)(W_,{"aria-label":n.country,countries:l,value:e.country??``,onChange:e=>r({country:e}),placeholder:n.countryPlaceholder??n.country,searchPlaceholder:n.countrySearchPlaceholder,noResultsLabel:n.countryNoResults,clearable:!0,clearLabel:n.countryClear})}),(0,M.jsx)(nv,{children:(0,M.jsx)(R_,{"aria-label":n.label,placeholder:n.label,value:s,onChange:e=>c(e.target.value),onBlur:()=>{let t=s.trim();t!==(e.label??``)&&r({label:t})}})}),(0,M.jsx)(nv,{className:`wcpos:text-right`,children:(0,M.jsx)(L_,{variant:`ghost-destructive`,onMouseDown:e=>e.preventDefault(),onClick:i,children:n.remove})})]})}t.forwardRef(function({value:e,onChange:n,labels:r},i){let a=t.useMemo(()=>Array.isArray(e)?e.map(dv):[],[e]),[o,s]=t.useState(()=>a.map(()=>mv())),[c,l]=t.useState(null);t.useEffect(()=>{s(e=>{if(e.length===a.length)return e;if(e.length<a.length){let t=Array.from({length:a.length-e.length},()=>mv());return[...e,...t]}return e.slice(0,a.length)})},[a.length]);let u=t.useCallback((e,t)=>{if(e>=a.length&&c){let e=fv(c.taxId,t),r=dv({...c.taxId,...e});if(t.value&&r.value){s(e=>[...e,c.id]),l(null),n([...a,r]);return}l({id:c.id,taxId:r});return}n(a.map((n,r)=>{if(r!==e)return n;let i=fv(n,t);return dv({...n,...i})}))},[c,n,a]),d=t.useCallback(e=>{if(e>=a.length){l(null);return}s(t=>t.filter((t,n)=>n!==e)),n(a.filter((t,n)=>n!==e))},[n,a]),f=t.useCallback(()=>{l(e=>{if(e)return e;let t=window?.wcpos?.settings?.storeCountry,n={type:cv(t),value:``};return t&&(n.country=t),{id:mv(),taxId:n}})},[]);t.useImperativeHandle(i,()=>({addRow:f}),[f]);let p=t.useMemo(()=>{let e=a.map((e,t)=>({id:o[t]??`tax-id-row-fallback-${t}`,taxId:e}));return c&&e.push({id:c.id,taxId:c.taxId}),e},[a,o,c]);return p.length===0?(0,M.jsxs)(`div`,{className:`wcpos:space-y-3`,children:[(0,M.jsx)(`p`,{className:`wcpos:rounded-md wcpos:border wcpos:border-dashed wcpos:border-gray-300 wcpos:bg-gray-50 wcpos:px-3 wcpos:py-4 wcpos:text-center wcpos:text-sm wcpos:text-gray-500`,children:r.empty}),(0,M.jsx)(L_,{variant:`outline`,onClick:f,children:r.add})]}):(0,M.jsxs)(`div`,{className:`wcpos:space-y-3`,children:[(0,M.jsxs)(X_,{children:[(0,M.jsx)(Z_,{children:(0,M.jsxs)($_,{children:[(0,M.jsx)(tv,{style:{width:`11rem`},children:r.type}),(0,M.jsx)(tv,{children:r.value}),(0,M.jsx)(tv,{style:{width:`12rem`},children:r.country}),(0,M.jsx)(tv,{children:r.label}),(0,M.jsx)(tv,{className:`wcpos:text-right`,style:{width:`1%`},children:(0,M.jsx)(`span`,{className:`wcpos:sr-only`,children:r.remove})})]})}),(0,M.jsx)(Q_,{children:p.map((e,t)=>(0,M.jsx)(hv,{taxId:e.taxId,labels:r,onChangeField:e=>u(t,e),onRemove:()=>d(t)},e.id))})]}),(0,M.jsx)(L_,{variant:`outline`,onClick:f,children:r.add})]})});var gv=[10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200],_v={a4:{width:794,height:1123},"58mm":{width:219,height:520},"80mm":{width:302,height:520}};function vv(e,t,n,r){if(n<=0||r<=0)return 100;let i=gv.filter(e=>e<=100).slice().reverse();for(let a of i){let i=a/100;if(e*i<=n&&t*i<=r)return a}return i[i.length-1]}function yv({children:e,paperWidth:n=`a4`,zoomInLabel:r,zoomOutLabel:i,className:a,contentClassName:o,...s}){let c=t.useRef(null),l=t.useRef(null),u=_v[n],[d,f]=t.useState(null),p=d?.width??u.width,m=d?.height??u.height,[h,g]=t.useState(100),[_,v]=t.useState(!1),[y,b]=t.useState(n);y!==n&&(b(n),f(null),v(!1)),t.useEffect(()=>{let e=l.current;if(!e)return;let t=null,n=null,r=()=>{let e=null;try{e=t?.contentDocument?.body??null}catch{return}if(!e)return;let n=e.scrollWidth,r=e.scrollHeight;n<=0||r<=0||f(e=>e&&e.width===n&&e.height===r?e:{width:n,height:r})},i=()=>{let e=null;try{e=t?.contentDocument??null}catch{e=null}if(n?.disconnect(),n=null,!e?.body){f(e=>e===null?e:null);return}if(!e.getElementById(`wcpos-preview-reset`)){let t=e.createElement(`style`);t.id=`wcpos-preview-reset`,t.textContent=`html,body{margin:0;padding:0;overflow:hidden;}`,e.head?.appendChild(t)}r(),typeof ResizeObserver<`u`&&(n=new ResizeObserver(r),n.observe(e.body))},a=()=>{let r=e.querySelector(`iframe`);if(r!==t&&(t?.removeEventListener(`load`,i),n?.disconnect(),n=null,t=r,t)){t.addEventListener(`load`,i);try{t.contentDocument?.readyState===`complete`&&i()}catch{f(e=>e===null?e:null)}}};a();let o=new MutationObserver(a);return o.observe(e,{childList:!0,subtree:!0}),()=>{o.disconnect(),t?.removeEventListener(`load`,i),n?.disconnect()}},[]),t.useLayoutEffect(()=>{if(_)return;let e=c.current;if(!e)return;let t=()=>{if(_)return;let t=e.clientWidth-32,n=e.clientHeight-32;t<=0||n<=0||g(vv(p,m,t,n))};if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[p,m,_]);let x=h/100,S=gv.indexOf(h),C=S>0,w=S<gv.length-1,T=e=>{let t=Math.max(0,Math.min(gv.length-1,S+e));v(!0),g(gv[t])},E=`wcpos:flex wcpos:h-7 wcpos:w-7 wcpos:cursor-pointer wcpos:items-center wcpos:justify-center wcpos:border-0 wcpos:bg-transparent wcpos:text-base wcpos:leading-none wcpos:text-gray-700 wcpos:hover:bg-gray-100 wcpos:disabled:cursor-default wcpos:disabled:text-gray-300 wcpos:disabled:hover:bg-transparent`;return(0,M.jsxs)(`div`,{ref:c,className:(0,P_.default)(`wcpos:relative wcpos:flex wcpos:min-h-0 wcpos:flex-1 wcpos:flex-col wcpos:rounded wcpos:border wcpos:border-gray-200 wcpos:bg-gray-100`,a),...s,children:[(0,M.jsxs)(`div`,{"data-testid":`preview-viewport-zoom-controls`,className:`wcpos:absolute wcpos:top-2 wcpos:right-2 wcpos:z-10 wcpos:inline-flex wcpos:items-stretch wcpos:overflow-hidden wcpos:rounded-md wcpos:border wcpos:border-gray-300 wcpos:bg-white/95 wcpos:shadow-sm`,children:[(0,M.jsx)(`button`,{type:`button`,"aria-label":i,title:i,disabled:!C,onClick:()=>T(-1),className:E,children:`−`}),(0,M.jsxs)(`span`,{"data-testid":`preview-viewport-zoom-value`,className:`wcpos:inline-flex wcpos:min-w-[44px] wcpos:items-center wcpos:justify-center wcpos:border-l wcpos:border-r wcpos:border-gray-200 wcpos:px-2 wcpos:text-xs wcpos:tabular-nums wcpos:text-gray-700`,role:`status`,"aria-label":`Zoom ${h}%`,"aria-live":`polite`,children:[h,`%`]}),(0,M.jsx)(`button`,{type:`button`,"aria-label":r,title:r,disabled:!w,onClick:()=>T(1),className:E,children:`+`})]}),(0,M.jsx)(`div`,{"data-testid":`preview-viewport-scroll-area`,className:`wcpos:min-h-0 wcpos:flex-1 wcpos:overflow-auto wcpos:p-4`,children:(0,M.jsx)(`div`,{"data-testid":`preview-viewport-canvas-frame`,className:`wcpos:mx-auto wcpos:overflow-hidden`,style:{width:p*x,height:m*x},children:(0,M.jsx)(`div`,{ref:l,"data-testid":`preview-viewport-canvas`,className:o,style:{width:p,height:m,transform:`scale(${x})`,transformOrigin:`top left`},children:e})})})]})}function bv({label:e,onClick:t,pressed:n,children:r}){return(0,M.jsx)(G_,{text:e,children:(0,M.jsx)(`button`,{type:`button`,onClick:t,"aria-label":e,"aria-pressed":typeof n==`boolean`?n:void 0,className:[`wcpos:inline-flex wcpos:items-center wcpos:justify-center`,`wcpos:w-7 wcpos:h-7 wcpos:rounded wcpos:border-0 wcpos:cursor-pointer`,`wcpos:transition-colors wcpos:duration-150`,n?`wcpos:bg-blue-100 wcpos:text-wp-admin-theme-color`:`wcpos:bg-transparent wcpos:text-gray-600 wcpos:hover:bg-gray-200 wcpos:hover:text-gray-900`].join(` `),children:r})})}function xv(e){let t=new Set;return dp(e.state).between(0,e.state.doc.length,(e,n)=>{t.add(`${e}:${n}`)}),t}function Sv(e){Cf(e,e.state.doc.length);let t=xv(e),n=[],r=new Set(t);for(let t=0;t<e.state.doc.length;){let i=e.lineBlockAt(t),a=ip(e.state,i.from,i.to);if(a){let e=`${a.from}:${a.to}`;r.has(e)||(r.add(e),n.push(op.of(a)))}t=i.to+1}return n.length?(e.dispatch({effects:n}),!0):vp(e)}var Cv={undo:(0,M.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M5 4 L2 7 L5 10 M2 7 H9 a3 3 0 0 1 0 6 H6`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),redo:(0,M.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M9 4 L12 7 L9 10 M12 7 H5 a3 3 0 0 0 0 6 H8`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),find:(0,M.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:[(0,M.jsx)(`circle`,{cx:`6`,cy:`6`,r:`3.8`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,M.jsx)(`path`,{d:`M9 9 L12.5 12.5`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`})]}),wrap:(0,M.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M1.5 3 H12.5 M1.5 7 H10.5 a2 2 0 1 1 0 4 H7 L8.5 9.5 M8.5 12.5 L7 11 M1.5 11 H4`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),fold:(0,M.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:[(0,M.jsx)(`path`,{d:`M3 3.5 H11 M3 7 H11 M3 10.5 H11`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,M.jsx)(`path`,{d:`M5 5 L7 7 L9 5 M5 8.5 L7 10.5 L9 8.5`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),unfold:(0,M.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:[(0,M.jsx)(`path`,{d:`M3 3.5 H11 M3 7 H11 M3 10.5 H11`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,M.jsx)(`path`,{d:`M5 9 L7 7 L9 9 M5 5 L7 3 L9 5`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`,strokeLinejoin:`round`})]})};function wv({viewRef:e,wrap:n,onToggleWrap:r}){let i=(0,t.useCallback)(t=>()=>{let n=e.current;n&&(t(n),n.focus())},[e]);return(0,M.jsxs)(`div`,{className:`wcpos:flex wcpos:items-center wcpos:gap-1 wcpos:px-2 wcpos:py-1.5 wcpos:border-b wcpos:border-gray-200 wcpos:bg-gray-50`,children:[(0,M.jsx)(bv,{label:j(`editor.toolbar.undo`),onClick:i(vm),children:Cv.undo}),(0,M.jsx)(bv,{label:j(`editor.toolbar.redo`),onClick:i(ym),children:Cv.redo}),(0,M.jsx)(`span`,{className:`wcpos:w-px wcpos:h-5 wcpos:bg-gray-200 wcpos:mx-1`,"aria-hidden":`true`}),(0,M.jsx)(bv,{label:j(`editor.toolbar.find`),onClick:i(w_),children:Cv.find}),(0,M.jsx)(bv,{label:j(`editor.toolbar.wrap`),onClick:r,pressed:n,children:Cv.wrap}),(0,M.jsx)(`span`,{className:`wcpos:w-px wcpos:h-5 wcpos:bg-gray-200 wcpos:mx-1`,"aria-hidden":`true`}),(0,M.jsx)(bv,{label:j(`editor.toolbar.fold_all`),onClick:i(Sv),children:Cv.fold}),(0,M.jsx)(bv,{label:j(`editor.toolbar.unfold_all`),onClick:i(yp),children:Cv.unfold})]})}function Tv(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function Ev(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=Tv(t)+Tv(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function Dv(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:Ev(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function Ov(e,t){return n=>{for(let t=xf(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var kv=Br.define();typeof navigator==`object`&&navigator.platform;var Av=I.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),jv=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Mv=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,ir.TrackDel),r=t.mapPos(this.to,1,ir.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},Nv=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(Ff);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new Mv(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new jv(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},Pv=ca.widget({widget:new class extends oa{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),Fv=ca.mark({class:`cm-snippetField`}),Iv=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=ca.set(e.map(e=>(e.from==e.to?Pv:Fv).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},Lv=Ur.define({map(e,t){return e&&e.map(t)}}),Rv=Ur.define(),zv=Sr.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(Lv))return n.value;if(n.is(Rv)&&e)return new Iv(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>I.decorations.from(e,e=>e?e.deco:ca.none)});function Bv(e,t){return N.create(e.filter(e=>e.field==t).map(e=>N.range(e.from,e.to)))}function Vv(e){let t=Nv.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:Bn.of(a)},scrollIntoView:!0,annotations:n?[kv.of(n),Wr.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=Bv(o,0)),o.some(e=>e.field>0)){let t=new Iv(o,0),n=c.effects=[Lv.of(t)];e.state.field(zv,!1)===void 0&&n.push(Ur.appendConfig.of([zv,Gv,qv,Av]))}e.dispatch(e.state.update(c))}}function Hv(e){return({state:t,dispatch:n})=>{let r=t.field(zv,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:Bv(r.ranges,i),effects:Lv.of(a?null:new Iv(r.ranges,i)),scrollIntoView:!0})),!0}}var Uv=[{key:`Tab`,run:Hv(1),shift:Hv(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(zv,!1)?(t(e.update({effects:Lv.of(null)})),!0):!1}],Wv=P.define({combine(e){return e.length?e[0]:Uv}}),Gv=Tr.highest(Xl.compute([Wv],e=>e.facet(Wv)));function Kv(e,t){return{...t,apply:Vv(e)}}var qv=I.domEventHandlers({mousedown(e,t){let n=t.state.field(zv,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:Bv(n.ranges,i.field),effects:Lv.of(n.ranges.some(e=>e.field>i.field)?new Iv(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Jv={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},Yv=Ur.define({map(e,t){return t.mapPos(e,-1,ir.TrackAfter)??void 0}}),Xv=new class extends oi{};Xv.startSide=1,Xv.endSide=-1;var Zv=Sr.define({create(){return di.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Yv)&&(e=e.update({add:[Xv.range(n.value,n.value+1)]}));return e}});function Qv(){return[ry,Zv]}var $v=`()[]{}<>«»»«[]{}`;function ey(e){for(let t=0;t<16;t+=2)if($v.charCodeAt(t)==e)return $v.charAt(t+1);return tr(e<128?e:e+1)}function ty(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||Jv}var ny=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),ry=I.inputHandler.of((e,t,n,r)=>{if((ny?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&nr(er(r,0))==1||t!=i.from||n!=i.to)return!1;let a=ay(e.state,r);return a?(e.dispatch(a),!0):!1}),iy=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=ty(e,e.selection.main.head).brackets||Jv.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=cy(e.doc,t.head);for(let i of n)if(i==r&&sy(e.doc,t.head)==ey(er(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:N.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function ay(e,t){let n=ty(e,e.selection.main.head),r=n.brackets||Jv.brackets;for(let i of r){let a=ey(er(i,0));if(t==i)return a==i?dy(e,i,r.indexOf(i+i+i)>-1,n):ly(e,i,a,n.before||Jv.before);if(t==a&&oy(e,e.selection.main.from))return uy(e,i,a)}return null}function oy(e,t){let n=!1;return e.field(Zv).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function sy(e,t){let n=e.sliceString(t,t+2);return n.slice(0,nr(er(n,0)))}function cy(e,t){let n=e.sliceString(t-2,t);return nr(er(n,0))==n.length?n:n.slice(1)}function ly(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:Yv.of(a.to+t.length),range:N.range(a.anchor+t.length,a.head+t.length)};let o=sy(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:Yv.of(a.head+t.length),range:N.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function uy(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&sy(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:N.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function dy(e,t,n,r){let i=r.stringPrefixes||Jv.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Yv.of(r.to+t.length),range:N.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=sy(e.doc,o),c;if(s==t){if(fy(e,o))return{changes:{insert:t+t,from:o},effects:Yv.of(o+t.length),range:N.cursor(o+t.length)};if(oy(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:N.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=my(e,o-2*t.length,i))>-1&&fy(e,c))return{changes:{insert:t+t+t+t,from:o},effects:Yv.of(o+t.length),range:N.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=$r.Word&&my(e,o,i)>-1&&!py(e,o,t,i))return{changes:{insert:t+t,from:o},effects:Yv.of(o+t.length),range:N.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function fy(e,t){let n=xf(e).resolveInner(t+1);return n.parent&&n.from==t}function py(e,t,n,r){let i=xf(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function my(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=$r.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=$r.Word)return n}return-1}var hy=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new gy(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,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 t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new _y(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new gy(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},gy=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},_y=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},vy=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.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 e(this.stack,this.pos,this.index)}};function yy(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var by=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},xy=new by,Sy=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=xy,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=xy,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},Cy=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;Ey(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};Cy.prototype.contextual=Cy.prototype.fallback=Cy.prototype.extend=!1;var wy=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?yy(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(Ey(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};wy.prototype.contextual=Cy.prototype.fallback=Cy.prototype.extend=!1;var Ty=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function Ey(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||Oy(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function Dy(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function Oy(e,t,n,r){let i=Dy(n,r,t);return i<0||Dy(n,r,e)<i}var ky=typeof process<`u`&&process.env&&/\bparse\b/.test(process.env.LOG),Ay=null;function jy(e,t,n){let r=e.cursor(ad.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var My=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?jy(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?jy(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof od){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(Qu.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},Ny=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new by)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if((!n||c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new by,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new by,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535){if(o[s+1]==1)s=By(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(By(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(By(o,s+1),t,n,r))}return r}},Py=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Sy(t,r),this.tokens=new Ny(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[hy.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new My(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&Vy(r);if(e)return ky&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw ky&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return ky&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=ky?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(Qu.contextHash)||0)==n))return e.useNode(o,r),ky&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof od)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof od&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),ky&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),ky&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Fy(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=ky?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),ky&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(ky&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)ky&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))ky&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),ky&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),Fy(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),od.build({buffer:vy.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Ay||=new WeakMap).get(e);return t||Ay.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function Fy(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var Iy=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},Ly=e=>e,Ry=class{constructor(e){this.start=e.start,this.shift=e.shift||Ly,this.reduce=e.reduce||Ly,this.reuse=e.reuse||Ly,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},zy=class e extends Od{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=Qu[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new nd(t.map((t,i)=>td.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Yu;let a=yy(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(Hy),this.states=yy(e.states,Uint32Array),this.data=yy(e.stateData),this.goto=yy(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new Cy(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new Py(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535){if(n[i+1]==1)a=n[i=By(n,i+2)];else if(n[i+1]==2)return By(n,i+2);else break}if(a==t||a==0)return By(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=By(this.data,n+2);else break}r=t(By(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=By(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=Hy(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new Iy(e,n,r)}static deserialize(t){return new e(t)}};function By(e,t){return e[t]|e[t+1]<<16}function Vy(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function Hy(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var Uy=55,Wy=1,Gy=56,Ky=2,qy=57,Jy=3,Yy=4,Xy=5,Zy=6,Qy=7,$y=8,eb=9,tb=10,nb=11,rb=12,ib=13,ab=58,ob=14,sb=15,cb=59,lb=21,ub=23,db=24,fb=25,pb=27,mb=28,hb=29,gb=32,_b=35,vb=37,yb=38,bb=0,xb=1,Sb={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Cb={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},wb={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Tb(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var Eb=null,Db=null,Ob=0;function kb(e,t){let n=e.pos+t;if(Ob==n&&Db==e)return Eb;let r=e.peek(t),i=``;for(;Tb(r);)i+=String.fromCharCode(r),r=e.peek(++t);return Db=e,Ob=n,Eb=i?i.toLowerCase():r==Nb||r==Pb?void 0:null}var Ab=60,jb=62,Mb=47,Nb=63,Pb=33,Fb=45;function Ib(e,t){this.name=e,this.parent=t}var Lb=[Zy,tb,Qy,$y,eb],Rb=new Ry({start:null,shift(e,t,n,r){return Lb.indexOf(t)>-1?new Ib(kb(r,1)||``,e):e},reduce(e,t){return t==lb&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Zy||i==vb?new Ib(kb(r,1)||``,e):e},strict:!1}),zb=new Ty((e,t)=>{if(e.next!=Ab){e.next<0&&t.context&&e.acceptToken(ab);return}e.advance();let n=e.next==Mb;n&&e.advance();let r=kb(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?sb:ob);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(nb);if(i&&Cb[i])return e.acceptToken(ab,-2);if(t.dialectEnabled(bb))return e.acceptToken(rb);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(ib)}else{if(r==`script`)return e.acceptToken(Qy);if(r==`style`)return e.acceptToken($y);if(r==`textarea`)return e.acceptToken(eb);if(Sb.hasOwnProperty(r))return e.acceptToken(tb);i&&wb[i]&&wb[i][r]?e.acceptToken(ab,-1):e.acceptToken(Zy)}},{contextual:!0}),Bb=new Ty(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(cb);break}if(e.next==Fb)t++;else if(e.next==jb&&t>=2){n>=3&&e.acceptToken(cb,-2);break}else t=0;e.advance()}});function Vb(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var Hb=new Ty((e,t)=>{if(e.next==Mb&&e.peek(1)==jb){let n=t.dialectEnabled(xb)||Vb(t.context);e.acceptToken(n?Xy:Yy,2)}else e.next==jb&&e.acceptToken(Yy,1)});function Ub(e,t,n){let r=2+e.length;return new Ty(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==Ab||a==1&&i.next==Mb||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==jb){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var Wb=Ub(`script`,Uy,Wy),Gb=Ub(`style`,Gy,Ky),Kb=Ub(`textarea`,qy,Jy),qb=Xd({"Text RawText IncompleteTag IncompleteCloseTag":R.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":R.angleBracket,TagName:R.tagName,"MismatchedCloseTag/TagName":[R.tagName,R.invalid],AttributeName:R.attributeName,"AttributeValue UnquotedAttributeValue":R.attributeValue,Is:R.definitionOperator,"EntityReference CharacterReference":R.character,Comment:R.blockComment,ProcessingInst:R.processingInstruction,DoctypeDecl:R.documentMeta}),Jb=zy.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOO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oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:Rb,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`TextContent Entity`],[`isolate`,-11,22,30,31,33,34,36,37,38,39,42,43,`ltr`,-3,27,28,40,``]],propSources:[qb],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or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S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Wb,Gb,Kb,Hb,zb,Bb,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Yb(e,t){let n=Object.create(null);for(let r of e.getChildren(db)){let e=r.getChild(fb),i=r.getChild(pb)||r.getChild(mb);e&&(n[t.read(e.from,e.to)]=i?i.type.id==pb?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function Xb(e,t){let n=e.getChild(ub);return n?t.read(n.from,n.to):` `}function Zb(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=Yb(e.node.parent.firstChild,t)))return{parser:i.parser,bracketed:!0};return null}function Qb(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return Ad((e,t)=>{let s=e.type.id;if(s==hb)return Zb(e,t,n);if(s==gb)return Zb(e,t,r);if(s==_b)return Zb(e,t,i);if(s==lb&&a.length){let n=e.node,r=n.firstChild,i=r&&Xb(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=Yb(r,t)))){let t=n.lastChild,i=t.type.id==yb?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==db){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=Xb(n.parent,t))continue;let e=n.lastChild;if(e.type.id==pb){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}],bracketed:!0}}else if(e.type.id==mb)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var $b=148,ex=1,tx=149,nx=150,rx=2,ix=151,ax=3,ox=4,sx=[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],cx=58,lx=40,ux=95,dx=91,fx=45,px=46,mx=35,hx=37,gx=38,_x=92,vx=10,yx=42;function bx(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function xx(e){return e>=48&&e<=57}function Sx(e){return xx(e)||e>=97&&e<=102||e>=65&&e<=70}var Cx=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(bx(c)||c==fx||c==ux||a&&xx(c))!a&&(c!=fx||s>0)&&(a=!0),o===s&&c==fx&&o++,r.advance();else if(c==_x&&r.peek(1)!=vx){if(r.advance(),Sx(r.next)){do r.advance();while(Sx(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(rx)?t:c==lx?n:e);break}}},wx=new Ty(Cx(tx,rx,nx),{contextual:!0}),Tx=new Ty(Cx(ix,ax,ox),{contextual:!0}),Ex=new Ty(e=>{if(sx.includes(e.peek(-1))){let{next:t}=e;(bx(t)||t==ux||t==mx||t==px||t==yx||t==dx||t==cx&&bx(e.peek(1))||t==fx||t==gx)&&e.acceptToken($b)}}),Dx=new Ty(e=>{if(!sx.includes(e.peek(-1))){let{next:t}=e;if(t==hx&&(e.advance(),e.acceptToken(ex)),bx(t)){do e.advance();while(bx(e.next)||xx(e.next));e.acceptToken(ex)}}}),Ox=Xd({"AtKeyword import charset namespace keyframes media supports font-feature-values":R.definitionKeyword,"from to selector scope MatchFlag":R.keyword,NamespaceName:R.namespace,KeyframeName:R.labelName,KeyframeRangeName:R.operatorKeyword,TagName:R.tagName,ClassName:R.className,PseudoClassName:R.constant(R.className),IdName:R.labelName,"FeatureName PropertyName":R.propertyName,AttributeName:R.attributeName,NumberLiteral:R.number,KeywordQuery:R.keyword,UnaryQueryOp:R.operatorKeyword,"CallTag ValueName FontName":R.atom,VariableName:R.variableName,Callee:R.operatorKeyword,Unit:R.unit,"UniversalSelector NestingSelector":R.definitionOperator,"MatchOp CompareOp":R.compareOperator,"ChildOp SiblingOp, LogicOp":R.logicOperator,BinOp:R.arithmeticOperator,Important:R.modifier,Comment:R.blockComment,ColorLiteral:R.color,"ParenthesizedContent StringLiteral":R.string,":":R.punctuation,"PseudoOp #":R.derefOperator,"; , |":R.separator,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace}),kx={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:158,"url-prefix":158,domain:158,regexp:158},Ax={__proto__:null,or:104,and:104,not:112,only:112,layer:212},jx={__proto__:null,selector:118,style:124,layer:208},Mx={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},Nx={__proto__:null,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seudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles`,maxTerm:174,nodeProps:[[`isolate`,-2,5,39,``],[`openedBy`,23,`(`,31,`[`,34,`{`],[`closedBy`,24,`)`,32,`]`,35,`}`]],propSources:[Ox],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO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;'S;=`%{<%lO%jbGoU!r`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!r`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!r`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$rQ!r`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$fUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU#SQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[Ex,Dx,wx,Tx,1,2,3,4,new wy(`m~RRYZ[z{a~~g~aO$b~~dP!P!Qg~lO$c~~`,28,155)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:150,get:e=>kx[e]||-1},{term:151,get:e=>Ax[e]||-1},{term:4,get:e=>jx[e]||-1},{term:28,get:e=>Mx[e]||-1},{term:149,get:e=>Nx[e]||-1}],tokenPrec:2444}),Fx=null;function Ix(){if(!Fx&&typeof document==`object`&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!=`cssText`&&r!=`cssFloat`&&typeof e[r]==`string`&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));Fx=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return Fx||[]}var Lx=`active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where`.split(`.`).map(e=>({type:`class`,label:e})),Rx=`above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`).map(e=>({type:`keyword`,label:e})).concat(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`).map(e=>({type:`constant`,label:e}))),zx=`a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul`.split(`.`).map(e=>({type:`type`,label:e})),Bx=[`@charset`,`@color-profile`,`@container`,`@counter-style`,`@font-face`,`@font-feature-values`,`@font-palette-values`,`@import`,`@keyframes`,`@layer`,`@media`,`@namespace`,`@page`,`@position-try`,`@property`,`@scope`,`@starting-style`,`@supports`,`@view-transition`].map(e=>({type:`keyword`,label:e})),Vx=/^(\w[\w-]*|-\w[\w-]*|)$/,Hx=/^-(-[\w-]*)?$/;function Ux(e,t){if((e.name==`(`||e.type.isError)&&(e=e.parent||e),e.name!=`ArgList`)return!1;let n=e.parent?.firstChild;return n?.name==`Callee`&&t.sliceString(n.from,n.to)==`var`}var Wx=new Ed,Gx=[`Declaration`];function Kx(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function qx(e,t,n){if(t.to-t.from>4096){let r=Wx.get(t);if(r)return r;let i=[],a=new Set,o=t.cursor(ad.IncludeAnonymous);if(o.firstChild())do for(let t of qx(e,o.node,n))a.has(t.label)||(a.add(t.label),i.push(t));while(o.nextSibling());return Wx.set(t,i),i}{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(Gx)&&t.node.nextSibling?.name==`:`){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:`variable`}))}}),r}}var Jx=(e=>t=>{let{state:n,pos:r}=t,i=xf(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)==`-`;if(i.name==`PropertyName`||(a||i.name==`TagName`)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Ix(),validFor:Vx};if(i.name==`ValueName`)return{from:i.from,options:Rx,validFor:Vx};if(i.name==`PseudoClassName`)return{from:i.from,options:Lx,validFor:Vx};if(e(i)||(t.explicit||a)&&Ux(i,n.doc))return{from:e(i)||a?i.from:r,options:qx(n.doc,Kx(i),e),validFor:Hx};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:Ix(),validFor:Vx};return{from:i.from,options:zx,validFor:Vx}}if(i.name==`AtKeyword`)return{from:i.from,options:Bx,validFor:Vx};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:Lx,validFor:Vx}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:Rx,validFor:Vx}:o.name==`Block`||o.name==`Styles`?{from:r,options:Ix(),validFor:Vx}:null})(e=>e.name==`VariableName`),Yx=bf.define({name:`css`,parser:Px.configure({props:[Bf.add({Declaration:Qf()}),ep.add({"Block KeyframeList":tp})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function Xx(){return new Nf(Yx,Yx.data.of({autocomplete:Jx}))}var Zx=316,Qx=317,$x=1,eS=2,tS=3,nS=4,rS=318,iS=320,aS=321,oS=5,sS=6,cS=0,lS=[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],uS=125,dS=59,fS=47,pS=42,mS=43,hS=45,gS=60,_S=44,vS=63,yS=46,bS=91,xS=new Ry({start:!1,shift(e,t){return t==oS||t==sS||t==iS?e:t==aS},strict:!1}),SS=new Ty((e,t)=>{let{next:n}=e;(n==uS||n==-1||t.context)&&e.acceptToken(rS)},{contextual:!0,fallback:!0}),CS=new Ty((e,t)=>{let{next:n}=e,r;lS.indexOf(n)>-1||(n!=fS||(r=e.peek(1))!=fS&&r!=pS)&&n!=uS&&n!=dS&&n!=-1&&!t.context&&e.acceptToken(Zx)},{contextual:!0}),wS=new Ty((e,t)=>{e.next==bS&&!t.context&&e.acceptToken(Qx)},{contextual:!0}),TS=new Ty((e,t)=>{let{next:n}=e;if(n==mS||n==hS){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift($x);e.acceptToken(n?$x:eS)}}else n==vS&&e.peek(1)==yS&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(tS))},{contextual:!0});function ES(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var DS=new Ty((e,t)=>{if(e.next!=gS||!t.dialectEnabled(cS)||(e.advance(),e.next==fS))return;let n=0;for(;lS.indexOf(e.next)>-1;)e.advance(),n++;if(ES(e.next,!0)){for(e.advance(),n++;ES(e.next,!1);)e.advance(),n++;for(;lS.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==_S)return;for(let t=0;;t++){if(t==7){if(!ES(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(nS,-n)}),OS=Xd({"get set async static":R.modifier,"for while do if else switch try catch finally return throw break continue default case defer":R.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":R.operatorKeyword,"let var const using function class extends":R.definitionKeyword,"import export from":R.moduleKeyword,"with debugger new":R.keyword,TemplateString:R.special(R.string),super:R.atom,BooleanLiteral:R.bool,this:R.self,null:R.null,Star:R.modifier,VariableName:R.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":R.function(R.variableName),VariableDefinition:R.definition(R.variableName),Label:R.labelName,PropertyName:R.propertyName,PrivatePropertyName:R.special(R.propertyName),"CallExpression/MemberExpression/PropertyName":R.function(R.propertyName),"FunctionDeclaration/VariableDefinition":R.function(R.definition(R.variableName)),"ClassDeclaration/VariableDefinition":R.definition(R.className),"NewExpression/VariableName":R.className,PropertyDefinition:R.definition(R.propertyName),PrivatePropertyDefinition:R.definition(R.special(R.propertyName)),UpdateOp:R.updateOperator,"LineComment Hashbang":R.lineComment,BlockComment:R.blockComment,Number:R.number,String:R.string,Escape:R.escape,ArithOp:R.arithmeticOperator,LogicOp:R.logicOperator,BitOp:R.bitwiseOperator,CompareOp:R.compareOperator,RegExp:R.regexp,Equals:R.definitionOperator,Arrow:R.function(R.punctuation),": Spread":R.punctuation,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace,"InterpolationStart InterpolationEnd":R.special(R.brace),".":R.derefOperator,", ;":R.separator,"@":R.meta,TypeName:R.typeName,TypeDefinition:R.definition(R.typeName),"type enum interface implements namespace module declare":R.definitionKeyword,"abstract global Privacy readonly override":R.modifier,"is keyof unique infer asserts":R.operatorKeyword,JSXAttributeValue:R.attributeValue,JSXText:R.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":R.angleBracket,"JSXIdentifier JSXNameSpacedName":R.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":R.attributeName,"JSXBuiltin/JSXIdentifier":R.standard(R.tagName)}),kS={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},AS={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},jS={__proto__:null,"<":193},MS=zy.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ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ames:`⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:380,context:xS,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,`Expression`,-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,`Type`,-3,88,103,109,`ClassItem`],[`openedBy`,23,`<`,38,`InterpolationStart`,56,`[`,60,`{`,73,`(`,160,`JSXStartCloseTag`],[`closedBy`,-2,24,168,`>`,40,`InterpolationEnd`,50,`]`,61,`}`,74,`)`,165,`JSXEndTag`]],propSources:[OS],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_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oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[CS,wS,TS,DS,2,3,4,5,6,7,8,9,10,11,12,13,14,SS,new wy("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new wy(`j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~`,25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>kS[e]||-1},{term:343,get:e=>AS[e]||-1},{term:95,get:e=>jS[e]||-1}],tokenPrec:15201}),NS=[Kv("function ${name}(${params}) {\n ${}\n}",{label:`function`,detail:`definition`,type:`keyword`}),Kv("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:`for`,detail:`loop`,type:`keyword`}),Kv("for (let ${name} of ${collection}) {\n ${}\n}",{label:`for`,detail:`of loop`,type:`keyword`}),Kv(`do {
4 +`,this;e--}else if(r instanceof Vn){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Vn?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},qn=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new Kn(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),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!=``}},Jn=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(Bn.prototype[Symbol.iterator]=function(){return this.iter()},Kn.prototype[Symbol.iterator]=qn.prototype[Symbol.iterator]=Jn.prototype[Symbol.iterator]=function(){return this});var Yn=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function Xn(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function Zn(e,t,n=!0,r=!0){return Nn(e,t,n,r)}function Qn(e){return e>=56320&&e<57344}function $n(e){return e>=55296&&e<56320}function er(e,t){let n=e.charCodeAt(t);if(!$n(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Qn(r)?(n-55296<<10)+(r-56320)+65536:n}function tr(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function nr(e){return e<65536?1:2}var rr=/\r\n?|\n/,ir=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(ir||={}),ar=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){lr(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:dr(this,e)}mapDesc(e,t=!1){return e.empty?this:ur(this,e,t)}mapPos(e,t=-1,n=ir.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=ir.Simple&&c>=e&&(n==ir.TrackDel&&r<e&&c>e||n==ir.TrackBefore&&r<e||n==ir.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},or=class e extends ar{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return lr(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return ur(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(Bn.empty);r.push(a?t.slice(i,i+a):Bn.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:dr(this,e,!0)}map(e,t=!1){return e.empty?this:ur(this,e,t,!0)}iterChanges(e,t=!1){lr(this,e,t)}get desc(){return ar.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new fr(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);sr(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;sr(n,e,t),t>0&&cr(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);sr(n,e,-1),sr(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:ar.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&sr(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?Bn.of(l.split(r||rr)):l:Bn.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&sr(i,e-o,-1),sr(i,s-e,d),cr(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(Bn.empty);r[e]=Bn.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function sr(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function cr(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Bn.empty);e.push(n)}}function lr(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=Bn.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function ur(e,t,n,r=!1){let i=[],a=r?[]:null,o=new fr(e),s=new fr(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);sr(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(sr(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(sr(i,0,o.ins),a&&cr(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;sr(i,t,e<o.i?o.ins:0),a&&e<o.i&&cr(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?or.createSet(i,a):ar.create(i);else throw Error(`Mismatched change set lengths`)}function dr(e,t,n=!1){let r=[],i=n?[]:null,a=new fr(e),o=new fr(t);for(let e=!1;;)if(a.done&&o.done)return i?or.createSet(r,i):ar.create(r);else if(a.ins==0)sr(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)sr(r,0,o.ins,e),i&&cr(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;sr(r,t,n,e),i&&n&&cr(i,r,o.text)}else o.ins==-1?(sr(r,a.off?0:a.len,t,e),i&&cr(i,r,a.textBit(t))):(sr(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&cr(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var fr=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Bn.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Bn.empty:t[n].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)}},pr=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return N.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return N.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return N.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},N=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>pr.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return pr.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?pr.create(t,e,a|32,n):pr.create(e,t,a,n)}static undirectionalRange(e,t){return pr.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function mr(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var hr=0,P=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=hr++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:gr),!!t.static,t.enables)}of(e){return new _r([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new _r(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new _r(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function gr(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var _r=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=hr++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||yr(e,c)){let r=t(e);if(a?!vr(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Mr(o,c);if(this.dependencies.every(t=>t instanceof P?o.facet(t)===e.facet(t):t instanceof Sr?o.field(t,!1)==e.field(t,!1):!0)||(a?vr(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function vr(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function yr(e,t){let n=!1;for(let r of t)jr(e,r)&1&&(n=!0);return n}function br(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=Mr(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)jr(e,t);return e.values[o]=s(e),1},update(e,n){if(!yr(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=yr(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&gr(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var xr=P.define({static:!0}),Sr=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(hr++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(xr).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(xr),i=n.facet(xr),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,xr.of({field:this,create:e})]}get extension(){return this}},Cr={lowest:4,low:3,default:2,high:1,highest:0};function wr(e){return t=>new Er(t,e)}var Tr={highest:wr(Cr.highest),high:wr(Cr.high),default:wr(Cr.default),low:wr(Cr.low),lowest:wr(Cr.lowest)},Er=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},Dr=class e{of(e){return new Or(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Or=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},kr=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of Ar(t,n,o))e instanceof Sr?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,gr(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>br(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function Ar(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Or&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Or){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof Er)a(e.inner,e.prec);else if(e instanceof Sr)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof _r)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,Cr.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,Cr.default),r.reduce((e,t)=>e.concat(t))}function jr(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Mr(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var Nr=P.define(),Pr=P.define({combine:e=>e.some(e=>e),static:!0}),Fr=P.define({combine:e=>e.length?e[0]:void 0,static:!0}),Ir=P.define(),Lr=P.define(),Rr=P.define(),zr=P.define({combine:e=>e.length?e[0]:!1}),Br=class{constructor(e,t){this.type=e,this.value=t}static define(){return new Vr}},Vr=class{of(e){return new Br(this,e)}},Hr=class{constructor(e){this.map=e}of(e){return new Ur(this,e)}},Ur=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Hr(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};Ur.reconfigure=Ur.define(),Ur.appendConfig=Ur.define();var Wr=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&mr(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};Wr.time=Br.define(),Wr.userEvent=Br.define(),Wr.addToHistory=Br.define(),Wr.remote=Br.define();function Gr(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function Kr(e,t,n){let r,i,a;return n?(r=t.changes,i=or.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:Ur.mapEffects(e.effects,r).concat(Ur.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function qr(e,t,n){let r=t.selection,i=Qr(t.annotations);return t.userEvent&&(i=i.concat(Wr.userEvent.of(t.userEvent))),{changes:t.changes instanceof or?t.changes:or.of(t.changes||[],n,e.facet(Fr)),selection:r&&(r instanceof N?r:N.single(r.anchor,r.head)),effects:Qr(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function Jr(e,t,n){let r=qr(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=Kr(r,qr(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=Wr.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Xr(n?Yr(i):i)}function Yr(e){let t=e.startState,n=!0;for(let r of t.facet(Ir)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:Gr(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=or.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=Wr.create(t,r,e.selection&&e.selection.map(i),Ur.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Lr);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof Wr?i:Array.isArray(i)&&i.length==1&&i[0]instanceof Wr?i[0]:Jr(t,Qr(i),!1)}return e}function Xr(e){let t=e.startState,n=t.facet(Rr),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=Kr(r,qr(t,a,e.changes.newLength),!0))}return r==e?e:Wr.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var Zr=[];function Qr(e){return e==null?Zr:Array.isArray(e)?e:[e]}var $r=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})($r||={}),ei=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ti;try{ti=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function ni(e){if(ti)return ti.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>`€`&&(n.toUpperCase()!=n.toLowerCase()||ei.test(n)))return!0}return!1}function ri(e){return t=>{if(!/\S/.test(t))return $r.Space;if(ni(t))return $r.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return $r.Word;return $r.Other}}var ii=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)jr(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return jr(this,n),Mr(this,n)}update(...e){return Jr(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Dr.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(Ur.reconfigure)?(n=null,r=e.value):e.is(Ur.appendConfig)&&(n=null,r=Qr(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=kr.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Pr)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:N.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=Qr(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=Ur.mapEffects(a,c).concat(Ur.mapEffects(Qr(o.effects),l))}return{changes:r,selection:N.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof or?t:or.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return Bn.of(t.split(this.facet(e.lineSeparator)||rr))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(jr(this,t),Mr(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof Sr&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:N.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=kr.resolve(t.extensions||[],new Map),r=t.doc instanceof Bn?t.doc:Bn.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||rr)),i=t.selection?t.selection instanceof N?t.selection:N.single(t.selection.anchor,t.selection.head):N.single(0);return mr(i,r.length),n.staticFacet(Pr)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
5 +`}get readOnly(){return this.facet(zr)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Nr))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return ri(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=Zn(t,a,!1);if(i(t.slice(e,a))!=$r.Word)break;a=e}for(;o<r;){let e=Zn(t,o);if(i(t.slice(o,e))!=$r.Word)break;o=e}return a==o?null:N.range(a+n,o+n)}};ii.allowMultipleSelections=Pr,ii.tabSize=P.define({combine:e=>e.length?e[0]:4}),ii.lineSeparator=Fr,ii.readOnly=zr,ii.phrases=P.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),ii.languageData=Nr,ii.changeFilter=Ir,ii.transactionFilter=Lr,ii.transactionExtender=Rr,Dr.reconfigure=Ur.define();function ai(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(a!==i&&i!==void 0){if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var oi=class{eq(e){return this==e}range(e,t=e){return ci.create(e,t,this)}};oi.prototype.startSide=oi.prototype.endSide=0,oi.prototype.point=!1,oi.prototype.mapMode=ir.TrackDel;function si(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var ci=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function li(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var ui=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return fi(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n,r,i,a){let o=[],s=[],c=[],l=-1,u=-1;iter:for(let e=0;e<this.value.length;e++){let d=this.value[e],f=this.from[e]+t,p=this.to[e]+t,m,h;if(f==p){let e=n.mapPos(f,d.startSide,d.mapMode);if(e==null||(m=h=e,d.startSide!=d.endSide&&(h=n.mapPos(f,d.endSide),h<m)))continue}else if(m=n.mapPos(f,d.startSide),h=n.mapPos(p,d.endSide),m>h||m==h&&d.startSide>0&&d.endSide<=0)continue;if(!((h-m||d.endSide-d.startSide)<0)){if(l<0&&(l=m),d.point&&(u=Math.max(u,h-m)),(m-r||d.startSide-i)>=0)o.push(d),s.push(m-l),c.push(h-l),r=h,i=d.endSide;else{if(m==h)for(let e=o.length;e>0;e--){if((m-(c[e-1]+l)||d.startSide-o[e-1].endSide)>=0){o.splice(e,0,d),s.splice(e,0,m-l),c.splice(e,0,h-l);continue iter}if((m-(s[e-1]+l)||d.endSide-o[e-1].startSide)>0)break}a(m,h,d)}}}return{mapped:o.length?new e(s,c,o,u):null,pos:l}}},di=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(li)),this.isEmpty)return n.length?e.of(n):this;let s=new gi(this,null,-1).goto(0),c=0,l=[],u=new mi;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value,!1)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value,!1)||l.push(ci.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1,a,o=(e,t,n)=>{a||=new mi,a.addRange(e,t,n,!1)};for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],s=this.chunk[e],c=t.touchesRange(a,a+s.length);if(c===!1)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(c===!0){let[e,c]=n.length?[fi(r)+fi(n).length,fi(fi(n).value).endSide]:[-1,-1],{mapped:l,pos:u}=s.map(a,t,e,c,o);l&&(i=Math.max(i,l.maxPoint),n.push(l),r.push(u))}}let s=this.nextLayer.map(t);return a&&(s=a.finishInner(s)),n.length==0?s:new e(r,n,s||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return _i.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return _i.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=hi(a,o,n),c=new yi(a,s,i),l=new yi(o,s,i);n.iterGaps((e,t,n)=>bi(c,e,l,t,n,r)),n.empty&&n.length==0&&bi(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=1e9-1;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=hi(i,a),s=new yi(i,o,0).goto(n),c=new yi(a,o,0).goto(n);for(;;){if(s.to!=c.to||!xi(s.active,c.active)||s.point&&(!c.point||!si(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new yi(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new mi;for(let r of e instanceof ci?[e]:t?pi(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=fi(t);for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};di.empty=new di([],[],null,-1);function fi(e){return e[e.length-1]}function pi(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(li(t,r)>0)return e.slice().sort(li);t=r}return e}di.empty.nextLayer=di.empty;var mi=class e{finishChunk(e){this.chunks.push(new ui(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(t,n,r,i){this.addInner(t,n,r,i)||(this.nextLayer||=new e).addRange(t,n,r,i)}addInner(e,t,n,r){let i=e-this.lastTo||n.startSide-this.last.endSide;if(r&&i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(di.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=di.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function hi(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var gi=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},_i=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new gi(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)vi(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)vi(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),vi(this.heap,0)}}};function vi(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var yi=class{constructor(e,t,n){this.minPoint=n,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=_i.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Si(this.active,e),Si(this.activeTo,e),Si(this.activeRank,e),this.minActive=wi(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;Ci(this.active,t,n),Ci(this.activeTo,t,r),Ci(this.activeRank,t,i),e&&Ci(e,t,this.cursor.from),this.minActive=wi(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&Si(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function bi(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&si(e.point,n.point)&&xi(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&=(a.boundChange(s),!1),d>s&&!xi(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function xi(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!si(e[n],t[n]))return!1;return!0}function Si(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function Ci(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function wi(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Ti(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=Zn(e,i));return r}function Ei(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=Zn(e,r)}return r===!0?-1:e.length}for(var Di=`ͼ`,Oi=typeof Symbol>`u`?`__ͼ`:Symbol.for(Di),ki=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),Ai=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},ji=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
6 +`)}static newName(){let e=Ai[Oi]||1;return Ai[Oi]=e+1,Di+e.toString(36)}static mount(e,t,n){let r=e[ki],i=n&&n.nonce;r?i&&r.setNonce(i):r=new Ni(e,i),r.mount(Array.isArray(t)?t:[t],e)}},Mi=new Map,Ni=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=Mi.get(n);if(t)return e[ki]=t;this.sheet=new r.CSSStyleSheet,Mi.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[ki]=this}mount(e,t){let n=this.sheet,r=0,i=0,a=!1;for(let t=0;t<e.length;t++){let o=e[t],s=this.modules.indexOf(o);if(s<i&&s>-1&&(this.modules.splice(s,1),a=!0,i--,s=-1),s==-1){if(this.modules.splice(i++,0,o),a=!0,n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],r++)}else{for(;i<s;)r+=this.modules[i++].rules.length;r+=o.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{if(a){let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
7 +`;this.styleTag.textContent=e}let e=t.head||t;this.styleTag.parentNode!=e&&e.insertBefore(this.styleTag,e.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},Pi={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:`'`},Fi={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},Ii=typeof navigator<`u`&&/Mac/.test(navigator.platform),Li=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ri=0;Ri<10;Ri++)Pi[48+Ri]=Pi[96+Ri]=String(Ri);for(var Ri=1;Ri<=24;Ri++)Pi[Ri+111]=`F`+Ri;for(var Ri=65;Ri<=90;Ri++)Pi[Ri]=String.fromCharCode(Ri+32),Fi[Ri]=String.fromCharCode(Ri);for(var zi in Pi)Fi.hasOwnProperty(zi)||(Fi[zi]=Pi[zi]);function Bi(e){var t=!(Ii&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Li&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?Fi:Pi)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}function Vi(){var e=arguments[0];typeof e==`string`&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n==`object`&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i==`string`?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t<arguments.length;t++)Hi(e,arguments[t]);return e}function Hi(e,t){if(typeof t==`string`)e.appendChild(document.createTextNode(t));else if(t!=null){if(t.nodeType!=null)e.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)Hi(e,t[n]);else throw RangeError(`Unsupported child node: `+t)}}var Ui=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},Wi=typeof document<`u`?document:{documentElement:{style:{}}},Gi=/Edge\/(\d+)/.exec(Ui.userAgent),Ki=/MSIE \d/.test(Ui.userAgent),qi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ui.userAgent),Ji=!!(Ki||qi||Gi),Yi=!Ji&&/gecko\/(\d+)/i.test(Ui.userAgent),Xi=!Ji&&/Chrome\/(\d+)/.exec(Ui.userAgent),Zi=`webkitFontSmoothing`in Wi.documentElement.style,Qi=!Ji&&/Apple Computer/.test(Ui.vendor),$i=Qi&&(/Mobile\/\w+/.test(Ui.userAgent)||Ui.maxTouchPoints>2),F={mac:$i||/Mac/.test(Ui.platform),windows:/Win/.test(Ui.platform),linux:/Linux|X11/.test(Ui.platform),ie:Ji,ie_version:Ki?Wi.documentMode||6:qi?+qi[1]:Gi?+Gi[1]:0,gecko:Yi,gecko_version:Yi?+(/Firefox\/(\d+)/.exec(Ui.userAgent)||[0,0])[1]:0,chrome:!!Xi,chrome_version:Xi?+Xi[1]:0,ios:$i,android:/Android\b/.test(Ui.userAgent),webkit:Zi,webkit_version:Zi?+(/\bAppleWebKit\/(\d+)/.exec(Ui.userAgent)||[0,0])[1]:0,safari:Qi,safari_version:Qi?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Ui.userAgent)||[0,0])[1]:0,tabSize:Wi.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function ea(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var ta=Object.create(null);function na(e,t,n){if(e==t)return!0;e||=ta,t||=ta;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function ra(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function ia(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function aa(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var oa=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},sa=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(sa||={}),ca=class extends oi{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new la(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new da(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=fa(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new da(e,n,r,t,e.widget||null,!0)}static line(e){return new ua(e)}static set(e,t=!1){return di.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};ca.none=di.empty;var la=class e extends ca{constructor(e){let{start:t,end:n}=fa(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?ea(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||ta}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&na(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};la.prototype.point=!1;var ua=class e extends ca{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&na(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};ua.prototype.mapMode=ir.TrackBefore,ua.prototype.point=!0;var da=class e extends ca{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?ir.TrackBefore:ir.TrackAfter:ir.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?sa.WidgetBefore:sa.WidgetAfter:sa.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&pa(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};da.prototype.point=!0;function fa(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function pa(e,t){return e==t||!!(e&&t&&e.compare(t))}function ma(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var ha=class e extends oi{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&na(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||ta,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return di.of(e,t)}};ha.prototype.startSide=ha.prototype.endSide=-1;function ga(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function _a(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function va(e,t){if(!t.anchorNode)return!1;try{return _a(e,t.anchorNode)}catch{return!1}}function ya(e){return e.nodeType==3?Ia(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function ba(e,t,n,r){return n?Ca(e,t,n,r,-1)||Ca(e,t,n,r,1):!1}function xa(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function Sa(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function Ca(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:wa(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=xa(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?wa(e):0}else return!1}}function wa(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ta(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function Ea(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Da(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Oa(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=Ea(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=Da(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top+o?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left+a?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right-a&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g){if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function ka(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var Aa=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?wa(t):0),n,Math.min(e.focusOffset,n?wa(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}};function ja(e){let t=[];for(let n=e;n;n=n.nodeType==11?n.host:n.parentNode)n.nodeType==1&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function Ma(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}var Na=null;F.safari&&F.safari_version>=26&&(Na=!1);function Pa(e){if(e.setActive)return e.setActive();if(Na)return e.focus(Na);let t=ja(e);e.focus(Na==null?{get preventScroll(){return Na={preventScroll:!0},!0}}:void 0),Na||(Na=!1,Ma(t))}var Fa;function Ia(e,t,n=t){let r=Fa||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function La(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function Ra(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function za(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,wa(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=wa(n))}else if(n==e)return!0;else r=xa(n),n=n.parentNode}function Ba(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function Va(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=wa(n)}else if(n.parentNode&&!Sa(n))r=xa(n),n=n.parentNode;else return null}function Ha(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Sa(n))r=xa(n)+1,n=n.parentNode;else return null}var Ua=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,xa(t),n)}static after(t,n){return new e(t.parentNode,xa(t)+1,n)}},Wa=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(Wa||={}),Ga=Wa.LTR,Ka=Wa.RTL;function qa(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var Ja=qa(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),Ya=qa(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),Xa=Object.create(null),Za=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Xa[t]=n,Xa[n]=-t}function Qa(e){return e<=247?Ja[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?Ya[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var $a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,eo=class{get dir(){return this.level%2?Ka:Ga}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function to(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!to(r.inner,i.inner))return!1}return!0}var no=[];function ro(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=Qa(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),no[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=no[e];if(i==128)e<s-1&&t==no[e+1]&&t&24?i=no[e]=t:no[e]=256;else if(i==64){let i=e+1;for(;i<s&&no[i]==64;)i++;let a=e&&t==8||i<n&&no[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)no[t]=a;e=i-1}else i==8&&r==1&&(no[e]=1);t=i,i&7&&(r=i)}}}function io(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=Xa[n=e.charCodeAt(t)]){if(r<0){for(let e=s-3;e>=0;e-=3)if(Za[e+1]==-r){let n=Za[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(no[t]=no[Za[e]]=r),s=e;break}}else if(Za.length==189)break;else Za[s++]=t,Za[s++]=n,Za[s++]=c}else if((o=no[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=Za[t+2];if(n&2)break;if(e)Za[t+2]|=2;else{if(n&4)break;Za[t+2]|=4}}}}}function ao(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=no[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(no[o]==256)o++;else break;let l=a==1,u=l==((o<t?no[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),no[--t]=u;c=o}else a=o,c++}}}function oo(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=no[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(no[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new eo(c,m.from,f)),so(e,m.direction==Ga==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?no[p]!=s:no[p]==s))break;else p++;d?oo(e,c,p,r+1,i,d,o):c<p&&o.push(new eo(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=no[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(no[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new eo(m.to,c,f)),so(e,m.direction==Ga==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?no[p-1]!=s:no[p-1]==s))break;else p--;d?oo(e,p,c,r+1,i,d,o):p<c&&o.push(new eo(p,c,f)),c=p}}function so(e,t,n,r,i,a,o){let s=t%2?2:1;ro(e,i,a,r,s),io(e,i,a,r,s),ao(i,a,r,s),oo(e,i,a,t,n,r,o)}function co(e,t,n){if(!e)return[new eo(0,0,+(t==Ka))];if(t==Ga&&!n.length&&!$a.test(e))return lo(e.length);if(n.length)for(;e.length>no.length;)no[no.length]=256;let r=[],i=t==Ga?0:1;return so(e,i,i,n,0,e.length,r),r}function lo(e){return[new eo(0,e,0)]}var uo=``;function fo(e,t,n,r,i){if(!e.length)return null;let a=r.head-e.from,o;if(r.head==e.from&&r.assoc<0){if(!i)return null;a=t[o=0].side(!1,n)}else if(r.head==e.to&&r.assoc>0){if(i)return null;a=t[o=t.length-1].side(!0,n)}else o=eo.find(t,a,r.bidiLevel??-1,r.assoc);let s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=Zn(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),uo=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];if(l==c){if(!u)return i?N.cursor(e.to,1):N.cursor(e.from,-1);if(u.level+ +!i<s.level)return N.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level)}return N.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function po(e,t,n){for(let r=t;r<n;r++){let t=Qa(e.charCodeAt(r));if(t==1)return Ga;if(t==2||t==4)return Ka}return Ga}var mo=P.define(),ho=P.define(),go=P.define(),_o=P.define(),vo=P.define(),yo=P.define(),bo=P.define(),xo=P.define(),So=P.define(),Co=P.define({combine:e=>e.some(e=>e)}),wo=P.define({combine:e=>e.some(e=>e)}),To=P.define(),Eo=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(N.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Do=Ur.define({map:(e,t)=>e.map(t)}),Oo=Ur.define();function ko(e,t,n){let r=e.facet(_o);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var Ao=P.define({combine:e=>!e.length||e[0]}),jo=0,Mo=P.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),No=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(Mo.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Mo.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(jo++,t,r,i,e=>{let t=[];return o&&t.push(Lo.of(t=>{let n=t.plugin(e);return n?o(n):ca.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},Po=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){ko(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(ko(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){ko(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},Fo=P.define(),Io=P.define(),Lo=P.define(),Ro=P.define(),zo=P.define(),Bo=P.define(),Vo=P.define();function Ho(e,t){let n=e.state.facet(Vo);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return di.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=po(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var Uo=P.define();function Wo(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(Uo)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var Go=P.define(),Ko=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},qo=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=or.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new Ko(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Jo=[],Yo=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Jo}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&ra(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=xa(this.dom),r=this.length?e>0:t>0;return new Ua(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Qo)return e;return null}static get(e){return e.cmTile}},Xo=class extends Yo{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=Zo(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=Zo(r);this.length=a}};function Zo(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var Qo=class extends Xo{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=Yo.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof $o)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},$o=class e extends Xo{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},es=class e extends Xo{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0&&!(a.flags&32)||n&&ns(a,d)))&&(f>c||d.flags&32&&t<=1)?(a=d,o=c-u):(u<c||d.flags&16&&!d.isHidden&&t>=-1)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):ts(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new Ua(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new Ua(e.dom,0);e==n.tile&&(a=!0)}}return new Ua(this.dom,0)}};function ts(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=ya(t);return n[n.length-1]||null}function ns(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var rs=class e extends Xo{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},is=class e extends Yo{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?F.chrome||F.gecko||(e?(i--,o=1):a<r&&(a++,o=-1)):t<0?i--:a<r&&a++;let s=Ia(this.dom,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:t>=0)?0:s.length-1];return F.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:Ta(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},as=class e extends Yo{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return Ta(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return Ta(n,!r)}}get overrideDOMText(){if(!this.length)return Bn.empty;let{root:e}=this;if(!e)return Bn.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},os=class extends Yo{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Bn.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:Ta(r,t>0==n)}},ss=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){let t=r.length;if(i<t&&e){let a=Math.min(e,t-i);n&&n.skip(r,i,i+a),e-=a,i+=a}if(i==t)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(!e)break}else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},cs=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},ls=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new is(a.dom,a.text+e);t.parent=i}else i.append(r||is.of(e,this.cache.find(is)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?ys(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof rs&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(ys(n.dom)),r=i;else{let{dom:e}=n;this.cache.reused.get(n)&&Yo.get(n.dom)&&(e=ys(n.dom));let t=rs.of(n.mark,e);r.append(t),r=t}this.cache.reused.set(n,2)}let i=Yo.get(e.text);i&&this.cache.reused.set(i,2);let a=new is(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=gs;let n=es.start(e,t||this.cache.find(es)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof rs&&a.mark.eq(i))n=a,t--;else{let e=rs.of(i,this.cache.find(rs,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!ms(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(F.ios&&ms(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(xs,0,32)||new as(xs.toDOM(),0,xs,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new cs(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof $o&&n.wrapper.eq(t.wrapper))e=n;else{let n=$o.of(t.wrapper,this.cache.find($o,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(os,void 0,1);return n&&(n.flags=t),n||new os(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},us=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},ds=[as,es,is,rs,os,$o,Qo];for(let e=0;e<ds.length;e++)ds[e].bucket=e;var fs=class{constructor(e){this.view=e,this.buckets=ds.map(()=>[]),this.index=ds.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e<i.length;e++){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new as(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},ps=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new fs(e),this.text=new us(e.state.doc),this.builder=new ls(this.cache,new Qo(e,e.contentDOM),di.iter(n)),this.cache.reused.set(t,2),this.old=new ss(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=vs(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget()){if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?as.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof os)this.cache.add(e);else if(e instanceof rs)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof rs&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof rs&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=di.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof da){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?bs.block:bs.inline),c=hs(a),l=this.cache.findWidget(i,t-e,c)||as.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=_s(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i<t;){let s=this.text.next(Math.min(512,t-i));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(s,a,i==e?o:a.length),i+=s.length),n=null}i=a.length}});i>-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=Yo.get(r);if(r==this.view.contentDOM)break;e instanceof rs?t.push(e):e?.isLine()?n=e:e instanceof $o||(r.nodeName==`DIV`&&!n?n=new es(r,gs):n||t.push(rs.of(new la({tagName:r.nodeName.toLowerCase(),attributes:aa(r)}),r)))}return n?{line:n,marks:t}:null}};function ms(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function hs(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var gs={class:`cm-line`};function _s(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&ea(n,e),r&&(e.class+=` `+r),e)}function vs(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof rs&&t.push(r.mark)}return t}function ys(e){let t=Yo.get(e);return t&&t.setDOM(e.cloneNode()),e}var bs=class extends oa{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};bs.inline=new bs(`span`),bs.block=new bs(`div`);var xs=new class extends oa{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},Ss=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=ca.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Qo(e,e.contentDOM),this.updateInner([new Ko(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!Ns(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?Es(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new Ko(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(F.ie||F.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=ks(i,this.decorations,e.changes);o.length&&(t=Ko.extendWithRanges(t,o));let s=js(a,this.blockWrappers,e.changes);return s.length&&(t=Ko.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new ps(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&Yo.get(t.text)&&r.cache.reused.set(Yo.get(t.text),2),this.tile=r.run(e,t),Cs(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=F.chrome||F.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof Ps&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(Oo)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Ao)||n.tabIndex>-1)&&va(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),F.gecko&&s.empty&&!this.hasComposition&&ws(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new Ua(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!ba(c.node,c.offset,u.anchorNode,u.anchorOffset)||!ba(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{F.android&&F.chrome&&n.contains(u.focusNode)&&Ms(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=ga(this.view.root);if(e){if(s.empty){if(F.gecko){let e=Ds(c.node,c.offset);if(e&&e!=3){let t=(e==1?Va:Ha)(c.node,c.offset);t&&(c=new Ua(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new Ua(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new Ua(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&ba(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=ga(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=wa(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!Yo.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof Ps?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=Zn(e.text,t);if(n==t)return null;let r=Ia(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==Wa.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof $o)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?ya(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?Wa.RTL:Wa.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=ya(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=ya(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(ca.replace({widget:new Ps(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return ca.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Lo).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(zo).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(di.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Ro).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(To))try{if(t(this.view,e.range,e))return!0}catch(e){ko(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=Wo(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(Oa(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==Wa.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=ja(e.dom);e.dom.scrollIntoView({block:`nearest`}),Ma(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Cs(this.tile)}};function Cs(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)Cs(n,t)}}function ws(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function Ts(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=Va(n.focusNode,n.focusOffset),i=Ha(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=Yo.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=Yo.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function Es(e,t,n){let r=Ts(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new Ko(c.mapPos(a),c.mapPos(o),a,o),text:i}}function Ds(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var Os=class{constructor(){this.changes=[]}compareRange(e,t){ma(e,t,this.changes)}comparePoint(e,t){ma(e,t,this.changes)}boundChange(e){ma(e,e,this.changes)}};function ks(e,t,n){let r=new Os;return di.compare(e,t,n,r),r.changes}var As=class{constructor(){this.changes=[]}compareRange(e,t){ma(e,t,this.changes)}comparePoint(){}boundChange(e){ma(e,e,this.changes)}};function js(e,t,n){let r=new As;return di.compare(e,t,n,r),r.changes}function Ms(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function Ns(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var Ps=class extends oa{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function Fs(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return N.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=Zn(i.text,a,!1):s=Zn(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=Zn(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=Zn(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return N.undirectionalRange(o+i.from,s+i.from)}function Is(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+Ei(o,a,e.state.tabSize)}function Ls(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==sa.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function Rs(e,t,n,r){let i=Ls(e,t.head,t.assoc||-1),a=!r||i.type!=sa.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==Wa.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return N.cursor(o,n?-1:1)}return N.cursor(n?i.to:i.from,n?-1:1)}function zs(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=fo(i,a,o,s,n),l=uo;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
8 +`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=n?N.cursor(i.from,-1):N.cursor(i.to,1)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function Bs(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==$r.Space&&(i=t),i==t}}function Vs(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return N.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=Ks(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return N.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return N.cursor(i.pos,i.assoc,void 0,o)}}function Hs(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function Us(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=Hs(e,i.from,0);t!=i.from&&(a=N.cursor(t,-1))}else{let t=Hs(e,i.from,-1),n=Hs(e,i.to,1);(t!=i.from||n!=i.to)&&(a=i.undirectional?N.undirectionalRange(i.from,i.to):N.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?N.create(n,t.mainIndex):t}function Ws(e,t,n){let r=Hs(e.state.facet(Bo).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:N.cursor(r,r<n.from?1:-1)}var Gs=class{constructor(e,t){this.pos=e,this.assoc=t}};function Ks(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new Gs(0,1);if(c>e.viewState.docHeight)return new Gs(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==sa.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==sa.Text){let t=Is(e,i,l,o,s);return new Gs(t,t==l.from?1:-1)}}if(l.type!=sa.Text)return c<(l.top+l.bottom)/2?new Gs(l.from,1):new Gs(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new qs(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var qs=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[eo.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[eo.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,i=e.length-1,a=new Set,o=this.bidiIn(e[0],e[i]),s,c,l=-1,u=1e9,d;search:for(;r<i;){let n=i-r,f=r+i>>1;adjust:if(a.has(f)){for(let e=1;e<n;e++){let t=f+e;if(t>=i&&(t-=n),!a.has(t)){f=t;break adjust}}break search}a.add(f);let p=t(f),m=0;if(p)for(let e=0;e<p.length;e++){let t=p[e];if(!(t.width==0&&p.length>1)){if(t.bottom<this.y)(!s||s.bottom<t.bottom)&&(s=t),m=1;else if(t.top>this.y)(!c||c.top>t.top)&&(c=t),m=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,n=Math.abs(e);n<u&&(l=f,u=n,d=t),e&&(m=e<0==(this.baseDir==Wa.LTR)?-1:1)}}}m==-1&&(!o||this.baseDirAt(e[f],1))?i=f:m==1&&(!o||this.baseDirAt(e[f+1],-1))&&(r=f+1)}if(!d){if(!c&&!s)return{i:0,after:!1};let n=s&&(!c||this.y-s.bottom<c.top-this.y)?s:c;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:r}=d;if(s&&s.bottom>(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==Wa.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=Zn(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return Ia(e.dom,i,a).getClientRects()});return r.after?new Gs(n[r.i+1],-1):new Gs(n[r.i],1)}scanTile(e,t){if(!e.length)return new Gs(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:Ia(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Gs(n[r.i+1],-1):new Gs(a,1)}},Js=`￿`,Ys=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(ii.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Js}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=Yo.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=Yo.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:Sa(r))||Sa(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!Zs(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=Yo.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Xs(e,n.node,n.offset)?t:0))}};function Xs(e,t,n){for(;;){if(!t||n<wa(t))return!1;if(t==e)return!0;n=xa(t)+1,t=t.parentNode}}function Zs(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=Yo.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var Qs=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},$s=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=ec(e.docView.tile,t,n,0))){let t=i||a?[]:ac(e),n=new Ys(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=oc(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!_a(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!_a(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((F.ios||F.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(N.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=N.create([N.cursor(n,r)])}else this.newSel=N.single(r,n)}}};function ec(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return ec(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function tc(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||F.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,Js),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:Bn.of(t.text.slice(a.from-e,u).split(Js))}:(d=ic(l,t.text,s-e,c))&&(F.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==`￿￿`&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:Bn.of(t.text.slice(d.from,d.toB).split(Js))})}else r&&(!e.hasFocus&&i.facet(Ao)||sc(r,a))&&(r=null);if(!n&&!r)return!1;if((F.mac||F.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=N.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Bn.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:F.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
9 + `&&e.lineWrapping&&(r&&=N.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:Bn.of([` `])}),n)return nc(e,n,r,o);if(r&&!sc(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=Us(i.facet(Bo).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function nc(e,t,n,r=-1){if(F.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(F.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&La(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&La(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&La(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=rc(e,t,n);return e.state.facet(yo).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function rc(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=Hs(i.facet(Bo).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:N.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&Ts(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?N.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function ic(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function ac(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new Qs(n,r)),(i!=n||a!=r)&&t.push(new Qs(i,a))),t}function oc(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n<0||r<0?null:n==r?N.create([N.cursor(r+t,-1)]):N.single(n+t,r+t)}function sc(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var cc=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,F.safari&&e.contentDOM.addEventListener(`input`,()=>null),F.gecko&&Gc(e.contentDOM.ownerDocument)}handleEvent(e){Sc(this.view,e)&&!this.ignoreDuringComposition(e)&&(e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e))))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=dc(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&mc.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),F.android&&F.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(F.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(fc.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||pc.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};t.shiftKey&&F.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&lc(this.view.win)&&(t.shiftKey=!1);let n=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t};return setTimeout(()=>{this.pendingIOSKey==n&&this.flushIOSKey()},50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||this.view.observer.pendingRecords().length||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,La(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:F.safari&&!F.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function lc(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function uc(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){ko(n.state,e)}}}function dc(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(uc(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(uc(t.value,r))}}for(let e in Cc)n(e).handlers.push(Cc[e]);for(let e in wc)n(e).observers.push(wc[e]);return t}var fc=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],pc=`dthko`,mc=[16,17,18,20,91,92,224,225],hc=6;function gc(e){return Math.max(0,e)*.7+8}function _c(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var vc=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=ka(e.contentDOM),this.atoms=e.state.facet(Bo).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ii.allowMultipleSelections)&&yc(e,t),this.dragging=xc(e,t)&&Pc(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&_c(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=Wo(this.view);e.clientX-s.left<=r+hc?t=-gc(r-e.clientX):e.clientX+s.right>=a-hc&&(t=gc(e.clientX-a)),e.clientY-s.top<=i+hc?n=-gc(i-e.clientY):e.clientY+s.bottom>=o-hc&&(n=gc(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=Us(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function yc(e,t){let n=e.state.facet(mo);return n.length?n[0](t):F.mac?t.metaKey:t.ctrlKey}function bc(e,t){let n=e.state.facet(ho);return n.length?n[0](t):F.mac?!t.altKey:!t.ctrlKey}function xc(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=ga(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function Sc(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Yo.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var Cc=Object.create(null),wc=Object.create(null),Tc=F.ie&&F.ie_version<15||F.ios&&F.webkit_version<604;function Ec(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),Oc(e,n.value)},50)}function Dc(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function Oc(e,t){t=Dc(e.state,xo,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(Bc!=null&&n.selection.ranges.every(e=>e.empty)&&Bc==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:N.cursor(r.from+c.length,-1)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:N.cursor(e.from+t.length,-1)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}wc.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,F.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},wc.wheel=wc.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},Cc.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),wc.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},wc.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},wc.touchend=(e,t)=>{e.inputState.touchActive=!1},Cc.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(go))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=Fc(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new vc(e,t,n,r)),r&&e.observer.ignore(()=>{Pa(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function kc(e,t,n,r){if(r==1)return N.cursor(t,n);if(r==2)return Fs(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,N.undirectionalRange(a,o)}}var Ac=F.ie&&F.ie_version<=11,jc=null,Mc=0,Nc=0;function Pc(e){if(!Ac)return e.detail;let t=jc,n=Nc;return jc=e,Nc=Date.now(),Mc=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Mc+1)%3:1}function Fc(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=Pc(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=kc(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=kc(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?N.range(i,a,l.assoc):N.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=Ic(i,s.pos))?c:o?i.addRange(l):N.create([l])}}}function Ic(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return N.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}Cc.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=N.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,Dc(e.state,So,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},Cc.dragend=e=>(e.inputState.draggedContent=null,!1);function Lc(e,t,n,r){if(n=Dc(e.state,xo,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&bc(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}Cc.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&Lc(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData(`Text`);if(n)return Lc(e,t,n,!0),!0}return!1},Cc.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Tc?null:t.clipboardData;return n?(Oc(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(Ec(e),!1)};function Rc(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function zc(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:Dc(e,So,t.join(e.lineBreak)),ranges:n,linewise:r}}var Bc=null;Cc.copy=Cc.cut=(e,t)=>{if(!va(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=zc(e.state);if(!n&&!i)return!1;Bc=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=Tc?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(Rc(e,n),!1)};var Vc=Br.define();function Hc(e,t){let n=[];for(let r of e.facet(bo)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:Vc.of(!0)}):null}function Uc(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Hc(e.state,t);n?e.dispatch(n):e.update([])}},10)}wc.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Uc(e)},wc.blur=e=>{e.observer.clearSelectionRange(),Uc(e)},wc.compositionstart=wc.compositionupdate=e=>{if(!e.observer.editContext&&(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0)){let{main:t}=e.state.selection;!t.empty&&e.lineBlockAt(t.from).from!=e.lineBlockAt(t.to).from&&e.dispatch({changes:e.state.selection.ranges.filter(e=>!e.empty).map(e=>({from:e.from,to:e.to})),userEvent:`input`}),e.inputState.composing=0}},wc.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,F.chrome&&F.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},wc.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Cc.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return nc(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(F.chrome&&F.android&&(n=fc.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return F.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),F.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>wc.compositionend(e,t),20),!1};var Wc=new Set;function Gc(e){Wc.has(e)||(Wc.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var Kc=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],qc=!1;function Jc(){qc=!1}var Yc=class{constructor(e){this.lineWrapping=e,this.doc=Bn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Kc.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=Kc.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},Xc=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},Zc=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?sa.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof da?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},Qc=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(Qc||={}),$c=.001,el=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>$c&&(qc=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,Qc.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,Qc.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,Qc.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=ll.build(n.setDoc(a),e,l,u);i=tl(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new il(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r){if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break}else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=!1;return t[n-1]==null?(o=!0,n--):t[n]??(o=!0,r++),new ol(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function tl(e,t){return e==t?e:(e.constructor!=t.constructor&&(qc=!0),t)}el.prototype.size=1;var nl=ca.replace({}),rl=class extends el{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new Zc(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new Zc(r,0,n,this.spaceAbove,nl):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,Qc.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},il=class e extends rl{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new Zc(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof al&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof al?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):el.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},al=class e extends el{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new Zc(a.from,a.length,l,c,0)}{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new Zc(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==Qc.ByHeight)return this.blockAt(e,n,r,i);if(t==Qc.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new Zc(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new Zc(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new Zc(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return el.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=$c&&(s=-2);let c=new il(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=el.of(r);return(s<0||Math.abs(c.height-this.height)>=$c||Math.abs(s-this.heightMetrics(t,n).perLine)>=$c)&&(qc=!0),tl(this,c)}return(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}},ol=class extends el{constructor(e,t,n){super(e.length+ +!!t+n.length,e.height+n.height,+!!t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==Qc.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==Qc.ByPosNoHeight?Qc.ByPosNoHeight:Qc.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,Qc.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,Math.min(t,c.from-1),n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(Math.max(e,c.to+1),t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&sl(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),sl(i,e)}return el.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?el.of(this.break?[e,null,t]:[e,t]):(this.left=tl(this.left,e),this.right=tl(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function sl(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof al&&(r=e[t+1])instanceof al&&e.splice(t-1,3,new al(n.length+1+r.length))}var cl=5,ll=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof il?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new il(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new rl(a,r,n)):(a||i||r>=cl)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new il(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new al(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof il)return e;let t=new il(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof il)&&!this.isCovered?this.nodes.push(new il(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof il&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return di.spans(n,r,i,a,0),a.finish(r)}};function ul(e,t,n){let r=new dl;return di.compare(e,t,n,r,0),r.changes}var dl=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&ma(e,t,this.changes,5)}};function fl(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function pl(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function ml(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var hl=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return ca.replace({widget:new gl(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},gl=class extends oa{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},_l=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Cl,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Wa.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(Io).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new Yc(n),this.stateDeco=wl(t),this.heightMap=el.empty().applyChanges(this.stateDeco,Bn.empty,this.heightOracle.setDoc(t.doc),[new Ko(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ca.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new vl(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Cl:new Tl(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(El(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=wl(this.state);let r=e.changedRanges,i=Ko.extendWithRanges(r,ul(n,this.stateDeco,e?e.changes:or.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Jc(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||qc)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(wo)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?Wa.RTL:Wa.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=Da(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=ka(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=Ba(this.scrollParent||e.win);let m=(this.printing?ml:fl)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!pl(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),Jc();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?el.empty().applyChanges(this.stateDeco,Bn.empty,this.heightOracle,[new Ko(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new Xc(n.from,i))}qc&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new vl(r.lineAt(a-n*1e3,Qc.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,Qc.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,Qc.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new vl(r.lineAt(o-500,Qc.ByHeight,i,0,0).from,r.lineAt(o+n+500,Qc.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new vl(this.heightMap.lineAt(n,Qc.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Qc.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Qc.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,Qc.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2e3&&i<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new hl(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=Wa.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=Sl(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(N.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new hl(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=sa.Text)return;let i=yl(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=xl(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=bl(i,n),l=bl(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=xl(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=bl(i,f),l=bl(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=xl(r,n)-xl(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){hl.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ca.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];di.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||El(this.heightMap.lineAt(e,Qc.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||El(this.heightMap.lineAt(this.scaler.fromDOM(e),Qc.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return El(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},vl=class{constructor(e,t){this.from=e,this.to=t}};function yl(e,t,n){let r=[],i=e,a=0;return di.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function bl({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function xl(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function Sl(e,t){for(let n of e)if(t(n))return n}var Cl={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function wl(e){let t=e.facet(Lo).filter(e=>typeof e!=`function`),n=e.facet(zo).filter(e=>typeof e!=`function`);return n.length&&t.push(di.join(n)),t}var Tl=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,Qc.ByPos,e,0,0).top,o=t.lineAt(i,Qc.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function El(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new Zc(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>El(e,t)):e._content)}var Dl=P.define({combine:e=>e.join(` `)}),Ol=P.define({combine:e=>e.indexOf(!0)>-1}),kl=ji.newName(),Al=ji.newName(),jl=ji.newName(),Ml={"&light":`.`+Al,"&dark":`.`+jl};function Nl(e,t,n){return new ji(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var Pl=Nl(`.`+kl,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},".cm-panels-top":{top:`0`},".cm-panels-bottom":{bottom:`0`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{background:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat`,backgroundSize:`.4em`,backgroundPosition:`calc(min(50%, 0px)) center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},Ml),Fl={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Il=F.ie&&F.ie_version<=11,Ll=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Aa,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(F.ie&&F.ie_version<=11||F.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&F.android&&e.constructor.EDIT_CONTEXT!==!1&&!(F.chrome&&F.chrome_version<126)&&(this.editContext=new Vl(e),e.state.facet(Ao)&&(e.contentDOM.editContext=this.editContext.editContext)),Il&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type!=`change`&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Ao)?n.root.activeElement!=this.dom:!va(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(F.ie&&F.ie_version<=11||F.android&&F.chrome)&&!n.state.selection.main.empty&&r.focusNode&&ba(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=ga(e.root);if(!t)return!1;let n=F.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Bl(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=va(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&za(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.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,Fl),Il&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Il&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&La(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&va(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new $s(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=tc(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!sc(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=Rl(t,e.previousSibling||e.target.previousSibling,-1),r=Rl(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return e.type==`characterData`?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ao)!=e.state.facet(Ao)&&(e.view.contentDOM.editContext=e.state.facet(Ao)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function Rl(e,t,n){for(;t;){let r=Yo.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function zl(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return ba(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Bl(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return zl(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?zl(e,n):null}var Vl=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=ic(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=N.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));sc(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:Bn.of(n.text.slice(l.from,l.toB).split(`
10 +`))};if((F.mac||F.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:Bn.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);nc(e,u,N.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(ca.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:Oo.of(ca.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=ga(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to){if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}r=null,this.revertPending(e.state)}if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},I=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Ra(e.parent)||document,this.viewState=new _l(this,e.state||ii.create(e)),e.scrollTo&&e.scrollTo.is(Do)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Mo).map(e=>new Po(e));for(let e of this.plugins)e.update(this);this.observer=new Ll(this),this.inputState=new cc(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Ss(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Wr?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(Vc))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=Hc(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(ii.phrases)!=this.state.facet(ii.phrases))return this.setState(a);i=qo.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new Eo(t.empty?t:N.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(Do)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Wl.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Go)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(Dl)!=i.state.facet(Dl)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(vo))try{e(i)}catch(e){ko(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!tc(this,u)&&l.force&&La(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new _l(this,e),this.plugins=e.facet(Mo).map(e=>new Po(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Ss(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Mo),n=e.state.facet(Mo);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new Po(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){ko(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a,scaleY:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0){if(Ba(n||this.win))i=-1,a=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}o=this.viewState.scaleY}this.updateState=1;let s=this.viewState.measure();if(!s&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let c=[];s&4||([this.measureRequests,c]=[c,this.measureRequests]);let l=c.map(e=>{try{return e.read(this)}catch(e){return ko(this.state,e),Ul}}),u=qo.create(this,this.state,[]),d=!1;u.flags|=s,t?t.flags|=s:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let e=0;e<c.length;e++)if(l[e]!=Ul)try{let t=c[e];t.write&&t.write(l[e],this)}catch(e){ko(this.state,e)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)/this.viewState.scaleY-a/o;if((e>1||e<-1)&&!(F.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(vo))e(t)}get themeClasses(){return kl+` `+(this.state.facet(Ol)?jl:Al)+` `+this.state.facet(Dl)}updateAttrs(){let e=Gl(this,Fo,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(Ao)?`true`:`false`,class:`cm-content`,style:`${F.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),Gl(this,Io,t);let n=this.observer.ignore(()=>{let n=ia(this.contentDOM,this.contentAttrs,t),r=ia(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&=(this.announceDOM.textContent=``,this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=`\xA0`},200),!1);let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Go);let t=this.state.facet(e.cspNonce);ji.mount(this.root,this.styleModules.concat(Pl).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Ws(this,e,zs(this,e,t,n))}moveByGroup(e,t){return Ws(this,e,zs(this,e,t,t=>Bs(this,e.head,t)))}visualLineSide(e,t){return t?N.cursor(e.to,1):N.cursor(e.from,-1)}moveToLineBoundary(e,t,n=!0){return Rs(this,e,t,n)}moveVertically(e,t,n){return Ws(this,e,Vs(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Ks(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Ks(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[eo.find(r,e-n.from,-1,t)];return n.length&&(e==n.from&&t<0||e==n.to&&t>0)&&i.dir!=this.textDirectionAt(n.from)&&(e==n.to?(e=n.from+i.from,t=1):(e=n.from+i.to,t=-1)),this.docView.coordsAt(e,t,i.dir==Wa.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Co)||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>Hl)return lo(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||to(r.isolates,n=Ho(this,e))))return r.order;n||=Ho(this,e);let r=co(e.text,t,n);return this.bidiCache.push(new Wl(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||F.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Pa(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Do.of(new Eo(typeof e==`number`?N.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Do.of(new Eo(N.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return No.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return No.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=ji.newName(),r=[Dl.of(n),Go.of(Nl(`.${n}`,e))];return t&&t.dark&&r.push(Ol.of(!0)),r}static baseTheme(e){return Tr.lowest(Go.of(Nl(`.`+kl,e,Ml)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&Yo.get(t)||Yo.get(e))?.root?.view||null}};I.styleModule=Go,I.inputHandler=yo,I.clipboardInputFilter=xo,I.clipboardOutputFilter=So,I.scrollHandler=To,I.focusChangeEffect=bo,I.perLineTextDirection=Co,I.exceptionSink=_o,I.updateListener=vo,I.editable=Ao,I.mouseSelectionStyle=go,I.dragMovesSelection=ho,I.clickAddsSelectionRange=mo,I.decorations=Lo,I.blockWrappers=Ro,I.outerDecorations=zo,I.atomicRanges=Bo,I.bidiIsolatedRanges=Vo,I.cursorScrollMargin=P.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),I.scrollMargins=Uo,I.darkTheme=Ol,I.cspNonce=P.define({combine:e=>e.length?e[0]:``}),I.contentAttributes=Io,I.editorAttributes=Fo,I.lineWrapping=I.contentAttributes.of({class:`cm-lineWrapping`}),I.announce=Ur.define();var Hl=4096,Ul={},Wl=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:Wa.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function Gl(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&ea(a,n)}return n}var Kl=F.mac?`mac`:F.windows?`win`:F.linux?`linux`:`key`;function ql(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function Jl(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var Yl=Tr.default(I.domEventHandlers({keydown(e,t){return iu(Ql(t.state),e,t,`editor`)}})),Xl=P.define({enables:Yl}),Zl=new WeakMap;function Ql(e){let t=e.facet(Xl),n=Zl.get(t);return n||Zl.set(t,n=nu(t.reduce((e,t)=>e.concat(t),[]))),n}function $l(e,t,n){return iu(Ql(e.state),t,e,n)}var eu=null,tu=4e3;function nu(e,t=Kl){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>ql(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=eu={view:t,prefix:n,scope:e};return setTimeout(()=>{eu==r&&(eu=null)},tu),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,ru))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var ru=null;function iu(e,t,n,r){ru=t;let i=Bi(t),a=nr(er(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;eu&&eu.view==n&&eu.scope==r&&(o=eu.prefix+` `,mc.indexOf(t.keyCode)<0&&(c=!0,eu=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+Jl(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(F.windows&&t.ctrlKey&&t.altKey)&&!(F.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=Pi[t.keyCode])&&p!=i?(d(f[o+Jl(p,t,!0)])||t.shiftKey&&(m=Fi[t.keyCode])!=i&&m!=p&&d(f[o+Jl(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+Jl(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),ru=null,s}F.gecko&&F.gecko_version;function au(e,t,n,r,i){t.lastIndex=0;for(let a=e.iterRange(n,r),o=n,s;!a.next().done;o+=a.value.length)if(!a.lineBreak)for(;s=t.exec(a.value);)i(o+s.index,s)}function ou(e,t){let n=e.visibleRanges;if(n.length==1&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:a}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),a=Math.min(e.state.doc.lineAt(a).to,a+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=a:r.push({from:i,to:a});return r}var su=class{constructor(e){let{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:a=1e3}=e;if(!t.global)throw RangeError(`The regular expression given to MatchDecorator should have its 'g' flag set`);if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if(typeof n==`function`)this.addMatch=(e,t,r,i)=>{let a=n(e,t,r);a&&i(r,r+e[0].length,a)};else if(n)this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n);else throw RangeError(`Either 'decorate' or 'decoration' should be provided to MatchDecorator`);this.boundary=i,this.maxLength=a}createDeco(e){let t=new mi,n=t.add.bind(t);for(let{from:t,to:r}of ou(e,this.maxLength))au(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((t,i,a,o)=>{o>=e.view.viewport.from&&a<=e.view.viewport.to&&(n=Math.min(a,n),r=Math.max(o,r))}),e.viewportMoved||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let a=Math.max(i.from,n),o=Math.min(i.to,r);if(o>=a){let n=e.state.doc.lineAt(a),r=n.to<o?e.state.doc.lineAt(o):n,s=Math.max(i.from,n.from),c=Math.min(i.to,r.to);if(this.boundary){for(;a>n.from;a--)if(this.boundary.test(n.text[a-1-n.from])){s=a;break}for(;o<r.to;o++)if(this.boundary.test(r.text[o-r.from])){c=o;break}}let l=[],u,d=(e,t,n)=>l.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=s-n.from;(u=this.regexp.exec(n.text))&&u.index<c-n.from;)this.addMatch(u,e,u.index+n.from,d);else au(e.state.doc,this.regexp,s,c,(t,n)=>this.addMatch(n,e,t,d));t=t.update({filterFrom:s,filterTo:c,filter:(e,t)=>e<s||t>c,add:l})}}return t}};/x/.unicode;function cu(){return uu}var lu=ca.line({class:`cm-activeLine`}),uu=No.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(lu.range(i.from)),t=i.from)}return ca.set(n)}},{decorations:e=>e.decorations}),du=P.define({combine(e){let t,n;for(let r of e)t||=r.topContainer,n||=r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function fu(e,t){let n=e.plugin(pu),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var pu=No.fromClass(class{constructor(e){this.input=e.state.facet(gu),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(du);this.top=new mu(e,!0,t.topContainer),this.bottom=new mu(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add(`cm-panel`),e.mount&&e.mount()}update(e){let t=e.state.facet(du);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new mu(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new mu(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(gu);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],a=[],o=[];for(let n of t){let t=this.specs.indexOf(n),s;t<0?(s=n(e.view),o.push(s)):(s=this.panels[t],s.update&&s.update(e)),r.push(s),(s.top?i:a).push(s)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(a);for(let e of o)e.dom.classList.add(`cm-panel`),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>I.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})}),mu=class{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes=``,this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&=(this.dom.remove(),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`;let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=hu(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=hu(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 hu(e){let t=e.nextSibling;return e.remove(),t}var gu=P.define({enables:pu});function _u(e,t){let n,r=new Promise(e=>n=e),i=e=>Su(e,t,n);e.state.field(yu,!1)?e.dispatch({effects:bu.of(i)}):e.dispatch({effects:Ur.appendConfig.of(yu.init(()=>[i]))});let a=xu.of(i);return{close:a,result:r.then(t=>((e.win.queueMicrotask||(t=>e.win.setTimeout(t,10)))(()=>{e.state.field(yu).indexOf(i)>-1&&e.dispatch({effects:a})}),t))}}function vu(e,t){let n=e.state.field(yu,!1)||[];for(let r of n){let n=fu(e,r);if(n&&n.dom.classList.contains(t))return n}return null}var yu=Sr.define({create(){return[]},update(e,t){for(let n of t.effects)n.is(bu)?e=[n.value].concat(e):n.is(xu)&&(e=e.filter(e=>e!=n.value));return e},provide:e=>gu.computeN([e],t=>t.field(e))}),bu=Ur.define(),xu=Ur.define();function Su(e,t,n){let r=t.content?t.content(e,()=>o(null)):null;if(!r){if(r=Vi(`form`),t.input){let e=Vi(`input`,t.input);/^(text|password|number|email|tel|url)$/.test(e.type)&&e.classList.add(`cm-textfield`),e.name||=`input`,r.appendChild(Vi(`label`,(t.label||``)+`: `,e))}else r.appendChild(document.createTextNode(t.label||``));r.appendChild(document.createTextNode(` `)),r.appendChild(Vi(`button`,{class:`cm-button`,type:`submit`},t.submitLabel||`OK`))}let i=r.nodeName==`FORM`?[r]:r.querySelectorAll(`form`);for(let e=0;e<i.length;e++){let t=i[e];t.addEventListener(`keydown`,e=>{e.keyCode==27?(e.preventDefault(),o(null)):e.keyCode==13&&(e.preventDefault(),o(t))}),t.addEventListener(`submit`,e=>{e.preventDefault(),o(t)})}let a=Vi(`div`,r,Vi(`button`,{onclick:()=>o(null),"aria-label":e.state.phrase(`close`),class:`cm-dialog-close`,type:`button`},[`×`]));t.class&&(a.className=t.class),a.classList.add(`cm-dialog`);function o(t){a.contains(a.ownerDocument.activeElement)&&e.focus(),n(t)}return{dom:a,top:t.top,mount:()=>{if(t.focus){let e;e=typeof t.focus==`string`?r.querySelector(t.focus):r.querySelector(`input`)||r.querySelector(`button`),e&&`select`in e?e.select():e&&`focus`in e&&e.focus()}}}}var Cu=class extends oi{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};Cu.prototype.elementClass=``,Cu.prototype.toDOM=void 0,Cu.prototype.mapMode=ir.TrackBefore,Cu.prototype.startSide=Cu.prototype.endSide=-1,Cu.prototype.point=!0;var wu=P.define(),Tu=P.define(),Eu={class:``,renderEmptyElements:!1,elementStyle:``,markers:()=>di.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:`before`},Du=P.define();function Ou(e){return[Au(),Du.of({...Eu,...e})]}var ku=P.define({combine:e=>e.some(e=>e)});function Au(e){let t=[ju];return e&&e.fixed===!1&&t.push(ku.of(!0)),t}var ju=No.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(Du).map(t=>new Fu(e,t)),this.fixed=!e.state.facet(ku);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(ku)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=di.iter(this.view.state.facet(wu),this.view.viewport.from),r=[],i=this.gutters.map(e=>new Pu(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==sa.Text&&t){Nu(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==sa.Text){Nu(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(Du),n=e.state.facet(Du),r=e.docChanged||e.heightChanged||e.viewportChanged||!di.eq(e.startState.facet(wu),e.state.facet(wu),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new Fu(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>I.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==Wa.LTR?{left:r,right:i}:{right:r,left:i}})});function Mu(e){return Array.isArray(e)?e:[e]}function Nu(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var Pu=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=di.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new Iu(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];Nu(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;(r.length!=0||a.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(Tu)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Fu=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=Mu(t.markers(e)),t.initialSpacer&&(this.spacer=new Iu(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=Mu(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!di.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},Iu=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),Lu(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function Lu(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var Ru=P.define(),zu=P.define(),Bu=P.define({combine(e){return ai(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),Vu=class extends Cu{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function Hu(e,t){return e.state.facet(Bu).formatNumber(t,e.state)}var Uu=Du.compute([Bu],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(Ru)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new Vu(Hu(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(zu)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(Bu)!=e.state.facet(Bu),initialSpacer(e){return new Vu(Hu(e,Gu(e.state.doc.lines)))},updateSpacer(e,t){let n=Hu(t.view,Gu(t.view.state.doc.lines));return n==e.number?e:new Vu(n)},domEventHandlers:e.facet(Bu).domEventHandlers,side:`before`}));function Wu(e={}){return[Bu.of(e),Au(),Uu]}function Gu(e){let t=9;for(;t<e;)t=t*10+9;return t}var Ku=new class extends Cu{constructor(){super(...arguments),this.elementClass=`cm-activeLineGutter`}},qu=wu.compute([`selection`],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(Ku.range(i)))}return di.of(t)});function Ju(){return qu}var Yu=1024,Xu=0,Zu=class{constructor(e,t){this.from=e,this.to=t}},Qu=class{constructor(e={}){this.id=Xu++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=td.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};Qu.closedBy=new Qu({deserialize:e=>e.split(` `)}),Qu.openedBy=new Qu({deserialize:e=>e.split(` `)}),Qu.group=new Qu({deserialize:e=>e.split(` `)}),Qu.isolate=new Qu({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),Qu.contextHash=new Qu({perNode:!0}),Qu.lookAhead=new Qu({perNode:!0}),Qu.mounted=new Qu({perNode:!0});var $u=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[Qu.mounted.id]}},ed=Object.create(null),td=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):ed,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(Qu.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(Qu.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};td.none=new td(``,Object.create(null),0,8);var nd=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new td(e.name,r,e.id,e.flags):e)}return new e(n)}},rd=new WeakMap,id=new WeakMap,ad;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(ad||={});var od=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=$u.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new bd(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new bd(rd.get(this)||this.topNode);return r.moveTo(e,t),rd.set(this,r._tree),r}get topNode(){return new fd(this,0,0,null)}resolve(e,t=0){let n=ud(rd.get(this)||this.topNode,e,t,!1);return rd.set(this,n),n}resolveInner(e,t=0){let n=ud(id.get(this)||this.topNode,e,t,!0);return id.set(this,n),n}resolveStack(e,t=0){return yd(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&ad.IncludeAnonymous)>0;for(let e=this.cursor(a|ad.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:Td(td.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(td.none,t,n,r)))}static build(e){return Sd(e)}};od.empty=new od(td.none,[],[],0);var sd=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},cd=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return td.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(ld(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function ld(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function ud(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof fd&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:ad.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof fd&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var dd=class{cursor(e=0){return new bd(this,e)}getChild(e,t=null,n=null){let r=pd(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return pd(this,e,t,n)}resolve(e,t=0){return ud(this,e,t,!1)}resolveInner(e,t=0){return ud(this,e,t,!0)}matchContext(e){return md(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},fd=class e extends dd{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&ad.EnterBracketed&&l instanceof od&&(d=$u.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||ld(i,r,u,u+l.length)){if(l instanceof cd){if(a&ad.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new gd(new hd(o,l,t,u),null,e)}else if(a&ad.IncludeAnonymous||!l.type.isAnonymous||xd(l)){let s;if(!(a&ad.IgnoreMounts)&&(s=$u.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&ad.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&ad.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&ad.IgnoreOverlays)&&(i=$u.get(this._tree))&&i.overlay){let a=t-this.from,o=r&ad.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function pd(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function md(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var hd=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},gd=class e extends dd{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&ad.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}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:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new od(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function _d(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof fd&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new vd(i,n)}var vd=class{constructor(e,t){this.heads=e,this.node=t}get next(){return _d(this.heads)}};function yd(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof fd?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=$u.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new fd(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(ud(o,t,n,!1))}}return i?_d(i):r}var bd=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~ad.EnterBracketed,e instanceof fd)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof fd?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&ad.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ad.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ad.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&ad.IncludeAnonymous||e instanceof cd||!e.type.isAnonymous||xd(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new gd(this.buffer,t,this.stack[e]);return this.bufferNode=new gd(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return md(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return md(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function xd(e){return e.children.some(e=>e instanceof cd||!e.type.isAnonymous||xd(e))}function Sd(e){let{buffer:t,nodeSet:n,maxBufferLength:r=Yu,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new sd(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0){if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}if(w==-3){c=x;return}if(w==-4){l=x;return}throw RangeError(`Unrecognized record size: ${w}`)}let D=s[x],O,k,A=S-e;if(C-S<=r&&(k=h(o.pos-t,y))){let t=new Uint16Array(k.size-k.skip),r=o.pos-k.size,i=t.length;for(;o.pos>r;)i=g(k.start,t,i);O=new cd(t,C-k.start,n),A=k.start-e}else{let e=o.pos-w;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=C;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,T,E),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s<t.length&&p(t,n,S,s,S,c,i,T,E),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(D,E);O=Td(D,t,n,0,t.length,0,C-S,e,e)}else O=m(D,t,n,C-S,T-C,E)}_.push(O),v.push(A)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new cd(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof od){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(Qu.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[Qu.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[Qu.lookAhead,i];o=o?[e].concat(o):[e]}return new od(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new od(s[e.topID],_.reverse(),v.reverse(),y)}var Cd=new WeakMap;function wd(e,t){if(!e.isAnonymous||t instanceof cd||t.type!=e)return 1;let n=Cd.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof od)){n=1;break}n+=wd(e,r)}Cd.set(t,n)}return n}function Td(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=wd(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=wd(e,t[s]);for(s++;s<i;s++){let n=wd(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(Td(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var Ed=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof gd?this.setBuffer(e.context.buffer,e.index,t):e instanceof fd&&this.map.set(e.tree,t)}get(e){return e instanceof gd?this.getBuffer(e.context.buffer,e.index):e instanceof fd?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},Dd=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},Od=class{startParse(e,t,n){return typeof e==`string`&&(e=new kd(e)),n=n?n.length?n.map(e=>new Zu(e.from,e.to)):[new Zu(0,0)]:[new Zu(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},kd=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function Ad(e){return(t,n,r,i)=>new Fd(t,e,n,r,i)}var jd=class{constructor(e,t,n,r,i,a){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=a}};function Md(e){if(!e.length||e.some(e=>e.from>=e.to))throw RangeError(`Invalid inner parse ranges given: `+JSON.stringify(e))}var Nd=class{constructor(e,t,n,r,i,a,o,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=a,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}},Pd=new Qu({perNode:!0}),Fd=class{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),this.stoppedAt!=null)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return this.stoppedAt!=null&&(e=new od(e.type,e.children,e.positions,e.length,e.propValues.concat([[Pd,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Qu.mounted.id]=new $u(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new Bd(this.fragments),t=null,n=null,r=new bd(new fd(this.baseTree,this.ranges[0].from,0,null),ad.IncludeAnonymous|ad.IgnoreMounts);scan:for(let i,a;;){let o=!0,s;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)o=!1;else if(e.hasNode(r)){if(t){let e=t.mounts.find(e=>e.frag.from<=r.from&&e.frag.to>=r.to&&e.mount.overlay);if(e)for(let n of e.mount.overlay){let i=n.from+e.pos,a=n.to+e.pos;i>=r.from&&a<=r.to&&!t.ranges.some(e=>e.from<a&&e.to>i)&&t.ranges.push({from:i,to:a})}}o=!1}else if(n&&(a=Id(n.ranges,r.from,r.to)))o=a!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||(Rd(r),t&&t.depth++,n&&n.depth++);let a=e.findMounts(r.from,i.parser);if(typeof i.overlay==`function`)t=new Nd(i.parser,i.overlay,a,this.inner.length,r.from,!!i.bracketed,r.tree,t);else{let e=Vd(this.ranges,i.overlay||(r.from<r.to?[new Zu(r.from,r.to)]:[]));e.length&&Md(e),(e.length||!i.overlay)&&this.inner.push(new jd(i.parser,e.length?i.parser.startParse(this.input,Ud(a,e),e):i.parser.startParse(``),i.overlay?i.overlay.map(e=>new Zu(e.from-r.from,e.to-r.from)):null,!!i.bracketed,r.tree,e.length?e[0].from:r.from)),i.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):o=!1}}else if(t&&(s=t.predicate(r))&&(s===!0&&(s=new Zu(r.from,r.to)),s.from<s.to)){let e=t.ranges.length-1;e>=0&&t.ranges[e].to==s.from?t.ranges[e]={from:t.ranges[e].from,to:s.to}:t.ranges.push(s)}if(o&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break scan;if(t&&!--t.depth){let e=Vd(this.ranges,t.ranges);e.length&&(Md(e),this.inner.splice(t.index,0,new jd(t.parser,t.parser.startParse(this.input,Ud(t.mounts,e),e),t.ranges.map(e=>new Zu(e.from-t.start,e.to-t.start)),t.bracketed,t.target,e[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function Id(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function Ld(e,t,n,r,i,a){if(t<n){let o=e.buffer[t+1];r.push(e.slice(t,n,o)),i.push(o-a)}}function Rd(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,a=i.children.indexOf(r),o=i.children[a],s=o.buffer,c=[a];function l(e,r,i,a,u,d){let f=n[d],p=[],m=[];Ld(o,e,f,p,m,a);let h=s[f+1],g=s[f+2];c.push(p.length);let _=d?l(f+4,s[f+3],o.set.types[s[f]],h,g-h,d-1):t.toTree();return p.push(_),m.push(h-a),Ld(o,s[f+3],r,p,m,a),new od(i,p,m,u)}i.children[a]=l(0,s.length,td.none,0,o.length,n.length-1);for(let t of c){let n=e.tree.children[t],r=e.tree.positions[t];e.yield(new fd(n,r+e.from,t,e._tree))}}var zd=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(ad.IncludeAnonymous|ad.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)if(!(t.to>=e&&t.enter(n,1,ad.IgnoreOverlays|ad.ExcludeBuffers))){if(t.to<=e)t.next(!1)||(this.done=!0);else break}}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof od)t=t.children[0];else break}return!1}},Bd=class{constructor(e){if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let t=this.curFrag=e[0];this.curTo=t.tree.prop(Pd)??t.to,this.inner=new zd(t.tree,-t.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=e.tree.prop(Pd)??e.to,this.inner=new zd(e.tree,-e.offset)}}findMounts(e,t){let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let r=e.tree?.prop(Qu.mounted);if(r&&r.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let i=this.fragments[t];if(i.from>=e.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:e.from-i.offset,mount:r})}}}return n}};function Vd(e,t){let n=null,r=t;for(let i=1,a=0;i<e.length;i++){let o=e[i-1].to,s=e[i].from;for(;a<r.length;a++){let e=r[a];if(e.from>=s)break;e.to<=o||(n||(r=n=t.slice()),e.from<o?(n[a]=new Zu(e.from,o),e.to>s&&n.splice(a+1,0,new Zu(s,e.to))):e.to>s?n[a--]=new Zu(s,e.to):n.splice(a--,1))}}return r}function Hd(e,t,n,r){let i=0,a=0,o=!1,s=!1,c=-1e9,l=[];for(;;){let u=i==e.length?1e9:o?e[i].to:e[i].from,d=a==t.length?1e9:s?t[a].to:t[a].from;if(o!=s){let e=Math.max(c,n),t=Math.min(u,d,r);e<t&&l.push(new Zu(e,t))}if(c=Math.min(u,d),c==1e9)break;u==c&&(o?(o=!1,i++):o=!0),d==c&&(s?(s=!1,a++):s=!0)}return l}function Ud(e,t){let n=[];for(let{pos:r,mount:i,frag:a}of e){let e=r+(i.overlay?i.overlay[0].from:0),o=e+i.tree.length,s=Math.max(a.from,e),c=Math.min(a.to,o);if(i.overlay){let o=Hd(t,i.overlay.map(e=>new Zu(e.from+r,e.to+r)),s,c);for(let t=0,r=s;;t++){let s=t==o.length,l=s?c:o[t].from;if(l>r&&n.push(new Dd(r,l,i.tree,-e,a.from>=r||a.openStart,a.to<=l||a.openEnd)),s)break;r=o[t].to}}else n.push(new Dd(s,c,i.tree,-e,a.from>=e||a.openStart,a.to<=o||a.openEnd))}return n}var Wd=0,Gd=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=Wd++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new qd(e);return e=>e.modified.indexOf(t)>-1?e:qd.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},Kd=0,qd=class e{constructor(e){this.name=e,this.instances=[],this.id=Kd++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&Jd(n,e.modified));if(r)return r;let i=[],a=new Gd(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=Yd(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function Jd(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function Yd(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function Xd(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new Qd(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return Zd.add(t)}var Zd=new Qu({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new Qd(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),Qd=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};Qd.empty=new Qd([],2,null);function $d(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}var L=Gd.define,ef=L(),tf=L(),nf=L(tf),rf=L(tf),af=L(),of=L(af),sf=L(af),cf=L(),lf=L(cf),uf=L(),df=L(),ff=L(),pf=L(ff),mf=L(),R={comment:ef,lineComment:L(ef),blockComment:L(ef),docComment:L(ef),name:tf,variableName:L(tf),typeName:nf,tagName:L(nf),propertyName:rf,attributeName:L(rf),className:L(tf),labelName:L(tf),namespace:L(tf),macroName:L(tf),literal:af,string:of,docString:L(of),character:L(of),attributeValue:L(of),number:sf,integer:L(sf),float:L(sf),bool:L(af),regexp:L(af),escape:L(af),color:L(af),url:L(af),keyword:uf,self:L(uf),null:L(uf),atom:L(uf),unit:L(uf),modifier:L(uf),operatorKeyword:L(uf),controlKeyword:L(uf),definitionKeyword:L(uf),moduleKeyword:L(uf),operator:df,derefOperator:L(df),arithmeticOperator:L(df),logicOperator:L(df),bitwiseOperator:L(df),compareOperator:L(df),updateOperator:L(df),definitionOperator:L(df),typeOperator:L(df),controlOperator:L(df),punctuation:ff,separator:L(ff),bracket:pf,angleBracket:L(pf),squareBracket:L(pf),paren:L(pf),brace:L(pf),content:cf,heading:lf,heading1:L(lf),heading2:L(lf),heading3:L(lf),heading4:L(lf),heading5:L(lf),heading6:L(lf),contentSeparator:L(cf),list:L(cf),quote:L(cf),emphasis:L(cf),strong:L(cf),link:L(cf),monospace:L(cf),strikethrough:L(cf),inserted:L(),deleted:L(),changed:L(),invalid:L(),meta:mf,documentMeta:L(mf),annotation:L(mf),processingInstruction:L(mf),definition:Gd.defineModifier(`definition`),constant:Gd.defineModifier(`constant`),function:Gd.defineModifier(`function`),standard:Gd.defineModifier(`standard`),local:Gd.defineModifier(`local`),special:Gd.defineModifier(`special`)};for(let e in R){let t=R[e];t instanceof Gd&&(t.name=e)}$d([{tag:R.link,class:`tok-link`},{tag:R.heading,class:`tok-heading`},{tag:R.emphasis,class:`tok-emphasis`},{tag:R.strong,class:`tok-strong`},{tag:R.keyword,class:`tok-keyword`},{tag:R.atom,class:`tok-atom`},{tag:R.bool,class:`tok-bool`},{tag:R.url,class:`tok-url`},{tag:R.labelName,class:`tok-labelName`},{tag:R.inserted,class:`tok-inserted`},{tag:R.deleted,class:`tok-deleted`},{tag:R.literal,class:`tok-literal`},{tag:R.string,class:`tok-string`},{tag:R.number,class:`tok-number`},{tag:[R.regexp,R.escape,R.special(R.string)],class:`tok-string2`},{tag:R.variableName,class:`tok-variableName`},{tag:R.local(R.variableName),class:`tok-variableName tok-local`},{tag:R.definition(R.variableName),class:`tok-variableName tok-definition`},{tag:R.special(R.variableName),class:`tok-variableName2`},{tag:R.definition(R.propertyName),class:`tok-propertyName tok-definition`},{tag:R.typeName,class:`tok-typeName`},{tag:R.namespace,class:`tok-namespace`},{tag:R.className,class:`tok-className`},{tag:R.macroName,class:`tok-macroName`},{tag:R.propertyName,class:`tok-propertyName`},{tag:R.operator,class:`tok-operator`},{tag:R.comment,class:`tok-comment`},{tag:R.meta,class:`tok-meta`},{tag:R.invalid,class:`tok-invalid`},{tag:R.punctuation,class:`tok-punctuation`}]);var hf=new Qu;function gf(e){return P.define({combine:e?t=>t.concat(e):void 0})}var _f=new Qu,vf=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,ii.prototype.hasOwnProperty(`tree`)||Object.defineProperty(ii.prototype,"tree",{get(){return xf(this)}}),this.parser=t,this.extension=[Mf.of(this),ii.languageData.of((e,t,n)=>{let r=yf(e,t,n),i=r.type.prop(hf);if(!i)return[];let a=e.facet(i),o=r.type.prop(_f);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return yf(e,t,n).type.prop(hf)==this.data}findRegions(e){let t=e.facet(Mf);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(hf)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(Qu.mounted);if(i){if(i.tree.prop(hf)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof od&&r(i,e.positions[n]+t)}};return r(xf(e),0),n}get allowsNesting(){return!0}};vf.setState=Ur.define();function yf(e,t,n){let r=e.facet(Mf),i=xf(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,ad.ExcludeBuffers|ad.EnterBracketed))e.type.isTop&&(i=e);return i}var bf=class e extends vf{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=gf(t.languageData);return new e(n,t.parser.configure({props:[hf.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function xf(e){let t=e.field(vf.state,!1);return t?t.tree:od.empty}function Sf(e,t,n=50){let r=e.field(vf.state,!1)?.context;if(!r)return null;let i=r.viewport;r.updateViewport({from:0,to:t});let a=r.isDone(t)||r.work(n,t)?r.tree:null;return r.updateViewport(i),a}function Cf(e,t=e.viewport.to,n=100){let r=Sf(e.state,t,n);return r!=xf(e.state)&&e.dispatch({}),!!r}var wf=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},Tf=null,Ef=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],od.empty,0,r,[],null)}startParse(){return this.parser.startParse(new wf(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=od.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(Dd.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Dd.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Tf;Tf=this;try{return e()}finally{Tf=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Df(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=Dd.applyChanges(r,e),i=od.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=Df(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Od{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=Tf;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new od(td.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Tf}};function Df(e,t,n){return Dd.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var Of=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=Ef.create(t.facet(Mf).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};vf.state=Sr.define({create:Of.init,update(e,t){for(let e of t.effects)if(e.is(vf.setState))return e.value;return t.startState.facet(Mf)==t.state.facet(Mf)?e.apply(t):Of.init(t.state)}});var kf=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(kf=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var Af=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,jf=No.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(vf.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(vf.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=kf(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(vf.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Af?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>Af&&Af()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:vf.setState.of(new Of(i.context))})),this.chunkBudget>0&&(!s||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>ko(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Mf=P.define({combine(e){return e.length?e[0]:null},enables:e=>[vf.state,jf,I.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),Nf=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},Pf=P.define(),Ff=P.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function If(e){let t=e.facet(Ff);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function Lf(e,t){let n=``,r=e.tabSize,i=e.facet(Ff)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function Rf(e,t){e instanceof ii&&(e=new zf(e));for(let n of e.state.facet(Pf)){let r=n(e,t);if(r!==void 0)return r}let n=xf(e.state);return n.length>=t?Vf(e,n,t):null}var zf=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=If(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Ti(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},Bf=new Qu;function Vf(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return Hf(r,e,n)}function Hf(e,t,n){for(let r=e;r;r=r.next){let e=Wf(r.node);if(e)return e(Kf.create(t,n,r))}return 0}function Uf(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Wf(e){let t=e.type.prop(Bf);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(Qu.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>Xf(e,!0,1,void 0,n&&!Uf(e)?t.from:void 0)}return e.parent==null?Gf:null}function Gf(){return 0}var Kf=class e extends zf{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(qf(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Hf(this.context.next,this.base,this.pos)}};function qf(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function Jf(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function Yf({closing:e,align:t=!0,units:n=1}){return r=>Xf(r,t,n,e)}function Xf(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?Jf(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}var Zf=e=>e.baseIndent;function Qf({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var $f=P.define(),ep=new Qu;function tp(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function np(e,t,n){let r=xf(e);if(r.length<n)return null;let i=r.resolveStack(n,1),a=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(a&&i.from<t)break;let s=i.type.prop(ep);if(s&&(i.to<r.length-50||r.length==e.doc.length||!rp(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(a=r)}}return a}function rp(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function ip(e,t,n){for(let r of e.facet($f)){let i=r(e,t,n);if(i)return i}return np(e,t,n)}function ap(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var op=Ur.define({map:ap}),sp=Ur.define({map:ap});function cp(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}var lp=Sr.define({create(){return ca.none},update(e,t){t.isUserEvent(`delete`)&&t.changes.iterChangedRanges((t,n)=>e=up(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(op)&&!pp(e,r.value.from,r.value.to)?n.push(r.value):r.is(sp)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(Sp),i=n.map(e=>(r?ca.replace({widget:new Ep(r(t.state,e))}):Tp).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=up(e,t.selection.main.head)),e},provide:e=>I.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError(`Invalid JSON for fold state`);let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid JSON for fold state`);t.push(Tp.range(r,i))}return ca.set(t,!0)}});function up(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function dp(e){return e.field(lp,!1)||di.empty}function fp(e,t,n){var r;let i=null;return(r=e.field(lp,!1))==null||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function pp(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function mp(e,t){return e.field(lp,!1)?t:t.concat(Ur.appendConfig.of(Cp()))}var hp=e=>{for(let t of cp(e)){let n=ip(e.state,t.from,t.to);if(n)return e.dispatch({effects:mp(e.state,[op.of(n),_p(e,n)])}),!0}return!1},gp=e=>{if(!e.state.field(lp,!1))return!1;let t=[];for(let n of cp(e)){let r=fp(e.state,n.from,n.to);r&&t.push(sp.of(r),_p(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function _p(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return I.announce.of(`${e.state.phrase(n?`Folded lines`:`Unfolded lines`)} ${r} ${e.state.phrase(`to`)} ${i}.`)}var vp=e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),a=ip(t,i.from,i.to);a&&n.push(op.of(a)),r=(a?e.lineBlockAt(a.to):i).to+1}return n.length&&e.dispatch({effects:mp(e.state,n)}),!!n.length},yp=e=>{let t=e.state.field(lp,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(sp.of({from:e,to:t}))}),e.dispatch({effects:n}),!0},bp=[{key:`Ctrl-Shift-[`,mac:`Cmd-Alt-[`,run:hp},{key:`Ctrl-Shift-]`,mac:`Cmd-Alt-]`,run:gp},{key:`Ctrl-Alt-[`,run:vp},{key:`Ctrl-Alt-]`,run:yp}],xp={placeholderDOM:null,preparePlaceholder:null,placeholderText:`…`},Sp=P.define({combine(e){return ai(e,xp)}});function Cp(e){let t=[lp,Ap];return e&&t.push(Sp.of(e)),t}function wp(e,t){let{state:n}=e,r=n.facet(Sp),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=fp(e.state,n.from,n.to);r&&e.dispatch({effects:sp.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let a=document.createElement(`span`);return a.textContent=r.placeholderText,a.setAttribute(`aria-label`,n.phrase(`folded code`)),a.title=n.phrase(`unfold`),a.className=`cm-foldPlaceholder`,a.onclick=i,a}var Tp=ca.replace({widget:new class extends oa{toDOM(e){return wp(e,null)}}}),Ep=class extends oa{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return wp(e,this.value)}},Dp={openText:`⌄`,closedText:`›`,markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},Op=class extends Cu{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement(`span`);return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?`Fold line`:`Unfold line`),t}};function kp(e={}){let t={...Dp,...e},n=new Op(t,!0),r=new Op(t,!1),i=No.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(Mf)!=e.state.facet(Mf)||e.startState.field(lp,!1)!=e.state.field(lp,!1)||xf(e.startState)!=xf(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new mi;for(let i of e.viewportLineBlocks){let a=fp(e.state,i.from,i.to)?r:ip(e.state,i.from,i.to)?n:null;a&&t.add(i.from,i.from,a)}return t.finish()}}),{domEventHandlers:a}=t;return[i,Ou({class:`cm-foldGutter`,markers(e){return e.plugin(i)?.markers||di.empty},initialSpacer(){return new Op(t,!1)},domEventHandlers:{...a,click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=fp(e.state,t.from,t.to);if(r)return e.dispatch({effects:sp.of(r)}),!0;let i=ip(e.state,t.from,t.to);return i?(e.dispatch({effects:op.of(i)}),!0):!1}}}),Cp()]}var Ap=I.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`}});R.meta,R.link,R.heading,R.emphasis,R.strong,R.strikethrough,R.keyword,R.atom,R.bool,R.url,R.contentSeparator,R.labelName,R.literal,R.inserted,R.string,R.deleted,R.regexp,R.escape,R.string,R.variableName,R.variableName,R.typeName,R.namespace,R.className,R.variableName,R.macroName,R.propertyName,R.comment,R.invalid;var jp=I.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:`#328c8252`},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bb555544`}}),Mp=1e4,Np=`()[]{}`,Pp=P.define({combine(e){return ai(e,{afterCursor:!0,brackets:Np,maxScanDistance:Mp,renderMatch:Lp})}}),Fp=ca.mark({class:`cm-matchingBracket`}),Ip=ca.mark({class:`cm-nonmatchingBracket`});function Lp(e){let t=[],n=e.matched?Fp:Ip;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function Rp(e){let t=[],n=e.facet(Pp);for(let r of e.selection.ranges){if(!r.empty)continue;let i=Wp(e,r.head,-1,n)||r.head>0&&Wp(e,r.head-1,1,n)||n.afterCursor&&(Wp(e,r.head,1,n)||r.head<e.doc.length&&Wp(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return ca.set(t,!0)}var zp=[No.fromClass(class{constructor(e){this.paused=!1,this.decorations=Rp(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=Rp(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),jp];function Bp(e={}){return[Pp.of(e),zp]}var Vp=new Qu;function Hp(e,t,n){let r=e.prop(t<0?Qu.openedBy:Qu.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function Up(e){let t=e.type.prop(Vp);return t?t(e.node):e}function Wp(e,t,n,r={}){let i=r.maxScanDistance||Mp,a=r.brackets||Np,o=xf(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=Hp(r.type,n,a);if(i&&r.from<r.to){let o=Up(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return Gp(e,t,n,r,o,i,a)}}return Kp(e,t,n,o,s.type,i,a)}function Gp(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=Up(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(Hp(u.type,n,o))l++;else if(Hp(u.type,-n,o)){if(l==0){let e=Up(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function Kp(e,t,n,r,i,a,o){if(n<0?!t:t==e.doc.length)return null;let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i)){if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var qp=Object.create(null),Jp=[td.none],Yp=[],Xp=Object.create(null),Zp=Object.create(null);for(let[e,t]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`]])Zp[e]=$p(qp,t);function Qp(e,t){Yp.indexOf(e)>-1||(Yp.push(e),console.warn(t))}function $p(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||R[n];r?typeof r==`function`?t.length?t=t.map(r):Qp(n,`Modifier ${n} used at start of tag`):t.length?Qp(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:Qp(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=Xp[i];if(a)return a.id;let o=Xp[i]=td.define({id:Jp.length,name:r,props:[Xd({[r]:n})]});return Jp.push(o),o.id}Wa.RTL,Wa.LTR;var em=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=am(e.state,n.from);return r.line?nm(e):r.block?im(e):!1};function tm(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var nm=tm(um,0),rm=tm(lm,0),im=tm((e,t)=>lm(e,t,cm(t)),0);function am(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var om=50;function sm(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-om,r),o=e.sliceDoc(i,i+om),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+om),d=e.sliceDoc(i-om,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function cm(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function lm(e,t,n=t.selection.ranges){let r=n.map(e=>am(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>sm(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function um(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=am(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var dm=Br.define(),fm=Br.define(),pm=P.define(),mm=P.define({combine(e){return ai(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),hm=Sr.define({create(){return Pm.empty},update(e,t){let n=t.state.facet(mm),r=t.annotation(dm);if(r){let i=Sm.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?Cm(o,o.length,n.minDepth,i):km(o,t.startState.selection),new Pm(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(fm);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(Wr.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=Sm.fromTransaction(t),o=t.annotation(Wr.time),s=t.annotation(Wr.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new Pm(e.done.map(Sm.fromJSON),e.undone.map(Sm.fromJSON))}});function gm(e={}){return[hm,mm.of(e),I.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?vm:e.inputType==`historyRedo`?ym:null;return n?(e.preventDefault(),n(t)):!1}})]}function _m(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(hm,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var vm=_m(0,!1),ym=_m(1,!1),bm=_m(0,!0),xm=_m(1,!0),Sm=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&or.fromJSON(t.changes),[],t.mapped&&ar.fromJSON(t.mapped),t.startSelection&&N.fromJSON(t.startSelection),t.selectionsAfter.map(N.fromJSON))}static fromTransaction(t,n){let r=Dm;for(let e of t.startState.facet(pm)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Dm)}static selection(t){return new e(void 0,Dm,void 0,void 0,t)}};function Cm(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function wm(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function Tm(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function Em(e,t){return e.length?t.length?e.concat(t):e:t}var Dm=[],Om=200;function km(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Om));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Cm(e,e.length-1,1e9,n.setSelAfter(r)))}return[Sm.selection([t])]}function Am(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function jm(e,t){if(!e.length)return e;let n=e.length,r=Dm;for(;n;){let i=Mm(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Sm.selection(r)]:Dm}function Mm(e,t,n){let r=Em(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):Dm,n);if(!e.changes)return Sm.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new Sm(i,Ur.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Nm=/^(input\.type|delete)($|\.)/,Pm=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Nm.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,wm(s.changes,t.changes))||r==`input.type.compose`)?Cm(o,o.length-1,i.minDepth,new Sm(t.changes.compose(s.changes),Em(Ur.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,Dm)):Cm(o,o.length,i.minDepth,t),new e(o,Dm,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:Dm;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Tm(a[a.length-1],t)?this:new e(km(this.done,t),this.undone,n,r)}addMapping(t){return new e(jm(this.done,t),jm(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:dm.of({side:e,rest:Am(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?Dm:r.slice(0,r.length-1);return i.mapped&&(n=jm(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:dm.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};Pm.empty=new Pm(Dm,Dm);var Fm=[{key:`Mod-z`,run:vm,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:ym,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:ym,preventDefault:!0},{key:`Mod-u`,run:bm,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:xm,preventDefault:!0}];function Im(e,t){return N.create(e.ranges.map(t),e.mainIndex)}function Lm(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function Rm({state:e,dispatch:t},n){let r=Im(e.selection,n);return!r.eq(e.selection,!0)&&(t(Lm(e,r)),!0)}function zm(e,t){return N.cursor(t?e.to:e.from)}function Bm(e,t){return Rm(e,n=>n.empty?e.moveByChar(n,t):zm(n,t))}function Vm(e){return e.textDirectionAt(e.state.selection.main.head)==Wa.LTR}var Hm=e=>Bm(e,!Vm(e)),Um=e=>Bm(e,Vm(e));function Wm(e,t){return Rm(e,n=>n.empty?e.moveByGroup(n,t):zm(n,t))}var Gm=e=>Wm(e,!Vm(e)),Km=e=>Wm(e,Vm(e));typeof Intl<`u`&&Intl.Segmenter;function qm(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Jm(e,t,n){let r=xf(e).resolveInner(t.head),i=n?Qu.closedBy:Qu.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;qm(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?Wp(e,r.from,1):Wp(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,N.cursor(s,n?-1:1)}var Ym=e=>Rm(e,t=>Jm(e.state,t,!Vm(e))),Xm=e=>Rm(e,t=>Jm(e.state,t,Vm(e)));function Zm(e,t){return Rm(e,n=>{if(!n.empty)return zm(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var Qm=e=>Zm(e,!1),$m=e=>Zm(e,!0);function eh(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(I.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function th(e,t){let n=eh(e),{state:r}=e,i=Im(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):zm(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=I.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(Lm(r,i),{effects:a}),!0}var nh=e=>th(e,!1),rh=e=>th(e,!0);function ih(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=N.cursor(r.from+n))}return i}var ah=e=>Rm(e,t=>ih(e,t,!0)),oh=e=>Rm(e,t=>ih(e,t,!1)),sh=e=>Rm(e,t=>ih(e,t,!Vm(e))),ch=e=>Rm(e,t=>ih(e,t,Vm(e))),lh=e=>Rm(e,t=>e.moveToLineBoundary(t,!1,!1)),uh=e=>Rm(e,t=>e.moveToLineBoundary(t,!0,!1));function dh(e,t,n){let r=!1,i=Im(e.selection,t=>{let i=Wp(e,t.head,-1)||Wp(e,t.head,1)||t.head>0&&Wp(e,t.head-1,1)||t.head<e.doc.length&&Wp(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?N.range(t.anchor,a):N.cursor(a)});return r?(t(Lm(e,i)),!0):!1}var fh=({state:e,dispatch:t})=>dh(e,t,!1);function ph(e,t,n){let r=Im(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=N.range(e.head,e.anchor));let r=n(e);return N.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(Lm(e.state,r)),!0)}function mh(e,t){return ph(e,t,n=>e.moveByChar(n,t))}var hh=e=>mh(e,!Vm(e)),gh=e=>mh(e,Vm(e));function _h(e,t){return ph(e,t,n=>e.moveByGroup(n,t))}var vh=e=>_h(e,!Vm(e)),yh=e=>_h(e,Vm(e)),bh=e=>{let t=!Vm(e);return ph(e,t,n=>Jm(e.state,n,t))},xh=e=>{let t=Vm(e);return ph(e,t,n=>Jm(e.state,n,t))};function Sh(e,t){return ph(e,t,n=>e.moveVertically(n,t))}var Ch=e=>Sh(e,!1),wh=e=>Sh(e,!0);function Th(e,t){return ph(e,t,n=>e.moveVertically(n,t,eh(e).height))}var Eh=e=>Th(e,!1),Dh=e=>Th(e,!0),Oh=e=>ph(e,!0,t=>ih(e,t,!0)),kh=e=>ph(e,!1,t=>ih(e,t,!1)),Ah=e=>{let t=!Vm(e);return ph(e,t,n=>ih(e,n,t))},jh=e=>{let t=Vm(e);return ph(e,t,n=>ih(e,n,t))},Mh=e=>ph(e,!1,t=>N.cursor(e.lineBlockAt(t.head).from)),Nh=e=>ph(e,!0,t=>N.cursor(e.lineBlockAt(t.head).to)),Ph=({state:e,dispatch:t})=>(t(Lm(e,{anchor:0})),!0),Fh=({state:e,dispatch:t})=>(t(Lm(e,{anchor:e.doc.length})),!0),Ih=({state:e,dispatch:t})=>(t(Lm(e,{anchor:e.selection.main.anchor,head:0})),!0),Lh=({state:e,dispatch:t})=>(t(Lm(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),Rh=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),zh=({state:e,dispatch:t})=>{let n=ig(e).map(({from:t,to:n})=>N.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:N.create(n),userEvent:`select`})),!0},Bh=({state:e,dispatch:t})=>{let n=Im(e.selection,t=>{let n=xf(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return N.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(Lm(e,n)),!0)};function Vh(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(Lm(n,N.create(i,i.length-1))),!0)}var Hh=e=>Vh(e,!1),Uh=e=>Vh(e,!0),Wh=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=N.create([n.main]):n.main.empty||(r=N.create([N.cursor(n.main.head)])),r?(t(Lm(e,r)),!0):!1};function Gh(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=Kh(e,o,!1)):o>i&&(n=`delete.forward`,o=Kh(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=Kh(e,i,!1),a=Kh(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:N.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?I.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function Kh(e,t,n){if(e instanceof I)for(let r of e.state.facet(I.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var qh=(e,t,n)=>Gh(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=Ti(s,a.tabSize)%If(a)||If(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=Zn(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=Zn(o.text,c-o.from,!1,!1)+o.from);return c}),Jh=e=>qh(e,!1,!0),Yh=e=>qh(e,!0,!1),Xh=(e,t)=>Gh(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=Zn(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),Zh=e=>Xh(e,!1),Qh=e=>Xh(e,!0),$h=e=>Gh(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),eg=e=>Gh(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),tg=e=>Gh(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),ng=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:Bn.of([``,``])},range:N.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},rg=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:Zn(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:Zn(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:N.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function ig(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function ag(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of ig(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(N.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(N.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:N.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var og=({state:e,dispatch:t})=>ag(e,t,!1),sg=({state:e,dispatch:t})=>ag(e,t,!0);function cg(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of ig(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var lg=({state:e,dispatch:t})=>cg(e,t,!1),ug=({state:e,dispatch:t})=>cg(e,t,!0),dg=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(ig(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=Im(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function fg(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=xf(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(Qu.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var pg=hg(!1),mg=hg(!0);function hg(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&fg(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new zf(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=Rf(s,r);for(c??=Ti(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,Lf(t,c)];return o&&l.push(Lf(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:Bn.of(l)},range:N.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function gg(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:N.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var _g=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new zf(e,{overrideIndentation:e=>n[e]??-1}),i=gg(e,(t,i,a)=>{let o=Rf(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=Lf(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},vg=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(gg(e,(t,n)=>{n.push({from:t.from,insert:e.facet(Ff)})}),{userEvent:`input.indent`})),!0),yg=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(gg(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Ti(r,e.tabSize),a=0,o=Lf(e,Math.max(0,i-If(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),bg=e=>(e.setTabFocusMode(),!0),xg=[{key:`Ctrl-b`,run:Hm,shift:hh,preventDefault:!0},{key:`Ctrl-f`,run:Um,shift:gh},{key:`Ctrl-p`,run:Qm,shift:Ch},{key:`Ctrl-n`,run:$m,shift:wh},{key:`Ctrl-a`,run:lh,shift:Mh},{key:`Ctrl-e`,run:uh,shift:Nh},{key:`Ctrl-d`,run:Yh},{key:`Ctrl-h`,run:Jh},{key:`Ctrl-k`,run:$h},{key:`Ctrl-Alt-h`,run:Zh},{key:`Ctrl-o`,run:ng},{key:`Ctrl-t`,run:rg},{key:`Ctrl-v`,run:rh}],Sg=[{key:`ArrowLeft`,run:Hm,shift:hh,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:Gm,shift:vh,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:sh,shift:Ah,preventDefault:!0},{key:`ArrowRight`,run:Um,shift:gh,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:Km,shift:yh,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:ch,shift:jh,preventDefault:!0},{key:`ArrowUp`,run:Qm,shift:Ch,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:Ph,shift:Ih},{mac:`Ctrl-ArrowUp`,run:nh,shift:Eh},{key:`ArrowDown`,run:$m,shift:wh,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:Fh,shift:Lh},{mac:`Ctrl-ArrowDown`,run:rh,shift:Dh},{key:`PageUp`,run:nh,shift:Eh},{key:`PageDown`,run:rh,shift:Dh},{key:`Home`,run:oh,shift:kh,preventDefault:!0},{key:`Mod-Home`,run:Ph,shift:Ih},{key:`End`,run:ah,shift:Oh,preventDefault:!0},{key:`Mod-End`,run:Fh,shift:Lh},{key:`Enter`,run:pg,shift:pg},{key:`Mod-a`,run:Rh},{key:`Backspace`,run:Jh,shift:Jh,preventDefault:!0},{key:`Delete`,run:Yh,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:Zh,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:Qh,preventDefault:!0},{mac:`Mod-Backspace`,run:eg,preventDefault:!0},{mac:`Mod-Delete`,run:tg,preventDefault:!0}].concat(xg.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),Cg=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:Ym,shift:bh},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:Xm,shift:xh},{key:`Alt-ArrowUp`,run:og},{key:`Shift-Alt-ArrowUp`,run:lg},{key:`Alt-ArrowDown`,run:sg},{key:`Shift-Alt-ArrowDown`,run:ug},{key:`Mod-Alt-ArrowUp`,run:Hh},{key:`Mod-Alt-ArrowDown`,run:Uh},{key:`Escape`,run:Wh},{key:`Mod-Enter`,run:mg},{key:`Alt-l`,mac:`Ctrl-l`,run:zh},{key:`Mod-i`,run:Bh,preventDefault:!0},{key:`Mod-[`,run:yg},{key:`Mod-]`,run:vg},{key:`Mod-Alt-\\`,run:_g},{key:`Shift-Mod-k`,run:dg},{key:`Shift-Mod-\\`,run:fh},{key:`Mod-/`,run:em},{key:`Alt-A`,mac:`Ctrl-A`,run:rm},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:bg}].concat(Sg),wg=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,Tg=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(wg(e)):wg,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return er(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=tr(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=nr(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&e<t.length&&t.charCodeAt(e)==n?i++:a=!1}}}match(e,t,n,r,i){let a=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],o=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?a={from:n.from,to:r,precise:i&&n.precise}:(n.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<`u`&&(Tg.prototype[Symbol.iterator]=function(){return this});var Eg={from:-1,to:-1,match:/.*/.exec(``),precise:!0},Dg=`gm`+(/x/.unicode==null?``:`u`),Og=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=Eg,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new jg(e,t,n,r,i);this.re=new RegExp(t,Dg+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=Ng(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Ng(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},kg=new WeakMap,Ag=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=kg.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return kg.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),kg.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},jg=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Eg,this.matchPos=Ng(e,r),this.re=new RegExp(t,Dg+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=Ag.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=Ng(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ag.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Og.prototype[Symbol.iterator]=jg.prototype[Symbol.iterator]=function(){return this});function Mg(e){try{return new RegExp(e,Dg),!0}catch{return!1}}function Ng(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var Pg=e=>{let t=vu(e,`cm-goto-line`);if(t){let e=t.dom.querySelector(`input[type=text]`);return e&&e.select(),!0}let{state:n}=e,r=String(n.doc.lineAt(e.state.selection.main.head).number),{close:i,result:a}=_u(e,{class:`cm-goto-line`,label:n.phrase(`Go to line`),input:{type:`text`,name:`line`,value:r},focus:!0,submitLabel:n.phrase(`go`)});return a.then(t=>{let r=t&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);if(!r){e.dispatch({effects:i});return}let a=n.doc.lineAt(n.selection.main.head),[,o,s,c,l]=r,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/n.doc.lines),d=Math.round(n.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=n.doc.line(Math.max(1,Math.min(n.doc.lines,d))),p=N.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[i,I.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},Fg={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ig=P.define({combine(e){return ai(e,Fg,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Lg(e){let t=[Ug,Hg];return e&&t.push(Ig.of(e)),t}var Rg=ca.mark({class:`cm-selectionMatch`}),zg=ca.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function Bg(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=$r.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=$r.Word)}function Vg(e,t,n,r){return e(t.sliceDoc(n,n+1))==$r.Word&&e(t.sliceDoc(r-1,r))==$r.Word}var Hg=No.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Ig),{state:n}=e,r=n.selection;if(r.ranges.length>1)return ca.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return ca.none;let e=n.wordAt(i.head);if(!e)return ca.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return ca.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(Bg(o,n,i.from,i.to)&&Vg(o,n,i.from,i.to)))return ca.none}else if(a=n.sliceDoc(i.from,i.to),!a)return ca.none}let s=[];for(let r of e.visibleRanges){let e=new Tg(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||Bg(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(zg.range(r,a)):(r>=i.to||a<=i.from)&&s.push(Rg.range(r,a)),s.length>t.maxMatches))return ca.none}}return ca.set(s)}},{decorations:e=>e.decorations}),Ug=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),Wg=({state:e,dispatch:t})=>{let{selection:n}=e,r=N.create(n.ranges.map(t=>e.wordAt(t.head)||N.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function Gg(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Tg(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new Tg(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Kg=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return Wg({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=Gg(e,r);return i?(t(e.update({selection:e.selection.addRange(N.range(i.from,i.to),!1),effects:I.scrollIntoView(i.to)})),!0):!1},qg=P.define({combine(e){return ai(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new D_(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),Jg=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||Mg(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
11 +`:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new a_(this):new $g(this)}getCursor(e,t=0,n){let r=e.doc?e:ii.create({doc:e});return n??=r.doc.length,this.regexp?t_(this,r,t,n):Zg(this,r,t,n)}},Yg=class{constructor(e){this.spec=e}};function Xg(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function Zg(e,t,n,r){let i;return e.wholeWord&&(i=Qg(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=Xg(e.test,t,i)),new Tg(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function Qg(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(n_(i,n-a))!=$r.Word||t(r_(i,n-a))!=$r.Word)&&(t(r_(i,r-a))!=$r.Word||t(n_(i,r-a))!=$r.Word))}var $g=class extends Yg{constructor(e){super(e)}nextMatch(e,t,n){let r=Zg(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Zg(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=Zg(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Zg(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Zg(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function e_(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function t_(e,t,n,r){let i;return e.wholeWord&&(i=i_(t.charCategorizer(t.selection.main.head))),e.test&&(i=e_(e.test,t,i)),new Og(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function n_(e,t){return e.slice(Zn(e,t,!1),t)}function r_(e,t){return e.slice(t,Zn(e,t))}function i_(e){return(t,n,r)=>!r[0].length||(e(n_(r.input,r.index))!=$r.Word||e(r_(r.input,r.index))!=$r.Word)&&(e(r_(r.input,r.index+r[0].length))!=$r.Word||e(n_(r.input,r.index+r[0].length))!=$r.Word)}var a_=class extends Yg{nextMatch(e,t,n){let r=t_(this.spec,e,n,e.doc.length).next();return r.done&&(r=t_(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=t_(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=t_(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=t_(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},o_=Ur.define(),s_=Ur.define(),c_=Sr.define({create(e){return new l_(x_(e).create(),null)},update(e,t){for(let n of t.effects)n.is(o_)?e=new l_(n.value.create(),e.panel):n.is(s_)&&(e=new l_(e.query,n.value?b_:null));return e},provide:e=>gu.from(e,e=>e.panel)}),l_=class{constructor(e,t){this.query=e,this.panel=t}},u_=ca.mark({class:`cm-searchMatch`}),d_=ca.mark({class:`cm-searchMatch cm-searchMatch-selected`}),f_=No.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(c_))}update(e){let t=e.state.field(c_);(t!=e.startState.field(c_)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return ca.none;let{view:n}=this,r=new mi;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?d_:u_)})}return r.finish()}},{decorations:e=>e.decorations});function p_(e){return t=>{let n=t.state.field(c_,!1);return n&&n.query.spec.valid?e(t,n):w_(t)}}var m_=p_((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=N.single(r.from,r.to),a=e.state.facet(qg);return e.dispatch({selection:i,effects:[j_(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),C_(e),!0}),h_=p_((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=N.single(i.from,i.to),o=e.state.facet(qg);return e.dispatch({selection:a,effects:[j_(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),C_(e),!0}),g_=p_((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:N.create(n.map(e=>N.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),__=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new Tg(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(N.range(t.value.from,t.value.to))}return t(e.update({selection:N.create(a,o),userEvent:`select.search.matches`})),!0},v_=p_((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(I.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=N.single(o.from,o.to).map(d),u.push(j_(e,o)),u.push(n.facet(qg).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),y_=p_((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:I.announce.of(r),userEvent:`input.replace.all`}),!0});function b_(e){return e.state.facet(qg).createPanel(e)}function x_(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(qg);return new Jg({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function S_(e){let t=fu(e,b_);return t&&t.dom.querySelector(`[main-field]`)}function C_(e){let t=S_(e);t&&t==e.root.activeElement&&t.select()}var w_=e=>{let t=e.state.field(c_,!1);if(t&&t.panel){let n=S_(e);if(n&&n!=e.root.activeElement){let r=x_(e.state,t.query.spec);r.valid&&e.dispatch({effects:o_.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[s_.of(!0),t?o_.of(x_(e.state,t.query.spec)):Ur.appendConfig.of(N_)]});return!0},T_=e=>{let t=e.state.field(c_,!1);if(!t||!t.panel)return!1;let n=fu(e,b_);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:s_.of(!1)}),!0},E_=[{key:`Mod-f`,run:w_,scope:`editor search-panel`},{key:`F3`,run:m_,shift:h_,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:m_,shift:h_,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:T_,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:__},{key:`Mod-Alt-g`,run:Pg},{key:`Mod-d`,run:Kg,preventDefault:!0}],D_=class{constructor(e){this.view=e;let t=this.query=e.state.field(c_).query.spec;this.commit=this.commit.bind(this),this.searchField=Vi(`input`,{value:t.search,placeholder:O_(e,`Find`),"aria-label":O_(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=Vi(`input`,{value:t.replace,placeholder:O_(e,`Replace`),"aria-label":O_(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=Vi(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=Vi(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=Vi(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return Vi(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=Vi(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>m_(e),[O_(e,`next`)]),n(`prev`,()=>h_(e),[O_(e,`previous`)]),n(`select`,()=>g_(e),[O_(e,`all`)]),Vi(`label`,null,[this.caseField,O_(e,`match case`)]),Vi(`label`,null,[this.reField,O_(e,`regexp`)]),Vi(`label`,null,[this.wordField,O_(e,`by word`)]),...e.state.readOnly?[]:[Vi(`br`),this.replaceField,n(`replace`,()=>v_(e),[O_(e,`replace`)]),n(`replaceAll`,()=>y_(e),[O_(e,`replace all`)])],Vi(`button`,{name:`close`,onclick:()=>T_(e),"aria-label":O_(e,`close`),type:`button`},[`×`])])}commit(){let e=new Jg({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:o_.of(e)}))}keydown(e){$l(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?h_:m_)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),v_(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(o_)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(qg).top}};function O_(e,t){return e.state.phrase(t)}var k_=30,A_=/[\s\.,:;?!]/;function j_(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-k_),o=Math.min(i,n+k_),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<k_;e++)if(!A_.test(s[e+1])&&A_.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-k_;e--)if(!A_.test(s[e-1])&&A_.test(s[e])){s=s.slice(0,e);break}}return I.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var M_=I.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`}}),N_=[c_,Tr.low(f_),M_],P_=f(u(((e,t)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()}))()),F_={primary:`wcpos:bg-wp-admin-theme-color wcpos:text-white wcpos:hover:bg-wp-admin-theme-color-darker-10 wcpos:focus:ring-wp-admin-theme-color`,secondary:`wcpos:bg-white wcpos:text-gray-700 wcpos:border wcpos:border-gray-300 wcpos:hover:bg-gray-50 wcpos:focus:ring-wp-admin-theme-color`,destructive:`wcpos:bg-red-600 wcpos:text-white wcpos:hover:bg-red-700 wcpos:focus:ring-red-500`,outline:`wcpos:bg-transparent wcpos:text-wp-admin-theme-color wcpos:border wcpos:border-wp-admin-theme-color wcpos:hover:bg-wp-admin-theme-color-lightest wcpos:focus:ring-wp-admin-theme-color`,ghost:`wcpos:bg-transparent wcpos:text-gray-700 wcpos:hover:bg-gray-100 wcpos:focus:ring-wp-admin-theme-color`,"ghost-destructive":`wcpos:bg-transparent wcpos:text-red-600 wcpos:hover:bg-red-50 wcpos:focus:ring-red-500`,text:`wcpos:bg-transparent wcpos:text-wp-admin-theme-color wcpos:hover:underline wcpos:focus:ring-wp-admin-theme-color`};function I_(e){return e===`danger`?`destructive`:e}function L_({variant:e=`secondary`,loading:t=!1,disabled:n,className:r,children:i,type:a=`button`,...o}){let s=n||t,c=I_(e);return(0,M.jsxs)(`button`,{type:a,disabled:s,className:(0,P_.default)(`wcpos:inline-flex wcpos:items-center wcpos:justify-center wcpos:rounded-md wcpos:text-sm wcpos:font-medium wcpos:transition-colors wcpos:duration-150`,`wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-offset-2`,c===`text`?`wcpos:px-0 wcpos:py-0`:`wcpos:px-3 wcpos:py-1.5`,F_[c],s?`wcpos:opacity-50 wcpos:cursor-not-allowed`:`wcpos:cursor-pointer`,r),...o,children:[t&&(0,M.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,className:`wcpos:mr-2 wcpos:h-4 wcpos:w-4 wcpos:animate-spin`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,M.jsx)(`circle`,{className:`wcpos:opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,M.jsx)(`path`,{className:`wcpos:opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),i]})}var R_=t.forwardRef(({error:e,className:t,type:n=`text`,...r},i)=>(0,M.jsx)(`input`,{ref:i,type:n,"aria-invalid":e||void 0,className:(0,P_.default)(`wcpos:block wcpos:w-full wcpos:rounded-md wcpos:border wcpos:px-2.5 wcpos:py-1.5 wcpos:text-sm wcpos:shadow-xs`,`wcpos:transition-colors wcpos:duration-150`,`wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-offset-0`,e?`wcpos:border-red-300 wcpos:focus:border-red-500 wcpos:focus:ring-red-500`:`wcpos:border-gray-300 wcpos:focus:border-wp-admin-theme-color wcpos:focus:ring-wp-admin-theme-color`,r.disabled&&`wcpos:bg-gray-50 wcpos:text-gray-500 wcpos:cursor-not-allowed`,t),...r}));R_.displayName=`TextInput`;var z_=t.forwardRef(({error:e,className:t,...n},r)=>(0,M.jsx)(`textarea`,{ref:r,"aria-invalid":e||void 0,className:(0,P_.default)(`wcpos:block wcpos:w-full wcpos:rounded-md wcpos:border wcpos:px-2.5 wcpos:py-1.5 wcpos:text-sm wcpos:shadow-xs`,`wcpos:transition-colors wcpos:duration-150`,`wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-offset-0`,e?`wcpos:border-red-300 wcpos:focus:border-red-500 wcpos:focus:ring-red-500`:`wcpos:border-gray-300 wcpos:focus:border-wp-admin-theme-color wcpos:focus:ring-wp-admin-theme-color`,n.disabled&&`wcpos:bg-gray-50 wcpos:text-gray-500 wcpos:cursor-not-allowed`,t),...n}));z_.displayName=`TextArea`;function B_({value:e,options:t,onChange:n,placeholder:r,disabled:i,className:a,inline:o,...s}){return(0,M.jsxs)(`select`,{value:String(e),onChange:e=>{let r=t.find(t=>String(t.value)===e.target.value);r&&n(r)},disabled:i,className:(0,P_.default)(o?`wcpos:inline-block`:`wcpos:block wcpos:w-full`,`wcpos:rounded-md wcpos:border wcpos:border-gray-300 wcpos:bg-white wcpos:px-2.5 wcpos:py-1.5 wcpos:text-sm wcpos:shadow-xs`,`wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-wp-admin-theme-color wcpos:focus:border-wp-admin-theme-color`,i&&`wcpos:bg-gray-50 wcpos:text-gray-500 wcpos:cursor-not-allowed`,a),...s,children:[r&&(0,M.jsx)(`option`,{value:``,disabled:!0,children:r}),t.map(e=>(0,M.jsx)(`option`,{value:String(e.value),disabled:!!e.disabled,children:e.label},String(e.value)))]})}var V_=`wcpos:flex wcpos:w-full wcpos:items-center wcpos:justify-between wcpos:gap-2 wcpos:rounded-md wcpos:border wcpos:border-gray-300 wcpos:bg-white wcpos:px-2.5 wcpos:py-1.5 wcpos:text-left wcpos:text-sm wcpos:shadow-xs wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-wp-admin-theme-color wcpos:focus:border-wp-admin-theme-color`,H_=`wcpos:bg-gray-50 wcpos:text-gray-500 wcpos:cursor-not-allowed`;function U_(e){return e.toLowerCase()}function W_({countries:e,value:r,onChange:i,placeholder:a,searchPlaceholder:o,noResultsLabel:s,clearable:c=!1,clearLabel:l,disabled:u,className:d,id:f,"aria-label":p}){let m=t.useRef(null),h=t.useRef(null),g=t.useRef(null),_=t.useRef(null),[v,y]=t.useState(!1),[b,x]=t.useState(``),[S,C]=t.useState(0),[w,T]=t.useState({top:0,left:0,width:0}),E=t.useId(),D=t.useMemo(()=>Object.entries(e).map(([e,t])=>({value:e,label:t})).sort((e,t)=>e.label.localeCompare(t.label)),[e]),O=t.useMemo(()=>{let e=U_(b.trim());return e?D.filter(t=>U_(t.label).includes(e)||U_(t.value).includes(e)):D},[D,b]),k=t.useMemo(()=>c?[{value:``,label:l??`—`,isClear:!0},...O]:O,[c,l,O]),A=r?e[r]:``,ee=t.useCallback(()=>{if(!m.current)return;let e=m.current.getBoundingClientRect();T({top:e.bottom+4,left:e.left,width:e.width})},[]),te=t.useCallback(()=>{y(!1),x(``)},[]),ne=t.useCallback(()=>{if(u)return;y(!0);let e=r?Math.max(0,k.findIndex(e=>!e.isClear&&e.value===r)):+!!c;C(Math.min(e,Math.max(0,k.length-1)))},[c,u,k,r]),re=t.useCallback(e=>{i(e),te(),m.current?.focus()},[te,i]);t.useLayoutEffect(()=>{if(!v)return;ee();let e=requestAnimationFrame(()=>g.current?.focus());return()=>cancelAnimationFrame(e)},[v,ee]),t.useEffect(()=>{if(!v)return;let e=e=>{let t=e.target;m.current?.contains(t)||h.current?.contains(t)||te()};return document.addEventListener(`mousedown`,e),window.addEventListener(`scroll`,ee,!0),window.addEventListener(`resize`,ee),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`scroll`,ee,!0),window.removeEventListener(`resize`,ee)}},[v,te,ee]),t.useEffect(()=>{v&&C(e=>k.length===0?0:e>=k.length?k.length-1:e)},[v,k]),t.useEffect(()=>{v&&_.current&&_.current.querySelector(`[data-index="${S}"]`)?.scrollIntoView?.({block:`nearest`})},[v,S]);let ie=e=>{u||(e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),ne())},ae=e=>{switch(e.key){case`ArrowDown`:e.preventDefault(),C(e=>k.length===0?0:(e+1)%k.length);break;case`ArrowUp`:e.preventDefault(),C(e=>k.length===0?0:(e-1+k.length)%k.length);break;case`Home`:e.preventDefault(),C(0);break;case`End`:e.preventDefault(),C(Math.max(0,k.length-1));break;case`Enter`:e.preventDefault(),k[S]&&re(k[S].value);break;case`Escape`:e.preventDefault(),te(),m.current?.focus();break;case`Tab`:te()}},oe=k.length>0?`${E}-option-${S}`:void 0;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`button`,{ref:m,id:f,type:`button`,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":v,"aria-controls":v?E:void 0,"aria-label":p,disabled:u,onClick:()=>v?te():ne(),onKeyDown:ie,className:(0,P_.default)(V_,u&&H_,d),children:[(0,M.jsx)(`span`,{className:(0,P_.default)(`wcpos:truncate`,!A&&`wcpos:text-gray-500`),children:A||a||``}),(0,M.jsx)(`svg`,{"aria-hidden":`true`,className:`wcpos:h-4 wcpos:w-4 wcpos:text-gray-400 wcpos:shrink-0`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,d:`M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 011.08 1.04l-4.24 4.38a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z`,clipRule:`evenodd`})})]}),v&&n.createPortal((0,M.jsxs)(`div`,{ref:h,className:`wcpos:fixed wcpos:z-[99999] wcpos:rounded-md wcpos:border wcpos:border-gray-200 wcpos:bg-white wcpos:shadow-lg`,style:{top:w.top,left:w.left,width:w.width},children:[(0,M.jsx)(`div`,{className:`wcpos:p-2 wcpos:border-b wcpos:border-gray-100`,children:(0,M.jsx)(`input`,{ref:g,type:`text`,role:`searchbox`,"aria-autocomplete":`list`,"aria-controls":E,"aria-activedescendant":oe,value:b,onChange:e=>x(e.target.value),onKeyDown:ae,placeholder:o,className:`wcpos:block wcpos:w-full wcpos:rounded wcpos:border wcpos:border-gray-300 wcpos:bg-white wcpos:px-2 wcpos:py-1 wcpos:text-sm wcpos:focus:outline-none wcpos:focus:ring-2 wcpos:focus:ring-wp-admin-theme-color wcpos:focus:border-wp-admin-theme-color`})}),(0,M.jsxs)(`ul`,{ref:_,id:E,role:`listbox`,"aria-label":p,className:`wcpos:m-0 wcpos:max-h-60 wcpos:list-none wcpos:overflow-auto wcpos:p-1`,children:[k.map((e,t)=>{let n=t===S,i=e.isClear?r===``:e.value===r;return(0,M.jsx)(`li`,{id:`${E}-option-${t}`,"data-index":t,role:`option`,"aria-selected":i,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>C(t),onClick:()=>re(e.value),className:(0,P_.default)(`wcpos:flex wcpos:cursor-pointer wcpos:items-center wcpos:gap-2 wcpos:rounded wcpos:px-2 wcpos:py-1 wcpos:text-sm`,e.isClear?`wcpos:text-gray-500`:`wcpos:justify-between wcpos:text-gray-700`,n&&`wcpos:bg-gray-100`,i&&(e.isClear?`wcpos:font-medium wcpos:text-gray-700`:`wcpos:font-medium`)),children:e.isClear?(0,M.jsx)(`span`,{className:`wcpos:truncate`,children:e.label}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`wcpos:truncate`,children:e.label}),(0,M.jsx)(`span`,{className:`wcpos:text-xs wcpos:text-gray-400`,children:e.value})]})},e.isClear?`__clear__`:e.value)}),O.length===0&&(0,M.jsx)(`li`,{role:`presentation`,className:`wcpos:px-2 wcpos:py-2 wcpos:text-sm wcpos:text-gray-500`,children:s??`No results`})]})]}),document.body)]})}function G_({text:e,children:r,className:i}){let a=t.useRef(null),[o,s]=t.useState(!1),[c,l]=t.useState({top:0,left:0}),u=t.useId(),d=t.useCallback(()=>{if(!a.current)return;let e=a.current.getBoundingClientRect();l({top:e.top-4,left:e.left+e.width/2})},[]),f=t.useCallback(()=>{d(),s(!0)},[d]),p=t.useCallback(()=>s(!1),[]);return t.useEffect(()=>{if(o)return window.addEventListener(`scroll`,d,!0),window.addEventListener(`resize`,d),()=>{window.removeEventListener(`scroll`,d,!0),window.removeEventListener(`resize`,d)}},[o,d]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{ref:a,className:(0,P_.default)(`wcpos:inline-flex`,i),onMouseEnter:f,onMouseLeave:p,onFocus:f,onBlur:p,"aria-describedby":o?u:void 0,tabIndex:0,children:r}),o&&n.createPortal((0,M.jsx)(`span`,{id:u,role:`tooltip`,className:`wcpos:fixed wcpos:z-[99999] wcpos:whitespace-nowrap wcpos:rounded wcpos:bg-gray-900 wcpos:px-2 wcpos:py-1 wcpos:text-xs wcpos:text-white wcpos:shadow-lg wcpos:pointer-events-none wcpos:-translate-x-1/2 wcpos:-translate-y-full`,style:{top:c.top,left:c.left},children:e}),document.body)]})}t.createContext(null);var K_={neutral:`wcpos:bg-gray-100 wcpos:text-gray-700`,info:`wcpos:bg-blue-50 wcpos:text-blue-700`,success:`wcpos:bg-green-50 wcpos:text-green-700`,warning:`wcpos:bg-amber-50 wcpos:text-amber-700`,error:`wcpos:bg-red-50 wcpos:text-red-700`,critical:`wcpos:bg-red-100 wcpos:text-red-800`,debug:`wcpos:bg-gray-100 wcpos:text-gray-600`,brand:`wcpos:bg-wp-admin-theme-color wcpos:text-white wcpos:uppercase wcpos:font-semibold wcpos:tracking-wide`},q_={sm:`wcpos:text-xs wcpos:px-2 wcpos:py-0.5`,xs:`wcpos:text-[10px] wcpos:px-1.5 wcpos:py-0.5`},J_={pill:`wcpos:rounded-full`,round:`wcpos:rounded-full wcpos:min-w-5 wcpos:justify-center`};function Y_({variant:e=`neutral`,shape:t=`pill`,size:n=`sm`,icon:r,className:i,children:a,...o}){return(0,M.jsxs)(`span`,{className:(0,P_.default)(`wcpos:inline-flex wcpos:items-center wcpos:gap-1 wcpos:font-medium wcpos:leading-none wcpos:shrink-0`,K_[e],q_[n],J_[t],i),...o,children:[r,a]})}t.createContext(null);function X_({className:e,tableClassName:t,children:n,...r}){return(0,M.jsx)(`div`,{className:(0,P_.default)(`wcpos:overflow-x-auto wcpos:rounded-md wcpos:border wcpos:border-gray-200`,e),...r,children:(0,M.jsx)(`table`,{className:(0,P_.default)(`wcpos:w-full wcpos:text-sm`,t),children:n})})}function Z_({className:e,children:t,...n}){return(0,M.jsx)(`thead`,{className:e,...n,children:t})}function Q_({className:e,children:t,...n}){return(0,M.jsx)(`tbody`,{className:e,...n,children:t})}var $_=t.forwardRef(function({className:e,children:t,...n},r){return(0,M.jsx)(`tr`,{ref:r,className:(0,P_.default)(`wcpos:bg-gray-50 wcpos:text-left wcpos:text-xs wcpos:uppercase wcpos:tracking-wide wcpos:text-gray-500`,e),...n,children:t})}),ev=t.forwardRef(function({className:e,children:t,...n},r){return(0,M.jsx)(`tr`,{ref:r,className:(0,P_.default)(`wcpos:border-t wcpos:border-gray-100`,e),...n,children:t})}),tv=t.forwardRef(function({className:e,children:t,...n},r){return(0,M.jsx)(`th`,{ref:r,className:(0,P_.default)(`wcpos:px-3 wcpos:py-2 wcpos:font-medium`,e),...n,children:t})}),nv=t.forwardRef(function({className:e,children:t,...n},r){return(0,M.jsx)(`td`,{ref:r,className:(0,P_.default)(`wcpos:px-3 wcpos:py-2 wcpos:align-middle`,e),...n,children:t})});X_.Header=Z_,X_.HeaderRow=$_,X_.Body=Q_,X_.Row=ev,X_.Head=tv,X_.Cell=nv;var rv=[{value:`eu_vat`,label:`EU VAT`},{value:`gb_vat`,label:`GB VAT`},{value:`au_abn`,label:`AU ABN`},{value:`br_cpf`,label:`BR CPF`},{value:`br_cnpj`,label:`BR CNPJ`},{value:`in_gst`,label:`IN GSTIN`},{value:`it_cf`,label:`IT Codice Fiscale`},{value:`it_piva`,label:`IT Partita IVA`},{value:`es_nif`,label:`ES NIF`},{value:`ar_cuit`,label:`AR CUIT`},{value:`sa_vat`,label:`SA VAT`},{value:`ca_gst_hst`,label:`CA GST/HST`},{value:`us_ein`,label:`US EIN`},{value:`de_ust_id`,label:`DE USt-IdNr.`},{value:`de_steuernummer`,label:`DE Steuernummer`},{value:`de_hrb`,label:`DE HRB`},{value:`nl_kvk`,label:`NL KVK`},{value:`fr_siret`,label:`FR SIRET`},{value:`fr_siren`,label:`FR SIREN`},{value:`gb_company`,label:`GB Company number`},{value:`ch_uid`,label:`CH UID`},{value:`other`,label:`Other`}],iv={eu_vat:`DE123456789`,gb_vat:`GB123456789`,au_abn:`12345678901`,br_cpf:`123.456.789-09`,br_cnpj:`12.345.678/0001-95`,in_gst:`22AAAAA0000A1Z5`,it_cf:`RSSMRA80A01H501U`,it_piva:`12345678901`,es_nif:`B12345674`,ar_cuit:`20-12345678-3`,sa_vat:`300123456700003`,ca_gst_hst:`123456789RT0001`,us_ein:`12-3456789`,de_ust_id:`DE123456789`,de_steuernummer:`12/345/67890`,de_hrb:`HRB 12345`,nl_kvk:`12345678`,fr_siret:`12345678901234`,fr_siren:`123456789`,gb_company:`12345678`,ch_uid:`CHE-123.456.789`},av={AR:`ar_cuit`,AU:`au_abn`,BR:`br_cnpj`,CA:`ca_gst_hst`,CH:`ch_uid`,DE:`de_ust_id`,ES:`es_nif`,FR:`fr_siret`,GB:`gb_vat`,IN:`in_gst`,IT:`it_piva`,NL:`nl_kvk`,SA:`sa_vat`,US:`us_ein`},ov={ar_cuit:`AR`,au_abn:`AU`,br_cpf:`BR`,br_cnpj:`BR`,ca_gst_hst:`CA`,ch_uid:`CH`,de_hrb:`DE`,de_steuernummer:`DE`,de_ust_id:`DE`,es_nif:`ES`,fr_siren:`FR`,fr_siret:`FR`,gb_company:`GB`,gb_vat:`GB`,in_gst:`IN`,it_cf:`IT`,it_piva:`IT`,nl_kvk:`NL`,sa_vat:`SA`,us_ein:`US`},sv=new Set(`AT.BE.BG.CY.CZ.DE.DK.EE.ES.FI.FR.GR.HR.HU.IE.IT.LT.LU.LV.MT.NL.PL.PT.RO.SE.SI.SK`.split(`.`));function cv(e){if(!e)return`other`;let t=e.toUpperCase();return av[t]?av[t]:sv.has(t)?`eu_vat`:`other`}function lv(e,t){if(e===`eu_vat`){let e=t?.toUpperCase();if(e&&sv.has(e))return e;let n=window?.wcpos?.settings?.storeCountry?.toUpperCase();return n&&sv.has(n)?n:void 0}return ov[e]}function uv(e,t){return iv[e]??t}var dv=e=>{let t={type:e.type||`other`,value:e.value||``};return e.country&&(t.country=e.country),e.label&&(t.label=e.label),t},fv=(e,t)=>{if(typeof t.country==`string`&&t.country)return{...t,type:cv(t.country)};if(typeof t.type==`string`){let n=lv(t.type,e.country);if(n)return{...t,country:n};if(t.type===`eu_vat`)return{...t,country:void 0}}return t},pv=0,mv=()=>`tax-id-row-${++pv}`;function hv({taxId:e,labels:n,onChangeField:r,onRemove:i}){let[a,o]=t.useState(e.value),[s,c]=t.useState(e.label??``),l=window?.wcpos?.settings?.countries??{};return t.useEffect(()=>{o(e.value)},[e.value]),t.useEffect(()=>{c(e.label??``)},[e.label]),(0,M.jsxs)(ev,{children:[(0,M.jsx)(nv,{children:(0,M.jsx)(B_,{"aria-label":n.type,value:e.type,options:rv,onChange:({value:e})=>r({type:String(e)})})}),(0,M.jsx)(nv,{children:(0,M.jsx)(R_,{"aria-label":n.value,placeholder:uv(e.type,n.value),value:a,onChange:e=>o(e.target.value),onBlur:()=>{let t=a.trim();t!==e.value&&r({value:t})}})}),(0,M.jsx)(nv,{children:(0,M.jsx)(W_,{"aria-label":n.country,countries:l,value:e.country??``,onChange:e=>r({country:e}),placeholder:n.countryPlaceholder??n.country,searchPlaceholder:n.countrySearchPlaceholder,noResultsLabel:n.countryNoResults,clearable:!0,clearLabel:n.countryClear})}),(0,M.jsx)(nv,{children:(0,M.jsx)(R_,{"aria-label":n.label,placeholder:n.label,value:s,onChange:e=>c(e.target.value),onBlur:()=>{let t=s.trim();t!==(e.label??``)&&r({label:t})}})}),(0,M.jsx)(nv,{className:`wcpos:text-right`,children:(0,M.jsx)(L_,{variant:`ghost-destructive`,onMouseDown:e=>e.preventDefault(),onClick:i,children:n.remove})})]})}t.forwardRef(function({value:e,onChange:n,labels:r},i){let a=t.useMemo(()=>Array.isArray(e)?e.map(dv):[],[e]),[o,s]=t.useState(()=>a.map(()=>mv())),[c,l]=t.useState(null);t.useEffect(()=>{s(e=>{if(e.length===a.length)return e;if(e.length<a.length){let t=Array.from({length:a.length-e.length},()=>mv());return[...e,...t]}return e.slice(0,a.length)})},[a.length]);let u=t.useCallback((e,t)=>{if(e>=a.length&&c){let e=fv(c.taxId,t),r=dv({...c.taxId,...e});if(t.value&&r.value){s(e=>[...e,c.id]),l(null),n([...a,r]);return}l({id:c.id,taxId:r});return}n(a.map((n,r)=>{if(r!==e)return n;let i=fv(n,t);return dv({...n,...i})}))},[c,n,a]),d=t.useCallback(e=>{if(e>=a.length){l(null);return}s(t=>t.filter((t,n)=>n!==e)),n(a.filter((t,n)=>n!==e))},[n,a]),f=t.useCallback(()=>{l(e=>{if(e)return e;let t=window?.wcpos?.settings?.storeCountry,n={type:cv(t),value:``};return t&&(n.country=t),{id:mv(),taxId:n}})},[]);t.useImperativeHandle(i,()=>({addRow:f}),[f]);let p=t.useMemo(()=>{let e=a.map((e,t)=>({id:o[t]??`tax-id-row-fallback-${t}`,taxId:e}));return c&&e.push({id:c.id,taxId:c.taxId}),e},[a,o,c]);return p.length===0?(0,M.jsxs)(`div`,{className:`wcpos:space-y-3`,children:[(0,M.jsx)(`p`,{className:`wcpos:rounded-md wcpos:border wcpos:border-dashed wcpos:border-gray-300 wcpos:bg-gray-50 wcpos:px-3 wcpos:py-4 wcpos:text-center wcpos:text-sm wcpos:text-gray-500`,children:r.empty}),(0,M.jsx)(L_,{variant:`outline`,onClick:f,children:r.add})]}):(0,M.jsxs)(`div`,{className:`wcpos:space-y-3`,children:[(0,M.jsxs)(X_,{children:[(0,M.jsx)(Z_,{children:(0,M.jsxs)($_,{children:[(0,M.jsx)(tv,{style:{width:`11rem`},children:r.type}),(0,M.jsx)(tv,{children:r.value}),(0,M.jsx)(tv,{style:{width:`12rem`},children:r.country}),(0,M.jsx)(tv,{children:r.label}),(0,M.jsx)(tv,{className:`wcpos:text-right`,style:{width:`1%`},children:(0,M.jsx)(`span`,{className:`wcpos:sr-only`,children:r.remove})})]})}),(0,M.jsx)(Q_,{children:p.map((e,t)=>(0,M.jsx)(hv,{taxId:e.taxId,labels:r,onChangeField:e=>u(t,e),onRemove:()=>d(t)},e.id))})]}),(0,M.jsx)(L_,{variant:`outline`,onClick:f,children:r.add})]})});var gv=[10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200],_v={a4:{width:794,height:1123},"58mm":{width:219,height:520},"80mm":{width:302,height:520}};function vv(e,t,n,r){if(n<=0||r<=0)return 100;let i=gv.filter(e=>e<=100).slice().reverse();for(let a of i){let i=a/100;if(e*i<=n&&t*i<=r)return a}return i[i.length-1]}function yv({children:e,paperWidth:n=`a4`,zoomInLabel:r,zoomOutLabel:i,className:a,contentClassName:o,...s}){let c=t.useRef(null),l=t.useRef(null),u=_v[n],[d,f]=t.useState(null),p=d?.width??u.width,m=d?.height??u.height,[h,g]=t.useState(100),[_,v]=t.useState(!1),[y,b]=t.useState(n);y!==n&&(b(n),f(null),v(!1)),t.useEffect(()=>{let e=l.current;if(!e)return;let t=null,n=null,r=()=>{let e=null;try{e=t?.contentDocument?.body??null}catch{return}if(!e)return;let n=e.scrollWidth,r=e.scrollHeight;n<=0||r<=0||f(e=>e&&e.width===n&&e.height===r?e:{width:n,height:r})},i=()=>{let e=null;try{e=t?.contentDocument??null}catch{e=null}if(n?.disconnect(),n=null,!e?.body){f(e=>e===null?e:null);return}if(!e.getElementById(`wcpos-preview-reset`)){let t=e.createElement(`style`);t.id=`wcpos-preview-reset`,t.textContent=`html,body{margin:0;padding:0;overflow:hidden;}`,e.head?.appendChild(t)}r(),typeof ResizeObserver<`u`&&(n=new ResizeObserver(r),n.observe(e.body))},a=()=>{let r=e.querySelector(`iframe`);if(r!==t&&(t?.removeEventListener(`load`,i),n?.disconnect(),n=null,t=r,t)){t.addEventListener(`load`,i);try{t.contentDocument?.readyState===`complete`&&i()}catch{f(e=>e===null?e:null)}}};a();let o=new MutationObserver(a);return o.observe(e,{childList:!0,subtree:!0}),()=>{o.disconnect(),t?.removeEventListener(`load`,i),n?.disconnect()}},[]),t.useLayoutEffect(()=>{if(_)return;let e=c.current;if(!e)return;let t=()=>{if(_)return;let t=e.clientWidth-32,n=e.clientHeight-32;t<=0||n<=0||g(vv(p,m,t,n))};if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[p,m,_]);let x=h/100,S=gv.indexOf(h),C=S>0,w=S<gv.length-1,T=e=>{let t=Math.max(0,Math.min(gv.length-1,S+e));v(!0),g(gv[t])},E=`wcpos:flex wcpos:h-7 wcpos:w-7 wcpos:cursor-pointer wcpos:items-center wcpos:justify-center wcpos:border-0 wcpos:bg-transparent wcpos:text-base wcpos:leading-none wcpos:text-gray-700 wcpos:hover:bg-gray-100 wcpos:disabled:cursor-default wcpos:disabled:text-gray-300 wcpos:disabled:hover:bg-transparent`;return(0,M.jsxs)(`div`,{ref:c,className:(0,P_.default)(`wcpos:relative wcpos:flex wcpos:min-h-0 wcpos:flex-1 wcpos:flex-col wcpos:rounded wcpos:border wcpos:border-gray-200 wcpos:bg-gray-100`,a),...s,children:[(0,M.jsxs)(`div`,{"data-testid":`preview-viewport-zoom-controls`,className:`wcpos:absolute wcpos:top-2 wcpos:right-2 wcpos:z-10 wcpos:inline-flex wcpos:items-stretch wcpos:overflow-hidden wcpos:rounded-md wcpos:border wcpos:border-gray-300 wcpos:bg-white/95 wcpos:shadow-sm`,children:[(0,M.jsx)(`button`,{type:`button`,"aria-label":i,title:i,disabled:!C,onClick:()=>T(-1),className:E,children:`−`}),(0,M.jsxs)(`span`,{"data-testid":`preview-viewport-zoom-value`,className:`wcpos:inline-flex wcpos:min-w-[44px] wcpos:items-center wcpos:justify-center wcpos:border-l wcpos:border-r wcpos:border-gray-200 wcpos:px-2 wcpos:text-xs wcpos:tabular-nums wcpos:text-gray-700`,role:`status`,"aria-label":`Zoom ${h}%`,"aria-live":`polite`,children:[h,`%`]}),(0,M.jsx)(`button`,{type:`button`,"aria-label":r,title:r,disabled:!w,onClick:()=>T(1),className:E,children:`+`})]}),(0,M.jsx)(`div`,{"data-testid":`preview-viewport-scroll-area`,className:`wcpos:min-h-0 wcpos:flex-1 wcpos:overflow-auto wcpos:p-4`,children:(0,M.jsx)(`div`,{"data-testid":`preview-viewport-canvas-frame`,className:`wcpos:mx-auto wcpos:overflow-hidden`,style:{width:p*x,height:m*x},children:(0,M.jsx)(`div`,{ref:l,"data-testid":`preview-viewport-canvas`,className:o,style:{width:p,height:m,transform:`scale(${x})`,transformOrigin:`top left`},children:e})})})]})}function bv({label:e,onClick:t,pressed:n,children:r}){return(0,M.jsx)(G_,{text:e,children:(0,M.jsx)(`button`,{type:`button`,onClick:t,"aria-label":e,"aria-pressed":typeof n==`boolean`?n:void 0,className:[`wcpos:inline-flex wcpos:items-center wcpos:justify-center`,`wcpos:w-7 wcpos:h-7 wcpos:rounded wcpos:border-0 wcpos:cursor-pointer`,`wcpos:transition-colors wcpos:duration-150`,n?`wcpos:bg-blue-100 wcpos:text-wp-admin-theme-color`:`wcpos:bg-transparent wcpos:text-gray-600 wcpos:hover:bg-gray-200 wcpos:hover:text-gray-900`].join(` `),children:r})})}function xv(e){let t=new Set;return dp(e.state).between(0,e.state.doc.length,(e,n)=>{t.add(`${e}:${n}`)}),t}function Sv(e){Cf(e,e.state.doc.length);let t=xv(e),n=[],r=new Set(t);for(let t=0;t<e.state.doc.length;){let i=e.lineBlockAt(t),a=ip(e.state,i.from,i.to);if(a){let e=`${a.from}:${a.to}`;r.has(e)||(r.add(e),n.push(op.of(a)))}t=i.to+1}return n.length?(e.dispatch({effects:n}),!0):vp(e)}var Cv={undo:(0,M.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M5 4 L2 7 L5 10 M2 7 H9 a3 3 0 0 1 0 6 H6`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),redo:(0,M.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M9 4 L12 7 L9 10 M12 7 H5 a3 3 0 0 0 0 6 H8`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),find:(0,M.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:[(0,M.jsx)(`circle`,{cx:`6`,cy:`6`,r:`3.8`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,M.jsx)(`path`,{d:`M9 9 L12.5 12.5`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`})]}),wrap:(0,M.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M1.5 3 H12.5 M1.5 7 H10.5 a2 2 0 1 1 0 4 H7 L8.5 9.5 M8.5 12.5 L7 11 M1.5 11 H4`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),fold:(0,M.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:[(0,M.jsx)(`path`,{d:`M3 3.5 H11 M3 7 H11 M3 10.5 H11`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,M.jsx)(`path`,{d:`M5 5 L7 7 L9 5 M5 8.5 L7 10.5 L9 8.5`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),unfold:(0,M.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:[(0,M.jsx)(`path`,{d:`M3 3.5 H11 M3 7 H11 M3 10.5 H11`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,M.jsx)(`path`,{d:`M5 9 L7 7 L9 9 M5 5 L7 3 L9 5`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`,strokeLinejoin:`round`})]})};function wv({viewRef:e,wrap:n,onToggleWrap:r}){let i=(0,t.useCallback)(t=>()=>{let n=e.current;n&&(t(n),n.focus())},[e]);return(0,M.jsxs)(`div`,{className:`wcpos:flex wcpos:items-center wcpos:gap-1 wcpos:px-2 wcpos:py-1.5 wcpos:border-b wcpos:border-gray-200 wcpos:bg-gray-50`,children:[(0,M.jsx)(bv,{label:j(`editor.toolbar.undo`),onClick:i(vm),children:Cv.undo}),(0,M.jsx)(bv,{label:j(`editor.toolbar.redo`),onClick:i(ym),children:Cv.redo}),(0,M.jsx)(`span`,{className:`wcpos:w-px wcpos:h-5 wcpos:bg-gray-200 wcpos:mx-1`,"aria-hidden":`true`}),(0,M.jsx)(bv,{label:j(`editor.toolbar.find`),onClick:i(w_),children:Cv.find}),(0,M.jsx)(bv,{label:j(`editor.toolbar.wrap`),onClick:r,pressed:n,children:Cv.wrap}),(0,M.jsx)(`span`,{className:`wcpos:w-px wcpos:h-5 wcpos:bg-gray-200 wcpos:mx-1`,"aria-hidden":`true`}),(0,M.jsx)(bv,{label:j(`editor.toolbar.fold_all`),onClick:i(Sv),children:Cv.fold}),(0,M.jsx)(bv,{label:j(`editor.toolbar.unfold_all`),onClick:i(yp),children:Cv.unfold})]})}function Tv(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function Ev(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=Tv(t)+Tv(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function Dv(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:Ev(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function Ov(e,t){return n=>{for(let t=xf(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var kv=Br.define();typeof navigator==`object`&&navigator.platform;var Av=I.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),jv=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Mv=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,ir.TrackDel),r=t.mapPos(this.to,1,ir.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},Nv=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(Ff);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new Mv(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new jv(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},Pv=ca.widget({widget:new class extends oa{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),Fv=ca.mark({class:`cm-snippetField`}),Iv=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=ca.set(e.map(e=>(e.from==e.to?Pv:Fv).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},Lv=Ur.define({map(e,t){return e&&e.map(t)}}),Rv=Ur.define(),zv=Sr.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(Lv))return n.value;if(n.is(Rv)&&e)return new Iv(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>I.decorations.from(e,e=>e?e.deco:ca.none)});function Bv(e,t){return N.create(e.filter(e=>e.field==t).map(e=>N.range(e.from,e.to)))}function Vv(e){let t=Nv.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:Bn.of(a)},scrollIntoView:!0,annotations:n?[kv.of(n),Wr.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=Bv(o,0)),o.some(e=>e.field>0)){let t=new Iv(o,0),n=c.effects=[Lv.of(t)];e.state.field(zv,!1)===void 0&&n.push(Ur.appendConfig.of([zv,Gv,qv,Av]))}e.dispatch(e.state.update(c))}}function Hv(e){return({state:t,dispatch:n})=>{let r=t.field(zv,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:Bv(r.ranges,i),effects:Lv.of(a?null:new Iv(r.ranges,i)),scrollIntoView:!0})),!0}}var Uv=[{key:`Tab`,run:Hv(1),shift:Hv(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(zv,!1)?(t(e.update({effects:Lv.of(null)})),!0):!1}],Wv=P.define({combine(e){return e.length?e[0]:Uv}}),Gv=Tr.highest(Xl.compute([Wv],e=>e.facet(Wv)));function Kv(e,t){return{...t,apply:Vv(e)}}var qv=I.domEventHandlers({mousedown(e,t){let n=t.state.field(zv,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:Bv(n.ranges,i.field),effects:Lv.of(n.ranges.some(e=>e.field>i.field)?new Iv(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Jv={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},Yv=Ur.define({map(e,t){return t.mapPos(e,-1,ir.TrackAfter)??void 0}}),Xv=new class extends oi{};Xv.startSide=1,Xv.endSide=-1;var Zv=Sr.define({create(){return di.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Yv)&&(e=e.update({add:[Xv.range(n.value,n.value+1)]}));return e}});function Qv(){return[ry,Zv]}var $v=`()[]{}<>«»»«[]{}`;function ey(e){for(let t=0;t<16;t+=2)if($v.charCodeAt(t)==e)return $v.charAt(t+1);return tr(e<128?e:e+1)}function ty(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||Jv}var ny=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),ry=I.inputHandler.of((e,t,n,r)=>{if((ny?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&nr(er(r,0))==1||t!=i.from||n!=i.to)return!1;let a=ay(e.state,r);return a?(e.dispatch(a),!0):!1}),iy=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=ty(e,e.selection.main.head).brackets||Jv.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=cy(e.doc,t.head);for(let i of n)if(i==r&&sy(e.doc,t.head)==ey(er(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:N.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function ay(e,t){let n=ty(e,e.selection.main.head),r=n.brackets||Jv.brackets;for(let i of r){let a=ey(er(i,0));if(t==i)return a==i?dy(e,i,r.indexOf(i+i+i)>-1,n):ly(e,i,a,n.before||Jv.before);if(t==a&&oy(e,e.selection.main.from))return uy(e,i,a)}return null}function oy(e,t){let n=!1;return e.field(Zv).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function sy(e,t){let n=e.sliceString(t,t+2);return n.slice(0,nr(er(n,0)))}function cy(e,t){let n=e.sliceString(t-2,t);return nr(er(n,0))==n.length?n:n.slice(1)}function ly(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:Yv.of(a.to+t.length),range:N.range(a.anchor+t.length,a.head+t.length)};let o=sy(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:Yv.of(a.head+t.length),range:N.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function uy(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&sy(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:N.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function dy(e,t,n,r){let i=r.stringPrefixes||Jv.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Yv.of(r.to+t.length),range:N.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=sy(e.doc,o),c;if(s==t){if(fy(e,o))return{changes:{insert:t+t,from:o},effects:Yv.of(o+t.length),range:N.cursor(o+t.length)};if(oy(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:N.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=my(e,o-2*t.length,i))>-1&&fy(e,c))return{changes:{insert:t+t+t+t,from:o},effects:Yv.of(o+t.length),range:N.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=$r.Word&&my(e,o,i)>-1&&!py(e,o,t,i))return{changes:{insert:t+t,from:o},effects:Yv.of(o+t.length),range:N.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function fy(e,t){let n=xf(e).resolveInner(t+1);return n.parent&&n.from==t}function py(e,t,n,r){let i=xf(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function my(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=$r.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=$r.Word)return n}return-1}var hy=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new gy(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,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 t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new _y(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new gy(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},gy=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},_y=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},vy=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.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 e(this.stack,this.pos,this.index)}};function yy(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var by=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},xy=new by,Sy=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=xy,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=xy,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},Cy=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;Ey(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};Cy.prototype.contextual=Cy.prototype.fallback=Cy.prototype.extend=!1;var wy=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?yy(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(Ey(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};wy.prototype.contextual=Cy.prototype.fallback=Cy.prototype.extend=!1;var Ty=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function Ey(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||Oy(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function Dy(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function Oy(e,t,n,r){let i=Dy(n,r,t);return i<0||Dy(n,r,e)<i}var ky=typeof process<`u`&&process.env&&/\bparse\b/.test(process.env.LOG),Ay=null;function jy(e,t,n){let r=e.cursor(ad.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var My=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?jy(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?jy(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof od){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(Qu.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},Ny=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new by)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if((!n||c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new by,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new by,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535){if(o[s+1]==1)s=By(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(By(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(By(o,s+1),t,n,r))}return r}},Py=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Sy(t,r),this.tokens=new Ny(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[hy.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new My(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&Vy(r);if(e)return ky&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw ky&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return ky&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=ky?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(Qu.contextHash)||0)==n))return e.useNode(o,r),ky&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof od)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof od&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),ky&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),ky&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Fy(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=ky?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),ky&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(ky&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)ky&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))ky&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),ky&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),Fy(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),od.build({buffer:vy.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Ay||=new WeakMap).get(e);return t||Ay.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function Fy(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var Iy=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},Ly=e=>e,Ry=class{constructor(e){this.start=e.start,this.shift=e.shift||Ly,this.reduce=e.reduce||Ly,this.reuse=e.reuse||Ly,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},zy=class e extends Od{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=Qu[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new nd(t.map((t,i)=>td.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Yu;let a=yy(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(Hy),this.states=yy(e.states,Uint32Array),this.data=yy(e.stateData),this.goto=yy(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new Cy(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new Py(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535){if(n[i+1]==1)a=n[i=By(n,i+2)];else if(n[i+1]==2)return By(n,i+2);else break}if(a==t||a==0)return By(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=By(this.data,n+2);else break}r=t(By(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=By(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=Hy(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new Iy(e,n,r)}static deserialize(t){return new e(t)}};function By(e,t){return e[t]|e[t+1]<<16}function Vy(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function Hy(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var Uy=55,Wy=1,Gy=56,Ky=2,qy=57,Jy=3,Yy=4,Xy=5,Zy=6,Qy=7,$y=8,eb=9,tb=10,nb=11,rb=12,ib=13,ab=58,ob=14,sb=15,cb=59,lb=21,ub=23,db=24,fb=25,pb=27,mb=28,hb=29,gb=32,_b=35,vb=37,yb=38,bb=0,xb=1,Sb={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Cb={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},wb={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Tb(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var Eb=null,Db=null,Ob=0;function kb(e,t){let n=e.pos+t;if(Ob==n&&Db==e)return Eb;let r=e.peek(t),i=``;for(;Tb(r);)i+=String.fromCharCode(r),r=e.peek(++t);return Db=e,Ob=n,Eb=i?i.toLowerCase():r==Nb||r==Pb?void 0:null}var Ab=60,jb=62,Mb=47,Nb=63,Pb=33,Fb=45;function Ib(e,t){this.name=e,this.parent=t}var Lb=[Zy,tb,Qy,$y,eb],Rb=new Ry({start:null,shift(e,t,n,r){return Lb.indexOf(t)>-1?new Ib(kb(r,1)||``,e):e},reduce(e,t){return t==lb&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Zy||i==vb?new Ib(kb(r,1)||``,e):e},strict:!1}),zb=new Ty((e,t)=>{if(e.next!=Ab){e.next<0&&t.context&&e.acceptToken(ab);return}e.advance();let n=e.next==Mb;n&&e.advance();let r=kb(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?sb:ob);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(nb);if(i&&Cb[i])return e.acceptToken(ab,-2);if(t.dialectEnabled(bb))return e.acceptToken(rb);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(ib)}else{if(r==`script`)return e.acceptToken(Qy);if(r==`style`)return e.acceptToken($y);if(r==`textarea`)return e.acceptToken(eb);if(Sb.hasOwnProperty(r))return e.acceptToken(tb);i&&wb[i]&&wb[i][r]?e.acceptToken(ab,-1):e.acceptToken(Zy)}},{contextual:!0}),Bb=new Ty(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(cb);break}if(e.next==Fb)t++;else if(e.next==jb&&t>=2){n>=3&&e.acceptToken(cb,-2);break}else t=0;e.advance()}});function Vb(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var Hb=new Ty((e,t)=>{if(e.next==Mb&&e.peek(1)==jb){let n=t.dialectEnabled(xb)||Vb(t.context);e.acceptToken(n?Xy:Yy,2)}else e.next==jb&&e.acceptToken(Yy,1)});function Ub(e,t,n){let r=2+e.length;return new Ty(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==Ab||a==1&&i.next==Mb||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==jb){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var Wb=Ub(`script`,Uy,Wy),Gb=Ub(`style`,Gy,Ky),Kb=Ub(`textarea`,qy,Jy),qb=Xd({"Text RawText IncompleteTag IncompleteCloseTag":R.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":R.angleBracket,TagName:R.tagName,"MismatchedCloseTag/TagName":[R.tagName,R.invalid],AttributeName:R.attributeName,"AttributeValue UnquotedAttributeValue":R.attributeValue,Is:R.definitionOperator,"EntityReference CharacterReference":R.character,Comment:R.blockComment,ProcessingInst:R.processingInstruction,DoctypeDecl:R.documentMeta}),Jb=zy.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59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T!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:Rb,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`TextContent Entity`],[`isolate`,-11,22,30,31,33,34,36,37,38,39,42,43,`ltr`,-3,27,28,40,``]],propS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6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Wb,Gb,Kb,Hb,zb,Bb,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Yb(e,t){let n=Object.create(null);for(let r of e.getChildren(db)){let e=r.getChild(fb),i=r.getChild(pb)||r.getChild(mb);e&&(n[t.read(e.from,e.to)]=i?i.type.id==pb?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function Xb(e,t){let n=e.getChild(ub);return n?t.read(n.from,n.to):` `}function Zb(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=Yb(e.node.parent.firstChild,t)))return{parser:i.parser,bracketed:!0};return null}function Qb(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return Ad((e,t)=>{let s=e.type.id;if(s==hb)return Zb(e,t,n);if(s==gb)return Zb(e,t,r);if(s==_b)return Zb(e,t,i);if(s==lb&&a.length){let n=e.node,r=n.firstChild,i=r&&Xb(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=Yb(r,t)))){let t=n.lastChild,i=t.type.id==yb?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==db){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=Xb(n.parent,t))continue;let e=n.lastChild;if(e.type.id==pb){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}],bracketed:!0}}else if(e.type.id==mb)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var $b=148,ex=1,tx=149,nx=150,rx=2,ix=151,ax=3,ox=4,sx=[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],cx=58,lx=40,ux=95,dx=91,fx=45,px=46,mx=35,hx=37,gx=38,_x=92,vx=10,yx=42;function bx(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function xx(e){return e>=48&&e<=57}function Sx(e){return xx(e)||e>=97&&e<=102||e>=65&&e<=70}var Cx=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(bx(c)||c==fx||c==ux||a&&xx(c))!a&&(c!=fx||s>0)&&(a=!0),o===s&&c==fx&&o++,r.advance();else if(c==_x&&r.peek(1)!=vx){if(r.advance(),Sx(r.next)){do r.advance();while(Sx(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o>=2&&i.canShift(rx)?t:c==lx?n:e);break}}},wx=new Ty(Cx(tx,rx,nx),{contextual:!0}),Tx=new Ty(Cx(ix,ax,ox),{contextual:!0}),Ex=new Ty(e=>{if(sx.includes(e.peek(-1))){let{next:t}=e;(bx(t)||t==ux||t==mx||t==px||t==yx||t==dx||t==cx&&bx(e.peek(1))||t==fx||t==gx)&&e.acceptToken($b)}}),Dx=new Ty(e=>{if(!sx.includes(e.peek(-1))){let{next:t}=e;if(t==hx&&(e.advance(),e.acceptToken(ex)),bx(t)){do e.advance();while(bx(e.next)||xx(e.next));e.acceptToken(ex)}}}),Ox=Xd({"AtKeyword import charset namespace keyframes media supports font-feature-values":R.definitionKeyword,"from to selector scope MatchFlag":R.keyword,NamespaceName:R.namespace,KeyframeName:R.labelName,KeyframeRangeName:R.operatorKeyword,TagName:R.tagName,ClassName:R.className,PseudoClassName:R.constant(R.className),IdName:R.labelName,"FeatureName PropertyName":R.propertyName,AttributeName:R.attributeName,NumberLiteral:R.number,KeywordQuery:R.keyword,UnaryQueryOp:R.operatorKeyword,"CallTag ValueName FontName":R.atom,VariableName:R.variableName,Callee:R.operatorKeyword,Unit:R.unit,"UniversalSelector NestingSelector":R.definitionOperator,"MatchOp CompareOp":R.compareOperator,"ChildOp SiblingOp, LogicOp":R.logicOperator,BinOp:R.arithmeticOperator,Important:R.modifier,Comment:R.blockComment,ColorLiteral:R.color,"ParenthesizedContent StringLiteral":R.string,":":R.punctuation,"PseudoOp #":R.derefOperator,"; , |":R.separator,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace}),kx={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:158,"url-prefix":158,domain:158,regexp:158},Ax={__proto__:null,or:104,and:104,not:112,only:112,layer:212},jx={__proto__:null,selector:118,style:124,layer:208},Mx={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},Nx={__proto__:null,to:249},Px=zy.deserialize({version:14,states:"MrQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FqO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#ERO'dQdO'#ETO'oQdO'#E[O'oQdO'#E_OOQP'#Fq'#FqO)RQhO'#FQOOQS'#Fp'#FpOOQS'#FT'#FTQYQdOOO)YQdO'#EeO*iQhO'#EkO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Q'R%{R(['yR#OgR#QhR$s#QS&[$r&]R(Q'[V&Y$r&]'[R#YkQ#`qR%S#`QcOSoP!RU!lco%PR%P#[Q%]#q[&l%]&r'i'r'x(bQ&r%aQ'i&mQ'r&wQ'x'OR(b(VQ$[!nQ$^!oQ$`!pV%v$[$^$`Q&Q$iR'X&QQ&v%iS'q&v(WR(W'rQ&n%]R'j&nQ&j%YR'h&jQ!QXR#m!QQ&d${R'c&dQ#]nS%Q#]%RR%R#^Q'z'RR(]'zQ$m!yR&U$mQ&]$rR'_&]Q']&[R(R']Q#XkR$y#XQ$P!dR%f$P_bOPco!R#[%P^XOPco!R#[%PQ!`]Q!a^Q#i|Q#j}Q#k!OQ#l!PQ$u#SQ%Y#pR'g&iR%^#qQ!rdQ!{f[$X!n!o!p$[$^$`Q${#Zh%[#q%]%a&m&r&w'O'i'r'x(V(bQ%`#vQ%z$cS&b${&dQ&h%WQ'b&cR'|'T]$Z!n!o!p$[$^$`Q!d`U!ye!r$gQ#RiQ#y!cS#|!d$PQ$R!eQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'o&uQ#{!cW%s$W%m&z'uQ&t%bQ'w&}Q(U'mR(d(ZQ%u$WQ&y%mQ't&zR(Y'uR%k$SR%Z#pQpPR#o!RQ!zeQ$f!rR%}$g",nodeNames:`⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles`,maxTerm:174,nodeProps:[[`isolate`,-2,5,39,``],[`openedBy`,23,`(`,31,`[`,34,`{`],[`closedBy`,24,`)`,32,`]`,35,`}`]],propSources:[Ox],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!r`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$_~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'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S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU#SQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[Ex,Dx,wx,Tx,1,2,3,4,new wy(`m~RRYZ[z{a~~g~aO$b~~dP!P!Qg~lO$c~~`,28,155)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:150,get:e=>kx[e]||-1},{term:151,get:e=>Ax[e]||-1},{term:4,get:e=>jx[e]||-1},{term:28,get:e=>Mx[e]||-1},{term:149,get:e=>Nx[e]||-1}],tokenPrec:2444}),Fx=null;function Ix(){if(!Fx&&typeof document==`object`&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!=`cssText`&&r!=`cssFloat`&&typeof e[r]==`string`&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));Fx=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return Fx||[]}var Lx=`active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where`.split(`.`).map(e=>({type:`class`,label:e})),Rx=`above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`).map(e=>({type:`keyword`,label:e})).concat(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`).map(e=>({type:`constant`,label:e}))),zx=`a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul`.split(`.`).map(e=>({type:`type`,label:e})),Bx=[`@charset`,`@color-profile`,`@container`,`@counter-style`,`@font-face`,`@font-feature-values`,`@font-palette-values`,`@import`,`@keyframes`,`@layer`,`@media`,`@namespace`,`@page`,`@position-try`,`@property`,`@scope`,`@starting-style`,`@supports`,`@view-transition`].map(e=>({type:`keyword`,label:e})),Vx=/^(\w[\w-]*|-\w[\w-]*|)$/,Hx=/^-(-[\w-]*)?$/;function Ux(e,t){if((e.name==`(`||e.type.isError)&&(e=e.parent||e),e.name!=`ArgList`)return!1;let n=e.parent?.firstChild;return n?.name==`Callee`&&t.sliceString(n.from,n.to)==`var`}var Wx=new Ed,Gx=[`Declaration`];function Kx(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function qx(e,t,n){if(t.to-t.from>4096){let r=Wx.get(t);if(r)return r;let i=[],a=new Set,o=t.cursor(ad.IncludeAnonymous);if(o.firstChild())do for(let t of qx(e,o.node,n))a.has(t.label)||(a.add(t.label),i.push(t));while(o.nextSibling());return Wx.set(t,i),i}{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(Gx)&&t.node.nextSibling?.name==`:`){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:`variable`}))}}),r}}var Jx=(e=>t=>{let{state:n,pos:r}=t,i=xf(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)==`-`;if(i.name==`PropertyName`||(a||i.name==`TagName`)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Ix(),validFor:Vx};if(i.name==`ValueName`)return{from:i.from,options:Rx,validFor:Vx};if(i.name==`PseudoClassName`)return{from:i.from,options:Lx,validFor:Vx};if(e(i)||(t.explicit||a)&&Ux(i,n.doc))return{from:e(i)||a?i.from:r,options:qx(n.doc,Kx(i),e),validFor:Hx};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:Ix(),validFor:Vx};return{from:i.from,options:zx,validFor:Vx}}if(i.name==`AtKeyword`)return{from:i.from,options:Bx,validFor:Vx};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:Lx,validFor:Vx}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:Rx,validFor:Vx}:o.name==`Block`||o.name==`Styles`?{from:r,options:Ix(),validFor:Vx}:null})(e=>e.name==`VariableName`),Yx=bf.define({name:`css`,parser:Px.configure({props:[Bf.add({Declaration:Qf()}),ep.add({"Block KeyframeList":tp})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function Xx(){return new Nf(Yx,Yx.data.of({autocomplete:Jx}))}var Zx=317,Qx=318,$x=1,eS=2,tS=3,nS=4,rS=319,iS=321,aS=322,oS=5,sS=6,cS=0,lS=[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],uS=125,dS=59,fS=47,pS=42,mS=43,hS=45,gS=60,_S=44,vS=63,yS=46,bS=91,xS=new Ry({start:!1,shift(e,t){return t==oS||t==sS||t==iS?e:t==aS},strict:!1}),SS=new Ty((e,t)=>{let{next:n}=e;(n==uS||n==-1||t.context)&&e.acceptToken(rS)},{contextual:!0,fallback:!0}),CS=new Ty((e,t)=>{let{next:n}=e,r;lS.indexOf(n)>-1||(n!=fS||(r=e.peek(1))!=fS&&r!=pS)&&n!=uS&&n!=dS&&n!=-1&&!t.context&&e.acceptToken(Zx)},{contextual:!0}),wS=new Ty((e,t)=>{e.next==bS&&!t.context&&e.acceptToken(Qx)},{contextual:!0}),TS=new Ty((e,t)=>{let{next:n}=e;if(n==mS||n==hS){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift($x);e.acceptToken(n?$x:eS)}}else n==vS&&e.peek(1)==yS&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(tS))},{contextual:!0});function ES(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var DS=new Ty((e,t)=>{if(e.next!=gS||!t.dialectEnabled(cS)||(e.advance(),e.next==fS))return;let n=0;for(;lS.indexOf(e.next)>-1;)e.advance(),n++;if(ES(e.next,!0)){for(e.advance(),n++;ES(e.next,!1);)e.advance(),n++;for(;lS.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==_S)return;for(let t=0;;t++){if(t==7){if(!ES(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(nS,-n)}),OS=Xd({"get set async static":R.modifier,"for while do if else switch try catch finally return throw break continue default case defer":R.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":R.operatorKeyword,"let var const using function class extends":R.definitionKeyword,"import export from":R.moduleKeyword,"with debugger new":R.keyword,TemplateString:R.special(R.string),super:R.atom,BooleanLiteral:R.bool,this:R.self,null:R.null,Star:R.modifier,VariableName:R.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":R.function(R.variableName),VariableDefinition:R.definition(R.variableName),Label:R.labelName,PropertyName:R.propertyName,PrivatePropertyName:R.special(R.propertyName),"CallExpression/MemberExpression/PropertyName":R.function(R.propertyName),"FunctionDeclaration/VariableDefinition":R.function(R.definition(R.variableName)),"ClassDeclaration/VariableDefinition":R.definition(R.className),"NewExpression/VariableName":R.className,PropertyDefinition:R.definition(R.propertyName),PrivatePropertyDefinition:R.definition(R.special(R.propertyName)),UpdateOp:R.updateOperator,"LineComment Hashbang":R.lineComment,BlockComment:R.blockComment,Number:R.number,String:R.string,Escape:R.escape,ArithOp:R.arithmeticOperator,LogicOp:R.logicOperator,BitOp:R.bitwiseOperator,CompareOp:R.compareOperator,RegExp:R.regexp,Equals:R.definitionOperator,Arrow:R.function(R.punctuation),": Spread":R.punctuation,"( )":R.paren,"[ ]":R.squareBracket,"{ }":R.brace,"InterpolationStart InterpolationEnd":R.special(R.brace),".":R.derefOperator,", ;":R.separator,"@":R.meta,TypeName:R.typeName,TypeDefinition:R.definition(R.typeName),"type enum interface implements namespace module declare":R.definitionKeyword,"abstract global Privacy readonly override":R.modifier,"is keyof unique infer asserts":R.operatorKeyword,JSXAttributeValue:R.attributeValue,JSXText:R.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":R.angleBracket,"JSXIdentifier JSXNameSpacedName":R.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":R.attributeName,"JSXBuiltin/JSXIdentifier":R.standard(R.tagName)}),kS={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},AS={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},jS={__proto__:null,"<":193},MS=zy.deserialize({version:14,states:"$FvQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO9kQ`O'#HSO=SQ`O'#HVO>kQ`O'#CeO>{Q`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S-u'm'nQ-w'oR3T-vT#kZ%eS#jZ%eS%km,qU(h#h#i#lS.Z(i(jQ._(kQ0u+`Q3Y.[U3Z.].^.`S7S3[3]R9`7Td#^W#W#Z%h(U(_*Z+[.U/nr#gZm#h#i#l%e(i(j(k+`.[.].^.`3[3]7TS*^$x*cQ/u*_Q2V,qQ2l-WQ4`/qQ6q2eQ7s4aQ9W6rT=l'X+^V#aW%h*ZU#`W%h*ZS(V#W(_U([#Z+[/nS-]'X+^T.P(U.UV'_!e%i*[Q$lfR)y$qT)n$l)oR4V/VT*`$x*cT*i${*ZQ0x+hQ1h,XQ3_.gQ5t1jQ6P1rQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,u,z2]2`Q&l!VR,j&itmOXst!U!V!Z#d%m&i&r&t&u&w,u,z2]2`R,q&oT%lm,qR1l,ZR,i&gQ&U|S,P&V&WR1_,QR+u&PT&p!W&sT&q!W&sT2_,z2`",nodeNames:`⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:381,context:xS,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,`Expression`,-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,`Type`,-3,88,103,109,`ClassItem`],[`openedBy`,23,`<`,38,`InterpolationStart`,56,`[`,60,`{`,73,`(`,161,`JSXStartCloseTag`],[`closedBy`,-2,24,169,`>`,40,`InterpolationEnd`,50,`]`,61,`}`,74,`)`,166,`JSXEndTag`]],propSources:[OS],skippedNodes:[0,5,6,279],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$j&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$j&j([!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU([!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$j&j(XpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#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d~iO(S~~`,25,324)],topRules:{Script:[0,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15152},dynamicPrecedences:{80:1,82:1,94:1,170:1,200:1},specialized:[{term:328,get:e=>kS[e]||-1},{term:344,get:e=>AS[e]||-1},{term:95,get:e=>jS[e]||-1}],tokenPrec:15178}),NS=[Kv("function ${name}(${params}) {\n ${}\n}",{label:`function`,detail:`definition`,type:`keyword`}),Kv("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:`for`,detail:`loop`,type:`keyword`}),Kv("for (let ${name} of ${collection}) {\n ${}\n}",{label:`for`,detail:`of loop`,type:`keyword`}),Kv(`do {
12 12 \${}
13 13 } while (\${})`,{label:`do`,detail:`loop`,type:`keyword`}),Kv(`while (\${}) {
14 14 \${}
15 15 }`,{label:`while`,detail:`loop`,type:`keyword`}),Kv(`try {